@mapcreator/sdk 0.0.0-video.10 → 0.0.0-video.13
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/mapcreator-sdk.js +997 -1009
- package/dist/mapcreator-sdk.umd.cjs +52 -52
- package/dist/report.html +1 -1
- package/package.json +1 -1
package/dist/mapcreator-sdk.js
CHANGED
|
@@ -7762,25 +7762,25 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
7762
7762
|
function ca(e) {
|
|
7763
7763
|
return e && typeof ArrayBuffer < "u" && (e instanceof ArrayBuffer || e.constructor && e.constructor.name === "ArrayBuffer");
|
|
7764
7764
|
}
|
|
7765
|
-
function
|
|
7765
|
+
function X(e) {
|
|
7766
7766
|
return e.$name || e.constructor._classRegistryKey;
|
|
7767
7767
|
}
|
|
7768
|
-
function
|
|
7768
|
+
function la(e) {
|
|
7769
7769
|
return !function(e) {
|
|
7770
7770
|
if (typeof e != "object" || !e) return !1;
|
|
7771
|
-
let t =
|
|
7771
|
+
let t = X(e);
|
|
7772
7772
|
return !(!t || t === "Object");
|
|
7773
7773
|
}(e) && (e == null || typeof e == "boolean" || typeof e == "number" || typeof e == "string" || e instanceof Boolean || e instanceof Number || e instanceof String || e instanceof Date || e instanceof RegExp || e instanceof Blob || e instanceof Error || ca(e) || ue(e) || ArrayBuffer.isView(e) || e instanceof ImageData);
|
|
7774
7774
|
}
|
|
7775
|
-
function
|
|
7776
|
-
if (
|
|
7775
|
+
function ua(e, t) {
|
|
7776
|
+
if (la(e)) return (ca(e) || ue(e)) && t && t.push(e), ArrayBuffer.isView(e) && t && t.push(e.buffer), e instanceof ImageData && t && t.push(e.data.buffer), e;
|
|
7777
7777
|
if (Array.isArray(e)) {
|
|
7778
7778
|
let n = [];
|
|
7779
|
-
for (let r of e) n.push(
|
|
7779
|
+
for (let r of e) n.push(ua(r, t));
|
|
7780
7780
|
return n;
|
|
7781
7781
|
}
|
|
7782
7782
|
if (typeof e != "object") throw Error("can't serialize object of type " + typeof e);
|
|
7783
|
-
let n =
|
|
7783
|
+
let n = X(e);
|
|
7784
7784
|
if (!n) throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);
|
|
7785
7785
|
if (!sa[n]) throw Error(`${n} is not registered.`);
|
|
7786
7786
|
let { klass: r } = sa[n], i = r.serialize ? r.serialize(e, t) : {};
|
|
@@ -7790,7 +7790,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
7790
7790
|
for (let r in e) {
|
|
7791
7791
|
if (!e.hasOwnProperty(r) || sa[n].omit.indexOf(r) >= 0) continue;
|
|
7792
7792
|
let a = e[r];
|
|
7793
|
-
i[r] = sa[n].shallow.indexOf(r) >= 0 ? a :
|
|
7793
|
+
i[r] = sa[n].shallow.indexOf(r) >= 0 ? a : ua(a, t);
|
|
7794
7794
|
}
|
|
7795
7795
|
e instanceof Error && (i.message = e.message);
|
|
7796
7796
|
}
|
|
@@ -7798,10 +7798,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
7798
7798
|
return n !== "Object" && (i.$name = n), i;
|
|
7799
7799
|
}
|
|
7800
7800
|
function da(e) {
|
|
7801
|
-
if (
|
|
7801
|
+
if (la(e)) return e;
|
|
7802
7802
|
if (Array.isArray(e)) return e.map(da);
|
|
7803
7803
|
if (typeof e != "object") throw Error("can't deserialize object of type " + typeof e);
|
|
7804
|
-
let t =
|
|
7804
|
+
let t = X(e) || "Object";
|
|
7805
7805
|
if (!sa[t]) throw Error(`can't deserialize unregistered class ${t}`);
|
|
7806
7806
|
let { klass: n } = sa[t];
|
|
7807
7807
|
if (!n) throw Error(`can't deserialize unregistered class ${t}`);
|
|
@@ -14532,7 +14532,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
14532
14532
|
id: i,
|
|
14533
14533
|
sourceMapId: this.mapId,
|
|
14534
14534
|
origin: location.origin,
|
|
14535
|
-
data:
|
|
14535
|
+
data: ua(e.data, o)
|
|
14536
14536
|
});
|
|
14537
14537
|
this.target.postMessage(s, { transfer: o });
|
|
14538
14538
|
}));
|
|
@@ -14582,8 +14582,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
14582
14582
|
type: "<response>",
|
|
14583
14583
|
sourceMapId: this.mapId,
|
|
14584
14584
|
origin: location.origin,
|
|
14585
|
-
error: t ?
|
|
14586
|
-
data:
|
|
14585
|
+
error: t ? ua(t) : null,
|
|
14586
|
+
data: ua(n, r)
|
|
14587
14587
|
};
|
|
14588
14588
|
this.target.postMessage(i, { transfer: r });
|
|
14589
14589
|
}
|
|
@@ -27180,7 +27180,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27180
27180
|
function ca(e, t) {
|
|
27181
27181
|
return Math.log(e / t) / Math.LN2;
|
|
27182
27182
|
}
|
|
27183
|
-
class
|
|
27183
|
+
class X extends sa {
|
|
27184
27184
|
reset() {
|
|
27185
27185
|
super.reset(), delete this._distance, delete this._startDistance;
|
|
27186
27186
|
}
|
|
@@ -27195,10 +27195,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27195
27195
|
};
|
|
27196
27196
|
}
|
|
27197
27197
|
}
|
|
27198
|
-
function
|
|
27198
|
+
function la(e, t) {
|
|
27199
27199
|
return 180 * e.angleWith(t) / Math.PI;
|
|
27200
27200
|
}
|
|
27201
|
-
class
|
|
27201
|
+
class ua extends sa {
|
|
27202
27202
|
reset() {
|
|
27203
27203
|
super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector;
|
|
27204
27204
|
}
|
|
@@ -27208,13 +27208,13 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27208
27208
|
_move(e, t, n) {
|
|
27209
27209
|
let r = this._vector;
|
|
27210
27210
|
if (this._vector = e[0].sub(e[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, {
|
|
27211
|
-
bearingDelta:
|
|
27211
|
+
bearingDelta: la(this._vector, r),
|
|
27212
27212
|
pinchAround: t
|
|
27213
27213
|
};
|
|
27214
27214
|
}
|
|
27215
27215
|
_isBelowThreshold(e) {
|
|
27216
27216
|
this._minDiameter = Math.min(this._minDiameter, e.mag());
|
|
27217
|
-
let t = 25 / (Math.PI * this._minDiameter) * 360, n =
|
|
27217
|
+
let t = 25 / (Math.PI * this._minDiameter) * 360, n = la(e, this._startVector);
|
|
27218
27218
|
return Math.abs(n) < t;
|
|
27219
27219
|
}
|
|
27220
27220
|
}
|
|
@@ -27806,7 +27806,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
27806
27806
|
});
|
|
27807
27807
|
}(e), g = new oa(e, n);
|
|
27808
27808
|
n.dragPan = new ba(r, h, g), this._add("mousePan", h), this._add("touchPan", g, ["touchZoom", "touchRotate"]), e.interactive && e.dragPan && n.dragPan.enable(e.dragPan);
|
|
27809
|
-
let _ = new
|
|
27809
|
+
let _ = new ua(), v = new X();
|
|
27810
27810
|
n.touchZoomRotate = new Sa(r, v, _, l), this._add("touchRotate", _, ["touchPan", "touchZoom"]), this._add("touchZoom", v, ["touchPan", "touchRotate"]), e.interactive && e.touchZoomRotate && n.touchZoomRotate.enable(e.touchZoomRotate);
|
|
27811
27811
|
let y = n.scrollZoom = new ga(n, (() => this._triggerRenderFrame()));
|
|
27812
27812
|
this._add("scrollZoom", y, ["mousePan"]), e.interactive && e.scrollZoom && n.scrollZoom.enable(e.scrollZoom);
|
|
@@ -30317,7 +30317,7 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
30317
30317
|
onRemove() {
|
|
30318
30318
|
s.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
|
|
30319
30319
|
}
|
|
30320
|
-
}, e.TwoFingersTouchPitchHandler = fa, e.TwoFingersTouchRotateHandler =
|
|
30320
|
+
}, e.TwoFingersTouchPitchHandler = fa, e.TwoFingersTouchRotateHandler = ua, e.TwoFingersTouchZoomHandler = X, e.TwoFingersTouchZoomRotateHandler = Sa, e.VectorTileSource = Fe, e.VideoSource = Be, e.addSourceType = (e, n) => t._(void 0, void 0, void 0, (function* () {
|
|
30321
30321
|
if (Ue(e)) throw Error(`A source type called "${e}" already exists.`);
|
|
30322
30322
|
((e, t) => {
|
|
30323
30323
|
He[e] = t;
|
|
@@ -32252,14 +32252,6 @@ function Sr(e, t) {
|
|
|
32252
32252
|
return n !== void 0 && n !== "color";
|
|
32253
32253
|
}
|
|
32254
32254
|
//#endregion
|
|
32255
|
-
//#region src/utils/browser.ts
|
|
32256
|
-
function Cr() {
|
|
32257
|
-
return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
|
|
32258
|
-
}
|
|
32259
|
-
function wr() {
|
|
32260
|
-
return window.InstallTrigger !== void 0;
|
|
32261
|
-
}
|
|
32262
|
-
//#endregion
|
|
32263
32255
|
//#region node_modules/path-data-polyfill/path-data-polyfill.js
|
|
32264
32256
|
(function() {
|
|
32265
32257
|
var e = function(e) {
|
|
@@ -32992,31 +32984,22 @@ function wr() {
|
|
|
32992
32984
|
})();
|
|
32993
32985
|
//#endregion
|
|
32994
32986
|
//#region src/utils/svgHelpers.ts
|
|
32995
|
-
function
|
|
32987
|
+
function Cr(e) {
|
|
32996
32988
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
32997
32989
|
}
|
|
32998
|
-
async function
|
|
32990
|
+
async function wr(e, t, n) {
|
|
32999
32991
|
for (let r of e) try {
|
|
33000
32992
|
let e = await fetch(`${t}/fonts/${r}.woff2?access_token=${n}`).then((e) => e.arrayBuffer());
|
|
33001
32993
|
document.fonts.add(new FontFace(r, e));
|
|
33002
32994
|
} catch {}
|
|
33003
32995
|
}
|
|
33004
|
-
function
|
|
32996
|
+
function Tr(e, t, n = 1e-4) {
|
|
33005
32997
|
return Math.abs(e - t) < n;
|
|
33006
32998
|
}
|
|
33007
|
-
|
|
33008
|
-
|
|
33009
|
-
return await kr(e, t, n);
|
|
33010
|
-
} catch {}
|
|
33011
|
-
return await Ar(new Blob([e], { type: "image/svg+xml" }), t, n);
|
|
33012
|
-
}
|
|
33013
|
-
function kr(e, t, n) {
|
|
33014
|
-
let r = new Image();
|
|
33015
|
-
return r.width = t, r.height = n, new Promise((t, n) => {
|
|
33016
|
-
r.onload = () => t(r), r.onerror = () => n(/* @__PURE__ */ Error("Failed to quickly generate image from svg")), r.src = `data:image/svg+xml;base64,${btoa(e)}`;
|
|
33017
|
-
});
|
|
32999
|
+
function Er(e, t, n) {
|
|
33000
|
+
return Dr(new Blob([e], { type: "image/svg+xml" }), t, n);
|
|
33018
33001
|
}
|
|
33019
|
-
async function
|
|
33002
|
+
async function Dr(e, t, n) {
|
|
33020
33003
|
let r = new Image();
|
|
33021
33004
|
r.width = t, r.height = n;
|
|
33022
33005
|
let i = URL.createObjectURL(e);
|
|
@@ -33029,16 +33012,16 @@ async function Ar(e, t, n) {
|
|
|
33029
33012
|
}
|
|
33030
33013
|
return r;
|
|
33031
33014
|
}
|
|
33032
|
-
var
|
|
33033
|
-
function
|
|
33034
|
-
let t =
|
|
33035
|
-
return t || (t =
|
|
33015
|
+
var Or = /\$\{([^}]+)}/g, kr = new DOMParser(), Ar = new XMLSerializer(), jr = /* @__PURE__ */ new Map();
|
|
33016
|
+
function Mr(e) {
|
|
33017
|
+
let t = jr.get(e);
|
|
33018
|
+
return t || (t = kr.parseFromString(e, "image/svg+xml").documentElement, jr.set(e, t)), t;
|
|
33036
33019
|
}
|
|
33037
|
-
function
|
|
33038
|
-
let t =
|
|
33039
|
-
return
|
|
33020
|
+
function Nr(e) {
|
|
33021
|
+
let t = Ar.serializeToString(e);
|
|
33022
|
+
return jr.has(t) || jr.set(t, e), t;
|
|
33040
33023
|
}
|
|
33041
|
-
var
|
|
33024
|
+
var Pr = class {
|
|
33042
33025
|
_seen = [];
|
|
33043
33026
|
_svg = null;
|
|
33044
33027
|
_element = null;
|
|
@@ -33046,23 +33029,23 @@ var Lr = class {
|
|
|
33046
33029
|
this._svg = e;
|
|
33047
33030
|
}
|
|
33048
33031
|
setElement() {
|
|
33049
|
-
return this._element =
|
|
33032
|
+
return this._element = Mr(this._svg).cloneNode(!0), this._svg = null, this._element;
|
|
33050
33033
|
}
|
|
33051
33034
|
getSvgString() {
|
|
33052
|
-
return this._svg ??
|
|
33035
|
+
return this._svg ?? Nr(this._element);
|
|
33053
33036
|
}
|
|
33054
33037
|
getSvgSize() {
|
|
33055
|
-
let e = this._element ??
|
|
33038
|
+
let e = this._element ?? Mr(this._svg);
|
|
33056
33039
|
return [e.width.baseVal.value, e.height.baseVal.value];
|
|
33057
33040
|
}
|
|
33058
33041
|
getSvgColors() {
|
|
33059
|
-
let e = [], t = [], n = (this._element ??
|
|
33042
|
+
let e = [], t = [], n = (this._element ?? Mr(this._svg)).querySelectorAll("[mol_edit_style=true]");
|
|
33060
33043
|
for (let r = 0; r < n.length; ++r) {
|
|
33061
33044
|
let i = n[r], a = i.id;
|
|
33062
33045
|
if (a && t.every((e) => e.id !== a)) {
|
|
33063
33046
|
let n = i.getAttribute("fill")?.trim();
|
|
33064
33047
|
if (n) {
|
|
33065
|
-
let r = new
|
|
33048
|
+
let r = new Ur(n);
|
|
33066
33049
|
if (r.badValue) e.push({
|
|
33067
33050
|
name: `fill#${a}`,
|
|
33068
33051
|
color: n
|
|
@@ -33071,14 +33054,14 @@ var Lr = class {
|
|
|
33071
33054
|
let { rgba: t } = r, n = i.getAttribute("fill-opacity");
|
|
33072
33055
|
t[3] *= n ? j(Number(n), 0, 1) : 1, e.push({
|
|
33073
33056
|
name: `fill#${a}`,
|
|
33074
|
-
color:
|
|
33057
|
+
color: Ur.fromRGB(t)
|
|
33075
33058
|
});
|
|
33076
33059
|
}
|
|
33077
33060
|
t.push(i);
|
|
33078
33061
|
}
|
|
33079
33062
|
let r = i.getAttribute("stroke")?.trim();
|
|
33080
33063
|
if (r) {
|
|
33081
|
-
let n = new
|
|
33064
|
+
let n = new Ur(r);
|
|
33082
33065
|
if (n.badValue) e.push({
|
|
33083
33066
|
name: `stroke#${a}`,
|
|
33084
33067
|
color: r
|
|
@@ -33087,7 +33070,7 @@ var Lr = class {
|
|
|
33087
33070
|
let { rgba: t } = n, r = i.getAttribute("stroke-opacity");
|
|
33088
33071
|
t[3] *= r ? j(Number(r), 0, 1) : 1, e.push({
|
|
33089
33072
|
name: `stroke#${a}`,
|
|
33090
|
-
color:
|
|
33073
|
+
color: Ur.fromRGB(t)
|
|
33091
33074
|
});
|
|
33092
33075
|
}
|
|
33093
33076
|
t.push(i);
|
|
@@ -33117,7 +33100,7 @@ var Lr = class {
|
|
|
33117
33100
|
return this;
|
|
33118
33101
|
}
|
|
33119
33102
|
getSvgTexts() {
|
|
33120
|
-
let e = [], t = (this._element ??
|
|
33103
|
+
let e = [], t = (this._element ?? Mr(this._svg)).querySelectorAll("[mol_edit_text=true]");
|
|
33121
33104
|
for (let n = 0; n < t.length; ++n) {
|
|
33122
33105
|
let r = t[n], i = r.id;
|
|
33123
33106
|
i && e.every((e) => e.name !== i) && e.push({
|
|
@@ -33184,30 +33167,30 @@ var Lr = class {
|
|
|
33184
33167
|
e[3]
|
|
33185
33168
|
];
|
|
33186
33169
|
}
|
|
33187
|
-
|
|
33170
|
+
Tr(e.attributes.x.value, t.x - r[0]) && Tr(e.attributes.y.value, t.y - r[2]) && Tr(e.attributes.width.value, t.width + r[0] + r[1]) && Tr(e.attributes.height.value, t.height + r[2] + r[3]) || (e.attributes.x.value = t.x - r[0], e.attributes.y.value = t.y - r[2], e.attributes.width.value = t.width + r[0] + r[1], e.attributes.height.value = t.height + r[2] + r[3], this.nodeChanged(e));
|
|
33188
33171
|
}
|
|
33189
33172
|
sameWidth(e, t) {
|
|
33190
33173
|
let n = t.width + 2 * parseFloat(e.attributes.mol_samewidth.value.split(" ")[1]);
|
|
33191
|
-
|
|
33174
|
+
Tr(e.attributes.width.value, n) || (e.attributes.width.value = n, this.nodeChanged(e));
|
|
33192
33175
|
}
|
|
33193
33176
|
sameHeight(e, t) {
|
|
33194
33177
|
let n = t.height + 2 * parseFloat(e.attributes.mol_sameheight.value.split(" ")[1]);
|
|
33195
|
-
|
|
33178
|
+
Tr(e.attributes.height.value, n) || (this._seen.push(e), e.attributes.height.value = n, this.nodeChanged(e));
|
|
33196
33179
|
}
|
|
33197
33180
|
stack(e, t) {
|
|
33198
33181
|
let n = !1;
|
|
33199
33182
|
switch (e.attributes.mol_stack.value.split(" ")[0]) {
|
|
33200
33183
|
case "top":
|
|
33201
|
-
n = !(
|
|
33184
|
+
n = !(Tr(e.attributes.width.value, t.width) && Tr(e.attributes.x.value, t.x) && Tr(e.attributes.y.value, t.y - e.attributes.height.value)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y - e.attributes.height.value);
|
|
33202
33185
|
break;
|
|
33203
33186
|
case "bottom":
|
|
33204
|
-
n = !(
|
|
33187
|
+
n = !(Tr(e.attributes.width.value, t.width) && Tr(e.attributes.x.value, t.x) && Tr(e.attributes.y.value, t.y + t.height)), n && (e.attributes.width.value = t.width, e.attributes.x.value = t.x, e.attributes.y.value = t.y + t.height);
|
|
33205
33188
|
break;
|
|
33206
33189
|
case "left":
|
|
33207
|
-
n = !(
|
|
33190
|
+
n = !(Tr(e.attributes.height.value, t.height) && Tr(e.attributes.x.value, t.x - e.attributes.width.value) && Tr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x - e.attributes.width.value, e.attributes.y.value = t.y);
|
|
33208
33191
|
break;
|
|
33209
33192
|
case "right":
|
|
33210
|
-
n = !(
|
|
33193
|
+
n = !(Tr(e.attributes.height.value, t.height) && Tr(e.attributes.x.value, t.x + t.width) && Tr(e.attributes.y.value, t.y)), n && (e.attributes.height.value = t.height, e.attributes.x.value = t.x + t.width, e.attributes.y.value = t.y);
|
|
33211
33194
|
break;
|
|
33212
33195
|
}
|
|
33213
33196
|
n && this.nodeChanged(e);
|
|
@@ -33256,22 +33239,22 @@ var Lr = class {
|
|
|
33256
33239
|
break;
|
|
33257
33240
|
}
|
|
33258
33241
|
let o = this.getCoordinate(e, 0, 0);
|
|
33259
|
-
o && !(
|
|
33242
|
+
o && !(Tr(o.x, a.x) && Tr(o.y, a.y)) && (this.moveElement(e, a), this.nodeChanged(e));
|
|
33260
33243
|
}
|
|
33261
33244
|
pathPosition(e, t) {
|
|
33262
33245
|
let n = e.attributes.mol_pathposition.value.split(" ").map((e) => parseFloat(e)), r = this.getCoordinate(e, 0, 0), i = this.getCoordinate(t, n[1], n[2]);
|
|
33263
|
-
i && r && !(
|
|
33246
|
+
i && r && !(Tr(i.x, r.x) && Tr(i.y, r.y)) && (this.moveElement(e, i), this.nodeChanged(e));
|
|
33264
33247
|
}
|
|
33265
33248
|
copyPosition(e, t) {
|
|
33266
33249
|
let n = e.attributes.mol_copyposition.value.split(" ").map((e) => parseFloat(e)), r = this.getCoordinate(e, n[0], n[1]), i = this.getCoordinate(t, n[3], n[4]);
|
|
33267
|
-
i && r && !(
|
|
33250
|
+
i && r && !(Tr(i.x, r.x) && Tr(i.y, r.y)) && (this.setCoordinate(e, i, n[0], n[1]), this.nodeChanged(e));
|
|
33268
33251
|
}
|
|
33269
33252
|
resetSize(e) {
|
|
33270
33253
|
let t = this._element ?? this.setElement(), n = this.getBBox(t);
|
|
33271
33254
|
n.x -= .1 * n.width, n.y -= .1 * n.height, n.width *= 1.2, n.height *= 1.2, t.setAttribute("viewBox", `${n.x} ${n.y} ${n.width} ${n.height}`), t.setAttribute("width", `${n.width * e}`), t.setAttribute("height", `${n.height * e}`);
|
|
33272
33255
|
}
|
|
33273
33256
|
resetAnchor() {
|
|
33274
|
-
let e = (this._element ??
|
|
33257
|
+
let e = (this._element ?? Mr(this._svg)).querySelector("[mol_edit_anchor]");
|
|
33275
33258
|
if (e) {
|
|
33276
33259
|
let t = e.getAttribute("mol_edit_anchor").split(" ").map((e) => parseFloat(e)), n = this.getCoordinate(e, t[0], t[1]), r = this._element ?? this.setElement(), i = r.getElementById("scale");
|
|
33277
33260
|
if (i) {
|
|
@@ -33416,14 +33399,14 @@ var Lr = class {
|
|
|
33416
33399
|
case "rect":
|
|
33417
33400
|
case "circle":
|
|
33418
33401
|
case "ellipse":
|
|
33419
|
-
n = this.getCoordinate(e, 0, 0), a = !
|
|
33402
|
+
n = this.getCoordinate(e, 0, 0), a = !Tr(n.x, t.x) || !Tr(n.y, t.y), a && this.setCoordinate(e, t, 0, 0);
|
|
33420
33403
|
break;
|
|
33421
33404
|
case "polyline":
|
|
33422
33405
|
case "polygon":
|
|
33423
|
-
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !
|
|
33406
|
+
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Tr(r.x, 0) || !Tr(r.y, 0), a) for (this.setCoordinate(e, t, 0, 0), i = 1, n = this.getCoordinate(e, i, 0); n !== null;) n.x += r.x, n.y += r.y, this.setCoordinate(n, i, 0, void 0), i++, n = this.getCoordinate(e, i, 0);
|
|
33424
33407
|
break;
|
|
33425
33408
|
case "path":
|
|
33426
|
-
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !
|
|
33409
|
+
if (n = this.getCoordinate(e, 0, 0), r.x = t.x - n.x, r.y = t.y - n.y, a = !Tr(r.x, 0) || !Tr(r.y, 0), a) {
|
|
33427
33410
|
o = e.getPathData({ normalize: !0 });
|
|
33428
33411
|
for (let e = 0; e < o.length; ++e) {
|
|
33429
33412
|
let t = o[e];
|
|
@@ -33463,7 +33446,7 @@ var Lr = class {
|
|
|
33463
33446
|
for (u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u), o += O, a = 0; a < r.length;) c = s + r[a], i++, l.nodeValue = c, m = e.querySelector(`#${d}`).getComputedTextLength(), m < D ? (s = c, s.length > 0 && s[s.length - 1] === "\n" && a < r.length - 1 && (l.nodeValue = s, u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), o += O + S, f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u)), a++) : (i > 1 ? l.nodeValue = s : (s = c, a++), s.length > 0 && s[s.length - 1] === "\n" && (s = s.substr(0, s.length - 1), l.nodeValue = s), u = document.createElementNS(h, "tspan"), u.setAttributeNS(null, "x", String(w)), u.setAttributeNS(null, "y", String(A + o)), d = p + f.toString(), u.setAttribute("id", d), o += O + S, f++, s = "", i = 0, l = document.createTextNode(s), u.appendChild(l), t.appendChild(u));
|
|
33464
33447
|
return t.childElementCount === 1 && t.firstElementChild.replaceWith(t.firstElementChild.textContent), o;
|
|
33465
33448
|
}
|
|
33466
|
-
},
|
|
33449
|
+
}, Fr = class {
|
|
33467
33450
|
map;
|
|
33468
33451
|
keyCache = /* @__PURE__ */ new Map();
|
|
33469
33452
|
constructor(e) {
|
|
@@ -33474,18 +33457,18 @@ var Lr = class {
|
|
|
33474
33457
|
n || (n = /* @__PURE__ */ new Map(), this.keyCache.set(t, n));
|
|
33475
33458
|
let r = n.get(e);
|
|
33476
33459
|
if (!r) {
|
|
33477
|
-
let i = e + t, a = new
|
|
33478
|
-
r = `mc-image-${M(i)}`,
|
|
33460
|
+
let i = e + t, a = new Pr(e).getSvgSize(), o = Math.max(a[0] * t, 1), s = Math.max(a[1] * t, 1);
|
|
33461
|
+
r = `mc-image-${M(i)}`, Er(e, o, s).then((e) => this.map.addImage(r, e, { pixelRatio: t })).catch((e) => console.log(e)), n.set(e, r);
|
|
33479
33462
|
}
|
|
33480
33463
|
return r;
|
|
33481
33464
|
}
|
|
33482
|
-
},
|
|
33483
|
-
function
|
|
33465
|
+
}, Ir = 0, Lr = "", Rr = document.createElement("canvas").getContext("2d");
|
|
33466
|
+
function zr(e, t, n) {
|
|
33484
33467
|
let r = 0, i = 0, a = 0, o = 0;
|
|
33485
|
-
if (
|
|
33486
|
-
(
|
|
33468
|
+
if (Rr) {
|
|
33469
|
+
(Ir !== n || Lr !== t) && (Rr.font = `${n}px ${t}`, Lr = t, Ir = n), {actualBoundingBoxAscent: a, actualBoundingBoxDescent: o} = Rr.measureText("█");
|
|
33487
33470
|
for (let t = 0; t < e.length; ++t) {
|
|
33488
|
-
let { actualBoundingBoxLeft: n, actualBoundingBoxRight: i } =
|
|
33471
|
+
let { actualBoundingBoxLeft: n, actualBoundingBoxRight: i } = Rr.measureText(e[t]);
|
|
33489
33472
|
n + i > r && (r = n + i);
|
|
33490
33473
|
}
|
|
33491
33474
|
i = (a + o) * e.length;
|
|
@@ -33497,28 +33480,28 @@ function Hr(e, t, n) {
|
|
|
33497
33480
|
descent: o
|
|
33498
33481
|
};
|
|
33499
33482
|
}
|
|
33500
|
-
function
|
|
33483
|
+
function Br(e, t, n, r, i) {
|
|
33501
33484
|
let a = n ?? t, o = !r, s = a?.match(/\$\{([^}]+)}/)?.[1], c = s ? o ? w(e[s]) : T(e[s]) : null, l = s ? o ? c : typeof c != "boolean" && c !== null && c !== "" ? r(c) : i : a;
|
|
33502
|
-
return l && !new
|
|
33485
|
+
return l && !new Ur(l).badValue ? l : "#000000";
|
|
33503
33486
|
}
|
|
33504
|
-
function
|
|
33505
|
-
return (n ?? t)?.split(
|
|
33487
|
+
function Vr(e, t, n) {
|
|
33488
|
+
return (n ?? t)?.split(Or).map((t, n) => n & 1 ? w(e[t]) : t).join("") || void 0;
|
|
33506
33489
|
}
|
|
33507
|
-
function
|
|
33490
|
+
function Hr(e, t, n) {
|
|
33508
33491
|
let r = t;
|
|
33509
33492
|
if (t) {
|
|
33510
|
-
let i = new
|
|
33493
|
+
let i = new Pr(t), a = i.getSvgColors(), o = i.getSvgTexts(), s = n ? new Map(new Pr(n).getSvgColors().map(({ name: e, color: t }) => [e, t])) : /* @__PURE__ */ new Map(), c = n ? new Map(new Pr(n).getSvgTexts().map(({ name: e, text: t }) => [e, t])) : /* @__PURE__ */ new Map(), l = a.map(({ name: t, color: n }) => ({
|
|
33511
33494
|
name: t,
|
|
33512
|
-
color: new
|
|
33495
|
+
color: new Ur(Br(e, n?.toString(), s.get(t)?.toString()))
|
|
33513
33496
|
})).filter((e, t) => typeof a[t].color == "string" || !e.color.sameColor(a[t].color)), u = o.map(({ name: t, text: n }) => ({
|
|
33514
33497
|
name: t,
|
|
33515
|
-
text:
|
|
33498
|
+
text: Vr(e, n, c.get(t))
|
|
33516
33499
|
})).filter((e, t) => e.text !== o[t].text);
|
|
33517
33500
|
l.length && i.setSvgColors(l), u.length && i.setSvgTexts(u), (l.length || u.length) && (r = i.getSvgString());
|
|
33518
33501
|
}
|
|
33519
33502
|
return r;
|
|
33520
33503
|
}
|
|
33521
|
-
var
|
|
33504
|
+
var Ur = class e {
|
|
33522
33505
|
_error = !1;
|
|
33523
33506
|
_rgba;
|
|
33524
33507
|
static fromRGB(t) {
|
|
@@ -33536,12 +33519,12 @@ var Kr = class e {
|
|
|
33536
33519
|
if (n === 0) this._error = !0;
|
|
33537
33520
|
else if (e === "transparent" || e === "none") t[3] = 0;
|
|
33538
33521
|
else if (e[0] === "#") n < 6 ? (t[0] = parseInt(e[1] + e[1], 16) || 0, t[1] = parseInt(e[2] + e[2], 16) || 0, t[2] = parseInt(e[3] + e[3], 16) || 0, n === 5 && (t[3] = parseInt(e[4] + e[4], 16) / 255)) : (t[0] = parseInt(e[1] + e[2], 16) || 0, t[1] = parseInt(e[3] + e[4], 16) || 0, t[2] = parseInt(e[5] + e[6], 16) || 0, n > 8 && (t[3] = parseInt(e[7] + e[8], 16) / 255));
|
|
33539
|
-
else if (e in
|
|
33540
|
-
let n =
|
|
33522
|
+
else if (e in Jr) {
|
|
33523
|
+
let n = Jr[e];
|
|
33541
33524
|
t[0] = n[0], t[1] = n[1], t[2] = n[2];
|
|
33542
33525
|
} else if (r = /^(rgba?|hs[lv]a?)\s*\(([^)]*)\)/.exec(e)) {
|
|
33543
|
-
let e = r[1].replace(/a$/, ""), n = r[2].trim().split(/\s*[,/]\s*|\s+/).map(
|
|
33544
|
-
e === "rgb" ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], n.length > 3 && (t[3] = n[3])) : e === "hsl" ?
|
|
33526
|
+
let e = r[1].replace(/a$/, ""), n = r[2].trim().split(/\s*[,/]\s*|\s+/).map(Gr, { space: e });
|
|
33527
|
+
e === "rgb" ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], n.length > 3 && (t[3] = n[3])) : e === "hsl" ? qr(n, t) : e === "hsv" && J(n, t);
|
|
33545
33528
|
} else this._error = !0;
|
|
33546
33529
|
}
|
|
33547
33530
|
get badValue() {
|
|
@@ -33557,13 +33540,13 @@ var Kr = class e {
|
|
|
33557
33540
|
return this._rgba.slice();
|
|
33558
33541
|
}
|
|
33559
33542
|
sameColor(e) {
|
|
33560
|
-
return
|
|
33543
|
+
return Tr(this._rgba[0], e._rgba[0]) && Tr(this._rgba[1], e._rgba[1]) && Tr(this._rgba[2], e._rgba[2]) && Tr(this._rgba[3], e._rgba[3]);
|
|
33561
33544
|
}
|
|
33562
33545
|
toString() {
|
|
33563
33546
|
let [e, t, n, r] = this._rgba;
|
|
33564
33547
|
return r === 1 ? this.hex : `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)}, ${r})`;
|
|
33565
33548
|
}
|
|
33566
|
-
},
|
|
33549
|
+
}, Wr = {
|
|
33567
33550
|
red: 0,
|
|
33568
33551
|
orange: 60,
|
|
33569
33552
|
yellow: 120,
|
|
@@ -33571,14 +33554,14 @@ var Kr = class e {
|
|
|
33571
33554
|
blue: 240,
|
|
33572
33555
|
purple: 300
|
|
33573
33556
|
};
|
|
33574
|
-
function
|
|
33557
|
+
function Gr(e, t) {
|
|
33575
33558
|
let { space: n } = this;
|
|
33576
33559
|
if (e[e.length - 1] === "%") {
|
|
33577
33560
|
let r = parseFloat(e), i = t < 3 && n === "rgb" ? 255 : 1, a = t > 0 && t < 3 && n[0] === "h" ? 1 : 100;
|
|
33578
33561
|
return (r < 0 ? 0 : r > 100 ? 100 : r) / a * i;
|
|
33579
33562
|
}
|
|
33580
33563
|
if (n[t] === "h" || t === 2 && n[n.length - 1] === "h") {
|
|
33581
|
-
if (e in
|
|
33564
|
+
if (e in Wr) return Wr[e];
|
|
33582
33565
|
let t = parseFloat(e);
|
|
33583
33566
|
switch (!0) {
|
|
33584
33567
|
case e.endsWith("turn"):
|
|
@@ -33599,10 +33582,10 @@ function J(e, t) {
|
|
|
33599
33582
|
return r < 0 ? 0 : r > i ? i : r;
|
|
33600
33583
|
}
|
|
33601
33584
|
}
|
|
33602
|
-
function
|
|
33585
|
+
function Kr(e, t, n) {
|
|
33603
33586
|
return n < 0 && (n += 1), n > 1 && --n, (n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e) * 255;
|
|
33604
33587
|
}
|
|
33605
|
-
function
|
|
33588
|
+
function qr(e, t = [
|
|
33606
33589
|
0,
|
|
33607
33590
|
0,
|
|
33608
33591
|
0,
|
|
@@ -33612,11 +33595,11 @@ function Yr(e, t = [
|
|
|
33612
33595
|
if (r === 0) t[2] = t[1] = t[0] = i * 255;
|
|
33613
33596
|
else {
|
|
33614
33597
|
let e = i < .5 ? i * (1 + r) : i + r - i * r, a = 2 * i - e;
|
|
33615
|
-
t[0] =
|
|
33598
|
+
t[0] = Kr(a, e, n + 1 / 3), t[1] = Kr(a, e, n), t[2] = Kr(a, e, n - 1 / 3);
|
|
33616
33599
|
}
|
|
33617
33600
|
return e.length > 3 && (t[3] = e[3]), t;
|
|
33618
33601
|
}
|
|
33619
|
-
function
|
|
33602
|
+
function J(e, t = [
|
|
33620
33603
|
0,
|
|
33621
33604
|
0,
|
|
33622
33605
|
0,
|
|
@@ -33645,7 +33628,7 @@ function Xr(e, t = [
|
|
|
33645
33628
|
}
|
|
33646
33629
|
return e.length > 3 && (t[3] = e[3]), t;
|
|
33647
33630
|
}
|
|
33648
|
-
var
|
|
33631
|
+
var Jr = {
|
|
33649
33632
|
aliceblue: [
|
|
33650
33633
|
240,
|
|
33651
33634
|
248,
|
|
@@ -34389,8 +34372,8 @@ var Zr = {
|
|
|
34389
34372
|
};
|
|
34390
34373
|
//#endregion
|
|
34391
34374
|
//#region src/adornments/categoricalLegend.ts
|
|
34392
|
-
function
|
|
34393
|
-
let { title: r = "", titleFontColor: i = "#000000", titleFont: a = t, titleFontSize: o = 24, entries: s, entryFontColor: c = "#000000", entryFont: l = t, entryFontSize: u = 13, entryShape: d = "rectangle", layout: f = "vertical", background: p = "#ffffff", showBackground: m = !1 } = e, h =
|
|
34375
|
+
function Yr(e, t, n) {
|
|
34376
|
+
let { title: r = "", titleFontColor: i = "#000000", titleFont: a = t, titleFontSize: o = 24, entries: s, entryFontColor: c = "#000000", entryFont: l = t, entryFontSize: u = 13, entryShape: d = "rectangle", layout: f = "vertical", background: p = "#ffffff", showBackground: m = !1 } = e, h = zr([r], a, o), g = s.map((e) => zr([e.label], l, u)), _ = r.trim().length > 0, v, y;
|
|
34394
34377
|
f === "vertical" ? (v = Math.max(h.width, ...g.map((e) => e.width + 15 + 10)) + 30, y = 30 + (_ ? h.height + 20 : 0) + g.reduce((e, t) => e + t.height, 0) + Math.max(g.length - 1, 0) * 20) : (v = Math.max(h.width + 30, 30 + g.reduce((e, t) => e + t.width + 15 + 10, 0) + Math.max(g.length - 1, 0) * 20), y = 30 + (_ ? h.height + 20 : 0) + Math.max(0, ...g.map((e) => e.height)));
|
|
34395
34378
|
let b = [];
|
|
34396
34379
|
m && b.push(`
|
|
@@ -34413,7 +34396,7 @@ function Qr(e, t, n) {
|
|
|
34413
34396
|
font-size="${o}"
|
|
34414
34397
|
fill="${i}"
|
|
34415
34398
|
>
|
|
34416
|
-
${
|
|
34399
|
+
${Cr(r)}
|
|
34417
34400
|
</text>
|
|
34418
34401
|
`), S += h.height + 20);
|
|
34419
34402
|
for (let e = 0; e < s.length; e++) {
|
|
@@ -34460,7 +34443,7 @@ function Qr(e, t, n) {
|
|
|
34460
34443
|
font-size="${u}"
|
|
34461
34444
|
fill="${c}"
|
|
34462
34445
|
>
|
|
34463
|
-
${
|
|
34446
|
+
${Cr(t.label)}
|
|
34464
34447
|
</text>
|
|
34465
34448
|
`), f === "vertical" ? S += n.height + 20 : x += n.width + 15 + 10 + 20;
|
|
34466
34449
|
}
|
|
@@ -34478,24 +34461,24 @@ function Qr(e, t, n) {
|
|
|
34478
34461
|
}
|
|
34479
34462
|
//#endregion
|
|
34480
34463
|
//#region src/adornments/connectedLegend.ts
|
|
34481
|
-
var
|
|
34482
|
-
function
|
|
34464
|
+
var Xr = "ArialMT", Zr = 15;
|
|
34465
|
+
function Qr(e, t, n, r, i, a) {
|
|
34483
34466
|
let o = document.createElement("div");
|
|
34484
34467
|
o.className = "adornment", e.showBackground && (o.style.boxShadow = "0 0 7px 0 rgba(33, 37, 41, 0.25)", o.style.borderRadius = "10px");
|
|
34485
|
-
let s = [e.titleFont ??
|
|
34486
|
-
return
|
|
34468
|
+
let s = [e.titleFont ?? Xr, e.labelFont ?? Xr];
|
|
34469
|
+
return wr(Array.from(new Set(s)), r, i).then(() => o.innerHTML = $r(e, t, n, a)), o;
|
|
34487
34470
|
}
|
|
34488
|
-
function
|
|
34471
|
+
function $r(e, t, n, r) {
|
|
34489
34472
|
let { target: i } = e, a = t.registry?.models?.[i.modelType]?.find((e) => e.id === i.groupId), o = a?.models ?? [], s = a?.choropleth, c = br(a?.fillColor);
|
|
34490
|
-
return !s || !c || a.models.every((e) => !(e.visible ?? !0)) || !Sr(o, c) ?
|
|
34473
|
+
return !s || !c || a.models.every((e) => !(e.visible ?? !0)) || !Sr(o, c) ? ei() : s.colorMode === "categorical" ? ri(e, s, c, r) : s.colorMode === "linear" ? ti(e, a, n, r) : s.colorMode === "quantile" || s.colorMode === "quantize" ? ni(e, a, n, r) : ei();
|
|
34491
34474
|
}
|
|
34492
|
-
function
|
|
34475
|
+
function ei() {
|
|
34493
34476
|
return "\n <svg\n class=\"adornment-svg\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0\"\n height=\"0\"\n viewBox=\"0 0 0 0\"\n >\n </svg>\n ";
|
|
34494
34477
|
}
|
|
34495
|
-
function
|
|
34496
|
-
let i = 15 / 2, { id: a, layout: o = "vertical", labelFont: s =
|
|
34497
|
-
if (y === void 0) return
|
|
34498
|
-
let b = [], [x, S] = At(y.domain()), C = zt(x, S, 4), w =
|
|
34478
|
+
function ti(e, t, n, r) {
|
|
34479
|
+
let i = 15 / 2, { id: a, layout: o = "vertical", labelFont: s = Xr, labelFontSize: c = 13, labelFontColor: l = "#000000", numberFormat: u = ".2~s", title: d = "", titleFont: f = Xr, titleFontSize: p = 14, titleFontColor: m = "#000000", showBackground: h = !1, background: g = "#ffffff" } = e, _ = `gradient-${a}`, v = o === "horizontal", y = gr(t);
|
|
34480
|
+
if (y === void 0) return ei();
|
|
34481
|
+
let b = [], [x, S] = At(y.domain()), C = zt(x, S, 4), w = ii(u), T = C.map((e) => w(e)), E = T.map((e) => zr([e], s, c)), D = [];
|
|
34499
34482
|
for (let e = 0; e < 32; e++) {
|
|
34500
34483
|
let t = e / 31;
|
|
34501
34484
|
D.push(`<stop offset="${t * 100}%" stop-color="${y(x + t * (S - x))}" />`);
|
|
@@ -34508,11 +34491,11 @@ function ii(e, t, n, r) {
|
|
|
34508
34491
|
</linearGradient>
|
|
34509
34492
|
</defs>
|
|
34510
34493
|
`);
|
|
34511
|
-
let M =
|
|
34494
|
+
let M = zr([d], f, p), N = d.trim().length > 0, P = {
|
|
34512
34495
|
width: Math.max(0, ...E.map((e) => e.width)),
|
|
34513
34496
|
height: Math.max(0, ...E.map((e) => e.height)),
|
|
34514
34497
|
ascent: Math.max(0, ...E.map((e) => e.ascent))
|
|
34515
|
-
}, F = N ? M.height + 10 : 0, ee = N ? M.width : 0, I = C.length - 1, te = j(45 * I, Math.ceil(v ? (P.width + 10) * I : (P.height + 10) * I), Math.floor(v ? n.getContainer().clientWidth - 10 -
|
|
34498
|
+
}, F = N ? M.height + 10 : 0, ee = N ? M.width : 0, I = C.length - 1, te = j(45 * I, Math.ceil(v ? (P.width + 10) * I : (P.height + 10) * I), Math.floor(v ? n.getContainer().clientWidth - 10 - Zr * 2 : n.getContainer().clientHeight - 10 - Zr * 2 - F)), ne = Math.ceil(v ? Zr * 2 + Math.max(ee, te) : Zr * 2 + Math.max(ee, 25 + P.width)), re = Math.ceil(v ? Zr * 2 + F + 20 + 5 + P.ascent : Zr * 2 + F + te);
|
|
34516
34499
|
h && b.push(`
|
|
34517
34500
|
<rect
|
|
34518
34501
|
x="0"
|
|
@@ -34524,7 +34507,7 @@ function ii(e, t, n, r) {
|
|
|
34524
34507
|
fill="${g}"
|
|
34525
34508
|
/>
|
|
34526
34509
|
`);
|
|
34527
|
-
let ie =
|
|
34510
|
+
let ie = Zr, ae = Zr;
|
|
34528
34511
|
N && (b.push(`
|
|
34529
34512
|
<text
|
|
34530
34513
|
x="${ie}"
|
|
@@ -34533,7 +34516,7 @@ function ii(e, t, n, r) {
|
|
|
34533
34516
|
font-size="${p}"
|
|
34534
34517
|
fill="${m}"
|
|
34535
34518
|
>
|
|
34536
|
-
${
|
|
34519
|
+
${Cr(d)}
|
|
34537
34520
|
</text>
|
|
34538
34521
|
`), ae += M.height + 10), b.push(`
|
|
34539
34522
|
<rect
|
|
@@ -34565,7 +34548,7 @@ function ii(e, t, n, r) {
|
|
|
34565
34548
|
fill="${l}"
|
|
34566
34549
|
text-anchor="${v ? "middle" : "start"}"
|
|
34567
34550
|
>
|
|
34568
|
-
${
|
|
34551
|
+
${Cr(n)}
|
|
34569
34552
|
</text>
|
|
34570
34553
|
`);
|
|
34571
34554
|
}
|
|
@@ -34581,15 +34564,15 @@ function ii(e, t, n, r) {
|
|
|
34581
34564
|
</svg>
|
|
34582
34565
|
`;
|
|
34583
34566
|
}
|
|
34584
|
-
function
|
|
34567
|
+
function ni(e, t, n, r) {
|
|
34585
34568
|
let i = gr(t), a = i?.range(), o = [], s = 0, c = 0;
|
|
34586
34569
|
if (i && a && a.length > 1) {
|
|
34587
|
-
let { layout: t = "vertical", labelFont: r =
|
|
34570
|
+
let { layout: t = "vertical", labelFont: r = Xr, labelFontSize: l = 13, labelFontColor: u = "#000000", labelStyle: d = "range", numberFormat: f = ".2~s", title: p = "", titleFont: m = Xr, titleFontSize: h = 14, titleFontColor: g = "#000000", showBackground: _ = !1, background: v = "#ffffff" } = e, y = t === "vertical", b = d === "range", x = ii(f), S = b ? a.map((e) => i.invertExtent(e)).map((e, t, n) => t === 0 ? `< ${x(e[1])}` : t === n.length - 1 ? `> ${x(e[0])}` : `${x(e[0])} – ${x(e[1])}`) : a.map((e) => i.invertExtent(e)).reduce((e, t, n) => (n && e.push(x(t[0])), e), []), C = S.map((e) => zr([e], r, l)), w = zr([p], m, h), T = p.trim().length > 0, E = {
|
|
34588
34571
|
width: Math.max(0, ...C.map((e) => e.width)),
|
|
34589
34572
|
height: Math.max(0, ...C.map((e) => e.height)),
|
|
34590
34573
|
ascent: Math.max(0, ...C.map((e) => e.ascent))
|
|
34591
34574
|
}, D = T ? w.height + 10 : 0, O = T ? w.width : 0, k = a.length, A = 45, M = 15 / 2;
|
|
34592
|
-
y ? (A = j(A, Math.ceil(E.height) + 10, Math.floor((n.getContainer().clientHeight - 10 -
|
|
34575
|
+
y ? (A = j(A, Math.ceil(E.height) + 10, Math.floor((n.getContainer().clientHeight - 10 - Zr * 2 - D) / k)), s = Math.ceil(Zr * 2 + D + k * A), c = Math.ceil(Zr * 2 + Math.max(O, 25 + E.width))) : (A = j(A, Math.ceil(E.width) + 10, Math.floor((n.getContainer().clientWidth - 10 - Zr * 2) / k)), c = Math.ceil(Zr * 2 + Math.max(O, k * A)), s = Math.ceil(Zr * 2 + D + 15 + 10 + E.ascent)), _ && o.push(`
|
|
34593
34576
|
<rect
|
|
34594
34577
|
x="0"
|
|
34595
34578
|
y="0"
|
|
@@ -34600,7 +34583,7 @@ function ai(e, t, n, r) {
|
|
|
34600
34583
|
fill="${v}"
|
|
34601
34584
|
/>
|
|
34602
34585
|
`);
|
|
34603
|
-
let N =
|
|
34586
|
+
let N = Zr, P = Zr;
|
|
34604
34587
|
T && (o.push(`
|
|
34605
34588
|
<text
|
|
34606
34589
|
x="${N}"
|
|
@@ -34609,7 +34592,7 @@ function ai(e, t, n, r) {
|
|
|
34609
34592
|
font-size="${h}"
|
|
34610
34593
|
fill="${g}"
|
|
34611
34594
|
>
|
|
34612
|
-
${
|
|
34595
|
+
${Cr(p)}
|
|
34613
34596
|
</text>
|
|
34614
34597
|
`), P += D);
|
|
34615
34598
|
let F = y ? 15 : A, ee = y ? A : 15, I = y ? 0 : A, te = y ? A : 0, ne = b ? 15 : 20, re = y ? `M ${N} ${P + M} v ${A - M} h 15 v ${-(A - M)} a ${M} ${M} 0 0 0 -15 0 z` : `M ${N + M} ${P} h ${A - M} v 15 h ${-(A - M)} a ${M} ${M} 0 0 1 0 -15 z`;
|
|
@@ -34640,7 +34623,7 @@ function ai(e, t, n, r) {
|
|
|
34640
34623
|
y2="${y ? P + .5 : P + ne}"
|
|
34641
34624
|
stroke="#ffffff"
|
|
34642
34625
|
/>
|
|
34643
|
-
`), N =
|
|
34626
|
+
`), N = Zr, P = Zr + D;
|
|
34644
34627
|
for (let e = 0; e < S.length; e++, N += I, P += te) o.push(`
|
|
34645
34628
|
<text
|
|
34646
34629
|
x="${y ? N + 15 + 10 : N + (b ? A / 2 : A)}"
|
|
@@ -34650,7 +34633,7 @@ function ai(e, t, n, r) {
|
|
|
34650
34633
|
font-size="${l}"
|
|
34651
34634
|
fill="${u}"
|
|
34652
34635
|
>
|
|
34653
|
-
${
|
|
34636
|
+
${Cr(S[e])}
|
|
34654
34637
|
</text>
|
|
34655
34638
|
`);
|
|
34656
34639
|
}
|
|
@@ -34666,9 +34649,9 @@ function ai(e, t, n, r) {
|
|
|
34666
34649
|
</svg>
|
|
34667
34650
|
`;
|
|
34668
34651
|
}
|
|
34669
|
-
function
|
|
34652
|
+
function ri(e, t, n, r) {
|
|
34670
34653
|
let i = t.categoricalColors[n];
|
|
34671
|
-
if (i === void 0) return
|
|
34654
|
+
if (i === void 0) return ei();
|
|
34672
34655
|
let a = xr(i.values), o = Object.entries(i.colors).map(([e, n]) => ({
|
|
34673
34656
|
color: e,
|
|
34674
34657
|
label: n.title ?? a[e] ?? t.defaultGroupName,
|
|
@@ -34676,7 +34659,7 @@ function oi(e, t, n, r) {
|
|
|
34676
34659
|
hidden: n.hidden,
|
|
34677
34660
|
svg: ""
|
|
34678
34661
|
})).filter((e) => !e.hidden).sort((e, t) => e.order - t.order);
|
|
34679
|
-
return
|
|
34662
|
+
return Yr({
|
|
34680
34663
|
type: "manualLegend",
|
|
34681
34664
|
id: e.id,
|
|
34682
34665
|
name: e.name,
|
|
@@ -34684,20 +34667,20 @@ function oi(e, t, n, r) {
|
|
|
34684
34667
|
stacking: e.stacking ?? "vertical",
|
|
34685
34668
|
layout: e.layout ?? "vertical",
|
|
34686
34669
|
title: e.title ?? "",
|
|
34687
|
-
titleFont: e.titleFont ??
|
|
34670
|
+
titleFont: e.titleFont ?? Xr,
|
|
34688
34671
|
titleFontColor: e.titleFontColor ?? "#000000",
|
|
34689
34672
|
titleFontSize: e.titleFontSize ?? 14,
|
|
34690
|
-
entryFont: e.labelFont ??
|
|
34673
|
+
entryFont: e.labelFont ?? Xr,
|
|
34691
34674
|
entryFontColor: e.labelFontColor ?? "#000000",
|
|
34692
34675
|
entryFontSize: e.labelFontSize ?? 13,
|
|
34693
34676
|
entryShape: "rectangle",
|
|
34694
34677
|
entries: o,
|
|
34695
34678
|
background: e.background ?? "#ffffff",
|
|
34696
34679
|
showBackground: e.showBackground ?? !1
|
|
34697
|
-
},
|
|
34680
|
+
}, Xr, r);
|
|
34698
34681
|
}
|
|
34699
|
-
function
|
|
34700
|
-
let { decimal: t, group: n } =
|
|
34682
|
+
function ii(e) {
|
|
34683
|
+
let { decimal: t, group: n } = ai();
|
|
34701
34684
|
return bn({
|
|
34702
34685
|
decimal: t,
|
|
34703
34686
|
thousands: n,
|
|
@@ -34705,7 +34688,7 @@ function si(e) {
|
|
|
34705
34688
|
currency: ["", ""]
|
|
34706
34689
|
}).format(e);
|
|
34707
34690
|
}
|
|
34708
|
-
function
|
|
34691
|
+
function ai() {
|
|
34709
34692
|
let e = new Intl.NumberFormat(navigator.languages).formatToParts(1000.1), t = e.find((e) => e.type === "decimal")?.value, n = e.find((e) => e.type === "group")?.value;
|
|
34710
34693
|
return t !== void 0 && n !== void 0 ? {
|
|
34711
34694
|
decimal: t,
|
|
@@ -34717,23 +34700,23 @@ function ci() {
|
|
|
34717
34700
|
}
|
|
34718
34701
|
//#endregion
|
|
34719
34702
|
//#region src/adornments/manualLegend.ts
|
|
34720
|
-
function
|
|
34703
|
+
function oi(e, t, n, r) {
|
|
34721
34704
|
let i = document.createElement("div");
|
|
34722
34705
|
i.className = "adornment", e.showBackground && (i.style.boxShadow = "0 0 7px 0 rgba(33, 37, 41, 0.25)", i.style.borderRadius = "10px");
|
|
34723
34706
|
let a = "ArialMT", o = [e.titleFont ?? a, e.entryFont ?? a];
|
|
34724
|
-
return
|
|
34707
|
+
return wr(Array.from(new Set(o)), t, n).then(() => i.innerHTML = Yr(e, a, r)), i;
|
|
34725
34708
|
}
|
|
34726
34709
|
//#endregion
|
|
34727
34710
|
//#region src/adornments/northArrow.ts
|
|
34728
|
-
function
|
|
34711
|
+
function si(e, t, n) {
|
|
34729
34712
|
let r = document.createElement("div");
|
|
34730
34713
|
r.className = "adornment";
|
|
34731
34714
|
let i = (e.scale ?? 1) * 30, a = i * n;
|
|
34732
34715
|
return r.style.cssText = `width: ${a}px; height: ${a}px`, t.on("move", () => {
|
|
34733
|
-
r.innerHTML =
|
|
34734
|
-
}), r.innerHTML =
|
|
34716
|
+
r.innerHTML = ci(t, i, n);
|
|
34717
|
+
}), r.innerHTML = ci(t, i, n), r;
|
|
34735
34718
|
}
|
|
34736
|
-
function
|
|
34719
|
+
function ci(e, t, n) {
|
|
34737
34720
|
let r = e.getBearing(), i = e.getPitch();
|
|
34738
34721
|
return `
|
|
34739
34722
|
<svg class="adornment-svg" width="${t * n}" height="${t * n}" viewBox="-5 -5 30 30" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -34746,59 +34729,64 @@ function di(e, t, n) {
|
|
|
34746
34729
|
`;
|
|
34747
34730
|
}
|
|
34748
34731
|
//#endregion
|
|
34732
|
+
//#region src/utils/browser.ts
|
|
34733
|
+
function li() {
|
|
34734
|
+
return navigator.userAgent.toLowerCase().indexOf("mobile") >= 0;
|
|
34735
|
+
}
|
|
34736
|
+
//#endregion
|
|
34749
34737
|
//#region src/images/plus.svg?raw
|
|
34750
|
-
var
|
|
34738
|
+
var ui = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.5 1h1v10h-1z\"/><path d=\"M1 6.5v-1h10v1z\"/></svg>\n", di = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11 6.144H1v-1h10v1Z\"/></svg>\n";
|
|
34751
34739
|
//#endregion
|
|
34752
34740
|
//#region src/controls/controls.ts
|
|
34753
|
-
function
|
|
34741
|
+
function fi(e) {
|
|
34754
34742
|
let t = document.createElement("button");
|
|
34755
34743
|
return t.className = e.className, t.innerHTML = `${e.content}`, t.addEventListener("click", e.onClick), t;
|
|
34756
34744
|
}
|
|
34757
34745
|
//#endregion
|
|
34758
34746
|
//#region src/controls/zoomControls.ts
|
|
34759
|
-
function
|
|
34760
|
-
return
|
|
34747
|
+
function pi(e) {
|
|
34748
|
+
return fi({
|
|
34761
34749
|
type: "button",
|
|
34762
34750
|
className: "control-button zoom-in-button",
|
|
34763
|
-
content:
|
|
34751
|
+
content: ui,
|
|
34764
34752
|
onClick: () => e.zoomIn()
|
|
34765
34753
|
});
|
|
34766
34754
|
}
|
|
34767
|
-
function
|
|
34768
|
-
return
|
|
34755
|
+
function mi(e) {
|
|
34756
|
+
return fi({
|
|
34769
34757
|
type: "button",
|
|
34770
34758
|
className: "control-button zoom-out-button",
|
|
34771
|
-
content:
|
|
34759
|
+
content: di,
|
|
34772
34760
|
onClick: () => e.zoomOut()
|
|
34773
34761
|
});
|
|
34774
34762
|
}
|
|
34775
34763
|
//#endregion
|
|
34776
34764
|
//#region src/images/full-screen.svg?raw
|
|
34777
|
-
var
|
|
34765
|
+
var hi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4.774 6.44a.556.556 0 0 1 .832.734l-.047.052L2.897 9.89h1.436a.555.555 0 0 1 .065 1.107L4.333 11H1.556a.556.556 0 0 1-.552-.49L1 10.443V7.667a.556.556 0 0 1 1.107-.065l.004.065v1.436l2.663-2.662ZM10.444 1a.555.555 0 0 1 .552.49l.004.066v2.777a.556.556 0 0 1-1.107.065l-.004-.065V2.897L7.226 5.559a.556.556 0 0 1-.832-.733l.047-.052L9.103 2.11H7.667a.556.556 0 0 1-.065-1.107L7.667 1h2.777Z\"/></svg>\n";
|
|
34778
34766
|
//#endregion
|
|
34779
34767
|
//#region src/utils/fullscreen.ts
|
|
34780
|
-
function
|
|
34768
|
+
function gi() {
|
|
34781
34769
|
return !!(document.fullscreenEnabled || document.mozFullScreenEnabled || document.msFullscreenEnabled || document.webkitFullscreenEnabled);
|
|
34782
34770
|
}
|
|
34783
|
-
function
|
|
34771
|
+
function _i(e) {
|
|
34784
34772
|
return document.fullscreenElement === e || document.webkitFullscreenElement === e || document.mozFullScreenElement === e || document.msFullscreenElement === e;
|
|
34785
34773
|
}
|
|
34786
|
-
function
|
|
34774
|
+
function vi(e) {
|
|
34787
34775
|
e.requestFullscreen ? e.requestFullscreen() : e.mozRequestFullScreen ? e.mozRequestFullScreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.webkitRequestFullscreen && e.webkitRequestFullscreen();
|
|
34788
34776
|
}
|
|
34789
|
-
function
|
|
34777
|
+
function yi() {
|
|
34790
34778
|
document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.msExitFullscreen ? document.msExitFullscreen() : document.webkitCancelFullScreen && document.webkitCancelFullScreen();
|
|
34791
34779
|
}
|
|
34792
34780
|
//#endregion
|
|
34793
34781
|
//#region src/controls/fullscreenControls.ts
|
|
34794
|
-
function
|
|
34795
|
-
return
|
|
34782
|
+
function bi(e) {
|
|
34783
|
+
return fi({
|
|
34796
34784
|
type: "button",
|
|
34797
34785
|
className: "control-button fullscreen-control-button",
|
|
34798
|
-
content:
|
|
34786
|
+
content: hi,
|
|
34799
34787
|
onClick: () => {
|
|
34800
34788
|
let t = e.getContainer();
|
|
34801
|
-
if (
|
|
34789
|
+
if (gi()) _i(t) ? yi() : vi(t);
|
|
34802
34790
|
else {
|
|
34803
34791
|
let e = document.location.href;
|
|
34804
34792
|
e += e.includes("?") ? "&" : "?", e += "close-tab", window.open(e, "_blank");
|
|
@@ -34808,10 +34796,10 @@ function Si(e) {
|
|
|
34808
34796
|
}
|
|
34809
34797
|
//#endregion
|
|
34810
34798
|
//#region src/images/geolocation.svg?raw
|
|
34811
|
-
var
|
|
34812
|
-
let t = 2 * window.devicePixelRatio, n = new
|
|
34799
|
+
var xi = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M5.571.875V0h.858v.875a5.143 5.143 0 0 1 4.696 4.696H12v.858h-.875a5.143 5.143 0 0 1-4.696 4.696V12H5.57v-.875A5.143 5.143 0 0 1 .875 6.429H0V5.57h.875A5.143 5.143 0 0 1 5.571.875Zm0 .86a4.286 4.286 0 0 0-3.835 3.836h.835v.858h-.835a4.286 4.286 0 0 0 3.835 3.835V9.43h.858v.835a4.285 4.285 0 0 0 3.835-3.835H9.43v-.86h.835A4.285 4.285 0 0 0 6.43 1.736v.835h-.86v-.835Zm-.177 3.659a.857.857 0 1 1 1.212 1.212.857.857 0 0 1-1.212-1.212Z\"/></svg>\n", Si = "<svg width=\"34\" viewBox=\"5 5 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#a)\" fill=\"#343A40\"><path d=\"M15.016 22.656a5.797 5.797 0 0 1-1.016-.46c-2.858-1.65-3.846-5.338-2.196-8.196 1.65-2.858 5.338-3.846 8.196-2.196 2.858 1.65 3.846 5.338 2.196 8.196-.2.346-.434.673-.694.962l2.933 2.72A10.1 10.1 0 0 0 25.66 22c2.75-4.763 1.103-10.91-3.66-13.66S11.09 7.237 8.34 12 7.237 22.91 12 25.66a9.61 9.61 0 0 0 1.635.748l1.381-3.752Z\"/><path d=\"m11.01 17.183-3.999.06a10.051 10.051 0 0 0 6.427 9.097l1.484-3.714a6.025 6.025 0 0 1-3.913-5.443Zm13.284 5.183 1-1.732-2.598-1.5-1 1.732 2.598 1.5Zm-3.428-10.062 1.5-2.598-1.732-1-1.5 2.598 1.732 1Zm-9.562 2.562 1-1.732-2.598-1.5-1 1.732 2.598 1.5Z\"/><path d=\"m13.366 25.294 1.5-2.598-1.732-1-1.5 2.598 1.732 1Z\"/></g><defs><clipPath id=\"a\"><path fill=\"#fff\" d=\"m33.393 12.607-12 20.784-20.785-12 12-20.784z\"/></clipPath></defs></svg>\n", Ci = "<svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g filter=\"url(#a)\"><circle cx=\"16\" cy=\"16\" r=\"10\" fill=\"#349CF2\"/><circle cx=\"16\" cy=\"16\" r=\"9\" stroke=\"#fff\" stroke-width=\"2\"/></g><defs><filter id=\"a\" x=\"0\" y=\"0\" width=\"32\" height=\"32\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"/><feColorMatrix in=\"SourceAlpha\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/><feOffset dy=\"4\"/><feGaussianBlur stdDeviation=\"2\"/><feComposite in2=\"hardAlpha\" operator=\"out\"/><feColorMatrix values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0\"/><feBlend in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_15_3175\"/><feBlend in=\"SourceGraphic\" in2=\"effect1_dropShadow_15_3175\" result=\"shape\"/></filter></defs></svg>\n", wi = (e) => {
|
|
34800
|
+
let t = 2 * window.devicePixelRatio, n = new Fr(e).getMapLibreImageKey(Ci, t);
|
|
34813
34801
|
e.setLayoutProperty("location-dot", "icon-image", n);
|
|
34814
|
-
},
|
|
34802
|
+
}, Ti = (e) => {
|
|
34815
34803
|
e.getSource("location-circle") || e.addSource("location-circle", {
|
|
34816
34804
|
type: "geojson",
|
|
34817
34805
|
data: {
|
|
@@ -34848,8 +34836,8 @@ var Ci = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34848
34836
|
"mc-name": "location dot",
|
|
34849
34837
|
"mc-skip-load": !0
|
|
34850
34838
|
}
|
|
34851
|
-
}, "mc-before-names"),
|
|
34852
|
-
},
|
|
34839
|
+
}, "mc-before-names"), wi(e);
|
|
34840
|
+
}, Ei = (e, t, n) => {
|
|
34853
34841
|
let r = e.getSource("location-dot");
|
|
34854
34842
|
r && r.setData({
|
|
34855
34843
|
type: "Feature",
|
|
@@ -34859,7 +34847,7 @@ var Ci = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34859
34847
|
},
|
|
34860
34848
|
properties: {}
|
|
34861
34849
|
});
|
|
34862
|
-
},
|
|
34850
|
+
}, Di = (e, t, n) => {
|
|
34863
34851
|
let r = n / 1e3, i = [], a = r / (111.32 * Math.cos(t * Math.PI / 180)), o = r / 110.574;
|
|
34864
34852
|
for (let n = 0; n < 64; n++) {
|
|
34865
34853
|
let r = n / 64 * (2 * Math.PI), s = a * Math.cos(r), c = o * Math.sin(r);
|
|
@@ -34875,7 +34863,7 @@ var Ci = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34875
34863
|
}
|
|
34876
34864
|
}]
|
|
34877
34865
|
};
|
|
34878
|
-
},
|
|
34866
|
+
}, Oi = () => {
|
|
34879
34867
|
let e = document.querySelector(".map"), t = document.createElement("div");
|
|
34880
34868
|
t.classList.add("location-notification"), t.textContent = "Geolocation is not available", e?.appendChild(t), setTimeout(() => {
|
|
34881
34869
|
e?.removeChild(t);
|
|
@@ -34883,7 +34871,7 @@ var Ci = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentCo
|
|
|
34883
34871
|
};
|
|
34884
34872
|
//#endregion
|
|
34885
34873
|
//#region src/controls/geolocationControls.ts
|
|
34886
|
-
function
|
|
34874
|
+
function ki(e) {
|
|
34887
34875
|
let t = !1, n = (e) => {
|
|
34888
34876
|
let n = document.querySelector(".geolocation-button"), r = n?.querySelector(".geolocation-icon"), i = n?.querySelector(".locating-icon");
|
|
34889
34877
|
r && i && (r.classList.toggle("active", !e), i.classList.toggle("active", e)), t = e;
|
|
@@ -34895,21 +34883,21 @@ function ji(e) {
|
|
|
34895
34883
|
duration: 1e3
|
|
34896
34884
|
}) : e.setCenter && e.setCenter(o);
|
|
34897
34885
|
let s = e.getSource("location-circle");
|
|
34898
|
-
s && s.setData(
|
|
34886
|
+
s && s.setData(Di(r, i, a / 2)), Ei(e, r, i), e.once("moveend", () => n(!1));
|
|
34899
34887
|
}, i = (e) => {
|
|
34900
34888
|
console.error("Geolocation error:", e), n(!1);
|
|
34901
34889
|
};
|
|
34902
|
-
return
|
|
34890
|
+
return fi({
|
|
34903
34891
|
type: "button",
|
|
34904
34892
|
className: "control-button geolocation-button",
|
|
34905
34893
|
content: `
|
|
34906
|
-
<div class="location-icon geolocation-icon active">${
|
|
34907
|
-
<div class="location-icon locating-icon">${
|
|
34894
|
+
<div class="location-icon geolocation-icon active">${xi}</div>
|
|
34895
|
+
<div class="location-icon locating-icon">${Si}</div>
|
|
34908
34896
|
`,
|
|
34909
34897
|
onClick: () => {
|
|
34910
34898
|
if (!t) {
|
|
34911
|
-
if (e.getSource("location-circle") ||
|
|
34912
|
-
|
|
34899
|
+
if (e.getSource("location-circle") || Ti(e), n(!0), !navigator.geolocation) {
|
|
34900
|
+
Oi(), n(!1);
|
|
34913
34901
|
return;
|
|
34914
34902
|
}
|
|
34915
34903
|
navigator.geolocation.getCurrentPosition(r, i, {
|
|
@@ -34922,14 +34910,14 @@ function ji(e) {
|
|
|
34922
34910
|
}
|
|
34923
34911
|
//#endregion
|
|
34924
34912
|
//#region src/images/refresh.svg?raw
|
|
34925
|
-
var
|
|
34913
|
+
var Ai = "<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6.155 1.146A.546.546 0 0 1 6.53 1c.14 0 .275.053.375.146l1.588 1.5c.1.094.155.221.155.354 0 .132-.056.26-.155.353l-1.588 1.5a.546.546 0 0 1-.373.14.545.545 0 0 1-.37-.146.487.487 0 0 1-.154-.349.486.486 0 0 1 .148-.352L6.84 3.5H6c-1.878 0-3.441 1.476-3.441 3.25S4.122 10 6 10s3.441-1.476 3.441-3.25c0-.133.056-.26.155-.354a.546.546 0 0 1 .375-.146c.14 0 .275.053.374.146.1.094.155.221.155.354C10.5 9.076 8.463 11 6 11S1.5 9.076 1.5 6.75 3.537 2.5 6 2.5h.84l-.685-.647A.486.486 0 0 1 6 1.5c0-.133.056-.26.155-.354Z\"/></svg>\n";
|
|
34926
34914
|
//#endregion
|
|
34927
34915
|
//#region src/controls/refreshMapControls.ts
|
|
34928
|
-
function
|
|
34929
|
-
return
|
|
34916
|
+
function ji(e, t) {
|
|
34917
|
+
return fi({
|
|
34930
34918
|
type: "button",
|
|
34931
34919
|
className: "control-button refresh-button",
|
|
34932
|
-
content:
|
|
34920
|
+
content: Ai,
|
|
34933
34921
|
onClick: () => {
|
|
34934
34922
|
e.easeTo({
|
|
34935
34923
|
center: t.center,
|
|
@@ -34942,7 +34930,7 @@ function Ni(e, t) {
|
|
|
34942
34930
|
}
|
|
34943
34931
|
//#endregion
|
|
34944
34932
|
//#region src/images/search.svg?raw
|
|
34945
|
-
var
|
|
34933
|
+
var Mi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"currentColor\"><path d=\"M5.374.952a4.546 4.546 0 0 1 4.656 4.175 4.55 4.55 0 0 1-.958 3.184l1.824 1.81a.55.55 0 0 1 0 .765.55.55 0 0 1-.602.121.6.6 0 0 1-.179-.12l-1.807-1.81A4.544 4.544 0 0 1 .953 5.376 4.553 4.553 0 0 1 5.374.952m1.454 1.37a3.447 3.447 0 0 0-4.505 4.51 3.45 3.45 0 0 0 3.186 2.13A3.45 3.45 0 0 0 8.957 5.51a3.455 3.455 0 0 0-2.129-3.187\"/></svg>\n", Ni = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"currentColor\"><path d=\"m7.038 5.96 3.03 3.03L13.1 5.958l1.01 1.01L11.078 10l3.031 3.032-1.01 1.01-3.031-3.031-3.03 3.028-1.01-1.01L9.059 10l-3.03-3.03z\"/></svg>\n", Pi = {
|
|
34946
34934
|
da_DK: {
|
|
34947
34935
|
search: "Search",
|
|
34948
34936
|
videoAlert: "The video will only work when you publish the map",
|
|
@@ -34993,17 +34981,17 @@ var Pi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" v
|
|
|
34993
34981
|
macHelpText: "Gebruik ⌘ + Scroll om de kaart te zoomen"
|
|
34994
34982
|
}
|
|
34995
34983
|
};
|
|
34996
|
-
function
|
|
34997
|
-
let e = navigator.language.replace("-", "_"), t = Object.keys(
|
|
34984
|
+
function Fi() {
|
|
34985
|
+
let e = navigator.language.replace("-", "_"), t = Object.keys(Pi);
|
|
34998
34986
|
return t.find((t) => t === e) ?? t.find((t) => t.split("_")[0] === e.split("_")[0]) ?? "en_GB";
|
|
34999
34987
|
}
|
|
35000
|
-
var
|
|
35001
|
-
function
|
|
35002
|
-
return Ii
|
|
34988
|
+
var Ii = Fi();
|
|
34989
|
+
function Li(e) {
|
|
34990
|
+
return Pi[Ii][e] ?? e;
|
|
35003
34991
|
}
|
|
35004
34992
|
//#endregion
|
|
35005
34993
|
//#region src/utils/graphhopper.ts
|
|
35006
|
-
var
|
|
34994
|
+
var Ri = class {
|
|
35007
34995
|
async getLocationInBounds(e, t, n = 10) {
|
|
35008
34996
|
try {
|
|
35009
34997
|
let r = await this._callGraphHopper({
|
|
@@ -35018,7 +35006,7 @@ var Bi = class {
|
|
|
35018
35006
|
}
|
|
35019
35007
|
async _callGraphHopper(e) {
|
|
35020
35008
|
let t = new URLSearchParams(e);
|
|
35021
|
-
t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale",
|
|
35009
|
+
t.append("key", "c5c40ac9-ed73-4e20-aed6-cfe495604ca8"), t.append("locale", Ii.slice(0, 2));
|
|
35022
35010
|
let n = { headers: { Accept: "application/json" } }, r = `https://graphhopper.com/api/1/geocode?${t}`;
|
|
35023
35011
|
return await (await fetch(r, n)).json();
|
|
35024
35012
|
}
|
|
@@ -35045,7 +35033,7 @@ var Bi = class {
|
|
|
35045
35033
|
].filter(Boolean).join(", ")
|
|
35046
35034
|
}));
|
|
35047
35035
|
}
|
|
35048
|
-
},
|
|
35036
|
+
}, zi = class {
|
|
35049
35037
|
map;
|
|
35050
35038
|
mapContainer;
|
|
35051
35039
|
container;
|
|
@@ -35055,7 +35043,7 @@ var Bi = class {
|
|
|
35055
35043
|
inputWrapper;
|
|
35056
35044
|
button;
|
|
35057
35045
|
isOpen = !1;
|
|
35058
|
-
geocoder = new
|
|
35046
|
+
geocoder = new Ri();
|
|
35059
35047
|
suggestions = [];
|
|
35060
35048
|
items = [];
|
|
35061
35049
|
index = 0;
|
|
@@ -35064,9 +35052,9 @@ var Bi = class {
|
|
|
35064
35052
|
this.map = e, this.container = document.createElement("div"), this.control = document.createElement("div"), this.input = document.createElement("input"), this.dropdown = document.createElement("div"), this.inputWrapper = document.createElement("div"), this.button = document.createElement("button"), this.mapContainer = this.map.getContainer();
|
|
35065
35053
|
}
|
|
35066
35054
|
init() {
|
|
35067
|
-
this.container.className = "geocoder-container", this.control.className = "geocoder-control", this.input.className = "geocoder-input", this.dropdown.className = "geocoder-dropdown", this.inputWrapper.className = "geocoder-input-wrapper", this.button.className = "control-button", this.input.type = "text", this.input.placeholder =
|
|
35055
|
+
this.container.className = "geocoder-container", this.control.className = "geocoder-control", this.input.className = "geocoder-input", this.dropdown.className = "geocoder-dropdown", this.inputWrapper.className = "geocoder-input-wrapper", this.button.className = "control-button", this.input.type = "text", this.input.placeholder = Li("search"), this.button.innerHTML = Mi;
|
|
35068
35056
|
let e = document.createElement("button");
|
|
35069
|
-
e.className = "geocoder-clear", e.innerHTML =
|
|
35057
|
+
e.className = "geocoder-clear", e.innerHTML = Ni;
|
|
35070
35058
|
let t = document.createElement("div");
|
|
35071
35059
|
return t.className = "geocoder-scrollwrapper", t.append(this.dropdown), this.inputWrapper.append(this.input, e), this.control.append(this.button, this.inputWrapper, t), e.addEventListener("click", () => this.clearAll()), this.button.addEventListener("click", () => this.toggle()), this.input.addEventListener("input", () => this.onInput()), this.input.addEventListener("keydown", (e) => this.onKeyDown(e)), this.dropdown.addEventListener("mousemove", (e) => this.onMouseMove(e)), this.mapContainer.addEventListener("mousedown", (e) => this.clickOutside(e)), window.addEventListener("resize", () => this.setMaxSizes()), this.setMaxSizes(), this.updateVisibility(), this.container.append(this.control), this.container;
|
|
35072
35060
|
}
|
|
@@ -35149,25 +35137,25 @@ var Bi = class {
|
|
|
35149
35137
|
};
|
|
35150
35138
|
//#endregion
|
|
35151
35139
|
//#region src/controls/webControls.ts
|
|
35152
|
-
function
|
|
35140
|
+
function Bi(e, t, n) {
|
|
35153
35141
|
let r = document.createElement("div");
|
|
35154
35142
|
r.classList.add("web-control", "adornment");
|
|
35155
35143
|
let i = e.buttons.flatMap((e) => e === "zoom" ? ["zoomIn", "zoomOut"] : e);
|
|
35156
|
-
return (
|
|
35144
|
+
return (li() ? i.filter((e) => e !== "zoomIn" && e !== "zoomOut") : i).forEach((e) => {
|
|
35157
35145
|
let i;
|
|
35158
|
-
if (e === "zoomIn") i =
|
|
35159
|
-
else if (e === "zoomOut") i =
|
|
35160
|
-
else if (e === "fullscreen") i =
|
|
35161
|
-
else if (e === "geolocation") i =
|
|
35162
|
-
else if (e === "refresh") i =
|
|
35163
|
-
else if (e === "search") i = new
|
|
35146
|
+
if (e === "zoomIn") i = pi(t);
|
|
35147
|
+
else if (e === "zoomOut") i = mi(t);
|
|
35148
|
+
else if (e === "fullscreen") i = bi(t);
|
|
35149
|
+
else if (e === "geolocation") i = ki(t);
|
|
35150
|
+
else if (e === "refresh") i = ji(t, n);
|
|
35151
|
+
else if (e === "search") i = new zi(t).init();
|
|
35164
35152
|
else return;
|
|
35165
35153
|
r.appendChild(i);
|
|
35166
35154
|
}), r;
|
|
35167
35155
|
}
|
|
35168
35156
|
//#endregion
|
|
35169
35157
|
//#region src/adornments/copyright.ts
|
|
35170
|
-
var
|
|
35158
|
+
var Vi = {
|
|
35171
35159
|
here: {
|
|
35172
35160
|
href: "https://www.here.com/",
|
|
35173
35161
|
label: "© HERE 2025"
|
|
@@ -35181,16 +35169,16 @@ var Ui = {
|
|
|
35181
35169
|
label: "© OpenStreetMap"
|
|
35182
35170
|
}
|
|
35183
35171
|
};
|
|
35184
|
-
function
|
|
35172
|
+
function Hi(e, t, n) {
|
|
35185
35173
|
let r = document.createElement("div");
|
|
35186
35174
|
r.className = "adornment";
|
|
35187
35175
|
let i = () => {
|
|
35188
|
-
r.innerHTML =
|
|
35176
|
+
r.innerHTML = Gi(t, e, n);
|
|
35189
35177
|
};
|
|
35190
35178
|
return i(), t.on("attributionchange", i), t.on("zoomend", i), r;
|
|
35191
35179
|
}
|
|
35192
|
-
function
|
|
35193
|
-
let t = Object.values(e.style.sourceCaches), n = [
|
|
35180
|
+
function Ui(e) {
|
|
35181
|
+
let t = Object.values(e.style.sourceCaches), n = [Vi.mapcreator], r = {
|
|
35194
35182
|
osm: !1,
|
|
35195
35183
|
here: !1
|
|
35196
35184
|
};
|
|
@@ -35201,16 +35189,16 @@ function Gi(e) {
|
|
|
35201
35189
|
"attribution" in e && typeof e.attribution == "string" && (e.attribution.includes("OpenStreetMap") && (r.osm = !0), e.attribution.includes("HERE") && (r.here = !0));
|
|
35202
35190
|
}
|
|
35203
35191
|
}
|
|
35204
|
-
return r.osm && n.push(
|
|
35192
|
+
return r.osm && n.push(Vi.openStreetMap), r.here && n.push(Vi.here), n;
|
|
35205
35193
|
}
|
|
35206
|
-
function
|
|
35194
|
+
function Wi(e, t, n) {
|
|
35207
35195
|
let r = document.createElement("span");
|
|
35208
35196
|
r.style.fontFamily = t, r.style.fontSize = `${n}px`, r.style.position = "absolute", r.style.visibility = "hidden", r.innerText = e, document.body.appendChild(r);
|
|
35209
35197
|
let i = Math.max(r.offsetWidth, 1);
|
|
35210
35198
|
return r.remove(), i;
|
|
35211
35199
|
}
|
|
35212
|
-
function
|
|
35213
|
-
let { color: r = "#000000", font: i = "Arial, sans-serif", fontSize: a = 10, orientation: o = "horizontal", position: s } = t, c =
|
|
35200
|
+
function Gi(e, t, n) {
|
|
35201
|
+
let { color: r = "#000000", font: i = "Arial, sans-serif", fontSize: a = 10, orientation: o = "horizontal", position: s } = t, c = Ui(e), l = Wi(c.map(({ label: e }) => e).join(" "), i, a), u = a * 1.2, d = o === "vertical", f = ["top_left", "bottom_left"].includes(s), p = d ? u : l, m = d ? l : u, h = d ? f ? -90 : 90 : 0, g = d ? f ? .38 * a : .3 * a : .38 * a, _ = c.map((e) => `<a href="${e.href}" target="_blank">${e.label}</a>`).join(" ");
|
|
35214
35202
|
return `
|
|
35215
35203
|
<svg
|
|
35216
35204
|
class="adornment-svg"
|
|
@@ -35235,15 +35223,15 @@ function qi(e, t, n) {
|
|
|
35235
35223
|
}
|
|
35236
35224
|
//#endregion
|
|
35237
35225
|
//#region node_modules/@turf/area/dist/esm/index.js
|
|
35238
|
-
function
|
|
35239
|
-
return Hn(e, (e, t) => e +
|
|
35226
|
+
function Ki(e) {
|
|
35227
|
+
return Hn(e, (e, t) => e + qi(t), 0);
|
|
35240
35228
|
}
|
|
35241
|
-
function
|
|
35229
|
+
function qi(e) {
|
|
35242
35230
|
let t = 0, n;
|
|
35243
35231
|
switch (e.type) {
|
|
35244
|
-
case "Polygon": return
|
|
35232
|
+
case "Polygon": return Ji(e.coordinates);
|
|
35245
35233
|
case "MultiPolygon":
|
|
35246
|
-
for (n = 0; n < e.coordinates.length; n++) t +=
|
|
35234
|
+
for (n = 0; n < e.coordinates.length; n++) t += Ji(e.coordinates[n]);
|
|
35247
35235
|
return t;
|
|
35248
35236
|
case "Point":
|
|
35249
35237
|
case "MultiPoint":
|
|
@@ -35252,34 +35240,34 @@ function Yi(e) {
|
|
|
35252
35240
|
}
|
|
35253
35241
|
return 0;
|
|
35254
35242
|
}
|
|
35255
|
-
function
|
|
35243
|
+
function Ji(e) {
|
|
35256
35244
|
let t = 0;
|
|
35257
35245
|
if (e && e.length > 0) {
|
|
35258
|
-
t += Math.abs(
|
|
35259
|
-
for (let n = 1; n < e.length; n++) t -= Math.abs(
|
|
35246
|
+
t += Math.abs(Zi(e[0]));
|
|
35247
|
+
for (let n = 1; n < e.length; n++) t -= Math.abs(Zi(e[n]));
|
|
35260
35248
|
}
|
|
35261
35249
|
return t;
|
|
35262
35250
|
}
|
|
35263
|
-
var
|
|
35264
|
-
function
|
|
35251
|
+
var Yi = Nn * Nn / 2, Xi = Math.PI / 180;
|
|
35252
|
+
function Zi(e) {
|
|
35265
35253
|
let t = e.length - 1;
|
|
35266
35254
|
if (t <= 2) return 0;
|
|
35267
35255
|
let n = 0, r = 0;
|
|
35268
35256
|
for (; r < t;) {
|
|
35269
|
-
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] *
|
|
35257
|
+
let i = e[r], a = e[r + 1 === t ? 0 : r + 1], o = e[r + 2 >= t ? (r + 2) % t : r + 2], s = i[0] * Xi, c = a[1] * Xi, l = o[0] * Xi;
|
|
35270
35258
|
n += (l - s) * Math.sin(c), r++;
|
|
35271
35259
|
}
|
|
35272
|
-
return n *
|
|
35260
|
+
return n * Yi;
|
|
35273
35261
|
}
|
|
35274
35262
|
//#endregion
|
|
35275
35263
|
//#region node_modules/topojson-client/src/identity.js
|
|
35276
|
-
function
|
|
35264
|
+
function Qi(e) {
|
|
35277
35265
|
return e;
|
|
35278
35266
|
}
|
|
35279
35267
|
//#endregion
|
|
35280
35268
|
//#region node_modules/topojson-client/src/transform.js
|
|
35281
|
-
function
|
|
35282
|
-
if (e == null) return
|
|
35269
|
+
function $i(e) {
|
|
35270
|
+
if (e == null) return Qi;
|
|
35283
35271
|
var t, n, r = e.scale[0], i = e.scale[1], a = e.translate[0], o = e.translate[1];
|
|
35284
35272
|
return function(e, s) {
|
|
35285
35273
|
s || (t = n = 0);
|
|
@@ -35290,21 +35278,21 @@ function ta(e) {
|
|
|
35290
35278
|
}
|
|
35291
35279
|
//#endregion
|
|
35292
35280
|
//#region node_modules/topojson-client/src/reverse.js
|
|
35293
|
-
function
|
|
35281
|
+
function ea(e, t) {
|
|
35294
35282
|
for (var n, r = e.length, i = r - t; i < --r;) n = e[i], e[i++] = e[r], e[r] = n;
|
|
35295
35283
|
}
|
|
35296
35284
|
//#endregion
|
|
35297
35285
|
//#region node_modules/topojson-client/src/feature.js
|
|
35298
|
-
function
|
|
35286
|
+
function ta(e, t) {
|
|
35299
35287
|
return typeof t == "string" && (t = e.objects[t]), t.type === "GeometryCollection" ? {
|
|
35300
35288
|
type: "FeatureCollection",
|
|
35301
35289
|
features: t.geometries.map(function(t) {
|
|
35302
|
-
return
|
|
35290
|
+
return na(e, t);
|
|
35303
35291
|
})
|
|
35304
|
-
} :
|
|
35292
|
+
} : na(e, t);
|
|
35305
35293
|
}
|
|
35306
|
-
function
|
|
35307
|
-
var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a =
|
|
35294
|
+
function na(e, t) {
|
|
35295
|
+
var n = t.id, r = t.bbox, i = t.properties == null ? {} : t.properties, a = ra(e, t);
|
|
35308
35296
|
return n == null && r == null ? {
|
|
35309
35297
|
type: "Feature",
|
|
35310
35298
|
properties: i,
|
|
@@ -35322,12 +35310,12 @@ function ia(e, t) {
|
|
|
35322
35310
|
geometry: a
|
|
35323
35311
|
};
|
|
35324
35312
|
}
|
|
35325
|
-
function
|
|
35326
|
-
var n =
|
|
35313
|
+
function ra(e, t) {
|
|
35314
|
+
var n = $i(e.transform), r = e.arcs;
|
|
35327
35315
|
function i(e, t) {
|
|
35328
35316
|
t.length && t.pop();
|
|
35329
35317
|
for (var i = r[e < 0 ? ~e : e], a = 0, o = i.length; a < o; ++a) t.push(n(i[a], a));
|
|
35330
|
-
e < 0 &&
|
|
35318
|
+
e < 0 && ea(t, o);
|
|
35331
35319
|
}
|
|
35332
35320
|
function a(e) {
|
|
35333
35321
|
return n(e);
|
|
@@ -35379,7 +35367,7 @@ function aa(e, t) {
|
|
|
35379
35367
|
}
|
|
35380
35368
|
//#endregion
|
|
35381
35369
|
//#region node_modules/bignumber.js/bignumber.mjs
|
|
35382
|
-
var
|
|
35370
|
+
var ia = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, aa = Math.ceil, oa = Math.floor, sa = "[BigNumber Error] ", Y = sa + "Number primitive has more than 15 significant digits: ", ca = 0x5af3107a4000, X = 14, la = 9007199254740991, ua = [
|
|
35383
35371
|
1,
|
|
35384
35372
|
10,
|
|
35385
35373
|
100,
|
|
@@ -35394,8 +35382,8 @@ var oa = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, sa = Math.ceil, Y = Math.
|
|
|
35394
35382
|
1e11,
|
|
35395
35383
|
0xe8d4a51000,
|
|
35396
35384
|
0x9184e72a000
|
|
35397
|
-
],
|
|
35398
|
-
function
|
|
35385
|
+
], da = 1e7, fa = 1e9;
|
|
35386
|
+
function Z(e) {
|
|
35399
35387
|
var t, n, r, i = v.prototype = {
|
|
35400
35388
|
constructor: v,
|
|
35401
35389
|
toString: null,
|
|
@@ -35426,15 +35414,15 @@ function ma(e) {
|
|
|
35426
35414
|
}
|
|
35427
35415
|
h = String(e);
|
|
35428
35416
|
} else {
|
|
35429
|
-
if (!
|
|
35417
|
+
if (!ia.test(h = String(e))) return r(y, h, p);
|
|
35430
35418
|
y.s = h.charCodeAt(0) == 45 ? (h = h.slice(1), -1) : 1;
|
|
35431
35419
|
}
|
|
35432
35420
|
(l = h.indexOf(".")) > -1 && (h = h.replace(".", "")), (f = h.search(/e/i)) > 0 ? (l < 0 && (l = f), l += +h.slice(f + 1), h = h.substring(0, f)) : l < 0 && (l = h.length);
|
|
35433
35421
|
} else {
|
|
35434
|
-
if (
|
|
35422
|
+
if (ga(t, 2, g.length, "Base"), t == 10 && _) return y = new v(e), S(y, o + y.e + 1, s);
|
|
35435
35423
|
if (h = String(e), p = typeof e == "number") {
|
|
35436
35424
|
if (e * 0 != 0) return r(y, h, p, t);
|
|
35437
|
-
if (y.s = 1 / e < 0 ? (h = h.slice(1), -1) : 1, v.DEBUG && h.replace(/^0\.0*|\./, "").length > 15) throw Error(
|
|
35425
|
+
if (y.s = 1 / e < 0 ? (h = h.slice(1), -1) : 1, v.DEBUG && h.replace(/^0\.0*|\./, "").length > 15) throw Error(Y + e);
|
|
35438
35426
|
} else y.s = h.charCodeAt(0) === 45 ? (h = h.slice(1), -1) : 1;
|
|
35439
35427
|
for (i = g.slice(0, t), l = f = 0, m = h.length; f < m; f++) if (i.indexOf(a = h.charAt(f)) < 0) {
|
|
35440
35428
|
if (a == ".") {
|
|
@@ -35453,7 +35441,7 @@ function ma(e) {
|
|
|
35453
35441
|
for (f = 0; h.charCodeAt(f) === 48; f++);
|
|
35454
35442
|
for (m = h.length; h.charCodeAt(--m) === 48;);
|
|
35455
35443
|
if (h = h.slice(f, ++m)) {
|
|
35456
|
-
if (m -= f, p && v.DEBUG && m > 15 && (e >
|
|
35444
|
+
if (m -= f, p && v.DEBUG && m > 15 && (e > la || e !== oa(e))) throw Error(Y + y.s * e);
|
|
35457
35445
|
if ((l = l - f - 1) > d) y.c = y.e = null;
|
|
35458
35446
|
else if (l < u) y.c = [y.e = 0];
|
|
35459
35447
|
else {
|
|
@@ -35466,21 +35454,21 @@ function ma(e) {
|
|
|
35466
35454
|
}
|
|
35467
35455
|
} else y.c = [y.e = 0];
|
|
35468
35456
|
}
|
|
35469
|
-
v.clone =
|
|
35457
|
+
v.clone = Z, v.ROUND_UP = 0, v.ROUND_DOWN = 1, v.ROUND_CEIL = 2, v.ROUND_FLOOR = 3, v.ROUND_HALF_UP = 4, v.ROUND_HALF_DOWN = 5, v.ROUND_HALF_EVEN = 6, v.ROUND_HALF_CEIL = 7, v.ROUND_HALF_FLOOR = 8, v.EUCLID = 9, v.config = v.set = function(e) {
|
|
35470
35458
|
var t, n;
|
|
35471
35459
|
if (e != null) if (typeof e == "object") {
|
|
35472
|
-
if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (n = e[t],
|
|
35473
|
-
else if (
|
|
35474
|
-
else throw Error(
|
|
35460
|
+
if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (n = e[t], ga(n, 0, fa, t), o = n), e.hasOwnProperty(t = "ROUNDING_MODE") && (n = e[t], ga(n, 0, 8, t), s = n), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (n = e[t], n && n.pop ? (ga(n[0], -fa, 0, t), ga(n[1], 0, fa, t), c = n[0], l = n[1]) : (ga(n, -fa, fa, t), c = -(l = n < 0 ? -n : n))), e.hasOwnProperty(t = "RANGE")) if (n = e[t], n && n.pop) ga(n[0], -fa, -1, t), ga(n[1], 1, fa, t), u = n[0], d = n[1];
|
|
35461
|
+
else if (ga(n, -fa, fa, t), n) u = -(d = n < 0 ? -n : n);
|
|
35462
|
+
else throw Error(sa + t + " cannot be zero: " + n);
|
|
35475
35463
|
if (e.hasOwnProperty(t = "CRYPTO")) if (n = e[t], n === !!n) if (n) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) f = n;
|
|
35476
|
-
else throw f = !n, Error(
|
|
35464
|
+
else throw f = !n, Error(sa + "crypto unavailable");
|
|
35477
35465
|
else f = n;
|
|
35478
|
-
else throw Error(
|
|
35479
|
-
if (e.hasOwnProperty(t = "MODULO_MODE") && (n = e[t],
|
|
35480
|
-
else throw Error(
|
|
35466
|
+
else throw Error(sa + t + " not true or false: " + n);
|
|
35467
|
+
if (e.hasOwnProperty(t = "MODULO_MODE") && (n = e[t], ga(n, 0, 9, t), p = n), e.hasOwnProperty(t = "POW_PRECISION") && (n = e[t], ga(n, 0, fa, t), m = n), e.hasOwnProperty(t = "FORMAT")) if (n = e[t], typeof n == "object") h = n;
|
|
35468
|
+
else throw Error(sa + t + " not an object: " + n);
|
|
35481
35469
|
if (e.hasOwnProperty(t = "ALPHABET")) if (n = e[t], typeof n == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(n)) _ = n.slice(0, 10) == "0123456789", g = n;
|
|
35482
|
-
else throw Error(
|
|
35483
|
-
} else throw Error(
|
|
35470
|
+
else throw Error(sa + t + " invalid: " + n);
|
|
35471
|
+
} else throw Error(sa + "Object expected: " + e);
|
|
35484
35472
|
return {
|
|
35485
35473
|
DECIMAL_PLACES: o,
|
|
35486
35474
|
ROUNDING_MODE: s,
|
|
@@ -35497,39 +35485,39 @@ function ma(e) {
|
|
|
35497
35485
|
if (!v.DEBUG) return !0;
|
|
35498
35486
|
var t, n, r = e.c, i = e.e, a = e.s;
|
|
35499
35487
|
out: if ({}.toString.call(r) == "[object Array]") {
|
|
35500
|
-
if ((a === 1 || a === -1) && i >= -
|
|
35488
|
+
if ((a === 1 || a === -1) && i >= -fa && i <= fa && i === oa(i)) {
|
|
35501
35489
|
if (r[0] === 0) {
|
|
35502
35490
|
if (i === 0 && r.length === 1) return !0;
|
|
35503
35491
|
break out;
|
|
35504
35492
|
}
|
|
35505
35493
|
if (t = (i + 1) % X, t < 1 && (t += X), String(r[0]).length == t) {
|
|
35506
|
-
for (t = 0; t < r.length; t++) if (n = r[t], n < 0 || n >=
|
|
35494
|
+
for (t = 0; t < r.length; t++) if (n = r[t], n < 0 || n >= ca || n !== oa(n)) break out;
|
|
35507
35495
|
if (n !== 0) return !0;
|
|
35508
35496
|
}
|
|
35509
35497
|
}
|
|
35510
35498
|
} else if (r === null && i === null && (a === null || a === 1 || a === -1)) return !0;
|
|
35511
|
-
throw Error(
|
|
35499
|
+
throw Error(sa + "Invalid BigNumber: " + e);
|
|
35512
35500
|
}, v.maximum = v.max = function() {
|
|
35513
35501
|
return b(arguments, -1);
|
|
35514
35502
|
}, v.minimum = v.min = function() {
|
|
35515
35503
|
return b(arguments, 1);
|
|
35516
35504
|
}, v.random = (function() {
|
|
35517
35505
|
var e = 9007199254740992, t = Math.random() * e & 2097151 ? function() {
|
|
35518
|
-
return
|
|
35506
|
+
return oa(Math.random() * e);
|
|
35519
35507
|
} : function() {
|
|
35520
35508
|
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
|
|
35521
35509
|
};
|
|
35522
35510
|
return function(e) {
|
|
35523
35511
|
var n, r, i, s, c, l = 0, u = [], d = new v(a);
|
|
35524
|
-
if (e == null ? e = o :
|
|
35512
|
+
if (e == null ? e = o : ga(e, 0, fa), s = aa(e / X), f) if (crypto.getRandomValues) {
|
|
35525
35513
|
for (n = crypto.getRandomValues(new Uint32Array(s *= 2)); l < s;) c = n[l] * 131072 + (n[l + 1] >>> 11), c >= 9e15 ? (r = crypto.getRandomValues(new Uint32Array(2)), n[l] = r[0], n[l + 1] = r[1]) : (u.push(c % 0x5af3107a4000), l += 2);
|
|
35526
35514
|
l = s / 2;
|
|
35527
35515
|
} else if (crypto.randomBytes) {
|
|
35528
35516
|
for (n = crypto.randomBytes(s *= 7); l < s;) c = (n[l] & 31) * 281474976710656 + n[l + 1] * 1099511627776 + n[l + 2] * 4294967296 + n[l + 3] * 16777216 + (n[l + 4] << 16) + (n[l + 5] << 8) + n[l + 6], c >= 9e15 ? crypto.randomBytes(7).copy(n, l) : (u.push(c % 0x5af3107a4000), l += 7);
|
|
35529
35517
|
l = s / 7;
|
|
35530
|
-
} else throw f = !1, Error(
|
|
35518
|
+
} else throw f = !1, Error(sa + "crypto unavailable");
|
|
35531
35519
|
if (!f) for (; l < s;) c = t(), c < 9e15 && (u[l++] = c % 0x5af3107a4000);
|
|
35532
|
-
for (s = u[--l], e %= X, s && e && (c =
|
|
35520
|
+
for (s = u[--l], e %= X, s && e && (c = ua[X - e], u[l] = oa(s / c) * c); u[l] === 0; u.pop(), l--);
|
|
35533
35521
|
if (l < 0) u = [i = 0];
|
|
35534
35522
|
else {
|
|
35535
35523
|
for (i = -1; u[0] === 0; u.splice(0, 1), i -= X);
|
|
@@ -35552,21 +35540,21 @@ function ma(e) {
|
|
|
35552
35540
|
}
|
|
35553
35541
|
return function(r, i, a, c, l) {
|
|
35554
35542
|
var u, d, f, p, h, _, y, b, x = r.indexOf("."), S = o, C = s;
|
|
35555
|
-
for (x >= 0 && (p = m, m = 0, r = r.replace(".", ""), b = new v(i), _ = b.pow(r.length - x), m = p, b.c = n(
|
|
35543
|
+
for (x >= 0 && (p = m, m = 0, r = r.replace(".", ""), b = new v(i), _ = b.pow(r.length - x), m = p, b.c = n(ya(ma(_.c), _.e, "0"), 10, a, e), b.e = b.c.length), y = n(r, i, a, l ? (u = g, e) : (u = e, g)), f = p = y.length; y[--p] == 0; y.pop());
|
|
35556
35544
|
if (!y[0]) return u.charAt(0);
|
|
35557
|
-
if (x < 0 ? --f : (_.c = y, _.e = f, _.s = c, _ = t(_, b, S, C, a), y = _.c, h = _.r, f = _.e), d = f + S + 1, x = y[d], p = a / 2, h = h || d < 0 || y[d + 1] != null, h = C < 4 ? (x != null || h) && (C == 0 || C == (_.s < 0 ? 3 : 2)) : x > p || x == p && (C == 4 || h || C == 6 && y[d - 1] & 1 || C == (_.s < 0 ? 8 : 7)), d < 1 || !y[0]) r = h ?
|
|
35545
|
+
if (x < 0 ? --f : (_.c = y, _.e = f, _.s = c, _ = t(_, b, S, C, a), y = _.c, h = _.r, f = _.e), d = f + S + 1, x = y[d], p = a / 2, h = h || d < 0 || y[d + 1] != null, h = C < 4 ? (x != null || h) && (C == 0 || C == (_.s < 0 ? 3 : 2)) : x > p || x == p && (C == 4 || h || C == 6 && y[d - 1] & 1 || C == (_.s < 0 ? 8 : 7)), d < 1 || !y[0]) r = h ? ya(u.charAt(1), -S, u.charAt(0)) : u.charAt(0);
|
|
35558
35546
|
else {
|
|
35559
35547
|
if (y.length = d, h) for (--a; ++y[--d] > a;) y[d] = 0, d || (++f, y = [1].concat(y));
|
|
35560
35548
|
for (p = y.length; !y[--p];);
|
|
35561
35549
|
for (x = 0, r = ""; x <= p; r += u.charAt(y[x++]));
|
|
35562
|
-
r =
|
|
35550
|
+
r = ya(r, f, u.charAt(0));
|
|
35563
35551
|
}
|
|
35564
35552
|
return r;
|
|
35565
35553
|
};
|
|
35566
35554
|
})(), t = (function() {
|
|
35567
35555
|
function e(e, t, n) {
|
|
35568
|
-
var r, i, a, o, s = 0, c = e.length, l = t %
|
|
35569
|
-
for (e = e.slice(); c--;) a = e[c] %
|
|
35556
|
+
var r, i, a, o, s = 0, c = e.length, l = t % da, u = t / da | 0;
|
|
35557
|
+
for (e = e.slice(); c--;) a = e[c] % da, o = e[c] / da | 0, r = u * a + o * l, i = l * a + r % da * da + s, s = (i / n | 0) + (r / da | 0) + u * o, e[c] = i % n;
|
|
35570
35558
|
return s && (e = [s].concat(e)), e;
|
|
35571
35559
|
}
|
|
35572
35560
|
function t(e, t, n, r) {
|
|
@@ -35585,14 +35573,14 @@ function ma(e) {
|
|
|
35585
35573
|
return function(r, i, a, o, s) {
|
|
35586
35574
|
var c, l, u, d, f, p, m, h, g, _, y, b, x, C, w, T, E, D = r.s == i.s ? 1 : -1, O = r.c, k = i.c;
|
|
35587
35575
|
if (!O || !O[0] || !k || !k[0]) return new v(!r.s || !i.s || (O ? k && O[0] == k[0] : !k) ? NaN : O && O[0] == 0 || !k ? D * 0 : D / 0);
|
|
35588
|
-
for (h = new v(D), g = h.c = [], l = r.e - i.e, D = a + l + 1, s || (s =
|
|
35576
|
+
for (h = new v(D), g = h.c = [], l = r.e - i.e, D = a + l + 1, s || (s = ca, l = pa(r.e / X) - pa(i.e / X), D = D / X | 0), u = 0; k[u] == (O[u] || 0); u++);
|
|
35589
35577
|
if (k[u] > (O[u] || 0) && l--, D < 0) g.push(1), d = !0;
|
|
35590
35578
|
else {
|
|
35591
|
-
for (C = O.length, T = k.length, u = 0, D += 2, f =
|
|
35579
|
+
for (C = O.length, T = k.length, u = 0, D += 2, f = oa(s / (k[0] + 1)), f > 1 && (k = e(k, f, s), O = e(O, f, s), T = k.length, C = O.length), x = T, _ = O.slice(0, T), y = _.length; y < T; _[y++] = 0);
|
|
35592
35580
|
E = k.slice(), E = [0].concat(E), w = k[0], k[1] >= s / 2 && w++;
|
|
35593
35581
|
do {
|
|
35594
35582
|
if (f = 0, c = t(k, _, T, y), c < 0) {
|
|
35595
|
-
if (b = _[0], T != y && (b = b * s + (_[1] || 0)), f =
|
|
35583
|
+
if (b = _[0], T != y && (b = b * s + (_[1] || 0)), f = oa(b / w), f > 1) for (f >= s && (f = s - 1), p = e(k, f, s), m = p.length, y = _.length; t(p, _, m, y) == 1;) f--, n(p, T < m ? E : k, m, s), m = p.length, c = 1;
|
|
35596
35584
|
else f == 0 && (c = f = 1), p = k.slice(), m = p.length;
|
|
35597
35585
|
if (m < y && (p = [0].concat(p)), n(_, p, y, s), y = _.length, c == -1) for (; t(k, _, T, y) < 1;) f++, n(_, T < y ? E : k, y, s), y = _.length;
|
|
35598
35586
|
} else c === 0 && (f++, _ = [0]);
|
|
@@ -35600,7 +35588,7 @@ function ma(e) {
|
|
|
35600
35588
|
} while ((x++ < C || _[0] != null) && D--);
|
|
35601
35589
|
d = _[0] != null, g[0] || g.splice(0, 1);
|
|
35602
35590
|
}
|
|
35603
|
-
if (s ==
|
|
35591
|
+
if (s == ca) {
|
|
35604
35592
|
for (u = 1, D = g[0]; D >= 10; D /= 10, u++);
|
|
35605
35593
|
S(h, a + (h.e = u + l * X - 1) + 1, o, d);
|
|
35606
35594
|
} else h.e = l, h.r = +d;
|
|
@@ -35609,18 +35597,18 @@ function ma(e) {
|
|
|
35609
35597
|
})();
|
|
35610
35598
|
function y(e, t, n, r) {
|
|
35611
35599
|
var i, a, o, u, d;
|
|
35612
|
-
if (n == null ? n = s :
|
|
35613
|
-
if (i = e.c[0], o = e.e, t == null) d =
|
|
35614
|
-
else if (e = S(new v(e), t, n), a = e.e, d =
|
|
35600
|
+
if (n == null ? n = s : ga(n, 0, 8), !e.c) return e.toString();
|
|
35601
|
+
if (i = e.c[0], o = e.e, t == null) d = ma(e.c), d = r == 1 || r == 2 && (o <= c || o >= l) ? va(d, o) : ya(d, o, "0");
|
|
35602
|
+
else if (e = S(new v(e), t, n), a = e.e, d = ma(e.c), u = d.length, r == 1 || r == 2 && (t <= a || a <= c)) {
|
|
35615
35603
|
for (; u < t; d += "0", u++);
|
|
35616
|
-
d =
|
|
35617
|
-
} else if (t -= o + (r === 2 && a > o), d =
|
|
35604
|
+
d = va(d, a);
|
|
35605
|
+
} else if (t -= o + (r === 2 && a > o), d = ya(d, a, "0"), a + 1 > u) {
|
|
35618
35606
|
if (--t > 0) for (d += "."; t--; d += "0");
|
|
35619
35607
|
} else if (t += a - u, t > 0) for (a + 1 == u && (d += "."); t--; d += "0");
|
|
35620
35608
|
return e.s < 0 && i ? "-" + d : d;
|
|
35621
35609
|
}
|
|
35622
35610
|
function b(e, t) {
|
|
35623
|
-
for (var n, r, i = 1, a = new v(e[0]); i < e.length; i++) r = new v(e[i]), (!r.s || (n =
|
|
35611
|
+
for (var n, r, i = 1, a = new v(e[0]); i < e.length; i++) r = new v(e[i]), (!r.s || (n = ha(a, r)) === t || n === 0 && a.s === t) && (a = r);
|
|
35624
35612
|
return a;
|
|
35625
35613
|
}
|
|
35626
35614
|
function x(e, t, n) {
|
|
@@ -35637,34 +35625,34 @@ function ma(e) {
|
|
|
35637
35625
|
if (!s && (u = u.replace(e, function(e, t, n) {
|
|
35638
35626
|
return l = (n = n.toLowerCase()) == "x" ? 16 : n == "b" ? 2 : 8, !c || c == l ? t : e;
|
|
35639
35627
|
}), c && (l = c, u = u.replace(t, "$1").replace(n, "0.$1")), o != u)) return new v(u, l);
|
|
35640
|
-
if (v.DEBUG) throw Error(
|
|
35628
|
+
if (v.DEBUG) throw Error(sa + "Not a" + (c ? " base " + c : "") + " number: " + o);
|
|
35641
35629
|
a.s = null;
|
|
35642
35630
|
}
|
|
35643
35631
|
a.c = a.e = null;
|
|
35644
35632
|
};
|
|
35645
35633
|
})();
|
|
35646
35634
|
function S(e, t, n, r) {
|
|
35647
|
-
var i, a, o, s, c, l, f, p = e.c, m =
|
|
35635
|
+
var i, a, o, s, c, l, f, p = e.c, m = ua;
|
|
35648
35636
|
if (p) {
|
|
35649
35637
|
out: {
|
|
35650
35638
|
for (i = 1, s = p[0]; s >= 10; s /= 10, i++);
|
|
35651
|
-
if (a = t - i, a < 0) a += X, o = t, c = p[l = 0], f =
|
|
35652
|
-
else if (l =
|
|
35639
|
+
if (a = t - i, a < 0) a += X, o = t, c = p[l = 0], f = oa(c / m[i - o - 1] % 10);
|
|
35640
|
+
else if (l = aa((a + 1) / X), l >= p.length) if (r) {
|
|
35653
35641
|
for (; p.length <= l; p.push(0));
|
|
35654
35642
|
c = f = 0, i = 1, a %= X, o = a - X + 1;
|
|
35655
35643
|
} else break out;
|
|
35656
35644
|
else {
|
|
35657
35645
|
for (c = s = p[l], i = 1; s >= 10; s /= 10, i++);
|
|
35658
|
-
a %= X, o = a - X + i, f = o < 0 ? 0 :
|
|
35646
|
+
a %= X, o = a - X + i, f = o < 0 ? 0 : oa(c / m[i - o - 1] % 10);
|
|
35659
35647
|
}
|
|
35660
35648
|
if (r = r || t < 0 || p[l + 1] != null || (o < 0 ? c : c % m[i - o - 1]), r = n < 4 ? (f || r) && (n == 0 || n == (e.s < 0 ? 3 : 2)) : f > 5 || f == 5 && (n == 4 || r || n == 6 && (a > 0 ? o > 0 ? c / m[i - o] : 0 : p[l - 1]) % 10 & 1 || n == (e.s < 0 ? 8 : 7)), t < 1 || !p[0]) return p.length = 0, r ? (t -= e.e + 1, p[0] = m[(X - t % X) % X], e.e = -t || 0) : p[0] = e.e = 0, e;
|
|
35661
|
-
if (a == 0 ? (p.length = l, s = 1, l--) : (p.length = l + 1, s = m[X - a], p[l] = o > 0 ?
|
|
35649
|
+
if (a == 0 ? (p.length = l, s = 1, l--) : (p.length = l + 1, s = m[X - a], p[l] = o > 0 ? oa(c / m[i - o] % m[o]) * s : 0), r) for (;;) if (l == 0) {
|
|
35662
35650
|
for (a = 1, o = p[0]; o >= 10; o /= 10, a++);
|
|
35663
35651
|
for (o = p[0] += s, s = 1; o >= 10; o /= 10, s++);
|
|
35664
|
-
a != s && (e.e++, p[0] ==
|
|
35652
|
+
a != s && (e.e++, p[0] == ca && (p[0] = 1));
|
|
35665
35653
|
break;
|
|
35666
35654
|
} else {
|
|
35667
|
-
if (p[l] += s, p[l] !=
|
|
35655
|
+
if (p[l] += s, p[l] != ca) break;
|
|
35668
35656
|
p[l--] = 0, s = 1;
|
|
35669
35657
|
}
|
|
35670
35658
|
for (a = p.length; p[--a] === 0; p.pop());
|
|
@@ -35675,18 +35663,18 @@ function ma(e) {
|
|
|
35675
35663
|
}
|
|
35676
35664
|
function C(e) {
|
|
35677
35665
|
var t, n = e.e;
|
|
35678
|
-
return n === null ? e.toString() : (t =
|
|
35666
|
+
return n === null ? e.toString() : (t = ma(e.c), t = n <= c || n >= l ? va(t, n) : ya(t, n, "0"), e.s < 0 ? "-" + t : t);
|
|
35679
35667
|
}
|
|
35680
35668
|
return i.absoluteValue = i.abs = function() {
|
|
35681
35669
|
var e = new v(this);
|
|
35682
35670
|
return e.s < 0 && (e.s = 1), e;
|
|
35683
35671
|
}, i.comparedTo = function(e, t) {
|
|
35684
|
-
return
|
|
35672
|
+
return ha(this, new v(e, t));
|
|
35685
35673
|
}, i.decimalPlaces = i.dp = function(e, t) {
|
|
35686
35674
|
var n, r, i, a = this;
|
|
35687
|
-
if (e != null) return
|
|
35675
|
+
if (e != null) return ga(e, 0, fa), t == null ? t = s : ga(t, 0, 8), S(new v(a), e + a.e + 1, t);
|
|
35688
35676
|
if (!(n = a.c)) return null;
|
|
35689
|
-
if (r = ((i = n.length - 1) -
|
|
35677
|
+
if (r = ((i = n.length - 1) - pa(this.e / X)) * X, i = n[i]) for (; i % 10 == 0; i /= 10, r--);
|
|
35690
35678
|
return r < 0 && (r = 0), r;
|
|
35691
35679
|
}, i.dividedBy = i.div = function(e, n) {
|
|
35692
35680
|
return t(this, new v(e, n), o, s);
|
|
@@ -35694,22 +35682,22 @@ function ma(e) {
|
|
|
35694
35682
|
return t(this, new v(e, n), 0, 1);
|
|
35695
35683
|
}, i.exponentiatedBy = i.pow = function(e, t) {
|
|
35696
35684
|
var n, r, i, o, c, l, u, d, f, p = this;
|
|
35697
|
-
if (e = new v(e), e.c && !e.isInteger()) throw Error(
|
|
35698
|
-
if (t != null && (t = new v(t)), l = e.e > 14, !p.c || !p.c[0] || p.c[0] == 1 && !p.e && p.c.length == 1 || !e.c || !e.c[0]) return f = new v(C(p) ** (l ? e.s * (2 -
|
|
35685
|
+
if (e = new v(e), e.c && !e.isInteger()) throw Error(sa + "Exponent not an integer: " + C(e));
|
|
35686
|
+
if (t != null && (t = new v(t)), l = e.e > 14, !p.c || !p.c[0] || p.c[0] == 1 && !p.e && p.c.length == 1 || !e.c || !e.c[0]) return f = new v(C(p) ** (l ? e.s * (2 - _a(e)) : +C(e))), t ? f.mod(t) : f;
|
|
35699
35687
|
if (u = e.s < 0, t) {
|
|
35700
35688
|
if (t.c ? !t.c[0] : !t.s) return new v(NaN);
|
|
35701
35689
|
r = !u && p.isInteger() && t.isInteger(), r && (p = p.mod(t));
|
|
35702
|
-
} else if (e.e > 9 && (p.e > 0 || p.e < -1 || (p.e == 0 ? p.c[0] > 1 || l && p.c[1] >= 24e7 : p.c[0] < 8e13 || l && p.c[0] <= 9999975e7))) return o = p.s < 0 &&
|
|
35703
|
-
else m && (o =
|
|
35704
|
-
for (l ? (n = new v(.5), u && (e.s = 1), d =
|
|
35690
|
+
} else if (e.e > 9 && (p.e > 0 || p.e < -1 || (p.e == 0 ? p.c[0] > 1 || l && p.c[1] >= 24e7 : p.c[0] < 8e13 || l && p.c[0] <= 9999975e7))) return o = p.s < 0 && _a(e) ? -0 : 0, p.e > -1 && (o = 1 / o), new v(u ? 1 / o : o);
|
|
35691
|
+
else m && (o = aa(m / X + 2));
|
|
35692
|
+
for (l ? (n = new v(.5), u && (e.s = 1), d = _a(e)) : (i = Math.abs(+C(e)), d = i % 2), f = new v(a);;) {
|
|
35705
35693
|
if (d) {
|
|
35706
35694
|
if (f = f.times(p), !f.c) break;
|
|
35707
35695
|
o ? f.c.length > o && (f.c.length = o) : r && (f = f.mod(t));
|
|
35708
35696
|
}
|
|
35709
35697
|
if (i) {
|
|
35710
|
-
if (i =
|
|
35698
|
+
if (i = oa(i / 2), i === 0) break;
|
|
35711
35699
|
d = i % 2;
|
|
35712
|
-
} else if (e = e.times(n), S(e, e.e + 1, 1), e.e > 14) d =
|
|
35700
|
+
} else if (e = e.times(n), S(e, e.e + 1, 1), e.e > 14) d = _a(e);
|
|
35713
35701
|
else {
|
|
35714
35702
|
if (i = +C(e), i === 0) break;
|
|
35715
35703
|
d = i % 2;
|
|
@@ -35719,21 +35707,21 @@ function ma(e) {
|
|
|
35719
35707
|
return r ? f : (u && (f = a.div(f)), t ? f.mod(t) : o ? S(f, m, s, c) : f);
|
|
35720
35708
|
}, i.integerValue = function(e) {
|
|
35721
35709
|
var t = new v(this);
|
|
35722
|
-
return e == null ? e = s :
|
|
35710
|
+
return e == null ? e = s : ga(e, 0, 8), S(t, t.e + 1, e);
|
|
35723
35711
|
}, i.isEqualTo = i.eq = function(e, t) {
|
|
35724
|
-
return
|
|
35712
|
+
return ha(this, new v(e, t)) === 0;
|
|
35725
35713
|
}, i.isFinite = function() {
|
|
35726
35714
|
return !!this.c;
|
|
35727
35715
|
}, i.isGreaterThan = i.gt = function(e, t) {
|
|
35728
|
-
return
|
|
35716
|
+
return ha(this, new v(e, t)) > 0;
|
|
35729
35717
|
}, i.isGreaterThanOrEqualTo = i.gte = function(e, t) {
|
|
35730
|
-
return (t =
|
|
35718
|
+
return (t = ha(this, new v(e, t))) === 1 || t === 0;
|
|
35731
35719
|
}, i.isInteger = function() {
|
|
35732
|
-
return !!this.c &&
|
|
35720
|
+
return !!this.c && pa(this.e / X) > this.c.length - 2;
|
|
35733
35721
|
}, i.isLessThan = i.lt = function(e, t) {
|
|
35734
|
-
return
|
|
35722
|
+
return ha(this, new v(e, t)) < 0;
|
|
35735
35723
|
}, i.isLessThanOrEqualTo = i.lte = function(e, t) {
|
|
35736
|
-
return (t =
|
|
35724
|
+
return (t = ha(this, new v(e, t))) === -1 || t === 0;
|
|
35737
35725
|
}, i.isNaN = function() {
|
|
35738
35726
|
return !this.s;
|
|
35739
35727
|
}, i.isNegative = function() {
|
|
@@ -35751,7 +35739,7 @@ function ma(e) {
|
|
|
35751
35739
|
if (!d || !f) return d ? (e.s = -t, e) : new v(f ? o : NaN);
|
|
35752
35740
|
if (!d[0] || !f[0]) return f[0] ? (e.s = -t, e) : new v(d[0] ? o : s == 3 ? -0 : 0);
|
|
35753
35741
|
}
|
|
35754
|
-
if (l =
|
|
35742
|
+
if (l = pa(l), u = pa(u), d = d.slice(), c = l - u) {
|
|
35755
35743
|
for ((a = c < 0) ? (c = -c, i = d) : (u = l, i = f), i.reverse(), t = c; t--; i.push(0));
|
|
35756
35744
|
i.reverse();
|
|
35757
35745
|
} else for (r = (a = (c = d.length) < (t = f.length)) ? c : t, c = t = 0; t < r; t++) if (d[t] != f[t]) {
|
|
@@ -35759,10 +35747,10 @@ function ma(e) {
|
|
|
35759
35747
|
break;
|
|
35760
35748
|
}
|
|
35761
35749
|
if (a && (i = d, d = f, f = i, e.s = -e.s), t = (r = f.length) - (n = d.length), t > 0) for (; t--; d[n++] = 0);
|
|
35762
|
-
for (t =
|
|
35750
|
+
for (t = ca - 1; r > c;) {
|
|
35763
35751
|
if (d[--r] < f[r]) {
|
|
35764
35752
|
for (n = r; n && !d[--n]; d[n] = t);
|
|
35765
|
-
--d[n], d[r] +=
|
|
35753
|
+
--d[n], d[r] += ca;
|
|
35766
35754
|
}
|
|
35767
35755
|
d[r] -= f[r];
|
|
35768
35756
|
}
|
|
@@ -35774,8 +35762,8 @@ function ma(e) {
|
|
|
35774
35762
|
}, i.multipliedBy = i.times = function(e, t) {
|
|
35775
35763
|
var n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = this, y = _.c, b = (e = new v(e, t)).c;
|
|
35776
35764
|
if (!y || !b || !y[0] || !b[0]) return !_.s || !e.s || y && !y[0] && !b || b && !b[0] && !y ? e.c = e.e = e.s = null : (e.s *= _.s, !y || !b ? e.c = e.e = null : (e.c = [0], e.e = 0)), e;
|
|
35777
|
-
for (r =
|
|
35778
|
-
for (h =
|
|
35765
|
+
for (r = pa(_.e / X) + pa(e.e / X), e.s *= _.s, c = y.length, d = b.length, c < d && (m = y, y = b, b = m, i = c, c = d, d = i), i = c + d, m = []; i--; m.push(0));
|
|
35766
|
+
for (h = ca, g = da, i = d; --i >= 0;) {
|
|
35779
35767
|
for (n = 0, f = b[i] % g, p = b[i] / g | 0, o = c, a = i + o; a > i;) l = y[--o] % g, u = y[o] / g | 0, s = p * l + u * f, l = f * l + s % g * g + m[a] + n, n = (l / h | 0) + (s / g | 0) + p * u, m[a--] = l % h;
|
|
35780
35768
|
m[a] = n;
|
|
35781
35769
|
}
|
|
@@ -35792,15 +35780,15 @@ function ma(e) {
|
|
|
35792
35780
|
if (!s || !c) return new v(i / 0);
|
|
35793
35781
|
if (!s[0] || !c[0]) return c[0] ? e : new v(s[0] ? r : i * 0);
|
|
35794
35782
|
}
|
|
35795
|
-
if (a =
|
|
35783
|
+
if (a = pa(a), o = pa(o), s = s.slice(), i = a - o) {
|
|
35796
35784
|
for (i > 0 ? (o = a, n = c) : (i = -i, n = s), n.reverse(); i--; n.push(0));
|
|
35797
35785
|
n.reverse();
|
|
35798
35786
|
}
|
|
35799
|
-
for (i = s.length, t = c.length, i - t < 0 && (n = c, c = s, s = n, t = i), i = 0; t;) i = (s[--t] = s[t] + c[t] + i) /
|
|
35787
|
+
for (i = s.length, t = c.length, i - t < 0 && (n = c, c = s, s = n, t = i), i = 0; t;) i = (s[--t] = s[t] + c[t] + i) / ca | 0, s[t] = ca === s[t] ? 0 : s[t] % ca;
|
|
35800
35788
|
return i && (s = [i].concat(s), ++o), x(e, s, o);
|
|
35801
35789
|
}, i.precision = i.sd = function(e, t) {
|
|
35802
35790
|
var n, r, i, a = this;
|
|
35803
|
-
if (e != null && e !== !!e) return
|
|
35791
|
+
if (e != null && e !== !!e) return ga(e, 1, fa), t == null ? t = s : ga(t, 0, 8), S(new v(a), e, t);
|
|
35804
35792
|
if (!(n = a.c)) return null;
|
|
35805
35793
|
if (i = n.length - 1, r = i * X + 1, i = n[i]) {
|
|
35806
35794
|
for (; i % 10 == 0; i /= 10, r--);
|
|
@@ -35808,12 +35796,12 @@ function ma(e) {
|
|
|
35808
35796
|
}
|
|
35809
35797
|
return e && a.e + 1 > r && (r = a.e + 1), r;
|
|
35810
35798
|
}, i.shiftedBy = function(e) {
|
|
35811
|
-
return
|
|
35799
|
+
return ga(e, -la, la), this.times("1e" + e);
|
|
35812
35800
|
}, i.squareRoot = i.sqrt = function() {
|
|
35813
35801
|
var e, n, r, i, a, c = this, l = c.c, u = c.s, d = c.e, f = o + 4, p = new v("0.5");
|
|
35814
35802
|
if (u !== 1 || !l || !l[0]) return new v(!u || u < 0 && (!l || l[0]) ? NaN : l ? c : Infinity);
|
|
35815
|
-
if (u = Math.sqrt(+C(c)), u == 0 || u == Infinity ? (n =
|
|
35816
|
-
for (d = r.e, u = d + f, u < 3 && (u = 0);;) if (a = r, r = p.times(a.plus(t(c, a, f, 1))),
|
|
35803
|
+
if (u = Math.sqrt(+C(c)), u == 0 || u == Infinity ? (n = ma(l), (n.length + d) % 2 == 0 && (n += "0"), u = Math.sqrt(+n), d = pa((d + 1) / 2) - (d < 0 || d % 2), u == Infinity ? n = "5e" + d : (n = u.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + d), r = new v(n)) : r = new v(u + ""), r.c[0]) {
|
|
35804
|
+
for (d = r.e, u = d + f, u < 3 && (u = 0);;) if (a = r, r = p.times(a.plus(t(c, a, f, 1))), ma(a.c).slice(0, u) === (n = ma(r.c)).slice(0, u)) if (r.e < d && --u, n = n.slice(u - 3, u + 1), n == "9999" || !i && n == "4999") {
|
|
35817
35805
|
if (!i && (S(a, a.e + o + 2, 0), a.times(a).eq(c))) {
|
|
35818
35806
|
r = a;
|
|
35819
35807
|
break;
|
|
@@ -35826,13 +35814,13 @@ function ma(e) {
|
|
|
35826
35814
|
}
|
|
35827
35815
|
return S(r, r.e + o + 1, s, e);
|
|
35828
35816
|
}, i.toExponential = function(e, t) {
|
|
35829
|
-
return e != null && (
|
|
35817
|
+
return e != null && (ga(e, 0, fa), e++), y(this, e, t, 1);
|
|
35830
35818
|
}, i.toFixed = function(e, t) {
|
|
35831
|
-
return e != null && (
|
|
35819
|
+
return e != null && (ga(e, 0, fa), e = e + this.e + 1), y(this, e, t);
|
|
35832
35820
|
}, i.toFormat = function(e, t, n) {
|
|
35833
35821
|
var r, i = this;
|
|
35834
35822
|
if (n == null) e != null && t && typeof t == "object" ? (n = t, t = null) : e && typeof e == "object" ? (n = e, e = t = null) : n = h;
|
|
35835
|
-
else if (typeof n != "object") throw Error(
|
|
35823
|
+
else if (typeof n != "object") throw Error(sa + "Argument not an object: " + n);
|
|
35836
35824
|
if (r = i.toFixed(e, t), i.c) {
|
|
35837
35825
|
var a, o = r.split("."), s = +n.groupSize, c = +n.secondaryGroupSize, l = n.groupSeparator || "", u = o[0], d = o[1], f = i.s < 0, p = f ? u.slice(1) : u, m = p.length;
|
|
35838
35826
|
if (c && (a = s, s = c, c = a, m -= a), s > 0 && m > 0) {
|
|
@@ -35844,26 +35832,26 @@ function ma(e) {
|
|
|
35844
35832
|
return (n.prefix || "") + r + (n.suffix || "");
|
|
35845
35833
|
}, i.toFraction = function(e) {
|
|
35846
35834
|
var n, r, i, o, c, l, u, f, p, m, h, g, _ = this, y = _.c;
|
|
35847
|
-
if (e != null && (u = new v(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(a))) throw Error(
|
|
35835
|
+
if (e != null && (u = new v(e), !u.isInteger() && (u.c || u.s !== 1) || u.lt(a))) throw Error(sa + "Argument " + (u.isInteger() ? "out of range: " : "not an integer: ") + C(u));
|
|
35848
35836
|
if (!y) return new v(_);
|
|
35849
|
-
for (n = new v(a), p = r = new v(a), i = f = new v(a), g =
|
|
35837
|
+
for (n = new v(a), p = r = new v(a), i = f = new v(a), g = ma(y), c = n.e = g.length - _.e - 1, n.c[0] = ua[(l = c % X) < 0 ? X + l : l], e = !e || u.comparedTo(n) > 0 ? c > 0 ? n : p : u, l = d, d = Infinity, u = new v(g), f.c[0] = 0; m = t(u, n, 0, 1), o = r.plus(m.times(i)), o.comparedTo(e) != 1;) r = i, i = o, p = f.plus(m.times(o = p)), f = o, n = u.minus(m.times(o = n)), u = o;
|
|
35850
35838
|
return o = t(e.minus(r), i, 0, 1), f = f.plus(o.times(p)), r = r.plus(o.times(i)), f.s = p.s = _.s, c *= 2, h = t(p, i, c, s).minus(_).abs().comparedTo(t(f, r, c, s).minus(_).abs()) < 1 ? [p, i] : [f, r], d = l, h;
|
|
35851
35839
|
}, i.toNumber = function() {
|
|
35852
35840
|
return +C(this);
|
|
35853
35841
|
}, i.toPrecision = function(e, t) {
|
|
35854
|
-
return e != null &&
|
|
35842
|
+
return e != null && ga(e, 1, fa), y(this, e, t, 2);
|
|
35855
35843
|
}, i.toString = function(e) {
|
|
35856
35844
|
var t, r = this, i = r.s, a = r.e;
|
|
35857
|
-
return a === null ? i ? (t = "Infinity", i < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = a <= c || a >= l ?
|
|
35845
|
+
return a === null ? i ? (t = "Infinity", i < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = a <= c || a >= l ? va(ma(r.c), a) : ya(ma(r.c), a, "0") : e === 10 && _ ? (r = S(new v(r), o + a + 1, s), t = ya(ma(r.c), r.e, "0")) : (ga(e, 2, g.length, "Base"), t = n(ya(ma(r.c), a, "0"), 10, e, i, !0)), i < 0 && r.c[0] && (t = "-" + t)), t;
|
|
35858
35846
|
}, i.valueOf = i.toJSON = function() {
|
|
35859
35847
|
return C(this);
|
|
35860
35848
|
}, i._isBigNumber = !0, i[Symbol.toStringTag] = "BigNumber", i[Symbol.for("nodejs.util.inspect.custom")] = i.valueOf, e != null && v.set(e), v;
|
|
35861
35849
|
}
|
|
35862
|
-
function
|
|
35850
|
+
function pa(e) {
|
|
35863
35851
|
var t = e | 0;
|
|
35864
35852
|
return e > 0 || e === t ? t : t - 1;
|
|
35865
35853
|
}
|
|
35866
|
-
function
|
|
35854
|
+
function ma(e) {
|
|
35867
35855
|
for (var t, n, r = 1, i = e.length, a = e[0] + ""; r < i;) {
|
|
35868
35856
|
for (t = e[r++] + "", n = X - t.length; n--; t = "0" + t);
|
|
35869
35857
|
a += t;
|
|
@@ -35871,7 +35859,7 @@ function ga(e) {
|
|
|
35871
35859
|
for (i = a.length; a.charCodeAt(--i) === 48;);
|
|
35872
35860
|
return a.slice(0, i + 1 || 1);
|
|
35873
35861
|
}
|
|
35874
|
-
function
|
|
35862
|
+
function ha(e, t) {
|
|
35875
35863
|
var n, r, i = e.c, a = t.c, o = e.s, s = t.s, c = e.e, l = t.e;
|
|
35876
35864
|
if (!o || !s) return null;
|
|
35877
35865
|
if (n = i && !i[0], r = a && !a[0], n || r) return n ? r ? 0 : -s : o;
|
|
@@ -35881,17 +35869,17 @@ function _a(e, t) {
|
|
|
35881
35869
|
for (s = (c = i.length) < (l = a.length) ? c : l, o = 0; o < s; o++) if (i[o] != a[o]) return i[o] > a[o] ^ n ? 1 : -1;
|
|
35882
35870
|
return c == l ? 0 : c > l ^ n ? 1 : -1;
|
|
35883
35871
|
}
|
|
35884
|
-
function
|
|
35885
|
-
if (e < t || e > n || e !==
|
|
35872
|
+
function ga(e, t, n, r) {
|
|
35873
|
+
if (e < t || e > n || e !== oa(e)) throw Error(sa + (r || "Argument") + (typeof e == "number" ? e < t || e > n ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
|
|
35886
35874
|
}
|
|
35887
|
-
function
|
|
35875
|
+
function _a(e) {
|
|
35888
35876
|
var t = e.c.length - 1;
|
|
35889
|
-
return
|
|
35877
|
+
return pa(e.e / X) == t && e.c[t] % 2 != 0;
|
|
35890
35878
|
}
|
|
35891
|
-
function
|
|
35879
|
+
function va(e, t) {
|
|
35892
35880
|
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (t < 0 ? "e" : "e+") + t;
|
|
35893
35881
|
}
|
|
35894
|
-
function
|
|
35882
|
+
function ya(e, t, n) {
|
|
35895
35883
|
var r, i;
|
|
35896
35884
|
if (t < 0) {
|
|
35897
35885
|
for (i = n + "."; ++t; i += n);
|
|
@@ -35902,18 +35890,18 @@ function xa(e, t, n) {
|
|
|
35902
35890
|
} else t < r && (e = e.slice(0, t) + "." + e.slice(t));
|
|
35903
35891
|
return e;
|
|
35904
35892
|
}
|
|
35905
|
-
var
|
|
35893
|
+
var ba = Z(), xa = class {
|
|
35906
35894
|
key;
|
|
35907
35895
|
left = null;
|
|
35908
35896
|
right = null;
|
|
35909
35897
|
constructor(e) {
|
|
35910
35898
|
this.key = e;
|
|
35911
35899
|
}
|
|
35912
|
-
},
|
|
35900
|
+
}, Sa = class extends xa {
|
|
35913
35901
|
constructor(e) {
|
|
35914
35902
|
super(e);
|
|
35915
35903
|
}
|
|
35916
|
-
},
|
|
35904
|
+
}, Ca = class {
|
|
35917
35905
|
size = 0;
|
|
35918
35906
|
modificationCount = 0;
|
|
35919
35907
|
splayCount = 0;
|
|
@@ -36000,7 +35988,7 @@ var Sa = ma(), Ca = class {
|
|
|
36000
35988
|
has: (e) => this.has(e)
|
|
36001
35989
|
};
|
|
36002
35990
|
}
|
|
36003
|
-
},
|
|
35991
|
+
}, wa = class e extends Ca {
|
|
36004
35992
|
root = null;
|
|
36005
35993
|
compare;
|
|
36006
35994
|
validKey;
|
|
@@ -36019,11 +36007,11 @@ var Sa = ma(), Ca = class {
|
|
|
36019
36007
|
}
|
|
36020
36008
|
add(e) {
|
|
36021
36009
|
let t = this.splay(e);
|
|
36022
|
-
return t != 0 && this.addNewRoot(new
|
|
36010
|
+
return t != 0 && this.addNewRoot(new Sa(e), t), this;
|
|
36023
36011
|
}
|
|
36024
36012
|
addAndReturn(e) {
|
|
36025
36013
|
let t = this.splay(e);
|
|
36026
|
-
return t != 0 && this.addNewRoot(new
|
|
36014
|
+
return t != 0 && this.addNewRoot(new Sa(e), t), this.root.key;
|
|
36027
36015
|
}
|
|
36028
36016
|
addAll(e) {
|
|
36029
36017
|
for (let t of e) this.add(t);
|
|
@@ -36102,23 +36090,23 @@ var Sa = ma(), Ca = class {
|
|
|
36102
36090
|
let r, i;
|
|
36103
36091
|
do {
|
|
36104
36092
|
if (r = e.left, i = e.right, r != null) {
|
|
36105
|
-
let e = new
|
|
36093
|
+
let e = new Sa(r.key);
|
|
36106
36094
|
n.left = e, t(r, e);
|
|
36107
36095
|
}
|
|
36108
36096
|
if (i != null) {
|
|
36109
|
-
let t = new
|
|
36097
|
+
let t = new Sa(i.key);
|
|
36110
36098
|
n.right = t, e = i, n = t;
|
|
36111
36099
|
}
|
|
36112
36100
|
} while (i != null);
|
|
36113
36101
|
}
|
|
36114
|
-
let n = new
|
|
36102
|
+
let n = new Sa(e.key);
|
|
36115
36103
|
return t(e, n), n;
|
|
36116
36104
|
}
|
|
36117
36105
|
toSet() {
|
|
36118
36106
|
return this.clone();
|
|
36119
36107
|
}
|
|
36120
36108
|
entries() {
|
|
36121
|
-
return new
|
|
36109
|
+
return new Da(this.wrap());
|
|
36122
36110
|
}
|
|
36123
36111
|
keys() {
|
|
36124
36112
|
return this[Symbol.iterator]();
|
|
@@ -36127,10 +36115,10 @@ var Sa = ma(), Ca = class {
|
|
|
36127
36115
|
return this[Symbol.iterator]();
|
|
36128
36116
|
}
|
|
36129
36117
|
[Symbol.iterator]() {
|
|
36130
|
-
return new
|
|
36118
|
+
return new Ea(this.wrap());
|
|
36131
36119
|
}
|
|
36132
36120
|
[Symbol.toStringTag] = "[object Set]";
|
|
36133
|
-
},
|
|
36121
|
+
}, Ta = class {
|
|
36134
36122
|
tree;
|
|
36135
36123
|
path = [];
|
|
36136
36124
|
modificationCount = null;
|
|
@@ -36181,46 +36169,46 @@ var Sa = ma(), Ca = class {
|
|
|
36181
36169
|
for (this.path.pop(); this.path.length && this.path[this.path.length - 1].right === e;) e = this.path.pop();
|
|
36182
36170
|
return this.path.length > 0;
|
|
36183
36171
|
}
|
|
36184
|
-
},
|
|
36172
|
+
}, Ea = class extends Ta {
|
|
36185
36173
|
getValue(e) {
|
|
36186
36174
|
return e.key;
|
|
36187
36175
|
}
|
|
36188
|
-
},
|
|
36176
|
+
}, Da = class extends Ta {
|
|
36189
36177
|
getValue(e) {
|
|
36190
36178
|
return [e.key, e.key];
|
|
36191
36179
|
}
|
|
36192
|
-
},
|
|
36193
|
-
let t = e ? (t, n) => n.minus(t).abs().isLessThanOrEqualTo(e) :
|
|
36180
|
+
}, Oa = (e) => () => e, ka = (e) => {
|
|
36181
|
+
let t = e ? (t, n) => n.minus(t).abs().isLessThanOrEqualTo(e) : Oa(!1);
|
|
36194
36182
|
return (e, n) => t(e, n) ? 0 : e.comparedTo(n);
|
|
36195
36183
|
};
|
|
36196
|
-
function
|
|
36197
|
-
let t = e ? (t, n, r, i, a) => t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)) :
|
|
36184
|
+
function Aa(e) {
|
|
36185
|
+
let t = e ? (t, n, r, i, a) => t.exponentiatedBy(2).isLessThanOrEqualTo(i.minus(n).exponentiatedBy(2).plus(a.minus(r).exponentiatedBy(2)).times(e)) : Oa(!1);
|
|
36198
36186
|
return (e, n, r) => {
|
|
36199
36187
|
let i = e.x, a = e.y, o = r.x, s = r.y, c = a.minus(s).times(n.x.minus(o)).minus(i.minus(o).times(n.y.minus(s)));
|
|
36200
36188
|
return t(c, i, a, o, s) ? 0 : c.comparedTo(0);
|
|
36201
36189
|
};
|
|
36202
36190
|
}
|
|
36203
|
-
var
|
|
36191
|
+
var ja = (e) => e, Ma = (e) => {
|
|
36204
36192
|
if (e) {
|
|
36205
|
-
let t = new
|
|
36193
|
+
let t = new wa(ka(e)), n = new wa(ka(e)), r = (e, t) => t.addAndReturn(e), i = (e) => ({
|
|
36206
36194
|
x: r(e.x, t),
|
|
36207
36195
|
y: r(e.y, n)
|
|
36208
36196
|
});
|
|
36209
36197
|
return i({
|
|
36210
|
-
x: new
|
|
36211
|
-
y: new
|
|
36198
|
+
x: new ba(0),
|
|
36199
|
+
y: new ba(0)
|
|
36212
36200
|
}), i;
|
|
36213
36201
|
}
|
|
36214
|
-
return
|
|
36215
|
-
},
|
|
36202
|
+
return ja;
|
|
36203
|
+
}, Na = (e) => ({
|
|
36216
36204
|
set: (e) => {
|
|
36217
|
-
|
|
36205
|
+
Pa = Na(e);
|
|
36218
36206
|
},
|
|
36219
|
-
reset: () =>
|
|
36220
|
-
compare:
|
|
36221
|
-
snap:
|
|
36222
|
-
orient:
|
|
36223
|
-
}),
|
|
36207
|
+
reset: () => Na(e),
|
|
36208
|
+
compare: ka(e),
|
|
36209
|
+
snap: Ma(e),
|
|
36210
|
+
orient: Aa(e)
|
|
36211
|
+
}), Pa = Na(), Q = (e, t) => e.ll.x.isLessThanOrEqualTo(t.x) && t.x.isLessThanOrEqualTo(e.ur.x) && e.ll.y.isLessThanOrEqualTo(t.y) && t.y.isLessThanOrEqualTo(e.ur.y), $ = (e, t) => {
|
|
36224
36212
|
if (t.ur.x.isLessThan(e.ll.x) || e.ur.x.isLessThan(t.ll.x) || t.ur.y.isLessThan(e.ll.y) || e.ur.y.isLessThan(t.ll.y)) return null;
|
|
36225
36213
|
let n = e.ll.x.isLessThan(t.ll.x) ? t.ll.x : e.ll.x, r = e.ur.x.isLessThan(t.ur.x) ? e.ur.x : t.ur.x, i = e.ll.y.isLessThan(t.ll.y) ? t.ll.y : e.ll.y, a = e.ur.y.isLessThan(t.ur.y) ? e.ur.y : t.ur.y;
|
|
36226
36214
|
return {
|
|
@@ -36233,7 +36221,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36233
36221
|
y: a
|
|
36234
36222
|
}
|
|
36235
36223
|
};
|
|
36236
|
-
},
|
|
36224
|
+
}, Fa = (e, t) => e.x.times(t.y).minus(e.y.times(t.x)), Ia = (e, t) => e.x.times(t.x).plus(e.y.times(t.y)), La = (e) => Ia(e, e).sqrt(), Ra = (e, t, n) => {
|
|
36237
36225
|
let r = {
|
|
36238
36226
|
x: t.x.minus(e.x),
|
|
36239
36227
|
y: t.y.minus(e.y)
|
|
@@ -36241,8 +36229,8 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36241
36229
|
x: n.x.minus(e.x),
|
|
36242
36230
|
y: n.y.minus(e.y)
|
|
36243
36231
|
};
|
|
36244
|
-
return
|
|
36245
|
-
},
|
|
36232
|
+
return Fa(i, r).div(La(i)).div(La(r));
|
|
36233
|
+
}, za = (e, t, n) => {
|
|
36246
36234
|
let r = {
|
|
36247
36235
|
x: t.x.minus(e.x),
|
|
36248
36236
|
y: t.y.minus(e.y)
|
|
@@ -36250,29 +36238,29 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36250
36238
|
x: n.x.minus(e.x),
|
|
36251
36239
|
y: n.y.minus(e.y)
|
|
36252
36240
|
};
|
|
36253
|
-
return
|
|
36254
|
-
},
|
|
36241
|
+
return Ia(i, r).div(La(i)).div(La(r));
|
|
36242
|
+
}, Ba = (e, t, n) => t.y.isZero() ? null : {
|
|
36255
36243
|
x: e.x.plus(t.x.div(t.y).times(n.minus(e.y))),
|
|
36256
36244
|
y: n
|
|
36257
|
-
},
|
|
36245
|
+
}, Va = (e, t, n) => t.x.isZero() ? null : {
|
|
36258
36246
|
x: n,
|
|
36259
36247
|
y: e.y.plus(t.y.div(t.x).times(n.minus(e.x)))
|
|
36260
|
-
},
|
|
36261
|
-
if (t.x.isZero()) return
|
|
36262
|
-
if (r.x.isZero()) return
|
|
36263
|
-
if (t.y.isZero()) return
|
|
36264
|
-
if (r.y.isZero()) return
|
|
36265
|
-
let i =
|
|
36248
|
+
}, Ha = (e, t, n, r) => {
|
|
36249
|
+
if (t.x.isZero()) return Va(n, r, e.x);
|
|
36250
|
+
if (r.x.isZero()) return Va(e, t, n.x);
|
|
36251
|
+
if (t.y.isZero()) return Ba(n, r, e.y);
|
|
36252
|
+
if (r.y.isZero()) return Ba(e, t, n.y);
|
|
36253
|
+
let i = Fa(t, r);
|
|
36266
36254
|
if (i.isZero()) return null;
|
|
36267
36255
|
let a = {
|
|
36268
36256
|
x: n.x.minus(e.x),
|
|
36269
36257
|
y: n.y.minus(e.y)
|
|
36270
|
-
}, o =
|
|
36258
|
+
}, o = Fa(a, t).div(i), s = Fa(a, r).div(i), c = e.x.plus(s.times(t.x)), l = n.x.plus(o.times(r.x)), u = e.y.plus(s.times(t.y)), d = n.y.plus(o.times(r.y));
|
|
36271
36259
|
return {
|
|
36272
36260
|
x: c.plus(l).div(2),
|
|
36273
36261
|
y: u.plus(d).div(2)
|
|
36274
36262
|
};
|
|
36275
|
-
},
|
|
36263
|
+
}, Ua = class e {
|
|
36276
36264
|
point;
|
|
36277
36265
|
isLeft;
|
|
36278
36266
|
segment;
|
|
@@ -36280,7 +36268,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36280
36268
|
consumedBy;
|
|
36281
36269
|
static compare(t, n) {
|
|
36282
36270
|
let r = e.comparePoints(t.point, n.point);
|
|
36283
|
-
return r === 0 ? (t.point !== n.point && t.link(n), t.isLeft === n.isLeft ?
|
|
36271
|
+
return r === 0 ? (t.point !== n.point && t.link(n), t.isLeft === n.isLeft ? Za.compare(t.segment, n.segment) : t.isLeft ? 1 : -1) : r;
|
|
36284
36272
|
}
|
|
36285
36273
|
static comparePoints(e, t) {
|
|
36286
36274
|
return e.x.isLessThan(t.x) ? -1 : e.x.isGreaterThan(t.x) ? 1 : e.y.isLessThan(t.y) ? -1 : e.y.isGreaterThan(t.y) ? 1 : 0;
|
|
@@ -36319,8 +36307,8 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36319
36307
|
let t = /* @__PURE__ */ new Map(), n = (n) => {
|
|
36320
36308
|
let r = n.otherSE;
|
|
36321
36309
|
t.set(n, {
|
|
36322
|
-
sine:
|
|
36323
|
-
cosine:
|
|
36310
|
+
sine: Ra(this.point, e.point, r.point),
|
|
36311
|
+
cosine: za(this.point, e.point, r.point)
|
|
36324
36312
|
});
|
|
36325
36313
|
};
|
|
36326
36314
|
return (e, r) => {
|
|
@@ -36329,7 +36317,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36329
36317
|
return i.isGreaterThanOrEqualTo(0) && o.isGreaterThanOrEqualTo(0) ? a.isLessThan(s) ? 1 : a.isGreaterThan(s) ? -1 : 0 : i.isLessThan(0) && o.isLessThan(0) ? a.isLessThan(s) ? -1 : a.isGreaterThan(s) ? 1 : 0 : o.isLessThan(i) ? -1 : o.isGreaterThan(i) ? 1 : 0;
|
|
36330
36318
|
};
|
|
36331
36319
|
}
|
|
36332
|
-
},
|
|
36320
|
+
}, Wa = class e {
|
|
36333
36321
|
events;
|
|
36334
36322
|
poly;
|
|
36335
36323
|
_isExteriorRing;
|
|
@@ -36381,11 +36369,11 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36381
36369
|
let e = this.events[0].point, t = [e];
|
|
36382
36370
|
for (let n = 1, r = this.events.length - 1; n < r; n++) {
|
|
36383
36371
|
let r = this.events[n].point, i = this.events[n + 1].point;
|
|
36384
|
-
|
|
36372
|
+
Pa.orient(r, e, i) !== 0 && (t.push(r), e = r);
|
|
36385
36373
|
}
|
|
36386
36374
|
if (t.length === 1) return null;
|
|
36387
36375
|
let n = t[0], r = t[1];
|
|
36388
|
-
|
|
36376
|
+
Pa.orient(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
36389
36377
|
let i = this.isExteriorRing() ? 1 : -1, a = this.isExteriorRing() ? 0 : t.length - 1, o = this.isExteriorRing() ? t.length : -1, s = [];
|
|
36390
36378
|
for (let e = a; e != o; e += i) s.push([t[e].x.toNumber(), t[e].y.toNumber()]);
|
|
36391
36379
|
return s;
|
|
@@ -36404,7 +36392,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36404
36392
|
let e = this.events[0];
|
|
36405
36393
|
for (let t = 1, n = this.events.length; t < n; t++) {
|
|
36406
36394
|
let n = this.events[t];
|
|
36407
|
-
|
|
36395
|
+
Ua.compare(e, n) > 0 && (e = n);
|
|
36408
36396
|
}
|
|
36409
36397
|
let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
|
|
36410
36398
|
for (;;) {
|
|
@@ -36414,7 +36402,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36414
36402
|
t = n.prevInResult(), n = t ? t.prevInResult() : null;
|
|
36415
36403
|
}
|
|
36416
36404
|
}
|
|
36417
|
-
},
|
|
36405
|
+
}, Ga = class {
|
|
36418
36406
|
exteriorRing;
|
|
36419
36407
|
interiorRings;
|
|
36420
36408
|
constructor(e) {
|
|
@@ -36433,7 +36421,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36433
36421
|
}
|
|
36434
36422
|
return t;
|
|
36435
36423
|
}
|
|
36436
|
-
},
|
|
36424
|
+
}, Ka = class {
|
|
36437
36425
|
rings;
|
|
36438
36426
|
polys;
|
|
36439
36427
|
constructor(e) {
|
|
@@ -36451,20 +36439,20 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36451
36439
|
let t = [];
|
|
36452
36440
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
36453
36441
|
let r = e[n];
|
|
36454
|
-
if (!r.poly) if (r.isExteriorRing()) t.push(new
|
|
36442
|
+
if (!r.poly) if (r.isExteriorRing()) t.push(new Ga(r));
|
|
36455
36443
|
else {
|
|
36456
36444
|
let e = r.enclosingRing();
|
|
36457
|
-
e?.poly || t.push(new
|
|
36445
|
+
e?.poly || t.push(new Ga(e)), e?.poly?.addInterior(r);
|
|
36458
36446
|
}
|
|
36459
36447
|
}
|
|
36460
36448
|
return t;
|
|
36461
36449
|
}
|
|
36462
|
-
},
|
|
36450
|
+
}, qa = class {
|
|
36463
36451
|
queue;
|
|
36464
36452
|
tree;
|
|
36465
36453
|
segments;
|
|
36466
|
-
constructor(e, t =
|
|
36467
|
-
this.queue = e, this.tree = new
|
|
36454
|
+
constructor(e, t = Za.compare) {
|
|
36455
|
+
this.queue = e, this.tree = new wa(t), this.segments = [];
|
|
36468
36456
|
}
|
|
36469
36457
|
process(e) {
|
|
36470
36458
|
let t = e.segment, n = [];
|
|
@@ -36496,7 +36484,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36496
36484
|
}
|
|
36497
36485
|
if (a !== null || o !== null) {
|
|
36498
36486
|
let e = null;
|
|
36499
|
-
e = a === null ? o : o === null ||
|
|
36487
|
+
e = a === null ? o : o === null || Ua.comparePoints(a, o) <= 0 ? a : o, this.queue.delete(t.rightSE), n.push(t.rightSE);
|
|
36500
36488
|
let r = t.split(e);
|
|
36501
36489
|
for (let e = 0, t = r.length; e < t; e++) n.push(r[e]);
|
|
36502
36490
|
}
|
|
@@ -36526,27 +36514,27 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36526
36514
|
let r = e.split(t);
|
|
36527
36515
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
36528
36516
|
}
|
|
36529
|
-
},
|
|
36517
|
+
}, Ja = new class {
|
|
36530
36518
|
type;
|
|
36531
36519
|
numMultiPolys;
|
|
36532
36520
|
run(e, t, n) {
|
|
36533
|
-
|
|
36534
|
-
let r = [new
|
|
36535
|
-
for (let e = 0, t = n.length; e < t; e++) r.push(new
|
|
36536
|
-
if (
|
|
36521
|
+
Ja.type = e;
|
|
36522
|
+
let r = [new eo(t, !0)];
|
|
36523
|
+
for (let e = 0, t = n.length; e < t; e++) r.push(new eo(n[e], !1));
|
|
36524
|
+
if (Ja.numMultiPolys = r.length, Ja.type === "difference") {
|
|
36537
36525
|
let e = r[0], t = 1;
|
|
36538
|
-
for (; t < r.length;)
|
|
36526
|
+
for (; t < r.length;) $(r[t].bbox, e.bbox) === null ? r.splice(t, 1) : t++;
|
|
36539
36527
|
}
|
|
36540
|
-
if (
|
|
36528
|
+
if (Ja.type === "intersection") for (let e = 0, t = r.length; e < t; e++) {
|
|
36541
36529
|
let t = r[e];
|
|
36542
|
-
for (let n = e + 1, i = r.length; n < i; n++) if (
|
|
36530
|
+
for (let n = e + 1, i = r.length; n < i; n++) if ($(t.bbox, r[n].bbox) === null) return [];
|
|
36543
36531
|
}
|
|
36544
|
-
let i = new
|
|
36532
|
+
let i = new wa(Ua.compare);
|
|
36545
36533
|
for (let e = 0, t = r.length; e < t; e++) {
|
|
36546
36534
|
let t = r[e].getSweepEvents();
|
|
36547
36535
|
for (let e = 0, n = t.length; e < n; e++) i.add(t[e]);
|
|
36548
36536
|
}
|
|
36549
|
-
let a = new
|
|
36537
|
+
let a = new qa(i), o = null;
|
|
36550
36538
|
for (i.size != 0 && (o = i.first(), i.delete(o)); o;) {
|
|
36551
36539
|
let e = a.process(o);
|
|
36552
36540
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
@@ -36555,9 +36543,9 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36555
36543
|
}
|
|
36556
36544
|
i.size == 0 ? o = null : (o = i.first(), i.delete(o));
|
|
36557
36545
|
}
|
|
36558
|
-
return
|
|
36546
|
+
return Pa.reset(), new Ka(Wa.factory(a.segments)).getGeom();
|
|
36559
36547
|
}
|
|
36560
|
-
}(),
|
|
36548
|
+
}(), Ya = Ja, Xa = 0, Za = class e {
|
|
36561
36549
|
id;
|
|
36562
36550
|
leftSE;
|
|
36563
36551
|
rightSE;
|
|
@@ -36611,14 +36599,14 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36611
36599
|
return i.isGreaterThan(a) ? 1 : i.isLessThan(a) || c.isLessThan(l) ? -1 : c.isGreaterThan(l) ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
36612
36600
|
}
|
|
36613
36601
|
constructor(e, t, n, r) {
|
|
36614
|
-
this.id = ++
|
|
36602
|
+
this.id = ++Xa, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
36615
36603
|
}
|
|
36616
36604
|
static fromRing(t, n, r) {
|
|
36617
|
-
let i, a, o, s =
|
|
36605
|
+
let i, a, o, s = Ua.comparePoints(t, n);
|
|
36618
36606
|
if (s < 0) i = t, a = n, o = 1;
|
|
36619
36607
|
else if (s > 0) i = n, a = t, o = -1;
|
|
36620
36608
|
else throw Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);
|
|
36621
|
-
return new e(new
|
|
36609
|
+
return new e(new Ua(i, !0), new Ua(a, !1), [r], [o]);
|
|
36622
36610
|
}
|
|
36623
36611
|
replaceRightSE(e) {
|
|
36624
36612
|
this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
|
|
@@ -36646,26 +36634,26 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36646
36634
|
return e.x.eq(this.leftSE.point.x) && e.y.eq(this.leftSE.point.y) || e.x.eq(this.rightSE.point.x) && e.y.eq(this.rightSE.point.y);
|
|
36647
36635
|
}
|
|
36648
36636
|
comparePoint(e) {
|
|
36649
|
-
return
|
|
36637
|
+
return Pa.orient(this.leftSE.point, e, this.rightSE.point);
|
|
36650
36638
|
}
|
|
36651
36639
|
getIntersection(e) {
|
|
36652
|
-
let t = this.bbox(), n = e.bbox(), r =
|
|
36640
|
+
let t = this.bbox(), n = e.bbox(), r = $(t, n);
|
|
36653
36641
|
if (r === null) return null;
|
|
36654
|
-
let i = this.leftSE.point, a = this.rightSE.point, o = e.leftSE.point, s = e.rightSE.point, c =
|
|
36642
|
+
let i = this.leftSE.point, a = this.rightSE.point, o = e.leftSE.point, s = e.rightSE.point, c = Q(t, o) && this.comparePoint(o) === 0, l = Q(n, i) && e.comparePoint(i) === 0, u = Q(t, s) && this.comparePoint(s) === 0, d = Q(n, a) && e.comparePoint(a) === 0;
|
|
36655
36643
|
if (l && c) return d && !u ? a : !d && u ? s : null;
|
|
36656
36644
|
if (l) return u && i.x.eq(s.x) && i.y.eq(s.y) ? null : i;
|
|
36657
36645
|
if (c) return d && a.x.eq(o.x) && a.y.eq(o.y) ? null : o;
|
|
36658
36646
|
if (d && u) return null;
|
|
36659
36647
|
if (d) return a;
|
|
36660
36648
|
if (u) return s;
|
|
36661
|
-
let f =
|
|
36662
|
-
return f === null || !
|
|
36649
|
+
let f = Ha(i, this.vector(), o, e.vector());
|
|
36650
|
+
return f === null || !Q(r, f) ? null : Pa.snap(f);
|
|
36663
36651
|
}
|
|
36664
36652
|
split(t) {
|
|
36665
|
-
let n = [], r = t.events !== void 0, i = new
|
|
36653
|
+
let n = [], r = t.events !== void 0, i = new Ua(t, !0), a = new Ua(t, !1), o = this.rightSE;
|
|
36666
36654
|
this.replaceRightSE(a), n.push(a), n.push(i);
|
|
36667
36655
|
let s = new e(i, o, this.rings.slice(), this.windings.slice());
|
|
36668
|
-
return
|
|
36656
|
+
return Ua.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), Ua.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), r && (i.checkForConsuming(), a.checkForConsuming()), n;
|
|
36669
36657
|
}
|
|
36670
36658
|
swapEvents() {
|
|
36671
36659
|
let e = this.rightSE;
|
|
@@ -36737,13 +36725,13 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36737
36725
|
if (this.consumedBy) return !1;
|
|
36738
36726
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
36739
36727
|
let e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
36740
|
-
switch (
|
|
36728
|
+
switch (Ya.type) {
|
|
36741
36729
|
case "union":
|
|
36742
36730
|
this._isInResult = e.length === 0 != (t.length === 0);
|
|
36743
36731
|
break;
|
|
36744
36732
|
case "intersection": {
|
|
36745
36733
|
let n, r;
|
|
36746
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
36734
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === Ya.numMultiPolys && n < r;
|
|
36747
36735
|
break;
|
|
36748
36736
|
}
|
|
36749
36737
|
case "xor":
|
|
@@ -36757,16 +36745,16 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36757
36745
|
}
|
|
36758
36746
|
return this._isInResult;
|
|
36759
36747
|
}
|
|
36760
|
-
},
|
|
36748
|
+
}, Qa = class {
|
|
36761
36749
|
poly;
|
|
36762
36750
|
isExterior;
|
|
36763
36751
|
segments;
|
|
36764
36752
|
bbox;
|
|
36765
36753
|
constructor(e, t, n) {
|
|
36766
36754
|
if (!Array.isArray(e) || e.length === 0 || (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")) throw Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
36767
|
-
let r =
|
|
36768
|
-
x: new
|
|
36769
|
-
y: new
|
|
36755
|
+
let r = Pa.snap({
|
|
36756
|
+
x: new ba(e[0][0]),
|
|
36757
|
+
y: new ba(e[0][1])
|
|
36770
36758
|
});
|
|
36771
36759
|
this.bbox = {
|
|
36772
36760
|
ll: {
|
|
@@ -36781,13 +36769,13 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36781
36769
|
let i = r;
|
|
36782
36770
|
for (let t = 1, n = e.length; t < n; t++) {
|
|
36783
36771
|
if (typeof e[t][0] != "number" || typeof e[t][1] != "number") throw Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
36784
|
-
let n =
|
|
36785
|
-
x: new
|
|
36786
|
-
y: new
|
|
36772
|
+
let n = Pa.snap({
|
|
36773
|
+
x: new ba(e[t][0]),
|
|
36774
|
+
y: new ba(e[t][1])
|
|
36787
36775
|
});
|
|
36788
|
-
n.x.eq(i.x) && n.y.eq(i.y) || (this.segments.push(
|
|
36776
|
+
n.x.eq(i.x) && n.y.eq(i.y) || (this.segments.push(Za.fromRing(i, n, this)), n.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = n.x), n.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = n.y), n.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = n.x), n.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = n.y), i = n);
|
|
36789
36777
|
}
|
|
36790
|
-
(!r.x.eq(i.x) || !r.y.eq(i.y)) && this.segments.push(
|
|
36778
|
+
(!r.x.eq(i.x) || !r.y.eq(i.y)) && this.segments.push(Za.fromRing(i, r, this));
|
|
36791
36779
|
}
|
|
36792
36780
|
getSweepEvents() {
|
|
36793
36781
|
let e = [];
|
|
@@ -36797,14 +36785,14 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36797
36785
|
}
|
|
36798
36786
|
return e;
|
|
36799
36787
|
}
|
|
36800
|
-
},
|
|
36788
|
+
}, $a = class {
|
|
36801
36789
|
multiPoly;
|
|
36802
36790
|
exteriorRing;
|
|
36803
36791
|
interiorRings;
|
|
36804
36792
|
bbox;
|
|
36805
36793
|
constructor(e, t) {
|
|
36806
36794
|
if (!Array.isArray(e)) throw Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
36807
|
-
this.exteriorRing = new
|
|
36795
|
+
this.exteriorRing = new Qa(e[0], this, !0), this.bbox = {
|
|
36808
36796
|
ll: {
|
|
36809
36797
|
x: this.exteriorRing.bbox.ll.x,
|
|
36810
36798
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -36815,7 +36803,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36815
36803
|
}
|
|
36816
36804
|
}, this.interiorRings = [];
|
|
36817
36805
|
for (let t = 1, n = e.length; t < n; t++) {
|
|
36818
|
-
let n = new
|
|
36806
|
+
let n = new Qa(e[t], this, !1);
|
|
36819
36807
|
n.bbox.ll.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = n.bbox.ll.x), n.bbox.ll.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = n.bbox.ll.y), n.bbox.ur.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = n.bbox.ur.x), n.bbox.ur.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = n.bbox.ur.y), this.interiorRings.push(n);
|
|
36820
36808
|
}
|
|
36821
36809
|
this.multiPoly = t;
|
|
@@ -36828,7 +36816,7 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36828
36816
|
}
|
|
36829
36817
|
return e;
|
|
36830
36818
|
}
|
|
36831
|
-
},
|
|
36819
|
+
}, eo = class {
|
|
36832
36820
|
isSubject;
|
|
36833
36821
|
polys;
|
|
36834
36822
|
bbox;
|
|
@@ -36839,16 +36827,16 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36839
36827
|
} catch {}
|
|
36840
36828
|
this.polys = [], this.bbox = {
|
|
36841
36829
|
ll: {
|
|
36842
|
-
x: new
|
|
36843
|
-
y: new
|
|
36830
|
+
x: new ba(Infinity),
|
|
36831
|
+
y: new ba(Infinity)
|
|
36844
36832
|
},
|
|
36845
36833
|
ur: {
|
|
36846
|
-
x: new
|
|
36847
|
-
y: new
|
|
36834
|
+
x: new ba(-Infinity),
|
|
36835
|
+
y: new ba(-Infinity)
|
|
36848
36836
|
}
|
|
36849
36837
|
};
|
|
36850
36838
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
36851
|
-
let n = new
|
|
36839
|
+
let n = new $a(e[t], this);
|
|
36852
36840
|
n.bbox.ll.x.isLessThan(this.bbox.ll.x) && (this.bbox.ll.x = n.bbox.ll.x), n.bbox.ll.y.isLessThan(this.bbox.ll.y) && (this.bbox.ll.y = n.bbox.ll.y), n.bbox.ur.x.isGreaterThan(this.bbox.ur.x) && (this.bbox.ur.x = n.bbox.ur.x), n.bbox.ur.y.isGreaterThan(this.bbox.ur.y) && (this.bbox.ur.y = n.bbox.ur.y), this.polys.push(n);
|
|
36853
36841
|
}
|
|
36854
36842
|
this.isSubject = t;
|
|
@@ -36861,45 +36849,45 @@ var Na = (e) => e, Pa = (e) => {
|
|
|
36861
36849
|
}
|
|
36862
36850
|
return e;
|
|
36863
36851
|
}
|
|
36864
|
-
},
|
|
36865
|
-
|
|
36852
|
+
}, to = (e, ...t) => Ya.run("intersection", e, t);
|
|
36853
|
+
Pa.set;
|
|
36866
36854
|
//#endregion
|
|
36867
36855
|
//#region node_modules/@turf/intersect/dist/esm/index.js
|
|
36868
|
-
function
|
|
36856
|
+
function no(e, t = {}) {
|
|
36869
36857
|
let n = [];
|
|
36870
36858
|
if (Vn(e, (e) => {
|
|
36871
36859
|
n.push(e.coordinates);
|
|
36872
36860
|
}), n.length < 2) throw Error("Must specify at least 2 geometries");
|
|
36873
|
-
let r =
|
|
36861
|
+
let r = to(n[0], ...n.slice(1));
|
|
36874
36862
|
return r.length === 0 ? null : r.length === 1 ? Fn(r[0], t.properties) : zn(r, t.properties);
|
|
36875
36863
|
}
|
|
36876
36864
|
//#endregion
|
|
36877
36865
|
//#region node_modules/d3-geo/src/math.js
|
|
36878
|
-
var
|
|
36866
|
+
var ro = 1e-6, io = Math.PI, ao = io / 2, oo = io / 4, so = io * 2, co = 180 / io, lo = io / 180, uo = Math.abs, fo = Math.atan, po = Math.atan2, mo = Math.cos, ho = Math.ceil, go = Math.exp, _o = Math.log, vo = Math.sin, yo = Math.sign || function(e) {
|
|
36879
36867
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
36880
|
-
},
|
|
36881
|
-
function
|
|
36882
|
-
return e > 1 ? 0 : e < -1 ?
|
|
36868
|
+
}, bo = Math.sqrt, xo = Math.tan;
|
|
36869
|
+
function So(e) {
|
|
36870
|
+
return e > 1 ? 0 : e < -1 ? io : Math.acos(e);
|
|
36883
36871
|
}
|
|
36884
|
-
function
|
|
36885
|
-
return e > 1 ?
|
|
36872
|
+
function Co(e) {
|
|
36873
|
+
return e > 1 ? ao : e < -1 ? -ao : Math.asin(e);
|
|
36886
36874
|
}
|
|
36887
36875
|
//#endregion
|
|
36888
36876
|
//#region node_modules/d3-geo/src/noop.js
|
|
36889
|
-
function
|
|
36877
|
+
function wo() {}
|
|
36890
36878
|
//#endregion
|
|
36891
36879
|
//#region node_modules/d3-geo/src/stream.js
|
|
36892
|
-
function
|
|
36893
|
-
e &&
|
|
36880
|
+
function To(e, t) {
|
|
36881
|
+
e && Do.hasOwnProperty(e.type) && Do[e.type](e, t);
|
|
36894
36882
|
}
|
|
36895
|
-
var
|
|
36883
|
+
var Eo = {
|
|
36896
36884
|
Feature: function(e, t) {
|
|
36897
|
-
|
|
36885
|
+
To(e.geometry, t);
|
|
36898
36886
|
},
|
|
36899
36887
|
FeatureCollection: function(e, t) {
|
|
36900
|
-
for (var n = e.features, r = -1, i = n.length; ++r < i;)
|
|
36888
|
+
for (var n = e.features, r = -1, i = n.length; ++r < i;) To(n[r].geometry, t);
|
|
36901
36889
|
}
|
|
36902
|
-
},
|
|
36890
|
+
}, Do = {
|
|
36903
36891
|
Sphere: function(e, t) {
|
|
36904
36892
|
t.sphere();
|
|
36905
36893
|
},
|
|
@@ -36910,74 +36898,74 @@ var Oo = {
|
|
|
36910
36898
|
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) e = n[r], t.point(e[0], e[1], e[2]);
|
|
36911
36899
|
},
|
|
36912
36900
|
LineString: function(e, t) {
|
|
36913
|
-
|
|
36901
|
+
Oo(e.coordinates, t, 0);
|
|
36914
36902
|
},
|
|
36915
36903
|
MultiLineString: function(e, t) {
|
|
36916
|
-
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;)
|
|
36904
|
+
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) Oo(n[r], t, 0);
|
|
36917
36905
|
},
|
|
36918
36906
|
Polygon: function(e, t) {
|
|
36919
|
-
|
|
36907
|
+
ko(e.coordinates, t);
|
|
36920
36908
|
},
|
|
36921
36909
|
MultiPolygon: function(e, t) {
|
|
36922
|
-
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;)
|
|
36910
|
+
for (var n = e.coordinates, r = -1, i = n.length; ++r < i;) ko(n[r], t);
|
|
36923
36911
|
},
|
|
36924
36912
|
GeometryCollection: function(e, t) {
|
|
36925
|
-
for (var n = e.geometries, r = -1, i = n.length; ++r < i;)
|
|
36913
|
+
for (var n = e.geometries, r = -1, i = n.length; ++r < i;) To(n[r], t);
|
|
36926
36914
|
}
|
|
36927
36915
|
};
|
|
36928
|
-
function
|
|
36916
|
+
function Oo(e, t, n) {
|
|
36929
36917
|
var r = -1, i = e.length - n, a;
|
|
36930
36918
|
for (t.lineStart(); ++r < i;) a = e[r], t.point(a[0], a[1], a[2]);
|
|
36931
36919
|
t.lineEnd();
|
|
36932
36920
|
}
|
|
36933
|
-
function
|
|
36921
|
+
function ko(e, t) {
|
|
36934
36922
|
var n = -1, r = e.length;
|
|
36935
|
-
for (t.polygonStart(); ++n < r;)
|
|
36923
|
+
for (t.polygonStart(); ++n < r;) Oo(e[n], t, 1);
|
|
36936
36924
|
t.polygonEnd();
|
|
36937
36925
|
}
|
|
36938
|
-
function
|
|
36939
|
-
e &&
|
|
36926
|
+
function Ao(e, t) {
|
|
36927
|
+
e && Eo.hasOwnProperty(e.type) ? Eo[e.type](e, t) : To(e, t);
|
|
36940
36928
|
}
|
|
36941
36929
|
//#endregion
|
|
36942
36930
|
//#region node_modules/d3-geo/src/cartesian.js
|
|
36943
|
-
function
|
|
36944
|
-
return [
|
|
36931
|
+
function jo(e) {
|
|
36932
|
+
return [po(e[1], e[0]), Co(e[2])];
|
|
36945
36933
|
}
|
|
36946
|
-
function
|
|
36947
|
-
var t = e[0], n = e[1], r =
|
|
36934
|
+
function Mo(e) {
|
|
36935
|
+
var t = e[0], n = e[1], r = mo(n);
|
|
36948
36936
|
return [
|
|
36949
|
-
r *
|
|
36950
|
-
r *
|
|
36951
|
-
|
|
36937
|
+
r * mo(t),
|
|
36938
|
+
r * vo(t),
|
|
36939
|
+
vo(n)
|
|
36952
36940
|
];
|
|
36953
36941
|
}
|
|
36954
|
-
function
|
|
36942
|
+
function No(e, t) {
|
|
36955
36943
|
return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
|
|
36956
36944
|
}
|
|
36957
|
-
function
|
|
36945
|
+
function Po(e, t) {
|
|
36958
36946
|
return [
|
|
36959
36947
|
e[1] * t[2] - e[2] * t[1],
|
|
36960
36948
|
e[2] * t[0] - e[0] * t[2],
|
|
36961
36949
|
e[0] * t[1] - e[1] * t[0]
|
|
36962
36950
|
];
|
|
36963
36951
|
}
|
|
36964
|
-
function
|
|
36952
|
+
function Fo(e, t) {
|
|
36965
36953
|
e[0] += t[0], e[1] += t[1], e[2] += t[2];
|
|
36966
36954
|
}
|
|
36967
|
-
function
|
|
36955
|
+
function Io(e, t) {
|
|
36968
36956
|
return [
|
|
36969
36957
|
e[0] * t,
|
|
36970
36958
|
e[1] * t,
|
|
36971
36959
|
e[2] * t
|
|
36972
36960
|
];
|
|
36973
36961
|
}
|
|
36974
|
-
function
|
|
36975
|
-
var t =
|
|
36962
|
+
function Lo(e) {
|
|
36963
|
+
var t = bo(e[0] * e[0] + e[1] * e[1] + e[2] * e[2]);
|
|
36976
36964
|
e[0] /= t, e[1] /= t, e[2] /= t;
|
|
36977
36965
|
}
|
|
36978
36966
|
//#endregion
|
|
36979
36967
|
//#region node_modules/d3-geo/src/compose.js
|
|
36980
|
-
function
|
|
36968
|
+
function Ro(e, t) {
|
|
36981
36969
|
function n(n, r) {
|
|
36982
36970
|
return n = e(n, r), t(n[0], n[1]);
|
|
36983
36971
|
}
|
|
@@ -36987,63 +36975,63 @@ function Bo(e, t) {
|
|
|
36987
36975
|
}
|
|
36988
36976
|
//#endregion
|
|
36989
36977
|
//#region node_modules/d3-geo/src/rotation.js
|
|
36990
|
-
function
|
|
36991
|
-
return
|
|
36978
|
+
function zo(e, t) {
|
|
36979
|
+
return uo(e) > io && (e -= Math.round(e / so) * so), [e, t];
|
|
36992
36980
|
}
|
|
36993
|
-
|
|
36994
|
-
function
|
|
36995
|
-
return (e %=
|
|
36981
|
+
zo.invert = zo;
|
|
36982
|
+
function Bo(e, t, n) {
|
|
36983
|
+
return (e %= so) ? t || n ? Ro(Ho(e), Uo(t, n)) : Ho(e) : t || n ? Uo(t, n) : zo;
|
|
36996
36984
|
}
|
|
36997
|
-
function
|
|
36985
|
+
function Vo(e) {
|
|
36998
36986
|
return function(t, n) {
|
|
36999
|
-
return t += e,
|
|
36987
|
+
return t += e, uo(t) > io && (t -= Math.round(t / so) * so), [t, n];
|
|
37000
36988
|
};
|
|
37001
36989
|
}
|
|
37002
|
-
function
|
|
37003
|
-
var t =
|
|
37004
|
-
return t.invert =
|
|
36990
|
+
function Ho(e) {
|
|
36991
|
+
var t = Vo(e);
|
|
36992
|
+
return t.invert = Vo(-e), t;
|
|
37005
36993
|
}
|
|
37006
|
-
function
|
|
37007
|
-
var n =
|
|
36994
|
+
function Uo(e, t) {
|
|
36995
|
+
var n = mo(e), r = vo(e), i = mo(t), a = vo(t);
|
|
37008
36996
|
function o(e, t) {
|
|
37009
|
-
var o =
|
|
37010
|
-
return [
|
|
36997
|
+
var o = mo(t), s = mo(e) * o, c = vo(e) * o, l = vo(t), u = l * n + s * r;
|
|
36998
|
+
return [po(c * i - u * a, s * n - l * r), Co(u * i + c * a)];
|
|
37011
36999
|
}
|
|
37012
37000
|
return o.invert = function(e, t) {
|
|
37013
|
-
var o =
|
|
37014
|
-
return [
|
|
37001
|
+
var o = mo(t), s = mo(e) * o, c = vo(e) * o, l = vo(t), u = l * i - c * a;
|
|
37002
|
+
return [po(c * i + l * a, s * n + u * r), Co(u * n - s * r)];
|
|
37015
37003
|
}, o;
|
|
37016
37004
|
}
|
|
37017
|
-
function
|
|
37018
|
-
e =
|
|
37005
|
+
function Wo(e) {
|
|
37006
|
+
e = Bo(e[0] * lo, e[1] * lo, e.length > 2 ? e[2] * lo : 0);
|
|
37019
37007
|
function t(t) {
|
|
37020
|
-
return t = e(t[0] *
|
|
37008
|
+
return t = e(t[0] * lo, t[1] * lo), t[0] *= co, t[1] *= co, t;
|
|
37021
37009
|
}
|
|
37022
37010
|
return t.invert = function(t) {
|
|
37023
|
-
return t = e.invert(t[0] *
|
|
37011
|
+
return t = e.invert(t[0] * lo, t[1] * lo), t[0] *= co, t[1] *= co, t;
|
|
37024
37012
|
}, t;
|
|
37025
37013
|
}
|
|
37026
37014
|
//#endregion
|
|
37027
37015
|
//#region node_modules/d3-geo/src/circle.js
|
|
37028
|
-
function
|
|
37016
|
+
function Go(e, t, n, r, i, a) {
|
|
37029
37017
|
if (n) {
|
|
37030
|
-
var o =
|
|
37031
|
-
i == null ? (i = t + r *
|
|
37032
|
-
for (var l, u = i; r > 0 ? u > a : u < a; u -= c) l =
|
|
37018
|
+
var o = mo(t), s = vo(t), c = r * n;
|
|
37019
|
+
i == null ? (i = t + r * so, a = t - c / 2) : (i = Ko(o, i), a = Ko(o, a), (r > 0 ? i < a : i > a) && (i += r * so));
|
|
37020
|
+
for (var l, u = i; r > 0 ? u > a : u < a; u -= c) l = jo([
|
|
37033
37021
|
o,
|
|
37034
|
-
-s *
|
|
37035
|
-
-s *
|
|
37022
|
+
-s * mo(u),
|
|
37023
|
+
-s * vo(u)
|
|
37036
37024
|
]), e.point(l[0], l[1]);
|
|
37037
37025
|
}
|
|
37038
37026
|
}
|
|
37039
|
-
function
|
|
37040
|
-
t =
|
|
37041
|
-
var n =
|
|
37042
|
-
return ((-t[2] < 0 ? -n : n) +
|
|
37027
|
+
function Ko(e, t) {
|
|
37028
|
+
t = Mo(t), t[0] -= e, Lo(t);
|
|
37029
|
+
var n = So(-t[1]);
|
|
37030
|
+
return ((-t[2] < 0 ? -n : n) + so - ro) % so;
|
|
37043
37031
|
}
|
|
37044
37032
|
//#endregion
|
|
37045
37033
|
//#region node_modules/d3-geo/src/clip/buffer.js
|
|
37046
|
-
function
|
|
37034
|
+
function qo() {
|
|
37047
37035
|
var e = [], t;
|
|
37048
37036
|
return {
|
|
37049
37037
|
point: function(e, n, r) {
|
|
@@ -37056,7 +37044,7 @@ function Yo() {
|
|
|
37056
37044
|
lineStart: function() {
|
|
37057
37045
|
e.push(t = []);
|
|
37058
37046
|
},
|
|
37059
|
-
lineEnd:
|
|
37047
|
+
lineEnd: wo,
|
|
37060
37048
|
rejoin: function() {
|
|
37061
37049
|
e.length > 1 && e.push(e.pop().concat(e.shift()));
|
|
37062
37050
|
},
|
|
@@ -37068,31 +37056,31 @@ function Yo() {
|
|
|
37068
37056
|
}
|
|
37069
37057
|
//#endregion
|
|
37070
37058
|
//#region node_modules/d3-geo/src/pointEqual.js
|
|
37071
|
-
function
|
|
37072
|
-
return
|
|
37059
|
+
function Jo(e, t) {
|
|
37060
|
+
return uo(e[0] - t[0]) < 1e-6 && uo(e[1] - t[1]) < 1e-6;
|
|
37073
37061
|
}
|
|
37074
37062
|
//#endregion
|
|
37075
37063
|
//#region node_modules/d3-geo/src/clip/rejoin.js
|
|
37076
|
-
function
|
|
37064
|
+
function Yo(e, t, n, r) {
|
|
37077
37065
|
this.x = e, this.z = t, this.o = n, this.e = r, this.v = !1, this.n = this.p = null;
|
|
37078
37066
|
}
|
|
37079
|
-
function
|
|
37067
|
+
function Xo(e, t, n, r, i) {
|
|
37080
37068
|
var a = [], o = [], s, c;
|
|
37081
37069
|
if (e.forEach(function(e) {
|
|
37082
37070
|
if (!((t = e.length - 1) <= 0)) {
|
|
37083
37071
|
var t, n = e[0], r = e[t], c;
|
|
37084
|
-
if (
|
|
37072
|
+
if (Jo(n, r)) {
|
|
37085
37073
|
if (!n[2] && !r[2]) {
|
|
37086
37074
|
for (i.lineStart(), s = 0; s < t; ++s) i.point((n = e[s])[0], n[1]);
|
|
37087
37075
|
i.lineEnd();
|
|
37088
37076
|
return;
|
|
37089
37077
|
}
|
|
37090
|
-
r[0] += 2 *
|
|
37078
|
+
r[0] += 2 * ro;
|
|
37091
37079
|
}
|
|
37092
|
-
a.push(c = new
|
|
37080
|
+
a.push(c = new Yo(n, e, null, !0)), o.push(c.o = new Yo(n, null, c, !1)), a.push(c = new Yo(r, e, null, !1)), o.push(c.o = new Yo(r, null, c, !0));
|
|
37093
37081
|
}
|
|
37094
37082
|
}), a.length) {
|
|
37095
|
-
for (o.sort(t),
|
|
37083
|
+
for (o.sort(t), Zo(a), Zo(o), s = 0, c = o.length; s < c; ++s) o[s].e = n = !n;
|
|
37096
37084
|
for (var l = a[0], u, d;;) {
|
|
37097
37085
|
for (var f = l, p = !0; f.v;) if ((f = f.n) === l) return;
|
|
37098
37086
|
u = f.z, i.lineStart();
|
|
@@ -37112,7 +37100,7 @@ function Qo(e, t, n, r, i) {
|
|
|
37112
37100
|
}
|
|
37113
37101
|
}
|
|
37114
37102
|
}
|
|
37115
|
-
function
|
|
37103
|
+
function Zo(e) {
|
|
37116
37104
|
if (t = e.length) {
|
|
37117
37105
|
for (var t, n = 0, r = e[0], i; ++n < t;) r.n = i = e[n], i.p = r, r = i;
|
|
37118
37106
|
r.n = i = e[0], i.p = r;
|
|
@@ -37120,24 +37108,24 @@ function $o(e) {
|
|
|
37120
37108
|
}
|
|
37121
37109
|
//#endregion
|
|
37122
37110
|
//#region node_modules/d3-geo/src/polygonContains.js
|
|
37123
|
-
function
|
|
37124
|
-
return
|
|
37111
|
+
function Qo(e) {
|
|
37112
|
+
return uo(e[0]) <= io ? e[0] : yo(e[0]) * ((uo(e[0]) + io) % so - io);
|
|
37125
37113
|
}
|
|
37126
|
-
function
|
|
37127
|
-
var n =
|
|
37128
|
-
|
|
37129
|
-
-
|
|
37114
|
+
function $o(e, t) {
|
|
37115
|
+
var n = Qo(t), r = t[1], i = vo(r), a = [
|
|
37116
|
+
vo(n),
|
|
37117
|
+
-mo(n),
|
|
37130
37118
|
0
|
|
37131
37119
|
], o = 0, s = 0, c = new U();
|
|
37132
|
-
i === 1 ? r =
|
|
37133
|
-
for (var l = 0, u = e.length; l < u; ++l) if (f = (d = e[l]).length) for (var d, f, p = d[f - 1], m =
|
|
37134
|
-
var y = d[v], b =
|
|
37135
|
-
if (c.add(
|
|
37136
|
-
var k =
|
|
37137
|
-
|
|
37138
|
-
var A =
|
|
37139
|
-
|
|
37140
|
-
var j = (D ^ w >= 0 ? -1 : 1) *
|
|
37120
|
+
i === 1 ? r = ao + ro : i === -1 && (r = -ao - ro);
|
|
37121
|
+
for (var l = 0, u = e.length; l < u; ++l) if (f = (d = e[l]).length) for (var d, f, p = d[f - 1], m = Qo(p), h = p[1] / 2 + oo, g = vo(h), _ = mo(h), v = 0; v < f; ++v, m = b, g = S, _ = C, p = y) {
|
|
37122
|
+
var y = d[v], b = Qo(y), x = y[1] / 2 + oo, S = vo(x), C = mo(x), w = b - m, T = w >= 0 ? 1 : -1, E = T * w, D = E > io, O = g * S;
|
|
37123
|
+
if (c.add(po(O * T * vo(E), _ * C + O * mo(E))), o += D ? w + T * so : w, D ^ m >= n ^ b >= n) {
|
|
37124
|
+
var k = Po(Mo(p), Mo(y));
|
|
37125
|
+
Lo(k);
|
|
37126
|
+
var A = Po(a, k);
|
|
37127
|
+
Lo(A);
|
|
37128
|
+
var j = (D ^ w >= 0 ? -1 : 1) * Co(A[2]);
|
|
37141
37129
|
(r > j || r === j && (k[0] || k[1])) && (s += D ^ w >= 0 ? 1 : -1);
|
|
37142
37130
|
}
|
|
37143
37131
|
}
|
|
@@ -37145,9 +37133,9 @@ function ts(e, t) {
|
|
|
37145
37133
|
}
|
|
37146
37134
|
//#endregion
|
|
37147
37135
|
//#region node_modules/d3-geo/src/clip/index.js
|
|
37148
|
-
function
|
|
37136
|
+
function es(e, t, n, r) {
|
|
37149
37137
|
return function(i) {
|
|
37150
|
-
var a = t(i), o =
|
|
37138
|
+
var a = t(i), o = qo(), s = t(o), c = !1, l, u, d, f = {
|
|
37151
37139
|
point: p,
|
|
37152
37140
|
lineStart: h,
|
|
37153
37141
|
lineEnd: g,
|
|
@@ -37156,8 +37144,8 @@ function ns(e, t, n, r) {
|
|
|
37156
37144
|
},
|
|
37157
37145
|
polygonEnd: function() {
|
|
37158
37146
|
f.point = p, f.lineStart = h, f.lineEnd = g, u = Wt(u);
|
|
37159
|
-
var e =
|
|
37160
|
-
u.length ? (c ||= (i.polygonStart(), !0),
|
|
37147
|
+
var e = $o(l, r);
|
|
37148
|
+
u.length ? (c ||= (i.polygonStart(), !0), Xo(u, ns, e, n, i)) : e && (c ||= (i.polygonStart(), !0), i.lineStart(), n(null, null, 1, i), i.lineEnd()), c &&= (i.polygonEnd(), !1), u = l = null;
|
|
37161
37149
|
},
|
|
37162
37150
|
sphere: function() {
|
|
37163
37151
|
i.polygonStart(), i.lineStart(), n(null, null, 1, i), i.lineEnd(), i.polygonEnd();
|
|
@@ -37192,32 +37180,32 @@ function ns(e, t, n, r) {
|
|
|
37192
37180
|
}
|
|
37193
37181
|
return;
|
|
37194
37182
|
}
|
|
37195
|
-
r > 1 && e & 2 && t.push(t.pop().concat(t.shift())), u.push(t.filter(
|
|
37183
|
+
r > 1 && e & 2 && t.push(t.pop().concat(t.shift())), u.push(t.filter(ts));
|
|
37196
37184
|
}
|
|
37197
37185
|
}
|
|
37198
37186
|
return f;
|
|
37199
37187
|
};
|
|
37200
37188
|
}
|
|
37201
|
-
function
|
|
37189
|
+
function ts(e) {
|
|
37202
37190
|
return e.length > 1;
|
|
37203
37191
|
}
|
|
37204
|
-
function
|
|
37205
|
-
return ((e = e.x)[0] < 0 ? e[1] -
|
|
37192
|
+
function ns(e, t) {
|
|
37193
|
+
return ((e = e.x)[0] < 0 ? e[1] - ao - ro : ao - e[1]) - ((t = t.x)[0] < 0 ? t[1] - ao - ro : ao - t[1]);
|
|
37206
37194
|
}
|
|
37207
37195
|
//#endregion
|
|
37208
37196
|
//#region node_modules/d3-geo/src/clip/antimeridian.js
|
|
37209
|
-
var
|
|
37197
|
+
var rs = es(function() {
|
|
37210
37198
|
return !0;
|
|
37211
|
-
},
|
|
37212
|
-
function
|
|
37199
|
+
}, is, os, [-io, -ao]);
|
|
37200
|
+
function is(e) {
|
|
37213
37201
|
var t = NaN, n = NaN, r = NaN, i;
|
|
37214
37202
|
return {
|
|
37215
37203
|
lineStart: function() {
|
|
37216
37204
|
e.lineStart(), i = 1;
|
|
37217
37205
|
},
|
|
37218
37206
|
point: function(a, o) {
|
|
37219
|
-
var s = a > 0 ?
|
|
37220
|
-
|
|
37207
|
+
var s = a > 0 ? io : -io, c = uo(a - t);
|
|
37208
|
+
uo(c - io) < 1e-6 ? (e.point(t, n = (n + o) / 2 > 0 ? ao : -ao), e.point(r, n), e.lineEnd(), e.lineStart(), e.point(s, n), e.point(a, n), i = 0) : r !== s && c >= io && (uo(t - r) < 1e-6 && (t -= r * ro), uo(a - s) < 1e-6 && (a -= s * ro), n = as(t, n, a, o), e.point(r, n), e.lineEnd(), e.lineStart(), e.point(s, n), i = 0), e.point(t = a, n = o), r = s;
|
|
37221
37209
|
},
|
|
37222
37210
|
lineEnd: function() {
|
|
37223
37211
|
e.lineEnd(), t = n = NaN;
|
|
@@ -37227,27 +37215,27 @@ function os(e) {
|
|
|
37227
37215
|
}
|
|
37228
37216
|
};
|
|
37229
37217
|
}
|
|
37230
|
-
function
|
|
37231
|
-
var i, a, o =
|
|
37232
|
-
return
|
|
37218
|
+
function as(e, t, n, r) {
|
|
37219
|
+
var i, a, o = vo(e - n);
|
|
37220
|
+
return uo(o) > 1e-6 ? fo((vo(t) * (a = mo(r)) * vo(n) - vo(r) * (i = mo(t)) * vo(e)) / (i * a * o)) : (t + r) / 2;
|
|
37233
37221
|
}
|
|
37234
|
-
function
|
|
37222
|
+
function os(e, t, n, r) {
|
|
37235
37223
|
var i;
|
|
37236
|
-
if (e == null) i = n *
|
|
37237
|
-
else if (
|
|
37238
|
-
var a = e[0] < t[0] ?
|
|
37224
|
+
if (e == null) i = n * ao, r.point(-io, i), r.point(0, i), r.point(io, i), r.point(io, 0), r.point(io, -i), r.point(0, -i), r.point(-io, -i), r.point(-io, 0), r.point(-io, i);
|
|
37225
|
+
else if (uo(e[0] - t[0]) > 1e-6) {
|
|
37226
|
+
var a = e[0] < t[0] ? io : -io;
|
|
37239
37227
|
i = n * a / 2, r.point(-a, i), r.point(0, i), r.point(a, i);
|
|
37240
37228
|
} else r.point(t[0], t[1]);
|
|
37241
37229
|
}
|
|
37242
37230
|
//#endregion
|
|
37243
37231
|
//#region node_modules/d3-geo/src/clip/circle.js
|
|
37244
|
-
function
|
|
37245
|
-
var t =
|
|
37232
|
+
function ss(e) {
|
|
37233
|
+
var t = mo(e), n = 2 * lo, r = t > 0, i = uo(t) > ro;
|
|
37246
37234
|
function a(t, r, i, a) {
|
|
37247
|
-
|
|
37235
|
+
Go(a, e, n, i, t, r);
|
|
37248
37236
|
}
|
|
37249
37237
|
function o(e, n) {
|
|
37250
|
-
return
|
|
37238
|
+
return mo(e) * mo(n) > t;
|
|
37251
37239
|
}
|
|
37252
37240
|
function s(e) {
|
|
37253
37241
|
var t, n, a, s, u;
|
|
@@ -37256,13 +37244,13 @@ function ls(e) {
|
|
|
37256
37244
|
s = a = !1, u = 1;
|
|
37257
37245
|
},
|
|
37258
37246
|
point: function(d, f) {
|
|
37259
|
-
var p = [d, f], m, h = o(d, f), g = r ? h ? 0 : l(d, f) : h ? l(d + (d < 0 ?
|
|
37260
|
-
if (!t && (s = a = h) && e.lineStart(), h !== a && (m = c(t, p), (!m ||
|
|
37247
|
+
var p = [d, f], m, h = o(d, f), g = r ? h ? 0 : l(d, f) : h ? l(d + (d < 0 ? io : -io), f) : 0;
|
|
37248
|
+
if (!t && (s = a = h) && e.lineStart(), h !== a && (m = c(t, p), (!m || Jo(t, m) || Jo(p, m)) && (p[2] = 1)), h !== a) u = 0, h ? (e.lineStart(), m = c(p, t), e.point(m[0], m[1])) : (m = c(t, p), e.point(m[0], m[1], 2), e.lineEnd()), t = m;
|
|
37261
37249
|
else if (i && t && r ^ h) {
|
|
37262
37250
|
var _;
|
|
37263
37251
|
!(g & n) && (_ = c(p, t, !0)) && (u = 0, r ? (e.lineStart(), e.point(_[0][0], _[0][1]), e.point(_[1][0], _[1][1]), e.lineEnd()) : (e.point(_[1][0], _[1][1]), e.lineEnd(), e.lineStart(), e.point(_[0][0], _[0][1], 3)));
|
|
37264
37252
|
}
|
|
37265
|
-
h && (!t || !
|
|
37253
|
+
h && (!t || !Jo(t, p)) && e.point(p[0], p[1]), t = p, a = h, n = g;
|
|
37266
37254
|
},
|
|
37267
37255
|
lineEnd: function() {
|
|
37268
37256
|
a && e.lineEnd(), t = null;
|
|
@@ -37273,36 +37261,36 @@ function ls(e) {
|
|
|
37273
37261
|
};
|
|
37274
37262
|
}
|
|
37275
37263
|
function c(e, n, r) {
|
|
37276
|
-
var i =
|
|
37264
|
+
var i = Mo(e), a = Mo(n), o = [
|
|
37277
37265
|
1,
|
|
37278
37266
|
0,
|
|
37279
37267
|
0
|
|
37280
|
-
], s =
|
|
37268
|
+
], s = Po(i, a), c = No(s, s), l = s[0], u = c - l * l;
|
|
37281
37269
|
if (!u) return !r && e;
|
|
37282
|
-
var d = t * c / u, f = -t * l / u, p =
|
|
37283
|
-
|
|
37284
|
-
var h = p, g =
|
|
37270
|
+
var d = t * c / u, f = -t * l / u, p = Po(o, s), m = Io(o, d);
|
|
37271
|
+
Fo(m, Io(s, f));
|
|
37272
|
+
var h = p, g = No(m, h), _ = No(h, h), v = g * g - _ * (No(m, m) - 1);
|
|
37285
37273
|
if (!(v < 0)) {
|
|
37286
|
-
var y =
|
|
37287
|
-
if (
|
|
37274
|
+
var y = bo(v), b = Io(h, (-g - y) / _);
|
|
37275
|
+
if (Fo(b, m), b = jo(b), !r) return b;
|
|
37288
37276
|
var x = e[0], S = n[0], C = e[1], w = n[1], T;
|
|
37289
37277
|
S < x && (T = x, x = S, S = T);
|
|
37290
|
-
var E = S - x, D =
|
|
37291
|
-
if (!D && w < C && (T = C, C = w, w = T), O ? D ? C + w > 0 ^ b[1] < (
|
|
37292
|
-
var k =
|
|
37293
|
-
return
|
|
37278
|
+
var E = S - x, D = uo(E - io) < ro, O = D || E < 1e-6;
|
|
37279
|
+
if (!D && w < C && (T = C, C = w, w = T), O ? D ? C + w > 0 ^ b[1] < (uo(b[0] - x) < 1e-6 ? C : w) : C <= b[1] && b[1] <= w : E > io ^ (x <= b[0] && b[0] <= S)) {
|
|
37280
|
+
var k = Io(h, (-g + y) / _);
|
|
37281
|
+
return Fo(k, m), [b, jo(k)];
|
|
37294
37282
|
}
|
|
37295
37283
|
}
|
|
37296
37284
|
}
|
|
37297
37285
|
function l(t, n) {
|
|
37298
|
-
var i = r ? e :
|
|
37286
|
+
var i = r ? e : io - e, a = 0;
|
|
37299
37287
|
return t < -i ? a |= 1 : t > i && (a |= 2), n < -i ? a |= 4 : n > i && (a |= 8), a;
|
|
37300
37288
|
}
|
|
37301
|
-
return
|
|
37289
|
+
return es(o, s, a, r ? [0, -e] : [-io, e - io]);
|
|
37302
37290
|
}
|
|
37303
37291
|
//#endregion
|
|
37304
37292
|
//#region node_modules/d3-geo/src/clip/line.js
|
|
37305
|
-
function
|
|
37293
|
+
function cs(e, t, n, r, i, a) {
|
|
37306
37294
|
var o = e[0], s = e[1], c = t[0], l = t[1], u = 0, d = 1, f = c - o, p = l - s, m = n - o;
|
|
37307
37295
|
if (!(!f && m > 0)) {
|
|
37308
37296
|
if (m /= f, f < 0) {
|
|
@@ -37344,8 +37332,8 @@ function us(e, t, n, r, i, a) {
|
|
|
37344
37332
|
}
|
|
37345
37333
|
//#endregion
|
|
37346
37334
|
//#region node_modules/d3-geo/src/clip/rectangle.js
|
|
37347
|
-
var
|
|
37348
|
-
function
|
|
37335
|
+
var ls = 1e9, us = -ls;
|
|
37336
|
+
function ds(e, t, n, r) {
|
|
37349
37337
|
function i(i, a) {
|
|
37350
37338
|
return e <= i && i <= n && t <= a && a <= r;
|
|
37351
37339
|
}
|
|
@@ -37357,7 +37345,7 @@ function ps(e, t, n, r) {
|
|
|
37357
37345
|
else l.point(a[0], a[1]);
|
|
37358
37346
|
}
|
|
37359
37347
|
function o(r, i) {
|
|
37360
|
-
return
|
|
37348
|
+
return uo(r[0] - e) < 1e-6 ? i > 0 ? 0 : 3 : uo(r[0] - n) < 1e-6 ? i > 0 ? 2 : 1 : uo(r[1] - t) < 1e-6 ? i > 0 ? 1 : 0 : i > 0 ? 3 : 2;
|
|
37361
37349
|
}
|
|
37362
37350
|
function s(e, t) {
|
|
37363
37351
|
return c(e.x, t.x);
|
|
@@ -37367,7 +37355,7 @@ function ps(e, t, n, r) {
|
|
|
37367
37355
|
return n === r ? n === 0 ? t[1] - e[1] : n === 1 ? e[0] - t[0] : n === 2 ? e[1] - t[1] : t[0] - e[0] : n - r;
|
|
37368
37356
|
}
|
|
37369
37357
|
return function(o) {
|
|
37370
|
-
var c = o, l =
|
|
37358
|
+
var c = o, l = qo(), u, d, f, p, m, h, g, _, v, y, b, x = {
|
|
37371
37359
|
point: S,
|
|
37372
37360
|
lineStart: E,
|
|
37373
37361
|
lineEnd: D,
|
|
@@ -37386,7 +37374,7 @@ function ps(e, t, n, r) {
|
|
|
37386
37374
|
}
|
|
37387
37375
|
function T() {
|
|
37388
37376
|
var e = C(), t = b && e, n = (u = Wt(u)).length;
|
|
37389
|
-
(t || n) && (o.polygonStart(), t && (o.lineStart(), a(null, null, 1, o), o.lineEnd()), n &&
|
|
37377
|
+
(t || n) && (o.polygonStart(), t && (o.lineStart(), a(null, null, 1, o), o.lineEnd()), n && Xo(u, s, e, a, o), o.polygonEnd()), c = o, u = d = f = null;
|
|
37390
37378
|
}
|
|
37391
37379
|
function E() {
|
|
37392
37380
|
x.point = O, d && d.push(f = []), y = !0, v = !1, g = _ = NaN;
|
|
@@ -37399,8 +37387,8 @@ function ps(e, t, n, r) {
|
|
|
37399
37387
|
if (d && f.push([a, o]), y) p = a, m = o, h = s, y = !1, s && (c.lineStart(), c.point(a, o));
|
|
37400
37388
|
else if (s && v) c.point(a, o);
|
|
37401
37389
|
else {
|
|
37402
|
-
var l = [g = Math.max(
|
|
37403
|
-
|
|
37390
|
+
var l = [g = Math.max(us, Math.min(ls, g)), _ = Math.max(us, Math.min(ls, _))], u = [a = Math.max(us, Math.min(ls, a)), o = Math.max(us, Math.min(ls, o))];
|
|
37391
|
+
cs(l, u, e, t, n, r) ? (v || (c.lineStart(), c.point(l[0], l[1])), c.point(u[0], u[1]), s || c.lineEnd(), b = !1) : s && (c.lineStart(), c.point(a, o), b = !1);
|
|
37404
37392
|
}
|
|
37405
37393
|
g = a, _ = o, v = s;
|
|
37406
37394
|
}
|
|
@@ -37409,23 +37397,23 @@ function ps(e, t, n, r) {
|
|
|
37409
37397
|
}
|
|
37410
37398
|
//#endregion
|
|
37411
37399
|
//#region node_modules/d3-geo/src/graticule.js
|
|
37412
|
-
function
|
|
37413
|
-
var r = Gt(e, t -
|
|
37400
|
+
function fs(e, t, n) {
|
|
37401
|
+
var r = Gt(e, t - ro, n).concat(t);
|
|
37414
37402
|
return function(e) {
|
|
37415
37403
|
return r.map(function(t) {
|
|
37416
37404
|
return [e, t];
|
|
37417
37405
|
});
|
|
37418
37406
|
};
|
|
37419
37407
|
}
|
|
37420
|
-
function
|
|
37421
|
-
var r = Gt(e, t -
|
|
37408
|
+
function ps(e, t, n) {
|
|
37409
|
+
var r = Gt(e, t - ro, n).concat(t);
|
|
37422
37410
|
return function(e) {
|
|
37423
37411
|
return r.map(function(t) {
|
|
37424
37412
|
return [t, e];
|
|
37425
37413
|
});
|
|
37426
37414
|
};
|
|
37427
37415
|
}
|
|
37428
|
-
function
|
|
37416
|
+
function ms() {
|
|
37429
37417
|
var e, t, n, r, i, a, o, s, c = 10, l = c, u = 90, d = 360, f, p, m, h, g = 2.5;
|
|
37430
37418
|
function _() {
|
|
37431
37419
|
return {
|
|
@@ -37434,10 +37422,10 @@ function gs() {
|
|
|
37434
37422
|
};
|
|
37435
37423
|
}
|
|
37436
37424
|
function v() {
|
|
37437
|
-
return Gt(
|
|
37438
|
-
return
|
|
37439
|
-
}).map(f)).concat(Gt(
|
|
37440
|
-
return
|
|
37425
|
+
return Gt(ho(r / u) * u, n, u).map(m).concat(Gt(ho(s / d) * d, o, d).map(h)).concat(Gt(ho(t / c) * c, e, c).filter(function(e) {
|
|
37426
|
+
return uo(e % u) > ro;
|
|
37427
|
+
}).map(f)).concat(Gt(ho(a / l) * l, i, l).filter(function(e) {
|
|
37428
|
+
return uo(e % d) > ro;
|
|
37441
37429
|
}).map(p));
|
|
37442
37430
|
}
|
|
37443
37431
|
return _.lines = function() {
|
|
@@ -37465,106 +37453,106 @@ function gs() {
|
|
|
37465
37453
|
}, _.stepMinor = function(e) {
|
|
37466
37454
|
return arguments.length ? (c = +e[0], l = +e[1], _) : [c, l];
|
|
37467
37455
|
}, _.precision = function(c) {
|
|
37468
|
-
return arguments.length ? (g = +c, f =
|
|
37469
|
-
}, _.extentMajor([[-180, -90 +
|
|
37456
|
+
return arguments.length ? (g = +c, f = fs(a, i, 90), p = ps(t, e, g), m = fs(s, o, 90), h = ps(r, n, g), _) : g;
|
|
37457
|
+
}, _.extentMajor([[-180, -90 + ro], [180, 90 - ro]]).extentMinor([[-180, -80 - ro], [180, 80 + ro]]);
|
|
37470
37458
|
}
|
|
37471
37459
|
//#endregion
|
|
37472
37460
|
//#region node_modules/d3-geo/src/identity.js
|
|
37473
|
-
var
|
|
37474
|
-
point:
|
|
37475
|
-
lineStart:
|
|
37476
|
-
lineEnd:
|
|
37461
|
+
var hs = (e) => e, gs = new U(), _s = new U(), vs, ys, bs, xs, Ss = {
|
|
37462
|
+
point: wo,
|
|
37463
|
+
lineStart: wo,
|
|
37464
|
+
lineEnd: wo,
|
|
37477
37465
|
polygonStart: function() {
|
|
37478
|
-
|
|
37466
|
+
Ss.lineStart = Cs, Ss.lineEnd = Es;
|
|
37479
37467
|
},
|
|
37480
37468
|
polygonEnd: function() {
|
|
37481
|
-
|
|
37469
|
+
Ss.lineStart = Ss.lineEnd = Ss.point = wo, gs.add(uo(_s)), _s = new U();
|
|
37482
37470
|
},
|
|
37483
37471
|
result: function() {
|
|
37484
|
-
var e =
|
|
37485
|
-
return
|
|
37472
|
+
var e = gs / 2;
|
|
37473
|
+
return gs = new U(), e;
|
|
37486
37474
|
}
|
|
37487
37475
|
};
|
|
37488
|
-
function
|
|
37489
|
-
|
|
37476
|
+
function Cs() {
|
|
37477
|
+
Ss.point = ws;
|
|
37490
37478
|
}
|
|
37491
|
-
function
|
|
37492
|
-
|
|
37479
|
+
function ws(e, t) {
|
|
37480
|
+
Ss.point = Ts, vs = bs = e, ys = xs = t;
|
|
37493
37481
|
}
|
|
37494
|
-
function
|
|
37495
|
-
|
|
37482
|
+
function Ts(e, t) {
|
|
37483
|
+
_s.add(xs * e - bs * t), bs = e, xs = t;
|
|
37496
37484
|
}
|
|
37497
|
-
function
|
|
37498
|
-
|
|
37485
|
+
function Es() {
|
|
37486
|
+
Ts(vs, ys);
|
|
37499
37487
|
}
|
|
37500
37488
|
//#endregion
|
|
37501
37489
|
//#region node_modules/d3-geo/src/path/bounds.js
|
|
37502
|
-
var
|
|
37503
|
-
point:
|
|
37504
|
-
lineStart:
|
|
37505
|
-
lineEnd:
|
|
37506
|
-
polygonStart:
|
|
37507
|
-
polygonEnd:
|
|
37490
|
+
var Ds = Infinity, Os = Ds, ks = -Ds, As = ks, js = {
|
|
37491
|
+
point: Ms,
|
|
37492
|
+
lineStart: wo,
|
|
37493
|
+
lineEnd: wo,
|
|
37494
|
+
polygonStart: wo,
|
|
37495
|
+
polygonEnd: wo,
|
|
37508
37496
|
result: function() {
|
|
37509
|
-
var e = [[
|
|
37510
|
-
return
|
|
37497
|
+
var e = [[Ds, Os], [ks, As]];
|
|
37498
|
+
return ks = As = -(Os = Ds = Infinity), e;
|
|
37511
37499
|
}
|
|
37512
37500
|
};
|
|
37513
|
-
function
|
|
37514
|
-
e <
|
|
37501
|
+
function Ms(e, t) {
|
|
37502
|
+
e < Ds && (Ds = e), e > ks && (ks = e), t < Os && (Os = t), t > As && (As = t);
|
|
37515
37503
|
}
|
|
37516
37504
|
//#endregion
|
|
37517
37505
|
//#region node_modules/d3-geo/src/path/centroid.js
|
|
37518
|
-
var Fs = 0, Is = 0, Ls = 0, Rs = 0, zs = 0, Bs = 0, Vs = 0, Hs
|
|
37519
|
-
point:
|
|
37520
|
-
lineStart:
|
|
37521
|
-
lineEnd:
|
|
37506
|
+
var Ns = 0, Ps = 0, Fs = 0, Is = 0, Ls = 0, Rs = 0, zs = 0, Bs = 0, Vs = 0, Hs, Us, Ws, Gs, Ks = {
|
|
37507
|
+
point: qs,
|
|
37508
|
+
lineStart: Js,
|
|
37509
|
+
lineEnd: Zs,
|
|
37522
37510
|
polygonStart: function() {
|
|
37523
|
-
|
|
37511
|
+
Ks.lineStart = Qs, Ks.lineEnd = $s;
|
|
37524
37512
|
},
|
|
37525
37513
|
polygonEnd: function() {
|
|
37526
|
-
|
|
37514
|
+
Ks.point = qs, Ks.lineStart = Js, Ks.lineEnd = Zs;
|
|
37527
37515
|
},
|
|
37528
37516
|
result: function() {
|
|
37529
|
-
var e =
|
|
37530
|
-
return Fs = Is = Ls = Rs = zs = Bs = Vs =
|
|
37517
|
+
var e = Vs ? [zs / Vs, Bs / Vs] : Rs ? [Is / Rs, Ls / Rs] : Fs ? [Ns / Fs, Ps / Fs] : [NaN, NaN];
|
|
37518
|
+
return Ns = Ps = Fs = Is = Ls = Rs = zs = Bs = Vs = 0, e;
|
|
37531
37519
|
}
|
|
37532
37520
|
};
|
|
37533
|
-
function
|
|
37534
|
-
|
|
37521
|
+
function qs(e, t) {
|
|
37522
|
+
Ns += e, Ps += t, ++Fs;
|
|
37535
37523
|
}
|
|
37536
|
-
function
|
|
37537
|
-
|
|
37524
|
+
function Js() {
|
|
37525
|
+
Ks.point = Ys;
|
|
37538
37526
|
}
|
|
37539
|
-
function
|
|
37540
|
-
|
|
37527
|
+
function Ys(e, t) {
|
|
37528
|
+
Ks.point = Xs, qs(Ws = e, Gs = t);
|
|
37541
37529
|
}
|
|
37542
|
-
function
|
|
37543
|
-
var n = e -
|
|
37544
|
-
|
|
37530
|
+
function Xs(e, t) {
|
|
37531
|
+
var n = e - Ws, r = t - Gs, i = bo(n * n + r * r);
|
|
37532
|
+
Is += i * (Ws + e) / 2, Ls += i * (Gs + t) / 2, Rs += i, qs(Ws = e, Gs = t);
|
|
37545
37533
|
}
|
|
37546
|
-
function
|
|
37547
|
-
|
|
37534
|
+
function Zs() {
|
|
37535
|
+
Ks.point = qs;
|
|
37548
37536
|
}
|
|
37549
|
-
function
|
|
37550
|
-
|
|
37537
|
+
function Qs() {
|
|
37538
|
+
Ks.point = ec;
|
|
37551
37539
|
}
|
|
37552
|
-
function
|
|
37553
|
-
|
|
37540
|
+
function $s() {
|
|
37541
|
+
tc(Hs, Us);
|
|
37554
37542
|
}
|
|
37555
|
-
function
|
|
37556
|
-
|
|
37543
|
+
function ec(e, t) {
|
|
37544
|
+
Ks.point = tc, qs(Hs = Ws = e, Us = Gs = t);
|
|
37557
37545
|
}
|
|
37558
|
-
function
|
|
37559
|
-
var n = e -
|
|
37560
|
-
|
|
37546
|
+
function tc(e, t) {
|
|
37547
|
+
var n = e - Ws, r = t - Gs, i = bo(n * n + r * r);
|
|
37548
|
+
Is += i * (Ws + e) / 2, Ls += i * (Gs + t) / 2, Rs += i, i = Gs * e - Ws * t, zs += i * (Ws + e), Bs += i * (Gs + t), Vs += i * 3, qs(Ws = e, Gs = t);
|
|
37561
37549
|
}
|
|
37562
37550
|
//#endregion
|
|
37563
37551
|
//#region node_modules/d3-geo/src/path/context.js
|
|
37564
|
-
function
|
|
37552
|
+
function nc(e) {
|
|
37565
37553
|
this._context = e;
|
|
37566
37554
|
}
|
|
37567
|
-
|
|
37555
|
+
nc.prototype = {
|
|
37568
37556
|
_radius: 4.5,
|
|
37569
37557
|
pointRadius: function(e) {
|
|
37570
37558
|
return this._radius = e, this;
|
|
@@ -37590,44 +37578,44 @@ ic.prototype = {
|
|
|
37590
37578
|
this._context.lineTo(e, t);
|
|
37591
37579
|
break;
|
|
37592
37580
|
default:
|
|
37593
|
-
this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0,
|
|
37581
|
+
this._context.moveTo(e + this._radius, t), this._context.arc(e, t, this._radius, 0, so);
|
|
37594
37582
|
break;
|
|
37595
37583
|
}
|
|
37596
37584
|
},
|
|
37597
|
-
result:
|
|
37585
|
+
result: wo
|
|
37598
37586
|
};
|
|
37599
37587
|
//#endregion
|
|
37600
37588
|
//#region node_modules/d3-geo/src/path/measure.js
|
|
37601
|
-
var
|
|
37602
|
-
point:
|
|
37589
|
+
var rc = new U(), ic, ac, oc, sc, cc, lc = {
|
|
37590
|
+
point: wo,
|
|
37603
37591
|
lineStart: function() {
|
|
37604
|
-
|
|
37592
|
+
lc.point = uc;
|
|
37605
37593
|
},
|
|
37606
37594
|
lineEnd: function() {
|
|
37607
|
-
|
|
37595
|
+
ic && dc(ac, oc), lc.point = wo;
|
|
37608
37596
|
},
|
|
37609
37597
|
polygonStart: function() {
|
|
37610
|
-
|
|
37598
|
+
ic = !0;
|
|
37611
37599
|
},
|
|
37612
37600
|
polygonEnd: function() {
|
|
37613
|
-
|
|
37601
|
+
ic = null;
|
|
37614
37602
|
},
|
|
37615
37603
|
result: function() {
|
|
37616
|
-
var e = +
|
|
37617
|
-
return
|
|
37604
|
+
var e = +rc;
|
|
37605
|
+
return rc = new U(), e;
|
|
37618
37606
|
}
|
|
37619
37607
|
};
|
|
37620
|
-
function
|
|
37621
|
-
|
|
37608
|
+
function uc(e, t) {
|
|
37609
|
+
lc.point = dc, ac = sc = e, oc = cc = t;
|
|
37622
37610
|
}
|
|
37623
|
-
function
|
|
37624
|
-
|
|
37611
|
+
function dc(e, t) {
|
|
37612
|
+
sc -= e, cc -= t, rc.add(bo(sc * sc + cc * cc)), sc = e, cc = t;
|
|
37625
37613
|
}
|
|
37626
37614
|
//#endregion
|
|
37627
37615
|
//#region node_modules/d3-geo/src/path/string.js
|
|
37628
|
-
var
|
|
37616
|
+
var fc, pc, mc, hc, gc = class {
|
|
37629
37617
|
constructor(e) {
|
|
37630
|
-
this._append = e == null ?
|
|
37618
|
+
this._append = e == null ? _c : vc(e), this._radius = 4.5, this._ = "";
|
|
37631
37619
|
}
|
|
37632
37620
|
pointRadius(e) {
|
|
37633
37621
|
return this._radius = +e, this;
|
|
@@ -37653,11 +37641,11 @@ var mc, hc, gc, _c, vc = class {
|
|
|
37653
37641
|
this._append`L${e},${t}`;
|
|
37654
37642
|
break;
|
|
37655
37643
|
default:
|
|
37656
|
-
if (this._append`M${e},${t}`, this._radius !==
|
|
37644
|
+
if (this._append`M${e},${t}`, this._radius !== mc || this._append !== pc) {
|
|
37657
37645
|
let e = this._radius, t = this._;
|
|
37658
|
-
this._ = "", this._append`m0,${e}a${e},${e} 0 1,1 0,${-2 * e}a${e},${e} 0 1,1 0,${2 * e}z`,
|
|
37646
|
+
this._ = "", this._append`m0,${e}a${e},${e} 0 1,1 0,${-2 * e}a${e},${e} 0 1,1 0,${2 * e}z`, mc = e, pc = this._append, hc = this._, this._ = t;
|
|
37659
37647
|
}
|
|
37660
|
-
this._ +=
|
|
37648
|
+
this._ += hc;
|
|
37661
37649
|
break;
|
|
37662
37650
|
}
|
|
37663
37651
|
}
|
|
@@ -37666,44 +37654,44 @@ var mc, hc, gc, _c, vc = class {
|
|
|
37666
37654
|
return this._ = "", e.length ? e : null;
|
|
37667
37655
|
}
|
|
37668
37656
|
};
|
|
37669
|
-
function
|
|
37657
|
+
function _c(e) {
|
|
37670
37658
|
let t = 1;
|
|
37671
37659
|
this._ += e[0];
|
|
37672
37660
|
for (let n = e.length; t < n; ++t) this._ += arguments[t] + e[t];
|
|
37673
37661
|
}
|
|
37674
|
-
function
|
|
37662
|
+
function vc(e) {
|
|
37675
37663
|
let t = Math.floor(e);
|
|
37676
37664
|
if (!(t >= 0)) throw RangeError(`invalid digits: ${e}`);
|
|
37677
|
-
if (t > 15) return
|
|
37678
|
-
if (t !==
|
|
37665
|
+
if (t > 15) return _c;
|
|
37666
|
+
if (t !== fc) {
|
|
37679
37667
|
let e = 10 ** t;
|
|
37680
|
-
|
|
37668
|
+
fc = t, pc = function(t) {
|
|
37681
37669
|
let n = 1;
|
|
37682
37670
|
this._ += t[0];
|
|
37683
37671
|
for (let r = t.length; n < r; ++n) this._ += Math.round(arguments[n] * e) / e + t[n];
|
|
37684
37672
|
};
|
|
37685
37673
|
}
|
|
37686
|
-
return
|
|
37674
|
+
return pc;
|
|
37687
37675
|
}
|
|
37688
37676
|
//#endregion
|
|
37689
37677
|
//#region node_modules/d3-geo/src/path/index.js
|
|
37690
|
-
function
|
|
37678
|
+
function yc(e, t) {
|
|
37691
37679
|
let n = 3, r = 4.5, i, a;
|
|
37692
37680
|
function o(e) {
|
|
37693
|
-
return e && (typeof r == "function" && a.pointRadius(+r.apply(this, arguments)),
|
|
37681
|
+
return e && (typeof r == "function" && a.pointRadius(+r.apply(this, arguments)), Ao(e, i(a))), a.result();
|
|
37694
37682
|
}
|
|
37695
37683
|
return o.area = function(e) {
|
|
37696
|
-
return
|
|
37684
|
+
return Ao(e, i(Ss)), Ss.result();
|
|
37697
37685
|
}, o.measure = function(e) {
|
|
37698
|
-
return
|
|
37686
|
+
return Ao(e, i(lc)), lc.result();
|
|
37699
37687
|
}, o.bounds = function(e) {
|
|
37700
|
-
return
|
|
37688
|
+
return Ao(e, i(js)), js.result();
|
|
37701
37689
|
}, o.centroid = function(e) {
|
|
37702
|
-
return
|
|
37690
|
+
return Ao(e, i(Ks)), Ks.result();
|
|
37703
37691
|
}, o.projection = function(t) {
|
|
37704
|
-
return arguments.length ? (i = t == null ? (e = null,
|
|
37692
|
+
return arguments.length ? (i = t == null ? (e = null, hs) : (e = t).stream, o) : e;
|
|
37705
37693
|
}, o.context = function(e) {
|
|
37706
|
-
return arguments.length ? (a = e == null ? (t = null, new
|
|
37694
|
+
return arguments.length ? (a = e == null ? (t = null, new gc(n)) : new nc(t = e), typeof r != "function" && a.pointRadius(r), o) : t;
|
|
37707
37695
|
}, o.pointRadius = function(e) {
|
|
37708
37696
|
return arguments.length ? (r = typeof e == "function" ? e : (a.pointRadius(+e), +e), o) : r;
|
|
37709
37697
|
}, o.digits = function(e) {
|
|
@@ -37714,21 +37702,21 @@ function xc(e, t) {
|
|
|
37714
37702
|
if (!(t >= 0)) throw RangeError(`invalid digits: ${e}`);
|
|
37715
37703
|
n = t;
|
|
37716
37704
|
}
|
|
37717
|
-
return t === null && (a = new
|
|
37705
|
+
return t === null && (a = new gc(n)), o;
|
|
37718
37706
|
}, o.projection(e).digits(n).context(t);
|
|
37719
37707
|
}
|
|
37720
37708
|
//#endregion
|
|
37721
37709
|
//#region node_modules/d3-geo/src/transform.js
|
|
37722
|
-
function
|
|
37710
|
+
function bc(e) {
|
|
37723
37711
|
return function(t) {
|
|
37724
|
-
var n = new
|
|
37712
|
+
var n = new xc();
|
|
37725
37713
|
for (var r in e) n[r] = e[r];
|
|
37726
37714
|
return n.stream = t, n;
|
|
37727
37715
|
};
|
|
37728
37716
|
}
|
|
37729
|
-
function
|
|
37730
|
-
|
|
37731
|
-
constructor:
|
|
37717
|
+
function xc() {}
|
|
37718
|
+
xc.prototype = {
|
|
37719
|
+
constructor: xc,
|
|
37732
37720
|
point: function(e, t) {
|
|
37733
37721
|
this.stream.point(e, t);
|
|
37734
37722
|
},
|
|
@@ -37750,48 +37738,48 @@ Cc.prototype = {
|
|
|
37750
37738
|
};
|
|
37751
37739
|
//#endregion
|
|
37752
37740
|
//#region node_modules/d3-geo/src/projection/fit.js
|
|
37753
|
-
function
|
|
37741
|
+
function Sc(e, t, n) {
|
|
37754
37742
|
var r = e.clipExtent && e.clipExtent();
|
|
37755
|
-
return e.scale(150).translate([0, 0]), r != null && e.clipExtent(null),
|
|
37743
|
+
return e.scale(150).translate([0, 0]), r != null && e.clipExtent(null), Ao(n, e.stream(js)), t(js.result()), r != null && e.clipExtent(r), e;
|
|
37756
37744
|
}
|
|
37757
|
-
function
|
|
37758
|
-
return
|
|
37745
|
+
function Cc(e, t, n) {
|
|
37746
|
+
return Sc(e, function(n) {
|
|
37759
37747
|
var r = t[1][0] - t[0][0], i = t[1][1] - t[0][1], a = Math.min(r / (n[1][0] - n[0][0]), i / (n[1][1] - n[0][1])), o = +t[0][0] + (r - a * (n[1][0] + n[0][0])) / 2, s = +t[0][1] + (i - a * (n[1][1] + n[0][1])) / 2;
|
|
37760
37748
|
e.scale(150 * a).translate([o, s]);
|
|
37761
37749
|
}, n);
|
|
37762
37750
|
}
|
|
37763
|
-
function
|
|
37764
|
-
return
|
|
37751
|
+
function wc(e, t, n) {
|
|
37752
|
+
return Cc(e, [[0, 0], t], n);
|
|
37765
37753
|
}
|
|
37766
|
-
function
|
|
37767
|
-
return
|
|
37754
|
+
function Tc(e, t, n) {
|
|
37755
|
+
return Sc(e, function(n) {
|
|
37768
37756
|
var r = +t, i = r / (n[1][0] - n[0][0]), a = (r - i * (n[1][0] + n[0][0])) / 2, o = -i * n[0][1];
|
|
37769
37757
|
e.scale(150 * i).translate([a, o]);
|
|
37770
37758
|
}, n);
|
|
37771
37759
|
}
|
|
37772
|
-
function
|
|
37773
|
-
return
|
|
37760
|
+
function Ec(e, t, n) {
|
|
37761
|
+
return Sc(e, function(n) {
|
|
37774
37762
|
var r = +t, i = r / (n[1][1] - n[0][1]), a = -i * n[0][0], o = (r - i * (n[1][1] + n[0][1])) / 2;
|
|
37775
37763
|
e.scale(150 * i).translate([a, o]);
|
|
37776
37764
|
}, n);
|
|
37777
37765
|
}
|
|
37778
37766
|
//#endregion
|
|
37779
37767
|
//#region node_modules/d3-geo/src/projection/resample.js
|
|
37780
|
-
var
|
|
37781
|
-
function
|
|
37782
|
-
return +t ?
|
|
37768
|
+
var Dc = 16, Oc = mo(30 * lo);
|
|
37769
|
+
function kc(e, t) {
|
|
37770
|
+
return +t ? jc(e, t) : Ac(e);
|
|
37783
37771
|
}
|
|
37784
|
-
function
|
|
37785
|
-
return
|
|
37772
|
+
function Ac(e) {
|
|
37773
|
+
return bc({ point: function(t, n) {
|
|
37786
37774
|
t = e(t, n), this.stream.point(t[0], t[1]);
|
|
37787
37775
|
} });
|
|
37788
37776
|
}
|
|
37789
|
-
function
|
|
37777
|
+
function jc(e, t) {
|
|
37790
37778
|
function n(r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
|
|
37791
37779
|
var _ = l - r, v = u - i, y = _ * _ + v * v;
|
|
37792
37780
|
if (y > 4 * t && h--) {
|
|
37793
|
-
var b = o + f, x = s + p, S = c + m, C =
|
|
37794
|
-
(j * j / y > t ||
|
|
37781
|
+
var b = o + f, x = s + p, S = c + m, C = bo(b * b + x * x + S * S), w = Co(S /= C), T = uo(uo(S) - 1) < 1e-6 || uo(a - d) < 1e-6 ? (a + d) / 2 : po(x, b), E = e(T, w), D = E[0], O = E[1], k = D - r, A = O - i, j = v * k - _ * A;
|
|
37782
|
+
(j * j / y > t || uo((_ * k + v * A) / y - .5) > .3 || o * f + s * p + c * m < Oc) && (n(r, i, a, o, s, c, D, O, T, b /= C, x /= C, S, h, g), g.point(D, O), n(D, O, T, b, x, S, l, u, d, f, p, m, h, g));
|
|
37795
37783
|
}
|
|
37796
37784
|
}
|
|
37797
37785
|
return function(t) {
|
|
@@ -37813,8 +37801,8 @@ function Nc(e, t) {
|
|
|
37813
37801
|
u = NaN, h.point = v, t.lineStart();
|
|
37814
37802
|
}
|
|
37815
37803
|
function v(r, i) {
|
|
37816
|
-
var a =
|
|
37817
|
-
n(u, d, l, f, p, m, u = o[0], d = o[1], l = r, f = a[0], p = a[1], m = a[2],
|
|
37804
|
+
var a = Mo([r, i]), o = e(r, i);
|
|
37805
|
+
n(u, d, l, f, p, m, u = o[0], d = o[1], l = r, f = a[0], p = a[1], m = a[2], Dc, t), t.point(u, d);
|
|
37818
37806
|
}
|
|
37819
37807
|
function y() {
|
|
37820
37808
|
h.point = g, t.lineEnd();
|
|
@@ -37826,23 +37814,23 @@ function Nc(e, t) {
|
|
|
37826
37814
|
v(r = e, t), i = u, a = d, o = f, s = p, c = m, h.point = v;
|
|
37827
37815
|
}
|
|
37828
37816
|
function S() {
|
|
37829
|
-
n(u, d, l, f, p, m, i, a, r, o, s, c,
|
|
37817
|
+
n(u, d, l, f, p, m, i, a, r, o, s, c, Dc, t), h.lineEnd = y, y();
|
|
37830
37818
|
}
|
|
37831
37819
|
return h;
|
|
37832
37820
|
};
|
|
37833
37821
|
}
|
|
37834
37822
|
//#endregion
|
|
37835
37823
|
//#region node_modules/d3-geo/src/projection/index.js
|
|
37836
|
-
var
|
|
37837
|
-
this.stream.point(e *
|
|
37824
|
+
var Mc = bc({ point: function(e, t) {
|
|
37825
|
+
this.stream.point(e * lo, t * lo);
|
|
37838
37826
|
} });
|
|
37839
|
-
function
|
|
37840
|
-
return
|
|
37827
|
+
function Nc(e) {
|
|
37828
|
+
return bc({ point: function(t, n) {
|
|
37841
37829
|
var r = e(t, n);
|
|
37842
37830
|
return this.stream.point(r[0], r[1]);
|
|
37843
37831
|
} });
|
|
37844
37832
|
}
|
|
37845
|
-
function
|
|
37833
|
+
function Pc(e, t, n, r, i) {
|
|
37846
37834
|
function a(a, o) {
|
|
37847
37835
|
return a *= r, o *= i, [t + e * a, n - e * o];
|
|
37848
37836
|
}
|
|
@@ -37850,9 +37838,9 @@ function Ic(e, t, n, r, i) {
|
|
|
37850
37838
|
return [(a - t) / e * r, (n - o) / e * i];
|
|
37851
37839
|
}, a;
|
|
37852
37840
|
}
|
|
37853
|
-
function
|
|
37854
|
-
if (!a) return
|
|
37855
|
-
var o =
|
|
37841
|
+
function Fc(e, t, n, r, i, a) {
|
|
37842
|
+
if (!a) return Pc(e, t, n, r, i);
|
|
37843
|
+
var o = mo(a), s = vo(a), c = o * e, l = s * e, u = o / e, d = s / e, f = (s * n - o * t) / e, p = (s * t + o * n) / e;
|
|
37856
37844
|
function m(e, a) {
|
|
37857
37845
|
return e *= r, a *= i, [c * e - l * a + t, n - l * e - c * a];
|
|
37858
37846
|
}
|
|
@@ -37860,61 +37848,61 @@ function Lc(e, t, n, r, i, a) {
|
|
|
37860
37848
|
return [r * (u * e - d * t + f), i * (p - d * e - u * t)];
|
|
37861
37849
|
}, m;
|
|
37862
37850
|
}
|
|
37863
|
-
function
|
|
37864
|
-
return
|
|
37851
|
+
function Ic(e) {
|
|
37852
|
+
return Lc(function() {
|
|
37865
37853
|
return e;
|
|
37866
37854
|
})();
|
|
37867
37855
|
}
|
|
37868
|
-
function
|
|
37869
|
-
var t, n = 150, r = 480, i = 250, a = 0, o = 0, s = 0, c = 0, l = 0, u, d = 0, f = 1, p = 1, m = null, h =
|
|
37856
|
+
function Lc(e) {
|
|
37857
|
+
var t, n = 150, r = 480, i = 250, a = 0, o = 0, s = 0, c = 0, l = 0, u, d = 0, f = 1, p = 1, m = null, h = rs, g = null, _, v, y, b = hs, x = .5, S, C, w, T, E;
|
|
37870
37858
|
function D(e) {
|
|
37871
|
-
return w(e[0] *
|
|
37859
|
+
return w(e[0] * lo, e[1] * lo);
|
|
37872
37860
|
}
|
|
37873
37861
|
function O(e) {
|
|
37874
|
-
return e = w.invert(e[0], e[1]), e && [e[0] *
|
|
37862
|
+
return e = w.invert(e[0], e[1]), e && [e[0] * co, e[1] * co];
|
|
37875
37863
|
}
|
|
37876
37864
|
D.stream = function(e) {
|
|
37877
|
-
return T && E === e ? T : T =
|
|
37865
|
+
return T && E === e ? T : T = Mc(Nc(u)(h(S(b(E = e)))));
|
|
37878
37866
|
}, D.preclip = function(e) {
|
|
37879
37867
|
return arguments.length ? (h = e, m = void 0, A()) : h;
|
|
37880
37868
|
}, D.postclip = function(e) {
|
|
37881
37869
|
return arguments.length ? (b = e, g = _ = v = y = null, A()) : b;
|
|
37882
37870
|
}, D.clipAngle = function(e) {
|
|
37883
|
-
return arguments.length ? (h = +e ?
|
|
37871
|
+
return arguments.length ? (h = +e ? ss(m = e * lo) : (m = null, rs), A()) : m * co;
|
|
37884
37872
|
}, D.clipExtent = function(e) {
|
|
37885
|
-
return arguments.length ? (b = e == null ? (g = _ = v = y = null,
|
|
37873
|
+
return arguments.length ? (b = e == null ? (g = _ = v = y = null, hs) : ds(g = +e[0][0], _ = +e[0][1], v = +e[1][0], y = +e[1][1]), A()) : g == null ? null : [[g, _], [v, y]];
|
|
37886
37874
|
}, D.scale = function(e) {
|
|
37887
37875
|
return arguments.length ? (n = +e, k()) : n;
|
|
37888
37876
|
}, D.translate = function(e) {
|
|
37889
37877
|
return arguments.length ? (r = +e[0], i = +e[1], k()) : [r, i];
|
|
37890
37878
|
}, D.center = function(e) {
|
|
37891
|
-
return arguments.length ? (a = e[0] % 360 *
|
|
37879
|
+
return arguments.length ? (a = e[0] % 360 * lo, o = e[1] % 360 * lo, k()) : [a * co, o * co];
|
|
37892
37880
|
}, D.rotate = function(e) {
|
|
37893
|
-
return arguments.length ? (s = e[0] % 360 *
|
|
37894
|
-
s *
|
|
37895
|
-
c *
|
|
37896
|
-
l *
|
|
37881
|
+
return arguments.length ? (s = e[0] % 360 * lo, c = e[1] % 360 * lo, l = e.length > 2 ? e[2] % 360 * lo : 0, k()) : [
|
|
37882
|
+
s * co,
|
|
37883
|
+
c * co,
|
|
37884
|
+
l * co
|
|
37897
37885
|
];
|
|
37898
37886
|
}, D.angle = function(e) {
|
|
37899
|
-
return arguments.length ? (d = e % 360 *
|
|
37887
|
+
return arguments.length ? (d = e % 360 * lo, k()) : d * co;
|
|
37900
37888
|
}, D.reflectX = function(e) {
|
|
37901
37889
|
return arguments.length ? (f = e ? -1 : 1, k()) : f < 0;
|
|
37902
37890
|
}, D.reflectY = function(e) {
|
|
37903
37891
|
return arguments.length ? (p = e ? -1 : 1, k()) : p < 0;
|
|
37904
37892
|
}, D.precision = function(e) {
|
|
37905
|
-
return arguments.length ? (S =
|
|
37893
|
+
return arguments.length ? (S = kc(C, x = e * e), A()) : bo(x);
|
|
37906
37894
|
}, D.fitExtent = function(e, t) {
|
|
37907
|
-
return
|
|
37895
|
+
return Cc(D, e, t);
|
|
37908
37896
|
}, D.fitSize = function(e, t) {
|
|
37909
|
-
return
|
|
37897
|
+
return wc(D, e, t);
|
|
37910
37898
|
}, D.fitWidth = function(e, t) {
|
|
37911
|
-
return
|
|
37899
|
+
return Tc(D, e, t);
|
|
37912
37900
|
}, D.fitHeight = function(e, t) {
|
|
37913
|
-
return
|
|
37901
|
+
return Ec(D, e, t);
|
|
37914
37902
|
};
|
|
37915
37903
|
function k() {
|
|
37916
|
-
var e =
|
|
37917
|
-
return u =
|
|
37904
|
+
var e = Fc(n, 0, 0, f, p, d).apply(null, t(a, o)), m = Fc(n, r - e[0], i - e[1], f, p, d);
|
|
37905
|
+
return u = Bo(s, c, l), C = Ro(t, m), w = Ro(u, C), S = kc(C, x), A();
|
|
37918
37906
|
}
|
|
37919
37907
|
function A() {
|
|
37920
37908
|
return T = E = null, D;
|
|
@@ -37925,25 +37913,25 @@ function zc(e) {
|
|
|
37925
37913
|
}
|
|
37926
37914
|
//#endregion
|
|
37927
37915
|
//#region node_modules/d3-geo/src/projection/azimuthal.js
|
|
37928
|
-
function
|
|
37916
|
+
function Rc(e) {
|
|
37929
37917
|
return function(t, n) {
|
|
37930
|
-
var r =
|
|
37931
|
-
return [
|
|
37918
|
+
var r = bo(t * t + n * n), i = e(r), a = vo(i), o = mo(i);
|
|
37919
|
+
return [po(t * a, r * o), Co(r && n * a / r)];
|
|
37932
37920
|
};
|
|
37933
37921
|
}
|
|
37934
37922
|
//#endregion
|
|
37935
37923
|
//#region node_modules/d3-geo/src/projection/mercator.js
|
|
37936
|
-
function
|
|
37937
|
-
return [e,
|
|
37924
|
+
function zc(e, t) {
|
|
37925
|
+
return [e, _o(xo((ao + t) / 2))];
|
|
37938
37926
|
}
|
|
37939
|
-
|
|
37940
|
-
return [e, 2 *
|
|
37927
|
+
zc.invert = function(e, t) {
|
|
37928
|
+
return [e, 2 * fo(go(t)) - ao];
|
|
37941
37929
|
};
|
|
37942
|
-
function
|
|
37943
|
-
return
|
|
37930
|
+
function Bc() {
|
|
37931
|
+
return Vc(zc).scale(961 / so);
|
|
37944
37932
|
}
|
|
37945
|
-
function
|
|
37946
|
-
var t =
|
|
37933
|
+
function Vc(e) {
|
|
37934
|
+
var t = Ic(e), n = t.center, r = t.scale, i = t.translate, a = t.clipExtent, o = null, s, c, l;
|
|
37947
37935
|
t.scale = function(e) {
|
|
37948
37936
|
return arguments.length ? (r(e), u()) : r();
|
|
37949
37937
|
}, t.translate = function(e) {
|
|
@@ -37954,27 +37942,27 @@ function Uc(e) {
|
|
|
37954
37942
|
return arguments.length ? (e == null ? o = s = c = l = null : (o = +e[0][0], s = +e[0][1], c = +e[1][0], l = +e[1][1]), u()) : o == null ? null : [[o, s], [c, l]];
|
|
37955
37943
|
};
|
|
37956
37944
|
function u() {
|
|
37957
|
-
var n =
|
|
37958
|
-
return a(o == null ? [[i[0] - n, i[1] - n], [i[0] + n, i[1] + n]] : e ===
|
|
37945
|
+
var n = io * r(), i = t(Wo(t.rotate()).invert([0, 0]));
|
|
37946
|
+
return a(o == null ? [[i[0] - n, i[1] - n], [i[0] + n, i[1] + n]] : e === zc ? [[Math.max(i[0] - n, o), s], [Math.min(i[0] + n, c), l]] : [[o, Math.max(i[1] - n, s)], [c, Math.min(i[1] + n, l)]]);
|
|
37959
37947
|
}
|
|
37960
37948
|
return u();
|
|
37961
37949
|
}
|
|
37962
37950
|
//#endregion
|
|
37963
37951
|
//#region node_modules/d3-geo/src/projection/orthographic.js
|
|
37964
|
-
function
|
|
37965
|
-
return [
|
|
37952
|
+
function Hc(e, t) {
|
|
37953
|
+
return [mo(t) * vo(e), vo(t)];
|
|
37966
37954
|
}
|
|
37967
|
-
|
|
37968
|
-
function
|
|
37969
|
-
return
|
|
37955
|
+
Hc.invert = Rc(Co);
|
|
37956
|
+
function Uc() {
|
|
37957
|
+
return Ic(Hc).scale(249.5).clipAngle(90 + ro);
|
|
37970
37958
|
}
|
|
37971
37959
|
//#endregion
|
|
37972
37960
|
//#region src/adornments/insetMap.ts
|
|
37973
|
-
var
|
|
37974
|
-
function
|
|
37961
|
+
var Wc = 100;
|
|
37962
|
+
function Gc(e, t, n, r) {
|
|
37975
37963
|
let i = document.createElement("div");
|
|
37976
37964
|
i.className = "adornment";
|
|
37977
|
-
let a = e.scale ?? 1, o = a *
|
|
37965
|
+
let a = e.scale ?? 1, o = a * Wc;
|
|
37978
37966
|
i.style.width = `${o * r}px`, i.style.height = `${o * r}px`, i.style.flexGrow = "0", i.style.flexShrink = "0";
|
|
37979
37967
|
let s = {
|
|
37980
37968
|
id: e.id,
|
|
@@ -38003,29 +37991,29 @@ function qc(e, t, n, r) {
|
|
|
38003
37991
|
globeGeoJson: void 0
|
|
38004
37992
|
};
|
|
38005
37993
|
return fetch(`${n}/data/insetmaps/${e.fileName}`).then((e) => e.json()).then((e) => {
|
|
38006
|
-
s.geoJson =
|
|
37994
|
+
s.geoJson = ta(e, Object.keys(e.objects)[0]), Kc(s);
|
|
38007
37995
|
}), t.on("moveend", () => {
|
|
38008
|
-
s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) &&
|
|
37996
|
+
s.moveEndPosition = t.getCenter(), (s.isGlobe || s.globeFallbackActive) && Kc(s);
|
|
38009
37997
|
}), t.on("move", () => {
|
|
38010
37998
|
if (!s.isGlobe) {
|
|
38011
|
-
let [e, r, i, a] = s.boundingBox, o =
|
|
37999
|
+
let [e, r, i, a] = s.boundingBox, o = Yc(t), c = no(Ln([o, Fn([[
|
|
38012
38000
|
[e, r],
|
|
38013
38001
|
[e, a],
|
|
38014
38002
|
[i, a],
|
|
38015
38003
|
[i, r],
|
|
38016
38004
|
[e, r]
|
|
38017
|
-
]])])), l =
|
|
38018
|
-
s.globeFallbackActive !== u && (s.globeFallbackActive = u, s.moveEndPosition = t.getCenter(),
|
|
38019
|
-
s.globeGeoJson =
|
|
38005
|
+
]])])), l = Ki(o), u = (c ? Ki(c) : 0) < l * .75;
|
|
38006
|
+
s.globeFallbackActive !== u && (s.globeFallbackActive = u, s.moveEndPosition = t.getCenter(), Kc(s)), s.globeFallbackActive && !s.globeGeoJsonRequested && (s.globeGeoJsonRequested = !0, fetch(`${n}/data/insetmaps/world-110m.json`).then((e) => e.json()).then((e) => {
|
|
38007
|
+
s.globeGeoJson = ta(e, Object.keys(e.objects)[0]), s.moveEndPosition = t.getCenter(), Kc(s);
|
|
38020
38008
|
}));
|
|
38021
38009
|
}
|
|
38022
|
-
|
|
38010
|
+
Jc(s);
|
|
38023
38011
|
}), i;
|
|
38024
38012
|
}
|
|
38025
|
-
function
|
|
38013
|
+
function Kc(e) {
|
|
38026
38014
|
let { id: t, container: n, scale: r, backgroundColor: i, globeBackgroundColor: a, secondaryFillColor: o, secondaryStrokeColor: s, primaryFillColor: c, primaryStrokeColor: l, graticuleColor: u, borderColor: d, frameColor: f, frameOutlineColor: p, dotColor: m, dotOutlineColor: h } = e, g = e.globeFallbackActive && e.globeGeoJson !== void 0, _ = g ? e.globeGeoJson : e.geoJson, v = g || e.isGlobe;
|
|
38027
38015
|
if (_ === void 0) return;
|
|
38028
|
-
let y =
|
|
38016
|
+
let y = Wc * r, b = y / 2, x = .1 * r, S = [v ? `<circle cx="${b}" cy="${b}" r="${b}" fill="${a}"></circle>` : `<rect x="0" y="0" width="${y}" height="${y}" fill="${i}"></rect>`], { path: C } = qc(e), w = C({
|
|
38029
38017
|
..._,
|
|
38030
38018
|
features: _.features.filter((e) => e.properties?.class !== "P1")
|
|
38031
38019
|
});
|
|
@@ -38049,7 +38037,7 @@ function Jc(e) {
|
|
|
38049
38037
|
stroke-width="${x}"
|
|
38050
38038
|
></path>
|
|
38051
38039
|
`), v) {
|
|
38052
|
-
let e = C(Ln(
|
|
38040
|
+
let e = C(Ln(ms().step([10, 10]).lines().map((e) => In(e.coordinates))));
|
|
38053
38041
|
S.push(`
|
|
38054
38042
|
<path
|
|
38055
38043
|
d="${e}"
|
|
@@ -38101,15 +38089,15 @@ function Jc(e) {
|
|
|
38101
38089
|
>
|
|
38102
38090
|
${S.join("")}
|
|
38103
38091
|
</svg>
|
|
38104
|
-
`,
|
|
38092
|
+
`, Jc(e);
|
|
38105
38093
|
}
|
|
38106
|
-
function
|
|
38107
|
-
let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a =
|
|
38094
|
+
function qc(e) {
|
|
38095
|
+
let { scale: t, boundingBox: n, moveEndPosition: r } = e, i = e.globeFallbackActive && e.globeGeoJson !== void 0 || e.isGlobe, a = Wc * t, o = yc(), s;
|
|
38108
38096
|
if (i) {
|
|
38109
38097
|
let { lng: e, lat: t } = r;
|
|
38110
|
-
s =
|
|
38098
|
+
s = Uc().scale(a / 2).translate([a / 2, a / 2]).rotate([-e, -t]).clipAngle(90);
|
|
38111
38099
|
} else {
|
|
38112
|
-
s =
|
|
38100
|
+
s = Bc().scale(1).translate([0, 0]);
|
|
38113
38101
|
let e = s([n[0], n[3]]), t = s([n[2], n[1]]), r = Math.abs(t[0] - e[0]), i = Math.abs(t[1] - e[1]), o = (e[0] + t[0]) / 2, c = (e[1] + t[1]) / 2, l = 1 / Math.max(r / a, i / a);
|
|
38114
38102
|
s.scale(l).translate([a / 2 - l * o, a / 2 - l * c]);
|
|
38115
38103
|
}
|
|
@@ -38118,10 +38106,10 @@ function Yc(e) {
|
|
|
38118
38106
|
projection: s
|
|
38119
38107
|
};
|
|
38120
38108
|
}
|
|
38121
|
-
function
|
|
38109
|
+
function Jc(e) {
|
|
38122
38110
|
let { id: t, map: n, container: r, scale: i } = e, a = r.querySelector(`#frame-${t}`), o = r.querySelector(`#frame-outline-${t}`), s = r.querySelector(`#dot-${t}`);
|
|
38123
38111
|
if (!a || !o || !s) return;
|
|
38124
|
-
let c =
|
|
38112
|
+
let c = Yc(n), { path: l, projection: u } = qc(e), d = Infinity, f = -Infinity, p = Infinity, m = -Infinity, h = Infinity, g = -Infinity;
|
|
38125
38113
|
Bn(c, (e) => {
|
|
38126
38114
|
let t = u(e);
|
|
38127
38115
|
d = Math.min(d, e[0]), f = Math.max(f, e[0]), p = Math.min(p, t[0]), m = Math.max(m, t[0]), h = Math.min(h, t[1]), g = Math.max(g, t[1]);
|
|
@@ -38137,25 +38125,25 @@ function Xc(e) {
|
|
|
38137
38125
|
a.setAttribute("d", e), o.setAttribute("d", e);
|
|
38138
38126
|
} else a.style.display = "none", o.style.display = "none", s.style.display = "none";
|
|
38139
38127
|
}
|
|
38140
|
-
function
|
|
38128
|
+
function Yc(e) {
|
|
38141
38129
|
let t = e.getCanvas().width, n = e.getCanvas().height, r = [];
|
|
38142
38130
|
for (let n = 0; n < 64; n++) {
|
|
38143
|
-
let { lng: i, lat: a } = e.
|
|
38131
|
+
let { lng: i, lat: a } = e.unprojectWithScaleCorrection([k(0, t, n / 64), 0]);
|
|
38144
38132
|
r.push([i, a]);
|
|
38145
38133
|
}
|
|
38146
38134
|
for (let i = 0; i < 64; i++) {
|
|
38147
|
-
let { lng: a, lat: o } = e.
|
|
38135
|
+
let { lng: a, lat: o } = e.unprojectWithScaleCorrection([t, k(0, n, i / 64)]);
|
|
38148
38136
|
r.push([a, o]);
|
|
38149
38137
|
}
|
|
38150
38138
|
for (let i = 0; i < 64; i++) {
|
|
38151
|
-
let { lng: a, lat: o } = e.
|
|
38139
|
+
let { lng: a, lat: o } = e.unprojectWithScaleCorrection([k(t, 0, i / 64), n]);
|
|
38152
38140
|
r.push([a, o]);
|
|
38153
38141
|
}
|
|
38154
38142
|
for (let t = 0; t < 64; t++) {
|
|
38155
|
-
let { lng: i, lat: a } = e.
|
|
38143
|
+
let { lng: i, lat: a } = e.unprojectWithScaleCorrection([0, k(n, 0, t / 64)]);
|
|
38156
38144
|
r.push([i, a]);
|
|
38157
38145
|
}
|
|
38158
|
-
let { lng: i, lat: a } = e.
|
|
38146
|
+
let { lng: i, lat: a } = e.unprojectWithScaleCorrection([0, 0]);
|
|
38159
38147
|
return r.push([i, a]), {
|
|
38160
38148
|
type: "Feature",
|
|
38161
38149
|
properties: {},
|
|
@@ -38167,14 +38155,14 @@ function Zc(e) {
|
|
|
38167
38155
|
}
|
|
38168
38156
|
//#endregion
|
|
38169
38157
|
//#region src/utils/scalebar.ts
|
|
38170
|
-
var
|
|
38158
|
+
var Xc = [
|
|
38171
38159
|
10,
|
|
38172
38160
|
5,
|
|
38173
38161
|
3,
|
|
38174
38162
|
2,
|
|
38175
38163
|
1
|
|
38176
38164
|
];
|
|
38177
|
-
function
|
|
38165
|
+
function Zc(e, t = 1e-6) {
|
|
38178
38166
|
let n = Math.floor(e);
|
|
38179
38167
|
if (e -= n, e < t) return [n, 1];
|
|
38180
38168
|
if (1 - t < e) return [n + 1, 1];
|
|
@@ -38186,37 +38174,37 @@ function $c(e, t = 1e-6) {
|
|
|
38186
38174
|
else return [n * c + s, c];
|
|
38187
38175
|
}
|
|
38188
38176
|
}
|
|
38189
|
-
function
|
|
38177
|
+
function Qc(e) {
|
|
38190
38178
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
38191
|
-
for (let e of
|
|
38192
|
-
return
|
|
38179
|
+
for (let e of Xc) if (n >= e) return e * t;
|
|
38180
|
+
return $c(n) * t;
|
|
38193
38181
|
}
|
|
38194
|
-
function
|
|
38182
|
+
function $c(e) {
|
|
38195
38183
|
let t = 10 ** Math.ceil(-Math.log(e) / Math.LN10);
|
|
38196
38184
|
return Math.round(e * t) / t;
|
|
38197
38185
|
}
|
|
38198
38186
|
//#endregion
|
|
38199
38187
|
//#region src/adornments/scalebar.ts
|
|
38200
|
-
var
|
|
38188
|
+
var el = {
|
|
38201
38189
|
kilometer: "km",
|
|
38202
38190
|
meter: "m",
|
|
38203
38191
|
mile: "mi",
|
|
38204
38192
|
foot: "ft",
|
|
38205
38193
|
nauticalMile: "nm"
|
|
38206
38194
|
};
|
|
38207
|
-
function
|
|
38195
|
+
function tl(e, t, n) {
|
|
38208
38196
|
let r = document.createElement("div");
|
|
38209
|
-
return r.className = "adornment", r.innerHTML =
|
|
38210
|
-
r.innerHTML =
|
|
38197
|
+
return r.className = "adornment", r.innerHTML = nl(t, e, n), t.on("move", () => {
|
|
38198
|
+
r.innerHTML = nl(t, e, n);
|
|
38211
38199
|
}), r;
|
|
38212
38200
|
}
|
|
38213
|
-
function
|
|
38214
|
-
let { maxWidth: r = 100, fontSize: i = 8, font: a = "Arial, sans-serif", color: o = "#000000", unit: s = "metric_and_imperial" } = t, c = e.getCenter(), l = e.
|
|
38215
|
-
let n = O("meter", e, u), r =
|
|
38201
|
+
function nl(e, t, n) {
|
|
38202
|
+
let { maxWidth: r = 100, fontSize: i = 8, font: a = "Arial, sans-serif", color: o = "#000000", unit: s = "metric_and_imperial" } = t, c = e.getCenter(), l = e.projectWithScaleCorrection(c), u = x(c, e.unprojectWithScaleCorrection([l.x + r, l.y])), d = Object.fromEntries(Object.entries(el).map(([e, t]) => {
|
|
38203
|
+
let n = O("meter", e, u), r = Qc(n) || 0;
|
|
38216
38204
|
return [e, {
|
|
38217
38205
|
value: n,
|
|
38218
38206
|
ratio: n ? r / n : 0,
|
|
38219
|
-
humanized: r < 1 ? `${
|
|
38207
|
+
humanized: r < 1 ? `${Zc(r).join("/")} ${t}` : `${r} ${t}`
|
|
38220
38208
|
}];
|
|
38221
38209
|
})), f = d.meter.value > 1e3 ? d.kilometer : d.meter, p = d.foot.value > 5280 ? d.mile : d.foot, m = {
|
|
38222
38210
|
imperial: p,
|
|
@@ -38364,14 +38352,14 @@ function il(e, t, n) {
|
|
|
38364
38352
|
}
|
|
38365
38353
|
//#endregion
|
|
38366
38354
|
//#region src/adornments/heading.ts
|
|
38367
|
-
function
|
|
38355
|
+
function rl(e, t, n, r) {
|
|
38368
38356
|
let i = document.createElement("div");
|
|
38369
38357
|
i.className = "adornment";
|
|
38370
38358
|
let a = "ArialMT", o = [e.titleFont ?? a, e.subtitleFont ?? a];
|
|
38371
|
-
return
|
|
38359
|
+
return wr(Array.from(new Set(o)), t, n).then(() => i.innerHTML = il(e, a, r)), i;
|
|
38372
38360
|
}
|
|
38373
|
-
function
|
|
38374
|
-
let { title: r, titleColor: i = "#000000", titleFont: a = t, titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFont: u = t, subtitleFontSize: d = 12, subtitleJustify: f = "center", background: p = "#ffffff", showBackground: m = !1 } = e, h = 0, g = 0, _ = 0, v = 0, y = 0, b = r.trim().length > 0 ?
|
|
38361
|
+
function il(e, t, n) {
|
|
38362
|
+
let { title: r, titleColor: i = "#000000", titleFont: a = t, titleFontSize: o = 20, titleJustify: s = "center", subtitle: c, subtitleColor: l = "#000000", subtitleFont: u = t, subtitleFontSize: d = 12, subtitleJustify: f = "center", background: p = "#ffffff", showBackground: m = !1 } = e, h = 0, g = 0, _ = 0, v = 0, y = 0, b = r.trim().length > 0 ? zr([r], a, o) : null, x = c.trim().length > 0 ? zr([c], u, d) : null;
|
|
38375
38363
|
if (h = Math.max(b?.width ?? 0, x?.width ?? 0), b) {
|
|
38376
38364
|
let { ascent: e, descent: t } = b;
|
|
38377
38365
|
g = e + t, v = 8 + e;
|
|
@@ -38383,13 +38371,13 @@ function ol(e, t, n) {
|
|
|
38383
38371
|
let S = h + 16, C = g + _ + 16, w = s === "center" ? S / 2 : s === "right" ? S - 8 : 8, T = f === "center" ? S / 2 : f === "right" ? S - 8 : 8, E = "";
|
|
38384
38372
|
if (E += `<svg class="adornment-svg" xmlns="http://www.w3.org/2000/svg" width="${S * n}" height="${C * n}" viewBox="0 0 ${S} ${C}">`, E += `<rect x="0" y="0" width="${S}" height="${C}" fill="${p}" rx="6" style="visibility:${m ? "visible" : "hidden"}" />`, b || x) {
|
|
38385
38373
|
let e = s === "center" ? "middle" : s === "right" ? "end" : "start", t = f === "center" ? "middle" : f === "right" ? "end" : "start";
|
|
38386
|
-
E += `<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`, b && (E += `${
|
|
38374
|
+
E += `<text x="${w}" y="${v}" fill="${i}" font-family="${a}" font-size="${o}" text-anchor="${e}">`, b && (E += `${Cr(r)}`), x && (E += `<tspan x="${T}" y="${y}" fill="${l}" font-family="${u}" font-size="${d}" text-anchor="${t}">`, E += `${Cr(c)}`, E += "</tspan>"), E += "</text>";
|
|
38387
38375
|
}
|
|
38388
38376
|
return E += "</svg>", E;
|
|
38389
38377
|
}
|
|
38390
38378
|
//#endregion
|
|
38391
38379
|
//#region src/renderAdornments.ts
|
|
38392
|
-
var
|
|
38380
|
+
var al = [
|
|
38393
38381
|
"top_left",
|
|
38394
38382
|
"top_right",
|
|
38395
38383
|
"bottom_left",
|
|
@@ -38398,35 +38386,35 @@ var sl = [
|
|
|
38398
38386
|
"left_center",
|
|
38399
38387
|
"right_center",
|
|
38400
38388
|
"bottom_center"
|
|
38401
|
-
],
|
|
38402
|
-
function
|
|
38389
|
+
], ol = /* @__PURE__ */ new Map();
|
|
38390
|
+
function sl(e, t, n, r, i, a, o, s, c) {
|
|
38403
38391
|
let { adornments: l = [] } = e;
|
|
38404
|
-
|
|
38405
|
-
t.type === "custom" ?
|
|
38406
|
-
}),
|
|
38392
|
+
cl(n, t, s, c), l.forEach((t) => {
|
|
38393
|
+
t.type === "custom" ? ul(F(t, s), t.position, t.stacking) : t.type === "scalebar" ? ul(tl(t, n, s), t.position, t.stacking) : t.type === "northArrow" ? ul(si(t, n, s), t.position, t.stacking) : t.type === "webControls" && t.buttons ? ul(Bi(t, n, r), t.position, t.stacking) : t.type === "insetMap" ? ul(Gc(t, n, a, s), t.position, t.stacking) : t.type === "heading" ? ul(rl(t, i, o, s), t.position, t.stacking) : t.type === "manualLegend" ? ul(oi(t, i, o, s), t.position, t.stacking) : t.type === "connectedLegend" ? ul(Qr(t, e, n, i, o, s), t.position, t.stacking) : t.type === "copyright" && c === "video" && ul(Hi(t, n, s), t.position, t.stacking);
|
|
38394
|
+
}), dl(n), n.on("moveend", () => dl(n));
|
|
38407
38395
|
}
|
|
38408
|
-
function
|
|
38396
|
+
function cl(e, t, n, r) {
|
|
38409
38397
|
let i = e.getContainer();
|
|
38410
|
-
for (let e of
|
|
38398
|
+
for (let e of al) {
|
|
38411
38399
|
let a = document.createElement("div");
|
|
38412
|
-
a.classList.add("adornment-container", e), a.style.cssText =
|
|
38400
|
+
a.classList.add("adornment-container", e), a.style.cssText = ll(e, t[e], n, r);
|
|
38413
38401
|
let o = document.createElement("div"), s = document.createElement("div");
|
|
38414
|
-
o.classList.add("inner"), s.classList.add("inner", "vertical"), a.append(o, s), i.appendChild(a),
|
|
38402
|
+
o.classList.add("inner"), s.classList.add("inner", "vertical"), a.append(o, s), i.appendChild(a), ol.set(e, {
|
|
38415
38403
|
horizontal: o,
|
|
38416
38404
|
vertical: s
|
|
38417
38405
|
});
|
|
38418
38406
|
}
|
|
38419
38407
|
}
|
|
38420
|
-
function
|
|
38408
|
+
function ll(e, t, n, r) {
|
|
38421
38409
|
let i = _[e], a = "", o = [], s = t.x * n, c = t.y * n, { unit: l } = t;
|
|
38422
38410
|
return i.x === "center" ? o.push(`translateX(${s}${l})`) : a += `${i.x}: ${s}${l};`, i.y === "center" ? o.push(`translateY(${c}${l})`) : e === "bottom_right" && r !== "video" ? a += `${i.y}: max(${c}${l}, 25px);` : a += `${i.y}: ${c}${l};`, o.length && (a += `transform: ${o.join(" ")};`), a;
|
|
38423
38411
|
}
|
|
38424
|
-
function
|
|
38412
|
+
function ul(e, t, n) {
|
|
38425
38413
|
n ||= ["left_center", "right_center"].includes(t) ? "vertical" : "horizontal";
|
|
38426
|
-
let r =
|
|
38414
|
+
let r = ol.get(t), i = t === "left_center" || t === "right_center" ? "vertical" : "horizontal";
|
|
38427
38415
|
r?.[i].hasChildNodes() || (n = i), (r?.[n])?.appendChild(e);
|
|
38428
38416
|
}
|
|
38429
|
-
function
|
|
38417
|
+
function dl(e) {
|
|
38430
38418
|
let t = Array.from(document.querySelectorAll(".adornment, .maplibregl-ctrl-attrib")), n = [];
|
|
38431
38419
|
t.forEach((e) => {
|
|
38432
38420
|
let t = e.getBoundingClientRect();
|
|
@@ -38440,12 +38428,12 @@ function pl(e) {
|
|
|
38440
38428
|
}
|
|
38441
38429
|
//#endregion
|
|
38442
38430
|
//#region src/models/polygon.ts
|
|
38443
|
-
function
|
|
38431
|
+
function fl(e, t, n, r, i) {
|
|
38444
38432
|
e.addSource(t.id, {
|
|
38445
38433
|
type: "geojson",
|
|
38446
38434
|
data: {
|
|
38447
38435
|
type: "FeatureCollection",
|
|
38448
|
-
features: t.models.filter((e) => e.visible ?? !0).map((e) =>
|
|
38436
|
+
features: t.models.filter((e) => e.visible ?? !0).map((e) => pl(t, e, r, i))
|
|
38449
38437
|
}
|
|
38450
38438
|
}), e.addLayer({
|
|
38451
38439
|
id: t.id,
|
|
@@ -38506,15 +38494,15 @@ function ml(e, t, n, r, i) {
|
|
|
38506
38494
|
}
|
|
38507
38495
|
}, n);
|
|
38508
38496
|
}
|
|
38509
|
-
function
|
|
38497
|
+
function pl(e, t, n, r) {
|
|
38510
38498
|
let i = t.fillPattern === void 0 ? void 0 : r.getMapLibreImageKey(n[t.fillPattern], 2 * window.devicePixelRatio);
|
|
38511
38499
|
return {
|
|
38512
38500
|
type: "Feature",
|
|
38513
38501
|
id: S(t.id),
|
|
38514
38502
|
properties: {
|
|
38515
38503
|
id: t.id,
|
|
38516
|
-
"fill-color": e.fillColor || t.fillColor ?
|
|
38517
|
-
"outline-color": e.outlineColor || t.outlineColor ?
|
|
38504
|
+
"fill-color": e.fillColor || t.fillColor ? Br(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
|
|
38505
|
+
"outline-color": e.outlineColor || t.outlineColor ? Br(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
|
|
38518
38506
|
"outline-width": t.outlineWidth ?? 0,
|
|
38519
38507
|
"fill-pattern": i
|
|
38520
38508
|
},
|
|
@@ -38526,12 +38514,12 @@ function hl(e, t, n, r) {
|
|
|
38526
38514
|
}
|
|
38527
38515
|
//#endregion
|
|
38528
38516
|
//#region src/models/circle.ts
|
|
38529
|
-
function
|
|
38517
|
+
function ml(e, t, n, r, i) {
|
|
38530
38518
|
e.addSource(t.id, {
|
|
38531
38519
|
type: "geojson",
|
|
38532
38520
|
data: {
|
|
38533
38521
|
type: "FeatureCollection",
|
|
38534
|
-
features: t.models.filter((e) => e.visible ?? !0).map((e) =>
|
|
38522
|
+
features: t.models.filter((e) => e.visible ?? !0).map((e) => hl(t, e, 1, r, i))
|
|
38535
38523
|
}
|
|
38536
38524
|
}), e.addLayer({
|
|
38537
38525
|
id: t.id,
|
|
@@ -38629,19 +38617,19 @@ function gl(e, t, n, r, i) {
|
|
|
38629
38617
|
}
|
|
38630
38618
|
}, n);
|
|
38631
38619
|
}
|
|
38632
|
-
function
|
|
38620
|
+
function hl(e, t, n, r, i) {
|
|
38633
38621
|
let a = t.fillPattern === void 0 ? void 0 : i.getMapLibreImageKey(r[t.fillPattern], 2 * window.devicePixelRatio);
|
|
38634
38622
|
return {
|
|
38635
38623
|
type: "Feature",
|
|
38636
38624
|
id: S(t.id),
|
|
38637
38625
|
properties: {
|
|
38638
38626
|
id: t.id,
|
|
38639
|
-
"fill-color": e.fillColor || t.fillColor ?
|
|
38640
|
-
"outline-color": e.outlineColor || t.outlineColor ?
|
|
38627
|
+
"fill-color": e.fillColor || t.fillColor ? Br(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000",
|
|
38628
|
+
"outline-color": e.outlineColor || t.outlineColor ? Br(t.dataBindings ?? {}, t.outlineColor, e.outlineColor) : "#000000",
|
|
38641
38629
|
"outline-width": t.outlineWidth ?? 0,
|
|
38642
38630
|
"fill-pattern": a,
|
|
38643
38631
|
"radius-line-enabled": t.radiusLineEnabled ?? !1,
|
|
38644
|
-
"radius-line-color": e.radiusLineColor || t.radiusLineColor ?
|
|
38632
|
+
"radius-line-color": e.radiusLineColor || t.radiusLineColor ? Br(t.dataBindings ?? {}, t.radiusLineColor, e.radiusLineColor) : "#000000",
|
|
38645
38633
|
"radius-line-width": t.radiusLineWidth ?? 0
|
|
38646
38634
|
},
|
|
38647
38635
|
geometry: {
|
|
@@ -38658,13 +38646,13 @@ function _l(e, t, n, r, i) {
|
|
|
38658
38646
|
}
|
|
38659
38647
|
//#endregion
|
|
38660
38648
|
//#region src/models/marker.ts
|
|
38661
|
-
var
|
|
38662
|
-
function
|
|
38649
|
+
var gl = "Roboto-Regular";
|
|
38650
|
+
function _l(e, t, n, r, i) {
|
|
38663
38651
|
let a = [], o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = ["match", ["get", "text-font"]], l = !!t.clustering;
|
|
38664
|
-
for (let e of t.models) (e.visible ?? !0) && a.push(
|
|
38652
|
+
for (let e of t.models) (e.visible ?? !0) && a.push(yl(t, e, 1, r, i)), o.add(e.textFont), s.add(e.textLineHeight ?? 1.2);
|
|
38665
38653
|
if (Array.from(o).length > 0) {
|
|
38666
|
-
for (let e of Array.from(o)) c.push(e, ["literal", [e,
|
|
38667
|
-
c.push(["literal", [
|
|
38654
|
+
for (let e of Array.from(o)) c.push(e, ["literal", [e, gl]]);
|
|
38655
|
+
c.push(["literal", [gl]]);
|
|
38668
38656
|
}
|
|
38669
38657
|
e.addSource(t.id, {
|
|
38670
38658
|
type: "geojson",
|
|
@@ -38760,7 +38748,7 @@ function yl(e, t, n, r, i) {
|
|
|
38760
38748
|
stops: t.clusterTextColor ?? []
|
|
38761
38749
|
} },
|
|
38762
38750
|
layout: {
|
|
38763
|
-
"text-font": ["literal", [
|
|
38751
|
+
"text-font": ["literal", [gl]],
|
|
38764
38752
|
"text-field": "{point_count_abbreviated}",
|
|
38765
38753
|
"text-size": {
|
|
38766
38754
|
property: "point_count",
|
|
@@ -38768,9 +38756,9 @@ function yl(e, t, n, r, i) {
|
|
|
38768
38756
|
stops: t.clusterTextSize ?? []
|
|
38769
38757
|
}
|
|
38770
38758
|
}
|
|
38771
|
-
}),
|
|
38759
|
+
}), vl(e, t));
|
|
38772
38760
|
}
|
|
38773
|
-
function
|
|
38761
|
+
function vl(e, t) {
|
|
38774
38762
|
e.on("click", `${t.id}-circle-cluster`, async (t) => {
|
|
38775
38763
|
let n = e.queryRenderedFeatures(t.point).find((e) => e.properties.cluster);
|
|
38776
38764
|
if (!n) return;
|
|
@@ -38783,8 +38771,8 @@ function bl(e, t) {
|
|
|
38783
38771
|
});
|
|
38784
38772
|
});
|
|
38785
38773
|
}
|
|
38786
|
-
function
|
|
38787
|
-
let a = t.svg === void 0 ? void 0 : i.getMapLibreImageKey(
|
|
38774
|
+
function yl(e, t, n, r, i) {
|
|
38775
|
+
let a = t.svg === void 0 ? void 0 : i.getMapLibreImageKey(Hr(t.dataBindings ?? {}, r[t.svg], e.svg ? r[e.svg] : void 0), window.devicePixelRatio * (t.iconScale ?? 1));
|
|
38788
38776
|
return {
|
|
38789
38777
|
type: "Feature",
|
|
38790
38778
|
id: S(t.id),
|
|
@@ -38795,15 +38783,15 @@ function xl(e, t, n, r, i) {
|
|
|
38795
38783
|
"icon-rotate": t.iconRotation ?? 0,
|
|
38796
38784
|
"icon-offset": t.iconOffset ?? [0, 0],
|
|
38797
38785
|
"icon-size": (t.iconScale ?? 1) * n,
|
|
38798
|
-
text: e.text || t.text ?
|
|
38786
|
+
text: e.text || t.text ? Vr(t.dataBindings ?? {}, t.text, e.text) : void 0,
|
|
38799
38787
|
"text-anchor": t.textAnchor ?? "center",
|
|
38800
38788
|
"text-font": t.textFont,
|
|
38801
38789
|
"text-offset": [(t.textOffset?.[0] ?? 0) / (t.textSize ?? 16), (t.textOffset?.[1] ?? 0) / (t.textSize ?? 16)],
|
|
38802
38790
|
"text-rotate": t.textRotation ?? 0,
|
|
38803
38791
|
"text-max-width": t.textMaxWidth ?? 10,
|
|
38804
38792
|
"text-size": (t.textSize ?? 16) * n,
|
|
38805
|
-
"text-color": e.textColor || t.textColor ?
|
|
38806
|
-
"text-halo-color": e.textHaloColor || t.textHaloColor ?
|
|
38793
|
+
"text-color": e.textColor || t.textColor ? Br(t.dataBindings ?? {}, t.textColor, e.textColor) : "#000000",
|
|
38794
|
+
"text-halo-color": e.textHaloColor || t.textHaloColor ? Br(t.dataBindings ?? {}, t.textHaloColor, e.textHaloColor) : "#000000",
|
|
38807
38795
|
"text-halo-width": t.textHaloWidth ?? 0,
|
|
38808
38796
|
"text-line-height": t.textLineHeight ?? 1.2,
|
|
38809
38797
|
"text-letter-spacing": t.textLetterSpacing ?? 0,
|
|
@@ -38817,24 +38805,24 @@ function xl(e, t, n, r, i) {
|
|
|
38817
38805
|
}
|
|
38818
38806
|
//#endregion
|
|
38819
38807
|
//#region src/utils/overlays.ts
|
|
38820
|
-
async function
|
|
38808
|
+
async function bl(e, t, n, r, i, a) {
|
|
38821
38809
|
let o = await Promise.all(t.map((e) => `${r}/styles/${e}.json?access_token=${i}`).map((e) => fetch(e).then((e) => e.json())));
|
|
38822
38810
|
for (let t = 0; t < e.length; t++) {
|
|
38823
38811
|
let n = e[t], r = o[t];
|
|
38824
38812
|
for (let e of r.layers) e.metadata === void 0 && (e.metadata = {}), e.metadata["mc-original-layer-id"] = e.id, e.id = `${n} | ${e.id}`;
|
|
38825
38813
|
}
|
|
38826
|
-
return await Promise.all(o.map((e) =>
|
|
38814
|
+
return await Promise.all(o.map((e) => xl(e, n, i, a))), o;
|
|
38827
38815
|
}
|
|
38828
|
-
async function
|
|
38816
|
+
async function xl(e, t, n, r) {
|
|
38829
38817
|
for (let n in e.sources) t.getSource(n) === void 0 && t.addSource(n, e.sources[n]);
|
|
38830
|
-
e.sprite !== void 0 && await
|
|
38818
|
+
e.sprite !== void 0 && await Cl(t, e.sprite, n);
|
|
38831
38819
|
for (let n of e.layers) {
|
|
38832
38820
|
t.getLayer(n.id) !== void 0 && t.removeLayer(n.id);
|
|
38833
38821
|
let e = n.metadata?.["mc-add-before"] ?? "mc-before-none";
|
|
38834
|
-
t.addLayer(
|
|
38822
|
+
t.addLayer(Sl(n, r), e);
|
|
38835
38823
|
}
|
|
38836
38824
|
}
|
|
38837
|
-
function
|
|
38825
|
+
function Sl(e, t) {
|
|
38838
38826
|
let n = t ?? {}, r = e.metadata?.["mc-original-layer-id"], i = r === void 0 ? {} : n[r] ?? {}, a = {
|
|
38839
38827
|
...e,
|
|
38840
38828
|
layout: {
|
|
@@ -38852,7 +38840,7 @@ function wl(e, t) {
|
|
|
38852
38840
|
};
|
|
38853
38841
|
return i.minzoom !== void 0 && (a.minzoom = i.minzoom), i.maxzoom !== void 0 && (a.maxzoom = i.maxzoom), "filter" in i && a.type !== "background" && (a.filter = i.filter), a;
|
|
38854
38842
|
}
|
|
38855
|
-
async function
|
|
38843
|
+
async function Cl(e, t, n) {
|
|
38856
38844
|
try {
|
|
38857
38845
|
let r = `${t}.json?access_token=${n}`, i = `${t}.png?access_token=${n}`, [a, o] = await Promise.all([fetch(r), fetch(i)]);
|
|
38858
38846
|
if (!a.ok || !o.ok) throw Error(`Failed to load sprite from ${t}`);
|
|
@@ -38874,23 +38862,23 @@ async function Tl(e, t, n) {
|
|
|
38874
38862
|
}
|
|
38875
38863
|
//#endregion
|
|
38876
38864
|
//#region src/images/popup-previous.svg?raw
|
|
38877
|
-
var
|
|
38865
|
+
var wl = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m0 4.647 4.282 4.4a.814.814 0 0 0 1.166-1.134L2.27 4.647l3.178-3.266A.814.814 0 1 0 4.282.246z\"/></svg>\n", Tl = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"11\" viewBox=\"0 0 10 11\" fill=\"currentColor\"><path d=\"M.21.71a.714.714 0 0 1 1.011 0l3.78 3.78L8.778.71a.715.715 0 0 1 1.013 1.01L6.01 5.501l3.78 3.778a.715.715 0 0 1-1.01 1.012L5 6.51l-3.779 3.78A.716.716 0 0 1 .21 9.28L3.99 5.5.21 1.721A.714.714 0 0 1 .21.71\"/></svg>\n", El = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"6\" height=\"10\" viewBox=\"0 0 6 10\" fill=\"currentColor\"><path d=\"m5.678 4.647-4.282 4.4A.814.814 0 1 1 .23 7.914l3.177-3.266L.23 1.381A.814.814 0 1 1 1.396.246z\"/></svg>\n", Dl = "<svg width=\"20\" height=\"20\" viewBox=\"0 0 40 40\" stroke=\"currentColor\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M20 4.167 1.667 35.834h36.667z\" stroke-width=\"2\" stroke-linejoin=\"round\"/><path d=\"M20 29.167v.834m0-14.167.007 8.333\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n";
|
|
38878
38866
|
//#endregion
|
|
38879
38867
|
//#region src/utils/youtube.ts
|
|
38880
|
-
function
|
|
38868
|
+
function Ol(e, t) {
|
|
38881
38869
|
let { allowFullscreen: n, loop: r } = e, i = C(e.src, t), a, o = i.match(/(?:youtube\.com\/(?:watch\?.*v=|embed\/|v\/)|youtu\.be\/)([-\w]{11})/)?.[1];
|
|
38882
38870
|
a = o ? `https://www.youtube.com/embed/${o}` : i;
|
|
38883
38871
|
let s = [];
|
|
38884
|
-
if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a =
|
|
38872
|
+
if (n || s.push("fs=0"), r && o && s.push(`loop=1&playlist=${o}`), a = Al(a), a = kl(a), s.length) {
|
|
38885
38873
|
let e = a.includes("?") ? "&" : "?";
|
|
38886
38874
|
a += `${e}${s.join("&")}`;
|
|
38887
38875
|
}
|
|
38888
38876
|
return a;
|
|
38889
38877
|
}
|
|
38890
|
-
function
|
|
38878
|
+
function kl(e) {
|
|
38891
38879
|
return e.replace(/([?&])si=[^&]+(&)?/, (e, t, n) => t === "?" && !n ? "" : t === "?" && n ? "?" : n ? "&" : "");
|
|
38892
38880
|
}
|
|
38893
|
-
function
|
|
38881
|
+
function Al(e) {
|
|
38894
38882
|
let t = new URL(e), n = t.searchParams.get("t");
|
|
38895
38883
|
if (!n) return e;
|
|
38896
38884
|
let r = 0, i = /^((\d+)m)?((\d+)s)?$/;
|
|
@@ -38906,12 +38894,12 @@ function Ml(e) {
|
|
|
38906
38894
|
}
|
|
38907
38895
|
//#endregion
|
|
38908
38896
|
//#region src/utils/template.ts
|
|
38909
|
-
function
|
|
38897
|
+
function jl(e, t, n, r) {
|
|
38910
38898
|
let i;
|
|
38911
|
-
if (t?.type === "video") i = r === "preview" ?
|
|
38899
|
+
if (t?.type === "video") i = r === "preview" ? Il(t.src, n) : `
|
|
38912
38900
|
<div class="youtube-container">
|
|
38913
38901
|
<iframe
|
|
38914
|
-
src="${
|
|
38902
|
+
src="${Ol(t, n)}"
|
|
38915
38903
|
width="100%" height="300" style="border: none" allowfullscreen>
|
|
38916
38904
|
</iframe>
|
|
38917
38905
|
</div>
|
|
@@ -38925,7 +38913,7 @@ function Nl(e, t, n, r) {
|
|
|
38925
38913
|
`;
|
|
38926
38914
|
}
|
|
38927
38915
|
i = i ? `<div class="media-content">${i}</div>` : "";
|
|
38928
|
-
let a = e ? `<div class="text-content">${
|
|
38916
|
+
let a = e ? `<div class="text-content">${Pl(e, n)}</div>` : "";
|
|
38929
38917
|
return `
|
|
38930
38918
|
<div class="popup-scroll-wrapper">
|
|
38931
38919
|
<div class="mc-popup">
|
|
@@ -38935,53 +38923,53 @@ function Nl(e, t, n, r) {
|
|
|
38935
38923
|
</div>
|
|
38936
38924
|
`;
|
|
38937
38925
|
}
|
|
38938
|
-
var
|
|
38926
|
+
var Ml = `
|
|
38939
38927
|
<button class="mc-popup-button close">
|
|
38940
|
-
${
|
|
38928
|
+
${Tl}
|
|
38941
38929
|
</button>
|
|
38942
|
-
`,
|
|
38930
|
+
`, Nl = `
|
|
38943
38931
|
<div class="cycle-buttons">
|
|
38944
38932
|
<button class="mc-popup-button prev">
|
|
38945
|
-
${
|
|
38933
|
+
${wl}
|
|
38946
38934
|
</button>
|
|
38947
38935
|
<button class="mc-popup-button next">
|
|
38948
|
-
${
|
|
38936
|
+
${El}
|
|
38949
38937
|
</button>
|
|
38950
38938
|
</div>
|
|
38951
38939
|
`;
|
|
38952
|
-
function
|
|
38940
|
+
function Pl(e, t) {
|
|
38953
38941
|
return e ? (e = e.replace(/placeholder="[^"]+"/, ""), e = e.replace(/onerror="[^"]+"/, ""), e = e.replace(/youtube\.com\/embed\/\$([^"'<>\\]+)/gi, (e, n) => {
|
|
38954
38942
|
let r = w(t[n]);
|
|
38955
38943
|
return r ? `youtube.com/embed/${E(r)}?` : "";
|
|
38956
38944
|
}), e = e.replace(/(\S+?)\s*=\s*"\$([^"]+?)"/g, (e, n, r) => {
|
|
38957
38945
|
let i = w(t[r]);
|
|
38958
|
-
return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${
|
|
38946
|
+
return ["src", "href"].includes(n) && !i ? "" : ["src", "href"].includes(n) ? /^(mailto:|tel:|ftp:|data:|http:\/\/|https:\/\/)/i.test(i) ? ` ${n}="${i}"` : ` ${n}="${Fl(i)}"` : ` ${n}="${i}"`;
|
|
38959
38947
|
}), e = e.replace(/>\$(.+?)</gi, (e, n) => `>${w(t[n])}<`), e = e.replace(/<span\s+class="mention"\s+data-mention-id="[^"]*">(.*?)<\/span>/gim, (e, t) => t), e) : "";
|
|
38960
38948
|
}
|
|
38961
|
-
function
|
|
38949
|
+
function Fl(e) {
|
|
38962
38950
|
return /^https?:\/\//i.test(e) ? e : `https://${e}`;
|
|
38963
38951
|
}
|
|
38964
|
-
function
|
|
38952
|
+
function Il(e, t) {
|
|
38965
38953
|
return `
|
|
38966
38954
|
<div class="youtube-placeholder">
|
|
38967
38955
|
<img src="${`https://img.youtube.com/vi/${E(C(e, t))}/hqdefault.jpg`}" />
|
|
38968
38956
|
<div class="popup-alert">
|
|
38969
|
-
<div class="alert-icon">${
|
|
38970
|
-
<div>${
|
|
38957
|
+
<div class="alert-icon">${Dl}</div>
|
|
38958
|
+
<div>${Li("videoAlert")}</div>
|
|
38971
38959
|
</div>
|
|
38972
38960
|
</div>
|
|
38973
38961
|
`;
|
|
38974
38962
|
}
|
|
38975
38963
|
//#endregion
|
|
38976
38964
|
//#region src/Registry.ts
|
|
38977
|
-
var
|
|
38965
|
+
var Ll = [
|
|
38978
38966
|
"area",
|
|
38979
38967
|
"circle",
|
|
38980
38968
|
"dot",
|
|
38981
38969
|
"line",
|
|
38982
38970
|
"marker",
|
|
38983
38971
|
"polygon"
|
|
38984
|
-
],
|
|
38972
|
+
], Rl = class {
|
|
38985
38973
|
data;
|
|
38986
38974
|
customGroupIds;
|
|
38987
38975
|
constructor(e) {
|
|
@@ -38993,7 +38981,7 @@ var zl = [
|
|
|
38993
38981
|
marker: {},
|
|
38994
38982
|
polygon: {}
|
|
38995
38983
|
};
|
|
38996
|
-
for (let t of
|
|
38984
|
+
for (let t of Ll) for (let n of e.registry?.models?.[t] ?? []) {
|
|
38997
38985
|
this.data[t][n.id] = {};
|
|
38998
38986
|
for (let e of n.models) {
|
|
38999
38987
|
if (t === "area") {
|
|
@@ -39039,7 +39027,7 @@ var zl = [
|
|
|
39039
39027
|
}
|
|
39040
39028
|
return e.reverse();
|
|
39041
39029
|
}
|
|
39042
|
-
},
|
|
39030
|
+
}, zl = class {
|
|
39043
39031
|
map;
|
|
39044
39032
|
popupElements;
|
|
39045
39033
|
markerLayerIds;
|
|
@@ -39188,7 +39176,7 @@ var zl = [
|
|
|
39188
39176
|
r / i
|
|
39189
39177
|
];
|
|
39190
39178
|
}
|
|
39191
|
-
},
|
|
39179
|
+
}, Bl = class {
|
|
39192
39180
|
map;
|
|
39193
39181
|
popupPosition = "bottomLeft";
|
|
39194
39182
|
mapContainer;
|
|
@@ -39210,7 +39198,7 @@ var zl = [
|
|
|
39210
39198
|
this.map = e, this.mode = t, this.mapContainer = this.map.getContainer(), this.popupContainer = document.createElement("div"), this.popupContainer.classList.add("popup-container"), this.map.on("mousemove", (e) => this.onMouseMove(e)), this.map.on("click", (e) => this.onClick(e));
|
|
39211
39199
|
}
|
|
39212
39200
|
setJobObject(e) {
|
|
39213
|
-
this.registry = new
|
|
39201
|
+
this.registry = new Rl(e);
|
|
39214
39202
|
}
|
|
39215
39203
|
setParams(e, t, n, r) {
|
|
39216
39204
|
this.popupPosition = e, this.language = t, this.restrictMapMovement = n, this.center = r;
|
|
@@ -39222,7 +39210,7 @@ var zl = [
|
|
|
39222
39210
|
this.popupElements = this.registry.getPopupElements();
|
|
39223
39211
|
}
|
|
39224
39212
|
setHighlightManager() {
|
|
39225
|
-
this.highlightManager = new
|
|
39213
|
+
this.highlightManager = new zl(this.map, this.registry.getPopupElements());
|
|
39226
39214
|
}
|
|
39227
39215
|
onMouseMove(e) {
|
|
39228
39216
|
this.feature = this.getInteractiveFeature(e), this.feature ? this.map.getCanvas().style.cursor = "pointer" : this.map.getCanvas().style.cursor = "";
|
|
@@ -39250,7 +39238,7 @@ var zl = [
|
|
|
39250
39238
|
if (this.popupPosition === "mapElement") {
|
|
39251
39239
|
if (this.feature.geometry.type === "Point") this.addFloatingPopup(n, this.feature.geometry.coordinates);
|
|
39252
39240
|
else {
|
|
39253
|
-
let { lng: t, lat: r } = this.map.
|
|
39241
|
+
let { lng: t, lat: r } = this.map.unprojectWithScaleCorrection(e.point);
|
|
39254
39242
|
this.addFloatingPopup(n, [t, r]);
|
|
39255
39243
|
}
|
|
39256
39244
|
return;
|
|
@@ -39276,7 +39264,7 @@ var zl = [
|
|
|
39276
39264
|
}
|
|
39277
39265
|
getTemplate(e) {
|
|
39278
39266
|
let { layer: t } = e, n, r = this.registry.getModel(e);
|
|
39279
|
-
if (r?.popup || r?.popupMedia) n =
|
|
39267
|
+
if (r?.popup || r?.popupMedia) n = jl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode);
|
|
39280
39268
|
else {
|
|
39281
39269
|
let r = [];
|
|
39282
39270
|
this.publication && (r.push(`:${this.publication}-${this.language}`), r.push(`:${this.publication}-:en`)), r.push(`:${this.language}`), r.push(":en"), r.push("");
|
|
@@ -39300,11 +39288,11 @@ var zl = [
|
|
|
39300
39288
|
return t.innerHTML = e.trim(), t.content.firstElementChild;
|
|
39301
39289
|
}
|
|
39302
39290
|
addPopupControls() {
|
|
39303
|
-
let e = this.htmlToElement(
|
|
39291
|
+
let e = this.htmlToElement(Ml);
|
|
39304
39292
|
if (e && (e.addEventListener("click", () => {
|
|
39305
39293
|
this.hidePopup(), this.highlightManager.highlight(void 0);
|
|
39306
39294
|
}), this.popupContainer.appendChild(e)), this.popupElements.length < 2) return;
|
|
39307
|
-
let t = this.htmlToElement(
|
|
39295
|
+
let t = this.htmlToElement(Nl);
|
|
39308
39296
|
t && (t.querySelector(".prev")?.addEventListener("click", () => this.cyclePopups(!1)), t.querySelector(".next")?.addEventListener("click", () => this.cyclePopups()), this.popupContainer.appendChild(t));
|
|
39309
39297
|
}
|
|
39310
39298
|
fillDatalayerTemplate(e, t, n) {
|
|
@@ -39340,11 +39328,11 @@ var zl = [
|
|
|
39340
39328
|
n = e ? t === this.popupElements.length - 1 ? 0 : t + 1 : t === 0 ? this.popupElements.length - 1 : t - 1;
|
|
39341
39329
|
let r = this.popupElements?.[n];
|
|
39342
39330
|
this.highlightManager.highlight(r);
|
|
39343
|
-
let i =
|
|
39331
|
+
let i = jl(r.popup, r.popupMedia, r.dataBindings ?? {}, this.mode), a = this.popupContainer;
|
|
39344
39332
|
this.popupContainer.remove(), a.innerHTML = i, this.mapContainer.appendChild(a), this.currentModelId = r.modelId, this.addPopupControls(), e ? this.popupContainer.querySelector(".mc-popup-button.next")?.focus() : this.popupContainer.querySelector(".mc-popup-button.prev")?.focus(), this.currentFeatureId = void 0;
|
|
39345
39333
|
}
|
|
39346
39334
|
}
|
|
39347
|
-
},
|
|
39335
|
+
}, Vl = class e {
|
|
39348
39336
|
static #e(e) {
|
|
39349
39337
|
let t = 0, n = [t];
|
|
39350
39338
|
for (let r = 1; r < e.length; ++r) {
|
|
@@ -39395,19 +39383,19 @@ var zl = [
|
|
|
39395
39383
|
get length() {
|
|
39396
39384
|
return this.#a;
|
|
39397
39385
|
}
|
|
39398
|
-
},
|
|
39386
|
+
}, Hl = {
|
|
39399
39387
|
solid: [1, 0],
|
|
39400
39388
|
dotted: [.7, .3],
|
|
39401
39389
|
dashed: [3.5, 1.5]
|
|
39402
39390
|
};
|
|
39403
|
-
function
|
|
39391
|
+
function Ul(e, t, n, r) {
|
|
39404
39392
|
e.addSource(t.id, {
|
|
39405
39393
|
type: "geojson",
|
|
39406
39394
|
data: {
|
|
39407
39395
|
type: "FeatureCollection",
|
|
39408
|
-
features: t.models.filter((e) => e.visible ?? !0).map((n) =>
|
|
39396
|
+
features: t.models.filter((e) => e.visible ?? !0).map((n) => Wl(e, t, n, 1, r))
|
|
39409
39397
|
}
|
|
39410
|
-
}), Object.entries(
|
|
39398
|
+
}), Object.entries(Hl).forEach(([r, i]) => {
|
|
39411
39399
|
t.models.some((e) => (e.lineStyle ?? "solid") === r) && e.addLayer({
|
|
39412
39400
|
id: `${t.id}-${r}`,
|
|
39413
39401
|
type: "line",
|
|
@@ -39492,18 +39480,18 @@ function Gl(e, t, n, r) {
|
|
|
39492
39480
|
]
|
|
39493
39481
|
}, n);
|
|
39494
39482
|
}
|
|
39495
|
-
function
|
|
39496
|
-
let a = new
|
|
39483
|
+
function Wl(e, t, n, r, i) {
|
|
39484
|
+
let a = new Vl(n.geometry).slice(0, r), o = n.svg === void 0 ? void 0 : i.getMapLibreImageKey(Hr(n.dataBindings ?? {}, n.svg, void 0), window.devicePixelRatio * (n.iconScale ?? 1));
|
|
39497
39485
|
return {
|
|
39498
39486
|
type: "Feature",
|
|
39499
39487
|
id: S(n.id),
|
|
39500
39488
|
properties: {
|
|
39501
39489
|
id: n.id,
|
|
39502
39490
|
"line-width": n.lineWidth ?? 3,
|
|
39503
|
-
"line-color": t.lineColor || n.lineColor ?
|
|
39491
|
+
"line-color": t.lineColor || n.lineColor ? Br(n.dataBindings ?? {}, n.lineColor, t.lineColor) : "#000000",
|
|
39504
39492
|
"line-style": n.lineStyle ?? "solid",
|
|
39505
39493
|
"mc-image-key": o,
|
|
39506
|
-
"icon-rotate":
|
|
39494
|
+
"icon-rotate": Gl(n, a, e),
|
|
39507
39495
|
"icon-offset": n.iconOffset,
|
|
39508
39496
|
"icon-size": n.iconScale
|
|
39509
39497
|
},
|
|
@@ -39519,12 +39507,12 @@ function Kl(e, t, n, r, i) {
|
|
|
39519
39507
|
}
|
|
39520
39508
|
};
|
|
39521
39509
|
}
|
|
39522
|
-
function
|
|
39510
|
+
function Gl(e, t, n) {
|
|
39523
39511
|
return e.iconRotation ? e.iconAlign ? lr(t, n) + e.iconRotation : e.iconRotation : 0;
|
|
39524
39512
|
}
|
|
39525
39513
|
//#endregion
|
|
39526
39514
|
//#region src/models/area.ts
|
|
39527
|
-
function
|
|
39515
|
+
function Kl(e, t, n, r, i, a, o) {
|
|
39528
39516
|
let s = gr(t), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
|
|
39529
39517
|
for (let e of t.models) {
|
|
39530
39518
|
let n = e.featureId, a = t.id, o = [], u = sr(e), d = or(a, e), f = l.get(d) ?? {
|
|
@@ -39538,7 +39526,7 @@ function Jl(e, t, n, r, i, a, o) {
|
|
|
39538
39526
|
if (e.visible ?? !0) {
|
|
39539
39527
|
f.featureIds.push(n);
|
|
39540
39528
|
let a = e.fillPattern === void 0 ? null : i.getMapLibreImageKey(r[e.fillPattern], 2 * window.devicePixelRatio);
|
|
39541
|
-
f.modelIdToFillColor[n] = t.fillColor || e.fillColor ?
|
|
39529
|
+
f.modelIdToFillColor[n] = t.fillColor || e.fillColor ? Br(e.dataBindings ?? {}, e.fillColor, t.fillColor, s, t.choropleth?.unmatchedColor) : "#000000", f.modelIdToFillPattern[n] = a, f.modelIdToOutlineColor[n] = t.outlineColor || e.outlineColor ? Br(e.dataBindings ?? {}, e.outlineColor, t.outlineColor) : "#000000", f.modelIdToOutlineWidth[n] = e.outlineWidth ?? .5;
|
|
39542
39530
|
}
|
|
39543
39531
|
c.set(u, e), l.set(d, f);
|
|
39544
39532
|
}
|
|
@@ -39674,12 +39662,12 @@ function Jl(e, t, n, r, i, a, o) {
|
|
|
39674
39662
|
}
|
|
39675
39663
|
//#endregion
|
|
39676
39664
|
//#region src/models/dot.ts
|
|
39677
|
-
function
|
|
39665
|
+
function ql(e, t, n) {
|
|
39678
39666
|
e.addSource(t.id, {
|
|
39679
39667
|
type: "geojson",
|
|
39680
39668
|
data: {
|
|
39681
39669
|
type: "FeatureCollection",
|
|
39682
|
-
features: t.models.filter((e) => e.visible ?? !0).map((e) =>
|
|
39670
|
+
features: t.models.filter((e) => e.visible ?? !0).map((e) => Jl(t, e))
|
|
39683
39671
|
}
|
|
39684
39672
|
}), e.addLayer({
|
|
39685
39673
|
id: t.id,
|
|
@@ -39701,14 +39689,14 @@ function Yl(e, t, n) {
|
|
|
39701
39689
|
}
|
|
39702
39690
|
}, n);
|
|
39703
39691
|
}
|
|
39704
|
-
function
|
|
39692
|
+
function Jl(e, t) {
|
|
39705
39693
|
return {
|
|
39706
39694
|
type: "Feature",
|
|
39707
39695
|
id: t.id,
|
|
39708
39696
|
properties: {
|
|
39709
39697
|
id: t.id,
|
|
39710
39698
|
"circle-radius": t.radius,
|
|
39711
|
-
"circle-color": e.fillColor || t.fillColor ?
|
|
39699
|
+
"circle-color": e.fillColor || t.fillColor ? Br(t.dataBindings ?? {}, t.fillColor, e.fillColor) : "#000000"
|
|
39712
39700
|
},
|
|
39713
39701
|
geometry: {
|
|
39714
39702
|
type: "Point",
|
|
@@ -39718,94 +39706,94 @@ function Xl(e, t) {
|
|
|
39718
39706
|
}
|
|
39719
39707
|
//#endregion
|
|
39720
39708
|
//#region src/utils/video/easings.ts
|
|
39721
|
-
function
|
|
39709
|
+
function Yl(e, t, n, r) {
|
|
39722
39710
|
return t + n / r * e;
|
|
39723
39711
|
}
|
|
39724
|
-
function
|
|
39712
|
+
function Xl(e, t, n, r) {
|
|
39725
39713
|
return n * ((e = e / r - 1) * e * e + 1) + t;
|
|
39726
39714
|
}
|
|
39727
|
-
function
|
|
39715
|
+
function Zl(e, t, n, r) {
|
|
39728
39716
|
let i = 1.70158, a = 0, o = n;
|
|
39729
39717
|
return e === 0 ? t : (e /= r) === 1 ? t + n : (a ||= r * .3, o < Math.abs(n) ? (o = n, i = a / 4) : i = a / (2 * Math.PI) * Math.asin(n / o), o * 2 ** (-10 * e) * Math.sin((e * r - i) * (2 * Math.PI) / a) + n + t);
|
|
39730
39718
|
}
|
|
39731
|
-
function
|
|
39719
|
+
function Ql(e, t, n, r, i) {
|
|
39732
39720
|
return i === void 0 && (i = 1.70158), n * ((e = e / r - 1) * e * ((i + 1) * e + i) + 1) + t;
|
|
39733
39721
|
}
|
|
39734
|
-
function
|
|
39722
|
+
function $l(e, t, n, r) {
|
|
39735
39723
|
return (e /= r) < 1 / 2.75 ? n * (7.5625 * e * e) + t : e < 2 / 2.75 ? n * (7.5625 * (e -= 1.5 / 2.75) * e + .75) + t : e < 2.5 / 2.75 ? n * (7.5625 * (e -= 2.25 / 2.75) * e + .9375) + t : n * (7.5625 * (e -= 2.625 / 2.75) * e + .984375) + t;
|
|
39736
39724
|
}
|
|
39737
39725
|
//#endregion
|
|
39738
39726
|
//#region src/utils/video/animations.ts
|
|
39739
|
-
var
|
|
39740
|
-
linear:
|
|
39741
|
-
easeOutCubic:
|
|
39742
|
-
easeOutBack:
|
|
39743
|
-
easeOutBounce:
|
|
39744
|
-
easeOutElastic:
|
|
39727
|
+
var eu = {
|
|
39728
|
+
linear: Yl,
|
|
39729
|
+
easeOutCubic: Xl,
|
|
39730
|
+
easeOutBack: Ql,
|
|
39731
|
+
easeOutBounce: $l,
|
|
39732
|
+
easeOutElastic: Zl
|
|
39745
39733
|
};
|
|
39746
|
-
function
|
|
39734
|
+
function tu(e) {
|
|
39747
39735
|
return e.entryType === "fade" || e.exitType === "fade" || e.entryType === "instant" || e.exitType === "instant";
|
|
39748
39736
|
}
|
|
39749
|
-
function
|
|
39737
|
+
function nu(e) {
|
|
39750
39738
|
return e.entryType === "grow" || e.exitType === "grow";
|
|
39751
39739
|
}
|
|
39752
|
-
function
|
|
39740
|
+
function ru(e, t, n) {
|
|
39753
39741
|
let { entry: r, entryDuration: i, exit: a, exitDuration: o } = e, { entryType: s, entryEasing: c, exitType: l, exitEasing: u } = e;
|
|
39754
|
-
return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ?
|
|
39742
|
+
return n < r && (s === t || s === "instant" && t === "fade") || n > a && (l === t || l === "instant" && t === "fade") ? 0 : i > 0 && n < r + i && s === t ? eu[c](n - r, 0, 1, i) : o > 0 && n > a - o && l === t ? eu[u](n - (a - o), 1, -1, o) : 1;
|
|
39755
39743
|
}
|
|
39756
39744
|
//#endregion
|
|
39757
39745
|
//#region src/utils/video/index.ts
|
|
39758
|
-
function
|
|
39759
|
-
let t = e.length > 0 ? [
|
|
39746
|
+
function iu(e) {
|
|
39747
|
+
let t = e.length > 0 ? [au(e[0])] : [], n = 0, r = 0;
|
|
39760
39748
|
for (let i = 1; i < e.length; ++i) {
|
|
39761
|
-
let a =
|
|
39762
|
-
n +=
|
|
39749
|
+
let a = au(e[i]);
|
|
39750
|
+
n += ou(e[i - 1].center[0], a.center[0]), r += ou(e[i - 1].bearing, a.bearing), a.center[0] += n * 360, a.x += n, a.bearing += r * 360, t.push(a);
|
|
39763
39751
|
}
|
|
39764
39752
|
return t;
|
|
39765
39753
|
}
|
|
39766
|
-
function
|
|
39754
|
+
function au(e) {
|
|
39767
39755
|
return {
|
|
39768
39756
|
...e,
|
|
39769
39757
|
center: [e.center[0], e.center[1]]
|
|
39770
39758
|
};
|
|
39771
39759
|
}
|
|
39772
|
-
function
|
|
39760
|
+
function ou(e, t) {
|
|
39773
39761
|
if (Math.abs(e) + Math.abs(t) > 180) {
|
|
39774
39762
|
if (e > 0 && t < 0) return 1;
|
|
39775
39763
|
if (e < 0 && t > 0) return -1;
|
|
39776
39764
|
}
|
|
39777
39765
|
return 0;
|
|
39778
39766
|
}
|
|
39779
|
-
function
|
|
39767
|
+
function su(e) {
|
|
39780
39768
|
return 2 ** -e;
|
|
39781
39769
|
}
|
|
39782
|
-
function
|
|
39770
|
+
function cu(e) {
|
|
39783
39771
|
return e.length > 0 ? e[e.length - 1].time : 0;
|
|
39784
39772
|
}
|
|
39785
|
-
function
|
|
39773
|
+
function lu(e) {
|
|
39786
39774
|
return P(e, 23.976) ? 24e3 / 1001 : P(e, 29.97) ? 3e4 / 1001 : P(e, 59.94) ? 6e4 / 1001 : e;
|
|
39787
39775
|
}
|
|
39788
39776
|
//#endregion
|
|
39789
39777
|
//#region node_modules/d3-shape/src/curve/monotone.js
|
|
39790
|
-
function
|
|
39778
|
+
function uu(e) {
|
|
39791
39779
|
return e < 0 ? -1 : 1;
|
|
39792
39780
|
}
|
|
39793
|
-
function
|
|
39781
|
+
function du(e, t, n) {
|
|
39794
39782
|
var r = e._x1 - e._x0, i = t - e._x1, a = (e._y1 - e._y0) / (r || i < 0 && -0), o = (n - e._y1) / (i || r < 0 && -0), s = (a * i + o * r) / (r + i);
|
|
39795
|
-
return (
|
|
39783
|
+
return (uu(a) + uu(o)) * Math.min(Math.abs(a), Math.abs(o), .5 * Math.abs(s)) || 0;
|
|
39796
39784
|
}
|
|
39797
|
-
function
|
|
39785
|
+
function fu(e, t) {
|
|
39798
39786
|
var n = e._x1 - e._x0;
|
|
39799
39787
|
return n ? (3 * (e._y1 - e._y0) / n - t) / 2 : t;
|
|
39800
39788
|
}
|
|
39801
|
-
function
|
|
39789
|
+
function pu(e, t, n) {
|
|
39802
39790
|
var r = e._x0, i = e._y0, a = e._x1, o = e._y1, s = (a - r) / 3;
|
|
39803
39791
|
e._context.bezierCurveTo(r + s, i + s * t, a - s, o - s * n, a, o);
|
|
39804
39792
|
}
|
|
39805
|
-
function
|
|
39793
|
+
function mu(e) {
|
|
39806
39794
|
this._context = e;
|
|
39807
39795
|
}
|
|
39808
|
-
|
|
39796
|
+
mu.prototype = {
|
|
39809
39797
|
areaStart: function() {
|
|
39810
39798
|
this._line = 0;
|
|
39811
39799
|
},
|
|
@@ -39821,7 +39809,7 @@ gu.prototype = {
|
|
|
39821
39809
|
this._context.lineTo(this._x1, this._y1);
|
|
39822
39810
|
break;
|
|
39823
39811
|
case 3:
|
|
39824
|
-
|
|
39812
|
+
pu(this, this._t0, fu(this, this._t0));
|
|
39825
39813
|
break;
|
|
39826
39814
|
}
|
|
39827
39815
|
(this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
|
|
@@ -39837,26 +39825,26 @@ gu.prototype = {
|
|
|
39837
39825
|
this._point = 2;
|
|
39838
39826
|
break;
|
|
39839
39827
|
case 2:
|
|
39840
|
-
this._point = 3,
|
|
39828
|
+
this._point = 3, pu(this, fu(this, n = du(this, e, t)), n);
|
|
39841
39829
|
break;
|
|
39842
39830
|
default:
|
|
39843
|
-
|
|
39831
|
+
pu(this, this._t0, n = du(this, e, t));
|
|
39844
39832
|
break;
|
|
39845
39833
|
}
|
|
39846
39834
|
this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = n;
|
|
39847
39835
|
}
|
|
39848
39836
|
}
|
|
39849
39837
|
};
|
|
39850
|
-
function
|
|
39851
|
-
this._context = new
|
|
39838
|
+
function hu(e) {
|
|
39839
|
+
this._context = new gu(e);
|
|
39852
39840
|
}
|
|
39853
|
-
(
|
|
39854
|
-
|
|
39841
|
+
(hu.prototype = Object.create(mu.prototype)).point = function(e, t) {
|
|
39842
|
+
mu.prototype.point.call(this, t, e);
|
|
39855
39843
|
};
|
|
39856
|
-
function
|
|
39844
|
+
function gu(e) {
|
|
39857
39845
|
this._context = e;
|
|
39858
39846
|
}
|
|
39859
|
-
|
|
39847
|
+
gu.prototype = {
|
|
39860
39848
|
moveTo: function(e, t) {
|
|
39861
39849
|
this._context.moveTo(t, e);
|
|
39862
39850
|
},
|
|
@@ -39870,34 +39858,34 @@ vu.prototype = {
|
|
|
39870
39858
|
this._context.bezierCurveTo(t, e, r, n, a, i);
|
|
39871
39859
|
}
|
|
39872
39860
|
};
|
|
39873
|
-
function
|
|
39874
|
-
return new
|
|
39861
|
+
function _u(e) {
|
|
39862
|
+
return new mu(e);
|
|
39875
39863
|
}
|
|
39876
39864
|
//#endregion
|
|
39877
39865
|
//#region node_modules/bezier-easing/src/index.js
|
|
39878
|
-
function
|
|
39866
|
+
function vu(e) {
|
|
39879
39867
|
return e;
|
|
39880
39868
|
}
|
|
39881
|
-
var { cbrt:
|
|
39869
|
+
var { cbrt: yu, sqrt: bu, PI: xu } = Math, Su = (e, t, n, r, i) => {
|
|
39882
39870
|
let a = t + n * e, o = a ** 2 + r;
|
|
39883
39871
|
if (o > 0) {
|
|
39884
|
-
let e =
|
|
39885
|
-
return
|
|
39872
|
+
let e = bu(o);
|
|
39873
|
+
return yu(a + e) + yu(a - e) - i;
|
|
39886
39874
|
}
|
|
39887
|
-
let s =
|
|
39888
|
-
return l = n < 0 ? (a > 0 ? 2 *
|
|
39889
|
-
},
|
|
39890
|
-
function
|
|
39875
|
+
let s = yu(bu(a * a - o)), c = a ? Math.atan(bu(-o) / a) : -xu / 2, l;
|
|
39876
|
+
return l = n < 0 ? (a > 0 ? 2 * xu : xu) - c : i < 0 ? (a > 0 ? 2 * xu : -3 * xu) + c : (a > 0 ? 0 : xu) + c, 2 * s * Math.cos(l / 3) - i;
|
|
39877
|
+
}, Cu = (e, t, n, r) => ((t * e + 3 * n) * e + r) * e;
|
|
39878
|
+
function wu(e, t, n, r) {
|
|
39891
39879
|
if (!(0 <= e && e <= 1 && 0 <= n && n <= 1)) throw Error("bezier x values must be in [0, 1] range");
|
|
39892
|
-
if (e === t && n === r) return
|
|
39893
|
-
let i = 6 * (3 * e - 3 * n + 1), a = 6 * (n - 2 * e), o = 3 * e, s = i * i, c = a * a, l = a / i, u = 3 * a * o / s - c * a / (s * i), d = 2 * o / i - c / s, f = d * d * d, p = 3 / i, m = 3 * t - 3 * r + 1, h = r - 2 * t, g = 3 * t, _ = i ?
|
|
39880
|
+
if (e === t && n === r) return vu;
|
|
39881
|
+
let i = 6 * (3 * e - 3 * n + 1), a = 6 * (n - 2 * e), o = 3 * e, s = i * i, c = a * a, l = a / i, u = 3 * a * o / s - c * a / (s * i), d = 2 * o / i - c / s, f = d * d * d, p = 3 / i, m = 3 * t - 3 * r + 1, h = r - 2 * t, g = 3 * t, _ = i ? Su : vu;
|
|
39894
39882
|
return function(e) {
|
|
39895
|
-
return e === 0 || e === 1 ? e :
|
|
39883
|
+
return e === 0 || e === 1 ? e : Cu(_(e, u, p, f, l), m, h, g);
|
|
39896
39884
|
};
|
|
39897
39885
|
}
|
|
39898
39886
|
//#endregion
|
|
39899
39887
|
//#region src/utils/video/monotonicCurve.ts
|
|
39900
|
-
var
|
|
39888
|
+
var Tu = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
39901
39889
|
t.exports = n;
|
|
39902
39890
|
function n(e, t, n, r) {
|
|
39903
39891
|
var i, a, o, s, c, l, u, d, f, p, m, h, g, _;
|
|
@@ -39908,11 +39896,11 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39908
39896
|
}
|
|
39909
39897
|
return g && console.log("Newton-Raphson: Maximum iterations reached (" + c + ")"), !1;
|
|
39910
39898
|
}
|
|
39911
|
-
})))(), 1),
|
|
39899
|
+
})))(), 1), Eu = class {
|
|
39912
39900
|
segments;
|
|
39913
39901
|
constructor(e) {
|
|
39914
39902
|
this.segments = [];
|
|
39915
|
-
let t = new
|
|
39903
|
+
let t = new Du(), n = _u(t);
|
|
39916
39904
|
n.lineStart();
|
|
39917
39905
|
for (let t of e) n.point(t.x, t.y);
|
|
39918
39906
|
n.lineEnd(), this.segments = t.segments;
|
|
@@ -39924,17 +39912,17 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39924
39912
|
return t.startY !== t.endY && t.easing !== void 0 ? k(t.startY, t.endY, t.easing(n)) : k(t.startY, t.endY, n);
|
|
39925
39913
|
}
|
|
39926
39914
|
solve(e, t) {
|
|
39927
|
-
let n = (0,
|
|
39915
|
+
let n = (0, Tu.default)((t) => this.sample(t) - e, t);
|
|
39928
39916
|
return n === !1 ? t : n;
|
|
39929
39917
|
}
|
|
39930
|
-
},
|
|
39918
|
+
}, Du = class {
|
|
39931
39919
|
previousPoint = {
|
|
39932
39920
|
x: 0,
|
|
39933
39921
|
y: 0
|
|
39934
39922
|
};
|
|
39935
39923
|
segments = [];
|
|
39936
39924
|
bezierCurveTo(e, t, n, r, i, a) {
|
|
39937
|
-
let o = this.previousPoint.x, s = this.previousPoint.y, c = i === o ? void 0 :
|
|
39925
|
+
let o = this.previousPoint.x, s = this.previousPoint.y, c = i === o ? void 0 : wu((e - o) / (i - o), (t - s) / (a - s), (n - o) / (i - o), (r - s) / (a - s));
|
|
39938
39926
|
this.segments.push({
|
|
39939
39927
|
startX: o,
|
|
39940
39928
|
endX: i,
|
|
@@ -39969,7 +39957,7 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39969
39957
|
rect() {}
|
|
39970
39958
|
arcTo() {}
|
|
39971
39959
|
quadraticCurveTo() {}
|
|
39972
|
-
},
|
|
39960
|
+
}, Ou = class {
|
|
39973
39961
|
script;
|
|
39974
39962
|
xCurve;
|
|
39975
39963
|
yCurve;
|
|
@@ -39980,10 +39968,10 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
39980
39968
|
altitudeCurve;
|
|
39981
39969
|
elevationCurve;
|
|
39982
39970
|
constructor(e) {
|
|
39983
|
-
this.script =
|
|
39971
|
+
this.script = iu(e), this.xCurve = this.createMonotonicCurve(this.script, "x"), this.yCurve = this.createMonotonicCurve(this.script, "y"), this.fovCurve = this.createMonotonicCurve(this.script, "fov"), this.zoomCurve = this.createMonotonicCurve(this.script, "zoom"), this.pitchCurve = this.createMonotonicCurve(this.script, "pitch"), this.bearingCurve = this.createMonotonicCurve(this.script, "bearing"), this.altitudeCurve = this.createMonotonicCurve(this.script, "altitude"), this.elevationCurve = this.createMonotonicCurve(this.script, "elevation");
|
|
39984
39972
|
}
|
|
39985
39973
|
sample(e) {
|
|
39986
|
-
let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(
|
|
39974
|
+
let t = this.zoomCurve.sample(e), n = this.altitudeCurve.solve(su(t), e), r = this.xCurve.sample(n), i = this.yCurve.sample(n), a = this.elevationCurve.sample(n), o = this.bearingCurve.sample(e), s = this.pitchCurve.sample(e), c = this.fovCurve.sample(e);
|
|
39987
39975
|
return {
|
|
39988
39976
|
center: new l.MercatorCoordinate(r, i).toLngLat(),
|
|
39989
39977
|
zoom: t,
|
|
@@ -40027,7 +40015,7 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
40027
40015
|
y: l
|
|
40028
40016
|
});
|
|
40029
40017
|
}
|
|
40030
|
-
return new
|
|
40018
|
+
return new Eu(n);
|
|
40031
40019
|
}
|
|
40032
40020
|
sampleAutoHideOpacity(e) {
|
|
40033
40021
|
let t = this.script;
|
|
@@ -40038,12 +40026,12 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
40038
40026
|
if (r.hideLabels === (a?.hideLabels ?? !1)) o = r.hideLabels ? 0 : 1;
|
|
40039
40027
|
else {
|
|
40040
40028
|
let t = e - r.time, n = Math.min(400, i.time - r.time);
|
|
40041
|
-
o = j(
|
|
40029
|
+
o = j(Xl(t, r.hideLabels ? 1 : 0, r.hideLabels ? -1 : 1, n), 0, 1);
|
|
40042
40030
|
}
|
|
40043
40031
|
let s;
|
|
40044
40032
|
if (n === t.length - 2 && r.hideLabels) {
|
|
40045
40033
|
let t = Math.max(r.time, i.time - 400);
|
|
40046
|
-
s = j(
|
|
40034
|
+
s = j(Xl(e - t, 0, 1, i.time - t), 0, 1);
|
|
40047
40035
|
} else s = 0;
|
|
40048
40036
|
return Math.max(o, s);
|
|
40049
40037
|
}
|
|
@@ -40055,10 +40043,10 @@ var Du = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
|
|
|
40055
40043
|
}
|
|
40056
40044
|
}
|
|
40057
40045
|
getKeyframeValue(e, t) {
|
|
40058
|
-
return t === "altitude" ?
|
|
40046
|
+
return t === "altitude" ? su(e.zoom) : e[t];
|
|
40059
40047
|
}
|
|
40060
|
-
},
|
|
40061
|
-
function
|
|
40048
|
+
}, ku = Au;
|
|
40049
|
+
function Au(e, t, n) {
|
|
40062
40050
|
var r = null, i = null, a = function() {
|
|
40063
40051
|
r &&= (clearTimeout(r), i = null, null);
|
|
40064
40052
|
}, o = function() {
|
|
@@ -40080,7 +40068,7 @@ function Mu(e, t, n) {
|
|
|
40080
40068
|
}
|
|
40081
40069
|
//#endregion
|
|
40082
40070
|
//#region src/Video.ts
|
|
40083
|
-
var
|
|
40071
|
+
var ju = class {
|
|
40084
40072
|
mcMap;
|
|
40085
40073
|
cameraCurve;
|
|
40086
40074
|
jobObject;
|
|
@@ -40104,7 +40092,7 @@ var Nu = class {
|
|
|
40104
40092
|
elevation: e.elevation ?? 0
|
|
40105
40093
|
};
|
|
40106
40094
|
});
|
|
40107
|
-
this.duration =
|
|
40095
|
+
this.duration = cu(s), this.cameraCurve = new Ou(s), this.jobObject = t, this.svgs = n, this.svgCache = r, this.mapstyle = i, this.overlays = a, this.layerInfo = o;
|
|
40108
40096
|
}
|
|
40109
40097
|
play() {
|
|
40110
40098
|
this.playbackContext === void 0 && this.duration > 0 && (this.playhead >= this.duration && (this.playhead = 0), this.playbackContext = {
|
|
@@ -40122,7 +40110,7 @@ var Nu = class {
|
|
|
40122
40110
|
}));
|
|
40123
40111
|
}
|
|
40124
40112
|
async *frames() {
|
|
40125
|
-
let e = this.mcMap.map, t =
|
|
40113
|
+
let e = this.mcMap.map, t = lu(this.jobObject.export?.frameRate ?? 60), n = Math.ceil(this.duration * t / 1e3);
|
|
40126
40114
|
e._fadeDuration = 0, e.style.stylesheet.transition = {
|
|
40127
40115
|
duration: 0,
|
|
40128
40116
|
delay: 0
|
|
@@ -40141,7 +40129,7 @@ var Nu = class {
|
|
|
40141
40129
|
let r = t.querySelectorAll(".adornment-svg"), i = await Promise.all(Array.from(r).map(async (e) => {
|
|
40142
40130
|
let t = e.outerHTML, r = e.getBoundingClientRect(), i = r.left - n.left, a = r.top - n.top, o = r.width, s = r.height;
|
|
40143
40131
|
return {
|
|
40144
|
-
image: await
|
|
40132
|
+
image: await Er(t, o, s),
|
|
40145
40133
|
x: i,
|
|
40146
40134
|
y: a
|
|
40147
40135
|
};
|
|
@@ -40163,8 +40151,8 @@ var Nu = class {
|
|
|
40163
40151
|
let t = this.mcMap.map, { svgs: n, svgCache: r } = this, i = this.jobObject.video?.animations ?? [];
|
|
40164
40152
|
for (let n of i) {
|
|
40165
40153
|
let { target: r } = n;
|
|
40166
|
-
if (r.type === "model" &&
|
|
40167
|
-
let { modelType: i, groupId: a, modelId: o } = r, s =
|
|
40154
|
+
if (r.type === "model" && tu(n)) {
|
|
40155
|
+
let { modelType: i, groupId: a, modelId: o } = r, s = ru(n, "fade", e);
|
|
40168
40156
|
(i === "polygon" || i === "circle" || i === "line" || i === "marker" || i === "dot") && (o === void 0 ? t.setGlobalStateProperty(`opacity-${a}`, s === 1 ? null : s) : t.setFeatureState({
|
|
40169
40157
|
source: a,
|
|
40170
40158
|
id: S(o)
|
|
@@ -40174,14 +40162,14 @@ var Nu = class {
|
|
|
40174
40162
|
for (let n of this.jobObject.registry?.models?.area ?? []) {
|
|
40175
40163
|
let { groupAnimation: r, modelAnimations: a } = this.getGroupAnimations(i, "area", n.id, "opacity");
|
|
40176
40164
|
if (!(r === void 0 && a.size === 0)) if (r !== void 0 && a.size === 0) {
|
|
40177
|
-
let i =
|
|
40165
|
+
let i = ru(r, "fade", e);
|
|
40178
40166
|
n.models.reduce((e, t) => e.add(or(n.id, t)), /* @__PURE__ */ new Set()).forEach((e) => {
|
|
40179
40167
|
t.setPaintProperty(e, "fill-opacity", i), t.setPaintProperty(`${e}-outline`, "line-opacity", i), t.setPaintProperty(`${e}-pattern`, "fill-opacity", i);
|
|
40180
40168
|
});
|
|
40181
40169
|
} else {
|
|
40182
|
-
let i = r === void 0 ? 1 :
|
|
40170
|
+
let i = r === void 0 ? 1 : ru(r, "fade", e), o = {};
|
|
40183
40171
|
for (let t of n.models) {
|
|
40184
|
-
let r = t.featureId === void 0 ? t.id : String(t.featureId), s = or(n.id, t), c = a.get(t.id), l = c === void 0 ? i :
|
|
40172
|
+
let r = t.featureId === void 0 ? t.id : String(t.featureId), s = or(n.id, t), c = a.get(t.id), l = c === void 0 ? i : ru(c, "fade", e);
|
|
40185
40173
|
o[s] ??= {}, o[s][r] = l;
|
|
40186
40174
|
}
|
|
40187
40175
|
for (let [e, n] of Object.entries(o)) {
|
|
@@ -40204,32 +40192,32 @@ var Nu = class {
|
|
|
40204
40192
|
}
|
|
40205
40193
|
}
|
|
40206
40194
|
for (let a of this.jobObject.registry?.models?.circle ?? []) {
|
|
40207
|
-
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "circle", a.id, "scale"), c = o === void 0 ? 1 :
|
|
40195
|
+
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "circle", a.id, "scale"), c = o === void 0 ? 1 : ru(o, "grow", e);
|
|
40208
40196
|
(o !== void 0 || s.size > 0) && t.getSource(a.id).setData({
|
|
40209
40197
|
type: "FeatureCollection",
|
|
40210
40198
|
features: a.models.filter((e) => e.visible ?? !0).map((t) => {
|
|
40211
40199
|
let i = s.get(t.id);
|
|
40212
|
-
return
|
|
40200
|
+
return hl(a, t, i === void 0 ? c : ru(i, "grow", e), n, r);
|
|
40213
40201
|
})
|
|
40214
40202
|
});
|
|
40215
40203
|
}
|
|
40216
40204
|
for (let n of this.jobObject.registry?.models?.line ?? []) {
|
|
40217
|
-
let { groupAnimation: a, modelAnimations: o } = this.getGroupAnimations(i, "line", n.id, "scale"), s = a === void 0 ? 1 :
|
|
40205
|
+
let { groupAnimation: a, modelAnimations: o } = this.getGroupAnimations(i, "line", n.id, "scale"), s = a === void 0 ? 1 : ru(a, "grow", e);
|
|
40218
40206
|
(a !== void 0 || o.size > 0) && t.getSource(n.id).setData({
|
|
40219
40207
|
type: "FeatureCollection",
|
|
40220
40208
|
features: n.models.filter((e) => e.visible ?? !0).map((i) => {
|
|
40221
40209
|
let a = o.get(i.id);
|
|
40222
|
-
return
|
|
40210
|
+
return Wl(t, n, i, a === void 0 ? s : ru(a, "grow", e), r);
|
|
40223
40211
|
})
|
|
40224
40212
|
});
|
|
40225
40213
|
}
|
|
40226
40214
|
for (let a of this.jobObject.registry?.models?.marker ?? []) {
|
|
40227
|
-
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "marker", a.id, "scale"), c = o === void 0 ? 1 :
|
|
40215
|
+
let { groupAnimation: o, modelAnimations: s } = this.getGroupAnimations(i, "marker", a.id, "scale"), c = o === void 0 ? 1 : ru(o, "grow", e);
|
|
40228
40216
|
(o !== void 0 || s.size > 0) && t.getSource(a.id).setData({
|
|
40229
40217
|
type: "FeatureCollection",
|
|
40230
40218
|
features: a.models.filter((e) => e.visible ?? !0).map((t) => {
|
|
40231
40219
|
let i = s.get(t.id);
|
|
40232
|
-
return
|
|
40220
|
+
return yl(a, t, i === void 0 ? c : ru(i, "grow", e), n, r);
|
|
40233
40221
|
})
|
|
40234
40222
|
});
|
|
40235
40223
|
}
|
|
@@ -40250,7 +40238,7 @@ var Nu = class {
|
|
|
40250
40238
|
delay: 0
|
|
40251
40239
|
}), this.restoreAfterPlayback();
|
|
40252
40240
|
}
|
|
40253
|
-
restoreAfterPlayback =
|
|
40241
|
+
restoreAfterPlayback = ku(() => {
|
|
40254
40242
|
let e = this.mcMap.map;
|
|
40255
40243
|
e.setCenterClampedToGround(!0), e.style?.stylesheet && (e.style.stylesheet.transition = void 0);
|
|
40256
40244
|
}, 300);
|
|
@@ -40258,7 +40246,7 @@ var Nu = class {
|
|
|
40258
40246
|
let i, a = /* @__PURE__ */ new Map();
|
|
40259
40247
|
for (let o of e) {
|
|
40260
40248
|
let { target: e } = o;
|
|
40261
|
-
e.type === "model" && e.modelType === t && e.groupId === n && (r === "opacity" &&
|
|
40249
|
+
e.type === "model" && e.modelType === t && e.groupId === n && (r === "opacity" && tu(o) || r === "scale" && nu(o)) && (e.modelId === void 0 ? i = o : a.set(e.modelId, o));
|
|
40262
40250
|
}
|
|
40263
40251
|
return {
|
|
40264
40252
|
groupAnimation: i,
|
|
@@ -40272,7 +40260,7 @@ var Nu = class {
|
|
|
40272
40260
|
let { target: e } = n;
|
|
40273
40261
|
e.type === "layer" && e.ids.includes(t.id) && e.ids.length < o && (a = n, o = e.ids.length);
|
|
40274
40262
|
}
|
|
40275
|
-
return a === void 0 ? i === void 0 ? void 0 :
|
|
40263
|
+
return a === void 0 ? i === void 0 ? void 0 : ru(i, "fade", n) : ru(a, "fade", n);
|
|
40276
40264
|
}
|
|
40277
40265
|
setLayerOpacity(e, t) {
|
|
40278
40266
|
let n = this.mcMap.map;
|
|
@@ -40282,11 +40270,11 @@ var Nu = class {
|
|
|
40282
40270
|
let t = this.mcMap.map;
|
|
40283
40271
|
e.type === "fill" ? t.setPaintProperty(e.id, "fill-opacity", e.paint?.["fill-opacity"] ?? 1) : e.type === "line" ? t.setPaintProperty(e.id, "line-opacity", e.paint?.["line-opacity"] ?? 1) : e.type === "circle" ? (t.setPaintProperty(e.id, "circle-opacity", e.paint?.["circle-opacity"] ?? 1), t.setPaintProperty(e.id, "circle-stroke-opacity", e.paint?.["circle-stroke-opacity"] ?? 1)) : e.type === "heatmap" ? t.setPaintProperty(e.id, "heatmap-opacity", e.paint?.["heatmap-opacity"] ?? 1) : e.type === "fill-extrusion" ? t.setPaintProperty(e.id, "fill-extrusion-opacity", e.paint?.["fill-extrusion-opacity"] ?? 1) : e.type === "symbol" ? (t.setPaintProperty(e.id, "icon-opacity", e.paint?.["icon-opacity"] ?? 1), t.setPaintProperty(e.id, "text-opacity", e.paint?.["text-opacity"] ?? 1)) : e.type === "raster" ? t.setPaintProperty(e.id, "raster-opacity", e.paint?.["raster-opacity"] ?? 1) : e.type === "hillshade" ? t.setPaintProperty(e.id, "hillshade-exaggeration", e.paint?.["hillshade-exaggeration"] ?? .5) : e.type === "color-relief" ? t.setPaintProperty(e.id, "color-relief-opacity", e.paint?.["color-relief-opacity"] ?? 1) : e.type === "background" && t.setPaintProperty(e.id, "background-opacity", e.paint?.["background-opacity"] ?? 1), t.setLayoutProperty(e.id, "visibility", this.layerInfo[e.id]?.visibility ? "visible" : "none");
|
|
40284
40272
|
}
|
|
40285
|
-
},
|
|
40273
|
+
}, Mu = class extends l.Evented {
|
|
40286
40274
|
map;
|
|
40287
40275
|
video;
|
|
40288
40276
|
constructor(e, t, n, r, i, a, o) {
|
|
40289
|
-
super(), this.map = e, this.video = new
|
|
40277
|
+
super(), this.map = e, this.video = new ju(this, t, n, r, i, a, o);
|
|
40290
40278
|
}
|
|
40291
40279
|
on(e, t) {
|
|
40292
40280
|
return super.on(e, t);
|
|
@@ -40315,9 +40303,9 @@ var Nu = class {
|
|
|
40315
40303
|
};
|
|
40316
40304
|
//#endregion
|
|
40317
40305
|
//#region src/initMap.ts
|
|
40318
|
-
async function
|
|
40319
|
-
let { accessToken: t, mode: n = "sdk", env: r = "production" } = e, i = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", a = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", o = typeof e.job == "string" ? await
|
|
40320
|
-
await
|
|
40306
|
+
async function Nu(e) {
|
|
40307
|
+
let { accessToken: t, mode: n = "sdk", env: r = "production" } = e, i = r === "bleeding" ? "https://vapi.bleeding.mc-cdn.io" : r === "beta" ? "https://vapi.beta.mc-cdn.io" : "https://vapi.mc-cdn.io", a = r === "bleeding" ? "https://cdn.bleeding.mapcreator.io" : r === "beta" ? "https://cdn.beta.mapcreator.io" : "https://cdn.mapcreator.io", o = typeof e.job == "string" ? await Pu(e.job, a, t) : e.job;
|
|
40308
|
+
await Fu();
|
|
40321
40309
|
let s = new l.Map({
|
|
40322
40310
|
container: e.container,
|
|
40323
40311
|
attributionControl: !1,
|
|
@@ -40331,17 +40319,17 @@ async function Fu(e) {
|
|
|
40331
40319
|
maxPitch: 85,
|
|
40332
40320
|
maxZoom: 22,
|
|
40333
40321
|
locale: {
|
|
40334
|
-
"CooperativeGesturesHandler.WindowsHelpText":
|
|
40335
|
-
"CooperativeGesturesHandler.MacHelpText":
|
|
40336
|
-
"CooperativeGesturesHandler.MobileHelpText":
|
|
40322
|
+
"CooperativeGesturesHandler.WindowsHelpText": Li("windowsHelpText"),
|
|
40323
|
+
"CooperativeGesturesHandler.MacHelpText": Li("macHelpText"),
|
|
40324
|
+
"CooperativeGesturesHandler.MobileHelpText": Li("mobileHelpText")
|
|
40337
40325
|
},
|
|
40338
40326
|
canvasContextAttributes: { preserveDrawingBuffer: n === "video" }
|
|
40339
40327
|
}), c = s.getContainer();
|
|
40340
40328
|
c.classList.add("mc-map"), c.classList.add(`mc-mode-${n}`);
|
|
40341
|
-
let d = new
|
|
40342
|
-
|
|
40329
|
+
let d = new Fr(s), p = new Bl(s, n), { map: { language: h, pitch: _ = 0, rotation: v = 0, center: y, hideBasemap: b, detailLevel: x = 0, projection: S = "mercator", terrain: C = !1, terrainExaggeration: w = 1 }, registry: T = {}, web: E, positionOffsets: D, title: O } = o, { models: k = {}, slots: A = {}, svgs: j = {} } = T;
|
|
40330
|
+
Ru(r, i, t), s.resize(), n === "app" && (document.title = O ? `${O} - Mapcreator` : "Mapcreator"), s.setPitch(_), s.setBearing(v);
|
|
40343
40331
|
let M = N(o, c), P, F;
|
|
40344
|
-
if (n === "video" ? (F = o.map.zoom - x, P = M) : (F = o.map.zoom - x + Math.log2(M), P = 1), s.setScale(P), s.setZoom(F), s.setCenter(y), s.setDetailLevel(x), s.setMinZoom(x), s.addControl(new l.AttributionControl({ compact: !1 })), n === "app" && s.cooperativeGestures.enable(),
|
|
40332
|
+
if (n === "video" ? (F = o.map.zoom - x, P = M) : (F = o.map.zoom - x + Math.log2(M), P = 1), s.setScale(P), s.setZoom(F), s.setCenter(y), s.setDetailLevel(x), s.setMinZoom(x), s.addControl(new l.AttributionControl({ compact: !1 })), n === "app" && s.cooperativeGestures.enable(), sl(o, D ?? g, s, {
|
|
40345
40333
|
center: y,
|
|
40346
40334
|
zoom: F,
|
|
40347
40335
|
pitch: _,
|
|
@@ -40351,16 +40339,16 @@ async function Fu(e) {
|
|
|
40351
40339
|
e && (s.boxZoom.disable(), s.doubleClickZoom.disable(), s.dragPan.disable(), s.dragRotate.disable(), s.keyboard.disable(), s.scrollZoom.disable(), s.touchPitch.disable(), s.touchZoomRotate.disable()), p.setParams(t, m(h, f.TWO), e, y);
|
|
40352
40340
|
}
|
|
40353
40341
|
let ee = await fetch(`${i}/styles/${o.meta.mapstyleSet}.json?access_token=${t}`).then((e) => e.json());
|
|
40354
|
-
s.setStyle(null), s.setStyle(ee), await s.once("style.load"), n === "app" &&
|
|
40355
|
-
let I = await
|
|
40356
|
-
|
|
40357
|
-
let ne =
|
|
40358
|
-
return
|
|
40342
|
+
s.setStyle(null), s.setStyle(ee), await s.once("style.load"), n === "app" && zu(s.getStyle().metadata?.customCssFilePath, t), u(h, s);
|
|
40343
|
+
let I = await bl(o.map.overlays ?? [], o.meta.layers ?? [], s, i, t, ee.metadata?.styleOverride), te = (o.map.overlays ?? []).reduce((e, t, n) => e.set(t, I[n]), /* @__PURE__ */ new Map());
|
|
40344
|
+
Hu(s, d, k, A, j, i, t), u(h, s), p.setPublication(ee.metadata?.publication), p.setpopupElements(), p.setHighlightManager(), s.setProjection({ type: S === "globe" ? "globe" : "mercator" }), Iu(s, S), C && Lu(s, i, t, w);
|
|
40345
|
+
let ne = Bu(o.map.layerInfo, ee, I);
|
|
40346
|
+
return Vu(s, ne, !b), new Mu(s, o, j, d, ee, te, ne);
|
|
40359
40347
|
}
|
|
40360
|
-
function
|
|
40348
|
+
function Pu(e, t, n) {
|
|
40361
40349
|
return fetch(`${t}/jobs/${e}.json?access_token=${n}`).then((e) => e.json());
|
|
40362
40350
|
}
|
|
40363
|
-
function
|
|
40351
|
+
function Fu() {
|
|
40364
40352
|
return new Promise((e) => {
|
|
40365
40353
|
let t = () => {
|
|
40366
40354
|
window.innerWidth > 0 && window.innerHeight > 0 && (window.removeEventListener("resize", t), e());
|
|
@@ -40368,7 +40356,7 @@ function Lu() {
|
|
|
40368
40356
|
window.addEventListener("resize", t), t();
|
|
40369
40357
|
});
|
|
40370
40358
|
}
|
|
40371
|
-
function
|
|
40359
|
+
function Iu(e, t) {
|
|
40372
40360
|
let n = e.getStyle().metadata ?? {}, r = n["mc:background-color"] ?? "#f8f8f8", i = n["mc:background-color-globe"] ?? "#000000";
|
|
40373
40361
|
e.getContainer().style.backgroundColor = t === "globe" ? i : r, e.setSky(e.getStyle().sky ?? h), e.setLight({ position: [
|
|
40374
40362
|
1.15,
|
|
@@ -40376,7 +40364,7 @@ function Ru(e, t) {
|
|
|
40376
40364
|
45
|
|
40377
40365
|
] });
|
|
40378
40366
|
}
|
|
40379
|
-
function
|
|
40367
|
+
function Lu(e, t, n, r) {
|
|
40380
40368
|
e.addSource("mc-dem", {
|
|
40381
40369
|
type: "raster-dem",
|
|
40382
40370
|
tiles: [`${t}/dataset/jaxa_terrainrgb/{z}/{x}/{y}?access_token=${n}`],
|
|
@@ -40388,57 +40376,57 @@ function zu(e, t, n, r) {
|
|
|
40388
40376
|
exaggeration: r
|
|
40389
40377
|
});
|
|
40390
40378
|
}
|
|
40391
|
-
function
|
|
40379
|
+
function Ru(e, t, n) {
|
|
40392
40380
|
let r = `${t}/stylesheets/ff-${e === "beta" ? "b-" : ""}${n}.css?access_token=${n}`, i = document.createElement("link");
|
|
40393
40381
|
i.setAttribute("rel", "stylesheet"), i.setAttribute("href", r), i.setAttribute("type", "text/css"), document.head.insertBefore(i, document.head.firstChild);
|
|
40394
40382
|
}
|
|
40395
|
-
function
|
|
40383
|
+
function zu(e, t) {
|
|
40396
40384
|
if (document.getElementById("custom-style")?.remove(), !e) return;
|
|
40397
40385
|
let n;
|
|
40398
40386
|
e.startsWith("http") ? (e = `${e}?access_token=${t}`, n = document.createElement("link"), n.setAttribute("rel", "stylesheet"), n.setAttribute("href", e.replace(/https?:/, ""))) : (n = document.createElement("style"), n.appendChild(document.createTextNode(e))), n.setAttribute("id", "custom-style"), n.setAttribute("type", "text/css"), document.head.appendChild(n);
|
|
40399
40387
|
}
|
|
40400
|
-
function
|
|
40388
|
+
function Bu(e, t, n) {
|
|
40401
40389
|
let r = e?.reduce((e, t) => (e[t.id] = { visibility: t.visibility }, e), {}) ?? {}, i = {};
|
|
40402
40390
|
for (let e of t.layers) i[e.id] = r[e.id] ?? { visibility: (e.layout?.visibility ?? "visible") === "visible" };
|
|
40403
40391
|
for (let e of n) for (let t of e.layers) i[t.id] = r[t.id] ?? { visibility: !1 };
|
|
40404
40392
|
return i;
|
|
40405
40393
|
}
|
|
40406
|
-
function
|
|
40394
|
+
function Vu(e, t, n) {
|
|
40407
40395
|
for (let r in t) e.getLayer(r) !== void 0 && e.setLayoutProperty(r, "visibility", t[r].visibility && n ? "visible" : "none");
|
|
40408
40396
|
}
|
|
40409
|
-
function
|
|
40397
|
+
function Hu(e, t, n, r, i, a, o) {
|
|
40410
40398
|
let { beforeNone: s = [], beforeNames: c = [], beforeBoundaries: l = [], beforeWaters: u = [] } = r;
|
|
40411
40399
|
s.forEach((r) => {
|
|
40412
|
-
|
|
40400
|
+
Uu(e, t, n, r, i, "mc-before-none", a, o);
|
|
40413
40401
|
}), c.forEach((r) => {
|
|
40414
|
-
|
|
40402
|
+
Uu(e, t, n, r, i, "mc-before-names", a, o);
|
|
40415
40403
|
}), l.forEach((r) => {
|
|
40416
|
-
|
|
40404
|
+
Uu(e, t, n, r, i, "mc-before-boundaries", a, o);
|
|
40417
40405
|
}), u.forEach((r) => {
|
|
40418
|
-
|
|
40406
|
+
Uu(e, t, n, r, i, "mc-before-waters", a, o);
|
|
40419
40407
|
});
|
|
40420
40408
|
}
|
|
40421
|
-
function
|
|
40409
|
+
function Uu(e, t, n, r, i, a, o, s) {
|
|
40422
40410
|
if (r.type === "marker") {
|
|
40423
40411
|
let o = n.marker?.find((e) => e.id === r.groupId);
|
|
40424
|
-
o &&
|
|
40412
|
+
o && _l(e, o, a, i, t);
|
|
40425
40413
|
} else if (r.type === "polygon") {
|
|
40426
40414
|
let o = n.polygon?.find((e) => e.id === r.groupId);
|
|
40427
|
-
o &&
|
|
40415
|
+
o && fl(e, o, a, i, t);
|
|
40428
40416
|
} else if (r.type === "circle") {
|
|
40429
40417
|
let o = n.circle?.find((e) => e.id === r.groupId);
|
|
40430
|
-
o &&
|
|
40418
|
+
o && ml(e, o, a, i, t);
|
|
40431
40419
|
} else if (r.type === "line") {
|
|
40432
40420
|
let i = n.line?.find((e) => e.id === r.groupId);
|
|
40433
|
-
i &&
|
|
40421
|
+
i && Ul(e, i, a, t);
|
|
40434
40422
|
} else if (r.type === "dot") {
|
|
40435
40423
|
let t = n.dot?.find((e) => e.id === r.groupId);
|
|
40436
|
-
t &&
|
|
40424
|
+
t && ql(e, t, a);
|
|
40437
40425
|
} else if (r.type === "area") {
|
|
40438
40426
|
let c = n.area?.find((e) => e.id === r.groupId);
|
|
40439
|
-
c &&
|
|
40427
|
+
c && Kl(e, c, a, i, t, o, s);
|
|
40440
40428
|
}
|
|
40441
40429
|
}
|
|
40442
40430
|
//#endregion
|
|
40443
|
-
var
|
|
40444
|
-
export {
|
|
40431
|
+
var Wu = l.setRTLTextPlugin;
|
|
40432
|
+
export { Nu as initMap, Wu as setRTLTextPlugin };
|