@datagouv/components-next 1.0.1 → 1.0.2-dev.0
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/{Control-BNCDn-8E.js → Control-DuZJdKV_.js} +1 -1
- package/dist/{Datafair.client-B5lBpOl8.js → Datafair.client-DpeBuzZZ.js} +1 -1
- package/dist/{Event-BOgJUhNR.js → Event--kp8kMdJ.js} +21 -21
- package/dist/{Image-BN-4XkIn.js → Image-34hvypZI.js} +114 -58
- package/dist/{JsonPreview.client-Doz1Z0BS.js → JsonPreview.client-B3sQR-rW.js} +1 -1
- package/dist/{Map-BdT3i2C4.js → Map-BjUnLyj8.js} +1534 -1466
- package/dist/{MapContainer.client-oiieO8H-.js → MapContainer.client-BA6GCqKX.js} +7 -7
- package/dist/{OSM-CamriM9b.js → OSM-s40W6sQ2.js} +22 -12
- package/dist/{PdfPreview.client-CdAhkDFJ.js → PdfPreview.client-CbeSChb8.js} +1 -1
- package/dist/Pmtiles.client-D8pFim1L.js +25190 -0
- package/dist/{ScaleLine-BiesrgOv.js → ScaleLine-KW-nXqp3.js} +2 -2
- package/dist/Swagger.client-B-2Q16qa.js +4 -0
- package/dist/{Tile-DCuqwNOI.js → Tile-DbNFNPfU.js} +189 -172
- package/dist/{TileImage-CmZf8EdU.js → TileImage-BsXBxMtq.js} +132 -102
- package/dist/{View-DcDc7N2K.js → View-BR92hTWP.js} +8 -8
- package/dist/{XmlPreview.client-CrjHf74q.js → XmlPreview.client-DWJt61wG.js} +2 -2
- package/dist/{common-C4rDcQpp.js → common-PJfpC179.js} +34 -33
- package/dist/components-next.css +4 -4
- package/dist/components-next.js +1 -1
- package/dist/components.css +1 -1
- package/dist/{index-Bbu9rOHt.js → index-DVp7Y0Xu.js} +11105 -6743
- package/dist/{main-CiH8ZmBI.js → main-CrSRA2X-.js} +22125 -22173
- package/dist/{proj-CKwYjU38.js → proj-DsetBcW7.js} +513 -498
- package/dist/{tilecoord-YW3qEH_j.js → tilecoord-Db24Px13.js} +242 -224
- package/dist/{vue3-xml-viewer.common-Bi_bsV6C.js → vue3-xml-viewer.common-BjA4LdSC.js} +1 -1
- package/package.json +2 -1
- package/src/components/ResourceExplorer/ResourceExplorerViewer.vue +1 -50
- package/src/composables/useResourceCapabilities.ts +1 -15
- package/src/functions/api.ts +3 -11
- package/src/types/resources.ts +0 -10
- package/dist/Pmtiles.client-B0v8tGJQ.js +0 -22812
- package/dist/Swagger.client-CsK65JnG.js +0 -4
- package/src/functions/resourceCapabilities.ts +0 -55
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
import {
|
|
3
|
-
import { aC as
|
|
4
|
-
class
|
|
1
|
+
import { T as _, W as nt, n as xt, c as H, b as et } from "./Image-34hvypZI.js";
|
|
2
|
+
import { z as Tt, g as pt } from "./common-PJfpC179.js";
|
|
3
|
+
import { aC as It, E as ft, al as Xt, U as dt, g as at, X as Wt, w as Mt, F as b, n as _t, L, an as gt, aS as vt, x as Yt, r as Lt, aT as Ft, ak as wt, aI as yt, az as Dt, aJ as Ot, aU as st, ae as ot, i as Ct, W as z, a1 as $, d as V, l as Pt, u as rt, a7 as ht, I as At, a as Rt } from "./proj-DsetBcW7.js";
|
|
4
|
+
class mt extends It {
|
|
5
5
|
/**
|
|
6
6
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
7
7
|
* @param {import("./TileState.js").default} state State.
|
|
@@ -14,13 +14,13 @@ class gt extends pt {
|
|
|
14
14
|
* @protected
|
|
15
15
|
*/
|
|
16
16
|
changed() {
|
|
17
|
-
this.dispatchEvent(
|
|
17
|
+
this.dispatchEvent(ft.CHANGE);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Called by the tile cache when the tile is removed from the cache due to expiry
|
|
21
21
|
*/
|
|
22
22
|
release() {
|
|
23
|
-
this.setState(
|
|
23
|
+
this.setState(_.EMPTY);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* @return {string} Key.
|
|
@@ -51,8 +51,8 @@ class gt extends pt {
|
|
|
51
51
|
* @api
|
|
52
52
|
*/
|
|
53
53
|
setState(t) {
|
|
54
|
-
if (this.state !==
|
|
55
|
-
if (this.state !==
|
|
54
|
+
if (this.state !== _.EMPTY) {
|
|
55
|
+
if (this.state !== _.ERROR && this.state > t)
|
|
56
56
|
throw new Error("Tile load sequence violation");
|
|
57
57
|
this.state = t, this.changed();
|
|
58
58
|
}
|
|
@@ -65,7 +65,7 @@ class gt extends pt {
|
|
|
65
65
|
* @api
|
|
66
66
|
*/
|
|
67
67
|
load() {
|
|
68
|
-
|
|
68
|
+
Xt();
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
71
|
* Get the alpha value for rendering.
|
|
@@ -82,7 +82,7 @@ class gt extends pt {
|
|
|
82
82
|
else if (s === -1)
|
|
83
83
|
return 1;
|
|
84
84
|
const n = e - s + 1e3 / 60;
|
|
85
|
-
return n >= this.transition_ ? 1 :
|
|
85
|
+
return n >= this.transition_ ? 1 : Tt(n / this.transition_);
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
88
|
* Determine if a tile is in an alpha transition. A tile is considered in
|
|
@@ -108,7 +108,7 @@ class gt extends pt {
|
|
|
108
108
|
this.release(), super.disposeInternal();
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
class
|
|
111
|
+
class zt extends mt {
|
|
112
112
|
/**
|
|
113
113
|
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
|
|
114
114
|
* @param {import("./TileState.js").default} state State.
|
|
@@ -118,11 +118,11 @@ class Qt extends gt {
|
|
|
118
118
|
* @param {import("./Tile.js").Options} [options] Tile options.
|
|
119
119
|
*/
|
|
120
120
|
constructor(t, e, s, n, i, c) {
|
|
121
|
-
super(t, e, c), this.crossOrigin_ = n, this.src_ = s, this.key = s, this.image_ = new Image(), n !== null && (this.image_.crossOrigin = n), this.unlisten_ = null, this.tileLoadFunction_ = i;
|
|
121
|
+
super(t, e, c), this.crossOrigin_ = n, this.src_ = s, this.key = s, this.image_, nt ? this.image_ = new OffscreenCanvas(1, 1) : (this.image_ = new Image(), n !== null && (this.image_.crossOrigin = n)), this.unlisten_ = null, this.tileLoadFunction_ = i;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* Get the HTML image element for this tile (may be a Canvas, Image, or Video).
|
|
125
|
-
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
|
|
124
|
+
* Get the HTML image element for this tile (may be a Canvas, OffscreenCanvas, Image, or Video).
|
|
125
|
+
* @return {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement|HTMLVideoElement} Image.
|
|
126
126
|
* @api
|
|
127
127
|
*/
|
|
128
128
|
getImage() {
|
|
@@ -130,10 +130,17 @@ class Qt extends gt {
|
|
|
130
130
|
}
|
|
131
131
|
/**
|
|
132
132
|
* Sets an HTML image element for this tile (may be a Canvas or preloaded Image).
|
|
133
|
-
* @param {HTMLCanvasElement|HTMLImageElement} element Element.
|
|
133
|
+
* @param {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement} element Element.
|
|
134
134
|
*/
|
|
135
135
|
setImage(t) {
|
|
136
|
-
this.image_ = t, this.state =
|
|
136
|
+
this.image_ = t, this.state = _.LOADED, this.unlistenImage_(), this.changed();
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Get the cross origin of the ImageTile.
|
|
140
|
+
* @return {string} Cross origin.
|
|
141
|
+
*/
|
|
142
|
+
getCrossOrigin() {
|
|
143
|
+
return this.crossOrigin_;
|
|
137
144
|
}
|
|
138
145
|
/**
|
|
139
146
|
* Tracks loading or read errors.
|
|
@@ -141,7 +148,7 @@ class Qt extends gt {
|
|
|
141
148
|
* @private
|
|
142
149
|
*/
|
|
143
150
|
handleImageError_() {
|
|
144
|
-
this.state =
|
|
151
|
+
this.state = _.ERROR, this.unlistenImage_(), this.image_ = kt(), this.changed();
|
|
145
152
|
}
|
|
146
153
|
/**
|
|
147
154
|
* Tracks successful image load.
|
|
@@ -149,11 +156,16 @@ class Qt extends gt {
|
|
|
149
156
|
* @private
|
|
150
157
|
*/
|
|
151
158
|
handleImageLoad_() {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
if (nt)
|
|
160
|
+
this.state = _.LOADED;
|
|
161
|
+
else {
|
|
162
|
+
const t = (
|
|
163
|
+
/** @type {HTMLImageElement} */
|
|
164
|
+
this.image_
|
|
165
|
+
);
|
|
166
|
+
t.naturalWidth && t.naturalHeight ? this.state = _.LOADED : this.state = _.EMPTY;
|
|
167
|
+
}
|
|
168
|
+
this.unlistenImage_(), this.changed();
|
|
157
169
|
}
|
|
158
170
|
/**
|
|
159
171
|
* Load the image or retry if loading previously failed.
|
|
@@ -193,7 +205,7 @@ class Qt extends gt {
|
|
|
193
205
|
* @override
|
|
194
206
|
*/
|
|
195
207
|
load() {
|
|
196
|
-
this.state ==
|
|
208
|
+
this.state == _.ERROR && (this.state = _.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == _.IDLE && (this.state = _.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = xt(
|
|
197
209
|
this.image_,
|
|
198
210
|
this.handleImageLoad_.bind(this),
|
|
199
211
|
this.handleImageError_.bind(this)
|
|
@@ -214,11 +226,11 @@ class Qt extends gt {
|
|
|
214
226
|
this.unlistenImage_(), this.image_ = null, super.disposeInternal();
|
|
215
227
|
}
|
|
216
228
|
}
|
|
217
|
-
function
|
|
218
|
-
const
|
|
219
|
-
return
|
|
229
|
+
function kt() {
|
|
230
|
+
const a = H(1, 1);
|
|
231
|
+
return a.fillStyle = "rgba(0,0,0,0)", a.fillRect(0, 0, 1, 1), a.canvas;
|
|
220
232
|
}
|
|
221
|
-
class
|
|
233
|
+
class Bt {
|
|
222
234
|
/**
|
|
223
235
|
* @param {number} minX Minimum X.
|
|
224
236
|
* @param {number} maxX Maximum X.
|
|
@@ -289,173 +301,173 @@ class Rt {
|
|
|
289
301
|
return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY;
|
|
290
302
|
}
|
|
291
303
|
}
|
|
292
|
-
function
|
|
293
|
-
return n !== void 0 ? (n.minX =
|
|
304
|
+
function $t(a, t, e, s, n) {
|
|
305
|
+
return n !== void 0 ? (n.minX = a, n.maxX = t, n.minY = e, n.maxY = s, n) : new Bt(a, t, e, s);
|
|
294
306
|
}
|
|
295
|
-
let
|
|
307
|
+
let J;
|
|
296
308
|
const B = [];
|
|
297
|
-
function
|
|
298
|
-
|
|
309
|
+
function ct(a, t, e, s, n) {
|
|
310
|
+
a.beginPath(), a.moveTo(0, 0), a.lineTo(t, e), a.lineTo(s, n), a.closePath(), a.save(), a.clip(), a.fillRect(0, 0, Math.max(t, s) + 1, Math.max(e, n)), a.restore();
|
|
299
311
|
}
|
|
300
|
-
function tt(
|
|
301
|
-
return Math.abs(
|
|
312
|
+
function tt(a, t) {
|
|
313
|
+
return Math.abs(a[t * 4] - 210) > 2 || Math.abs(a[t * 4 + 3] - 0.75 * 255) > 2;
|
|
302
314
|
}
|
|
303
|
-
function
|
|
304
|
-
if (
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
const t =
|
|
308
|
-
|
|
309
|
-
}
|
|
310
|
-
return
|
|
315
|
+
function Gt() {
|
|
316
|
+
if (J === void 0) {
|
|
317
|
+
const a = H(6, 6, B);
|
|
318
|
+
a.globalCompositeOperation = "lighter", a.fillStyle = "rgba(210, 0, 0, 0.75)", ct(a, 4, 5, 4, 0), ct(a, 4, 5, 0, 5);
|
|
319
|
+
const t = a.getImageData(0, 0, 3, 3).data;
|
|
320
|
+
J = tt(t, 0) || tt(t, 4) || tt(t, 8), et(a), B.push(a.canvas);
|
|
321
|
+
}
|
|
322
|
+
return J;
|
|
311
323
|
}
|
|
312
|
-
function
|
|
313
|
-
const n =
|
|
314
|
-
let i =
|
|
324
|
+
function ut(a, t, e, s) {
|
|
325
|
+
const n = dt(e, t, a);
|
|
326
|
+
let i = at(
|
|
315
327
|
t,
|
|
316
328
|
s,
|
|
317
329
|
e
|
|
318
330
|
);
|
|
319
331
|
const c = t.getMetersPerUnit();
|
|
320
332
|
c !== void 0 && (i *= c);
|
|
321
|
-
const m =
|
|
333
|
+
const m = a.getMetersPerUnit();
|
|
322
334
|
m !== void 0 && (i /= m);
|
|
323
|
-
const
|
|
324
|
-
if (!
|
|
325
|
-
const T =
|
|
335
|
+
const g = a.getExtent();
|
|
336
|
+
if (!g || Wt(g, n)) {
|
|
337
|
+
const T = at(a, i, n) / i;
|
|
326
338
|
isFinite(T) && T > 0 && (i /= T);
|
|
327
339
|
}
|
|
328
340
|
return i;
|
|
329
341
|
}
|
|
330
|
-
function
|
|
331
|
-
const n =
|
|
332
|
-
let i =
|
|
333
|
-
|
|
342
|
+
function Nt(a, t, e, s) {
|
|
343
|
+
const n = Yt(e);
|
|
344
|
+
let i = ut(
|
|
345
|
+
a,
|
|
334
346
|
t,
|
|
335
347
|
n,
|
|
336
348
|
s
|
|
337
349
|
);
|
|
338
|
-
return (!isFinite(i) || i <= 0) &&
|
|
339
|
-
return i =
|
|
340
|
-
|
|
350
|
+
return (!isFinite(i) || i <= 0) && Lt(e, function(c) {
|
|
351
|
+
return i = ut(
|
|
352
|
+
a,
|
|
341
353
|
t,
|
|
342
354
|
c,
|
|
343
355
|
s
|
|
344
356
|
), isFinite(i) && i > 0;
|
|
345
357
|
}), i;
|
|
346
358
|
}
|
|
347
|
-
function
|
|
348
|
-
const r =
|
|
349
|
-
Math.round(e *
|
|
359
|
+
function St(a, t, e, s, n, i, c, m, g, T, X, x, F, w) {
|
|
360
|
+
const r = H(
|
|
361
|
+
Math.round(e * a),
|
|
350
362
|
Math.round(e * t),
|
|
351
363
|
B
|
|
352
364
|
);
|
|
353
|
-
if (x || (r.imageSmoothingEnabled = !1),
|
|
365
|
+
if (x || (r.imageSmoothingEnabled = !1), g.length === 0)
|
|
354
366
|
return r.canvas;
|
|
355
367
|
r.scale(e, e);
|
|
356
|
-
function h(
|
|
357
|
-
return Math.round(
|
|
368
|
+
function h(o) {
|
|
369
|
+
return Math.round(o * e) / e;
|
|
358
370
|
}
|
|
359
371
|
r.globalCompositeOperation = "lighter";
|
|
360
|
-
const E =
|
|
361
|
-
|
|
362
|
-
Mt(E,
|
|
372
|
+
const E = _t();
|
|
373
|
+
g.forEach(function(o, y, C) {
|
|
374
|
+
Mt(E, o.extent);
|
|
363
375
|
});
|
|
364
376
|
let l;
|
|
365
377
|
const f = e / s, d = (x ? 1 : 1 + Math.pow(2, -24)) / f;
|
|
366
|
-
(!
|
|
378
|
+
(!F || g.length !== 1 || T !== 0) && (l = H(
|
|
367
379
|
Math.round(L(E) * f),
|
|
368
|
-
Math.round(
|
|
380
|
+
Math.round(b(E) * f),
|
|
369
381
|
B
|
|
370
|
-
), x || (l.imageSmoothingEnabled = !1),
|
|
371
|
-
if (
|
|
372
|
-
if (
|
|
382
|
+
), x || (l.imageSmoothingEnabled = !1), g.forEach(function(o, y, C) {
|
|
383
|
+
if (o.image.width > 0 && o.image.height > 0) {
|
|
384
|
+
if (o.clipExtent) {
|
|
373
385
|
l.save();
|
|
374
|
-
const
|
|
386
|
+
const W = (o.clipExtent[0] - E[0]) * f, M = -(o.clipExtent[3] - E[3]) * f, D = L(o.clipExtent) * f, A = b(o.clipExtent) * f;
|
|
375
387
|
l.rect(
|
|
388
|
+
x ? W : Math.round(W),
|
|
376
389
|
x ? M : Math.round(M),
|
|
377
|
-
x ?
|
|
378
|
-
x ?
|
|
379
|
-
x ? A : Math.round(v + A) - Math.round(v)
|
|
390
|
+
x ? D : Math.round(W + D) - Math.round(W),
|
|
391
|
+
x ? A : Math.round(M + A) - Math.round(M)
|
|
380
392
|
), l.clip();
|
|
381
393
|
}
|
|
382
|
-
const p = (
|
|
394
|
+
const p = (o.extent[0] - E[0]) * f, I = -(o.extent[3] - E[3]) * f, v = L(o.extent) * f, Y = b(o.extent) * f;
|
|
383
395
|
l.drawImage(
|
|
384
|
-
|
|
396
|
+
o.image,
|
|
385
397
|
T,
|
|
386
398
|
T,
|
|
387
|
-
|
|
388
|
-
|
|
399
|
+
o.image.width - 2 * T,
|
|
400
|
+
o.image.height - 2 * T,
|
|
389
401
|
x ? p : Math.round(p),
|
|
390
402
|
x ? I : Math.round(I),
|
|
391
|
-
x ?
|
|
403
|
+
x ? v : Math.round(p + v) - Math.round(p),
|
|
392
404
|
x ? Y : Math.round(I + Y) - Math.round(I)
|
|
393
|
-
),
|
|
405
|
+
), o.clipExtent && l.restore();
|
|
394
406
|
}
|
|
395
407
|
}));
|
|
396
|
-
const u =
|
|
397
|
-
return m.getTriangles().forEach(function(
|
|
398
|
-
const p =
|
|
399
|
-
let
|
|
400
|
-
const G = h((I[0][0] - u[0]) / i),
|
|
408
|
+
const u = gt(c);
|
|
409
|
+
return m.getTriangles().forEach(function(o, y, C) {
|
|
410
|
+
const p = o.source, I = o.target;
|
|
411
|
+
let v = p[0][0], Y = p[0][1], W = p[1][0], M = p[1][1], D = p[2][0], A = p[2][1];
|
|
412
|
+
const G = h((I[0][0] - u[0]) / i), N = h(
|
|
401
413
|
-(I[0][1] - u[1]) / i
|
|
402
414
|
), R = h((I[1][0] - u[0]) / i), k = h(
|
|
403
415
|
-(I[1][1] - u[1]) / i
|
|
404
416
|
), U = h((I[2][0] - u[0]) / i), Q = h(
|
|
405
417
|
-(I[2][1] - u[1]) / i
|
|
406
|
-
), j =
|
|
407
|
-
|
|
408
|
-
const
|
|
409
|
-
[
|
|
418
|
+
), j = v, q = Y;
|
|
419
|
+
v = 0, Y = 0, W -= j, M -= q, D -= j, A -= q;
|
|
420
|
+
const Et = [
|
|
421
|
+
[W, M, 0, 0, R - G],
|
|
410
422
|
[D, A, 0, 0, U - G],
|
|
411
|
-
[0, 0,
|
|
412
|
-
[0, 0, D, A, Q -
|
|
413
|
-
],
|
|
414
|
-
if (!
|
|
423
|
+
[0, 0, W, M, k - N],
|
|
424
|
+
[0, 0, D, A, Q - N]
|
|
425
|
+
], S = vt(Et);
|
|
426
|
+
if (!S)
|
|
415
427
|
return;
|
|
416
|
-
if (r.save(), r.beginPath(),
|
|
428
|
+
if (r.save(), r.beginPath(), Gt() || !x) {
|
|
417
429
|
r.moveTo(R, k);
|
|
418
|
-
const
|
|
419
|
-
for (let
|
|
430
|
+
const O = 4, K = G - R, it = N - k;
|
|
431
|
+
for (let P = 0; P < O; P++)
|
|
420
432
|
r.lineTo(
|
|
421
|
-
R + h((
|
|
422
|
-
k + h(
|
|
423
|
-
),
|
|
424
|
-
R + h((
|
|
425
|
-
k + h((
|
|
433
|
+
R + h((P + 1) * K / O),
|
|
434
|
+
k + h(P * it / (O - 1))
|
|
435
|
+
), P != O - 1 && r.lineTo(
|
|
436
|
+
R + h((P + 1) * K / O),
|
|
437
|
+
k + h((P + 1) * it / (O - 1))
|
|
426
438
|
);
|
|
427
439
|
r.lineTo(U, Q);
|
|
428
440
|
} else
|
|
429
|
-
r.moveTo(R, k), r.lineTo(G,
|
|
441
|
+
r.moveTo(R, k), r.lineTo(G, N), r.lineTo(U, Q);
|
|
430
442
|
r.clip(), r.transform(
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
443
|
+
S[0],
|
|
444
|
+
S[2],
|
|
445
|
+
S[1],
|
|
446
|
+
S[3],
|
|
435
447
|
G,
|
|
436
|
-
|
|
448
|
+
N
|
|
437
449
|
), r.translate(
|
|
438
450
|
E[0] - j,
|
|
439
451
|
E[3] - q
|
|
440
452
|
);
|
|
441
|
-
let
|
|
453
|
+
let Z;
|
|
442
454
|
if (l)
|
|
443
|
-
|
|
455
|
+
Z = l.canvas, r.scale(d, -d);
|
|
444
456
|
else {
|
|
445
|
-
const
|
|
446
|
-
|
|
447
|
-
L(
|
|
448
|
-
-K
|
|
457
|
+
const O = g[0], K = O.extent;
|
|
458
|
+
Z = O.image, r.scale(
|
|
459
|
+
L(K) / Z.width,
|
|
460
|
+
-b(K) / Z.height
|
|
449
461
|
);
|
|
450
462
|
}
|
|
451
|
-
r.drawImage(
|
|
452
|
-
}), l && (et(l), B.push(l.canvas)), X && (r.save(), r.globalCompositeOperation = "source-over", r.strokeStyle = "black", r.lineWidth = 1, m.getTriangles().forEach(function(
|
|
453
|
-
const p =
|
|
454
|
-
r.beginPath(), r.moveTo(Y,
|
|
463
|
+
r.drawImage(Z, 0, 0), r.restore();
|
|
464
|
+
}), l && (et(l), B.push(l.canvas)), X && (r.save(), r.globalCompositeOperation = "source-over", r.strokeStyle = "black", r.lineWidth = 1, m.getTriangles().forEach(function(o, y, C) {
|
|
465
|
+
const p = o.target, I = (p[0][0] - u[0]) / i, v = -(p[0][1] - u[1]) / i, Y = (p[1][0] - u[0]) / i, W = -(p[1][1] - u[1]) / i, M = (p[2][0] - u[0]) / i, D = -(p[2][1] - u[1]) / i;
|
|
466
|
+
r.beginPath(), r.moveTo(Y, W), r.lineTo(I, v), r.lineTo(M, D), r.closePath(), r.stroke();
|
|
455
467
|
}), r.restore()), r.canvas;
|
|
456
468
|
}
|
|
457
|
-
const Zt = 10,
|
|
458
|
-
class
|
|
469
|
+
const Zt = 10, lt = 0.25;
|
|
470
|
+
class Kt {
|
|
459
471
|
/**
|
|
460
472
|
* @param {import("../proj/Projection.js").default} sourceProj Source projection.
|
|
461
473
|
* @param {import("../proj/Projection.js").default} targetProj Target projection.
|
|
@@ -467,18 +479,18 @@ class Ht {
|
|
|
467
479
|
*/
|
|
468
480
|
constructor(t, e, s, n, i, c, m) {
|
|
469
481
|
this.sourceProj_ = t, this.targetProj_ = e;
|
|
470
|
-
let
|
|
471
|
-
const T = m ?
|
|
472
|
-
(d) =>
|
|
482
|
+
let g = {};
|
|
483
|
+
const T = m ? Ft(
|
|
484
|
+
(d) => pt(
|
|
473
485
|
m,
|
|
474
|
-
|
|
486
|
+
dt(d, this.targetProj_, this.sourceProj_)
|
|
475
487
|
)
|
|
476
|
-
) :
|
|
488
|
+
) : wt(this.targetProj_, this.sourceProj_);
|
|
477
489
|
this.transformInv_ = function(d) {
|
|
478
490
|
const u = d[0] + "/" + d[1];
|
|
479
|
-
return
|
|
491
|
+
return g[u] || (g[u] = T(d)), g[u];
|
|
480
492
|
}, this.maxSourceExtent_ = n, this.errorThresholdSquared_ = i * i, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!n && !!this.sourceProj_.getExtent() && L(n) >= L(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? L(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? L(this.targetProj_.getExtent()) : null;
|
|
481
|
-
const X =
|
|
493
|
+
const X = gt(s), x = yt(s), F = Dt(s), w = Ot(s), r = this.transformInv_(X), h = this.transformInv_(x), E = this.transformInv_(F), l = this.transformInv_(w), f = Zt + (c ? Math.max(
|
|
482
494
|
0,
|
|
483
495
|
Math.ceil(
|
|
484
496
|
Math.log2(
|
|
@@ -489,8 +501,8 @@ class Ht {
|
|
|
489
501
|
if (this.addQuad_(
|
|
490
502
|
X,
|
|
491
503
|
x,
|
|
492
|
-
y,
|
|
493
504
|
F,
|
|
505
|
+
w,
|
|
494
506
|
r,
|
|
495
507
|
h,
|
|
496
508
|
E,
|
|
@@ -498,7 +510,7 @@ class Ht {
|
|
|
498
510
|
f
|
|
499
511
|
), this.wrapsXInSource_) {
|
|
500
512
|
let d = 1 / 0;
|
|
501
|
-
this.triangles_.forEach(function(u,
|
|
513
|
+
this.triangles_.forEach(function(u, o, y) {
|
|
502
514
|
d = Math.min(
|
|
503
515
|
d,
|
|
504
516
|
u.source[0][0],
|
|
@@ -511,26 +523,26 @@ class Ht {
|
|
|
511
523
|
u.source[1][0],
|
|
512
524
|
u.source[2][0]
|
|
513
525
|
) - d > this.sourceWorldWidth_ / 2) {
|
|
514
|
-
const
|
|
526
|
+
const o = [
|
|
515
527
|
[u.source[0][0], u.source[0][1]],
|
|
516
528
|
[u.source[1][0], u.source[1][1]],
|
|
517
529
|
[u.source[2][0], u.source[2][1]]
|
|
518
530
|
];
|
|
519
|
-
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
531
|
+
o[0][0] - d > this.sourceWorldWidth_ / 2 && (o[0][0] -= this.sourceWorldWidth_), o[1][0] - d > this.sourceWorldWidth_ / 2 && (o[1][0] -= this.sourceWorldWidth_), o[2][0] - d > this.sourceWorldWidth_ / 2 && (o[2][0] -= this.sourceWorldWidth_);
|
|
532
|
+
const y = Math.min(
|
|
533
|
+
o[0][0],
|
|
534
|
+
o[1][0],
|
|
535
|
+
o[2][0]
|
|
524
536
|
);
|
|
525
537
|
Math.max(
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
) -
|
|
538
|
+
o[0][0],
|
|
539
|
+
o[1][0],
|
|
540
|
+
o[2][0]
|
|
541
|
+
) - y < this.sourceWorldWidth_ / 2 && (u.source = o);
|
|
530
542
|
}
|
|
531
543
|
});
|
|
532
544
|
}
|
|
533
|
-
|
|
545
|
+
g = {};
|
|
534
546
|
}
|
|
535
547
|
/**
|
|
536
548
|
* Adds triangle to the triangulation.
|
|
@@ -564,33 +576,33 @@ class Ht {
|
|
|
564
576
|
* @param {number} maxSubdivision Maximal allowed subdivision of the quad.
|
|
565
577
|
* @private
|
|
566
578
|
*/
|
|
567
|
-
addQuad_(t, e, s, n, i, c, m,
|
|
568
|
-
const X = ot([i, c, m,
|
|
579
|
+
addQuad_(t, e, s, n, i, c, m, g, T) {
|
|
580
|
+
const X = ot([i, c, m, g]), x = this.sourceWorldWidth_ ? L(X) / this.sourceWorldWidth_ : null, F = (
|
|
569
581
|
/** @type {number} */
|
|
570
582
|
this.sourceWorldWidth_
|
|
571
|
-
),
|
|
583
|
+
), w = this.sourceProj_.canWrapX() && x > 0.5 && x < 1;
|
|
572
584
|
let r = !1;
|
|
573
585
|
if (T > 0) {
|
|
574
586
|
if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
|
|
575
587
|
const E = ot([t, e, s, n]);
|
|
576
|
-
r = L(E) / this.targetWorldWidth_ >
|
|
588
|
+
r = L(E) / this.targetWorldWidth_ > lt || r;
|
|
577
589
|
}
|
|
578
|
-
!
|
|
590
|
+
!w && this.sourceProj_.isGlobal() && x && (r = x > lt || r);
|
|
579
591
|
}
|
|
580
|
-
if (!r && this.maxSourceExtent_ && isFinite(X[0]) && isFinite(X[1]) && isFinite(X[2]) && isFinite(X[3]) && !
|
|
592
|
+
if (!r && this.maxSourceExtent_ && isFinite(X[0]) && isFinite(X[1]) && isFinite(X[2]) && isFinite(X[3]) && !Ct(X, this.maxSourceExtent_))
|
|
581
593
|
return;
|
|
582
594
|
let h = 0;
|
|
583
|
-
if (!r && (!isFinite(i[0]) || !isFinite(i[1]) || !isFinite(c[0]) || !isFinite(c[1]) || !isFinite(m[0]) || !isFinite(m[1]) || !isFinite(
|
|
595
|
+
if (!r && (!isFinite(i[0]) || !isFinite(i[1]) || !isFinite(c[0]) || !isFinite(c[1]) || !isFinite(m[0]) || !isFinite(m[1]) || !isFinite(g[0]) || !isFinite(g[1]))) {
|
|
584
596
|
if (T > 0)
|
|
585
597
|
r = !0;
|
|
586
|
-
else if (h = (!isFinite(i[0]) || !isFinite(i[1]) ? 8 : 0) + (!isFinite(c[0]) || !isFinite(c[1]) ? 4 : 0) + (!isFinite(m[0]) || !isFinite(m[1]) ? 2 : 0) + (!isFinite(
|
|
598
|
+
else if (h = (!isFinite(i[0]) || !isFinite(i[1]) ? 8 : 0) + (!isFinite(c[0]) || !isFinite(c[1]) ? 4 : 0) + (!isFinite(m[0]) || !isFinite(m[1]) ? 2 : 0) + (!isFinite(g[0]) || !isFinite(g[1]) ? 1 : 0), h != 1 && h != 2 && h != 4 && h != 8)
|
|
587
599
|
return;
|
|
588
600
|
}
|
|
589
601
|
if (T > 0) {
|
|
590
602
|
if (!r) {
|
|
591
603
|
const E = [(t[0] + s[0]) / 2, (t[1] + s[1]) / 2], l = this.transformInv_(E);
|
|
592
604
|
let f;
|
|
593
|
-
|
|
605
|
+
w ? f = (z(i[0], F) + z(m[0], F)) / 2 - z(l[0], F) : f = (i[0] + m[0]) / 2 - l[0];
|
|
594
606
|
const d = (i[1] + m[1]) / 2 - l[1];
|
|
595
607
|
r = f * f + d * d > this.errorThresholdSquared_;
|
|
596
608
|
}
|
|
@@ -615,7 +627,7 @@ class Ht {
|
|
|
615
627
|
d,
|
|
616
628
|
l,
|
|
617
629
|
m,
|
|
618
|
-
|
|
630
|
+
g,
|
|
619
631
|
T - 1
|
|
620
632
|
);
|
|
621
633
|
} else {
|
|
@@ -628,7 +640,7 @@ class Ht {
|
|
|
628
640
|
i,
|
|
629
641
|
l,
|
|
630
642
|
d,
|
|
631
|
-
|
|
643
|
+
g,
|
|
632
644
|
T - 1
|
|
633
645
|
), this.addQuad_(
|
|
634
646
|
E,
|
|
@@ -645,12 +657,12 @@ class Ht {
|
|
|
645
657
|
return;
|
|
646
658
|
}
|
|
647
659
|
}
|
|
648
|
-
if (
|
|
660
|
+
if (w) {
|
|
649
661
|
if (!this.canWrapXInSource_)
|
|
650
662
|
return;
|
|
651
663
|
this.wrapsXInSource_ = !0;
|
|
652
664
|
}
|
|
653
|
-
(h & 11) == 0 && this.addTriangle_(t, s, n, i, m,
|
|
665
|
+
(h & 11) == 0 && this.addTriangle_(t, s, n, i, m, g), (h & 14) == 0 && this.addTriangle_(t, s, e, i, m, c), h && ((h & 13) == 0 && this.addTriangle_(e, n, t, c, g, i), (h & 7) == 0 && this.addTriangle_(e, n, s, c, g, m));
|
|
654
666
|
}
|
|
655
667
|
/**
|
|
656
668
|
* Calculates extent of the `source` coordinates from all the triangles.
|
|
@@ -658,10 +670,10 @@ class Ht {
|
|
|
658
670
|
* @return {import("../extent.js").Extent} Calculated extent.
|
|
659
671
|
*/
|
|
660
672
|
calculateSourceExtent() {
|
|
661
|
-
const t =
|
|
673
|
+
const t = _t();
|
|
662
674
|
return this.triangles_.forEach(function(e, s, n) {
|
|
663
675
|
const i = e.source;
|
|
664
|
-
|
|
676
|
+
$(t, i[0]), $(t, i[1]), $(t, i[2]);
|
|
665
677
|
}), t;
|
|
666
678
|
}
|
|
667
679
|
/**
|
|
@@ -671,8 +683,8 @@ class Ht {
|
|
|
671
683
|
return this.triangles_;
|
|
672
684
|
}
|
|
673
685
|
}
|
|
674
|
-
const
|
|
675
|
-
class
|
|
686
|
+
const bt = 0.5;
|
|
687
|
+
class Vt extends mt {
|
|
676
688
|
/**
|
|
677
689
|
* @param {import("../proj/Projection.js").default} sourceProj Source projection.
|
|
678
690
|
* @param {import("../tilegrid/TileGrid.js").default} sourceTileGrid Source tile grid.
|
|
@@ -688,33 +700,33 @@ class qt extends gt {
|
|
|
688
700
|
* @param {boolean} [renderEdges] Render reprojection edges.
|
|
689
701
|
* @param {import("../Tile.js").Options} [options] Tile options.
|
|
690
702
|
*/
|
|
691
|
-
constructor(t, e, s, n, i, c, m,
|
|
692
|
-
super(i,
|
|
693
|
-
const
|
|
703
|
+
constructor(t, e, s, n, i, c, m, g, T, X, x, F) {
|
|
704
|
+
super(i, _.IDLE, F), this.renderEdges_ = x !== void 0 ? x : !1, this.pixelRatio_ = m, this.gutter_ = g, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = n, this.wrappedTileCoord_ = c || i, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0, this.clipExtent_ = t.canWrapX() ? t.getExtent() : void 0;
|
|
705
|
+
const w = n.getTileCoordExtent(
|
|
694
706
|
this.wrappedTileCoord_
|
|
695
707
|
), r = this.targetTileGrid_.getExtent();
|
|
696
708
|
let h = this.sourceTileGrid_.getExtent();
|
|
697
|
-
const E = r ? V(
|
|
709
|
+
const E = r ? V(w, r) : w;
|
|
698
710
|
if (st(E) === 0) {
|
|
699
|
-
this.state =
|
|
711
|
+
this.state = _.EMPTY;
|
|
700
712
|
return;
|
|
701
713
|
}
|
|
702
714
|
const l = t.getExtent();
|
|
703
715
|
l && (h ? h = V(h, l) : h = l);
|
|
704
716
|
const f = n.getResolution(
|
|
705
717
|
this.wrappedTileCoord_[0]
|
|
706
|
-
), d =
|
|
718
|
+
), d = Nt(
|
|
707
719
|
t,
|
|
708
720
|
s,
|
|
709
721
|
E,
|
|
710
722
|
f
|
|
711
723
|
);
|
|
712
724
|
if (!isFinite(d) || d <= 0) {
|
|
713
|
-
this.state =
|
|
725
|
+
this.state = _.EMPTY;
|
|
714
726
|
return;
|
|
715
727
|
}
|
|
716
|
-
const u = X !== void 0 ? X :
|
|
717
|
-
if (this.triangulation_ = new
|
|
728
|
+
const u = X !== void 0 ? X : bt;
|
|
729
|
+
if (this.triangulation_ = new Kt(
|
|
718
730
|
t,
|
|
719
731
|
s,
|
|
720
732
|
E,
|
|
@@ -722,49 +734,49 @@ class qt extends gt {
|
|
|
722
734
|
d * u,
|
|
723
735
|
f
|
|
724
736
|
), this.triangulation_.getTriangles().length === 0) {
|
|
725
|
-
this.state =
|
|
737
|
+
this.state = _.EMPTY;
|
|
726
738
|
return;
|
|
727
739
|
}
|
|
728
740
|
this.sourceZ_ = e.getZForResolution(d);
|
|
729
|
-
let
|
|
730
|
-
if (h && (t.canWrapX() ? (
|
|
731
|
-
|
|
741
|
+
let o = this.triangulation_.calculateSourceExtent();
|
|
742
|
+
if (h && (t.canWrapX() ? (o[1] = ht(
|
|
743
|
+
o[1],
|
|
732
744
|
h[1],
|
|
733
745
|
h[3]
|
|
734
|
-
),
|
|
735
|
-
|
|
746
|
+
), o[3] = ht(
|
|
747
|
+
o[3],
|
|
736
748
|
h[1],
|
|
737
749
|
h[3]
|
|
738
|
-
)) :
|
|
739
|
-
this.state =
|
|
750
|
+
)) : o = V(o, h)), !st(o))
|
|
751
|
+
this.state = _.EMPTY;
|
|
740
752
|
else {
|
|
741
|
-
let
|
|
742
|
-
t.canWrapX() && (
|
|
743
|
-
(
|
|
744
|
-
)),
|
|
745
|
-
|
|
753
|
+
let y = 0, C = 0;
|
|
754
|
+
t.canWrapX() && (y = L(l), C = Math.floor(
|
|
755
|
+
(o[0] - l[0]) / y
|
|
756
|
+
)), At(
|
|
757
|
+
o.slice(),
|
|
746
758
|
t,
|
|
747
759
|
!0
|
|
748
760
|
).forEach((I) => {
|
|
749
|
-
const
|
|
761
|
+
const v = e.getTileRangeForExtentAndZ(
|
|
750
762
|
I,
|
|
751
763
|
this.sourceZ_
|
|
752
764
|
);
|
|
753
|
-
for (let Y =
|
|
754
|
-
for (let
|
|
755
|
-
const
|
|
756
|
-
if (
|
|
757
|
-
const D = C *
|
|
758
|
-
this.sourceTiles_.push({ tile:
|
|
765
|
+
for (let Y = v.minX; Y <= v.maxX; Y++)
|
|
766
|
+
for (let W = v.minY; W <= v.maxY; W++) {
|
|
767
|
+
const M = T(this.sourceZ_, Y, W, m);
|
|
768
|
+
if (M) {
|
|
769
|
+
const D = C * y;
|
|
770
|
+
this.sourceTiles_.push({ tile: M, offset: D });
|
|
759
771
|
}
|
|
760
772
|
}
|
|
761
773
|
++C;
|
|
762
|
-
}), this.sourceTiles_.length === 0 && (this.state =
|
|
774
|
+
}), this.sourceTiles_.length === 0 && (this.state = _.EMPTY);
|
|
763
775
|
}
|
|
764
776
|
}
|
|
765
777
|
/**
|
|
766
778
|
* Get the HTML Canvas element for this tile.
|
|
767
|
-
* @return {HTMLCanvasElement} Canvas.
|
|
779
|
+
* @return {HTMLCanvasElement|OffscreenCanvas} Canvas.
|
|
768
780
|
*/
|
|
769
781
|
getImage() {
|
|
770
782
|
return this.canvas_;
|
|
@@ -776,7 +788,7 @@ class qt extends gt {
|
|
|
776
788
|
const t = [];
|
|
777
789
|
if (this.sourceTiles_.forEach((e) => {
|
|
778
790
|
const s = e.tile;
|
|
779
|
-
if (s && s.getState() ==
|
|
791
|
+
if (s && s.getState() == _.LOADED) {
|
|
780
792
|
const n = this.sourceTileGrid_.getTileCoordExtent(s.tileCoord);
|
|
781
793
|
n[0] += e.offset, n[2] += e.offset;
|
|
782
794
|
const i = this.clipExtent_?.slice();
|
|
@@ -787,27 +799,27 @@ class qt extends gt {
|
|
|
787
799
|
});
|
|
788
800
|
}
|
|
789
801
|
}), this.sourceTiles_.length = 0, t.length === 0)
|
|
790
|
-
this.state =
|
|
802
|
+
this.state = _.ERROR;
|
|
791
803
|
else {
|
|
792
804
|
const e = this.wrappedTileCoord_[0], s = this.targetTileGrid_.getTileSize(e), n = typeof s == "number" ? s : s[0], i = typeof s == "number" ? s : s[1], c = this.targetTileGrid_.getResolution(e), m = this.sourceTileGrid_.getResolution(
|
|
793
805
|
this.sourceZ_
|
|
794
|
-
),
|
|
806
|
+
), g = this.targetTileGrid_.getTileCoordExtent(
|
|
795
807
|
this.wrappedTileCoord_
|
|
796
808
|
);
|
|
797
|
-
this.canvas_ =
|
|
809
|
+
this.canvas_ = St(
|
|
798
810
|
n,
|
|
799
811
|
i,
|
|
800
812
|
this.pixelRatio_,
|
|
801
813
|
m,
|
|
802
814
|
this.sourceTileGrid_.getExtent(),
|
|
803
815
|
c,
|
|
804
|
-
|
|
816
|
+
g,
|
|
805
817
|
this.triangulation_,
|
|
806
818
|
t,
|
|
807
819
|
this.gutter_,
|
|
808
820
|
this.renderEdges_,
|
|
809
821
|
this.interpolate
|
|
810
|
-
), this.state =
|
|
822
|
+
), this.state = _.LOADED;
|
|
811
823
|
}
|
|
812
824
|
this.changed();
|
|
813
825
|
}
|
|
@@ -816,21 +828,21 @@ class qt extends gt {
|
|
|
816
828
|
* @override
|
|
817
829
|
*/
|
|
818
830
|
load() {
|
|
819
|
-
if (this.state ==
|
|
820
|
-
this.state =
|
|
831
|
+
if (this.state == _.IDLE) {
|
|
832
|
+
this.state = _.LOADING, this.changed();
|
|
821
833
|
let t = 0;
|
|
822
834
|
this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach(({ tile: e }) => {
|
|
823
835
|
const s = e.getState();
|
|
824
|
-
if (s ==
|
|
836
|
+
if (s == _.IDLE || s == _.LOADING) {
|
|
825
837
|
t++;
|
|
826
|
-
const n =
|
|
838
|
+
const n = Pt(e, ft.CHANGE, (i) => {
|
|
827
839
|
const c = e.getState();
|
|
828
|
-
(c ==
|
|
840
|
+
(c == _.LOADED || c == _.ERROR || c == _.EMPTY) && (rt(n), t--, t === 0 && (this.unlistenSources_(), this.reproject_()));
|
|
829
841
|
});
|
|
830
842
|
this.sourcesListenerKeys_.push(n);
|
|
831
843
|
}
|
|
832
844
|
}), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function({ tile: e }, s, n) {
|
|
833
|
-
e.getState() ==
|
|
845
|
+
e.getState() == _.IDLE && e.load();
|
|
834
846
|
});
|
|
835
847
|
}
|
|
836
848
|
}
|
|
@@ -838,47 +850,53 @@ class qt extends gt {
|
|
|
838
850
|
* @private
|
|
839
851
|
*/
|
|
840
852
|
unlistenSources_() {
|
|
841
|
-
this.sourcesListenerKeys_.forEach(
|
|
853
|
+
this.sourcesListenerKeys_.forEach(rt), this.sourcesListenerKeys_ = null;
|
|
842
854
|
}
|
|
843
855
|
/**
|
|
844
856
|
* Remove from the cache due to expiry
|
|
845
857
|
* @override
|
|
846
858
|
*/
|
|
847
859
|
release() {
|
|
848
|
-
this.canvas_ && (et(
|
|
860
|
+
this.canvas_ && (et(
|
|
861
|
+
/** @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} */
|
|
862
|
+
this.canvas_.getContext("2d")
|
|
863
|
+
), B.push(this.canvas_), this.canvas_ = null), super.release();
|
|
849
864
|
}
|
|
850
865
|
}
|
|
851
|
-
function
|
|
852
|
-
return s !== void 0 ? (s[0] =
|
|
866
|
+
function Jt(a, t, e, s) {
|
|
867
|
+
return s !== void 0 ? (s[0] = a, s[1] = t, s[2] = e, s) : [a, t, e];
|
|
868
|
+
}
|
|
869
|
+
function Ht(a, t, e) {
|
|
870
|
+
return a + "/" + t + "/" + e;
|
|
853
871
|
}
|
|
854
|
-
function
|
|
855
|
-
return
|
|
872
|
+
function ts(a, t, e, s, n) {
|
|
873
|
+
return `${Rt(a)},${t},${Ht(e, s, n)}`;
|
|
856
874
|
}
|
|
857
|
-
function
|
|
858
|
-
return
|
|
875
|
+
function ss(a) {
|
|
876
|
+
return Ut(a[0], a[1], a[2]);
|
|
859
877
|
}
|
|
860
|
-
function
|
|
861
|
-
return (t <<
|
|
878
|
+
function Ut(a, t, e) {
|
|
879
|
+
return (t << a) + e;
|
|
862
880
|
}
|
|
863
|
-
function
|
|
864
|
-
const e =
|
|
881
|
+
function es(a, t) {
|
|
882
|
+
const e = a[0], s = a[1], n = a[2];
|
|
865
883
|
if (t.getMinZoom() > e || e > t.getMaxZoom())
|
|
866
884
|
return !1;
|
|
867
885
|
const i = t.getFullTileRange(e);
|
|
868
886
|
return i ? i.containsXY(s, n) : !0;
|
|
869
887
|
}
|
|
870
888
|
export {
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
889
|
+
bt as E,
|
|
890
|
+
zt as I,
|
|
891
|
+
Vt as R,
|
|
892
|
+
mt as T,
|
|
893
|
+
Kt as a,
|
|
894
|
+
Bt as b,
|
|
895
|
+
ut as c,
|
|
896
|
+
Jt as d,
|
|
897
|
+
$t as e,
|
|
898
|
+
ts as g,
|
|
899
|
+
ss as h,
|
|
900
|
+
St as r,
|
|
901
|
+
es as w
|
|
884
902
|
};
|