@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.
@@ -1,830 +1,832 @@
1
- var Ve = (t, e, n) => {
2
- if (!e.has(t))
3
- throw TypeError("Cannot " + n);
1
+ var at = (n, t, e) => {
2
+ if (!t.has(n))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var Z = (t, e, n) => (Ve(t, e, "read from private field"), n ? n.call(t) : e.get(t)), Ie = (t, e, n) => {
6
- if (e.has(t))
5
+ var $ = (n, t, e) => (at(n, t, "read from private field"), e ? e.call(n) : t.get(n)), We = (n, t, e) => {
6
+ if (t.has(n))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(t) : e.set(t, n);
9
- }, ke = (t, e, n, l) => (Ve(t, e, "write to private field"), l ? l.call(t, n) : e.set(t, n), n);
10
- import { Evented as pt } from "maplibre-gl";
11
- function v() {
8
+ t instanceof WeakSet ? t.add(n) : t.set(n, e);
9
+ }, Te = (n, t, e, r) => (at(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e);
10
+ import { Evented as ir } from "maplibre-gl";
11
+ function C() {
12
12
  }
13
- function vt(t, e) {
14
- for (const n in e)
15
- t[n] = e[n];
16
- return t;
13
+ function or(n, t) {
14
+ for (const e in t)
15
+ n[e] = t[e];
16
+ return n;
17
17
  }
18
- function Fe(t) {
19
- return t();
18
+ function zt(n) {
19
+ return n();
20
20
  }
21
- function Ue() {
21
+ function ct() {
22
22
  return /* @__PURE__ */ Object.create(null);
23
23
  }
24
- function te(t) {
25
- t.forEach(Fe);
24
+ function ae(n) {
25
+ n.forEach(zt);
26
26
  }
27
- function $e(t) {
28
- return typeof t == "function";
27
+ function At(n) {
28
+ return typeof n == "function";
29
29
  }
30
- function de(t, e) {
31
- return t != t ? e == e : t !== e || t && typeof t == "object" || typeof t == "function";
30
+ function we(n, t) {
31
+ return n != n ? t == t : n !== t || n && typeof n == "object" || typeof n == "function";
32
32
  }
33
- function wt(t) {
34
- return Object.keys(t).length === 0;
33
+ function lr(n) {
34
+ return Object.keys(n).length === 0;
35
35
  }
36
- function kt(t, e, n, l) {
37
- if (t) {
38
- const r = et(t, e, n, l);
39
- return t[0](r);
36
+ function sr(n, t, e, r) {
37
+ if (n) {
38
+ const i = Tt(n, t, e, r);
39
+ return n[0](i);
40
40
  }
41
41
  }
42
- function et(t, e, n, l) {
43
- return t[1] && l ? vt(n.ctx.slice(), t[1](l(e))) : n.ctx;
44
- }
45
- function Mt(t, e, n, l) {
46
- if (t[2] && l) {
47
- const r = t[2](l(n));
48
- if (e.dirty === void 0)
49
- return r;
50
- if (typeof r == "object") {
51
- const u = [], o = Math.max(e.dirty.length, r.length);
52
- for (let i = 0; i < o; i += 1)
53
- u[i] = e.dirty[i] | r[i];
54
- return u;
42
+ function Tt(n, t, e, r) {
43
+ return n[1] && r ? or(e.ctx.slice(), n[1](r(t))) : e.ctx;
44
+ }
45
+ function ur(n, t, e, r) {
46
+ if (n[2] && r) {
47
+ const i = n[2](r(e));
48
+ if (t.dirty === void 0)
49
+ return i;
50
+ if (typeof i == "object") {
51
+ const o = [], l = Math.max(t.dirty.length, i.length);
52
+ for (let s = 0; s < l; s += 1)
53
+ o[s] = t.dirty[s] | i[s];
54
+ return o;
55
55
  }
56
- return e.dirty | r;
56
+ return t.dirty | i;
57
57
  }
58
- return e.dirty;
58
+ return t.dirty;
59
59
  }
60
- function Ct(t, e, n, l, r, u) {
61
- if (r) {
62
- const o = et(e, n, l, u);
63
- t.p(o, r);
60
+ function fr(n, t, e, r, i, o) {
61
+ if (i) {
62
+ const l = Tt(t, e, r, o);
63
+ n.p(l, i);
64
64
  }
65
65
  }
66
- function Tt(t) {
67
- if (t.ctx.length > 32) {
68
- const e = [], n = t.ctx.length / 32;
69
- for (let l = 0; l < n; l++)
70
- e[l] = -1;
71
- return e;
66
+ function ar(n) {
67
+ if (n.ctx.length > 32) {
68
+ const t = [], e = n.ctx.length / 32;
69
+ for (let r = 0; r < e; r++)
70
+ t[r] = -1;
71
+ return t;
72
72
  }
73
73
  return -1;
74
74
  }
75
- function We(t) {
76
- return t == null ? "" : t;
75
+ function ht(n) {
76
+ return n == null ? "" : n;
77
77
  }
78
- function y(t, e) {
79
- t.appendChild(e);
78
+ function R(n, t) {
79
+ n.appendChild(t);
80
80
  }
81
- function U(t, e, n) {
82
- t.insertBefore(e, n || null);
81
+ function Z(n, t, e) {
82
+ n.insertBefore(t, e || null);
83
83
  }
84
- function K(t) {
85
- t.parentNode.removeChild(t);
84
+ function F(n) {
85
+ n.parentNode.removeChild(n);
86
86
  }
87
- function Lt(t, e) {
88
- for (let n = 0; n < t.length; n += 1)
89
- t[n] && t[n].d(e);
87
+ function cr(n, t) {
88
+ for (let e = 0; e < n.length; e += 1)
89
+ n[e] && n[e].d(t);
90
90
  }
91
- function z(t) {
92
- return document.createElement(t);
91
+ function B(n) {
92
+ return document.createElement(n);
93
93
  }
94
- function ee(t) {
95
- return document.createElementNS("http://www.w3.org/2000/svg", t);
94
+ function ue(n) {
95
+ return document.createElementNS("http://www.w3.org/2000/svg", n);
96
96
  }
97
- function ie(t) {
98
- return document.createTextNode(t);
97
+ function de(n) {
98
+ return document.createTextNode(n);
99
99
  }
100
- function x() {
101
- return ie(" ");
100
+ function te() {
101
+ return de(" ");
102
102
  }
103
- function V(t, e, n, l) {
104
- return t.addEventListener(e, n, l), () => t.removeEventListener(e, n, l);
103
+ function W(n, t, e, r) {
104
+ return n.addEventListener(t, e, r), () => n.removeEventListener(t, e, r);
105
105
  }
106
- function Et(t) {
107
- return function(e) {
108
- return e.preventDefault(), t.call(this, e);
106
+ function hr(n) {
107
+ return function(t) {
108
+ return t.preventDefault(), n.call(this, t);
109
109
  };
110
110
  }
111
- function c(t, e, n) {
112
- n == null ? t.removeAttribute(e) : t.getAttribute(e) !== n && t.setAttribute(e, n);
111
+ function d(n, t, e) {
112
+ e == null ? n.removeAttribute(t) : n.getAttribute(t) !== e && n.setAttribute(t, e);
113
113
  }
114
- function Rt(t) {
115
- return Array.from(t.childNodes);
114
+ function gr(n) {
115
+ return Array.from(n.childNodes);
116
116
  }
117
- function pe(t, e) {
118
- e = "" + e, t.wholeText !== e && (t.data = e);
117
+ function Me(n, t) {
118
+ t = "" + t, n.wholeText !== t && (n.data = t);
119
119
  }
120
- function Ge(t, e) {
121
- t.value = e == null ? "" : e;
120
+ function gt(n, t) {
121
+ n.value = t == null ? "" : t;
122
122
  }
123
- function N(t, e, n) {
124
- t.classList[n ? "add" : "remove"](e);
123
+ function G(n, t, e) {
124
+ n.classList[e ? "add" : "remove"](t);
125
125
  }
126
- function St(t, e, { bubbles: n = !1, cancelable: l = !1 } = {}) {
127
- const r = document.createEvent("CustomEvent");
128
- return r.initCustomEvent(t, n, l, e), r;
126
+ function vr(n, t, { bubbles: e = !1, cancelable: r = !1 } = {}) {
127
+ const i = document.createEvent("CustomEvent");
128
+ return i.initCustomEvent(n, e, r, t), i;
129
129
  }
130
- let ve;
131
- function be(t) {
132
- ve = t;
130
+ let Oe;
131
+ function Ie(n) {
132
+ Oe = n;
133
133
  }
134
- function tt() {
135
- if (!ve)
134
+ function Nt() {
135
+ if (!Oe)
136
136
  throw new Error("Function called outside component initialization");
137
- return ve;
138
- }
139
- function It(t) {
140
- tt().$$.on_destroy.push(t);
141
- }
142
- function Bt() {
143
- const t = tt();
144
- return (e, n, { cancelable: l = !1 } = {}) => {
145
- const r = t.$$.callbacks[e];
146
- if (r) {
147
- const u = St(e, n, { cancelable: l });
148
- return r.slice().forEach((o) => {
149
- o.call(t, u);
150
- }), !u.defaultPrevented;
137
+ return Oe;
138
+ }
139
+ function yr(n) {
140
+ Nt().$$.on_destroy.push(n);
141
+ }
142
+ function dr() {
143
+ const n = Nt();
144
+ return (t, e, { cancelable: r = !1 } = {}) => {
145
+ const i = n.$$.callbacks[t];
146
+ if (i) {
147
+ const o = vr(t, e, { cancelable: r });
148
+ return i.slice().forEach((l) => {
149
+ l.call(n, o);
150
+ }), !o.defaultPrevented;
151
151
  }
152
152
  return !0;
153
153
  };
154
154
  }
155
- const ye = [], Ae = [], Ce = [], He = [], At = Promise.resolve();
156
- let Pe = !1;
157
- function Pt() {
158
- Pe || (Pe = !0, At.then(nt));
155
+ const Pe = [], He = [], Be = [], vt = [], pr = Promise.resolve();
156
+ let Ke = !1;
157
+ function mr() {
158
+ Ke || (Ke = !0, pr.then(Bt));
159
159
  }
160
- function ze(t) {
161
- Ce.push(t);
160
+ function Je(n) {
161
+ Be.push(n);
162
162
  }
163
- const Be = /* @__PURE__ */ new Set();
164
- let Me = 0;
165
- function nt() {
166
- const t = ve;
163
+ const Ze = /* @__PURE__ */ new Set();
164
+ let Ne = 0;
165
+ function Bt() {
166
+ const n = Oe;
167
167
  do {
168
- for (; Me < ye.length; ) {
169
- const e = ye[Me];
170
- Me++, be(e), zt(e.$$);
171
- }
172
- for (be(null), ye.length = 0, Me = 0; Ae.length; )
173
- Ae.pop()();
174
- for (let e = 0; e < Ce.length; e += 1) {
175
- const n = Ce[e];
176
- Be.has(n) || (Be.add(n), n());
177
- }
178
- Ce.length = 0;
179
- } while (ye.length);
180
- for (; He.length; )
181
- He.pop()();
182
- Pe = !1, Be.clear(), be(t);
183
- }
184
- function zt(t) {
185
- if (t.fragment !== null) {
186
- t.update(), te(t.before_update);
187
- const e = t.dirty;
188
- t.dirty = [-1], t.fragment && t.fragment.p(t.ctx, e), t.after_update.forEach(ze);
189
- }
190
- }
191
- const Te = /* @__PURE__ */ new Set();
192
- let se;
193
- function Le() {
194
- se = {
168
+ for (; Ne < Pe.length; ) {
169
+ const t = Pe[Ne];
170
+ Ne++, Ie(t), _r(t.$$);
171
+ }
172
+ for (Ie(null), Pe.length = 0, Ne = 0; He.length; )
173
+ He.pop()();
174
+ for (let t = 0; t < Be.length; t += 1) {
175
+ const e = Be[t];
176
+ Ze.has(e) || (Ze.add(e), e());
177
+ }
178
+ Be.length = 0;
179
+ } while (Pe.length);
180
+ for (; vt.length; )
181
+ vt.pop()();
182
+ Ke = !1, Ze.clear(), Ie(n);
183
+ }
184
+ function _r(n) {
185
+ if (n.fragment !== null) {
186
+ n.update(), ae(n.before_update);
187
+ const t = n.dirty;
188
+ n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, t), n.after_update.forEach(Je);
189
+ }
190
+ }
191
+ const Ge = /* @__PURE__ */ new Set();
192
+ let ve;
193
+ function qe() {
194
+ ve = {
195
195
  r: 0,
196
196
  c: [],
197
- p: se
197
+ p: ve
198
198
  };
199
199
  }
200
- function Ee() {
201
- se.r || te(se.c), se = se.p;
200
+ function De() {
201
+ ve.r || ae(ve.c), ve = ve.p;
202
202
  }
203
- function P(t, e) {
204
- t && t.i && (Te.delete(t), t.i(e));
203
+ function N(n, t) {
204
+ n && n.i && (Ge.delete(n), n.i(t));
205
205
  }
206
- function q(t, e, n, l) {
207
- if (t && t.o) {
208
- if (Te.has(t))
206
+ function U(n, t, e, r) {
207
+ if (n && n.o) {
208
+ if (Ge.has(n))
209
209
  return;
210
- Te.add(t), se.c.push(() => {
211
- Te.delete(t), l && (n && t.d(1), l());
212
- }), t.o(e);
210
+ Ge.add(n), ve.c.push(() => {
211
+ Ge.delete(n), r && (e && n.d(1), r());
212
+ }), n.o(t);
213
213
  } else
214
- l && l();
214
+ r && r();
215
215
  }
216
- function we(t) {
217
- t && t.c();
216
+ function Ce(n) {
217
+ n && n.c();
218
218
  }
219
- function ue(t, e, n, l) {
220
- const { fragment: r, after_update: u } = t.$$;
221
- r && r.m(e, n), l || ze(() => {
222
- const o = t.$$.on_mount.map(Fe).filter($e);
223
- t.$$.on_destroy ? t.$$.on_destroy.push(...o) : te(o), t.$$.on_mount = [];
224
- }), u.forEach(ze);
219
+ function xe(n, t, e, r) {
220
+ const { fragment: i, after_update: o } = n.$$;
221
+ i && i.m(t, e), r || Je(() => {
222
+ const l = n.$$.on_mount.map(zt).filter(At);
223
+ n.$$.on_destroy ? n.$$.on_destroy.push(...l) : ae(l), n.$$.on_mount = [];
224
+ }), o.forEach(Je);
225
225
  }
226
- function ae(t, e) {
227
- const n = t.$$;
228
- n.fragment !== null && (te(n.on_destroy), n.fragment && n.fragment.d(e), n.on_destroy = n.fragment = null, n.ctx = []);
226
+ function be(n, t) {
227
+ const e = n.$$;
228
+ e.fragment !== null && (ae(e.on_destroy), e.fragment && e.fragment.d(t), e.on_destroy = e.fragment = null, e.ctx = []);
229
229
  }
230
- function jt(t, e) {
231
- t.$$.dirty[0] === -1 && (ye.push(t), Pt(), t.$$.dirty.fill(0)), t.$$.dirty[e / 31 | 0] |= 1 << e % 31;
230
+ function xr(n, t) {
231
+ n.$$.dirty[0] === -1 && (Pe.push(n), mr(), n.$$.dirty.fill(0)), n.$$.dirty[t / 31 | 0] |= 1 << t % 31;
232
232
  }
233
- function he(t, e, n, l, r, u, o, i = [-1]) {
234
- const f = ve;
235
- be(t);
236
- const a = t.$$ = {
233
+ function Ee(n, t, e, r, i, o, l, s = [-1]) {
234
+ const u = Oe;
235
+ Ie(n);
236
+ const f = n.$$ = {
237
237
  fragment: null,
238
238
  ctx: [],
239
- props: u,
240
- update: v,
241
- not_equal: r,
242
- bound: Ue(),
239
+ props: o,
240
+ update: C,
241
+ not_equal: i,
242
+ bound: ct(),
243
243
  on_mount: [],
244
244
  on_destroy: [],
245
245
  on_disconnect: [],
246
246
  before_update: [],
247
247
  after_update: [],
248
- context: new Map(e.context || (f ? f.$$.context : [])),
249
- callbacks: Ue(),
250
- dirty: i,
248
+ context: new Map(t.context || (u ? u.$$.context : [])),
249
+ callbacks: ct(),
250
+ dirty: s,
251
251
  skip_bound: !1,
252
- root: e.target || f.$$.root
252
+ root: t.target || u.$$.root
253
253
  };
254
- o && o(a.root);
255
- let d = !1;
256
- if (a.ctx = n ? n(t, e.props || {}, (b, E, ...R) => {
257
- const h = R.length ? R[0] : E;
258
- return a.ctx && r(a.ctx[b], a.ctx[b] = h) && (!a.skip_bound && a.bound[b] && a.bound[b](h), d && jt(t, b)), E;
259
- }) : [], a.update(), d = !0, te(a.before_update), a.fragment = l ? l(a.ctx) : !1, e.target) {
260
- if (e.hydrate) {
261
- const b = Rt(e.target);
262
- a.fragment && a.fragment.l(b), b.forEach(K);
254
+ l && l(f.root);
255
+ let a = !1;
256
+ if (f.ctx = e ? e(n, t.props || {}, (v, p, ...y) => {
257
+ const E = y.length ? y[0] : p;
258
+ return f.ctx && i(f.ctx[v], f.ctx[v] = E) && (!f.skip_bound && f.bound[v] && f.bound[v](E), a && xr(n, v)), p;
259
+ }) : [], f.update(), a = !0, ae(f.before_update), f.fragment = r ? r(f.ctx) : !1, t.target) {
260
+ if (t.hydrate) {
261
+ const v = gr(t.target);
262
+ f.fragment && f.fragment.l(v), v.forEach(F);
263
263
  } else
264
- a.fragment && a.fragment.c();
265
- e.intro && P(t.$$.fragment), ue(t, e.target, e.anchor, e.customElement), nt();
264
+ f.fragment && f.fragment.c();
265
+ t.intro && N(n.$$.fragment), xe(n, t.target, t.anchor, t.customElement), Bt();
266
266
  }
267
- be(f);
267
+ Ie(u);
268
268
  }
269
- class _e {
269
+ class Se {
270
270
  $destroy() {
271
- ae(this, 1), this.$destroy = v;
272
- }
273
- $on(e, n) {
274
- if (!$e(n))
275
- return v;
276
- const l = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
277
- return l.push(n), () => {
278
- const r = l.indexOf(n);
279
- r !== -1 && l.splice(r, 1);
271
+ be(this, 1), this.$destroy = C;
272
+ }
273
+ $on(t, e) {
274
+ if (!At(e))
275
+ return C;
276
+ const r = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
277
+ return r.push(e), () => {
278
+ const i = r.indexOf(e);
279
+ i !== -1 && r.splice(i, 1);
280
280
  };
281
281
  }
282
- $set(e) {
283
- this.$$set && !wt(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
282
+ $set(t) {
283
+ this.$$set && !lr(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
284
284
  }
285
285
  }
286
- function Ot(t) {
287
- let e, n;
286
+ function br(n) {
287
+ let t, e;
288
288
  return {
289
289
  c() {
290
- e = ee("svg"), n = ee("path"), c(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"), c(e, "viewBox", "0 0 1000 1000"), c(e, "width", "18px"), c(e, "height", "18px"), c(e, "class", "svelte-en2qvf");
290
+ t = ue("svg"), e = ue("path"), d(e, "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"), d(t, "viewBox", "0 0 1000 1000"), d(t, "width", "18px"), d(t, "height", "18px"), d(t, "class", "svelte-en2qvf");
291
291
  },
292
- m(l, r) {
293
- U(l, e, r), y(e, n);
292
+ m(r, i) {
293
+ Z(r, t, i), R(t, e);
294
294
  },
295
- p: v,
296
- i: v,
297
- o: v,
298
- d(l) {
299
- l && K(e);
295
+ p: C,
296
+ i: C,
297
+ o: C,
298
+ d(r) {
299
+ r && F(t);
300
300
  }
301
301
  };
302
302
  }
303
- class Nt extends _e {
304
- constructor(e) {
305
- super(), he(this, e, null, Ot, de, {});
303
+ class wr extends Se {
304
+ constructor(t) {
305
+ super(), Ee(this, t, null, br, we, {});
306
306
  }
307
307
  }
308
- function Dt(t) {
309
- let e, n;
308
+ function Er(n) {
309
+ let t, e;
310
310
  return {
311
311
  c() {
312
- e = ee("svg"), n = ee("path"), c(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"), c(e, "viewBox", "0 0 18 18"), c(e, "width", "16"), c(e, "height", "16"), c(e, "class", "svelte-en2qvf");
312
+ t = ue("svg"), e = ue("path"), d(e, "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"), d(t, "viewBox", "0 0 18 18"), d(t, "width", "16"), d(t, "height", "16"), d(t, "class", "svelte-en2qvf");
313
313
  },
314
- m(l, r) {
315
- U(l, e, r), y(e, n);
314
+ m(r, i) {
315
+ Z(r, t, i), R(t, e);
316
316
  },
317
- p: v,
318
- i: v,
319
- o: v,
320
- d(l) {
321
- l && K(e);
317
+ p: C,
318
+ i: C,
319
+ o: C,
320
+ d(r) {
321
+ r && F(t);
322
322
  }
323
323
  };
324
324
  }
325
- class qt extends _e {
326
- constructor(e) {
327
- super(), he(this, e, null, Dt, de, {});
325
+ class Sr extends Se {
326
+ constructor(t) {
327
+ super(), Ee(this, t, null, Er, we, {});
328
328
  }
329
329
  }
330
- function Kt(t) {
331
- let e;
330
+ function kr(n) {
331
+ let t;
332
332
  return {
333
333
  c() {
334
- e = z("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>', c(e, "class", "svelte-7cmwmc");
334
+ t = B("div"), t.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>', d(t, "class", "svelte-7cmwmc");
335
335
  },
336
- m(n, l) {
337
- U(n, e, l);
336
+ m(e, r) {
337
+ Z(e, t, r);
338
338
  },
339
- p: v,
340
- i: v,
341
- o: v,
342
- d(n) {
343
- n && K(e);
339
+ p: C,
340
+ i: C,
341
+ o: C,
342
+ d(e) {
343
+ e && F(t);
344
344
  }
345
345
  };
346
346
  }
347
- class Qt extends _e {
348
- constructor(e) {
349
- super(), he(this, e, null, Kt, de, {});
347
+ class Pr extends Se {
348
+ constructor(t) {
349
+ super(), Ee(this, t, null, kr, we, {});
350
350
  }
351
351
  }
352
- function Vt(t) {
353
- let e, n, l;
352
+ function Ir(n) {
353
+ let t, e, r;
354
354
  return {
355
355
  c() {
356
- e = ee("svg"), n = ee("path"), c(n, "stroke-width", "4"), c(n, "fill-rule", "evenodd"), c(n, "clip-rule", "evenodd"), c(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"), c(n, "class", "svelte-656hh2"), c(e, "width", l = t[0] !== "list" ? void 0 : "20"), c(e, "viewBox", "0 0 70 85"), c(e, "fill", "none"), c(e, "class", "svelte-656hh2"), N(e, "in-map", t[0] !== "list"), N(e, "for-maplibre", t[0] === "maplibre"), N(e, "for-leaflet", t[0] === "leaflet"), N(e, "list-icon", t[0] === "list");
356
+ t = ue("svg"), e = ue("path"), d(e, "stroke-width", "4"), d(e, "fill-rule", "evenodd"), d(e, "clip-rule", "evenodd"), d(e, "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"), d(e, "class", "svelte-656hh2"), d(t, "width", r = n[0] !== "list" ? void 0 : "20"), d(t, "viewBox", "0 0 70 85"), d(t, "fill", "none"), d(t, "class", "svelte-656hh2"), G(t, "in-map", n[0] !== "list"), G(t, "for-maplibre", n[0] === "maplibre"), G(t, "for-leaflet", n[0] === "leaflet"), G(t, "list-icon", n[0] === "list");
357
357
  },
358
- m(r, u) {
359
- U(r, e, u), y(e, n);
358
+ m(i, o) {
359
+ Z(i, t, o), R(t, e);
360
360
  },
361
- p(r, [u]) {
362
- u & 1 && l !== (l = r[0] !== "list" ? void 0 : "20") && c(e, "width", l), u & 1 && N(e, "in-map", r[0] !== "list"), u & 1 && N(e, "for-maplibre", r[0] === "maplibre"), u & 1 && N(e, "for-leaflet", r[0] === "leaflet"), u & 1 && N(e, "list-icon", r[0] === "list");
361
+ p(i, [o]) {
362
+ o & 1 && r !== (r = i[0] !== "list" ? void 0 : "20") && d(t, "width", r), o & 1 && G(t, "in-map", i[0] !== "list"), o & 1 && G(t, "for-maplibre", i[0] === "maplibre"), o & 1 && G(t, "for-leaflet", i[0] === "leaflet"), o & 1 && G(t, "list-icon", i[0] === "list");
363
363
  },
364
- i: v,
365
- o: v,
366
- d(r) {
367
- r && K(e);
364
+ i: C,
365
+ o: C,
366
+ d(i) {
367
+ i && F(t);
368
368
  }
369
369
  };
370
370
  }
371
- function Ut(t, e, n) {
372
- let { displayIn: l } = e;
373
- return t.$$set = (r) => {
374
- "displayIn" in r && n(0, l = r.displayIn);
375
- }, [l];
371
+ function Rr(n, t, e) {
372
+ let { displayIn: r } = t;
373
+ return n.$$set = (i) => {
374
+ "displayIn" in i && e(0, r = i.displayIn);
375
+ }, [r];
376
376
  }
377
- class lt extends _e {
378
- constructor(e) {
379
- super(), he(this, e, Ut, Vt, de, { displayIn: 0 });
377
+ class $e extends Se {
378
+ constructor(t) {
379
+ super(), Ee(this, t, Rr, Ir, we, { displayIn: 0 });
380
380
  }
381
381
  }
382
- function Wt(t) {
383
- let e, n;
382
+ function Lr(n) {
383
+ let t, e;
384
384
  return {
385
385
  c() {
386
- e = ee("svg"), n = ee("path"), c(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"), c(e, "viewBox", "0 0 18 18"), c(e, "xml:space", "preserve"), c(e, "width", "20"), c(e, "class", "svelte-en2qvf");
386
+ t = ue("svg"), e = ue("path"), d(e, "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"), d(t, "viewBox", "0 0 18 18"), d(t, "xml:space", "preserve"), d(t, "width", "20"), d(t, "class", "svelte-en2qvf");
387
387
  },
388
- m(l, r) {
389
- U(l, e, r), y(e, n);
388
+ m(r, i) {
389
+ Z(r, t, i), R(t, e);
390
390
  },
391
- p: v,
392
- i: v,
393
- o: v,
394
- d(l) {
395
- l && K(e);
391
+ p: C,
392
+ i: C,
393
+ o: C,
394
+ d(r) {
395
+ r && F(t);
396
396
  }
397
397
  };
398
398
  }
399
- class Gt extends _e {
400
- constructor(e) {
401
- super(), he(this, e, null, Wt, de, {});
399
+ class Mr extends Se {
400
+ constructor(t) {
401
+ super(), Ee(this, t, null, Lr, we, {});
402
402
  }
403
403
  }
404
- function Ze(t, e, n) {
405
- const l = t.slice();
406
- return l[59] = e[n], l[61] = n, l;
404
+ function yt(n, t, e) {
405
+ const r = n.slice();
406
+ return r[59] = t[e], r[61] = e, r;
407
407
  }
408
- function xe(t) {
409
- let e, n;
410
- return e = new Qt({}), {
408
+ function dt(n) {
409
+ let t, e;
410
+ return t = new Pr({}), {
411
411
  c() {
412
- we(e.$$.fragment);
412
+ Ce(t.$$.fragment);
413
413
  },
414
- m(l, r) {
415
- ue(e, l, r), n = !0;
414
+ m(r, i) {
415
+ xe(t, r, i), e = !0;
416
416
  },
417
- i(l) {
418
- n || (P(e.$$.fragment, l), n = !0);
417
+ i(r) {
418
+ e || (N(t.$$.fragment, r), e = !0);
419
419
  },
420
- o(l) {
421
- q(e.$$.fragment, l), n = !1;
420
+ o(r) {
421
+ U(t.$$.fragment, r), e = !1;
422
422
  },
423
- d(l) {
424
- ae(e, l);
423
+ d(r) {
424
+ be(t, r);
425
425
  }
426
426
  };
427
427
  }
428
- function Je(t) {
429
- let e, n, l, r, u, o;
430
- return n = new Nt({}), {
428
+ function pt(n) {
429
+ let t, e, r, i, o, l;
430
+ return e = new wr({}), {
431
431
  c() {
432
- e = z("button"), we(n.$$.fragment), c(e, "type", "button"), c(e, "title", l = t[7] === !0 ? "toggle reverse geocoding" : t[7]), c(e, "class", "svelte-16s24r9"), N(e, "active", t[1]);
432
+ t = B("button"), Ce(e.$$.fragment), d(t, "type", "button"), d(t, "title", r = n[7] === !0 ? "toggle reverse geocoding" : n[7]), d(t, "class", "svelte-1h1zm6d"), G(t, "active", n[1]);
433
433
  },
434
- m(i, f) {
435
- U(i, e, f), ue(n, e, null), r = !0, u || (o = V(e, "click", t[47]), u = !0);
434
+ m(s, u) {
435
+ Z(s, t, u), xe(e, t, null), i = !0, o || (l = W(t, "click", n[47]), o = !0);
436
436
  },
437
- p(i, f) {
438
- (!r || f[0] & 128 && l !== (l = i[7] === !0 ? "toggle reverse geocoding" : i[7])) && c(e, "title", l), (!r || f[0] & 2) && N(e, "active", i[1]);
437
+ p(s, u) {
438
+ (!i || u[0] & 128 && r !== (r = s[7] === !0 ? "toggle reverse geocoding" : s[7])) && d(t, "title", r), (!i || u[0] & 2) && G(t, "active", s[1]);
439
439
  },
440
- i(i) {
441
- r || (P(n.$$.fragment, i), r = !0);
440
+ i(s) {
441
+ i || (N(e.$$.fragment, s), i = !0);
442
442
  },
443
- o(i) {
444
- q(n.$$.fragment, i), r = !1;
443
+ o(s) {
444
+ U(e.$$.fragment, s), i = !1;
445
445
  },
446
- d(i) {
447
- i && K(e), ae(n), u = !1, o();
446
+ d(s) {
447
+ s && F(t), be(e), o = !1, l();
448
448
  }
449
449
  };
450
450
  }
451
- function Ht(t) {
452
- let e, n, l, r, u = t[10], o = [];
453
- for (let f = 0; f < u.length; f += 1)
454
- o[f] = Ye(Ze(t, u, f));
455
- const i = (f) => q(o[f], 1, 1, () => {
456
- o[f] = null;
451
+ function Or(n) {
452
+ let t, e, r, i, o = n[10], l = [];
453
+ for (let u = 0; u < o.length; u += 1)
454
+ l[u] = _t(yt(n, o, u));
455
+ const s = (u) => U(l[u], 1, 1, () => {
456
+ l[u] = null;
457
457
  });
458
458
  return {
459
459
  c() {
460
- e = z("ul");
461
- for (let f = 0; f < o.length; f += 1)
462
- o[f].c();
463
- c(e, "class", "svelte-16s24r9");
464
- },
465
- m(f, a) {
466
- U(f, e, a);
467
- for (let d = 0; d < o.length; d += 1)
468
- o[d].m(e, null);
469
- n = !0, l || (r = [
470
- V(e, "mouseout", t[50]),
471
- V(e, "blur", t[51])
472
- ], l = !0);
473
- },
474
- p(f, a) {
475
- if (a[0] & 7425) {
476
- u = f[10];
477
- let d;
478
- for (d = 0; d < u.length; d += 1) {
479
- const b = Ze(f, u, d);
480
- o[d] ? (o[d].p(b, a), P(o[d], 1)) : (o[d] = Ye(b), o[d].c(), P(o[d], 1), o[d].m(e, null));
460
+ t = B("ul");
461
+ for (let u = 0; u < l.length; u += 1)
462
+ l[u].c();
463
+ d(t, "class", "svelte-1h1zm6d");
464
+ },
465
+ m(u, f) {
466
+ Z(u, t, f);
467
+ for (let a = 0; a < l.length; a += 1)
468
+ l[a].m(t, null);
469
+ e = !0, r || (i = [
470
+ W(t, "mouseout", n[50]),
471
+ W(t, "blur", n[51])
472
+ ], r = !0);
473
+ },
474
+ p(u, f) {
475
+ if (f[0] & 7425) {
476
+ o = u[10];
477
+ let a;
478
+ for (a = 0; a < o.length; a += 1) {
479
+ const v = yt(u, o, a);
480
+ l[a] ? (l[a].p(v, f), N(l[a], 1)) : (l[a] = _t(v), l[a].c(), N(l[a], 1), l[a].m(t, null));
481
481
  }
482
- for (Le(), d = u.length; d < o.length; d += 1)
483
- i(d);
484
- Ee();
482
+ for (qe(), a = o.length; a < l.length; a += 1)
483
+ s(a);
484
+ De();
485
485
  }
486
486
  },
487
- i(f) {
488
- if (!n) {
489
- for (let a = 0; a < u.length; a += 1)
490
- P(o[a]);
491
- n = !0;
487
+ i(u) {
488
+ if (!e) {
489
+ for (let f = 0; f < o.length; f += 1)
490
+ N(l[f]);
491
+ e = !0;
492
492
  }
493
493
  },
494
- o(f) {
495
- o = o.filter(Boolean);
496
- for (let a = 0; a < o.length; a += 1)
497
- q(o[a]);
498
- n = !1;
494
+ o(u) {
495
+ l = l.filter(Boolean);
496
+ for (let f = 0; f < l.length; f += 1)
497
+ U(l[f]);
498
+ e = !1;
499
499
  },
500
- d(f) {
501
- f && K(e), Lt(o, f), l = !1, te(r);
500
+ d(u) {
501
+ u && F(t), cr(l, u), r = !1, ae(i);
502
502
  }
503
503
  };
504
504
  }
505
- function Zt(t) {
506
- let e, n;
505
+ function Cr(n) {
506
+ let t, e;
507
507
  return {
508
508
  c() {
509
- e = z("div"), n = ie(t[5]), c(e, "class", "no-results svelte-16s24r9");
509
+ t = B("div"), e = de(n[5]), d(t, "class", "no-results svelte-1h1zm6d");
510
510
  },
511
- m(l, r) {
512
- U(l, e, r), y(e, n);
511
+ m(r, i) {
512
+ Z(r, t, i), R(t, e);
513
513
  },
514
- p(l, r) {
515
- r[0] & 32 && pe(n, l[5]);
514
+ p(r, i) {
515
+ i[0] & 32 && Me(e, r[5]);
516
516
  },
517
- i: v,
518
- o: v,
519
- d(l) {
520
- l && K(e);
517
+ i: C,
518
+ o: C,
519
+ d(r) {
520
+ r && F(t);
521
521
  }
522
522
  };
523
523
  }
524
- function xt(t) {
525
- let e, n;
524
+ function zr(n) {
525
+ let t, e;
526
526
  return {
527
527
  c() {
528
- e = z("div"), n = ie(t[4]), c(e, "class", "error svelte-16s24r9");
528
+ t = B("div"), e = de(n[4]), d(t, "class", "error svelte-1h1zm6d");
529
529
  },
530
- m(l, r) {
531
- U(l, e, r), y(e, n);
530
+ m(r, i) {
531
+ Z(r, t, i), R(t, e);
532
532
  },
533
- p(l, r) {
534
- r[0] & 16 && pe(n, l[4]);
533
+ p(r, i) {
534
+ i[0] & 16 && Me(e, r[4]);
535
535
  },
536
- i: v,
537
- o: v,
538
- d(l) {
539
- l && K(e);
536
+ i: C,
537
+ o: C,
538
+ d(r) {
539
+ r && F(t);
540
540
  }
541
541
  };
542
542
  }
543
- function Jt(t) {
544
- let e = "", n;
543
+ function Ar(n) {
544
+ let t = "", e;
545
545
  return {
546
546
  c() {
547
- n = ie(e);
547
+ e = de(t);
548
548
  },
549
- m(l, r) {
550
- U(l, n, r);
549
+ m(r, i) {
550
+ Z(r, e, i);
551
551
  },
552
- p: v,
553
- i: v,
554
- o: v,
555
- d(l) {
556
- l && K(n);
552
+ p: C,
553
+ i: C,
554
+ o: C,
555
+ d(r) {
556
+ r && F(e);
557
557
  }
558
558
  };
559
559
  }
560
- function Xe(t) {
561
- let e, n = t[59].place_type + "", l;
560
+ function mt(n) {
561
+ let t, e = n[59].place_type + "", r;
562
562
  return {
563
563
  c() {
564
- e = z("span"), l = ie(n), c(e, "class", "svelte-16s24r9");
564
+ t = B("span"), r = de(e), d(t, "class", "svelte-1h1zm6d");
565
565
  },
566
- m(r, u) {
567
- U(r, e, u), y(e, l);
566
+ m(i, o) {
567
+ Z(i, t, o), R(t, r);
568
568
  },
569
- p(r, u) {
570
- u[0] & 1024 && n !== (n = r[59].place_type + "") && pe(l, n);
569
+ p(i, o) {
570
+ o[0] & 1024 && e !== (e = i[59].place_type + "") && Me(r, e);
571
571
  },
572
- d(r) {
573
- r && K(e);
572
+ d(i) {
573
+ i && F(t);
574
574
  }
575
575
  };
576
576
  }
577
- function Ye(t) {
578
- let e, n, l, r, u, o, i = t[59].place_name.replace(/,.*/, "") + "", f, a, d, b, E, R = t[59].place_name.replace(/[^,]*,?\s*/, "") + "", h, g, m, w, M, W;
579
- n = new lt({ props: { displayIn: "list" } });
580
- let C = t[8] && Xe(t);
581
- function T() {
582
- return t[48](t[61]);
577
+ function _t(n) {
578
+ let t, e, r, i, o, l, s = n[59].place_name.replace(/,.*/, "") + "", u, f, a, v, p, y = n[59].place_name.replace(/[^,]*,?\s*/, "") + "", E, h, g, w, _, S;
579
+ e = new $e({ props: { displayIn: "list" } });
580
+ let m = n[8] && mt(n);
581
+ function b() {
582
+ return n[48](n[61]);
583
583
  }
584
- function p() {
585
- return t[49](t[59]);
584
+ function k() {
585
+ return n[49](n[59]);
586
586
  }
587
587
  return {
588
588
  c() {
589
- e = z("li"), we(n.$$.fragment), l = x(), r = z("span"), u = z("span"), o = z("span"), f = ie(i), a = x(), C && C.c(), d = x(), b = z("span"), E = z("span"), h = ie(R), g = x(), c(o, "class", "svelte-16s24r9"), c(u, "class", "svelte-16s24r9"), c(r, "class", "svelte-16s24r9"), c(E, "class", "svelte-16s24r9"), c(b, "class", "svelte-16s24r9"), c(e, "tabindex", "0"), c(e, "data-selected", m = t[12] === t[61]), c(e, "class", "svelte-16s24r9"), N(e, "selected", t[12] === t[61]);
589
+ t = B("li"), Ce(e.$$.fragment), r = te(), i = B("span"), o = B("span"), l = B("span"), u = de(s), f = te(), m && m.c(), a = te(), v = B("span"), p = B("span"), E = de(y), h = te(), d(l, "class", "svelte-1h1zm6d"), d(o, "class", "svelte-1h1zm6d"), d(i, "class", "svelte-1h1zm6d"), d(p, "class", "svelte-1h1zm6d"), d(v, "class", "svelte-1h1zm6d"), d(t, "tabindex", "0"), d(t, "data-selected", g = n[12] === n[61]), d(t, "class", "svelte-1h1zm6d"), G(t, "selected", n[12] === n[61]);
590
590
  },
591
- m(O, k) {
592
- U(O, e, k), ue(n, e, null), y(e, l), y(e, r), y(r, u), y(u, o), y(o, f), y(u, a), C && C.m(u, null), y(e, d), y(e, b), y(b, E), y(E, h), y(e, g), w = !0, M || (W = [
593
- V(e, "mouseover", T),
594
- V(e, "focus", p)
595
- ], M = !0);
591
+ m(M, P) {
592
+ Z(M, t, P), xe(e, t, null), R(t, r), R(t, i), R(i, o), R(o, l), R(l, u), R(o, f), m && m.m(o, null), R(t, a), R(t, v), R(v, p), R(p, E), R(t, h), w = !0, _ || (S = [
593
+ W(t, "mouseover", b),
594
+ W(t, "focus", k)
595
+ ], _ = !0);
596
596
  },
597
- p(O, k) {
598
- t = O, (!w || k[0] & 1024) && i !== (i = t[59].place_name.replace(/,.*/, "") + "") && pe(f, i), t[8] ? C ? C.p(t, k) : (C = Xe(t), C.c(), C.m(u, null)) : C && (C.d(1), C = null), (!w || k[0] & 1024) && R !== (R = t[59].place_name.replace(/[^,]*,?\s*/, "") + "") && pe(h, R), (!w || k[0] & 4096 && m !== (m = t[12] === t[61])) && c(e, "data-selected", m), (!w || k[0] & 4096) && N(e, "selected", t[12] === t[61]);
597
+ p(M, P) {
598
+ n = M, (!w || P[0] & 1024) && s !== (s = n[59].place_name.replace(/,.*/, "") + "") && Me(u, s), n[8] ? m ? m.p(n, P) : (m = mt(n), m.c(), m.m(o, null)) : m && (m.d(1), m = null), (!w || P[0] & 1024) && y !== (y = n[59].place_name.replace(/[^,]*,?\s*/, "") + "") && Me(E, y), (!w || P[0] & 4096 && g !== (g = n[12] === n[61])) && d(t, "data-selected", g), (!w || P[0] & 4096) && G(t, "selected", n[12] === n[61]);
599
599
  },
600
- i(O) {
601
- w || (P(n.$$.fragment, O), w = !0);
600
+ i(M) {
601
+ w || (N(e.$$.fragment, M), w = !0);
602
602
  },
603
- o(O) {
604
- q(n.$$.fragment, O), w = !1;
603
+ o(M) {
604
+ U(e.$$.fragment, M), w = !1;
605
605
  },
606
- d(O) {
607
- O && K(e), ae(n), C && C.d(), M = !1, te(W);
606
+ d(M) {
607
+ M && F(t), be(e), m && m.d(), _ = !1, ae(S);
608
608
  }
609
609
  };
610
610
  }
611
- function Xt(t) {
612
- let e, n, l, r, u, o, i, f, a, d, b, E, R, h, g, m, w, M, W, C;
613
- r = new Gt({}), d = new qt({});
614
- let T = t[16] && xe(), p = t[7] && Je(t);
615
- const O = t[39].default, k = kt(O, t, t[38], null), S = [Jt, xt, Zt, Ht], j = [];
616
- function ge(_, I) {
617
- var J, X;
618
- return _[13] ? _[15] ? 1 : ((J = _[10]) == null ? void 0 : J.length) === 0 ? 2 : _[13] && ((X = _[10]) == null ? void 0 : X.length) ? 3 : -1 : 0;
611
+ function Tr(n) {
612
+ let t, e, r, i, o, l, s, u, f, a, v, p, y, E, h, g, w, _, S, m;
613
+ i = new Mr({}), a = new Sr({});
614
+ let b = n[16] && dt(), k = n[7] && pt(n);
615
+ const M = n[39].default, P = sr(M, n, n[38], null), I = [Ar, zr, Cr, Or], z = [];
616
+ function V(x, O) {
617
+ var q, Y;
618
+ return x[13] ? x[15] ? 1 : ((q = x[10]) == null ? void 0 : q.length) === 0 ? 2 : x[13] && ((Y = x[10]) == null ? void 0 : Y.length) ? 3 : -1 : 0;
619
619
  }
620
- return ~(g = ge(t)) && (m = j[g] = S[g](t)), {
620
+ return ~(h = V(n)) && (g = z[h] = I[h](n)), {
621
621
  c() {
622
- e = z("form"), n = z("div"), l = z("button"), we(r.$$.fragment), u = x(), o = z("input"), i = x(), f = z("div"), a = z("button"), we(d.$$.fragment), b = x(), T && T.c(), E = x(), p && p.c(), R = x(), k && k.c(), h = x(), m && m.c(), c(l, "type", "button"), c(l, "class", "svelte-16s24r9"), c(o, "placeholder", t[3]), c(o, "aria-label", t[3]), c(o, "class", "svelte-16s24r9"), c(a, "type", "button"), c(a, "class", "svelte-16s24r9"), N(a, "displayable", t[0] !== ""), c(f, "class", "clear-button-container svelte-16s24r9"), c(n, "class", "input-group svelte-16s24r9"), c(e, "tabindex", "0"), c(e, "class", w = We(t[2]) + " svelte-16s24r9"), N(e, "can-collapse", t[6] && t[0] === "");
623
- },
624
- m(_, I) {
625
- U(_, e, I), y(e, n), y(n, l), ue(r, l, null), y(n, u), y(n, o), t[41](o), Ge(o, t[0]), y(n, i), y(n, f), y(f, a), ue(d, a, null), y(f, b), T && T.m(f, null), y(n, E), p && p.m(n, null), y(n, R), k && k.m(n, null), y(e, h), ~g && j[g].m(e, null), M = !0, W || (C = [
626
- V(l, "click", t[40]),
627
- V(o, "input", t[42]),
628
- V(o, "focus", t[43]),
629
- V(o, "blur", t[44]),
630
- V(o, "keydown", t[18]),
631
- V(o, "input", t[45]),
632
- V(a, "click", t[46]),
633
- V(e, "submit", Et(t[17]))
634
- ], W = !0);
635
- },
636
- p(_, I) {
637
- (!M || I[0] & 8) && c(o, "placeholder", _[3]), (!M || I[0] & 8) && c(o, "aria-label", _[3]), I[0] & 1 && o.value !== _[0] && Ge(o, _[0]), (!M || I[0] & 1) && N(a, "displayable", _[0] !== ""), _[16] ? T ? I[0] & 65536 && P(T, 1) : (T = xe(), T.c(), P(T, 1), T.m(f, null)) : T && (Le(), q(T, 1, 1, () => {
638
- T = null;
639
- }), Ee()), _[7] ? p ? (p.p(_, I), I[0] & 128 && P(p, 1)) : (p = Je(_), p.c(), P(p, 1), p.m(n, R)) : p && (Le(), q(p, 1, 1, () => {
640
- p = null;
641
- }), Ee()), k && k.p && (!M || I[1] & 128) && Ct(
642
- k,
643
- O,
644
- _,
645
- _[38],
646
- M ? Mt(O, _[38], I, null) : Tt(_[38]),
622
+ t = B("form"), e = B("div"), r = B("button"), Ce(i.$$.fragment), o = te(), l = B("input"), s = te(), u = B("div"), f = B("button"), Ce(a.$$.fragment), v = te(), b && b.c(), p = te(), k && k.c(), y = te(), P && P.c(), E = te(), g && g.c(), d(r, "type", "button"), d(r, "class", "svelte-1h1zm6d"), d(l, "placeholder", n[3]), d(l, "aria-label", n[3]), d(l, "class", "svelte-1h1zm6d"), d(f, "type", "button"), d(f, "class", "svelte-1h1zm6d"), G(f, "displayable", n[0] !== ""), d(u, "class", "clear-button-container svelte-1h1zm6d"), d(e, "class", "input-group svelte-1h1zm6d"), d(t, "tabindex", "0"), d(t, "class", w = ht(n[2]) + " svelte-1h1zm6d"), G(t, "can-collapse", n[6] && n[0] === "");
623
+ },
624
+ m(x, O) {
625
+ Z(x, t, O), R(t, e), R(e, r), xe(i, r, null), R(e, o), R(e, l), n[41](l), gt(l, n[0]), R(e, s), R(e, u), R(u, f), xe(a, f, null), R(u, v), b && b.m(u, null), R(e, p), k && k.m(e, null), R(e, y), P && P.m(e, null), R(t, E), ~h && z[h].m(t, null), _ = !0, S || (m = [
626
+ W(r, "click", n[40]),
627
+ W(l, "input", n[42]),
628
+ W(l, "focus", n[43]),
629
+ W(l, "blur", n[44]),
630
+ W(l, "keydown", n[18]),
631
+ W(l, "input", n[45]),
632
+ W(f, "click", n[46]),
633
+ W(t, "submit", hr(n[17]))
634
+ ], S = !0);
635
+ },
636
+ p(x, O) {
637
+ (!_ || O[0] & 8) && d(l, "placeholder", x[3]), (!_ || O[0] & 8) && d(l, "aria-label", x[3]), O[0] & 1 && l.value !== x[0] && gt(l, x[0]), (!_ || O[0] & 1) && G(f, "displayable", x[0] !== ""), x[16] ? b ? O[0] & 65536 && N(b, 1) : (b = dt(), b.c(), N(b, 1), b.m(u, null)) : b && (qe(), U(b, 1, 1, () => {
638
+ b = null;
639
+ }), De()), x[7] ? k ? (k.p(x, O), O[0] & 128 && N(k, 1)) : (k = pt(x), k.c(), N(k, 1), k.m(e, y)) : k && (qe(), U(k, 1, 1, () => {
640
+ k = null;
641
+ }), De()), P && P.p && (!_ || O[1] & 128) && fr(
642
+ P,
643
+ M,
644
+ x,
645
+ x[38],
646
+ _ ? ur(M, x[38], O, null) : ar(x[38]),
647
647
  null
648
648
  );
649
- let J = g;
650
- g = ge(_), g === J ? ~g && j[g].p(_, I) : (m && (Le(), q(j[J], 1, 1, () => {
651
- j[J] = null;
652
- }), Ee()), ~g ? (m = j[g], m ? m.p(_, I) : (m = j[g] = S[g](_), m.c()), P(m, 1), m.m(e, null)) : m = null), (!M || I[0] & 4 && w !== (w = We(_[2]) + " svelte-16s24r9")) && c(e, "class", w), (!M || I[0] & 69) && N(e, "can-collapse", _[6] && _[0] === "");
649
+ let q = h;
650
+ h = V(x), h === q ? ~h && z[h].p(x, O) : (g && (qe(), U(z[q], 1, 1, () => {
651
+ z[q] = null;
652
+ }), De()), ~h ? (g = z[h], g ? g.p(x, O) : (g = z[h] = I[h](x), g.c()), N(g, 1), g.m(t, null)) : g = null), (!_ || O[0] & 4 && w !== (w = ht(x[2]) + " svelte-1h1zm6d")) && d(t, "class", w), (!_ || O[0] & 69) && G(t, "can-collapse", x[6] && x[0] === "");
653
653
  },
654
- i(_) {
655
- M || (P(r.$$.fragment, _), P(d.$$.fragment, _), P(T), P(p), P(k, _), P(m), M = !0);
654
+ i(x) {
655
+ _ || (N(i.$$.fragment, x), N(a.$$.fragment, x), N(b), N(k), N(P, x), N(g), _ = !0);
656
656
  },
657
- o(_) {
658
- q(r.$$.fragment, _), q(d.$$.fragment, _), q(T), q(p), q(k, _), q(m), M = !1;
657
+ o(x) {
658
+ U(i.$$.fragment, x), U(a.$$.fragment, x), U(b), U(k), U(P, x), U(g), _ = !1;
659
659
  },
660
- d(_) {
661
- _ && K(e), ae(r), t[41](null), ae(d), T && T.d(), p && p.d(), k && k.d(_), ~g && j[g].d(), W = !1, te(C);
660
+ d(x) {
661
+ x && F(t), be(i), n[41](null), be(a), b && b.d(), k && k.d(), P && P.d(x), ~h && z[h].d(), S = !1, ae(m);
662
662
  }
663
663
  };
664
664
  }
665
- function Yt(t, e, n) {
666
- let l, { $$slots: r = {}, $$scope: u } = e, { class: o = void 0 } = e, { mapController: i = void 0 } = e, { apiKey: f } = e, { debounceSearch: a = 200 } = e, { placeholder: d = "Search" } = e, { errorMessage: b = "Searching failed" } = e, { noResultsMessage: E = "No results found" } = e, { proximity: R = void 0 } = e, { bbox: h = void 0 } = e, { trackProximity: g = !0 } = e, { minLength: m = 2 } = e, { language: w = void 0 } = e, { showResultsWhileTyping: M = !0 } = e, { zoom: W = 16 } = e, { flyTo: C = !0 } = e, { collapsed: T = !1 } = e, { clearOnBlur: p = !1 } = e, { enableReverse: O = !1 } = e, { filter: k = () => !0 } = e, { searchValue: S = "" } = e, { reverseActive: j = !1 } = e, { showPlaceType: ge = !1 } = e;
667
- function _() {
668
- Y.focus();
665
+ function Nr(n, t, e) {
666
+ let r, { $$slots: i = {}, $$scope: o } = t, { class: l = void 0 } = t, { mapController: s = void 0 } = t, { apiKey: u } = t, { debounceSearch: f = 200 } = t, { placeholder: a = "Search" } = t, { errorMessage: v = "Searching failed" } = t, { noResultsMessage: p = "No results found" } = t, { proximity: y = void 0 } = t, { bbox: E = void 0 } = t, { trackProximity: h = !0 } = t, { minLength: g = 2 } = t, { language: w = void 0 } = t, { showResultsWhileTyping: _ = !0 } = t, { zoom: S = 16 } = t, { flyTo: m = !0 } = t, { collapsed: b = !1 } = t, { clearOnBlur: k = !1 } = t, { enableReverse: M = !1 } = t, { filter: P = () => !0 } = t, { searchValue: I = "" } = t, { reverseActive: z = !1 } = t, { showPlaceType: V = !1 } = t;
667
+ function x() {
668
+ J.focus();
669
669
  }
670
- function I() {
671
- Y.blur();
670
+ function O() {
671
+ J.blur();
672
672
  }
673
- function J(s, Q = !0) {
674
- n(0, S = s), Q && (n(12, A = -1), Ne());
673
+ function q(c, X = !0) {
674
+ e(0, I = c), X ? (e(12, T = -1), ut()) : (Xe(), setTimeout(() => {
675
+ J.focus(), J.select();
676
+ }));
675
677
  }
676
- let X = !1, L, D, B, je = "", Y, A = -1, ne, Oe = [], le, Re, Se;
677
- const F = Bt();
678
- It(() => {
679
- i && (i.setProximityChangeHandler(void 0), i.setMapClickHandler(void 0), i.indicateReverse(!1), i.setSelectedMarker(-1), i.setMarkers(void 0, void 0));
678
+ let Y = !1, A, Q, L, st = "", J, T = -1, re, Ae = [], ce, Fe, Ve;
679
+ const ne = dr();
680
+ yr(() => {
681
+ s && (s.setProximityChangeHandler(void 0), s.setMapClickHandler(void 0), s.indicateReverse(!1), s.setSelectedMarker(-1), s.setMarkers(void 0, void 0));
680
682
  });
681
- function Ne() {
682
- A > -1 && L ? (n(11, B = L[A]), n(0, S = B.place_name.replace(/,.*/, "")), n(15, ne = void 0), n(36, D = void 0), n(12, A = -1)) : S && De(S).then(() => {
683
- n(36, D = L), n(11, B = void 0), rt();
684
- }).catch((s) => n(15, ne = s));
685
- }
686
- async function De(s) {
687
- n(15, ne = void 0);
688
- const Q = /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(s), H = new URLSearchParams();
689
- H.set("key", f), w && H.set("language", String(w)), Q || (h && H.set("bbox", h.join(",")), R && H.set("proximity", R.join(",")));
690
- const re = "https://api.maptiler.com/geocoding/" + encodeURIComponent(s) + ".json?" + H.toString();
691
- if (re === je) {
692
- n(10, L = Oe);
683
+ function ut() {
684
+ T > -1 && A ? (e(11, L = A[T]), e(0, I = L.place_name.replace(/,.*/, "")), e(15, re = void 0), e(36, Q = void 0), e(12, T = -1)) : I && Ye(I).then(() => {
685
+ e(36, Q = A), e(11, L = void 0), Ft();
686
+ }).catch((c) => e(15, re = c));
687
+ }
688
+ async function Ye(c, X = !1) {
689
+ e(15, re = void 0);
690
+ const he = /^-?\d+(\.\d+)?,-?\d+(\.\d+)?$/.test(c), ie = new URLSearchParams();
691
+ ie.set("key", u), w && ie.set("language", String(w)), he || (E && ie.set("bbox", E.join(",")), y && ie.set("proximity", y.join(",")));
692
+ const ge = "https://api.maptiler.com/geocoding/" + encodeURIComponent(c) + ".json?" + ie.toString();
693
+ if (ge === st) {
694
+ X ? (e(10, A = void 0), e(11, L = Ae[0])) : e(10, A = Ae);
693
695
  return;
694
696
  }
695
- je = re, le == null || le.abort(), n(16, le = new AbortController());
696
- let ce;
697
+ st = ge, ce == null || ce.abort(), e(16, ce = new AbortController());
698
+ let pe;
697
699
  try {
698
- ce = await fetch(re, { signal: le.signal }).finally(() => {
699
- n(16, le = void 0);
700
+ pe = await fetch(ge, { signal: ce.signal }).finally(() => {
701
+ e(16, ce = void 0);
700
702
  });
701
- } catch (fe) {
702
- if (fe && typeof fe == "object" && fe.name === "AbortError")
703
+ } catch (_e) {
704
+ if (_e && typeof _e == "object" && _e.name === "AbortError")
703
705
  return;
704
706
  throw new Error();
705
707
  }
706
- if (!ce.ok)
708
+ if (!pe.ok)
707
709
  throw new Error();
708
- const me = await ce.json();
709
- F("response", { url: re, featureCollection: me }), n(10, L = me.features.filter(k)), Oe = L, Q && Y.focus();
710
+ const me = await pe.json();
711
+ ne("response", { url: ge, featureCollection: me }), X ? (e(10, A = void 0), e(11, L = me.features[0]), Ae = [L]) : (e(10, A = me.features.filter(P)), Ae = A, he && J.focus());
710
712
  }
711
- function rt() {
712
- var Q, H, re, ce, me, fe, Ke, Qe;
713
- if (!(D != null && D.length) || !C)
713
+ function Ft() {
714
+ var X, he, ie, ge, pe, me, _e, ft;
715
+ if (!(Q != null && Q.length) || !m)
714
716
  return;
715
- const s = [180, 90, -180, -90];
716
- for (const $ of D)
717
- s[0] = Math.min(s[0], (H = (Q = $.bbox) == null ? void 0 : Q[0]) != null ? H : $.center[0]), s[1] = Math.min(s[1], (ce = (re = $.bbox) == null ? void 0 : re[1]) != null ? ce : $.center[1]), s[2] = Math.max(s[2], (fe = (me = $.bbox) == null ? void 0 : me[2]) != null ? fe : $.center[0]), s[3] = Math.max(s[3], (Qe = (Ke = $.bbox) == null ? void 0 : Ke[3]) != null ? Qe : $.center[1]);
718
- i && D.length > 0 && (B && s[0] === s[2] && s[1] === s[3] ? i.flyTo(B.center, W) : i.fitBounds(s, 50));
717
+ const c = [180, 90, -180, -90];
718
+ for (const oe of Q)
719
+ c[0] = Math.min(c[0], (he = (X = oe.bbox) == null ? void 0 : X[0]) != null ? he : oe.center[0]), c[1] = Math.min(c[1], (ge = (ie = oe.bbox) == null ? void 0 : ie[1]) != null ? ge : oe.center[1]), c[2] = Math.max(c[2], (me = (pe = oe.bbox) == null ? void 0 : pe[2]) != null ? me : oe.center[0]), c[3] = Math.max(c[3], (ft = (_e = oe.bbox) == null ? void 0 : _e[3]) != null ? ft : oe.center[1]);
720
+ s && Q.length > 0 && (L && c[0] === c[2] && c[1] === c[3] ? s.flyTo(L.center, S) : s.fitBounds(c, 50));
719
721
  }
720
- function st(s) {
721
- n(1, j = !1), J(s[0].toFixed(6) + "," + s[1].toFixed(6));
722
+ function Vt(c) {
723
+ e(1, z = !1), q(c[0].toFixed(6) + "," + c[1].toFixed(6));
722
724
  }
723
- function ot(s) {
724
- if (!L)
725
+ function Yt(c) {
726
+ if (!A)
725
727
  return;
726
- let Q = s.key === "ArrowDown" ? 1 : s.key === "ArrowUp" ? -1 : 0;
727
- Q ? (A === -1 && Q === -1 && n(12, A = L.length), n(12, A += Q), A >= L.length && n(12, A = -1), s.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(s.key) && n(12, A = -1);
728
- }
729
- function qe(s = !0) {
730
- if (M && S.length > m) {
731
- Re && clearTimeout(Re);
732
- const Q = S;
733
- Re = window.setTimeout(
728
+ let X = c.key === "ArrowDown" ? 1 : c.key === "ArrowUp" ? -1 : 0;
729
+ X ? (T === -1 && X === -1 && e(12, T = A.length), e(12, T += X), T >= A.length && e(12, T = -1), c.preventDefault()) : ["ArrowLeft", "ArrowRight", "Home", "End"].includes(c.key) && e(12, T = -1);
730
+ }
731
+ function Xe(c = !0) {
732
+ if (_ && I.length > g) {
733
+ Fe && clearTimeout(Fe);
734
+ const X = I;
735
+ Fe = window.setTimeout(
734
736
  () => {
735
- De(Q).catch((H) => n(15, ne = H));
737
+ Ye(X).catch((he) => e(15, re = he));
736
738
  },
737
- s ? a : 0
739
+ c ? f : 0
738
740
  );
739
741
  } else
740
- n(10, L = void 0), n(15, ne = void 0);
742
+ e(10, A = void 0), e(15, re = void 0);
741
743
  }
742
- const it = () => Y.focus();
743
- function ct(s) {
744
- Ae[s ? "unshift" : "push"](() => {
745
- Y = s, n(14, Y);
744
+ const Xt = () => J.focus();
745
+ function Wt(c) {
746
+ He[c ? "unshift" : "push"](() => {
747
+ J = c, e(14, J);
746
748
  });
747
749
  }
748
- function ft() {
749
- S = this.value, n(0, S), n(9, X), n(31, p);
750
+ function Zt() {
751
+ I = this.value, e(0, I), e(9, Y), e(31, k);
750
752
  }
751
- const ut = () => n(9, X = !0), at = () => n(9, X = !1), dt = () => qe(), ht = () => {
752
- n(0, S = ""), Y.focus();
753
- }, _t = () => n(1, j = !j), gt = (s) => n(12, A = s), mt = (s) => {
754
- n(11, B = s), n(0, S = s.place_name.replace(/,.*/, "")), n(12, A = -1);
755
- }, yt = () => n(12, A = -1), bt = () => {
753
+ const jt = () => e(9, Y = !0), Ht = () => e(9, Y = !1), Kt = () => Xe(), Jt = () => {
754
+ e(0, I = ""), J.focus();
755
+ }, $t = () => e(1, z = !z), er = (c) => e(12, T = c), tr = (c) => {
756
+ e(11, L = c), e(0, I = c.place_name.replace(/,.*/, "")), e(12, T = -1);
757
+ }, rr = () => e(12, T = -1), nr = () => {
756
758
  };
757
- return t.$$set = (s) => {
758
- "class" in s && n(2, o = s.class), "mapController" in s && n(21, i = s.mapController), "apiKey" in s && n(22, f = s.apiKey), "debounceSearch" in s && n(23, a = s.debounceSearch), "placeholder" in s && n(3, d = s.placeholder), "errorMessage" in s && n(4, b = s.errorMessage), "noResultsMessage" in s && n(5, E = s.noResultsMessage), "proximity" in s && n(20, R = s.proximity), "bbox" in s && n(24, h = s.bbox), "trackProximity" in s && n(25, g = s.trackProximity), "minLength" in s && n(26, m = s.minLength), "language" in s && n(27, w = s.language), "showResultsWhileTyping" in s && n(28, M = s.showResultsWhileTyping), "zoom" in s && n(29, W = s.zoom), "flyTo" in s && n(30, C = s.flyTo), "collapsed" in s && n(6, T = s.collapsed), "clearOnBlur" in s && n(31, p = s.clearOnBlur), "enableReverse" in s && n(7, O = s.enableReverse), "filter" in s && n(32, k = s.filter), "searchValue" in s && n(0, S = s.searchValue), "reverseActive" in s && n(1, j = s.reverseActive), "showPlaceType" in s && n(8, ge = s.showPlaceType), "$$scope" in s && n(38, u = s.$$scope);
759
- }, t.$$.update = () => {
760
- t.$$.dirty[0] & 35651584 && i && i.setProximityChangeHandler(g ? (s) => {
761
- n(20, R = s);
762
- } : void 0), t.$$.dirty[0] & 33554432 && (g || n(20, R = void 0)), t.$$.dirty[0] & 512 | t.$$.dirty[1] & 1 && setTimeout(() => {
763
- n(13, Se = X), p && !X && n(0, S = "");
764
- }), t.$$.dirty[0] & 1025 && (S || (n(11, B = void 0), n(10, L = void 0), n(15, ne = void 0), n(36, D = L))), t.$$.dirty[0] & 1612711936 && i && B && C && (!B.bbox || B.bbox[0] === B.bbox[2] && B.bbox[1] === B.bbox[3] ? i.flyTo(B.center, W) : i.fitBounds(B.bbox, 0), n(10, L = void 0), n(36, D = void 0), n(12, A = -1)), t.$$.dirty[0] & 1024 | t.$$.dirty[1] & 32 && D !== L && n(36, D = void 0), t.$$.dirty[0] & 2099200 | t.$$.dirty[1] & 32 && i && i.setMarkers(D, B), t.$$.dirty[0] & 1 && n(12, A = -1), t.$$.dirty[0] & 2101248 && (i == null || i.setSelectedMarker(A)), t.$$.dirty[0] & 5120 && n(37, l = L == null ? void 0 : L[A]), t.$$.dirty[1] & 64 && F("select", l), t.$$.dirty[0] & 2048 && F("pick", B), t.$$.dirty[0] & 9216 && F("optionsVisibilityChange", Se && !!L), t.$$.dirty[0] & 1024 && F("featuresListed", L), t.$$.dirty[1] & 32 && F("featuresMarked", D), t.$$.dirty[0] & 2 && F("reverseToggle", j), t.$$.dirty[0] & 1 && F("queryChange", S), t.$$.dirty[0] & 2097154 && i && i.indicateReverse(j), t.$$.dirty[0] & 2097154 && i && i.setMapClickHandler(j ? st : void 0);
759
+ return n.$$set = (c) => {
760
+ "class" in c && e(2, l = c.class), "mapController" in c && e(21, s = c.mapController), "apiKey" in c && e(22, u = c.apiKey), "debounceSearch" in c && e(23, f = c.debounceSearch), "placeholder" in c && e(3, a = c.placeholder), "errorMessage" in c && e(4, v = c.errorMessage), "noResultsMessage" in c && e(5, p = c.noResultsMessage), "proximity" in c && e(20, y = c.proximity), "bbox" in c && e(24, E = c.bbox), "trackProximity" in c && e(25, h = c.trackProximity), "minLength" in c && e(26, g = c.minLength), "language" in c && e(27, w = c.language), "showResultsWhileTyping" in c && e(28, _ = c.showResultsWhileTyping), "zoom" in c && e(29, S = c.zoom), "flyTo" in c && e(30, m = c.flyTo), "collapsed" in c && e(6, b = c.collapsed), "clearOnBlur" in c && e(31, k = c.clearOnBlur), "enableReverse" in c && e(7, M = c.enableReverse), "filter" in c && e(32, P = c.filter), "searchValue" in c && e(0, I = c.searchValue), "reverseActive" in c && e(1, z = c.reverseActive), "showPlaceType" in c && e(8, V = c.showPlaceType), "$$scope" in c && e(38, o = c.$$scope);
761
+ }, n.$$.update = () => {
762
+ n.$$.dirty[0] & 35651584 && s && s.setProximityChangeHandler(h ? (c) => {
763
+ e(20, y = c);
764
+ } : void 0), n.$$.dirty[0] & 33554432 && (h || e(20, y = void 0)), n.$$.dirty[0] & 512 | n.$$.dirty[1] & 1 && setTimeout(() => {
765
+ e(13, Ve = Y), k && !Y && e(0, I = "");
766
+ }), n.$$.dirty[0] & 1025 && (I || (e(11, L = void 0), e(10, A = void 0), e(15, re = void 0), e(36, Q = A))), n.$$.dirty[0] & 2048 && L && !L.address && L.geometry.type === "Point" && Ye(L.id, !0).catch((c) => e(15, re = c)), n.$$.dirty[0] & 1612711936 && s && L && m && (!L.bbox || L.bbox[0] === L.bbox[2] && L.bbox[1] === L.bbox[3] ? s.flyTo(L.center, S) : s.fitBounds(L.bbox, 50), e(10, A = void 0), e(36, Q = void 0), e(12, T = -1)), n.$$.dirty[0] & 1024 | n.$$.dirty[1] & 32 && Q !== A && e(36, Q = void 0), n.$$.dirty[0] & 2099200 | n.$$.dirty[1] & 32 && s && s.setMarkers(Q, L), n.$$.dirty[0] & 1 && e(12, T = -1), n.$$.dirty[0] & 2101248 && (s == null || s.setSelectedMarker(T)), n.$$.dirty[0] & 5120 && e(37, r = A == null ? void 0 : A[T]), n.$$.dirty[1] & 64 && ne("select", r), n.$$.dirty[0] & 2048 && ne("pick", L), n.$$.dirty[0] & 9216 && ne("optionsVisibilityChange", Ve && !!A), n.$$.dirty[0] & 1024 && ne("featuresListed", A), n.$$.dirty[1] & 32 && ne("featuresMarked", Q), n.$$.dirty[0] & 2 && ne("reverseToggle", z), n.$$.dirty[0] & 1 && ne("queryChange", I), n.$$.dirty[0] & 2097154 && s && s.indicateReverse(z), n.$$.dirty[0] & 2097154 && s && s.setMapClickHandler(z ? Vt : void 0);
765
767
  }, [
766
- S,
767
- j,
768
- o,
769
- d,
768
+ I,
769
+ z,
770
+ l,
771
+ a,
772
+ v,
773
+ p,
770
774
  b,
771
- E,
772
- T,
773
- O,
774
- ge,
775
- X,
776
- L,
777
- B,
778
- A,
779
- Se,
775
+ M,
776
+ V,
780
777
  Y,
781
- ne,
782
- le,
783
- Ne,
784
- ot,
785
- qe,
786
- R,
787
- i,
778
+ A,
779
+ L,
780
+ T,
781
+ Ve,
782
+ J,
783
+ re,
784
+ ce,
785
+ ut,
786
+ Yt,
787
+ Xe,
788
+ y,
789
+ s,
790
+ u,
788
791
  f,
789
- a,
792
+ E,
790
793
  h,
791
794
  g,
792
- m,
793
795
  w,
794
- M,
795
- W,
796
- C,
797
- p,
798
- k,
799
796
  _,
800
- I,
801
- J,
802
- D,
803
- l,
804
- u,
797
+ S,
798
+ m,
799
+ k,
800
+ P,
801
+ x,
802
+ O,
803
+ q,
804
+ Q,
805
805
  r,
806
- it,
807
- ct,
808
- ft,
809
- ut,
810
- at,
811
- dt,
812
- ht,
813
- _t,
814
- gt,
815
- mt,
816
- yt,
817
- bt
806
+ o,
807
+ i,
808
+ Xt,
809
+ Wt,
810
+ Zt,
811
+ jt,
812
+ Ht,
813
+ Kt,
814
+ Jt,
815
+ $t,
816
+ er,
817
+ tr,
818
+ rr,
819
+ nr
818
820
  ];
819
821
  }
820
- class Ft extends _e {
821
- constructor(e) {
822
- super(), he(
822
+ class Br extends Se {
823
+ constructor(t) {
824
+ super(), Ee(
823
825
  this,
824
- e,
825
- Yt,
826
- Xt,
827
- de,
826
+ t,
827
+ Nr,
828
+ Tr,
829
+ we,
828
830
  {
829
831
  class: 2,
830
832
  mapController: 21,
@@ -866,87 +868,1478 @@ class Ft extends _e {
866
868
  return this.$$.ctx[35];
867
869
  }
868
870
  }
869
- function $t(t, e, n = !0, l = !0, r = {}, u = {}) {
870
- let o, i, f, a = [], d;
871
- const b = (h) => {
872
- i == null || i([h.lngLat.lng, h.lngLat.lat]);
873
- }, E = () => {
871
+ function Gt(n, t, e) {
872
+ e === void 0 && (e = {});
873
+ var r = { type: "Feature" };
874
+ return (e.id === 0 || e.id) && (r.id = e.id), e.bbox && (r.bbox = e.bbox), r.properties = t || {}, r.geometry = n, r;
875
+ }
876
+ function qt(n, t, e) {
877
+ e === void 0 && (e = {});
878
+ for (var r = 0, i = n; r < i.length; r++) {
879
+ var o = i[r];
880
+ if (o.length < 4)
881
+ throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");
882
+ for (var l = 0; l < o[o.length - 1].length; l++)
883
+ if (o[o.length - 1][l] !== o[0][l])
884
+ throw new Error("First and last Position are not equivalent.");
885
+ }
886
+ var s = {
887
+ type: "Polygon",
888
+ coordinates: n
889
+ };
890
+ return Gt(s, t, e);
891
+ }
892
+ function Dt(n, t, e) {
893
+ e === void 0 && (e = {});
894
+ var r = {
895
+ type: "MultiPolygon",
896
+ coordinates: n
897
+ };
898
+ return Gt(r, t, e);
899
+ }
900
+ /**
901
+ * splaytree v3.1.1
902
+ * Fast Splay tree for Node and browser
903
+ *
904
+ * @author Alexander Milevski <info@w8r.name>
905
+ * @license MIT
906
+ * @preserve
907
+ */
908
+ /*! *****************************************************************************
909
+ Copyright (c) Microsoft Corporation. All rights reserved.
910
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
911
+ this file except in compliance with the License. You may obtain a copy of the
912
+ License at http://www.apache.org/licenses/LICENSE-2.0
913
+
914
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
915
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
916
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
917
+ MERCHANTABLITY OR NON-INFRINGEMENT.
918
+
919
+ See the Apache Version 2.0 License for specific language governing permissions
920
+ and limitations under the License.
921
+ ***************************************************************************** */
922
+ function Gr(n, t) {
923
+ var e = { label: 0, sent: function() {
924
+ if (o[0] & 1)
925
+ throw o[1];
926
+ return o[1];
927
+ }, trys: [], ops: [] }, r, i, o, l;
928
+ return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
929
+ return this;
930
+ }), l;
931
+ function s(f) {
932
+ return function(a) {
933
+ return u([f, a]);
934
+ };
935
+ }
936
+ function u(f) {
937
+ if (r)
938
+ throw new TypeError("Generator is already executing.");
939
+ for (; e; )
940
+ try {
941
+ if (r = 1, i && (o = f[0] & 2 ? i.return : f[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, f[1])).done)
942
+ return o;
943
+ switch (i = 0, o && (f = [f[0] & 2, o.value]), f[0]) {
944
+ case 0:
945
+ case 1:
946
+ o = f;
947
+ break;
948
+ case 4:
949
+ return e.label++, { value: f[1], done: !1 };
950
+ case 5:
951
+ e.label++, i = f[1], f = [0];
952
+ continue;
953
+ case 7:
954
+ f = e.ops.pop(), e.trys.pop();
955
+ continue;
956
+ default:
957
+ if (o = e.trys, !(o = o.length > 0 && o[o.length - 1]) && (f[0] === 6 || f[0] === 2)) {
958
+ e = 0;
959
+ continue;
960
+ }
961
+ if (f[0] === 3 && (!o || f[1] > o[0] && f[1] < o[3])) {
962
+ e.label = f[1];
963
+ break;
964
+ }
965
+ if (f[0] === 6 && e.label < o[1]) {
966
+ e.label = o[1], o = f;
967
+ break;
968
+ }
969
+ if (o && e.label < o[2]) {
970
+ e.label = o[2], e.ops.push(f);
971
+ break;
972
+ }
973
+ o[2] && e.ops.pop(), e.trys.pop();
974
+ continue;
975
+ }
976
+ f = t.call(n, e);
977
+ } catch (a) {
978
+ f = [6, a], i = 0;
979
+ } finally {
980
+ r = o = 0;
981
+ }
982
+ if (f[0] & 5)
983
+ throw f[1];
984
+ return { value: f[0] ? f[1] : void 0, done: !0 };
985
+ }
986
+ }
987
+ var fe = function() {
988
+ function n(t, e) {
989
+ this.next = null, this.key = t, this.data = e, this.left = null, this.right = null;
990
+ }
991
+ return n;
992
+ }();
993
+ function qr(n, t) {
994
+ return n > t ? 1 : n < t ? -1 : 0;
995
+ }
996
+ function le(n, t, e) {
997
+ for (var r = new fe(null, null), i = r, o = r; ; ) {
998
+ var l = e(n, t.key);
999
+ if (l < 0) {
1000
+ if (t.left === null)
1001
+ break;
1002
+ if (e(n, t.left.key) < 0) {
1003
+ var s = t.left;
1004
+ if (t.left = s.right, s.right = t, t = s, t.left === null)
1005
+ break;
1006
+ }
1007
+ o.left = t, o = t, t = t.left;
1008
+ } else if (l > 0) {
1009
+ if (t.right === null)
1010
+ break;
1011
+ if (e(n, t.right.key) > 0) {
1012
+ var s = t.right;
1013
+ if (t.right = s.left, s.left = t, t = s, t.right === null)
1014
+ break;
1015
+ }
1016
+ i.right = t, i = t, t = t.right;
1017
+ } else
1018
+ break;
1019
+ }
1020
+ return i.right = t.left, o.left = t.right, t.left = r.right, t.right = r.left, t;
1021
+ }
1022
+ function je(n, t, e, r) {
1023
+ var i = new fe(n, t);
1024
+ if (e === null)
1025
+ return i.left = i.right = null, i;
1026
+ e = le(n, e, r);
1027
+ var o = r(n, e.key);
1028
+ return o < 0 ? (i.left = e.left, i.right = e, e.left = null) : o >= 0 && (i.right = e.right, i.left = e, e.right = null), i;
1029
+ }
1030
+ function xt(n, t, e) {
1031
+ var r = null, i = null;
1032
+ if (t) {
1033
+ t = le(n, t, e);
1034
+ var o = e(t.key, n);
1035
+ o === 0 ? (r = t.left, i = t.right) : o < 0 ? (i = t.right, t.right = null, r = t) : (r = t.left, t.left = null, i = t);
1036
+ }
1037
+ return { left: r, right: i };
1038
+ }
1039
+ function Dr(n, t, e) {
1040
+ return t === null ? n : (n === null || (t = le(n.key, t, e), t.left = n), t);
1041
+ }
1042
+ function et(n, t, e, r, i) {
1043
+ if (n) {
1044
+ r("" + t + (e ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ") + i(n) + `
1045
+ `);
1046
+ var o = t + (e ? " " : "\u2502 ");
1047
+ n.left && et(n.left, o, !1, r, i), n.right && et(n.right, o, !0, r, i);
1048
+ }
1049
+ }
1050
+ var lt = function() {
1051
+ function n(t) {
1052
+ t === void 0 && (t = qr), this._root = null, this._size = 0, this._comparator = t;
1053
+ }
1054
+ return n.prototype.insert = function(t, e) {
1055
+ return this._size++, this._root = je(t, e, this._root, this._comparator);
1056
+ }, n.prototype.add = function(t, e) {
1057
+ var r = new fe(t, e);
1058
+ this._root === null && (r.left = r.right = null, this._size++, this._root = r);
1059
+ var i = this._comparator, o = le(t, this._root, i), l = i(t, o.key);
1060
+ return l === 0 ? this._root = o : (l < 0 ? (r.left = o.left, r.right = o, o.left = null) : l > 0 && (r.right = o.right, r.left = o, o.right = null), this._size++, this._root = r), this._root;
1061
+ }, n.prototype.remove = function(t) {
1062
+ this._root = this._remove(t, this._root, this._comparator);
1063
+ }, n.prototype._remove = function(t, e, r) {
1064
+ var i;
1065
+ if (e === null)
1066
+ return null;
1067
+ e = le(t, e, r);
1068
+ var o = r(t, e.key);
1069
+ return o === 0 ? (e.left === null ? i = e.right : (i = le(t, e.left, r), i.right = e.right), this._size--, i) : e;
1070
+ }, n.prototype.pop = function() {
1071
+ var t = this._root;
1072
+ if (t) {
1073
+ for (; t.left; )
1074
+ t = t.left;
1075
+ return this._root = le(t.key, this._root, this._comparator), this._root = this._remove(t.key, this._root, this._comparator), { key: t.key, data: t.data };
1076
+ }
1077
+ return null;
1078
+ }, n.prototype.findStatic = function(t) {
1079
+ for (var e = this._root, r = this._comparator; e; ) {
1080
+ var i = r(t, e.key);
1081
+ if (i === 0)
1082
+ return e;
1083
+ i < 0 ? e = e.left : e = e.right;
1084
+ }
1085
+ return null;
1086
+ }, n.prototype.find = function(t) {
1087
+ return this._root && (this._root = le(t, this._root, this._comparator), this._comparator(t, this._root.key) !== 0) ? null : this._root;
1088
+ }, n.prototype.contains = function(t) {
1089
+ for (var e = this._root, r = this._comparator; e; ) {
1090
+ var i = r(t, e.key);
1091
+ if (i === 0)
1092
+ return !0;
1093
+ i < 0 ? e = e.left : e = e.right;
1094
+ }
1095
+ return !1;
1096
+ }, n.prototype.forEach = function(t, e) {
1097
+ for (var r = this._root, i = [], o = !1; !o; )
1098
+ r !== null ? (i.push(r), r = r.left) : i.length !== 0 ? (r = i.pop(), t.call(e, r), r = r.right) : o = !0;
1099
+ return this;
1100
+ }, n.prototype.range = function(t, e, r, i) {
1101
+ for (var o = [], l = this._comparator, s = this._root, u; o.length !== 0 || s; )
1102
+ if (s)
1103
+ o.push(s), s = s.left;
1104
+ else {
1105
+ if (s = o.pop(), u = l(s.key, e), u > 0)
1106
+ break;
1107
+ if (l(s.key, t) >= 0 && r.call(i, s))
1108
+ return this;
1109
+ s = s.right;
1110
+ }
1111
+ return this;
1112
+ }, n.prototype.keys = function() {
1113
+ var t = [];
1114
+ return this.forEach(function(e) {
1115
+ var r = e.key;
1116
+ return t.push(r);
1117
+ }), t;
1118
+ }, n.prototype.values = function() {
1119
+ var t = [];
1120
+ return this.forEach(function(e) {
1121
+ var r = e.data;
1122
+ return t.push(r);
1123
+ }), t;
1124
+ }, n.prototype.min = function() {
1125
+ return this._root ? this.minNode(this._root).key : null;
1126
+ }, n.prototype.max = function() {
1127
+ return this._root ? this.maxNode(this._root).key : null;
1128
+ }, n.prototype.minNode = function(t) {
1129
+ if (t === void 0 && (t = this._root), t)
1130
+ for (; t.left; )
1131
+ t = t.left;
1132
+ return t;
1133
+ }, n.prototype.maxNode = function(t) {
1134
+ if (t === void 0 && (t = this._root), t)
1135
+ for (; t.right; )
1136
+ t = t.right;
1137
+ return t;
1138
+ }, n.prototype.at = function(t) {
1139
+ for (var e = this._root, r = !1, i = 0, o = []; !r; )
1140
+ if (e)
1141
+ o.push(e), e = e.left;
1142
+ else if (o.length > 0) {
1143
+ if (e = o.pop(), i === t)
1144
+ return e;
1145
+ i++, e = e.right;
1146
+ } else
1147
+ r = !0;
1148
+ return null;
1149
+ }, n.prototype.next = function(t) {
1150
+ var e = this._root, r = null;
1151
+ if (t.right) {
1152
+ for (r = t.right; r.left; )
1153
+ r = r.left;
1154
+ return r;
1155
+ }
1156
+ for (var i = this._comparator; e; ) {
1157
+ var o = i(t.key, e.key);
1158
+ if (o === 0)
1159
+ break;
1160
+ o < 0 ? (r = e, e = e.left) : e = e.right;
1161
+ }
1162
+ return r;
1163
+ }, n.prototype.prev = function(t) {
1164
+ var e = this._root, r = null;
1165
+ if (t.left !== null) {
1166
+ for (r = t.left; r.right; )
1167
+ r = r.right;
1168
+ return r;
1169
+ }
1170
+ for (var i = this._comparator; e; ) {
1171
+ var o = i(t.key, e.key);
1172
+ if (o === 0)
1173
+ break;
1174
+ o < 0 ? e = e.left : (r = e, e = e.right);
1175
+ }
1176
+ return r;
1177
+ }, n.prototype.clear = function() {
1178
+ return this._root = null, this._size = 0, this;
1179
+ }, n.prototype.toList = function() {
1180
+ return Ur(this._root);
1181
+ }, n.prototype.load = function(t, e, r) {
1182
+ e === void 0 && (e = []), r === void 0 && (r = !1);
1183
+ var i = t.length, o = this._comparator;
1184
+ if (r && nt(t, e, 0, i - 1, o), this._root === null)
1185
+ this._root = tt(t, e, 0, i), this._size = i;
1186
+ else {
1187
+ var l = Fr(this.toList(), Qr(t, e), o);
1188
+ i = this._size + i, this._root = rt({ head: l }, 0, i);
1189
+ }
1190
+ return this;
1191
+ }, n.prototype.isEmpty = function() {
1192
+ return this._root === null;
1193
+ }, Object.defineProperty(n.prototype, "size", {
1194
+ get: function() {
1195
+ return this._size;
1196
+ },
1197
+ enumerable: !0,
1198
+ configurable: !0
1199
+ }), Object.defineProperty(n.prototype, "root", {
1200
+ get: function() {
1201
+ return this._root;
1202
+ },
1203
+ enumerable: !0,
1204
+ configurable: !0
1205
+ }), n.prototype.toString = function(t) {
1206
+ t === void 0 && (t = function(r) {
1207
+ return String(r.key);
1208
+ });
1209
+ var e = [];
1210
+ return et(this._root, "", !0, function(r) {
1211
+ return e.push(r);
1212
+ }, t), e.join("");
1213
+ }, n.prototype.update = function(t, e, r) {
1214
+ var i = this._comparator, o = xt(t, this._root, i), l = o.left, s = o.right;
1215
+ i(t, e) < 0 ? s = je(e, r, s, i) : l = je(e, r, l, i), this._root = Dr(l, s, i);
1216
+ }, n.prototype.split = function(t) {
1217
+ return xt(t, this._root, this._comparator);
1218
+ }, n.prototype[Symbol.iterator] = function() {
1219
+ var t;
1220
+ return Gr(this, function(e) {
1221
+ switch (e.label) {
1222
+ case 0:
1223
+ t = this.minNode(), e.label = 1;
1224
+ case 1:
1225
+ return t ? [4, t] : [3, 3];
1226
+ case 2:
1227
+ return e.sent(), t = this.next(t), [3, 1];
1228
+ case 3:
1229
+ return [2];
1230
+ }
1231
+ });
1232
+ }, n;
1233
+ }();
1234
+ function tt(n, t, e, r) {
1235
+ var i = r - e;
1236
+ if (i > 0) {
1237
+ var o = e + Math.floor(i / 2), l = n[o], s = t[o], u = new fe(l, s);
1238
+ return u.left = tt(n, t, e, o), u.right = tt(n, t, o + 1, r), u;
1239
+ }
1240
+ return null;
1241
+ }
1242
+ function Qr(n, t) {
1243
+ for (var e = new fe(null, null), r = e, i = 0; i < n.length; i++)
1244
+ r = r.next = new fe(n[i], t[i]);
1245
+ return r.next = null, e.next;
1246
+ }
1247
+ function Ur(n) {
1248
+ for (var t = n, e = [], r = !1, i = new fe(null, null), o = i; !r; )
1249
+ t ? (e.push(t), t = t.left) : e.length > 0 ? (t = o = o.next = e.pop(), t = t.right) : r = !0;
1250
+ return o.next = null, i.next;
1251
+ }
1252
+ function rt(n, t, e) {
1253
+ var r = e - t;
1254
+ if (r > 0) {
1255
+ var i = t + Math.floor(r / 2), o = rt(n, t, i), l = n.head;
1256
+ return l.left = o, n.head = n.head.next, l.right = rt(n, i + 1, e), l;
1257
+ }
1258
+ return null;
1259
+ }
1260
+ function Fr(n, t, e) {
1261
+ for (var r = new fe(null, null), i = r, o = n, l = t; o !== null && l !== null; )
1262
+ e(o.key, l.key) < 0 ? (i.next = o, o = o.next) : (i.next = l, l = l.next), i = i.next;
1263
+ return o !== null ? i.next = o : l !== null && (i.next = l), r.next;
1264
+ }
1265
+ function nt(n, t, e, r, i) {
1266
+ if (!(e >= r)) {
1267
+ for (var o = n[e + r >> 1], l = e - 1, s = r + 1; ; ) {
1268
+ do
1269
+ l++;
1270
+ while (i(n[l], o) < 0);
1271
+ do
1272
+ s--;
1273
+ while (i(n[s], o) > 0);
1274
+ if (l >= s)
1275
+ break;
1276
+ var u = n[l];
1277
+ n[l] = n[s], n[s] = u, u = t[l], t[l] = t[s], t[s] = u;
1278
+ }
1279
+ nt(n, t, e, s, i), nt(n, t, s + 1, r, i);
1280
+ }
1281
+ }
1282
+ function j(n, t) {
1283
+ if (!(n instanceof t))
1284
+ throw new TypeError("Cannot call a class as a function");
1285
+ }
1286
+ function bt(n, t) {
1287
+ for (var e = 0; e < t.length; e++) {
1288
+ var r = t[e];
1289
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, r.key, r);
1290
+ }
1291
+ }
1292
+ function D(n, t, e) {
1293
+ return t && bt(n.prototype, t), e && bt(n, e), n;
1294
+ }
1295
+ var ke = function(t, e) {
1296
+ return t.ll.x <= e.x && e.x <= t.ur.x && t.ll.y <= e.y && e.y <= t.ur.y;
1297
+ }, it = function(t, e) {
1298
+ if (e.ur.x < t.ll.x || t.ur.x < e.ll.x || e.ur.y < t.ll.y || t.ur.y < e.ll.y)
1299
+ return null;
1300
+ var r = t.ll.x < e.ll.x ? e.ll.x : t.ll.x, i = t.ur.x < e.ur.x ? t.ur.x : e.ur.x, o = t.ll.y < e.ll.y ? e.ll.y : t.ll.y, l = t.ur.y < e.ur.y ? t.ur.y : e.ur.y;
1301
+ return {
1302
+ ll: {
1303
+ x: r,
1304
+ y: o
1305
+ },
1306
+ ur: {
1307
+ x: i,
1308
+ y: l
1309
+ }
1310
+ };
1311
+ }, se = Number.EPSILON;
1312
+ se === void 0 && (se = Math.pow(2, -52));
1313
+ var Vr = se * se, ot = function(t, e) {
1314
+ if (-se < t && t < se && -se < e && e < se)
1315
+ return 0;
1316
+ var r = t - e;
1317
+ return r * r < Vr * t * e ? 0 : t < e ? -1 : 1;
1318
+ }, Yr = /* @__PURE__ */ function() {
1319
+ function n() {
1320
+ j(this, n), this.reset();
1321
+ }
1322
+ return D(n, [{
1323
+ key: "reset",
1324
+ value: function() {
1325
+ this.xRounder = new wt(), this.yRounder = new wt();
1326
+ }
1327
+ }, {
1328
+ key: "round",
1329
+ value: function(e, r) {
1330
+ return {
1331
+ x: this.xRounder.round(e),
1332
+ y: this.yRounder.round(r)
1333
+ };
1334
+ }
1335
+ }]), n;
1336
+ }(), wt = /* @__PURE__ */ function() {
1337
+ function n() {
1338
+ j(this, n), this.tree = new lt(), this.round(0);
1339
+ }
1340
+ return D(n, [{
1341
+ key: "round",
1342
+ value: function(e) {
1343
+ var r = this.tree.add(e), i = this.tree.prev(r);
1344
+ if (i !== null && ot(r.key, i.key) === 0)
1345
+ return this.tree.remove(e), i.key;
1346
+ var o = this.tree.next(r);
1347
+ return o !== null && ot(r.key, o.key) === 0 ? (this.tree.remove(e), o.key) : e;
1348
+ }
1349
+ }]), n;
1350
+ }(), ze = new Yr(), Re = function(t, e) {
1351
+ return t.x * e.y - t.y * e.x;
1352
+ }, Qt = function(t, e) {
1353
+ return t.x * e.x + t.y * e.y;
1354
+ }, Et = function(t, e, r) {
1355
+ var i = {
1356
+ x: e.x - t.x,
1357
+ y: e.y - t.y
1358
+ }, o = {
1359
+ x: r.x - t.x,
1360
+ y: r.y - t.y
1361
+ }, l = Re(i, o);
1362
+ return ot(l, 0);
1363
+ }, Qe = function(t) {
1364
+ return Math.sqrt(Qt(t, t));
1365
+ }, Xr = function(t, e, r) {
1366
+ var i = {
1367
+ x: e.x - t.x,
1368
+ y: e.y - t.y
1369
+ }, o = {
1370
+ x: r.x - t.x,
1371
+ y: r.y - t.y
1372
+ };
1373
+ return Re(o, i) / Qe(o) / Qe(i);
1374
+ }, Wr = function(t, e, r) {
1375
+ var i = {
1376
+ x: e.x - t.x,
1377
+ y: e.y - t.y
1378
+ }, o = {
1379
+ x: r.x - t.x,
1380
+ y: r.y - t.y
1381
+ };
1382
+ return Qt(o, i) / Qe(o) / Qe(i);
1383
+ }, St = function(t, e, r) {
1384
+ return e.y === 0 ? null : {
1385
+ x: t.x + e.x / e.y * (r - t.y),
1386
+ y: r
1387
+ };
1388
+ }, kt = function(t, e, r) {
1389
+ return e.x === 0 ? null : {
1390
+ x: r,
1391
+ y: t.y + e.y / e.x * (r - t.x)
1392
+ };
1393
+ }, Zr = function(t, e, r, i) {
1394
+ if (e.x === 0)
1395
+ return kt(r, i, t.x);
1396
+ if (i.x === 0)
1397
+ return kt(t, e, r.x);
1398
+ if (e.y === 0)
1399
+ return St(r, i, t.y);
1400
+ if (i.y === 0)
1401
+ return St(t, e, r.y);
1402
+ var o = Re(e, i);
1403
+ if (o == 0)
1404
+ return null;
1405
+ var l = {
1406
+ x: r.x - t.x,
1407
+ y: r.y - t.y
1408
+ }, s = Re(l, e) / o, u = Re(l, i) / o, f = t.x + u * e.x, a = r.x + s * i.x, v = t.y + u * e.y, p = r.y + s * i.y, y = (f + a) / 2, E = (v + p) / 2;
1409
+ return {
1410
+ x: y,
1411
+ y: E
1412
+ };
1413
+ }, ee = /* @__PURE__ */ function() {
1414
+ D(n, null, [{
1415
+ key: "compare",
1416
+ value: function(e, r) {
1417
+ var i = n.comparePoints(e.point, r.point);
1418
+ return i !== 0 ? i : (e.point !== r.point && e.link(r), e.isLeft !== r.isLeft ? e.isLeft ? 1 : -1 : Ue.compare(e.segment, r.segment));
1419
+ }
1420
+ }, {
1421
+ key: "comparePoints",
1422
+ value: function(e, r) {
1423
+ return e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0;
1424
+ }
1425
+ }]);
1426
+ function n(t, e) {
1427
+ j(this, n), t.events === void 0 ? t.events = [this] : t.events.push(this), this.point = t, this.isLeft = e;
1428
+ }
1429
+ return D(n, [{
1430
+ key: "link",
1431
+ value: function(e) {
1432
+ if (e.point === this.point)
1433
+ throw new Error("Tried to link already linked events");
1434
+ for (var r = e.point.events, i = 0, o = r.length; i < o; i++) {
1435
+ var l = r[i];
1436
+ this.point.events.push(l), l.point = this.point;
1437
+ }
1438
+ this.checkForConsuming();
1439
+ }
1440
+ }, {
1441
+ key: "checkForConsuming",
1442
+ value: function() {
1443
+ for (var e = this.point.events.length, r = 0; r < e; r++) {
1444
+ var i = this.point.events[r];
1445
+ if (i.segment.consumedBy === void 0)
1446
+ for (var o = r + 1; o < e; o++) {
1447
+ var l = this.point.events[o];
1448
+ l.consumedBy === void 0 && i.otherSE.point.events === l.otherSE.point.events && i.segment.consume(l.segment);
1449
+ }
1450
+ }
1451
+ }
1452
+ }, {
1453
+ key: "getAvailableLinkedEvents",
1454
+ value: function() {
1455
+ for (var e = [], r = 0, i = this.point.events.length; r < i; r++) {
1456
+ var o = this.point.events[r];
1457
+ o !== this && !o.segment.ringOut && o.segment.isInResult() && e.push(o);
1458
+ }
1459
+ return e;
1460
+ }
1461
+ }, {
1462
+ key: "getLeftmostComparator",
1463
+ value: function(e) {
1464
+ var r = this, i = /* @__PURE__ */ new Map(), o = function(s) {
1465
+ var u = s.otherSE;
1466
+ i.set(s, {
1467
+ sine: Xr(r.point, e.point, u.point),
1468
+ cosine: Wr(r.point, e.point, u.point)
1469
+ });
1470
+ };
1471
+ return function(l, s) {
1472
+ i.has(l) || o(l), i.has(s) || o(s);
1473
+ var u = i.get(l), f = u.sine, a = u.cosine, v = i.get(s), p = v.sine, y = v.cosine;
1474
+ return f >= 0 && p >= 0 ? a < y ? 1 : a > y ? -1 : 0 : f < 0 && p < 0 ? a < y ? -1 : a > y ? 1 : 0 : p < f ? -1 : p > f ? 1 : 0;
1475
+ };
1476
+ }
1477
+ }]), n;
1478
+ }(), jr = 0, Ue = /* @__PURE__ */ function() {
1479
+ D(n, null, [{
1480
+ key: "compare",
1481
+ value: function(e, r) {
1482
+ var i = e.leftSE.point.x, o = r.leftSE.point.x, l = e.rightSE.point.x, s = r.rightSE.point.x;
1483
+ if (s < i)
1484
+ return 1;
1485
+ if (l < o)
1486
+ return -1;
1487
+ var u = e.leftSE.point.y, f = r.leftSE.point.y, a = e.rightSE.point.y, v = r.rightSE.point.y;
1488
+ if (i < o) {
1489
+ if (f < u && f < a)
1490
+ return 1;
1491
+ if (f > u && f > a)
1492
+ return -1;
1493
+ var p = e.comparePoint(r.leftSE.point);
1494
+ if (p < 0)
1495
+ return 1;
1496
+ if (p > 0)
1497
+ return -1;
1498
+ var y = r.comparePoint(e.rightSE.point);
1499
+ return y !== 0 ? y : -1;
1500
+ }
1501
+ if (i > o) {
1502
+ if (u < f && u < v)
1503
+ return -1;
1504
+ if (u > f && u > v)
1505
+ return 1;
1506
+ var E = r.comparePoint(e.leftSE.point);
1507
+ if (E !== 0)
1508
+ return E;
1509
+ var h = e.comparePoint(r.rightSE.point);
1510
+ return h < 0 ? 1 : h > 0 ? -1 : 1;
1511
+ }
1512
+ if (u < f)
1513
+ return -1;
1514
+ if (u > f)
1515
+ return 1;
1516
+ if (l < s) {
1517
+ var g = r.comparePoint(e.rightSE.point);
1518
+ if (g !== 0)
1519
+ return g;
1520
+ }
1521
+ if (l > s) {
1522
+ var w = e.comparePoint(r.rightSE.point);
1523
+ if (w < 0)
1524
+ return 1;
1525
+ if (w > 0)
1526
+ return -1;
1527
+ }
1528
+ if (l !== s) {
1529
+ var _ = a - u, S = l - i, m = v - f, b = s - o;
1530
+ if (_ > S && m < b)
1531
+ return 1;
1532
+ if (_ < S && m > b)
1533
+ return -1;
1534
+ }
1535
+ return l > s ? 1 : l < s || a < v ? -1 : a > v ? 1 : e.id < r.id ? -1 : e.id > r.id ? 1 : 0;
1536
+ }
1537
+ }]);
1538
+ function n(t, e, r, i) {
1539
+ j(this, n), this.id = ++jr, this.leftSE = t, t.segment = this, t.otherSE = e, this.rightSE = e, e.segment = this, e.otherSE = t, this.rings = r, this.windings = i;
1540
+ }
1541
+ return D(n, [{
1542
+ key: "replaceRightSE",
1543
+ value: function(e) {
1544
+ this.rightSE = e, this.rightSE.segment = this, this.rightSE.otherSE = this.leftSE, this.leftSE.otherSE = this.rightSE;
1545
+ }
1546
+ }, {
1547
+ key: "bbox",
1548
+ value: function() {
1549
+ var e = this.leftSE.point.y, r = this.rightSE.point.y;
1550
+ return {
1551
+ ll: {
1552
+ x: this.leftSE.point.x,
1553
+ y: e < r ? e : r
1554
+ },
1555
+ ur: {
1556
+ x: this.rightSE.point.x,
1557
+ y: e > r ? e : r
1558
+ }
1559
+ };
1560
+ }
1561
+ }, {
1562
+ key: "vector",
1563
+ value: function() {
1564
+ return {
1565
+ x: this.rightSE.point.x - this.leftSE.point.x,
1566
+ y: this.rightSE.point.y - this.leftSE.point.y
1567
+ };
1568
+ }
1569
+ }, {
1570
+ key: "isAnEndpoint",
1571
+ value: function(e) {
1572
+ return e.x === this.leftSE.point.x && e.y === this.leftSE.point.y || e.x === this.rightSE.point.x && e.y === this.rightSE.point.y;
1573
+ }
1574
+ }, {
1575
+ key: "comparePoint",
1576
+ value: function(e) {
1577
+ if (this.isAnEndpoint(e))
1578
+ return 0;
1579
+ var r = this.leftSE.point, i = this.rightSE.point, o = this.vector();
1580
+ if (r.x === i.x)
1581
+ return e.x === r.x ? 0 : e.x < r.x ? 1 : -1;
1582
+ var l = (e.y - r.y) / o.y, s = r.x + l * o.x;
1583
+ if (e.x === s)
1584
+ return 0;
1585
+ var u = (e.x - r.x) / o.x, f = r.y + u * o.y;
1586
+ return e.y === f ? 0 : e.y < f ? -1 : 1;
1587
+ }
1588
+ }, {
1589
+ key: "getIntersection",
1590
+ value: function(e) {
1591
+ var r = this.bbox(), i = e.bbox(), o = it(r, i);
1592
+ if (o === null)
1593
+ return null;
1594
+ var l = this.leftSE.point, s = this.rightSE.point, u = e.leftSE.point, f = e.rightSE.point, a = ke(r, u) && this.comparePoint(u) === 0, v = ke(i, l) && e.comparePoint(l) === 0, p = ke(r, f) && this.comparePoint(f) === 0, y = ke(i, s) && e.comparePoint(s) === 0;
1595
+ if (v && a)
1596
+ return y && !p ? s : !y && p ? f : null;
1597
+ if (v)
1598
+ return p && l.x === f.x && l.y === f.y ? null : l;
1599
+ if (a)
1600
+ return y && s.x === u.x && s.y === u.y ? null : u;
1601
+ if (y && p)
1602
+ return null;
1603
+ if (y)
1604
+ return s;
1605
+ if (p)
1606
+ return f;
1607
+ var E = Zr(l, this.vector(), u, e.vector());
1608
+ return E === null || !ke(o, E) ? null : ze.round(E.x, E.y);
1609
+ }
1610
+ }, {
1611
+ key: "split",
1612
+ value: function(e) {
1613
+ var r = [], i = e.events !== void 0, o = new ee(e, !0), l = new ee(e, !1), s = this.rightSE;
1614
+ this.replaceRightSE(l), r.push(l), r.push(o);
1615
+ var u = new n(o, s, this.rings.slice(), this.windings.slice());
1616
+ return ee.comparePoints(u.leftSE.point, u.rightSE.point) > 0 && u.swapEvents(), ee.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (o.checkForConsuming(), l.checkForConsuming()), r;
1617
+ }
1618
+ }, {
1619
+ key: "swapEvents",
1620
+ value: function() {
1621
+ var e = this.rightSE;
1622
+ this.rightSE = this.leftSE, this.leftSE = e, this.leftSE.isLeft = !0, this.rightSE.isLeft = !1;
1623
+ for (var r = 0, i = this.windings.length; r < i; r++)
1624
+ this.windings[r] *= -1;
1625
+ }
1626
+ }, {
1627
+ key: "consume",
1628
+ value: function(e) {
1629
+ for (var r = this, i = e; r.consumedBy; )
1630
+ r = r.consumedBy;
1631
+ for (; i.consumedBy; )
1632
+ i = i.consumedBy;
1633
+ var o = n.compare(r, i);
1634
+ if (o !== 0) {
1635
+ if (o > 0) {
1636
+ var l = r;
1637
+ r = i, i = l;
1638
+ }
1639
+ if (r.prev === i) {
1640
+ var s = r;
1641
+ r = i, i = s;
1642
+ }
1643
+ for (var u = 0, f = i.rings.length; u < f; u++) {
1644
+ var a = i.rings[u], v = i.windings[u], p = r.rings.indexOf(a);
1645
+ p === -1 ? (r.rings.push(a), r.windings.push(v)) : r.windings[p] += v;
1646
+ }
1647
+ i.rings = null, i.windings = null, i.consumedBy = r, i.leftSE.consumedBy = r.leftSE, i.rightSE.consumedBy = r.rightSE;
1648
+ }
1649
+ }
1650
+ }, {
1651
+ key: "prevInResult",
1652
+ value: function() {
1653
+ return this._prevInResult !== void 0 ? this._prevInResult : (this.prev ? this.prev.isInResult() ? this._prevInResult = this.prev : this._prevInResult = this.prev.prevInResult() : this._prevInResult = null, this._prevInResult);
1654
+ }
1655
+ }, {
1656
+ key: "beforeState",
1657
+ value: function() {
1658
+ if (this._beforeState !== void 0)
1659
+ return this._beforeState;
1660
+ if (!this.prev)
1661
+ this._beforeState = {
1662
+ rings: [],
1663
+ windings: [],
1664
+ multiPolys: []
1665
+ };
1666
+ else {
1667
+ var e = this.prev.consumedBy || this.prev;
1668
+ this._beforeState = e.afterState();
1669
+ }
1670
+ return this._beforeState;
1671
+ }
1672
+ }, {
1673
+ key: "afterState",
1674
+ value: function() {
1675
+ if (this._afterState !== void 0)
1676
+ return this._afterState;
1677
+ var e = this.beforeState();
1678
+ this._afterState = {
1679
+ rings: e.rings.slice(0),
1680
+ windings: e.windings.slice(0),
1681
+ multiPolys: []
1682
+ };
1683
+ for (var r = this._afterState.rings, i = this._afterState.windings, o = this._afterState.multiPolys, l = 0, s = this.rings.length; l < s; l++) {
1684
+ var u = this.rings[l], f = this.windings[l], a = r.indexOf(u);
1685
+ a === -1 ? (r.push(u), i.push(f)) : i[a] += f;
1686
+ }
1687
+ for (var v = [], p = [], y = 0, E = r.length; y < E; y++)
1688
+ if (i[y] !== 0) {
1689
+ var h = r[y], g = h.poly;
1690
+ if (p.indexOf(g) === -1)
1691
+ if (h.isExterior)
1692
+ v.push(g);
1693
+ else {
1694
+ p.indexOf(g) === -1 && p.push(g);
1695
+ var w = v.indexOf(h.poly);
1696
+ w !== -1 && v.splice(w, 1);
1697
+ }
1698
+ }
1699
+ for (var _ = 0, S = v.length; _ < S; _++) {
1700
+ var m = v[_].multiPoly;
1701
+ o.indexOf(m) === -1 && o.push(m);
1702
+ }
1703
+ return this._afterState;
1704
+ }
1705
+ }, {
1706
+ key: "isInResult",
1707
+ value: function() {
1708
+ if (this.consumedBy)
1709
+ return !1;
1710
+ if (this._isInResult !== void 0)
1711
+ return this._isInResult;
1712
+ var e = this.beforeState().multiPolys, r = this.afterState().multiPolys;
1713
+ switch (K.type) {
1714
+ case "union": {
1715
+ var i = e.length === 0, o = r.length === 0;
1716
+ this._isInResult = i !== o;
1717
+ break;
1718
+ }
1719
+ case "intersection": {
1720
+ var l, s;
1721
+ e.length < r.length ? (l = e.length, s = r.length) : (l = r.length, s = e.length), this._isInResult = s === K.numMultiPolys && l < s;
1722
+ break;
1723
+ }
1724
+ case "xor": {
1725
+ var u = Math.abs(e.length - r.length);
1726
+ this._isInResult = u % 2 === 1;
1727
+ break;
1728
+ }
1729
+ case "difference": {
1730
+ var f = function(v) {
1731
+ return v.length === 1 && v[0].isSubject;
1732
+ };
1733
+ this._isInResult = f(e) !== f(r);
1734
+ break;
1735
+ }
1736
+ default:
1737
+ throw new Error("Unrecognized operation type found ".concat(K.type));
1738
+ }
1739
+ return this._isInResult;
1740
+ }
1741
+ }], [{
1742
+ key: "fromRing",
1743
+ value: function(e, r, i) {
1744
+ var o, l, s, u = ee.comparePoints(e, r);
1745
+ if (u < 0)
1746
+ o = e, l = r, s = 1;
1747
+ else if (u > 0)
1748
+ o = r, l = e, s = -1;
1749
+ else
1750
+ throw new Error("Tried to create degenerate segment at [".concat(e.x, ", ").concat(e.y, "]"));
1751
+ var f = new ee(o, !0), a = new ee(l, !1);
1752
+ return new n(f, a, [i], [s]);
1753
+ }
1754
+ }]), n;
1755
+ }(), Pt = /* @__PURE__ */ function() {
1756
+ function n(t, e, r) {
1757
+ if (j(this, n), !Array.isArray(t) || t.length === 0)
1758
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1759
+ if (this.poly = e, this.isExterior = r, this.segments = [], typeof t[0][0] != "number" || typeof t[0][1] != "number")
1760
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1761
+ var i = ze.round(t[0][0], t[0][1]);
1762
+ this.bbox = {
1763
+ ll: {
1764
+ x: i.x,
1765
+ y: i.y
1766
+ },
1767
+ ur: {
1768
+ x: i.x,
1769
+ y: i.y
1770
+ }
1771
+ };
1772
+ for (var o = i, l = 1, s = t.length; l < s; l++) {
1773
+ if (typeof t[l][0] != "number" || typeof t[l][1] != "number")
1774
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1775
+ var u = ze.round(t[l][0], t[l][1]);
1776
+ u.x === o.x && u.y === o.y || (this.segments.push(Ue.fromRing(o, u, this)), u.x < this.bbox.ll.x && (this.bbox.ll.x = u.x), u.y < this.bbox.ll.y && (this.bbox.ll.y = u.y), u.x > this.bbox.ur.x && (this.bbox.ur.x = u.x), u.y > this.bbox.ur.y && (this.bbox.ur.y = u.y), o = u);
1777
+ }
1778
+ (i.x !== o.x || i.y !== o.y) && this.segments.push(Ue.fromRing(o, i, this));
1779
+ }
1780
+ return D(n, [{
1781
+ key: "getSweepEvents",
1782
+ value: function() {
1783
+ for (var e = [], r = 0, i = this.segments.length; r < i; r++) {
1784
+ var o = this.segments[r];
1785
+ e.push(o.leftSE), e.push(o.rightSE);
1786
+ }
1787
+ return e;
1788
+ }
1789
+ }]), n;
1790
+ }(), Hr = /* @__PURE__ */ function() {
1791
+ function n(t, e) {
1792
+ if (j(this, n), !Array.isArray(t))
1793
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1794
+ this.exteriorRing = new Pt(t[0], this, !0), this.bbox = {
1795
+ ll: {
1796
+ x: this.exteriorRing.bbox.ll.x,
1797
+ y: this.exteriorRing.bbox.ll.y
1798
+ },
1799
+ ur: {
1800
+ x: this.exteriorRing.bbox.ur.x,
1801
+ y: this.exteriorRing.bbox.ur.y
1802
+ }
1803
+ }, this.interiorRings = [];
1804
+ for (var r = 1, i = t.length; r < i; r++) {
1805
+ var o = new Pt(t[r], this, !1);
1806
+ o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.interiorRings.push(o);
1807
+ }
1808
+ this.multiPoly = e;
1809
+ }
1810
+ return D(n, [{
1811
+ key: "getSweepEvents",
1812
+ value: function() {
1813
+ for (var e = this.exteriorRing.getSweepEvents(), r = 0, i = this.interiorRings.length; r < i; r++)
1814
+ for (var o = this.interiorRings[r].getSweepEvents(), l = 0, s = o.length; l < s; l++)
1815
+ e.push(o[l]);
1816
+ return e;
1817
+ }
1818
+ }]), n;
1819
+ }(), It = /* @__PURE__ */ function() {
1820
+ function n(t, e) {
1821
+ if (j(this, n), !Array.isArray(t))
1822
+ throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
1823
+ try {
1824
+ typeof t[0][0][0] == "number" && (t = [t]);
1825
+ } catch {
1826
+ }
1827
+ this.polys = [], this.bbox = {
1828
+ ll: {
1829
+ x: Number.POSITIVE_INFINITY,
1830
+ y: Number.POSITIVE_INFINITY
1831
+ },
1832
+ ur: {
1833
+ x: Number.NEGATIVE_INFINITY,
1834
+ y: Number.NEGATIVE_INFINITY
1835
+ }
1836
+ };
1837
+ for (var r = 0, i = t.length; r < i; r++) {
1838
+ var o = new Hr(t[r], this);
1839
+ o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
1840
+ }
1841
+ this.isSubject = e;
1842
+ }
1843
+ return D(n, [{
1844
+ key: "getSweepEvents",
1845
+ value: function() {
1846
+ for (var e = [], r = 0, i = this.polys.length; r < i; r++)
1847
+ for (var o = this.polys[r].getSweepEvents(), l = 0, s = o.length; l < s; l++)
1848
+ e.push(o[l]);
1849
+ return e;
1850
+ }
1851
+ }]), n;
1852
+ }(), Kr = /* @__PURE__ */ function() {
1853
+ D(n, null, [{
1854
+ key: "factory",
1855
+ value: function(e) {
1856
+ for (var r = [], i = 0, o = e.length; i < o; i++) {
1857
+ var l = e[i];
1858
+ if (!(!l.isInResult() || l.ringOut)) {
1859
+ for (var s = null, u = l.leftSE, f = l.rightSE, a = [u], v = u.point, p = []; s = u, u = f, a.push(u), u.point !== v; )
1860
+ for (; ; ) {
1861
+ var y = u.getAvailableLinkedEvents();
1862
+ if (y.length === 0) {
1863
+ var E = a[0].point, h = a[a.length - 1].point;
1864
+ throw new Error("Unable to complete output ring starting at [".concat(E.x, ",") + " ".concat(E.y, "]. Last matching segment found ends at") + " [".concat(h.x, ", ").concat(h.y, "]."));
1865
+ }
1866
+ if (y.length === 1) {
1867
+ f = y[0].otherSE;
1868
+ break;
1869
+ }
1870
+ for (var g = null, w = 0, _ = p.length; w < _; w++)
1871
+ if (p[w].point === u.point) {
1872
+ g = w;
1873
+ break;
1874
+ }
1875
+ if (g !== null) {
1876
+ var S = p.splice(g)[0], m = a.splice(S.index);
1877
+ m.unshift(m[0].otherSE), r.push(new n(m.reverse()));
1878
+ continue;
1879
+ }
1880
+ p.push({
1881
+ index: a.length,
1882
+ point: u.point
1883
+ });
1884
+ var b = u.getLeftmostComparator(s);
1885
+ f = y.sort(b)[0].otherSE;
1886
+ break;
1887
+ }
1888
+ r.push(new n(a));
1889
+ }
1890
+ }
1891
+ return r;
1892
+ }
1893
+ }]);
1894
+ function n(t) {
1895
+ j(this, n), this.events = t;
1896
+ for (var e = 0, r = t.length; e < r; e++)
1897
+ t[e].segment.ringOut = this;
1898
+ this.poly = null;
1899
+ }
1900
+ return D(n, [{
1901
+ key: "getGeom",
1902
+ value: function() {
1903
+ for (var e = this.events[0].point, r = [e], i = 1, o = this.events.length - 1; i < o; i++) {
1904
+ var l = this.events[i].point, s = this.events[i + 1].point;
1905
+ Et(l, e, s) !== 0 && (r.push(l), e = l);
1906
+ }
1907
+ if (r.length === 1)
1908
+ return null;
1909
+ var u = r[0], f = r[1];
1910
+ Et(u, e, f) === 0 && r.shift(), r.push(r[0]);
1911
+ for (var a = this.isExteriorRing() ? 1 : -1, v = this.isExteriorRing() ? 0 : r.length - 1, p = this.isExteriorRing() ? r.length : -1, y = [], E = v; E != p; E += a)
1912
+ y.push([r[E].x, r[E].y]);
1913
+ return y;
1914
+ }
1915
+ }, {
1916
+ key: "isExteriorRing",
1917
+ value: function() {
1918
+ if (this._isExteriorRing === void 0) {
1919
+ var e = this.enclosingRing();
1920
+ this._isExteriorRing = e ? !e.isExteriorRing() : !0;
1921
+ }
1922
+ return this._isExteriorRing;
1923
+ }
1924
+ }, {
1925
+ key: "enclosingRing",
1926
+ value: function() {
1927
+ return this._enclosingRing === void 0 && (this._enclosingRing = this._calcEnclosingRing()), this._enclosingRing;
1928
+ }
1929
+ }, {
1930
+ key: "_calcEnclosingRing",
1931
+ value: function() {
1932
+ for (var e = this.events[0], r = 1, i = this.events.length; r < i; r++) {
1933
+ var o = this.events[r];
1934
+ ee.compare(e, o) > 0 && (e = o);
1935
+ }
1936
+ for (var l = e.segment.prevInResult(), s = l ? l.prevInResult() : null; ; ) {
1937
+ if (!l)
1938
+ return null;
1939
+ if (!s)
1940
+ return l.ringOut;
1941
+ if (s.ringOut !== l.ringOut)
1942
+ return s.ringOut.enclosingRing() !== l.ringOut ? l.ringOut : l.ringOut.enclosingRing();
1943
+ l = s.prevInResult(), s = l ? l.prevInResult() : null;
1944
+ }
1945
+ }
1946
+ }]), n;
1947
+ }(), Rt = /* @__PURE__ */ function() {
1948
+ function n(t) {
1949
+ j(this, n), this.exteriorRing = t, t.poly = this, this.interiorRings = [];
1950
+ }
1951
+ return D(n, [{
1952
+ key: "addInterior",
1953
+ value: function(e) {
1954
+ this.interiorRings.push(e), e.poly = this;
1955
+ }
1956
+ }, {
1957
+ key: "getGeom",
1958
+ value: function() {
1959
+ var e = [this.exteriorRing.getGeom()];
1960
+ if (e[0] === null)
1961
+ return null;
1962
+ for (var r = 0, i = this.interiorRings.length; r < i; r++) {
1963
+ var o = this.interiorRings[r].getGeom();
1964
+ o !== null && e.push(o);
1965
+ }
1966
+ return e;
1967
+ }
1968
+ }]), n;
1969
+ }(), Jr = /* @__PURE__ */ function() {
1970
+ function n(t) {
1971
+ j(this, n), this.rings = t, this.polys = this._composePolys(t);
1972
+ }
1973
+ return D(n, [{
1974
+ key: "getGeom",
1975
+ value: function() {
1976
+ for (var e = [], r = 0, i = this.polys.length; r < i; r++) {
1977
+ var o = this.polys[r].getGeom();
1978
+ o !== null && e.push(o);
1979
+ }
1980
+ return e;
1981
+ }
1982
+ }, {
1983
+ key: "_composePolys",
1984
+ value: function(e) {
1985
+ for (var r = [], i = 0, o = e.length; i < o; i++) {
1986
+ var l = e[i];
1987
+ if (!l.poly)
1988
+ if (l.isExteriorRing())
1989
+ r.push(new Rt(l));
1990
+ else {
1991
+ var s = l.enclosingRing();
1992
+ s.poly || r.push(new Rt(s)), s.poly.addInterior(l);
1993
+ }
1994
+ }
1995
+ return r;
1996
+ }
1997
+ }]), n;
1998
+ }(), $r = /* @__PURE__ */ function() {
1999
+ function n(t) {
2000
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ue.compare;
2001
+ j(this, n), this.queue = t, this.tree = new lt(e), this.segments = [];
2002
+ }
2003
+ return D(n, [{
2004
+ key: "process",
2005
+ value: function(e) {
2006
+ var r = e.segment, i = [];
2007
+ if (e.consumedBy)
2008
+ return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(r), i;
2009
+ var o = e.isLeft ? this.tree.insert(r) : this.tree.find(r);
2010
+ if (!o)
2011
+ throw new Error("Unable to find segment #".concat(r.id, " ") + "[".concat(r.leftSE.point.x, ", ").concat(r.leftSE.point.y, "] -> ") + "[".concat(r.rightSE.point.x, ", ").concat(r.rightSE.point.y, "] ") + "in SweepLine tree. Please submit a bug report.");
2012
+ for (var l = o, s = o, u = void 0, f = void 0; u === void 0; )
2013
+ l = this.tree.prev(l), l === null ? u = null : l.key.consumedBy === void 0 && (u = l.key);
2014
+ for (; f === void 0; )
2015
+ s = this.tree.next(s), s === null ? f = null : s.key.consumedBy === void 0 && (f = s.key);
2016
+ if (e.isLeft) {
2017
+ var a = null;
2018
+ if (u) {
2019
+ var v = u.getIntersection(r);
2020
+ if (v !== null && (r.isAnEndpoint(v) || (a = v), !u.isAnEndpoint(v)))
2021
+ for (var p = this._splitSafely(u, v), y = 0, E = p.length; y < E; y++)
2022
+ i.push(p[y]);
2023
+ }
2024
+ var h = null;
2025
+ if (f) {
2026
+ var g = f.getIntersection(r);
2027
+ if (g !== null && (r.isAnEndpoint(g) || (h = g), !f.isAnEndpoint(g)))
2028
+ for (var w = this._splitSafely(f, g), _ = 0, S = w.length; _ < S; _++)
2029
+ i.push(w[_]);
2030
+ }
2031
+ if (a !== null || h !== null) {
2032
+ var m = null;
2033
+ if (a === null)
2034
+ m = h;
2035
+ else if (h === null)
2036
+ m = a;
2037
+ else {
2038
+ var b = ee.comparePoints(a, h);
2039
+ m = b <= 0 ? a : h;
2040
+ }
2041
+ this.queue.remove(r.rightSE), i.push(r.rightSE);
2042
+ for (var k = r.split(m), M = 0, P = k.length; M < P; M++)
2043
+ i.push(k[M]);
2044
+ }
2045
+ i.length > 0 ? (this.tree.remove(r), i.push(e)) : (this.segments.push(r), r.prev = u);
2046
+ } else {
2047
+ if (u && f) {
2048
+ var I = u.getIntersection(f);
2049
+ if (I !== null) {
2050
+ if (!u.isAnEndpoint(I))
2051
+ for (var z = this._splitSafely(u, I), V = 0, x = z.length; V < x; V++)
2052
+ i.push(z[V]);
2053
+ if (!f.isAnEndpoint(I))
2054
+ for (var O = this._splitSafely(f, I), q = 0, Y = O.length; q < Y; q++)
2055
+ i.push(O[q]);
2056
+ }
2057
+ }
2058
+ this.tree.remove(r);
2059
+ }
2060
+ return i;
2061
+ }
2062
+ }, {
2063
+ key: "_splitSafely",
2064
+ value: function(e, r) {
2065
+ this.tree.remove(e);
2066
+ var i = e.rightSE;
2067
+ this.queue.remove(i);
2068
+ var o = e.split(r);
2069
+ return o.push(i), e.consumedBy === void 0 && this.tree.insert(e), o;
2070
+ }
2071
+ }]), n;
2072
+ }(), Lt = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, en = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6, tn = /* @__PURE__ */ function() {
2073
+ function n() {
2074
+ j(this, n);
2075
+ }
2076
+ return D(n, [{
2077
+ key: "run",
2078
+ value: function(e, r, i) {
2079
+ K.type = e, ze.reset();
2080
+ for (var o = [new It(r, !0)], l = 0, s = i.length; l < s; l++)
2081
+ o.push(new It(i[l], !1));
2082
+ if (K.numMultiPolys = o.length, K.type === "difference")
2083
+ for (var u = o[0], f = 1; f < o.length; )
2084
+ it(o[f].bbox, u.bbox) !== null ? f++ : o.splice(f, 1);
2085
+ if (K.type === "intersection") {
2086
+ for (var a = 0, v = o.length; a < v; a++)
2087
+ for (var p = o[a], y = a + 1, E = o.length; y < E; y++)
2088
+ if (it(p.bbox, o[y].bbox) === null)
2089
+ return [];
2090
+ }
2091
+ for (var h = new lt(ee.compare), g = 0, w = o.length; g < w; g++)
2092
+ for (var _ = o[g].getSweepEvents(), S = 0, m = _.length; S < m; S++)
2093
+ if (h.insert(_[S]), h.size > Lt)
2094
+ throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");
2095
+ for (var b = new $r(h), k = h.size, M = h.pop(); M; ) {
2096
+ var P = M.key;
2097
+ if (h.size === k) {
2098
+ var I = P.segment;
2099
+ throw new Error("Unable to pop() ".concat(P.isLeft ? "left" : "right", " SweepEvent ") + "[".concat(P.point.x, ", ").concat(P.point.y, "] from segment #").concat(I.id, " ") + "[".concat(I.leftSE.point.x, ", ").concat(I.leftSE.point.y, "] -> ") + "[".concat(I.rightSE.point.x, ", ").concat(I.rightSE.point.y, "] from queue. ") + "Please file a bug report.");
2100
+ }
2101
+ if (h.size > Lt)
2102
+ throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");
2103
+ if (b.segments.length > en)
2104
+ throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");
2105
+ for (var z = b.process(P), V = 0, x = z.length; V < x; V++) {
2106
+ var O = z[V];
2107
+ O.consumedBy === void 0 && h.insert(O);
2108
+ }
2109
+ k = h.size, M = h.pop();
2110
+ }
2111
+ ze.reset();
2112
+ var q = Kr.factory(b.segments), Y = new Jr(q);
2113
+ return Y.getGeom();
2114
+ }
2115
+ }]), n;
2116
+ }(), K = new tn(), rn = function(t) {
2117
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2118
+ r[i - 1] = arguments[i];
2119
+ return K.run("union", t, r);
2120
+ }, nn = function(t) {
2121
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2122
+ r[i - 1] = arguments[i];
2123
+ return K.run("intersection", t, r);
2124
+ }, on = function(t) {
2125
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2126
+ r[i - 1] = arguments[i];
2127
+ return K.run("xor", t, r);
2128
+ }, ln = function(t) {
2129
+ for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
2130
+ r[i - 1] = arguments[i];
2131
+ return K.run("difference", t, r);
2132
+ }, Le = {
2133
+ union: rn,
2134
+ intersection: nn,
2135
+ xor: on,
2136
+ difference: ln
2137
+ };
2138
+ function Mt(n, t) {
2139
+ var e = un(t), r = null;
2140
+ return n.type === "FeatureCollection" ? r = sn(n) : r = Ut(
2141
+ Le.union(n.geometry.coordinates)
2142
+ ), r.geometry.coordinates.forEach(function(i) {
2143
+ e.geometry.coordinates.push(i[0]);
2144
+ }), e;
2145
+ }
2146
+ function sn(n) {
2147
+ var t = n.features.length === 2 ? Le.union(
2148
+ n.features[0].geometry.coordinates,
2149
+ n.features[1].geometry.coordinates
2150
+ ) : Le.union.apply(
2151
+ Le,
2152
+ n.features.map(function(e) {
2153
+ return e.geometry.coordinates;
2154
+ })
2155
+ );
2156
+ return Ut(t);
2157
+ }
2158
+ function Ut(n) {
2159
+ return Dt(n);
2160
+ }
2161
+ function un(n) {
2162
+ var t = [
2163
+ [
2164
+ [180, 90],
2165
+ [-180, 90],
2166
+ [-180, -90],
2167
+ [180, -90],
2168
+ [180, 90]
2169
+ ]
2170
+ ], e = n && n.geometry.coordinates || t;
2171
+ return qt(e);
2172
+ }
2173
+ function Ot(n) {
2174
+ return n.type === "Feature" ? n.geometry : n;
2175
+ }
2176
+ function fn(n, t, e) {
2177
+ e === void 0 && (e = {});
2178
+ var r = Ot(n), i = Ot(t), o = Le.union(r.coordinates, i.coordinates);
2179
+ return o.length === 0 ? null : o.length === 1 ? qt(o[0], e.properties) : Dt(o, e.properties);
2180
+ }
2181
+ let Ct = {
2182
+ type: "FeatureCollection",
2183
+ features: []
2184
+ };
2185
+ function an(n, t, e = !0, r = !0, i = {}, o = {}) {
2186
+ let l, s, u, f = [], a;
2187
+ function v() {
2188
+ n.addSource("preview", {
2189
+ type: "geojson",
2190
+ data: Ct
2191
+ }), n.addLayer({
2192
+ id: "preview-fill",
2193
+ type: "fill",
2194
+ source: "preview",
2195
+ layout: {},
2196
+ paint: {
2197
+ "fill-color": "#000",
2198
+ "fill-opacity": 0.1
2199
+ },
2200
+ filter: ["==", ["geometry-type"], "Polygon"]
2201
+ }), n.addLayer({
2202
+ id: "preview-line",
2203
+ type: "line",
2204
+ source: "preview",
2205
+ layout: {
2206
+ "line-cap": "square"
2207
+ },
2208
+ paint: {
2209
+ "line-width": ["case", ["==", ["geometry-type"], "Polygon"], 2, 3],
2210
+ "line-dasharray": [1, 1],
2211
+ "line-color": "#3170fe"
2212
+ }
2213
+ });
2214
+ }
2215
+ n.loaded() ? v() : n.once("load", () => {
2216
+ v();
2217
+ });
2218
+ const p = (h) => {
2219
+ s == null || s([h.lngLat.lng, h.lngLat.lat]);
2220
+ }, y = () => {
874
2221
  let h;
875
- const g = t.getZoom() > 9 ? [(h = t.getCenter().wrap()).lng, h.lat] : void 0;
876
- f !== g && (f = g, o == null || o(g));
2222
+ const g = n.getZoom() > 9 ? [(h = n.getCenter().wrap()).lng, h.lat] : void 0;
2223
+ u !== g && (u = g, l == null || l(g));
877
2224
  };
878
2225
  return {
879
2226
  setProximityChangeHandler(h) {
880
- h ? (o = h, t.on("moveend", E), E()) : (t.off("moveend", E), o == null || o(void 0), o = void 0);
2227
+ h ? (l = h, n.on("moveend", y), y()) : (n.off("moveend", y), l == null || l(void 0), l = void 0);
881
2228
  },
882
2229
  setMapClickHandler(h) {
883
- i = h, i ? t.on("click", b) : t.off("click", b);
2230
+ s = h, s ? n.on("click", p) : n.off("click", p);
884
2231
  },
885
2232
  flyTo(h, g) {
886
- t.flyTo({ center: h, zoom: g, ...r });
2233
+ n.flyTo({ center: h, zoom: g, ...i });
887
2234
  },
888
2235
  fitBounds(h, g) {
889
- t.fitBounds(
2236
+ n.fitBounds(
890
2237
  [
891
2238
  [h[0], h[1]],
892
2239
  [h[2], h[3]]
893
2240
  ],
894
- { ...u, padding: g }
2241
+ { padding: g, ...o }
895
2242
  );
896
2243
  },
897
2244
  indicateReverse(h) {
898
- t.getCanvas().style.cursor = h ? "crosshair" : "";
2245
+ n.getCanvas().style.cursor = h ? "crosshair" : "";
899
2246
  },
900
2247
  setMarkers(h, g) {
901
- for (const m of a)
902
- m.remove();
903
- if (a.length = 0, !!e)
904
- for (const m of g ? [...h != null ? h : [], g] : h != null ? h : []) {
905
- let w;
906
- if (m === g && typeof n == "object")
907
- w = new e.Marker(n);
908
- else if (m !== g && typeof l == "object")
909
- w = new e.Marker(l);
2248
+ function w(_) {
2249
+ var S;
2250
+ (S = n.getSource("preview")) == null || S.setData(_);
2251
+ }
2252
+ for (const _ of f)
2253
+ _.remove();
2254
+ if (w(Ct), f.length = 0, !!t) {
2255
+ if (g) {
2256
+ let _ = !1;
2257
+ if (g.geometry.type === "GeometryCollection") {
2258
+ const m = g.geometry.geometries.filter(
2259
+ (b) => b.type === "Polygon" || b.type === "MultiPolygon"
2260
+ );
2261
+ if (m.length > 0) {
2262
+ let b = m.pop();
2263
+ for (const k of m)
2264
+ b = fn(b, k);
2265
+ w(Mt({ ...g, geometry: b })), _ = !0;
2266
+ } else {
2267
+ const b = g.geometry.geometries.filter(
2268
+ (k) => k.type === "LineString" || k.type === "MultiLineString"
2269
+ );
2270
+ b.length > 0 && (w({
2271
+ ...g,
2272
+ geometry: { type: "GeometryCollection", geometries: b }
2273
+ }), _ = !0);
2274
+ }
2275
+ }
2276
+ let S;
2277
+ if (!_) {
2278
+ if (g.geometry.type === "Polygon" || g.geometry.type === "MultiPolygon")
2279
+ w(Mt(g));
2280
+ else if (g.geometry.type === "LineString" || g.geometry.type === "MultiLineString") {
2281
+ w(g);
2282
+ return;
2283
+ }
2284
+ }
2285
+ if (typeof e == "object")
2286
+ S = new t.Marker(e);
2287
+ else {
2288
+ const m = document.createElement("div");
2289
+ new $e({
2290
+ props: { displayIn: "maplibre" },
2291
+ target: m
2292
+ }), S = new t.Marker({ element: m });
2293
+ }
2294
+ S && f.push(S.setLngLat(g.center).addTo(n));
2295
+ }
2296
+ for (const _ of h != null ? h : []) {
2297
+ if (_ === g)
2298
+ continue;
2299
+ let S;
2300
+ if (typeof r == "object")
2301
+ S = new t.Marker(r);
910
2302
  else {
911
- const M = document.createElement("div");
912
- new lt({ props: { displayIn: "maplibre" }, target: M }), w = new e.Marker({ element: M });
2303
+ const m = document.createElement("div");
2304
+ new $e({ props: { displayIn: "maplibre" }, target: m }), S = new t.Marker({ element: m });
913
2305
  }
914
- a.push(w.setLngLat(m.center).addTo(t));
2306
+ f.push(S.setLngLat(_.center).addTo(n));
915
2307
  }
2308
+ }
916
2309
  },
917
2310
  setSelectedMarker(h) {
918
- d && d.getElement().classList.toggle("marker-selected", !1), d = h > -1 ? a[h] : void 0, d == null || d.getElement().classList.toggle("marker-selected", !0);
2311
+ a && a.getElement().classList.toggle("marker-selected", !1), a = h > -1 ? f[h] : void 0, a == null || a.getElement().classList.toggle("marker-selected", !0);
919
2312
  }
920
2313
  };
921
2314
  }
922
- var G, oe;
923
- class nn extends pt {
924
- constructor(n) {
2315
+ var H, ye;
2316
+ class gn extends ir {
2317
+ constructor(e) {
925
2318
  super();
926
- Ie(this, G, void 0);
927
- Ie(this, oe, void 0);
928
- ke(this, oe, n);
929
- }
930
- onAdd(n) {
931
- const l = document.createElement("div");
932
- l.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";
933
- const { maplibregl: r, marker: u, showResultMarkers: o, flyTo: i, ...f } = Z(this, oe), a = typeof i == "boolean" ? {} : i, d = $t(
934
- n,
935
- r,
936
- u,
2319
+ We(this, H, void 0);
2320
+ We(this, ye, void 0);
2321
+ Te(this, ye, e);
2322
+ }
2323
+ onAdd(e) {
2324
+ const r = document.createElement("div");
2325
+ r.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl";
2326
+ const { maplibregl: i, marker: o, showResultMarkers: l, flyTo: s, ...u } = $(this, ye), f = typeof s == "boolean" ? {} : s, a = an(
2327
+ e,
2328
+ i,
937
2329
  o,
938
- a,
939
- a
2330
+ l,
2331
+ f,
2332
+ f
940
2333
  );
941
- ke(this, G, new Ft({
942
- target: l,
2334
+ Te(this, H, new Br({
2335
+ target: r,
943
2336
  props: {
944
- mapController: d,
945
- flyTo: i === void 0 ? !0 : !!i,
946
- ...f
2337
+ mapController: a,
2338
+ flyTo: s === void 0 ? !0 : !!s,
2339
+ ...u
947
2340
  }
948
2341
  }));
949
- for (const b of [
2342
+ for (const v of [
950
2343
  "select",
951
2344
  "pick",
952
2345
  "featuresListed",
@@ -956,40 +2349,41 @@ class nn extends pt {
956
2349
  "reverseToggle",
957
2350
  "queryChange"
958
2351
  ])
959
- Z(this, G).$on(
960
- b,
961
- (E) => this.fire(b.toLowerCase(), E.detail)
2352
+ $(this, H).$on(
2353
+ v,
2354
+ (p) => this.fire(v.toLowerCase(), p.detail)
962
2355
  );
963
- return l;
2356
+ return r;
964
2357
  }
965
- setOptions(n) {
966
- var f;
967
- ke(this, oe, n);
968
- const { maplibregl: l, marker: r, showResultMarkers: u, flyTo: o, ...i } = Z(this, oe);
969
- (f = Z(this, G)) == null || f.$set(i);
2358
+ setOptions(e) {
2359
+ var u;
2360
+ Te(this, ye, e);
2361
+ const { maplibregl: r, marker: i, showResultMarkers: o, flyTo: l, ...s } = $(this, ye);
2362
+ (u = $(this, H)) == null || u.$set(s);
970
2363
  }
971
- setQuery(n, l = !0) {
972
- var r;
973
- (r = Z(this, G)) == null || r.setQuery(n, l);
2364
+ setQuery(e, r = !0) {
2365
+ var i;
2366
+ (i = $(this, H)) == null || i.setQuery(e, r);
974
2367
  }
975
- setReverseMode(n) {
976
- var l;
977
- (l = Z(this, G)) == null || l.$set({ reverseActive: n });
2368
+ setReverseMode(e) {
2369
+ var r;
2370
+ (r = $(this, H)) == null || r.$set({ reverseActive: e });
978
2371
  }
979
2372
  focus() {
980
- var n;
981
- (n = Z(this, G)) == null || n.focus();
2373
+ var e;
2374
+ (e = $(this, H)) == null || e.focus();
982
2375
  }
983
2376
  blur() {
984
- var n;
985
- (n = Z(this, G)) == null || n.blur();
2377
+ var e;
2378
+ (e = $(this, H)) == null || e.blur();
986
2379
  }
987
2380
  onRemove() {
988
- var n;
989
- (n = Z(this, G)) == null || n.$destroy();
2381
+ var e;
2382
+ (e = $(this, H)) == null || e.$destroy();
990
2383
  }
991
2384
  }
992
- G = new WeakMap(), oe = new WeakMap();
2385
+ H = new WeakMap(), ye = new WeakMap();
993
2386
  export {
994
- nn as GeocodingControl
2387
+ gn as GeocodingControl,
2388
+ an as createMaplibreglMapController
995
2389
  };