@deck.gl/carto 9.4.0-alpha.1 → 9.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cartoPropertiesTile-worker.js +115 -163
- package/dist/cartoRasterTile-worker.js +107 -153
- package/dist/cartoSpatialTile-worker.js +123 -175
- package/dist/cartoVectorTile-worker.js +191 -301
- package/dist/dist.dev.js +872 -1514
- package/dist/index.cjs +19283 -212
- package/dist/index.cjs.map +3 -4
- package/dist/layers/h3-tile-layer.d.ts.map +1 -1
- package/dist/layers/quadbin-tile-layer.d.ts.map +1 -1
- package/dist/layers/raster-tile-layer.d.ts.map +1 -1
- package/dist/layers/schema/carto-properties-tile-loader.js +1 -1
- package/dist/layers/schema/carto-properties-tile-loader.js.map +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js +1 -1
- package/dist/layers/schema/carto-raster-tile-loader.js.map +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js +1 -1
- package/dist/layers/schema/carto-spatial-tile-loader.js.map +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js +1 -1
- package/dist/layers/schema/carto-vector-tile-loader.js.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist.min.js +10 -10
- package/package.json +9 -5
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
-
|
|
10
|
+
try {
|
|
11
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw mod = 0, e;
|
|
14
|
+
}
|
|
11
15
|
};
|
|
12
16
|
var __copyProps = (to, from, except, desc) => {
|
|
13
17
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
@@ -2068,8 +2072,7 @@
|
|
|
2068
2072
|
var Z_DEFAULT_STRATEGY = 0;
|
|
2069
2073
|
var Z_DEFLATED = 8;
|
|
2070
2074
|
function Deflate(options) {
|
|
2071
|
-
if (!(this instanceof Deflate))
|
|
2072
|
-
return new Deflate(options);
|
|
2075
|
+
if (!(this instanceof Deflate)) return new Deflate(options);
|
|
2073
2076
|
this.options = utils.assign({
|
|
2074
2077
|
level: Z_DEFAULT_COMPRESSION,
|
|
2075
2078
|
method: Z_DEFLATED,
|
|
@@ -3134,6 +3137,7 @@
|
|
|
3134
3137
|
hold = 0;
|
|
3135
3138
|
bits = 0;
|
|
3136
3139
|
state.mode = TIME;
|
|
3140
|
+
/* falls through */
|
|
3137
3141
|
case TIME:
|
|
3138
3142
|
while (bits < 32) {
|
|
3139
3143
|
if (have === 0) {
|
|
@@ -3156,6 +3160,7 @@
|
|
|
3156
3160
|
hold = 0;
|
|
3157
3161
|
bits = 0;
|
|
3158
3162
|
state.mode = OS;
|
|
3163
|
+
/* falls through */
|
|
3159
3164
|
case OS:
|
|
3160
3165
|
while (bits < 16) {
|
|
3161
3166
|
if (have === 0) {
|
|
@@ -3177,6 +3182,7 @@
|
|
|
3177
3182
|
hold = 0;
|
|
3178
3183
|
bits = 0;
|
|
3179
3184
|
state.mode = EXLEN;
|
|
3185
|
+
/* falls through */
|
|
3180
3186
|
case EXLEN:
|
|
3181
3187
|
if (state.flags & 1024) {
|
|
3182
3188
|
while (bits < 16) {
|
|
@@ -3202,6 +3208,7 @@
|
|
|
3202
3208
|
state.head.extra = null;
|
|
3203
3209
|
}
|
|
3204
3210
|
state.mode = EXTRA;
|
|
3211
|
+
/* falls through */
|
|
3205
3212
|
case EXTRA:
|
|
3206
3213
|
if (state.flags & 1024) {
|
|
3207
3214
|
copy = state.length;
|
|
@@ -3238,6 +3245,7 @@
|
|
|
3238
3245
|
}
|
|
3239
3246
|
state.length = 0;
|
|
3240
3247
|
state.mode = NAME;
|
|
3248
|
+
/* falls through */
|
|
3241
3249
|
case NAME:
|
|
3242
3250
|
if (state.flags & 2048) {
|
|
3243
3251
|
if (have === 0) {
|
|
@@ -3263,6 +3271,7 @@
|
|
|
3263
3271
|
}
|
|
3264
3272
|
state.length = 0;
|
|
3265
3273
|
state.mode = COMMENT;
|
|
3274
|
+
/* falls through */
|
|
3266
3275
|
case COMMENT:
|
|
3267
3276
|
if (state.flags & 4096) {
|
|
3268
3277
|
if (have === 0) {
|
|
@@ -3287,6 +3296,7 @@
|
|
|
3287
3296
|
state.head.comment = null;
|
|
3288
3297
|
}
|
|
3289
3298
|
state.mode = HCRC;
|
|
3299
|
+
/* falls through */
|
|
3290
3300
|
case HCRC:
|
|
3291
3301
|
if (state.flags & 512) {
|
|
3292
3302
|
while (bits < 16) {
|
|
@@ -3325,6 +3335,7 @@
|
|
|
3325
3335
|
hold = 0;
|
|
3326
3336
|
bits = 0;
|
|
3327
3337
|
state.mode = DICT;
|
|
3338
|
+
/* falls through */
|
|
3328
3339
|
case DICT:
|
|
3329
3340
|
if (state.havedict === 0) {
|
|
3330
3341
|
strm.next_out = put;
|
|
@@ -3337,10 +3348,12 @@
|
|
|
3337
3348
|
}
|
|
3338
3349
|
strm.adler = state.check = 1;
|
|
3339
3350
|
state.mode = TYPE;
|
|
3351
|
+
/* falls through */
|
|
3340
3352
|
case TYPE:
|
|
3341
3353
|
if (flush === Z_BLOCK || flush === Z_TREES) {
|
|
3342
3354
|
break inf_leave;
|
|
3343
3355
|
}
|
|
3356
|
+
/* falls through */
|
|
3344
3357
|
case TYPEDO:
|
|
3345
3358
|
if (state.last) {
|
|
3346
3359
|
hold >>>= bits & 7;
|
|
@@ -3405,8 +3418,10 @@
|
|
|
3405
3418
|
if (flush === Z_TREES) {
|
|
3406
3419
|
break inf_leave;
|
|
3407
3420
|
}
|
|
3421
|
+
/* falls through */
|
|
3408
3422
|
case COPY_:
|
|
3409
3423
|
state.mode = COPY;
|
|
3424
|
+
/* falls through */
|
|
3410
3425
|
case COPY:
|
|
3411
3426
|
copy = state.length;
|
|
3412
3427
|
if (copy) {
|
|
@@ -3454,6 +3469,7 @@
|
|
|
3454
3469
|
}
|
|
3455
3470
|
state.have = 0;
|
|
3456
3471
|
state.mode = LENLENS;
|
|
3472
|
+
/* falls through */
|
|
3457
3473
|
case LENLENS:
|
|
3458
3474
|
while (state.have < state.ncode) {
|
|
3459
3475
|
while (bits < 3) {
|
|
@@ -3483,6 +3499,7 @@
|
|
|
3483
3499
|
}
|
|
3484
3500
|
state.have = 0;
|
|
3485
3501
|
state.mode = CODELENS;
|
|
3502
|
+
/* falls through */
|
|
3486
3503
|
case CODELENS:
|
|
3487
3504
|
while (state.have < state.nlen + state.ndist) {
|
|
3488
3505
|
for (; ; ) {
|
|
@@ -3600,8 +3617,10 @@
|
|
|
3600
3617
|
if (flush === Z_TREES) {
|
|
3601
3618
|
break inf_leave;
|
|
3602
3619
|
}
|
|
3620
|
+
/* falls through */
|
|
3603
3621
|
case LEN_:
|
|
3604
3622
|
state.mode = LEN;
|
|
3623
|
+
/* falls through */
|
|
3605
3624
|
case LEN:
|
|
3606
3625
|
if (have >= 6 && left >= 258) {
|
|
3607
3626
|
strm.next_out = put;
|
|
@@ -3683,6 +3702,7 @@
|
|
|
3683
3702
|
}
|
|
3684
3703
|
state.extra = here_op & 15;
|
|
3685
3704
|
state.mode = LENEXT;
|
|
3705
|
+
/* falls through */
|
|
3686
3706
|
case LENEXT:
|
|
3687
3707
|
if (state.extra) {
|
|
3688
3708
|
n = state.extra;
|
|
@@ -3701,6 +3721,7 @@
|
|
|
3701
3721
|
}
|
|
3702
3722
|
state.was = state.length;
|
|
3703
3723
|
state.mode = DIST;
|
|
3724
|
+
/* falls through */
|
|
3704
3725
|
case DIST:
|
|
3705
3726
|
for (; ; ) {
|
|
3706
3727
|
here = state.distcode[hold & (1 << state.distbits) - 1];
|
|
@@ -3751,6 +3772,7 @@
|
|
|
3751
3772
|
state.offset = here_val;
|
|
3752
3773
|
state.extra = here_op & 15;
|
|
3753
3774
|
state.mode = DISTEXT;
|
|
3775
|
+
/* falls through */
|
|
3754
3776
|
case DISTEXT:
|
|
3755
3777
|
if (state.extra) {
|
|
3756
3778
|
n = state.extra;
|
|
@@ -3773,6 +3795,7 @@
|
|
|
3773
3795
|
break;
|
|
3774
3796
|
}
|
|
3775
3797
|
state.mode = MATCH;
|
|
3798
|
+
/* falls through */
|
|
3776
3799
|
case MATCH:
|
|
3777
3800
|
if (left === 0) {
|
|
3778
3801
|
break inf_leave;
|
|
@@ -3849,6 +3872,7 @@
|
|
|
3849
3872
|
bits = 0;
|
|
3850
3873
|
}
|
|
3851
3874
|
state.mode = LENGTH;
|
|
3875
|
+
/* falls through */
|
|
3852
3876
|
case LENGTH:
|
|
3853
3877
|
if (state.wrap && state.flags) {
|
|
3854
3878
|
while (bits < 32) {
|
|
@@ -3868,6 +3892,7 @@
|
|
|
3868
3892
|
bits = 0;
|
|
3869
3893
|
}
|
|
3870
3894
|
state.mode = DONE;
|
|
3895
|
+
/* falls through */
|
|
3871
3896
|
case DONE:
|
|
3872
3897
|
ret = Z_STREAM_END;
|
|
3873
3898
|
break inf_leave;
|
|
@@ -3877,6 +3902,7 @@
|
|
|
3877
3902
|
case MEM:
|
|
3878
3903
|
return Z_MEM_ERROR;
|
|
3879
3904
|
case SYNC:
|
|
3905
|
+
/* falls through */
|
|
3880
3906
|
default:
|
|
3881
3907
|
return Z_STREAM_ERROR;
|
|
3882
3908
|
}
|
|
@@ -4052,8 +4078,7 @@
|
|
|
4052
4078
|
var GZheader = require_gzheader();
|
|
4053
4079
|
var toString = Object.prototype.toString;
|
|
4054
4080
|
function Inflate(options) {
|
|
4055
|
-
if (!(this instanceof Inflate))
|
|
4056
|
-
return new Inflate(options);
|
|
4081
|
+
if (!(this instanceof Inflate)) return new Inflate(options);
|
|
4057
4082
|
this.options = utils.assign({
|
|
4058
4083
|
chunkSize: 16384,
|
|
4059
4084
|
windowBits: 0,
|
|
@@ -4348,8 +4373,7 @@
|
|
|
4348
4373
|
var val = this.readVarint(), tag = val >> 3, startPos = this.pos;
|
|
4349
4374
|
this.type = val & 7;
|
|
4350
4375
|
readField(tag, result, this);
|
|
4351
|
-
if (this.pos === startPos)
|
|
4352
|
-
this.skip(val);
|
|
4376
|
+
if (this.pos === startPos) this.skip(val);
|
|
4353
4377
|
}
|
|
4354
4378
|
return result;
|
|
4355
4379
|
},
|
|
@@ -4391,20 +4415,16 @@
|
|
|
4391
4415
|
var buf = this.buf, val, b;
|
|
4392
4416
|
b = buf[this.pos++];
|
|
4393
4417
|
val = b & 127;
|
|
4394
|
-
if (b < 128)
|
|
4395
|
-
return val;
|
|
4418
|
+
if (b < 128) return val;
|
|
4396
4419
|
b = buf[this.pos++];
|
|
4397
4420
|
val |= (b & 127) << 7;
|
|
4398
|
-
if (b < 128)
|
|
4399
|
-
return val;
|
|
4421
|
+
if (b < 128) return val;
|
|
4400
4422
|
b = buf[this.pos++];
|
|
4401
4423
|
val |= (b & 127) << 14;
|
|
4402
|
-
if (b < 128)
|
|
4403
|
-
return val;
|
|
4424
|
+
if (b < 128) return val;
|
|
4404
4425
|
b = buf[this.pos++];
|
|
4405
4426
|
val |= (b & 127) << 21;
|
|
4406
|
-
if (b < 128)
|
|
4407
|
-
return val;
|
|
4427
|
+
if (b < 128) return val;
|
|
4408
4428
|
b = buf[this.pos];
|
|
4409
4429
|
val |= (b & 15) << 28;
|
|
4410
4430
|
return readVarintRemainder(val, isSigned, this);
|
|
@@ -4435,99 +4455,76 @@
|
|
|
4435
4455
|
},
|
|
4436
4456
|
// verbose for performance reasons; doesn't affect gzipped size
|
|
4437
4457
|
readPackedVarint: function(arr, isSigned) {
|
|
4438
|
-
if (this.type !== Pbf.Bytes)
|
|
4439
|
-
return arr.push(this.readVarint(isSigned));
|
|
4458
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));
|
|
4440
4459
|
var end = readPackedEnd(this);
|
|
4441
4460
|
arr = arr || [];
|
|
4442
|
-
while (this.pos < end)
|
|
4443
|
-
arr.push(this.readVarint(isSigned));
|
|
4461
|
+
while (this.pos < end) arr.push(this.readVarint(isSigned));
|
|
4444
4462
|
return arr;
|
|
4445
4463
|
},
|
|
4446
4464
|
readPackedSVarint: function(arr) {
|
|
4447
|
-
if (this.type !== Pbf.Bytes)
|
|
4448
|
-
return arr.push(this.readSVarint());
|
|
4465
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());
|
|
4449
4466
|
var end = readPackedEnd(this);
|
|
4450
4467
|
arr = arr || [];
|
|
4451
|
-
while (this.pos < end)
|
|
4452
|
-
arr.push(this.readSVarint());
|
|
4468
|
+
while (this.pos < end) arr.push(this.readSVarint());
|
|
4453
4469
|
return arr;
|
|
4454
4470
|
},
|
|
4455
4471
|
readPackedBoolean: function(arr) {
|
|
4456
|
-
if (this.type !== Pbf.Bytes)
|
|
4457
|
-
return arr.push(this.readBoolean());
|
|
4472
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());
|
|
4458
4473
|
var end = readPackedEnd(this);
|
|
4459
4474
|
arr = arr || [];
|
|
4460
|
-
while (this.pos < end)
|
|
4461
|
-
arr.push(this.readBoolean());
|
|
4475
|
+
while (this.pos < end) arr.push(this.readBoolean());
|
|
4462
4476
|
return arr;
|
|
4463
4477
|
},
|
|
4464
4478
|
readPackedFloat: function(arr) {
|
|
4465
|
-
if (this.type !== Pbf.Bytes)
|
|
4466
|
-
return arr.push(this.readFloat());
|
|
4479
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());
|
|
4467
4480
|
var end = readPackedEnd(this);
|
|
4468
4481
|
arr = arr || [];
|
|
4469
|
-
while (this.pos < end)
|
|
4470
|
-
arr.push(this.readFloat());
|
|
4482
|
+
while (this.pos < end) arr.push(this.readFloat());
|
|
4471
4483
|
return arr;
|
|
4472
4484
|
},
|
|
4473
4485
|
readPackedDouble: function(arr) {
|
|
4474
|
-
if (this.type !== Pbf.Bytes)
|
|
4475
|
-
return arr.push(this.readDouble());
|
|
4486
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());
|
|
4476
4487
|
var end = readPackedEnd(this);
|
|
4477
4488
|
arr = arr || [];
|
|
4478
|
-
while (this.pos < end)
|
|
4479
|
-
arr.push(this.readDouble());
|
|
4489
|
+
while (this.pos < end) arr.push(this.readDouble());
|
|
4480
4490
|
return arr;
|
|
4481
4491
|
},
|
|
4482
4492
|
readPackedFixed32: function(arr) {
|
|
4483
|
-
if (this.type !== Pbf.Bytes)
|
|
4484
|
-
return arr.push(this.readFixed32());
|
|
4493
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());
|
|
4485
4494
|
var end = readPackedEnd(this);
|
|
4486
4495
|
arr = arr || [];
|
|
4487
|
-
while (this.pos < end)
|
|
4488
|
-
arr.push(this.readFixed32());
|
|
4496
|
+
while (this.pos < end) arr.push(this.readFixed32());
|
|
4489
4497
|
return arr;
|
|
4490
4498
|
},
|
|
4491
4499
|
readPackedSFixed32: function(arr) {
|
|
4492
|
-
if (this.type !== Pbf.Bytes)
|
|
4493
|
-
return arr.push(this.readSFixed32());
|
|
4500
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());
|
|
4494
4501
|
var end = readPackedEnd(this);
|
|
4495
4502
|
arr = arr || [];
|
|
4496
|
-
while (this.pos < end)
|
|
4497
|
-
arr.push(this.readSFixed32());
|
|
4503
|
+
while (this.pos < end) arr.push(this.readSFixed32());
|
|
4498
4504
|
return arr;
|
|
4499
4505
|
},
|
|
4500
4506
|
readPackedFixed64: function(arr) {
|
|
4501
|
-
if (this.type !== Pbf.Bytes)
|
|
4502
|
-
return arr.push(this.readFixed64());
|
|
4507
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());
|
|
4503
4508
|
var end = readPackedEnd(this);
|
|
4504
4509
|
arr = arr || [];
|
|
4505
|
-
while (this.pos < end)
|
|
4506
|
-
arr.push(this.readFixed64());
|
|
4510
|
+
while (this.pos < end) arr.push(this.readFixed64());
|
|
4507
4511
|
return arr;
|
|
4508
4512
|
},
|
|
4509
4513
|
readPackedSFixed64: function(arr) {
|
|
4510
|
-
if (this.type !== Pbf.Bytes)
|
|
4511
|
-
return arr.push(this.readSFixed64());
|
|
4514
|
+
if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());
|
|
4512
4515
|
var end = readPackedEnd(this);
|
|
4513
4516
|
arr = arr || [];
|
|
4514
|
-
while (this.pos < end)
|
|
4515
|
-
arr.push(this.readSFixed64());
|
|
4517
|
+
while (this.pos < end) arr.push(this.readSFixed64());
|
|
4516
4518
|
return arr;
|
|
4517
4519
|
},
|
|
4518
4520
|
skip: function(val) {
|
|
4519
4521
|
var type = val & 7;
|
|
4520
|
-
if (type === Pbf.Varint)
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
else if (type === Pbf.
|
|
4524
|
-
|
|
4525
|
-
else
|
|
4526
|
-
this.pos += 4;
|
|
4527
|
-
else if (type === Pbf.Fixed64)
|
|
4528
|
-
this.pos += 8;
|
|
4529
|
-
else
|
|
4530
|
-
throw new Error("Unimplemented type: " + type);
|
|
4522
|
+
if (type === Pbf.Varint) while (this.buf[this.pos++] > 127) {
|
|
4523
|
+
}
|
|
4524
|
+
else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;
|
|
4525
|
+
else if (type === Pbf.Fixed32) this.pos += 4;
|
|
4526
|
+
else if (type === Pbf.Fixed64) this.pos += 8;
|
|
4527
|
+
else throw new Error("Unimplemented type: " + type);
|
|
4531
4528
|
},
|
|
4532
4529
|
// === WRITING =================================================================
|
|
4533
4530
|
writeTag: function(tag, type) {
|
|
@@ -4535,8 +4532,7 @@
|
|
|
4535
4532
|
},
|
|
4536
4533
|
realloc: function(min) {
|
|
4537
4534
|
var length = this.length || 16;
|
|
4538
|
-
while (length < this.pos + min)
|
|
4539
|
-
length *= 2;
|
|
4535
|
+
while (length < this.pos + min) length *= 2;
|
|
4540
4536
|
if (length !== this.length) {
|
|
4541
4537
|
var buf = new Uint8Array(length);
|
|
4542
4538
|
buf.set(this.buf);
|
|
@@ -4579,14 +4575,11 @@
|
|
|
4579
4575
|
}
|
|
4580
4576
|
this.realloc(4);
|
|
4581
4577
|
this.buf[this.pos++] = val & 127 | (val > 127 ? 128 : 0);
|
|
4582
|
-
if (val <= 127)
|
|
4583
|
-
return;
|
|
4578
|
+
if (val <= 127) return;
|
|
4584
4579
|
this.buf[this.pos++] = (val >>>= 7) & 127 | (val > 127 ? 128 : 0);
|
|
4585
|
-
if (val <= 127)
|
|
4586
|
-
return;
|
|
4580
|
+
if (val <= 127) return;
|
|
4587
4581
|
this.buf[this.pos++] = (val >>>= 7) & 127 | (val > 127 ? 128 : 0);
|
|
4588
|
-
if (val <= 127)
|
|
4589
|
-
return;
|
|
4582
|
+
if (val <= 127) return;
|
|
4590
4583
|
this.buf[this.pos++] = val >>> 7 & 127;
|
|
4591
4584
|
},
|
|
4592
4585
|
writeSVarint: function(val) {
|
|
@@ -4602,8 +4595,7 @@
|
|
|
4602
4595
|
var startPos = this.pos;
|
|
4603
4596
|
this.pos = writeUtf8(this.buf, str, this.pos);
|
|
4604
4597
|
var len = this.pos - startPos;
|
|
4605
|
-
if (len >= 128)
|
|
4606
|
-
makeRoomForExtraLength(startPos, len, this);
|
|
4598
|
+
if (len >= 128) makeRoomForExtraLength(startPos, len, this);
|
|
4607
4599
|
this.pos = startPos - 1;
|
|
4608
4600
|
this.writeVarint(len);
|
|
4609
4601
|
this.pos += len;
|
|
@@ -4622,16 +4614,14 @@
|
|
|
4622
4614
|
var len = buffer.length;
|
|
4623
4615
|
this.writeVarint(len);
|
|
4624
4616
|
this.realloc(len);
|
|
4625
|
-
for (var i = 0; i < len; i++)
|
|
4626
|
-
this.buf[this.pos++] = buffer[i];
|
|
4617
|
+
for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];
|
|
4627
4618
|
},
|
|
4628
4619
|
writeRawMessage: function(fn, obj) {
|
|
4629
4620
|
this.pos++;
|
|
4630
4621
|
var startPos = this.pos;
|
|
4631
4622
|
fn(obj, this);
|
|
4632
4623
|
var len = this.pos - startPos;
|
|
4633
|
-
if (len >= 128)
|
|
4634
|
-
makeRoomForExtraLength(startPos, len, this);
|
|
4624
|
+
if (len >= 128) makeRoomForExtraLength(startPos, len, this);
|
|
4635
4625
|
this.pos = startPos - 1;
|
|
4636
4626
|
this.writeVarint(len);
|
|
4637
4627
|
this.pos += len;
|
|
@@ -4641,40 +4631,31 @@
|
|
|
4641
4631
|
this.writeRawMessage(fn, obj);
|
|
4642
4632
|
},
|
|
4643
4633
|
writePackedVarint: function(tag, arr) {
|
|
4644
|
-
if (arr.length)
|
|
4645
|
-
this.writeMessage(tag, writePackedVarint, arr);
|
|
4634
|
+
if (arr.length) this.writeMessage(tag, writePackedVarint, arr);
|
|
4646
4635
|
},
|
|
4647
4636
|
writePackedSVarint: function(tag, arr) {
|
|
4648
|
-
if (arr.length)
|
|
4649
|
-
this.writeMessage(tag, writePackedSVarint, arr);
|
|
4637
|
+
if (arr.length) this.writeMessage(tag, writePackedSVarint, arr);
|
|
4650
4638
|
},
|
|
4651
4639
|
writePackedBoolean: function(tag, arr) {
|
|
4652
|
-
if (arr.length)
|
|
4653
|
-
this.writeMessage(tag, writePackedBoolean, arr);
|
|
4640
|
+
if (arr.length) this.writeMessage(tag, writePackedBoolean, arr);
|
|
4654
4641
|
},
|
|
4655
4642
|
writePackedFloat: function(tag, arr) {
|
|
4656
|
-
if (arr.length)
|
|
4657
|
-
this.writeMessage(tag, writePackedFloat, arr);
|
|
4643
|
+
if (arr.length) this.writeMessage(tag, writePackedFloat, arr);
|
|
4658
4644
|
},
|
|
4659
4645
|
writePackedDouble: function(tag, arr) {
|
|
4660
|
-
if (arr.length)
|
|
4661
|
-
this.writeMessage(tag, writePackedDouble, arr);
|
|
4646
|
+
if (arr.length) this.writeMessage(tag, writePackedDouble, arr);
|
|
4662
4647
|
},
|
|
4663
4648
|
writePackedFixed32: function(tag, arr) {
|
|
4664
|
-
if (arr.length)
|
|
4665
|
-
this.writeMessage(tag, writePackedFixed32, arr);
|
|
4649
|
+
if (arr.length) this.writeMessage(tag, writePackedFixed32, arr);
|
|
4666
4650
|
},
|
|
4667
4651
|
writePackedSFixed32: function(tag, arr) {
|
|
4668
|
-
if (arr.length)
|
|
4669
|
-
this.writeMessage(tag, writePackedSFixed32, arr);
|
|
4652
|
+
if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr);
|
|
4670
4653
|
},
|
|
4671
4654
|
writePackedFixed64: function(tag, arr) {
|
|
4672
|
-
if (arr.length)
|
|
4673
|
-
this.writeMessage(tag, writePackedFixed64, arr);
|
|
4655
|
+
if (arr.length) this.writeMessage(tag, writePackedFixed64, arr);
|
|
4674
4656
|
},
|
|
4675
4657
|
writePackedSFixed64: function(tag, arr) {
|
|
4676
|
-
if (arr.length)
|
|
4677
|
-
this.writeMessage(tag, writePackedSFixed64, arr);
|
|
4658
|
+
if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr);
|
|
4678
4659
|
},
|
|
4679
4660
|
writeBytesField: function(tag, buffer) {
|
|
4680
4661
|
this.writeTag(tag, Pbf.Bytes);
|
|
@@ -4724,28 +4705,22 @@
|
|
|
4724
4705
|
var buf = p.buf, h, b;
|
|
4725
4706
|
b = buf[p.pos++];
|
|
4726
4707
|
h = (b & 112) >> 4;
|
|
4727
|
-
if (b < 128)
|
|
4728
|
-
return toNum(l, h, s);
|
|
4708
|
+
if (b < 128) return toNum(l, h, s);
|
|
4729
4709
|
b = buf[p.pos++];
|
|
4730
4710
|
h |= (b & 127) << 3;
|
|
4731
|
-
if (b < 128)
|
|
4732
|
-
return toNum(l, h, s);
|
|
4711
|
+
if (b < 128) return toNum(l, h, s);
|
|
4733
4712
|
b = buf[p.pos++];
|
|
4734
4713
|
h |= (b & 127) << 10;
|
|
4735
|
-
if (b < 128)
|
|
4736
|
-
return toNum(l, h, s);
|
|
4714
|
+
if (b < 128) return toNum(l, h, s);
|
|
4737
4715
|
b = buf[p.pos++];
|
|
4738
4716
|
h |= (b & 127) << 17;
|
|
4739
|
-
if (b < 128)
|
|
4740
|
-
return toNum(l, h, s);
|
|
4717
|
+
if (b < 128) return toNum(l, h, s);
|
|
4741
4718
|
b = buf[p.pos++];
|
|
4742
4719
|
h |= (b & 127) << 24;
|
|
4743
|
-
if (b < 128)
|
|
4744
|
-
return toNum(l, h, s);
|
|
4720
|
+
if (b < 128) return toNum(l, h, s);
|
|
4745
4721
|
b = buf[p.pos++];
|
|
4746
4722
|
h |= (b & 1) << 31;
|
|
4747
|
-
if (b < 128)
|
|
4748
|
-
return toNum(l, h, s);
|
|
4723
|
+
if (b < 128) return toNum(l, h, s);
|
|
4749
4724
|
throw new Error("Expected varint not more than 10 bytes");
|
|
4750
4725
|
}
|
|
4751
4726
|
function readPackedEnd(pbf) {
|
|
@@ -4793,63 +4768,48 @@
|
|
|
4793
4768
|
function writeBigVarintHigh(high, pbf) {
|
|
4794
4769
|
var lsb = (high & 7) << 4;
|
|
4795
4770
|
pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 128 : 0);
|
|
4796
|
-
if (!high)
|
|
4797
|
-
return;
|
|
4771
|
+
if (!high) return;
|
|
4798
4772
|
pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
|
|
4799
|
-
if (!high)
|
|
4800
|
-
return;
|
|
4773
|
+
if (!high) return;
|
|
4801
4774
|
pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
|
|
4802
|
-
if (!high)
|
|
4803
|
-
return;
|
|
4775
|
+
if (!high) return;
|
|
4804
4776
|
pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
|
|
4805
|
-
if (!high)
|
|
4806
|
-
return;
|
|
4777
|
+
if (!high) return;
|
|
4807
4778
|
pbf.buf[pbf.pos++] = high & 127 | ((high >>>= 7) ? 128 : 0);
|
|
4808
|
-
if (!high)
|
|
4809
|
-
return;
|
|
4779
|
+
if (!high) return;
|
|
4810
4780
|
pbf.buf[pbf.pos++] = high & 127;
|
|
4811
4781
|
}
|
|
4812
4782
|
function makeRoomForExtraLength(startPos, len, pbf) {
|
|
4813
4783
|
var extraLen = len <= 16383 ? 1 : len <= 2097151 ? 2 : len <= 268435455 ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));
|
|
4814
4784
|
pbf.realloc(extraLen);
|
|
4815
|
-
for (var i = pbf.pos - 1; i >= startPos; i--)
|
|
4816
|
-
pbf.buf[i + extraLen] = pbf.buf[i];
|
|
4785
|
+
for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];
|
|
4817
4786
|
}
|
|
4818
4787
|
function writePackedVarint(arr, pbf) {
|
|
4819
|
-
for (var i = 0; i < arr.length; i++)
|
|
4820
|
-
pbf.writeVarint(arr[i]);
|
|
4788
|
+
for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);
|
|
4821
4789
|
}
|
|
4822
4790
|
function writePackedSVarint(arr, pbf) {
|
|
4823
|
-
for (var i = 0; i < arr.length; i++)
|
|
4824
|
-
pbf.writeSVarint(arr[i]);
|
|
4791
|
+
for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);
|
|
4825
4792
|
}
|
|
4826
4793
|
function writePackedFloat(arr, pbf) {
|
|
4827
|
-
for (var i = 0; i < arr.length; i++)
|
|
4828
|
-
pbf.writeFloat(arr[i]);
|
|
4794
|
+
for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);
|
|
4829
4795
|
}
|
|
4830
4796
|
function writePackedDouble(arr, pbf) {
|
|
4831
|
-
for (var i = 0; i < arr.length; i++)
|
|
4832
|
-
pbf.writeDouble(arr[i]);
|
|
4797
|
+
for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);
|
|
4833
4798
|
}
|
|
4834
4799
|
function writePackedBoolean(arr, pbf) {
|
|
4835
|
-
for (var i = 0; i < arr.length; i++)
|
|
4836
|
-
pbf.writeBoolean(arr[i]);
|
|
4800
|
+
for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);
|
|
4837
4801
|
}
|
|
4838
4802
|
function writePackedFixed32(arr, pbf) {
|
|
4839
|
-
for (var i = 0; i < arr.length; i++)
|
|
4840
|
-
pbf.writeFixed32(arr[i]);
|
|
4803
|
+
for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);
|
|
4841
4804
|
}
|
|
4842
4805
|
function writePackedSFixed32(arr, pbf) {
|
|
4843
|
-
for (var i = 0; i < arr.length; i++)
|
|
4844
|
-
pbf.writeSFixed32(arr[i]);
|
|
4806
|
+
for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]);
|
|
4845
4807
|
}
|
|
4846
4808
|
function writePackedFixed64(arr, pbf) {
|
|
4847
|
-
for (var i = 0; i < arr.length; i++)
|
|
4848
|
-
pbf.writeFixed64(arr[i]);
|
|
4809
|
+
for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);
|
|
4849
4810
|
}
|
|
4850
4811
|
function writePackedSFixed64(arr, pbf) {
|
|
4851
|
-
for (var i = 0; i < arr.length; i++)
|
|
4852
|
-
pbf.writeSFixed64(arr[i]);
|
|
4812
|
+
for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]);
|
|
4853
4813
|
}
|
|
4854
4814
|
function readUInt32(buf, pos) {
|
|
4855
4815
|
return (buf[pos] | buf[pos + 1] << 8 | buf[pos + 2] << 16) + buf[pos + 3] * 16777216;
|
|
@@ -4870,8 +4830,7 @@
|
|
|
4870
4830
|
var b0 = buf[i];
|
|
4871
4831
|
var c = null;
|
|
4872
4832
|
var bytesPerSequence = b0 > 239 ? 4 : b0 > 223 ? 3 : b0 > 191 ? 2 : 1;
|
|
4873
|
-
if (i + bytesPerSequence > end)
|
|
4874
|
-
break;
|
|
4833
|
+
if (i + bytesPerSequence > end) break;
|
|
4875
4834
|
var b1, b2, b3;
|
|
4876
4835
|
if (bytesPerSequence === 1) {
|
|
4877
4836
|
if (b0 < 128) {
|
|
@@ -5482,20 +5441,18 @@
|
|
|
5482
5441
|
}
|
|
5483
5442
|
|
|
5484
5443
|
// src/layers/schema/carto-tile.ts
|
|
5485
|
-
var KeyValueObjectReader = class {
|
|
5444
|
+
var KeyValueObjectReader = class _KeyValueObjectReader {
|
|
5486
5445
|
static read(pbf, end) {
|
|
5487
|
-
return pbf.readFields(
|
|
5446
|
+
return pbf.readFields(_KeyValueObjectReader._readField, { key: "", value: null }, end);
|
|
5488
5447
|
}
|
|
5489
5448
|
static _readField(tag, obj, pbf) {
|
|
5490
|
-
if (tag === 1)
|
|
5491
|
-
|
|
5492
|
-
else if (tag === 2)
|
|
5493
|
-
obj.value = pbf.readString();
|
|
5449
|
+
if (tag === 1) obj.key = pbf.readString();
|
|
5450
|
+
else if (tag === 2) obj.value = pbf.readString();
|
|
5494
5451
|
}
|
|
5495
5452
|
};
|
|
5496
|
-
var PropertiesReader = class {
|
|
5453
|
+
var PropertiesReader = class _PropertiesReader {
|
|
5497
5454
|
static read(pbf, end) {
|
|
5498
|
-
return pbf.readFields(
|
|
5455
|
+
return pbf.readFields(_PropertiesReader._readField, {}, end);
|
|
5499
5456
|
}
|
|
5500
5457
|
static _readField(tag, obj, pbf) {
|
|
5501
5458
|
if (tag === 1) {
|
|
@@ -5504,35 +5461,31 @@
|
|
|
5504
5461
|
}
|
|
5505
5462
|
}
|
|
5506
5463
|
};
|
|
5507
|
-
var NumericPropReader = class {
|
|
5464
|
+
var NumericPropReader = class _NumericPropReader {
|
|
5508
5465
|
static read(pbf, end) {
|
|
5509
|
-
return pbf.readFields(
|
|
5466
|
+
return pbf.readFields(_NumericPropReader._readField, { value: [] }, end);
|
|
5510
5467
|
}
|
|
5511
5468
|
static _readField(tag, obj, pbf) {
|
|
5512
|
-
if (tag === 1)
|
|
5513
|
-
readPackedTypedArray(Float64Array, pbf, obj);
|
|
5469
|
+
if (tag === 1) readPackedTypedArray(Float64Array, pbf, obj);
|
|
5514
5470
|
}
|
|
5515
5471
|
};
|
|
5516
|
-
var NumericPropKeyValueReader = class {
|
|
5472
|
+
var NumericPropKeyValueReader = class _NumericPropKeyValueReader {
|
|
5517
5473
|
static read(pbf, end) {
|
|
5518
|
-
return pbf.readFields(
|
|
5474
|
+
return pbf.readFields(_NumericPropKeyValueReader._readField, { key: "", value: null }, end);
|
|
5519
5475
|
}
|
|
5520
5476
|
static _readField(tag, obj, pbf) {
|
|
5521
|
-
if (tag === 1)
|
|
5522
|
-
|
|
5523
|
-
else if (tag === 2)
|
|
5524
|
-
obj.value = NumericPropReader.read(pbf, pbf.readVarint() + pbf.pos);
|
|
5477
|
+
if (tag === 1) obj.key = pbf.readString();
|
|
5478
|
+
else if (tag === 2) obj.value = NumericPropReader.read(pbf, pbf.readVarint() + pbf.pos);
|
|
5525
5479
|
}
|
|
5526
5480
|
};
|
|
5527
5481
|
|
|
5528
5482
|
// src/layers/schema/carto-properties-tile.ts
|
|
5529
|
-
var TileReader = class {
|
|
5483
|
+
var TileReader = class _TileReader {
|
|
5530
5484
|
static read(pbf, end) {
|
|
5531
|
-
return pbf.readFields(
|
|
5485
|
+
return pbf.readFields(_TileReader._readField, { properties: [], numericProps: {} }, end);
|
|
5532
5486
|
}
|
|
5533
5487
|
static _readField(tag, obj, pbf) {
|
|
5534
|
-
if (tag === 1)
|
|
5535
|
-
obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
|
|
5488
|
+
if (tag === 1) obj.properties.push(PropertiesReader.read(pbf, pbf.readVarint() + pbf.pos));
|
|
5536
5489
|
else if (tag === 2) {
|
|
5537
5490
|
const entry = NumericPropKeyValueReader.read(pbf, pbf.readVarint() + pbf.pos);
|
|
5538
5491
|
obj.numericProps[entry.key] = entry.value;
|
|
@@ -5562,7 +5515,7 @@
|
|
|
5562
5515
|
};
|
|
5563
5516
|
|
|
5564
5517
|
// src/layers/schema/carto-properties-tile-loader.ts
|
|
5565
|
-
var VERSION = true ? "9.4.0-
|
|
5518
|
+
var VERSION = true ? "9.4.0-beta.1" : "latest";
|
|
5566
5519
|
var id = "cartoPropertiesTile";
|
|
5567
5520
|
var DEFAULT_OPTIONS = {
|
|
5568
5521
|
cartoPropertiesTile: {
|
|
@@ -5583,8 +5536,7 @@
|
|
|
5583
5536
|
options: DEFAULT_OPTIONS
|
|
5584
5537
|
};
|
|
5585
5538
|
function parseCartoPropertiesTile(arrayBuffer, options) {
|
|
5586
|
-
if (!arrayBuffer)
|
|
5587
|
-
return null;
|
|
5539
|
+
if (!arrayBuffer) return null;
|
|
5588
5540
|
return parsePbf(arrayBuffer, TileReader);
|
|
5589
5541
|
}
|
|
5590
5542
|
var carto_properties_tile_loader_default = CartoPropertiesTileLoader;
|