@maptiler/geocoding-control 0.0.32 → 0.0.36
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/README.md +4 -4
- package/dist/leaflet.js +315 -312
- package/dist/leaflet.umd.cjs +1 -1
- package/dist/lib/LeafletGeocodingControl.d.ts +1 -1
- package/dist/lib/MaplibreglGeocodingControl.d.ts +1 -1
- package/dist/lib/maplibreglMapController.d.ts +4 -0
- package/dist/lib/types.d.ts +3 -1
- package/dist/main.d.ts +1 -1
- package/dist/maplibregl.js +2046 -652
- package/dist/maplibregl.umd.cjs +22 -1
- package/dist/style.css +1 -1
- package/package.json +7 -4
- package/src/lib/GeocodingControl.svelte +44 -8
- package/src/lib/LeafletGeocodingControl.ts +1 -0
- package/src/lib/MaplibreglGeocodingControl.ts +3 -2
- package/src/lib/maplibreglMapController.ts +282 -0
- package/src/lib/types.ts +3 -1
- package/src/lib/maplibreMapController.ts +0 -149
package/dist/leaflet.js
CHANGED
|
@@ -2,13 +2,13 @@ var Ve = (t, e, n) => {
|
|
|
2
2
|
if (!e.has(t))
|
|
3
3
|
throw TypeError("Cannot " + n);
|
|
4
4
|
};
|
|
5
|
-
var Z = (t, e, n) => (Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t)),
|
|
5
|
+
var Z = (t, e, n) => (Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t)), je = (t, e, n) => {
|
|
6
6
|
if (e.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
9
|
-
},
|
|
9
|
+
}, Te = (t, e, n, l) => (Ve(t, e, "write to private field"), l ? l.call(t, n) : e.set(t, n), n);
|
|
10
10
|
import * as se from "leaflet";
|
|
11
|
-
function
|
|
11
|
+
function k() {
|
|
12
12
|
}
|
|
13
13
|
function wt(t, e) {
|
|
14
14
|
for (const n in e)
|
|
@@ -21,13 +21,13 @@ function $e(t) {
|
|
|
21
21
|
function Ge() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function ne(t) {
|
|
25
25
|
t.forEach($e);
|
|
26
26
|
}
|
|
27
27
|
function et(t) {
|
|
28
28
|
return typeof t == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function _e(t, e) {
|
|
31
31
|
return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
|
|
32
32
|
}
|
|
33
33
|
function vt(t) {
|
|
@@ -48,8 +48,8 @@ function Ct(t, e, n, l) {
|
|
|
48
48
|
if (e.dirty === void 0)
|
|
49
49
|
return r;
|
|
50
50
|
if (typeof r == "object") {
|
|
51
|
-
const c = [],
|
|
52
|
-
for (let i = 0; i <
|
|
51
|
+
const c = [], s = Math.max(e.dirty.length, r.length);
|
|
52
|
+
for (let i = 0; i < s; i += 1)
|
|
53
53
|
c[i] = e.dirty[i] | r[i];
|
|
54
54
|
return c;
|
|
55
55
|
}
|
|
@@ -59,8 +59,8 @@ function Ct(t, e, n, l) {
|
|
|
59
59
|
}
|
|
60
60
|
function Mt(t, e, n, l, r, c) {
|
|
61
61
|
if (r) {
|
|
62
|
-
const
|
|
63
|
-
t.p(
|
|
62
|
+
const s = tt(e, n, l, c);
|
|
63
|
+
t.p(s, r);
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
function Tt(t) {
|
|
@@ -84,26 +84,26 @@ function V(t, e, n) {
|
|
|
84
84
|
function H(t) {
|
|
85
85
|
t.parentNode.removeChild(t);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function zt(t, e) {
|
|
88
88
|
for (let n = 0; n < t.length; n += 1)
|
|
89
89
|
t[n] && t[n].d(e);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function B(t) {
|
|
92
92
|
return document.createElement(t);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function te(t) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", t);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function fe(t) {
|
|
98
98
|
return document.createTextNode(t);
|
|
99
99
|
}
|
|
100
100
|
function x() {
|
|
101
|
-
return
|
|
101
|
+
return fe(" ");
|
|
102
102
|
}
|
|
103
103
|
function Q(t, e, n, l) {
|
|
104
104
|
return t.addEventListener(e, n, l), () => t.removeEventListener(e, n, l);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Lt(t) {
|
|
107
107
|
return function(e) {
|
|
108
108
|
return e.preventDefault(), t.call(this, e);
|
|
109
109
|
};
|
|
@@ -111,10 +111,10 @@ function Et(t) {
|
|
|
111
111
|
function f(t, e, n) {
|
|
112
112
|
n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Et(t) {
|
|
115
115
|
return Array.from(t.childNodes);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ve(t, e) {
|
|
118
118
|
e = "" + e, t.wholeText !== e && (t.data = e);
|
|
119
119
|
}
|
|
120
120
|
function We(t, e) {
|
|
@@ -123,121 +123,121 @@ function We(t, e) {
|
|
|
123
123
|
function O(t, e, n) {
|
|
124
124
|
t.classList[n ? "add" : "remove"](e);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Rt(t, e, { bubbles: n = !1, cancelable: l = !1 } = {}) {
|
|
127
127
|
const r = document.createEvent("CustomEvent");
|
|
128
128
|
return r.initCustomEvent(t, n, l, e), r;
|
|
129
129
|
}
|
|
130
|
-
let
|
|
131
|
-
function
|
|
132
|
-
|
|
130
|
+
let ke;
|
|
131
|
+
function we(t) {
|
|
132
|
+
ke = t;
|
|
133
133
|
}
|
|
134
134
|
function nt() {
|
|
135
|
-
if (!
|
|
135
|
+
if (!ke)
|
|
136
136
|
throw new Error("Function called outside component initialization");
|
|
137
|
-
return
|
|
137
|
+
return ke;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function St(t) {
|
|
140
140
|
nt().$$.on_destroy.push(t);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function It() {
|
|
143
143
|
const t = nt();
|
|
144
144
|
return (e, n, { cancelable: l = !1 } = {}) => {
|
|
145
145
|
const r = t.$$.callbacks[e];
|
|
146
146
|
if (r) {
|
|
147
|
-
const c =
|
|
148
|
-
return r.slice().forEach((
|
|
149
|
-
|
|
147
|
+
const c = Rt(e, n, { cancelable: l });
|
|
148
|
+
return r.slice().forEach((s) => {
|
|
149
|
+
s.call(t, c);
|
|
150
150
|
}), !c.defaultPrevented;
|
|
151
151
|
}
|
|
152
152
|
return !0;
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
|
-
const
|
|
156
|
-
let
|
|
157
|
-
function
|
|
158
|
-
|
|
155
|
+
const pe = [], De = [], Le = [], Ze = [], Pt = Promise.resolve();
|
|
156
|
+
let Ne = !1;
|
|
157
|
+
function Bt() {
|
|
158
|
+
Ne || (Ne = !0, Pt.then(lt));
|
|
159
159
|
}
|
|
160
|
-
function
|
|
161
|
-
|
|
160
|
+
function qe(t) {
|
|
161
|
+
Le.push(t);
|
|
162
162
|
}
|
|
163
|
-
const
|
|
164
|
-
let
|
|
163
|
+
const Oe = /* @__PURE__ */ new Set();
|
|
164
|
+
let ze = 0;
|
|
165
165
|
function lt() {
|
|
166
|
-
const t =
|
|
166
|
+
const t = ke;
|
|
167
167
|
do {
|
|
168
|
-
for (;
|
|
169
|
-
const e =
|
|
170
|
-
|
|
168
|
+
for (; ze < pe.length; ) {
|
|
169
|
+
const e = pe[ze];
|
|
170
|
+
ze++, we(e), At(e.$$);
|
|
171
171
|
}
|
|
172
|
-
for (
|
|
173
|
-
|
|
174
|
-
for (let e = 0; e <
|
|
175
|
-
const n =
|
|
176
|
-
|
|
172
|
+
for (we(null), pe.length = 0, ze = 0; De.length; )
|
|
173
|
+
De.pop()();
|
|
174
|
+
for (let e = 0; e < Le.length; e += 1) {
|
|
175
|
+
const n = Le[e];
|
|
176
|
+
Oe.has(n) || (Oe.add(n), n());
|
|
177
177
|
}
|
|
178
|
-
|
|
179
|
-
} while (
|
|
178
|
+
Le.length = 0;
|
|
179
|
+
} while (pe.length);
|
|
180
180
|
for (; Ze.length; )
|
|
181
181
|
Ze.pop()();
|
|
182
|
-
|
|
182
|
+
Ne = !1, Oe.clear(), we(t);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function At(t) {
|
|
185
185
|
if (t.fragment !== null) {
|
|
186
|
-
t.update(),
|
|
186
|
+
t.update(), ne(t.before_update);
|
|
187
187
|
const e = t.dirty;
|
|
188
|
-
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(
|
|
188
|
+
t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(qe);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
const
|
|
192
|
-
let
|
|
193
|
-
function
|
|
194
|
-
|
|
191
|
+
const Ee = /* @__PURE__ */ new Set();
|
|
192
|
+
let ie;
|
|
193
|
+
function Re() {
|
|
194
|
+
ie = {
|
|
195
195
|
r: 0,
|
|
196
196
|
c: [],
|
|
197
|
-
p:
|
|
197
|
+
p: ie
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
|
|
200
|
+
function Se() {
|
|
201
|
+
ie.r || ne(ie.c), ie = ie.p;
|
|
202
202
|
}
|
|
203
203
|
function P(t, e) {
|
|
204
|
-
t && t.i && (
|
|
204
|
+
t && t.i && (Ee.delete(t), t.i(e));
|
|
205
205
|
}
|
|
206
206
|
function q(t, e, n, l) {
|
|
207
207
|
if (t && t.o) {
|
|
208
|
-
if (
|
|
208
|
+
if (Ee.has(t))
|
|
209
209
|
return;
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
Ee.add(t), ie.c.push(() => {
|
|
211
|
+
Ee.delete(t), l && (n && t.d(1), l());
|
|
212
212
|
}), t.o(e);
|
|
213
213
|
} else
|
|
214
214
|
l && l();
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Ce(t) {
|
|
217
217
|
t && t.c();
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function he(t, e, n, l) {
|
|
220
220
|
const { fragment: r, after_update: c } = t.$$;
|
|
221
|
-
r && r.m(e, n), l ||
|
|
222
|
-
const
|
|
223
|
-
t.$$.on_destroy ? t.$$.on_destroy.push(...
|
|
224
|
-
}), c.forEach(
|
|
221
|
+
r && r.m(e, n), l || qe(() => {
|
|
222
|
+
const s = t.$$.on_mount.map($e).filter(et);
|
|
223
|
+
t.$$.on_destroy ? t.$$.on_destroy.push(...s) : ne(s), t.$$.on_mount = [];
|
|
224
|
+
}), c.forEach(qe);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function me(t, e) {
|
|
227
227
|
const n = t.$$;
|
|
228
|
-
n.fragment !== null && (
|
|
228
|
+
n.fragment !== null && (ne(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
|
|
229
229
|
}
|
|
230
230
|
function jt(t, e) {
|
|
231
|
-
t.$$.dirty[0] === -1 && (
|
|
231
|
+
t.$$.dirty[0] === -1 && (pe.push(t), Bt(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
const u =
|
|
235
|
-
|
|
233
|
+
function ge(t, e, n, l, r, c, s, i = [-1]) {
|
|
234
|
+
const u = ke;
|
|
235
|
+
we(t);
|
|
236
236
|
const a = t.$$ = {
|
|
237
237
|
fragment: null,
|
|
238
238
|
ctx: [],
|
|
239
239
|
props: c,
|
|
240
|
-
update:
|
|
240
|
+
update: k,
|
|
241
241
|
not_equal: r,
|
|
242
242
|
bound: Ge(),
|
|
243
243
|
on_mount: [],
|
|
@@ -251,28 +251,28 @@ function _e(t, e, n, l, r, c, o, i = [-1]) {
|
|
|
251
251
|
skip_bound: !1,
|
|
252
252
|
root: e.target || u.$$.root
|
|
253
253
|
};
|
|
254
|
-
|
|
254
|
+
s && s(a.root);
|
|
255
255
|
let h = !1;
|
|
256
256
|
if (a.ctx = n ? n(t, e.props || {}, (p, D, ...d) => {
|
|
257
|
-
const
|
|
258
|
-
return a.ctx && r(a.ctx[p], a.ctx[p] =
|
|
259
|
-
}) : [], a.update(), h = !0,
|
|
257
|
+
const g = d.length ? d[0] : D;
|
|
258
|
+
return a.ctx && r(a.ctx[p], a.ctx[p] = g) && (!a.skip_bound && a.bound[p] && a.bound[p](g), h && jt(t, p)), D;
|
|
259
|
+
}) : [], a.update(), h = !0, ne(a.before_update), a.fragment = l ? l(a.ctx) : !1, e.target) {
|
|
260
260
|
if (e.hydrate) {
|
|
261
|
-
const p =
|
|
261
|
+
const p = Et(e.target);
|
|
262
262
|
a.fragment && a.fragment.l(p), p.forEach(H);
|
|
263
263
|
} else
|
|
264
264
|
a.fragment && a.fragment.c();
|
|
265
|
-
e.intro && P(t.$$.fragment),
|
|
265
|
+
e.intro && P(t.$$.fragment), he(t, e.target, e.anchor, e.customElement), lt();
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
we(u);
|
|
268
268
|
}
|
|
269
|
-
class
|
|
269
|
+
class ye {
|
|
270
270
|
$destroy() {
|
|
271
|
-
|
|
271
|
+
me(this, 1), this.$destroy = k;
|
|
272
272
|
}
|
|
273
273
|
$on(e, n) {
|
|
274
274
|
if (!et(n))
|
|
275
|
-
return
|
|
275
|
+
return k;
|
|
276
276
|
const l = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
277
277
|
return l.push(n), () => {
|
|
278
278
|
const r = l.indexOf(n);
|
|
@@ -287,73 +287,73 @@ function Ot(t) {
|
|
|
287
287
|
let e, n;
|
|
288
288
|
return {
|
|
289
289
|
c() {
|
|
290
|
-
e =
|
|
290
|
+
e = te("svg"), n = te("path"), f(n, "d", "M500 115.1c212.2 0 384.9 172.6 384.9 384.9 0 212.2-172.7 384.9-384.9 384.9S115.1 712.2 115.1 500c0-212.4 172.5-384.9 384.9-384.9M500 10C229.4 10 10 229.4 10 500s219.4 490 490 490 490-219.4 490-490c-.2-270.6-219.5-490-490-490zm0 315c96.5 0 175 78.4 175 175 0 96.5-78.4 175-175 175-96.5 0-175-78.4-175-175 0-96.5 78.4-175 175-175m0-105c-154.7 0-279.9 125.4-279.9 279.9 0 154.7 125.4 279.9 279.9 279.9 154.5 0 279.9-125.4 279.9-279.9C779.9 345.3 654.5 220 500 220zm70 280c0 38.7-31.3 70-70 70s-70-31.3-70-70 31.3-70 70-70 70 31.3 70 70z"), f(e, "viewBox", "0 0 1000 1000"), f(e, "width", "18px"), f(e, "height", "18px"), f(e, "class", "svelte-en2qvf");
|
|
291
291
|
},
|
|
292
292
|
m(l, r) {
|
|
293
293
|
V(l, e, r), y(e, n);
|
|
294
294
|
},
|
|
295
|
-
p:
|
|
296
|
-
i:
|
|
297
|
-
o:
|
|
295
|
+
p: k,
|
|
296
|
+
i: k,
|
|
297
|
+
o: k,
|
|
298
298
|
d(l) {
|
|
299
299
|
l && H(e);
|
|
300
300
|
}
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
class Dt extends
|
|
303
|
+
class Dt extends ye {
|
|
304
304
|
constructor(e) {
|
|
305
|
-
super(),
|
|
305
|
+
super(), ge(this, e, null, Ot, _e, {});
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function Nt(t) {
|
|
309
309
|
let e, n;
|
|
310
310
|
return {
|
|
311
311
|
c() {
|
|
312
|
-
e =
|
|
312
|
+
e = te("svg"), n = te("path"), f(n, "d", "M3.8 2.5c-.6 0-1.3.7-1.3 1.3 0 .3.2.7.5.8L7.2 9 3 13.2c-.3.3-.5.7-.5 1 0 .6.7 1.3 1.3 1.3.3 0 .7-.2 1-.5L9 10.8l4.2 4.2c.2.3.7.3 1 .3.6 0 1.3-.7 1.3-1.3 0-.3-.2-.7-.3-1l-4.4-4L15 4.6c.3-.2.5-.5.5-.8 0-.7-.7-1.3-1.3-1.3-.3 0-.7.2-1 .3L9 7.1 4.8 2.8c-.3-.1-.7-.3-1-.3z"), f(e, "viewBox", "0 0 18 18"), f(e, "width", "16"), f(e, "height", "16"), f(e, "class", "svelte-en2qvf");
|
|
313
313
|
},
|
|
314
314
|
m(l, r) {
|
|
315
315
|
V(l, e, r), y(e, n);
|
|
316
316
|
},
|
|
317
|
-
p:
|
|
318
|
-
i:
|
|
319
|
-
o:
|
|
317
|
+
p: k,
|
|
318
|
+
i: k,
|
|
319
|
+
o: k,
|
|
320
320
|
d(l) {
|
|
321
321
|
l && H(e);
|
|
322
322
|
}
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
class qt extends
|
|
325
|
+
class qt extends ye {
|
|
326
326
|
constructor(e) {
|
|
327
|
-
super(),
|
|
327
|
+
super(), ge(this, e, null, Nt, _e, {});
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
function Ht(t) {
|
|
331
331
|
let e;
|
|
332
332
|
return {
|
|
333
333
|
c() {
|
|
334
|
-
e =
|
|
334
|
+
e = B("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', f(e, "class", "svelte-7cmwmc");
|
|
335
335
|
},
|
|
336
336
|
m(n, l) {
|
|
337
337
|
V(n, e, l);
|
|
338
338
|
},
|
|
339
|
-
p:
|
|
340
|
-
i:
|
|
341
|
-
o:
|
|
339
|
+
p: k,
|
|
340
|
+
i: k,
|
|
341
|
+
o: k,
|
|
342
342
|
d(n) {
|
|
343
343
|
n && H(e);
|
|
344
344
|
}
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
|
-
class Kt extends
|
|
347
|
+
class Kt extends ye {
|
|
348
348
|
constructor(e) {
|
|
349
|
-
super(),
|
|
349
|
+
super(), ge(this, e, null, Ht, _e, {});
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
function Qt(t) {
|
|
353
353
|
let e, n, l;
|
|
354
354
|
return {
|
|
355
355
|
c() {
|
|
356
|
-
e =
|
|
356
|
+
e = te("svg"), n = te("path"), f(n, "stroke-width", "4"), f(n, "fill-rule", "evenodd"), f(n, "clip-rule", "evenodd"), f(n, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), f(n, "class", "svelte-656hh2"), f(e, "width", l = t[0] !== "list" ? void 0 : "20"), f(e, "viewBox", "0 0 70 85"), f(e, "fill", "none"), f(e, "class", "svelte-656hh2"), O(e, "in-map", t[0] !== "list"), O(e, "for-maplibre", t[0] === "maplibre"), O(e, "for-leaflet", t[0] === "leaflet"), O(e, "list-icon", t[0] === "list");
|
|
357
357
|
},
|
|
358
358
|
m(r, c) {
|
|
359
359
|
V(r, e, c), y(e, n);
|
|
@@ -361,8 +361,8 @@ function Qt(t) {
|
|
|
361
361
|
p(r, [c]) {
|
|
362
362
|
c & 1 && l !== (l = r[0] !== "list" ? void 0 : "20") && f(e, "width", l), c & 1 && O(e, "in-map", r[0] !== "list"), c & 1 && O(e, "for-maplibre", r[0] === "maplibre"), c & 1 && O(e, "for-leaflet", r[0] === "leaflet"), c & 1 && O(e, "list-icon", r[0] === "list");
|
|
363
363
|
},
|
|
364
|
-
i:
|
|
365
|
-
o:
|
|
364
|
+
i: k,
|
|
365
|
+
o: k,
|
|
366
366
|
d(r) {
|
|
367
367
|
r && H(e);
|
|
368
368
|
}
|
|
@@ -374,31 +374,31 @@ function Vt(t, e, n) {
|
|
|
374
374
|
"displayIn" in r && n(0, l = r.displayIn);
|
|
375
375
|
}, [l];
|
|
376
376
|
}
|
|
377
|
-
class rt extends
|
|
377
|
+
class rt extends ye {
|
|
378
378
|
constructor(e) {
|
|
379
|
-
super(),
|
|
379
|
+
super(), ge(this, e, Vt, Qt, _e, { displayIn: 0 });
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
function Gt(t) {
|
|
383
383
|
let e, n;
|
|
384
384
|
return {
|
|
385
385
|
c() {
|
|
386
|
-
e =
|
|
386
|
+
e = te("svg"), n = te("path"), f(n, "d", "M7.4 2.5c-2.7 0-4.9 2.2-4.9 4.9s2.2 4.9 4.9 4.9c1 0 1.8-.2 2.5-.8l3.7 3.7c.2.2.4.3.8.3.7 0 1.1-.4 1.1-1.1 0-.3-.1-.5-.3-.8L11.4 10c.4-.8.8-1.6.8-2.5.1-2.8-2.1-5-4.8-5zm0 1.6c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2-3.3-1.3-3.3-3.1 1.4-3.3 3.3-3.3z"), f(e, "viewBox", "0 0 18 18"), f(e, "xml:space", "preserve"), f(e, "width", "20"), f(e, "class", "svelte-en2qvf");
|
|
387
387
|
},
|
|
388
388
|
m(l, r) {
|
|
389
389
|
V(l, e, r), y(e, n);
|
|
390
390
|
},
|
|
391
|
-
p:
|
|
392
|
-
i:
|
|
393
|
-
o:
|
|
391
|
+
p: k,
|
|
392
|
+
i: k,
|
|
393
|
+
o: k,
|
|
394
394
|
d(l) {
|
|
395
395
|
l && H(e);
|
|
396
396
|
}
|
|
397
397
|
};
|
|
398
398
|
}
|
|
399
|
-
class Ut extends
|
|
399
|
+
class Ut extends ye {
|
|
400
400
|
constructor(e) {
|
|
401
|
-
super(),
|
|
401
|
+
super(), ge(this, e, null, Gt, _e, {});
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
404
|
function xe(t, e, n) {
|
|
@@ -409,10 +409,10 @@ function Je(t) {
|
|
|
409
409
|
let e, n;
|
|
410
410
|
return e = new Kt({}), {
|
|
411
411
|
c() {
|
|
412
|
-
|
|
412
|
+
Ce(e.$$.fragment);
|
|
413
413
|
},
|
|
414
414
|
m(l, r) {
|
|
415
|
-
|
|
415
|
+
he(e, l, r), n = !0;
|
|
416
416
|
},
|
|
417
417
|
i(l) {
|
|
418
418
|
n || (P(e.$$.fragment, l), n = !0);
|
|
@@ -421,18 +421,18 @@ function Je(t) {
|
|
|
421
421
|
q(e.$$.fragment, l), n = !1;
|
|
422
422
|
},
|
|
423
423
|
d(l) {
|
|
424
|
-
|
|
424
|
+
me(e, l);
|
|
425
425
|
}
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
function Xe(t) {
|
|
429
|
-
let e, n, l, r, c,
|
|
429
|
+
let e, n, l, r, c, s;
|
|
430
430
|
return n = new Dt({}), {
|
|
431
431
|
c() {
|
|
432
|
-
e =
|
|
432
|
+
e = B("button"), Ce(n.$$.fragment), f(e, "type", "button"), f(e, "title", l = t[7] === !0 ? "toggle reverse geocoding" : t[7]), f(e, "class", "svelte-1h1zm6d"), O(e, "active", t[1]);
|
|
433
433
|
},
|
|
434
434
|
m(i, u) {
|
|
435
|
-
V(i, e, u),
|
|
435
|
+
V(i, e, u), he(n, e, null), r = !0, c || (s = Q(e, "click", t[47]), c = !0);
|
|
436
436
|
},
|
|
437
437
|
p(i, u) {
|
|
438
438
|
(!r || u[0] & 128 && l !== (l = i[7] === !0 ? "toggle reverse geocoding" : i[7])) && f(e, "title", l), (!r || u[0] & 2) && O(e, "active", i[1]);
|
|
@@ -444,28 +444,28 @@ function Xe(t) {
|
|
|
444
444
|
q(n.$$.fragment, i), r = !1;
|
|
445
445
|
},
|
|
446
446
|
d(i) {
|
|
447
|
-
i && H(e),
|
|
447
|
+
i && H(e), me(n), c = !1, s();
|
|
448
448
|
}
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
function Wt(t) {
|
|
452
|
-
let e, n, l, r, c = t[10],
|
|
452
|
+
let e, n, l, r, c = t[10], s = [];
|
|
453
453
|
for (let u = 0; u < c.length; u += 1)
|
|
454
|
-
|
|
455
|
-
const i = (u) => q(
|
|
456
|
-
|
|
454
|
+
s[u] = Fe(xe(t, c, u));
|
|
455
|
+
const i = (u) => q(s[u], 1, 1, () => {
|
|
456
|
+
s[u] = null;
|
|
457
457
|
});
|
|
458
458
|
return {
|
|
459
459
|
c() {
|
|
460
|
-
e =
|
|
461
|
-
for (let u = 0; u <
|
|
462
|
-
|
|
463
|
-
f(e, "class", "svelte-
|
|
460
|
+
e = B("ul");
|
|
461
|
+
for (let u = 0; u < s.length; u += 1)
|
|
462
|
+
s[u].c();
|
|
463
|
+
f(e, "class", "svelte-1h1zm6d");
|
|
464
464
|
},
|
|
465
465
|
m(u, a) {
|
|
466
466
|
V(u, e, a);
|
|
467
|
-
for (let h = 0; h <
|
|
468
|
-
|
|
467
|
+
for (let h = 0; h < s.length; h += 1)
|
|
468
|
+
s[h].m(e, null);
|
|
469
469
|
n = !0, l || (r = [
|
|
470
470
|
Q(e, "mouseout", t[50]),
|
|
471
471
|
Q(e, "blur", t[51])
|
|
@@ -477,28 +477,28 @@ function Wt(t) {
|
|
|
477
477
|
let h;
|
|
478
478
|
for (h = 0; h < c.length; h += 1) {
|
|
479
479
|
const p = xe(u, c, h);
|
|
480
|
-
|
|
480
|
+
s[h] ? (s[h].p(p, a), P(s[h], 1)) : (s[h] = Fe(p), s[h].c(), P(s[h], 1), s[h].m(e, null));
|
|
481
481
|
}
|
|
482
|
-
for (
|
|
482
|
+
for (Re(), h = c.length; h < s.length; h += 1)
|
|
483
483
|
i(h);
|
|
484
|
-
|
|
484
|
+
Se();
|
|
485
485
|
}
|
|
486
486
|
},
|
|
487
487
|
i(u) {
|
|
488
488
|
if (!n) {
|
|
489
489
|
for (let a = 0; a < c.length; a += 1)
|
|
490
|
-
P(
|
|
490
|
+
P(s[a]);
|
|
491
491
|
n = !0;
|
|
492
492
|
}
|
|
493
493
|
},
|
|
494
494
|
o(u) {
|
|
495
|
-
|
|
496
|
-
for (let a = 0; a <
|
|
497
|
-
q(
|
|
495
|
+
s = s.filter(Boolean);
|
|
496
|
+
for (let a = 0; a < s.length; a += 1)
|
|
497
|
+
q(s[a]);
|
|
498
498
|
n = !1;
|
|
499
499
|
},
|
|
500
500
|
d(u) {
|
|
501
|
-
u && H(e),
|
|
501
|
+
u && H(e), zt(s, u), l = !1, ne(r);
|
|
502
502
|
}
|
|
503
503
|
};
|
|
504
504
|
}
|
|
@@ -506,16 +506,16 @@ function Zt(t) {
|
|
|
506
506
|
let e, n;
|
|
507
507
|
return {
|
|
508
508
|
c() {
|
|
509
|
-
e =
|
|
509
|
+
e = B("div"), n = fe(t[5]), f(e, "class", "no-results svelte-1h1zm6d");
|
|
510
510
|
},
|
|
511
511
|
m(l, r) {
|
|
512
512
|
V(l, e, r), y(e, n);
|
|
513
513
|
},
|
|
514
514
|
p(l, r) {
|
|
515
|
-
r[0] & 32 &&
|
|
515
|
+
r[0] & 32 && ve(n, l[5]);
|
|
516
516
|
},
|
|
517
|
-
i:
|
|
518
|
-
o:
|
|
517
|
+
i: k,
|
|
518
|
+
o: k,
|
|
519
519
|
d(l) {
|
|
520
520
|
l && H(e);
|
|
521
521
|
}
|
|
@@ -525,16 +525,16 @@ function xt(t) {
|
|
|
525
525
|
let e, n;
|
|
526
526
|
return {
|
|
527
527
|
c() {
|
|
528
|
-
e =
|
|
528
|
+
e = B("div"), n = fe(t[4]), f(e, "class", "error svelte-1h1zm6d");
|
|
529
529
|
},
|
|
530
530
|
m(l, r) {
|
|
531
531
|
V(l, e, r), y(e, n);
|
|
532
532
|
},
|
|
533
533
|
p(l, r) {
|
|
534
|
-
r[0] & 16 &&
|
|
534
|
+
r[0] & 16 && ve(n, l[4]);
|
|
535
535
|
},
|
|
536
|
-
i:
|
|
537
|
-
o:
|
|
536
|
+
i: k,
|
|
537
|
+
o: k,
|
|
538
538
|
d(l) {
|
|
539
539
|
l && H(e);
|
|
540
540
|
}
|
|
@@ -544,14 +544,14 @@ function Jt(t) {
|
|
|
544
544
|
let e = "", n;
|
|
545
545
|
return {
|
|
546
546
|
c() {
|
|
547
|
-
n =
|
|
547
|
+
n = fe(e);
|
|
548
548
|
},
|
|
549
549
|
m(l, r) {
|
|
550
550
|
V(l, n, r);
|
|
551
551
|
},
|
|
552
|
-
p:
|
|
553
|
-
i:
|
|
554
|
-
o:
|
|
552
|
+
p: k,
|
|
553
|
+
i: k,
|
|
554
|
+
o: k,
|
|
555
555
|
d(l) {
|
|
556
556
|
l && H(n);
|
|
557
557
|
}
|
|
@@ -561,13 +561,13 @@ function Ye(t) {
|
|
|
561
561
|
let e, n = t[59].place_type + "", l;
|
|
562
562
|
return {
|
|
563
563
|
c() {
|
|
564
|
-
e =
|
|
564
|
+
e = B("span"), l = fe(n), f(e, "class", "svelte-1h1zm6d");
|
|
565
565
|
},
|
|
566
566
|
m(r, c) {
|
|
567
567
|
V(r, e, c), y(e, l);
|
|
568
568
|
},
|
|
569
569
|
p(r, c) {
|
|
570
|
-
c[0] & 1024 && n !== (n = r[59].place_type + "") &&
|
|
570
|
+
c[0] & 1024 && n !== (n = r[59].place_type + "") && ve(l, n);
|
|
571
571
|
},
|
|
572
572
|
d(r) {
|
|
573
573
|
r && H(e);
|
|
@@ -575,9 +575,9 @@ function Ye(t) {
|
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
577
|
function Fe(t) {
|
|
578
|
-
let e, n, l, r, c,
|
|
578
|
+
let e, n, l, r, c, s, i = t[59].place_name.replace(/,.*/, "") + "", u, a, h, p, D, d = t[59].place_name.replace(/[^,]*,?\s*/, "") + "", g, _, b, M, T, G;
|
|
579
579
|
n = new rt({ props: { displayIn: "list" } });
|
|
580
|
-
let
|
|
580
|
+
let z = t[8] && Ye(t);
|
|
581
581
|
function L() {
|
|
582
582
|
return t[48](t[61]);
|
|
583
583
|
}
|
|
@@ -586,217 +586,219 @@ function Fe(t) {
|
|
|
586
586
|
}
|
|
587
587
|
return {
|
|
588
588
|
c() {
|
|
589
|
-
e =
|
|
589
|
+
e = B("li"), Ce(n.$$.fragment), l = x(), r = B("span"), c = B("span"), s = B("span"), u = fe(i), a = x(), z && z.c(), h = x(), p = B("span"), D = B("span"), g = fe(d), _ = x(), f(s, "class", "svelte-1h1zm6d"), f(c, "class", "svelte-1h1zm6d"), f(r, "class", "svelte-1h1zm6d"), f(D, "class", "svelte-1h1zm6d"), f(p, "class", "svelte-1h1zm6d"), f(e, "tabindex", "0"), f(e, "data-selected", b = t[12] === t[61]), f(e, "class", "svelte-1h1zm6d"), O(e, "selected", t[12] === t[61]);
|
|
590
590
|
},
|
|
591
|
-
m(j,
|
|
592
|
-
V(j, e,
|
|
591
|
+
m(j, C) {
|
|
592
|
+
V(j, e, C), he(n, e, null), y(e, l), y(e, r), y(r, c), y(c, s), y(s, u), y(c, a), z && z.m(c, null), y(e, h), y(e, p), y(p, D), y(D, g), y(e, _), M = !0, T || (G = [
|
|
593
593
|
Q(e, "mouseover", L),
|
|
594
594
|
Q(e, "focus", w)
|
|
595
|
-
],
|
|
595
|
+
], T = !0);
|
|
596
596
|
},
|
|
597
|
-
p(j,
|
|
598
|
-
t = j, (!
|
|
597
|
+
p(j, C) {
|
|
598
|
+
t = j, (!M || C[0] & 1024) && i !== (i = t[59].place_name.replace(/,.*/, "") + "") && ve(u, i), t[8] ? z ? z.p(t, C) : (z = Ye(t), z.c(), z.m(c, null)) : z && (z.d(1), z = null), (!M || C[0] & 1024) && d !== (d = t[59].place_name.replace(/[^,]*,?\s*/, "") + "") && ve(g, d), (!M || C[0] & 4096 && b !== (b = t[12] === t[61])) && f(e, "data-selected", b), (!M || C[0] & 4096) && O(e, "selected", t[12] === t[61]);
|
|
599
599
|
},
|
|
600
600
|
i(j) {
|
|
601
|
-
|
|
601
|
+
M || (P(n.$$.fragment, j), M = !0);
|
|
602
602
|
},
|
|
603
603
|
o(j) {
|
|
604
|
-
q(n.$$.fragment, j),
|
|
604
|
+
q(n.$$.fragment, j), M = !1;
|
|
605
605
|
},
|
|
606
606
|
d(j) {
|
|
607
|
-
j && H(e),
|
|
607
|
+
j && H(e), me(n), z && z.d(), T = !1, ne(G);
|
|
608
608
|
}
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
611
|
function Xt(t) {
|
|
612
|
-
let e, n, l, r, c,
|
|
612
|
+
let e, n, l, r, c, s, i, u, a, h, p, D, d, g, _, b, M, T, G, z;
|
|
613
613
|
r = new Ut({}), h = new qt({});
|
|
614
614
|
let L = t[16] && Je(), w = t[7] && Xe(t);
|
|
615
|
-
const j = t[39].default,
|
|
616
|
-
function
|
|
615
|
+
const j = t[39].default, C = kt(j, t, t[38], null), R = [Jt, xt, Zt, Wt], A = [];
|
|
616
|
+
function be(m, S) {
|
|
617
617
|
var J, X;
|
|
618
|
-
return
|
|
618
|
+
return m[13] ? m[15] ? 1 : ((J = m[10]) == null ? void 0 : J.length) === 0 ? 2 : m[13] && ((X = m[10]) == null ? void 0 : X.length) ? 3 : -1 : 0;
|
|
619
619
|
}
|
|
620
|
-
return ~(
|
|
620
|
+
return ~(_ = be(t)) && (b = A[_] = R[_](t)), {
|
|
621
621
|
c() {
|
|
622
|
-
e =
|
|
622
|
+
e = B("form"), n = B("div"), l = B("button"), Ce(r.$$.fragment), c = x(), s = B("input"), i = x(), u = B("div"), a = B("button"), Ce(h.$$.fragment), p = x(), L && L.c(), D = x(), w && w.c(), d = x(), C && C.c(), g = x(), b && b.c(), f(l, "type", "button"), f(l, "class", "svelte-1h1zm6d"), f(s, "placeholder", t[3]), f(s, "aria-label", t[3]), f(s, "class", "svelte-1h1zm6d"), f(a, "type", "button"), f(a, "class", "svelte-1h1zm6d"), O(a, "displayable", t[0] !== ""), f(u, "class", "clear-button-container svelte-1h1zm6d"), f(n, "class", "input-group svelte-1h1zm6d"), f(e, "tabindex", "0"), f(e, "class", M = Ue(t[2]) + " svelte-1h1zm6d"), O(e, "can-collapse", t[6] && t[0] === "");
|
|
623
623
|
},
|
|
624
|
-
m(
|
|
625
|
-
V(
|
|
624
|
+
m(m, S) {
|
|
625
|
+
V(m, e, S), y(e, n), y(n, l), he(r, l, null), y(n, c), y(n, s), t[41](s), We(s, t[0]), y(n, i), y(n, u), y(u, a), he(h, a, null), y(u, p), L && L.m(u, null), y(n, D), w && w.m(n, null), y(n, d), C && C.m(n, null), y(e, g), ~_ && A[_].m(e, null), T = !0, G || (z = [
|
|
626
626
|
Q(l, "click", t[40]),
|
|
627
|
-
Q(
|
|
628
|
-
Q(
|
|
629
|
-
Q(
|
|
630
|
-
Q(
|
|
631
|
-
Q(
|
|
627
|
+
Q(s, "input", t[42]),
|
|
628
|
+
Q(s, "focus", t[43]),
|
|
629
|
+
Q(s, "blur", t[44]),
|
|
630
|
+
Q(s, "keydown", t[18]),
|
|
631
|
+
Q(s, "input", t[45]),
|
|
632
632
|
Q(a, "click", t[46]),
|
|
633
|
-
Q(e, "submit",
|
|
633
|
+
Q(e, "submit", Lt(t[17]))
|
|
634
634
|
], G = !0);
|
|
635
635
|
},
|
|
636
|
-
p(
|
|
637
|
-
(!
|
|
636
|
+
p(m, S) {
|
|
637
|
+
(!T || S[0] & 8) && f(s, "placeholder", m[3]), (!T || S[0] & 8) && f(s, "aria-label", m[3]), S[0] & 1 && s.value !== m[0] && We(s, m[0]), (!T || S[0] & 1) && O(a, "displayable", m[0] !== ""), m[16] ? L ? S[0] & 65536 && P(L, 1) : (L = Je(), L.c(), P(L, 1), L.m(u, null)) : L && (Re(), q(L, 1, 1, () => {
|
|
638
638
|
L = null;
|
|
639
|
-
}),
|
|
639
|
+
}), Se()), m[7] ? w ? (w.p(m, S), S[0] & 128 && P(w, 1)) : (w = Xe(m), w.c(), P(w, 1), w.m(n, d)) : w && (Re(), q(w, 1, 1, () => {
|
|
640
640
|
w = null;
|
|
641
|
-
}),
|
|
642
|
-
|
|
641
|
+
}), Se()), C && C.p && (!T || S[1] & 128) && Mt(
|
|
642
|
+
C,
|
|
643
643
|
j,
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
644
|
+
m,
|
|
645
|
+
m[38],
|
|
646
|
+
T ? Ct(j, m[38], S, null) : Tt(m[38]),
|
|
647
647
|
null
|
|
648
648
|
);
|
|
649
|
-
let J =
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}),
|
|
649
|
+
let J = _;
|
|
650
|
+
_ = be(m), _ === J ? ~_ && A[_].p(m, S) : (b && (Re(), q(A[J], 1, 1, () => {
|
|
651
|
+
A[J] = null;
|
|
652
|
+
}), Se()), ~_ ? (b = A[_], b ? b.p(m, S) : (b = A[_] = R[_](m), b.c()), P(b, 1), b.m(e, null)) : b = null), (!T || S[0] & 4 && M !== (M = Ue(m[2]) + " svelte-1h1zm6d")) && f(e, "class", M), (!T || S[0] & 69) && O(e, "can-collapse", m[6] && m[0] === "");
|
|
653
653
|
},
|
|
654
|
-
i(
|
|
655
|
-
|
|
654
|
+
i(m) {
|
|
655
|
+
T || (P(r.$$.fragment, m), P(h.$$.fragment, m), P(L), P(w), P(C, m), P(b), T = !0);
|
|
656
656
|
},
|
|
657
|
-
o(
|
|
658
|
-
q(r.$$.fragment,
|
|
657
|
+
o(m) {
|
|
658
|
+
q(r.$$.fragment, m), q(h.$$.fragment, m), q(L), q(w), q(C, m), q(b), T = !1;
|
|
659
659
|
},
|
|
660
|
-
d(
|
|
661
|
-
|
|
660
|
+
d(m) {
|
|
661
|
+
m && H(e), me(r), t[41](null), me(h), L && L.d(), w && w.d(), C && C.d(m), ~_ && A[_].d(), G = !1, ne(z);
|
|
662
662
|
}
|
|
663
663
|
};
|
|
664
664
|
}
|
|
665
665
|
function Yt(t, e, n) {
|
|
666
|
-
let l, { $$slots: r = {}, $$scope: c } = e, { class:
|
|
667
|
-
function
|
|
668
|
-
|
|
666
|
+
let l, { $$slots: r = {}, $$scope: c } = e, { class: s = void 0 } = e, { mapController: i = void 0 } = e, { apiKey: u } = e, { debounceSearch: a = 200 } = e, { placeholder: h = "Search" } = e, { errorMessage: p = "Searching failed" } = e, { noResultsMessage: D = "No results found" } = e, { proximity: d = void 0 } = e, { bbox: g = void 0 } = e, { trackProximity: _ = !0 } = e, { minLength: b = 2 } = e, { language: M = void 0 } = e, { showResultsWhileTyping: T = !0 } = e, { zoom: G = 16 } = e, { flyTo: z = !0 } = e, { collapsed: L = !1 } = e, { clearOnBlur: w = !1 } = e, { enableReverse: j = !1 } = e, { filter: C = () => !0 } = e, { searchValue: R = "" } = e, { reverseActive: A = !1 } = e, { showPlaceType: be = !1 } = e;
|
|
667
|
+
function m() {
|
|
668
|
+
W.focus();
|
|
669
669
|
}
|
|
670
670
|
function S() {
|
|
671
|
-
|
|
671
|
+
W.blur();
|
|
672
672
|
}
|
|
673
|
-
function J(
|
|
674
|
-
n(0, R =
|
|
673
|
+
function J(o, K = !0) {
|
|
674
|
+
n(0, R = o), K ? (n(12, I = -1), Ke()) : (Ae(), setTimeout(() => {
|
|
675
|
+
W.focus(), W.select();
|
|
676
|
+
}));
|
|
675
677
|
}
|
|
676
|
-
let X = !1, E, N,
|
|
677
|
-
const F =
|
|
678
|
-
|
|
678
|
+
let X = !1, E, N, v, He = "", W, I = -1, Y, Me = [], le, Ie, Pe;
|
|
679
|
+
const F = It();
|
|
680
|
+
St(() => {
|
|
679
681
|
i && (i.setProximityChangeHandler(void 0), i.setMapClickHandler(void 0), i.indicateReverse(!1), i.setSelectedMarker(-1), i.setMarkers(void 0, void 0));
|
|
680
682
|
});
|
|
681
|
-
function
|
|
682
|
-
|
|
683
|
-
n(36, N = E), n(11,
|
|
684
|
-
}).catch((
|
|
685
|
-
}
|
|
686
|
-
async function
|
|
687
|
-
n(15,
|
|
688
|
-
const
|
|
689
|
-
|
|
690
|
-
const
|
|
691
|
-
if (
|
|
692
|
-
n(10, E =
|
|
683
|
+
function Ke() {
|
|
684
|
+
I > -1 && E ? (n(11, v = E[I]), n(0, R = v.place_name.replace(/,.*/, "")), n(15, Y = void 0), n(36, N = void 0), n(12, I = -1)) : R && Be(R).then(() => {
|
|
685
|
+
n(36, N = E), n(11, v = void 0), ot();
|
|
686
|
+
}).catch((o) => n(15, Y = o));
|
|
687
|
+
}
|
|
688
|
+
async function Be(o, K = !1) {
|
|
689
|
+
n(15, Y = void 0);
|
|
690
|
+
const re = /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(o), $ = new URLSearchParams();
|
|
691
|
+
$.set("key", u), M && $.set("language", String(M)), re || (g && $.set("bbox", g.join(",")), d && $.set("proximity", d.join(",")));
|
|
692
|
+
const oe = "https://api.maptiler.com/geocoding/" + encodeURIComponent(o) + ".json?" + $.toString();
|
|
693
|
+
if (oe === He) {
|
|
694
|
+
K ? (n(10, E = void 0), n(11, v = Me[0])) : n(10, E = Me);
|
|
693
695
|
return;
|
|
694
696
|
}
|
|
695
|
-
|
|
696
|
-
let
|
|
697
|
+
He = oe, le == null || le.abort(), n(16, le = new AbortController());
|
|
698
|
+
let ue;
|
|
697
699
|
try {
|
|
698
|
-
|
|
700
|
+
ue = await fetch(oe, { signal: le.signal }).finally(() => {
|
|
699
701
|
n(16, le = void 0);
|
|
700
702
|
});
|
|
701
|
-
} catch (
|
|
702
|
-
if (
|
|
703
|
+
} catch (de) {
|
|
704
|
+
if (de && typeof de == "object" && de.name === "AbortError")
|
|
703
705
|
return;
|
|
704
706
|
throw new Error();
|
|
705
707
|
}
|
|
706
|
-
if (!
|
|
708
|
+
if (!ue.ok)
|
|
707
709
|
throw new Error();
|
|
708
|
-
const
|
|
709
|
-
F("response", { url:
|
|
710
|
+
const ae = await ue.json();
|
|
711
|
+
F("response", { url: oe, featureCollection: ae }), K ? (n(10, E = void 0), n(11, v = ae.features[0]), Me = [v]) : (n(10, E = ae.features.filter(C)), Me = E, re && W.focus());
|
|
710
712
|
}
|
|
711
|
-
function
|
|
712
|
-
var K,
|
|
713
|
-
if (!(N != null && N.length) || !
|
|
713
|
+
function ot() {
|
|
714
|
+
var K, re, $, oe, ue, ae, de, Qe;
|
|
715
|
+
if (!(N != null && N.length) || !z)
|
|
714
716
|
return;
|
|
715
|
-
const
|
|
716
|
-
for (const
|
|
717
|
-
|
|
718
|
-
i && N.length > 0 && (
|
|
717
|
+
const o = [180, 90, -180, -90];
|
|
718
|
+
for (const ee of N)
|
|
719
|
+
o[0] = Math.min(o[0], (re = (K = ee.bbox) == null ? void 0 : K[0]) != null ? re : ee.center[0]), o[1] = Math.min(o[1], (oe = ($ = ee.bbox) == null ? void 0 : $[1]) != null ? oe : ee.center[1]), o[2] = Math.max(o[2], (ae = (ue = ee.bbox) == null ? void 0 : ue[2]) != null ? ae : ee.center[0]), o[3] = Math.max(o[3], (Qe = (de = ee.bbox) == null ? void 0 : de[3]) != null ? Qe : ee.center[1]);
|
|
720
|
+
i && N.length > 0 && (v && o[0] === o[2] && o[1] === o[3] ? i.flyTo(v.center, G) : i.fitBounds(o, 50));
|
|
719
721
|
}
|
|
720
|
-
function
|
|
721
|
-
n(1,
|
|
722
|
+
function st(o) {
|
|
723
|
+
n(1, A = !1), J(o[0].toFixed(6) + "," + o[1].toFixed(6));
|
|
722
724
|
}
|
|
723
|
-
function it(
|
|
725
|
+
function it(o) {
|
|
724
726
|
if (!E)
|
|
725
727
|
return;
|
|
726
|
-
let K =
|
|
727
|
-
K ? (
|
|
728
|
+
let K = o.key === "ArrowDown" ? 1 : o.key === "ArrowUp" ? -1 : 0;
|
|
729
|
+
K ? (I === -1 && K === -1 && n(12, I = E.length), n(12, I += K), I >= E.length && n(12, I = -1), o.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(o.key) && n(12, I = -1);
|
|
728
730
|
}
|
|
729
|
-
function
|
|
730
|
-
if (
|
|
731
|
-
|
|
731
|
+
function Ae(o = !0) {
|
|
732
|
+
if (T && R.length > b) {
|
|
733
|
+
Ie && clearTimeout(Ie);
|
|
732
734
|
const K = R;
|
|
733
|
-
|
|
735
|
+
Ie = window.setTimeout(
|
|
734
736
|
() => {
|
|
735
|
-
|
|
737
|
+
Be(K).catch((re) => n(15, Y = re));
|
|
736
738
|
},
|
|
737
|
-
|
|
739
|
+
o ? a : 0
|
|
738
740
|
);
|
|
739
741
|
} else
|
|
740
|
-
n(10, E = void 0), n(15,
|
|
742
|
+
n(10, E = void 0), n(15, Y = void 0);
|
|
741
743
|
}
|
|
742
|
-
const ct = () =>
|
|
743
|
-
function ft(
|
|
744
|
-
|
|
745
|
-
|
|
744
|
+
const ct = () => W.focus();
|
|
745
|
+
function ft(o) {
|
|
746
|
+
De[o ? "unshift" : "push"](() => {
|
|
747
|
+
W = o, n(14, W);
|
|
746
748
|
});
|
|
747
749
|
}
|
|
748
750
|
function ut() {
|
|
749
751
|
R = this.value, n(0, R), n(9, X), n(31, w);
|
|
750
752
|
}
|
|
751
|
-
const at = () => n(9, X = !0), dt = () => n(9, X = !1), ht = () =>
|
|
752
|
-
n(0, R = ""),
|
|
753
|
-
},
|
|
754
|
-
n(11,
|
|
755
|
-
}, bt = () => n(12,
|
|
753
|
+
const at = () => n(9, X = !0), dt = () => n(9, X = !1), ht = () => Ae(), mt = () => {
|
|
754
|
+
n(0, R = ""), W.focus();
|
|
755
|
+
}, _t = () => n(1, A = !A), gt = (o) => n(12, I = o), yt = (o) => {
|
|
756
|
+
n(11, v = o), n(0, R = o.place_name.replace(/,.*/, "")), n(12, I = -1);
|
|
757
|
+
}, bt = () => n(12, I = -1), pt = () => {
|
|
756
758
|
};
|
|
757
|
-
return t.$$set = (
|
|
758
|
-
"class" in
|
|
759
|
+
return t.$$set = (o) => {
|
|
760
|
+
"class" in o && n(2, s = o.class), "mapController" in o && n(21, i = o.mapController), "apiKey" in o && n(22, u = o.apiKey), "debounceSearch" in o && n(23, a = o.debounceSearch), "placeholder" in o && n(3, h = o.placeholder), "errorMessage" in o && n(4, p = o.errorMessage), "noResultsMessage" in o && n(5, D = o.noResultsMessage), "proximity" in o && n(20, d = o.proximity), "bbox" in o && n(24, g = o.bbox), "trackProximity" in o && n(25, _ = o.trackProximity), "minLength" in o && n(26, b = o.minLength), "language" in o && n(27, M = o.language), "showResultsWhileTyping" in o && n(28, T = o.showResultsWhileTyping), "zoom" in o && n(29, G = o.zoom), "flyTo" in o && n(30, z = o.flyTo), "collapsed" in o && n(6, L = o.collapsed), "clearOnBlur" in o && n(31, w = o.clearOnBlur), "enableReverse" in o && n(7, j = o.enableReverse), "filter" in o && n(32, C = o.filter), "searchValue" in o && n(0, R = o.searchValue), "reverseActive" in o && n(1, A = o.reverseActive), "showPlaceType" in o && n(8, be = o.showPlaceType), "$$scope" in o && n(38, c = o.$$scope);
|
|
759
761
|
}, t.$$.update = () => {
|
|
760
|
-
t.$$.dirty[0] & 35651584 && i && i.setProximityChangeHandler(
|
|
761
|
-
n(20, d =
|
|
762
|
-
} : void 0), t.$$.dirty[0] & 33554432 && (
|
|
763
|
-
n(13,
|
|
764
|
-
}), t.$$.dirty[0] & 1025 && (R || (n(11,
|
|
762
|
+
t.$$.dirty[0] & 35651584 && i && i.setProximityChangeHandler(_ ? (o) => {
|
|
763
|
+
n(20, d = o);
|
|
764
|
+
} : void 0), t.$$.dirty[0] & 33554432 && (_ || n(20, d = void 0)), t.$$.dirty[0] & 512 | t.$$.dirty[1] & 1 && setTimeout(() => {
|
|
765
|
+
n(13, Pe = X), w && !X && n(0, R = "");
|
|
766
|
+
}), t.$$.dirty[0] & 1025 && (R || (n(11, v = void 0), n(10, E = void 0), n(15, Y = void 0), n(36, N = E))), t.$$.dirty[0] & 2048 && v && !v.address && v.geometry.type === "Point" && Be(v.id, !0).catch((o) => n(15, Y = o)), t.$$.dirty[0] & 1612711936 && i && v && z && (!v.bbox || v.bbox[0] === v.bbox[2] && v.bbox[1] === v.bbox[3] ? i.flyTo(v.center, G) : i.fitBounds(v.bbox, 50), n(10, E = void 0), n(36, N = void 0), n(12, I = -1)), t.$$.dirty[0] & 1024 | t.$$.dirty[1] & 32 && N !== E && n(36, N = void 0), t.$$.dirty[0] & 2099200 | t.$$.dirty[1] & 32 && i && i.setMarkers(N, v), t.$$.dirty[0] & 1 && n(12, I = -1), t.$$.dirty[0] & 2101248 && (i == null || i.setSelectedMarker(I)), t.$$.dirty[0] & 5120 && n(37, l = E == null ? void 0 : E[I]), t.$$.dirty[1] & 64 && F("select", l), t.$$.dirty[0] & 2048 && F("pick", v), t.$$.dirty[0] & 9216 && F("optionsVisibilityChange", Pe && !!E), t.$$.dirty[0] & 1024 && F("featuresListed", E), t.$$.dirty[1] & 32 && F("featuresMarked", N), t.$$.dirty[0] & 2 && F("reverseToggle", A), t.$$.dirty[0] & 1 && F("queryChange", R), t.$$.dirty[0] & 2097154 && i && i.indicateReverse(A), t.$$.dirty[0] & 2097154 && i && i.setMapClickHandler(A ? st : void 0);
|
|
765
767
|
}, [
|
|
766
768
|
R,
|
|
767
|
-
|
|
768
|
-
|
|
769
|
+
A,
|
|
770
|
+
s,
|
|
769
771
|
h,
|
|
770
772
|
p,
|
|
771
773
|
D,
|
|
772
774
|
L,
|
|
773
775
|
j,
|
|
774
|
-
|
|
776
|
+
be,
|
|
775
777
|
X,
|
|
776
778
|
E,
|
|
779
|
+
v,
|
|
777
780
|
I,
|
|
778
|
-
|
|
779
|
-
|
|
781
|
+
Pe,
|
|
782
|
+
W,
|
|
780
783
|
Y,
|
|
781
|
-
ne,
|
|
782
784
|
le,
|
|
783
|
-
|
|
785
|
+
Ke,
|
|
784
786
|
it,
|
|
785
|
-
|
|
787
|
+
Ae,
|
|
786
788
|
d,
|
|
787
789
|
i,
|
|
788
790
|
u,
|
|
789
791
|
a,
|
|
790
|
-
m,
|
|
791
792
|
g,
|
|
793
|
+
_,
|
|
792
794
|
b,
|
|
793
|
-
C,
|
|
794
795
|
M,
|
|
795
|
-
G,
|
|
796
796
|
T,
|
|
797
|
+
G,
|
|
798
|
+
z,
|
|
797
799
|
w,
|
|
798
|
-
|
|
799
|
-
|
|
800
|
+
C,
|
|
801
|
+
m,
|
|
800
802
|
S,
|
|
801
803
|
J,
|
|
802
804
|
N,
|
|
@@ -809,22 +811,22 @@ function Yt(t, e, n) {
|
|
|
809
811
|
at,
|
|
810
812
|
dt,
|
|
811
813
|
ht,
|
|
814
|
+
mt,
|
|
812
815
|
_t,
|
|
813
816
|
gt,
|
|
814
|
-
mt,
|
|
815
817
|
yt,
|
|
816
818
|
bt,
|
|
817
819
|
pt
|
|
818
820
|
];
|
|
819
821
|
}
|
|
820
|
-
class Ft extends
|
|
822
|
+
class Ft extends ye {
|
|
821
823
|
constructor(e) {
|
|
822
|
-
super(),
|
|
824
|
+
super(), ge(
|
|
823
825
|
this,
|
|
824
826
|
e,
|
|
825
827
|
Yt,
|
|
826
828
|
Xt,
|
|
827
|
-
|
|
829
|
+
_e,
|
|
828
830
|
{
|
|
829
831
|
class: 2,
|
|
830
832
|
mapController: 21,
|
|
@@ -867,89 +869,89 @@ class Ft extends ge {
|
|
|
867
869
|
}
|
|
868
870
|
}
|
|
869
871
|
function $t(t, e = !0, n = !0, l = {}, r = {}) {
|
|
870
|
-
let c,
|
|
872
|
+
let c, s, i, u = [], a;
|
|
871
873
|
const h = () => {
|
|
872
874
|
if (!c) {
|
|
873
875
|
i = void 0;
|
|
874
876
|
return;
|
|
875
877
|
}
|
|
876
878
|
let d;
|
|
877
|
-
const
|
|
878
|
-
i !==
|
|
879
|
+
const g = t.getZoom() > 10 ? [(d = t.getCenter().wrap()).lng, d.lat] : void 0;
|
|
880
|
+
i !== g && (i = g, c(g));
|
|
879
881
|
}, p = (d) => {
|
|
880
|
-
|
|
882
|
+
s == null || s([d.latlng.lng, d.latlng.lat]);
|
|
881
883
|
};
|
|
882
884
|
return {
|
|
883
885
|
setProximityChangeHandler(d) {
|
|
884
886
|
d ? (c = d, t.on("moveend", h), h()) : (t.off("moveend", h), c == null || c(void 0), c = void 0);
|
|
885
887
|
},
|
|
886
888
|
setMapClickHandler(d) {
|
|
887
|
-
|
|
889
|
+
s = d, s ? t.on("click", p) : t.off("click", p);
|
|
888
890
|
},
|
|
889
|
-
flyTo(d,
|
|
890
|
-
t.flyTo(d,
|
|
891
|
+
flyTo(d, g) {
|
|
892
|
+
t.flyTo(d, g, l);
|
|
891
893
|
},
|
|
892
|
-
fitBounds(d,
|
|
894
|
+
fitBounds(d, g) {
|
|
893
895
|
t.flyToBounds(
|
|
894
896
|
[
|
|
895
897
|
[d[1], d[0]],
|
|
896
898
|
[d[3], d[2]]
|
|
897
899
|
],
|
|
898
|
-
{ ...r, padding: [
|
|
900
|
+
{ ...r, padding: [g, g] }
|
|
899
901
|
);
|
|
900
902
|
},
|
|
901
903
|
indicateReverse(d) {
|
|
902
904
|
t.getContainer().style.cursor = d ? "crosshair" : "";
|
|
903
905
|
},
|
|
904
|
-
setMarkers(d,
|
|
905
|
-
for (const
|
|
906
|
-
|
|
906
|
+
setMarkers(d, g) {
|
|
907
|
+
for (const _ of u)
|
|
908
|
+
_.remove();
|
|
907
909
|
u.length = 0;
|
|
908
|
-
for (const
|
|
910
|
+
for (const _ of g ? [...d != null ? d : [], g] : d != null ? d : []) {
|
|
909
911
|
let b;
|
|
910
|
-
const
|
|
911
|
-
if (
|
|
912
|
-
b = new se.Marker(
|
|
913
|
-
else if (
|
|
914
|
-
b = new se.Marker(
|
|
912
|
+
const M = [_.center[1], _.center[0]];
|
|
913
|
+
if (_ === g && typeof e == "object")
|
|
914
|
+
b = new se.Marker(M, e);
|
|
915
|
+
else if (_ !== g && typeof n == "object")
|
|
916
|
+
b = new se.Marker(M, n);
|
|
915
917
|
else {
|
|
916
|
-
const
|
|
917
|
-
new rt({ props: { displayIn: "leaflet" }, target:
|
|
918
|
-
icon: new se.DivIcon({ html:
|
|
918
|
+
const T = document.createElement("div");
|
|
919
|
+
new rt({ props: { displayIn: "leaflet" }, target: T }), b = new se.Marker(M, {
|
|
920
|
+
icon: new se.DivIcon({ html: T, className: "" })
|
|
919
921
|
});
|
|
920
922
|
}
|
|
921
923
|
u.push(b.addTo(t));
|
|
922
924
|
}
|
|
923
925
|
},
|
|
924
926
|
setSelectedMarker(d) {
|
|
925
|
-
var
|
|
926
|
-
a && ((
|
|
927
|
+
var g, _;
|
|
928
|
+
a && ((g = a.getElement()) == null || g.classList.toggle("marker-selected", !1)), a = d > -1 ? u[d] : void 0, (_ = a == null ? void 0 : a.getElement()) == null || _.classList.toggle("marker-selected", !0);
|
|
927
929
|
}
|
|
928
930
|
};
|
|
929
931
|
}
|
|
930
|
-
var U,
|
|
932
|
+
var U, ce;
|
|
931
933
|
class en extends se.Control {
|
|
932
934
|
constructor(n) {
|
|
933
935
|
super();
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
936
|
+
je(this, U, void 0);
|
|
937
|
+
je(this, ce, void 0);
|
|
938
|
+
Te(this, ce, n);
|
|
937
939
|
}
|
|
938
940
|
onAdd(n) {
|
|
939
941
|
const l = document.createElement("div");
|
|
940
942
|
l.className = "leaflet-ctrl-geocoder", se.DomEvent.disableClickPropagation(l), se.DomEvent.disableScrollPropagation(l);
|
|
941
|
-
const { marker: r, showResultMarkers: c, flyTo:
|
|
943
|
+
const { marker: r, showResultMarkers: c, flyTo: s, ...i } = Z(this, ce), u = typeof s == "boolean" ? {} : s, a = $t(
|
|
942
944
|
n,
|
|
943
945
|
r,
|
|
944
946
|
c,
|
|
945
947
|
u,
|
|
946
948
|
u
|
|
947
949
|
);
|
|
948
|
-
|
|
950
|
+
Te(this, U, new Ft({
|
|
949
951
|
target: l,
|
|
950
952
|
props: {
|
|
951
953
|
mapController: a,
|
|
952
|
-
flyTo:
|
|
954
|
+
flyTo: s === void 0 ? !0 : !!s,
|
|
953
955
|
...i
|
|
954
956
|
}
|
|
955
957
|
}));
|
|
@@ -971,9 +973,9 @@ class en extends se.Control {
|
|
|
971
973
|
}
|
|
972
974
|
setOptions(n) {
|
|
973
975
|
var i;
|
|
974
|
-
|
|
975
|
-
const { marker: l, showResultMarkers: r, flyTo: c, ...
|
|
976
|
-
(i = Z(this, U)) == null || i.$set(
|
|
976
|
+
Te(this, ce, n);
|
|
977
|
+
const { marker: l, showResultMarkers: r, flyTo: c, ...s } = Z(this, ce);
|
|
978
|
+
(i = Z(this, U)) == null || i.$set(s);
|
|
977
979
|
}
|
|
978
980
|
setQuery(n, l = !0) {
|
|
979
981
|
var r;
|
|
@@ -996,11 +998,12 @@ class en extends se.Control {
|
|
|
996
998
|
(n = Z(this, U)) == null || n.$destroy();
|
|
997
999
|
}
|
|
998
1000
|
}
|
|
999
|
-
U = new WeakMap(),
|
|
1001
|
+
U = new WeakMap(), ce = new WeakMap();
|
|
1000
1002
|
function tn(...t) {
|
|
1001
1003
|
return new en(...t);
|
|
1002
1004
|
}
|
|
1003
1005
|
window.L && typeof window.L == "object" && typeof window.L.control == "function" && (window.L.control.maptilerGeocoding = tn);
|
|
1004
1006
|
export {
|
|
1005
|
-
en as GeocodingControl
|
|
1007
|
+
en as GeocodingControl,
|
|
1008
|
+
$t as createLeafletMapController
|
|
1006
1009
|
};
|