@yappkit/front-module-map 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_commonjsHelpers.js +2 -2
- package/lib/mapbox-gl.js +5 -2
- package/lib/mapbox-sdk/browser-client.js +13 -13
- package/lib/mapbox-sdk/create-service-factory.js +5 -5
- package/lib/mapbox-sdk/datasets.js +3 -3
- package/lib/mapbox-sdk/directions.js +5 -5
- package/lib/mapbox-sdk/geocoding-v6.js +11 -11
- package/lib/mapbox-sdk/geocoding.js +10 -10
- package/lib/mapbox-sdk/isochrone.js +8 -8
- package/lib/mapbox-sdk/map-matching.js +8 -8
- package/lib/mapbox-sdk/matrix.js +4 -4
- package/lib/mapbox-sdk/object-clean.js +6 -6
- package/lib/mapbox-sdk/optimization.js +22 -22
- package/lib/mapbox-sdk/static.js +3 -3
- package/lib/mapbox-sdk/stringify-booleans.js +3 -3
- package/lib/mapbox-sdk/styles.js +10 -10
- package/lib/mapbox-sdk/tilequery.js +5 -5
- package/lib/mapbox-sdk/tilesets.js +3 -3
- package/lib/mapbox-sdk/tokens.js +3 -3
- package/lib/mapbox-sdk/uploads.js +3 -3
- package/lib/mapbox-sdk.js +12 -9
- package/lib/providers/mapbox.js +16 -16
- package/lib/providers/maplibre.js +16 -16
- package/lib/searoute.js +6 -6
- package/lib/yappkit-map.js +22 -23
- package/package.json +4 -1
package/lib/_commonjsHelpers.js
CHANGED
package/lib/mapbox-gl.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as yA, commonjsGlobal as xA } from "./_commonjsHelpers.js";
|
|
2
2
|
function vA(Cs, oh) {
|
|
3
3
|
for (var qr = 0; qr < oh.length; qr++) {
|
|
4
4
|
const fr = oh[qr];
|
|
@@ -30196,5 +30196,8 @@ const bA = /* @__PURE__ */ yA(J1), TA = /* @__PURE__ */ vA({
|
|
|
30196
30196
|
default: bA
|
|
30197
30197
|
}, [J1]);
|
|
30198
30198
|
export {
|
|
30199
|
-
TA as
|
|
30199
|
+
TA as mapboxGl
|
|
30200
|
+
};
|
|
30201
|
+
export {
|
|
30202
|
+
TA as default
|
|
30200
30203
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { commonjsGlobal as T } from "../_commonjsHelpers.js";
|
|
2
2
|
var z = W, J = Object.prototype.hasOwnProperty;
|
|
3
3
|
function W() {
|
|
4
4
|
for (var r = {}, e = 0; e < arguments.length; e++) {
|
|
@@ -78,7 +78,7 @@ function ee(r) {
|
|
|
78
78
|
function _(r, e) {
|
|
79
79
|
return Object.prototype.hasOwnProperty.call(r, e);
|
|
80
80
|
}
|
|
81
|
-
var
|
|
81
|
+
var U = Y, F = { exports: {} };
|
|
82
82
|
(function(r) {
|
|
83
83
|
var e = Object.prototype.hasOwnProperty, t = "~";
|
|
84
84
|
function n() {
|
|
@@ -188,19 +188,19 @@ var F = Y, M = { exports: {} };
|
|
|
188
188
|
var f;
|
|
189
189
|
return c ? (f = t ? t + c : c, this._events[f] && p(this, f)) : (this._events = new n(), this._eventsCount = 0), this;
|
|
190
190
|
}, d.prototype.off = d.prototype.removeListener, d.prototype.addListener = d.prototype.on, d.prefixed = t, d.EventEmitter = d, r.exports = d;
|
|
191
|
-
})(
|
|
192
|
-
var re =
|
|
191
|
+
})(F);
|
|
192
|
+
var re = F.exports;
|
|
193
193
|
function te(r) {
|
|
194
194
|
return r.map(encodeURIComponent).join(",");
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function M(r) {
|
|
197
197
|
return Array.isArray(r) ? te(r) : encodeURIComponent(String(r));
|
|
198
198
|
}
|
|
199
199
|
function j(r, e, t) {
|
|
200
200
|
if (t === !1 || t === null)
|
|
201
201
|
return r;
|
|
202
202
|
var n = /\?/.test(r) ? "&" : "?", a = encodeURIComponent(e);
|
|
203
|
-
return t !== void 0 && t !== "" && t !== !0 && (a += "=" +
|
|
203
|
+
return t !== void 0 && t !== "" && t !== !0 && (a += "=" + M(t)), "" + r + n + a;
|
|
204
204
|
}
|
|
205
205
|
function ne(r, e) {
|
|
206
206
|
if (!e)
|
|
@@ -224,7 +224,7 @@ function se(r, e) {
|
|
|
224
224
|
var a = e[n];
|
|
225
225
|
if (a === void 0)
|
|
226
226
|
throw new Error("Unspecified route parameter " + n);
|
|
227
|
-
var u =
|
|
227
|
+
var u = M(a);
|
|
228
228
|
return "/" + u;
|
|
229
229
|
}) : r;
|
|
230
230
|
}
|
|
@@ -241,7 +241,7 @@ var oe = {
|
|
|
241
241
|
EVENT_RESPONSE: "response",
|
|
242
242
|
ERROR_HTTP: "HttpError",
|
|
243
243
|
ERROR_REQUEST_ABORTED: "RequestAbortedError"
|
|
244
|
-
}, ie =
|
|
244
|
+
}, ie = U, q = z, ue = re, O = oe, N = C, ce = 1;
|
|
245
245
|
function m(r, e) {
|
|
246
246
|
if (!r)
|
|
247
247
|
throw new Error("MapiRequest requires a client");
|
|
@@ -311,7 +311,7 @@ m.prototype._extend = function(e) {
|
|
|
311
311
|
var t = q(this._options, e);
|
|
312
312
|
return new m(this.client, t);
|
|
313
313
|
};
|
|
314
|
-
var fe = m, le =
|
|
314
|
+
var fe = m, le = U, pe = fe, he = C;
|
|
315
315
|
function V(r) {
|
|
316
316
|
if (!r || !r.accessToken)
|
|
317
317
|
throw new Error("Cannot create a client without an access token");
|
|
@@ -493,8 +493,8 @@ function qe(r) {
|
|
|
493
493
|
}
|
|
494
494
|
var Ne = qe;
|
|
495
495
|
export {
|
|
496
|
-
Ne as
|
|
497
|
-
z as
|
|
498
|
-
de as
|
|
499
|
-
oe as
|
|
496
|
+
Ne as browserClient,
|
|
497
|
+
z as immutable,
|
|
498
|
+
de as mapiClient,
|
|
499
|
+
oe as urlUtils
|
|
500
500
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { commonjsGlobal as m } from "../_commonjsHelpers.js";
|
|
2
|
+
import { immutable as h, mapiClient as V, browserClient as N } from "./browser-client.js";
|
|
3
3
|
var R = Object.prototype.toString, _ = function(r) {
|
|
4
4
|
var e;
|
|
5
5
|
return R.call(r) === "[object Object]" && (e = Object.getPrototypeOf(r), e === null || e === Object.getPrototypeOf({}));
|
|
@@ -231,7 +231,7 @@ function J(r) {
|
|
|
231
231
|
}
|
|
232
232
|
var Y = J;
|
|
233
233
|
export {
|
|
234
|
-
Y as
|
|
235
|
-
X as
|
|
236
|
-
Q as
|
|
234
|
+
Y as createServiceFactory_1,
|
|
235
|
+
X as pick_1,
|
|
236
|
+
Q as validator
|
|
237
237
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as p } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as h, validator as c, pick_1 as I } from "./create-service-factory.js";
|
|
3
3
|
function m(t, n) {
|
|
4
4
|
for (var i = 0; i < n.length; i++) {
|
|
5
5
|
const s = n[i];
|
|
@@ -119,5 +119,5 @@ const l = /* @__PURE__ */ p(o), y = /* @__PURE__ */ m({
|
|
|
119
119
|
default: l
|
|
120
120
|
}, [o]);
|
|
121
121
|
export {
|
|
122
|
-
y as
|
|
122
|
+
y as datasets
|
|
123
123
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as c } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as u, validator as v } from "./create-service-factory.js";
|
|
3
|
+
import { objectClean_1 as g } from "./object-clean.js";
|
|
4
|
+
import { stringifyBooleans as m } from "./stringify-booleans.js";
|
|
5
5
|
function d(r, a) {
|
|
6
6
|
for (var o = 0; o < a.length; o++) {
|
|
7
7
|
const i = a[o];
|
|
@@ -151,5 +151,5 @@ const b = /* @__PURE__ */ c(_), O = /* @__PURE__ */ d({
|
|
|
151
151
|
default: b
|
|
152
152
|
}, [_]);
|
|
153
153
|
export {
|
|
154
|
-
O as
|
|
154
|
+
O as directions
|
|
155
155
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as m } from "../_commonjsHelpers.js";
|
|
2
|
+
import { immutable as p } from "./browser-client.js";
|
|
3
|
+
import { createServiceFactory_1 as y, validator as b, pick_1 as f } from "./create-service-factory.js";
|
|
4
|
+
import { stringifyBooleans as v } from "./stringify-booleans.js";
|
|
5
5
|
function h(r, t) {
|
|
6
6
|
for (var n = 0; n < t.length; n++) {
|
|
7
7
|
const o = t[n];
|
|
8
8
|
if (typeof o != "string" && !Array.isArray(o)) {
|
|
9
9
|
for (const a in o)
|
|
10
10
|
if (a !== "default" && !(a in r)) {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const i = Object.getOwnPropertyDescriptor(o, a);
|
|
12
|
+
i && Object.defineProperty(r, a, i.get ? i : {
|
|
13
13
|
enumerable: !0,
|
|
14
14
|
get: () => o[a]
|
|
15
15
|
});
|
|
@@ -18,7 +18,7 @@ function h(r, t) {
|
|
|
18
18
|
}
|
|
19
19
|
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var s = p, e = b, d = f, l = v, O = y, u = {}, c = [
|
|
22
22
|
"street",
|
|
23
23
|
"country",
|
|
24
24
|
"region",
|
|
@@ -31,7 +31,7 @@ var i = p, e = b, d = v, l = f, O = y, u = {}, c = [
|
|
|
31
31
|
];
|
|
32
32
|
u.forwardGeocode = function(r) {
|
|
33
33
|
r.mode = r.mode || "standard", e.assertShape(
|
|
34
|
-
|
|
34
|
+
s(r.mode === "standard" ? { query: e.required(e.string) } : {}, {
|
|
35
35
|
mode: e.oneOf("standard", "structured"),
|
|
36
36
|
countries: r.mode === "standard" ? e.arrayOf(e.string) : e.string,
|
|
37
37
|
proximity: e.oneOf(e.coordinates, "ip"),
|
|
@@ -56,7 +56,7 @@ u.forwardGeocode = function(r) {
|
|
|
56
56
|
})
|
|
57
57
|
)(r);
|
|
58
58
|
var t = l(
|
|
59
|
-
|
|
59
|
+
s(
|
|
60
60
|
r.mode === "standard" ? { q: r.query } : d(r, [
|
|
61
61
|
"address_line1",
|
|
62
62
|
"address_number",
|
|
@@ -100,7 +100,7 @@ u.reverseGeocode = function(r) {
|
|
|
100
100
|
permanent: e.boolean
|
|
101
101
|
})(r);
|
|
102
102
|
var t = l(
|
|
103
|
-
|
|
103
|
+
s(
|
|
104
104
|
{ country: r.countries },
|
|
105
105
|
d(r, [
|
|
106
106
|
"longitude",
|
|
@@ -125,5 +125,5 @@ const q = /* @__PURE__ */ m(g), S = /* @__PURE__ */ h({
|
|
|
125
125
|
default: q
|
|
126
126
|
}, [g]);
|
|
127
127
|
export {
|
|
128
|
-
S as
|
|
128
|
+
S as geocodingV6
|
|
129
129
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as l } from "../_commonjsHelpers.js";
|
|
2
|
+
import { immutable as y } from "./browser-client.js";
|
|
3
|
+
import { createServiceFactory_1 as g, validator as b, pick_1 as f } from "./create-service-factory.js";
|
|
4
|
+
import { stringifyBooleans as v } from "./stringify-booleans.js";
|
|
5
5
|
function O(r, o) {
|
|
6
6
|
for (var i = 0; i < o.length; i++) {
|
|
7
7
|
const t = o[i];
|
|
@@ -18,7 +18,7 @@ function O(r, o) {
|
|
|
18
18
|
}
|
|
19
19
|
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
20
20
|
}
|
|
21
|
-
var c = y, e = b, n = f,
|
|
21
|
+
var c = y, e = b, n = f, m = v, x = g, u = {}, p = [
|
|
22
22
|
"country",
|
|
23
23
|
"region",
|
|
24
24
|
"postcode",
|
|
@@ -36,7 +36,7 @@ u.forwardGeocode = function(r) {
|
|
|
36
36
|
mode: e.oneOf("mapbox.places", "mapbox.places-permanent"),
|
|
37
37
|
countries: e.arrayOf(e.string),
|
|
38
38
|
proximity: e.oneOf(e.coordinates, "ip"),
|
|
39
|
-
types: e.arrayOf(e.oneOf(
|
|
39
|
+
types: e.arrayOf(e.oneOf(p)),
|
|
40
40
|
autocomplete: e.boolean,
|
|
41
41
|
bbox: e.arrayOf(e.number),
|
|
42
42
|
limit: e.number,
|
|
@@ -45,7 +45,7 @@ u.forwardGeocode = function(r) {
|
|
|
45
45
|
fuzzyMatch: e.boolean,
|
|
46
46
|
worldview: e.string
|
|
47
47
|
})(r), r.mode = r.mode || "mapbox.places";
|
|
48
|
-
var o =
|
|
48
|
+
var o = m(
|
|
49
49
|
c(
|
|
50
50
|
{ country: r.countries },
|
|
51
51
|
n(r, [
|
|
@@ -73,7 +73,7 @@ u.reverseGeocode = function(r) {
|
|
|
73
73
|
query: e.required(e.coordinates),
|
|
74
74
|
mode: e.oneOf("mapbox.places", "mapbox.places-permanent"),
|
|
75
75
|
countries: e.arrayOf(e.string),
|
|
76
|
-
types: e.arrayOf(e.oneOf(
|
|
76
|
+
types: e.arrayOf(e.oneOf(p)),
|
|
77
77
|
bbox: e.arrayOf(e.number),
|
|
78
78
|
limit: e.number,
|
|
79
79
|
language: e.arrayOf(e.string),
|
|
@@ -81,7 +81,7 @@ u.reverseGeocode = function(r) {
|
|
|
81
81
|
routing: e.boolean,
|
|
82
82
|
worldview: e.string
|
|
83
83
|
})(r), r.mode = r.mode || "mapbox.places";
|
|
84
|
-
var o =
|
|
84
|
+
var o = m(
|
|
85
85
|
c(
|
|
86
86
|
{ country: r.countries },
|
|
87
87
|
n(r, [
|
|
@@ -109,5 +109,5 @@ const q = /* @__PURE__ */ l(d), S = /* @__PURE__ */ O({
|
|
|
109
109
|
default: q
|
|
110
110
|
}, [d]);
|
|
111
111
|
export {
|
|
112
|
-
S as
|
|
112
|
+
S as geocoding
|
|
113
113
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as m } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as d, validator as c } from "./create-service-factory.js";
|
|
3
|
+
import { objectClean_1 as p } from "./object-clean.js";
|
|
4
|
+
import { stringifyBooleans as v } from "./stringify-booleans.js";
|
|
5
5
|
function h(e, a) {
|
|
6
6
|
for (var s = 0; s < a.length; s++) {
|
|
7
7
|
const t = a[s];
|
|
@@ -18,7 +18,7 @@ function h(e, a) {
|
|
|
18
18
|
}
|
|
19
19
|
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
20
20
|
}
|
|
21
|
-
var r = c,
|
|
21
|
+
var r = c, y = p, b = v, f = d, u = {};
|
|
22
22
|
u.getContours = function(e) {
|
|
23
23
|
if (r.assertShape({
|
|
24
24
|
profile: r.oneOf("driving", "driving-traffic", "walking", "cycling"),
|
|
@@ -54,7 +54,7 @@ u.getContours = function(e) {
|
|
|
54
54
|
e.colors && (e.colors = e.colors.map(function(n) {
|
|
55
55
|
return n[0] === "#" ? n.substring(1) : n;
|
|
56
56
|
}));
|
|
57
|
-
var i =
|
|
57
|
+
var i = b({
|
|
58
58
|
contours_minutes: e.minutes ? e.minutes.join(",") : null,
|
|
59
59
|
contours_meters: e.meters ? e.meters.join(",") : null,
|
|
60
60
|
contours_colors: e.colors ? e.colors.join(",") : null,
|
|
@@ -69,7 +69,7 @@ u.getContours = function(e) {
|
|
|
69
69
|
profile: e.profile,
|
|
70
70
|
coordinates: e.coordinates.join(",")
|
|
71
71
|
},
|
|
72
|
-
query:
|
|
72
|
+
query: y(i)
|
|
73
73
|
});
|
|
74
74
|
};
|
|
75
75
|
var l = f(u);
|
|
@@ -78,5 +78,5 @@ const w = /* @__PURE__ */ m(l), z = /* @__PURE__ */ h({
|
|
|
78
78
|
default: w
|
|
79
79
|
}, [l]);
|
|
80
80
|
export {
|
|
81
|
-
z as
|
|
81
|
+
z as isochrone
|
|
82
82
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as l } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as u, validator as c } from "./create-service-factory.js";
|
|
3
|
+
import { objectClean_1 as m } from "./object-clean.js";
|
|
4
|
+
import { urlUtils as y } from "./browser-client.js";
|
|
5
|
+
import { stringifyBooleans as d } from "./stringify-booleans.js";
|
|
6
6
|
function f(i, o) {
|
|
7
7
|
for (var t = 0; t < o.length; t++) {
|
|
8
8
|
const n = o[t];
|
|
@@ -19,7 +19,7 @@ function f(i, o) {
|
|
|
19
19
|
}
|
|
20
20
|
return Object.freeze(Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }));
|
|
21
21
|
}
|
|
22
|
-
var a = c, h =
|
|
22
|
+
var a = c, h = u, g = m, v = y, w = d, s = {};
|
|
23
23
|
s.getMatch = function(i) {
|
|
24
24
|
a.assertShape({
|
|
25
25
|
points: a.required(
|
|
@@ -101,10 +101,10 @@ s.getMatch = function(i) {
|
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
103
|
var p = h(s);
|
|
104
|
-
const O = /* @__PURE__ */
|
|
104
|
+
const O = /* @__PURE__ */ l(p), N = /* @__PURE__ */ f({
|
|
105
105
|
__proto__: null,
|
|
106
106
|
default: O
|
|
107
107
|
}, [p]);
|
|
108
108
|
export {
|
|
109
|
-
N as
|
|
109
|
+
N as mapMatching
|
|
110
110
|
};
|
package/lib/mapbox-sdk/matrix.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as c } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as u, validator as l } from "./create-service-factory.js";
|
|
3
|
+
import { objectClean_1 as d } from "./object-clean.js";
|
|
4
4
|
function f(r, n) {
|
|
5
5
|
for (var a = 0; a < n.length; a++) {
|
|
6
6
|
const o = n[a];
|
|
@@ -68,5 +68,5 @@ const m = /* @__PURE__ */ c(p), b = /* @__PURE__ */ f({
|
|
|
68
68
|
default: m
|
|
69
69
|
}, [p]);
|
|
70
70
|
export {
|
|
71
|
-
b as
|
|
71
|
+
b as matrix
|
|
72
72
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var
|
|
3
|
-
function
|
|
4
|
-
return
|
|
1
|
+
import { pick_1 as t } from "./create-service-factory.js";
|
|
2
|
+
var e = t;
|
|
3
|
+
function o(n) {
|
|
4
|
+
return e(n, function(c, r) {
|
|
5
5
|
return r != null;
|
|
6
6
|
});
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var u = o;
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
u as objectClean_1
|
|
11
11
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as d } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as f, validator as c } from "./create-service-factory.js";
|
|
3
|
+
import { objectClean_1 as l } from "./object-clean.js";
|
|
4
|
+
import { stringifyBooleans as p } from "./stringify-booleans.js";
|
|
5
5
|
function m(i, t) {
|
|
6
6
|
for (var n = 0; n < t.length; n++) {
|
|
7
|
-
const
|
|
8
|
-
if (typeof
|
|
9
|
-
for (const r in
|
|
7
|
+
const a = t[n];
|
|
8
|
+
if (typeof a != "string" && !Array.isArray(a)) {
|
|
9
|
+
for (const r in a)
|
|
10
10
|
if (r !== "default" && !(r in i)) {
|
|
11
|
-
const
|
|
12
|
-
|
|
11
|
+
const o = Object.getOwnPropertyDescriptor(a, r);
|
|
12
|
+
o && Object.defineProperty(i, r, o.get ? o : {
|
|
13
13
|
enumerable: !0,
|
|
14
|
-
get: () =>
|
|
14
|
+
get: () => a[r]
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
return Object.freeze(Object.defineProperty(i, Symbol.toStringTag, { value: "Module" }));
|
|
20
20
|
}
|
|
21
|
-
var e =
|
|
21
|
+
var e = c, b = f, h = l, g = p, s = {};
|
|
22
22
|
s.getOptimization = function(i) {
|
|
23
23
|
e.assertShape({
|
|
24
24
|
profile: e.oneOf("driving", "driving-traffic", "walking", "cycling"),
|
|
@@ -61,19 +61,19 @@ s.getOptimization = function(i) {
|
|
|
61
61
|
i.waypoints.forEach(function(r) {
|
|
62
62
|
t.coordinates.push(
|
|
63
63
|
r.coordinates[0] + "," + r.coordinates[1]
|
|
64
|
-
), ["bearing"].forEach(function(
|
|
65
|
-
r.hasOwnProperty(
|
|
66
|
-
}), ["approach", "bearing", "radius"].forEach(function(
|
|
67
|
-
r.hasOwnProperty(
|
|
64
|
+
), ["bearing"].forEach(function(o) {
|
|
65
|
+
r.hasOwnProperty(o) && r[o] != null && (r[o] = r[o].join(","));
|
|
66
|
+
}), ["approach", "bearing", "radius"].forEach(function(o) {
|
|
67
|
+
r.hasOwnProperty(o) && r[o] != null ? t[o].push(r[o]) : t[o].push("");
|
|
68
68
|
});
|
|
69
69
|
}), i.distributions && i.distributions.forEach(function(r) {
|
|
70
70
|
t.distributions.push(r.pickup + "," + r.dropoff);
|
|
71
71
|
}), ["approach", "bearing", "radius", "distributions"].forEach(function(r) {
|
|
72
|
-
t[r].every(function(
|
|
73
|
-
return
|
|
72
|
+
t[r].every(function(o) {
|
|
73
|
+
return o === "";
|
|
74
74
|
}) ? delete t[r] : t[r] = t[r].join(";");
|
|
75
75
|
});
|
|
76
|
-
var
|
|
76
|
+
var a = g({
|
|
77
77
|
geometries: i.geometries,
|
|
78
78
|
language: i.language,
|
|
79
79
|
overview: i.overview,
|
|
@@ -93,14 +93,14 @@ s.getOptimization = function(i) {
|
|
|
93
93
|
profile: i.profile || "driving",
|
|
94
94
|
coordinates: t.coordinates.join(";")
|
|
95
95
|
},
|
|
96
|
-
query: h(
|
|
96
|
+
query: h(a)
|
|
97
97
|
});
|
|
98
98
|
};
|
|
99
99
|
var u = b(s);
|
|
100
|
-
const
|
|
100
|
+
const v = /* @__PURE__ */ d(u), E = /* @__PURE__ */ m({
|
|
101
101
|
__proto__: null,
|
|
102
|
-
default:
|
|
102
|
+
default: v
|
|
103
103
|
}, [u]);
|
|
104
104
|
export {
|
|
105
|
-
E as
|
|
105
|
+
E as optimization
|
|
106
106
|
};
|
package/lib/mapbox-sdk/static.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as C } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as S, validator as x, pick_1 as _ } from "./create-service-factory.js";
|
|
3
3
|
function k(e, n) {
|
|
4
4
|
for (var s = 0; s < n.length; s++) {
|
|
5
5
|
const d = n[s];
|
|
@@ -193,5 +193,5 @@ const R = /* @__PURE__ */ C(w), L = /* @__PURE__ */ k({
|
|
|
193
193
|
default: R
|
|
194
194
|
}, [w]);
|
|
195
195
|
export {
|
|
196
|
-
L as
|
|
196
|
+
L as _static
|
|
197
197
|
};
|
|
@@ -4,12 +4,12 @@ function e(t, o) {
|
|
|
4
4
|
}, {});
|
|
5
5
|
}
|
|
6
6
|
var i = e, c = i;
|
|
7
|
-
function
|
|
7
|
+
function f(t) {
|
|
8
8
|
return c(t, function(o, n) {
|
|
9
9
|
return typeof n == "boolean" ? JSON.stringify(n) : n;
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var a = f;
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
a as stringifyBooleans
|
|
15
15
|
};
|
package/lib/mapbox-sdk/styles.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as y } from "../_commonjsHelpers.js";
|
|
2
|
+
import { immutable as p } from "./browser-client.js";
|
|
3
|
+
import { createServiceFactory_1 as m, validator as h, pick_1 as I } from "./create-service-factory.js";
|
|
4
4
|
function f(t, r) {
|
|
5
5
|
for (var a = 0; a < r.length; a++) {
|
|
6
6
|
const d = r[a];
|
|
7
7
|
if (typeof d != "string" && !Array.isArray(d)) {
|
|
8
8
|
for (const o in d)
|
|
9
9
|
if (o !== "default" && !(o in t)) {
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const l = Object.getOwnPropertyDescriptor(d, o);
|
|
11
|
+
l && Object.defineProperty(t, o, l.get ? l : {
|
|
12
12
|
enumerable: !0,
|
|
13
13
|
get: () => d[o]
|
|
14
14
|
});
|
|
@@ -17,7 +17,7 @@ function f(t, r) {
|
|
|
17
17
|
}
|
|
18
18
|
return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
|
|
19
19
|
}
|
|
20
|
-
var
|
|
20
|
+
var i = p, e = h, n = I, b = m, s = {};
|
|
21
21
|
s.getStyle = function(t) {
|
|
22
22
|
e.assertShape({
|
|
23
23
|
styleId: e.required(e.string),
|
|
@@ -123,7 +123,7 @@ s.getStyleSprite = function(t) {
|
|
|
123
123
|
})(t);
|
|
124
124
|
var r = t.format || "json", a = "/sprite" + (t.highRes ? "@2x" : "") + "." + r, d = {};
|
|
125
125
|
return t.fresh && (d.fresh = "true"), this.client.createRequest(
|
|
126
|
-
|
|
126
|
+
i(
|
|
127
127
|
{
|
|
128
128
|
method: "GET",
|
|
129
129
|
path: "/styles/v1/:ownerId/:styleId" + (t.draft ? "/draft" : "") + a,
|
|
@@ -145,7 +145,7 @@ s.getFontGlyphRange = function(t) {
|
|
|
145
145
|
return this.client.createRequest({
|
|
146
146
|
method: "GET",
|
|
147
147
|
path: "/fonts/v1/:ownerId/:fontList/:fileName",
|
|
148
|
-
params:
|
|
148
|
+
params: i(n(t, ["ownerId"]), {
|
|
149
149
|
fontList: [].concat(t.fonts),
|
|
150
150
|
fileName: r
|
|
151
151
|
}),
|
|
@@ -172,10 +172,10 @@ s.getEmbeddableHtml = function(t) {
|
|
|
172
172
|
});
|
|
173
173
|
};
|
|
174
174
|
var u = b(s);
|
|
175
|
-
const c = /* @__PURE__ */ y(u),
|
|
175
|
+
const c = /* @__PURE__ */ y(u), v = /* @__PURE__ */ f({
|
|
176
176
|
__proto__: null,
|
|
177
177
|
default: c
|
|
178
178
|
}, [u]);
|
|
179
179
|
export {
|
|
180
|
-
|
|
180
|
+
v as styles
|
|
181
181
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as d,
|
|
1
|
+
import { getDefaultExportFromCjs as l } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as c, validator as d, pick_1 as p } from "./create-service-factory.js";
|
|
3
3
|
function y(r, s) {
|
|
4
4
|
for (var o = 0; o < s.length; o++) {
|
|
5
5
|
const t = s[o];
|
|
@@ -16,7 +16,7 @@ function y(r, s) {
|
|
|
16
16
|
}
|
|
17
17
|
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
18
18
|
}
|
|
19
|
-
var e =
|
|
19
|
+
var e = d, m = p, f = c, n = {};
|
|
20
20
|
n.listFeatures = function(r) {
|
|
21
21
|
return e.assertShape({
|
|
22
22
|
mapIds: e.required(e.arrayOf(e.string)),
|
|
@@ -37,10 +37,10 @@ n.listFeatures = function(r) {
|
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
var u = f(n);
|
|
40
|
-
const g = /* @__PURE__ */
|
|
40
|
+
const g = /* @__PURE__ */ l(u), b = /* @__PURE__ */ y({
|
|
41
41
|
__proto__: null,
|
|
42
42
|
default: g
|
|
43
43
|
}, [u]);
|
|
44
44
|
export {
|
|
45
|
-
b as
|
|
45
|
+
b as tilequery
|
|
46
46
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as p } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as o, validator as c, pick_1 as h } from "./create-service-factory.js";
|
|
3
3
|
function m(t, l) {
|
|
4
4
|
for (var n = 0; n < l.length; n++) {
|
|
5
5
|
const i = l[n];
|
|
@@ -210,5 +210,5 @@ const q = /* @__PURE__ */ p(u), T = /* @__PURE__ */ m({
|
|
|
210
210
|
default: q
|
|
211
211
|
}, [u]);
|
|
212
212
|
export {
|
|
213
|
-
T as
|
|
213
|
+
T as tilesets
|
|
214
214
|
};
|
package/lib/mapbox-sdk/tokens.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as i } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as u, validator as c, pick_1 as w } from "./create-service-factory.js";
|
|
3
3
|
function h(e, t) {
|
|
4
4
|
for (var l = 0; l < t.length; l++) {
|
|
5
5
|
const a = t[l];
|
|
@@ -107,5 +107,5 @@ const y = /* @__PURE__ */ i(p), I = /* @__PURE__ */ h({
|
|
|
107
107
|
default: y
|
|
108
108
|
}, [p]);
|
|
109
109
|
export {
|
|
110
|
-
I as
|
|
110
|
+
I as tokens
|
|
111
111
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getDefaultExportFromCjs as i } from "../_commonjsHelpers.js";
|
|
2
|
+
import { createServiceFactory_1 as n, validator as u, pick_1 as m } from "./create-service-factory.js";
|
|
3
3
|
function c(e, l) {
|
|
4
4
|
for (var o = 0; o < l.length; o++) {
|
|
5
5
|
const a = l[o];
|
|
@@ -73,5 +73,5 @@ const I = /* @__PURE__ */ i(p), b = /* @__PURE__ */ c({
|
|
|
73
73
|
default: I
|
|
74
74
|
}, [p]);
|
|
75
75
|
export {
|
|
76
|
-
b as
|
|
76
|
+
b as uploads
|
|
77
77
|
};
|
package/lib/mapbox-sdk.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
function
|
|
4
|
-
for (var o = 0; o <
|
|
5
|
-
const e =
|
|
1
|
+
import { getDefaultExportFromCjs as f } from "./_commonjsHelpers.js";
|
|
2
|
+
import { browserClient as c } from "./mapbox-sdk/browser-client.js";
|
|
3
|
+
function s(t, i) {
|
|
4
|
+
for (var o = 0; o < i.length; o++) {
|
|
5
|
+
const e = i[o];
|
|
6
6
|
if (typeof e != "string" && !Array.isArray(e)) {
|
|
7
7
|
for (const r in e)
|
|
8
8
|
if (r !== "default" && !(r in t)) {
|
|
@@ -16,11 +16,14 @@ function c(t, a) {
|
|
|
16
16
|
}
|
|
17
17
|
return Object.freeze(Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }));
|
|
18
18
|
}
|
|
19
|
-
var l =
|
|
20
|
-
const p = /* @__PURE__ */ f(
|
|
19
|
+
var l = c, a = l;
|
|
20
|
+
const p = /* @__PURE__ */ f(a), g = /* @__PURE__ */ s({
|
|
21
21
|
__proto__: null,
|
|
22
22
|
default: p
|
|
23
|
-
}, [
|
|
23
|
+
}, [a]);
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
g as index
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
g as default
|
|
26
29
|
};
|
package/lib/providers/mapbox.js
CHANGED
|
@@ -120,29 +120,29 @@ class D {
|
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
122
|
async loadMapbox() {
|
|
123
|
-
const e = await import("../mapbox-gl.js").then((s) => s.
|
|
123
|
+
const e = await import("../mapbox-gl.js").then((s) => s.mapboxGl);
|
|
124
124
|
this.mapboxgl = e;
|
|
125
125
|
}
|
|
126
126
|
get servicesLoader() {
|
|
127
127
|
return {
|
|
128
|
-
datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.
|
|
129
|
-
directions: () => import("../mapbox-sdk/directions.js").then((e) => e.
|
|
130
|
-
geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.
|
|
131
|
-
geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.
|
|
132
|
-
mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.
|
|
133
|
-
matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.
|
|
134
|
-
optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.
|
|
135
|
-
static: () => import("../mapbox-sdk/static.js").then((e) => e.
|
|
136
|
-
styles: () => import("../mapbox-sdk/styles.js").then((e) => e.
|
|
137
|
-
tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.
|
|
138
|
-
tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.
|
|
139
|
-
tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.
|
|
140
|
-
uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.
|
|
141
|
-
isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.
|
|
128
|
+
datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.datasets),
|
|
129
|
+
directions: () => import("../mapbox-sdk/directions.js").then((e) => e.directions),
|
|
130
|
+
geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.geocoding),
|
|
131
|
+
geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.geocodingV6),
|
|
132
|
+
mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.mapMatching),
|
|
133
|
+
matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.matrix),
|
|
134
|
+
optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.optimization),
|
|
135
|
+
static: () => import("../mapbox-sdk/static.js").then((e) => e._static),
|
|
136
|
+
styles: () => import("../mapbox-sdk/styles.js").then((e) => e.styles),
|
|
137
|
+
tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.tilequery),
|
|
138
|
+
tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.tilesets),
|
|
139
|
+
tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.tokens),
|
|
140
|
+
uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.uploads),
|
|
141
|
+
isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.isochrone)
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
async loadMapboxSDK() {
|
|
145
|
-
const s = (await import("../mapbox-sdk.js").then((o) => o.
|
|
145
|
+
const s = (await import("../mapbox-sdk.js").then((o) => o.index)).default({ accessToken: this.apiKey }), a = await Promise.all(this.services.map((o) => this.servicesLoader[o]().then((r) => r.default(s))));
|
|
146
146
|
for (const [o, r] of this.services.entries())
|
|
147
147
|
this.sdk[r] = a[o];
|
|
148
148
|
}
|
|
@@ -120,29 +120,29 @@ class O {
|
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
122
|
async loadMapbox() {
|
|
123
|
-
const e = await import("../mapbox-gl.js").then((s) => s.
|
|
123
|
+
const e = await import("../mapbox-gl.js").then((s) => s.mapboxGl);
|
|
124
124
|
this.mapboxgl = e;
|
|
125
125
|
}
|
|
126
126
|
get servicesLoader() {
|
|
127
127
|
return {
|
|
128
|
-
datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.
|
|
129
|
-
directions: () => import("../mapbox-sdk/directions.js").then((e) => e.
|
|
130
|
-
geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.
|
|
131
|
-
geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.
|
|
132
|
-
mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.
|
|
133
|
-
matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.
|
|
134
|
-
optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.
|
|
135
|
-
static: () => import("../mapbox-sdk/static.js").then((e) => e.
|
|
136
|
-
styles: () => import("../mapbox-sdk/styles.js").then((e) => e.
|
|
137
|
-
tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.
|
|
138
|
-
tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.
|
|
139
|
-
tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.
|
|
140
|
-
uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.
|
|
141
|
-
isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.
|
|
128
|
+
datasets: () => import("../mapbox-sdk/datasets.js").then((e) => e.datasets),
|
|
129
|
+
directions: () => import("../mapbox-sdk/directions.js").then((e) => e.directions),
|
|
130
|
+
geocoding: () => import("../mapbox-sdk/geocoding.js").then((e) => e.geocoding),
|
|
131
|
+
geocodingV6: () => import("../mapbox-sdk/geocoding-v6.js").then((e) => e.geocodingV6),
|
|
132
|
+
mapMatching: () => import("../mapbox-sdk/map-matching.js").then((e) => e.mapMatching),
|
|
133
|
+
matrix: () => import("../mapbox-sdk/matrix.js").then((e) => e.matrix),
|
|
134
|
+
optimization: () => import("../mapbox-sdk/optimization.js").then((e) => e.optimization),
|
|
135
|
+
static: () => import("../mapbox-sdk/static.js").then((e) => e._static),
|
|
136
|
+
styles: () => import("../mapbox-sdk/styles.js").then((e) => e.styles),
|
|
137
|
+
tilequery: () => import("../mapbox-sdk/tilequery.js").then((e) => e.tilequery),
|
|
138
|
+
tilesets: () => import("../mapbox-sdk/tilesets.js").then((e) => e.tilesets),
|
|
139
|
+
tokens: () => import("../mapbox-sdk/tokens.js").then((e) => e.tokens),
|
|
140
|
+
uploads: () => import("../mapbox-sdk/uploads.js").then((e) => e.uploads),
|
|
141
|
+
isochrone: () => import("../mapbox-sdk/isochrone.js").then((e) => e.isochrone)
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
async loadMapboxSDK() {
|
|
145
|
-
const s = (await import("../mapbox-sdk.js").then((o) => o.
|
|
145
|
+
const s = (await import("../mapbox-sdk.js").then((o) => o.index)).default({ accessToken: this.apiKey }), a = await Promise.all(this.services.map((o) => this.servicesLoader[o]().then((r) => r.default(s))));
|
|
146
146
|
for (const [o, r] of this.services.entries())
|
|
147
147
|
this.sdk[r] = a[o];
|
|
148
148
|
}
|
package/lib/searoute.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { featureEach as u, lineString as d, length as g, distance as m, pointToLineDistance as F, coordEach as S, rhumbDistance as L, point as f } from "@turf/turf";
|
|
2
2
|
import l from "geojson-path-finder";
|
|
3
3
|
const h = "FeatureCollection", w = "marnet_densified_", x = {
|
|
4
4
|
type: "name",
|
|
@@ -77404,7 +77404,7 @@ function E() {
|
|
|
77404
77404
|
}
|
|
77405
77405
|
function M(e, t) {
|
|
77406
77406
|
const r = e[0], p = t[0];
|
|
77407
|
-
return r === 180 && p === -180 || r === -180 && p === 180 ? 1 :
|
|
77407
|
+
return r === 180 && p === -180 || r === -180 && p === 180 ? 1 : m(e, t);
|
|
77408
77408
|
}
|
|
77409
77409
|
const T = new l(y, { weight: M });
|
|
77410
77410
|
function I(e, t, r = "nm") {
|
|
@@ -77422,15 +77422,15 @@ function c(e) {
|
|
|
77422
77422
|
u(y, function(n, i) {
|
|
77423
77423
|
const s = n.geometry.coordinates;
|
|
77424
77424
|
if (!k(s[0], s[1])) {
|
|
77425
|
-
const a =
|
|
77425
|
+
const a = F(e, n, { units: "kilometers" });
|
|
77426
77426
|
a < r && (r = a, t = i);
|
|
77427
77427
|
}
|
|
77428
77428
|
});
|
|
77429
77429
|
let p = null, o = null;
|
|
77430
|
-
return
|
|
77431
|
-
const i =
|
|
77430
|
+
return S(y.features[t], function(n) {
|
|
77431
|
+
const i = L(e, n);
|
|
77432
77432
|
p ? i < p && (p = i, o = n) : (p = i, o = n);
|
|
77433
|
-
}),
|
|
77433
|
+
}), f(o);
|
|
77434
77434
|
}
|
|
77435
77435
|
export {
|
|
77436
77436
|
I as default
|
package/lib/yappkit-map.js
CHANGED
|
@@ -121,29 +121,29 @@ class A {
|
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
async loadMapbox() {
|
|
124
|
-
const e = await import("./mapbox-gl.js").then((a) => a.
|
|
124
|
+
const e = await import("./mapbox-gl.js").then((a) => a.mapboxGl);
|
|
125
125
|
this.mapboxgl = e;
|
|
126
126
|
}
|
|
127
127
|
get servicesLoader() {
|
|
128
128
|
return {
|
|
129
|
-
datasets: () => import("./mapbox-sdk/datasets.js").then((e) => e.
|
|
130
|
-
directions: () => import("./mapbox-sdk/directions.js").then((e) => e.
|
|
131
|
-
geocoding: () => import("./mapbox-sdk/geocoding.js").then((e) => e.
|
|
132
|
-
geocodingV6: () => import("./mapbox-sdk/geocoding-v6.js").then((e) => e.
|
|
133
|
-
mapMatching: () => import("./mapbox-sdk/map-matching.js").then((e) => e.
|
|
134
|
-
matrix: () => import("./mapbox-sdk/matrix.js").then((e) => e.
|
|
135
|
-
optimization: () => import("./mapbox-sdk/optimization.js").then((e) => e.
|
|
136
|
-
static: () => import("./mapbox-sdk/static.js").then((e) => e.
|
|
137
|
-
styles: () => import("./mapbox-sdk/styles.js").then((e) => e.
|
|
138
|
-
tilequery: () => import("./mapbox-sdk/tilequery.js").then((e) => e.
|
|
139
|
-
tilesets: () => import("./mapbox-sdk/tilesets.js").then((e) => e.
|
|
140
|
-
tokens: () => import("./mapbox-sdk/tokens.js").then((e) => e.
|
|
141
|
-
uploads: () => import("./mapbox-sdk/uploads.js").then((e) => e.
|
|
142
|
-
isochrone: () => import("./mapbox-sdk/isochrone.js").then((e) => e.
|
|
129
|
+
datasets: () => import("./mapbox-sdk/datasets.js").then((e) => e.datasets),
|
|
130
|
+
directions: () => import("./mapbox-sdk/directions.js").then((e) => e.directions),
|
|
131
|
+
geocoding: () => import("./mapbox-sdk/geocoding.js").then((e) => e.geocoding),
|
|
132
|
+
geocodingV6: () => import("./mapbox-sdk/geocoding-v6.js").then((e) => e.geocodingV6),
|
|
133
|
+
mapMatching: () => import("./mapbox-sdk/map-matching.js").then((e) => e.mapMatching),
|
|
134
|
+
matrix: () => import("./mapbox-sdk/matrix.js").then((e) => e.matrix),
|
|
135
|
+
optimization: () => import("./mapbox-sdk/optimization.js").then((e) => e.optimization),
|
|
136
|
+
static: () => import("./mapbox-sdk/static.js").then((e) => e._static),
|
|
137
|
+
styles: () => import("./mapbox-sdk/styles.js").then((e) => e.styles),
|
|
138
|
+
tilequery: () => import("./mapbox-sdk/tilequery.js").then((e) => e.tilequery),
|
|
139
|
+
tilesets: () => import("./mapbox-sdk/tilesets.js").then((e) => e.tilesets),
|
|
140
|
+
tokens: () => import("./mapbox-sdk/tokens.js").then((e) => e.tokens),
|
|
141
|
+
uploads: () => import("./mapbox-sdk/uploads.js").then((e) => e.uploads),
|
|
142
|
+
isochrone: () => import("./mapbox-sdk/isochrone.js").then((e) => e.isochrone)
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
145
|
async loadMapboxSDK() {
|
|
146
|
-
const a = (await import("./mapbox-sdk.js").then((s) => s.
|
|
146
|
+
const a = (await import("./mapbox-sdk.js").then((s) => s.index)).default({ accessToken: this.apiKey }), t = await Promise.all(this.services.map((s) => this.servicesLoader[s]().then((r) => r.default(a))));
|
|
147
147
|
for (const [s, r] of this.services.entries())
|
|
148
148
|
this.sdk[r] = t[s];
|
|
149
149
|
}
|
|
@@ -200,7 +200,7 @@ class R {
|
|
|
200
200
|
return t.overlay = new a(e), t.overlay.setMap(this.map), t;
|
|
201
201
|
}
|
|
202
202
|
}
|
|
203
|
-
class
|
|
203
|
+
class x {
|
|
204
204
|
constructor(e) {
|
|
205
205
|
if (this.apiKey = e.apiKey, !this.apiKey)
|
|
206
206
|
throw new Error("apiKey is required");
|
|
@@ -355,7 +355,7 @@ class V {
|
|
|
355
355
|
}, a);
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
class
|
|
358
|
+
class O {
|
|
359
359
|
constructor(e) {
|
|
360
360
|
this.deckgl = null;
|
|
361
361
|
}
|
|
@@ -434,16 +434,15 @@ async function I({ origin: l, destination: e, includeBoundaries: a = !1 }) {
|
|
|
434
434
|
return a && (s.geometry.coordinates.unshift(l), s.geometry.coordinates.push(e)), s.geometry.coordinates = b(s.geometry.coordinates), s;
|
|
435
435
|
}
|
|
436
436
|
const U = {
|
|
437
|
-
searoute: async (...l) => (await import("./searoute.js")).default(...l),
|
|
438
437
|
getAirRoute: F,
|
|
439
438
|
getWaterRoute: I,
|
|
440
439
|
normalizeRoute: b
|
|
441
440
|
}, q = {
|
|
442
441
|
mapbox: A,
|
|
443
|
-
google:
|
|
444
|
-
"google-maps":
|
|
445
|
-
deckgl:
|
|
446
|
-
"deck-gl":
|
|
442
|
+
google: x,
|
|
443
|
+
"google-maps": x,
|
|
444
|
+
deckgl: O,
|
|
445
|
+
"deck-gl": O
|
|
447
446
|
};
|
|
448
447
|
class z {
|
|
449
448
|
constructor(e = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yappkit/front-module-map",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "@yappkit/front module for map",
|
|
5
5
|
"module": "./lib/yappkit-map.js",
|
|
6
6
|
"main": "./lib/yappkit-map.js",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"./mapboxsdk": {
|
|
19
19
|
"import": "./lib/mapbox-sdk.js"
|
|
20
20
|
},
|
|
21
|
+
"./searoute": {
|
|
22
|
+
"import": "./lib/searoute.js"
|
|
23
|
+
},
|
|
21
24
|
"./deckgl": {
|
|
22
25
|
"import": "./lib/providers/deckgl.js"
|
|
23
26
|
},
|