@datagouv/components-next 1.0.2-dev.207 → 1.0.2-dev.209
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-B9WQxlpJ.js → Control-DMgMzWnv.js} +1 -1
- package/dist/{Datafair.client-CZhPt853.js → Datafair.client-DpdHdQSx.js} +1 -1
- package/dist/{Event-iXDrp-fy.js → Event-CfA33G1K.js} +9 -9
- package/dist/{Image-mNMBOofs.js → Image-Dueb7njC.js} +12 -12
- package/dist/{ImagePreview.client-CTF6hyMR.js → ImagePreview.client-CtbvW_Q_.js} +1 -1
- package/dist/{JsonPreview.client-BwsgTnR7.js → JsonPreview.client-CboMjF2M.js} +2 -2
- package/dist/{Map-BfqKMw0S.js → Map-B4L0JtRr.js} +1113 -1025
- package/dist/{MapContainer.client-C95seuim.js → MapContainer.client-BPAbtzkr.js} +7 -7
- package/dist/{OSM-CcrUhItr.js → OSM-BUakwXg7.js} +1 -1
- package/dist/{PdfPreview.client-DaXPl9xc.js → PdfPreview.client-DQF8gS3o.js} +2 -2
- package/dist/{Pmtiles.client-PSLUkGmF.js → Pmtiles.client-B-X5pTXq.js} +5788 -5737
- package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-McCfJHd3.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-CzFj5TX2.js} +1 -1
- package/dist/{ScaleLine-VGQ7nkMS.js → ScaleLine-4id_Lp0T.js} +2 -2
- package/dist/{Tile-CSpn0Ca8.js → Tile-DI5PtNs-.js} +375 -325
- package/dist/{TileImage-CpbaEFwd.js → TileImage-DFTatxB8.js} +83 -63
- package/dist/{View-BYBpt-AU.js → View-CwG9s9BF.js} +108 -101
- package/dist/{XmlPreview.client-BOVVyHXW.js → XmlPreview.client-BvlwpV00.js} +3 -3
- package/dist/{common-BoeTUnDZ.js → common-C3bYhKiN.js} +71 -70
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +1 -1
- package/dist/components.css +2 -2
- package/dist/{index-CeH9i6IP.js → index-D2eZ5uVt.js} +5683 -5785
- package/dist/{leaflet-src-D1Cl1V-1.js → leaflet-src-CM7H_PEp.js} +1 -1
- package/dist/{main-DADRUTDs.js → main-D1VXLvop.js} +12531 -13523
- package/dist/{proj-DxGbobp7.js → proj-DQrI7bbu.js} +302 -282
- package/dist/{tilecoord-DvX7WWiA.js → tilecoord-xLae1hR5.js} +106 -106
- package/dist/{vue3-xml-viewer.common-BzsQ7xw8.js → vue3-xml-viewer.common-D8NyU_-4.js} +1 -1
- package/package.json +25 -25
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import { P as
|
|
3
|
-
import { C as
|
|
4
|
-
import { a as
|
|
5
|
-
import { M as
|
|
6
|
-
import { B as
|
|
7
|
-
const
|
|
1
|
+
import { B as st, H as at, E as A, aF as di, l as D, u as B, aG as bt, at as Ki, _ as fi, ad as Ke, T as Qe, aH as Bi, aI as gi, aJ as _i, a7 as Gi, O as et, a as Ne, d as Wi, a2 as Hi, am as W, f as $i, a8 as Yi, J as Ui, aj as Xi, ae as qi, N as Ft, I as Zi, C as Vt, aa as ji, $ as Ji, aK as Qi } from "./proj-DQrI7bbu.js";
|
|
2
|
+
import { P as mi, T as Le, r as en, f as Kt, W as tn, M as yi, t as Ae, d as v, g as Bt, c as fe, h as nn, i as ue, j as rn, k as se, l as sn, D as an, m as Gt } from "./Image-Dueb7njC.js";
|
|
3
|
+
import { C as Dt, a as ot, c as Tt, e as Wt, f as Ue, g as wt, h as on, M as le } from "./Control-DMgMzWnv.js";
|
|
4
|
+
import { a as Q, j as Be, k as ln, d as hn, n as cn, o as un, e as Ht, g as $t } from "./common-C3bYhKiN.js";
|
|
5
|
+
import { M as pi, s as dn, I as ce, V as Xe } from "./View-CwG9s9BF.js";
|
|
6
|
+
import { B as fn, f as Ei, t as wi, w as gn, r as Yt, l as _n, a as ze, b as mn, N as vi, L as Rt, i as Ci, c as yn, R as Se } from "./Event-CfA33G1K.js";
|
|
7
|
+
const H = {
|
|
8
8
|
/**
|
|
9
9
|
* Triggered when an item is added to the collection.
|
|
10
10
|
* @event module:ol/Collection.CollectionEvent#add
|
|
@@ -17,10 +17,10 @@ const W = {
|
|
|
17
17
|
* @api
|
|
18
18
|
*/
|
|
19
19
|
REMOVE: "remove"
|
|
20
|
-
},
|
|
20
|
+
}, Ut = {
|
|
21
21
|
LENGTH: "length"
|
|
22
22
|
};
|
|
23
|
-
class qe extends
|
|
23
|
+
class qe extends at {
|
|
24
24
|
/**
|
|
25
25
|
* @param {import("./CollectionEventType.js").default} type Type.
|
|
26
26
|
* @param {T} element Element.
|
|
@@ -30,7 +30,7 @@ class qe extends rt {
|
|
|
30
30
|
super(e), this.element = t, this.index = i;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
class
|
|
33
|
+
class Y extends st {
|
|
34
34
|
/**
|
|
35
35
|
* @param {Array<T>} [array] Array.
|
|
36
36
|
* @param {Options} [options] Collection options.
|
|
@@ -100,7 +100,7 @@ class U extends nt {
|
|
|
100
100
|
* @api
|
|
101
101
|
*/
|
|
102
102
|
getLength() {
|
|
103
|
-
return this.get(
|
|
103
|
+
return this.get(Ut.LENGTH);
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
106
106
|
* Insert an element at the provided index.
|
|
@@ -112,7 +112,7 @@ class U extends nt {
|
|
|
112
112
|
if (e < 0 || e > this.getLength())
|
|
113
113
|
throw new Error("Index out of bounds: " + e);
|
|
114
114
|
this.unique_ && this.assertUnique_(t), this.array_.splice(e, 0, t), this.updateLength_(), this.dispatchEvent(
|
|
115
|
-
new qe(
|
|
115
|
+
new qe(H.ADD, t, e)
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
@@ -159,7 +159,7 @@ class U extends nt {
|
|
|
159
159
|
const t = this.array_[e];
|
|
160
160
|
return this.array_.splice(e, 1), this.updateLength_(), this.dispatchEvent(
|
|
161
161
|
/** @type {CollectionEvent<T>} */
|
|
162
|
-
new qe(
|
|
162
|
+
new qe(H.REMOVE, t, e)
|
|
163
163
|
), t;
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
@@ -180,17 +180,17 @@ class U extends nt {
|
|
|
180
180
|
const r = this.array_[e];
|
|
181
181
|
this.array_[e] = t, this.dispatchEvent(
|
|
182
182
|
/** @type {CollectionEvent<T>} */
|
|
183
|
-
new qe(
|
|
183
|
+
new qe(H.REMOVE, r, e)
|
|
184
184
|
), this.dispatchEvent(
|
|
185
185
|
/** @type {CollectionEvent<T>} */
|
|
186
|
-
new qe(
|
|
186
|
+
new qe(H.ADD, t, e)
|
|
187
187
|
);
|
|
188
188
|
}
|
|
189
189
|
/**
|
|
190
190
|
* @private
|
|
191
191
|
*/
|
|
192
192
|
updateLength_() {
|
|
193
|
-
this.set(
|
|
193
|
+
this.set(Ut.LENGTH, this.array_.length);
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
196
|
* @private
|
|
@@ -204,7 +204,7 @@ class U extends nt {
|
|
|
204
204
|
throw new Error("Duplicate item added to a unique collection");
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
class
|
|
207
|
+
class Ee extends at {
|
|
208
208
|
/**
|
|
209
209
|
* @param {string} type Event type.
|
|
210
210
|
* @param {import("./Map.js").default} map Map.
|
|
@@ -214,7 +214,7 @@ class ye extends rt {
|
|
|
214
214
|
super(e), this.map = t, this.frameState = i !== void 0 ? i : null;
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
class
|
|
217
|
+
class ne extends Ee {
|
|
218
218
|
/**
|
|
219
219
|
* @param {string} type Event type.
|
|
220
220
|
* @param {import("./Map.js").default} map Map.
|
|
@@ -281,13 +281,13 @@ const b = {
|
|
|
281
281
|
* @event module:ol/MapBrowserEvent~MapBrowserEvent#click
|
|
282
282
|
* @api
|
|
283
283
|
*/
|
|
284
|
-
CLICK:
|
|
284
|
+
CLICK: A.CLICK,
|
|
285
285
|
/**
|
|
286
286
|
* A true double click, with no dragging.
|
|
287
287
|
* @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick
|
|
288
288
|
* @api
|
|
289
289
|
*/
|
|
290
|
-
DBLCLICK:
|
|
290
|
+
DBLCLICK: A.DBLCLICK,
|
|
291
291
|
/**
|
|
292
292
|
* Triggered when a pointer is dragged.
|
|
293
293
|
* @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag
|
|
@@ -308,11 +308,11 @@ const b = {
|
|
|
308
308
|
POINTERENTER: "pointerenter",
|
|
309
309
|
POINTERLEAVE: "pointerleave",
|
|
310
310
|
POINTERCANCEL: "pointercancel"
|
|
311
|
-
},
|
|
311
|
+
}, vt = {
|
|
312
312
|
POINTERMOVE: "pointermove",
|
|
313
313
|
POINTERDOWN: "pointerdown"
|
|
314
314
|
};
|
|
315
|
-
class
|
|
315
|
+
class pn extends di {
|
|
316
316
|
/**
|
|
317
317
|
* @param {import("./Map.js").default} map The map with the viewport to listen to events on.
|
|
318
318
|
* @param {number} [moveTolerance] The minimal distance the pointer must travel to trigger a move.
|
|
@@ -322,18 +322,18 @@ class gn extends oi {
|
|
|
322
322
|
const i = this.map_.getViewport();
|
|
323
323
|
this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = i, this.pointerdownListenerKey_ = D(
|
|
324
324
|
i,
|
|
325
|
-
|
|
325
|
+
vt.POINTERDOWN,
|
|
326
326
|
this.handlePointerDown_,
|
|
327
327
|
this
|
|
328
328
|
), this.originalPointerMoveEvent_, this.relayedListenerKey_ = D(
|
|
329
329
|
i,
|
|
330
|
-
|
|
330
|
+
vt.POINTERMOVE,
|
|
331
331
|
this.relayMoveEvent_,
|
|
332
332
|
this
|
|
333
333
|
), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener(
|
|
334
|
-
|
|
334
|
+
A.TOUCHMOVE,
|
|
335
335
|
this.boundHandleTouchMove_,
|
|
336
|
-
|
|
336
|
+
mi ? { passive: !1 } : !1
|
|
337
337
|
);
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
@@ -342,18 +342,18 @@ class gn extends oi {
|
|
|
342
342
|
* @private
|
|
343
343
|
*/
|
|
344
344
|
emulateClick_(e) {
|
|
345
|
-
let t = new
|
|
345
|
+
let t = new ne(
|
|
346
346
|
b.CLICK,
|
|
347
347
|
this.map_,
|
|
348
348
|
e
|
|
349
349
|
);
|
|
350
|
-
this.dispatchEvent(t), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, t = new
|
|
350
|
+
this.dispatchEvent(t), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, t = new ne(
|
|
351
351
|
b.DBLCLICK,
|
|
352
352
|
this.map_,
|
|
353
353
|
e
|
|
354
354
|
), this.dispatchEvent(t)) : this.clickTimeoutId_ = setTimeout(() => {
|
|
355
355
|
this.clickTimeoutId_ = void 0;
|
|
356
|
-
const i = new
|
|
356
|
+
const i = new ne(
|
|
357
357
|
b.SINGLECLICK,
|
|
358
358
|
this.map_,
|
|
359
359
|
e
|
|
@@ -387,7 +387,7 @@ class gn extends oi {
|
|
|
387
387
|
*/
|
|
388
388
|
handlePointerUp_(e) {
|
|
389
389
|
this.updateActivePointers_(e);
|
|
390
|
-
const t = new
|
|
390
|
+
const t = new ne(
|
|
391
391
|
b.POINTERUP,
|
|
392
392
|
this.map_,
|
|
393
393
|
e,
|
|
@@ -395,7 +395,7 @@ class gn extends oi {
|
|
|
395
395
|
void 0,
|
|
396
396
|
this.activePointers_
|
|
397
397
|
);
|
|
398
|
-
this.dispatchEvent(t), this.emulateClicks_ && !t.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(e) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(
|
|
398
|
+
this.dispatchEvent(t), this.emulateClicks_ && !t.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(e) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(B), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null);
|
|
399
399
|
}
|
|
400
400
|
/**
|
|
401
401
|
* @param {PointerEvent} pointerEvent Pointer
|
|
@@ -413,7 +413,7 @@ class gn extends oi {
|
|
|
413
413
|
*/
|
|
414
414
|
handlePointerDown_(e) {
|
|
415
415
|
this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(e);
|
|
416
|
-
const t = new
|
|
416
|
+
const t = new ne(
|
|
417
417
|
b.POINTERDOWN,
|
|
418
418
|
this.map_,
|
|
419
419
|
e,
|
|
@@ -471,7 +471,7 @@ class gn extends oi {
|
|
|
471
471
|
handlePointerMove_(e) {
|
|
472
472
|
if (this.isMoving_(e)) {
|
|
473
473
|
this.updateActivePointers_(e), this.dragging_ = !0;
|
|
474
|
-
const t = new
|
|
474
|
+
const t = new ne(
|
|
475
475
|
b.POINTERDRAG,
|
|
476
476
|
this.map_,
|
|
477
477
|
e,
|
|
@@ -492,7 +492,7 @@ class gn extends oi {
|
|
|
492
492
|
this.originalPointerMoveEvent_ = e;
|
|
493
493
|
const t = !!(this.down_ && this.isMoving_(e));
|
|
494
494
|
this.dispatchEvent(
|
|
495
|
-
new
|
|
495
|
+
new ne(
|
|
496
496
|
b.POINTERMOVE,
|
|
497
497
|
this.map_,
|
|
498
498
|
e,
|
|
@@ -526,19 +526,19 @@ class gn extends oi {
|
|
|
526
526
|
* @override
|
|
527
527
|
*/
|
|
528
528
|
disposeInternal() {
|
|
529
|
-
this.relayedListenerKey_ && (
|
|
530
|
-
|
|
529
|
+
this.relayedListenerKey_ && (B(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener(
|
|
530
|
+
A.TOUCHMOVE,
|
|
531
531
|
this.boundHandleTouchMove_
|
|
532
|
-
), this.pointerdownListenerKey_ && (
|
|
532
|
+
), this.pointerdownListenerKey_ && (B(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(B), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal();
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
const
|
|
535
|
+
const N = {
|
|
536
536
|
LAYERGROUP: "layergroup",
|
|
537
537
|
SIZE: "size",
|
|
538
538
|
TARGET: "target",
|
|
539
539
|
VIEW: "view"
|
|
540
540
|
}, tt = 1 / 0;
|
|
541
|
-
class
|
|
541
|
+
class En {
|
|
542
542
|
/**
|
|
543
543
|
* @param {function(T): number} priorityFunction Priority function.
|
|
544
544
|
* @param {function(T): string} keyFunction Key function.
|
|
@@ -550,7 +550,7 @@ class _n {
|
|
|
550
550
|
* FIXME empty description for jsdoc
|
|
551
551
|
*/
|
|
552
552
|
clear() {
|
|
553
|
-
this.elements_.length = 0, this.priorities_.length = 0,
|
|
553
|
+
this.elements_.length = 0, this.priorities_.length = 0, bt(this.queuedElements_);
|
|
554
554
|
}
|
|
555
555
|
/**
|
|
556
556
|
* Remove and return the highest-priority element. O(log N).
|
|
@@ -570,7 +570,7 @@ class _n {
|
|
|
570
570
|
* @return {boolean} The element was added to the queue.
|
|
571
571
|
*/
|
|
572
572
|
enqueue(e) {
|
|
573
|
-
|
|
573
|
+
Q(
|
|
574
574
|
!(this.keyFunction_(e) in this.queuedElements_),
|
|
575
575
|
"Tried to enqueue an `element` that was already added to the queue"
|
|
576
576
|
);
|
|
@@ -680,7 +680,7 @@ class _n {
|
|
|
680
680
|
t.length = r, i.length = r, this.heapify_();
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
class
|
|
683
|
+
class wn extends En {
|
|
684
684
|
/**
|
|
685
685
|
* @param {PriorityFunction} tilePriorityFunction Tile priority function.
|
|
686
686
|
* @param {function(): ?} tileChangeCallback Function called on each tile change event.
|
|
@@ -698,7 +698,7 @@ class mn extends _n {
|
|
|
698
698
|
*/
|
|
699
699
|
enqueue(e) {
|
|
700
700
|
const t = super.enqueue(e);
|
|
701
|
-
return t && e[0].addEventListener(
|
|
701
|
+
return t && e[0].addEventListener(A.CHANGE, this.boundHandleTileChange_), t;
|
|
702
702
|
}
|
|
703
703
|
/**
|
|
704
704
|
* @return {number} Number of tiles loading.
|
|
@@ -716,7 +716,7 @@ class mn extends _n {
|
|
|
716
716
|
e.target
|
|
717
717
|
), i = t.getState();
|
|
718
718
|
if (i === Le.LOADED || i === Le.ERROR || i === Le.EMPTY) {
|
|
719
|
-
i !== Le.ERROR && t.removeEventListener(
|
|
719
|
+
i !== Le.ERROR && t.removeEventListener(A.CHANGE, this.boundHandleTileChange_);
|
|
720
720
|
const r = t.getKey();
|
|
721
721
|
r in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[r], --this.tilesLoading_), this.tileChangeCallback_();
|
|
722
722
|
}
|
|
@@ -733,13 +733,13 @@ class mn extends _n {
|
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function vn(n, e, t, i, r) {
|
|
737
737
|
if (!n || !(t in n.wantedTiles) || !n.wantedTiles[t][e.getKey()])
|
|
738
738
|
return tt;
|
|
739
739
|
const s = n.viewState.center, a = i[0] - s[0], o = i[1] - s[1];
|
|
740
740
|
return 65536 * Math.log(r) + Math.sqrt(a * a + o * o) / r;
|
|
741
741
|
}
|
|
742
|
-
class
|
|
742
|
+
class Cn extends Dt {
|
|
743
743
|
/**
|
|
744
744
|
* @param {Options} [options] Attribution options.
|
|
745
745
|
*/
|
|
@@ -755,11 +755,11 @@ class pn extends At {
|
|
|
755
755
|
typeof o == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = o, this.label_.className = r) : this.label_ = o;
|
|
756
756
|
const l = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;
|
|
757
757
|
this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = i, this.toggleButton_.appendChild(l), this.toggleButton_.addEventListener(
|
|
758
|
-
|
|
758
|
+
A.CLICK,
|
|
759
759
|
this.handleClick_.bind(this),
|
|
760
760
|
!1
|
|
761
761
|
);
|
|
762
|
-
const h = t + " " +
|
|
762
|
+
const h = t + " " + ot + " " + Tt + (this.collapsed_ && this.collapsible_ ? " " + Wt : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element;
|
|
763
763
|
c.className = h, c.appendChild(this.toggleButton_), c.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0;
|
|
764
764
|
}
|
|
765
765
|
/**
|
|
@@ -791,11 +791,11 @@ class pn extends At {
|
|
|
791
791
|
}
|
|
792
792
|
const t = await Promise.all(
|
|
793
793
|
this.collectSourceAttributions_(e).map(
|
|
794
|
-
(r) =>
|
|
794
|
+
(r) => Ki(() => r)
|
|
795
795
|
)
|
|
796
796
|
), i = t.length > 0;
|
|
797
|
-
if (this.renderedVisible_ != i && (this.element.style.display = i ? "" : "none", this.renderedVisible_ = i), !
|
|
798
|
-
|
|
797
|
+
if (this.renderedVisible_ != i && (this.element.style.display = i ? "" : "none", this.renderedVisible_ = i), !fi(t, this.renderedAttributions_)) {
|
|
798
|
+
en(this.ulElement_);
|
|
799
799
|
for (let r = 0, s = t.length; r < s; ++r) {
|
|
800
800
|
const a = document.createElement("li");
|
|
801
801
|
a.innerHTML = t[r], this.ulElement_.appendChild(a);
|
|
@@ -814,7 +814,7 @@ class pn extends At {
|
|
|
814
814
|
* @private
|
|
815
815
|
*/
|
|
816
816
|
handleToggle_() {
|
|
817
|
-
this.element.classList.toggle(
|
|
817
|
+
this.element.classList.toggle(Wt), this.collapsed_ ? Kt(this.collapseLabel_, this.label_) : Kt(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_));
|
|
818
818
|
}
|
|
819
819
|
/**
|
|
820
820
|
* Return `true` if the attribution is collapsible, `false` otherwise.
|
|
@@ -860,7 +860,7 @@ class pn extends At {
|
|
|
860
860
|
this.updateElement_(e.frameState);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
|
-
class
|
|
863
|
+
class An extends Dt {
|
|
864
864
|
/**
|
|
865
865
|
* @param {Options} [options] Rotate options.
|
|
866
866
|
*/
|
|
@@ -874,12 +874,12 @@ class En extends At {
|
|
|
874
874
|
this.label_ = null, typeof i == "string" ? (this.label_ = document.createElement("span"), this.label_.className = r, this.label_.textContent = i) : (this.label_ = i, this.label_.classList.add(r));
|
|
875
875
|
const s = e.tipLabel ? e.tipLabel : "Reset rotation", a = document.createElement("button");
|
|
876
876
|
a.className = t + "-reset", a.setAttribute("type", "button"), a.title = s, a.appendChild(this.label_), a.addEventListener(
|
|
877
|
-
|
|
877
|
+
A.CLICK,
|
|
878
878
|
this.handleClick_.bind(this),
|
|
879
879
|
!1
|
|
880
880
|
);
|
|
881
|
-
const o = t + " " +
|
|
882
|
-
l.className = o, l.appendChild(a), this.callResetNorth_ = e.resetNorth ? e.resetNorth : void 0, this.duration_ = e.duration !== void 0 ? e.duration : 250, this.autoHide_ = e.autoHide !== void 0 ? e.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(
|
|
881
|
+
const o = t + " " + ot + " " + Tt, l = this.element;
|
|
882
|
+
l.className = o, l.appendChild(a), this.callResetNorth_ = e.resetNorth ? e.resetNorth : void 0, this.duration_ = e.duration !== void 0 ? e.duration : 250, this.autoHide_ = e.autoHide !== void 0 ? e.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(Ue);
|
|
883
883
|
}
|
|
884
884
|
/**
|
|
885
885
|
* @param {MouseEvent} event The event to handle
|
|
@@ -915,15 +915,15 @@ class En extends At {
|
|
|
915
915
|
if (i != this.rotation_) {
|
|
916
916
|
const r = "rotate(" + i + "rad)";
|
|
917
917
|
if (this.autoHide_) {
|
|
918
|
-
const s = this.element.classList.contains(
|
|
919
|
-
!s && i === 0 ? this.element.classList.add(
|
|
918
|
+
const s = this.element.classList.contains(Ue);
|
|
919
|
+
!s && i === 0 ? this.element.classList.add(Ue) : s && i !== 0 && this.element.classList.remove(Ue);
|
|
920
920
|
}
|
|
921
921
|
this.label_.style.transform = r;
|
|
922
922
|
}
|
|
923
923
|
this.rotation_ = i;
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
|
-
class
|
|
926
|
+
class In extends Dt {
|
|
927
927
|
/**
|
|
928
928
|
* @param {Options} [options] Zoom options.
|
|
929
929
|
*/
|
|
@@ -936,7 +936,7 @@ class wn extends At {
|
|
|
936
936
|
c.className = r, c.setAttribute("type", "button"), c.title = l, c.appendChild(
|
|
937
937
|
typeof a == "string" ? document.createTextNode(a) : a
|
|
938
938
|
), c.addEventListener(
|
|
939
|
-
|
|
939
|
+
A.CLICK,
|
|
940
940
|
this.handleClick_.bind(this, i),
|
|
941
941
|
!1
|
|
942
942
|
);
|
|
@@ -944,12 +944,12 @@ class wn extends At {
|
|
|
944
944
|
d.className = s, d.setAttribute("type", "button"), d.title = h, d.appendChild(
|
|
945
945
|
typeof o == "string" ? document.createTextNode(o) : o
|
|
946
946
|
), d.addEventListener(
|
|
947
|
-
|
|
947
|
+
A.CLICK,
|
|
948
948
|
this.handleClick_.bind(this, -i),
|
|
949
949
|
!1
|
|
950
950
|
);
|
|
951
|
-
const f = t + " " +
|
|
952
|
-
|
|
951
|
+
const f = t + " " + ot + " " + Tt, g = this.element;
|
|
952
|
+
g.className = f, g.appendChild(c), g.appendChild(d), this.duration_ = e.duration !== void 0 ? e.duration : 250;
|
|
953
953
|
}
|
|
954
954
|
/**
|
|
955
955
|
* @param {number} delta Zoom delta.
|
|
@@ -978,12 +978,12 @@ class wn extends At {
|
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function Ln(n) {
|
|
982
982
|
n = n || {};
|
|
983
|
-
const e = new
|
|
984
|
-
return (n.zoom === void 0 || n.zoom) && e.push(new
|
|
983
|
+
const e = new Y();
|
|
984
|
+
return (n.zoom === void 0 || n.zoom) && e.push(new In(n.zoomOptions)), (n.rotate === void 0 || n.rotate) && e.push(new An(n.rotateOptions)), (n.attribution === void 0 || n.attribution) && e.push(new Cn(n.attributionOptions)), e;
|
|
985
985
|
}
|
|
986
|
-
class
|
|
986
|
+
class bn {
|
|
987
987
|
/**
|
|
988
988
|
* @param {number} decay Rate of decay (must be negative).
|
|
989
989
|
* @param {number} minVelocity Minimum velocity (pixels/millisecond).
|
|
@@ -1037,10 +1037,10 @@ class Cn {
|
|
|
1037
1037
|
return this.angle_;
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
-
const
|
|
1040
|
+
const Xt = {
|
|
1041
1041
|
ACTIVE: "active"
|
|
1042
1042
|
};
|
|
1043
|
-
class Ge extends
|
|
1043
|
+
class Ge extends st {
|
|
1044
1044
|
/**
|
|
1045
1045
|
* @param {InteractionOptions} [options] Options.
|
|
1046
1046
|
*/
|
|
@@ -1056,7 +1056,7 @@ class Ge extends nt {
|
|
|
1056
1056
|
getActive() {
|
|
1057
1057
|
return (
|
|
1058
1058
|
/** @type {boolean} */
|
|
1059
|
-
this.get(
|
|
1059
|
+
this.get(Xt.ACTIVE)
|
|
1060
1060
|
);
|
|
1061
1061
|
}
|
|
1062
1062
|
/**
|
|
@@ -1083,7 +1083,7 @@ class Ge extends nt {
|
|
|
1083
1083
|
* @api
|
|
1084
1084
|
*/
|
|
1085
1085
|
setActive(e) {
|
|
1086
|
-
this.set(
|
|
1086
|
+
this.set(Xt.ACTIVE, e);
|
|
1087
1087
|
}
|
|
1088
1088
|
/**
|
|
1089
1089
|
* Remove the interaction from its current map and attach it to the new map.
|
|
@@ -1095,18 +1095,18 @@ class Ge extends nt {
|
|
|
1095
1095
|
this.map_ = e;
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Dn(n, e, t) {
|
|
1099
1099
|
const i = n.getCenterInternal();
|
|
1100
1100
|
if (i) {
|
|
1101
1101
|
const r = [i[0] + e[0], i[1] + e[1]];
|
|
1102
1102
|
n.animateInternal({
|
|
1103
1103
|
duration: t !== void 0 ? t : 250,
|
|
1104
|
-
easing:
|
|
1104
|
+
easing: ln,
|
|
1105
1105
|
center: n.getConstrainedCenter(r)
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Pt(n, e, t, i) {
|
|
1110
1110
|
const r = n.getZoom();
|
|
1111
1111
|
if (r === void 0)
|
|
1112
1112
|
return;
|
|
@@ -1118,7 +1118,7 @@ function Tt(n, e, t, i) {
|
|
|
1118
1118
|
easing: Be
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
class
|
|
1121
|
+
class Tn extends Ge {
|
|
1122
1122
|
/**
|
|
1123
1123
|
* @param {Options} [options] Options.
|
|
1124
1124
|
*/
|
|
@@ -1139,12 +1139,12 @@ class In extends Ge {
|
|
|
1139
1139
|
/** @type {MouseEvent} */
|
|
1140
1140
|
e.originalEvent
|
|
1141
1141
|
), r = e.map, s = e.coordinate, a = i.shiftKey ? -this.delta_ : this.delta_, o = r.getView();
|
|
1142
|
-
|
|
1142
|
+
Pt(o, a, s, this.duration_), i.preventDefault(), t = !0;
|
|
1143
1143
|
}
|
|
1144
1144
|
return !t;
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function Ct(n) {
|
|
1148
1148
|
const e = arguments;
|
|
1149
1149
|
return function(t) {
|
|
1150
1150
|
let i = !0;
|
|
@@ -1153,38 +1153,38 @@ function wt(n) {
|
|
|
1153
1153
|
return i;
|
|
1154
1154
|
};
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1156
|
+
const cs = function(n) {
|
|
1157
1157
|
const e = n.originalEvent;
|
|
1158
1158
|
return e.altKey && !(e.metaKey || e.ctrlKey) && !e.shiftKey;
|
|
1159
|
-
},
|
|
1159
|
+
}, Rn = function(n) {
|
|
1160
1160
|
const e = n.originalEvent;
|
|
1161
1161
|
return e.altKey && !(e.metaKey || e.ctrlKey) && e.shiftKey;
|
|
1162
|
-
},
|
|
1162
|
+
}, Pn = function(n) {
|
|
1163
1163
|
const e = n.map.getTargetElement(), t = e.getRootNode(), i = n.map.getOwnerDocument().activeElement;
|
|
1164
1164
|
return t instanceof ShadowRoot ? t.host.contains(i) : e.contains(i);
|
|
1165
|
-
},
|
|
1165
|
+
}, Ai = function(n) {
|
|
1166
1166
|
const e = n.map.getTargetElement(), t = e.getRootNode();
|
|
1167
|
-
return (t instanceof ShadowRoot ? t.host : e).hasAttribute("tabindex") ?
|
|
1168
|
-
},
|
|
1167
|
+
return (t instanceof ShadowRoot ? t.host : e).hasAttribute("tabindex") ? Pn(n) : !0;
|
|
1168
|
+
}, On = Qe, Ii = function(n) {
|
|
1169
1169
|
const e = n.originalEvent;
|
|
1170
|
-
return "pointerId" in e && e.button == 0 && !(
|
|
1171
|
-
},
|
|
1170
|
+
return "pointerId" in e && e.button == 0 && !(tn && yi && e.ctrlKey);
|
|
1171
|
+
}, us = Ke, ds = function(n) {
|
|
1172
1172
|
return n.type == "pointermove";
|
|
1173
|
-
},
|
|
1173
|
+
}, fs = function(n) {
|
|
1174
1174
|
return n.type == b.SINGLECLICK;
|
|
1175
|
-
},
|
|
1175
|
+
}, Li = function(n) {
|
|
1176
1176
|
const e = (
|
|
1177
1177
|
/** @type {KeyboardEvent|MouseEvent|TouchEvent} */
|
|
1178
1178
|
n.originalEvent
|
|
1179
1179
|
);
|
|
1180
1180
|
return !e.altKey && !(e.metaKey || e.ctrlKey) && !e.shiftKey;
|
|
1181
|
-
},
|
|
1181
|
+
}, xn = function(n) {
|
|
1182
1182
|
const e = n.originalEvent;
|
|
1183
|
-
return
|
|
1184
|
-
},
|
|
1183
|
+
return yi ? e.metaKey : e.ctrlKey;
|
|
1184
|
+
}, Mn = function(n) {
|
|
1185
1185
|
const e = n.originalEvent;
|
|
1186
1186
|
return !e.altKey && !(e.metaKey || e.ctrlKey) && e.shiftKey;
|
|
1187
|
-
},
|
|
1187
|
+
}, bi = function(n) {
|
|
1188
1188
|
const e = n.originalEvent, t = (
|
|
1189
1189
|
/** @type {Element} */
|
|
1190
1190
|
e.target.tagName
|
|
@@ -1193,10 +1193,10 @@ const as = function(n) {
|
|
|
1193
1193
|
// different type like `SVGElement`.
|
|
1194
1194
|
// @ts-ignore
|
|
1195
1195
|
!e.target.isContentEditable;
|
|
1196
|
-
},
|
|
1196
|
+
}, ft = function(n) {
|
|
1197
1197
|
const e = n.originalEvent;
|
|
1198
1198
|
return "pointerId" in e && e.pointerType == "mouse";
|
|
1199
|
-
},
|
|
1199
|
+
}, Sn = function(n) {
|
|
1200
1200
|
const e = n.originalEvent;
|
|
1201
1201
|
return "pointerId" in e && e.isPrimary && e.button === 0;
|
|
1202
1202
|
};
|
|
@@ -1294,23 +1294,23 @@ class We extends Ge {
|
|
|
1294
1294
|
e.activePointers && (this.targetPointers = e.activePointers);
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function Ot(n) {
|
|
1298
1298
|
const e = n.length;
|
|
1299
1299
|
let t = 0, i = 0;
|
|
1300
1300
|
for (let r = 0; r < e; r++)
|
|
1301
1301
|
t += n[r].clientX, i += n[r].clientY;
|
|
1302
1302
|
return { clientX: t / e, clientY: i / e };
|
|
1303
1303
|
}
|
|
1304
|
-
class
|
|
1304
|
+
class kn extends We {
|
|
1305
1305
|
/**
|
|
1306
1306
|
* @param {Options} [options] Options.
|
|
1307
1307
|
*/
|
|
1308
1308
|
constructor(e) {
|
|
1309
1309
|
super({
|
|
1310
|
-
stopDown:
|
|
1310
|
+
stopDown: Ke
|
|
1311
1311
|
}), e = e || {}, this.kinetic_ = e.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1;
|
|
1312
|
-
const t = e.condition ? e.condition :
|
|
1313
|
-
this.condition_ = e.onFocusOnly ?
|
|
1312
|
+
const t = e.condition ? e.condition : Ct(Li, Sn);
|
|
1313
|
+
this.condition_ = e.onFocusOnly ? Ct(Ai, t) : t, this.noKinetic_ = !1;
|
|
1314
1314
|
}
|
|
1315
1315
|
/**
|
|
1316
1316
|
* Handle pointer drag events.
|
|
@@ -1320,14 +1320,14 @@ class On extends We {
|
|
|
1320
1320
|
handleDragEvent(e) {
|
|
1321
1321
|
const t = e.map;
|
|
1322
1322
|
this.panning_ || (this.panning_ = !0, t.getView().beginInteraction());
|
|
1323
|
-
const i = this.targetPointers, r = t.getEventPixel(
|
|
1323
|
+
const i = this.targetPointers, r = t.getEventPixel(Ot(i));
|
|
1324
1324
|
if (i.length == this.lastPointersCount_) {
|
|
1325
1325
|
if (this.kinetic_ && this.kinetic_.update(r[0], r[1]), this.lastCentroid) {
|
|
1326
1326
|
const s = [
|
|
1327
1327
|
this.lastCentroid[0] - r[0],
|
|
1328
1328
|
r[1] - this.lastCentroid[1]
|
|
1329
1329
|
], o = e.map.getView();
|
|
1330
|
-
|
|
1330
|
+
Bi(s, o.getResolution()), gi(s, o.getRotation()), o.adjustCenterInternal(s);
|
|
1331
1331
|
}
|
|
1332
1332
|
} else this.kinetic_ && this.kinetic_.begin();
|
|
1333
1333
|
this.lastCentroid = r, this.lastPointersCount_ = i.length, e.originalEvent.preventDefault();
|
|
@@ -1370,14 +1370,14 @@ class On extends We {
|
|
|
1370
1370
|
return !1;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
class
|
|
1373
|
+
class Nn extends We {
|
|
1374
1374
|
/**
|
|
1375
1375
|
* @param {Options} [options] Options.
|
|
1376
1376
|
*/
|
|
1377
1377
|
constructor(e) {
|
|
1378
1378
|
e = e || {}, super({
|
|
1379
|
-
stopDown:
|
|
1380
|
-
}), this.condition_ = e.condition ? e.condition :
|
|
1379
|
+
stopDown: Ke
|
|
1380
|
+
}), this.condition_ = e.condition ? e.condition : Rn, this.lastAngle_ = void 0, this.duration_ = e.duration !== void 0 ? e.duration : 250;
|
|
1381
1381
|
}
|
|
1382
1382
|
/**
|
|
1383
1383
|
* Handle pointer drag events.
|
|
@@ -1385,10 +1385,10 @@ class xn extends We {
|
|
|
1385
1385
|
* @override
|
|
1386
1386
|
*/
|
|
1387
1387
|
handleDragEvent(e) {
|
|
1388
|
-
if (!
|
|
1388
|
+
if (!ft(e))
|
|
1389
1389
|
return;
|
|
1390
1390
|
const t = e.map, i = t.getView();
|
|
1391
|
-
if (i.getConstraints().rotation ===
|
|
1391
|
+
if (i.getConstraints().rotation === pi)
|
|
1392
1392
|
return;
|
|
1393
1393
|
const r = t.getSize(), s = e.pixel, a = Math.atan2(r[1] / 2 - s[1], s[0] - r[0] / 2);
|
|
1394
1394
|
if (this.lastAngle_ !== void 0) {
|
|
@@ -1404,7 +1404,7 @@ class xn extends We {
|
|
|
1404
1404
|
* @override
|
|
1405
1405
|
*/
|
|
1406
1406
|
handleUpEvent(e) {
|
|
1407
|
-
return
|
|
1407
|
+
return ft(e) ? (e.map.getView().endInteraction(this.duration_), !1) : !0;
|
|
1408
1408
|
}
|
|
1409
1409
|
/**
|
|
1410
1410
|
* Handle pointer down events.
|
|
@@ -1413,10 +1413,10 @@ class xn extends We {
|
|
|
1413
1413
|
* @override
|
|
1414
1414
|
*/
|
|
1415
1415
|
handleDownEvent(e) {
|
|
1416
|
-
return
|
|
1416
|
+
return ft(e) && Ii(e) && this.condition_(e) ? (e.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1;
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
class
|
|
1419
|
+
class zn extends _i {
|
|
1420
1420
|
/**
|
|
1421
1421
|
* @param {string} className CSS class name.
|
|
1422
1422
|
*/
|
|
@@ -1470,7 +1470,7 @@ class Mn extends ci {
|
|
|
1470
1470
|
this.map_.getCoordinateFromPixelInternal,
|
|
1471
1471
|
this.map_
|
|
1472
1472
|
);
|
|
1473
|
-
r[4] = r[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([r]) : this.geometry_ = new
|
|
1473
|
+
r[4] = r[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([r]) : this.geometry_ = new dn([r]);
|
|
1474
1474
|
}
|
|
1475
1475
|
/**
|
|
1476
1476
|
* @return {import("../geom/Polygon.js").default} Geometry.
|
|
@@ -1479,7 +1479,7 @@ class Mn extends ci {
|
|
|
1479
1479
|
return this.geometry_;
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
|
-
const
|
|
1482
|
+
const me = {
|
|
1483
1483
|
/**
|
|
1484
1484
|
* Triggered upon drag box start.
|
|
1485
1485
|
* @event DragBoxEvent#boxstart
|
|
@@ -1505,7 +1505,7 @@ const ge = {
|
|
|
1505
1505
|
*/
|
|
1506
1506
|
BOXCANCEL: "boxcancel"
|
|
1507
1507
|
};
|
|
1508
|
-
class
|
|
1508
|
+
class be extends at {
|
|
1509
1509
|
/**
|
|
1510
1510
|
* @param {string} type The event type.
|
|
1511
1511
|
* @param {import("../coordinate.js").Coordinate} coordinate The event coordinate.
|
|
@@ -1515,12 +1515,12 @@ class Ie extends rt {
|
|
|
1515
1515
|
super(e), this.coordinate = t, this.mapBrowserEvent = i;
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
|
-
class
|
|
1518
|
+
class Fn extends We {
|
|
1519
1519
|
/**
|
|
1520
1520
|
* @param {Options} [options] Options.
|
|
1521
1521
|
*/
|
|
1522
1522
|
constructor(e) {
|
|
1523
|
-
super(), this.on, this.once, this.un, e = e ?? {}, this.box_ = new
|
|
1523
|
+
super(), this.on, this.once, this.un, e = e ?? {}, this.box_ = new zn(e.className || "ol-dragbox"), this.minArea_ = e.minArea ?? 64, e.onBoxEnd && (this.onBoxEnd = e.onBoxEnd), this.startPixel_ = null, this.condition_ = e.condition ?? Ii, this.boxEndCondition_ = e.boxEndCondition ?? this.defaultBoxEndCondition;
|
|
1524
1524
|
}
|
|
1525
1525
|
/**
|
|
1526
1526
|
* The default condition for determining whether the boxend event
|
|
@@ -1550,8 +1550,8 @@ class Sn extends We {
|
|
|
1550
1550
|
*/
|
|
1551
1551
|
handleDragEvent(e) {
|
|
1552
1552
|
this.startPixel_ && (this.box_.setPixels(this.startPixel_, e.pixel), this.dispatchEvent(
|
|
1553
|
-
new
|
|
1554
|
-
|
|
1553
|
+
new be(
|
|
1554
|
+
me.BOXDRAG,
|
|
1555
1555
|
e.coordinate,
|
|
1556
1556
|
e
|
|
1557
1557
|
)
|
|
@@ -1572,8 +1572,8 @@ class Sn extends We {
|
|
|
1572
1572
|
e.pixel
|
|
1573
1573
|
);
|
|
1574
1574
|
return t && this.onBoxEnd(e), this.dispatchEvent(
|
|
1575
|
-
new
|
|
1576
|
-
t ?
|
|
1575
|
+
new be(
|
|
1576
|
+
t ? me.BOXEND : me.BOXCANCEL,
|
|
1577
1577
|
e.coordinate,
|
|
1578
1578
|
e
|
|
1579
1579
|
)
|
|
@@ -1587,8 +1587,8 @@ class Sn extends We {
|
|
|
1587
1587
|
*/
|
|
1588
1588
|
handleDownEvent(e) {
|
|
1589
1589
|
return this.condition_(e) ? (this.startPixel_ = e.pixel, this.box_.setMap(e.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent(
|
|
1590
|
-
new
|
|
1591
|
-
|
|
1590
|
+
new be(
|
|
1591
|
+
me.BOXSTART,
|
|
1592
1592
|
e.coordinate,
|
|
1593
1593
|
e
|
|
1594
1594
|
)
|
|
@@ -1609,7 +1609,7 @@ class Sn extends We {
|
|
|
1609
1609
|
*/
|
|
1610
1610
|
setActive(e) {
|
|
1611
1611
|
e || (this.box_.setMap(null), this.startPixel_ && (this.dispatchEvent(
|
|
1612
|
-
new
|
|
1612
|
+
new be(me.BOXCANCEL, this.startPixel_, null)
|
|
1613
1613
|
), this.startPixel_ = null)), super.setActive(e);
|
|
1614
1614
|
}
|
|
1615
1615
|
/**
|
|
@@ -1618,17 +1618,17 @@ class Sn extends We {
|
|
|
1618
1618
|
*/
|
|
1619
1619
|
setMap(e) {
|
|
1620
1620
|
this.getMap() && (this.box_.setMap(null), this.startPixel_ && (this.dispatchEvent(
|
|
1621
|
-
new
|
|
1621
|
+
new be(me.BOXCANCEL, this.startPixel_, null)
|
|
1622
1622
|
), this.startPixel_ = null)), super.setMap(e);
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
class
|
|
1625
|
+
class Vn extends Fn {
|
|
1626
1626
|
/**
|
|
1627
1627
|
* @param {Options} [options] Options.
|
|
1628
1628
|
*/
|
|
1629
1629
|
constructor(e) {
|
|
1630
1630
|
e = e || {};
|
|
1631
|
-
const t = e.condition ? e.condition :
|
|
1631
|
+
const t = e.condition ? e.condition : Mn;
|
|
1632
1632
|
super({
|
|
1633
1633
|
condition: t,
|
|
1634
1634
|
className: e.className || "ol-dragzoom",
|
|
@@ -1656,19 +1656,19 @@ class kn extends Sn {
|
|
|
1656
1656
|
});
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
const
|
|
1659
|
+
const he = {
|
|
1660
1660
|
LEFT: "ArrowLeft",
|
|
1661
1661
|
UP: "ArrowUp",
|
|
1662
1662
|
RIGHT: "ArrowRight",
|
|
1663
1663
|
DOWN: "ArrowDown"
|
|
1664
1664
|
};
|
|
1665
|
-
class
|
|
1665
|
+
class Kn extends Ge {
|
|
1666
1666
|
/**
|
|
1667
1667
|
* @param {Options} [options] Options.
|
|
1668
1668
|
*/
|
|
1669
1669
|
constructor(e) {
|
|
1670
1670
|
super(), e = e || {}, this.defaultCondition_ = function(t) {
|
|
1671
|
-
return
|
|
1671
|
+
return Li(t) && bi(t);
|
|
1672
1672
|
}, this.condition_ = e.condition !== void 0 ? e.condition : this.defaultCondition_, this.duration_ = e.duration !== void 0 ? e.duration : 100, this.pixelDelta_ = e.pixelDelta !== void 0 ? e.pixelDelta : 128;
|
|
1673
1673
|
}
|
|
1674
1674
|
/**
|
|
@@ -1681,29 +1681,29 @@ class Nn extends Ge {
|
|
|
1681
1681
|
*/
|
|
1682
1682
|
handleEvent(e) {
|
|
1683
1683
|
let t = !1;
|
|
1684
|
-
if (e.type ==
|
|
1684
|
+
if (e.type == A.KEYDOWN) {
|
|
1685
1685
|
const i = (
|
|
1686
1686
|
/** @type {KeyboardEvent} */
|
|
1687
1687
|
e.originalEvent
|
|
1688
1688
|
), r = i.key;
|
|
1689
|
-
if (this.condition_(e) && (r ==
|
|
1689
|
+
if (this.condition_(e) && (r == he.DOWN || r == he.LEFT || r == he.RIGHT || r == he.UP)) {
|
|
1690
1690
|
const a = e.map.getView(), o = a.getResolution() * this.pixelDelta_;
|
|
1691
1691
|
let l = 0, h = 0;
|
|
1692
|
-
r ==
|
|
1692
|
+
r == he.DOWN ? h = -o : r == he.LEFT ? l = -o : r == he.RIGHT ? l = o : h = o;
|
|
1693
1693
|
const c = [l, h];
|
|
1694
|
-
|
|
1694
|
+
gi(c, a.getRotation()), Dn(a, c, this.duration_), i.preventDefault(), t = !0;
|
|
1695
1695
|
}
|
|
1696
1696
|
}
|
|
1697
1697
|
return !t;
|
|
1698
1698
|
}
|
|
1699
1699
|
}
|
|
1700
|
-
class
|
|
1700
|
+
class Bn extends Ge {
|
|
1701
1701
|
/**
|
|
1702
1702
|
* @param {Options} [options] Options.
|
|
1703
1703
|
*/
|
|
1704
1704
|
constructor(e) {
|
|
1705
1705
|
super(), e = e || {}, this.condition_ = e.condition ? e.condition : function(t) {
|
|
1706
|
-
return !
|
|
1706
|
+
return !xn(t) && bi(t);
|
|
1707
1707
|
}, this.delta_ = e.delta ? e.delta : 1, this.duration_ = e.duration !== void 0 ? e.duration : 100;
|
|
1708
1708
|
}
|
|
1709
1709
|
/**
|
|
@@ -1716,21 +1716,21 @@ class zn extends Ge {
|
|
|
1716
1716
|
*/
|
|
1717
1717
|
handleEvent(e) {
|
|
1718
1718
|
let t = !1;
|
|
1719
|
-
if (e.type ==
|
|
1719
|
+
if (e.type == A.KEYDOWN || e.type == A.KEYPRESS) {
|
|
1720
1720
|
const i = (
|
|
1721
1721
|
/** @type {KeyboardEvent} */
|
|
1722
1722
|
e.originalEvent
|
|
1723
1723
|
), r = i.key;
|
|
1724
1724
|
if (this.condition_(e) && (r === "+" || r === "-")) {
|
|
1725
1725
|
const s = e.map, a = r === "+" ? this.delta_ : -this.delta_, o = s.getView();
|
|
1726
|
-
|
|
1726
|
+
Pt(o, a, void 0, this.duration_), i.preventDefault(), t = !0;
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
return !t;
|
|
1730
1730
|
}
|
|
1731
1731
|
}
|
|
1732
|
-
const
|
|
1733
|
-
class
|
|
1732
|
+
const Gn = 40, Wn = 300, Hn = 3;
|
|
1733
|
+
class $n extends Ge {
|
|
1734
1734
|
/**
|
|
1735
1735
|
* @param {Options} [options] Options.
|
|
1736
1736
|
*/
|
|
@@ -1739,15 +1739,15 @@ class Bn extends Ge {
|
|
|
1739
1739
|
/** @type {import("./Interaction.js").InteractionOptions} */
|
|
1740
1740
|
e
|
|
1741
1741
|
), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = e.maxDelta !== void 0 ? e.maxDelta : 1, this.duration_ = e.duration !== void 0 ? e.duration : 250, this.timeout_ = e.timeout !== void 0 ? e.timeout : 80, this.useAnchor_ = e.useAnchor !== void 0 ? e.useAnchor : !0, this.constrainResolution_ = e.constrainResolution !== void 0 ? e.constrainResolution : !1;
|
|
1742
|
-
const t = e.condition ? e.condition :
|
|
1743
|
-
this.condition_ = e.onFocusOnly ?
|
|
1742
|
+
const t = e.condition ? e.condition : On;
|
|
1743
|
+
this.condition_ = e.onFocusOnly ? Ct(Ai, t) : t, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300, this.ctrlKeyPressed_ = !1, this.ctrlKeyListenerKeys_ = [];
|
|
1744
1744
|
}
|
|
1745
1745
|
/**
|
|
1746
1746
|
* @param {import('../Map.js').default|null} map Map.
|
|
1747
1747
|
* @override
|
|
1748
1748
|
*/
|
|
1749
1749
|
setMap(e) {
|
|
1750
|
-
if (this.ctrlKeyListenerKeys_.forEach(
|
|
1750
|
+
if (this.ctrlKeyListenerKeys_.forEach(B), this.ctrlKeyListenerKeys_.length = 0, this.ctrlKeyPressed_ = !1, super.setMap(e), e) {
|
|
1751
1751
|
const t = e.getOwnerDocument();
|
|
1752
1752
|
this.ctrlKeyListenerKeys_.push(
|
|
1753
1753
|
D(t, "keydown", (i) => {
|
|
@@ -1782,7 +1782,7 @@ class Bn extends Ge {
|
|
|
1782
1782
|
* @override
|
|
1783
1783
|
*/
|
|
1784
1784
|
handleEvent(e) {
|
|
1785
|
-
if (!this.condition_(e) || e.type !==
|
|
1785
|
+
if (!this.condition_(e) || e.type !== A.WHEEL)
|
|
1786
1786
|
return !0;
|
|
1787
1787
|
const i = e.map, r = (
|
|
1788
1788
|
/** @type {WheelEvent} */
|
|
@@ -1794,10 +1794,10 @@ class Bn extends Ge {
|
|
|
1794
1794
|
let a = r.deltaY;
|
|
1795
1795
|
switch (r.deltaMode) {
|
|
1796
1796
|
case WheelEvent.DOM_DELTA_LINE:
|
|
1797
|
-
a *=
|
|
1797
|
+
a *= Gn;
|
|
1798
1798
|
break;
|
|
1799
1799
|
case WheelEvent.DOM_DELTA_PAGE:
|
|
1800
|
-
a *=
|
|
1800
|
+
a *= Wn;
|
|
1801
1801
|
break;
|
|
1802
1802
|
}
|
|
1803
1803
|
if (a === 0)
|
|
@@ -1810,7 +1810,7 @@ class Bn extends Ge {
|
|
|
1810
1810
|
return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (l.getAnimating() && l.cancelAnimations(), l.beginInteraction()), this.trackpadTimeoutId_ = setTimeout(
|
|
1811
1811
|
this.endInteraction_.bind(this),
|
|
1812
1812
|
this.timeout_
|
|
1813
|
-
), s && (a = a *
|
|
1813
|
+
), s && (a = a * Hn), l.adjustZoom(
|
|
1814
1814
|
-a / this.deltaPerZoom_,
|
|
1815
1815
|
this.lastAnchor_ ? i.getCoordinateFromPixel(this.lastAnchor_) : null
|
|
1816
1816
|
), this.startTime_ = o, !1;
|
|
@@ -1828,12 +1828,12 @@ class Bn extends Ge {
|
|
|
1828
1828
|
handleWheelZoom_(e) {
|
|
1829
1829
|
const t = e.getView();
|
|
1830
1830
|
t.getAnimating() && t.cancelAnimations();
|
|
1831
|
-
let i = -
|
|
1831
|
+
let i = -Gi(
|
|
1832
1832
|
this.totalDelta_,
|
|
1833
1833
|
-this.maxDelta_ * this.deltaPerZoom_,
|
|
1834
1834
|
this.maxDelta_ * this.deltaPerZoom_
|
|
1835
1835
|
) / this.deltaPerZoom_;
|
|
1836
|
-
(t.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0),
|
|
1836
|
+
(t.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), Pt(
|
|
1837
1837
|
t,
|
|
1838
1838
|
i,
|
|
1839
1839
|
this.lastAnchor_ ? e.getCoordinateFromPixel(this.lastAnchor_) : null,
|
|
@@ -1850,7 +1850,7 @@ class Bn extends Ge {
|
|
|
1850
1850
|
this.useAnchor_ = e, e || (this.lastAnchor_ = null);
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
1853
|
-
class
|
|
1853
|
+
class Yn extends We {
|
|
1854
1854
|
/**
|
|
1855
1855
|
* @param {Options} [options] Options.
|
|
1856
1856
|
*/
|
|
@@ -1860,7 +1860,7 @@ class Gn extends We {
|
|
|
1860
1860
|
/** @type {import("./Pointer.js").Options} */
|
|
1861
1861
|
e
|
|
1862
1862
|
);
|
|
1863
|
-
t.stopDown || (t.stopDown =
|
|
1863
|
+
t.stopDown || (t.stopDown = Ke), super(t), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = e.threshold !== void 0 ? e.threshold : 0.3, this.duration_ = e.duration !== void 0 ? e.duration : 250;
|
|
1864
1864
|
}
|
|
1865
1865
|
/**
|
|
1866
1866
|
* Handle pointer drag events.
|
|
@@ -1879,8 +1879,8 @@ class Gn extends We {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
this.lastAngle_ = s;
|
|
1881
1881
|
const a = e.map, o = a.getView();
|
|
1882
|
-
o.getConstraints().rotation !==
|
|
1883
|
-
a.getEventPixel(
|
|
1882
|
+
o.getConstraints().rotation !== pi && (this.anchor_ = a.getCoordinateFromPixelInternal(
|
|
1883
|
+
a.getEventPixel(Ot(this.targetPointers))
|
|
1884
1884
|
), this.rotating_ && (a.render(), o.adjustRotationInternal(t, this.anchor_)));
|
|
1885
1885
|
}
|
|
1886
1886
|
/**
|
|
@@ -1906,7 +1906,7 @@ class Gn extends We {
|
|
|
1906
1906
|
return !1;
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
|
-
class
|
|
1909
|
+
class Un extends We {
|
|
1910
1910
|
/**
|
|
1911
1911
|
* @param {Options} [options] Options.
|
|
1912
1912
|
*/
|
|
@@ -1916,7 +1916,7 @@ class Wn extends We {
|
|
|
1916
1916
|
/** @type {import("./Pointer.js").Options} */
|
|
1917
1917
|
e
|
|
1918
1918
|
);
|
|
1919
|
-
t.stopDown || (t.stopDown =
|
|
1919
|
+
t.stopDown || (t.stopDown = Ke), super(t), this.anchor_ = null, this.duration_ = e.duration !== void 0 ? e.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1;
|
|
1920
1920
|
}
|
|
1921
1921
|
/**
|
|
1922
1922
|
* Handle pointer drag events.
|
|
@@ -1929,7 +1929,7 @@ class Wn extends We {
|
|
|
1929
1929
|
this.lastDistance_ !== void 0 && (t = this.lastDistance_ / o), this.lastDistance_ = o;
|
|
1930
1930
|
const l = e.map, h = l.getView();
|
|
1931
1931
|
t != 1 && (this.lastScaleDelta_ = t), this.anchor_ = l.getCoordinateFromPixelInternal(
|
|
1932
|
-
l.getEventPixel(
|
|
1932
|
+
l.getEventPixel(Ot(this.targetPointers))
|
|
1933
1933
|
), l.render(), h.adjustResolutionInternal(t, this.anchor_);
|
|
1934
1934
|
}
|
|
1935
1935
|
/**
|
|
@@ -1959,40 +1959,40 @@ class Wn extends We {
|
|
|
1959
1959
|
return !1;
|
|
1960
1960
|
}
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function Xn(n) {
|
|
1963
1963
|
n = n || {};
|
|
1964
|
-
const e = new
|
|
1965
|
-
return (n.altShiftDragRotate === void 0 || n.altShiftDragRotate) && e.push(new
|
|
1966
|
-
new
|
|
1964
|
+
const e = new Y(), t = new bn(-5e-3, 0.05, 100);
|
|
1965
|
+
return (n.altShiftDragRotate === void 0 || n.altShiftDragRotate) && e.push(new Nn()), (n.doubleClickZoom === void 0 || n.doubleClickZoom) && e.push(
|
|
1966
|
+
new Tn({
|
|
1967
1967
|
delta: n.zoomDelta,
|
|
1968
1968
|
duration: n.zoomDuration
|
|
1969
1969
|
})
|
|
1970
1970
|
), (n.dragPan === void 0 || n.dragPan) && e.push(
|
|
1971
|
-
new
|
|
1971
|
+
new kn({
|
|
1972
1972
|
onFocusOnly: n.onFocusOnly,
|
|
1973
1973
|
kinetic: t
|
|
1974
1974
|
})
|
|
1975
|
-
), (n.pinchRotate === void 0 || n.pinchRotate) && e.push(new
|
|
1976
|
-
new
|
|
1975
|
+
), (n.pinchRotate === void 0 || n.pinchRotate) && e.push(new Yn()), (n.pinchZoom === void 0 || n.pinchZoom) && e.push(
|
|
1976
|
+
new Un({
|
|
1977
1977
|
duration: n.zoomDuration
|
|
1978
1978
|
})
|
|
1979
|
-
), (n.keyboard === void 0 || n.keyboard) && (e.push(new
|
|
1980
|
-
new
|
|
1979
|
+
), (n.keyboard === void 0 || n.keyboard) && (e.push(new Kn()), e.push(
|
|
1980
|
+
new Bn({
|
|
1981
1981
|
delta: n.zoomDelta,
|
|
1982
1982
|
duration: n.zoomDuration
|
|
1983
1983
|
})
|
|
1984
1984
|
)), (n.mouseWheelZoom === void 0 || n.mouseWheelZoom) && e.push(
|
|
1985
|
-
new
|
|
1985
|
+
new $n({
|
|
1986
1986
|
onFocusOnly: n.onFocusOnly,
|
|
1987
1987
|
duration: n.zoomDuration
|
|
1988
1988
|
})
|
|
1989
1989
|
), (n.shiftDragZoom === void 0 || n.shiftDragZoom) && e.push(
|
|
1990
|
-
new
|
|
1990
|
+
new Vn({
|
|
1991
1991
|
duration: n.zoomDuration
|
|
1992
1992
|
})
|
|
1993
1993
|
), e;
|
|
1994
1994
|
}
|
|
1995
|
-
const
|
|
1995
|
+
const te = {
|
|
1996
1996
|
/**
|
|
1997
1997
|
* Triggered when a layer is added
|
|
1998
1998
|
* @event GroupEvent#addlayer
|
|
@@ -2006,7 +2006,7 @@ const ee = {
|
|
|
2006
2006
|
*/
|
|
2007
2007
|
REMOVELAYER: "removelayer"
|
|
2008
2008
|
};
|
|
2009
|
-
class
|
|
2009
|
+
class re extends at {
|
|
2010
2010
|
/**
|
|
2011
2011
|
* @param {GroupEventType} type The event type.
|
|
2012
2012
|
* @param {BaseLayer} layer The layer.
|
|
@@ -2015,10 +2015,10 @@ class ne extends rt {
|
|
|
2015
2015
|
super(e), this.layer = t;
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
const
|
|
2018
|
+
const gt = {
|
|
2019
2019
|
LAYERS: "layers"
|
|
2020
2020
|
};
|
|
2021
|
-
class
|
|
2021
|
+
class Ie extends fn {
|
|
2022
2022
|
/**
|
|
2023
2023
|
* @param {Options} [options] Layer options.
|
|
2024
2024
|
*/
|
|
@@ -2030,11 +2030,11 @@ class Ce extends hn {
|
|
|
2030
2030
|
);
|
|
2031
2031
|
delete t.layers;
|
|
2032
2032
|
let i = e.layers;
|
|
2033
|
-
super(t), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(
|
|
2033
|
+
super(t), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(gt.LAYERS, this.handleLayersChanged_), i ? Array.isArray(i) ? i = new Y(i.slice(), { unique: !0 }) : Q(
|
|
2034
2034
|
typeof /** @type {?} */
|
|
2035
2035
|
i.getArray == "function",
|
|
2036
2036
|
"Expected `layers` to be an array or a `Collection`"
|
|
2037
|
-
) : i = new
|
|
2037
|
+
) : i = new Y(void 0, { unique: !0 }), this.setLayers(i);
|
|
2038
2038
|
}
|
|
2039
2039
|
/**
|
|
2040
2040
|
* @private
|
|
@@ -2046,24 +2046,24 @@ class Ce extends hn {
|
|
|
2046
2046
|
* @private
|
|
2047
2047
|
*/
|
|
2048
2048
|
handleLayersChanged_() {
|
|
2049
|
-
this.layersListenerKeys_.forEach(
|
|
2049
|
+
this.layersListenerKeys_.forEach(B), this.layersListenerKeys_.length = 0;
|
|
2050
2050
|
const e = this.getLayers();
|
|
2051
2051
|
this.layersListenerKeys_.push(
|
|
2052
|
-
D(e,
|
|
2052
|
+
D(e, H.ADD, this.handleLayersAdd_, this),
|
|
2053
2053
|
D(
|
|
2054
2054
|
e,
|
|
2055
|
-
|
|
2055
|
+
H.REMOVE,
|
|
2056
2056
|
this.handleLayersRemove_,
|
|
2057
2057
|
this
|
|
2058
2058
|
)
|
|
2059
2059
|
);
|
|
2060
2060
|
for (const i in this.listenerKeys_)
|
|
2061
|
-
this.listenerKeys_[i].forEach(
|
|
2062
|
-
|
|
2061
|
+
this.listenerKeys_[i].forEach(B);
|
|
2062
|
+
bt(this.listenerKeys_);
|
|
2063
2063
|
const t = e.getArray();
|
|
2064
2064
|
for (let i = 0, r = t.length; i < r; i++) {
|
|
2065
2065
|
const s = t[i];
|
|
2066
|
-
this.registerLayerListeners_(s), this.dispatchEvent(new
|
|
2066
|
+
this.registerLayerListeners_(s), this.dispatchEvent(new re(te.ADDLAYER, s));
|
|
2067
2067
|
}
|
|
2068
2068
|
this.changed();
|
|
2069
2069
|
}
|
|
@@ -2078,13 +2078,13 @@ class Ce extends hn {
|
|
|
2078
2078
|
this.handleLayerChange_,
|
|
2079
2079
|
this
|
|
2080
2080
|
),
|
|
2081
|
-
D(e,
|
|
2081
|
+
D(e, A.CHANGE, this.handleLayerChange_, this)
|
|
2082
2082
|
];
|
|
2083
|
-
e instanceof
|
|
2084
|
-
D(e,
|
|
2083
|
+
e instanceof Ie && t.push(
|
|
2084
|
+
D(e, te.ADDLAYER, this.handleLayerGroupAdd_, this),
|
|
2085
2085
|
D(
|
|
2086
2086
|
e,
|
|
2087
|
-
|
|
2087
|
+
te.REMOVELAYER,
|
|
2088
2088
|
this.handleLayerGroupRemove_,
|
|
2089
2089
|
this
|
|
2090
2090
|
)
|
|
@@ -2094,13 +2094,13 @@ class Ce extends hn {
|
|
|
2094
2094
|
* @param {GroupEvent} event The layer group event.
|
|
2095
2095
|
*/
|
|
2096
2096
|
handleLayerGroupAdd_(e) {
|
|
2097
|
-
this.dispatchEvent(new
|
|
2097
|
+
this.dispatchEvent(new re(te.ADDLAYER, e.layer));
|
|
2098
2098
|
}
|
|
2099
2099
|
/**
|
|
2100
2100
|
* @param {GroupEvent} event The layer group event.
|
|
2101
2101
|
*/
|
|
2102
2102
|
handleLayerGroupRemove_(e) {
|
|
2103
|
-
this.dispatchEvent(new
|
|
2103
|
+
this.dispatchEvent(new re(te.REMOVELAYER, e.layer));
|
|
2104
2104
|
}
|
|
2105
2105
|
/**
|
|
2106
2106
|
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
|
@@ -2108,7 +2108,7 @@ class Ce extends hn {
|
|
|
2108
2108
|
*/
|
|
2109
2109
|
handleLayersAdd_(e) {
|
|
2110
2110
|
const t = e.element;
|
|
2111
|
-
this.registerLayerListeners_(t), this.dispatchEvent(new
|
|
2111
|
+
this.registerLayerListeners_(t), this.dispatchEvent(new re(te.ADDLAYER, t)), this.changed();
|
|
2112
2112
|
}
|
|
2113
2113
|
/**
|
|
2114
2114
|
* @param {import("../Collection.js").CollectionEvent<import("./Base.js").default>} collectionEvent CollectionEvent.
|
|
@@ -2116,7 +2116,7 @@ class Ce extends hn {
|
|
|
2116
2116
|
*/
|
|
2117
2117
|
handleLayersRemove_(e) {
|
|
2118
2118
|
const t = e.element, i = Ne(t);
|
|
2119
|
-
this.listenerKeys_[i].forEach(
|
|
2119
|
+
this.listenerKeys_[i].forEach(B), delete this.listenerKeys_[i], this.dispatchEvent(new re(te.REMOVELAYER, t)), this.changed();
|
|
2120
2120
|
}
|
|
2121
2121
|
/**
|
|
2122
2122
|
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
|
|
@@ -2129,7 +2129,7 @@ class Ce extends hn {
|
|
|
2129
2129
|
getLayers() {
|
|
2130
2130
|
return (
|
|
2131
2131
|
/** @type {!Collection<import("./Base.js").default>} */
|
|
2132
|
-
this.get(
|
|
2132
|
+
this.get(gt.LAYERS)
|
|
2133
2133
|
);
|
|
2134
2134
|
}
|
|
2135
2135
|
/**
|
|
@@ -2146,10 +2146,10 @@ class Ce extends hn {
|
|
|
2146
2146
|
const i = t.getArray();
|
|
2147
2147
|
for (let r = 0, s = i.length; r < s; ++r)
|
|
2148
2148
|
this.dispatchEvent(
|
|
2149
|
-
new
|
|
2149
|
+
new re(te.REMOVELAYER, i[r])
|
|
2150
2150
|
);
|
|
2151
2151
|
}
|
|
2152
|
-
this.set(
|
|
2152
|
+
this.set(gt.LAYERS, e);
|
|
2153
2153
|
}
|
|
2154
2154
|
/**
|
|
2155
2155
|
* @param {Array<import("./Layer.js").default>} [array] Array of layers (to be modified in place).
|
|
@@ -2187,7 +2187,7 @@ class Ce extends hn {
|
|
|
2187
2187
|
), l.minResolution = Math.max(
|
|
2188
2188
|
l.minResolution,
|
|
2189
2189
|
r.minResolution
|
|
2190
|
-
), l.minZoom = Math.max(l.minZoom, r.minZoom), l.maxZoom = Math.min(l.maxZoom, r.maxZoom), r.extent !== void 0 && (l.extent !== void 0 ? l.extent =
|
|
2190
|
+
), l.minZoom = Math.max(l.minZoom, r.minZoom), l.maxZoom = Math.min(l.maxZoom, r.maxZoom), r.extent !== void 0 && (l.extent !== void 0 ? l.extent = Wi(
|
|
2191
2191
|
l.extent,
|
|
2192
2192
|
r.extent
|
|
2193
2193
|
) : l.extent = r.extent), l.zIndex === void 0 && (l.zIndex = s);
|
|
@@ -2202,29 +2202,29 @@ class Ce extends hn {
|
|
|
2202
2202
|
return "ready";
|
|
2203
2203
|
}
|
|
2204
2204
|
}
|
|
2205
|
-
function
|
|
2205
|
+
function Di(n, e, t = 0, i = n.length - 1, r = qn) {
|
|
2206
2206
|
for (; i > t; ) {
|
|
2207
2207
|
if (i - t > 600) {
|
|
2208
|
-
const l = i - t + 1, h = e - t + 1, c = Math.log(l), d = 0.5 * Math.exp(2 * c / 3), f = 0.5 * Math.sqrt(c * d * (l - d) / l) * (h - l / 2 < 0 ? -1 : 1),
|
|
2209
|
-
|
|
2208
|
+
const l = i - t + 1, h = e - t + 1, c = Math.log(l), d = 0.5 * Math.exp(2 * c / 3), f = 0.5 * Math.sqrt(c * d * (l - d) / l) * (h - l / 2 < 0 ? -1 : 1), g = Math.max(t, Math.floor(e - h * d / l + f)), C = Math.min(i, Math.floor(e + (l - h) * d / l + f));
|
|
2209
|
+
Di(n, e, g, C, r);
|
|
2210
2210
|
}
|
|
2211
2211
|
const s = n[e];
|
|
2212
2212
|
let a = t, o = i;
|
|
2213
|
-
for (
|
|
2214
|
-
for (
|
|
2213
|
+
for (De(n, t, e), r(n[i], s) > 0 && De(n, t, i); a < o; ) {
|
|
2214
|
+
for (De(n, a, o), a++, o--; r(n[a], s) < 0; ) a++;
|
|
2215
2215
|
for (; r(n[o], s) > 0; ) o--;
|
|
2216
2216
|
}
|
|
2217
|
-
r(n[t], s) === 0 ?
|
|
2217
|
+
r(n[t], s) === 0 ? De(n, t, o) : (o++, De(n, o, i)), o <= e && (t = o + 1), e <= o && (i = o - 1);
|
|
2218
2218
|
}
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2220
|
+
function De(n, e, t) {
|
|
2221
2221
|
const i = n[e];
|
|
2222
2222
|
n[e] = n[t], n[t] = i;
|
|
2223
2223
|
}
|
|
2224
|
-
function
|
|
2224
|
+
function qn(n, e) {
|
|
2225
2225
|
return n < e ? -1 : n > e ? 1 : 0;
|
|
2226
2226
|
}
|
|
2227
|
-
let
|
|
2227
|
+
let Zn = class {
|
|
2228
2228
|
constructor(e = 9) {
|
|
2229
2229
|
this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear();
|
|
2230
2230
|
}
|
|
@@ -2239,7 +2239,7 @@ let Un = class {
|
|
|
2239
2239
|
for (; t; ) {
|
|
2240
2240
|
for (let a = 0; a < t.children.length; a++) {
|
|
2241
2241
|
const o = t.children[a], l = t.leaf ? r(o) : o;
|
|
2242
|
-
je(e, l) && (t.leaf ? i.push(o) :
|
|
2242
|
+
je(e, l) && (t.leaf ? i.push(o) : mt(e, l) ? this._all(o, i) : s.push(o));
|
|
2243
2243
|
}
|
|
2244
2244
|
t = s.pop();
|
|
2245
2245
|
}
|
|
@@ -2253,7 +2253,7 @@ let Un = class {
|
|
|
2253
2253
|
for (let r = 0; r < t.children.length; r++) {
|
|
2254
2254
|
const s = t.children[r], a = t.leaf ? this.toBBox(s) : s;
|
|
2255
2255
|
if (je(e, a)) {
|
|
2256
|
-
if (t.leaf ||
|
|
2256
|
+
if (t.leaf || mt(e, a)) return !0;
|
|
2257
2257
|
i.push(s);
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
@@ -2286,7 +2286,7 @@ let Un = class {
|
|
|
2286
2286
|
return e && this._insert(e, this.data.height - 1), this;
|
|
2287
2287
|
}
|
|
2288
2288
|
clear() {
|
|
2289
|
-
return this.data =
|
|
2289
|
+
return this.data = we([]), this;
|
|
2290
2290
|
}
|
|
2291
2291
|
remove(e, t) {
|
|
2292
2292
|
if (!e) return this;
|
|
@@ -2295,11 +2295,11 @@ let Un = class {
|
|
|
2295
2295
|
let o, l, h;
|
|
2296
2296
|
for (; i || s.length; ) {
|
|
2297
2297
|
if (i || (i = s.pop(), l = s[s.length - 1], o = a.pop(), h = !0), i.leaf) {
|
|
2298
|
-
const c =
|
|
2298
|
+
const c = jn(e, i.children, t);
|
|
2299
2299
|
if (c !== -1)
|
|
2300
2300
|
return i.children.splice(c, 1), s.push(i), this._condense(s), this;
|
|
2301
2301
|
}
|
|
2302
|
-
!h && !i.leaf &&
|
|
2302
|
+
!h && !i.leaf && mt(i, r) ? (s.push(i), a.push(o), o = 0, l = i, i = i.children[0]) : l ? (o++, i = l.children[o], h = !1) : i = null;
|
|
2303
2303
|
}
|
|
2304
2304
|
return this;
|
|
2305
2305
|
}
|
|
@@ -2328,25 +2328,25 @@ let Un = class {
|
|
|
2328
2328
|
const s = i - t + 1;
|
|
2329
2329
|
let a = this._maxEntries, o;
|
|
2330
2330
|
if (s <= a)
|
|
2331
|
-
return o =
|
|
2332
|
-
r || (r = Math.ceil(Math.log(s) / Math.log(a)), a = Math.ceil(s / Math.pow(a, r - 1))), o =
|
|
2331
|
+
return o = we(e.slice(t, i + 1)), ye(o, this.toBBox), o;
|
|
2332
|
+
r || (r = Math.ceil(Math.log(s) / Math.log(a)), a = Math.ceil(s / Math.pow(a, r - 1))), o = we([]), o.leaf = !1, o.height = r;
|
|
2333
2333
|
const l = Math.ceil(s / a), h = l * Math.ceil(Math.sqrt(a));
|
|
2334
|
-
|
|
2334
|
+
qt(e, t, i, h, this.compareMinX);
|
|
2335
2335
|
for (let c = t; c <= i; c += h) {
|
|
2336
2336
|
const d = Math.min(c + h - 1, i);
|
|
2337
|
-
|
|
2337
|
+
qt(e, c, d, l, this.compareMinY);
|
|
2338
2338
|
for (let f = c; f <= d; f += l) {
|
|
2339
|
-
const
|
|
2340
|
-
o.children.push(this._build(e, f,
|
|
2339
|
+
const g = Math.min(f + l - 1, d);
|
|
2340
|
+
o.children.push(this._build(e, f, g, r - 1));
|
|
2341
2341
|
}
|
|
2342
2342
|
}
|
|
2343
|
-
return
|
|
2343
|
+
return ye(o, this.toBBox), o;
|
|
2344
2344
|
}
|
|
2345
2345
|
_chooseSubtree(e, t, i, r) {
|
|
2346
2346
|
for (; r.push(t), !(t.leaf || r.length - 1 === i); ) {
|
|
2347
2347
|
let s = 1 / 0, a = 1 / 0, o;
|
|
2348
2348
|
for (let l = 0; l < t.children.length; l++) {
|
|
2349
|
-
const h = t.children[l], c =
|
|
2349
|
+
const h = t.children[l], c = _t(h), d = er(e, h) - c;
|
|
2350
2350
|
d < a ? (a = d, s = c < s ? c : s, o = h) : d === a && c < s && (s = c, o = h);
|
|
2351
2351
|
}
|
|
2352
2352
|
t = o || t.children[0];
|
|
@@ -2355,7 +2355,7 @@ let Un = class {
|
|
|
2355
2355
|
}
|
|
2356
2356
|
_insert(e, t, i) {
|
|
2357
2357
|
const r = i ? e : this.toBBox(e), s = [], a = this._chooseSubtree(r, this.data, t, s);
|
|
2358
|
-
for (a.children.push(e),
|
|
2358
|
+
for (a.children.push(e), Oe(a, r); t >= 0 && s[t].children.length > this._maxEntries; )
|
|
2359
2359
|
this._split(s, t), t--;
|
|
2360
2360
|
this._adjustParentBBoxes(r, s, t);
|
|
2361
2361
|
}
|
|
@@ -2363,95 +2363,95 @@ let Un = class {
|
|
|
2363
2363
|
_split(e, t) {
|
|
2364
2364
|
const i = e[t], r = i.children.length, s = this._minEntries;
|
|
2365
2365
|
this._chooseSplitAxis(i, s, r);
|
|
2366
|
-
const a = this._chooseSplitIndex(i, s, r), o =
|
|
2367
|
-
o.height = i.height, o.leaf = i.leaf,
|
|
2366
|
+
const a = this._chooseSplitIndex(i, s, r), o = we(i.children.splice(a, i.children.length - a));
|
|
2367
|
+
o.height = i.height, o.leaf = i.leaf, ye(i, this.toBBox), ye(o, this.toBBox), t ? e[t - 1].children.push(o) : this._splitRoot(i, o);
|
|
2368
2368
|
}
|
|
2369
2369
|
_splitRoot(e, t) {
|
|
2370
|
-
this.data =
|
|
2370
|
+
this.data = we([e, t]), this.data.height = e.height + 1, this.data.leaf = !1, ye(this.data, this.toBBox);
|
|
2371
2371
|
}
|
|
2372
2372
|
_chooseSplitIndex(e, t, i) {
|
|
2373
2373
|
let r, s = 1 / 0, a = 1 / 0;
|
|
2374
2374
|
for (let o = t; o <= i - t; o++) {
|
|
2375
|
-
const l =
|
|
2375
|
+
const l = Pe(e, 0, o, this.toBBox), h = Pe(e, o, i, this.toBBox), c = tr(l, h), d = _t(l) + _t(h);
|
|
2376
2376
|
c < s ? (s = c, r = o, a = d < a ? d : a) : c === s && d < a && (a = d, r = o);
|
|
2377
2377
|
}
|
|
2378
2378
|
return r || i - t;
|
|
2379
2379
|
}
|
|
2380
2380
|
// sorts node children by the best axis for split
|
|
2381
2381
|
_chooseSplitAxis(e, t, i) {
|
|
2382
|
-
const r = e.leaf ? this.compareMinX :
|
|
2382
|
+
const r = e.leaf ? this.compareMinX : Jn, s = e.leaf ? this.compareMinY : Qn, a = this._allDistMargin(e, t, i, r), o = this._allDistMargin(e, t, i, s);
|
|
2383
2383
|
a < o && e.children.sort(r);
|
|
2384
2384
|
}
|
|
2385
2385
|
// total margin of all possible split distributions where each node is at least m full
|
|
2386
2386
|
_allDistMargin(e, t, i, r) {
|
|
2387
2387
|
e.children.sort(r);
|
|
2388
|
-
const s = this.toBBox, a =
|
|
2388
|
+
const s = this.toBBox, a = Pe(e, 0, t, s), o = Pe(e, i - t, i, s);
|
|
2389
2389
|
let l = Ze(a) + Ze(o);
|
|
2390
2390
|
for (let h = t; h < i - t; h++) {
|
|
2391
2391
|
const c = e.children[h];
|
|
2392
|
-
|
|
2392
|
+
Oe(a, e.leaf ? s(c) : c), l += Ze(a);
|
|
2393
2393
|
}
|
|
2394
2394
|
for (let h = i - t - 1; h >= t; h--) {
|
|
2395
2395
|
const c = e.children[h];
|
|
2396
|
-
|
|
2396
|
+
Oe(o, e.leaf ? s(c) : c), l += Ze(o);
|
|
2397
2397
|
}
|
|
2398
2398
|
return l;
|
|
2399
2399
|
}
|
|
2400
2400
|
_adjustParentBBoxes(e, t, i) {
|
|
2401
2401
|
for (let r = i; r >= 0; r--)
|
|
2402
|
-
|
|
2402
|
+
Oe(t[r], e);
|
|
2403
2403
|
}
|
|
2404
2404
|
_condense(e) {
|
|
2405
2405
|
for (let t = e.length - 1, i; t >= 0; t--)
|
|
2406
|
-
e[t].children.length === 0 ? t > 0 ? (i = e[t - 1].children, i.splice(i.indexOf(e[t]), 1)) : this.clear() :
|
|
2406
|
+
e[t].children.length === 0 ? t > 0 ? (i = e[t - 1].children, i.splice(i.indexOf(e[t]), 1)) : this.clear() : ye(e[t], this.toBBox);
|
|
2407
2407
|
}
|
|
2408
2408
|
};
|
|
2409
|
-
function
|
|
2409
|
+
function jn(n, e, t) {
|
|
2410
2410
|
if (!t) return e.indexOf(n);
|
|
2411
2411
|
for (let i = 0; i < e.length; i++)
|
|
2412
2412
|
if (t(n, e[i])) return i;
|
|
2413
2413
|
return -1;
|
|
2414
2414
|
}
|
|
2415
|
-
function
|
|
2416
|
-
|
|
2415
|
+
function ye(n, e) {
|
|
2416
|
+
Pe(n, 0, n.children.length, e, n);
|
|
2417
2417
|
}
|
|
2418
|
-
function
|
|
2419
|
-
r || (r =
|
|
2418
|
+
function Pe(n, e, t, i, r) {
|
|
2419
|
+
r || (r = we(null)), r.minX = 1 / 0, r.minY = 1 / 0, r.maxX = -1 / 0, r.maxY = -1 / 0;
|
|
2420
2420
|
for (let s = e; s < t; s++) {
|
|
2421
2421
|
const a = n.children[s];
|
|
2422
|
-
|
|
2422
|
+
Oe(r, n.leaf ? i(a) : a);
|
|
2423
2423
|
}
|
|
2424
2424
|
return r;
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function Oe(n, e) {
|
|
2427
2427
|
return n.minX = Math.min(n.minX, e.minX), n.minY = Math.min(n.minY, e.minY), n.maxX = Math.max(n.maxX, e.maxX), n.maxY = Math.max(n.maxY, e.maxY), n;
|
|
2428
2428
|
}
|
|
2429
|
-
function
|
|
2429
|
+
function Jn(n, e) {
|
|
2430
2430
|
return n.minX - e.minX;
|
|
2431
2431
|
}
|
|
2432
|
-
function
|
|
2432
|
+
function Qn(n, e) {
|
|
2433
2433
|
return n.minY - e.minY;
|
|
2434
2434
|
}
|
|
2435
|
-
function
|
|
2435
|
+
function _t(n) {
|
|
2436
2436
|
return (n.maxX - n.minX) * (n.maxY - n.minY);
|
|
2437
2437
|
}
|
|
2438
2438
|
function Ze(n) {
|
|
2439
2439
|
return n.maxX - n.minX + (n.maxY - n.minY);
|
|
2440
2440
|
}
|
|
2441
|
-
function
|
|
2441
|
+
function er(n, e) {
|
|
2442
2442
|
return (Math.max(e.maxX, n.maxX) - Math.min(e.minX, n.minX)) * (Math.max(e.maxY, n.maxY) - Math.min(e.minY, n.minY));
|
|
2443
2443
|
}
|
|
2444
|
-
function
|
|
2444
|
+
function tr(n, e) {
|
|
2445
2445
|
const t = Math.max(n.minX, e.minX), i = Math.max(n.minY, e.minY), r = Math.min(n.maxX, e.maxX), s = Math.min(n.maxY, e.maxY);
|
|
2446
2446
|
return Math.max(0, r - t) * Math.max(0, s - i);
|
|
2447
2447
|
}
|
|
2448
|
-
function
|
|
2448
|
+
function mt(n, e) {
|
|
2449
2449
|
return n.minX <= e.minX && n.minY <= e.minY && e.maxX <= n.maxX && e.maxY <= n.maxY;
|
|
2450
2450
|
}
|
|
2451
2451
|
function je(n, e) {
|
|
2452
2452
|
return e.minX <= n.maxX && e.minY <= n.maxY && e.maxX >= n.minX && e.maxY >= n.minY;
|
|
2453
2453
|
}
|
|
2454
|
-
function
|
|
2454
|
+
function we(n) {
|
|
2455
2455
|
return {
|
|
2456
2456
|
children: n,
|
|
2457
2457
|
height: 1,
|
|
@@ -2462,54 +2462,57 @@ function pe(n) {
|
|
|
2462
2462
|
maxY: -1 / 0
|
|
2463
2463
|
};
|
|
2464
2464
|
}
|
|
2465
|
-
function
|
|
2465
|
+
function qt(n, e, t, i, r) {
|
|
2466
2466
|
const s = [e, t];
|
|
2467
2467
|
for (; s.length; ) {
|
|
2468
2468
|
if (t = s.pop(), e = s.pop(), t - e <= i) continue;
|
|
2469
2469
|
const a = e + Math.ceil((t - e) / i / 2) * i;
|
|
2470
|
-
|
|
2470
|
+
Di(n, a, e, t, r), s.push(e, a, a, t);
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
|
-
let
|
|
2474
|
-
const
|
|
2475
|
-
[
|
|
2473
|
+
let _e = 0;
|
|
2474
|
+
const it = 0, z = 1 << _e++, y = 1 << _e++, F = 1 << _e++, K = 1 << _e++, ae = 1 << _e++, de = 1 << _e++, nt = Math.pow(2, _e) - 1, xt = {
|
|
2475
|
+
[z]: "boolean",
|
|
2476
2476
|
[y]: "number",
|
|
2477
|
-
[
|
|
2478
|
-
[
|
|
2479
|
-
[
|
|
2480
|
-
[
|
|
2481
|
-
},
|
|
2482
|
-
function
|
|
2483
|
-
return n in
|
|
2484
|
-
}
|
|
2485
|
-
function
|
|
2477
|
+
[F]: "string",
|
|
2478
|
+
[K]: "color",
|
|
2479
|
+
[ae]: "number[]",
|
|
2480
|
+
[de]: "size"
|
|
2481
|
+
}, ir = Object.keys(xt).map(Number).sort(Hi);
|
|
2482
|
+
function nr(n) {
|
|
2483
|
+
return n in xt;
|
|
2484
|
+
}
|
|
2485
|
+
function J(n) {
|
|
2486
2486
|
const e = [];
|
|
2487
|
-
for (const t of
|
|
2488
|
-
xe(n, t) && e.push(
|
|
2487
|
+
for (const t of ir)
|
|
2488
|
+
xe(n, t) && e.push(xt[t]);
|
|
2489
2489
|
return e.length === 0 ? "untyped" : e.length < 3 ? e.join(" or ") : e.slice(0, -1).join(", ") + ", or " + e[e.length - 1];
|
|
2490
2490
|
}
|
|
2491
2491
|
function xe(n, e) {
|
|
2492
2492
|
return (n & e) === e;
|
|
2493
2493
|
}
|
|
2494
|
-
function
|
|
2494
|
+
function Je(n, e) {
|
|
2495
|
+
return !!(n & e);
|
|
2496
|
+
}
|
|
2497
|
+
function ie(n, e) {
|
|
2495
2498
|
return n === e;
|
|
2496
2499
|
}
|
|
2497
|
-
class
|
|
2500
|
+
class P {
|
|
2498
2501
|
/**
|
|
2499
|
-
* @param {
|
|
2502
|
+
* @param {ValueType} type The value type.
|
|
2500
2503
|
* @param {LiteralValue} value The literal value.
|
|
2501
2504
|
*/
|
|
2502
2505
|
constructor(e, t) {
|
|
2503
|
-
if (!
|
|
2506
|
+
if (!nr(e))
|
|
2504
2507
|
throw new Error(
|
|
2505
|
-
`literal expressions must have a specific type, got ${
|
|
2508
|
+
`literal expressions must have a specific type, got ${J(e)}`
|
|
2506
2509
|
);
|
|
2507
2510
|
this.type = e, this.value = t;
|
|
2508
2511
|
}
|
|
2509
2512
|
}
|
|
2510
|
-
class
|
|
2513
|
+
class Ti {
|
|
2511
2514
|
/**
|
|
2512
|
-
* @param {
|
|
2515
|
+
* @param {ValueType} type The return type.
|
|
2513
2516
|
* @param {string} operator The operator.
|
|
2514
2517
|
* @param {...Expression} args The arguments.
|
|
2515
2518
|
*/
|
|
@@ -2517,46 +2520,47 @@ class er {
|
|
|
2517
2520
|
this.type = e, this.operator = t, this.args = i;
|
|
2518
2521
|
}
|
|
2519
2522
|
}
|
|
2520
|
-
function
|
|
2523
|
+
function Mt(n) {
|
|
2521
2524
|
return {
|
|
2522
|
-
variables: /* @__PURE__ */ new
|
|
2523
|
-
properties: /* @__PURE__ */ new
|
|
2525
|
+
variables: /* @__PURE__ */ new Map(),
|
|
2526
|
+
properties: /* @__PURE__ */ new Map(),
|
|
2524
2527
|
featureId: !1,
|
|
2525
2528
|
geometryType: !1,
|
|
2526
2529
|
mCoordinate: !1,
|
|
2527
|
-
mapState: !1
|
|
2530
|
+
mapState: !1,
|
|
2531
|
+
inputVariables: n
|
|
2528
2532
|
};
|
|
2529
2533
|
}
|
|
2530
|
-
function
|
|
2534
|
+
function T(n, e, t) {
|
|
2531
2535
|
switch (typeof n) {
|
|
2532
2536
|
case "boolean": {
|
|
2533
|
-
if (
|
|
2534
|
-
return new
|
|
2535
|
-
if (!xe(e,
|
|
2537
|
+
if (ie(e, F))
|
|
2538
|
+
return new P(F, n ? "true" : "false");
|
|
2539
|
+
if (!xe(e, z))
|
|
2536
2540
|
throw new Error(
|
|
2537
|
-
`got a boolean, but expected ${
|
|
2541
|
+
`got a boolean, but expected ${J(e)}`
|
|
2538
2542
|
);
|
|
2539
|
-
return new
|
|
2543
|
+
return new P(z, n);
|
|
2540
2544
|
}
|
|
2541
2545
|
case "number": {
|
|
2542
|
-
if (
|
|
2543
|
-
return new
|
|
2544
|
-
if (
|
|
2545
|
-
return new
|
|
2546
|
-
if (
|
|
2547
|
-
return new
|
|
2546
|
+
if (ie(e, de))
|
|
2547
|
+
return new P(de, Ae(n));
|
|
2548
|
+
if (ie(e, z))
|
|
2549
|
+
return new P(z, !!n);
|
|
2550
|
+
if (ie(e, F))
|
|
2551
|
+
return new P(F, n.toString());
|
|
2548
2552
|
if (!xe(e, y))
|
|
2549
|
-
throw new Error(`got a number, but expected ${
|
|
2550
|
-
return new
|
|
2553
|
+
throw new Error(`got a number, but expected ${J(e)}`);
|
|
2554
|
+
return new P(y, n);
|
|
2551
2555
|
}
|
|
2552
2556
|
case "string": {
|
|
2553
|
-
if (
|
|
2554
|
-
return new
|
|
2555
|
-
if (
|
|
2556
|
-
return new
|
|
2557
|
-
if (!xe(e,
|
|
2558
|
-
throw new Error(`got a string, but expected ${
|
|
2559
|
-
return new
|
|
2557
|
+
if (ie(e, K))
|
|
2558
|
+
return new P(K, Ei(n));
|
|
2559
|
+
if (ie(e, z))
|
|
2560
|
+
return new P(z, !!n);
|
|
2561
|
+
if (!xe(e, F))
|
|
2562
|
+
throw new Error(`got a string, but expected ${J(e)}`);
|
|
2563
|
+
return new P(F, n);
|
|
2560
2564
|
}
|
|
2561
2565
|
}
|
|
2562
2566
|
if (!Array.isArray(n))
|
|
@@ -2564,31 +2568,31 @@ function S(n, e, t) {
|
|
|
2564
2568
|
if (n.length === 0)
|
|
2565
2569
|
throw new Error("empty expression");
|
|
2566
2570
|
if (typeof n[0] == "string")
|
|
2567
|
-
return
|
|
2571
|
+
return _r(n, e, t);
|
|
2568
2572
|
for (const i of n)
|
|
2569
2573
|
if (typeof i != "number")
|
|
2570
2574
|
throw new Error("expected an array of numbers");
|
|
2571
|
-
if (
|
|
2575
|
+
if (ie(e, de)) {
|
|
2572
2576
|
if (n.length !== 2)
|
|
2573
2577
|
throw new Error(
|
|
2574
2578
|
`expected an array of two values for a size, got ${n.length}`
|
|
2575
2579
|
);
|
|
2576
|
-
return new
|
|
2580
|
+
return new P(de, n);
|
|
2577
2581
|
}
|
|
2578
|
-
if (
|
|
2582
|
+
if (ie(e, K)) {
|
|
2579
2583
|
if (n.length === 3)
|
|
2580
|
-
return new
|
|
2584
|
+
return new P(K, [...n, 1]);
|
|
2581
2585
|
if (n.length === 4)
|
|
2582
|
-
return new
|
|
2586
|
+
return new P(K, n);
|
|
2583
2587
|
throw new Error(
|
|
2584
2588
|
`expected an array of 3 or 4 values for a color, got ${n.length}`
|
|
2585
2589
|
);
|
|
2586
2590
|
}
|
|
2587
|
-
if (!xe(e,
|
|
2591
|
+
if (!xe(e, ae))
|
|
2588
2592
|
throw new Error(
|
|
2589
|
-
`got an array of numbers, but expected ${
|
|
2593
|
+
`got an array of numbers, but expected ${J(e)}`
|
|
2590
2594
|
);
|
|
2591
|
-
return new
|
|
2595
|
+
return new P(ae, n);
|
|
2592
2596
|
}
|
|
2593
2597
|
const u = {
|
|
2594
2598
|
Get: "get",
|
|
@@ -2638,180 +2642,180 @@ const u = {
|
|
|
2638
2642
|
Palette: "palette",
|
|
2639
2643
|
ToString: "to-string",
|
|
2640
2644
|
Has: "has"
|
|
2641
|
-
},
|
|
2642
|
-
[u.Get]:
|
|
2643
|
-
[u.Var]:
|
|
2644
|
-
[u.Has]:
|
|
2645
|
-
[u.Id]:
|
|
2646
|
-
[u.Concat]:
|
|
2645
|
+
}, rr = {
|
|
2646
|
+
[u.Get]: _(m(1, 1 / 0), Zt),
|
|
2647
|
+
[u.Var]: sr(),
|
|
2648
|
+
[u.Has]: _(m(1, 1 / 0), Zt),
|
|
2649
|
+
[u.Id]: _(ar, pe),
|
|
2650
|
+
[u.Concat]: _(
|
|
2647
2651
|
m(2, 1 / 0),
|
|
2648
|
-
|
|
2652
|
+
I(F)
|
|
2649
2653
|
),
|
|
2650
|
-
[u.GeometryType]:
|
|
2651
|
-
[u.LineMetric]:
|
|
2652
|
-
[u.Resolution]:
|
|
2653
|
-
[u.Zoom]:
|
|
2654
|
-
[u.Time]:
|
|
2655
|
-
[u.Any]:
|
|
2654
|
+
[u.GeometryType]: _(or, pe),
|
|
2655
|
+
[u.LineMetric]: _(lr, pe),
|
|
2656
|
+
[u.Resolution]: _(yt, pe),
|
|
2657
|
+
[u.Zoom]: _(yt, pe),
|
|
2658
|
+
[u.Time]: _(yt, pe),
|
|
2659
|
+
[u.Any]: _(
|
|
2656
2660
|
m(2, 1 / 0),
|
|
2657
|
-
|
|
2661
|
+
I(z)
|
|
2658
2662
|
),
|
|
2659
|
-
[u.All]:
|
|
2663
|
+
[u.All]: _(
|
|
2660
2664
|
m(2, 1 / 0),
|
|
2661
|
-
|
|
2665
|
+
I(z)
|
|
2662
2666
|
),
|
|
2663
|
-
[u.Not]:
|
|
2667
|
+
[u.Not]: _(
|
|
2664
2668
|
m(1, 1),
|
|
2665
|
-
|
|
2669
|
+
I(z)
|
|
2666
2670
|
),
|
|
2667
|
-
[u.Equal]:
|
|
2671
|
+
[u.Equal]: _(
|
|
2668
2672
|
m(2, 2),
|
|
2669
|
-
|
|
2673
|
+
Jt()
|
|
2670
2674
|
),
|
|
2671
|
-
[u.NotEqual]:
|
|
2675
|
+
[u.NotEqual]: _(
|
|
2672
2676
|
m(2, 2),
|
|
2673
|
-
|
|
2677
|
+
Jt()
|
|
2674
2678
|
),
|
|
2675
|
-
[u.GreaterThan]:
|
|
2679
|
+
[u.GreaterThan]: _(
|
|
2676
2680
|
m(2, 2),
|
|
2677
|
-
|
|
2681
|
+
I(y)
|
|
2678
2682
|
),
|
|
2679
|
-
[u.GreaterThanOrEqualTo]:
|
|
2683
|
+
[u.GreaterThanOrEqualTo]: _(
|
|
2680
2684
|
m(2, 2),
|
|
2681
|
-
|
|
2685
|
+
I(y)
|
|
2682
2686
|
),
|
|
2683
|
-
[u.LessThan]:
|
|
2687
|
+
[u.LessThan]: _(
|
|
2684
2688
|
m(2, 2),
|
|
2685
|
-
|
|
2689
|
+
I(y)
|
|
2686
2690
|
),
|
|
2687
|
-
[u.LessThanOrEqualTo]:
|
|
2691
|
+
[u.LessThanOrEqualTo]: _(
|
|
2688
2692
|
m(2, 2),
|
|
2689
|
-
|
|
2693
|
+
I(y)
|
|
2690
2694
|
),
|
|
2691
|
-
[u.Multiply]:
|
|
2695
|
+
[u.Multiply]: _(
|
|
2692
2696
|
m(2, 1 / 0),
|
|
2693
|
-
|
|
2697
|
+
jt
|
|
2694
2698
|
),
|
|
2695
|
-
[u.Coalesce]:
|
|
2699
|
+
[u.Coalesce]: _(
|
|
2696
2700
|
m(2, 1 / 0),
|
|
2697
|
-
|
|
2701
|
+
jt
|
|
2698
2702
|
),
|
|
2699
|
-
[u.Divide]:
|
|
2703
|
+
[u.Divide]: _(
|
|
2700
2704
|
m(2, 2),
|
|
2701
|
-
|
|
2705
|
+
I(y)
|
|
2702
2706
|
),
|
|
2703
|
-
[u.Add]:
|
|
2707
|
+
[u.Add]: _(
|
|
2704
2708
|
m(2, 1 / 0),
|
|
2705
|
-
|
|
2709
|
+
I(y)
|
|
2706
2710
|
),
|
|
2707
|
-
[u.Subtract]:
|
|
2711
|
+
[u.Subtract]: _(
|
|
2708
2712
|
m(2, 2),
|
|
2709
|
-
|
|
2713
|
+
I(y)
|
|
2710
2714
|
),
|
|
2711
|
-
[u.Clamp]:
|
|
2715
|
+
[u.Clamp]: _(
|
|
2712
2716
|
m(3, 3),
|
|
2713
|
-
|
|
2717
|
+
I(y)
|
|
2714
2718
|
),
|
|
2715
|
-
[u.Mod]:
|
|
2719
|
+
[u.Mod]: _(
|
|
2716
2720
|
m(2, 2),
|
|
2717
|
-
|
|
2721
|
+
I(y)
|
|
2718
2722
|
),
|
|
2719
|
-
[u.Pow]:
|
|
2723
|
+
[u.Pow]: _(
|
|
2720
2724
|
m(2, 2),
|
|
2721
|
-
|
|
2725
|
+
I(y)
|
|
2722
2726
|
),
|
|
2723
|
-
[u.Abs]:
|
|
2727
|
+
[u.Abs]: _(
|
|
2724
2728
|
m(1, 1),
|
|
2725
|
-
|
|
2729
|
+
I(y)
|
|
2726
2730
|
),
|
|
2727
|
-
[u.Floor]:
|
|
2731
|
+
[u.Floor]: _(
|
|
2728
2732
|
m(1, 1),
|
|
2729
|
-
|
|
2733
|
+
I(y)
|
|
2730
2734
|
),
|
|
2731
|
-
[u.Ceil]:
|
|
2735
|
+
[u.Ceil]: _(
|
|
2732
2736
|
m(1, 1),
|
|
2733
|
-
|
|
2737
|
+
I(y)
|
|
2734
2738
|
),
|
|
2735
|
-
[u.Round]:
|
|
2739
|
+
[u.Round]: _(
|
|
2736
2740
|
m(1, 1),
|
|
2737
|
-
|
|
2741
|
+
I(y)
|
|
2738
2742
|
),
|
|
2739
|
-
[u.Sin]:
|
|
2743
|
+
[u.Sin]: _(
|
|
2740
2744
|
m(1, 1),
|
|
2741
|
-
|
|
2745
|
+
I(y)
|
|
2742
2746
|
),
|
|
2743
|
-
[u.Cos]:
|
|
2747
|
+
[u.Cos]: _(
|
|
2744
2748
|
m(1, 1),
|
|
2745
|
-
|
|
2749
|
+
I(y)
|
|
2746
2750
|
),
|
|
2747
|
-
[u.Atan]:
|
|
2751
|
+
[u.Atan]: _(
|
|
2748
2752
|
m(1, 2),
|
|
2749
|
-
|
|
2753
|
+
I(y)
|
|
2750
2754
|
),
|
|
2751
|
-
[u.Sqrt]:
|
|
2755
|
+
[u.Sqrt]: _(
|
|
2752
2756
|
m(1, 1),
|
|
2753
|
-
|
|
2757
|
+
I(y)
|
|
2754
2758
|
),
|
|
2755
|
-
[u.Match]:
|
|
2759
|
+
[u.Match]: _(
|
|
2756
2760
|
m(4, 1 / 0),
|
|
2757
|
-
|
|
2758
|
-
|
|
2761
|
+
Qt,
|
|
2762
|
+
cr
|
|
2759
2763
|
),
|
|
2760
|
-
[u.Between]:
|
|
2764
|
+
[u.Between]: _(
|
|
2761
2765
|
m(3, 3),
|
|
2762
|
-
|
|
2766
|
+
I(y)
|
|
2763
2767
|
),
|
|
2764
|
-
[u.Interpolate]:
|
|
2768
|
+
[u.Interpolate]: _(
|
|
2765
2769
|
m(6, 1 / 0),
|
|
2766
|
-
|
|
2767
|
-
|
|
2770
|
+
Qt,
|
|
2771
|
+
ur
|
|
2768
2772
|
),
|
|
2769
|
-
[u.Case]:
|
|
2773
|
+
[u.Case]: _(
|
|
2770
2774
|
m(3, 1 / 0),
|
|
2771
|
-
|
|
2772
|
-
|
|
2775
|
+
hr,
|
|
2776
|
+
dr
|
|
2773
2777
|
),
|
|
2774
|
-
[u.In]:
|
|
2775
|
-
[u.Number]:
|
|
2778
|
+
[u.In]: _(m(2, 2), fr),
|
|
2779
|
+
[u.Number]: _(
|
|
2776
2780
|
m(1, 1 / 0),
|
|
2777
|
-
|
|
2781
|
+
I(nt)
|
|
2778
2782
|
),
|
|
2779
|
-
[u.String]:
|
|
2783
|
+
[u.String]: _(
|
|
2780
2784
|
m(1, 1 / 0),
|
|
2781
|
-
|
|
2785
|
+
I(nt)
|
|
2782
2786
|
),
|
|
2783
|
-
[u.Array]:
|
|
2787
|
+
[u.Array]: _(
|
|
2784
2788
|
m(1, 1 / 0),
|
|
2785
|
-
|
|
2789
|
+
I(y)
|
|
2786
2790
|
),
|
|
2787
|
-
[u.Color]:
|
|
2791
|
+
[u.Color]: _(
|
|
2788
2792
|
m(1, 4),
|
|
2789
|
-
|
|
2793
|
+
I(y)
|
|
2790
2794
|
),
|
|
2791
|
-
[u.Band]:
|
|
2795
|
+
[u.Band]: _(
|
|
2792
2796
|
m(1, 3),
|
|
2793
|
-
|
|
2797
|
+
I(y)
|
|
2794
2798
|
),
|
|
2795
|
-
[u.Palette]:
|
|
2799
|
+
[u.Palette]: _(
|
|
2796
2800
|
m(2, 2),
|
|
2797
|
-
|
|
2801
|
+
gr
|
|
2798
2802
|
),
|
|
2799
|
-
[u.ToString]:
|
|
2803
|
+
[u.ToString]: _(
|
|
2800
2804
|
m(1, 1),
|
|
2801
|
-
|
|
2805
|
+
I(z | y | F | K)
|
|
2802
2806
|
)
|
|
2803
2807
|
};
|
|
2804
|
-
function
|
|
2808
|
+
function Zt(n, e, t) {
|
|
2805
2809
|
const i = n.length - 1, r = new Array(i);
|
|
2806
2810
|
for (let s = 0; s < i; ++s) {
|
|
2807
2811
|
const a = n[s + 1];
|
|
2808
2812
|
switch (typeof a) {
|
|
2809
2813
|
case "number": {
|
|
2810
|
-
r[s] = new
|
|
2814
|
+
r[s] = new P(y, a);
|
|
2811
2815
|
break;
|
|
2812
2816
|
}
|
|
2813
2817
|
case "string": {
|
|
2814
|
-
r[s] = new
|
|
2818
|
+
r[s] = new P(F, a);
|
|
2815
2819
|
break;
|
|
2816
2820
|
}
|
|
2817
2821
|
default:
|
|
@@ -2819,29 +2823,56 @@ function Ut(n, e, t) {
|
|
|
2819
2823
|
`expected a string key or numeric array index for a get operation, got ${a}`
|
|
2820
2824
|
);
|
|
2821
2825
|
}
|
|
2822
|
-
s === 0 && t.properties.
|
|
2826
|
+
s === 0 && t.properties.set(String(a), e);
|
|
2823
2827
|
}
|
|
2824
2828
|
return r;
|
|
2825
2829
|
}
|
|
2826
|
-
function
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2830
|
+
function sr() {
|
|
2831
|
+
return function(n, e, t) {
|
|
2832
|
+
const i = n[1];
|
|
2833
|
+
if (typeof i != "string")
|
|
2834
|
+
throw new Error("expected a string argument for var operation");
|
|
2835
|
+
let r = e;
|
|
2836
|
+
const s = t.inputVariables?.[i];
|
|
2837
|
+
if (s !== void 0) {
|
|
2838
|
+
const a = T(s, nt, t);
|
|
2839
|
+
if (!(a instanceof P))
|
|
2840
|
+
throw new Error(
|
|
2841
|
+
`style variables should only be literal values (no expressions!), variable name: ${i}`
|
|
2842
|
+
);
|
|
2843
|
+
let o = a.type;
|
|
2844
|
+
if (typeof s == "string" && Je(r, K) && !Je(r, F) ? o = K : Array.isArray(s) && s.length === 2 && Je(r, de) && !Je(r, ae) && (o = de), r &= o, r === it)
|
|
2845
|
+
throw new Error(
|
|
2846
|
+
`the type expected from the var operator (${J(e)}) did not have any overlap with the type of the corresponding style variables (${J(o)}), variable name: ${i}`
|
|
2847
|
+
);
|
|
2848
|
+
}
|
|
2849
|
+
if (t.variables.has(i)) {
|
|
2850
|
+
const a = t.variables.get(i);
|
|
2851
|
+
if (r &= a, r === it)
|
|
2852
|
+
throw new Error(
|
|
2853
|
+
`a new type expected from the var operator (${J(e)}) did not have any overlap with the previous type expected for it (${J(a)}), variable name: ${i}`
|
|
2854
|
+
);
|
|
2855
|
+
}
|
|
2856
|
+
return t.variables.set(i, r), new Ti(
|
|
2857
|
+
r,
|
|
2858
|
+
"var",
|
|
2859
|
+
new P(F, i)
|
|
2860
|
+
);
|
|
2861
|
+
};
|
|
2831
2862
|
}
|
|
2832
|
-
function
|
|
2863
|
+
function ar(n, e, t) {
|
|
2833
2864
|
t.featureId = !0;
|
|
2834
2865
|
}
|
|
2835
|
-
function
|
|
2866
|
+
function or(n, e, t) {
|
|
2836
2867
|
t.geometryType = !0;
|
|
2837
2868
|
}
|
|
2838
|
-
function
|
|
2869
|
+
function lr(n, e, t) {
|
|
2839
2870
|
t.mCoordinate = !0;
|
|
2840
2871
|
}
|
|
2841
|
-
function
|
|
2872
|
+
function yt(n, e, t) {
|
|
2842
2873
|
t.mapState = !0;
|
|
2843
2874
|
}
|
|
2844
|
-
function
|
|
2875
|
+
function pe(n, e, t) {
|
|
2845
2876
|
const i = n[0];
|
|
2846
2877
|
if (n.length !== 1)
|
|
2847
2878
|
throw new Error(`expected no arguments for ${i} operation`);
|
|
@@ -2865,61 +2896,96 @@ function m(n, e) {
|
|
|
2865
2896
|
}
|
|
2866
2897
|
};
|
|
2867
2898
|
}
|
|
2868
|
-
function
|
|
2899
|
+
function jt(n, e, t) {
|
|
2869
2900
|
const i = n.length - 1, r = new Array(i);
|
|
2870
2901
|
for (let s = 0; s < i; ++s) {
|
|
2871
|
-
const a =
|
|
2902
|
+
const a = T(n[s + 1], e, t);
|
|
2872
2903
|
r[s] = a;
|
|
2873
2904
|
}
|
|
2874
2905
|
return r;
|
|
2875
2906
|
}
|
|
2876
|
-
function
|
|
2907
|
+
function I(n) {
|
|
2877
2908
|
return function(e, t, i) {
|
|
2878
2909
|
const r = e.length - 1, s = new Array(r);
|
|
2879
2910
|
for (let a = 0; a < r; ++a) {
|
|
2880
|
-
const o =
|
|
2911
|
+
const o = T(e[a + 1], n, i);
|
|
2881
2912
|
s[a] = o;
|
|
2882
2913
|
}
|
|
2883
2914
|
return s;
|
|
2884
2915
|
};
|
|
2885
2916
|
}
|
|
2886
|
-
function
|
|
2917
|
+
function Jt() {
|
|
2918
|
+
return function(n, e, t) {
|
|
2919
|
+
const i = n[0], r = n.length - 1, s = new Array(r);
|
|
2920
|
+
let a = nt;
|
|
2921
|
+
for (let o = 0; o < r; ++o) {
|
|
2922
|
+
const l = T(n[o + 1], a, t);
|
|
2923
|
+
a &= l.type;
|
|
2924
|
+
}
|
|
2925
|
+
if (a === it)
|
|
2926
|
+
throw new Error(
|
|
2927
|
+
`no common type was found among the arguments of ${i}`
|
|
2928
|
+
);
|
|
2929
|
+
for (let o = 0; o < r; ++o) {
|
|
2930
|
+
const l = T(n[o + 1], a, t);
|
|
2931
|
+
s[o] = l;
|
|
2932
|
+
}
|
|
2933
|
+
return s;
|
|
2934
|
+
};
|
|
2935
|
+
}
|
|
2936
|
+
function hr(n, e, t) {
|
|
2887
2937
|
const i = n[0], r = n.length - 1;
|
|
2888
2938
|
if (r % 2 === 0)
|
|
2889
2939
|
throw new Error(
|
|
2890
2940
|
`expected an odd number of arguments for ${i}, got ${r} instead`
|
|
2891
2941
|
);
|
|
2892
2942
|
}
|
|
2893
|
-
function
|
|
2943
|
+
function Qt(n, e, t) {
|
|
2894
2944
|
const i = n[0], r = n.length - 1;
|
|
2895
2945
|
if (r % 2 === 1)
|
|
2896
2946
|
throw new Error(
|
|
2897
2947
|
`expected an even number of arguments for operation ${i}, got ${r} instead`
|
|
2898
2948
|
);
|
|
2899
2949
|
}
|
|
2900
|
-
function
|
|
2901
|
-
const i = n.length - 1, r =
|
|
2950
|
+
function cr(n, e, t) {
|
|
2951
|
+
const i = n.length - 1, r = T(n[n.length - 1], e, t);
|
|
2952
|
+
let s = F | y | z;
|
|
2953
|
+
const a = new Array(i - 2);
|
|
2902
2954
|
for (let l = 0; l < i - 2; l += 2) {
|
|
2903
2955
|
try {
|
|
2904
|
-
const h =
|
|
2905
|
-
|
|
2956
|
+
const h = T(n[l + 2], s, t);
|
|
2957
|
+
s &= h.type;
|
|
2906
2958
|
} catch (h) {
|
|
2907
2959
|
throw new Error(
|
|
2908
2960
|
`failed to parse argument ${l + 1} of match expression: ${h.message}`
|
|
2909
2961
|
);
|
|
2910
2962
|
}
|
|
2963
|
+
if (s === it)
|
|
2964
|
+
throw new Error(
|
|
2965
|
+
"no common type was found among the arguments of match expression"
|
|
2966
|
+
);
|
|
2967
|
+
}
|
|
2968
|
+
for (let l = 0; l < i - 2; l += 2) {
|
|
2911
2969
|
try {
|
|
2912
|
-
const h =
|
|
2913
|
-
|
|
2970
|
+
const h = T(n[l + 2], s, t);
|
|
2971
|
+
a[l] = h;
|
|
2972
|
+
} catch (h) {
|
|
2973
|
+
throw new Error(
|
|
2974
|
+
`failed to parse argument ${l + 1} of match expression: ${h.message}`
|
|
2975
|
+
);
|
|
2976
|
+
}
|
|
2977
|
+
try {
|
|
2978
|
+
const h = T(n[l + 3], r.type, t);
|
|
2979
|
+
a[l + 1] = h;
|
|
2914
2980
|
} catch (h) {
|
|
2915
2981
|
throw new Error(
|
|
2916
2982
|
`failed to parse argument ${l + 2} of match expression: ${h.message}`
|
|
2917
2983
|
);
|
|
2918
2984
|
}
|
|
2919
2985
|
}
|
|
2920
|
-
return [s, ...
|
|
2986
|
+
return [T(n[1], s, t), ...a, r];
|
|
2921
2987
|
}
|
|
2922
|
-
function
|
|
2988
|
+
function ur(n, e, t) {
|
|
2923
2989
|
const i = n[1];
|
|
2924
2990
|
let r;
|
|
2925
2991
|
switch (i[0]) {
|
|
@@ -2939,10 +3005,10 @@ function lr(n, e, t) {
|
|
|
2939
3005
|
`invalid interpolation type: ${JSON.stringify(i)}`
|
|
2940
3006
|
);
|
|
2941
3007
|
}
|
|
2942
|
-
const s = new
|
|
3008
|
+
const s = new P(y, r);
|
|
2943
3009
|
let a;
|
|
2944
3010
|
try {
|
|
2945
|
-
a =
|
|
3011
|
+
a = T(n[2], y, t);
|
|
2946
3012
|
} catch (l) {
|
|
2947
3013
|
throw new Error(
|
|
2948
3014
|
`failed to parse argument 1 in interpolate expression: ${l.message}`
|
|
@@ -2951,7 +3017,7 @@ function lr(n, e, t) {
|
|
|
2951
3017
|
const o = new Array(n.length - 3);
|
|
2952
3018
|
for (let l = 0; l < o.length; l += 2) {
|
|
2953
3019
|
try {
|
|
2954
|
-
const h =
|
|
3020
|
+
const h = T(n[l + 3], y, t);
|
|
2955
3021
|
o[l] = h;
|
|
2956
3022
|
} catch (h) {
|
|
2957
3023
|
throw new Error(
|
|
@@ -2959,7 +3025,7 @@ function lr(n, e, t) {
|
|
|
2959
3025
|
);
|
|
2960
3026
|
}
|
|
2961
3027
|
try {
|
|
2962
|
-
const h =
|
|
3028
|
+
const h = T(n[l + 4], e, t);
|
|
2963
3029
|
o[l + 1] = h;
|
|
2964
3030
|
} catch (h) {
|
|
2965
3031
|
throw new Error(
|
|
@@ -2969,11 +3035,11 @@ function lr(n, e, t) {
|
|
|
2969
3035
|
}
|
|
2970
3036
|
return [s, a, ...o];
|
|
2971
3037
|
}
|
|
2972
|
-
function
|
|
2973
|
-
const i =
|
|
3038
|
+
function dr(n, e, t) {
|
|
3039
|
+
const i = T(n[n.length - 1], e, t), r = new Array(n.length - 1);
|
|
2974
3040
|
for (let s = 0; s < r.length - 1; s += 2) {
|
|
2975
3041
|
try {
|
|
2976
|
-
const a =
|
|
3042
|
+
const a = T(n[s + 1], z, t);
|
|
2977
3043
|
r[s] = a;
|
|
2978
3044
|
} catch (a) {
|
|
2979
3045
|
throw new Error(
|
|
@@ -2981,7 +3047,7 @@ function hr(n, e, t) {
|
|
|
2981
3047
|
);
|
|
2982
3048
|
}
|
|
2983
3049
|
try {
|
|
2984
|
-
const a =
|
|
3050
|
+
const a = T(n[s + 2], i.type, t);
|
|
2985
3051
|
r[s + 1] = a;
|
|
2986
3052
|
} catch (a) {
|
|
2987
3053
|
throw new Error(
|
|
@@ -2991,7 +3057,7 @@ function hr(n, e, t) {
|
|
|
2991
3057
|
}
|
|
2992
3058
|
return r[r.length - 1] = i, r;
|
|
2993
3059
|
}
|
|
2994
|
-
function
|
|
3060
|
+
function fr(n, e, t) {
|
|
2995
3061
|
let i = n[2];
|
|
2996
3062
|
if (!Array.isArray(i))
|
|
2997
3063
|
throw new Error(
|
|
@@ -3007,23 +3073,23 @@ function cr(n, e, t) {
|
|
|
3007
3073
|
throw new Error(
|
|
3008
3074
|
'for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions'
|
|
3009
3075
|
);
|
|
3010
|
-
typeof i[0] == "string" ? r =
|
|
3076
|
+
typeof i[0] == "string" ? r = F : r = y;
|
|
3011
3077
|
const s = new Array(i.length);
|
|
3012
3078
|
for (let o = 0; o < s.length; o++)
|
|
3013
3079
|
try {
|
|
3014
|
-
const l =
|
|
3080
|
+
const l = T(i[o], r, t);
|
|
3015
3081
|
s[o] = l;
|
|
3016
3082
|
} catch (l) {
|
|
3017
3083
|
throw new Error(
|
|
3018
3084
|
`failed to parse haystack item ${o} for "in" expression: ${l.message}`
|
|
3019
3085
|
);
|
|
3020
3086
|
}
|
|
3021
|
-
return [
|
|
3087
|
+
return [T(n[1], r, t), ...s];
|
|
3022
3088
|
}
|
|
3023
|
-
function
|
|
3089
|
+
function gr(n, e, t) {
|
|
3024
3090
|
let i;
|
|
3025
3091
|
try {
|
|
3026
|
-
i =
|
|
3092
|
+
i = T(n[1], y, t);
|
|
3027
3093
|
} catch (a) {
|
|
3028
3094
|
throw new Error(
|
|
3029
3095
|
`failed to parse first argument in palette expression: ${a.message}`
|
|
@@ -3036,13 +3102,13 @@ function ur(n, e, t) {
|
|
|
3036
3102
|
for (let a = 0; a < s.length; a++) {
|
|
3037
3103
|
let o;
|
|
3038
3104
|
try {
|
|
3039
|
-
o =
|
|
3105
|
+
o = T(r[a], K, t);
|
|
3040
3106
|
} catch (l) {
|
|
3041
3107
|
throw new Error(
|
|
3042
3108
|
`failed to parse color at index ${a} in palette expression: ${l.message}`
|
|
3043
3109
|
);
|
|
3044
3110
|
}
|
|
3045
|
-
if (!(o instanceof
|
|
3111
|
+
if (!(o instanceof P))
|
|
3046
3112
|
throw new Error(
|
|
3047
3113
|
`the palette color at index ${a} must be a literal value`
|
|
3048
3114
|
);
|
|
@@ -3050,7 +3116,7 @@ function ur(n, e, t) {
|
|
|
3050
3116
|
}
|
|
3051
3117
|
return [i, ...s];
|
|
3052
3118
|
}
|
|
3053
|
-
function
|
|
3119
|
+
function _(...n) {
|
|
3054
3120
|
return function(e, t, i) {
|
|
3055
3121
|
const r = e[0];
|
|
3056
3122
|
let s;
|
|
@@ -3064,16 +3130,16 @@ function g(...n) {
|
|
|
3064
3130
|
s = o;
|
|
3065
3131
|
}
|
|
3066
3132
|
}
|
|
3067
|
-
return new
|
|
3133
|
+
return new Ti(t, r, ...s);
|
|
3068
3134
|
};
|
|
3069
3135
|
}
|
|
3070
|
-
function
|
|
3071
|
-
const i = n[0], r =
|
|
3136
|
+
function _r(n, e, t) {
|
|
3137
|
+
const i = n[0], r = rr[i];
|
|
3072
3138
|
if (!r)
|
|
3073
3139
|
throw new Error(`unknown operator: ${i}`);
|
|
3074
3140
|
return r(n, e, t);
|
|
3075
3141
|
}
|
|
3076
|
-
function
|
|
3142
|
+
function St(n) {
|
|
3077
3143
|
if (!n)
|
|
3078
3144
|
return "";
|
|
3079
3145
|
const e = n.getType();
|
|
@@ -3092,7 +3158,7 @@ function Ii(n) {
|
|
|
3092
3158
|
case "Circle":
|
|
3093
3159
|
return "Polygon";
|
|
3094
3160
|
case "GeometryCollection":
|
|
3095
|
-
return
|
|
3161
|
+
return St(
|
|
3096
3162
|
/** @type {import("../geom/GeometryCollection.js").default} */
|
|
3097
3163
|
n.getGeometries()[0]
|
|
3098
3164
|
);
|
|
@@ -3100,7 +3166,7 @@ function Ii(n) {
|
|
|
3100
3166
|
return "";
|
|
3101
3167
|
}
|
|
3102
3168
|
}
|
|
3103
|
-
function
|
|
3169
|
+
function Ri() {
|
|
3104
3170
|
return {
|
|
3105
3171
|
variables: {},
|
|
3106
3172
|
properties: {},
|
|
@@ -3110,13 +3176,13 @@ function Ai() {
|
|
|
3110
3176
|
};
|
|
3111
3177
|
}
|
|
3112
3178
|
function Z(n, e, t) {
|
|
3113
|
-
const i =
|
|
3179
|
+
const i = T(n, e, t);
|
|
3114
3180
|
return X(i);
|
|
3115
3181
|
}
|
|
3116
3182
|
function X(n, e) {
|
|
3117
|
-
if (n instanceof
|
|
3118
|
-
if (n.type ===
|
|
3119
|
-
const i =
|
|
3183
|
+
if (n instanceof P) {
|
|
3184
|
+
if (n.type === K && typeof n.value == "string") {
|
|
3185
|
+
const i = Ei(n.value);
|
|
3120
3186
|
return function() {
|
|
3121
3187
|
return i;
|
|
3122
3188
|
};
|
|
@@ -3130,11 +3196,11 @@ function X(n, e) {
|
|
|
3130
3196
|
case u.Number:
|
|
3131
3197
|
case u.String:
|
|
3132
3198
|
case u.Coalesce:
|
|
3133
|
-
return
|
|
3199
|
+
return mr(n);
|
|
3134
3200
|
case u.Get:
|
|
3135
3201
|
case u.Var:
|
|
3136
3202
|
case u.Has:
|
|
3137
|
-
return
|
|
3203
|
+
return yr(n);
|
|
3138
3204
|
case u.Id:
|
|
3139
3205
|
return (i) => i.featureId;
|
|
3140
3206
|
case u.GeometryType:
|
|
@@ -3150,14 +3216,14 @@ function X(n, e) {
|
|
|
3150
3216
|
case u.Between:
|
|
3151
3217
|
case u.In:
|
|
3152
3218
|
case u.Not:
|
|
3153
|
-
return
|
|
3219
|
+
return Er(n);
|
|
3154
3220
|
case u.Equal:
|
|
3155
3221
|
case u.NotEqual:
|
|
3156
3222
|
case u.LessThan:
|
|
3157
3223
|
case u.LessThanOrEqualTo:
|
|
3158
3224
|
case u.GreaterThan:
|
|
3159
3225
|
case u.GreaterThanOrEqualTo:
|
|
3160
|
-
return
|
|
3226
|
+
return pr(n);
|
|
3161
3227
|
case u.Multiply:
|
|
3162
3228
|
case u.Divide:
|
|
3163
3229
|
case u.Add:
|
|
@@ -3173,20 +3239,20 @@ function X(n, e) {
|
|
|
3173
3239
|
case u.Cos:
|
|
3174
3240
|
case u.Atan:
|
|
3175
3241
|
case u.Sqrt:
|
|
3176
|
-
return
|
|
3242
|
+
return wr(n);
|
|
3177
3243
|
case u.Case:
|
|
3178
|
-
return
|
|
3244
|
+
return vr(n);
|
|
3179
3245
|
case u.Match:
|
|
3180
|
-
return
|
|
3246
|
+
return Cr(n);
|
|
3181
3247
|
case u.Interpolate:
|
|
3182
|
-
return
|
|
3248
|
+
return Ar(n);
|
|
3183
3249
|
case u.ToString:
|
|
3184
|
-
return
|
|
3250
|
+
return Ir(n);
|
|
3185
3251
|
default:
|
|
3186
3252
|
throw new Error(`Unsupported operator ${t}`);
|
|
3187
3253
|
}
|
|
3188
3254
|
}
|
|
3189
|
-
function
|
|
3255
|
+
function mr(n, e) {
|
|
3190
3256
|
const t = n.operator, i = n.args.length, r = new Array(i);
|
|
3191
3257
|
for (let s = 0; s < i; ++s)
|
|
3192
3258
|
r[s] = X(n.args[s]);
|
|
@@ -3214,7 +3280,7 @@ function fr(n, e) {
|
|
|
3214
3280
|
throw new Error(`Unsupported assertion operator ${t}`);
|
|
3215
3281
|
}
|
|
3216
3282
|
}
|
|
3217
|
-
function
|
|
3283
|
+
function yr(n, e) {
|
|
3218
3284
|
const i = (
|
|
3219
3285
|
/** @type {string} */
|
|
3220
3286
|
/** @type {LiteralExpression} */
|
|
@@ -3259,7 +3325,7 @@ function gr(n, e) {
|
|
|
3259
3325
|
throw new Error(`Unsupported accessor operator ${n.operator}`);
|
|
3260
3326
|
}
|
|
3261
3327
|
}
|
|
3262
|
-
function
|
|
3328
|
+
function pr(n, e) {
|
|
3263
3329
|
const t = n.operator, i = X(n.args[0]), r = X(n.args[1]);
|
|
3264
3330
|
switch (t) {
|
|
3265
3331
|
case u.Equal:
|
|
@@ -3278,7 +3344,7 @@ function _r(n, e) {
|
|
|
3278
3344
|
throw new Error(`Unsupported comparison operator ${t}`);
|
|
3279
3345
|
}
|
|
3280
3346
|
}
|
|
3281
|
-
function
|
|
3347
|
+
function Er(n, e) {
|
|
3282
3348
|
const t = n.operator, i = n.args.length, r = new Array(i);
|
|
3283
3349
|
for (let s = 0; s < i; ++s)
|
|
3284
3350
|
r[s] = X(n.args[s]);
|
|
@@ -3316,7 +3382,7 @@ function mr(n, e) {
|
|
|
3316
3382
|
throw new Error(`Unsupported logical operator ${t}`);
|
|
3317
3383
|
}
|
|
3318
3384
|
}
|
|
3319
|
-
function
|
|
3385
|
+
function wr(n, e) {
|
|
3320
3386
|
const t = n.operator, i = n.args.length, r = new Array(i);
|
|
3321
3387
|
for (let s = 0; s < i; ++s)
|
|
3322
3388
|
r[s] = X(n.args[s]);
|
|
@@ -3371,7 +3437,7 @@ function yr(n, e) {
|
|
|
3371
3437
|
throw new Error(`Unsupported numeric operator ${t}`);
|
|
3372
3438
|
}
|
|
3373
3439
|
}
|
|
3374
|
-
function
|
|
3440
|
+
function vr(n, e) {
|
|
3375
3441
|
const t = n.args.length, i = new Array(t);
|
|
3376
3442
|
for (let r = 0; r < t; ++r)
|
|
3377
3443
|
i[r] = X(n.args[r]);
|
|
@@ -3382,7 +3448,7 @@ function pr(n, e) {
|
|
|
3382
3448
|
return i[t - 1](r);
|
|
3383
3449
|
};
|
|
3384
3450
|
}
|
|
3385
|
-
function
|
|
3451
|
+
function Cr(n, e) {
|
|
3386
3452
|
const t = n.args.length, i = new Array(t);
|
|
3387
3453
|
for (let r = 0; r < t; ++r)
|
|
3388
3454
|
i[r] = X(n.args[r]);
|
|
@@ -3394,7 +3460,7 @@ function Er(n, e) {
|
|
|
3394
3460
|
return i[t - 1](r);
|
|
3395
3461
|
};
|
|
3396
3462
|
}
|
|
3397
|
-
function
|
|
3463
|
+
function Ar(n, e) {
|
|
3398
3464
|
const t = n.args.length, i = new Array(t);
|
|
3399
3465
|
for (let r = 0; r < t; ++r)
|
|
3400
3466
|
i[r] = X(n.args[r]);
|
|
@@ -3405,8 +3471,8 @@ function wr(n, e) {
|
|
|
3405
3471
|
const c = i[h](r);
|
|
3406
3472
|
let d = i[h + 1](r);
|
|
3407
3473
|
const f = Array.isArray(d);
|
|
3408
|
-
if (f && (d =
|
|
3409
|
-
return h === 2 ? d : f ?
|
|
3474
|
+
if (f && (d = gn(d)), c >= a)
|
|
3475
|
+
return h === 2 ? d : f ? Lr(
|
|
3410
3476
|
s,
|
|
3411
3477
|
a,
|
|
3412
3478
|
o,
|
|
@@ -3426,14 +3492,14 @@ function wr(n, e) {
|
|
|
3426
3492
|
return l;
|
|
3427
3493
|
};
|
|
3428
3494
|
}
|
|
3429
|
-
function
|
|
3495
|
+
function Ir(n, e) {
|
|
3430
3496
|
const t = n.operator, i = n.args.length, r = new Array(i);
|
|
3431
3497
|
for (let s = 0; s < i; ++s)
|
|
3432
3498
|
r[s] = X(n.args[s]);
|
|
3433
3499
|
if (t === u.ToString)
|
|
3434
3500
|
return (s) => {
|
|
3435
3501
|
const a = r[0](s);
|
|
3436
|
-
return n.args[0].type ===
|
|
3502
|
+
return n.args[0].type === K ? wi(a) : a.toString();
|
|
3437
3503
|
};
|
|
3438
3504
|
throw new Error(`Unsupported convert operator ${t}`);
|
|
3439
3505
|
}
|
|
@@ -3444,10 +3510,10 @@ function Me(n, e, t, i, r, s) {
|
|
|
3444
3510
|
const o = e - t, l = n === 1 ? o / a : (Math.pow(n, o) - 1) / (Math.pow(n, a) - 1);
|
|
3445
3511
|
return i + l * (s - i);
|
|
3446
3512
|
}
|
|
3447
|
-
function
|
|
3513
|
+
function Lr(n, e, t, i, r, s) {
|
|
3448
3514
|
if (r - t === 0)
|
|
3449
3515
|
return i;
|
|
3450
|
-
const o =
|
|
3516
|
+
const o = Yt(i), l = Yt(s);
|
|
3451
3517
|
let h = l[2] - o[2];
|
|
3452
3518
|
h > 180 ? h -= 360 : h < -180 && (h += 360);
|
|
3453
3519
|
const c = [
|
|
@@ -3456,9 +3522,9 @@ function Cr(n, e, t, i, r, s) {
|
|
|
3456
3522
|
o[2] + Me(n, e, t, 0, r, h),
|
|
3457
3523
|
Me(n, e, t, i[3], r, s[3])
|
|
3458
3524
|
];
|
|
3459
|
-
return
|
|
3525
|
+
return _n(c);
|
|
3460
3526
|
}
|
|
3461
|
-
class
|
|
3527
|
+
class br {
|
|
3462
3528
|
constructor() {
|
|
3463
3529
|
this.cache_ = {}, this.patternCache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 1024;
|
|
3464
3530
|
}
|
|
@@ -3492,7 +3558,7 @@ class Lr {
|
|
|
3492
3558
|
* @return {import("./IconImage.js").default} Icon image.
|
|
3493
3559
|
*/
|
|
3494
3560
|
get(e, t) {
|
|
3495
|
-
const i =
|
|
3561
|
+
const i = pt(e, t);
|
|
3496
3562
|
return i in this.cache_ ? this.cache_[i] : null;
|
|
3497
3563
|
}
|
|
3498
3564
|
/**
|
|
@@ -3501,7 +3567,7 @@ class Lr {
|
|
|
3501
3567
|
* @return {CanvasPattern} Icon image.
|
|
3502
3568
|
*/
|
|
3503
3569
|
getPattern(e, t) {
|
|
3504
|
-
const i =
|
|
3570
|
+
const i = pt(e, t);
|
|
3505
3571
|
return i in this.patternCache_ ? this.patternCache_[i] : null;
|
|
3506
3572
|
}
|
|
3507
3573
|
/**
|
|
@@ -3511,13 +3577,13 @@ class Lr {
|
|
|
3511
3577
|
* @param {boolean} [pattern] Also cache a `'repeat'` pattern with this `iconImage`.
|
|
3512
3578
|
*/
|
|
3513
3579
|
set(e, t, i, r) {
|
|
3514
|
-
const s =
|
|
3515
|
-
this.cache_[s] = i, r && (i.getImageState() ===
|
|
3516
|
-
this.patternCache_[s] =
|
|
3580
|
+
const s = pt(e, t), a = s in this.cache_;
|
|
3581
|
+
this.cache_[s] = i, r && (i.getImageState() === v.IDLE && i.load(), i.getImageState() === v.LOADING ? i.ready().then(() => {
|
|
3582
|
+
this.patternCache_[s] = Bt().createPattern(
|
|
3517
3583
|
i.getImage(1),
|
|
3518
3584
|
"repeat"
|
|
3519
3585
|
);
|
|
3520
|
-
}) : this.patternCache_[s] =
|
|
3586
|
+
}) : this.patternCache_[s] = Bt().createPattern(
|
|
3521
3587
|
i.getImage(1),
|
|
3522
3588
|
"repeat"
|
|
3523
3589
|
)), a || ++this.cacheSize_;
|
|
@@ -3533,13 +3599,13 @@ class Lr {
|
|
|
3533
3599
|
this.maxCacheSize_ = e, this.expire();
|
|
3534
3600
|
}
|
|
3535
3601
|
}
|
|
3536
|
-
function
|
|
3602
|
+
function pt(n, e) {
|
|
3537
3603
|
const t = e ? ze(e) : "null";
|
|
3538
3604
|
return n + ":" + t;
|
|
3539
3605
|
}
|
|
3540
|
-
const
|
|
3541
|
-
let
|
|
3542
|
-
class
|
|
3606
|
+
const $ = new br();
|
|
3607
|
+
let Te = null;
|
|
3608
|
+
class Pi extends di {
|
|
3543
3609
|
/**
|
|
3544
3610
|
* @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.
|
|
3545
3611
|
* @param {string|undefined} src Src.
|
|
@@ -3548,7 +3614,7 @@ class bi extends oi {
|
|
|
3548
3614
|
* @param {import("../color.js").Color|string|null} color Color.
|
|
3549
3615
|
*/
|
|
3550
3616
|
constructor(e, t, i, r, s) {
|
|
3551
|
-
super(), this.hitDetectionImage_ = null, this.image_ = e, this.crossOrigin_ = i?.crossOrigin, this.referrerPolicy_ = i?.referrerPolicy, this.canvas_ = {}, this.color_ = s, this.imageState_ = r === void 0 ?
|
|
3617
|
+
super(), this.hitDetectionImage_ = null, this.image_ = e, this.crossOrigin_ = i?.crossOrigin, this.referrerPolicy_ = i?.referrerPolicy, this.canvas_ = {}, this.color_ = s, this.imageState_ = r === void 0 ? v.IDLE : r, this.size_ = e && e.width && e.height ? [e.width, e.height] : null, this.src_ = t, this.tainted_, this.ready_ = null;
|
|
3552
3618
|
}
|
|
3553
3619
|
/**
|
|
3554
3620
|
* @private
|
|
@@ -3561,14 +3627,14 @@ class bi extends oi {
|
|
|
3561
3627
|
* @return {boolean} The image canvas is tainted.
|
|
3562
3628
|
*/
|
|
3563
3629
|
isTainted_() {
|
|
3564
|
-
if (this.tainted_ === void 0 && this.imageState_ ===
|
|
3565
|
-
|
|
3630
|
+
if (this.tainted_ === void 0 && this.imageState_ === v.LOADED) {
|
|
3631
|
+
Te || (Te = fe(1, 1, void 0, {
|
|
3566
3632
|
willReadFrequently: !0
|
|
3567
|
-
})),
|
|
3633
|
+
})), Te.drawImage(this.image_, 0, 0);
|
|
3568
3634
|
try {
|
|
3569
|
-
|
|
3635
|
+
Te.getImageData(0, 0, 1, 1), this.tainted_ = !1;
|
|
3570
3636
|
} catch {
|
|
3571
|
-
|
|
3637
|
+
Te = null, this.tainted_ = !0;
|
|
3572
3638
|
}
|
|
3573
3639
|
}
|
|
3574
3640
|
return this.tainted_ === !0;
|
|
@@ -3577,19 +3643,19 @@ class bi extends oi {
|
|
|
3577
3643
|
* @private
|
|
3578
3644
|
*/
|
|
3579
3645
|
dispatchChangeEvent_() {
|
|
3580
|
-
this.dispatchEvent(
|
|
3646
|
+
this.dispatchEvent(A.CHANGE);
|
|
3581
3647
|
}
|
|
3582
3648
|
/**
|
|
3583
3649
|
* @private
|
|
3584
3650
|
*/
|
|
3585
3651
|
handleImageError_() {
|
|
3586
|
-
this.imageState_ =
|
|
3652
|
+
this.imageState_ = v.ERROR, this.dispatchChangeEvent_();
|
|
3587
3653
|
}
|
|
3588
3654
|
/**
|
|
3589
3655
|
* @private
|
|
3590
3656
|
*/
|
|
3591
3657
|
handleImageLoad_() {
|
|
3592
|
-
this.imageState_ =
|
|
3658
|
+
this.imageState_ = v.LOADED, this.size_ = [this.image_.width, this.image_.height], this.dispatchChangeEvent_();
|
|
3593
3659
|
}
|
|
3594
3660
|
/**
|
|
3595
3661
|
* @param {number} pixelRatio Pixel ratio.
|
|
@@ -3623,7 +3689,7 @@ class bi extends oi {
|
|
|
3623
3689
|
getHitDetectionImage() {
|
|
3624
3690
|
if (this.image_ || this.initializeImage_(), !this.hitDetectionImage_)
|
|
3625
3691
|
if (this.isTainted_()) {
|
|
3626
|
-
const e = this.size_[0], t = this.size_[1], i =
|
|
3692
|
+
const e = this.size_[0], t = this.size_[1], i = fe(e, t);
|
|
3627
3693
|
i.fillRect(0, 0, e, t), this.hitDetectionImage_ = i.canvas;
|
|
3628
3694
|
} else
|
|
3629
3695
|
this.hitDetectionImage_ = this.image_;
|
|
@@ -3646,14 +3712,14 @@ class bi extends oi {
|
|
|
3646
3712
|
* Load not yet loaded URI.
|
|
3647
3713
|
*/
|
|
3648
3714
|
load() {
|
|
3649
|
-
if (this.imageState_ ===
|
|
3650
|
-
this.image_ || this.initializeImage_(), this.imageState_ =
|
|
3715
|
+
if (this.imageState_ === v.IDLE) {
|
|
3716
|
+
this.image_ || this.initializeImage_(), this.imageState_ = v.LOADING;
|
|
3651
3717
|
try {
|
|
3652
3718
|
this.src_ !== void 0 && (this.image_.src = this.src_);
|
|
3653
3719
|
} catch {
|
|
3654
3720
|
this.handleImageError_();
|
|
3655
3721
|
}
|
|
3656
|
-
this.image_ instanceof HTMLImageElement &&
|
|
3722
|
+
this.image_ instanceof HTMLImageElement && nn(this.image_, this.src_).then((e) => {
|
|
3657
3723
|
this.image_ = e, this.handleImageLoad_();
|
|
3658
3724
|
}).catch(this.handleImageError_.bind(this));
|
|
3659
3725
|
}
|
|
@@ -3663,53 +3729,53 @@ class bi extends oi {
|
|
|
3663
3729
|
* @private
|
|
3664
3730
|
*/
|
|
3665
3731
|
replaceColor_(e) {
|
|
3666
|
-
if (!this.color_ || this.canvas_[e] || this.imageState_ !==
|
|
3732
|
+
if (!this.color_ || this.canvas_[e] || this.imageState_ !== v.LOADED)
|
|
3667
3733
|
return;
|
|
3668
|
-
const t = this.image_, i =
|
|
3734
|
+
const t = this.image_, i = fe(
|
|
3669
3735
|
Math.ceil(t.width * e),
|
|
3670
3736
|
Math.ceil(t.height * e)
|
|
3671
3737
|
), r = i.canvas;
|
|
3672
|
-
i.scale(e, e), i.drawImage(t, 0, 0), i.globalCompositeOperation = "multiply", i.fillStyle =
|
|
3738
|
+
i.scale(e, e), i.drawImage(t, 0, 0), i.globalCompositeOperation = "multiply", i.fillStyle = mn(this.color_), i.fillRect(0, 0, r.width / e, r.height / e), i.globalCompositeOperation = "destination-in", i.drawImage(t, 0, 0), this.canvas_[e] = r;
|
|
3673
3739
|
}
|
|
3674
3740
|
/**
|
|
3675
3741
|
* @return {Promise<void>} Promise that resolves when the image is loaded.
|
|
3676
3742
|
*/
|
|
3677
3743
|
ready() {
|
|
3678
3744
|
return this.ready_ || (this.ready_ = new Promise((e) => {
|
|
3679
|
-
if (this.imageState_ ===
|
|
3745
|
+
if (this.imageState_ === v.LOADED || this.imageState_ === v.ERROR)
|
|
3680
3746
|
e();
|
|
3681
3747
|
else {
|
|
3682
3748
|
const t = () => {
|
|
3683
|
-
(this.imageState_ ===
|
|
3749
|
+
(this.imageState_ === v.LOADED || this.imageState_ === v.ERROR) && (this.removeEventListener(A.CHANGE, t), e());
|
|
3684
3750
|
};
|
|
3685
|
-
this.addEventListener(
|
|
3751
|
+
this.addEventListener(A.CHANGE, t);
|
|
3686
3752
|
}
|
|
3687
3753
|
})), this.ready_;
|
|
3688
3754
|
}
|
|
3689
3755
|
}
|
|
3690
3756
|
function ke(n, e, t, i, r, s) {
|
|
3691
|
-
let a = e === void 0 ? void 0 :
|
|
3692
|
-
return a || (a = new
|
|
3757
|
+
let a = e === void 0 ? void 0 : $.get(e, r);
|
|
3758
|
+
return a || (a = new Pi(
|
|
3693
3759
|
n,
|
|
3694
3760
|
n && "src" in n ? n.src || void 0 : e,
|
|
3695
3761
|
t,
|
|
3696
3762
|
i,
|
|
3697
3763
|
r
|
|
3698
|
-
),
|
|
3764
|
+
), $.set(e, r, a, s)), s && a && !$.getPattern(e, r) && $.set(e, r, a, s), a;
|
|
3699
3765
|
}
|
|
3700
|
-
function
|
|
3701
|
-
return n ? Array.isArray(n) ?
|
|
3766
|
+
function ei(n) {
|
|
3767
|
+
return n ? Array.isArray(n) ? wi(n) : typeof n == "object" && "src" in n ? Dr(n) : n : null;
|
|
3702
3768
|
}
|
|
3703
|
-
function
|
|
3769
|
+
function Dr(n) {
|
|
3704
3770
|
if (!n.offset || !n.size)
|
|
3705
|
-
return
|
|
3706
|
-
const e = n.src + ":" + n.offset, t =
|
|
3771
|
+
return $.getPattern(n.src, n.color);
|
|
3772
|
+
const e = n.src + ":" + n.offset, t = $.getPattern(e, n.color);
|
|
3707
3773
|
if (t)
|
|
3708
3774
|
return t;
|
|
3709
|
-
const i =
|
|
3710
|
-
if (i.getImageState() !==
|
|
3775
|
+
const i = $.get(n.src, null);
|
|
3776
|
+
if (i.getImageState() !== v.LOADED)
|
|
3711
3777
|
return null;
|
|
3712
|
-
const r =
|
|
3778
|
+
const r = fe(
|
|
3713
3779
|
n.size[0],
|
|
3714
3780
|
n.size[1]
|
|
3715
3781
|
);
|
|
@@ -3727,14 +3793,14 @@ function Ir(n) {
|
|
|
3727
3793
|
r.canvas,
|
|
3728
3794
|
e,
|
|
3729
3795
|
void 0,
|
|
3730
|
-
|
|
3796
|
+
v.LOADED,
|
|
3731
3797
|
n.color,
|
|
3732
3798
|
!0
|
|
3733
|
-
),
|
|
3799
|
+
), $.getPattern(e, n.color);
|
|
3734
3800
|
}
|
|
3735
|
-
const
|
|
3736
|
-
let
|
|
3737
|
-
const
|
|
3801
|
+
const _s = "10px sans-serif", ti = "#000", ii = "round", ms = [], ys = 0, ni = "round", Tr = 10, ps = 0, Rr = "#000", Es = "center", ws = "middle", vs = [0, 0, 0, 0], Pr = 1, ve = new st();
|
|
3802
|
+
let Re = null, ri;
|
|
3803
|
+
const At = {}, Or = /* @__PURE__ */ new Set([
|
|
3738
3804
|
"serif",
|
|
3739
3805
|
"sans-serif",
|
|
3740
3806
|
"monospace",
|
|
@@ -3749,85 +3815,90 @@ const vt = {}, Tr = /* @__PURE__ */ new Set([
|
|
|
3749
3815
|
"math",
|
|
3750
3816
|
"fangsong"
|
|
3751
3817
|
]);
|
|
3752
|
-
function
|
|
3818
|
+
function xr(n, e, t) {
|
|
3753
3819
|
return `${n} ${e} 16px "${t}"`;
|
|
3754
3820
|
}
|
|
3755
|
-
const
|
|
3821
|
+
const Cs = /* @__PURE__ */ (function() {
|
|
3756
3822
|
let e, t;
|
|
3757
3823
|
async function i(s) {
|
|
3758
3824
|
await t.ready;
|
|
3759
|
-
const a =
|
|
3760
|
-
|
|
3761
|
-
return !1;
|
|
3762
|
-
const o = pt(s), l = o.families[0].toLowerCase(), h = o.weight;
|
|
3763
|
-
return a.some(
|
|
3825
|
+
const a = wt(s), o = a.families[0].toLowerCase(), l = a.weight, h = [];
|
|
3826
|
+
return t.forEach(
|
|
3764
3827
|
/**
|
|
3765
|
-
* @param {
|
|
3766
|
-
* @return {boolean} Font matches.
|
|
3828
|
+
* @param {FontFace} f Font face.
|
|
3767
3829
|
*/
|
|
3768
|
-
(
|
|
3769
|
-
const
|
|
3770
|
-
|
|
3830
|
+
(d) => {
|
|
3831
|
+
const f = d.family.replace(/^['"]|['"]$/g, "").toLowerCase(), g = on[d.weight] || d.weight;
|
|
3832
|
+
f === o && d.style === a.style && g == l && h.push(d);
|
|
3771
3833
|
}
|
|
3772
|
-
)
|
|
3834
|
+
), h.length === 0 ? !1 : (await Promise.all(
|
|
3835
|
+
h.map(
|
|
3836
|
+
(d) => d.load().then(
|
|
3837
|
+
() => !0,
|
|
3838
|
+
// available
|
|
3839
|
+
() => !1
|
|
3840
|
+
// not available
|
|
3841
|
+
)
|
|
3842
|
+
)
|
|
3843
|
+
)).some((d) => d);
|
|
3773
3844
|
}
|
|
3774
3845
|
async function r() {
|
|
3775
3846
|
await t.ready;
|
|
3776
3847
|
let s = !0;
|
|
3777
|
-
const a =
|
|
3848
|
+
const a = ve.getProperties(), o = Object.keys(a).filter(
|
|
3778
3849
|
(l) => a[l] < 100
|
|
3779
3850
|
);
|
|
3780
3851
|
for (let l = o.length - 1; l >= 0; --l) {
|
|
3781
3852
|
const h = o[l];
|
|
3782
3853
|
let c = a[h];
|
|
3783
|
-
c < 100 && (await i(h) ? (
|
|
3854
|
+
c < 100 && (await i(h) ? (bt(At), ve.set(h, 100)) : (c += 10, ve.set(h, c, !0), c < 100 && (s = !1)));
|
|
3784
3855
|
}
|
|
3785
3856
|
e = void 0, s || (e = setTimeout(r, 100));
|
|
3786
3857
|
}
|
|
3787
3858
|
return async function(s) {
|
|
3788
|
-
t || (t =
|
|
3789
|
-
const a =
|
|
3859
|
+
t || (t = ue ? self.fonts : document.fonts);
|
|
3860
|
+
const a = wt(s);
|
|
3790
3861
|
if (!a)
|
|
3791
3862
|
return;
|
|
3792
3863
|
const o = a.families;
|
|
3793
3864
|
let l = !1;
|
|
3794
3865
|
for (const h of o) {
|
|
3795
|
-
if (
|
|
3866
|
+
if (Or.has(h))
|
|
3796
3867
|
continue;
|
|
3797
|
-
const c =
|
|
3798
|
-
|
|
3868
|
+
const c = xr(a.style, a.weight, h);
|
|
3869
|
+
ve.get(c) === void 0 && (ve.set(c, 0, !0), l = !0);
|
|
3799
3870
|
}
|
|
3800
3871
|
l && (clearTimeout(e), e = setTimeout(r, 100));
|
|
3801
3872
|
};
|
|
3802
|
-
})(),
|
|
3873
|
+
})(), Mr = /* @__PURE__ */ (function() {
|
|
3803
3874
|
let n;
|
|
3804
3875
|
return function(e) {
|
|
3805
|
-
let t =
|
|
3876
|
+
let t = At[e];
|
|
3806
3877
|
if (t == null) {
|
|
3807
|
-
if (
|
|
3808
|
-
const i =
|
|
3878
|
+
if (ue) {
|
|
3879
|
+
const i = wt(e), r = Oi(e, "Žg");
|
|
3809
3880
|
t = (isNaN(Number(i.lineHeight)) ? 1.2 : Number(i.lineHeight)) * (r.actualBoundingBoxAscent + r.actualBoundingBoxDescent);
|
|
3810
3881
|
} else
|
|
3811
3882
|
n || (n = document.createElement("div"), n.innerHTML = "M", n.style.minHeight = "0", n.style.maxHeight = "none", n.style.height = "auto", n.style.padding = "0", n.style.border = "none", n.style.position = "absolute", n.style.display = "block", n.style.left = "-99999px"), n.style.font = e, document.body.appendChild(n), t = n.offsetHeight, document.body.removeChild(n);
|
|
3812
|
-
|
|
3883
|
+
At[e] = t;
|
|
3813
3884
|
}
|
|
3814
3885
|
return t;
|
|
3815
3886
|
};
|
|
3816
3887
|
})();
|
|
3817
|
-
function
|
|
3818
|
-
return
|
|
3888
|
+
function Oi(n, e) {
|
|
3889
|
+
return Re || (Re = fe(1, 1)), n != ri && (Re.font = n, ri = Re.font), Re.measureText(e);
|
|
3819
3890
|
}
|
|
3820
|
-
function
|
|
3821
|
-
return
|
|
3891
|
+
function xi(n, e) {
|
|
3892
|
+
return Oi(n, e).width;
|
|
3822
3893
|
}
|
|
3823
|
-
function
|
|
3894
|
+
function As(n, e, t) {
|
|
3824
3895
|
if (e in t)
|
|
3825
3896
|
return t[e];
|
|
3826
3897
|
const i = e.split(`
|
|
3827
|
-
`).reduce((r, s) => Math.max(r,
|
|
3898
|
+
`).reduce((r, s) => Math.max(r, xi(n, s)), 0);
|
|
3828
3899
|
return t[e] = i, i;
|
|
3829
3900
|
}
|
|
3830
|
-
function
|
|
3901
|
+
function Is(n, e) {
|
|
3831
3902
|
const t = [], i = [], r = [];
|
|
3832
3903
|
let s = 0, a = 0, o = 0, l = 0;
|
|
3833
3904
|
for (let h = 0, c = e.length; h <= c; h += 2) {
|
|
@@ -3837,16 +3908,16 @@ function ws(n, e) {
|
|
|
3837
3908
|
s = Math.max(s, a), r.push(a), a = 0, o += l, l = 0;
|
|
3838
3909
|
continue;
|
|
3839
3910
|
}
|
|
3840
|
-
const f = e[h + 1] || n.font,
|
|
3841
|
-
t.push(
|
|
3842
|
-
const
|
|
3843
|
-
i.push(
|
|
3911
|
+
const f = e[h + 1] || n.font, g = xi(f, d);
|
|
3912
|
+
t.push(g), a += g;
|
|
3913
|
+
const C = Mr(f);
|
|
3914
|
+
i.push(C), l = Math.max(l, C);
|
|
3844
3915
|
}
|
|
3845
3916
|
return { width: s, height: o, widths: t, heights: i, lineWidths: r };
|
|
3846
3917
|
}
|
|
3847
|
-
function
|
|
3918
|
+
function Ls(n, e, t, i, r, s, a, o, l, h, c) {
|
|
3848
3919
|
n.save(), t !== 1 && (n.globalAlpha === void 0 ? n.globalAlpha = (d) => d.globalAlpha *= t : n.globalAlpha *= t), e && n.transform.apply(n, e), /** @type {*} */
|
|
3849
|
-
i.contextInstructions ? (n.translate(l, h), n.scale(c[0], c[1]),
|
|
3920
|
+
i.contextInstructions ? (n.translate(l, h), n.scale(c[0], c[1]), Sr(
|
|
3850
3921
|
/** @type {Label} */
|
|
3851
3922
|
i,
|
|
3852
3923
|
n
|
|
@@ -3874,7 +3945,7 @@ function vs(n, e, t, i, r, s, a, o, l, h, c) {
|
|
|
3874
3945
|
o * c[1]
|
|
3875
3946
|
), n.restore();
|
|
3876
3947
|
}
|
|
3877
|
-
function
|
|
3948
|
+
function Sr(n, e) {
|
|
3878
3949
|
const t = n.contextInstructions;
|
|
3879
3950
|
for (let i = 0, r = t.length; i < r; i += 2)
|
|
3880
3951
|
Array.isArray(t[i + 1]) ? e[t[i]].apply(
|
|
@@ -3882,12 +3953,12 @@ function Or(n, e) {
|
|
|
3882
3953
|
t[i + 1]
|
|
3883
3954
|
) : e[t[i]] = t[i + 1];
|
|
3884
3955
|
}
|
|
3885
|
-
class
|
|
3956
|
+
class lt {
|
|
3886
3957
|
/**
|
|
3887
3958
|
* @param {Options} options Options.
|
|
3888
3959
|
*/
|
|
3889
3960
|
constructor(e) {
|
|
3890
|
-
this.opacity_ = e.opacity, this.rotateWithView_ = e.rotateWithView, this.rotation_ = e.rotation, this.scale_ = e.scale, this.scaleArray_ =
|
|
3961
|
+
this.opacity_ = e.opacity, this.rotateWithView_ = e.rotateWithView, this.rotation_ = e.rotation, this.scale_ = e.scale, this.scaleArray_ = Ae(e.scale), this.displacement_ = e.displacement, this.declutterMode_ = e.declutterMode;
|
|
3891
3962
|
}
|
|
3892
3963
|
/**
|
|
3893
3964
|
* Clones the style.
|
|
@@ -3896,7 +3967,7 @@ class at {
|
|
|
3896
3967
|
*/
|
|
3897
3968
|
clone() {
|
|
3898
3969
|
const e = this.getScale();
|
|
3899
|
-
return new
|
|
3970
|
+
return new lt({
|
|
3900
3971
|
opacity: this.getOpacity(),
|
|
3901
3972
|
scale: Array.isArray(e) ? e.slice() : e,
|
|
3902
3973
|
rotation: this.getRotation(),
|
|
@@ -3967,7 +4038,7 @@ class at {
|
|
|
3967
4038
|
* @return {Array<number>} Anchor.
|
|
3968
4039
|
*/
|
|
3969
4040
|
getAnchor() {
|
|
3970
|
-
return
|
|
4041
|
+
return W();
|
|
3971
4042
|
}
|
|
3972
4043
|
/**
|
|
3973
4044
|
* Get the image element for the symbolizer.
|
|
@@ -3976,14 +4047,14 @@ class at {
|
|
|
3976
4047
|
* @return {import('../DataTile.js').ImageLike} Image element.
|
|
3977
4048
|
*/
|
|
3978
4049
|
getImage(e) {
|
|
3979
|
-
return
|
|
4050
|
+
return W();
|
|
3980
4051
|
}
|
|
3981
4052
|
/**
|
|
3982
4053
|
* @abstract
|
|
3983
4054
|
* @return {import('../DataTile.js').ImageLike} Image element.
|
|
3984
4055
|
*/
|
|
3985
4056
|
getHitDetectionImage() {
|
|
3986
|
-
return
|
|
4057
|
+
return W();
|
|
3987
4058
|
}
|
|
3988
4059
|
/**
|
|
3989
4060
|
* Get the image pixel ratio.
|
|
@@ -3998,14 +4069,14 @@ class at {
|
|
|
3998
4069
|
* @return {import("../ImageState.js").default} Image state.
|
|
3999
4070
|
*/
|
|
4000
4071
|
getImageState() {
|
|
4001
|
-
return
|
|
4072
|
+
return W();
|
|
4002
4073
|
}
|
|
4003
4074
|
/**
|
|
4004
4075
|
* @abstract
|
|
4005
4076
|
* @return {import("../size.js").Size} Image size.
|
|
4006
4077
|
*/
|
|
4007
4078
|
getImageSize() {
|
|
4008
|
-
return
|
|
4079
|
+
return W();
|
|
4009
4080
|
}
|
|
4010
4081
|
/**
|
|
4011
4082
|
* Get the origin of the symbolizer.
|
|
@@ -4013,7 +4084,7 @@ class at {
|
|
|
4013
4084
|
* @return {Array<number>} Origin.
|
|
4014
4085
|
*/
|
|
4015
4086
|
getOrigin() {
|
|
4016
|
-
return
|
|
4087
|
+
return W();
|
|
4017
4088
|
}
|
|
4018
4089
|
/**
|
|
4019
4090
|
* Get the size of the symbolizer (in pixels).
|
|
@@ -4021,7 +4092,7 @@ class at {
|
|
|
4021
4092
|
* @return {import("../size.js").Size} Size.
|
|
4022
4093
|
*/
|
|
4023
4094
|
getSize() {
|
|
4024
|
-
return
|
|
4095
|
+
return W();
|
|
4025
4096
|
}
|
|
4026
4097
|
/**
|
|
4027
4098
|
* Set the displacement.
|
|
@@ -4066,28 +4137,28 @@ class at {
|
|
|
4066
4137
|
* @api
|
|
4067
4138
|
*/
|
|
4068
4139
|
setScale(e) {
|
|
4069
|
-
this.scale_ = e, this.scaleArray_ =
|
|
4140
|
+
this.scale_ = e, this.scaleArray_ = Ae(e);
|
|
4070
4141
|
}
|
|
4071
4142
|
/**
|
|
4072
4143
|
* @abstract
|
|
4073
4144
|
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
4074
4145
|
*/
|
|
4075
4146
|
listenImageChange(e) {
|
|
4076
|
-
|
|
4147
|
+
W();
|
|
4077
4148
|
}
|
|
4078
4149
|
/**
|
|
4079
4150
|
* Load not yet loaded URI.
|
|
4080
4151
|
* @abstract
|
|
4081
4152
|
*/
|
|
4082
4153
|
load() {
|
|
4083
|
-
|
|
4154
|
+
W();
|
|
4084
4155
|
}
|
|
4085
4156
|
/**
|
|
4086
4157
|
* @abstract
|
|
4087
4158
|
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
4088
4159
|
*/
|
|
4089
4160
|
unlistenImageChange(e) {
|
|
4090
|
-
|
|
4161
|
+
W();
|
|
4091
4162
|
}
|
|
4092
4163
|
/**
|
|
4093
4164
|
* @return {Promise<void>} `false` or Promise that resolves when the style is ready to use.
|
|
@@ -4096,7 +4167,7 @@ class at {
|
|
|
4096
4167
|
return Promise.resolve();
|
|
4097
4168
|
}
|
|
4098
4169
|
}
|
|
4099
|
-
class
|
|
4170
|
+
class ht extends lt {
|
|
4100
4171
|
/**
|
|
4101
4172
|
* @param {Options} options Options.
|
|
4102
4173
|
*/
|
|
@@ -4108,7 +4179,7 @@ class ot extends at {
|
|
|
4108
4179
|
scale: e.scale !== void 0 ? e.scale : 1,
|
|
4109
4180
|
displacement: e.displacement !== void 0 ? e.displacement : [0, 0],
|
|
4110
4181
|
declutterMode: e.declutterMode
|
|
4111
|
-
}), this.hitDetectionCanvas_ = null, this.fill_ = e.fill !== void 0 ? e.fill : null, this.origin_ = [0, 0], this.points_ = e.points, this.radius = e.radius, this.radius2_ = e.radius2, this.angle_ = e.angle !== void 0 ? e.angle : 0, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.size_, this.renderOptions_, this.imageState_ = this.fill_ && this.fill_.loading() ?
|
|
4182
|
+
}), this.hitDetectionCanvas_ = null, this.fill_ = e.fill !== void 0 ? e.fill : null, this.origin_ = [0, 0], this.points_ = e.points, this.radius = e.radius, this.radius2_ = e.radius2, this.angle_ = e.angle !== void 0 ? e.angle : 0, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.size_, this.renderOptions_, this.imageState_ = this.fill_ && this.fill_.loading() ? v.LOADING : v.LOADED, this.imageState_ === v.LOADING && this.ready().then(() => this.imageState_ = v.LOADED), this.render();
|
|
4112
4183
|
}
|
|
4113
4184
|
/**
|
|
4114
4185
|
* Clones the style.
|
|
@@ -4117,7 +4188,7 @@ class ot extends at {
|
|
|
4117
4188
|
* @override
|
|
4118
4189
|
*/
|
|
4119
4190
|
clone() {
|
|
4120
|
-
const e = this.getScale(), t = new
|
|
4191
|
+
const e = this.getScale(), t = new ht({
|
|
4121
4192
|
fill: this.getFill() ? this.getFill().clone() : void 0,
|
|
4122
4193
|
points: this.getPoints(),
|
|
4123
4194
|
radius: this.getRadius(),
|
|
@@ -4190,19 +4261,19 @@ class ot extends at {
|
|
|
4190
4261
|
const t = this.fill_?.getKey(), i = `${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}` + Object.values(this.renderOptions_).join(",");
|
|
4191
4262
|
let r = (
|
|
4192
4263
|
/** @type {HTMLCanvasElement|OffscreenCanvas} */
|
|
4193
|
-
|
|
4264
|
+
$.get(i, null)?.getImage(1)
|
|
4194
4265
|
);
|
|
4195
4266
|
if (!r) {
|
|
4196
|
-
const s = this.renderOptions_, a = Math.ceil(s.size * e), o =
|
|
4267
|
+
const s = this.renderOptions_, a = Math.ceil(s.size * e), o = fe(a, a);
|
|
4197
4268
|
this.draw_(s, o, e), r = o.canvas;
|
|
4198
|
-
const l = new
|
|
4269
|
+
const l = new Pi(
|
|
4199
4270
|
r,
|
|
4200
4271
|
void 0,
|
|
4201
4272
|
null,
|
|
4202
|
-
|
|
4273
|
+
v.LOADED,
|
|
4203
4274
|
null
|
|
4204
4275
|
);
|
|
4205
|
-
|
|
4276
|
+
$.set(i, null, l), createImageBitmap(r).then((h) => {
|
|
4206
4277
|
l.setImage(h);
|
|
4207
4278
|
});
|
|
4208
4279
|
}
|
|
@@ -4336,29 +4407,29 @@ class ot extends at {
|
|
|
4336
4407
|
return t;
|
|
4337
4408
|
let r = this.radius, s = this.radius2_ === void 0 ? r : this.radius2_;
|
|
4338
4409
|
if (r < s) {
|
|
4339
|
-
const
|
|
4340
|
-
r = s, s =
|
|
4410
|
+
const V = r;
|
|
4411
|
+
r = s, s = V;
|
|
4341
4412
|
}
|
|
4342
4413
|
const a = this.radius2_ === void 0 ? this.points_ : this.points_ * 2, o = 2 * Math.PI / a, l = s * Math.sin(o), h = Math.sqrt(s * s - l * l), c = r - h, d = Math.sqrt(l * l + c * c), f = d / l;
|
|
4343
4414
|
if (e === "miter" && f <= i)
|
|
4344
4415
|
return f * t;
|
|
4345
|
-
const
|
|
4416
|
+
const g = t / 2 / f, C = t / 2 * (c / d), x = Math.sqrt((r + g) * (r + g) + C * C) - r;
|
|
4346
4417
|
if (this.radius2_ === void 0 || e === "bevel")
|
|
4347
|
-
return
|
|
4348
|
-
const
|
|
4349
|
-
if (
|
|
4350
|
-
const
|
|
4351
|
-
return 2 * Math.max(
|
|
4418
|
+
return x * 2;
|
|
4419
|
+
const M = r * Math.sin(o), G = Math.sqrt(r * r - M * M), S = s - G, R = Math.sqrt(M * M + S * S) / M;
|
|
4420
|
+
if (R <= i) {
|
|
4421
|
+
const V = R * t / 2 - s - r;
|
|
4422
|
+
return 2 * Math.max(x, V);
|
|
4352
4423
|
}
|
|
4353
|
-
return
|
|
4424
|
+
return x * 2;
|
|
4354
4425
|
}
|
|
4355
4426
|
/**
|
|
4356
4427
|
* @return {RenderOptions} The render options
|
|
4357
4428
|
* @protected
|
|
4358
4429
|
*/
|
|
4359
4430
|
createRenderOptions() {
|
|
4360
|
-
let e =
|
|
4361
|
-
this.stroke_ && (a =
|
|
4431
|
+
let e = ii, t = ni, i = 0, r = null, s = 0, a, o = 0;
|
|
4432
|
+
this.stroke_ && (a = ei(this.stroke_.getColor() ?? Rr), o = this.stroke_.getWidth() ?? Pr, r = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset() ?? 0, t = this.stroke_.getLineJoin() ?? ni, e = this.stroke_.getLineCap() ?? ii, i = this.stroke_.getMiterLimit() ?? Tr);
|
|
4362
4433
|
const l = this.calculateLineJoinSize_(t, o, i), h = Math.max(this.radius, this.radius2_ || 0), c = Math.ceil(2 * h + l);
|
|
4363
4434
|
return {
|
|
4364
4435
|
strokeStyle: a,
|
|
@@ -4388,7 +4459,7 @@ class ot extends at {
|
|
|
4388
4459
|
draw_(e, t, i) {
|
|
4389
4460
|
if (t.scale(i, i), t.translate(e.size / 2, e.size / 2), this.createPath_(t), this.fill_) {
|
|
4390
4461
|
let r = this.fill_.getColor();
|
|
4391
|
-
r === null && (r =
|
|
4462
|
+
r === null && (r = ti), t.fillStyle = ei(r), t.fill();
|
|
4392
4463
|
}
|
|
4393
4464
|
e.strokeStyle && (t.strokeStyle = e.strokeStyle, t.lineWidth = e.strokeWidth, e.lineDash && (t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset), t.lineCap = e.lineCap, t.lineJoin = e.lineJoin, t.miterLimit = e.miterLimit, t.stroke());
|
|
4394
4465
|
}
|
|
@@ -4401,7 +4472,7 @@ class ot extends at {
|
|
|
4401
4472
|
let t;
|
|
4402
4473
|
if (this.fill_) {
|
|
4403
4474
|
let i = this.fill_.getColor(), r = 0;
|
|
4404
|
-
typeof i == "string" && (i = ze(i)), i === null ? r = 1 : Array.isArray(i) && (r = i.length === 4 ? i[3] : 1), r === 0 && (t =
|
|
4475
|
+
typeof i == "string" && (i = ze(i)), i === null ? r = 1 : Array.isArray(i) && (r = i.length === 4 ? i[3] : 1), r === 0 && (t = fe(e.size, e.size), this.drawHitDetectionCanvas_(e, t));
|
|
4405
4476
|
}
|
|
4406
4477
|
return t ? t.canvas : this.getImage(1);
|
|
4407
4478
|
}
|
|
@@ -4431,7 +4502,7 @@ class ot extends at {
|
|
|
4431
4502
|
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context.
|
|
4432
4503
|
*/
|
|
4433
4504
|
drawHitDetectionCanvas_(e, t) {
|
|
4434
|
-
t.translate(e.size / 2, e.size / 2), this.createPath_(t), t.fillStyle =
|
|
4505
|
+
t.translate(e.size / 2, e.size / 2), this.createPath_(t), t.fillStyle = ti, t.fill(), e.strokeStyle && (t.strokeStyle = e.strokeStyle, t.lineWidth = e.strokeWidth, e.lineDash && (t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset), t.lineJoin = e.lineJoin, t.miterLimit = e.miterLimit, t.stroke());
|
|
4435
4506
|
}
|
|
4436
4507
|
/**
|
|
4437
4508
|
* @override
|
|
@@ -4440,7 +4511,7 @@ class ot extends at {
|
|
|
4440
4511
|
return this.fill_ ? this.fill_.ready() : Promise.resolve();
|
|
4441
4512
|
}
|
|
4442
4513
|
}
|
|
4443
|
-
class He extends
|
|
4514
|
+
class He extends ht {
|
|
4444
4515
|
/**
|
|
4445
4516
|
* @param {Options} [options] Options.
|
|
4446
4517
|
*/
|
|
@@ -4477,7 +4548,7 @@ class He extends ot {
|
|
|
4477
4548
|
return t.setOpacity(this.getOpacity()), t;
|
|
4478
4549
|
}
|
|
4479
4550
|
}
|
|
4480
|
-
class
|
|
4551
|
+
class oe {
|
|
4481
4552
|
/**
|
|
4482
4553
|
* @param {Options} [options] Options.
|
|
4483
4554
|
*/
|
|
@@ -4491,7 +4562,7 @@ class re {
|
|
|
4491
4562
|
*/
|
|
4492
4563
|
clone() {
|
|
4493
4564
|
const e = this.getColor();
|
|
4494
|
-
return new
|
|
4565
|
+
return new oe({
|
|
4495
4566
|
color: Array.isArray(e) ? e.slice() : e || void 0
|
|
4496
4567
|
});
|
|
4497
4568
|
}
|
|
@@ -4521,7 +4592,7 @@ class re {
|
|
|
4521
4592
|
);
|
|
4522
4593
|
t.ready().then(() => {
|
|
4523
4594
|
this.patternImage_ = null;
|
|
4524
|
-
}), t.getImageState() ===
|
|
4595
|
+
}), t.getImageState() === v.IDLE && t.load(), t.getImageState() === v.LOADING && (this.patternImage_ = t);
|
|
4525
4596
|
}
|
|
4526
4597
|
this.color_ = e;
|
|
4527
4598
|
}
|
|
@@ -4545,10 +4616,10 @@ class re {
|
|
|
4545
4616
|
return this.patternImage_ ? this.patternImage_.ready() : Promise.resolve();
|
|
4546
4617
|
}
|
|
4547
4618
|
}
|
|
4548
|
-
function
|
|
4619
|
+
function si(n, e, t, i) {
|
|
4549
4620
|
return t !== void 0 && i !== void 0 ? [t / n, i / e] : t !== void 0 ? t / n : i !== void 0 ? i / e : 1;
|
|
4550
4621
|
}
|
|
4551
|
-
class
|
|
4622
|
+
class kt extends lt {
|
|
4552
4623
|
/**
|
|
4553
4624
|
* @param {Options} [options] Options.
|
|
4554
4625
|
*/
|
|
@@ -4565,19 +4636,19 @@ class Ot extends at {
|
|
|
4565
4636
|
}), this.anchor_ = e.anchor !== void 0 ? e.anchor : [0.5, 0.5], this.normalizedAnchor_ = null, this.anchorOrigin_ = e.anchorOrigin !== void 0 ? e.anchorOrigin : "top-left", this.anchorXUnits_ = e.anchorXUnits !== void 0 ? e.anchorXUnits : "fraction", this.anchorYUnits_ = e.anchorYUnits !== void 0 ? e.anchorYUnits : "fraction", this.crossOrigin_ = e.crossOrigin !== void 0 ? e.crossOrigin : null, this.referrerPolicy_ = e.referrerPolicy;
|
|
4566
4637
|
const a = e.img !== void 0 ? e.img : null;
|
|
4567
4638
|
let o = e.src;
|
|
4568
|
-
|
|
4639
|
+
Q(
|
|
4569
4640
|
!(o !== void 0 && a),
|
|
4570
4641
|
"`image` and `src` cannot be provided at the same time"
|
|
4571
4642
|
), (o === void 0 || o.length === 0) && a && (o = /** @type {HTMLImageElement} */
|
|
4572
|
-
a.src || Ne(a)),
|
|
4643
|
+
a.src || Ne(a)), Q(
|
|
4573
4644
|
o !== void 0 && o.length > 0,
|
|
4574
4645
|
"A defined and non-empty `src` or `image` must be provided"
|
|
4575
|
-
),
|
|
4646
|
+
), Q(
|
|
4576
4647
|
!((e.width !== void 0 || e.height !== void 0) && e.scale !== void 0),
|
|
4577
4648
|
"`width` or `height` cannot be provided together with `scale`"
|
|
4578
4649
|
);
|
|
4579
4650
|
let l;
|
|
4580
|
-
if (e.src !== void 0 ? l =
|
|
4651
|
+
if (e.src !== void 0 ? l = v.IDLE : a !== void 0 && ("complete" in a ? a.complete ? l = a.src ? v.LOADED : v.IDLE : l = v.LOADING : l = v.LOADED), this.color_ = e.color !== void 0 ? ze(e.color) : null, this.iconImage_ = ke(
|
|
4581
4652
|
a,
|
|
4582
4653
|
/** @type {string} */
|
|
4583
4654
|
o,
|
|
@@ -4600,11 +4671,11 @@ class Ot extends at {
|
|
|
4600
4671
|
const f = () => {
|
|
4601
4672
|
if (this.unlistenImageChange(f), !this.initialOptions_)
|
|
4602
4673
|
return;
|
|
4603
|
-
const
|
|
4674
|
+
const g = this.iconImage_.getSize();
|
|
4604
4675
|
this.setScale(
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4676
|
+
si(
|
|
4677
|
+
g[0],
|
|
4678
|
+
g[1],
|
|
4608
4679
|
e.width,
|
|
4609
4680
|
e.height
|
|
4610
4681
|
)
|
|
@@ -4615,7 +4686,7 @@ class Ot extends at {
|
|
|
4615
4686
|
}
|
|
4616
4687
|
}
|
|
4617
4688
|
h !== void 0 && this.setScale(
|
|
4618
|
-
|
|
4689
|
+
si(h, c, e.width, e.height)
|
|
4619
4690
|
);
|
|
4620
4691
|
}
|
|
4621
4692
|
}
|
|
@@ -4627,7 +4698,7 @@ class Ot extends at {
|
|
|
4627
4698
|
*/
|
|
4628
4699
|
clone() {
|
|
4629
4700
|
let e, t, i;
|
|
4630
|
-
return this.initialOptions_ ? (t = this.initialOptions_.width, i = this.initialOptions_.height) : (e = this.getScale(), e = Array.isArray(e) ? e.slice() : e), new
|
|
4701
|
+
return this.initialOptions_ ? (t = this.initialOptions_.width, i = this.initialOptions_.height) : (e = this.getScale(), e = Array.isArray(e) ? e.slice() : e), new kt({
|
|
4631
4702
|
anchor: this.anchor_.slice(),
|
|
4632
4703
|
anchorOrigin: this.anchorOrigin_,
|
|
4633
4704
|
anchorXUnits: this.anchorXUnits_,
|
|
@@ -4711,7 +4782,7 @@ class Ot extends at {
|
|
|
4711
4782
|
if (this.color_ === t || this.color_ && t && this.color_.length === t.length && this.color_.every((a, o) => a === t[o]))
|
|
4712
4783
|
return;
|
|
4713
4784
|
this.color_ = t;
|
|
4714
|
-
const i = this.getSrc(), r = i !== void 0 ? null : this.getHitDetectionImage(), s = i !== void 0 ?
|
|
4785
|
+
const i = this.getSrc(), r = i !== void 0 ? null : this.getHitDetectionImage(), s = i !== void 0 ? v.IDLE : this.iconImage_.getImageState();
|
|
4715
4786
|
this.iconImage_ = ke(
|
|
4716
4787
|
r,
|
|
4717
4788
|
i,
|
|
@@ -4804,7 +4875,7 @@ class Ot extends at {
|
|
|
4804
4875
|
crossOrigin: this.crossOrigin_,
|
|
4805
4876
|
referrerPolicy: this.referrerPolicy_
|
|
4806
4877
|
},
|
|
4807
|
-
|
|
4878
|
+
v.IDLE,
|
|
4808
4879
|
this.color_
|
|
4809
4880
|
);
|
|
4810
4881
|
}
|
|
@@ -4826,7 +4897,7 @@ class Ot extends at {
|
|
|
4826
4897
|
const e = this.getScaleArray();
|
|
4827
4898
|
if (this.size_)
|
|
4828
4899
|
return this.size_[0] * e[0];
|
|
4829
|
-
if (this.iconImage_.getImageState() ==
|
|
4900
|
+
if (this.iconImage_.getImageState() == v.LOADED)
|
|
4830
4901
|
return this.iconImage_.getSize()[0] * e[0];
|
|
4831
4902
|
}
|
|
4832
4903
|
/**
|
|
@@ -4838,7 +4909,7 @@ class Ot extends at {
|
|
|
4838
4909
|
const e = this.getScaleArray();
|
|
4839
4910
|
if (this.size_)
|
|
4840
4911
|
return this.size_[1] * e[1];
|
|
4841
|
-
if (this.iconImage_.getImageState() ==
|
|
4912
|
+
if (this.iconImage_.getImageState() == v.LOADED)
|
|
4842
4913
|
return this.iconImage_.getSize()[1] * e[1];
|
|
4843
4914
|
}
|
|
4844
4915
|
/**
|
|
@@ -4856,7 +4927,7 @@ class Ot extends at {
|
|
|
4856
4927
|
* @override
|
|
4857
4928
|
*/
|
|
4858
4929
|
listenImageChange(e) {
|
|
4859
|
-
this.iconImage_.addEventListener(
|
|
4930
|
+
this.iconImage_.addEventListener(A.CHANGE, e);
|
|
4860
4931
|
}
|
|
4861
4932
|
/**
|
|
4862
4933
|
* Load not yet loaded URI.
|
|
@@ -4874,7 +4945,7 @@ class Ot extends at {
|
|
|
4874
4945
|
* @override
|
|
4875
4946
|
*/
|
|
4876
4947
|
unlistenImageChange(e) {
|
|
4877
|
-
this.iconImage_.removeEventListener(
|
|
4948
|
+
this.iconImage_.removeEventListener(A.CHANGE, e);
|
|
4878
4949
|
}
|
|
4879
4950
|
/**
|
|
4880
4951
|
* @override
|
|
@@ -4883,7 +4954,7 @@ class Ot extends at {
|
|
|
4883
4954
|
return this.iconImage_.ready();
|
|
4884
4955
|
}
|
|
4885
4956
|
}
|
|
4886
|
-
class
|
|
4957
|
+
class ge {
|
|
4887
4958
|
/**
|
|
4888
4959
|
* @param {Options} [options] Options.
|
|
4889
4960
|
*/
|
|
@@ -4897,7 +4968,7 @@ class ue {
|
|
|
4897
4968
|
*/
|
|
4898
4969
|
clone() {
|
|
4899
4970
|
const e = this.getColor();
|
|
4900
|
-
return new
|
|
4971
|
+
return new ge({
|
|
4901
4972
|
color: Array.isArray(e) ? e.slice() : e || void 0,
|
|
4902
4973
|
lineCap: this.getLineCap(),
|
|
4903
4974
|
lineDash: this.getLineDash() ? this.getLineDash().slice() : void 0,
|
|
@@ -5045,12 +5116,12 @@ class ue {
|
|
|
5045
5116
|
this.width_ = e;
|
|
5046
5117
|
}
|
|
5047
5118
|
}
|
|
5048
|
-
class
|
|
5119
|
+
class U {
|
|
5049
5120
|
/**
|
|
5050
5121
|
* @param {Options} [options] Style options.
|
|
5051
5122
|
*/
|
|
5052
5123
|
constructor(e) {
|
|
5053
|
-
e = e || {}, this.geometry_ = null, this.geometryFunction_ =
|
|
5124
|
+
e = e || {}, this.geometry_ = null, this.geometryFunction_ = ai, e.geometry !== void 0 && this.setGeometry(e.geometry), this.fill_ = e.fill !== void 0 ? e.fill : null, this.image_ = e.image !== void 0 ? e.image : null, this.renderer_ = e.renderer !== void 0 ? e.renderer : null, this.hitDetectionRenderer_ = e.hitDetectionRenderer !== void 0 ? e.hitDetectionRenderer : null, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.text_ = e.text !== void 0 ? e.text : null, this.zIndex_ = e.zIndex;
|
|
5054
5125
|
}
|
|
5055
5126
|
/**
|
|
5056
5127
|
* Clones the style.
|
|
@@ -5060,7 +5131,7 @@ class $ {
|
|
|
5060
5131
|
clone() {
|
|
5061
5132
|
let e = this.getGeometry();
|
|
5062
5133
|
return e && typeof e == "object" && (e = /** @type {import("../geom/Geometry.js").default} */
|
|
5063
|
-
e.clone()), new
|
|
5134
|
+
e.clone()), new U({
|
|
5064
5135
|
geometry: e ?? void 0,
|
|
5065
5136
|
fill: this.getFill() ? this.getFill().clone() : void 0,
|
|
5066
5137
|
image: this.getImage() ? this.getImage().clone() : void 0,
|
|
@@ -5216,7 +5287,7 @@ class $ {
|
|
|
5216
5287
|
/** @type {import("../geom/Geometry.js").default} */
|
|
5217
5288
|
e
|
|
5218
5289
|
);
|
|
5219
|
-
}) : this.geometryFunction_ =
|
|
5290
|
+
}) : this.geometryFunction_ = ai, this.geometry_ = e;
|
|
5220
5291
|
}
|
|
5221
5292
|
/**
|
|
5222
5293
|
* Set the z-index.
|
|
@@ -5228,13 +5299,13 @@ class $ {
|
|
|
5228
5299
|
this.zIndex_ = e;
|
|
5229
5300
|
}
|
|
5230
5301
|
}
|
|
5231
|
-
function
|
|
5302
|
+
function kr(n) {
|
|
5232
5303
|
let e;
|
|
5233
5304
|
if (typeof n == "function")
|
|
5234
5305
|
e = n;
|
|
5235
5306
|
else {
|
|
5236
5307
|
let t;
|
|
5237
|
-
Array.isArray(n) ? t = n : (
|
|
5308
|
+
Array.isArray(n) ? t = n : (Q(
|
|
5238
5309
|
typeof /** @type {?} */
|
|
5239
5310
|
n.getZIndex == "function",
|
|
5240
5311
|
"Expected an `Style` or an array of `Style`"
|
|
@@ -5247,17 +5318,17 @@ function xr(n) {
|
|
|
5247
5318
|
}
|
|
5248
5319
|
return e;
|
|
5249
5320
|
}
|
|
5250
|
-
let
|
|
5251
|
-
function
|
|
5252
|
-
if (!
|
|
5253
|
-
const t = new
|
|
5321
|
+
let Et = null;
|
|
5322
|
+
function Mi(n, e) {
|
|
5323
|
+
if (!Et) {
|
|
5324
|
+
const t = new oe({
|
|
5254
5325
|
color: "rgba(255,255,255,0.4)"
|
|
5255
|
-
}), i = new
|
|
5326
|
+
}), i = new ge({
|
|
5256
5327
|
color: "#3399CC",
|
|
5257
5328
|
width: 1.25
|
|
5258
5329
|
});
|
|
5259
|
-
|
|
5260
|
-
new
|
|
5330
|
+
Et = [
|
|
5331
|
+
new U({
|
|
5261
5332
|
image: new He({
|
|
5262
5333
|
fill: t,
|
|
5263
5334
|
stroke: i,
|
|
@@ -5268,37 +5339,37 @@ function Ri(n, e) {
|
|
|
5268
5339
|
})
|
|
5269
5340
|
];
|
|
5270
5341
|
}
|
|
5271
|
-
return
|
|
5342
|
+
return Et;
|
|
5272
5343
|
}
|
|
5273
|
-
function
|
|
5344
|
+
function bs() {
|
|
5274
5345
|
const n = {}, e = [255, 255, 255, 1], t = [0, 153, 255, 1], i = 3;
|
|
5275
5346
|
return n.Polygon = [
|
|
5276
|
-
new
|
|
5277
|
-
fill: new
|
|
5347
|
+
new U({
|
|
5348
|
+
fill: new oe({
|
|
5278
5349
|
color: [255, 255, 255, 0.5]
|
|
5279
5350
|
})
|
|
5280
5351
|
})
|
|
5281
5352
|
], n.MultiPolygon = n.Polygon, n.LineString = [
|
|
5282
|
-
new
|
|
5283
|
-
stroke: new
|
|
5353
|
+
new U({
|
|
5354
|
+
stroke: new ge({
|
|
5284
5355
|
color: e,
|
|
5285
5356
|
width: i + 2
|
|
5286
5357
|
})
|
|
5287
5358
|
}),
|
|
5288
|
-
new
|
|
5289
|
-
stroke: new
|
|
5359
|
+
new U({
|
|
5360
|
+
stroke: new ge({
|
|
5290
5361
|
color: t,
|
|
5291
5362
|
width: i
|
|
5292
5363
|
})
|
|
5293
5364
|
})
|
|
5294
5365
|
], n.MultiLineString = n.LineString, n.Circle = n.Polygon.concat(n.LineString), n.Point = [
|
|
5295
|
-
new
|
|
5366
|
+
new U({
|
|
5296
5367
|
image: new He({
|
|
5297
5368
|
radius: i * 2,
|
|
5298
|
-
fill: new
|
|
5369
|
+
fill: new oe({
|
|
5299
5370
|
color: t
|
|
5300
5371
|
}),
|
|
5301
|
-
stroke: new
|
|
5372
|
+
stroke: new ge({
|
|
5302
5373
|
color: e,
|
|
5303
5374
|
width: i / 2
|
|
5304
5375
|
})
|
|
@@ -5310,16 +5381,16 @@ function Cs() {
|
|
|
5310
5381
|
n.Point
|
|
5311
5382
|
), n;
|
|
5312
5383
|
}
|
|
5313
|
-
function
|
|
5384
|
+
function ai(n) {
|
|
5314
5385
|
return n.getGeometry();
|
|
5315
5386
|
}
|
|
5316
|
-
const
|
|
5317
|
-
class
|
|
5387
|
+
const Nr = "#333";
|
|
5388
|
+
class Nt {
|
|
5318
5389
|
/**
|
|
5319
5390
|
* @param {Options} [options] Options.
|
|
5320
5391
|
*/
|
|
5321
5392
|
constructor(e) {
|
|
5322
|
-
e = e || {}, this.font_ = e.font, this.rotation_ = e.rotation, this.rotateWithView_ = e.rotateWithView, this.keepUpright_ = e.keepUpright, this.scale_ = e.scale, this.scaleArray_ =
|
|
5393
|
+
e = e || {}, this.font_ = e.font, this.rotation_ = e.rotation, this.rotateWithView_ = e.rotateWithView, this.keepUpright_ = e.keepUpright, this.scale_ = e.scale, this.scaleArray_ = Ae(e.scale !== void 0 ? e.scale : 1), this.text_ = e.text, this.textAlign_ = e.textAlign, this.justify_ = e.justify, this.repeat_ = e.repeat, this.textBaseline_ = e.textBaseline, this.fill_ = e.fill !== void 0 ? e.fill : new oe({ color: Nr }), this.maxAngle_ = e.maxAngle !== void 0 ? e.maxAngle : Math.PI / 4, this.placement_ = e.placement !== void 0 ? e.placement : "point", this.overflow_ = !!e.overflow, this.stroke_ = e.stroke !== void 0 ? e.stroke : null, this.offsetX_ = e.offsetX !== void 0 ? e.offsetX : 0, this.offsetY_ = e.offsetY !== void 0 ? e.offsetY : 0, this.backgroundFill_ = e.backgroundFill ? e.backgroundFill : null, this.backgroundStroke_ = e.backgroundStroke ? e.backgroundStroke : null, this.padding_ = e.padding === void 0 ? null : e.padding, this.declutterMode_ = e.declutterMode;
|
|
5323
5394
|
}
|
|
5324
5395
|
/**
|
|
5325
5396
|
* Clones the style.
|
|
@@ -5328,7 +5399,7 @@ class xt {
|
|
|
5328
5399
|
*/
|
|
5329
5400
|
clone() {
|
|
5330
5401
|
const e = this.getScale();
|
|
5331
|
-
return new
|
|
5402
|
+
return new Nt({
|
|
5332
5403
|
font: this.getFont(),
|
|
5333
5404
|
placement: this.getPlacement(),
|
|
5334
5405
|
repeat: this.getRepeat(),
|
|
@@ -5342,7 +5413,7 @@ class xt {
|
|
|
5342
5413
|
textAlign: this.getTextAlign(),
|
|
5343
5414
|
justify: this.getJustify(),
|
|
5344
5415
|
textBaseline: this.getTextBaseline(),
|
|
5345
|
-
fill: this.getFill() instanceof
|
|
5416
|
+
fill: this.getFill() instanceof oe ? this.getFill().clone() : this.getFill(),
|
|
5346
5417
|
stroke: this.getStroke() ? this.getStroke().clone() : void 0,
|
|
5347
5418
|
offsetX: this.getOffsetX(),
|
|
5348
5419
|
offsetY: this.getOffsetY(),
|
|
@@ -5632,7 +5703,7 @@ class xt {
|
|
|
5632
5703
|
* @api
|
|
5633
5704
|
*/
|
|
5634
5705
|
setScale(e) {
|
|
5635
|
-
this.scale_ = e, this.scaleArray_ =
|
|
5706
|
+
this.scale_ = e, this.scaleArray_ = Ae(e !== void 0 ? e : 1);
|
|
5636
5707
|
}
|
|
5637
5708
|
/**
|
|
5638
5709
|
* Set the stroke.
|
|
@@ -5707,31 +5778,36 @@ class xt {
|
|
|
5707
5778
|
this.padding_ = e;
|
|
5708
5779
|
}
|
|
5709
5780
|
}
|
|
5710
|
-
function
|
|
5781
|
+
function zr(n) {
|
|
5711
5782
|
return !0;
|
|
5712
5783
|
}
|
|
5713
|
-
function
|
|
5714
|
-
|
|
5784
|
+
function Fr(n, e) {
|
|
5785
|
+
e = e ?? Mt();
|
|
5786
|
+
const t = Kr(n, e), i = Ri();
|
|
5715
5787
|
return function(r, s) {
|
|
5716
5788
|
if (i.properties = r.getPropertiesInternal(), i.resolution = s, e.featureId) {
|
|
5717
5789
|
const a = r.getId();
|
|
5718
5790
|
a !== void 0 ? i.featureId = a : i.featureId = null;
|
|
5719
5791
|
}
|
|
5720
|
-
return e.geometryType && (i.geometryType =
|
|
5792
|
+
return e.geometryType && (i.geometryType = St(
|
|
5721
5793
|
r.getGeometry()
|
|
5722
5794
|
)), t(i);
|
|
5723
5795
|
};
|
|
5724
5796
|
}
|
|
5725
|
-
function
|
|
5726
|
-
|
|
5797
|
+
function oi(n, e) {
|
|
5798
|
+
e = e ?? Mt();
|
|
5799
|
+
const t = n.length, i = new Array(t);
|
|
5727
5800
|
for (let a = 0; a < t; ++a)
|
|
5728
|
-
i[a] =
|
|
5729
|
-
const r =
|
|
5801
|
+
i[a] = It(n[a], e);
|
|
5802
|
+
const r = Ri(), s = new Array(t);
|
|
5730
5803
|
return function(a, o) {
|
|
5731
5804
|
if (r.properties = a.getPropertiesInternal(), r.resolution = o, e.featureId) {
|
|
5732
5805
|
const h = a.getId();
|
|
5733
5806
|
h !== void 0 ? r.featureId = h : r.featureId = null;
|
|
5734
5807
|
}
|
|
5808
|
+
e.geometryType && (r.geometryType = St(
|
|
5809
|
+
a.getGeometry()
|
|
5810
|
+
));
|
|
5735
5811
|
let l = 0;
|
|
5736
5812
|
for (let h = 0; h < t; ++h) {
|
|
5737
5813
|
const c = i[h](r);
|
|
@@ -5740,18 +5816,38 @@ function ii(n) {
|
|
|
5740
5816
|
return s.length = l, s;
|
|
5741
5817
|
};
|
|
5742
5818
|
}
|
|
5743
|
-
function
|
|
5819
|
+
function Vr(n, e) {
|
|
5820
|
+
if (e = e ?? Mt(), !Array.isArray(n))
|
|
5821
|
+
return oi([n], e);
|
|
5822
|
+
const t = n.length;
|
|
5823
|
+
if ("style" in n[0]) {
|
|
5824
|
+
const s = new Array(t);
|
|
5825
|
+
for (let a = 0; a < t; ++a) {
|
|
5826
|
+
const o = n[a];
|
|
5827
|
+
if (!("style" in o))
|
|
5828
|
+
throw new Error("Expected a list of rules with a style property");
|
|
5829
|
+
s[a] = o;
|
|
5830
|
+
}
|
|
5831
|
+
return Fr(s, e);
|
|
5832
|
+
}
|
|
5833
|
+
return oi(
|
|
5834
|
+
/** @type {Array<import("../../style/flat.js").FlatStyle>} */
|
|
5835
|
+
n,
|
|
5836
|
+
e
|
|
5837
|
+
);
|
|
5838
|
+
}
|
|
5839
|
+
function Kr(n, e) {
|
|
5744
5840
|
const t = n.length, i = new Array(t);
|
|
5745
5841
|
for (let r = 0; r < t; ++r) {
|
|
5746
|
-
const s = n[r], a = "filter" in s ? Z(s.filter,
|
|
5842
|
+
const s = n[r], a = "filter" in s ? Z(s.filter, z, e) : zr;
|
|
5747
5843
|
let o;
|
|
5748
5844
|
if (Array.isArray(s.style)) {
|
|
5749
5845
|
const l = s.style.length;
|
|
5750
5846
|
o = new Array(l);
|
|
5751
5847
|
for (let h = 0; h < l; ++h)
|
|
5752
|
-
o[h] =
|
|
5848
|
+
o[h] = It(s.style[h], e);
|
|
5753
5849
|
} else
|
|
5754
|
-
o = [
|
|
5850
|
+
o = [It(s.style, e)];
|
|
5755
5851
|
i[r] = { filter: a, styles: o };
|
|
5756
5852
|
}
|
|
5757
5853
|
return function(r) {
|
|
@@ -5770,13 +5866,13 @@ function Nr(n, e) {
|
|
|
5770
5866
|
return s;
|
|
5771
5867
|
};
|
|
5772
5868
|
}
|
|
5773
|
-
function
|
|
5774
|
-
const t = Fe(n, "", e), i =
|
|
5775
|
-
if (!t && !i && !r && !s &&
|
|
5869
|
+
function It(n, e) {
|
|
5870
|
+
const t = Fe(n, "", e), i = Ve(n, "", e), r = Br(n, e), s = Gr(n, e), a = k(n, "z-index", e);
|
|
5871
|
+
if (!t && !i && !r && !s && !$i(n))
|
|
5776
5872
|
throw new Error(
|
|
5777
5873
|
"No fill, stroke, point, or text symbolizer properties in style: " + JSON.stringify(n)
|
|
5778
5874
|
);
|
|
5779
|
-
const o = new
|
|
5875
|
+
const o = new U();
|
|
5780
5876
|
return function(l) {
|
|
5781
5877
|
let h = !0;
|
|
5782
5878
|
if (t) {
|
|
@@ -5801,11 +5897,11 @@ function Ct(n, e) {
|
|
|
5801
5897
|
function Fe(n, e, t) {
|
|
5802
5898
|
let i;
|
|
5803
5899
|
if (e + "fill-pattern-src" in n)
|
|
5804
|
-
i =
|
|
5900
|
+
i = Yr(n, e + "fill-", t);
|
|
5805
5901
|
else {
|
|
5806
5902
|
if (n[e + "fill-color"] === "none")
|
|
5807
5903
|
return (s) => null;
|
|
5808
|
-
i =
|
|
5904
|
+
i = ct(
|
|
5809
5905
|
n,
|
|
5810
5906
|
e + "fill-color",
|
|
5811
5907
|
t
|
|
@@ -5813,18 +5909,18 @@ function Fe(n, e, t) {
|
|
|
5813
5909
|
}
|
|
5814
5910
|
if (!i)
|
|
5815
5911
|
return null;
|
|
5816
|
-
const r = new
|
|
5912
|
+
const r = new oe();
|
|
5817
5913
|
return function(s) {
|
|
5818
5914
|
const a = i(s);
|
|
5819
|
-
return a ===
|
|
5915
|
+
return a === vi ? null : (r.setColor(a), r);
|
|
5820
5916
|
};
|
|
5821
5917
|
}
|
|
5822
|
-
function
|
|
5823
|
-
const i =
|
|
5918
|
+
function Ve(n, e, t) {
|
|
5919
|
+
const i = k(
|
|
5824
5920
|
n,
|
|
5825
5921
|
e + "stroke-width",
|
|
5826
5922
|
t
|
|
5827
|
-
), r =
|
|
5923
|
+
), r = ct(
|
|
5828
5924
|
n,
|
|
5829
5925
|
e + "stroke-color",
|
|
5830
5926
|
t
|
|
@@ -5839,46 +5935,46 @@ function Ke(n, e, t) {
|
|
|
5839
5935
|
n,
|
|
5840
5936
|
e + "stroke-line-join",
|
|
5841
5937
|
t
|
|
5842
|
-
), o =
|
|
5938
|
+
), o = Si(
|
|
5843
5939
|
n,
|
|
5844
5940
|
e + "stroke-line-dash",
|
|
5845
5941
|
t
|
|
5846
|
-
), l =
|
|
5942
|
+
), l = k(
|
|
5847
5943
|
n,
|
|
5848
5944
|
e + "stroke-line-dash-offset",
|
|
5849
5945
|
t
|
|
5850
|
-
), h =
|
|
5946
|
+
), h = k(
|
|
5851
5947
|
n,
|
|
5852
5948
|
e + "stroke-miter-limit",
|
|
5853
5949
|
t
|
|
5854
|
-
), c =
|
|
5950
|
+
), c = k(
|
|
5855
5951
|
n,
|
|
5856
5952
|
e + "stroke-offset",
|
|
5857
5953
|
t
|
|
5858
|
-
), d = new
|
|
5954
|
+
), d = new ge();
|
|
5859
5955
|
return function(f) {
|
|
5860
5956
|
if (r) {
|
|
5861
|
-
const
|
|
5862
|
-
if (
|
|
5957
|
+
const g = r(f);
|
|
5958
|
+
if (g === vi)
|
|
5863
5959
|
return null;
|
|
5864
|
-
d.setColor(
|
|
5960
|
+
d.setColor(g);
|
|
5865
5961
|
}
|
|
5866
5962
|
if (i && d.setWidth(i(f)), s) {
|
|
5867
|
-
const
|
|
5868
|
-
if (
|
|
5963
|
+
const g = s(f);
|
|
5964
|
+
if (g !== "butt" && g !== "round" && g !== "square")
|
|
5869
5965
|
throw new Error("Expected butt, round, or square line cap");
|
|
5870
|
-
d.setLineCap(
|
|
5966
|
+
d.setLineCap(g);
|
|
5871
5967
|
}
|
|
5872
5968
|
if (a) {
|
|
5873
|
-
const
|
|
5874
|
-
if (
|
|
5969
|
+
const g = a(f);
|
|
5970
|
+
if (g !== "bevel" && g !== "round" && g !== "miter")
|
|
5875
5971
|
throw new Error("Expected bevel, round, or miter line join");
|
|
5876
|
-
d.setLineJoin(
|
|
5972
|
+
d.setLineJoin(g);
|
|
5877
5973
|
}
|
|
5878
5974
|
return o && d.setLineDash(o(f)), l && d.setLineDashOffset(l(f)), h && d.setMiterLimit(h(f)), c && d.setOffset(c(f)), d;
|
|
5879
5975
|
};
|
|
5880
5976
|
}
|
|
5881
|
-
function
|
|
5977
|
+
function Br(n, e) {
|
|
5882
5978
|
const t = "text-", i = j(n, t + "value", e);
|
|
5883
5979
|
if (!i)
|
|
5884
5980
|
return null;
|
|
@@ -5886,196 +5982,196 @@ function zr(n, e) {
|
|
|
5886
5982
|
n,
|
|
5887
5983
|
t + "background-",
|
|
5888
5984
|
e
|
|
5889
|
-
), a =
|
|
5985
|
+
), a = Ve(n, t, e), o = Ve(
|
|
5890
5986
|
n,
|
|
5891
5987
|
t + "background-",
|
|
5892
5988
|
e
|
|
5893
|
-
), l = j(n, t + "font", e), h =
|
|
5989
|
+
), l = j(n, t + "font", e), h = k(
|
|
5894
5990
|
n,
|
|
5895
5991
|
t + "max-angle",
|
|
5896
5992
|
e
|
|
5897
|
-
), c =
|
|
5993
|
+
), c = k(
|
|
5898
5994
|
n,
|
|
5899
5995
|
t + "offset-x",
|
|
5900
5996
|
e
|
|
5901
|
-
), d =
|
|
5997
|
+
), d = k(
|
|
5902
5998
|
n,
|
|
5903
5999
|
t + "offset-y",
|
|
5904
6000
|
e
|
|
5905
|
-
), f =
|
|
6001
|
+
), f = Ce(
|
|
5906
6002
|
n,
|
|
5907
6003
|
t + "overflow",
|
|
5908
6004
|
e
|
|
5909
|
-
),
|
|
6005
|
+
), g = j(
|
|
5910
6006
|
n,
|
|
5911
6007
|
t + "placement",
|
|
5912
6008
|
e
|
|
5913
|
-
),
|
|
6009
|
+
), C = k(n, t + "repeat", e), O = ut(n, t + "scale", e), x = Ce(
|
|
5914
6010
|
n,
|
|
5915
6011
|
t + "rotate-with-view",
|
|
5916
6012
|
e
|
|
5917
|
-
),
|
|
6013
|
+
), M = k(
|
|
5918
6014
|
n,
|
|
5919
6015
|
t + "rotation",
|
|
5920
6016
|
e
|
|
5921
|
-
),
|
|
6017
|
+
), G = j(n, t + "align", e), S = j(
|
|
5922
6018
|
n,
|
|
5923
6019
|
t + "justify",
|
|
5924
6020
|
e
|
|
5925
|
-
),
|
|
6021
|
+
), w = j(
|
|
5926
6022
|
n,
|
|
5927
6023
|
t + "baseline",
|
|
5928
6024
|
e
|
|
5929
|
-
),
|
|
6025
|
+
), R = Ce(
|
|
5930
6026
|
n,
|
|
5931
6027
|
t + "keep-upright",
|
|
5932
6028
|
e
|
|
5933
|
-
),
|
|
6029
|
+
), V = Si(
|
|
5934
6030
|
n,
|
|
5935
6031
|
t + "padding",
|
|
5936
6032
|
e
|
|
5937
|
-
), q =
|
|
6033
|
+
), q = dt(
|
|
5938
6034
|
n,
|
|
5939
6035
|
t + "declutter-mode"
|
|
5940
|
-
),
|
|
6036
|
+
), L = new Nt({ declutterMode: q });
|
|
5941
6037
|
return function(E) {
|
|
5942
|
-
if (
|
|
5943
|
-
const p =
|
|
6038
|
+
if (L.setText(i(E)), r && L.setFill(r(E)), s && L.setBackgroundFill(s(E)), a && L.setStroke(a(E)), o && L.setBackgroundStroke(o(E)), l && L.setFont(l(E)), h && L.setMaxAngle(h(E)), c && L.setOffsetX(c(E)), d && L.setOffsetY(d(E)), f && L.setOverflow(f(E)), g) {
|
|
6039
|
+
const p = g(E);
|
|
5944
6040
|
if (p !== "point" && p !== "line")
|
|
5945
6041
|
throw new Error("Expected point or line for text-placement");
|
|
5946
|
-
|
|
6042
|
+
L.setPlacement(p);
|
|
5947
6043
|
}
|
|
5948
|
-
if (
|
|
5949
|
-
const p =
|
|
6044
|
+
if (C && L.setRepeat(C(E)), O && L.setScale(O(E)), x && L.setRotateWithView(x(E)), M && L.setRotation(M(E)), G) {
|
|
6045
|
+
const p = G(E);
|
|
5950
6046
|
if (p !== "left" && p !== "center" && p !== "right" && p !== "end" && p !== "start")
|
|
5951
6047
|
throw new Error(
|
|
5952
6048
|
"Expected left, right, center, start, or end for text-align"
|
|
5953
6049
|
);
|
|
5954
|
-
|
|
6050
|
+
L.setTextAlign(p);
|
|
5955
6051
|
}
|
|
5956
|
-
if (
|
|
5957
|
-
const p =
|
|
6052
|
+
if (S) {
|
|
6053
|
+
const p = S(E);
|
|
5958
6054
|
if (p !== "left" && p !== "right" && p !== "center")
|
|
5959
6055
|
throw new Error("Expected left, right, or center for text-justify");
|
|
5960
|
-
|
|
6056
|
+
L.setJustify(p);
|
|
5961
6057
|
}
|
|
5962
|
-
if (
|
|
5963
|
-
const p =
|
|
6058
|
+
if (w) {
|
|
6059
|
+
const p = w(E);
|
|
5964
6060
|
if (p !== "bottom" && p !== "top" && p !== "middle" && p !== "alphabetic" && p !== "hanging")
|
|
5965
6061
|
throw new Error(
|
|
5966
6062
|
"Expected bottom, top, middle, alphabetic, or hanging for text-baseline"
|
|
5967
6063
|
);
|
|
5968
|
-
|
|
6064
|
+
L.setTextBaseline(p);
|
|
5969
6065
|
}
|
|
5970
|
-
return
|
|
6066
|
+
return V && L.setPadding(V(E)), R && L.setKeepUpright(R(E)), L;
|
|
5971
6067
|
};
|
|
5972
6068
|
}
|
|
5973
|
-
function
|
|
5974
|
-
return "icon-src" in n ?
|
|
6069
|
+
function Gr(n, e) {
|
|
6070
|
+
return "icon-src" in n ? Wr(n, e) : "shape-points" in n ? Hr(n, e) : "circle-radius" in n ? $r(n, e) : null;
|
|
5975
6071
|
}
|
|
5976
|
-
function
|
|
5977
|
-
const t = "icon-", i = t + "src", r =
|
|
6072
|
+
function Wr(n, e) {
|
|
6073
|
+
const t = "icon-", i = t + "src", r = ki(n[i], i), s = rt(
|
|
5978
6074
|
n,
|
|
5979
6075
|
t + "anchor",
|
|
5980
6076
|
e
|
|
5981
|
-
), a =
|
|
6077
|
+
), a = ut(n, t + "scale", e), o = k(
|
|
5982
6078
|
n,
|
|
5983
6079
|
t + "opacity",
|
|
5984
6080
|
e
|
|
5985
|
-
), l =
|
|
6081
|
+
), l = rt(
|
|
5986
6082
|
n,
|
|
5987
6083
|
t + "displacement",
|
|
5988
6084
|
e
|
|
5989
|
-
), h =
|
|
6085
|
+
), h = k(
|
|
5990
6086
|
n,
|
|
5991
6087
|
t + "rotation",
|
|
5992
6088
|
e
|
|
5993
|
-
), c =
|
|
6089
|
+
), c = Ce(
|
|
5994
6090
|
n,
|
|
5995
6091
|
t + "rotate-with-view",
|
|
5996
6092
|
e
|
|
5997
|
-
), d =
|
|
6093
|
+
), d = hi(n, t + "anchor-origin"), f = ci(
|
|
5998
6094
|
n,
|
|
5999
6095
|
t + "anchor-x-units"
|
|
6000
|
-
),
|
|
6096
|
+
), g = ci(
|
|
6001
6097
|
n,
|
|
6002
6098
|
t + "anchor-y-units"
|
|
6003
|
-
),
|
|
6004
|
-
let
|
|
6005
|
-
|
|
6006
|
-
const
|
|
6099
|
+
), C = ee(n, t + "color");
|
|
6100
|
+
let O, x = null;
|
|
6101
|
+
C !== void 0 && (Array.isArray(C) && C.length > 0 && typeof C[0] == "string" ? x = ct(n, t + "color", e) : O = Ni(C, t + "color"));
|
|
6102
|
+
const M = Xr(n, t + "cross-origin"), G = qr(n, t + "offset"), S = hi(n, t + "offset-origin"), w = Lt(n, t + "width"), R = Lt(n, t + "height"), V = Ur(n, t + "size"), q = dt(
|
|
6007
6103
|
n,
|
|
6008
6104
|
t + "declutter-mode"
|
|
6009
|
-
),
|
|
6105
|
+
), L = {
|
|
6010
6106
|
src: r,
|
|
6011
6107
|
anchorOrigin: d,
|
|
6012
6108
|
anchorXUnits: f,
|
|
6013
|
-
anchorYUnits:
|
|
6014
|
-
crossOrigin:
|
|
6015
|
-
offset:
|
|
6016
|
-
offsetOrigin:
|
|
6017
|
-
height:
|
|
6018
|
-
width:
|
|
6019
|
-
size:
|
|
6109
|
+
anchorYUnits: g,
|
|
6110
|
+
crossOrigin: M,
|
|
6111
|
+
offset: G,
|
|
6112
|
+
offsetOrigin: S,
|
|
6113
|
+
height: R,
|
|
6114
|
+
width: w,
|
|
6115
|
+
size: V,
|
|
6020
6116
|
declutterMode: q
|
|
6021
6117
|
};
|
|
6022
6118
|
let E = null;
|
|
6023
6119
|
return function(p) {
|
|
6024
6120
|
if (E)
|
|
6025
|
-
|
|
6121
|
+
x && E.setColor(x(p));
|
|
6026
6122
|
else {
|
|
6027
|
-
const
|
|
6028
|
-
E = new
|
|
6029
|
-
|
|
6123
|
+
const Ye = x ? x(p) : O;
|
|
6124
|
+
E = new kt(
|
|
6125
|
+
Ye !== void 0 ? Object.assign({}, L, { color: Ye }) : Object.assign({}, L)
|
|
6030
6126
|
);
|
|
6031
6127
|
}
|
|
6032
6128
|
return o && E.setOpacity(o(p)), l && E.setDisplacement(l(p)), h && E.setRotation(h(p)), c && E.setRotateWithView(c(p)), a && E.setScale(a(p)), s && E.setAnchor(s(p)), E;
|
|
6033
6129
|
};
|
|
6034
6130
|
}
|
|
6035
|
-
function
|
|
6036
|
-
const t = "shape-", i = t + "points", r = t + "radius", s =
|
|
6131
|
+
function Hr(n, e) {
|
|
6132
|
+
const t = "shape-", i = t + "points", r = t + "radius", s = zt(n[i], i);
|
|
6037
6133
|
if (!(r in n))
|
|
6038
6134
|
throw new Error(`Expected a number for ${r}`);
|
|
6039
|
-
const a =
|
|
6135
|
+
const a = k(n, r, e), o = typeof n[r] == "number" ? n[r] : 5, l = t + "radius2", h = k(n, l, e), c = typeof n[l] == "number" ? n[l] : void 0, d = Fe(n, t, e), f = Ve(n, t, e), g = ut(n, t + "scale", e), C = rt(
|
|
6040
6136
|
n,
|
|
6041
6137
|
t + "displacement",
|
|
6042
6138
|
e
|
|
6043
|
-
),
|
|
6139
|
+
), O = k(
|
|
6044
6140
|
n,
|
|
6045
6141
|
t + "rotation",
|
|
6046
6142
|
e
|
|
6047
|
-
),
|
|
6143
|
+
), x = Ce(
|
|
6048
6144
|
n,
|
|
6049
6145
|
t + "rotate-with-view",
|
|
6050
6146
|
e
|
|
6051
|
-
),
|
|
6147
|
+
), M = Lt(n, t + "angle"), G = dt(
|
|
6052
6148
|
n,
|
|
6053
6149
|
t + "declutter-mode"
|
|
6054
|
-
),
|
|
6150
|
+
), S = new ht({
|
|
6055
6151
|
points: s,
|
|
6056
6152
|
radius: o,
|
|
6057
6153
|
radius2: c,
|
|
6058
|
-
angle:
|
|
6059
|
-
declutterMode:
|
|
6154
|
+
angle: M,
|
|
6155
|
+
declutterMode: G
|
|
6060
6156
|
});
|
|
6061
|
-
return function(
|
|
6062
|
-
return a &&
|
|
6157
|
+
return function(w) {
|
|
6158
|
+
return a && S.setRadius(a(w)), h && S.setRadius2(h(w)), d && S.setFill(d(w)), f && S.setStroke(f(w)), C && S.setDisplacement(C(w)), O && S.setRotation(O(w)), x && S.setRotateWithView(x(w)), g && S.setScale(g(w)), S;
|
|
6063
6159
|
};
|
|
6064
6160
|
}
|
|
6065
|
-
function
|
|
6066
|
-
const t = "circle-", i = Fe(n, t, e), r =
|
|
6161
|
+
function $r(n, e) {
|
|
6162
|
+
const t = "circle-", i = Fe(n, t, e), r = Ve(n, t, e), s = k(n, t + "radius", e), a = ut(n, t + "scale", e), o = rt(
|
|
6067
6163
|
n,
|
|
6068
6164
|
t + "displacement",
|
|
6069
6165
|
e
|
|
6070
|
-
), l =
|
|
6166
|
+
), l = k(
|
|
6071
6167
|
n,
|
|
6072
6168
|
t + "rotation",
|
|
6073
6169
|
e
|
|
6074
|
-
), h =
|
|
6170
|
+
), h = Ce(
|
|
6075
6171
|
n,
|
|
6076
6172
|
t + "rotate-with-view",
|
|
6077
6173
|
e
|
|
6078
|
-
), c =
|
|
6174
|
+
), c = dt(
|
|
6079
6175
|
n,
|
|
6080
6176
|
t + "declutter-mode"
|
|
6081
6177
|
), d = new He({
|
|
@@ -6087,44 +6183,44 @@ function Br(n, e) {
|
|
|
6087
6183
|
return s && d.setRadius(s(f)), i && d.setFill(i(f)), r && d.setStroke(r(f)), o && d.setDisplacement(o(f)), l && d.setRotation(l(f)), h && d.setRotateWithView(h(f)), a && d.setScale(a(f)), d;
|
|
6088
6184
|
};
|
|
6089
6185
|
}
|
|
6090
|
-
function
|
|
6186
|
+
function ee(n, e) {
|
|
6091
6187
|
if (!(e in n))
|
|
6092
6188
|
return;
|
|
6093
6189
|
const t = n[e];
|
|
6094
6190
|
return t === void 0 ? void 0 : t;
|
|
6095
6191
|
}
|
|
6096
|
-
function
|
|
6097
|
-
const i =
|
|
6192
|
+
function k(n, e, t) {
|
|
6193
|
+
const i = ee(n, e);
|
|
6098
6194
|
if (i === void 0)
|
|
6099
6195
|
return;
|
|
6100
6196
|
const r = Z(i, y, t);
|
|
6101
6197
|
return function(s) {
|
|
6102
|
-
return
|
|
6198
|
+
return zt(r(s), e);
|
|
6103
6199
|
};
|
|
6104
6200
|
}
|
|
6105
6201
|
function j(n, e, t) {
|
|
6106
|
-
const i =
|
|
6202
|
+
const i = ee(n, e);
|
|
6107
6203
|
if (i === void 0)
|
|
6108
6204
|
return null;
|
|
6109
|
-
const r = Z(i,
|
|
6205
|
+
const r = Z(i, F, t);
|
|
6110
6206
|
return function(s) {
|
|
6111
|
-
return
|
|
6207
|
+
return ki(r(s), e);
|
|
6112
6208
|
};
|
|
6113
6209
|
}
|
|
6114
|
-
function
|
|
6210
|
+
function Yr(n, e, t) {
|
|
6115
6211
|
const i = j(
|
|
6116
6212
|
n,
|
|
6117
6213
|
e + "pattern-src",
|
|
6118
6214
|
t
|
|
6119
|
-
), r =
|
|
6215
|
+
), r = li(
|
|
6120
6216
|
n,
|
|
6121
6217
|
e + "pattern-offset",
|
|
6122
6218
|
t
|
|
6123
|
-
), s =
|
|
6219
|
+
), s = li(
|
|
6124
6220
|
n,
|
|
6125
6221
|
e + "pattern-size",
|
|
6126
6222
|
t
|
|
6127
|
-
), a =
|
|
6223
|
+
), a = ct(
|
|
6128
6224
|
n,
|
|
6129
6225
|
e + "color",
|
|
6130
6226
|
t
|
|
@@ -6138,11 +6234,11 @@ function Gr(n, e, t) {
|
|
|
6138
6234
|
};
|
|
6139
6235
|
};
|
|
6140
6236
|
}
|
|
6141
|
-
function
|
|
6142
|
-
const i =
|
|
6237
|
+
function Ce(n, e, t) {
|
|
6238
|
+
const i = ee(n, e);
|
|
6143
6239
|
if (i === void 0)
|
|
6144
6240
|
return null;
|
|
6145
|
-
const r = Z(i,
|
|
6241
|
+
const r = Z(i, z, t);
|
|
6146
6242
|
return function(s) {
|
|
6147
6243
|
const a = r(s);
|
|
6148
6244
|
if (typeof a != "boolean")
|
|
@@ -6150,17 +6246,17 @@ function we(n, e, t) {
|
|
|
6150
6246
|
return a;
|
|
6151
6247
|
};
|
|
6152
6248
|
}
|
|
6153
|
-
function
|
|
6154
|
-
const i =
|
|
6249
|
+
function ct(n, e, t) {
|
|
6250
|
+
const i = ee(n, e);
|
|
6155
6251
|
if (i === void 0)
|
|
6156
6252
|
return null;
|
|
6157
|
-
const r = Z(i,
|
|
6253
|
+
const r = Z(i, K, t);
|
|
6158
6254
|
return function(s) {
|
|
6159
|
-
return
|
|
6255
|
+
return Ni(r(s), e);
|
|
6160
6256
|
};
|
|
6161
6257
|
}
|
|
6162
|
-
function
|
|
6163
|
-
const i =
|
|
6258
|
+
function Si(n, e, t) {
|
|
6259
|
+
const i = ee(n, e);
|
|
6164
6260
|
if (i === void 0)
|
|
6165
6261
|
return null;
|
|
6166
6262
|
if (Array.isArray(i) && (i.length === 0 || typeof i[0] != "string")) {
|
|
@@ -6169,7 +6265,7 @@ function Pi(n, e, t) {
|
|
|
6169
6265
|
return () => a;
|
|
6170
6266
|
const l = Z(a, y, t);
|
|
6171
6267
|
return function(h) {
|
|
6172
|
-
return
|
|
6268
|
+
return zt(l(h), `${e}[${o}]`);
|
|
6173
6269
|
};
|
|
6174
6270
|
});
|
|
6175
6271
|
return function(a) {
|
|
@@ -6179,43 +6275,43 @@ function Pi(n, e, t) {
|
|
|
6179
6275
|
return o;
|
|
6180
6276
|
};
|
|
6181
6277
|
}
|
|
6182
|
-
const r = Z(i,
|
|
6278
|
+
const r = Z(i, ae, t);
|
|
6183
6279
|
return function(s) {
|
|
6184
|
-
return
|
|
6280
|
+
return $e(r(s), e);
|
|
6185
6281
|
};
|
|
6186
6282
|
}
|
|
6187
|
-
function
|
|
6188
|
-
const i =
|
|
6283
|
+
function rt(n, e, t) {
|
|
6284
|
+
const i = ee(n, e);
|
|
6189
6285
|
if (i === void 0)
|
|
6190
6286
|
return null;
|
|
6191
|
-
const r = Z(i,
|
|
6287
|
+
const r = Z(i, ae, t);
|
|
6192
6288
|
return function(s) {
|
|
6193
|
-
const a =
|
|
6289
|
+
const a = $e(r(s), e);
|
|
6194
6290
|
if (a.length !== 2)
|
|
6195
6291
|
throw new Error(`Expected two numbers for ${e}`);
|
|
6196
6292
|
return a;
|
|
6197
6293
|
};
|
|
6198
6294
|
}
|
|
6199
|
-
function
|
|
6200
|
-
const i =
|
|
6295
|
+
function li(n, e, t) {
|
|
6296
|
+
const i = ee(n, e);
|
|
6201
6297
|
if (i === void 0)
|
|
6202
6298
|
return null;
|
|
6203
|
-
const r = Z(i,
|
|
6299
|
+
const r = Z(i, ae, t);
|
|
6204
6300
|
return function(s) {
|
|
6205
|
-
return
|
|
6301
|
+
return zi(r(s), e);
|
|
6206
6302
|
};
|
|
6207
6303
|
}
|
|
6208
|
-
function
|
|
6209
|
-
const i =
|
|
6304
|
+
function ut(n, e, t) {
|
|
6305
|
+
const i = ee(n, e);
|
|
6210
6306
|
if (i === void 0)
|
|
6211
6307
|
return null;
|
|
6212
6308
|
const r = Z(
|
|
6213
6309
|
i,
|
|
6214
|
-
|
|
6310
|
+
ae | y,
|
|
6215
6311
|
t
|
|
6216
6312
|
);
|
|
6217
6313
|
return function(s) {
|
|
6218
|
-
return
|
|
6314
|
+
return Zr(r(s), e);
|
|
6219
6315
|
};
|
|
6220
6316
|
}
|
|
6221
6317
|
function Lt(n, e) {
|
|
@@ -6226,11 +6322,11 @@ function Lt(n, e) {
|
|
|
6226
6322
|
return t;
|
|
6227
6323
|
}
|
|
6228
6324
|
}
|
|
6229
|
-
function
|
|
6325
|
+
function Ur(n, e) {
|
|
6230
6326
|
const t = n[e];
|
|
6231
6327
|
if (t !== void 0) {
|
|
6232
6328
|
if (typeof t == "number")
|
|
6233
|
-
return
|
|
6329
|
+
return Ae(t);
|
|
6234
6330
|
if (!Array.isArray(t))
|
|
6235
6331
|
throw new Error(`Expected a number or size array for ${e}`);
|
|
6236
6332
|
if (t.length !== 2 || typeof t[0] != "number" || typeof t[1] != "number")
|
|
@@ -6238,7 +6334,7 @@ function Wr(n, e) {
|
|
|
6238
6334
|
return t;
|
|
6239
6335
|
}
|
|
6240
6336
|
}
|
|
6241
|
-
function
|
|
6337
|
+
function Xr(n, e) {
|
|
6242
6338
|
const t = n[e];
|
|
6243
6339
|
if (t !== void 0) {
|
|
6244
6340
|
if (typeof t != "string")
|
|
@@ -6246,7 +6342,7 @@ function Hr(n, e) {
|
|
|
6246
6342
|
return t;
|
|
6247
6343
|
}
|
|
6248
6344
|
}
|
|
6249
|
-
function
|
|
6345
|
+
function hi(n, e) {
|
|
6250
6346
|
const t = n[e];
|
|
6251
6347
|
if (t !== void 0) {
|
|
6252
6348
|
if (t !== "bottom-left" && t !== "bottom-right" && t !== "top-left" && t !== "top-right")
|
|
@@ -6256,7 +6352,7 @@ function ri(n, e) {
|
|
|
6256
6352
|
return t;
|
|
6257
6353
|
}
|
|
6258
6354
|
}
|
|
6259
|
-
function
|
|
6355
|
+
function ci(n, e) {
|
|
6260
6356
|
const t = n[e];
|
|
6261
6357
|
if (t !== void 0) {
|
|
6262
6358
|
if (t !== "pixels" && t !== "fraction")
|
|
@@ -6264,12 +6360,12 @@ function si(n, e) {
|
|
|
6264
6360
|
return t;
|
|
6265
6361
|
}
|
|
6266
6362
|
}
|
|
6267
|
-
function
|
|
6363
|
+
function qr(n, e) {
|
|
6268
6364
|
const t = n[e];
|
|
6269
6365
|
if (t !== void 0)
|
|
6270
|
-
return
|
|
6366
|
+
return $e(t, e);
|
|
6271
6367
|
}
|
|
6272
|
-
function
|
|
6368
|
+
function dt(n, e) {
|
|
6273
6369
|
const t = n[e];
|
|
6274
6370
|
if (t !== void 0) {
|
|
6275
6371
|
if (typeof t != "string")
|
|
@@ -6279,7 +6375,7 @@ function ct(n, e) {
|
|
|
6279
6375
|
return t;
|
|
6280
6376
|
}
|
|
6281
6377
|
}
|
|
6282
|
-
function
|
|
6378
|
+
function $e(n, e) {
|
|
6283
6379
|
if (!Array.isArray(n))
|
|
6284
6380
|
throw new Error(`Expected an array for ${e}`);
|
|
6285
6381
|
const t = n.length;
|
|
@@ -6288,37 +6384,37 @@ function Ye(n, e) {
|
|
|
6288
6384
|
throw new Error(`Expected an array of numbers for ${e}`);
|
|
6289
6385
|
return n;
|
|
6290
6386
|
}
|
|
6291
|
-
function
|
|
6387
|
+
function ki(n, e) {
|
|
6292
6388
|
if (typeof n != "string")
|
|
6293
6389
|
throw new Error(`Expected a string for ${e}`);
|
|
6294
6390
|
return n;
|
|
6295
6391
|
}
|
|
6296
|
-
function
|
|
6392
|
+
function zt(n, e) {
|
|
6297
6393
|
if (typeof n != "number")
|
|
6298
6394
|
throw new Error(`Expected a number for ${e}`);
|
|
6299
6395
|
return n;
|
|
6300
6396
|
}
|
|
6301
|
-
function
|
|
6397
|
+
function Ni(n, e) {
|
|
6302
6398
|
if (typeof n == "string")
|
|
6303
6399
|
return n;
|
|
6304
|
-
const t =
|
|
6400
|
+
const t = $e(n, e), i = t.length;
|
|
6305
6401
|
if (i < 3 || i > 4)
|
|
6306
6402
|
throw new Error(`Expected a color with 3 or 4 values for ${e}`);
|
|
6307
6403
|
return t;
|
|
6308
6404
|
}
|
|
6309
|
-
function
|
|
6310
|
-
const t =
|
|
6405
|
+
function zi(n, e) {
|
|
6406
|
+
const t = $e(n, e);
|
|
6311
6407
|
if (t.length !== 2)
|
|
6312
6408
|
throw new Error(`Expected an array of two numbers for ${e}`);
|
|
6313
6409
|
return t;
|
|
6314
6410
|
}
|
|
6315
|
-
function
|
|
6316
|
-
return typeof n == "number" ? n :
|
|
6411
|
+
function Zr(n, e) {
|
|
6412
|
+
return typeof n == "number" ? n : zi(n, e);
|
|
6317
6413
|
}
|
|
6318
|
-
const
|
|
6414
|
+
const ui = {
|
|
6319
6415
|
RENDER_ORDER: "renderOrder"
|
|
6320
6416
|
};
|
|
6321
|
-
class
|
|
6417
|
+
class jr extends Rt {
|
|
6322
6418
|
/**
|
|
6323
6419
|
* @param {Options<FeatureType, VectorSourceType>} [options] Options.
|
|
6324
6420
|
*/
|
|
@@ -6364,7 +6460,7 @@ class $r extends Dt {
|
|
|
6364
6460
|
getRenderOrder() {
|
|
6365
6461
|
return (
|
|
6366
6462
|
/** @type {import("../render.js").OrderFunction|null|undefined} */
|
|
6367
|
-
this.get(
|
|
6463
|
+
this.get(ui.RENDER_ORDER)
|
|
6368
6464
|
);
|
|
6369
6465
|
}
|
|
6370
6466
|
/**
|
|
@@ -6406,14 +6502,14 @@ class $r extends Dt {
|
|
|
6406
6502
|
*/
|
|
6407
6503
|
renderDeclutter(e, t) {
|
|
6408
6504
|
const i = this.getDeclutter();
|
|
6409
|
-
i in e.declutter || (e.declutter[i] = new
|
|
6505
|
+
i in e.declutter || (e.declutter[i] = new Zn(9)), this.getRenderer().renderDeclutter(e, t);
|
|
6410
6506
|
}
|
|
6411
6507
|
/**
|
|
6412
6508
|
* @param {import("../render.js").OrderFunction|null|undefined} renderOrder
|
|
6413
6509
|
* Render order.
|
|
6414
6510
|
*/
|
|
6415
6511
|
setRenderOrder(e) {
|
|
6416
|
-
this.set(
|
|
6512
|
+
this.set(ui.RENDER_ORDER, e);
|
|
6417
6513
|
}
|
|
6418
6514
|
/**
|
|
6419
6515
|
* Set the style for features. This can be a single style object, an array
|
|
@@ -6437,9 +6533,9 @@ class $r extends Dt {
|
|
|
6437
6533
|
* @api
|
|
6438
6534
|
*/
|
|
6439
6535
|
setStyle(e) {
|
|
6440
|
-
this.style_ = e === void 0 ?
|
|
6441
|
-
const t =
|
|
6442
|
-
this.styleFunction_ = e === null ? void 0 :
|
|
6536
|
+
this.style_ = e === void 0 ? Mi : e;
|
|
6537
|
+
const t = Jr(e);
|
|
6538
|
+
this.styleFunction_ = e === null ? void 0 : kr(t), this.changed();
|
|
6443
6539
|
}
|
|
6444
6540
|
/**
|
|
6445
6541
|
* @param {boolean|string|number} declutter Declutter images and text.
|
|
@@ -6449,44 +6545,31 @@ class $r extends Dt {
|
|
|
6449
6545
|
this.declutter_ = e ? String(e) : void 0, this.changed();
|
|
6450
6546
|
}
|
|
6451
6547
|
}
|
|
6452
|
-
function
|
|
6548
|
+
function Jr(n) {
|
|
6453
6549
|
if (n === void 0)
|
|
6454
|
-
return
|
|
6550
|
+
return Mi;
|
|
6455
6551
|
if (!n)
|
|
6456
6552
|
return null;
|
|
6457
|
-
if (typeof n == "function" || n instanceof
|
|
6553
|
+
if (typeof n == "function" || n instanceof U)
|
|
6458
6554
|
return n;
|
|
6459
|
-
if (
|
|
6460
|
-
return ii([n]);
|
|
6461
|
-
if (n.length === 0)
|
|
6555
|
+
if (Array.isArray(n) && n.length === 0)
|
|
6462
6556
|
return [];
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
if (!(a instanceof $))
|
|
6557
|
+
if (Array.isArray(n) && n[0] instanceof U) {
|
|
6558
|
+
const t = n.length, i = new Array(t);
|
|
6559
|
+
for (let r = 0; r < t; ++r) {
|
|
6560
|
+
const s = n[r];
|
|
6561
|
+
if (!(s instanceof U))
|
|
6469
6562
|
throw new Error("Expected a list of style instances");
|
|
6470
|
-
r
|
|
6563
|
+
i[r] = s;
|
|
6471
6564
|
}
|
|
6472
|
-
return
|
|
6473
|
-
}
|
|
6474
|
-
if ("style" in t) {
|
|
6475
|
-
const r = new Array(e);
|
|
6476
|
-
for (let s = 0; s < e; ++s) {
|
|
6477
|
-
const a = n[s];
|
|
6478
|
-
if (!("style" in a))
|
|
6479
|
-
throw new Error("Expected a list of rules with a style property");
|
|
6480
|
-
r[s] = a;
|
|
6481
|
-
}
|
|
6482
|
-
return kr(r);
|
|
6565
|
+
return i;
|
|
6483
6566
|
}
|
|
6484
|
-
return
|
|
6485
|
-
/** @type {
|
|
6567
|
+
return Vr(
|
|
6568
|
+
/** @type {import("../style/flat.js").FlatStyleLike} */
|
|
6486
6569
|
n
|
|
6487
6570
|
);
|
|
6488
6571
|
}
|
|
6489
|
-
class
|
|
6572
|
+
class Qr extends _i {
|
|
6490
6573
|
/**
|
|
6491
6574
|
* @param {import("../Map.js").default} map Map.
|
|
6492
6575
|
*/
|
|
@@ -6499,7 +6582,7 @@ class qr extends ci {
|
|
|
6499
6582
|
* @param {import("../Map.js").FrameState} frameState Frame state.
|
|
6500
6583
|
*/
|
|
6501
6584
|
dispatchRenderEvent(e, t) {
|
|
6502
|
-
|
|
6585
|
+
W();
|
|
6503
6586
|
}
|
|
6504
6587
|
/**
|
|
6505
6588
|
* @param {import("../Map.js").FrameState} frameState FrameState.
|
|
@@ -6507,7 +6590,7 @@ class qr extends ci {
|
|
|
6507
6590
|
*/
|
|
6508
6591
|
calculateMatrices2D(e) {
|
|
6509
6592
|
const t = e.viewState, i = e.coordinateToPixelTransform, r = e.pixelToCoordinateTransform;
|
|
6510
|
-
|
|
6593
|
+
hn(
|
|
6511
6594
|
i,
|
|
6512
6595
|
e.size[0] / 2,
|
|
6513
6596
|
e.size[1] / 2,
|
|
@@ -6516,7 +6599,7 @@ class qr extends ci {
|
|
|
6516
6599
|
-t.rotation,
|
|
6517
6600
|
-t.center[0],
|
|
6518
6601
|
-t.center[1]
|
|
6519
|
-
),
|
|
6602
|
+
), cn(r, i);
|
|
6520
6603
|
}
|
|
6521
6604
|
/**
|
|
6522
6605
|
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
|
@@ -6536,44 +6619,44 @@ class qr extends ci {
|
|
|
6536
6619
|
forEachFeatureAtCoordinate(e, t, i, r, s, a, o, l) {
|
|
6537
6620
|
let h;
|
|
6538
6621
|
const c = t.viewState;
|
|
6539
|
-
function d(
|
|
6540
|
-
return s.call(a,
|
|
6622
|
+
function d(w, R, V, q) {
|
|
6623
|
+
return s.call(a, R, w ? V : null, q);
|
|
6541
6624
|
}
|
|
6542
|
-
const f = c.projection,
|
|
6625
|
+
const f = c.projection, g = Yi(e.slice(), f), C = [[0, 0]];
|
|
6543
6626
|
if (f.canWrapX() && r) {
|
|
6544
|
-
const
|
|
6545
|
-
|
|
6627
|
+
const w = f.getExtent(), R = Ui(w);
|
|
6628
|
+
C.push([-R, 0], [R, 0]);
|
|
6546
6629
|
}
|
|
6547
|
-
const
|
|
6630
|
+
const O = t.layerStatesArray, x = O.length, M = (
|
|
6548
6631
|
/** @type {Array<HitMatch<T>>} */
|
|
6549
6632
|
[]
|
|
6550
|
-
),
|
|
6551
|
-
for (let
|
|
6552
|
-
for (let
|
|
6553
|
-
const
|
|
6554
|
-
if (q.hasRenderer() &&
|
|
6555
|
-
const
|
|
6556
|
-
if (
|
|
6557
|
-
const p = E.getWrapX() ?
|
|
6633
|
+
), G = [];
|
|
6634
|
+
for (let w = 0; w < C.length; w++)
|
|
6635
|
+
for (let R = x - 1; R >= 0; --R) {
|
|
6636
|
+
const V = O[R], q = V.layer;
|
|
6637
|
+
if (q.hasRenderer() && Ci(V, c) && o.call(l, q)) {
|
|
6638
|
+
const L = q.getRenderer(), E = q.getSource();
|
|
6639
|
+
if (L && E) {
|
|
6640
|
+
const p = E.getWrapX() ? g : e, Ye = d.bind(
|
|
6558
6641
|
null,
|
|
6559
|
-
|
|
6642
|
+
V.managed
|
|
6560
6643
|
);
|
|
6561
|
-
|
|
6562
|
-
|
|
6644
|
+
G[0] = p[0] + C[w][0], G[1] = p[1] + C[w][1], h = L.forEachFeatureAtCoordinate(
|
|
6645
|
+
G,
|
|
6563
6646
|
t,
|
|
6564
6647
|
i,
|
|
6565
|
-
|
|
6566
|
-
|
|
6648
|
+
Ye,
|
|
6649
|
+
M
|
|
6567
6650
|
);
|
|
6568
6651
|
}
|
|
6569
6652
|
if (h)
|
|
6570
6653
|
return h;
|
|
6571
6654
|
}
|
|
6572
6655
|
}
|
|
6573
|
-
if (
|
|
6656
|
+
if (M.length === 0)
|
|
6574
6657
|
return;
|
|
6575
|
-
const
|
|
6576
|
-
return
|
|
6658
|
+
const S = 1 / M.length;
|
|
6659
|
+
return M.forEach((w, R) => w.distanceSq += R * S), M.sort((w, R) => w.distanceSq - R.distanceSq), M.some((w) => h = w.callback(w.feature, w.layer, w.geometry)), h;
|
|
6577
6660
|
}
|
|
6578
6661
|
/**
|
|
6579
6662
|
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
|
@@ -6612,32 +6695,32 @@ class qr extends ci {
|
|
|
6612
6695
|
* @param {?import("../Map.js").FrameState} frameState Frame state.
|
|
6613
6696
|
*/
|
|
6614
6697
|
renderFrame(e) {
|
|
6615
|
-
|
|
6698
|
+
W();
|
|
6616
6699
|
}
|
|
6617
6700
|
/**
|
|
6618
6701
|
* @param {import("../Map.js").FrameState} frameState Frame state.
|
|
6619
6702
|
* @protected
|
|
6620
6703
|
*/
|
|
6621
6704
|
scheduleExpireIconCache(e) {
|
|
6622
|
-
|
|
6705
|
+
$.canExpireCache() && e.postRenderFunctions.push(es);
|
|
6623
6706
|
}
|
|
6624
6707
|
}
|
|
6625
|
-
function
|
|
6626
|
-
|
|
6708
|
+
function es(n, e) {
|
|
6709
|
+
$.expire();
|
|
6627
6710
|
}
|
|
6628
|
-
class
|
|
6711
|
+
class ts extends Qr {
|
|
6629
6712
|
/**
|
|
6630
6713
|
* @param {import("../Map.js").default} map Map.
|
|
6631
6714
|
*/
|
|
6632
6715
|
constructor(e) {
|
|
6633
6716
|
super(e), this.fontChangeListenerKey_ = D(
|
|
6634
|
-
|
|
6717
|
+
ve,
|
|
6635
6718
|
et.PROPERTYCHANGE,
|
|
6636
6719
|
e.redrawText,
|
|
6637
6720
|
e
|
|
6638
|
-
), this.element_ =
|
|
6721
|
+
), this.element_ = ue ? rn() : document.createElement("div");
|
|
6639
6722
|
const t = this.element_.style;
|
|
6640
|
-
t.position = "absolute", t.width = "100%", t.height = "100%", t.zIndex = "0", this.element_.className =
|
|
6723
|
+
t.position = "absolute", t.width = "100%", t.height = "100%", t.zIndex = "0", this.element_.className = ot + " ol-layers";
|
|
6641
6724
|
const i = e.getViewport();
|
|
6642
6725
|
i && i.insertBefore(this.element_, i.firstChild || null), this.children_ = [], this.renderedVisible_ = !0;
|
|
6643
6726
|
}
|
|
@@ -6649,7 +6732,7 @@ class jr extends qr {
|
|
|
6649
6732
|
dispatchRenderEvent(e, t) {
|
|
6650
6733
|
const i = this.getMap();
|
|
6651
6734
|
if (i.hasListener(e)) {
|
|
6652
|
-
const r = new
|
|
6735
|
+
const r = new yn(e, void 0, t);
|
|
6653
6736
|
i.dispatchEvent(r);
|
|
6654
6737
|
}
|
|
6655
6738
|
}
|
|
@@ -6657,7 +6740,7 @@ class jr extends qr {
|
|
|
6657
6740
|
* @override
|
|
6658
6741
|
*/
|
|
6659
6742
|
disposeInternal() {
|
|
6660
|
-
|
|
6743
|
+
B(this.fontChangeListenerKey_), this.element_.remove(), super.disposeInternal();
|
|
6661
6744
|
}
|
|
6662
6745
|
/**
|
|
6663
6746
|
* Render.
|
|
@@ -6671,49 +6754,54 @@ class jr extends qr {
|
|
|
6671
6754
|
}
|
|
6672
6755
|
this.calculateMatrices2D(e), this.dispatchRenderEvent(Se.PRECOMPOSE, e);
|
|
6673
6756
|
const t = e.layerStatesArray.sort(
|
|
6674
|
-
(
|
|
6757
|
+
(c, d) => c.zIndex - d.zIndex
|
|
6675
6758
|
);
|
|
6676
6759
|
t.some(
|
|
6677
|
-
(
|
|
6760
|
+
(c) => c.layer instanceof jr && c.layer.getDeclutter()
|
|
6678
6761
|
) && (e.declutter = {});
|
|
6679
6762
|
const r = e.viewState;
|
|
6680
6763
|
this.children_.length = 0;
|
|
6681
|
-
const
|
|
6682
|
-
let
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6764
|
+
const a = this.getMap().getTargetElement();
|
|
6765
|
+
let o;
|
|
6766
|
+
se(a) && (o = /** @type {CanvasRenderingContext2D} */
|
|
6767
|
+
a.getContext("2d"), o.setTransform(1, 0, 0, 1, 0, 0), o.clearRect(0, 0, a.width, a.height));
|
|
6768
|
+
const l = [];
|
|
6769
|
+
let h = o ? a : null;
|
|
6770
|
+
for (let c = 0, d = t.length; c < d; ++c) {
|
|
6771
|
+
const f = t[c];
|
|
6772
|
+
e.layerIndex = c;
|
|
6773
|
+
const g = f.layer, C = g.getSourceState();
|
|
6774
|
+
if (!Ci(f, r) || C != "ready" && C != "undefined") {
|
|
6775
|
+
g.unrender();
|
|
6689
6776
|
continue;
|
|
6690
6777
|
}
|
|
6691
|
-
const
|
|
6692
|
-
|
|
6778
|
+
const O = g.render(e, h);
|
|
6779
|
+
O && (O !== h && (this.children_.push(O), h = O), l.push(f));
|
|
6693
6780
|
}
|
|
6694
|
-
this.declutter(e,
|
|
6695
|
-
const
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6781
|
+
this.declutter(e, l), sn(this.element_, this.children_);
|
|
6782
|
+
for (const c of o ? this.children_ : []) {
|
|
6783
|
+
const d = c.firstElementChild || c, f = c.style.backgroundColor;
|
|
6784
|
+
if (f && (!se(d) || d.width > 0) && (o.fillStyle = f, o.fillRect(
|
|
6785
|
+
0,
|
|
6786
|
+
0,
|
|
6787
|
+
o.canvas.width,
|
|
6788
|
+
o.canvas.height
|
|
6789
|
+
)), !se(d) || d.width === 0)
|
|
6790
|
+
continue;
|
|
6791
|
+
o.save();
|
|
6792
|
+
const g = c.style.opacity || d.style.opacity;
|
|
6793
|
+
o.globalAlpha = g === "" ? 1 : Number(g);
|
|
6794
|
+
const C = d.style.transform;
|
|
6795
|
+
if (C)
|
|
6796
|
+
o.transform(
|
|
6797
|
+
.../** @type {[number, number, number, number, number, number]} */
|
|
6798
|
+
un(C)
|
|
6799
|
+
);
|
|
6800
|
+
else {
|
|
6801
|
+
const O = parseFloat(d.style.width) / d.width, x = parseFloat(d.style.height) / d.height;
|
|
6802
|
+
o.transform(O, 0, 0, x, 0, 0);
|
|
6716
6803
|
}
|
|
6804
|
+
o.drawImage(d, 0, 0), o.restore();
|
|
6717
6805
|
}
|
|
6718
6806
|
this.dispatchRenderEvent(Se.POSTCOMPOSE, e), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(e);
|
|
6719
6807
|
}
|
|
@@ -6733,45 +6821,45 @@ class jr extends qr {
|
|
|
6733
6821
|
}
|
|
6734
6822
|
}
|
|
6735
6823
|
}
|
|
6736
|
-
function
|
|
6737
|
-
if (n instanceof
|
|
6824
|
+
function Fi(n) {
|
|
6825
|
+
if (n instanceof Rt) {
|
|
6738
6826
|
n.setMapInternal(null);
|
|
6739
6827
|
return;
|
|
6740
6828
|
}
|
|
6741
|
-
n instanceof
|
|
6829
|
+
n instanceof Ie && n.getLayers().forEach(Fi);
|
|
6742
6830
|
}
|
|
6743
|
-
function
|
|
6744
|
-
if (n instanceof
|
|
6831
|
+
function Vi(n, e) {
|
|
6832
|
+
if (n instanceof Rt) {
|
|
6745
6833
|
n.setMapInternal(e);
|
|
6746
6834
|
return;
|
|
6747
6835
|
}
|
|
6748
|
-
if (n instanceof
|
|
6836
|
+
if (n instanceof Ie) {
|
|
6749
6837
|
const t = n.getLayers().getArray();
|
|
6750
6838
|
for (let i = 0, r = t.length; i < r; ++i)
|
|
6751
|
-
|
|
6839
|
+
Vi(t[i], e);
|
|
6752
6840
|
}
|
|
6753
6841
|
}
|
|
6754
|
-
class
|
|
6842
|
+
let is = class extends st {
|
|
6755
6843
|
/**
|
|
6756
6844
|
* @param {MapOptions} [options] Map options.
|
|
6757
6845
|
*/
|
|
6758
6846
|
constructor(e) {
|
|
6759
6847
|
super(), e = e || {}, this.on, this.once, this.un;
|
|
6760
|
-
const t =
|
|
6761
|
-
this.renderComplete_ = !1, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = e.maxTilesLoading !== void 0 ? e.maxTilesLoading : 16, this.pixelRatio_ = e.pixelRatio !== void 0 ? e.pixelRatio :
|
|
6848
|
+
const t = ns(e);
|
|
6849
|
+
this.renderComplete_ = !1, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = e.maxTilesLoading !== void 0 ? e.maxTilesLoading : 16, this.pixelRatio_ = e.pixelRatio !== void 0 ? e.pixelRatio : an, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Ht(), this.pixelToCoordinateTransform_ = Ht(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, ue || (this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_)), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = e.moveTolerance, this.keyboardEventTarget_ = t.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.targetElement_ = null, ue || (this.resizeObserver_ = new ResizeObserver(() => this.updateSize())), this.controls = t.controls || (ue ? new Y() : Ln()), this.interactions = t.interactions || (ue ? new Y() : Xn({
|
|
6762
6850
|
onFocusOnly: !0
|
|
6763
|
-
})), this.overlays_ = t.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new
|
|
6851
|
+
})), this.overlays_ = t.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new wn(
|
|
6764
6852
|
this.getTilePriority.bind(this),
|
|
6765
6853
|
this.handleTileChange_.bind(this)
|
|
6766
6854
|
), this.addChangeListener(
|
|
6767
|
-
|
|
6855
|
+
N.LAYERGROUP,
|
|
6768
6856
|
this.handleLayerGroupChanged_
|
|
6769
|
-
), this.addChangeListener(
|
|
6857
|
+
), this.addChangeListener(N.VIEW, this.handleViewChanged_), this.addChangeListener(N.SIZE, this.handleSizeChanged_), this.addChangeListener(N.TARGET, this.handleTargetChanged_), this.setProperties(t.values);
|
|
6770
6858
|
const i = this;
|
|
6771
|
-
e.view && !(e.view instanceof
|
|
6772
|
-
i.setView(new
|
|
6859
|
+
e.view && !(e.view instanceof ce) && e.view.then(function(r) {
|
|
6860
|
+
i.setView(new ce(r));
|
|
6773
6861
|
}), this.controls.addEventListener(
|
|
6774
|
-
|
|
6862
|
+
H.ADD,
|
|
6775
6863
|
/**
|
|
6776
6864
|
* @param {import("./Collection.js").CollectionEvent<import("./control/Control.js").default>} event CollectionEvent
|
|
6777
6865
|
*/
|
|
@@ -6779,7 +6867,7 @@ class Jr extends nt {
|
|
|
6779
6867
|
r.element.setMap(this);
|
|
6780
6868
|
}
|
|
6781
6869
|
), this.controls.addEventListener(
|
|
6782
|
-
|
|
6870
|
+
H.REMOVE,
|
|
6783
6871
|
/**
|
|
6784
6872
|
* @param {import("./Collection.js").CollectionEvent<import("./control/Control.js").default>} event CollectionEvent.
|
|
6785
6873
|
*/
|
|
@@ -6787,7 +6875,7 @@ class Jr extends nt {
|
|
|
6787
6875
|
r.element.setMap(null);
|
|
6788
6876
|
}
|
|
6789
6877
|
), this.interactions.addEventListener(
|
|
6790
|
-
|
|
6878
|
+
H.ADD,
|
|
6791
6879
|
/**
|
|
6792
6880
|
* @param {import("./Collection.js").CollectionEvent<import("./interaction/Interaction.js").default>} event CollectionEvent.
|
|
6793
6881
|
*/
|
|
@@ -6795,7 +6883,7 @@ class Jr extends nt {
|
|
|
6795
6883
|
r.element.setMap(this);
|
|
6796
6884
|
}
|
|
6797
6885
|
), this.interactions.addEventListener(
|
|
6798
|
-
|
|
6886
|
+
H.REMOVE,
|
|
6799
6887
|
/**
|
|
6800
6888
|
* @param {import("./Collection.js").CollectionEvent<import("./interaction/Interaction.js").default>} event CollectionEvent.
|
|
6801
6889
|
*/
|
|
@@ -6803,7 +6891,7 @@ class Jr extends nt {
|
|
|
6803
6891
|
r.element.setMap(null);
|
|
6804
6892
|
}
|
|
6805
6893
|
), this.overlays_.addEventListener(
|
|
6806
|
-
|
|
6894
|
+
H.ADD,
|
|
6807
6895
|
/**
|
|
6808
6896
|
* @param {import("./Collection.js").CollectionEvent<import("./Overlay.js").default>} event CollectionEvent.
|
|
6809
6897
|
*/
|
|
@@ -6811,7 +6899,7 @@ class Jr extends nt {
|
|
|
6811
6899
|
this.addOverlayInternal_(r.element);
|
|
6812
6900
|
}
|
|
6813
6901
|
), this.overlays_.addEventListener(
|
|
6814
|
-
|
|
6902
|
+
H.REMOVE,
|
|
6815
6903
|
/**
|
|
6816
6904
|
* @param {import("./Collection.js").CollectionEvent<import("./Overlay.js").default>} event CollectionEvent.
|
|
6817
6905
|
*/
|
|
@@ -6870,7 +6958,7 @@ class Jr extends nt {
|
|
|
6870
6958
|
* @private
|
|
6871
6959
|
*/
|
|
6872
6960
|
handleLayerAdd_(e) {
|
|
6873
|
-
|
|
6961
|
+
Vi(e.layer, this);
|
|
6874
6962
|
}
|
|
6875
6963
|
/**
|
|
6876
6964
|
* Add the given overlay to the map.
|
|
@@ -6965,7 +7053,7 @@ class Jr extends nt {
|
|
|
6965
7053
|
const e = [];
|
|
6966
7054
|
function t(i) {
|
|
6967
7055
|
i.forEach(function(r) {
|
|
6968
|
-
r instanceof
|
|
7056
|
+
r instanceof Ie ? t(r.getLayers()) : e.push(r);
|
|
6969
7057
|
});
|
|
6970
7058
|
}
|
|
6971
7059
|
return t(this.getLayers()), e;
|
|
@@ -7047,7 +7135,7 @@ class Jr extends nt {
|
|
|
7047
7135
|
getTarget() {
|
|
7048
7136
|
return (
|
|
7049
7137
|
/** @type {HTMLElement|string|undefined} */
|
|
7050
|
-
this.get(
|
|
7138
|
+
this.get(N.TARGET)
|
|
7051
7139
|
);
|
|
7052
7140
|
}
|
|
7053
7141
|
/**
|
|
@@ -7068,7 +7156,7 @@ class Jr extends nt {
|
|
|
7068
7156
|
* @api
|
|
7069
7157
|
*/
|
|
7070
7158
|
getCoordinateFromPixel(e) {
|
|
7071
|
-
return
|
|
7159
|
+
return Xi(
|
|
7072
7160
|
this.getCoordinateFromPixelInternal(e),
|
|
7073
7161
|
this.getView().getProjection()
|
|
7074
7162
|
);
|
|
@@ -7081,7 +7169,7 @@ class Jr extends nt {
|
|
|
7081
7169
|
*/
|
|
7082
7170
|
getCoordinateFromPixelInternal(e) {
|
|
7083
7171
|
const t = this.frameState_;
|
|
7084
|
-
return t ?
|
|
7172
|
+
return t ? $t(t.pixelToCoordinateTransform, e.slice()) : null;
|
|
7085
7173
|
}
|
|
7086
7174
|
/**
|
|
7087
7175
|
* Get the map controls. Modifying this collection changes the controls
|
|
@@ -7133,7 +7221,7 @@ class Jr extends nt {
|
|
|
7133
7221
|
getLayerGroup() {
|
|
7134
7222
|
return (
|
|
7135
7223
|
/** @type {LayerGroup} */
|
|
7136
|
-
this.get(
|
|
7224
|
+
this.get(N.LAYERGROUP)
|
|
7137
7225
|
);
|
|
7138
7226
|
}
|
|
7139
7227
|
/**
|
|
@@ -7143,7 +7231,7 @@ class Jr extends nt {
|
|
|
7143
7231
|
*/
|
|
7144
7232
|
setLayers(e) {
|
|
7145
7233
|
const t = this.getLayerGroup();
|
|
7146
|
-
if (e instanceof
|
|
7234
|
+
if (e instanceof Y) {
|
|
7147
7235
|
t.setLayers(e);
|
|
7148
7236
|
return;
|
|
7149
7237
|
}
|
|
@@ -7184,7 +7272,7 @@ class Jr extends nt {
|
|
|
7184
7272
|
* @api
|
|
7185
7273
|
*/
|
|
7186
7274
|
getPixelFromCoordinate(e) {
|
|
7187
|
-
const t =
|
|
7275
|
+
const t = qi(
|
|
7188
7276
|
e,
|
|
7189
7277
|
this.getView().getProjection()
|
|
7190
7278
|
);
|
|
@@ -7198,7 +7286,7 @@ class Jr extends nt {
|
|
|
7198
7286
|
*/
|
|
7199
7287
|
getPixelFromCoordinateInternal(e) {
|
|
7200
7288
|
const t = this.frameState_;
|
|
7201
|
-
return t ?
|
|
7289
|
+
return t ? $t(
|
|
7202
7290
|
t.coordinateToPixelTransform,
|
|
7203
7291
|
e.slice(0, 2)
|
|
7204
7292
|
) : null;
|
|
@@ -7235,7 +7323,7 @@ class Jr extends nt {
|
|
|
7235
7323
|
getSize() {
|
|
7236
7324
|
return (
|
|
7237
7325
|
/** @type {import("./size.js").Size|undefined} */
|
|
7238
|
-
this.get(
|
|
7326
|
+
this.get(N.SIZE)
|
|
7239
7327
|
);
|
|
7240
7328
|
}
|
|
7241
7329
|
/**
|
|
@@ -7248,7 +7336,7 @@ class Jr extends nt {
|
|
|
7248
7336
|
getView() {
|
|
7249
7337
|
return (
|
|
7250
7338
|
/** @type {View} */
|
|
7251
|
-
this.get(
|
|
7339
|
+
this.get(N.VIEW)
|
|
7252
7340
|
);
|
|
7253
7341
|
}
|
|
7254
7342
|
/**
|
|
@@ -7294,7 +7382,7 @@ class Jr extends nt {
|
|
|
7294
7382
|
* @return {number} Tile priority.
|
|
7295
7383
|
*/
|
|
7296
7384
|
getTilePriority(e, t, i, r) {
|
|
7297
|
-
return
|
|
7385
|
+
return vn(
|
|
7298
7386
|
this.frameState_,
|
|
7299
7387
|
e,
|
|
7300
7388
|
t,
|
|
@@ -7308,7 +7396,7 @@ class Jr extends nt {
|
|
|
7308
7396
|
*/
|
|
7309
7397
|
handleBrowserEvent(e, t) {
|
|
7310
7398
|
t = t || e.type;
|
|
7311
|
-
const i = new
|
|
7399
|
+
const i = new ne(t, this, e);
|
|
7312
7400
|
this.handleMapBrowserEvent(i);
|
|
7313
7401
|
}
|
|
7314
7402
|
/**
|
|
@@ -7318,7 +7406,7 @@ class Jr extends nt {
|
|
|
7318
7406
|
if (!this.frameState_)
|
|
7319
7407
|
return;
|
|
7320
7408
|
const t = e.originalEvent, i = t.type;
|
|
7321
|
-
if (i ===
|
|
7409
|
+
if (i === vt.POINTERDOWN || i === A.WHEEL || i === A.KEYDOWN) {
|
|
7322
7410
|
const r = this.getOwnerDocument(), s = this.viewport_.getRootNode ? this.viewport_.getRootNode() : r, a = (
|
|
7323
7411
|
/** @type {Node} */
|
|
7324
7412
|
t.target
|
|
@@ -7363,9 +7451,9 @@ class Jr extends nt {
|
|
|
7363
7451
|
Se.RENDERCOMPLETE,
|
|
7364
7452
|
e
|
|
7365
7453
|
), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent(
|
|
7366
|
-
new
|
|
7454
|
+
new Ee(le.LOADEND, this, e)
|
|
7367
7455
|
))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent(
|
|
7368
|
-
new
|
|
7456
|
+
new Ee(le.LOADSTART, this, e)
|
|
7369
7457
|
)));
|
|
7370
7458
|
const i = this.postRenderFunctions_;
|
|
7371
7459
|
if (e)
|
|
@@ -7385,16 +7473,16 @@ class Jr extends nt {
|
|
|
7385
7473
|
handleTargetChanged_() {
|
|
7386
7474
|
if (this.mapBrowserEventHandler_) {
|
|
7387
7475
|
for (let i = 0, r = this.targetChangeHandlerKeys_.length; i < r; ++i)
|
|
7388
|
-
|
|
7476
|
+
B(this.targetChangeHandlerKeys_[i]);
|
|
7389
7477
|
this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener(
|
|
7390
|
-
|
|
7478
|
+
A.CONTEXTMENU,
|
|
7391
7479
|
this.boundHandleBrowserEvent_
|
|
7392
7480
|
), this.viewport_.removeEventListener(
|
|
7393
|
-
|
|
7481
|
+
A.WHEEL,
|
|
7394
7482
|
this.boundHandleBrowserEvent_
|
|
7395
7483
|
), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, this.viewport_.remove();
|
|
7396
7484
|
}
|
|
7397
|
-
if (this.targetElement_ && !
|
|
7485
|
+
if (this.targetElement_ && !se(this.targetElement_)) {
|
|
7398
7486
|
this.resizeObserver_?.unobserve(this.targetElement_);
|
|
7399
7487
|
const i = this.targetElement_.getRootNode();
|
|
7400
7488
|
i instanceof ShadowRoot && this.resizeObserver_.unobserve(i.host), this.setSize(void 0);
|
|
@@ -7403,8 +7491,8 @@ class Jr extends nt {
|
|
|
7403
7491
|
if (this.targetElement_ = t, !t)
|
|
7404
7492
|
this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0);
|
|
7405
7493
|
else {
|
|
7406
|
-
if (
|
|
7407
|
-
this.mapBrowserEventHandler_ = new
|
|
7494
|
+
if (se(t) || t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new ts(this)), !se(t)) {
|
|
7495
|
+
this.mapBrowserEventHandler_ = new pn(
|
|
7408
7496
|
this,
|
|
7409
7497
|
this.moveTolerance_
|
|
7410
7498
|
);
|
|
@@ -7414,13 +7502,13 @@ class Jr extends nt {
|
|
|
7414
7502
|
this.handleMapBrowserEvent.bind(this)
|
|
7415
7503
|
);
|
|
7416
7504
|
this.viewport_.addEventListener(
|
|
7417
|
-
|
|
7505
|
+
A.CONTEXTMENU,
|
|
7418
7506
|
this.boundHandleBrowserEvent_,
|
|
7419
7507
|
!1
|
|
7420
7508
|
), this.viewport_.addEventListener(
|
|
7421
|
-
|
|
7509
|
+
A.WHEEL,
|
|
7422
7510
|
this.boundHandleBrowserEvent_,
|
|
7423
|
-
|
|
7511
|
+
mi ? { passive: !1 } : !1
|
|
7424
7512
|
);
|
|
7425
7513
|
let i;
|
|
7426
7514
|
if (this.keyboardEventTarget_)
|
|
@@ -7432,17 +7520,17 @@ class Jr extends nt {
|
|
|
7432
7520
|
if (this.targetChangeHandlerKeys_ = [
|
|
7433
7521
|
D(
|
|
7434
7522
|
i,
|
|
7435
|
-
|
|
7523
|
+
A.KEYDOWN,
|
|
7436
7524
|
this.handleBrowserEvent,
|
|
7437
7525
|
this
|
|
7438
7526
|
),
|
|
7439
7527
|
D(
|
|
7440
7528
|
i,
|
|
7441
|
-
|
|
7529
|
+
A.KEYPRESS,
|
|
7442
7530
|
this.handleBrowserEvent,
|
|
7443
7531
|
this
|
|
7444
7532
|
)
|
|
7445
|
-
], t
|
|
7533
|
+
], !se(t)) {
|
|
7446
7534
|
const r = t.getRootNode();
|
|
7447
7535
|
r instanceof ShadowRoot && this.resizeObserver_.observe(r.host), this.resizeObserver_?.observe(t);
|
|
7448
7536
|
}
|
|
@@ -7466,7 +7554,7 @@ class Jr extends nt {
|
|
|
7466
7554
|
* @private
|
|
7467
7555
|
*/
|
|
7468
7556
|
handleViewChanged_() {
|
|
7469
|
-
this.viewPropertyListenerKey_ && (
|
|
7557
|
+
this.viewPropertyListenerKey_ && (B(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (B(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null);
|
|
7470
7558
|
const e = this.getView();
|
|
7471
7559
|
e && (this.updateViewportSize_(this.getSize()), this.viewPropertyListenerKey_ = D(
|
|
7472
7560
|
e,
|
|
@@ -7475,7 +7563,7 @@ class Jr extends nt {
|
|
|
7475
7563
|
this
|
|
7476
7564
|
), this.viewChangeListenerKey_ = D(
|
|
7477
7565
|
e,
|
|
7478
|
-
|
|
7566
|
+
A.CHANGE,
|
|
7479
7567
|
this.handleViewPropertyChanged_,
|
|
7480
7568
|
this
|
|
7481
7569
|
), e.resolveConstraints(0)), this.render();
|
|
@@ -7484,11 +7572,11 @@ class Jr extends nt {
|
|
|
7484
7572
|
* @private
|
|
7485
7573
|
*/
|
|
7486
7574
|
handleLayerGroupChanged_() {
|
|
7487
|
-
this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(
|
|
7575
|
+
this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(B), this.layerGroupPropertyListenerKeys_ = null);
|
|
7488
7576
|
const e = this.getLayerGroup();
|
|
7489
|
-
e && (this.handleLayerAdd_(new
|
|
7577
|
+
e && (this.handleLayerAdd_(new re("addlayer", e)), this.layerGroupPropertyListenerKeys_ = [
|
|
7490
7578
|
D(e, et.PROPERTYCHANGE, this.render, this),
|
|
7491
|
-
D(e,
|
|
7579
|
+
D(e, A.CHANGE, this.render, this),
|
|
7492
7580
|
D(e, "addlayer", this.handleLayerAdd_, this),
|
|
7493
7581
|
D(e, "removelayer", this.handleLayerRemove_, this)
|
|
7494
7582
|
]), this.render();
|
|
@@ -7566,7 +7654,7 @@ class Jr extends nt {
|
|
|
7566
7654
|
* @private
|
|
7567
7655
|
*/
|
|
7568
7656
|
handleLayerRemove_(e) {
|
|
7569
|
-
|
|
7657
|
+
Fi(e.layer);
|
|
7570
7658
|
}
|
|
7571
7659
|
/**
|
|
7572
7660
|
* Remove the given overlay from the map.
|
|
@@ -7585,7 +7673,7 @@ class Jr extends nt {
|
|
|
7585
7673
|
renderFrame_(e) {
|
|
7586
7674
|
const t = this.getSize(), i = this.getView(), r = this.frameState_;
|
|
7587
7675
|
let s = null;
|
|
7588
|
-
if (t !== void 0 &&
|
|
7676
|
+
if (t !== void 0 && Gt(t) && i && i.isDef()) {
|
|
7589
7677
|
const a = i.getHints(
|
|
7590
7678
|
this.frameState_ ? this.frameState_.viewHints : void 0
|
|
7591
7679
|
), o = i.getState();
|
|
@@ -7593,7 +7681,7 @@ class Jr extends nt {
|
|
|
7593
7681
|
animate: !1,
|
|
7594
7682
|
coordinateToPixelTransform: this.coordinateToPixelTransform_,
|
|
7595
7683
|
declutter: null,
|
|
7596
|
-
extent:
|
|
7684
|
+
extent: Ft(
|
|
7597
7685
|
o.center,
|
|
7598
7686
|
o.resolution,
|
|
7599
7687
|
o.rotation,
|
|
@@ -7616,7 +7704,7 @@ class Jr extends nt {
|
|
|
7616
7704
|
renderTargets: {}
|
|
7617
7705
|
}, o.nextCenter && o.nextResolution) {
|
|
7618
7706
|
const l = isNaN(o.nextRotation) ? o.rotation : o.nextRotation;
|
|
7619
|
-
s.nextExtent =
|
|
7707
|
+
s.nextExtent = Ft(
|
|
7620
7708
|
o.nextCenter,
|
|
7621
7709
|
o.nextResolution,
|
|
7622
7710
|
l,
|
|
@@ -7627,11 +7715,11 @@ class Jr extends nt {
|
|
|
7627
7715
|
this.frameState_ = s, this.renderer_.renderFrame(s), s && (s.animate && this.render(), Array.prototype.push.apply(
|
|
7628
7716
|
this.postRenderFunctions_,
|
|
7629
7717
|
s.postRenderFunctions
|
|
7630
|
-
), r && (!this.previousExtent_ || !
|
|
7631
|
-
new
|
|
7632
|
-
), this.previousExtent_ =
|
|
7633
|
-
new
|
|
7634
|
-
),
|
|
7718
|
+
), r && (!this.previousExtent_ || !Zi(this.previousExtent_) && !Vt(s.extent, this.previousExtent_)) && (this.dispatchEvent(
|
|
7719
|
+
new Ee(le.MOVESTART, this, r)
|
|
7720
|
+
), this.previousExtent_ = ji(this.previousExtent_)), this.previousExtent_ && !s.viewHints[Xe.ANIMATING] && !s.viewHints[Xe.INTERACTING] && !Vt(s.extent, this.previousExtent_) && (this.dispatchEvent(
|
|
7721
|
+
new Ee(le.MOVEEND, this, s)
|
|
7722
|
+
), Ji(s.extent, this.previousExtent_))), this.dispatchEvent(new Ee(le.POSTRENDER, this, s)), this.renderComplete_ = (this.hasListener(le.LOADSTART) || this.hasListener(le.LOADEND) || this.hasListener(Se.RENDERCOMPLETE)) && !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady(), this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => {
|
|
7635
7723
|
this.postRenderTimeoutHandle_ = void 0, this.handlePostRender();
|
|
7636
7724
|
}, 0));
|
|
7637
7725
|
}
|
|
@@ -7643,7 +7731,7 @@ class Jr extends nt {
|
|
|
7643
7731
|
*/
|
|
7644
7732
|
setLayerGroup(e) {
|
|
7645
7733
|
const t = this.getLayerGroup();
|
|
7646
|
-
t && this.handleLayerRemove_(new
|
|
7734
|
+
t && this.handleLayerRemove_(new re("removelayer", t)), this.set(N.LAYERGROUP, e);
|
|
7647
7735
|
}
|
|
7648
7736
|
/**
|
|
7649
7737
|
* Set the size of this map.
|
|
@@ -7652,7 +7740,7 @@ class Jr extends nt {
|
|
|
7652
7740
|
* @api
|
|
7653
7741
|
*/
|
|
7654
7742
|
setSize(e) {
|
|
7655
|
-
this.set(
|
|
7743
|
+
this.set(N.SIZE, e);
|
|
7656
7744
|
}
|
|
7657
7745
|
/**
|
|
7658
7746
|
* Set the target element to render this map into.
|
|
@@ -7665,7 +7753,7 @@ class Jr extends nt {
|
|
|
7665
7753
|
* @api
|
|
7666
7754
|
*/
|
|
7667
7755
|
setTarget(e) {
|
|
7668
|
-
this.set(
|
|
7756
|
+
this.set(N.TARGET, e);
|
|
7669
7757
|
}
|
|
7670
7758
|
/**
|
|
7671
7759
|
* Set the view for this map.
|
|
@@ -7677,14 +7765,14 @@ class Jr extends nt {
|
|
|
7677
7765
|
* @api
|
|
7678
7766
|
*/
|
|
7679
7767
|
setView(e) {
|
|
7680
|
-
if (!e || e instanceof
|
|
7681
|
-
this.set(
|
|
7768
|
+
if (!e || e instanceof ce) {
|
|
7769
|
+
this.set(N.VIEW, e);
|
|
7682
7770
|
return;
|
|
7683
7771
|
}
|
|
7684
|
-
this.set(
|
|
7772
|
+
this.set(N.VIEW, new ce());
|
|
7685
7773
|
const t = this;
|
|
7686
7774
|
e.then(function(i) {
|
|
7687
|
-
t.setView(new
|
|
7775
|
+
t.setView(new ce(i));
|
|
7688
7776
|
});
|
|
7689
7777
|
}
|
|
7690
7778
|
/**
|
|
@@ -7697,19 +7785,19 @@ class Jr extends nt {
|
|
|
7697
7785
|
let t;
|
|
7698
7786
|
if (e) {
|
|
7699
7787
|
let r, s;
|
|
7700
|
-
if (
|
|
7788
|
+
if (se(e)) {
|
|
7701
7789
|
const a = e.getContext("2d").getTransform();
|
|
7702
7790
|
r = e.width / a.a, s = e.height / a.d;
|
|
7703
7791
|
} else {
|
|
7704
7792
|
const a = getComputedStyle(e);
|
|
7705
7793
|
r = e.offsetWidth - parseFloat(a.borderLeftWidth) - parseFloat(a.paddingLeft) - parseFloat(a.paddingRight) - parseFloat(a.borderRightWidth), s = e.offsetHeight - parseFloat(a.borderTopWidth) - parseFloat(a.paddingTop) - parseFloat(a.paddingBottom) - parseFloat(a.borderBottomWidth);
|
|
7706
7794
|
}
|
|
7707
|
-
!isNaN(r) && !isNaN(s) && (t = [Math.max(0, r), Math.max(0, s)], !
|
|
7795
|
+
!isNaN(r) && !isNaN(s) && (t = [Math.max(0, r), Math.max(0, s)], !Gt(t) && (e.offsetWidth || e.offsetHeight || e.getClientRects().length) && Qi(
|
|
7708
7796
|
"No map visible because the map container's width or height are 0."
|
|
7709
7797
|
));
|
|
7710
7798
|
}
|
|
7711
7799
|
const i = this.getSize();
|
|
7712
|
-
t && (!i || !
|
|
7800
|
+
t && (!i || !fi(t, i)) && (this.updateViewportSize_(t), this.setSize(t));
|
|
7713
7801
|
}
|
|
7714
7802
|
/**
|
|
7715
7803
|
* Recomputes the viewport size and save it on the view object (if any)
|
|
@@ -7720,39 +7808,39 @@ class Jr extends nt {
|
|
|
7720
7808
|
const t = this.getView();
|
|
7721
7809
|
t && t.setViewportSize(e);
|
|
7722
7810
|
}
|
|
7723
|
-
}
|
|
7724
|
-
function
|
|
7811
|
+
};
|
|
7812
|
+
function ns(n) {
|
|
7725
7813
|
let e = null;
|
|
7726
7814
|
n.keyboardEventTarget !== void 0 && (e = typeof n.keyboardEventTarget == "string" ? document.getElementById(n.keyboardEventTarget) : n.keyboardEventTarget);
|
|
7727
7815
|
const t = {}, i = n.layers && typeof /** @type {?} */
|
|
7728
7816
|
n.layers.getLayers == "function" ? (
|
|
7729
7817
|
/** @type {LayerGroup} */
|
|
7730
7818
|
n.layers
|
|
7731
|
-
) : new
|
|
7819
|
+
) : new Ie({
|
|
7732
7820
|
layers: (
|
|
7733
7821
|
/** @type {Collection<import("./layer/Base.js").default>|Array<import("./layer/Base.js").default>} */
|
|
7734
7822
|
n.layers
|
|
7735
7823
|
)
|
|
7736
7824
|
});
|
|
7737
|
-
t[
|
|
7825
|
+
t[N.LAYERGROUP] = i, t[N.TARGET] = n.target, t[N.VIEW] = n.view instanceof ce ? n.view : new ce();
|
|
7738
7826
|
let r;
|
|
7739
|
-
n.controls !== void 0 && (Array.isArray(n.controls) ? r = new
|
|
7827
|
+
n.controls !== void 0 && (Array.isArray(n.controls) ? r = new Y(n.controls.slice()) : (Q(
|
|
7740
7828
|
typeof /** @type {?} */
|
|
7741
7829
|
n.controls.getArray == "function",
|
|
7742
7830
|
"Expected `controls` to be an array or an `ol/Collection.js`"
|
|
7743
7831
|
), r = n.controls));
|
|
7744
7832
|
let s;
|
|
7745
|
-
n.interactions !== void 0 && (Array.isArray(n.interactions) ? s = new
|
|
7833
|
+
n.interactions !== void 0 && (Array.isArray(n.interactions) ? s = new Y(n.interactions.slice()) : (Q(
|
|
7746
7834
|
typeof /** @type {?} */
|
|
7747
7835
|
n.interactions.getArray == "function",
|
|
7748
7836
|
"Expected `interactions` to be an array or an `ol/Collection.js`"
|
|
7749
7837
|
), s = n.interactions));
|
|
7750
7838
|
let a;
|
|
7751
|
-
return n.overlays !== void 0 ? Array.isArray(n.overlays) ? a = new
|
|
7839
|
+
return n.overlays !== void 0 ? Array.isArray(n.overlays) ? a = new Y(n.overlays.slice()) : (Q(
|
|
7752
7840
|
typeof /** @type {?} */
|
|
7753
7841
|
n.overlays.getArray == "function",
|
|
7754
7842
|
"Expected `overlays` to be an array or an `ol/Collection.js`"
|
|
7755
|
-
), a = n.overlays) : a = new
|
|
7843
|
+
), a = n.overlays) : a = new Y(), {
|
|
7756
7844
|
controls: r,
|
|
7757
7845
|
interactions: s,
|
|
7758
7846
|
keyboardEventTarget: e,
|
|
@@ -7760,58 +7848,58 @@ function Qr(n) {
|
|
|
7760
7848
|
values: t
|
|
7761
7849
|
};
|
|
7762
7850
|
}
|
|
7763
|
-
const
|
|
7851
|
+
const Ts = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7764
7852
|
__proto__: null,
|
|
7765
|
-
default:
|
|
7853
|
+
default: is
|
|
7766
7854
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7767
7855
|
export {
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7856
|
+
Sn as A,
|
|
7857
|
+
jr as B,
|
|
7858
|
+
Y as C,
|
|
7859
|
+
cs as D,
|
|
7860
|
+
fs as E,
|
|
7773
7861
|
Ge as F,
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7862
|
+
oe as G,
|
|
7863
|
+
U as H,
|
|
7864
|
+
kt as I,
|
|
7777
7865
|
He as J,
|
|
7778
|
-
|
|
7779
|
-
|
|
7866
|
+
ve as K,
|
|
7867
|
+
is as L,
|
|
7780
7868
|
b as M,
|
|
7781
|
-
|
|
7782
|
-
|
|
7869
|
+
ds as N,
|
|
7870
|
+
lt as O,
|
|
7783
7871
|
We as P,
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7872
|
+
Cn as Q,
|
|
7873
|
+
Zn as R,
|
|
7874
|
+
ge as S,
|
|
7875
|
+
Nt as T,
|
|
7876
|
+
N as U,
|
|
7877
|
+
Ts as V,
|
|
7878
|
+
In as Z,
|
|
7879
|
+
H as a,
|
|
7880
|
+
ei as b,
|
|
7881
|
+
Rr as c,
|
|
7882
|
+
ti as d,
|
|
7883
|
+
ii as e,
|
|
7884
|
+
ms as f,
|
|
7885
|
+
ys as g,
|
|
7886
|
+
ni as h,
|
|
7887
|
+
Pr as i,
|
|
7888
|
+
Tr as j,
|
|
7889
|
+
ps as k,
|
|
7890
|
+
vs as l,
|
|
7891
|
+
ws as m,
|
|
7892
|
+
Es as n,
|
|
7893
|
+
_s as o,
|
|
7894
|
+
Is as p,
|
|
7895
|
+
Ls as q,
|
|
7896
|
+
Cs as r,
|
|
7897
|
+
As as s,
|
|
7898
|
+
Li as t,
|
|
7899
|
+
On as u,
|
|
7900
|
+
Mn as v,
|
|
7901
|
+
Xt as w,
|
|
7902
|
+
ne as x,
|
|
7903
|
+
us as y,
|
|
7904
|
+
bs as z
|
|
7817
7905
|
};
|