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