mezon-js-protobuf 1.7.21 → 1.7.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mezon-js-protobuf/google/protobuf/struct.d.ts +1 -1
- package/dist/mezon-js-protobuf/google/protobuf/timestamp.d.ts +1 -1
- package/dist/mezon-js-protobuf/rtapi/realtime.d.ts +275 -205
- package/dist/mezon-js-protobuf.cjs.js +2188 -2101
- package/dist/mezon-js-protobuf.esm.mjs +2188 -2101
- package/google/protobuf/struct.ts +1 -1
- package/google/protobuf/timestamp.ts +1 -1
- package/package.json +1 -1
- package/rtapi/realtime.ts +146 -39
|
@@ -24,2239 +24,2238 @@ var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__
|
|
|
24
24
|
mod2
|
|
25
25
|
));
|
|
26
26
|
|
|
27
|
-
// ../../node_modules/
|
|
28
|
-
var
|
|
29
|
-
"../../node_modules/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
6,
|
|
77
|
-
3,
|
|
78
|
-
109,
|
|
79
|
-
117,
|
|
80
|
-
108,
|
|
81
|
-
0,
|
|
82
|
-
1,
|
|
83
|
-
5,
|
|
84
|
-
100,
|
|
85
|
-
105,
|
|
86
|
-
118,
|
|
87
|
-
95,
|
|
88
|
-
115,
|
|
89
|
-
0,
|
|
90
|
-
2,
|
|
91
|
-
5,
|
|
92
|
-
100,
|
|
93
|
-
105,
|
|
94
|
-
118,
|
|
95
|
-
95,
|
|
96
|
-
117,
|
|
97
|
-
0,
|
|
98
|
-
3,
|
|
99
|
-
5,
|
|
100
|
-
114,
|
|
101
|
-
101,
|
|
102
|
-
109,
|
|
103
|
-
95,
|
|
104
|
-
115,
|
|
105
|
-
0,
|
|
106
|
-
4,
|
|
107
|
-
5,
|
|
108
|
-
114,
|
|
109
|
-
101,
|
|
110
|
-
109,
|
|
111
|
-
95,
|
|
112
|
-
117,
|
|
113
|
-
0,
|
|
114
|
-
5,
|
|
115
|
-
8,
|
|
116
|
-
103,
|
|
117
|
-
101,
|
|
118
|
-
116,
|
|
119
|
-
95,
|
|
120
|
-
104,
|
|
121
|
-
105,
|
|
122
|
-
103,
|
|
123
|
-
104,
|
|
124
|
-
0,
|
|
125
|
-
0,
|
|
126
|
-
10,
|
|
127
|
-
191,
|
|
128
|
-
1,
|
|
129
|
-
6,
|
|
130
|
-
4,
|
|
131
|
-
0,
|
|
132
|
-
35,
|
|
133
|
-
0,
|
|
134
|
-
11,
|
|
135
|
-
36,
|
|
136
|
-
1,
|
|
137
|
-
1,
|
|
138
|
-
126,
|
|
139
|
-
32,
|
|
140
|
-
0,
|
|
141
|
-
173,
|
|
142
|
-
32,
|
|
143
|
-
1,
|
|
144
|
-
173,
|
|
145
|
-
66,
|
|
146
|
-
32,
|
|
147
|
-
134,
|
|
148
|
-
132,
|
|
149
|
-
32,
|
|
150
|
-
2,
|
|
151
|
-
173,
|
|
152
|
-
32,
|
|
153
|
-
3,
|
|
154
|
-
173,
|
|
155
|
-
66,
|
|
156
|
-
32,
|
|
157
|
-
134,
|
|
158
|
-
132,
|
|
159
|
-
126,
|
|
160
|
-
34,
|
|
161
|
-
4,
|
|
162
|
-
66,
|
|
163
|
-
32,
|
|
164
|
-
135,
|
|
165
|
-
167,
|
|
166
|
-
36,
|
|
167
|
-
0,
|
|
168
|
-
32,
|
|
169
|
-
4,
|
|
170
|
-
167,
|
|
171
|
-
11,
|
|
172
|
-
36,
|
|
173
|
-
1,
|
|
174
|
-
1,
|
|
175
|
-
126,
|
|
176
|
-
32,
|
|
177
|
-
0,
|
|
178
|
-
173,
|
|
179
|
-
32,
|
|
180
|
-
1,
|
|
181
|
-
173,
|
|
182
|
-
66,
|
|
183
|
-
32,
|
|
184
|
-
134,
|
|
185
|
-
132,
|
|
186
|
-
32,
|
|
187
|
-
2,
|
|
188
|
-
173,
|
|
189
|
-
32,
|
|
190
|
-
3,
|
|
191
|
-
173,
|
|
192
|
-
66,
|
|
193
|
-
32,
|
|
194
|
-
134,
|
|
195
|
-
132,
|
|
196
|
-
127,
|
|
197
|
-
34,
|
|
198
|
-
4,
|
|
199
|
-
66,
|
|
200
|
-
32,
|
|
201
|
-
135,
|
|
202
|
-
167,
|
|
203
|
-
36,
|
|
204
|
-
0,
|
|
205
|
-
32,
|
|
206
|
-
4,
|
|
207
|
-
167,
|
|
208
|
-
11,
|
|
209
|
-
36,
|
|
210
|
-
1,
|
|
211
|
-
1,
|
|
212
|
-
126,
|
|
213
|
-
32,
|
|
214
|
-
0,
|
|
215
|
-
173,
|
|
216
|
-
32,
|
|
217
|
-
1,
|
|
218
|
-
173,
|
|
219
|
-
66,
|
|
220
|
-
32,
|
|
221
|
-
134,
|
|
222
|
-
132,
|
|
223
|
-
32,
|
|
224
|
-
2,
|
|
225
|
-
173,
|
|
226
|
-
32,
|
|
227
|
-
3,
|
|
228
|
-
173,
|
|
229
|
-
66,
|
|
230
|
-
32,
|
|
231
|
-
134,
|
|
232
|
-
132,
|
|
233
|
-
128,
|
|
234
|
-
34,
|
|
235
|
-
4,
|
|
236
|
-
66,
|
|
237
|
-
32,
|
|
238
|
-
135,
|
|
239
|
-
167,
|
|
240
|
-
36,
|
|
241
|
-
0,
|
|
242
|
-
32,
|
|
243
|
-
4,
|
|
244
|
-
167,
|
|
245
|
-
11,
|
|
246
|
-
36,
|
|
247
|
-
1,
|
|
248
|
-
1,
|
|
249
|
-
126,
|
|
250
|
-
32,
|
|
251
|
-
0,
|
|
252
|
-
173,
|
|
253
|
-
32,
|
|
254
|
-
1,
|
|
255
|
-
173,
|
|
256
|
-
66,
|
|
257
|
-
32,
|
|
258
|
-
134,
|
|
259
|
-
132,
|
|
260
|
-
32,
|
|
261
|
-
2,
|
|
262
|
-
173,
|
|
263
|
-
32,
|
|
264
|
-
3,
|
|
265
|
-
173,
|
|
266
|
-
66,
|
|
267
|
-
32,
|
|
268
|
-
134,
|
|
269
|
-
132,
|
|
270
|
-
129,
|
|
271
|
-
34,
|
|
272
|
-
4,
|
|
273
|
-
66,
|
|
274
|
-
32,
|
|
275
|
-
135,
|
|
276
|
-
167,
|
|
277
|
-
36,
|
|
278
|
-
0,
|
|
279
|
-
32,
|
|
280
|
-
4,
|
|
281
|
-
167,
|
|
282
|
-
11,
|
|
283
|
-
36,
|
|
284
|
-
1,
|
|
285
|
-
1,
|
|
286
|
-
126,
|
|
287
|
-
32,
|
|
288
|
-
0,
|
|
289
|
-
173,
|
|
290
|
-
32,
|
|
291
|
-
1,
|
|
292
|
-
173,
|
|
293
|
-
66,
|
|
294
|
-
32,
|
|
295
|
-
134,
|
|
296
|
-
132,
|
|
297
|
-
32,
|
|
298
|
-
2,
|
|
299
|
-
173,
|
|
300
|
-
32,
|
|
301
|
-
3,
|
|
302
|
-
173,
|
|
303
|
-
66,
|
|
304
|
-
32,
|
|
305
|
-
134,
|
|
306
|
-
132,
|
|
307
|
-
130,
|
|
308
|
-
34,
|
|
309
|
-
4,
|
|
310
|
-
66,
|
|
311
|
-
32,
|
|
312
|
-
135,
|
|
313
|
-
167,
|
|
314
|
-
36,
|
|
315
|
-
0,
|
|
316
|
-
32,
|
|
317
|
-
4,
|
|
318
|
-
167,
|
|
319
|
-
11
|
|
320
|
-
])), {}).exports;
|
|
321
|
-
} catch (e) {
|
|
322
|
-
}
|
|
323
|
-
function Long5(low, high, unsigned) {
|
|
324
|
-
this.low = low | 0;
|
|
325
|
-
this.high = high | 0;
|
|
326
|
-
this.unsigned = !!unsigned;
|
|
327
|
-
}
|
|
328
|
-
Long5.prototype.__isLong__;
|
|
329
|
-
Object.defineProperty(Long5.prototype, "__isLong__", { value: true });
|
|
330
|
-
function isLong(obj) {
|
|
331
|
-
return (obj && obj["__isLong__"]) === true;
|
|
332
|
-
}
|
|
333
|
-
Long5.isLong = isLong;
|
|
334
|
-
var INT_CACHE = {};
|
|
335
|
-
var UINT_CACHE = {};
|
|
336
|
-
function fromInt(value, unsigned) {
|
|
337
|
-
var obj, cachedObj, cache;
|
|
338
|
-
if (unsigned) {
|
|
339
|
-
value >>>= 0;
|
|
340
|
-
if (cache = 0 <= value && value < 256) {
|
|
341
|
-
cachedObj = UINT_CACHE[value];
|
|
342
|
-
if (cachedObj)
|
|
343
|
-
return cachedObj;
|
|
344
|
-
}
|
|
345
|
-
obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
|
|
346
|
-
if (cache)
|
|
347
|
-
UINT_CACHE[value] = obj;
|
|
348
|
-
return obj;
|
|
349
|
-
} else {
|
|
350
|
-
value |= 0;
|
|
351
|
-
if (cache = -128 <= value && value < 128) {
|
|
352
|
-
cachedObj = INT_CACHE[value];
|
|
353
|
-
if (cachedObj)
|
|
354
|
-
return cachedObj;
|
|
355
|
-
}
|
|
356
|
-
obj = fromBits(value, value < 0 ? -1 : 0, false);
|
|
357
|
-
if (cache)
|
|
358
|
-
INT_CACHE[value] = obj;
|
|
359
|
-
return obj;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
Long5.fromInt = fromInt;
|
|
363
|
-
function fromNumber(value, unsigned) {
|
|
364
|
-
if (isNaN(value))
|
|
365
|
-
return unsigned ? UZERO : ZERO;
|
|
366
|
-
if (unsigned) {
|
|
367
|
-
if (value < 0)
|
|
368
|
-
return UZERO;
|
|
369
|
-
if (value >= TWO_PWR_64_DBL)
|
|
370
|
-
return MAX_UNSIGNED_VALUE;
|
|
371
|
-
} else {
|
|
372
|
-
if (value <= -TWO_PWR_63_DBL)
|
|
373
|
-
return MIN_VALUE;
|
|
374
|
-
if (value + 1 >= TWO_PWR_63_DBL)
|
|
375
|
-
return MAX_VALUE;
|
|
376
|
-
}
|
|
377
|
-
if (value < 0)
|
|
378
|
-
return fromNumber(-value, unsigned).neg();
|
|
379
|
-
return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
|
|
380
|
-
}
|
|
381
|
-
Long5.fromNumber = fromNumber;
|
|
382
|
-
function fromBits(lowBits, highBits, unsigned) {
|
|
383
|
-
return new Long5(lowBits, highBits, unsigned);
|
|
384
|
-
}
|
|
385
|
-
Long5.fromBits = fromBits;
|
|
386
|
-
var pow_dbl = Math.pow;
|
|
387
|
-
function fromString(str, unsigned, radix) {
|
|
388
|
-
if (str.length === 0)
|
|
389
|
-
throw Error("empty string");
|
|
390
|
-
if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
|
|
391
|
-
return ZERO;
|
|
392
|
-
if (typeof unsigned === "number") {
|
|
393
|
-
radix = unsigned, unsigned = false;
|
|
394
|
-
} else {
|
|
395
|
-
unsigned = !!unsigned;
|
|
396
|
-
}
|
|
397
|
-
radix = radix || 10;
|
|
398
|
-
if (radix < 2 || 36 < radix)
|
|
399
|
-
throw RangeError("radix");
|
|
400
|
-
var p;
|
|
401
|
-
if ((p = str.indexOf("-")) > 0)
|
|
402
|
-
throw Error("interior hyphen");
|
|
403
|
-
else if (p === 0) {
|
|
404
|
-
return fromString(str.substring(1), unsigned, radix).neg();
|
|
405
|
-
}
|
|
406
|
-
var radixToPower = fromNumber(pow_dbl(radix, 8));
|
|
407
|
-
var result = ZERO;
|
|
408
|
-
for (var i = 0; i < str.length; i += 8) {
|
|
409
|
-
var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
|
|
410
|
-
if (size < 8) {
|
|
411
|
-
var power = fromNumber(pow_dbl(radix, size));
|
|
412
|
-
result = result.mul(power).add(fromNumber(value));
|
|
413
|
-
} else {
|
|
414
|
-
result = result.mul(radixToPower);
|
|
415
|
-
result = result.add(fromNumber(value));
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
result.unsigned = unsigned;
|
|
419
|
-
return result;
|
|
420
|
-
}
|
|
421
|
-
Long5.fromString = fromString;
|
|
422
|
-
function fromValue(val, unsigned) {
|
|
423
|
-
if (typeof val === "number")
|
|
424
|
-
return fromNumber(val, unsigned);
|
|
425
|
-
if (typeof val === "string")
|
|
426
|
-
return fromString(val, unsigned);
|
|
427
|
-
return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
|
|
428
|
-
}
|
|
429
|
-
Long5.fromValue = fromValue;
|
|
430
|
-
var TWO_PWR_16_DBL = 1 << 16;
|
|
431
|
-
var TWO_PWR_24_DBL = 1 << 24;
|
|
432
|
-
var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
|
|
433
|
-
var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
|
|
434
|
-
var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
|
|
435
|
-
var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
|
|
436
|
-
var ZERO = fromInt(0);
|
|
437
|
-
Long5.ZERO = ZERO;
|
|
438
|
-
var UZERO = fromInt(0, true);
|
|
439
|
-
Long5.UZERO = UZERO;
|
|
440
|
-
var ONE = fromInt(1);
|
|
441
|
-
Long5.ONE = ONE;
|
|
442
|
-
var UONE = fromInt(1, true);
|
|
443
|
-
Long5.UONE = UONE;
|
|
444
|
-
var NEG_ONE = fromInt(-1);
|
|
445
|
-
Long5.NEG_ONE = NEG_ONE;
|
|
446
|
-
var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
|
|
447
|
-
Long5.MAX_VALUE = MAX_VALUE;
|
|
448
|
-
var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
|
|
449
|
-
Long5.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
|
|
450
|
-
var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
|
|
451
|
-
Long5.MIN_VALUE = MIN_VALUE;
|
|
452
|
-
var LongPrototype = Long5.prototype;
|
|
453
|
-
LongPrototype.toInt = function toInt() {
|
|
454
|
-
return this.unsigned ? this.low >>> 0 : this.low;
|
|
455
|
-
};
|
|
456
|
-
LongPrototype.toNumber = function toNumber() {
|
|
457
|
-
if (this.unsigned)
|
|
458
|
-
return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
|
|
459
|
-
return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
|
|
460
|
-
};
|
|
461
|
-
LongPrototype.toString = function toString(radix) {
|
|
462
|
-
radix = radix || 10;
|
|
463
|
-
if (radix < 2 || 36 < radix)
|
|
464
|
-
throw RangeError("radix");
|
|
465
|
-
if (this.isZero())
|
|
466
|
-
return "0";
|
|
467
|
-
if (this.isNegative()) {
|
|
468
|
-
if (this.eq(MIN_VALUE)) {
|
|
469
|
-
var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
|
|
470
|
-
return div.toString(radix) + rem1.toInt().toString(radix);
|
|
471
|
-
} else
|
|
472
|
-
return "-" + this.neg().toString(radix);
|
|
473
|
-
}
|
|
474
|
-
var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
|
|
475
|
-
var result = "";
|
|
476
|
-
while (true) {
|
|
477
|
-
var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
|
|
478
|
-
rem = remDiv;
|
|
479
|
-
if (rem.isZero())
|
|
480
|
-
return digits + result;
|
|
481
|
-
else {
|
|
482
|
-
while (digits.length < 6)
|
|
483
|
-
digits = "0" + digits;
|
|
484
|
-
result = "" + digits + result;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
};
|
|
488
|
-
LongPrototype.getHighBits = function getHighBits() {
|
|
489
|
-
return this.high;
|
|
490
|
-
};
|
|
491
|
-
LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
|
|
492
|
-
return this.high >>> 0;
|
|
493
|
-
};
|
|
494
|
-
LongPrototype.getLowBits = function getLowBits() {
|
|
495
|
-
return this.low;
|
|
496
|
-
};
|
|
497
|
-
LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
|
|
498
|
-
return this.low >>> 0;
|
|
499
|
-
};
|
|
500
|
-
LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
|
|
501
|
-
if (this.isNegative())
|
|
502
|
-
return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
|
|
503
|
-
var val = this.high != 0 ? this.high : this.low;
|
|
504
|
-
for (var bit = 31; bit > 0; bit--)
|
|
505
|
-
if ((val & 1 << bit) != 0)
|
|
506
|
-
break;
|
|
507
|
-
return this.high != 0 ? bit + 33 : bit + 1;
|
|
508
|
-
};
|
|
509
|
-
LongPrototype.isZero = function isZero() {
|
|
510
|
-
return this.high === 0 && this.low === 0;
|
|
511
|
-
};
|
|
512
|
-
LongPrototype.eqz = LongPrototype.isZero;
|
|
513
|
-
LongPrototype.isNegative = function isNegative() {
|
|
514
|
-
return !this.unsigned && this.high < 0;
|
|
515
|
-
};
|
|
516
|
-
LongPrototype.isPositive = function isPositive() {
|
|
517
|
-
return this.unsigned || this.high >= 0;
|
|
518
|
-
};
|
|
519
|
-
LongPrototype.isOdd = function isOdd() {
|
|
520
|
-
return (this.low & 1) === 1;
|
|
521
|
-
};
|
|
522
|
-
LongPrototype.isEven = function isEven() {
|
|
523
|
-
return (this.low & 1) === 0;
|
|
524
|
-
};
|
|
525
|
-
LongPrototype.equals = function equals(other) {
|
|
526
|
-
if (!isLong(other))
|
|
527
|
-
other = fromValue(other);
|
|
528
|
-
if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
|
|
529
|
-
return false;
|
|
530
|
-
return this.high === other.high && this.low === other.low;
|
|
531
|
-
};
|
|
532
|
-
LongPrototype.eq = LongPrototype.equals;
|
|
533
|
-
LongPrototype.notEquals = function notEquals(other) {
|
|
534
|
-
return !this.eq(
|
|
535
|
-
/* validates */
|
|
536
|
-
other
|
|
537
|
-
);
|
|
538
|
-
};
|
|
539
|
-
LongPrototype.neq = LongPrototype.notEquals;
|
|
540
|
-
LongPrototype.ne = LongPrototype.notEquals;
|
|
541
|
-
LongPrototype.lessThan = function lessThan(other) {
|
|
542
|
-
return this.comp(
|
|
543
|
-
/* validates */
|
|
544
|
-
other
|
|
545
|
-
) < 0;
|
|
546
|
-
};
|
|
547
|
-
LongPrototype.lt = LongPrototype.lessThan;
|
|
548
|
-
LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
|
549
|
-
return this.comp(
|
|
550
|
-
/* validates */
|
|
551
|
-
other
|
|
552
|
-
) <= 0;
|
|
553
|
-
};
|
|
554
|
-
LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
|
555
|
-
LongPrototype.le = LongPrototype.lessThanOrEqual;
|
|
556
|
-
LongPrototype.greaterThan = function greaterThan(other) {
|
|
557
|
-
return this.comp(
|
|
558
|
-
/* validates */
|
|
559
|
-
other
|
|
560
|
-
) > 0;
|
|
561
|
-
};
|
|
562
|
-
LongPrototype.gt = LongPrototype.greaterThan;
|
|
563
|
-
LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
|
564
|
-
return this.comp(
|
|
565
|
-
/* validates */
|
|
566
|
-
other
|
|
567
|
-
) >= 0;
|
|
568
|
-
};
|
|
569
|
-
LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
|
570
|
-
LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
|
571
|
-
LongPrototype.compare = function compare(other) {
|
|
572
|
-
if (!isLong(other))
|
|
573
|
-
other = fromValue(other);
|
|
574
|
-
if (this.eq(other))
|
|
575
|
-
return 0;
|
|
576
|
-
var thisNeg = this.isNegative(), otherNeg = other.isNegative();
|
|
577
|
-
if (thisNeg && !otherNeg)
|
|
578
|
-
return -1;
|
|
579
|
-
if (!thisNeg && otherNeg)
|
|
580
|
-
return 1;
|
|
581
|
-
if (!this.unsigned)
|
|
582
|
-
return this.sub(other).isNegative() ? -1 : 1;
|
|
583
|
-
return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
|
|
584
|
-
};
|
|
585
|
-
LongPrototype.comp = LongPrototype.compare;
|
|
586
|
-
LongPrototype.negate = function negate() {
|
|
587
|
-
if (!this.unsigned && this.eq(MIN_VALUE))
|
|
588
|
-
return MIN_VALUE;
|
|
589
|
-
return this.not().add(ONE);
|
|
590
|
-
};
|
|
591
|
-
LongPrototype.neg = LongPrototype.negate;
|
|
592
|
-
LongPrototype.add = function add(addend) {
|
|
593
|
-
if (!isLong(addend))
|
|
594
|
-
addend = fromValue(addend);
|
|
595
|
-
var a48 = this.high >>> 16;
|
|
596
|
-
var a32 = this.high & 65535;
|
|
597
|
-
var a16 = this.low >>> 16;
|
|
598
|
-
var a00 = this.low & 65535;
|
|
599
|
-
var b48 = addend.high >>> 16;
|
|
600
|
-
var b32 = addend.high & 65535;
|
|
601
|
-
var b16 = addend.low >>> 16;
|
|
602
|
-
var b00 = addend.low & 65535;
|
|
603
|
-
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
604
|
-
c00 += a00 + b00;
|
|
605
|
-
c16 += c00 >>> 16;
|
|
606
|
-
c00 &= 65535;
|
|
607
|
-
c16 += a16 + b16;
|
|
608
|
-
c32 += c16 >>> 16;
|
|
609
|
-
c16 &= 65535;
|
|
610
|
-
c32 += a32 + b32;
|
|
611
|
-
c48 += c32 >>> 16;
|
|
612
|
-
c32 &= 65535;
|
|
613
|
-
c48 += a48 + b48;
|
|
614
|
-
c48 &= 65535;
|
|
615
|
-
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
|
616
|
-
};
|
|
617
|
-
LongPrototype.subtract = function subtract(subtrahend) {
|
|
618
|
-
if (!isLong(subtrahend))
|
|
619
|
-
subtrahend = fromValue(subtrahend);
|
|
620
|
-
return this.add(subtrahend.neg());
|
|
621
|
-
};
|
|
622
|
-
LongPrototype.sub = LongPrototype.subtract;
|
|
623
|
-
LongPrototype.multiply = function multiply(multiplier) {
|
|
624
|
-
if (this.isZero())
|
|
625
|
-
return ZERO;
|
|
626
|
-
if (!isLong(multiplier))
|
|
627
|
-
multiplier = fromValue(multiplier);
|
|
628
|
-
if (wasm) {
|
|
629
|
-
var low = wasm.mul(
|
|
630
|
-
this.low,
|
|
631
|
-
this.high,
|
|
632
|
-
multiplier.low,
|
|
633
|
-
multiplier.high
|
|
634
|
-
);
|
|
635
|
-
return fromBits(low, wasm.get_high(), this.unsigned);
|
|
636
|
-
}
|
|
637
|
-
if (multiplier.isZero())
|
|
638
|
-
return ZERO;
|
|
639
|
-
if (this.eq(MIN_VALUE))
|
|
640
|
-
return multiplier.isOdd() ? MIN_VALUE : ZERO;
|
|
641
|
-
if (multiplier.eq(MIN_VALUE))
|
|
642
|
-
return this.isOdd() ? MIN_VALUE : ZERO;
|
|
643
|
-
if (this.isNegative()) {
|
|
644
|
-
if (multiplier.isNegative())
|
|
645
|
-
return this.neg().mul(multiplier.neg());
|
|
646
|
-
else
|
|
647
|
-
return this.neg().mul(multiplier).neg();
|
|
648
|
-
} else if (multiplier.isNegative())
|
|
649
|
-
return this.mul(multiplier.neg()).neg();
|
|
650
|
-
if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
|
|
651
|
-
return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
|
|
652
|
-
var a48 = this.high >>> 16;
|
|
653
|
-
var a32 = this.high & 65535;
|
|
654
|
-
var a16 = this.low >>> 16;
|
|
655
|
-
var a00 = this.low & 65535;
|
|
656
|
-
var b48 = multiplier.high >>> 16;
|
|
657
|
-
var b32 = multiplier.high & 65535;
|
|
658
|
-
var b16 = multiplier.low >>> 16;
|
|
659
|
-
var b00 = multiplier.low & 65535;
|
|
660
|
-
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
661
|
-
c00 += a00 * b00;
|
|
662
|
-
c16 += c00 >>> 16;
|
|
663
|
-
c00 &= 65535;
|
|
664
|
-
c16 += a16 * b00;
|
|
665
|
-
c32 += c16 >>> 16;
|
|
666
|
-
c16 &= 65535;
|
|
667
|
-
c16 += a00 * b16;
|
|
668
|
-
c32 += c16 >>> 16;
|
|
669
|
-
c16 &= 65535;
|
|
670
|
-
c32 += a32 * b00;
|
|
671
|
-
c48 += c32 >>> 16;
|
|
672
|
-
c32 &= 65535;
|
|
673
|
-
c32 += a16 * b16;
|
|
674
|
-
c48 += c32 >>> 16;
|
|
675
|
-
c32 &= 65535;
|
|
676
|
-
c32 += a00 * b32;
|
|
677
|
-
c48 += c32 >>> 16;
|
|
678
|
-
c32 &= 65535;
|
|
679
|
-
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
|
|
680
|
-
c48 &= 65535;
|
|
681
|
-
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
|
27
|
+
// ../../node_modules/@protobufjs/aspromise/index.js
|
|
28
|
+
var require_aspromise = __commonJS({
|
|
29
|
+
"../../node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
|
|
30
|
+
"use strict";
|
|
31
|
+
module2.exports = asPromise;
|
|
32
|
+
function asPromise(fn, ctx) {
|
|
33
|
+
var params = new Array(arguments.length - 1), offset = 0, index = 2, pending = true;
|
|
34
|
+
while (index < arguments.length)
|
|
35
|
+
params[offset++] = arguments[index++];
|
|
36
|
+
return new Promise(function executor(resolve, reject) {
|
|
37
|
+
params[offset] = function callback(err) {
|
|
38
|
+
if (pending) {
|
|
39
|
+
pending = false;
|
|
40
|
+
if (err)
|
|
41
|
+
reject(err);
|
|
42
|
+
else {
|
|
43
|
+
var params2 = new Array(arguments.length - 1), offset2 = 0;
|
|
44
|
+
while (offset2 < params2.length)
|
|
45
|
+
params2[offset2++] = arguments[offset2];
|
|
46
|
+
resolve.apply(null, params2);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
try {
|
|
51
|
+
fn.apply(ctx || null, params);
|
|
52
|
+
} catch (err) {
|
|
53
|
+
if (pending) {
|
|
54
|
+
pending = false;
|
|
55
|
+
reject(err);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// ../../node_modules/@protobufjs/base64/index.js
|
|
64
|
+
var require_base64 = __commonJS({
|
|
65
|
+
"../../node_modules/@protobufjs/base64/index.js"(exports2) {
|
|
66
|
+
"use strict";
|
|
67
|
+
var base64 = exports2;
|
|
68
|
+
base64.length = function length(string) {
|
|
69
|
+
var p = string.length;
|
|
70
|
+
if (!p)
|
|
71
|
+
return 0;
|
|
72
|
+
var n = 0;
|
|
73
|
+
while (--p % 4 > 1 && string.charAt(p) === "=")
|
|
74
|
+
++n;
|
|
75
|
+
return Math.ceil(string.length * 3) / 4 - n;
|
|
682
76
|
};
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
77
|
+
var b64 = new Array(64);
|
|
78
|
+
var s64 = new Array(123);
|
|
79
|
+
for (i = 0; i < 64; )
|
|
80
|
+
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
81
|
+
var i;
|
|
82
|
+
base64.encode = function encode(buffer, start, end) {
|
|
83
|
+
var parts = null, chunk = [];
|
|
84
|
+
var i2 = 0, j = 0, t;
|
|
85
|
+
while (start < end) {
|
|
86
|
+
var b = buffer[start++];
|
|
87
|
+
switch (j) {
|
|
88
|
+
case 0:
|
|
89
|
+
chunk[i2++] = b64[b >> 2];
|
|
90
|
+
t = (b & 3) << 4;
|
|
91
|
+
j = 1;
|
|
92
|
+
break;
|
|
93
|
+
case 1:
|
|
94
|
+
chunk[i2++] = b64[t | b >> 4];
|
|
95
|
+
t = (b & 15) << 2;
|
|
96
|
+
j = 2;
|
|
97
|
+
break;
|
|
98
|
+
case 2:
|
|
99
|
+
chunk[i2++] = b64[t | b >> 6];
|
|
100
|
+
chunk[i2++] = b64[b & 63];
|
|
101
|
+
j = 0;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
if (i2 > 8191) {
|
|
105
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
106
|
+
i2 = 0;
|
|
692
107
|
}
|
|
693
|
-
var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
|
|
694
|
-
this.low,
|
|
695
|
-
this.high,
|
|
696
|
-
divisor.low,
|
|
697
|
-
divisor.high
|
|
698
|
-
);
|
|
699
|
-
return fromBits(low, wasm.get_high(), this.unsigned);
|
|
700
108
|
}
|
|
701
|
-
if (
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
|
|
707
|
-
return MIN_VALUE;
|
|
708
|
-
else if (divisor.eq(MIN_VALUE))
|
|
709
|
-
return ONE;
|
|
710
|
-
else {
|
|
711
|
-
var halfThis = this.shr(1);
|
|
712
|
-
approx = halfThis.div(divisor).shl(1);
|
|
713
|
-
if (approx.eq(ZERO)) {
|
|
714
|
-
return divisor.isNegative() ? ONE : NEG_ONE;
|
|
715
|
-
} else {
|
|
716
|
-
rem = this.sub(divisor.mul(approx));
|
|
717
|
-
res = approx.add(rem.div(divisor));
|
|
718
|
-
return res;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
} else if (divisor.eq(MIN_VALUE))
|
|
722
|
-
return this.unsigned ? UZERO : ZERO;
|
|
723
|
-
if (this.isNegative()) {
|
|
724
|
-
if (divisor.isNegative())
|
|
725
|
-
return this.neg().div(divisor.neg());
|
|
726
|
-
return this.neg().div(divisor).neg();
|
|
727
|
-
} else if (divisor.isNegative())
|
|
728
|
-
return this.div(divisor.neg()).neg();
|
|
729
|
-
res = ZERO;
|
|
730
|
-
} else {
|
|
731
|
-
if (!divisor.unsigned)
|
|
732
|
-
divisor = divisor.toUnsigned();
|
|
733
|
-
if (divisor.gt(this))
|
|
734
|
-
return UZERO;
|
|
735
|
-
if (divisor.gt(this.shru(1)))
|
|
736
|
-
return UONE;
|
|
737
|
-
res = UZERO;
|
|
109
|
+
if (j) {
|
|
110
|
+
chunk[i2++] = b64[t];
|
|
111
|
+
chunk[i2++] = 61;
|
|
112
|
+
if (j === 1)
|
|
113
|
+
chunk[i2++] = 61;
|
|
738
114
|
}
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
while (approxRem.isNegative() || approxRem.gt(rem)) {
|
|
744
|
-
approx -= delta;
|
|
745
|
-
approxRes = fromNumber(approx, this.unsigned);
|
|
746
|
-
approxRem = approxRes.mul(divisor);
|
|
747
|
-
}
|
|
748
|
-
if (approxRes.isZero())
|
|
749
|
-
approxRes = ONE;
|
|
750
|
-
res = res.add(approxRes);
|
|
751
|
-
rem = rem.sub(approxRem);
|
|
115
|
+
if (parts) {
|
|
116
|
+
if (i2)
|
|
117
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i2)));
|
|
118
|
+
return parts.join("");
|
|
752
119
|
}
|
|
753
|
-
return
|
|
120
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i2));
|
|
754
121
|
};
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
)
|
|
766
|
-
|
|
122
|
+
var invalidEncoding = "invalid encoding";
|
|
123
|
+
base64.decode = function decode(string, buffer, offset) {
|
|
124
|
+
var start = offset;
|
|
125
|
+
var j = 0, t;
|
|
126
|
+
for (var i2 = 0; i2 < string.length; ) {
|
|
127
|
+
var c = string.charCodeAt(i2++);
|
|
128
|
+
if (c === 61 && j > 1)
|
|
129
|
+
break;
|
|
130
|
+
if ((c = s64[c]) === void 0)
|
|
131
|
+
throw Error(invalidEncoding);
|
|
132
|
+
switch (j) {
|
|
133
|
+
case 0:
|
|
134
|
+
t = c;
|
|
135
|
+
j = 1;
|
|
136
|
+
break;
|
|
137
|
+
case 1:
|
|
138
|
+
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
139
|
+
t = c;
|
|
140
|
+
j = 2;
|
|
141
|
+
break;
|
|
142
|
+
case 2:
|
|
143
|
+
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
144
|
+
t = c;
|
|
145
|
+
j = 3;
|
|
146
|
+
break;
|
|
147
|
+
case 3:
|
|
148
|
+
buffer[offset++] = (t & 3) << 6 | c;
|
|
149
|
+
j = 0;
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
767
152
|
}
|
|
768
|
-
|
|
153
|
+
if (j === 1)
|
|
154
|
+
throw Error(invalidEncoding);
|
|
155
|
+
return offset - start;
|
|
769
156
|
};
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
LongPrototype.not = function not() {
|
|
773
|
-
return fromBits(~this.low, ~this.high, this.unsigned);
|
|
157
|
+
base64.test = function test(string) {
|
|
158
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string);
|
|
774
159
|
};
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// ../../node_modules/@protobufjs/eventemitter/index.js
|
|
164
|
+
var require_eventemitter = __commonJS({
|
|
165
|
+
"../../node_modules/@protobufjs/eventemitter/index.js"(exports2, module2) {
|
|
166
|
+
"use strict";
|
|
167
|
+
module2.exports = EventEmitter;
|
|
168
|
+
function EventEmitter() {
|
|
169
|
+
this._listeners = {};
|
|
170
|
+
}
|
|
171
|
+
EventEmitter.prototype.on = function on(evt, fn, ctx) {
|
|
172
|
+
(this._listeners[evt] || (this._listeners[evt] = [])).push({
|
|
173
|
+
fn,
|
|
174
|
+
ctx: ctx || this
|
|
175
|
+
});
|
|
176
|
+
return this;
|
|
779
177
|
};
|
|
780
|
-
|
|
781
|
-
if (
|
|
782
|
-
|
|
783
|
-
|
|
178
|
+
EventEmitter.prototype.off = function off(evt, fn) {
|
|
179
|
+
if (evt === void 0)
|
|
180
|
+
this._listeners = {};
|
|
181
|
+
else {
|
|
182
|
+
if (fn === void 0)
|
|
183
|
+
this._listeners[evt] = [];
|
|
184
|
+
else {
|
|
185
|
+
var listeners = this._listeners[evt];
|
|
186
|
+
for (var i = 0; i < listeners.length; )
|
|
187
|
+
if (listeners[i].fn === fn)
|
|
188
|
+
listeners.splice(i, 1);
|
|
189
|
+
else
|
|
190
|
+
++i;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return this;
|
|
784
194
|
};
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
195
|
+
EventEmitter.prototype.emit = function emit(evt) {
|
|
196
|
+
var listeners = this._listeners[evt];
|
|
197
|
+
if (listeners) {
|
|
198
|
+
var args = [], i = 1;
|
|
199
|
+
for (; i < arguments.length; )
|
|
200
|
+
args.push(arguments[i++]);
|
|
201
|
+
for (i = 0; i < listeners.length; )
|
|
202
|
+
listeners[i].fn.apply(listeners[i++].ctx, args);
|
|
203
|
+
}
|
|
204
|
+
return this;
|
|
789
205
|
};
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/@protobufjs/float/index.js
|
|
210
|
+
var require_float = __commonJS({
|
|
211
|
+
"../../node_modules/@protobufjs/float/index.js"(exports2, module2) {
|
|
212
|
+
"use strict";
|
|
213
|
+
module2.exports = factory(factory);
|
|
214
|
+
function factory(exports3) {
|
|
215
|
+
if (typeof Float32Array !== "undefined")
|
|
216
|
+
(function() {
|
|
217
|
+
var f32 = new Float32Array([-0]), f8b = new Uint8Array(f32.buffer), le = f8b[3] === 128;
|
|
218
|
+
function writeFloat_f32_cpy(val, buf, pos) {
|
|
219
|
+
f32[0] = val;
|
|
220
|
+
buf[pos] = f8b[0];
|
|
221
|
+
buf[pos + 1] = f8b[1];
|
|
222
|
+
buf[pos + 2] = f8b[2];
|
|
223
|
+
buf[pos + 3] = f8b[3];
|
|
224
|
+
}
|
|
225
|
+
function writeFloat_f32_rev(val, buf, pos) {
|
|
226
|
+
f32[0] = val;
|
|
227
|
+
buf[pos] = f8b[3];
|
|
228
|
+
buf[pos + 1] = f8b[2];
|
|
229
|
+
buf[pos + 2] = f8b[1];
|
|
230
|
+
buf[pos + 3] = f8b[0];
|
|
231
|
+
}
|
|
232
|
+
exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
|
|
233
|
+
exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
|
|
234
|
+
function readFloat_f32_cpy(buf, pos) {
|
|
235
|
+
f8b[0] = buf[pos];
|
|
236
|
+
f8b[1] = buf[pos + 1];
|
|
237
|
+
f8b[2] = buf[pos + 2];
|
|
238
|
+
f8b[3] = buf[pos + 3];
|
|
239
|
+
return f32[0];
|
|
240
|
+
}
|
|
241
|
+
function readFloat_f32_rev(buf, pos) {
|
|
242
|
+
f8b[3] = buf[pos];
|
|
243
|
+
f8b[2] = buf[pos + 1];
|
|
244
|
+
f8b[1] = buf[pos + 2];
|
|
245
|
+
f8b[0] = buf[pos + 3];
|
|
246
|
+
return f32[0];
|
|
247
|
+
}
|
|
248
|
+
exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
|
|
249
|
+
exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
|
|
250
|
+
})();
|
|
797
251
|
else
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
252
|
+
(function() {
|
|
253
|
+
function writeFloat_ieee754(writeUint, val, buf, pos) {
|
|
254
|
+
var sign = val < 0 ? 1 : 0;
|
|
255
|
+
if (sign)
|
|
256
|
+
val = -val;
|
|
257
|
+
if (val === 0)
|
|
258
|
+
writeUint(1 / val > 0 ? (
|
|
259
|
+
/* positive */
|
|
260
|
+
0
|
|
261
|
+
) : (
|
|
262
|
+
/* negative 0 */
|
|
263
|
+
2147483648
|
|
264
|
+
), buf, pos);
|
|
265
|
+
else if (isNaN(val))
|
|
266
|
+
writeUint(2143289344, buf, pos);
|
|
267
|
+
else if (val > 34028234663852886e22)
|
|
268
|
+
writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
|
|
269
|
+
else if (val < 11754943508222875e-54)
|
|
270
|
+
writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
|
|
271
|
+
else {
|
|
272
|
+
var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
|
|
273
|
+
writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
|
|
277
|
+
exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
|
|
278
|
+
function readFloat_ieee754(readUint, buf, pos) {
|
|
279
|
+
var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
|
|
280
|
+
return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
|
|
281
|
+
}
|
|
282
|
+
exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
|
|
283
|
+
exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
|
|
284
|
+
})();
|
|
285
|
+
if (typeof Float64Array !== "undefined")
|
|
286
|
+
(function() {
|
|
287
|
+
var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
|
|
288
|
+
function writeDouble_f64_cpy(val, buf, pos) {
|
|
289
|
+
f64[0] = val;
|
|
290
|
+
buf[pos] = f8b[0];
|
|
291
|
+
buf[pos + 1] = f8b[1];
|
|
292
|
+
buf[pos + 2] = f8b[2];
|
|
293
|
+
buf[pos + 3] = f8b[3];
|
|
294
|
+
buf[pos + 4] = f8b[4];
|
|
295
|
+
buf[pos + 5] = f8b[5];
|
|
296
|
+
buf[pos + 6] = f8b[6];
|
|
297
|
+
buf[pos + 7] = f8b[7];
|
|
298
|
+
}
|
|
299
|
+
function writeDouble_f64_rev(val, buf, pos) {
|
|
300
|
+
f64[0] = val;
|
|
301
|
+
buf[pos] = f8b[7];
|
|
302
|
+
buf[pos + 1] = f8b[6];
|
|
303
|
+
buf[pos + 2] = f8b[5];
|
|
304
|
+
buf[pos + 3] = f8b[4];
|
|
305
|
+
buf[pos + 4] = f8b[3];
|
|
306
|
+
buf[pos + 5] = f8b[2];
|
|
307
|
+
buf[pos + 6] = f8b[1];
|
|
308
|
+
buf[pos + 7] = f8b[0];
|
|
309
|
+
}
|
|
310
|
+
exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
|
|
311
|
+
exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
|
|
312
|
+
function readDouble_f64_cpy(buf, pos) {
|
|
313
|
+
f8b[0] = buf[pos];
|
|
314
|
+
f8b[1] = buf[pos + 1];
|
|
315
|
+
f8b[2] = buf[pos + 2];
|
|
316
|
+
f8b[3] = buf[pos + 3];
|
|
317
|
+
f8b[4] = buf[pos + 4];
|
|
318
|
+
f8b[5] = buf[pos + 5];
|
|
319
|
+
f8b[6] = buf[pos + 6];
|
|
320
|
+
f8b[7] = buf[pos + 7];
|
|
321
|
+
return f64[0];
|
|
322
|
+
}
|
|
323
|
+
function readDouble_f64_rev(buf, pos) {
|
|
324
|
+
f8b[7] = buf[pos];
|
|
325
|
+
f8b[6] = buf[pos + 1];
|
|
326
|
+
f8b[5] = buf[pos + 2];
|
|
327
|
+
f8b[4] = buf[pos + 3];
|
|
328
|
+
f8b[3] = buf[pos + 4];
|
|
329
|
+
f8b[2] = buf[pos + 5];
|
|
330
|
+
f8b[1] = buf[pos + 6];
|
|
331
|
+
f8b[0] = buf[pos + 7];
|
|
332
|
+
return f64[0];
|
|
333
|
+
}
|
|
334
|
+
exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
|
|
335
|
+
exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
|
|
336
|
+
})();
|
|
808
337
|
else
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
338
|
+
(function() {
|
|
339
|
+
function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
|
|
340
|
+
var sign = val < 0 ? 1 : 0;
|
|
341
|
+
if (sign)
|
|
342
|
+
val = -val;
|
|
343
|
+
if (val === 0) {
|
|
344
|
+
writeUint(0, buf, pos + off0);
|
|
345
|
+
writeUint(1 / val > 0 ? (
|
|
346
|
+
/* positive */
|
|
347
|
+
0
|
|
348
|
+
) : (
|
|
349
|
+
/* negative 0 */
|
|
350
|
+
2147483648
|
|
351
|
+
), buf, pos + off1);
|
|
352
|
+
} else if (isNaN(val)) {
|
|
353
|
+
writeUint(0, buf, pos + off0);
|
|
354
|
+
writeUint(2146959360, buf, pos + off1);
|
|
355
|
+
} else if (val > 17976931348623157e292) {
|
|
356
|
+
writeUint(0, buf, pos + off0);
|
|
357
|
+
writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
|
|
358
|
+
} else {
|
|
359
|
+
var mantissa;
|
|
360
|
+
if (val < 22250738585072014e-324) {
|
|
361
|
+
mantissa = val / 5e-324;
|
|
362
|
+
writeUint(mantissa >>> 0, buf, pos + off0);
|
|
363
|
+
writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
|
|
364
|
+
} else {
|
|
365
|
+
var exponent = Math.floor(Math.log(val) / Math.LN2);
|
|
366
|
+
if (exponent === 1024)
|
|
367
|
+
exponent = 1023;
|
|
368
|
+
mantissa = val * Math.pow(2, -exponent);
|
|
369
|
+
writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
|
|
370
|
+
writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
|
|
375
|
+
exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
|
|
376
|
+
function readDouble_ieee754(readUint, off0, off1, buf, pos) {
|
|
377
|
+
var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
|
|
378
|
+
var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
|
|
379
|
+
return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
|
|
380
|
+
}
|
|
381
|
+
exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
|
|
382
|
+
exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
|
|
383
|
+
})();
|
|
384
|
+
return exports3;
|
|
385
|
+
}
|
|
386
|
+
function writeUintLE(val, buf, pos) {
|
|
387
|
+
buf[pos] = val & 255;
|
|
388
|
+
buf[pos + 1] = val >>> 8 & 255;
|
|
389
|
+
buf[pos + 2] = val >>> 16 & 255;
|
|
390
|
+
buf[pos + 3] = val >>> 24;
|
|
391
|
+
}
|
|
392
|
+
function writeUintBE(val, buf, pos) {
|
|
393
|
+
buf[pos] = val >>> 24;
|
|
394
|
+
buf[pos + 1] = val >>> 16 & 255;
|
|
395
|
+
buf[pos + 2] = val >>> 8 & 255;
|
|
396
|
+
buf[pos + 3] = val & 255;
|
|
397
|
+
}
|
|
398
|
+
function readUintLE(buf, pos) {
|
|
399
|
+
return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16 | buf[pos + 3] << 24) >>> 0;
|
|
400
|
+
}
|
|
401
|
+
function readUintBE(buf, pos) {
|
|
402
|
+
return (buf[pos] << 24 | buf[pos + 1] << 16 | buf[pos + 2] << 8 | buf[pos + 3]) >>> 0;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
// ../../node_modules/@protobufjs/inquire/index.js
|
|
408
|
+
var require_inquire = __commonJS({
|
|
409
|
+
"../../node_modules/@protobufjs/inquire/index.js"(exports, module) {
|
|
410
|
+
"use strict";
|
|
411
|
+
module.exports = inquire;
|
|
412
|
+
function inquire(moduleName) {
|
|
413
|
+
try {
|
|
414
|
+
var mod = eval("quire".replace(/^/, "re"))(moduleName);
|
|
415
|
+
if (mod && (mod.length || Object.keys(mod).length))
|
|
416
|
+
return mod;
|
|
417
|
+
} catch (e) {
|
|
827
418
|
}
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// ../../node_modules/@protobufjs/utf8/index.js
|
|
425
|
+
var require_utf8 = __commonJS({
|
|
426
|
+
"../../node_modules/@protobufjs/utf8/index.js"(exports2) {
|
|
427
|
+
"use strict";
|
|
428
|
+
var utf8 = exports2;
|
|
429
|
+
utf8.length = function utf8_length(string) {
|
|
430
|
+
var len = 0, c = 0;
|
|
431
|
+
for (var i = 0; i < string.length; ++i) {
|
|
432
|
+
c = string.charCodeAt(i);
|
|
433
|
+
if (c < 128)
|
|
434
|
+
len += 1;
|
|
435
|
+
else if (c < 2048)
|
|
436
|
+
len += 2;
|
|
437
|
+
else if ((c & 64512) === 55296 && (string.charCodeAt(i + 1) & 64512) === 56320) {
|
|
438
|
+
++i;
|
|
439
|
+
len += 4;
|
|
440
|
+
} else
|
|
441
|
+
len += 3;
|
|
442
|
+
}
|
|
443
|
+
return len;
|
|
828
444
|
};
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
LongPrototype.toBytesBE = function toBytesBE() {
|
|
858
|
-
var hi = this.high, lo = this.low;
|
|
859
|
-
return [
|
|
860
|
-
hi >>> 24,
|
|
861
|
-
hi >>> 16 & 255,
|
|
862
|
-
hi >>> 8 & 255,
|
|
863
|
-
hi & 255,
|
|
864
|
-
lo >>> 24,
|
|
865
|
-
lo >>> 16 & 255,
|
|
866
|
-
lo >>> 8 & 255,
|
|
867
|
-
lo & 255
|
|
868
|
-
];
|
|
869
|
-
};
|
|
870
|
-
Long5.fromBytes = function fromBytes(bytes, unsigned, le) {
|
|
871
|
-
return le ? Long5.fromBytesLE(bytes, unsigned) : Long5.fromBytesBE(bytes, unsigned);
|
|
872
|
-
};
|
|
873
|
-
Long5.fromBytesLE = function fromBytesLE(bytes, unsigned) {
|
|
874
|
-
return new Long5(
|
|
875
|
-
bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
|
|
876
|
-
bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
|
|
877
|
-
unsigned
|
|
878
|
-
);
|
|
445
|
+
utf8.read = function utf8_read(buffer, start, end) {
|
|
446
|
+
var len = end - start;
|
|
447
|
+
if (len < 1)
|
|
448
|
+
return "";
|
|
449
|
+
var parts = null, chunk = [], i = 0, t;
|
|
450
|
+
while (start < end) {
|
|
451
|
+
t = buffer[start++];
|
|
452
|
+
if (t < 128)
|
|
453
|
+
chunk[i++] = t;
|
|
454
|
+
else if (t > 191 && t < 224)
|
|
455
|
+
chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;
|
|
456
|
+
else if (t > 239 && t < 365) {
|
|
457
|
+
t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 65536;
|
|
458
|
+
chunk[i++] = 55296 + (t >> 10);
|
|
459
|
+
chunk[i++] = 56320 + (t & 1023);
|
|
460
|
+
} else
|
|
461
|
+
chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
462
|
+
if (i > 8191) {
|
|
463
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
464
|
+
i = 0;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (parts) {
|
|
468
|
+
if (i)
|
|
469
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
470
|
+
return parts.join("");
|
|
471
|
+
}
|
|
472
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
879
473
|
};
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
474
|
+
utf8.write = function utf8_write(string, buffer, offset) {
|
|
475
|
+
var start = offset, c1, c2;
|
|
476
|
+
for (var i = 0; i < string.length; ++i) {
|
|
477
|
+
c1 = string.charCodeAt(i);
|
|
478
|
+
if (c1 < 128) {
|
|
479
|
+
buffer[offset++] = c1;
|
|
480
|
+
} else if (c1 < 2048) {
|
|
481
|
+
buffer[offset++] = c1 >> 6 | 192;
|
|
482
|
+
buffer[offset++] = c1 & 63 | 128;
|
|
483
|
+
} else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
|
|
484
|
+
c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
|
|
485
|
+
++i;
|
|
486
|
+
buffer[offset++] = c1 >> 18 | 240;
|
|
487
|
+
buffer[offset++] = c1 >> 12 & 63 | 128;
|
|
488
|
+
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
489
|
+
buffer[offset++] = c1 & 63 | 128;
|
|
490
|
+
} else {
|
|
491
|
+
buffer[offset++] = c1 >> 12 | 224;
|
|
492
|
+
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
493
|
+
buffer[offset++] = c1 & 63 | 128;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
return offset - start;
|
|
886
497
|
};
|
|
887
498
|
}
|
|
888
499
|
});
|
|
889
500
|
|
|
890
|
-
// ../../node_modules/@protobufjs/
|
|
891
|
-
var
|
|
892
|
-
"../../node_modules/@protobufjs/
|
|
501
|
+
// ../../node_modules/@protobufjs/pool/index.js
|
|
502
|
+
var require_pool = __commonJS({
|
|
503
|
+
"../../node_modules/@protobufjs/pool/index.js"(exports2, module2) {
|
|
893
504
|
"use strict";
|
|
894
|
-
module2.exports =
|
|
895
|
-
function
|
|
896
|
-
var
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
var params2 = new Array(arguments.length - 1), offset2 = 0;
|
|
907
|
-
while (offset2 < params2.length)
|
|
908
|
-
params2[offset2++] = arguments[offset2];
|
|
909
|
-
resolve.apply(null, params2);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
};
|
|
913
|
-
try {
|
|
914
|
-
fn.apply(ctx || null, params);
|
|
915
|
-
} catch (err) {
|
|
916
|
-
if (pending) {
|
|
917
|
-
pending = false;
|
|
918
|
-
reject(err);
|
|
919
|
-
}
|
|
505
|
+
module2.exports = pool;
|
|
506
|
+
function pool(alloc, slice, size) {
|
|
507
|
+
var SIZE = size || 8192;
|
|
508
|
+
var MAX = SIZE >>> 1;
|
|
509
|
+
var slab = null;
|
|
510
|
+
var offset = SIZE;
|
|
511
|
+
return function pool_alloc(size2) {
|
|
512
|
+
if (size2 < 1 || size2 > MAX)
|
|
513
|
+
return alloc(size2);
|
|
514
|
+
if (offset + size2 > SIZE) {
|
|
515
|
+
slab = alloc(SIZE);
|
|
516
|
+
offset = 0;
|
|
920
517
|
}
|
|
921
|
-
|
|
518
|
+
var buf = slice.call(slab, offset, offset += size2);
|
|
519
|
+
if (offset & 7)
|
|
520
|
+
offset = (offset | 7) + 1;
|
|
521
|
+
return buf;
|
|
522
|
+
};
|
|
922
523
|
}
|
|
923
524
|
}
|
|
924
525
|
});
|
|
925
526
|
|
|
926
|
-
// ../../node_modules
|
|
927
|
-
var
|
|
928
|
-
"../../node_modules
|
|
527
|
+
// ../../node_modules/protobufjs/src/util/longbits.js
|
|
528
|
+
var require_longbits = __commonJS({
|
|
529
|
+
"../../node_modules/protobufjs/src/util/longbits.js"(exports2, module2) {
|
|
929
530
|
"use strict";
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
return
|
|
531
|
+
module2.exports = LongBits;
|
|
532
|
+
var util = require_minimal();
|
|
533
|
+
function LongBits(lo, hi) {
|
|
534
|
+
this.lo = lo >>> 0;
|
|
535
|
+
this.hi = hi >>> 0;
|
|
536
|
+
}
|
|
537
|
+
var zero = LongBits.zero = new LongBits(0, 0);
|
|
538
|
+
zero.toNumber = function() {
|
|
539
|
+
return 0;
|
|
939
540
|
};
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
case 2:
|
|
962
|
-
chunk[i2++] = b64[t | b >> 6];
|
|
963
|
-
chunk[i2++] = b64[b & 63];
|
|
964
|
-
j = 0;
|
|
965
|
-
break;
|
|
966
|
-
}
|
|
967
|
-
if (i2 > 8191) {
|
|
968
|
-
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
969
|
-
i2 = 0;
|
|
541
|
+
zero.zzEncode = zero.zzDecode = function() {
|
|
542
|
+
return this;
|
|
543
|
+
};
|
|
544
|
+
zero.length = function() {
|
|
545
|
+
return 1;
|
|
546
|
+
};
|
|
547
|
+
var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
|
|
548
|
+
LongBits.fromNumber = function fromNumber(value) {
|
|
549
|
+
if (value === 0)
|
|
550
|
+
return zero;
|
|
551
|
+
var sign = value < 0;
|
|
552
|
+
if (sign)
|
|
553
|
+
value = -value;
|
|
554
|
+
var lo = value >>> 0, hi = (value - lo) / 4294967296 >>> 0;
|
|
555
|
+
if (sign) {
|
|
556
|
+
hi = ~hi >>> 0;
|
|
557
|
+
lo = ~lo >>> 0;
|
|
558
|
+
if (++lo > 4294967295) {
|
|
559
|
+
lo = 0;
|
|
560
|
+
if (++hi > 4294967295)
|
|
561
|
+
hi = 0;
|
|
970
562
|
}
|
|
971
563
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
564
|
+
return new LongBits(lo, hi);
|
|
565
|
+
};
|
|
566
|
+
LongBits.from = function from(value) {
|
|
567
|
+
if (typeof value === "number")
|
|
568
|
+
return LongBits.fromNumber(value);
|
|
569
|
+
if (util.isString(value)) {
|
|
570
|
+
if (util.Long)
|
|
571
|
+
value = util.Long.fromString(value);
|
|
572
|
+
else
|
|
573
|
+
return LongBits.fromNumber(parseInt(value, 10));
|
|
982
574
|
}
|
|
983
|
-
return
|
|
575
|
+
return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero;
|
|
984
576
|
};
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
if (c === 61 && j > 1)
|
|
992
|
-
break;
|
|
993
|
-
if ((c = s64[c]) === void 0)
|
|
994
|
-
throw Error(invalidEncoding);
|
|
995
|
-
switch (j) {
|
|
996
|
-
case 0:
|
|
997
|
-
t = c;
|
|
998
|
-
j = 1;
|
|
999
|
-
break;
|
|
1000
|
-
case 1:
|
|
1001
|
-
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
1002
|
-
t = c;
|
|
1003
|
-
j = 2;
|
|
1004
|
-
break;
|
|
1005
|
-
case 2:
|
|
1006
|
-
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
1007
|
-
t = c;
|
|
1008
|
-
j = 3;
|
|
1009
|
-
break;
|
|
1010
|
-
case 3:
|
|
1011
|
-
buffer[offset++] = (t & 3) << 6 | c;
|
|
1012
|
-
j = 0;
|
|
1013
|
-
break;
|
|
1014
|
-
}
|
|
577
|
+
LongBits.prototype.toNumber = function toNumber(unsigned) {
|
|
578
|
+
if (!unsigned && this.hi >>> 31) {
|
|
579
|
+
var lo = ~this.lo + 1 >>> 0, hi = ~this.hi >>> 0;
|
|
580
|
+
if (!lo)
|
|
581
|
+
hi = hi + 1 >>> 0;
|
|
582
|
+
return -(lo + hi * 4294967296);
|
|
1015
583
|
}
|
|
1016
|
-
|
|
1017
|
-
throw Error(invalidEncoding);
|
|
1018
|
-
return offset - start;
|
|
584
|
+
return this.lo + this.hi * 4294967296;
|
|
1019
585
|
};
|
|
1020
|
-
|
|
1021
|
-
return
|
|
586
|
+
LongBits.prototype.toLong = function toLong(unsigned) {
|
|
587
|
+
return util.Long ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) };
|
|
588
|
+
};
|
|
589
|
+
var charCodeAt = String.prototype.charCodeAt;
|
|
590
|
+
LongBits.fromHash = function fromHash(hash) {
|
|
591
|
+
if (hash === zeroHash)
|
|
592
|
+
return zero;
|
|
593
|
+
return new LongBits(
|
|
594
|
+
(charCodeAt.call(hash, 0) | charCodeAt.call(hash, 1) << 8 | charCodeAt.call(hash, 2) << 16 | charCodeAt.call(hash, 3) << 24) >>> 0,
|
|
595
|
+
(charCodeAt.call(hash, 4) | charCodeAt.call(hash, 5) << 8 | charCodeAt.call(hash, 6) << 16 | charCodeAt.call(hash, 7) << 24) >>> 0
|
|
596
|
+
);
|
|
597
|
+
};
|
|
598
|
+
LongBits.prototype.toHash = function toHash() {
|
|
599
|
+
return String.fromCharCode(
|
|
600
|
+
this.lo & 255,
|
|
601
|
+
this.lo >>> 8 & 255,
|
|
602
|
+
this.lo >>> 16 & 255,
|
|
603
|
+
this.lo >>> 24,
|
|
604
|
+
this.hi & 255,
|
|
605
|
+
this.hi >>> 8 & 255,
|
|
606
|
+
this.hi >>> 16 & 255,
|
|
607
|
+
this.hi >>> 24
|
|
608
|
+
);
|
|
609
|
+
};
|
|
610
|
+
LongBits.prototype.zzEncode = function zzEncode() {
|
|
611
|
+
var mask = this.hi >> 31;
|
|
612
|
+
this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0;
|
|
613
|
+
this.lo = (this.lo << 1 ^ mask) >>> 0;
|
|
614
|
+
return this;
|
|
615
|
+
};
|
|
616
|
+
LongBits.prototype.zzDecode = function zzDecode() {
|
|
617
|
+
var mask = -(this.lo & 1);
|
|
618
|
+
this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0;
|
|
619
|
+
this.hi = (this.hi >>> 1 ^ mask) >>> 0;
|
|
620
|
+
return this;
|
|
621
|
+
};
|
|
622
|
+
LongBits.prototype.length = function length() {
|
|
623
|
+
var part0 = this.lo, part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, part2 = this.hi >>> 24;
|
|
624
|
+
return part2 === 0 ? part1 === 0 ? part0 < 16384 ? part0 < 128 ? 1 : 2 : part0 < 2097152 ? 3 : 4 : part1 < 16384 ? part1 < 128 ? 5 : 6 : part1 < 2097152 ? 7 : 8 : part2 < 128 ? 9 : 10;
|
|
1022
625
|
};
|
|
1023
626
|
}
|
|
1024
627
|
});
|
|
1025
628
|
|
|
1026
|
-
// ../../node_modules
|
|
1027
|
-
var
|
|
1028
|
-
"../../node_modules
|
|
629
|
+
// ../../node_modules/protobufjs/src/util/minimal.js
|
|
630
|
+
var require_minimal = __commonJS({
|
|
631
|
+
"../../node_modules/protobufjs/src/util/minimal.js"(exports2) {
|
|
1029
632
|
"use strict";
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
633
|
+
var util = exports2;
|
|
634
|
+
util.asPromise = require_aspromise();
|
|
635
|
+
util.base64 = require_base64();
|
|
636
|
+
util.EventEmitter = require_eventemitter();
|
|
637
|
+
util.float = require_float();
|
|
638
|
+
util.inquire = require_inquire();
|
|
639
|
+
util.utf8 = require_utf8();
|
|
640
|
+
util.pool = require_pool();
|
|
641
|
+
util.LongBits = require_longbits();
|
|
642
|
+
util.isNode = Boolean(typeof global !== "undefined" && global && global.process && global.process.versions && global.process.versions.node);
|
|
643
|
+
util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
|
|
644
|
+
util.emptyArray = Object.freeze ? Object.freeze([]) : (
|
|
645
|
+
/* istanbul ignore next */
|
|
646
|
+
[]
|
|
647
|
+
);
|
|
648
|
+
util.emptyObject = Object.freeze ? Object.freeze({}) : (
|
|
649
|
+
/* istanbul ignore next */
|
|
650
|
+
{}
|
|
651
|
+
);
|
|
652
|
+
util.isInteger = Number.isInteger || /* istanbul ignore next */
|
|
653
|
+
function isInteger(value) {
|
|
654
|
+
return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
|
|
655
|
+
};
|
|
656
|
+
util.isString = function isString(value) {
|
|
657
|
+
return typeof value === "string" || value instanceof String;
|
|
658
|
+
};
|
|
659
|
+
util.isObject = function isObject2(value) {
|
|
660
|
+
return value && typeof value === "object";
|
|
661
|
+
};
|
|
662
|
+
util.isset = /**
|
|
663
|
+
* Checks if a property on a message is considered to be present.
|
|
664
|
+
* @param {Object} obj Plain object or message instance
|
|
665
|
+
* @param {string} prop Property name
|
|
666
|
+
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
|
667
|
+
*/
|
|
668
|
+
util.isSet = function isSet5(obj, prop) {
|
|
669
|
+
var value = obj[prop];
|
|
670
|
+
if (value != null && obj.hasOwnProperty(prop))
|
|
671
|
+
return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
|
|
672
|
+
return false;
|
|
673
|
+
};
|
|
674
|
+
util.Buffer = function() {
|
|
675
|
+
try {
|
|
676
|
+
var Buffer2 = util.inquire("buffer").Buffer;
|
|
677
|
+
return Buffer2.prototype.utf8Write ? Buffer2 : (
|
|
678
|
+
/* istanbul ignore next */
|
|
679
|
+
null
|
|
680
|
+
);
|
|
681
|
+
} catch (e) {
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
684
|
+
}();
|
|
685
|
+
util._Buffer_from = null;
|
|
686
|
+
util._Buffer_allocUnsafe = null;
|
|
687
|
+
util.newBuffer = function newBuffer(sizeOrArray) {
|
|
688
|
+
return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
|
|
689
|
+
};
|
|
690
|
+
util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
691
|
+
util.Long = /* istanbul ignore next */
|
|
692
|
+
util.global.dcodeIO && /* istanbul ignore next */
|
|
693
|
+
util.global.dcodeIO.Long || /* istanbul ignore next */
|
|
694
|
+
util.global.Long || util.inquire("long");
|
|
695
|
+
util.key2Re = /^true|false|0|1$/;
|
|
696
|
+
util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
|
|
697
|
+
util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
|
|
698
|
+
util.longToHash = function longToHash(value) {
|
|
699
|
+
return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
|
|
700
|
+
};
|
|
701
|
+
util.longFromHash = function longFromHash(hash, unsigned) {
|
|
702
|
+
var bits = util.LongBits.fromHash(hash);
|
|
703
|
+
if (util.Long)
|
|
704
|
+
return util.Long.fromBits(bits.lo, bits.hi, unsigned);
|
|
705
|
+
return bits.toNumber(Boolean(unsigned));
|
|
706
|
+
};
|
|
707
|
+
function merge(dst, src, ifNotSet) {
|
|
708
|
+
for (var keys = Object.keys(src), i = 0; i < keys.length; ++i)
|
|
709
|
+
if (dst[keys[i]] === void 0 || !ifNotSet)
|
|
710
|
+
dst[keys[i]] = src[keys[i]];
|
|
711
|
+
return dst;
|
|
1033
712
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
ctx: ctx || this
|
|
1038
|
-
});
|
|
1039
|
-
return this;
|
|
713
|
+
util.merge = merge;
|
|
714
|
+
util.lcFirst = function lcFirst(str) {
|
|
715
|
+
return str.charAt(0).toLowerCase() + str.substring(1);
|
|
1040
716
|
};
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
this
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
}
|
|
717
|
+
function newError(name) {
|
|
718
|
+
function CustomError(message, properties) {
|
|
719
|
+
if (!(this instanceof CustomError))
|
|
720
|
+
return new CustomError(message, properties);
|
|
721
|
+
Object.defineProperty(this, "message", { get: function() {
|
|
722
|
+
return message;
|
|
723
|
+
} });
|
|
724
|
+
if (Error.captureStackTrace)
|
|
725
|
+
Error.captureStackTrace(this, CustomError);
|
|
726
|
+
else
|
|
727
|
+
Object.defineProperty(this, "stack", { value: new Error().stack || "" });
|
|
728
|
+
if (properties)
|
|
729
|
+
merge(this, properties);
|
|
1055
730
|
}
|
|
1056
|
-
|
|
731
|
+
(CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError;
|
|
732
|
+
Object.defineProperty(CustomError.prototype, "name", { get: function() {
|
|
733
|
+
return name;
|
|
734
|
+
} });
|
|
735
|
+
CustomError.prototype.toString = function toString() {
|
|
736
|
+
return this.name + ": " + this.message;
|
|
737
|
+
};
|
|
738
|
+
return CustomError;
|
|
739
|
+
}
|
|
740
|
+
util.newError = newError;
|
|
741
|
+
util.ProtocolError = newError("ProtocolError");
|
|
742
|
+
util.oneOfGetter = function getOneOf(fieldNames) {
|
|
743
|
+
var fieldMap = {};
|
|
744
|
+
for (var i = 0; i < fieldNames.length; ++i)
|
|
745
|
+
fieldMap[fieldNames[i]] = 1;
|
|
746
|
+
return function() {
|
|
747
|
+
for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
|
|
748
|
+
if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
|
|
749
|
+
return keys[i2];
|
|
750
|
+
};
|
|
1057
751
|
};
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
752
|
+
util.oneOfSetter = function setOneOf(fieldNames) {
|
|
753
|
+
return function(name) {
|
|
754
|
+
for (var i = 0; i < fieldNames.length; ++i)
|
|
755
|
+
if (fieldNames[i] !== name)
|
|
756
|
+
delete this[fieldNames[i]];
|
|
757
|
+
};
|
|
758
|
+
};
|
|
759
|
+
util.toJSONOptions = {
|
|
760
|
+
longs: String,
|
|
761
|
+
enums: String,
|
|
762
|
+
bytes: String,
|
|
763
|
+
json: true
|
|
764
|
+
};
|
|
765
|
+
util._configure = function() {
|
|
766
|
+
var Buffer2 = util.Buffer;
|
|
767
|
+
if (!Buffer2) {
|
|
768
|
+
util._Buffer_from = util._Buffer_allocUnsafe = null;
|
|
769
|
+
return;
|
|
1066
770
|
}
|
|
1067
|
-
|
|
771
|
+
util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
|
|
772
|
+
function Buffer_from(value, encoding) {
|
|
773
|
+
return new Buffer2(value, encoding);
|
|
774
|
+
};
|
|
775
|
+
util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
|
|
776
|
+
function Buffer_allocUnsafe(size) {
|
|
777
|
+
return new Buffer2(size);
|
|
778
|
+
};
|
|
1068
779
|
};
|
|
1069
780
|
}
|
|
1070
781
|
});
|
|
1071
782
|
|
|
1072
|
-
// ../../node_modules
|
|
1073
|
-
var
|
|
1074
|
-
"../../node_modules
|
|
783
|
+
// ../../node_modules/protobufjs/src/writer.js
|
|
784
|
+
var require_writer = __commonJS({
|
|
785
|
+
"../../node_modules/protobufjs/src/writer.js"(exports2, module2) {
|
|
1075
786
|
"use strict";
|
|
1076
|
-
module2.exports =
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
}
|
|
1088
|
-
function writeFloat_f32_rev(val, buf, pos) {
|
|
1089
|
-
f32[0] = val;
|
|
1090
|
-
buf[pos] = f8b[3];
|
|
1091
|
-
buf[pos + 1] = f8b[2];
|
|
1092
|
-
buf[pos + 2] = f8b[1];
|
|
1093
|
-
buf[pos + 3] = f8b[0];
|
|
1094
|
-
}
|
|
1095
|
-
exports3.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev;
|
|
1096
|
-
exports3.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy;
|
|
1097
|
-
function readFloat_f32_cpy(buf, pos) {
|
|
1098
|
-
f8b[0] = buf[pos];
|
|
1099
|
-
f8b[1] = buf[pos + 1];
|
|
1100
|
-
f8b[2] = buf[pos + 2];
|
|
1101
|
-
f8b[3] = buf[pos + 3];
|
|
1102
|
-
return f32[0];
|
|
1103
|
-
}
|
|
1104
|
-
function readFloat_f32_rev(buf, pos) {
|
|
1105
|
-
f8b[3] = buf[pos];
|
|
1106
|
-
f8b[2] = buf[pos + 1];
|
|
1107
|
-
f8b[1] = buf[pos + 2];
|
|
1108
|
-
f8b[0] = buf[pos + 3];
|
|
1109
|
-
return f32[0];
|
|
1110
|
-
}
|
|
1111
|
-
exports3.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev;
|
|
1112
|
-
exports3.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy;
|
|
1113
|
-
})();
|
|
1114
|
-
else
|
|
1115
|
-
(function() {
|
|
1116
|
-
function writeFloat_ieee754(writeUint, val, buf, pos) {
|
|
1117
|
-
var sign = val < 0 ? 1 : 0;
|
|
1118
|
-
if (sign)
|
|
1119
|
-
val = -val;
|
|
1120
|
-
if (val === 0)
|
|
1121
|
-
writeUint(1 / val > 0 ? (
|
|
1122
|
-
/* positive */
|
|
1123
|
-
0
|
|
1124
|
-
) : (
|
|
1125
|
-
/* negative 0 */
|
|
1126
|
-
2147483648
|
|
1127
|
-
), buf, pos);
|
|
1128
|
-
else if (isNaN(val))
|
|
1129
|
-
writeUint(2143289344, buf, pos);
|
|
1130
|
-
else if (val > 34028234663852886e22)
|
|
1131
|
-
writeUint((sign << 31 | 2139095040) >>> 0, buf, pos);
|
|
1132
|
-
else if (val < 11754943508222875e-54)
|
|
1133
|
-
writeUint((sign << 31 | Math.round(val / 1401298464324817e-60)) >>> 0, buf, pos);
|
|
1134
|
-
else {
|
|
1135
|
-
var exponent = Math.floor(Math.log(val) / Math.LN2), mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607;
|
|
1136
|
-
writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos);
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
exports3.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE);
|
|
1140
|
-
exports3.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE);
|
|
1141
|
-
function readFloat_ieee754(readUint, buf, pos) {
|
|
1142
|
-
var uint = readUint(buf, pos), sign = (uint >> 31) * 2 + 1, exponent = uint >>> 23 & 255, mantissa = uint & 8388607;
|
|
1143
|
-
return exponent === 255 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 1401298464324817e-60 * mantissa : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608);
|
|
1144
|
-
}
|
|
1145
|
-
exports3.readFloatLE = readFloat_ieee754.bind(null, readUintLE);
|
|
1146
|
-
exports3.readFloatBE = readFloat_ieee754.bind(null, readUintBE);
|
|
1147
|
-
})();
|
|
1148
|
-
if (typeof Float64Array !== "undefined")
|
|
1149
|
-
(function() {
|
|
1150
|
-
var f64 = new Float64Array([-0]), f8b = new Uint8Array(f64.buffer), le = f8b[7] === 128;
|
|
1151
|
-
function writeDouble_f64_cpy(val, buf, pos) {
|
|
1152
|
-
f64[0] = val;
|
|
1153
|
-
buf[pos] = f8b[0];
|
|
1154
|
-
buf[pos + 1] = f8b[1];
|
|
1155
|
-
buf[pos + 2] = f8b[2];
|
|
1156
|
-
buf[pos + 3] = f8b[3];
|
|
1157
|
-
buf[pos + 4] = f8b[4];
|
|
1158
|
-
buf[pos + 5] = f8b[5];
|
|
1159
|
-
buf[pos + 6] = f8b[6];
|
|
1160
|
-
buf[pos + 7] = f8b[7];
|
|
1161
|
-
}
|
|
1162
|
-
function writeDouble_f64_rev(val, buf, pos) {
|
|
1163
|
-
f64[0] = val;
|
|
1164
|
-
buf[pos] = f8b[7];
|
|
1165
|
-
buf[pos + 1] = f8b[6];
|
|
1166
|
-
buf[pos + 2] = f8b[5];
|
|
1167
|
-
buf[pos + 3] = f8b[4];
|
|
1168
|
-
buf[pos + 4] = f8b[3];
|
|
1169
|
-
buf[pos + 5] = f8b[2];
|
|
1170
|
-
buf[pos + 6] = f8b[1];
|
|
1171
|
-
buf[pos + 7] = f8b[0];
|
|
1172
|
-
}
|
|
1173
|
-
exports3.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev;
|
|
1174
|
-
exports3.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy;
|
|
1175
|
-
function readDouble_f64_cpy(buf, pos) {
|
|
1176
|
-
f8b[0] = buf[pos];
|
|
1177
|
-
f8b[1] = buf[pos + 1];
|
|
1178
|
-
f8b[2] = buf[pos + 2];
|
|
1179
|
-
f8b[3] = buf[pos + 3];
|
|
1180
|
-
f8b[4] = buf[pos + 4];
|
|
1181
|
-
f8b[5] = buf[pos + 5];
|
|
1182
|
-
f8b[6] = buf[pos + 6];
|
|
1183
|
-
f8b[7] = buf[pos + 7];
|
|
1184
|
-
return f64[0];
|
|
1185
|
-
}
|
|
1186
|
-
function readDouble_f64_rev(buf, pos) {
|
|
1187
|
-
f8b[7] = buf[pos];
|
|
1188
|
-
f8b[6] = buf[pos + 1];
|
|
1189
|
-
f8b[5] = buf[pos + 2];
|
|
1190
|
-
f8b[4] = buf[pos + 3];
|
|
1191
|
-
f8b[3] = buf[pos + 4];
|
|
1192
|
-
f8b[2] = buf[pos + 5];
|
|
1193
|
-
f8b[1] = buf[pos + 6];
|
|
1194
|
-
f8b[0] = buf[pos + 7];
|
|
1195
|
-
return f64[0];
|
|
1196
|
-
}
|
|
1197
|
-
exports3.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev;
|
|
1198
|
-
exports3.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy;
|
|
1199
|
-
})();
|
|
1200
|
-
else
|
|
1201
|
-
(function() {
|
|
1202
|
-
function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) {
|
|
1203
|
-
var sign = val < 0 ? 1 : 0;
|
|
1204
|
-
if (sign)
|
|
1205
|
-
val = -val;
|
|
1206
|
-
if (val === 0) {
|
|
1207
|
-
writeUint(0, buf, pos + off0);
|
|
1208
|
-
writeUint(1 / val > 0 ? (
|
|
1209
|
-
/* positive */
|
|
1210
|
-
0
|
|
1211
|
-
) : (
|
|
1212
|
-
/* negative 0 */
|
|
1213
|
-
2147483648
|
|
1214
|
-
), buf, pos + off1);
|
|
1215
|
-
} else if (isNaN(val)) {
|
|
1216
|
-
writeUint(0, buf, pos + off0);
|
|
1217
|
-
writeUint(2146959360, buf, pos + off1);
|
|
1218
|
-
} else if (val > 17976931348623157e292) {
|
|
1219
|
-
writeUint(0, buf, pos + off0);
|
|
1220
|
-
writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1);
|
|
1221
|
-
} else {
|
|
1222
|
-
var mantissa;
|
|
1223
|
-
if (val < 22250738585072014e-324) {
|
|
1224
|
-
mantissa = val / 5e-324;
|
|
1225
|
-
writeUint(mantissa >>> 0, buf, pos + off0);
|
|
1226
|
-
writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1);
|
|
1227
|
-
} else {
|
|
1228
|
-
var exponent = Math.floor(Math.log(val) / Math.LN2);
|
|
1229
|
-
if (exponent === 1024)
|
|
1230
|
-
exponent = 1023;
|
|
1231
|
-
mantissa = val * Math.pow(2, -exponent);
|
|
1232
|
-
writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0);
|
|
1233
|
-
writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1);
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
exports3.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4);
|
|
1238
|
-
exports3.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0);
|
|
1239
|
-
function readDouble_ieee754(readUint, off0, off1, buf, pos) {
|
|
1240
|
-
var lo = readUint(buf, pos + off0), hi = readUint(buf, pos + off1);
|
|
1241
|
-
var sign = (hi >> 31) * 2 + 1, exponent = hi >>> 20 & 2047, mantissa = 4294967296 * (hi & 1048575) + lo;
|
|
1242
|
-
return exponent === 2047 ? mantissa ? NaN : sign * Infinity : exponent === 0 ? sign * 5e-324 * mantissa : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496);
|
|
1243
|
-
}
|
|
1244
|
-
exports3.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4);
|
|
1245
|
-
exports3.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0);
|
|
1246
|
-
})();
|
|
1247
|
-
return exports3;
|
|
787
|
+
module2.exports = Writer;
|
|
788
|
+
var util = require_minimal();
|
|
789
|
+
var BufferWriter;
|
|
790
|
+
var LongBits = util.LongBits;
|
|
791
|
+
var base64 = util.base64;
|
|
792
|
+
var utf8 = util.utf8;
|
|
793
|
+
function Op(fn, len, val) {
|
|
794
|
+
this.fn = fn;
|
|
795
|
+
this.len = len;
|
|
796
|
+
this.next = void 0;
|
|
797
|
+
this.val = val;
|
|
1248
798
|
}
|
|
1249
|
-
function
|
|
799
|
+
function noop() {
|
|
800
|
+
}
|
|
801
|
+
function State(writer) {
|
|
802
|
+
this.head = writer.head;
|
|
803
|
+
this.tail = writer.tail;
|
|
804
|
+
this.len = writer.len;
|
|
805
|
+
this.next = writer.states;
|
|
806
|
+
}
|
|
807
|
+
function Writer() {
|
|
808
|
+
this.len = 0;
|
|
809
|
+
this.head = new Op(noop, 0, 0);
|
|
810
|
+
this.tail = this.head;
|
|
811
|
+
this.states = null;
|
|
812
|
+
}
|
|
813
|
+
var create = function create2() {
|
|
814
|
+
return util.Buffer ? function create_buffer_setup() {
|
|
815
|
+
return (Writer.create = function create_buffer() {
|
|
816
|
+
return new BufferWriter();
|
|
817
|
+
})();
|
|
818
|
+
} : function create_array() {
|
|
819
|
+
return new Writer();
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
Writer.create = create();
|
|
823
|
+
Writer.alloc = function alloc(size) {
|
|
824
|
+
return new util.Array(size);
|
|
825
|
+
};
|
|
826
|
+
if (util.Array !== Array)
|
|
827
|
+
Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
|
|
828
|
+
Writer.prototype._push = function push(fn, len, val) {
|
|
829
|
+
this.tail = this.tail.next = new Op(fn, len, val);
|
|
830
|
+
this.len += len;
|
|
831
|
+
return this;
|
|
832
|
+
};
|
|
833
|
+
function writeByte(val, buf, pos) {
|
|
1250
834
|
buf[pos] = val & 255;
|
|
1251
|
-
buf[pos + 1] = val >>> 8 & 255;
|
|
1252
|
-
buf[pos + 2] = val >>> 16 & 255;
|
|
1253
|
-
buf[pos + 3] = val >>> 24;
|
|
1254
|
-
}
|
|
1255
|
-
function writeUintBE(val, buf, pos) {
|
|
1256
|
-
buf[pos] = val >>> 24;
|
|
1257
|
-
buf[pos + 1] = val >>> 16 & 255;
|
|
1258
|
-
buf[pos + 2] = val >>> 8 & 255;
|
|
1259
|
-
buf[pos + 3] = val & 255;
|
|
1260
835
|
}
|
|
1261
|
-
function
|
|
1262
|
-
|
|
836
|
+
function writeVarint32(val, buf, pos) {
|
|
837
|
+
while (val > 127) {
|
|
838
|
+
buf[pos++] = val & 127 | 128;
|
|
839
|
+
val >>>= 7;
|
|
840
|
+
}
|
|
841
|
+
buf[pos] = val;
|
|
1263
842
|
}
|
|
1264
|
-
function
|
|
1265
|
-
|
|
843
|
+
function VarintOp(len, val) {
|
|
844
|
+
this.len = len;
|
|
845
|
+
this.next = void 0;
|
|
846
|
+
this.val = val;
|
|
1266
847
|
}
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
848
|
+
VarintOp.prototype = Object.create(Op.prototype);
|
|
849
|
+
VarintOp.prototype.fn = writeVarint32;
|
|
850
|
+
Writer.prototype.uint32 = function write_uint32(value) {
|
|
851
|
+
this.len += (this.tail = this.tail.next = new VarintOp(
|
|
852
|
+
(value = value >>> 0) < 128 ? 1 : value < 16384 ? 2 : value < 2097152 ? 3 : value < 268435456 ? 4 : 5,
|
|
853
|
+
value
|
|
854
|
+
)).len;
|
|
855
|
+
return this;
|
|
856
|
+
};
|
|
857
|
+
Writer.prototype.int32 = function write_int32(value) {
|
|
858
|
+
return value < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) : this.uint32(value);
|
|
859
|
+
};
|
|
860
|
+
Writer.prototype.sint32 = function write_sint32(value) {
|
|
861
|
+
return this.uint32((value << 1 ^ value >> 31) >>> 0);
|
|
862
|
+
};
|
|
863
|
+
function writeVarint64(val, buf, pos) {
|
|
864
|
+
while (val.hi) {
|
|
865
|
+
buf[pos++] = val.lo & 127 | 128;
|
|
866
|
+
val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0;
|
|
867
|
+
val.hi >>>= 7;
|
|
1281
868
|
}
|
|
1282
|
-
|
|
869
|
+
while (val.lo > 127) {
|
|
870
|
+
buf[pos++] = val.lo & 127 | 128;
|
|
871
|
+
val.lo = val.lo >>> 7;
|
|
872
|
+
}
|
|
873
|
+
buf[pos++] = val.lo;
|
|
1283
874
|
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
875
|
+
Writer.prototype.uint64 = function write_uint64(value) {
|
|
876
|
+
var bits = LongBits.from(value);
|
|
877
|
+
return this._push(writeVarint64, bits.length(), bits);
|
|
878
|
+
};
|
|
879
|
+
Writer.prototype.int64 = Writer.prototype.uint64;
|
|
880
|
+
Writer.prototype.sint64 = function write_sint64(value) {
|
|
881
|
+
var bits = LongBits.from(value).zzEncode();
|
|
882
|
+
return this._push(writeVarint64, bits.length(), bits);
|
|
883
|
+
};
|
|
884
|
+
Writer.prototype.bool = function write_bool(value) {
|
|
885
|
+
return this._push(writeByte, 1, value ? 1 : 0);
|
|
886
|
+
};
|
|
887
|
+
function writeFixed32(val, buf, pos) {
|
|
888
|
+
buf[pos] = val & 255;
|
|
889
|
+
buf[pos + 1] = val >>> 8 & 255;
|
|
890
|
+
buf[pos + 2] = val >>> 16 & 255;
|
|
891
|
+
buf[pos + 3] = val >>> 24;
|
|
892
|
+
}
|
|
893
|
+
Writer.prototype.fixed32 = function write_fixed32(value) {
|
|
894
|
+
return this._push(writeFixed32, 4, value >>> 0);
|
|
895
|
+
};
|
|
896
|
+
Writer.prototype.sfixed32 = Writer.prototype.fixed32;
|
|
897
|
+
Writer.prototype.fixed64 = function write_fixed64(value) {
|
|
898
|
+
var bits = LongBits.from(value);
|
|
899
|
+
return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
|
|
900
|
+
};
|
|
901
|
+
Writer.prototype.sfixed64 = Writer.prototype.fixed64;
|
|
902
|
+
Writer.prototype.float = function write_float(value) {
|
|
903
|
+
return this._push(util.float.writeFloatLE, 4, value);
|
|
904
|
+
};
|
|
905
|
+
Writer.prototype.double = function write_double(value) {
|
|
906
|
+
return this._push(util.float.writeDoubleLE, 8, value);
|
|
907
|
+
};
|
|
908
|
+
var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
|
|
909
|
+
buf.set(val, pos);
|
|
910
|
+
} : function writeBytes_for(val, buf, pos) {
|
|
911
|
+
for (var i = 0; i < val.length; ++i)
|
|
912
|
+
buf[pos + i] = val[i];
|
|
913
|
+
};
|
|
914
|
+
Writer.prototype.bytes = function write_bytes(value) {
|
|
915
|
+
var len = value.length >>> 0;
|
|
916
|
+
if (!len)
|
|
917
|
+
return this._push(writeByte, 1, 0);
|
|
918
|
+
if (util.isString(value)) {
|
|
919
|
+
var buf = Writer.alloc(len = base64.length(value));
|
|
920
|
+
base64.decode(value, buf, 0);
|
|
921
|
+
value = buf;
|
|
1305
922
|
}
|
|
1306
|
-
return len;
|
|
923
|
+
return this.uint32(len)._push(writeBytes, len, value);
|
|
1307
924
|
};
|
|
1308
|
-
|
|
1309
|
-
var len =
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
i = 0;
|
|
1328
|
-
}
|
|
925
|
+
Writer.prototype.string = function write_string(value) {
|
|
926
|
+
var len = utf8.length(value);
|
|
927
|
+
return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
|
|
928
|
+
};
|
|
929
|
+
Writer.prototype.fork = function fork() {
|
|
930
|
+
this.states = new State(this);
|
|
931
|
+
this.head = this.tail = new Op(noop, 0, 0);
|
|
932
|
+
this.len = 0;
|
|
933
|
+
return this;
|
|
934
|
+
};
|
|
935
|
+
Writer.prototype.reset = function reset() {
|
|
936
|
+
if (this.states) {
|
|
937
|
+
this.head = this.states.head;
|
|
938
|
+
this.tail = this.states.tail;
|
|
939
|
+
this.len = this.states.len;
|
|
940
|
+
this.states = this.states.next;
|
|
941
|
+
} else {
|
|
942
|
+
this.head = this.tail = new Op(noop, 0, 0);
|
|
943
|
+
this.len = 0;
|
|
1329
944
|
}
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
945
|
+
return this;
|
|
946
|
+
};
|
|
947
|
+
Writer.prototype.ldelim = function ldelim() {
|
|
948
|
+
var head = this.head, tail = this.tail, len = this.len;
|
|
949
|
+
this.reset().uint32(len);
|
|
950
|
+
if (len) {
|
|
951
|
+
this.tail.next = head.next;
|
|
952
|
+
this.tail = tail;
|
|
953
|
+
this.len += len;
|
|
1334
954
|
}
|
|
1335
|
-
return
|
|
955
|
+
return this;
|
|
1336
956
|
};
|
|
1337
|
-
|
|
1338
|
-
var
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
} else if (c1 < 2048) {
|
|
1344
|
-
buffer[offset++] = c1 >> 6 | 192;
|
|
1345
|
-
buffer[offset++] = c1 & 63 | 128;
|
|
1346
|
-
} else if ((c1 & 64512) === 55296 && ((c2 = string.charCodeAt(i + 1)) & 64512) === 56320) {
|
|
1347
|
-
c1 = 65536 + ((c1 & 1023) << 10) + (c2 & 1023);
|
|
1348
|
-
++i;
|
|
1349
|
-
buffer[offset++] = c1 >> 18 | 240;
|
|
1350
|
-
buffer[offset++] = c1 >> 12 & 63 | 128;
|
|
1351
|
-
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
1352
|
-
buffer[offset++] = c1 & 63 | 128;
|
|
1353
|
-
} else {
|
|
1354
|
-
buffer[offset++] = c1 >> 12 | 224;
|
|
1355
|
-
buffer[offset++] = c1 >> 6 & 63 | 128;
|
|
1356
|
-
buffer[offset++] = c1 & 63 | 128;
|
|
1357
|
-
}
|
|
957
|
+
Writer.prototype.finish = function finish() {
|
|
958
|
+
var head = this.head.next, buf = this.constructor.alloc(this.len), pos = 0;
|
|
959
|
+
while (head) {
|
|
960
|
+
head.fn(head.val, buf, pos);
|
|
961
|
+
pos += head.len;
|
|
962
|
+
head = head.next;
|
|
1358
963
|
}
|
|
1359
|
-
return
|
|
964
|
+
return buf;
|
|
965
|
+
};
|
|
966
|
+
Writer._configure = function(BufferWriter_) {
|
|
967
|
+
BufferWriter = BufferWriter_;
|
|
968
|
+
Writer.create = create();
|
|
969
|
+
BufferWriter._configure();
|
|
1360
970
|
};
|
|
1361
971
|
}
|
|
1362
972
|
});
|
|
1363
973
|
|
|
1364
|
-
// ../../node_modules
|
|
1365
|
-
var
|
|
1366
|
-
"../../node_modules
|
|
974
|
+
// ../../node_modules/protobufjs/src/writer_buffer.js
|
|
975
|
+
var require_writer_buffer = __commonJS({
|
|
976
|
+
"../../node_modules/protobufjs/src/writer_buffer.js"(exports2, module2) {
|
|
1367
977
|
"use strict";
|
|
1368
|
-
module2.exports =
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
978
|
+
module2.exports = BufferWriter;
|
|
979
|
+
var Writer = require_writer();
|
|
980
|
+
(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
|
|
981
|
+
var util = require_minimal();
|
|
982
|
+
function BufferWriter() {
|
|
983
|
+
Writer.call(this);
|
|
984
|
+
}
|
|
985
|
+
BufferWriter._configure = function() {
|
|
986
|
+
BufferWriter.alloc = util._Buffer_allocUnsafe;
|
|
987
|
+
BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
|
|
988
|
+
buf.set(val, pos);
|
|
989
|
+
} : function writeBytesBuffer_copy(val, buf, pos) {
|
|
990
|
+
if (val.copy)
|
|
991
|
+
val.copy(buf, pos, 0, val.length);
|
|
992
|
+
else
|
|
993
|
+
for (var i = 0; i < val.length; )
|
|
994
|
+
buf[pos++] = val[i++];
|
|
1385
995
|
};
|
|
996
|
+
};
|
|
997
|
+
BufferWriter.prototype.bytes = function write_bytes_buffer(value) {
|
|
998
|
+
if (util.isString(value))
|
|
999
|
+
value = util._Buffer_from(value, "base64");
|
|
1000
|
+
var len = value.length >>> 0;
|
|
1001
|
+
this.uint32(len);
|
|
1002
|
+
if (len)
|
|
1003
|
+
this._push(BufferWriter.writeBytesBuffer, len, value);
|
|
1004
|
+
return this;
|
|
1005
|
+
};
|
|
1006
|
+
function writeStringBuffer(val, buf, pos) {
|
|
1007
|
+
if (val.length < 40)
|
|
1008
|
+
util.utf8.write(val, buf, pos);
|
|
1009
|
+
else if (buf.utf8Write)
|
|
1010
|
+
buf.utf8Write(val, pos);
|
|
1011
|
+
else
|
|
1012
|
+
buf.write(val, pos);
|
|
1386
1013
|
}
|
|
1014
|
+
BufferWriter.prototype.string = function write_string_buffer(value) {
|
|
1015
|
+
var len = util.Buffer.byteLength(value);
|
|
1016
|
+
this.uint32(len);
|
|
1017
|
+
if (len)
|
|
1018
|
+
this._push(writeStringBuffer, len, value);
|
|
1019
|
+
return this;
|
|
1020
|
+
};
|
|
1021
|
+
BufferWriter._configure();
|
|
1387
1022
|
}
|
|
1388
1023
|
});
|
|
1389
1024
|
|
|
1390
|
-
// ../../node_modules/protobufjs/src/
|
|
1391
|
-
var
|
|
1392
|
-
"../../node_modules/protobufjs/src/
|
|
1025
|
+
// ../../node_modules/protobufjs/src/reader.js
|
|
1026
|
+
var require_reader = __commonJS({
|
|
1027
|
+
"../../node_modules/protobufjs/src/reader.js"(exports2, module2) {
|
|
1393
1028
|
"use strict";
|
|
1394
|
-
module2.exports =
|
|
1029
|
+
module2.exports = Reader;
|
|
1395
1030
|
var util = require_minimal();
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1031
|
+
var BufferReader;
|
|
1032
|
+
var LongBits = util.LongBits;
|
|
1033
|
+
var utf8 = util.utf8;
|
|
1034
|
+
function indexOutOfRange(reader, writeLength) {
|
|
1035
|
+
return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
|
|
1399
1036
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1037
|
+
function Reader(buffer) {
|
|
1038
|
+
this.buf = buffer;
|
|
1039
|
+
this.pos = 0;
|
|
1040
|
+
this.len = buffer.length;
|
|
1041
|
+
}
|
|
1042
|
+
var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
|
|
1043
|
+
if (buffer instanceof Uint8Array || Array.isArray(buffer))
|
|
1044
|
+
return new Reader(buffer);
|
|
1045
|
+
throw Error("illegal buffer");
|
|
1046
|
+
} : function create_array2(buffer) {
|
|
1047
|
+
if (Array.isArray(buffer))
|
|
1048
|
+
return new Reader(buffer);
|
|
1049
|
+
throw Error("illegal buffer");
|
|
1403
1050
|
};
|
|
1404
|
-
|
|
1405
|
-
return
|
|
1051
|
+
var create = function create2() {
|
|
1052
|
+
return util.Buffer ? function create_buffer_setup(buffer) {
|
|
1053
|
+
return (Reader.create = function create_buffer(buffer2) {
|
|
1054
|
+
return util.Buffer.isBuffer(buffer2) ? new BufferReader(buffer2) : create_array(buffer2);
|
|
1055
|
+
})(buffer);
|
|
1056
|
+
} : create_array;
|
|
1406
1057
|
};
|
|
1407
|
-
|
|
1408
|
-
|
|
1058
|
+
Reader.create = create();
|
|
1059
|
+
Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
|
|
1060
|
+
util.Array.prototype.slice;
|
|
1061
|
+
Reader.prototype.uint32 = function read_uint32_setup() {
|
|
1062
|
+
var value = 4294967295;
|
|
1063
|
+
return function read_uint32() {
|
|
1064
|
+
value = (this.buf[this.pos] & 127) >>> 0;
|
|
1065
|
+
if (this.buf[this.pos++] < 128)
|
|
1066
|
+
return value;
|
|
1067
|
+
value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
|
|
1068
|
+
if (this.buf[this.pos++] < 128)
|
|
1069
|
+
return value;
|
|
1070
|
+
value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
|
|
1071
|
+
if (this.buf[this.pos++] < 128)
|
|
1072
|
+
return value;
|
|
1073
|
+
value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
|
|
1074
|
+
if (this.buf[this.pos++] < 128)
|
|
1075
|
+
return value;
|
|
1076
|
+
value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
|
|
1077
|
+
if (this.buf[this.pos++] < 128)
|
|
1078
|
+
return value;
|
|
1079
|
+
if ((this.pos += 5) > this.len) {
|
|
1080
|
+
this.pos = this.len;
|
|
1081
|
+
throw indexOutOfRange(this, 10);
|
|
1082
|
+
}
|
|
1083
|
+
return value;
|
|
1084
|
+
};
|
|
1085
|
+
}();
|
|
1086
|
+
Reader.prototype.int32 = function read_int32() {
|
|
1087
|
+
return this.uint32() | 0;
|
|
1409
1088
|
};
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1089
|
+
Reader.prototype.sint32 = function read_sint32() {
|
|
1090
|
+
var value = this.uint32();
|
|
1091
|
+
return value >>> 1 ^ -(value & 1) | 0;
|
|
1092
|
+
};
|
|
1093
|
+
function readLongVarint() {
|
|
1094
|
+
var bits = new LongBits(0, 0);
|
|
1095
|
+
var i = 0;
|
|
1096
|
+
if (this.len - this.pos > 4) {
|
|
1097
|
+
for (; i < 4; ++i) {
|
|
1098
|
+
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
|
|
1099
|
+
if (this.buf[this.pos++] < 128)
|
|
1100
|
+
return bits;
|
|
1101
|
+
}
|
|
1102
|
+
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0;
|
|
1103
|
+
bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0;
|
|
1104
|
+
if (this.buf[this.pos++] < 128)
|
|
1105
|
+
return bits;
|
|
1106
|
+
i = 0;
|
|
1107
|
+
} else {
|
|
1108
|
+
for (; i < 3; ++i) {
|
|
1109
|
+
if (this.pos >= this.len)
|
|
1110
|
+
throw indexOutOfRange(this);
|
|
1111
|
+
bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0;
|
|
1112
|
+
if (this.buf[this.pos++] < 128)
|
|
1113
|
+
return bits;
|
|
1425
1114
|
}
|
|
1115
|
+
bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
|
|
1116
|
+
return bits;
|
|
1426
1117
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1118
|
+
if (this.len - this.pos > 4) {
|
|
1119
|
+
for (; i < 5; ++i) {
|
|
1120
|
+
bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
|
|
1121
|
+
if (this.buf[this.pos++] < 128)
|
|
1122
|
+
return bits;
|
|
1123
|
+
}
|
|
1124
|
+
} else {
|
|
1125
|
+
for (; i < 5; ++i) {
|
|
1126
|
+
if (this.pos >= this.len)
|
|
1127
|
+
throw indexOutOfRange(this);
|
|
1128
|
+
bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
|
|
1129
|
+
if (this.buf[this.pos++] < 128)
|
|
1130
|
+
return bits;
|
|
1131
|
+
}
|
|
1437
1132
|
}
|
|
1438
|
-
|
|
1133
|
+
throw Error("invalid varint encoding");
|
|
1134
|
+
}
|
|
1135
|
+
Reader.prototype.bool = function read_bool() {
|
|
1136
|
+
return this.uint32() !== 0;
|
|
1439
1137
|
};
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
return this.lo + this.hi * 4294967296;
|
|
1138
|
+
function readFixed32_end(buf, end) {
|
|
1139
|
+
return (buf[end - 4] | buf[end - 3] << 8 | buf[end - 2] << 16 | buf[end - 1] << 24) >>> 0;
|
|
1140
|
+
}
|
|
1141
|
+
Reader.prototype.fixed32 = function read_fixed32() {
|
|
1142
|
+
if (this.pos + 4 > this.len)
|
|
1143
|
+
throw indexOutOfRange(this, 4);
|
|
1144
|
+
return readFixed32_end(this.buf, this.pos += 4);
|
|
1448
1145
|
};
|
|
1449
|
-
|
|
1450
|
-
|
|
1146
|
+
Reader.prototype.sfixed32 = function read_sfixed32() {
|
|
1147
|
+
if (this.pos + 4 > this.len)
|
|
1148
|
+
throw indexOutOfRange(this, 4);
|
|
1149
|
+
return readFixed32_end(this.buf, this.pos += 4) | 0;
|
|
1451
1150
|
};
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1151
|
+
function readFixed64() {
|
|
1152
|
+
if (this.pos + 8 > this.len)
|
|
1153
|
+
throw indexOutOfRange(this, 8);
|
|
1154
|
+
return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4));
|
|
1155
|
+
}
|
|
1156
|
+
Reader.prototype.float = function read_float() {
|
|
1157
|
+
if (this.pos + 4 > this.len)
|
|
1158
|
+
throw indexOutOfRange(this, 4);
|
|
1159
|
+
var value = util.float.readFloatLE(this.buf, this.pos);
|
|
1160
|
+
this.pos += 4;
|
|
1161
|
+
return value;
|
|
1460
1162
|
};
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
this
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
this.hi & 255,
|
|
1468
|
-
this.hi >>> 8 & 255,
|
|
1469
|
-
this.hi >>> 16 & 255,
|
|
1470
|
-
this.hi >>> 24
|
|
1471
|
-
);
|
|
1163
|
+
Reader.prototype.double = function read_double() {
|
|
1164
|
+
if (this.pos + 8 > this.len)
|
|
1165
|
+
throw indexOutOfRange(this, 4);
|
|
1166
|
+
var value = util.float.readDoubleLE(this.buf, this.pos);
|
|
1167
|
+
this.pos += 8;
|
|
1168
|
+
return value;
|
|
1472
1169
|
};
|
|
1473
|
-
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1476
|
-
|
|
1170
|
+
Reader.prototype.bytes = function read_bytes() {
|
|
1171
|
+
var length = this.uint32(), start = this.pos, end = this.pos + length;
|
|
1172
|
+
if (end > this.len)
|
|
1173
|
+
throw indexOutOfRange(this, length);
|
|
1174
|
+
this.pos += length;
|
|
1175
|
+
if (Array.isArray(this.buf))
|
|
1176
|
+
return this.buf.slice(start, end);
|
|
1177
|
+
return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
|
|
1178
|
+
};
|
|
1179
|
+
Reader.prototype.string = function read_string() {
|
|
1180
|
+
var bytes = this.bytes();
|
|
1181
|
+
return utf8.read(bytes, 0, bytes.length);
|
|
1182
|
+
};
|
|
1183
|
+
Reader.prototype.skip = function skip(length) {
|
|
1184
|
+
if (typeof length === "number") {
|
|
1185
|
+
if (this.pos + length > this.len)
|
|
1186
|
+
throw indexOutOfRange(this, length);
|
|
1187
|
+
this.pos += length;
|
|
1188
|
+
} else {
|
|
1189
|
+
do {
|
|
1190
|
+
if (this.pos >= this.len)
|
|
1191
|
+
throw indexOutOfRange(this);
|
|
1192
|
+
} while (this.buf[this.pos++] & 128);
|
|
1193
|
+
}
|
|
1477
1194
|
return this;
|
|
1478
1195
|
};
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1196
|
+
Reader.prototype.skipType = function(wireType) {
|
|
1197
|
+
switch (wireType) {
|
|
1198
|
+
case 0:
|
|
1199
|
+
this.skip();
|
|
1200
|
+
break;
|
|
1201
|
+
case 1:
|
|
1202
|
+
this.skip(8);
|
|
1203
|
+
break;
|
|
1204
|
+
case 2:
|
|
1205
|
+
this.skip(this.uint32());
|
|
1206
|
+
break;
|
|
1207
|
+
case 3:
|
|
1208
|
+
while ((wireType = this.uint32() & 7) !== 4) {
|
|
1209
|
+
this.skipType(wireType);
|
|
1210
|
+
}
|
|
1211
|
+
break;
|
|
1212
|
+
case 5:
|
|
1213
|
+
this.skip(4);
|
|
1214
|
+
break;
|
|
1215
|
+
default:
|
|
1216
|
+
throw Error("invalid wire type " + wireType + " at offset " + this.pos);
|
|
1217
|
+
}
|
|
1483
1218
|
return this;
|
|
1484
1219
|
};
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1220
|
+
Reader._configure = function(BufferReader_) {
|
|
1221
|
+
BufferReader = BufferReader_;
|
|
1222
|
+
Reader.create = create();
|
|
1223
|
+
BufferReader._configure();
|
|
1224
|
+
var fn = util.Long ? "toLong" : (
|
|
1225
|
+
/* istanbul ignore next */
|
|
1226
|
+
"toNumber"
|
|
1227
|
+
);
|
|
1228
|
+
util.merge(Reader.prototype, {
|
|
1229
|
+
int64: function read_int64() {
|
|
1230
|
+
return readLongVarint.call(this)[fn](false);
|
|
1231
|
+
},
|
|
1232
|
+
uint64: function read_uint64() {
|
|
1233
|
+
return readLongVarint.call(this)[fn](true);
|
|
1234
|
+
},
|
|
1235
|
+
sint64: function read_sint64() {
|
|
1236
|
+
return readLongVarint.call(this).zzDecode()[fn](false);
|
|
1237
|
+
},
|
|
1238
|
+
fixed64: function read_fixed64() {
|
|
1239
|
+
return readFixed64.call(this)[fn](true);
|
|
1240
|
+
},
|
|
1241
|
+
sfixed64: function read_sfixed64() {
|
|
1242
|
+
return readFixed64.call(this)[fn](false);
|
|
1243
|
+
}
|
|
1244
|
+
});
|
|
1488
1245
|
};
|
|
1489
1246
|
}
|
|
1490
1247
|
});
|
|
1491
1248
|
|
|
1492
|
-
// ../../node_modules/protobufjs/src/
|
|
1493
|
-
var
|
|
1494
|
-
"../../node_modules/protobufjs/src/
|
|
1249
|
+
// ../../node_modules/protobufjs/src/reader_buffer.js
|
|
1250
|
+
var require_reader_buffer = __commonJS({
|
|
1251
|
+
"../../node_modules/protobufjs/src/reader_buffer.js"(exports2, module2) {
|
|
1495
1252
|
"use strict";
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
util
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
util.global = util.isNode && global || typeof window !== "undefined" && window || typeof self !== "undefined" && self || exports2;
|
|
1507
|
-
util.emptyArray = Object.freeze ? Object.freeze([]) : (
|
|
1508
|
-
/* istanbul ignore next */
|
|
1509
|
-
[]
|
|
1510
|
-
);
|
|
1511
|
-
util.emptyObject = Object.freeze ? Object.freeze({}) : (
|
|
1512
|
-
/* istanbul ignore next */
|
|
1513
|
-
{}
|
|
1514
|
-
);
|
|
1515
|
-
util.isInteger = Number.isInteger || /* istanbul ignore next */
|
|
1516
|
-
function isInteger(value) {
|
|
1517
|
-
return typeof value === "number" && isFinite(value) && Math.floor(value) === value;
|
|
1518
|
-
};
|
|
1519
|
-
util.isString = function isString(value) {
|
|
1520
|
-
return typeof value === "string" || value instanceof String;
|
|
1521
|
-
};
|
|
1522
|
-
util.isObject = function isObject2(value) {
|
|
1523
|
-
return value && typeof value === "object";
|
|
1253
|
+
module2.exports = BufferReader;
|
|
1254
|
+
var Reader = require_reader();
|
|
1255
|
+
(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader;
|
|
1256
|
+
var util = require_minimal();
|
|
1257
|
+
function BufferReader(buffer) {
|
|
1258
|
+
Reader.call(this, buffer);
|
|
1259
|
+
}
|
|
1260
|
+
BufferReader._configure = function() {
|
|
1261
|
+
if (util.Buffer)
|
|
1262
|
+
BufferReader.prototype._slice = util.Buffer.prototype.slice;
|
|
1524
1263
|
};
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
* @param {string} prop Property name
|
|
1529
|
-
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
|
1530
|
-
*/
|
|
1531
|
-
util.isSet = function isSet5(obj, prop) {
|
|
1532
|
-
var value = obj[prop];
|
|
1533
|
-
if (value != null && obj.hasOwnProperty(prop))
|
|
1534
|
-
return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0;
|
|
1535
|
-
return false;
|
|
1264
|
+
BufferReader.prototype.string = function read_string_buffer() {
|
|
1265
|
+
var len = this.uint32();
|
|
1266
|
+
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
|
|
1536
1267
|
};
|
|
1537
|
-
|
|
1268
|
+
BufferReader._configure();
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1271
|
+
|
|
1272
|
+
// ../../node_modules/protobufjs/src/rpc/service.js
|
|
1273
|
+
var require_service = __commonJS({
|
|
1274
|
+
"../../node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
|
|
1275
|
+
"use strict";
|
|
1276
|
+
module2.exports = Service;
|
|
1277
|
+
var util = require_minimal();
|
|
1278
|
+
(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
|
|
1279
|
+
function Service(rpcImpl, requestDelimited, responseDelimited) {
|
|
1280
|
+
if (typeof rpcImpl !== "function")
|
|
1281
|
+
throw TypeError("rpcImpl must be a function");
|
|
1282
|
+
util.EventEmitter.call(this);
|
|
1283
|
+
this.rpcImpl = rpcImpl;
|
|
1284
|
+
this.requestDelimited = Boolean(requestDelimited);
|
|
1285
|
+
this.responseDelimited = Boolean(responseDelimited);
|
|
1286
|
+
}
|
|
1287
|
+
Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
|
|
1288
|
+
if (!request)
|
|
1289
|
+
throw TypeError("request must be specified");
|
|
1290
|
+
var self2 = this;
|
|
1291
|
+
if (!callback)
|
|
1292
|
+
return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
|
|
1293
|
+
if (!self2.rpcImpl) {
|
|
1294
|
+
setTimeout(function() {
|
|
1295
|
+
callback(Error("already ended"));
|
|
1296
|
+
}, 0);
|
|
1297
|
+
return void 0;
|
|
1298
|
+
}
|
|
1538
1299
|
try {
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1300
|
+
return self2.rpcImpl(
|
|
1301
|
+
method,
|
|
1302
|
+
requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
|
|
1303
|
+
function rpcCallback(err, response) {
|
|
1304
|
+
if (err) {
|
|
1305
|
+
self2.emit("error", err, method);
|
|
1306
|
+
return callback(err);
|
|
1307
|
+
}
|
|
1308
|
+
if (response === null) {
|
|
1309
|
+
self2.end(
|
|
1310
|
+
/* endedByRPC */
|
|
1311
|
+
true
|
|
1312
|
+
);
|
|
1313
|
+
return void 0;
|
|
1314
|
+
}
|
|
1315
|
+
if (!(response instanceof responseCtor)) {
|
|
1316
|
+
try {
|
|
1317
|
+
response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
|
|
1318
|
+
} catch (err2) {
|
|
1319
|
+
self2.emit("error", err2, method);
|
|
1320
|
+
return callback(err2);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
self2.emit("data", response, method);
|
|
1324
|
+
return callback(null, response);
|
|
1325
|
+
}
|
|
1543
1326
|
);
|
|
1544
|
-
} catch (
|
|
1545
|
-
|
|
1327
|
+
} catch (err) {
|
|
1328
|
+
self2.emit("error", err, method);
|
|
1329
|
+
setTimeout(function() {
|
|
1330
|
+
callback(err);
|
|
1331
|
+
}, 0);
|
|
1332
|
+
return void 0;
|
|
1546
1333
|
}
|
|
1547
|
-
}();
|
|
1548
|
-
util._Buffer_from = null;
|
|
1549
|
-
util._Buffer_allocUnsafe = null;
|
|
1550
|
-
util.newBuffer = function newBuffer(sizeOrArray) {
|
|
1551
|
-
return typeof sizeOrArray === "number" ? util.Buffer ? util._Buffer_allocUnsafe(sizeOrArray) : new util.Array(sizeOrArray) : util.Buffer ? util._Buffer_from(sizeOrArray) : typeof Uint8Array === "undefined" ? sizeOrArray : new Uint8Array(sizeOrArray);
|
|
1552
|
-
};
|
|
1553
|
-
util.Array = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
1554
|
-
util.Long = /* istanbul ignore next */
|
|
1555
|
-
util.global.dcodeIO && /* istanbul ignore next */
|
|
1556
|
-
util.global.dcodeIO.Long || /* istanbul ignore next */
|
|
1557
|
-
util.global.Long || util.inquire("long");
|
|
1558
|
-
util.key2Re = /^true|false|0|1$/;
|
|
1559
|
-
util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
|
|
1560
|
-
util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
|
|
1561
|
-
util.longToHash = function longToHash(value) {
|
|
1562
|
-
return value ? util.LongBits.from(value).toHash() : util.LongBits.zeroHash;
|
|
1563
1334
|
};
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1335
|
+
Service.prototype.end = function end(endedByRPC) {
|
|
1336
|
+
if (this.rpcImpl) {
|
|
1337
|
+
if (!endedByRPC)
|
|
1338
|
+
this.rpcImpl(null, null, null);
|
|
1339
|
+
this.rpcImpl = null;
|
|
1340
|
+
this.emit("end").off();
|
|
1341
|
+
}
|
|
1342
|
+
return this;
|
|
1569
1343
|
};
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
|
|
1347
|
+
// ../../node_modules/protobufjs/src/rpc.js
|
|
1348
|
+
var require_rpc = __commonJS({
|
|
1349
|
+
"../../node_modules/protobufjs/src/rpc.js"(exports2) {
|
|
1350
|
+
"use strict";
|
|
1351
|
+
var rpc = exports2;
|
|
1352
|
+
rpc.Service = require_service();
|
|
1353
|
+
}
|
|
1354
|
+
});
|
|
1355
|
+
|
|
1356
|
+
// ../../node_modules/protobufjs/src/roots.js
|
|
1357
|
+
var require_roots = __commonJS({
|
|
1358
|
+
"../../node_modules/protobufjs/src/roots.js"(exports2, module2) {
|
|
1359
|
+
"use strict";
|
|
1360
|
+
module2.exports = {};
|
|
1361
|
+
}
|
|
1362
|
+
});
|
|
1363
|
+
|
|
1364
|
+
// ../../node_modules/protobufjs/src/index-minimal.js
|
|
1365
|
+
var require_index_minimal = __commonJS({
|
|
1366
|
+
"../../node_modules/protobufjs/src/index-minimal.js"(exports2) {
|
|
1367
|
+
"use strict";
|
|
1368
|
+
var protobuf = exports2;
|
|
1369
|
+
protobuf.build = "minimal";
|
|
1370
|
+
protobuf.Writer = require_writer();
|
|
1371
|
+
protobuf.BufferWriter = require_writer_buffer();
|
|
1372
|
+
protobuf.Reader = require_reader();
|
|
1373
|
+
protobuf.BufferReader = require_reader_buffer();
|
|
1374
|
+
protobuf.util = require_minimal();
|
|
1375
|
+
protobuf.rpc = require_rpc();
|
|
1376
|
+
protobuf.roots = require_roots();
|
|
1377
|
+
protobuf.configure = configure;
|
|
1378
|
+
function configure() {
|
|
1379
|
+
protobuf.util._configure();
|
|
1380
|
+
protobuf.Writer._configure(protobuf.BufferWriter);
|
|
1381
|
+
protobuf.Reader._configure(protobuf.BufferReader);
|
|
1575
1382
|
}
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1383
|
+
configure();
|
|
1384
|
+
}
|
|
1385
|
+
});
|
|
1386
|
+
|
|
1387
|
+
// ../../node_modules/protobufjs/minimal.js
|
|
1388
|
+
var require_minimal2 = __commonJS({
|
|
1389
|
+
"../../node_modules/protobufjs/minimal.js"(exports2, module2) {
|
|
1390
|
+
"use strict";
|
|
1391
|
+
module2.exports = require_index_minimal();
|
|
1392
|
+
}
|
|
1393
|
+
});
|
|
1394
|
+
|
|
1395
|
+
// ../../node_modules/long/src/long.js
|
|
1396
|
+
var require_long = __commonJS({
|
|
1397
|
+
"../../node_modules/long/src/long.js"(exports2, module2) {
|
|
1398
|
+
module2.exports = Long4;
|
|
1399
|
+
var wasm = null;
|
|
1400
|
+
try {
|
|
1401
|
+
wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
|
|
1402
|
+
0,
|
|
1403
|
+
97,
|
|
1404
|
+
115,
|
|
1405
|
+
109,
|
|
1406
|
+
1,
|
|
1407
|
+
0,
|
|
1408
|
+
0,
|
|
1409
|
+
0,
|
|
1410
|
+
1,
|
|
1411
|
+
13,
|
|
1412
|
+
2,
|
|
1413
|
+
96,
|
|
1414
|
+
0,
|
|
1415
|
+
1,
|
|
1416
|
+
127,
|
|
1417
|
+
96,
|
|
1418
|
+
4,
|
|
1419
|
+
127,
|
|
1420
|
+
127,
|
|
1421
|
+
127,
|
|
1422
|
+
127,
|
|
1423
|
+
1,
|
|
1424
|
+
127,
|
|
1425
|
+
3,
|
|
1426
|
+
7,
|
|
1427
|
+
6,
|
|
1428
|
+
0,
|
|
1429
|
+
1,
|
|
1430
|
+
1,
|
|
1431
|
+
1,
|
|
1432
|
+
1,
|
|
1433
|
+
1,
|
|
1434
|
+
6,
|
|
1435
|
+
6,
|
|
1436
|
+
1,
|
|
1437
|
+
127,
|
|
1438
|
+
1,
|
|
1439
|
+
65,
|
|
1440
|
+
0,
|
|
1441
|
+
11,
|
|
1442
|
+
7,
|
|
1443
|
+
50,
|
|
1444
|
+
6,
|
|
1445
|
+
3,
|
|
1446
|
+
109,
|
|
1447
|
+
117,
|
|
1448
|
+
108,
|
|
1449
|
+
0,
|
|
1450
|
+
1,
|
|
1451
|
+
5,
|
|
1452
|
+
100,
|
|
1453
|
+
105,
|
|
1454
|
+
118,
|
|
1455
|
+
95,
|
|
1456
|
+
115,
|
|
1457
|
+
0,
|
|
1458
|
+
2,
|
|
1459
|
+
5,
|
|
1460
|
+
100,
|
|
1461
|
+
105,
|
|
1462
|
+
118,
|
|
1463
|
+
95,
|
|
1464
|
+
117,
|
|
1465
|
+
0,
|
|
1466
|
+
3,
|
|
1467
|
+
5,
|
|
1468
|
+
114,
|
|
1469
|
+
101,
|
|
1470
|
+
109,
|
|
1471
|
+
95,
|
|
1472
|
+
115,
|
|
1473
|
+
0,
|
|
1474
|
+
4,
|
|
1475
|
+
5,
|
|
1476
|
+
114,
|
|
1477
|
+
101,
|
|
1478
|
+
109,
|
|
1479
|
+
95,
|
|
1480
|
+
117,
|
|
1481
|
+
0,
|
|
1482
|
+
5,
|
|
1483
|
+
8,
|
|
1484
|
+
103,
|
|
1485
|
+
101,
|
|
1486
|
+
116,
|
|
1487
|
+
95,
|
|
1488
|
+
104,
|
|
1489
|
+
105,
|
|
1490
|
+
103,
|
|
1491
|
+
104,
|
|
1492
|
+
0,
|
|
1493
|
+
0,
|
|
1494
|
+
10,
|
|
1495
|
+
191,
|
|
1496
|
+
1,
|
|
1497
|
+
6,
|
|
1498
|
+
4,
|
|
1499
|
+
0,
|
|
1500
|
+
35,
|
|
1501
|
+
0,
|
|
1502
|
+
11,
|
|
1503
|
+
36,
|
|
1504
|
+
1,
|
|
1505
|
+
1,
|
|
1506
|
+
126,
|
|
1507
|
+
32,
|
|
1508
|
+
0,
|
|
1509
|
+
173,
|
|
1510
|
+
32,
|
|
1511
|
+
1,
|
|
1512
|
+
173,
|
|
1513
|
+
66,
|
|
1514
|
+
32,
|
|
1515
|
+
134,
|
|
1516
|
+
132,
|
|
1517
|
+
32,
|
|
1518
|
+
2,
|
|
1519
|
+
173,
|
|
1520
|
+
32,
|
|
1521
|
+
3,
|
|
1522
|
+
173,
|
|
1523
|
+
66,
|
|
1524
|
+
32,
|
|
1525
|
+
134,
|
|
1526
|
+
132,
|
|
1527
|
+
126,
|
|
1528
|
+
34,
|
|
1529
|
+
4,
|
|
1530
|
+
66,
|
|
1531
|
+
32,
|
|
1532
|
+
135,
|
|
1533
|
+
167,
|
|
1534
|
+
36,
|
|
1535
|
+
0,
|
|
1536
|
+
32,
|
|
1537
|
+
4,
|
|
1538
|
+
167,
|
|
1539
|
+
11,
|
|
1540
|
+
36,
|
|
1541
|
+
1,
|
|
1542
|
+
1,
|
|
1543
|
+
126,
|
|
1544
|
+
32,
|
|
1545
|
+
0,
|
|
1546
|
+
173,
|
|
1547
|
+
32,
|
|
1548
|
+
1,
|
|
1549
|
+
173,
|
|
1550
|
+
66,
|
|
1551
|
+
32,
|
|
1552
|
+
134,
|
|
1553
|
+
132,
|
|
1554
|
+
32,
|
|
1555
|
+
2,
|
|
1556
|
+
173,
|
|
1557
|
+
32,
|
|
1558
|
+
3,
|
|
1559
|
+
173,
|
|
1560
|
+
66,
|
|
1561
|
+
32,
|
|
1562
|
+
134,
|
|
1563
|
+
132,
|
|
1564
|
+
127,
|
|
1565
|
+
34,
|
|
1566
|
+
4,
|
|
1567
|
+
66,
|
|
1568
|
+
32,
|
|
1569
|
+
135,
|
|
1570
|
+
167,
|
|
1571
|
+
36,
|
|
1572
|
+
0,
|
|
1573
|
+
32,
|
|
1574
|
+
4,
|
|
1575
|
+
167,
|
|
1576
|
+
11,
|
|
1577
|
+
36,
|
|
1578
|
+
1,
|
|
1579
|
+
1,
|
|
1580
|
+
126,
|
|
1581
|
+
32,
|
|
1582
|
+
0,
|
|
1583
|
+
173,
|
|
1584
|
+
32,
|
|
1585
|
+
1,
|
|
1586
|
+
173,
|
|
1587
|
+
66,
|
|
1588
|
+
32,
|
|
1589
|
+
134,
|
|
1590
|
+
132,
|
|
1591
|
+
32,
|
|
1592
|
+
2,
|
|
1593
|
+
173,
|
|
1594
|
+
32,
|
|
1595
|
+
3,
|
|
1596
|
+
173,
|
|
1597
|
+
66,
|
|
1598
|
+
32,
|
|
1599
|
+
134,
|
|
1600
|
+
132,
|
|
1601
|
+
128,
|
|
1602
|
+
34,
|
|
1603
|
+
4,
|
|
1604
|
+
66,
|
|
1605
|
+
32,
|
|
1606
|
+
135,
|
|
1607
|
+
167,
|
|
1608
|
+
36,
|
|
1609
|
+
0,
|
|
1610
|
+
32,
|
|
1611
|
+
4,
|
|
1612
|
+
167,
|
|
1613
|
+
11,
|
|
1614
|
+
36,
|
|
1615
|
+
1,
|
|
1616
|
+
1,
|
|
1617
|
+
126,
|
|
1618
|
+
32,
|
|
1619
|
+
0,
|
|
1620
|
+
173,
|
|
1621
|
+
32,
|
|
1622
|
+
1,
|
|
1623
|
+
173,
|
|
1624
|
+
66,
|
|
1625
|
+
32,
|
|
1626
|
+
134,
|
|
1627
|
+
132,
|
|
1628
|
+
32,
|
|
1629
|
+
2,
|
|
1630
|
+
173,
|
|
1631
|
+
32,
|
|
1632
|
+
3,
|
|
1633
|
+
173,
|
|
1634
|
+
66,
|
|
1635
|
+
32,
|
|
1636
|
+
134,
|
|
1637
|
+
132,
|
|
1638
|
+
129,
|
|
1639
|
+
34,
|
|
1640
|
+
4,
|
|
1641
|
+
66,
|
|
1642
|
+
32,
|
|
1643
|
+
135,
|
|
1644
|
+
167,
|
|
1645
|
+
36,
|
|
1646
|
+
0,
|
|
1647
|
+
32,
|
|
1648
|
+
4,
|
|
1649
|
+
167,
|
|
1650
|
+
11,
|
|
1651
|
+
36,
|
|
1652
|
+
1,
|
|
1653
|
+
1,
|
|
1654
|
+
126,
|
|
1655
|
+
32,
|
|
1656
|
+
0,
|
|
1657
|
+
173,
|
|
1658
|
+
32,
|
|
1659
|
+
1,
|
|
1660
|
+
173,
|
|
1661
|
+
66,
|
|
1662
|
+
32,
|
|
1663
|
+
134,
|
|
1664
|
+
132,
|
|
1665
|
+
32,
|
|
1666
|
+
2,
|
|
1667
|
+
173,
|
|
1668
|
+
32,
|
|
1669
|
+
3,
|
|
1670
|
+
173,
|
|
1671
|
+
66,
|
|
1672
|
+
32,
|
|
1673
|
+
134,
|
|
1674
|
+
132,
|
|
1675
|
+
130,
|
|
1676
|
+
34,
|
|
1677
|
+
4,
|
|
1678
|
+
66,
|
|
1679
|
+
32,
|
|
1680
|
+
135,
|
|
1681
|
+
167,
|
|
1682
|
+
36,
|
|
1683
|
+
0,
|
|
1684
|
+
32,
|
|
1685
|
+
4,
|
|
1686
|
+
167,
|
|
1687
|
+
11
|
|
1688
|
+
])), {}).exports;
|
|
1689
|
+
} catch (e) {
|
|
1602
1690
|
}
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
for (var i = 0; i < fieldNames.length; ++i)
|
|
1608
|
-
fieldMap[fieldNames[i]] = 1;
|
|
1609
|
-
return function() {
|
|
1610
|
-
for (var keys = Object.keys(this), i2 = keys.length - 1; i2 > -1; --i2)
|
|
1611
|
-
if (fieldMap[keys[i2]] === 1 && this[keys[i2]] !== void 0 && this[keys[i2]] !== null)
|
|
1612
|
-
return keys[i2];
|
|
1613
|
-
};
|
|
1614
|
-
};
|
|
1615
|
-
util.oneOfSetter = function setOneOf(fieldNames) {
|
|
1616
|
-
return function(name) {
|
|
1617
|
-
for (var i = 0; i < fieldNames.length; ++i)
|
|
1618
|
-
if (fieldNames[i] !== name)
|
|
1619
|
-
delete this[fieldNames[i]];
|
|
1620
|
-
};
|
|
1621
|
-
};
|
|
1622
|
-
util.toJSONOptions = {
|
|
1623
|
-
longs: String,
|
|
1624
|
-
enums: String,
|
|
1625
|
-
bytes: String,
|
|
1626
|
-
json: true
|
|
1627
|
-
};
|
|
1628
|
-
util._configure = function() {
|
|
1629
|
-
var Buffer2 = util.Buffer;
|
|
1630
|
-
if (!Buffer2) {
|
|
1631
|
-
util._Buffer_from = util._Buffer_allocUnsafe = null;
|
|
1632
|
-
return;
|
|
1633
|
-
}
|
|
1634
|
-
util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
|
|
1635
|
-
function Buffer_from(value, encoding) {
|
|
1636
|
-
return new Buffer2(value, encoding);
|
|
1637
|
-
};
|
|
1638
|
-
util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
|
|
1639
|
-
function Buffer_allocUnsafe(size) {
|
|
1640
|
-
return new Buffer2(size);
|
|
1641
|
-
};
|
|
1642
|
-
};
|
|
1643
|
-
}
|
|
1644
|
-
});
|
|
1645
|
-
|
|
1646
|
-
// ../../node_modules/protobufjs/src/writer.js
|
|
1647
|
-
var require_writer = __commonJS({
|
|
1648
|
-
"../../node_modules/protobufjs/src/writer.js"(exports2, module2) {
|
|
1649
|
-
"use strict";
|
|
1650
|
-
module2.exports = Writer;
|
|
1651
|
-
var util = require_minimal();
|
|
1652
|
-
var BufferWriter;
|
|
1653
|
-
var LongBits = util.LongBits;
|
|
1654
|
-
var base64 = util.base64;
|
|
1655
|
-
var utf8 = util.utf8;
|
|
1656
|
-
function Op(fn, len, val) {
|
|
1657
|
-
this.fn = fn;
|
|
1658
|
-
this.len = len;
|
|
1659
|
-
this.next = void 0;
|
|
1660
|
-
this.val = val;
|
|
1691
|
+
function Long4(low, high, unsigned) {
|
|
1692
|
+
this.low = low | 0;
|
|
1693
|
+
this.high = high | 0;
|
|
1694
|
+
this.unsigned = !!unsigned;
|
|
1661
1695
|
}
|
|
1662
|
-
|
|
1696
|
+
Long4.prototype.__isLong__;
|
|
1697
|
+
Object.defineProperty(Long4.prototype, "__isLong__", { value: true });
|
|
1698
|
+
function isLong(obj) {
|
|
1699
|
+
return (obj && obj["__isLong__"]) === true;
|
|
1663
1700
|
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1701
|
+
Long4.isLong = isLong;
|
|
1702
|
+
var INT_CACHE = {};
|
|
1703
|
+
var UINT_CACHE = {};
|
|
1704
|
+
function fromInt(value, unsigned) {
|
|
1705
|
+
var obj, cachedObj, cache;
|
|
1706
|
+
if (unsigned) {
|
|
1707
|
+
value >>>= 0;
|
|
1708
|
+
if (cache = 0 <= value && value < 256) {
|
|
1709
|
+
cachedObj = UINT_CACHE[value];
|
|
1710
|
+
if (cachedObj)
|
|
1711
|
+
return cachedObj;
|
|
1712
|
+
}
|
|
1713
|
+
obj = fromBits(value, (value | 0) < 0 ? -1 : 0, true);
|
|
1714
|
+
if (cache)
|
|
1715
|
+
UINT_CACHE[value] = obj;
|
|
1716
|
+
return obj;
|
|
1717
|
+
} else {
|
|
1718
|
+
value |= 0;
|
|
1719
|
+
if (cache = -128 <= value && value < 128) {
|
|
1720
|
+
cachedObj = INT_CACHE[value];
|
|
1721
|
+
if (cachedObj)
|
|
1722
|
+
return cachedObj;
|
|
1723
|
+
}
|
|
1724
|
+
obj = fromBits(value, value < 0 ? -1 : 0, false);
|
|
1725
|
+
if (cache)
|
|
1726
|
+
INT_CACHE[value] = obj;
|
|
1727
|
+
return obj;
|
|
1728
|
+
}
|
|
1669
1729
|
}
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1730
|
+
Long4.fromInt = fromInt;
|
|
1731
|
+
function fromNumber(value, unsigned) {
|
|
1732
|
+
if (isNaN(value))
|
|
1733
|
+
return unsigned ? UZERO : ZERO;
|
|
1734
|
+
if (unsigned) {
|
|
1735
|
+
if (value < 0)
|
|
1736
|
+
return UZERO;
|
|
1737
|
+
if (value >= TWO_PWR_64_DBL)
|
|
1738
|
+
return MAX_UNSIGNED_VALUE;
|
|
1739
|
+
} else {
|
|
1740
|
+
if (value <= -TWO_PWR_63_DBL)
|
|
1741
|
+
return MIN_VALUE;
|
|
1742
|
+
if (value + 1 >= TWO_PWR_63_DBL)
|
|
1743
|
+
return MAX_VALUE;
|
|
1744
|
+
}
|
|
1745
|
+
if (value < 0)
|
|
1746
|
+
return fromNumber(-value, unsigned).neg();
|
|
1747
|
+
return fromBits(value % TWO_PWR_32_DBL | 0, value / TWO_PWR_32_DBL | 0, unsigned);
|
|
1675
1748
|
}
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
return new BufferWriter();
|
|
1680
|
-
})();
|
|
1681
|
-
} : function create_array() {
|
|
1682
|
-
return new Writer();
|
|
1683
|
-
};
|
|
1684
|
-
};
|
|
1685
|
-
Writer.create = create();
|
|
1686
|
-
Writer.alloc = function alloc(size) {
|
|
1687
|
-
return new util.Array(size);
|
|
1688
|
-
};
|
|
1689
|
-
if (util.Array !== Array)
|
|
1690
|
-
Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray);
|
|
1691
|
-
Writer.prototype._push = function push(fn, len, val) {
|
|
1692
|
-
this.tail = this.tail.next = new Op(fn, len, val);
|
|
1693
|
-
this.len += len;
|
|
1694
|
-
return this;
|
|
1695
|
-
};
|
|
1696
|
-
function writeByte(val, buf, pos) {
|
|
1697
|
-
buf[pos] = val & 255;
|
|
1749
|
+
Long4.fromNumber = fromNumber;
|
|
1750
|
+
function fromBits(lowBits, highBits, unsigned) {
|
|
1751
|
+
return new Long4(lowBits, highBits, unsigned);
|
|
1698
1752
|
}
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1753
|
+
Long4.fromBits = fromBits;
|
|
1754
|
+
var pow_dbl = Math.pow;
|
|
1755
|
+
function fromString(str, unsigned, radix) {
|
|
1756
|
+
if (str.length === 0)
|
|
1757
|
+
throw Error("empty string");
|
|
1758
|
+
if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
|
|
1759
|
+
return ZERO;
|
|
1760
|
+
if (typeof unsigned === "number") {
|
|
1761
|
+
radix = unsigned, unsigned = false;
|
|
1762
|
+
} else {
|
|
1763
|
+
unsigned = !!unsigned;
|
|
1764
|
+
}
|
|
1765
|
+
radix = radix || 10;
|
|
1766
|
+
if (radix < 2 || 36 < radix)
|
|
1767
|
+
throw RangeError("radix");
|
|
1768
|
+
var p;
|
|
1769
|
+
if ((p = str.indexOf("-")) > 0)
|
|
1770
|
+
throw Error("interior hyphen");
|
|
1771
|
+
else if (p === 0) {
|
|
1772
|
+
return fromString(str.substring(1), unsigned, radix).neg();
|
|
1773
|
+
}
|
|
1774
|
+
var radixToPower = fromNumber(pow_dbl(radix, 8));
|
|
1775
|
+
var result = ZERO;
|
|
1776
|
+
for (var i = 0; i < str.length; i += 8) {
|
|
1777
|
+
var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
|
|
1778
|
+
if (size < 8) {
|
|
1779
|
+
var power = fromNumber(pow_dbl(radix, size));
|
|
1780
|
+
result = result.mul(power).add(fromNumber(value));
|
|
1781
|
+
} else {
|
|
1782
|
+
result = result.mul(radixToPower);
|
|
1783
|
+
result = result.add(fromNumber(value));
|
|
1784
|
+
}
|
|
1703
1785
|
}
|
|
1704
|
-
|
|
1786
|
+
result.unsigned = unsigned;
|
|
1787
|
+
return result;
|
|
1705
1788
|
}
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1789
|
+
Long4.fromString = fromString;
|
|
1790
|
+
function fromValue(val, unsigned) {
|
|
1791
|
+
if (typeof val === "number")
|
|
1792
|
+
return fromNumber(val, unsigned);
|
|
1793
|
+
if (typeof val === "string")
|
|
1794
|
+
return fromString(val, unsigned);
|
|
1795
|
+
return fromBits(val.low, val.high, typeof unsigned === "boolean" ? unsigned : val.unsigned);
|
|
1710
1796
|
}
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1797
|
+
Long4.fromValue = fromValue;
|
|
1798
|
+
var TWO_PWR_16_DBL = 1 << 16;
|
|
1799
|
+
var TWO_PWR_24_DBL = 1 << 24;
|
|
1800
|
+
var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
|
|
1801
|
+
var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
|
|
1802
|
+
var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
|
|
1803
|
+
var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
|
|
1804
|
+
var ZERO = fromInt(0);
|
|
1805
|
+
Long4.ZERO = ZERO;
|
|
1806
|
+
var UZERO = fromInt(0, true);
|
|
1807
|
+
Long4.UZERO = UZERO;
|
|
1808
|
+
var ONE = fromInt(1);
|
|
1809
|
+
Long4.ONE = ONE;
|
|
1810
|
+
var UONE = fromInt(1, true);
|
|
1811
|
+
Long4.UONE = UONE;
|
|
1812
|
+
var NEG_ONE = fromInt(-1);
|
|
1813
|
+
Long4.NEG_ONE = NEG_ONE;
|
|
1814
|
+
var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
|
|
1815
|
+
Long4.MAX_VALUE = MAX_VALUE;
|
|
1816
|
+
var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
|
|
1817
|
+
Long4.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
|
|
1818
|
+
var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
|
|
1819
|
+
Long4.MIN_VALUE = MIN_VALUE;
|
|
1820
|
+
var LongPrototype = Long4.prototype;
|
|
1821
|
+
LongPrototype.toInt = function toInt() {
|
|
1822
|
+
return this.unsigned ? this.low >>> 0 : this.low;
|
|
1722
1823
|
};
|
|
1723
|
-
|
|
1724
|
-
|
|
1824
|
+
LongPrototype.toNumber = function toNumber() {
|
|
1825
|
+
if (this.unsigned)
|
|
1826
|
+
return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
|
|
1827
|
+
return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
|
|
1725
1828
|
};
|
|
1726
|
-
function
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1829
|
+
LongPrototype.toString = function toString(radix) {
|
|
1830
|
+
radix = radix || 10;
|
|
1831
|
+
if (radix < 2 || 36 < radix)
|
|
1832
|
+
throw RangeError("radix");
|
|
1833
|
+
if (this.isZero())
|
|
1834
|
+
return "0";
|
|
1835
|
+
if (this.isNegative()) {
|
|
1836
|
+
if (this.eq(MIN_VALUE)) {
|
|
1837
|
+
var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
|
|
1838
|
+
return div.toString(radix) + rem1.toInt().toString(radix);
|
|
1839
|
+
} else
|
|
1840
|
+
return "-" + this.neg().toString(radix);
|
|
1731
1841
|
}
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1842
|
+
var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
|
|
1843
|
+
var result = "";
|
|
1844
|
+
while (true) {
|
|
1845
|
+
var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
|
|
1846
|
+
rem = remDiv;
|
|
1847
|
+
if (rem.isZero())
|
|
1848
|
+
return digits + result;
|
|
1849
|
+
else {
|
|
1850
|
+
while (digits.length < 6)
|
|
1851
|
+
digits = "0" + digits;
|
|
1852
|
+
result = "" + digits + result;
|
|
1853
|
+
}
|
|
1735
1854
|
}
|
|
1736
|
-
buf[pos++] = val.lo;
|
|
1737
|
-
}
|
|
1738
|
-
Writer.prototype.uint64 = function write_uint64(value) {
|
|
1739
|
-
var bits = LongBits.from(value);
|
|
1740
|
-
return this._push(writeVarint64, bits.length(), bits);
|
|
1741
1855
|
};
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
var bits = LongBits.from(value).zzEncode();
|
|
1745
|
-
return this._push(writeVarint64, bits.length(), bits);
|
|
1856
|
+
LongPrototype.getHighBits = function getHighBits() {
|
|
1857
|
+
return this.high;
|
|
1746
1858
|
};
|
|
1747
|
-
|
|
1748
|
-
return this.
|
|
1859
|
+
LongPrototype.getHighBitsUnsigned = function getHighBitsUnsigned() {
|
|
1860
|
+
return this.high >>> 0;
|
|
1749
1861
|
};
|
|
1750
|
-
function
|
|
1751
|
-
|
|
1752
|
-
buf[pos + 1] = val >>> 8 & 255;
|
|
1753
|
-
buf[pos + 2] = val >>> 16 & 255;
|
|
1754
|
-
buf[pos + 3] = val >>> 24;
|
|
1755
|
-
}
|
|
1756
|
-
Writer.prototype.fixed32 = function write_fixed32(value) {
|
|
1757
|
-
return this._push(writeFixed32, 4, value >>> 0);
|
|
1862
|
+
LongPrototype.getLowBits = function getLowBits() {
|
|
1863
|
+
return this.low;
|
|
1758
1864
|
};
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
var bits = LongBits.from(value);
|
|
1762
|
-
return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
|
|
1865
|
+
LongPrototype.getLowBitsUnsigned = function getLowBitsUnsigned() {
|
|
1866
|
+
return this.low >>> 0;
|
|
1763
1867
|
};
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1868
|
+
LongPrototype.getNumBitsAbs = function getNumBitsAbs() {
|
|
1869
|
+
if (this.isNegative())
|
|
1870
|
+
return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
|
|
1871
|
+
var val = this.high != 0 ? this.high : this.low;
|
|
1872
|
+
for (var bit = 31; bit > 0; bit--)
|
|
1873
|
+
if ((val & 1 << bit) != 0)
|
|
1874
|
+
break;
|
|
1875
|
+
return this.high != 0 ? bit + 33 : bit + 1;
|
|
1767
1876
|
};
|
|
1768
|
-
|
|
1769
|
-
return this.
|
|
1877
|
+
LongPrototype.isZero = function isZero() {
|
|
1878
|
+
return this.high === 0 && this.low === 0;
|
|
1770
1879
|
};
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
for (var i = 0; i < val.length; ++i)
|
|
1775
|
-
buf[pos + i] = val[i];
|
|
1880
|
+
LongPrototype.eqz = LongPrototype.isZero;
|
|
1881
|
+
LongPrototype.isNegative = function isNegative() {
|
|
1882
|
+
return !this.unsigned && this.high < 0;
|
|
1776
1883
|
};
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
if (!len)
|
|
1780
|
-
return this._push(writeByte, 1, 0);
|
|
1781
|
-
if (util.isString(value)) {
|
|
1782
|
-
var buf = Writer.alloc(len = base64.length(value));
|
|
1783
|
-
base64.decode(value, buf, 0);
|
|
1784
|
-
value = buf;
|
|
1785
|
-
}
|
|
1786
|
-
return this.uint32(len)._push(writeBytes, len, value);
|
|
1884
|
+
LongPrototype.isPositive = function isPositive() {
|
|
1885
|
+
return this.unsigned || this.high >= 0;
|
|
1787
1886
|
};
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
return len ? this.uint32(len)._push(utf8.write, len, value) : this._push(writeByte, 1, 0);
|
|
1887
|
+
LongPrototype.isOdd = function isOdd() {
|
|
1888
|
+
return (this.low & 1) === 1;
|
|
1791
1889
|
};
|
|
1792
|
-
|
|
1793
|
-
this.
|
|
1794
|
-
this.head = this.tail = new Op(noop, 0, 0);
|
|
1795
|
-
this.len = 0;
|
|
1796
|
-
return this;
|
|
1890
|
+
LongPrototype.isEven = function isEven() {
|
|
1891
|
+
return (this.low & 1) === 0;
|
|
1797
1892
|
};
|
|
1798
|
-
|
|
1799
|
-
if (
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
} else {
|
|
1805
|
-
this.head = this.tail = new Op(noop, 0, 0);
|
|
1806
|
-
this.len = 0;
|
|
1807
|
-
}
|
|
1808
|
-
return this;
|
|
1893
|
+
LongPrototype.equals = function equals(other) {
|
|
1894
|
+
if (!isLong(other))
|
|
1895
|
+
other = fromValue(other);
|
|
1896
|
+
if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
|
|
1897
|
+
return false;
|
|
1898
|
+
return this.high === other.high && this.low === other.low;
|
|
1809
1899
|
};
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
this.
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
this.len += len;
|
|
1817
|
-
}
|
|
1818
|
-
return this;
|
|
1900
|
+
LongPrototype.eq = LongPrototype.equals;
|
|
1901
|
+
LongPrototype.notEquals = function notEquals(other) {
|
|
1902
|
+
return !this.eq(
|
|
1903
|
+
/* validates */
|
|
1904
|
+
other
|
|
1905
|
+
);
|
|
1819
1906
|
};
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
return buf;
|
|
1907
|
+
LongPrototype.neq = LongPrototype.notEquals;
|
|
1908
|
+
LongPrototype.ne = LongPrototype.notEquals;
|
|
1909
|
+
LongPrototype.lessThan = function lessThan(other) {
|
|
1910
|
+
return this.comp(
|
|
1911
|
+
/* validates */
|
|
1912
|
+
other
|
|
1913
|
+
) < 0;
|
|
1828
1914
|
};
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1915
|
+
LongPrototype.lt = LongPrototype.lessThan;
|
|
1916
|
+
LongPrototype.lessThanOrEqual = function lessThanOrEqual(other) {
|
|
1917
|
+
return this.comp(
|
|
1918
|
+
/* validates */
|
|
1919
|
+
other
|
|
1920
|
+
) <= 0;
|
|
1833
1921
|
};
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
module2.exports = BufferWriter;
|
|
1842
|
-
var Writer = require_writer();
|
|
1843
|
-
(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter;
|
|
1844
|
-
var util = require_minimal();
|
|
1845
|
-
function BufferWriter() {
|
|
1846
|
-
Writer.call(this);
|
|
1847
|
-
}
|
|
1848
|
-
BufferWriter._configure = function() {
|
|
1849
|
-
BufferWriter.alloc = util._Buffer_allocUnsafe;
|
|
1850
|
-
BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" ? function writeBytesBuffer_set(val, buf, pos) {
|
|
1851
|
-
buf.set(val, pos);
|
|
1852
|
-
} : function writeBytesBuffer_copy(val, buf, pos) {
|
|
1853
|
-
if (val.copy)
|
|
1854
|
-
val.copy(buf, pos, 0, val.length);
|
|
1855
|
-
else
|
|
1856
|
-
for (var i = 0; i < val.length; )
|
|
1857
|
-
buf[pos++] = val[i++];
|
|
1858
|
-
};
|
|
1922
|
+
LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
|
1923
|
+
LongPrototype.le = LongPrototype.lessThanOrEqual;
|
|
1924
|
+
LongPrototype.greaterThan = function greaterThan(other) {
|
|
1925
|
+
return this.comp(
|
|
1926
|
+
/* validates */
|
|
1927
|
+
other
|
|
1928
|
+
) > 0;
|
|
1859
1929
|
};
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
this._push(BufferWriter.writeBytesBuffer, len, value);
|
|
1867
|
-
return this;
|
|
1930
|
+
LongPrototype.gt = LongPrototype.greaterThan;
|
|
1931
|
+
LongPrototype.greaterThanOrEqual = function greaterThanOrEqual(other) {
|
|
1932
|
+
return this.comp(
|
|
1933
|
+
/* validates */
|
|
1934
|
+
other
|
|
1935
|
+
) >= 0;
|
|
1868
1936
|
};
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1937
|
+
LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
|
1938
|
+
LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
|
1939
|
+
LongPrototype.compare = function compare(other) {
|
|
1940
|
+
if (!isLong(other))
|
|
1941
|
+
other = fromValue(other);
|
|
1942
|
+
if (this.eq(other))
|
|
1943
|
+
return 0;
|
|
1944
|
+
var thisNeg = this.isNegative(), otherNeg = other.isNegative();
|
|
1945
|
+
if (thisNeg && !otherNeg)
|
|
1946
|
+
return -1;
|
|
1947
|
+
if (!thisNeg && otherNeg)
|
|
1948
|
+
return 1;
|
|
1949
|
+
if (!this.unsigned)
|
|
1950
|
+
return this.sub(other).isNegative() ? -1 : 1;
|
|
1951
|
+
return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
|
|
1883
1952
|
};
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
var require_reader = __commonJS({
|
|
1890
|
-
"../../node_modules/protobufjs/src/reader.js"(exports2, module2) {
|
|
1891
|
-
"use strict";
|
|
1892
|
-
module2.exports = Reader;
|
|
1893
|
-
var util = require_minimal();
|
|
1894
|
-
var BufferReader;
|
|
1895
|
-
var LongBits = util.LongBits;
|
|
1896
|
-
var utf8 = util.utf8;
|
|
1897
|
-
function indexOutOfRange(reader, writeLength) {
|
|
1898
|
-
return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len);
|
|
1899
|
-
}
|
|
1900
|
-
function Reader(buffer) {
|
|
1901
|
-
this.buf = buffer;
|
|
1902
|
-
this.pos = 0;
|
|
1903
|
-
this.len = buffer.length;
|
|
1904
|
-
}
|
|
1905
|
-
var create_array = typeof Uint8Array !== "undefined" ? function create_typed_array(buffer) {
|
|
1906
|
-
if (buffer instanceof Uint8Array || Array.isArray(buffer))
|
|
1907
|
-
return new Reader(buffer);
|
|
1908
|
-
throw Error("illegal buffer");
|
|
1909
|
-
} : function create_array2(buffer) {
|
|
1910
|
-
if (Array.isArray(buffer))
|
|
1911
|
-
return new Reader(buffer);
|
|
1912
|
-
throw Error("illegal buffer");
|
|
1953
|
+
LongPrototype.comp = LongPrototype.compare;
|
|
1954
|
+
LongPrototype.negate = function negate() {
|
|
1955
|
+
if (!this.unsigned && this.eq(MIN_VALUE))
|
|
1956
|
+
return MIN_VALUE;
|
|
1957
|
+
return this.not().add(ONE);
|
|
1913
1958
|
};
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1959
|
+
LongPrototype.neg = LongPrototype.negate;
|
|
1960
|
+
LongPrototype.add = function add(addend) {
|
|
1961
|
+
if (!isLong(addend))
|
|
1962
|
+
addend = fromValue(addend);
|
|
1963
|
+
var a48 = this.high >>> 16;
|
|
1964
|
+
var a32 = this.high & 65535;
|
|
1965
|
+
var a16 = this.low >>> 16;
|
|
1966
|
+
var a00 = this.low & 65535;
|
|
1967
|
+
var b48 = addend.high >>> 16;
|
|
1968
|
+
var b32 = addend.high & 65535;
|
|
1969
|
+
var b16 = addend.low >>> 16;
|
|
1970
|
+
var b00 = addend.low & 65535;
|
|
1971
|
+
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
1972
|
+
c00 += a00 + b00;
|
|
1973
|
+
c16 += c00 >>> 16;
|
|
1974
|
+
c00 &= 65535;
|
|
1975
|
+
c16 += a16 + b16;
|
|
1976
|
+
c32 += c16 >>> 16;
|
|
1977
|
+
c16 &= 65535;
|
|
1978
|
+
c32 += a32 + b32;
|
|
1979
|
+
c48 += c32 >>> 16;
|
|
1980
|
+
c32 &= 65535;
|
|
1981
|
+
c48 += a48 + b48;
|
|
1982
|
+
c48 &= 65535;
|
|
1983
|
+
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
|
1920
1984
|
};
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
var value = 4294967295;
|
|
1926
|
-
return function read_uint32() {
|
|
1927
|
-
value = (this.buf[this.pos] & 127) >>> 0;
|
|
1928
|
-
if (this.buf[this.pos++] < 128)
|
|
1929
|
-
return value;
|
|
1930
|
-
value = (value | (this.buf[this.pos] & 127) << 7) >>> 0;
|
|
1931
|
-
if (this.buf[this.pos++] < 128)
|
|
1932
|
-
return value;
|
|
1933
|
-
value = (value | (this.buf[this.pos] & 127) << 14) >>> 0;
|
|
1934
|
-
if (this.buf[this.pos++] < 128)
|
|
1935
|
-
return value;
|
|
1936
|
-
value = (value | (this.buf[this.pos] & 127) << 21) >>> 0;
|
|
1937
|
-
if (this.buf[this.pos++] < 128)
|
|
1938
|
-
return value;
|
|
1939
|
-
value = (value | (this.buf[this.pos] & 15) << 28) >>> 0;
|
|
1940
|
-
if (this.buf[this.pos++] < 128)
|
|
1941
|
-
return value;
|
|
1942
|
-
if ((this.pos += 5) > this.len) {
|
|
1943
|
-
this.pos = this.len;
|
|
1944
|
-
throw indexOutOfRange(this, 10);
|
|
1945
|
-
}
|
|
1946
|
-
return value;
|
|
1947
|
-
};
|
|
1948
|
-
}();
|
|
1949
|
-
Reader.prototype.int32 = function read_int32() {
|
|
1950
|
-
return this.uint32() | 0;
|
|
1985
|
+
LongPrototype.subtract = function subtract(subtrahend) {
|
|
1986
|
+
if (!isLong(subtrahend))
|
|
1987
|
+
subtrahend = fromValue(subtrahend);
|
|
1988
|
+
return this.add(subtrahend.neg());
|
|
1951
1989
|
};
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1990
|
+
LongPrototype.sub = LongPrototype.subtract;
|
|
1991
|
+
LongPrototype.multiply = function multiply(multiplier) {
|
|
1992
|
+
if (this.isZero())
|
|
1993
|
+
return ZERO;
|
|
1994
|
+
if (!isLong(multiplier))
|
|
1995
|
+
multiplier = fromValue(multiplier);
|
|
1996
|
+
if (wasm) {
|
|
1997
|
+
var low = wasm.mul(
|
|
1998
|
+
this.low,
|
|
1999
|
+
this.high,
|
|
2000
|
+
multiplier.low,
|
|
2001
|
+
multiplier.high
|
|
2002
|
+
);
|
|
2003
|
+
return fromBits(low, wasm.get_high(), this.unsigned);
|
|
2004
|
+
}
|
|
2005
|
+
if (multiplier.isZero())
|
|
2006
|
+
return ZERO;
|
|
2007
|
+
if (this.eq(MIN_VALUE))
|
|
2008
|
+
return multiplier.isOdd() ? MIN_VALUE : ZERO;
|
|
2009
|
+
if (multiplier.eq(MIN_VALUE))
|
|
2010
|
+
return this.isOdd() ? MIN_VALUE : ZERO;
|
|
2011
|
+
if (this.isNegative()) {
|
|
2012
|
+
if (multiplier.isNegative())
|
|
2013
|
+
return this.neg().mul(multiplier.neg());
|
|
2014
|
+
else
|
|
2015
|
+
return this.neg().mul(multiplier).neg();
|
|
2016
|
+
} else if (multiplier.isNegative())
|
|
2017
|
+
return this.mul(multiplier.neg()).neg();
|
|
2018
|
+
if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
|
|
2019
|
+
return fromNumber(this.toNumber() * multiplier.toNumber(), this.unsigned);
|
|
2020
|
+
var a48 = this.high >>> 16;
|
|
2021
|
+
var a32 = this.high & 65535;
|
|
2022
|
+
var a16 = this.low >>> 16;
|
|
2023
|
+
var a00 = this.low & 65535;
|
|
2024
|
+
var b48 = multiplier.high >>> 16;
|
|
2025
|
+
var b32 = multiplier.high & 65535;
|
|
2026
|
+
var b16 = multiplier.low >>> 16;
|
|
2027
|
+
var b00 = multiplier.low & 65535;
|
|
2028
|
+
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
2029
|
+
c00 += a00 * b00;
|
|
2030
|
+
c16 += c00 >>> 16;
|
|
2031
|
+
c00 &= 65535;
|
|
2032
|
+
c16 += a16 * b00;
|
|
2033
|
+
c32 += c16 >>> 16;
|
|
2034
|
+
c16 &= 65535;
|
|
2035
|
+
c16 += a00 * b16;
|
|
2036
|
+
c32 += c16 >>> 16;
|
|
2037
|
+
c16 &= 65535;
|
|
2038
|
+
c32 += a32 * b00;
|
|
2039
|
+
c48 += c32 >>> 16;
|
|
2040
|
+
c32 &= 65535;
|
|
2041
|
+
c32 += a16 * b16;
|
|
2042
|
+
c48 += c32 >>> 16;
|
|
2043
|
+
c32 &= 65535;
|
|
2044
|
+
c32 += a00 * b32;
|
|
2045
|
+
c48 += c32 >>> 16;
|
|
2046
|
+
c32 &= 65535;
|
|
2047
|
+
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
|
|
2048
|
+
c48 &= 65535;
|
|
2049
|
+
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
|
1955
2050
|
};
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
2051
|
+
LongPrototype.mul = LongPrototype.multiply;
|
|
2052
|
+
LongPrototype.divide = function divide(divisor) {
|
|
2053
|
+
if (!isLong(divisor))
|
|
2054
|
+
divisor = fromValue(divisor);
|
|
2055
|
+
if (divisor.isZero())
|
|
2056
|
+
throw Error("division by zero");
|
|
2057
|
+
if (wasm) {
|
|
2058
|
+
if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
|
|
2059
|
+
return this;
|
|
1964
2060
|
}
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
2061
|
+
var low = (this.unsigned ? wasm.div_u : wasm.div_s)(
|
|
2062
|
+
this.low,
|
|
2063
|
+
this.high,
|
|
2064
|
+
divisor.low,
|
|
2065
|
+
divisor.high
|
|
2066
|
+
);
|
|
2067
|
+
return fromBits(low, wasm.get_high(), this.unsigned);
|
|
2068
|
+
}
|
|
2069
|
+
if (this.isZero())
|
|
2070
|
+
return this.unsigned ? UZERO : ZERO;
|
|
2071
|
+
var approx, rem, res;
|
|
2072
|
+
if (!this.unsigned) {
|
|
2073
|
+
if (this.eq(MIN_VALUE)) {
|
|
2074
|
+
if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
|
|
2075
|
+
return MIN_VALUE;
|
|
2076
|
+
else if (divisor.eq(MIN_VALUE))
|
|
2077
|
+
return ONE;
|
|
2078
|
+
else {
|
|
2079
|
+
var halfThis = this.shr(1);
|
|
2080
|
+
approx = halfThis.div(divisor).shl(1);
|
|
2081
|
+
if (approx.eq(ZERO)) {
|
|
2082
|
+
return divisor.isNegative() ? ONE : NEG_ONE;
|
|
2083
|
+
} else {
|
|
2084
|
+
rem = this.sub(divisor.mul(approx));
|
|
2085
|
+
res = approx.add(rem.div(divisor));
|
|
2086
|
+
return res;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
} else if (divisor.eq(MIN_VALUE))
|
|
2090
|
+
return this.unsigned ? UZERO : ZERO;
|
|
2091
|
+
if (this.isNegative()) {
|
|
2092
|
+
if (divisor.isNegative())
|
|
2093
|
+
return this.neg().div(divisor.neg());
|
|
2094
|
+
return this.neg().div(divisor).neg();
|
|
2095
|
+
} else if (divisor.isNegative())
|
|
2096
|
+
return this.div(divisor.neg()).neg();
|
|
2097
|
+
res = ZERO;
|
|
1970
2098
|
} else {
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0;
|
|
1979
|
-
return bits;
|
|
2099
|
+
if (!divisor.unsigned)
|
|
2100
|
+
divisor = divisor.toUnsigned();
|
|
2101
|
+
if (divisor.gt(this))
|
|
2102
|
+
return UZERO;
|
|
2103
|
+
if (divisor.gt(this.shru(1)))
|
|
2104
|
+
return UONE;
|
|
2105
|
+
res = UZERO;
|
|
1980
2106
|
}
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
if (this.pos >= this.len)
|
|
1990
|
-
throw indexOutOfRange(this);
|
|
1991
|
-
bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0;
|
|
1992
|
-
if (this.buf[this.pos++] < 128)
|
|
1993
|
-
return bits;
|
|
2107
|
+
rem = this;
|
|
2108
|
+
while (rem.gte(divisor)) {
|
|
2109
|
+
approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
|
|
2110
|
+
var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
|
|
2111
|
+
while (approxRem.isNegative() || approxRem.gt(rem)) {
|
|
2112
|
+
approx -= delta;
|
|
2113
|
+
approxRes = fromNumber(approx, this.unsigned);
|
|
2114
|
+
approxRem = approxRes.mul(divisor);
|
|
1994
2115
|
}
|
|
2116
|
+
if (approxRes.isZero())
|
|
2117
|
+
approxRes = ONE;
|
|
2118
|
+
res = res.add(approxRes);
|
|
2119
|
+
rem = rem.sub(approxRem);
|
|
1995
2120
|
}
|
|
1996
|
-
|
|
1997
|
-
}
|
|
1998
|
-
Reader.prototype.bool = function read_bool() {
|
|
1999
|
-
return this.uint32() !== 0;
|
|
2121
|
+
return res;
|
|
2000
2122
|
};
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
if (
|
|
2006
|
-
|
|
2007
|
-
|
|
2123
|
+
LongPrototype.div = LongPrototype.divide;
|
|
2124
|
+
LongPrototype.modulo = function modulo(divisor) {
|
|
2125
|
+
if (!isLong(divisor))
|
|
2126
|
+
divisor = fromValue(divisor);
|
|
2127
|
+
if (wasm) {
|
|
2128
|
+
var low = (this.unsigned ? wasm.rem_u : wasm.rem_s)(
|
|
2129
|
+
this.low,
|
|
2130
|
+
this.high,
|
|
2131
|
+
divisor.low,
|
|
2132
|
+
divisor.high
|
|
2133
|
+
);
|
|
2134
|
+
return fromBits(low, wasm.get_high(), this.unsigned);
|
|
2135
|
+
}
|
|
2136
|
+
return this.sub(this.div(divisor).mul(divisor));
|
|
2008
2137
|
};
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
return
|
|
2138
|
+
LongPrototype.mod = LongPrototype.modulo;
|
|
2139
|
+
LongPrototype.rem = LongPrototype.modulo;
|
|
2140
|
+
LongPrototype.not = function not() {
|
|
2141
|
+
return fromBits(~this.low, ~this.high, this.unsigned);
|
|
2013
2142
|
};
|
|
2014
|
-
function
|
|
2015
|
-
if (
|
|
2016
|
-
|
|
2017
|
-
return
|
|
2018
|
-
}
|
|
2019
|
-
Reader.prototype.float = function read_float() {
|
|
2020
|
-
if (this.pos + 4 > this.len)
|
|
2021
|
-
throw indexOutOfRange(this, 4);
|
|
2022
|
-
var value = util.float.readFloatLE(this.buf, this.pos);
|
|
2023
|
-
this.pos += 4;
|
|
2024
|
-
return value;
|
|
2143
|
+
LongPrototype.and = function and(other) {
|
|
2144
|
+
if (!isLong(other))
|
|
2145
|
+
other = fromValue(other);
|
|
2146
|
+
return fromBits(this.low & other.low, this.high & other.high, this.unsigned);
|
|
2025
2147
|
};
|
|
2026
|
-
|
|
2027
|
-
if (
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
this.pos += 8;
|
|
2031
|
-
return value;
|
|
2148
|
+
LongPrototype.or = function or(other) {
|
|
2149
|
+
if (!isLong(other))
|
|
2150
|
+
other = fromValue(other);
|
|
2151
|
+
return fromBits(this.low | other.low, this.high | other.high, this.unsigned);
|
|
2032
2152
|
};
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
this.pos += length;
|
|
2038
|
-
if (Array.isArray(this.buf))
|
|
2039
|
-
return this.buf.slice(start, end);
|
|
2040
|
-
return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
|
|
2153
|
+
LongPrototype.xor = function xor(other) {
|
|
2154
|
+
if (!isLong(other))
|
|
2155
|
+
other = fromValue(other);
|
|
2156
|
+
return fromBits(this.low ^ other.low, this.high ^ other.high, this.unsigned);
|
|
2041
2157
|
};
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2158
|
+
LongPrototype.shiftLeft = function shiftLeft(numBits) {
|
|
2159
|
+
if (isLong(numBits))
|
|
2160
|
+
numBits = numBits.toInt();
|
|
2161
|
+
if ((numBits &= 63) === 0)
|
|
2162
|
+
return this;
|
|
2163
|
+
else if (numBits < 32)
|
|
2164
|
+
return fromBits(this.low << numBits, this.high << numBits | this.low >>> 32 - numBits, this.unsigned);
|
|
2165
|
+
else
|
|
2166
|
+
return fromBits(0, this.low << numBits - 32, this.unsigned);
|
|
2045
2167
|
};
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
}
|
|
2057
|
-
return this;
|
|
2168
|
+
LongPrototype.shl = LongPrototype.shiftLeft;
|
|
2169
|
+
LongPrototype.shiftRight = function shiftRight(numBits) {
|
|
2170
|
+
if (isLong(numBits))
|
|
2171
|
+
numBits = numBits.toInt();
|
|
2172
|
+
if ((numBits &= 63) === 0)
|
|
2173
|
+
return this;
|
|
2174
|
+
else if (numBits < 32)
|
|
2175
|
+
return fromBits(this.low >>> numBits | this.high << 32 - numBits, this.high >> numBits, this.unsigned);
|
|
2176
|
+
else
|
|
2177
|
+
return fromBits(this.high >> numBits - 32, this.high >= 0 ? 0 : -1, this.unsigned);
|
|
2058
2178
|
};
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
case 5:
|
|
2076
|
-
this.skip(4);
|
|
2077
|
-
break;
|
|
2078
|
-
default:
|
|
2079
|
-
throw Error("invalid wire type " + wireType + " at offset " + this.pos);
|
|
2179
|
+
LongPrototype.shr = LongPrototype.shiftRight;
|
|
2180
|
+
LongPrototype.shiftRightUnsigned = function shiftRightUnsigned(numBits) {
|
|
2181
|
+
if (isLong(numBits))
|
|
2182
|
+
numBits = numBits.toInt();
|
|
2183
|
+
numBits &= 63;
|
|
2184
|
+
if (numBits === 0)
|
|
2185
|
+
return this;
|
|
2186
|
+
else {
|
|
2187
|
+
var high = this.high;
|
|
2188
|
+
if (numBits < 32) {
|
|
2189
|
+
var low = this.low;
|
|
2190
|
+
return fromBits(low >>> numBits | high << 32 - numBits, high >>> numBits, this.unsigned);
|
|
2191
|
+
} else if (numBits === 32)
|
|
2192
|
+
return fromBits(high, 0, this.unsigned);
|
|
2193
|
+
else
|
|
2194
|
+
return fromBits(high >>> numBits - 32, 0, this.unsigned);
|
|
2080
2195
|
}
|
|
2081
|
-
return this;
|
|
2082
2196
|
};
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
"toNumber"
|
|
2090
|
-
);
|
|
2091
|
-
util.merge(Reader.prototype, {
|
|
2092
|
-
int64: function read_int64() {
|
|
2093
|
-
return readLongVarint.call(this)[fn](false);
|
|
2094
|
-
},
|
|
2095
|
-
uint64: function read_uint64() {
|
|
2096
|
-
return readLongVarint.call(this)[fn](true);
|
|
2097
|
-
},
|
|
2098
|
-
sint64: function read_sint64() {
|
|
2099
|
-
return readLongVarint.call(this).zzDecode()[fn](false);
|
|
2100
|
-
},
|
|
2101
|
-
fixed64: function read_fixed64() {
|
|
2102
|
-
return readFixed64.call(this)[fn](true);
|
|
2103
|
-
},
|
|
2104
|
-
sfixed64: function read_sfixed64() {
|
|
2105
|
-
return readFixed64.call(this)[fn](false);
|
|
2106
|
-
}
|
|
2107
|
-
});
|
|
2197
|
+
LongPrototype.shru = LongPrototype.shiftRightUnsigned;
|
|
2198
|
+
LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
|
|
2199
|
+
LongPrototype.toSigned = function toSigned() {
|
|
2200
|
+
if (!this.unsigned)
|
|
2201
|
+
return this;
|
|
2202
|
+
return fromBits(this.low, this.high, false);
|
|
2108
2203
|
};
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2204
|
+
LongPrototype.toUnsigned = function toUnsigned() {
|
|
2205
|
+
if (this.unsigned)
|
|
2206
|
+
return this;
|
|
2207
|
+
return fromBits(this.low, this.high, true);
|
|
2208
|
+
};
|
|
2209
|
+
LongPrototype.toBytes = function toBytes(le) {
|
|
2210
|
+
return le ? this.toBytesLE() : this.toBytesBE();
|
|
2211
|
+
};
|
|
2212
|
+
LongPrototype.toBytesLE = function toBytesLE() {
|
|
2213
|
+
var hi = this.high, lo = this.low;
|
|
2214
|
+
return [
|
|
2215
|
+
lo & 255,
|
|
2216
|
+
lo >>> 8 & 255,
|
|
2217
|
+
lo >>> 16 & 255,
|
|
2218
|
+
lo >>> 24,
|
|
2219
|
+
hi & 255,
|
|
2220
|
+
hi >>> 8 & 255,
|
|
2221
|
+
hi >>> 16 & 255,
|
|
2222
|
+
hi >>> 24
|
|
2223
|
+
];
|
|
2224
|
+
};
|
|
2225
|
+
LongPrototype.toBytesBE = function toBytesBE() {
|
|
2226
|
+
var hi = this.high, lo = this.low;
|
|
2227
|
+
return [
|
|
2228
|
+
hi >>> 24,
|
|
2229
|
+
hi >>> 16 & 255,
|
|
2230
|
+
hi >>> 8 & 255,
|
|
2231
|
+
hi & 255,
|
|
2232
|
+
lo >>> 24,
|
|
2233
|
+
lo >>> 16 & 255,
|
|
2234
|
+
lo >>> 8 & 255,
|
|
2235
|
+
lo & 255
|
|
2236
|
+
];
|
|
2126
2237
|
};
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len));
|
|
2238
|
+
Long4.fromBytes = function fromBytes(bytes, unsigned, le) {
|
|
2239
|
+
return le ? Long4.fromBytesLE(bytes, unsigned) : Long4.fromBytesBE(bytes, unsigned);
|
|
2130
2240
|
};
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
"../../node_modules/protobufjs/src/rpc/service.js"(exports2, module2) {
|
|
2138
|
-
"use strict";
|
|
2139
|
-
module2.exports = Service;
|
|
2140
|
-
var util = require_minimal();
|
|
2141
|
-
(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service;
|
|
2142
|
-
function Service(rpcImpl, requestDelimited, responseDelimited) {
|
|
2143
|
-
if (typeof rpcImpl !== "function")
|
|
2144
|
-
throw TypeError("rpcImpl must be a function");
|
|
2145
|
-
util.EventEmitter.call(this);
|
|
2146
|
-
this.rpcImpl = rpcImpl;
|
|
2147
|
-
this.requestDelimited = Boolean(requestDelimited);
|
|
2148
|
-
this.responseDelimited = Boolean(responseDelimited);
|
|
2149
|
-
}
|
|
2150
|
-
Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) {
|
|
2151
|
-
if (!request)
|
|
2152
|
-
throw TypeError("request must be specified");
|
|
2153
|
-
var self2 = this;
|
|
2154
|
-
if (!callback)
|
|
2155
|
-
return util.asPromise(rpcCall, self2, method, requestCtor, responseCtor, request);
|
|
2156
|
-
if (!self2.rpcImpl) {
|
|
2157
|
-
setTimeout(function() {
|
|
2158
|
-
callback(Error("already ended"));
|
|
2159
|
-
}, 0);
|
|
2160
|
-
return void 0;
|
|
2161
|
-
}
|
|
2162
|
-
try {
|
|
2163
|
-
return self2.rpcImpl(
|
|
2164
|
-
method,
|
|
2165
|
-
requestCtor[self2.requestDelimited ? "encodeDelimited" : "encode"](request).finish(),
|
|
2166
|
-
function rpcCallback(err, response) {
|
|
2167
|
-
if (err) {
|
|
2168
|
-
self2.emit("error", err, method);
|
|
2169
|
-
return callback(err);
|
|
2170
|
-
}
|
|
2171
|
-
if (response === null) {
|
|
2172
|
-
self2.end(
|
|
2173
|
-
/* endedByRPC */
|
|
2174
|
-
true
|
|
2175
|
-
);
|
|
2176
|
-
return void 0;
|
|
2177
|
-
}
|
|
2178
|
-
if (!(response instanceof responseCtor)) {
|
|
2179
|
-
try {
|
|
2180
|
-
response = responseCtor[self2.responseDelimited ? "decodeDelimited" : "decode"](response);
|
|
2181
|
-
} catch (err2) {
|
|
2182
|
-
self2.emit("error", err2, method);
|
|
2183
|
-
return callback(err2);
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
self2.emit("data", response, method);
|
|
2187
|
-
return callback(null, response);
|
|
2188
|
-
}
|
|
2189
|
-
);
|
|
2190
|
-
} catch (err) {
|
|
2191
|
-
self2.emit("error", err, method);
|
|
2192
|
-
setTimeout(function() {
|
|
2193
|
-
callback(err);
|
|
2194
|
-
}, 0);
|
|
2195
|
-
return void 0;
|
|
2196
|
-
}
|
|
2241
|
+
Long4.fromBytesLE = function fromBytesLE(bytes, unsigned) {
|
|
2242
|
+
return new Long4(
|
|
2243
|
+
bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
|
|
2244
|
+
bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
|
|
2245
|
+
unsigned
|
|
2246
|
+
);
|
|
2197
2247
|
};
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
}
|
|
2205
|
-
return this;
|
|
2248
|
+
Long4.fromBytesBE = function fromBytesBE(bytes, unsigned) {
|
|
2249
|
+
return new Long4(
|
|
2250
|
+
bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
|
|
2251
|
+
bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
|
|
2252
|
+
unsigned
|
|
2253
|
+
);
|
|
2206
2254
|
};
|
|
2207
2255
|
}
|
|
2208
2256
|
});
|
|
2209
2257
|
|
|
2210
|
-
// ../../node_modules/protobufjs/src/rpc.js
|
|
2211
|
-
var require_rpc = __commonJS({
|
|
2212
|
-
"../../node_modules/protobufjs/src/rpc.js"(exports2) {
|
|
2213
|
-
"use strict";
|
|
2214
|
-
var rpc = exports2;
|
|
2215
|
-
rpc.Service = require_service();
|
|
2216
|
-
}
|
|
2217
|
-
});
|
|
2218
|
-
|
|
2219
|
-
// ../../node_modules/protobufjs/src/roots.js
|
|
2220
|
-
var require_roots = __commonJS({
|
|
2221
|
-
"../../node_modules/protobufjs/src/roots.js"(exports2, module2) {
|
|
2222
|
-
"use strict";
|
|
2223
|
-
module2.exports = {};
|
|
2224
|
-
}
|
|
2225
|
-
});
|
|
2226
|
-
|
|
2227
|
-
// ../../node_modules/protobufjs/src/index-minimal.js
|
|
2228
|
-
var require_index_minimal = __commonJS({
|
|
2229
|
-
"../../node_modules/protobufjs/src/index-minimal.js"(exports2) {
|
|
2230
|
-
"use strict";
|
|
2231
|
-
var protobuf = exports2;
|
|
2232
|
-
protobuf.build = "minimal";
|
|
2233
|
-
protobuf.Writer = require_writer();
|
|
2234
|
-
protobuf.BufferWriter = require_writer_buffer();
|
|
2235
|
-
protobuf.Reader = require_reader();
|
|
2236
|
-
protobuf.BufferReader = require_reader_buffer();
|
|
2237
|
-
protobuf.util = require_minimal();
|
|
2238
|
-
protobuf.rpc = require_rpc();
|
|
2239
|
-
protobuf.roots = require_roots();
|
|
2240
|
-
protobuf.configure = configure;
|
|
2241
|
-
function configure() {
|
|
2242
|
-
protobuf.util._configure();
|
|
2243
|
-
protobuf.Writer._configure(protobuf.BufferWriter);
|
|
2244
|
-
protobuf.Reader._configure(protobuf.BufferReader);
|
|
2245
|
-
}
|
|
2246
|
-
configure();
|
|
2247
|
-
}
|
|
2248
|
-
});
|
|
2249
|
-
|
|
2250
|
-
// ../../node_modules/protobufjs/minimal.js
|
|
2251
|
-
var require_minimal2 = __commonJS({
|
|
2252
|
-
"../../node_modules/protobufjs/minimal.js"(exports2, module2) {
|
|
2253
|
-
"use strict";
|
|
2254
|
-
module2.exports = require_index_minimal();
|
|
2255
|
-
}
|
|
2256
|
-
});
|
|
2257
|
-
|
|
2258
2258
|
// rtapi/realtime.ts
|
|
2259
|
-
var import_long4 = __toESM(require_long());
|
|
2260
2259
|
var import_minimal5 = __toESM(require_minimal2());
|
|
2261
2260
|
|
|
2262
2261
|
// api/api.ts
|
|
@@ -6575,7 +6574,8 @@ function createBaseEnvelope() {
|
|
|
6575
6574
|
webhook_event: void 0,
|
|
6576
6575
|
noti_user_channel: void 0,
|
|
6577
6576
|
join_channel_app_data: void 0,
|
|
6578
|
-
canvas_event: void 0
|
|
6577
|
+
canvas_event: void 0,
|
|
6578
|
+
unpin_message_event: void 0
|
|
6579
6579
|
};
|
|
6580
6580
|
}
|
|
6581
6581
|
var Envelope = {
|
|
@@ -6802,6 +6802,9 @@ var Envelope = {
|
|
|
6802
6802
|
if (message.canvas_event !== void 0) {
|
|
6803
6803
|
ChannelCanvas.encode(message.canvas_event, writer.uint32(594).fork()).ldelim();
|
|
6804
6804
|
}
|
|
6805
|
+
if (message.unpin_message_event !== void 0) {
|
|
6806
|
+
UnpinMessageEvent.encode(message.unpin_message_event, writer.uint32(602).fork()).ldelim();
|
|
6807
|
+
}
|
|
6805
6808
|
return writer;
|
|
6806
6809
|
},
|
|
6807
6810
|
decode(input, length) {
|
|
@@ -7255,6 +7258,12 @@ var Envelope = {
|
|
|
7255
7258
|
}
|
|
7256
7259
|
message.canvas_event = ChannelCanvas.decode(reader, reader.uint32());
|
|
7257
7260
|
continue;
|
|
7261
|
+
case 75:
|
|
7262
|
+
if (tag !== 602) {
|
|
7263
|
+
break;
|
|
7264
|
+
}
|
|
7265
|
+
message.unpin_message_event = UnpinMessageEvent.decode(reader, reader.uint32());
|
|
7266
|
+
continue;
|
|
7258
7267
|
}
|
|
7259
7268
|
if ((tag & 7) === 4 || tag === 0) {
|
|
7260
7269
|
break;
|
|
@@ -7338,7 +7347,8 @@ var Envelope = {
|
|
|
7338
7347
|
webhook_event: isSet4(object.webhook_event) ? Webhook.fromJSON(object.webhook_event) : void 0,
|
|
7339
7348
|
noti_user_channel: isSet4(object.noti_user_channel) ? NotificationUserChannel.fromJSON(object.noti_user_channel) : void 0,
|
|
7340
7349
|
join_channel_app_data: isSet4(object.join_channel_app_data) ? JoinChannelAppData.fromJSON(object.join_channel_app_data) : void 0,
|
|
7341
|
-
canvas_event: isSet4(object.canvas_event) ? ChannelCanvas.fromJSON(object.canvas_event) : void 0
|
|
7350
|
+
canvas_event: isSet4(object.canvas_event) ? ChannelCanvas.fromJSON(object.canvas_event) : void 0,
|
|
7351
|
+
unpin_message_event: isSet4(object.unpin_message_event) ? UnpinMessageEvent.fromJSON(object.unpin_message_event) : void 0
|
|
7342
7352
|
};
|
|
7343
7353
|
},
|
|
7344
7354
|
toJSON(message) {
|
|
@@ -7565,6 +7575,9 @@ var Envelope = {
|
|
|
7565
7575
|
if (message.canvas_event !== void 0) {
|
|
7566
7576
|
obj.canvas_event = ChannelCanvas.toJSON(message.canvas_event);
|
|
7567
7577
|
}
|
|
7578
|
+
if (message.unpin_message_event !== void 0) {
|
|
7579
|
+
obj.unpin_message_event = UnpinMessageEvent.toJSON(message.unpin_message_event);
|
|
7580
|
+
}
|
|
7568
7581
|
return obj;
|
|
7569
7582
|
},
|
|
7570
7583
|
create(base) {
|
|
@@ -7647,6 +7660,7 @@ var Envelope = {
|
|
|
7647
7660
|
message.noti_user_channel = object.noti_user_channel !== void 0 && object.noti_user_channel !== null ? NotificationUserChannel.fromPartial(object.noti_user_channel) : void 0;
|
|
7648
7661
|
message.join_channel_app_data = object.join_channel_app_data !== void 0 && object.join_channel_app_data !== null ? JoinChannelAppData.fromPartial(object.join_channel_app_data) : void 0;
|
|
7649
7662
|
message.canvas_event = object.canvas_event !== void 0 && object.canvas_event !== null ? ChannelCanvas.fromPartial(object.canvas_event) : void 0;
|
|
7663
|
+
message.unpin_message_event = object.unpin_message_event !== void 0 && object.unpin_message_event !== null ? UnpinMessageEvent.fromPartial(object.unpin_message_event) : void 0;
|
|
7650
7664
|
return message;
|
|
7651
7665
|
}
|
|
7652
7666
|
};
|
|
@@ -13679,11 +13693,9 @@ var UserProfileRedis = {
|
|
|
13679
13693
|
if (message.is_disabled !== false) {
|
|
13680
13694
|
writer.uint32(88).bool(message.is_disabled);
|
|
13681
13695
|
}
|
|
13682
|
-
writer.uint32(98).fork();
|
|
13683
13696
|
for (const v of message.joined_clans) {
|
|
13684
|
-
writer.
|
|
13697
|
+
writer.uint32(98).string(v);
|
|
13685
13698
|
}
|
|
13686
|
-
writer.ldelim();
|
|
13687
13699
|
return writer;
|
|
13688
13700
|
},
|
|
13689
13701
|
decode(input, length) {
|
|
@@ -13760,18 +13772,11 @@ var UserProfileRedis = {
|
|
|
13760
13772
|
message.is_disabled = reader.bool();
|
|
13761
13773
|
continue;
|
|
13762
13774
|
case 12:
|
|
13763
|
-
if (tag
|
|
13764
|
-
|
|
13765
|
-
continue;
|
|
13766
|
-
}
|
|
13767
|
-
if (tag === 98) {
|
|
13768
|
-
const end2 = reader.uint32() + reader.pos;
|
|
13769
|
-
while (reader.pos < end2) {
|
|
13770
|
-
message.joined_clans.push(longToNumber3(reader.int64()));
|
|
13771
|
-
}
|
|
13772
|
-
continue;
|
|
13775
|
+
if (tag !== 98) {
|
|
13776
|
+
break;
|
|
13773
13777
|
}
|
|
13774
|
-
|
|
13778
|
+
message.joined_clans.push(reader.string());
|
|
13779
|
+
continue;
|
|
13775
13780
|
}
|
|
13776
13781
|
if ((tag & 7) === 4 || tag === 0) {
|
|
13777
13782
|
break;
|
|
@@ -13793,7 +13798,7 @@ var UserProfileRedis = {
|
|
|
13793
13798
|
online: isSet4(object.online) ? globalThis.Boolean(object.online) : false,
|
|
13794
13799
|
metadata: isSet4(object.metadata) ? globalThis.String(object.metadata) : "",
|
|
13795
13800
|
is_disabled: isSet4(object.is_disabled) ? globalThis.Boolean(object.is_disabled) : false,
|
|
13796
|
-
joined_clans: globalThis.Array.isArray(object == null ? void 0 : object.joined_clans) ? object.joined_clans.map((e) => globalThis.
|
|
13801
|
+
joined_clans: globalThis.Array.isArray(object == null ? void 0 : object.joined_clans) ? object.joined_clans.map((e) => globalThis.String(e)) : []
|
|
13797
13802
|
};
|
|
13798
13803
|
},
|
|
13799
13804
|
toJSON(message) {
|
|
@@ -13833,7 +13838,7 @@ var UserProfileRedis = {
|
|
|
13833
13838
|
obj.is_disabled = message.is_disabled;
|
|
13834
13839
|
}
|
|
13835
13840
|
if ((_b = message.joined_clans) == null ? void 0 : _b.length) {
|
|
13836
|
-
obj.joined_clans = message.joined_clans
|
|
13841
|
+
obj.joined_clans = message.joined_clans;
|
|
13837
13842
|
}
|
|
13838
13843
|
return obj;
|
|
13839
13844
|
},
|
|
@@ -15213,6 +15218,101 @@ var JoinChannelAppData = {
|
|
|
15213
15218
|
return message;
|
|
15214
15219
|
}
|
|
15215
15220
|
};
|
|
15221
|
+
function createBaseUnpinMessageEvent() {
|
|
15222
|
+
return { id: "", message_id: "", channel_id: "", clan_id: "" };
|
|
15223
|
+
}
|
|
15224
|
+
var UnpinMessageEvent = {
|
|
15225
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
|
15226
|
+
if (message.id !== "") {
|
|
15227
|
+
writer.uint32(10).string(message.id);
|
|
15228
|
+
}
|
|
15229
|
+
if (message.message_id !== "") {
|
|
15230
|
+
writer.uint32(18).string(message.message_id);
|
|
15231
|
+
}
|
|
15232
|
+
if (message.channel_id !== "") {
|
|
15233
|
+
writer.uint32(26).string(message.channel_id);
|
|
15234
|
+
}
|
|
15235
|
+
if (message.clan_id !== "") {
|
|
15236
|
+
writer.uint32(34).string(message.clan_id);
|
|
15237
|
+
}
|
|
15238
|
+
return writer;
|
|
15239
|
+
},
|
|
15240
|
+
decode(input, length) {
|
|
15241
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
|
15242
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
15243
|
+
const message = createBaseUnpinMessageEvent();
|
|
15244
|
+
while (reader.pos < end) {
|
|
15245
|
+
const tag = reader.uint32();
|
|
15246
|
+
switch (tag >>> 3) {
|
|
15247
|
+
case 1:
|
|
15248
|
+
if (tag !== 10) {
|
|
15249
|
+
break;
|
|
15250
|
+
}
|
|
15251
|
+
message.id = reader.string();
|
|
15252
|
+
continue;
|
|
15253
|
+
case 2:
|
|
15254
|
+
if (tag !== 18) {
|
|
15255
|
+
break;
|
|
15256
|
+
}
|
|
15257
|
+
message.message_id = reader.string();
|
|
15258
|
+
continue;
|
|
15259
|
+
case 3:
|
|
15260
|
+
if (tag !== 26) {
|
|
15261
|
+
break;
|
|
15262
|
+
}
|
|
15263
|
+
message.channel_id = reader.string();
|
|
15264
|
+
continue;
|
|
15265
|
+
case 4:
|
|
15266
|
+
if (tag !== 34) {
|
|
15267
|
+
break;
|
|
15268
|
+
}
|
|
15269
|
+
message.clan_id = reader.string();
|
|
15270
|
+
continue;
|
|
15271
|
+
}
|
|
15272
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
15273
|
+
break;
|
|
15274
|
+
}
|
|
15275
|
+
reader.skipType(tag & 7);
|
|
15276
|
+
}
|
|
15277
|
+
return message;
|
|
15278
|
+
},
|
|
15279
|
+
fromJSON(object) {
|
|
15280
|
+
return {
|
|
15281
|
+
id: isSet4(object.id) ? globalThis.String(object.id) : "",
|
|
15282
|
+
message_id: isSet4(object.message_id) ? globalThis.String(object.message_id) : "",
|
|
15283
|
+
channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
|
|
15284
|
+
clan_id: isSet4(object.clan_id) ? globalThis.String(object.clan_id) : ""
|
|
15285
|
+
};
|
|
15286
|
+
},
|
|
15287
|
+
toJSON(message) {
|
|
15288
|
+
const obj = {};
|
|
15289
|
+
if (message.id !== "") {
|
|
15290
|
+
obj.id = message.id;
|
|
15291
|
+
}
|
|
15292
|
+
if (message.message_id !== "") {
|
|
15293
|
+
obj.message_id = message.message_id;
|
|
15294
|
+
}
|
|
15295
|
+
if (message.channel_id !== "") {
|
|
15296
|
+
obj.channel_id = message.channel_id;
|
|
15297
|
+
}
|
|
15298
|
+
if (message.clan_id !== "") {
|
|
15299
|
+
obj.clan_id = message.clan_id;
|
|
15300
|
+
}
|
|
15301
|
+
return obj;
|
|
15302
|
+
},
|
|
15303
|
+
create(base) {
|
|
15304
|
+
return UnpinMessageEvent.fromPartial(base != null ? base : {});
|
|
15305
|
+
},
|
|
15306
|
+
fromPartial(object) {
|
|
15307
|
+
var _a, _b, _c, _d;
|
|
15308
|
+
const message = createBaseUnpinMessageEvent();
|
|
15309
|
+
message.id = (_a = object.id) != null ? _a : "";
|
|
15310
|
+
message.message_id = (_b = object.message_id) != null ? _b : "";
|
|
15311
|
+
message.channel_id = (_c = object.channel_id) != null ? _c : "";
|
|
15312
|
+
message.clan_id = (_d = object.clan_id) != null ? _d : "";
|
|
15313
|
+
return message;
|
|
15314
|
+
}
|
|
15315
|
+
};
|
|
15216
15316
|
function toTimestamp2(date) {
|
|
15217
15317
|
const seconds = Math.trunc(date.getTime() / 1e3);
|
|
15218
15318
|
const nanos = date.getTime() % 1e3 * 1e6;
|
|
@@ -15232,19 +15332,6 @@ function fromJsonTimestamp2(o) {
|
|
|
15232
15332
|
return fromTimestamp2(Timestamp.fromJSON(o));
|
|
15233
15333
|
}
|
|
15234
15334
|
}
|
|
15235
|
-
function longToNumber3(long) {
|
|
15236
|
-
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
15237
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
15238
|
-
}
|
|
15239
|
-
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
15240
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
15241
|
-
}
|
|
15242
|
-
return long.toNumber();
|
|
15243
|
-
}
|
|
15244
|
-
if (import_minimal5.default.util.Long !== import_long4.default) {
|
|
15245
|
-
import_minimal5.default.util.Long = import_long4.default;
|
|
15246
|
-
import_minimal5.default.configure();
|
|
15247
|
-
}
|
|
15248
15335
|
function isObject(value) {
|
|
15249
15336
|
return typeof value === "object" && value !== null;
|
|
15250
15337
|
}
|