dl-common-util 0.0.2 → 0.0.3
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/88b0986a7186d029-atomicfu-js-ir.js +15 -0
- package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -0
- package/buffer-kt.js +267 -0
- package/buffer-kt.js.map +1 -0
- package/dl-common-util.d.ts +160 -61
- package/dl-common-util.js +2241 -500
- package/dl-common-util.js.map +1 -1
- package/kotlin-js.js +15 -0
- package/kotlin-js.js.map +1 -0
- package/kotlin-kotlin-stdlib-js-ir.js +2186 -1189
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js +15 -0
- package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map +1 -0
- package/kotlin-web.js +15 -0
- package/kotlin-web.js.map +1 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +15 -0
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -0
- package/package.json +1 -1
package/dl-common-util.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (root, factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
|
-
define(['exports', 'pinyin-pro', './kotlin-kotlin-stdlib-js-ir.js'], factory);
|
|
3
|
+
define(['exports', 'pinyin-pro', './kotlin-kotlin-stdlib-js-ir.js', './buffer-kt.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
|
-
factory(module.exports, require('pinyin-pro'), require('./kotlin-kotlin-stdlib-js-ir.js'));
|
|
5
|
+
factory(module.exports, require('pinyin-pro'), require('./kotlin-kotlin-stdlib-js-ir.js'), require('./buffer-kt.js'));
|
|
6
6
|
else {
|
|
7
7
|
if (typeof PinyinPro === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'dl-common-util'. Its dependency 'pinyin-pro' was not found. Please, check whether 'pinyin-pro' is loaded prior to 'dl-common-util'.");
|
|
@@ -10,74 +10,110 @@
|
|
|
10
10
|
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
|
|
11
11
|
throw new Error("Error loading module 'dl-common-util'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'dl-common-util'.");
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
if (typeof this['buffer-kt'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'dl-common-util'. Its dependency 'buffer-kt' was not found. Please, check whether 'buffer-kt' is loaded prior to 'dl-common-util'.");
|
|
15
|
+
}
|
|
16
|
+
root['dl-common-util'] = factory(typeof this['dl-common-util'] === 'undefined' ? {} : this['dl-common-util'], PinyinPro, this['kotlin-kotlin-stdlib-js-ir'], this['buffer-kt']);
|
|
14
17
|
}
|
|
15
|
-
}(this, function (_, PinyinPro, kotlin_kotlin) {
|
|
18
|
+
}(this, function (_, PinyinPro, kotlin_kotlin, kotlin_com_ditchoom_buffer) {
|
|
16
19
|
'use strict';
|
|
17
20
|
//region block: imports
|
|
18
21
|
var imul = Math.imul;
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
22
|
+
var VOID = kotlin_kotlin.$_$.g3;
|
|
23
|
+
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.e;
|
|
24
|
+
var THROW_CCE = kotlin_kotlin.$_$.c3;
|
|
25
|
+
var isCharSequence = kotlin_kotlin.$_$.m1;
|
|
26
|
+
var trim = kotlin_kotlin.$_$.z2;
|
|
27
|
+
var toString = kotlin_kotlin.$_$.v1;
|
|
28
|
+
var Long = kotlin_kotlin.$_$.b3;
|
|
29
|
+
var Companion_getInstance = kotlin_com_ditchoom_buffer.$_$.c;
|
|
30
|
+
var wrap = kotlin_com_ditchoom_buffer.$_$.b;
|
|
31
|
+
var toLong = kotlin_kotlin.$_$.t1;
|
|
32
|
+
var indexOf = kotlin_kotlin.$_$.x;
|
|
33
|
+
var copyOfRange = kotlin_kotlin.$_$.v;
|
|
34
|
+
var allocate = kotlin_com_ditchoom_buffer.$_$.a;
|
|
35
|
+
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.m;
|
|
36
|
+
var toString_0 = kotlin_kotlin.$_$.x2;
|
|
37
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.j;
|
|
38
|
+
var padStart = kotlin_kotlin.$_$.l2;
|
|
39
|
+
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.n;
|
|
40
|
+
var IndexOutOfBoundsException_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
41
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.f;
|
|
42
|
+
var indexOf_0 = kotlin_kotlin.$_$.i2;
|
|
43
|
+
var numberToInt = kotlin_kotlin.$_$.o1;
|
|
44
|
+
var toByte = kotlin_kotlin.$_$.s1;
|
|
45
|
+
var toInt = kotlin_kotlin.$_$.v2;
|
|
46
|
+
var charSequenceLength = kotlin_kotlin.$_$.e1;
|
|
47
|
+
var hexToByte = kotlin_kotlin.$_$.h2;
|
|
48
|
+
var hexToByteArray = kotlin_kotlin.$_$.g2;
|
|
49
|
+
var iterator = kotlin_kotlin.$_$.j2;
|
|
50
|
+
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.k;
|
|
51
|
+
var charSequenceGet = kotlin_kotlin.$_$.d1;
|
|
52
|
+
var toString_1 = kotlin_kotlin.$_$.l;
|
|
53
|
+
var THROW_ISE = kotlin_kotlin.$_$.d3;
|
|
54
|
+
var Unit_getInstance = kotlin_kotlin.$_$.r;
|
|
55
|
+
var Enum = kotlin_kotlin.$_$.a3;
|
|
56
|
+
var protoOf = kotlin_kotlin.$_$.q1;
|
|
57
|
+
var defineProp = kotlin_kotlin.$_$.h1;
|
|
58
|
+
var classMeta = kotlin_kotlin.$_$.f1;
|
|
59
|
+
var setMetadataFor = kotlin_kotlin.$_$.r1;
|
|
60
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.e3;
|
|
57
61
|
var primitiveArrayConcat = kotlin_kotlin.$_$.a;
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var
|
|
62
|
+
var roundToInt = kotlin_kotlin.$_$.x1;
|
|
63
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.c;
|
|
64
|
+
var until = kotlin_kotlin.$_$.z1;
|
|
65
|
+
var step = kotlin_kotlin.$_$.y1;
|
|
66
|
+
var slice = kotlin_kotlin.$_$.p2;
|
|
67
|
+
var toUInt = kotlin_kotlin.$_$.y2;
|
|
68
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.o;
|
|
69
|
+
var copyToArray = kotlin_kotlin.$_$.w;
|
|
70
|
+
var toString_2 = kotlin_kotlin.$_$.w2;
|
|
71
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.d;
|
|
72
|
+
var map = kotlin_kotlin.$_$.b2;
|
|
73
|
+
var joinToString = kotlin_kotlin.$_$.a2;
|
|
74
|
+
var getNumberHashCode = kotlin_kotlin.$_$.j1;
|
|
75
|
+
var equals = kotlin_kotlin.$_$.i1;
|
|
76
|
+
var get_PI = kotlin_kotlin.$_$.w1;
|
|
77
|
+
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.i;
|
|
78
|
+
var removeLast = kotlin_kotlin.$_$.z;
|
|
79
|
+
var Default_getInstance = kotlin_kotlin.$_$.q;
|
|
80
|
+
var to = kotlin_kotlin.$_$.f3;
|
|
81
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.s;
|
|
82
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.b;
|
|
83
|
+
var copyOfRange_0 = kotlin_kotlin.$_$.u;
|
|
84
|
+
var NoSuchElementException_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
85
|
+
var compareTo = kotlin_kotlin.$_$.g1;
|
|
86
|
+
var objectMeta = kotlin_kotlin.$_$.p1;
|
|
87
|
+
var toList = kotlin_kotlin.$_$.c2;
|
|
88
|
+
var replaceRange = kotlin_kotlin.$_$.m2;
|
|
89
|
+
var contains = kotlin_kotlin.$_$.d2;
|
|
90
|
+
var println = kotlin_kotlin.$_$.c1;
|
|
91
|
+
var toCharArray = kotlin_kotlin.$_$.r2;
|
|
92
|
+
var replaceRange_0 = kotlin_kotlin.$_$.n2;
|
|
93
|
+
var substring = kotlin_kotlin.$_$.q2;
|
|
94
|
+
var toDouble = kotlin_kotlin.$_$.s2;
|
|
95
|
+
var toInt_0 = kotlin_kotlin.$_$.u2;
|
|
96
|
+
var encodeToByteArray = kotlin_kotlin.$_$.f2;
|
|
97
|
+
var decodeToString = kotlin_kotlin.$_$.e2;
|
|
98
|
+
var replace = kotlin_kotlin.$_$.o2;
|
|
99
|
+
var padEnd = kotlin_kotlin.$_$.k2;
|
|
100
|
+
var getProgressionLastElement = kotlin_kotlin.$_$.b1;
|
|
101
|
+
var toIntOrNull = kotlin_kotlin.$_$.t2;
|
|
102
|
+
var numberToChar = kotlin_kotlin.$_$.n1;
|
|
103
|
+
var toShort = kotlin_kotlin.$_$.u1;
|
|
104
|
+
var toTypedArray = kotlin_kotlin.$_$.a1;
|
|
105
|
+
var joinToString_0 = kotlin_kotlin.$_$.y;
|
|
69
106
|
//endregion
|
|
70
107
|
//region block: pre-declaration
|
|
71
108
|
setMetadataFor(ChecksumType, 'ChecksumType', classMeta, Enum);
|
|
109
|
+
setMetadataFor(Coordinate, 'Coordinate', classMeta);
|
|
110
|
+
setMetadataFor(CoordinateConvert, 'CoordinateConvert', objectMeta);
|
|
111
|
+
setMetadataFor(CoordinateSystemType, 'CoordinateSystemType', classMeta, Enum);
|
|
112
|
+
setMetadataFor(DMS, 'DMS', classMeta);
|
|
113
|
+
setMetadataFor(DistanceAndBearing, 'DistanceAndBearing', classMeta);
|
|
72
114
|
setMetadataFor(GBKHelper, 'GBKHelper', objectMeta);
|
|
73
115
|
//endregion
|
|
74
|
-
function
|
|
75
|
-
return toInt(toHexString(_this__u8e3s4), 16);
|
|
76
|
-
}
|
|
77
|
-
function toUnsignedLong(_this__u8e3s4) {
|
|
78
|
-
return toLong(toHexString(_this__u8e3s4), 16);
|
|
79
|
-
}
|
|
80
|
-
function toBinString(_this__u8e3s4, space) {
|
|
116
|
+
function byteArrayToBinString(_this__u8e3s4, space) {
|
|
81
117
|
space = space === VOID ? false : space;
|
|
82
118
|
var builder = StringBuilder_init_$Create$();
|
|
83
119
|
var inductionVariable = 0;
|
|
@@ -85,27 +121,27 @@
|
|
|
85
121
|
while (inductionVariable < last) {
|
|
86
122
|
var byte = _this__u8e3s4[inductionVariable];
|
|
87
123
|
inductionVariable = inductionVariable + 1 | 0;
|
|
88
|
-
builder.
|
|
124
|
+
builder.g4(byteToBinString(byte));
|
|
89
125
|
if (space) {
|
|
90
|
-
builder.
|
|
126
|
+
builder.g4(' ');
|
|
91
127
|
}
|
|
92
128
|
}
|
|
93
129
|
// Inline function 'kotlin.text.trim' call
|
|
94
130
|
var tmp0_trim = builder.toString();
|
|
95
131
|
return toString(trim(isCharSequence(tmp0_trim) ? tmp0_trim : THROW_CCE()));
|
|
96
132
|
}
|
|
97
|
-
function
|
|
133
|
+
function byteArrayToHexString(_this__u8e3s4, space, uppercase) {
|
|
98
134
|
space = space === VOID ? false : space;
|
|
99
|
-
uppercase = uppercase === VOID ?
|
|
135
|
+
uppercase = uppercase === VOID ? true : uppercase;
|
|
100
136
|
var builder = StringBuilder_init_$Create$();
|
|
101
137
|
var inductionVariable = 0;
|
|
102
138
|
var last = _this__u8e3s4.length;
|
|
103
139
|
while (inductionVariable < last) {
|
|
104
140
|
var byte = _this__u8e3s4[inductionVariable];
|
|
105
141
|
inductionVariable = inductionVariable + 1 | 0;
|
|
106
|
-
builder.
|
|
142
|
+
builder.g4(byteToHexString(byte));
|
|
107
143
|
if (space) {
|
|
108
|
-
builder.
|
|
144
|
+
builder.g4(' ');
|
|
109
145
|
}
|
|
110
146
|
}
|
|
111
147
|
// Inline function 'kotlin.text.trim' call
|
|
@@ -123,64 +159,101 @@
|
|
|
123
159
|
}
|
|
124
160
|
return tmp;
|
|
125
161
|
}
|
|
126
|
-
function
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
162
|
+
function byteArrayToUnsignedInt(_this__u8e3s4) {
|
|
163
|
+
return byteArrayToUnsignedLong(_this__u8e3s4).b4();
|
|
164
|
+
}
|
|
165
|
+
function byteArrayToUnsignedLong(_this__u8e3s4) {
|
|
166
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
167
|
+
if (_this__u8e3s4.length === 0)
|
|
168
|
+
return new Long(0, 0);
|
|
169
|
+
var buffer = wrap(Companion_getInstance(), _this__u8e3s4);
|
|
170
|
+
var temp = toLong(byteToUnsignedInt(buffer.g(0)));
|
|
171
|
+
var inductionVariable = 1;
|
|
172
|
+
var last = buffer.lb();
|
|
173
|
+
if (inductionVariable < last)
|
|
174
|
+
do {
|
|
175
|
+
var i = inductionVariable;
|
|
176
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
177
|
+
temp = temp.v3(8).w3(toLong(byteToUnsignedInt(buffer.g(i))));
|
|
178
|
+
}
|
|
179
|
+
while (inductionVariable < last);
|
|
180
|
+
return temp;
|
|
181
|
+
}
|
|
182
|
+
function indexOfByteArray(_this__u8e3s4, bs) {
|
|
183
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
184
|
+
if (bs.length === 0)
|
|
185
|
+
return -1;
|
|
186
|
+
if (bs.length > _this__u8e3s4.length)
|
|
187
|
+
return -1;
|
|
188
|
+
if (bs.length === 1)
|
|
189
|
+
return indexOf(_this__u8e3s4, bs[0]);
|
|
190
|
+
var buffer = wrap(Companion_getInstance(), _this__u8e3s4);
|
|
191
|
+
while (buffer.ab()) {
|
|
192
|
+
if (buffer.za() < bs.length)
|
|
135
193
|
return -1;
|
|
136
|
-
|
|
137
|
-
|
|
194
|
+
var idx = 0;
|
|
195
|
+
$l$loop: while (idx < bs.length && buffer.mb() === bs[idx]) {
|
|
196
|
+
idx = idx + 1 | 0;
|
|
138
197
|
}
|
|
198
|
+
if (idx === bs.length)
|
|
199
|
+
return buffer.ya() - idx | 0;
|
|
200
|
+
buffer.pb((buffer.ya() - idx | 0) + 1 | 0);
|
|
139
201
|
}
|
|
202
|
+
return -1;
|
|
140
203
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
204
|
+
function byteArrayPadStart(_this__u8e3s4, length, padByte) {
|
|
205
|
+
padByte = padByte === VOID ? 0 : padByte;
|
|
206
|
+
if (_this__u8e3s4.length >= length)
|
|
207
|
+
return copyOfRange(_this__u8e3s4, _this__u8e3s4.length - length | 0, _this__u8e3s4.length);
|
|
208
|
+
var buf = allocate(Companion_getInstance(), length);
|
|
209
|
+
var inductionVariable = 0;
|
|
210
|
+
var last = length - _this__u8e3s4.length | 0;
|
|
211
|
+
if (inductionVariable < last)
|
|
212
|
+
do {
|
|
213
|
+
var i = inductionVariable;
|
|
214
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
215
|
+
buf.ob(i, padByte);
|
|
216
|
+
}
|
|
217
|
+
while (inductionVariable < last);
|
|
218
|
+
buf.pb(length - _this__u8e3s4.length | 0);
|
|
219
|
+
buf.bb(_this__u8e3s4);
|
|
220
|
+
buf.pb(0);
|
|
221
|
+
return buf.nb(length);
|
|
222
|
+
}
|
|
223
|
+
function byteArrayPadEnd(_this__u8e3s4, length, padByte) {
|
|
224
|
+
padByte = padByte === VOID ? 0 : padByte;
|
|
225
|
+
if (_this__u8e3s4.length >= length)
|
|
226
|
+
return copyOfRange(_this__u8e3s4, 0, length);
|
|
227
|
+
var buf = allocate(Companion_getInstance(), length);
|
|
228
|
+
buf.bb(_this__u8e3s4);
|
|
229
|
+
var inductionVariable = 0;
|
|
230
|
+
var last = length - _this__u8e3s4.length | 0;
|
|
231
|
+
if (inductionVariable < last)
|
|
232
|
+
do {
|
|
233
|
+
var i = inductionVariable;
|
|
234
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
235
|
+
buf.ob(i + _this__u8e3s4.length | 0, padByte);
|
|
236
|
+
}
|
|
237
|
+
while (inductionVariable < last);
|
|
238
|
+
buf.pb(0);
|
|
239
|
+
return buf.nb(length);
|
|
171
240
|
}
|
|
172
|
-
function
|
|
241
|
+
function byteArrayGetBitRange(_this__u8e3s4, start, length) {
|
|
242
|
+
var buf = wrap(Companion_getInstance(), _this__u8e3s4);
|
|
243
|
+
return getBitRange(buf, start, length);
|
|
244
|
+
}
|
|
245
|
+
function byteToBinString(_this__u8e3s4) {
|
|
173
246
|
var tmp$ret$0;
|
|
174
247
|
// Inline function 'kotlin.toUByte' call
|
|
175
248
|
tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
176
|
-
return
|
|
249
|
+
return padStart(toString_0(tmp$ret$0, 2), 8, _Char___init__impl__6a9atx(48));
|
|
177
250
|
}
|
|
178
|
-
function
|
|
179
|
-
uppercase = uppercase === VOID ?
|
|
251
|
+
function byteToHexString(_this__u8e3s4, uppercase) {
|
|
252
|
+
uppercase = uppercase === VOID ? true : uppercase;
|
|
180
253
|
var tmp$ret$0;
|
|
181
254
|
// Inline function 'kotlin.toUByte' call
|
|
182
255
|
tmp$ret$0 = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
183
|
-
var result =
|
|
256
|
+
var result = padStart(toString_0(tmp$ret$0, 16), 2, _Char___init__impl__6a9atx(48));
|
|
184
257
|
var tmp;
|
|
185
258
|
if (uppercase) {
|
|
186
259
|
// Inline function 'kotlin.text.uppercase' call
|
|
@@ -193,150 +266,201 @@
|
|
|
193
266
|
}
|
|
194
267
|
return tmp;
|
|
195
268
|
}
|
|
196
|
-
function
|
|
269
|
+
function byteToUnsignedInt(_this__u8e3s4) {
|
|
197
270
|
// Inline function 'kotlin.UByte.toInt' call
|
|
198
271
|
// Inline function 'kotlin.toUByte' call
|
|
199
272
|
var tmp0_toInt = _UByte___init__impl__g9hnc4(_this__u8e3s4);
|
|
200
273
|
return _UByte___get_data__impl__jof9qr(tmp0_toInt) & 255;
|
|
201
274
|
}
|
|
202
|
-
function
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
var last = _this__u8e3s4.length;
|
|
207
|
-
while (inductionVariable < last) {
|
|
208
|
-
var char = _this__u8e3s4[inductionVariable];
|
|
209
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
210
|
-
var tmp$ret$1;
|
|
211
|
-
// Inline function 'kotlin.code' call
|
|
212
|
-
tmp$ret$1 = Char__toInt_impl_vasixd(char);
|
|
213
|
-
byteList.d(toByte(tmp$ret$1));
|
|
214
|
-
}
|
|
215
|
-
return toByteArray(byteList);
|
|
216
|
-
}
|
|
217
|
-
function encodeGBK(_this__u8e3s4) {
|
|
218
|
-
return encodeGBKDo(_this__u8e3s4);
|
|
219
|
-
}
|
|
220
|
-
function decodeGBK(_this__u8e3s4) {
|
|
221
|
-
return decodeGBKDo(_this__u8e3s4);
|
|
222
|
-
}
|
|
223
|
-
function encodeUTF8(_this__u8e3s4) {
|
|
224
|
-
return encodeToByteArray(_this__u8e3s4);
|
|
275
|
+
function byteGetBit(_this__u8e3s4, bitIndex) {
|
|
276
|
+
if (!(0 <= bitIndex ? bitIndex <= 7 : false))
|
|
277
|
+
throw IndexOutOfBoundsException_init_$Create$('bitIndex must be in 0..7');
|
|
278
|
+
return byteToUnsignedInt(_this__u8e3s4) >> bitIndex & 1;
|
|
225
279
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
280
|
+
function keep(_this__u8e3s4, maxDecimalCount) {
|
|
281
|
+
if (maxDecimalCount < 0)
|
|
282
|
+
throw IllegalArgumentException_init_$Create$('maxDecimalCount must be greater than or equal to 0');
|
|
283
|
+
var pointIndex = indexOf_0(_this__u8e3s4, '.');
|
|
284
|
+
var tmp;
|
|
285
|
+
if (pointIndex === -1) {
|
|
286
|
+
tmp = _this__u8e3s4;
|
|
287
|
+
} else if (maxDecimalCount === 0) {
|
|
288
|
+
// Inline function 'kotlin.text.substring' call
|
|
289
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
290
|
+
tmp = _this__u8e3s4.substring(0, pointIndex);
|
|
291
|
+
} else {
|
|
292
|
+
var decimalCount = (_this__u8e3s4.length - pointIndex | 0) - 1 | 0;
|
|
293
|
+
var tmp_0;
|
|
294
|
+
if (decimalCount > maxDecimalCount) {
|
|
295
|
+
// Inline function 'kotlin.text.substring' call
|
|
296
|
+
var tmp0_substring = (pointIndex + maxDecimalCount | 0) + 1 | 0;
|
|
297
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
298
|
+
tmp_0 = _this__u8e3s4.substring(0, tmp0_substring);
|
|
299
|
+
} else {
|
|
300
|
+
tmp_0 = _this__u8e3s4;
|
|
301
|
+
}
|
|
302
|
+
tmp = tmp_0;
|
|
303
|
+
}
|
|
304
|
+
return tmp;
|
|
228
305
|
}
|
|
229
|
-
function
|
|
230
|
-
|
|
231
|
-
|
|
306
|
+
function toByteArray(_this__u8e3s4, size) {
|
|
307
|
+
size = size === VOID ? 0 : size;
|
|
308
|
+
if (_this__u8e3s4 < 0)
|
|
309
|
+
throw IllegalArgumentException_init_$Create$('Int must be unsigned');
|
|
310
|
+
var hex = numberToString(_this__u8e3s4, 16);
|
|
311
|
+
var tmp;
|
|
312
|
+
if (size <= 0) {
|
|
313
|
+
var tmp$ret$0;
|
|
314
|
+
// Inline function 'kotlin.math.ceil' call
|
|
315
|
+
var tmp0_ceil = hex.length / 2.0;
|
|
316
|
+
tmp$ret$0 = Math.ceil(tmp0_ceil);
|
|
317
|
+
tmp = numberToInt(tmp$ret$0);
|
|
318
|
+
} else {
|
|
319
|
+
tmp = size;
|
|
320
|
+
}
|
|
321
|
+
var length = tmp;
|
|
322
|
+
return hexStringToByteArray(padStart(hex, imul(length, 2), _Char___init__impl__6a9atx(48)));
|
|
323
|
+
}
|
|
324
|
+
function toByteArray_0(_this__u8e3s4, size) {
|
|
325
|
+
size = size === VOID ? 0 : size;
|
|
326
|
+
if (_this__u8e3s4.a4(new Long(0, 0)) < 0)
|
|
327
|
+
throw IllegalArgumentException_init_$Create$('Long must be unsigned');
|
|
328
|
+
var hex = numberToString(_this__u8e3s4, 16);
|
|
329
|
+
var tmp;
|
|
330
|
+
if (size <= 0) {
|
|
331
|
+
var tmp$ret$0;
|
|
332
|
+
// Inline function 'kotlin.math.ceil' call
|
|
333
|
+
var tmp0_ceil = hex.length / 2.0;
|
|
334
|
+
tmp$ret$0 = Math.ceil(tmp0_ceil);
|
|
335
|
+
tmp = numberToInt(tmp$ret$0);
|
|
336
|
+
} else {
|
|
337
|
+
tmp = size;
|
|
338
|
+
}
|
|
339
|
+
var length = tmp;
|
|
340
|
+
return hexStringToByteArray(padStart(hex, imul(length, 2), _Char___init__impl__6a9atx(48)));
|
|
232
341
|
}
|
|
233
|
-
function
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
while (tmp0_iterator.g()) {
|
|
238
|
-
var c = tmp0_iterator.h().p2_1;
|
|
239
|
-
var tmp$ret$1;
|
|
240
|
-
// Inline function 'kotlin.code' call
|
|
241
|
-
tmp$ret$1 = Char__toInt_impl_vasixd(c);
|
|
242
|
-
var item = toString_1(tmp$ret$1, 16);
|
|
243
|
-
if (isNeedU) {
|
|
244
|
-
builder.o6('\\u');
|
|
245
|
-
}
|
|
246
|
-
builder.o6(fillLength(item, 4));
|
|
342
|
+
function getBitRange(_this__u8e3s4, start, length) {
|
|
343
|
+
if (length <= 0) {
|
|
344
|
+
// Inline function 'kotlin.byteArrayOf' call
|
|
345
|
+
return new Int8Array([]);
|
|
247
346
|
}
|
|
248
|
-
|
|
347
|
+
if (start < 0)
|
|
348
|
+
throw IllegalArgumentException_init_$Create$('start must be greater than 0');
|
|
349
|
+
if ((start + length | 0) > imul(_this__u8e3s4.lb(), 8))
|
|
350
|
+
throw IllegalArgumentException_init_$Create$('start + offset must be less than capacity * 8');
|
|
351
|
+
var right = (8 - ((start + length | 0) % 8 | 0) | 0) % 8 | 0;
|
|
352
|
+
var left = (8 - (length % 8 | 0) | 0) % 8 | 0;
|
|
353
|
+
var tmp$ret$1;
|
|
354
|
+
// Inline function 'kotlin.math.ceil' call
|
|
355
|
+
var tmp0_ceil = length / 8.0;
|
|
356
|
+
tmp$ret$1 = Math.ceil(tmp0_ceil);
|
|
357
|
+
var resSize = numberToInt(tmp$ret$1);
|
|
358
|
+
var result = new Int8Array(resSize);
|
|
359
|
+
var startByteIdx = start / 8 | 0;
|
|
360
|
+
var tmp$ret$2;
|
|
361
|
+
// Inline function 'kotlin.math.ceil' call
|
|
362
|
+
var tmp1_ceil = (start + length | 0) / 8.0;
|
|
363
|
+
tmp$ret$2 = Math.ceil(tmp1_ceil);
|
|
364
|
+
var endByteIdx = numberToInt(tmp$ret$2);
|
|
365
|
+
var buf = _this__u8e3s4;
|
|
366
|
+
var originSize = endByteIdx - startByteIdx | 0;
|
|
367
|
+
var idx = originSize - 1 | 0;
|
|
368
|
+
while ((resSize - (originSize - idx | 0) | 0) >= 0) {
|
|
369
|
+
var temp = byteToUnsignedInt(buf.g(idx + startByteIdx | 0)) >> right;
|
|
370
|
+
if (idx > 0)
|
|
371
|
+
temp = temp | byteToUnsignedInt(buf.g((idx + startByteIdx | 0) - 1 | 0)) << (8 - right | 0);
|
|
372
|
+
result[resSize - (originSize - idx | 0) | 0] = toByte(temp);
|
|
373
|
+
idx = idx - 1 | 0;
|
|
374
|
+
}
|
|
375
|
+
result[0] = toByte((byteToUnsignedInt(result[0]) << left & 255) >> left);
|
|
376
|
+
return result;
|
|
249
377
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
378
|
+
function binStringToByte(_this__u8e3s4) {
|
|
379
|
+
var value = keepByRegexStr(_this__u8e3s4, '[01]+');
|
|
380
|
+
var str = padStart(value, 8, _Char___init__impl__6a9atx(48));
|
|
381
|
+
return toByte(toInt(str, 2));
|
|
252
382
|
}
|
|
253
|
-
function
|
|
254
|
-
var value =
|
|
255
|
-
// Inline function 'kotlin.text.
|
|
256
|
-
var
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
return
|
|
260
|
-
var builder = StringBuilder_init_$Create$();
|
|
261
|
-
var str = value;
|
|
262
|
-
if (!((value.length % 4 | 0) === 0)) {
|
|
263
|
-
str = fillLength(value, imul((value.length / 4 | 0) + 1 | 0, 4), _Char___init__impl__6a9atx(48), false);
|
|
383
|
+
function binStringToByteArray(_this__u8e3s4) {
|
|
384
|
+
var value = keepByRegexStr(_this__u8e3s4, '[01]+');
|
|
385
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
386
|
+
var tmp0_isEmpty = value;
|
|
387
|
+
if (charSequenceLength(tmp0_isEmpty) === 0) {
|
|
388
|
+
// Inline function 'kotlin.byteArrayOf' call
|
|
389
|
+
return new Int8Array([]);
|
|
264
390
|
}
|
|
265
|
-
var
|
|
391
|
+
var tmp$ret$2;
|
|
392
|
+
// Inline function 'kotlin.math.ceil' call
|
|
393
|
+
var tmp1_ceil = value.length / 8.0;
|
|
394
|
+
tmp$ret$2 = Math.ceil(tmp1_ceil);
|
|
395
|
+
var length = numberToInt(tmp$ret$2);
|
|
396
|
+
value = padStart(value, imul(length, 8), _Char___init__impl__6a9atx(48));
|
|
397
|
+
var result = new Int8Array(length);
|
|
266
398
|
var inductionVariable = 0;
|
|
267
|
-
|
|
268
|
-
if (inductionVariable <= last)
|
|
399
|
+
if (inductionVariable < length)
|
|
269
400
|
do {
|
|
270
401
|
var i = inductionVariable;
|
|
271
|
-
inductionVariable = inductionVariable +
|
|
272
|
-
var
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
builder.q2(numberToChar(data));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
402
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
403
|
+
var tmp$ret$4;
|
|
404
|
+
// Inline function 'kotlin.text.substring' call
|
|
405
|
+
var tmp2_substring = value;
|
|
406
|
+
var tmp3_substring = imul(i, 8);
|
|
407
|
+
var tmp4_substring = imul(i, 8) + 8 | 0;
|
|
408
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
409
|
+
tmp$ret$4 = tmp2_substring.substring(tmp3_substring, tmp4_substring);
|
|
410
|
+
result[i] = binStringToByte(tmp$ret$4);
|
|
283
411
|
}
|
|
284
|
-
while (
|
|
285
|
-
return
|
|
412
|
+
while (inductionVariable < length);
|
|
413
|
+
return result;
|
|
286
414
|
}
|
|
287
|
-
function
|
|
288
|
-
|
|
415
|
+
function hexStringToByte(_this__u8e3s4) {
|
|
416
|
+
var value = keepByRegexStr(_this__u8e3s4, '[A-Fa-f0-9]+');
|
|
417
|
+
var str = padStart(value, 2, _Char___init__impl__6a9atx(48));
|
|
418
|
+
return hexToByte(str);
|
|
289
419
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
var
|
|
294
|
-
if (
|
|
295
|
-
|
|
296
|
-
|
|
420
|
+
function hexStringToByteArray(_this__u8e3s4) {
|
|
421
|
+
var value = keepByRegexStr(_this__u8e3s4, '[A-Fa-f0-9]+');
|
|
422
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
423
|
+
var tmp0_isEmpty = value;
|
|
424
|
+
if (charSequenceLength(tmp0_isEmpty) === 0) {
|
|
425
|
+
// Inline function 'kotlin.byteArrayOf' call
|
|
426
|
+
return new Int8Array([]);
|
|
427
|
+
}
|
|
428
|
+
var tmp$ret$2;
|
|
429
|
+
// Inline function 'kotlin.math.ceil' call
|
|
430
|
+
var tmp1_ceil = value.length / 2.0;
|
|
431
|
+
tmp$ret$2 = Math.ceil(tmp1_ceil);
|
|
432
|
+
var length = numberToInt(tmp$ret$2);
|
|
433
|
+
value = padStart(value, imul(length, 2), _Char___init__impl__6a9atx(48));
|
|
434
|
+
return hexToByteArray(value);
|
|
435
|
+
}
|
|
436
|
+
function getStringByteLength(_this__u8e3s4) {
|
|
437
|
+
var length = 0;
|
|
297
438
|
// Inline function 'kotlin.collections.iterator' call
|
|
298
439
|
var tmp0_iterator = iterator(_this__u8e3s4);
|
|
299
|
-
while (tmp0_iterator.
|
|
300
|
-
var
|
|
301
|
-
var tmp$ret$2;
|
|
440
|
+
while (tmp0_iterator.d()) {
|
|
441
|
+
var i = tmp0_iterator.e().c3_1;
|
|
302
442
|
// Inline function 'kotlin.code' call
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
443
|
+
var ascii = Char__toInt_impl_vasixd(i);
|
|
444
|
+
if (0 <= ascii ? ascii <= 255 : false) {
|
|
445
|
+
length = length + 1 | 0;
|
|
446
|
+
} else
|
|
447
|
+
length = length + 2 | 0;
|
|
306
448
|
}
|
|
307
|
-
return
|
|
449
|
+
return length;
|
|
308
450
|
}
|
|
309
|
-
function
|
|
310
|
-
var
|
|
311
|
-
// Inline function 'kotlin.text.
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
451
|
+
function getStringFirstUpperCase(_this__u8e3s4) {
|
|
452
|
+
var tmp;
|
|
453
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
454
|
+
if (charSequenceLength(_this__u8e3s4) === 0) {
|
|
455
|
+
tmp = '';
|
|
456
|
+
} else {
|
|
457
|
+
// Inline function 'kotlin.text.uppercase' call
|
|
458
|
+
var tmp0_uppercase = charSequenceGet(_this__u8e3s4, 0);
|
|
459
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
460
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
461
|
+
tmp = toString_1(tmp0_uppercase).toUpperCase();
|
|
320
462
|
}
|
|
321
|
-
|
|
322
|
-
var inductionVariable = 0;
|
|
323
|
-
var last = getProgressionLastElement(0, nestedLast, 2);
|
|
324
|
-
if (inductionVariable <= last)
|
|
325
|
-
do {
|
|
326
|
-
var i = inductionVariable;
|
|
327
|
-
inductionVariable = inductionVariable + 2 | 0;
|
|
328
|
-
// Inline function 'kotlin.text.substring' call
|
|
329
|
-
var tmp0_substring = str;
|
|
330
|
-
var tmp1_substring = i + 2 | 0;
|
|
331
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
332
|
-
var temp = tmp0_substring.substring(i, tmp1_substring);
|
|
333
|
-
builder.q2(numberToChar(toInt(temp, 16)));
|
|
334
|
-
}
|
|
335
|
-
while (!(i === last));
|
|
336
|
-
return builder.toString();
|
|
337
|
-
}
|
|
338
|
-
function decodeASCIIByByteArray(_this__u8e3s4) {
|
|
339
|
-
return decodeASCII(toHexString(_this__u8e3s4));
|
|
463
|
+
return tmp;
|
|
340
464
|
}
|
|
341
465
|
var ChecksumType_AND_instance;
|
|
342
466
|
var ChecksumType_OR_instance;
|
|
@@ -378,34 +502,38 @@
|
|
|
378
502
|
var num = getChecksum(_this__u8e3s4, type, 0, end);
|
|
379
503
|
return num === _this__u8e3s4[end];
|
|
380
504
|
}
|
|
381
|
-
function getChecksum(_this__u8e3s4, type, start,
|
|
505
|
+
function getChecksum(_this__u8e3s4, type, start, length) {
|
|
382
506
|
type = type === VOID ? ChecksumType_XOR_getInstance() : type;
|
|
383
507
|
start = start === VOID ? 0 : start;
|
|
384
|
-
|
|
508
|
+
length = length === VOID ? _this__u8e3s4.length - start | 0 : length;
|
|
385
509
|
var num = 0;
|
|
510
|
+
// Inline function 'kotlin.math.min' call
|
|
511
|
+
var tmp0_min = start + length | 0;
|
|
512
|
+
var tmp1_min = _this__u8e3s4.length;
|
|
513
|
+
var end = Math.min(tmp0_min, tmp1_min);
|
|
386
514
|
var inductionVariable = start;
|
|
387
515
|
if (inductionVariable < end)
|
|
388
516
|
do {
|
|
389
517
|
var i = inductionVariable;
|
|
390
518
|
inductionVariable = inductionVariable + 1 | 0;
|
|
391
519
|
var tmp;
|
|
392
|
-
switch (type.
|
|
520
|
+
switch (type.ja_1) {
|
|
393
521
|
case 0:
|
|
394
522
|
tmp = toByte(num + _this__u8e3s4[i]);
|
|
395
523
|
break;
|
|
396
524
|
case 1:
|
|
397
525
|
// Inline function 'kotlin.experimental.or' call
|
|
398
526
|
|
|
399
|
-
var
|
|
400
|
-
var
|
|
401
|
-
tmp = toByte(
|
|
527
|
+
var tmp2_or = num;
|
|
528
|
+
var tmp3_or = _this__u8e3s4[i];
|
|
529
|
+
tmp = toByte(tmp2_or | tmp3_or);
|
|
402
530
|
break;
|
|
403
531
|
case 2:
|
|
404
532
|
// Inline function 'kotlin.experimental.xor' call
|
|
405
533
|
|
|
406
|
-
var
|
|
407
|
-
var
|
|
408
|
-
tmp = toByte(
|
|
534
|
+
var tmp4_xor = num;
|
|
535
|
+
var tmp5_xor = _this__u8e3s4[i];
|
|
536
|
+
tmp = toByte(tmp4_xor ^ tmp5_xor);
|
|
409
537
|
break;
|
|
410
538
|
default:
|
|
411
539
|
noWhenBranchMatchedException();
|
|
@@ -437,55 +565,91 @@
|
|
|
437
565
|
ChecksumType_initEntries();
|
|
438
566
|
return ChecksumType_XOR_instance;
|
|
439
567
|
}
|
|
440
|
-
function
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
function keep(_this__u8e3s4, maxDecimalCount) {
|
|
444
|
-
var pointIndex = indexOf_0(_this__u8e3s4, '.');
|
|
445
|
-
var tmp;
|
|
446
|
-
if (pointIndex === -1) {
|
|
447
|
-
tmp = _this__u8e3s4;
|
|
448
|
-
} else {
|
|
449
|
-
var decimalCount = (_this__u8e3s4.length - pointIndex | 0) - 1 | 0;
|
|
450
|
-
var tmp_0;
|
|
451
|
-
if (decimalCount > maxDecimalCount) {
|
|
452
|
-
// Inline function 'kotlin.text.substring' call
|
|
453
|
-
var tmp0_substring = (pointIndex + maxDecimalCount | 0) + 1 | 0;
|
|
454
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
455
|
-
tmp_0 = _this__u8e3s4.substring(0, tmp0_substring);
|
|
456
|
-
} else {
|
|
457
|
-
tmp_0 = _this__u8e3s4;
|
|
458
|
-
}
|
|
459
|
-
tmp = tmp_0;
|
|
460
|
-
}
|
|
461
|
-
return tmp;
|
|
462
|
-
}
|
|
463
|
-
function toString_3(_this__u8e3s4, maxDecimalCount) {
|
|
464
|
-
return keep(_this__u8e3s4.toString(), maxDecimalCount);
|
|
568
|
+
function isDarkColor(color) {
|
|
569
|
+
var rgb = getRgbValueArrayFromHexColorString(color);
|
|
570
|
+
return rgb[0] * 8.337E-4 + rgb[1] * 0.0028047 + rgb[2] * 2.831E-4 <= 0.5;
|
|
465
571
|
}
|
|
466
|
-
function
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
572
|
+
function getNextLevelColor(color, level) {
|
|
573
|
+
var target = level > 0.0 ? '#FFFFFF' : '#000000';
|
|
574
|
+
var tmp$ret$0;
|
|
575
|
+
// Inline function 'kotlin.math.abs' call
|
|
576
|
+
tmp$ret$0 = Math.abs(level);
|
|
577
|
+
return getMiddleColor(color, target, tmp$ret$0);
|
|
578
|
+
}
|
|
579
|
+
function getMiddleColor(color1, color2, present) {
|
|
580
|
+
var startColorNumbers = getRgbValueArrayFromHexColorString(color1);
|
|
581
|
+
var endColorNumbers = getRgbValueArrayFromHexColorString(color2);
|
|
582
|
+
var redRange = endColorNumbers[0] - startColorNumbers[0] | 0;
|
|
583
|
+
var greenRange = endColorNumbers[1] - startColorNumbers[1] | 0;
|
|
584
|
+
var blueRange = endColorNumbers[2] - startColorNumbers[2] | 0;
|
|
585
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
586
|
+
var tmp0_roundToInt = redRange * present;
|
|
587
|
+
var red = roundToInt(tmp0_roundToInt) + startColorNumbers[0] | 0;
|
|
588
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
589
|
+
var tmp1_roundToInt = greenRange * present;
|
|
590
|
+
var green = roundToInt(tmp1_roundToInt) + startColorNumbers[1] | 0;
|
|
591
|
+
// Inline function 'kotlin.math.roundToInt' call
|
|
592
|
+
var tmp2_roundToInt = blueRange * present;
|
|
593
|
+
var blue = roundToInt(tmp2_roundToInt) + startColorNumbers[2] | 0;
|
|
594
|
+
var tmp$ret$5;
|
|
595
|
+
// Inline function 'kotlin.arrayOf' call
|
|
596
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
597
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
598
|
+
tmp$ret$5 = [red, green, blue];
|
|
599
|
+
return getHexColorStringFromRgbValueArray(tmp$ret$5);
|
|
471
600
|
}
|
|
472
|
-
function
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
601
|
+
function getRgbValueArrayFromHexColorString(str) {
|
|
602
|
+
if (!get_colorRegex().a9(str)) {
|
|
603
|
+
// Inline function 'kotlin.arrayOf' call
|
|
604
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
605
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
606
|
+
return [0, 0, 0];
|
|
476
607
|
}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
608
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
609
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
610
|
+
var hexColor = str.toLowerCase();
|
|
611
|
+
if (str.length === 4) {
|
|
612
|
+
var t = '#';
|
|
613
|
+
var inductionVariable = 1;
|
|
614
|
+
var last = hexColor.length;
|
|
615
|
+
if (inductionVariable < last)
|
|
616
|
+
do {
|
|
617
|
+
var i = inductionVariable;
|
|
618
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
619
|
+
t = t + (toString_1(charSequenceGet(hexColor, i)) + toString_1(charSequenceGet(hexColor, i)));
|
|
620
|
+
}
|
|
621
|
+
while (inductionVariable < last);
|
|
622
|
+
hexColor = t;
|
|
483
623
|
}
|
|
484
|
-
|
|
624
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
625
|
+
var arr = ArrayList_init_$Create$();
|
|
626
|
+
var progression = step(until(1, hexColor.length), 2);
|
|
627
|
+
var inductionVariable_0 = progression.k_1;
|
|
628
|
+
var last_0 = progression.l_1;
|
|
629
|
+
var step_0 = progression.m_1;
|
|
630
|
+
if ((step_0 > 0 ? inductionVariable_0 <= last_0 : false) ? true : step_0 < 0 ? last_0 <= inductionVariable_0 : false)
|
|
631
|
+
do {
|
|
632
|
+
var i_0 = inductionVariable_0;
|
|
633
|
+
inductionVariable_0 = inductionVariable_0 + step_0 | 0;
|
|
634
|
+
var s = slice(hexColor, until(i_0, i_0 + 2 | 0));
|
|
635
|
+
var tmp$ret$6;
|
|
636
|
+
// Inline function 'kotlin.UInt.toInt' call
|
|
637
|
+
var tmp0_toInt = toUInt(s, 16);
|
|
638
|
+
tmp$ret$6 = _UInt___get_data__impl__f0vqqw(tmp0_toInt);
|
|
639
|
+
arr.b(tmp$ret$6);
|
|
640
|
+
}
|
|
641
|
+
while (!(i_0 === last_0));
|
|
642
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
643
|
+
return copyToArray(arr);
|
|
485
644
|
}
|
|
486
|
-
function
|
|
487
|
-
|
|
488
|
-
|
|
645
|
+
function getHexColorStringFromRgbValueArray(rgb) {
|
|
646
|
+
if (!(rgb.length === 3))
|
|
647
|
+
return '#000000';
|
|
648
|
+
var getHex = getHexColorStringFromRgbValueArray$lambda;
|
|
649
|
+
return '#' + getHex(rgb[0]) + getHex(rgb[1]) + getHex(rgb[2]);
|
|
650
|
+
}
|
|
651
|
+
function getHexColorStringFromRgbValueArray$lambda(num) {
|
|
652
|
+
return padStart(toString_2(num, 16), 2, _Char___init__impl__6a9atx(48));
|
|
489
653
|
}
|
|
490
654
|
function get_numberRegex() {
|
|
491
655
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
@@ -522,6 +686,26 @@
|
|
|
522
686
|
return chSymbolRegex;
|
|
523
687
|
}
|
|
524
688
|
var chSymbolRegex;
|
|
689
|
+
function get_idCardRegex() {
|
|
690
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
691
|
+
return idCardRegex;
|
|
692
|
+
}
|
|
693
|
+
var idCardRegex;
|
|
694
|
+
function get_mobileNumberRegex() {
|
|
695
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
696
|
+
return mobileNumberRegex;
|
|
697
|
+
}
|
|
698
|
+
var mobileNumberRegex;
|
|
699
|
+
function get_emailRegex() {
|
|
700
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
701
|
+
return emailRegex;
|
|
702
|
+
}
|
|
703
|
+
var emailRegex;
|
|
704
|
+
function get_colorRegex() {
|
|
705
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
706
|
+
return colorRegex;
|
|
707
|
+
}
|
|
708
|
+
var colorRegex;
|
|
525
709
|
function keepByRegexStr(_this__u8e3s4, regStr) {
|
|
526
710
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
527
711
|
var tmp$ret$0;
|
|
@@ -538,68 +722,60 @@
|
|
|
538
722
|
}
|
|
539
723
|
function isIdCard(_this__u8e3s4) {
|
|
540
724
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
541
|
-
|
|
542
|
-
return Regex_init_$Create$('(^\\d{15}$)|(^\\d{17}([0-9]|X)$)').a7(_this__u8e3s4);
|
|
725
|
+
return get_idCardRegex().a9(_this__u8e3s4);
|
|
543
726
|
}
|
|
544
727
|
function isMobileNumber(_this__u8e3s4) {
|
|
545
728
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
546
|
-
|
|
547
|
-
return Regex_init_$Create$('^1[1-9]\\d{9}$').a7(_this__u8e3s4);
|
|
729
|
+
return get_mobileNumberRegex().a9(_this__u8e3s4);
|
|
548
730
|
}
|
|
549
731
|
function isEmail(_this__u8e3s4) {
|
|
550
732
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
551
|
-
|
|
552
|
-
return Regex_init_$Create$('^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$').a7(_this__u8e3s4);
|
|
733
|
+
return get_emailRegex().a9(_this__u8e3s4);
|
|
553
734
|
}
|
|
554
735
|
function isOnlyChEnNum(_this__u8e3s4) {
|
|
555
736
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
556
|
-
return get_chEnNumRegex().
|
|
737
|
+
return get_chEnNumRegex().a9(_this__u8e3s4);
|
|
557
738
|
}
|
|
558
739
|
function isOnlyEnNum(_this__u8e3s4) {
|
|
559
740
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
560
|
-
return get_numEnRegex().
|
|
741
|
+
return get_numEnRegex().a9(_this__u8e3s4);
|
|
561
742
|
}
|
|
562
743
|
function isOnlyChinese(_this__u8e3s4) {
|
|
563
744
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
564
|
-
return get_chineseRegex().
|
|
745
|
+
return get_chineseRegex().a9(_this__u8e3s4);
|
|
565
746
|
}
|
|
566
747
|
function isOnlyLetter(_this__u8e3s4) {
|
|
567
748
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
568
|
-
return get_letterRegex().
|
|
749
|
+
return get_letterRegex().a9(_this__u8e3s4);
|
|
569
750
|
}
|
|
570
751
|
function isOnlyNumber(_this__u8e3s4) {
|
|
571
752
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
572
|
-
return get_numberRegex().
|
|
753
|
+
return get_numberRegex().a9(_this__u8e3s4);
|
|
573
754
|
}
|
|
574
755
|
function isOnlyCode(_this__u8e3s4) {
|
|
575
756
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
576
|
-
return get_codeRegex().
|
|
757
|
+
return get_codeRegex().a9(_this__u8e3s4);
|
|
577
758
|
}
|
|
578
759
|
function isOnlyChSymbol(_this__u8e3s4) {
|
|
579
760
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
580
|
-
return get_chSymbolRegex().
|
|
761
|
+
return get_chSymbolRegex().a9(_this__u8e3s4);
|
|
762
|
+
}
|
|
763
|
+
function isColor(_this__u8e3s4) {
|
|
764
|
+
_init_properties_RegexUtils_kt__b9v9ti();
|
|
765
|
+
return get_colorRegex().a9(_this__u8e3s4);
|
|
581
766
|
}
|
|
582
767
|
function keep_0(_this__u8e3s4, reg) {
|
|
583
768
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
584
|
-
var tmp = reg.
|
|
585
|
-
|
|
586
|
-
var text = new StringBuilder('');
|
|
587
|
-
// Inline function 'kotlin.sequences.forEach' call
|
|
588
|
-
var tmp0_iterator = ls.f();
|
|
589
|
-
while (tmp0_iterator.g()) {
|
|
590
|
-
var element = tmp0_iterator.h();
|
|
591
|
-
// Inline function 'com.d10ng.common.keep.<anonymous>' call
|
|
592
|
-
text.o6(element);
|
|
593
|
-
}
|
|
594
|
-
return text.toString();
|
|
769
|
+
var tmp = reg.d9(_this__u8e3s4);
|
|
770
|
+
return joinToString(map(tmp, keep$lambda), '');
|
|
595
771
|
}
|
|
596
772
|
function filter(_this__u8e3s4, reg) {
|
|
597
773
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
598
|
-
return reg.
|
|
774
|
+
return reg.e9(_this__u8e3s4, '');
|
|
599
775
|
}
|
|
600
776
|
function keep$lambda(it) {
|
|
601
777
|
_init_properties_RegexUtils_kt__b9v9ti();
|
|
602
|
-
return it.
|
|
778
|
+
return it.f1();
|
|
603
779
|
}
|
|
604
780
|
var properties_initialized_RegexUtils_kt_8e1sdo;
|
|
605
781
|
function _init_properties_RegexUtils_kt__b9v9ti() {
|
|
@@ -618,77 +794,1619 @@
|
|
|
618
794
|
// Inline function 'kotlin.text.toRegex' call
|
|
619
795
|
chEnNumRegex = Regex_init_$Create$('[a-zA-Z0-9\u4E00-\u9FA5]+');
|
|
620
796
|
// Inline function 'kotlin.text.toRegex' call
|
|
621
|
-
chSymbolRegex = Regex_init_$Create$('[\u3000-\
|
|
797
|
+
chSymbolRegex = Regex_init_$Create$('[\xA4\xA7-\xA8\xB0-\xB1\xB7\xD7\xE0-\xE1\xE8-\xEA\xEC-\xED\xF2-\xF3\xF7\xF9-\xFA\xFC\u0101\u0113\u011B\u012B\u0144\u0148\u014D\u016B\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u0251\u0261\u02C7\u02C9\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C1\u03C3-\u03C9\u0401\u0410-\u044F\u0451\u2014\u2016\u2018-\u2019\u201C-\u201D\u2026\u2030\u2032-\u2033\u203B\u20AC\u2103\u2116\u2160-\u216B\u2170-\u2179\u2190-\u2193\u2208\u220F\u2211\u221A\u221D-\u221E\u2220\u2225\u2227-\u222B\u222E\u2234-\u2237\u223D\u2248\u224C\u2260-\u2261\u2264-\u2265\u226E-\u226F\u2299\u22A5\u2312\u2460-\u2469\u2474-\u249B\u2500-\u254B\u25A0-\u25A1\u25B2-\u25B3\u25C6-\u25C7\u25CB\u25CE-\u25CF\u2605-\u2606\u2640\u2642\u3000-\u3003\u3005\u3008-\u3011\u3013-\u3017\u3041-\u3093\u30A1-\u30F6\u3105-\u3129\u3220-\u3229\uE766-\uE76B\uE76D-\uE7BB\uE7C7-\uE7E1\uE7FE-\uE80F\uFE31\uFE33-\uFE44\uFF01-\uFF5E\uFFE0-\uFFE1\uFFE3\uFFE5\uFF00-\uFFFF\u4E00-\u9FA5]+');
|
|
798
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
799
|
+
idCardRegex = Regex_init_$Create$('^[1-9]\\d{5}(?:18|19|20)\\d{2}(?:0[1-9]|10|11|12)(?:0[1-9]|[1-2]\\d|30|31)\\d{3}[0-9Xx]$');
|
|
800
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
801
|
+
mobileNumberRegex = Regex_init_$Create$('^1[1-9]\\d{9}$');
|
|
802
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
803
|
+
emailRegex = Regex_init_$Create$('^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(?:\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$');
|
|
804
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
805
|
+
colorRegex = Regex_init_$Create$('^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$');
|
|
622
806
|
}
|
|
623
807
|
}
|
|
624
|
-
function
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
if (!isMatch)
|
|
630
|
-
return 0;
|
|
631
|
-
var str = fillLength(value, 8);
|
|
632
|
-
return toByte(toInt(str, 2));
|
|
808
|
+
function Coordinate(lat, lng) {
|
|
809
|
+
lat = lat === VOID ? 0.0 : lat;
|
|
810
|
+
lng = lng === VOID ? 0.0 : lng;
|
|
811
|
+
this.lat = lat;
|
|
812
|
+
this.lng = lng;
|
|
633
813
|
}
|
|
634
|
-
function
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
814
|
+
protoOf(Coordinate).sb = function (_set____db54di) {
|
|
815
|
+
this.lat = _set____db54di;
|
|
816
|
+
};
|
|
817
|
+
protoOf(Coordinate).tb = function () {
|
|
818
|
+
return this.lat;
|
|
819
|
+
};
|
|
820
|
+
protoOf(Coordinate).ub = function (_set____db54di) {
|
|
821
|
+
this.lng = _set____db54di;
|
|
822
|
+
};
|
|
823
|
+
protoOf(Coordinate).vb = function () {
|
|
824
|
+
return this.lng;
|
|
825
|
+
};
|
|
826
|
+
protoOf(Coordinate).wb = function () {
|
|
827
|
+
return this.lat;
|
|
828
|
+
};
|
|
829
|
+
protoOf(Coordinate).xb = function () {
|
|
830
|
+
return this.lng;
|
|
831
|
+
};
|
|
832
|
+
protoOf(Coordinate).yb = function (lat, lng) {
|
|
833
|
+
return new Coordinate(lat, lng);
|
|
834
|
+
};
|
|
835
|
+
protoOf(Coordinate).copy = function (lat, lng, $super) {
|
|
836
|
+
lat = lat === VOID ? this.lat : lat;
|
|
837
|
+
lng = lng === VOID ? this.lng : lng;
|
|
838
|
+
return this.yb(lat, lng);
|
|
839
|
+
};
|
|
840
|
+
protoOf(Coordinate).toString = function () {
|
|
841
|
+
return 'Coordinate(lat=' + this.lat + ', lng=' + this.lng + ')';
|
|
842
|
+
};
|
|
843
|
+
protoOf(Coordinate).hashCode = function () {
|
|
844
|
+
var result = getNumberHashCode(this.lat);
|
|
845
|
+
result = imul(result, 31) + getNumberHashCode(this.lng) | 0;
|
|
846
|
+
return result;
|
|
847
|
+
};
|
|
848
|
+
protoOf(Coordinate).equals = function (other) {
|
|
849
|
+
if (this === other)
|
|
850
|
+
return true;
|
|
851
|
+
if (!(other instanceof Coordinate))
|
|
852
|
+
return false;
|
|
853
|
+
var tmp0_other_with_cast = other instanceof Coordinate ? other : THROW_CCE();
|
|
854
|
+
if (!equals(this.lat, tmp0_other_with_cast.lat))
|
|
855
|
+
return false;
|
|
856
|
+
if (!equals(this.lng, tmp0_other_with_cast.lng))
|
|
857
|
+
return false;
|
|
858
|
+
return true;
|
|
859
|
+
};
|
|
860
|
+
function getDistanceAndBearing(point1, point2) {
|
|
861
|
+
var radLon1 = toRadians(point1.lng);
|
|
862
|
+
var radLat1 = toRadians(point1.lat);
|
|
863
|
+
var radLon2 = toRadians(point2.lng);
|
|
864
|
+
var radLat2 = toRadians(point2.lat);
|
|
865
|
+
var L = radLon2 - radLon1;
|
|
866
|
+
// Inline function 'kotlin.math.tan' call
|
|
867
|
+
var tanU1 = 0.9966471893352525 * Math.tan(radLat1);
|
|
868
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
869
|
+
var tmp0_sqrt = 1 + tanU1 * tanU1;
|
|
870
|
+
var cosU1 = 1 / Math.sqrt(tmp0_sqrt);
|
|
871
|
+
var sinU1 = tanU1 * cosU1;
|
|
872
|
+
// Inline function 'kotlin.math.tan' call
|
|
873
|
+
var tanU2 = 0.9966471893352525 * Math.tan(radLat2);
|
|
874
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
875
|
+
var tmp1_sqrt = 1 + tanU2 * tanU2;
|
|
876
|
+
var cosU2 = 1 / Math.sqrt(tmp1_sqrt);
|
|
877
|
+
var sinU2 = tanU2 * cosU2;
|
|
878
|
+
var tmp;
|
|
879
|
+
// Inline function 'kotlin.math.abs' call
|
|
880
|
+
if (Math.abs(L) > get_PI() / 2) {
|
|
881
|
+
tmp = true;
|
|
882
|
+
} else {
|
|
883
|
+
// Inline function 'kotlin.math.abs' call
|
|
884
|
+
var tmp2_abs = radLat2 - radLat1;
|
|
885
|
+
tmp = Math.abs(tmp2_abs) > get_PI() / 2;
|
|
886
|
+
}
|
|
887
|
+
var antipodal = tmp;
|
|
888
|
+
var f9 = L;
|
|
889
|
+
var sinF9;
|
|
890
|
+
var cosF9;
|
|
891
|
+
var fq = antipodal ? get_PI() : 0.0;
|
|
892
|
+
var sinFq = 0.0;
|
|
893
|
+
var cosFq = antipodal ? -1.0 : 1.0;
|
|
894
|
+
var sinSFqFa;
|
|
895
|
+
var cos2Fqm = 1.0;
|
|
896
|
+
var cosSFqFa = 1.0;
|
|
897
|
+
var iterations = 0;
|
|
898
|
+
var f91;
|
|
899
|
+
$l$1: do {
|
|
900
|
+
$l$0: do {
|
|
901
|
+
// Inline function 'kotlin.math.sin' call
|
|
902
|
+
var tmp3_sin = f9;
|
|
903
|
+
sinF9 = Math.sin(tmp3_sin);
|
|
904
|
+
// Inline function 'kotlin.math.cos' call
|
|
905
|
+
var tmp4_cos = f9;
|
|
906
|
+
cosF9 = Math.cos(tmp4_cos);
|
|
907
|
+
sinSFqFa = cosU2 * sinF9 * (cosU2 * sinF9) + (cosU1 * sinU2 - sinU1 * cosU2 * cosF9) * (cosU1 * sinU2 - sinU1 * cosU2 * cosF9);
|
|
908
|
+
// Inline function 'kotlin.math.abs' call
|
|
909
|
+
var tmp5_abs = sinSFqFa;
|
|
910
|
+
if (Math.abs(tmp5_abs) < 1.0E-24)
|
|
911
|
+
break $l$1;
|
|
912
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
913
|
+
var tmp6_sqrt = sinSFqFa;
|
|
914
|
+
sinFq = Math.sqrt(tmp6_sqrt);
|
|
915
|
+
cosFq = sinU1 * sinU2 + cosU1 * cosU2 * cosF9;
|
|
916
|
+
// Inline function 'kotlin.math.atan2' call
|
|
917
|
+
var tmp7_atan2 = sinFq;
|
|
918
|
+
var tmp8_atan2 = cosFq;
|
|
919
|
+
fq = Math.atan2(tmp7_atan2, tmp8_atan2);
|
|
920
|
+
var sinFa = cosU1 * cosU2 * sinF9 / sinFq;
|
|
921
|
+
cosSFqFa = 1 - sinFa * sinFa;
|
|
922
|
+
cos2Fqm = !(cosSFqFa === 0.0) ? cosFq - 2 * sinU1 * sinU2 / cosSFqFa : 0.0;
|
|
923
|
+
var C = 2.0955066654671756E-4 * cosSFqFa * (4 + 0.003352810664747481 * (4 - 3 * cosSFqFa));
|
|
924
|
+
f91 = f9;
|
|
925
|
+
f9 = L + (1 - C) * 0.003352810664747481 * sinFa * (fq + C * sinFq * (cos2Fqm + C * cosFq * (-1 + 2 * cos2Fqm * cos2Fqm)));
|
|
926
|
+
var tmp_0;
|
|
927
|
+
if (antipodal) {
|
|
928
|
+
// Inline function 'kotlin.math.abs' call
|
|
929
|
+
var tmp9_abs = f9;
|
|
930
|
+
tmp_0 = Math.abs(tmp9_abs) - get_PI();
|
|
931
|
+
} else {
|
|
932
|
+
// Inline function 'kotlin.math.abs' call
|
|
933
|
+
var tmp10_abs = f9;
|
|
934
|
+
tmp_0 = Math.abs(tmp10_abs);
|
|
935
|
+
}
|
|
936
|
+
var iterationCheck = tmp_0;
|
|
937
|
+
if (iterationCheck > get_PI())
|
|
938
|
+
throw RuntimeException_init_$Create$('\u03BB > \u03C0');
|
|
939
|
+
}
|
|
940
|
+
while (false);
|
|
941
|
+
var tmp_1;
|
|
942
|
+
// Inline function 'kotlin.math.abs' call
|
|
943
|
+
var tmp11_abs = f9 - f91;
|
|
944
|
+
if (Math.abs(tmp11_abs) > 1.0E-12) {
|
|
945
|
+
iterations = iterations + 1 | 0;
|
|
946
|
+
tmp_1 = iterations < 100;
|
|
947
|
+
} else {
|
|
948
|
+
tmp_1 = false;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
while (tmp_1);
|
|
952
|
+
var uSq = cosSFqFa * 2.7233160610984375E11 / 4.040829998465916E13;
|
|
953
|
+
var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
|
|
954
|
+
var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
|
|
955
|
+
var deltaFq = B * sinFq * (cos2Fqm + B / 4 * (cosFq * (-1 + 2 * cos2Fqm * cos2Fqm) - B / 6 * cos2Fqm * (-3 + 4 * sinFq * sinFq) * (-3 + 4 * cos2Fqm * cos2Fqm)));
|
|
956
|
+
var s = 6356752.314245 * A * (fq - deltaFq);
|
|
957
|
+
var tmp_2;
|
|
958
|
+
// Inline function 'kotlin.math.abs' call
|
|
959
|
+
var tmp12_abs = sinSFqFa;
|
|
960
|
+
if (Math.abs(tmp12_abs) < 1.0E-12) {
|
|
961
|
+
tmp_2 = 0.0;
|
|
962
|
+
} else {
|
|
963
|
+
// Inline function 'kotlin.math.atan2' call
|
|
964
|
+
var tmp13_atan2 = cosU2 * sinF9;
|
|
965
|
+
var tmp14_atan2 = cosU1 * sinU2 - sinU1 * cosU2 * cosF9;
|
|
966
|
+
tmp_2 = Math.atan2(tmp13_atan2, tmp14_atan2);
|
|
967
|
+
}
|
|
968
|
+
var alpha1 = tmp_2;
|
|
969
|
+
var tmp_3;
|
|
970
|
+
// Inline function 'kotlin.math.abs' call
|
|
971
|
+
var tmp15_abs = sinSFqFa;
|
|
972
|
+
if (Math.abs(tmp15_abs) < 1.0E-12) {
|
|
973
|
+
tmp_3 = get_PI();
|
|
974
|
+
} else {
|
|
975
|
+
// Inline function 'kotlin.math.atan2' call
|
|
976
|
+
var tmp16_atan2 = cosU1 * sinF9;
|
|
977
|
+
var tmp17_atan2 = -sinU1 * cosU2 + cosU1 * sinU2 * cosF9;
|
|
978
|
+
tmp_3 = Math.atan2(tmp16_atan2, tmp17_atan2);
|
|
979
|
+
}
|
|
980
|
+
var alpha2 = tmp_3;
|
|
981
|
+
return new DistanceAndBearing(s, toDegrees(alpha1), toDegrees(alpha2));
|
|
982
|
+
}
|
|
983
|
+
function getDistanceOn2Points(point1, point2, highPrecision) {
|
|
984
|
+
highPrecision = highPrecision === VOID ? false : highPrecision;
|
|
985
|
+
if (highPrecision)
|
|
986
|
+
return getDistanceAndBearing(point1, point2).distance;
|
|
987
|
+
var lat1Rad = toRadians(point1.lat);
|
|
988
|
+
var lat2Rad = toRadians(point2.lat);
|
|
989
|
+
var a = lat1Rad - lat2Rad;
|
|
990
|
+
var b = toRadians(point1.lng) - toRadians(point2.lng);
|
|
991
|
+
// Inline function 'kotlin.math.sin' call
|
|
992
|
+
var tmp0_sin = a / 2;
|
|
993
|
+
var sa2 = Math.sin(tmp0_sin);
|
|
994
|
+
// Inline function 'kotlin.math.sin' call
|
|
995
|
+
var tmp1_sin = b / 2;
|
|
996
|
+
var sb2 = Math.sin(tmp1_sin);
|
|
997
|
+
// Inline function 'kotlin.math.asin' call
|
|
998
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
999
|
+
var tmp = sa2 * sa2;
|
|
1000
|
+
// Inline function 'kotlin.math.cos' call
|
|
1001
|
+
var tmp_0 = Math.cos(lat1Rad);
|
|
1002
|
+
// Inline function 'kotlin.math.cos' call
|
|
1003
|
+
var tmp2_sqrt = tmp + tmp_0 * Math.cos(lat2Rad) * sb2 * sb2;
|
|
1004
|
+
var tmp3_asin = Math.sqrt(tmp2_sqrt);
|
|
1005
|
+
return 1.2756274E7 * Math.asin(tmp3_asin);
|
|
1006
|
+
}
|
|
1007
|
+
function toRadians(degree) {
|
|
1008
|
+
return degree * get_PI() / 180;
|
|
1009
|
+
}
|
|
1010
|
+
function toDegrees(radian) {
|
|
1011
|
+
return radian * 180 / get_PI();
|
|
1012
|
+
}
|
|
1013
|
+
function isPointInCircle(point, center, radius) {
|
|
1014
|
+
return getDistanceOn2Points(point, center) <= radius;
|
|
1015
|
+
}
|
|
1016
|
+
function getAngleOn2Points(point1, point2, highPrecision) {
|
|
1017
|
+
highPrecision = highPrecision === VOID ? false : highPrecision;
|
|
1018
|
+
if (highPrecision) {
|
|
1019
|
+
var bearing = getDistanceAndBearing(point1, point2).finalBearing;
|
|
1020
|
+
return bearing < 0.0 ? bearing + 360 : bearing === 180.0 ? 0.0 : bearing;
|
|
1021
|
+
}
|
|
1022
|
+
var lat1 = toRadians(point1.lat);
|
|
1023
|
+
var lon1 = toRadians(point1.lng);
|
|
1024
|
+
var lat2 = toRadians(point2.lat);
|
|
1025
|
+
var lon2 = toRadians(point2.lng);
|
|
1026
|
+
var dLon = lon2 - lon1;
|
|
1027
|
+
// Inline function 'kotlin.math.sin' call
|
|
1028
|
+
var tmp = Math.sin(dLon);
|
|
1029
|
+
// Inline function 'kotlin.math.cos' call
|
|
1030
|
+
var y = tmp * Math.cos(lat2);
|
|
1031
|
+
// Inline function 'kotlin.math.cos' call
|
|
1032
|
+
var tmp_0 = Math.cos(lat1);
|
|
1033
|
+
// Inline function 'kotlin.math.sin' call
|
|
1034
|
+
var tmp_1 = tmp_0 * Math.sin(lat2);
|
|
1035
|
+
// Inline function 'kotlin.math.sin' call
|
|
1036
|
+
var tmp_2 = Math.sin(lat1);
|
|
1037
|
+
// Inline function 'kotlin.math.cos' call
|
|
1038
|
+
var tmp_3 = tmp_2 * Math.cos(lat2);
|
|
1039
|
+
// Inline function 'kotlin.math.cos' call
|
|
1040
|
+
var x = tmp_1 - tmp_3 * Math.cos(dLon);
|
|
1041
|
+
var tmp$ret$7;
|
|
1042
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1043
|
+
tmp$ret$7 = Math.atan2(y, x);
|
|
1044
|
+
var angle = toDegrees(tmp$ret$7);
|
|
1045
|
+
angle = (angle + 360) % 360;
|
|
1046
|
+
return angle;
|
|
1047
|
+
}
|
|
1048
|
+
function getPointOn2Points(point1, point2, present) {
|
|
1049
|
+
if (present <= 0)
|
|
1050
|
+
return point1.copy();
|
|
1051
|
+
if (present >= 1)
|
|
1052
|
+
return point2.copy();
|
|
1053
|
+
var distanceAndBearing = getDistanceAndBearing(point1, point2);
|
|
1054
|
+
var newDistance = distanceAndBearing.distance * present;
|
|
1055
|
+
return getPointByBasePoint(point1, newDistance, distanceAndBearing.finalBearing);
|
|
1056
|
+
}
|
|
1057
|
+
function getTotalDistance(points) {
|
|
1058
|
+
var total = 0.0;
|
|
1059
|
+
var inductionVariable = 0;
|
|
1060
|
+
var last = points.length - 1 | 0;
|
|
1061
|
+
if (inductionVariable < last)
|
|
653
1062
|
do {
|
|
654
1063
|
var i = inductionVariable;
|
|
655
|
-
inductionVariable = inductionVariable +
|
|
1064
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1065
|
+
total = total + getDistanceOn2Points(points[i], points[i + 1 | 0]);
|
|
1066
|
+
}
|
|
1067
|
+
while (inductionVariable < last);
|
|
1068
|
+
return total;
|
|
1069
|
+
}
|
|
1070
|
+
function getPointsOnDistance(points, distance) {
|
|
1071
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1072
|
+
var result = ArrayList_init_$Create$();
|
|
1073
|
+
var totalDistance = 0.0;
|
|
1074
|
+
// Inline function 'kotlin.collections.forEachIndexed' call
|
|
1075
|
+
var index = 0;
|
|
1076
|
+
var inductionVariable = 0;
|
|
1077
|
+
var last = points.length;
|
|
1078
|
+
while (inductionVariable < last) {
|
|
1079
|
+
var item = points[inductionVariable];
|
|
1080
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1081
|
+
// Inline function 'com.d10ng.common.coordinate.getPointsOnDistance.<anonymous>' call
|
|
1082
|
+
var tmp1 = index;
|
|
1083
|
+
index = tmp1 + 1 | 0;
|
|
1084
|
+
if (tmp1 === 0) {
|
|
1085
|
+
totalDistance = 0.0;
|
|
1086
|
+
} else {
|
|
1087
|
+
var lastPoint = points[tmp1 - 1 | 0];
|
|
1088
|
+
var lastDistance = totalDistance;
|
|
1089
|
+
var curDistance = getDistanceOn2Points(lastPoint, item);
|
|
1090
|
+
var newDistance = lastDistance + curDistance;
|
|
1091
|
+
var tmp$ret$1;
|
|
1092
|
+
// Inline function 'kotlin.math.floor' call
|
|
1093
|
+
var tmp0_floor = newDistance / distance;
|
|
1094
|
+
tmp$ret$1 = Math.floor(tmp0_floor);
|
|
1095
|
+
var totalCount = numberToInt(tmp$ret$1);
|
|
1096
|
+
if (totalCount > result.f()) {
|
|
1097
|
+
var count = totalCount - result.f() | 0;
|
|
1098
|
+
var hasHandleDistance = lastDistance;
|
|
1099
|
+
var noHandleDistance = curDistance;
|
|
1100
|
+
var p0 = lastPoint;
|
|
1101
|
+
var inductionVariable_0 = 0;
|
|
1102
|
+
if (inductionVariable_0 < count)
|
|
1103
|
+
do {
|
|
1104
|
+
var i = inductionVariable_0;
|
|
1105
|
+
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1106
|
+
var lessDistance = distance - hasHandleDistance % distance;
|
|
1107
|
+
var present = lessDistance / noHandleDistance;
|
|
1108
|
+
p0 = getPointOn2Points(p0, item, present);
|
|
1109
|
+
result.b(p0);
|
|
1110
|
+
hasHandleDistance = hasHandleDistance + lessDistance;
|
|
1111
|
+
noHandleDistance = noHandleDistance - lessDistance;
|
|
1112
|
+
}
|
|
1113
|
+
while (inductionVariable_0 < count);
|
|
1114
|
+
}
|
|
1115
|
+
totalDistance = newDistance;
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
result.p5(0, points[0]);
|
|
1119
|
+
result.b(points[points.length - 1 | 0]);
|
|
1120
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1121
|
+
return copyToArray(result);
|
|
1122
|
+
}
|
|
1123
|
+
function compressTrack(points) {
|
|
1124
|
+
if (points.length <= 10) {
|
|
1125
|
+
// Inline function 'kotlin.collections.copyOf' call
|
|
1126
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1127
|
+
return points.slice();
|
|
1128
|
+
}
|
|
1129
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1130
|
+
var result = ArrayList_init_$Create$();
|
|
1131
|
+
var a = points[0];
|
|
1132
|
+
var b = points[1];
|
|
1133
|
+
var inductionVariable = 0;
|
|
1134
|
+
var last = points.length - 1 | 0;
|
|
1135
|
+
if (inductionVariable <= last)
|
|
1136
|
+
$l$loop: do {
|
|
1137
|
+
var i = inductionVariable;
|
|
1138
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1139
|
+
if (i < 2) {
|
|
1140
|
+
result.b(points[i]);
|
|
1141
|
+
continue $l$loop;
|
|
1142
|
+
}
|
|
1143
|
+
var c = points[i];
|
|
1144
|
+
var distance = getDistanceOn2Points(a, b) + getDistanceOn2Points(b, c);
|
|
1145
|
+
var tmp;
|
|
1146
|
+
if (distance <= 10.0) {
|
|
1147
|
+
tmp = 90;
|
|
1148
|
+
} else if (distance > 50.0) {
|
|
1149
|
+
tmp = 5;
|
|
1150
|
+
} else {
|
|
1151
|
+
// Inline function 'kotlin.math.max' call
|
|
1152
|
+
var tmp0_max = numberToInt((1 - distance / 50) * 90);
|
|
1153
|
+
tmp = Math.max(tmp0_max, 5);
|
|
1154
|
+
}
|
|
1155
|
+
var x = tmp;
|
|
1156
|
+
var j1 = getAngleOn2Points(a, b);
|
|
1157
|
+
var j2 = getAngleOn2Points(b, c);
|
|
1158
|
+
// Inline function 'kotlin.math.abs' call
|
|
1159
|
+
var tmp1_abs = j1 - j2;
|
|
1160
|
+
if (Math.abs(tmp1_abs) < x) {
|
|
1161
|
+
removeLast(result);
|
|
1162
|
+
} else {
|
|
1163
|
+
a = b;
|
|
1164
|
+
}
|
|
1165
|
+
result.b(c);
|
|
1166
|
+
b = c;
|
|
1167
|
+
}
|
|
1168
|
+
while (inductionVariable <= last);
|
|
1169
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1170
|
+
return copyToArray(result);
|
|
1171
|
+
}
|
|
1172
|
+
function getPointByBasePoint(point, distance, angle) {
|
|
1173
|
+
if (distance === 0.0)
|
|
1174
|
+
return point.copy();
|
|
1175
|
+
var radLat = toRadians(point.lat);
|
|
1176
|
+
var radLng = toRadians(point.lng);
|
|
1177
|
+
var radAngle = toRadians(angle);
|
|
1178
|
+
// Inline function 'kotlin.math.sin' call
|
|
1179
|
+
var sinRadAngle = Math.sin(radAngle);
|
|
1180
|
+
// Inline function 'kotlin.math.cos' call
|
|
1181
|
+
var cosRadAngle = Math.cos(radAngle);
|
|
1182
|
+
// Inline function 'kotlin.math.tan' call
|
|
1183
|
+
var tanU1 = 0.9966471893352525 * Math.tan(radLat);
|
|
1184
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1185
|
+
var tmp0_sqrt = 1 + tanU1 * tanU1;
|
|
1186
|
+
var cosU1 = 1 / Math.sqrt(tmp0_sqrt);
|
|
1187
|
+
var sinU1 = tanU1 * cosU1;
|
|
1188
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1189
|
+
var sigma1 = Math.atan2(tanU1, cosRadAngle);
|
|
1190
|
+
var sinAlpha = cosU1 * sinRadAngle;
|
|
1191
|
+
var cosSqAlpha = 1 - sinAlpha * sinAlpha;
|
|
1192
|
+
var uSq = cosSqAlpha * 2.7233160610984375E11 / 4.040829998465916E13;
|
|
1193
|
+
var A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
|
|
1194
|
+
var B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
|
|
1195
|
+
var sigma = distance / (6356752.314245 * A);
|
|
1196
|
+
var sinSigma;
|
|
1197
|
+
var cosSigma;
|
|
1198
|
+
var cos2SigmaM;
|
|
1199
|
+
var sigmaP;
|
|
1200
|
+
var iterations = 0.0;
|
|
1201
|
+
$l$1: do {
|
|
1202
|
+
$l$0: do {
|
|
1203
|
+
// Inline function 'kotlin.math.cos' call
|
|
1204
|
+
var tmp1_cos = 2 * sigma1 + sigma;
|
|
1205
|
+
cos2SigmaM = Math.cos(tmp1_cos);
|
|
1206
|
+
// Inline function 'kotlin.math.sin' call
|
|
1207
|
+
var tmp2_sin = sigma;
|
|
1208
|
+
sinSigma = Math.sin(tmp2_sin);
|
|
1209
|
+
// Inline function 'kotlin.math.cos' call
|
|
1210
|
+
var tmp3_cos = sigma;
|
|
1211
|
+
cosSigma = Math.cos(tmp3_cos);
|
|
1212
|
+
var deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) - B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
|
|
1213
|
+
sigmaP = sigma;
|
|
1214
|
+
sigma = distance / (6356752.314245 * A) + deltaSigma;
|
|
1215
|
+
}
|
|
1216
|
+
while (false);
|
|
1217
|
+
var tmp;
|
|
1218
|
+
// Inline function 'kotlin.math.abs' call
|
|
1219
|
+
var tmp4_abs = sigma - sigmaP;
|
|
1220
|
+
if (Math.abs(tmp4_abs) > 1.0E-12) {
|
|
1221
|
+
iterations = iterations + 1;
|
|
1222
|
+
tmp = iterations < 100.0;
|
|
1223
|
+
} else {
|
|
1224
|
+
tmp = false;
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
while (tmp);
|
|
1228
|
+
if (iterations >= 100.0)
|
|
1229
|
+
throw RuntimeException_init_$Create$('Vincenty formula failed to converge');
|
|
1230
|
+
var x = sinU1 * sinSigma - cosU1 * cosSigma * cosRadAngle;
|
|
1231
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1232
|
+
var tmp6_atan2 = sinU1 * cosSigma + cosU1 * sinSigma * cosRadAngle;
|
|
1233
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1234
|
+
var tmp5_sqrt = sinAlpha * sinAlpha + x * x;
|
|
1235
|
+
var tmp7_atan2 = 0.9966471893352525 * Math.sqrt(tmp5_sqrt);
|
|
1236
|
+
var lat2 = Math.atan2(tmp6_atan2, tmp7_atan2);
|
|
1237
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1238
|
+
var tmp8_atan2 = sinSigma * sinRadAngle;
|
|
1239
|
+
var tmp9_atan2 = cosU1 * cosSigma - sinU1 * sinSigma * cosRadAngle;
|
|
1240
|
+
var lambda = Math.atan2(tmp8_atan2, tmp9_atan2);
|
|
1241
|
+
var C = 2.0955066654671756E-4 * cosSqAlpha * (4 + 0.003352810664747481 * (4 - 3 * cosSqAlpha));
|
|
1242
|
+
var L = lambda - (1 - C) * 0.003352810664747481 * sinAlpha * (sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
|
|
1243
|
+
var lng2 = radLng + L;
|
|
1244
|
+
return new Coordinate(toDegrees(lat2), toDegrees(lng2));
|
|
1245
|
+
}
|
|
1246
|
+
function getRandomPoint(point, radius) {
|
|
1247
|
+
var randomAngle = Default_getInstance().o2() * get_PI() * 2;
|
|
1248
|
+
var randomDistance = Default_getInstance().o2() * radius;
|
|
1249
|
+
return getPointByBasePoint(point, randomDistance, randomAngle);
|
|
1250
|
+
}
|
|
1251
|
+
function getNearPartsOnLine(point, line, offset) {
|
|
1252
|
+
offset = offset === VOID ? 10.0 : offset;
|
|
1253
|
+
if (line.length < 2)
|
|
1254
|
+
throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
|
|
1255
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1256
|
+
var ls = ArrayList_init_$Create$();
|
|
1257
|
+
var inductionVariable = 0;
|
|
1258
|
+
var last = line.length - 1 | 0;
|
|
1259
|
+
if (inductionVariable < last)
|
|
1260
|
+
$l$loop: do {
|
|
1261
|
+
var i = inductionVariable;
|
|
1262
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
1263
|
+
var distance = getDistanceOn2Points(point, line[i]) + getDistanceOn2Points(point, line[i + 1 | 0]);
|
|
1264
|
+
if (ls.t()) {
|
|
1265
|
+
ls.b(to(i, distance));
|
|
1266
|
+
} else if (distance > ls.g(0).p4_1 + offset)
|
|
1267
|
+
continue $l$loop;
|
|
1268
|
+
else if (distance < ls.g(0).p4_1 - offset) {
|
|
1269
|
+
ls.q5();
|
|
1270
|
+
ls.b(to(i, distance));
|
|
1271
|
+
} else {
|
|
1272
|
+
var inductionVariable_0 = 0;
|
|
1273
|
+
var last_0 = ls.f();
|
|
1274
|
+
if (inductionVariable_0 < last_0)
|
|
1275
|
+
$l$loop_0: do {
|
|
1276
|
+
var j = inductionVariable_0;
|
|
1277
|
+
inductionVariable_0 = inductionVariable_0 + 1 | 0;
|
|
1278
|
+
if (distance < ls.g(j).p4_1) {
|
|
1279
|
+
ls.p5(j, to(i, distance));
|
|
1280
|
+
break $l$loop_0;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
while (inductionVariable_0 < last_0);
|
|
1284
|
+
if (ls.f() > 3) {
|
|
1285
|
+
ls.y1(3);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
while (inductionVariable < last);
|
|
1290
|
+
// Inline function 'kotlin.collections.toTypedArray' call
|
|
1291
|
+
// Inline function 'kotlin.collections.map' call
|
|
1292
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1293
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(ls, 10));
|
|
1294
|
+
var tmp0_iterator = ls.c();
|
|
1295
|
+
while (tmp0_iterator.d()) {
|
|
1296
|
+
var item = tmp0_iterator.e();
|
|
1297
|
+
var tmp$ret$1;
|
|
1298
|
+
// Inline function 'com.d10ng.common.coordinate.getNearPartsOnLine.<anonymous>' call
|
|
1299
|
+
tmp$ret$1 = item.o4_1;
|
|
1300
|
+
tmp0_mapTo.b(tmp$ret$1);
|
|
1301
|
+
}
|
|
1302
|
+
return copyToArray(tmp0_mapTo);
|
|
1303
|
+
}
|
|
1304
|
+
function getProjectionPointOnLinePart(point, part) {
|
|
1305
|
+
if (!(part.length === 2))
|
|
1306
|
+
throw RuntimeException_init_$Create$('\u7EBF\u6BB5\u5FC5\u987B\u662F\u4E24\u4E2A\u70B9');
|
|
1307
|
+
var start = part[0];
|
|
1308
|
+
var end = part[1];
|
|
1309
|
+
var p2s = getDistanceOn2Points(point, start);
|
|
1310
|
+
var p2e = getDistanceOn2Points(point, end);
|
|
1311
|
+
var s2e = getDistanceOn2Points(start, end);
|
|
1312
|
+
return p2s - p2e > s2e ? end : p2e - p2s > s2e ? start : getPointOn2Points(start, end, p2s / (p2s + p2e));
|
|
1313
|
+
}
|
|
1314
|
+
function getProjectionPointOnLine(point, line) {
|
|
1315
|
+
if (line.length < 2)
|
|
1316
|
+
throw RuntimeException_init_$Create$('\u8F68\u8FF9\u81F3\u5C11\u9700\u8981\u4E24\u4E2A\u70B9');
|
|
1317
|
+
var nearParts = getNearPartsOnLine(point, line);
|
|
1318
|
+
var tmp$ret$2;
|
|
1319
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1320
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1321
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1322
|
+
tmp$ret$2 = [line[nearParts[0]], line[nearParts[0] + 1 | 0]];
|
|
1323
|
+
return getProjectionPointOnLinePart(point, tmp$ret$2);
|
|
1324
|
+
}
|
|
1325
|
+
function getProjectionLineOnLineWithPoint(point, targetLine) {
|
|
1326
|
+
var nearParts = getNearPartsOnLine(point, targetLine);
|
|
1327
|
+
var nearIndex = nearParts[0];
|
|
1328
|
+
var tmp$ret$2;
|
|
1329
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1330
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1331
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1332
|
+
tmp$ret$2 = [targetLine[nearIndex], targetLine[nearIndex + 1 | 0]];
|
|
1333
|
+
var projectionPoint = getProjectionPointOnLinePart(point, tmp$ret$2);
|
|
1334
|
+
// Inline function 'kotlin.collections.plus' call
|
|
1335
|
+
var tmp$ret$3;
|
|
1336
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1337
|
+
tmp$ret$3 = copyOfRange_0(targetLine, 0, nearIndex + 1 | 0);
|
|
1338
|
+
var tmp$ret$6;
|
|
1339
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1340
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1341
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1342
|
+
tmp$ret$6 = [projectionPoint];
|
|
1343
|
+
return tmp$ret$3.concat(tmp$ret$6);
|
|
1344
|
+
}
|
|
1345
|
+
function getProjectionLineOnLineWithLine(line, targetLine, offset) {
|
|
1346
|
+
offset = offset === VOID ? 10.0 : offset;
|
|
1347
|
+
// Inline function 'kotlin.collections.isEmpty' call
|
|
1348
|
+
if (line.length === 0) {
|
|
1349
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1350
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1351
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1352
|
+
return [targetLine[0]];
|
|
1353
|
+
}
|
|
1354
|
+
var compressLine = compressTrack(line);
|
|
1355
|
+
var newPoint = compressLine[compressLine.length - 1 | 0];
|
|
1356
|
+
var nearParts = getNearPartsOnLine(newPoint, targetLine, offset);
|
|
1357
|
+
var tmp;
|
|
1358
|
+
if (compressLine.length === 1 ? true : nearParts.length === 1) {
|
|
1359
|
+
tmp = 0;
|
|
1360
|
+
} else {
|
|
1361
|
+
var lastPoint = compressLine[compressLine.length - 2 | 0];
|
|
1362
|
+
var newAngle = getAngleOn2Points(lastPoint, newPoint);
|
|
1363
|
+
// Inline function 'kotlin.collections.map' call
|
|
1364
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
1365
|
+
var tmp0_mapTo = ArrayList_init_$Create$_0(nearParts.length);
|
|
1366
|
+
var inductionVariable = 0;
|
|
1367
|
+
var last = nearParts.length;
|
|
1368
|
+
while (inductionVariable < last) {
|
|
1369
|
+
var item = nearParts[inductionVariable];
|
|
1370
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
656
1371
|
var tmp$ret$4;
|
|
657
|
-
// Inline function '
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
661
|
-
tmp$ret$4 = tmp0_substring.substring(i, tmp1_substring);
|
|
662
|
-
list.d(toByteFromBin(tmp$ret$4));
|
|
1372
|
+
// Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
|
|
1373
|
+
tmp$ret$4 = getAngleOn2Points(targetLine[item], targetLine[item + 1 | 0]);
|
|
1374
|
+
tmp0_mapTo.b(tmp$ret$4);
|
|
663
1375
|
}
|
|
664
|
-
|
|
665
|
-
|
|
1376
|
+
var nearAngles = tmp0_mapTo;
|
|
1377
|
+
var tmp$ret$7;
|
|
1378
|
+
$l$block: {
|
|
1379
|
+
// Inline function 'kotlin.collections.minBy' call
|
|
1380
|
+
var iterator = nearAngles.c();
|
|
1381
|
+
if (!iterator.d())
|
|
1382
|
+
throw NoSuchElementException_init_$Create$();
|
|
1383
|
+
var minElem = iterator.e();
|
|
1384
|
+
if (!iterator.d()) {
|
|
1385
|
+
tmp$ret$7 = minElem;
|
|
1386
|
+
break $l$block;
|
|
1387
|
+
}
|
|
1388
|
+
// Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
|
|
1389
|
+
// Inline function 'kotlin.math.abs' call
|
|
1390
|
+
var tmp0_abs = minElem - newAngle;
|
|
1391
|
+
var minValue = Math.abs(tmp0_abs);
|
|
1392
|
+
do {
|
|
1393
|
+
var e = iterator.e();
|
|
1394
|
+
// Inline function 'com.d10ng.common.coordinate.getProjectionLineOnLineWithLine.<anonymous>' call
|
|
1395
|
+
// Inline function 'kotlin.math.abs' call
|
|
1396
|
+
var tmp0_abs_0 = e - newAngle;
|
|
1397
|
+
var v = Math.abs(tmp0_abs_0);
|
|
1398
|
+
if (compareTo(minValue, v) > 0) {
|
|
1399
|
+
minElem = e;
|
|
1400
|
+
minValue = v;
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
while (iterator.d());
|
|
1404
|
+
tmp$ret$7 = minElem;
|
|
1405
|
+
}
|
|
1406
|
+
var nearAngle = tmp$ret$7;
|
|
1407
|
+
tmp = nearAngles.x1(nearAngle);
|
|
1408
|
+
}
|
|
1409
|
+
var nearIndex = tmp;
|
|
1410
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1411
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1412
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1413
|
+
var part = [targetLine[nearParts[nearIndex]], targetLine[nearParts[nearIndex] + 1 | 0]];
|
|
1414
|
+
var projectionPoint = getProjectionPointOnLinePart(newPoint, part);
|
|
1415
|
+
// Inline function 'kotlin.collections.plus' call
|
|
1416
|
+
var tmp$ret$15;
|
|
1417
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1418
|
+
tmp$ret$15 = copyOfRange_0(targetLine, 0, nearParts[nearIndex] + 1 | 0);
|
|
1419
|
+
var tmp$ret$18;
|
|
1420
|
+
// Inline function 'kotlin.arrayOf' call
|
|
1421
|
+
// Inline function 'kotlin.js.unsafeCast' call
|
|
1422
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
1423
|
+
tmp$ret$18 = [projectionPoint];
|
|
1424
|
+
return tmp$ret$15.concat(tmp$ret$18);
|
|
1425
|
+
}
|
|
1426
|
+
function transformLat($this, lng, lat) {
|
|
1427
|
+
var tmp = -100 + 2 * lng + 3 * lat + 0.2 * lat * lat + 0.1 * lng * lat;
|
|
1428
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1429
|
+
// Inline function 'kotlin.math.abs' call
|
|
1430
|
+
var tmp0_sqrt = Math.abs(lng);
|
|
1431
|
+
var ret = tmp + 0.2 * Math.sqrt(tmp0_sqrt);
|
|
1432
|
+
var tmp_0 = ret;
|
|
1433
|
+
// Inline function 'kotlin.math.sin' call
|
|
1434
|
+
var tmp1_sin = 6 * lng * get_PI();
|
|
1435
|
+
var tmp_1 = 20 * Math.sin(tmp1_sin);
|
|
1436
|
+
// Inline function 'kotlin.math.sin' call
|
|
1437
|
+
var tmp2_sin = 2 * lng * get_PI();
|
|
1438
|
+
ret = tmp_0 + (tmp_1 + 20 * Math.sin(tmp2_sin)) * 2 / 3;
|
|
1439
|
+
var tmp_2 = ret;
|
|
1440
|
+
// Inline function 'kotlin.math.sin' call
|
|
1441
|
+
var tmp3_sin = lat * get_PI();
|
|
1442
|
+
var tmp_3 = 20 * Math.sin(tmp3_sin);
|
|
1443
|
+
// Inline function 'kotlin.math.sin' call
|
|
1444
|
+
var tmp4_sin = lat / 3.0 * get_PI();
|
|
1445
|
+
ret = tmp_2 + (tmp_3 + 40 * Math.sin(tmp4_sin)) * 2 / 3;
|
|
1446
|
+
var tmp_4 = ret;
|
|
1447
|
+
// Inline function 'kotlin.math.sin' call
|
|
1448
|
+
var tmp5_sin = lat / 12 * get_PI();
|
|
1449
|
+
var tmp_5 = 160 * Math.sin(tmp5_sin);
|
|
1450
|
+
// Inline function 'kotlin.math.sin' call
|
|
1451
|
+
var tmp6_sin = lat * get_PI() / 30;
|
|
1452
|
+
ret = tmp_4 + (tmp_5 + 320 * Math.sin(tmp6_sin)) * 2 / 3;
|
|
1453
|
+
return ret;
|
|
1454
|
+
}
|
|
1455
|
+
function transformLng($this, lng, lat) {
|
|
1456
|
+
var tmp = 300 + lng + 2 * lat + 0.1 * lng * lng + 0.1 * lng * lat;
|
|
1457
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1458
|
+
// Inline function 'kotlin.math.abs' call
|
|
1459
|
+
var tmp0_sqrt = Math.abs(lng);
|
|
1460
|
+
var ret = tmp + 0.1 * Math.sqrt(tmp0_sqrt);
|
|
1461
|
+
var tmp_0 = ret;
|
|
1462
|
+
// Inline function 'kotlin.math.sin' call
|
|
1463
|
+
var tmp1_sin = 6 * lng * get_PI();
|
|
1464
|
+
var tmp_1 = 20 * Math.sin(tmp1_sin);
|
|
1465
|
+
// Inline function 'kotlin.math.sin' call
|
|
1466
|
+
var tmp2_sin = 2 * lng * get_PI();
|
|
1467
|
+
ret = tmp_0 + (tmp_1 + 20 * Math.sin(tmp2_sin)) * 2 / 3;
|
|
1468
|
+
var tmp_2 = ret;
|
|
1469
|
+
// Inline function 'kotlin.math.sin' call
|
|
1470
|
+
var tmp3_sin = lng * get_PI();
|
|
1471
|
+
var tmp_3 = 20 * Math.sin(tmp3_sin);
|
|
1472
|
+
// Inline function 'kotlin.math.sin' call
|
|
1473
|
+
var tmp4_sin = lng / 3 * get_PI();
|
|
1474
|
+
ret = tmp_2 + (tmp_3 + 40 * Math.sin(tmp4_sin)) * 2 / 3;
|
|
1475
|
+
var tmp_4 = ret;
|
|
1476
|
+
// Inline function 'kotlin.math.sin' call
|
|
1477
|
+
var tmp5_sin = lng / 12 * get_PI();
|
|
1478
|
+
var tmp_5 = 150 * Math.sin(tmp5_sin);
|
|
1479
|
+
// Inline function 'kotlin.math.sin' call
|
|
1480
|
+
var tmp6_sin = lng / 30 * get_PI();
|
|
1481
|
+
ret = tmp_4 + (tmp_5 + 300 * Math.sin(tmp6_sin)) * 2 / 3;
|
|
1482
|
+
return ret;
|
|
1483
|
+
}
|
|
1484
|
+
function outOfChina($this, lng, lat) {
|
|
1485
|
+
return ((lng < 72.004 ? true : lng > 137.8347) ? true : lat < 0.8293) ? true : lat > 55.8271;
|
|
1486
|
+
}
|
|
1487
|
+
function CoordinateConvert() {
|
|
1488
|
+
CoordinateConvert_instance = this;
|
|
1489
|
+
this.zb_1 = 52.35987755982988;
|
|
1490
|
+
this.ac_1 = 6378245;
|
|
1491
|
+
this.bc_1 = 0.006693421622965943;
|
|
1492
|
+
}
|
|
1493
|
+
protoOf(CoordinateConvert).cc = function (lng, lat) {
|
|
1494
|
+
var x = lng - 0.0065;
|
|
1495
|
+
var y = lat - 0.006;
|
|
1496
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1497
|
+
var tmp0_sqrt = x * x + y * y;
|
|
1498
|
+
var tmp = Math.sqrt(tmp0_sqrt);
|
|
1499
|
+
// Inline function 'kotlin.math.sin' call
|
|
1500
|
+
var tmp1_sin = y * 52.35987755982988;
|
|
1501
|
+
var z = tmp - 2.0E-5 * Math.sin(tmp1_sin);
|
|
1502
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1503
|
+
var tmp_0 = Math.atan2(y, x);
|
|
1504
|
+
// Inline function 'kotlin.math.cos' call
|
|
1505
|
+
var tmp2_cos = x * 52.35987755982988;
|
|
1506
|
+
var theta = tmp_0 - 3.0E-6 * Math.cos(tmp2_cos);
|
|
1507
|
+
// Inline function 'kotlin.math.cos' call
|
|
1508
|
+
var gcjLng = z * Math.cos(theta);
|
|
1509
|
+
// Inline function 'kotlin.math.sin' call
|
|
1510
|
+
var gcjLat = z * Math.sin(theta);
|
|
1511
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1512
|
+
return new Float64Array([gcjLng, gcjLat]);
|
|
1513
|
+
};
|
|
1514
|
+
protoOf(CoordinateConvert).dc = function (lng, lat) {
|
|
1515
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1516
|
+
var tmp0_sqrt = lng * lng + lat * lat;
|
|
1517
|
+
var tmp = Math.sqrt(tmp0_sqrt);
|
|
1518
|
+
// Inline function 'kotlin.math.sin' call
|
|
1519
|
+
var tmp1_sin = lat * 52.35987755982988;
|
|
1520
|
+
var z = tmp + 2.0E-5 * Math.sin(tmp1_sin);
|
|
1521
|
+
// Inline function 'kotlin.math.atan2' call
|
|
1522
|
+
var tmp_0 = Math.atan2(lat, lng);
|
|
1523
|
+
// Inline function 'kotlin.math.cos' call
|
|
1524
|
+
var tmp2_cos = lng * 52.35987755982988;
|
|
1525
|
+
var theta = tmp_0 + 3.0E-6 * Math.cos(tmp2_cos);
|
|
1526
|
+
// Inline function 'kotlin.math.cos' call
|
|
1527
|
+
var bdLng = z * Math.cos(theta) + 0.0065;
|
|
1528
|
+
// Inline function 'kotlin.math.sin' call
|
|
1529
|
+
var bdLat = z * Math.sin(theta) + 0.006;
|
|
1530
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1531
|
+
return new Float64Array([bdLng, bdLat]);
|
|
1532
|
+
};
|
|
1533
|
+
protoOf(CoordinateConvert).ec = function (lng, lat) {
|
|
1534
|
+
var tmp;
|
|
1535
|
+
if (outOfChina(this, lng, lat)) {
|
|
1536
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1537
|
+
tmp = new Float64Array([lng, lat]);
|
|
1538
|
+
} else {
|
|
1539
|
+
var dLat = transformLat(this, lng - 105, lat - 35);
|
|
1540
|
+
var dLng = transformLng(this, lng - 105, lat - 35);
|
|
1541
|
+
var radLat = lat / 180 * get_PI();
|
|
1542
|
+
// Inline function 'kotlin.math.sin' call
|
|
1543
|
+
var magic = Math.sin(radLat);
|
|
1544
|
+
magic = 1 - 0.006693421622965943 * magic * magic;
|
|
1545
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1546
|
+
var tmp0_sqrt = magic;
|
|
1547
|
+
var sqrtMagic = Math.sqrt(tmp0_sqrt);
|
|
1548
|
+
dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
|
|
1549
|
+
var tmp_0 = dLng * 180;
|
|
1550
|
+
var tmp_1 = 6378245 / sqrtMagic;
|
|
1551
|
+
// Inline function 'kotlin.math.cos' call
|
|
1552
|
+
dLng = tmp_0 / (tmp_1 * Math.cos(radLat) * get_PI());
|
|
1553
|
+
var mgLat = lat + dLat;
|
|
1554
|
+
var mgLng = lng + dLng;
|
|
1555
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1556
|
+
tmp = new Float64Array([lng * 2 - mgLng, lat * 2 - mgLat]);
|
|
1557
|
+
}
|
|
1558
|
+
return tmp;
|
|
1559
|
+
};
|
|
1560
|
+
protoOf(CoordinateConvert).fc = function (lng, lat) {
|
|
1561
|
+
var tmp;
|
|
1562
|
+
if (outOfChina(this, lng, lat)) {
|
|
1563
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1564
|
+
tmp = new Float64Array([lng, lat]);
|
|
1565
|
+
} else {
|
|
1566
|
+
var dLat = transformLat(this, lng - 105, lat - 35);
|
|
1567
|
+
var dLng = transformLng(this, lng - 105, lat - 35);
|
|
1568
|
+
var redLat = lat / 180 * get_PI();
|
|
1569
|
+
// Inline function 'kotlin.math.sin' call
|
|
1570
|
+
var magic = Math.sin(redLat);
|
|
1571
|
+
magic = 1 - 0.006693421622965943 * magic * magic;
|
|
1572
|
+
// Inline function 'kotlin.math.sqrt' call
|
|
1573
|
+
var tmp0_sqrt = magic;
|
|
1574
|
+
var sqrtMagic = Math.sqrt(tmp0_sqrt);
|
|
1575
|
+
dLat = dLat * 180 / (6335552.717000426 / (magic * sqrtMagic) * get_PI());
|
|
1576
|
+
var tmp_0 = dLng * 180;
|
|
1577
|
+
var tmp_1 = 6378245 / sqrtMagic;
|
|
1578
|
+
// Inline function 'kotlin.math.cos' call
|
|
1579
|
+
dLng = tmp_0 / (tmp_1 * Math.cos(redLat) * get_PI());
|
|
1580
|
+
var mgLat = lat + dLat;
|
|
1581
|
+
var mgLng = lng + dLng;
|
|
1582
|
+
// Inline function 'kotlin.doubleArrayOf' call
|
|
1583
|
+
tmp = new Float64Array([mgLng, mgLat]);
|
|
1584
|
+
}
|
|
1585
|
+
return tmp;
|
|
1586
|
+
};
|
|
1587
|
+
protoOf(CoordinateConvert).gc = function (lng, lat) {
|
|
1588
|
+
var lngLat = this.cc(lng, lat);
|
|
1589
|
+
return this.ec(lngLat[0], lngLat[1]);
|
|
1590
|
+
};
|
|
1591
|
+
protoOf(CoordinateConvert).hc = function (lng, lat) {
|
|
1592
|
+
var lngLat = this.fc(lng, lat);
|
|
1593
|
+
return this.dc(lngLat[0], lngLat[1]);
|
|
1594
|
+
};
|
|
1595
|
+
var CoordinateConvert_instance;
|
|
1596
|
+
function CoordinateConvert_getInstance() {
|
|
1597
|
+
if (CoordinateConvert_instance == null)
|
|
1598
|
+
new CoordinateConvert();
|
|
1599
|
+
return CoordinateConvert_instance;
|
|
1600
|
+
}
|
|
1601
|
+
var CoordinateSystemType_WGS84_instance;
|
|
1602
|
+
var CoordinateSystemType_GCJ02_instance;
|
|
1603
|
+
var CoordinateSystemType_BD09_instance;
|
|
1604
|
+
function values_0() {
|
|
1605
|
+
return [CoordinateSystemType_WGS84_getInstance(), CoordinateSystemType_GCJ02_getInstance(), CoordinateSystemType_BD09_getInstance()];
|
|
1606
|
+
}
|
|
1607
|
+
function valueOf_0(value) {
|
|
1608
|
+
switch (value) {
|
|
1609
|
+
case 'WGS84':
|
|
1610
|
+
return CoordinateSystemType_WGS84_getInstance();
|
|
1611
|
+
case 'GCJ02':
|
|
1612
|
+
return CoordinateSystemType_GCJ02_getInstance();
|
|
1613
|
+
case 'BD09':
|
|
1614
|
+
return CoordinateSystemType_BD09_getInstance();
|
|
1615
|
+
default:
|
|
1616
|
+
CoordinateSystemType_initEntries();
|
|
1617
|
+
THROW_ISE();
|
|
1618
|
+
break;
|
|
1619
|
+
}
|
|
666
1620
|
}
|
|
667
|
-
|
|
668
|
-
|
|
1621
|
+
var CoordinateSystemType_entriesInitialized;
|
|
1622
|
+
function CoordinateSystemType_initEntries() {
|
|
1623
|
+
if (CoordinateSystemType_entriesInitialized)
|
|
1624
|
+
return Unit_getInstance();
|
|
1625
|
+
CoordinateSystemType_entriesInitialized = true;
|
|
1626
|
+
CoordinateSystemType_WGS84_instance = new CoordinateSystemType('WGS84', 0);
|
|
1627
|
+
CoordinateSystemType_GCJ02_instance = new CoordinateSystemType('GCJ02', 1);
|
|
1628
|
+
CoordinateSystemType_BD09_instance = new CoordinateSystemType('BD09', 2);
|
|
1629
|
+
}
|
|
1630
|
+
function CoordinateSystemType(name, ordinal) {
|
|
1631
|
+
Enum.call(this, name, ordinal);
|
|
1632
|
+
}
|
|
1633
|
+
function CoordinateSystemType_WGS84_getInstance() {
|
|
1634
|
+
CoordinateSystemType_initEntries();
|
|
1635
|
+
return CoordinateSystemType_WGS84_instance;
|
|
1636
|
+
}
|
|
1637
|
+
function CoordinateSystemType_GCJ02_getInstance() {
|
|
1638
|
+
CoordinateSystemType_initEntries();
|
|
1639
|
+
return CoordinateSystemType_GCJ02_instance;
|
|
1640
|
+
}
|
|
1641
|
+
function CoordinateSystemType_BD09_getInstance() {
|
|
1642
|
+
CoordinateSystemType_initEntries();
|
|
1643
|
+
return CoordinateSystemType_BD09_instance;
|
|
1644
|
+
}
|
|
1645
|
+
function convert(_this__u8e3s4, from, to) {
|
|
1646
|
+
var tmp;
|
|
1647
|
+
switch (from.ja_1) {
|
|
1648
|
+
case 0:
|
|
1649
|
+
var tmp_0;
|
|
1650
|
+
switch (to.ja_1) {
|
|
1651
|
+
case 1:
|
|
1652
|
+
// Inline function 'kotlin.let' call
|
|
1653
|
+
|
|
1654
|
+
var tmp0_let = CoordinateConvert_getInstance().fc(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1655
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1656
|
+
|
|
1657
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1658
|
+
|
|
1659
|
+
tmp_0 = new Coordinate(tmp0_let[1], tmp0_let[0]);
|
|
1660
|
+
break;
|
|
1661
|
+
case 2:
|
|
1662
|
+
// Inline function 'kotlin.let' call
|
|
1663
|
+
|
|
1664
|
+
var tmp1_let = CoordinateConvert_getInstance().hc(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1665
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1666
|
+
|
|
1667
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1668
|
+
|
|
1669
|
+
tmp_0 = new Coordinate(tmp1_let[1], tmp1_let[0]);
|
|
1670
|
+
break;
|
|
1671
|
+
default:
|
|
1672
|
+
tmp_0 = _this__u8e3s4.copy();
|
|
1673
|
+
break;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
tmp = tmp_0;
|
|
1677
|
+
break;
|
|
1678
|
+
case 1:
|
|
1679
|
+
var tmp_1;
|
|
1680
|
+
switch (to.ja_1) {
|
|
1681
|
+
case 0:
|
|
1682
|
+
// Inline function 'kotlin.let' call
|
|
1683
|
+
|
|
1684
|
+
var tmp2_let = CoordinateConvert_getInstance().ec(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1685
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1686
|
+
|
|
1687
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1688
|
+
|
|
1689
|
+
tmp_1 = new Coordinate(tmp2_let[1], tmp2_let[0]);
|
|
1690
|
+
break;
|
|
1691
|
+
case 2:
|
|
1692
|
+
// Inline function 'kotlin.let' call
|
|
1693
|
+
|
|
1694
|
+
var tmp3_let = CoordinateConvert_getInstance().dc(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1695
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1696
|
+
|
|
1697
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1698
|
+
|
|
1699
|
+
tmp_1 = new Coordinate(tmp3_let[1], tmp3_let[0]);
|
|
1700
|
+
break;
|
|
1701
|
+
default:
|
|
1702
|
+
tmp_1 = _this__u8e3s4.copy();
|
|
1703
|
+
break;
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
tmp = tmp_1;
|
|
1707
|
+
break;
|
|
1708
|
+
case 2:
|
|
1709
|
+
var tmp_2;
|
|
1710
|
+
switch (to.ja_1) {
|
|
1711
|
+
case 0:
|
|
1712
|
+
// Inline function 'kotlin.let' call
|
|
1713
|
+
|
|
1714
|
+
var tmp4_let = CoordinateConvert_getInstance().gc(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1715
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1716
|
+
|
|
1717
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1718
|
+
|
|
1719
|
+
tmp_2 = new Coordinate(tmp4_let[1], tmp4_let[0]);
|
|
1720
|
+
break;
|
|
1721
|
+
case 1:
|
|
1722
|
+
// Inline function 'kotlin.let' call
|
|
1723
|
+
|
|
1724
|
+
var tmp5_let = CoordinateConvert_getInstance().cc(_this__u8e3s4.lng, _this__u8e3s4.lat);
|
|
1725
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1726
|
+
|
|
1727
|
+
// Inline function 'com.d10ng.common.coordinate.convert.<anonymous>' call
|
|
1728
|
+
|
|
1729
|
+
tmp_2 = new Coordinate(tmp5_let[1], tmp5_let[0]);
|
|
1730
|
+
break;
|
|
1731
|
+
default:
|
|
1732
|
+
tmp_2 = _this__u8e3s4.copy();
|
|
1733
|
+
break;
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
tmp = tmp_2;
|
|
1737
|
+
break;
|
|
1738
|
+
default:
|
|
1739
|
+
noWhenBranchMatchedException();
|
|
1740
|
+
break;
|
|
1741
|
+
}
|
|
1742
|
+
return tmp;
|
|
1743
|
+
}
|
|
1744
|
+
function isEastLongitude(_this__u8e3s4) {
|
|
1745
|
+
return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 180.0 : false;
|
|
1746
|
+
}
|
|
1747
|
+
function isNorthLatitude(_this__u8e3s4) {
|
|
1748
|
+
return 0.0 <= _this__u8e3s4 ? _this__u8e3s4 <= 90.0 : false;
|
|
1749
|
+
}
|
|
1750
|
+
function toLongitudeNoPre(_this__u8e3s4) {
|
|
1751
|
+
var tmp;
|
|
1752
|
+
if (_this__u8e3s4 > 180.0) {
|
|
1753
|
+
tmp = 360;
|
|
1754
|
+
} else if (_this__u8e3s4 < 0.0) {
|
|
1755
|
+
tmp = 0;
|
|
1756
|
+
} else {
|
|
1757
|
+
return _this__u8e3s4;
|
|
1758
|
+
}
|
|
1759
|
+
var base = tmp;
|
|
1760
|
+
return base - _this__u8e3s4;
|
|
1761
|
+
}
|
|
1762
|
+
function toLatitudeNoPre(_this__u8e3s4) {
|
|
1763
|
+
var tmp;
|
|
1764
|
+
if (_this__u8e3s4 > 90.0) {
|
|
1765
|
+
tmp = 180;
|
|
1766
|
+
} else if (_this__u8e3s4 < 0.0) {
|
|
1767
|
+
tmp = 0;
|
|
1768
|
+
} else {
|
|
1769
|
+
return _this__u8e3s4;
|
|
1770
|
+
}
|
|
1771
|
+
var base = tmp;
|
|
1772
|
+
return base - _this__u8e3s4;
|
|
1773
|
+
}
|
|
1774
|
+
function toFullLongitude(_this__u8e3s4, isEast, isPositive) {
|
|
1775
|
+
isPositive = isPositive === VOID ? true : isPositive;
|
|
1776
|
+
if (!isEastLongitude(_this__u8e3s4)) {
|
|
1777
|
+
if (isPositive) {
|
|
1778
|
+
var tmp;
|
|
1779
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1780
|
+
tmp = _this__u8e3s4;
|
|
1781
|
+
} else {
|
|
1782
|
+
tmp = 360 + _this__u8e3s4;
|
|
1783
|
+
}
|
|
1784
|
+
return tmp;
|
|
1785
|
+
} else {
|
|
1786
|
+
var tmp_0;
|
|
1787
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1788
|
+
tmp_0 = _this__u8e3s4 - 360;
|
|
1789
|
+
} else {
|
|
1790
|
+
tmp_0 = _this__u8e3s4;
|
|
1791
|
+
}
|
|
1792
|
+
return tmp_0;
|
|
1793
|
+
}
|
|
1794
|
+
} else if (isEast) {
|
|
1795
|
+
return _this__u8e3s4;
|
|
1796
|
+
} else {
|
|
1797
|
+
var tmp_1;
|
|
1798
|
+
if (isPositive) {
|
|
1799
|
+
tmp_1 = 360 - _this__u8e3s4;
|
|
1800
|
+
} else {
|
|
1801
|
+
tmp_1 = -_this__u8e3s4;
|
|
1802
|
+
}
|
|
1803
|
+
return tmp_1;
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
function toFullLatitude(_this__u8e3s4, isNorth, isPositive) {
|
|
1807
|
+
isPositive = isPositive === VOID ? true : isPositive;
|
|
1808
|
+
if (!isNorthLatitude(_this__u8e3s4)) {
|
|
1809
|
+
if (isPositive) {
|
|
1810
|
+
var tmp;
|
|
1811
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1812
|
+
tmp = _this__u8e3s4;
|
|
1813
|
+
} else {
|
|
1814
|
+
tmp = 90 + _this__u8e3s4;
|
|
1815
|
+
}
|
|
1816
|
+
return tmp;
|
|
1817
|
+
} else {
|
|
1818
|
+
var tmp_0;
|
|
1819
|
+
if (_this__u8e3s4 > 0.0) {
|
|
1820
|
+
tmp_0 = _this__u8e3s4 - 90;
|
|
1821
|
+
} else {
|
|
1822
|
+
tmp_0 = _this__u8e3s4;
|
|
1823
|
+
}
|
|
1824
|
+
return tmp_0;
|
|
1825
|
+
}
|
|
1826
|
+
} else if (isNorth) {
|
|
1827
|
+
return _this__u8e3s4;
|
|
1828
|
+
} else {
|
|
1829
|
+
var tmp_1;
|
|
1830
|
+
if (isPositive) {
|
|
1831
|
+
tmp_1 = 90 - _this__u8e3s4;
|
|
1832
|
+
} else {
|
|
1833
|
+
tmp_1 = -_this__u8e3s4;
|
|
1834
|
+
}
|
|
1835
|
+
return tmp_1;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
function toDMS(_this__u8e3s4, isLongitude) {
|
|
1839
|
+
var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
|
|
1840
|
+
var dValue = numberToInt(value);
|
|
1841
|
+
var m = (value - dValue) * 60.0;
|
|
1842
|
+
var mValue = numberToInt(m);
|
|
1843
|
+
var s = (m - mValue) * 60.0;
|
|
1844
|
+
return new DMS(dValue, mValue, s);
|
|
1845
|
+
}
|
|
1846
|
+
function toLatLng(_this__u8e3s4) {
|
|
1847
|
+
return (_this__u8e3s4.seconds / 60 + _this__u8e3s4.minutes) / 60.0 + _this__u8e3s4.degrees;
|
|
1848
|
+
}
|
|
1849
|
+
function toLatLngString(_this__u8e3s4, isLongitude, pattern) {
|
|
1850
|
+
pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
|
|
1851
|
+
var value = isLongitude ? toLongitudeNoPre(_this__u8e3s4) : toLatitudeNoPre(_this__u8e3s4);
|
|
1852
|
+
var string = pattern;
|
|
1853
|
+
var tmp$ret$0;
|
|
1854
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1855
|
+
tmp$ret$0 = Regex_init_$Create$('CH');
|
|
1856
|
+
var reg = toList(tmp$ret$0.d9(string));
|
|
1857
|
+
var tmp;
|
|
1858
|
+
if (isLongitude) {
|
|
1859
|
+
tmp = isEastLongitude(_this__u8e3s4) ? '\u4E1C\u7ECF' : '\u897F\u7ECF';
|
|
1860
|
+
} else {
|
|
1861
|
+
tmp = isNorthLatitude(_this__u8e3s4) ? '\u5317\u7EAC' : '\u5357\u7EAC';
|
|
1862
|
+
}
|
|
1863
|
+
var faxiang = tmp;
|
|
1864
|
+
var tmp0_iterator = reg.c();
|
|
1865
|
+
while (tmp0_iterator.d()) {
|
|
1866
|
+
var item = tmp0_iterator.e();
|
|
1867
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1868
|
+
var tmp0_replaceRange = string;
|
|
1869
|
+
var tmp1_replaceRange = item.g9();
|
|
1870
|
+
var tmp2_replaceRange = faxiang;
|
|
1871
|
+
string = toString(replaceRange(isCharSequence(tmp0_replaceRange) ? tmp0_replaceRange : THROW_CCE(), tmp1_replaceRange, tmp2_replaceRange));
|
|
1872
|
+
}
|
|
1873
|
+
var tmp$ret$2;
|
|
1874
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1875
|
+
tmp$ret$2 = Regex_init_$Create$('F');
|
|
1876
|
+
reg = toList(tmp$ret$2.d9(string));
|
|
1877
|
+
var tmp_0;
|
|
1878
|
+
if (isLongitude) {
|
|
1879
|
+
tmp_0 = isEastLongitude(_this__u8e3s4) ? 'E' : 'W';
|
|
1880
|
+
} else {
|
|
1881
|
+
tmp_0 = isNorthLatitude(_this__u8e3s4) ? 'N' : 'S';
|
|
1882
|
+
}
|
|
1883
|
+
faxiang = tmp_0;
|
|
1884
|
+
var tmp1_iterator = reg.c();
|
|
1885
|
+
while (tmp1_iterator.d()) {
|
|
1886
|
+
var item_0 = tmp1_iterator.e();
|
|
1887
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1888
|
+
var tmp3_replaceRange = string;
|
|
1889
|
+
var tmp4_replaceRange = item_0.g9();
|
|
1890
|
+
var tmp5_replaceRange = faxiang;
|
|
1891
|
+
string = toString(replaceRange(isCharSequence(tmp3_replaceRange) ? tmp3_replaceRange : THROW_CCE(), tmp4_replaceRange, tmp5_replaceRange));
|
|
1892
|
+
}
|
|
1893
|
+
var tmp$ret$4;
|
|
1894
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1895
|
+
tmp$ret$4 = Regex_init_$Create$('d+');
|
|
1896
|
+
reg = toList(tmp$ret$4.d9(string));
|
|
1897
|
+
var dValue = numberToInt(value);
|
|
1898
|
+
var tmp2_iterator = reg.c();
|
|
1899
|
+
while (tmp2_iterator.d()) {
|
|
1900
|
+
var item_1 = tmp2_iterator.e();
|
|
1901
|
+
var tmp_1;
|
|
1902
|
+
if (item_1.f1().length === 1) {
|
|
1903
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1904
|
+
var tmp6_replaceRange = string;
|
|
1905
|
+
var tmp7_replaceRange = item_1.g9();
|
|
1906
|
+
var tmp8_replaceRange = dValue.toString();
|
|
1907
|
+
tmp_1 = toString(replaceRange(isCharSequence(tmp6_replaceRange) ? tmp6_replaceRange : THROW_CCE(), tmp7_replaceRange, tmp8_replaceRange));
|
|
1908
|
+
} else {
|
|
1909
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1910
|
+
var tmp9_replaceRange = string;
|
|
1911
|
+
var tmp10_replaceRange = item_1.g9();
|
|
1912
|
+
var tmp11_replaceRange = padStart(dValue.toString(), item_1.f1().length, _Char___init__impl__6a9atx(48));
|
|
1913
|
+
tmp_1 = toString(replaceRange(isCharSequence(tmp9_replaceRange) ? tmp9_replaceRange : THROW_CCE(), tmp10_replaceRange, tmp11_replaceRange));
|
|
1914
|
+
}
|
|
1915
|
+
string = tmp_1;
|
|
1916
|
+
}
|
|
1917
|
+
var tmp$ret$7;
|
|
1918
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1919
|
+
tmp$ret$7 = Regex_init_$Create$('m+');
|
|
1920
|
+
reg = toList(tmp$ret$7.d9(string));
|
|
1921
|
+
var m = (value - dValue) * 60.0;
|
|
1922
|
+
var mValue = numberToInt(m);
|
|
1923
|
+
var tmp3_iterator = reg.c();
|
|
1924
|
+
while (tmp3_iterator.d()) {
|
|
1925
|
+
var item_2 = tmp3_iterator.e();
|
|
1926
|
+
var tmp_2;
|
|
1927
|
+
if (item_2.f1().length === 1) {
|
|
1928
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1929
|
+
var tmp12_replaceRange = string;
|
|
1930
|
+
var tmp13_replaceRange = item_2.g9();
|
|
1931
|
+
var tmp14_replaceRange = mValue.toString();
|
|
1932
|
+
tmp_2 = toString(replaceRange(isCharSequence(tmp12_replaceRange) ? tmp12_replaceRange : THROW_CCE(), tmp13_replaceRange, tmp14_replaceRange));
|
|
1933
|
+
} else {
|
|
1934
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1935
|
+
var tmp15_replaceRange = string;
|
|
1936
|
+
var tmp16_replaceRange = item_2.g9();
|
|
1937
|
+
var tmp17_replaceRange = padStart(mValue.toString(), item_2.f1().length, _Char___init__impl__6a9atx(48));
|
|
1938
|
+
tmp_2 = toString(replaceRange(isCharSequence(tmp15_replaceRange) ? tmp15_replaceRange : THROW_CCE(), tmp16_replaceRange, tmp17_replaceRange));
|
|
1939
|
+
}
|
|
1940
|
+
string = tmp_2;
|
|
1941
|
+
}
|
|
1942
|
+
var tmp$ret$10;
|
|
1943
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1944
|
+
tmp$ret$10 = Regex_init_$Create$('S+');
|
|
1945
|
+
reg = toList(tmp$ret$10.d9(string));
|
|
1946
|
+
var S = (m - mValue) * 60.0;
|
|
1947
|
+
var SValue = numberToInt(S);
|
|
1948
|
+
var tmp4_iterator = reg.c();
|
|
1949
|
+
while (tmp4_iterator.d()) {
|
|
1950
|
+
var item_3 = tmp4_iterator.e();
|
|
1951
|
+
var tmp_3;
|
|
1952
|
+
if (item_3.f1().length === 1) {
|
|
1953
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1954
|
+
var tmp18_replaceRange = string;
|
|
1955
|
+
var tmp19_replaceRange = item_3.g9();
|
|
1956
|
+
var tmp20_replaceRange = SValue.toString();
|
|
1957
|
+
tmp_3 = toString(replaceRange(isCharSequence(tmp18_replaceRange) ? tmp18_replaceRange : THROW_CCE(), tmp19_replaceRange, tmp20_replaceRange));
|
|
1958
|
+
} else {
|
|
1959
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1960
|
+
var tmp21_replaceRange = string;
|
|
1961
|
+
var tmp22_replaceRange = item_3.g9();
|
|
1962
|
+
var tmp23_replaceRange = padStart(SValue.toString(), item_3.f1().length, _Char___init__impl__6a9atx(48));
|
|
1963
|
+
tmp_3 = toString(replaceRange(isCharSequence(tmp21_replaceRange) ? tmp21_replaceRange : THROW_CCE(), tmp22_replaceRange, tmp23_replaceRange));
|
|
1964
|
+
}
|
|
1965
|
+
string = tmp_3;
|
|
1966
|
+
}
|
|
1967
|
+
var tmp$ret$13;
|
|
1968
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
1969
|
+
tmp$ret$13 = Regex_init_$Create$('s+');
|
|
1970
|
+
reg = toList(tmp$ret$13.d9(string));
|
|
1971
|
+
var tmp5_iterator = reg.c();
|
|
1972
|
+
while (tmp5_iterator.d()) {
|
|
1973
|
+
var item_4 = tmp5_iterator.e();
|
|
1974
|
+
var tmp_4 = S - SValue;
|
|
1975
|
+
var tmp$ret$14;
|
|
1976
|
+
// Inline function 'kotlin.math.pow' call
|
|
1977
|
+
var tmp24_pow = item_4.f1().length;
|
|
1978
|
+
tmp$ret$14 = Math.pow(10.0, tmp24_pow);
|
|
1979
|
+
var sValue = roundToInt(tmp_4 * tmp$ret$14);
|
|
1980
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
1981
|
+
var tmp25_replaceRange = string;
|
|
1982
|
+
var tmp26_replaceRange = item_4.g9();
|
|
1983
|
+
var tmp27_replaceRange = padStart(sValue.toString(), item_4.f1().length, _Char___init__impl__6a9atx(48));
|
|
1984
|
+
string = toString(replaceRange(isCharSequence(tmp25_replaceRange) ? tmp25_replaceRange : THROW_CCE(), tmp26_replaceRange, tmp27_replaceRange));
|
|
1985
|
+
}
|
|
1986
|
+
return string;
|
|
1987
|
+
}
|
|
1988
|
+
function toLongitudeString(_this__u8e3s4, pattern) {
|
|
1989
|
+
pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
|
|
1990
|
+
return toLatLngString(_this__u8e3s4, true, pattern);
|
|
1991
|
+
}
|
|
1992
|
+
function toLatitudeString(_this__u8e3s4, pattern) {
|
|
1993
|
+
pattern = pattern === VOID ? 'CHFd\xB0m\u2032S.ss\u2033' : pattern;
|
|
1994
|
+
return toLatLngString(_this__u8e3s4, false, pattern);
|
|
1995
|
+
}
|
|
1996
|
+
function toLatLngByString(_this__u8e3s4, pattern) {
|
|
1997
|
+
var string = _this__u8e3s4 + '*';
|
|
1998
|
+
var index = 0;
|
|
1999
|
+
var tempPattern = pattern + '*';
|
|
2000
|
+
while (index < (string.length - 1 | 0)) {
|
|
2001
|
+
var tmp$ret$0;
|
|
2002
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2003
|
+
tmp$ret$0 = Regex_init_$Create$('[^dmSs]+');
|
|
2004
|
+
var list = toList(tmp$ret$0.d9(tempPattern));
|
|
2005
|
+
var tmp0_iterator = list.c();
|
|
2006
|
+
$l$loop_2: while (tmp0_iterator.d()) {
|
|
2007
|
+
var item = tmp0_iterator.e();
|
|
2008
|
+
if (item.g9().k_1 < index)
|
|
2009
|
+
continue $l$loop_2;
|
|
2010
|
+
if (contains(item.f1(), 'CH') ? true : contains(item.f1(), 'F')) {
|
|
2011
|
+
index = item.g9().l_1;
|
|
2012
|
+
continue $l$loop_2;
|
|
2013
|
+
}
|
|
2014
|
+
var pos = indexOf_0(string, item.f1());
|
|
2015
|
+
if (pos < item.g9().k_1) {
|
|
2016
|
+
println('ERROR, pos=' + pos + ', range.first=' + item.g9().k_1);
|
|
2017
|
+
return 0.0;
|
|
2018
|
+
}
|
|
2019
|
+
if (pos === item.g9().k_1) {
|
|
2020
|
+
index = item.g9().l_1;
|
|
2021
|
+
continue $l$loop_2;
|
|
2022
|
+
} else {
|
|
2023
|
+
// Inline function 'kotlin.text.substring' call
|
|
2024
|
+
var tmp0_substring = tempPattern;
|
|
2025
|
+
var tmp1_substring = item.g9().k_1 - 1 | 0;
|
|
2026
|
+
var tmp2_substring = item.g9().k_1;
|
|
2027
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2028
|
+
var lastStr = tmp0_substring.substring(tmp1_substring, tmp2_substring);
|
|
2029
|
+
// Inline function 'kotlin.text.replaceRange' call
|
|
2030
|
+
var tmp3_replaceRange = tempPattern;
|
|
2031
|
+
var tmp4_replaceRange = item.g9().k_1 - 1 | 0;
|
|
2032
|
+
var tmp5_replaceRange = item.g9().k_1;
|
|
2033
|
+
var tmp6_replaceRange = padStart(lastStr, (pos - item.g9().k_1 | 0) + 1 | 0, toCharArray(lastStr)[0]);
|
|
2034
|
+
tempPattern = toString(replaceRange_0(isCharSequence(tmp3_replaceRange) ? tmp3_replaceRange : THROW_CCE(), tmp4_replaceRange, tmp5_replaceRange, tmp6_replaceRange));
|
|
2035
|
+
index = pos + item.f1().length | 0;
|
|
2036
|
+
break $l$loop_2;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
var tmp$ret$4;
|
|
2041
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2042
|
+
tmp$ret$4 = Regex_init_$Create$('CH');
|
|
2043
|
+
var reg = toList(tmp$ret$4.d9(tempPattern));
|
|
2044
|
+
var tmp;
|
|
2045
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2046
|
+
if (!reg.t()) {
|
|
2047
|
+
tmp = substring(string, reg.g(0).g9());
|
|
2048
|
+
} else {
|
|
2049
|
+
tmp = null;
|
|
2050
|
+
}
|
|
2051
|
+
var faxiang = tmp;
|
|
2052
|
+
var tmp$ret$6;
|
|
2053
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2054
|
+
tmp$ret$6 = Regex_init_$Create$('F');
|
|
2055
|
+
reg = toList(tmp$ret$6.d9(tempPattern));
|
|
2056
|
+
var tmp_0;
|
|
2057
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
2058
|
+
if (!reg.t()) {
|
|
2059
|
+
tmp_0 = substring(string, reg.g(0).g9());
|
|
2060
|
+
} else {
|
|
2061
|
+
tmp_0 = faxiang;
|
|
2062
|
+
}
|
|
2063
|
+
faxiang = tmp_0;
|
|
2064
|
+
var isLongitude;
|
|
2065
|
+
switch (faxiang) {
|
|
2066
|
+
case '\u4E1C\u7ECF':
|
|
2067
|
+
case '\u897F\u7ECF':
|
|
2068
|
+
case 'E':
|
|
2069
|
+
case 'W':
|
|
2070
|
+
isLongitude = true;
|
|
2071
|
+
break;
|
|
2072
|
+
default:
|
|
2073
|
+
isLongitude = false;
|
|
2074
|
+
break;
|
|
2075
|
+
}
|
|
2076
|
+
var tmp$ret$8;
|
|
2077
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2078
|
+
tmp$ret$8 = Regex_init_$Create$('[d]+');
|
|
2079
|
+
reg = toList(tmp$ret$8.d9(tempPattern));
|
|
2080
|
+
var dStr = '';
|
|
2081
|
+
var tmp2_iterator = reg.c();
|
|
2082
|
+
while (tmp2_iterator.d()) {
|
|
2083
|
+
var item_0 = tmp2_iterator.e();
|
|
2084
|
+
dStr = dStr + substring(string, item_0.g9());
|
|
2085
|
+
}
|
|
2086
|
+
var tmp$ret$9;
|
|
2087
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2088
|
+
tmp$ret$9 = Regex_init_$Create$('[m]+');
|
|
2089
|
+
reg = toList(tmp$ret$9.d9(tempPattern));
|
|
2090
|
+
var mStr = '';
|
|
2091
|
+
var tmp3_iterator = reg.c();
|
|
2092
|
+
while (tmp3_iterator.d()) {
|
|
2093
|
+
var item_1 = tmp3_iterator.e();
|
|
2094
|
+
mStr = mStr + substring(string, item_1.g9());
|
|
2095
|
+
}
|
|
2096
|
+
var tmp$ret$10;
|
|
2097
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2098
|
+
tmp$ret$10 = Regex_init_$Create$('[S]+');
|
|
2099
|
+
reg = toList(tmp$ret$10.d9(tempPattern));
|
|
2100
|
+
var SStr = '';
|
|
2101
|
+
var tmp4_iterator = reg.c();
|
|
2102
|
+
while (tmp4_iterator.d()) {
|
|
2103
|
+
var item_2 = tmp4_iterator.e();
|
|
2104
|
+
SStr = SStr + substring(string, item_2.g9());
|
|
2105
|
+
}
|
|
2106
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2107
|
+
var tmp9_isEmpty = SStr;
|
|
2108
|
+
if (charSequenceLength(tmp9_isEmpty) === 0)
|
|
2109
|
+
SStr = '0';
|
|
2110
|
+
var tmp$ret$12;
|
|
2111
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2112
|
+
tmp$ret$12 = Regex_init_$Create$('[s]+');
|
|
2113
|
+
reg = toList(tmp$ret$12.d9(tempPattern));
|
|
2114
|
+
var sStr = '';
|
|
2115
|
+
var tmp5_iterator = reg.c();
|
|
2116
|
+
while (tmp5_iterator.d()) {
|
|
2117
|
+
var item_3 = tmp5_iterator.e();
|
|
2118
|
+
sStr = sStr + substring(string, item_3.g9());
|
|
2119
|
+
}
|
|
2120
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
2121
|
+
var tmp10_isEmpty = sStr;
|
|
2122
|
+
if (charSequenceLength(tmp10_isEmpty) === 0)
|
|
2123
|
+
sStr = '0';
|
|
2124
|
+
var s = toDouble(SStr + '.' + sStr) / 60.0;
|
|
2125
|
+
var m = (toInt_0(mStr) + s) / 60.0;
|
|
2126
|
+
var d = toInt_0(dStr) + m;
|
|
2127
|
+
var tmp_1;
|
|
2128
|
+
if (isLongitude) {
|
|
2129
|
+
var isEast;
|
|
2130
|
+
switch (faxiang) {
|
|
2131
|
+
case '\u4E1C\u7ECF':
|
|
2132
|
+
case 'E':
|
|
2133
|
+
isEast = true;
|
|
2134
|
+
break;
|
|
2135
|
+
default:
|
|
2136
|
+
isEast = false;
|
|
2137
|
+
break;
|
|
2138
|
+
}
|
|
2139
|
+
tmp_1 = toFullLongitude(d, isEast, false);
|
|
2140
|
+
} else {
|
|
2141
|
+
var isNorth;
|
|
2142
|
+
switch (faxiang) {
|
|
2143
|
+
case '\u5317\u7EAC':
|
|
2144
|
+
case 'N':
|
|
2145
|
+
isNorth = true;
|
|
2146
|
+
break;
|
|
2147
|
+
default:
|
|
2148
|
+
isNorth = false;
|
|
2149
|
+
break;
|
|
2150
|
+
}
|
|
2151
|
+
tmp_1 = toFullLatitude(d, isNorth, false);
|
|
2152
|
+
}
|
|
2153
|
+
return tmp_1;
|
|
2154
|
+
}
|
|
2155
|
+
function toLongitude(_this__u8e3s4, pattern) {
|
|
2156
|
+
return toLatLngByString('E' + _this__u8e3s4, 'F' + pattern);
|
|
2157
|
+
}
|
|
2158
|
+
function toLatitude(_this__u8e3s4, pattern) {
|
|
2159
|
+
return toLatLngByString('N' + _this__u8e3s4, 'F' + pattern);
|
|
2160
|
+
}
|
|
2161
|
+
function ddmmpmmmm2LatLng(_this__u8e3s4) {
|
|
2162
|
+
var temp = _this__u8e3s4 / 100;
|
|
2163
|
+
var z = numberToInt(temp);
|
|
2164
|
+
var end = (temp - z) * 100.0 / 60;
|
|
2165
|
+
return z + end;
|
|
2166
|
+
}
|
|
2167
|
+
function latLng2ddmmpmmmm(_this__u8e3s4) {
|
|
2168
|
+
var z = numberToInt(_this__u8e3s4);
|
|
2169
|
+
var end = (_this__u8e3s4 - z) * 60.0 / 100.0;
|
|
2170
|
+
return (z + end) * 100;
|
|
2171
|
+
}
|
|
2172
|
+
function DMS(degrees, minutes, seconds) {
|
|
2173
|
+
degrees = degrees === VOID ? 0 : degrees;
|
|
2174
|
+
minutes = minutes === VOID ? 0 : minutes;
|
|
2175
|
+
seconds = seconds === VOID ? 0.0 : seconds;
|
|
2176
|
+
this.degrees = degrees;
|
|
2177
|
+
this.minutes = minutes;
|
|
2178
|
+
this.seconds = seconds;
|
|
2179
|
+
}
|
|
2180
|
+
protoOf(DMS).kc = function (_set____db54di) {
|
|
2181
|
+
this.degrees = _set____db54di;
|
|
2182
|
+
};
|
|
2183
|
+
protoOf(DMS).lc = function () {
|
|
2184
|
+
return this.degrees;
|
|
2185
|
+
};
|
|
2186
|
+
protoOf(DMS).mc = function (_set____db54di) {
|
|
2187
|
+
this.minutes = _set____db54di;
|
|
2188
|
+
};
|
|
2189
|
+
protoOf(DMS).nc = function () {
|
|
2190
|
+
return this.minutes;
|
|
2191
|
+
};
|
|
2192
|
+
protoOf(DMS).oc = function (_set____db54di) {
|
|
2193
|
+
this.seconds = _set____db54di;
|
|
2194
|
+
};
|
|
2195
|
+
protoOf(DMS).pc = function () {
|
|
2196
|
+
return this.seconds;
|
|
2197
|
+
};
|
|
2198
|
+
protoOf(DMS).toString = function () {
|
|
2199
|
+
return '' + this.degrees + '\xB0' + this.minutes + '\u2032' + this.seconds + '\u2033';
|
|
2200
|
+
};
|
|
2201
|
+
protoOf(DMS).wb = function () {
|
|
2202
|
+
return this.degrees;
|
|
2203
|
+
};
|
|
2204
|
+
protoOf(DMS).xb = function () {
|
|
2205
|
+
return this.minutes;
|
|
2206
|
+
};
|
|
2207
|
+
protoOf(DMS).qc = function () {
|
|
2208
|
+
return this.seconds;
|
|
2209
|
+
};
|
|
2210
|
+
protoOf(DMS).rc = function (degrees, minutes, seconds) {
|
|
2211
|
+
return new DMS(degrees, minutes, seconds);
|
|
2212
|
+
};
|
|
2213
|
+
protoOf(DMS).copy = function (degrees, minutes, seconds, $super) {
|
|
2214
|
+
degrees = degrees === VOID ? this.degrees : degrees;
|
|
2215
|
+
minutes = minutes === VOID ? this.minutes : minutes;
|
|
2216
|
+
seconds = seconds === VOID ? this.seconds : seconds;
|
|
2217
|
+
return this.rc(degrees, minutes, seconds);
|
|
2218
|
+
};
|
|
2219
|
+
protoOf(DMS).hashCode = function () {
|
|
2220
|
+
var result = this.degrees;
|
|
2221
|
+
result = imul(result, 31) + this.minutes | 0;
|
|
2222
|
+
result = imul(result, 31) + getNumberHashCode(this.seconds) | 0;
|
|
2223
|
+
return result;
|
|
2224
|
+
};
|
|
2225
|
+
protoOf(DMS).equals = function (other) {
|
|
2226
|
+
if (this === other)
|
|
2227
|
+
return true;
|
|
2228
|
+
if (!(other instanceof DMS))
|
|
2229
|
+
return false;
|
|
2230
|
+
var tmp0_other_with_cast = other instanceof DMS ? other : THROW_CCE();
|
|
2231
|
+
if (!(this.degrees === tmp0_other_with_cast.degrees))
|
|
2232
|
+
return false;
|
|
2233
|
+
if (!(this.minutes === tmp0_other_with_cast.minutes))
|
|
2234
|
+
return false;
|
|
2235
|
+
if (!equals(this.seconds, tmp0_other_with_cast.seconds))
|
|
2236
|
+
return false;
|
|
2237
|
+
return true;
|
|
2238
|
+
};
|
|
2239
|
+
function DistanceAndBearing(distance, initialBearing, finalBearing) {
|
|
2240
|
+
distance = distance === VOID ? 0.0 : distance;
|
|
2241
|
+
initialBearing = initialBearing === VOID ? 0.0 : initialBearing;
|
|
2242
|
+
finalBearing = finalBearing === VOID ? 0.0 : finalBearing;
|
|
2243
|
+
this.distance = distance;
|
|
2244
|
+
this.initialBearing = initialBearing;
|
|
2245
|
+
this.finalBearing = finalBearing;
|
|
2246
|
+
}
|
|
2247
|
+
protoOf(DistanceAndBearing).sc = function (_set____db54di) {
|
|
2248
|
+
this.distance = _set____db54di;
|
|
2249
|
+
};
|
|
2250
|
+
protoOf(DistanceAndBearing).tc = function () {
|
|
2251
|
+
return this.distance;
|
|
2252
|
+
};
|
|
2253
|
+
protoOf(DistanceAndBearing).uc = function (_set____db54di) {
|
|
2254
|
+
this.initialBearing = _set____db54di;
|
|
2255
|
+
};
|
|
2256
|
+
protoOf(DistanceAndBearing).vc = function () {
|
|
2257
|
+
return this.initialBearing;
|
|
2258
|
+
};
|
|
2259
|
+
protoOf(DistanceAndBearing).wc = function (_set____db54di) {
|
|
2260
|
+
this.finalBearing = _set____db54di;
|
|
2261
|
+
};
|
|
2262
|
+
protoOf(DistanceAndBearing).xc = function () {
|
|
2263
|
+
return this.finalBearing;
|
|
2264
|
+
};
|
|
2265
|
+
protoOf(DistanceAndBearing).wb = function () {
|
|
2266
|
+
return this.distance;
|
|
2267
|
+
};
|
|
2268
|
+
protoOf(DistanceAndBearing).xb = function () {
|
|
2269
|
+
return this.initialBearing;
|
|
2270
|
+
};
|
|
2271
|
+
protoOf(DistanceAndBearing).qc = function () {
|
|
2272
|
+
return this.finalBearing;
|
|
2273
|
+
};
|
|
2274
|
+
protoOf(DistanceAndBearing).yc = function (distance, initialBearing, finalBearing) {
|
|
2275
|
+
return new DistanceAndBearing(distance, initialBearing, finalBearing);
|
|
2276
|
+
};
|
|
2277
|
+
protoOf(DistanceAndBearing).copy = function (distance, initialBearing, finalBearing, $super) {
|
|
2278
|
+
distance = distance === VOID ? this.distance : distance;
|
|
2279
|
+
initialBearing = initialBearing === VOID ? this.initialBearing : initialBearing;
|
|
2280
|
+
finalBearing = finalBearing === VOID ? this.finalBearing : finalBearing;
|
|
2281
|
+
return this.yc(distance, initialBearing, finalBearing);
|
|
2282
|
+
};
|
|
2283
|
+
protoOf(DistanceAndBearing).toString = function () {
|
|
2284
|
+
return 'DistanceAndBearing(distance=' + this.distance + ', initialBearing=' + this.initialBearing + ', finalBearing=' + this.finalBearing + ')';
|
|
2285
|
+
};
|
|
2286
|
+
protoOf(DistanceAndBearing).hashCode = function () {
|
|
2287
|
+
var result = getNumberHashCode(this.distance);
|
|
2288
|
+
result = imul(result, 31) + getNumberHashCode(this.initialBearing) | 0;
|
|
2289
|
+
result = imul(result, 31) + getNumberHashCode(this.finalBearing) | 0;
|
|
2290
|
+
return result;
|
|
2291
|
+
};
|
|
2292
|
+
protoOf(DistanceAndBearing).equals = function (other) {
|
|
2293
|
+
if (this === other)
|
|
2294
|
+
return true;
|
|
2295
|
+
if (!(other instanceof DistanceAndBearing))
|
|
2296
|
+
return false;
|
|
2297
|
+
var tmp0_other_with_cast = other instanceof DistanceAndBearing ? other : THROW_CCE();
|
|
2298
|
+
if (!equals(this.distance, tmp0_other_with_cast.distance))
|
|
2299
|
+
return false;
|
|
2300
|
+
if (!equals(this.initialBearing, tmp0_other_with_cast.initialBearing))
|
|
2301
|
+
return false;
|
|
2302
|
+
if (!equals(this.finalBearing, tmp0_other_with_cast.finalBearing))
|
|
2303
|
+
return false;
|
|
2304
|
+
return true;
|
|
2305
|
+
};
|
|
2306
|
+
function encodeGBK(_this__u8e3s4) {
|
|
2307
|
+
return encodeGBKDo(_this__u8e3s4);
|
|
2308
|
+
}
|
|
2309
|
+
function decodeGBK(_this__u8e3s4) {
|
|
2310
|
+
return decodeGBKDo(_this__u8e3s4);
|
|
2311
|
+
}
|
|
2312
|
+
function encodeUTF8(_this__u8e3s4) {
|
|
2313
|
+
return encodeToByteArray(_this__u8e3s4);
|
|
2314
|
+
}
|
|
2315
|
+
function decodeUTF8(_this__u8e3s4) {
|
|
2316
|
+
return decodeToString(_this__u8e3s4);
|
|
2317
|
+
}
|
|
2318
|
+
function encodeUnicode(_this__u8e3s4) {
|
|
2319
|
+
var hex = encodeUnicodeString(_this__u8e3s4, false);
|
|
2320
|
+
return hexStringToByteArray(hex);
|
|
2321
|
+
}
|
|
2322
|
+
function encodeUnicodeString(_this__u8e3s4, isNeedU) {
|
|
2323
|
+
var builder = StringBuilder_init_$Create$();
|
|
2324
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2325
|
+
var tmp0_iterator = iterator(_this__u8e3s4);
|
|
2326
|
+
while (tmp0_iterator.d()) {
|
|
2327
|
+
var c = tmp0_iterator.e().c3_1;
|
|
2328
|
+
var tmp$ret$1;
|
|
2329
|
+
// Inline function 'kotlin.code' call
|
|
2330
|
+
tmp$ret$1 = Char__toInt_impl_vasixd(c);
|
|
2331
|
+
var item = toString_2(tmp$ret$1, 16);
|
|
2332
|
+
if (isNeedU) {
|
|
2333
|
+
builder.g4('\\u');
|
|
2334
|
+
}
|
|
2335
|
+
builder.g4(padStart(item, 4, _Char___init__impl__6a9atx(48)));
|
|
2336
|
+
}
|
|
2337
|
+
return builder.toString();
|
|
2338
|
+
}
|
|
2339
|
+
function decodeUnicode(_this__u8e3s4) {
|
|
2340
|
+
return decodeUnicodeString(byteArrayToHexString(_this__u8e3s4));
|
|
2341
|
+
}
|
|
2342
|
+
function decodeUnicodeString(_this__u8e3s4) {
|
|
2343
|
+
var value = replace(replace(_this__u8e3s4, '\\u', ''), ' ', '');
|
|
669
2344
|
// Inline function 'kotlin.text.toRegex' call
|
|
670
2345
|
var regex = Regex_init_$Create$('[A-Fa-f0-9]+');
|
|
671
|
-
var isMatch = regex.
|
|
2346
|
+
var isMatch = regex.a9(value);
|
|
2347
|
+
if (!isMatch)
|
|
2348
|
+
return '';
|
|
2349
|
+
var builder = StringBuilder_init_$Create$();
|
|
2350
|
+
var str = value;
|
|
2351
|
+
if (!((value.length % 4 | 0) === 0)) {
|
|
2352
|
+
str = padEnd(value, imul((value.length / 4 | 0) + 1 | 0, 4), _Char___init__impl__6a9atx(48));
|
|
2353
|
+
}
|
|
2354
|
+
var nestedLast = charSequenceLength(str) - 1 | 0;
|
|
2355
|
+
var inductionVariable = 0;
|
|
2356
|
+
var last = getProgressionLastElement(0, nestedLast, 4);
|
|
2357
|
+
if (inductionVariable <= last)
|
|
2358
|
+
do {
|
|
2359
|
+
var i = inductionVariable;
|
|
2360
|
+
inductionVariable = inductionVariable + 4 | 0;
|
|
2361
|
+
var end = i + 4 | 0;
|
|
2362
|
+
if (str.length >= end) {
|
|
2363
|
+
// Inline function 'kotlin.text.substring' call
|
|
2364
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
2365
|
+
var item = str.substring(i, end);
|
|
2366
|
+
var tmp1_elvis_lhs = toIntOrNull(item, 16);
|
|
2367
|
+
var data = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
|
|
2368
|
+
if (!(data === 0)) {
|
|
2369
|
+
builder.d3(numberToChar(data));
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
while (!(i === last));
|
|
2374
|
+
return builder.toString();
|
|
2375
|
+
}
|
|
2376
|
+
function encodeASCII(_this__u8e3s4) {
|
|
2377
|
+
return hexStringToByteArray(encodeASCIIString(_this__u8e3s4));
|
|
2378
|
+
}
|
|
2379
|
+
function encodeASCIIString(_this__u8e3s4) {
|
|
2380
|
+
// Inline function 'kotlin.text.toRegex' call
|
|
2381
|
+
var regex = Regex_init_$Create$('[\\u0020-\\u007e]+');
|
|
2382
|
+
var isMatch = regex.a9(_this__u8e3s4);
|
|
672
2383
|
if (!isMatch)
|
|
673
|
-
return
|
|
674
|
-
var
|
|
675
|
-
|
|
2384
|
+
return '';
|
|
2385
|
+
var builder = StringBuilder_init_$Create$();
|
|
2386
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
2387
|
+
var tmp0_iterator = iterator(_this__u8e3s4);
|
|
2388
|
+
while (tmp0_iterator.d()) {
|
|
2389
|
+
var c = tmp0_iterator.e().c3_1;
|
|
2390
|
+
var tmp$ret$2;
|
|
2391
|
+
// Inline function 'kotlin.code' call
|
|
2392
|
+
tmp$ret$2 = Char__toInt_impl_vasixd(c);
|
|
2393
|
+
var item = toString_2(tmp$ret$2, 16);
|
|
2394
|
+
builder.g4(padStart(item, 2, _Char___init__impl__6a9atx(48)));
|
|
2395
|
+
}
|
|
2396
|
+
return builder.toString();
|
|
676
2397
|
}
|
|
677
|
-
function
|
|
2398
|
+
function decodeASCIIString(_this__u8e3s4) {
|
|
678
2399
|
var value = replace(_this__u8e3s4, ' ', '');
|
|
679
2400
|
// Inline function 'kotlin.text.toRegex' call
|
|
680
2401
|
var regex = Regex_init_$Create$('[A-Fa-f0-9]+');
|
|
681
|
-
var isMatch = regex.
|
|
682
|
-
if (!isMatch)
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}
|
|
2402
|
+
var isMatch = regex.a9(value);
|
|
2403
|
+
if (!isMatch)
|
|
2404
|
+
return '';
|
|
2405
|
+
var builder = StringBuilder_init_$Create$();
|
|
686
2406
|
var str = value;
|
|
687
2407
|
if (!((value.length % 2 | 0) === 0)) {
|
|
688
|
-
str =
|
|
2408
|
+
str = padEnd(value, imul((value.length / 2 | 0) + 1 | 0, 2), _Char___init__impl__6a9atx(48));
|
|
689
2409
|
}
|
|
690
|
-
// Inline function 'kotlin.collections.mutableListOf' call
|
|
691
|
-
var list = ArrayList_init_$Create$();
|
|
692
2410
|
var nestedLast = charSequenceLength(str) - 1 | 0;
|
|
693
2411
|
var inductionVariable = 0;
|
|
694
2412
|
var last = getProgressionLastElement(0, nestedLast, 2);
|
|
@@ -696,94 +2414,45 @@
|
|
|
696
2414
|
do {
|
|
697
2415
|
var i = inductionVariable;
|
|
698
2416
|
inductionVariable = inductionVariable + 2 | 0;
|
|
699
|
-
var tmp$ret$4;
|
|
700
2417
|
// Inline function 'kotlin.text.substring' call
|
|
701
2418
|
var tmp0_substring = str;
|
|
702
2419
|
var tmp1_substring = i + 2 | 0;
|
|
703
2420
|
// Inline function 'kotlin.js.asDynamic' call
|
|
704
|
-
|
|
705
|
-
|
|
2421
|
+
var temp = tmp0_substring.substring(i, tmp1_substring);
|
|
2422
|
+
builder.d3(numberToChar(toInt(temp, 16)));
|
|
706
2423
|
}
|
|
707
2424
|
while (!(i === last));
|
|
708
|
-
return
|
|
2425
|
+
return builder.toString();
|
|
709
2426
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
712
|
-
isInStart = isInStart === VOID ? true : isInStart;
|
|
713
|
-
isForced = isForced === VOID ? true : isForced;
|
|
714
|
-
var result = StringBuilder_init_$Create$();
|
|
715
|
-
if (!isInStart) {
|
|
716
|
-
result.o6(_this__u8e3s4);
|
|
717
|
-
}
|
|
718
|
-
if (_this__u8e3s4.length < length) {
|
|
719
|
-
var inductionVariable = 0;
|
|
720
|
-
var last = length - _this__u8e3s4.length | 0;
|
|
721
|
-
if (inductionVariable < last)
|
|
722
|
-
do {
|
|
723
|
-
var i = inductionVariable;
|
|
724
|
-
inductionVariable = inductionVariable + 1 | 0;
|
|
725
|
-
result.q2(filler);
|
|
726
|
-
}
|
|
727
|
-
while (inductionVariable < last);
|
|
728
|
-
}
|
|
729
|
-
if (isInStart) {
|
|
730
|
-
result.o6(_this__u8e3s4);
|
|
731
|
-
}
|
|
732
|
-
var tmp;
|
|
733
|
-
if (isForced) {
|
|
734
|
-
var tmp_0;
|
|
735
|
-
if (isInStart) {
|
|
736
|
-
// Inline function 'kotlin.text.substring' call
|
|
737
|
-
var tmp0_substring = result.toString();
|
|
738
|
-
var tmp1_substring = result.c3() - length | 0;
|
|
739
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
740
|
-
tmp_0 = tmp0_substring.substring(tmp1_substring);
|
|
741
|
-
} else {
|
|
742
|
-
// Inline function 'kotlin.text.substring' call
|
|
743
|
-
// Inline function 'kotlin.js.asDynamic' call
|
|
744
|
-
tmp_0 = result.toString().substring(0, length);
|
|
745
|
-
}
|
|
746
|
-
tmp = tmp_0;
|
|
747
|
-
} else {
|
|
748
|
-
tmp = result.toString();
|
|
749
|
-
}
|
|
750
|
-
return tmp;
|
|
2427
|
+
function decodeASCII(_this__u8e3s4) {
|
|
2428
|
+
return decodeASCIIString(byteArrayToHexString(_this__u8e3s4));
|
|
751
2429
|
}
|
|
752
|
-
function
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
var i = tmp0_iterator.h().p2_1;
|
|
759
|
-
// Inline function 'kotlin.code' call
|
|
760
|
-
var ascii = Char__toInt_impl_vasixd(i);
|
|
761
|
-
if (0 <= ascii ? ascii <= 255 : false) {
|
|
762
|
-
length = length + 1 | 0;
|
|
763
|
-
} else
|
|
764
|
-
length = length + 2 | 0;
|
|
765
|
-
}
|
|
766
|
-
return length;
|
|
2430
|
+
function toPinYin(_this__u8e3s4, separator) {
|
|
2431
|
+
separator = separator === VOID ? '' : separator;
|
|
2432
|
+
return toPinYinDo(_this__u8e3s4, separator);
|
|
2433
|
+
}
|
|
2434
|
+
function numberToString(_this__u8e3s4, maxDecimalCount) {
|
|
2435
|
+
return keep(toString(_this__u8e3s4), maxDecimalCount);
|
|
767
2436
|
}
|
|
768
|
-
function
|
|
2437
|
+
function numberToByteArray(_this__u8e3s4, size) {
|
|
2438
|
+
size = size === VOID ? 0 : size;
|
|
769
2439
|
var tmp;
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
tmp = '';
|
|
2440
|
+
if (typeof _this__u8e3s4 === 'number') {
|
|
2441
|
+
tmp = toByteArray(_this__u8e3s4, size);
|
|
773
2442
|
} else {
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
2443
|
+
if (_this__u8e3s4 instanceof Long) {
|
|
2444
|
+
tmp = toByteArray_0(_this__u8e3s4, size);
|
|
2445
|
+
} else {
|
|
2446
|
+
throw IllegalArgumentException_init_$Create$('Number must be Int or Long');
|
|
2447
|
+
}
|
|
779
2448
|
}
|
|
780
2449
|
return tmp;
|
|
781
2450
|
}
|
|
782
2451
|
function encodeGBKDo(_this__u8e3s4) {
|
|
783
|
-
return GBKHelper_getInstance().
|
|
2452
|
+
return GBKHelper_getInstance().ad(_this__u8e3s4);
|
|
784
2453
|
}
|
|
785
2454
|
function decodeGBKDo(_this__u8e3s4) {
|
|
786
|
-
return GBKHelper_getInstance().
|
|
2455
|
+
return GBKHelper_getInstance().bd(_this__u8e3s4);
|
|
787
2456
|
}
|
|
788
2457
|
function getCharGBKByteArray($this, char) {
|
|
789
2458
|
// Inline function 'kotlin.code' call
|
|
@@ -795,7 +2464,7 @@
|
|
|
795
2464
|
} else {
|
|
796
2465
|
// Inline function 'org.khronos.webgl.get' call
|
|
797
2466
|
// Inline function 'kotlin.js.asDynamic' call
|
|
798
|
-
var gbk = $this.
|
|
2467
|
+
var gbk = $this.zc_1[code];
|
|
799
2468
|
// Inline function 'kotlin.byteArrayOf' call
|
|
800
2469
|
tmp = new Int8Array([toByte(gbk & 255), toByte(gbk >> 8)]);
|
|
801
2470
|
}
|
|
@@ -803,7 +2472,7 @@
|
|
|
803
2472
|
}
|
|
804
2473
|
function GBKHelper() {
|
|
805
2474
|
GBKHelper_instance = this;
|
|
806
|
-
this.
|
|
2475
|
+
this.zc_1 = new Uint16Array(65536);
|
|
807
2476
|
// Inline function 'kotlin.arrayOf' call
|
|
808
2477
|
// Inline function 'kotlin.arrayOf' call
|
|
809
2478
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
@@ -880,7 +2549,7 @@
|
|
|
880
2549
|
var j = inductionVariable_2;
|
|
881
2550
|
inductionVariable_2 = inductionVariable_2 + 1 | 0;
|
|
882
2551
|
// Inline function 'org.khronos.webgl.set' call
|
|
883
|
-
var tmp4_set = this.
|
|
2552
|
+
var tmp4_set = this.zc_1;
|
|
884
2553
|
// Inline function 'kotlin.code' call
|
|
885
2554
|
var tmp3_get_code_qbni8p = charSequenceGet(str, j);
|
|
886
2555
|
// Inline function 'org.khronos.webgl.get' call
|
|
@@ -890,7 +2559,7 @@
|
|
|
890
2559
|
}
|
|
891
2560
|
while (inductionVariable_2 <= last_2);
|
|
892
2561
|
}
|
|
893
|
-
protoOf(GBKHelper).
|
|
2562
|
+
protoOf(GBKHelper).ad = function (str) {
|
|
894
2563
|
// Inline function 'kotlin.byteArrayOf' call
|
|
895
2564
|
var bytes = new Int8Array([]);
|
|
896
2565
|
var indexedObject = toCharArray(str);
|
|
@@ -906,7 +2575,7 @@
|
|
|
906
2575
|
}
|
|
907
2576
|
return bytes;
|
|
908
2577
|
};
|
|
909
|
-
protoOf(GBKHelper).
|
|
2578
|
+
protoOf(GBKHelper).bd = function (byteArray) {
|
|
910
2579
|
var decoder = new TextDecoder('gbk');
|
|
911
2580
|
var tmp = decoder.decode(new Uint8Array(toTypedArray(byteArray)));
|
|
912
2581
|
return (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
|
|
@@ -920,107 +2589,179 @@
|
|
|
920
2589
|
function toPinYinDo(_this__u8e3s4, separator) {
|
|
921
2590
|
// Inline function 'kotlin.text.uppercase' call
|
|
922
2591
|
// Inline function 'kotlin.js.asDynamic' call
|
|
923
|
-
return
|
|
2592
|
+
return joinToString_0(PinyinPro.pinyin(_this__u8e3s4, {type: 'array', toneType: 'none'}), separator).toUpperCase();
|
|
924
2593
|
}
|
|
925
2594
|
//region block: post-declaration
|
|
926
|
-
defineProp(protoOf(ChecksumType), 'name', protoOf(ChecksumType).
|
|
927
|
-
defineProp(protoOf(ChecksumType), 'ordinal', protoOf(ChecksumType).
|
|
2595
|
+
defineProp(protoOf(ChecksumType), 'name', protoOf(ChecksumType).ka, VOID);
|
|
2596
|
+
defineProp(protoOf(ChecksumType), 'ordinal', protoOf(ChecksumType).la, VOID);
|
|
2597
|
+
defineProp(protoOf(CoordinateSystemType), 'name', protoOf(CoordinateSystemType).ka, VOID);
|
|
2598
|
+
defineProp(protoOf(CoordinateSystemType), 'ordinal', protoOf(CoordinateSystemType).la, VOID);
|
|
928
2599
|
//endregion
|
|
929
2600
|
//region block: exports
|
|
930
2601
|
function $jsExportAll$(_) {
|
|
931
2602
|
var $com = _.com || (_.com = {});
|
|
932
2603
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
933
2604
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
934
|
-
$com$d10ng$common.
|
|
935
|
-
$com$d10ng$common.
|
|
936
|
-
$com$d10ng$common.
|
|
937
|
-
$com$d10ng$common.
|
|
938
|
-
$com$d10ng$common.
|
|
939
|
-
$com$d10ng$common.
|
|
2605
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2606
|
+
$com$d10ng$common$base.byteArrayToBinString = byteArrayToBinString;
|
|
2607
|
+
$com$d10ng$common$base.byteArrayToHexString = byteArrayToHexString;
|
|
2608
|
+
$com$d10ng$common$base.byteArrayToUnsignedInt = byteArrayToUnsignedInt;
|
|
2609
|
+
$com$d10ng$common$base.byteArrayToUnsignedLong = byteArrayToUnsignedLong;
|
|
2610
|
+
$com$d10ng$common$base.indexOfByteArray = indexOfByteArray;
|
|
2611
|
+
$com$d10ng$common$base.byteArrayPadStart = byteArrayPadStart;
|
|
2612
|
+
$com$d10ng$common$base.byteArrayPadEnd = byteArrayPadEnd;
|
|
2613
|
+
$com$d10ng$common$base.byteArrayGetBitRange = byteArrayGetBitRange;
|
|
2614
|
+
var $com = _.com || (_.com = {});
|
|
2615
|
+
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
2616
|
+
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
2617
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2618
|
+
$com$d10ng$common$base.byteToBinString = byteToBinString;
|
|
2619
|
+
$com$d10ng$common$base.byteToHexString = byteToHexString;
|
|
2620
|
+
$com$d10ng$common$base.byteToUnsignedInt = byteToUnsignedInt;
|
|
2621
|
+
$com$d10ng$common$base.byteGetBit = byteGetBit;
|
|
2622
|
+
var $com = _.com || (_.com = {});
|
|
2623
|
+
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
2624
|
+
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
2625
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2626
|
+
$com$d10ng$common$base.binStringToByte = binStringToByte;
|
|
2627
|
+
$com$d10ng$common$base.binStringToByteArray = binStringToByteArray;
|
|
2628
|
+
$com$d10ng$common$base.hexStringToByte = hexStringToByte;
|
|
2629
|
+
$com$d10ng$common$base.hexStringToByteArray = hexStringToByteArray;
|
|
2630
|
+
$com$d10ng$common$base.getStringByteLength = getStringByteLength;
|
|
2631
|
+
$com$d10ng$common$base.getStringFirstUpperCase = getStringFirstUpperCase;
|
|
2632
|
+
var $com = _.com || (_.com = {});
|
|
2633
|
+
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
2634
|
+
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
2635
|
+
var $com$d10ng$common$calculate = $com$d10ng$common.calculate || ($com$d10ng$common.calculate = {});
|
|
2636
|
+
$com$d10ng$common$calculate.ChecksumType = ChecksumType;
|
|
2637
|
+
$com$d10ng$common$calculate.ChecksumType.values = values;
|
|
2638
|
+
$com$d10ng$common$calculate.ChecksumType.valueOf = valueOf;
|
|
2639
|
+
defineProp($com$d10ng$common$calculate.ChecksumType, 'AND', ChecksumType_AND_getInstance, VOID);
|
|
2640
|
+
defineProp($com$d10ng$common$calculate.ChecksumType, 'OR', ChecksumType_OR_getInstance, VOID);
|
|
2641
|
+
defineProp($com$d10ng$common$calculate.ChecksumType, 'XOR', ChecksumType_XOR_getInstance, VOID);
|
|
2642
|
+
$com$d10ng$common$calculate.assertChecksum = assertChecksum;
|
|
2643
|
+
$com$d10ng$common$calculate.getChecksum = getChecksum;
|
|
2644
|
+
$com$d10ng$common$calculate.addChecksum = addChecksum;
|
|
940
2645
|
var $com = _.com || (_.com = {});
|
|
941
2646
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
942
2647
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
943
|
-
$com$d10ng$common.
|
|
944
|
-
$com$d10ng$common.
|
|
945
|
-
$com$d10ng$common.
|
|
2648
|
+
var $com$d10ng$common$calculate = $com$d10ng$common.calculate || ($com$d10ng$common.calculate = {});
|
|
2649
|
+
$com$d10ng$common$calculate.isDarkColor = isDarkColor;
|
|
2650
|
+
$com$d10ng$common$calculate.getNextLevelColor = getNextLevelColor;
|
|
2651
|
+
$com$d10ng$common$calculate.getMiddleColor = getMiddleColor;
|
|
2652
|
+
$com$d10ng$common$calculate.getRgbValueArrayFromHexColorString = getRgbValueArrayFromHexColorString;
|
|
2653
|
+
$com$d10ng$common$calculate.getHexColorStringFromRgbValueArray = getHexColorStringFromRgbValueArray;
|
|
946
2654
|
var $com = _.com || (_.com = {});
|
|
947
2655
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
948
2656
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
949
|
-
$com$d10ng$common.
|
|
2657
|
+
var $com$d10ng$common$calculate = $com$d10ng$common.calculate || ($com$d10ng$common.calculate = {});
|
|
2658
|
+
$com$d10ng$common$calculate.keepByRegexStr = keepByRegexStr;
|
|
2659
|
+
$com$d10ng$common$calculate.filterByRegexStr = filterByRegexStr;
|
|
2660
|
+
$com$d10ng$common$calculate.isIdCard = isIdCard;
|
|
2661
|
+
$com$d10ng$common$calculate.isMobileNumber = isMobileNumber;
|
|
2662
|
+
$com$d10ng$common$calculate.isEmail = isEmail;
|
|
2663
|
+
$com$d10ng$common$calculate.isOnlyChEnNum = isOnlyChEnNum;
|
|
2664
|
+
$com$d10ng$common$calculate.isOnlyEnNum = isOnlyEnNum;
|
|
2665
|
+
$com$d10ng$common$calculate.isOnlyChinese = isOnlyChinese;
|
|
2666
|
+
$com$d10ng$common$calculate.isOnlyLetter = isOnlyLetter;
|
|
2667
|
+
$com$d10ng$common$calculate.isOnlyNumber = isOnlyNumber;
|
|
2668
|
+
$com$d10ng$common$calculate.isOnlyCode = isOnlyCode;
|
|
2669
|
+
$com$d10ng$common$calculate.isOnlyChSymbol = isOnlyChSymbol;
|
|
2670
|
+
$com$d10ng$common$calculate.isColor = isColor;
|
|
950
2671
|
var $com = _.com || (_.com = {});
|
|
951
2672
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
952
2673
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
953
|
-
$com$d10ng$common.
|
|
954
|
-
$com$d10ng$common.
|
|
955
|
-
$com$d10ng$common.encodeUTF8 = encodeUTF8;
|
|
956
|
-
$com$d10ng$common.decodeUTF8 = decodeUTF8;
|
|
957
|
-
$com$d10ng$common.encodeUnicode = encodeUnicode;
|
|
958
|
-
$com$d10ng$common.encodeUnicodeString = encodeUnicodeString;
|
|
959
|
-
$com$d10ng$common.decodeUnicodeByByteArray = decodeUnicodeByByteArray;
|
|
960
|
-
$com$d10ng$common.decodeUnicode = decodeUnicode;
|
|
961
|
-
$com$d10ng$common.encodeASCII = encodeASCII;
|
|
962
|
-
$com$d10ng$common.encodeASCIIString = encodeASCIIString;
|
|
963
|
-
$com$d10ng$common.decodeASCII = decodeASCII;
|
|
964
|
-
$com$d10ng$common.decodeASCIIByByteArray = decodeASCIIByByteArray;
|
|
2674
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2675
|
+
$com$d10ng$common$coordinate.Coordinate = Coordinate;
|
|
965
2676
|
var $com = _.com || (_.com = {});
|
|
966
2677
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
967
2678
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
968
|
-
$com$d10ng$common.
|
|
969
|
-
$com$d10ng$common.
|
|
970
|
-
$com$d10ng$common.
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
$com$d10ng$common.
|
|
975
|
-
$com$d10ng$common.
|
|
976
|
-
$com$d10ng$common.
|
|
2679
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2680
|
+
$com$d10ng$common$coordinate.getDistanceAndBearing = getDistanceAndBearing;
|
|
2681
|
+
$com$d10ng$common$coordinate.getDistanceOn2Points = getDistanceOn2Points;
|
|
2682
|
+
$com$d10ng$common$coordinate.toRadians = toRadians;
|
|
2683
|
+
$com$d10ng$common$coordinate.toDegrees = toDegrees;
|
|
2684
|
+
$com$d10ng$common$coordinate.isPointInCircle = isPointInCircle;
|
|
2685
|
+
$com$d10ng$common$coordinate.getAngleOn2Points = getAngleOn2Points;
|
|
2686
|
+
$com$d10ng$common$coordinate.getPointOn2Points = getPointOn2Points;
|
|
2687
|
+
$com$d10ng$common$coordinate.getTotalDistance = getTotalDistance;
|
|
2688
|
+
$com$d10ng$common$coordinate.getPointsOnDistance = getPointsOnDistance;
|
|
2689
|
+
$com$d10ng$common$coordinate.compressTrack = compressTrack;
|
|
2690
|
+
$com$d10ng$common$coordinate.getPointByBasePoint = getPointByBasePoint;
|
|
2691
|
+
$com$d10ng$common$coordinate.getRandomPoint = getRandomPoint;
|
|
2692
|
+
$com$d10ng$common$coordinate.getNearPartsOnLine = getNearPartsOnLine;
|
|
2693
|
+
$com$d10ng$common$coordinate.getProjectionPointOnLinePart = getProjectionPointOnLinePart;
|
|
2694
|
+
$com$d10ng$common$coordinate.getProjectionPointOnLine = getProjectionPointOnLine;
|
|
2695
|
+
$com$d10ng$common$coordinate.getProjectionLineOnLineWithPoint = getProjectionLineOnLineWithPoint;
|
|
2696
|
+
$com$d10ng$common$coordinate.getProjectionLineOnLineWithLine = getProjectionLineOnLineWithLine;
|
|
977
2697
|
var $com = _.com || (_.com = {});
|
|
978
2698
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
979
2699
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
980
|
-
$com$d10ng$common.
|
|
2700
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2701
|
+
$com$d10ng$common$coordinate.CoordinateSystemType = CoordinateSystemType;
|
|
2702
|
+
$com$d10ng$common$coordinate.CoordinateSystemType.values = values_0;
|
|
2703
|
+
$com$d10ng$common$coordinate.CoordinateSystemType.valueOf = valueOf_0;
|
|
2704
|
+
defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'WGS84', CoordinateSystemType_WGS84_getInstance, VOID);
|
|
2705
|
+
defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'GCJ02', CoordinateSystemType_GCJ02_getInstance, VOID);
|
|
2706
|
+
defineProp($com$d10ng$common$coordinate.CoordinateSystemType, 'BD09', CoordinateSystemType_BD09_getInstance, VOID);
|
|
981
2707
|
var $com = _.com || (_.com = {});
|
|
982
2708
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
983
2709
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
984
|
-
$com$d10ng$common.
|
|
2710
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2711
|
+
$com$d10ng$common$coordinate.convert = convert;
|
|
2712
|
+
$com$d10ng$common$coordinate.isEastLongitude = isEastLongitude;
|
|
2713
|
+
$com$d10ng$common$coordinate.isNorthLatitude = isNorthLatitude;
|
|
2714
|
+
$com$d10ng$common$coordinate.toLongitudeNoPre = toLongitudeNoPre;
|
|
2715
|
+
$com$d10ng$common$coordinate.toLatitudeNoPre = toLatitudeNoPre;
|
|
2716
|
+
$com$d10ng$common$coordinate.toFullLongitude = toFullLongitude;
|
|
2717
|
+
$com$d10ng$common$coordinate.toFullLatitude = toFullLatitude;
|
|
2718
|
+
$com$d10ng$common$coordinate.toDMS = toDMS;
|
|
2719
|
+
$com$d10ng$common$coordinate.toLatLng = toLatLng;
|
|
2720
|
+
$com$d10ng$common$coordinate.toLatLngString = toLatLngString;
|
|
2721
|
+
$com$d10ng$common$coordinate.toLongitudeString = toLongitudeString;
|
|
2722
|
+
$com$d10ng$common$coordinate.toLatitudeString = toLatitudeString;
|
|
2723
|
+
$com$d10ng$common$coordinate.toLatLngByString = toLatLngByString;
|
|
2724
|
+
$com$d10ng$common$coordinate.toLongitude = toLongitude;
|
|
2725
|
+
$com$d10ng$common$coordinate.toLatitude = toLatitude;
|
|
2726
|
+
$com$d10ng$common$coordinate.ddmmpmmmm2LatLng = ddmmpmmmm2LatLng;
|
|
2727
|
+
$com$d10ng$common$coordinate.latLng2ddmmpmmmm = latLng2ddmmpmmmm;
|
|
985
2728
|
var $com = _.com || (_.com = {});
|
|
986
2729
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
987
2730
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
988
|
-
$com$d10ng$common.
|
|
989
|
-
$com$d10ng$common.
|
|
990
|
-
$com$d10ng$common.toByteArray = toByteArray_0;
|
|
2731
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2732
|
+
$com$d10ng$common$coordinate.DMS = DMS;
|
|
991
2733
|
var $com = _.com || (_.com = {});
|
|
992
2734
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
993
2735
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
994
|
-
$com$d10ng$common.
|
|
2736
|
+
var $com$d10ng$common$coordinate = $com$d10ng$common.coordinate || ($com$d10ng$common.coordinate = {});
|
|
2737
|
+
$com$d10ng$common$coordinate.DistanceAndBearing = DistanceAndBearing;
|
|
995
2738
|
var $com = _.com || (_.com = {});
|
|
996
2739
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
997
2740
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
998
|
-
$com$d10ng$common.
|
|
2741
|
+
var $com$d10ng$common$transform = $com$d10ng$common.transform || ($com$d10ng$common.transform = {});
|
|
2742
|
+
$com$d10ng$common$transform.encodeGBK = encodeGBK;
|
|
2743
|
+
$com$d10ng$common$transform.decodeGBK = decodeGBK;
|
|
2744
|
+
$com$d10ng$common$transform.encodeUTF8 = encodeUTF8;
|
|
2745
|
+
$com$d10ng$common$transform.decodeUTF8 = decodeUTF8;
|
|
2746
|
+
$com$d10ng$common$transform.encodeUnicode = encodeUnicode;
|
|
2747
|
+
$com$d10ng$common$transform.encodeUnicodeString = encodeUnicodeString;
|
|
2748
|
+
$com$d10ng$common$transform.decodeUnicode = decodeUnicode;
|
|
2749
|
+
$com$d10ng$common$transform.decodeUnicodeString = decodeUnicodeString;
|
|
2750
|
+
$com$d10ng$common$transform.encodeASCII = encodeASCII;
|
|
2751
|
+
$com$d10ng$common$transform.encodeASCIIString = encodeASCIIString;
|
|
2752
|
+
$com$d10ng$common$transform.decodeASCIIString = decodeASCIIString;
|
|
2753
|
+
$com$d10ng$common$transform.decodeASCII = decodeASCII;
|
|
999
2754
|
var $com = _.com || (_.com = {});
|
|
1000
2755
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
1001
2756
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
1002
|
-
$com$d10ng$common.
|
|
1003
|
-
$com$d10ng$common.
|
|
1004
|
-
$com$d10ng$common.isIdCard = isIdCard;
|
|
1005
|
-
$com$d10ng$common.isMobileNumber = isMobileNumber;
|
|
1006
|
-
$com$d10ng$common.isEmail = isEmail;
|
|
1007
|
-
$com$d10ng$common.isOnlyChEnNum = isOnlyChEnNum;
|
|
1008
|
-
$com$d10ng$common.isOnlyEnNum = isOnlyEnNum;
|
|
1009
|
-
$com$d10ng$common.isOnlyChinese = isOnlyChinese;
|
|
1010
|
-
$com$d10ng$common.isOnlyLetter = isOnlyLetter;
|
|
1011
|
-
$com$d10ng$common.isOnlyNumber = isOnlyNumber;
|
|
1012
|
-
$com$d10ng$common.isOnlyCode = isOnlyCode;
|
|
1013
|
-
$com$d10ng$common.isOnlyChSymbol = isOnlyChSymbol;
|
|
2757
|
+
var $com$d10ng$common$transform = $com$d10ng$common.transform || ($com$d10ng$common.transform = {});
|
|
2758
|
+
$com$d10ng$common$transform.toPinYin = toPinYin;
|
|
1014
2759
|
var $com = _.com || (_.com = {});
|
|
1015
2760
|
var $com$d10ng = $com.d10ng || ($com.d10ng = {});
|
|
1016
2761
|
var $com$d10ng$common = $com$d10ng.common || ($com$d10ng.common = {});
|
|
1017
|
-
$com$d10ng$common.
|
|
1018
|
-
$com$d10ng$common.
|
|
1019
|
-
$com$d10ng$common.
|
|
1020
|
-
$com$d10ng$common.toByteArrayFromHex = toByteArrayFromHex;
|
|
1021
|
-
$com$d10ng$common.fillLength = fillLength;
|
|
1022
|
-
$com$d10ng$common.getByteLength = getByteLength;
|
|
1023
|
-
$com$d10ng$common.getFirstUpperCase = getFirstUpperCase;
|
|
2762
|
+
var $com$d10ng$common$base = $com$d10ng$common.base || ($com$d10ng$common.base = {});
|
|
2763
|
+
$com$d10ng$common$base.numberToString = numberToString;
|
|
2764
|
+
$com$d10ng$common$base.numberToByteArray = numberToByteArray;
|
|
1024
2765
|
}
|
|
1025
2766
|
$jsExportAll$(_);
|
|
1026
2767
|
//endregion
|