@maptiler/geocoding-control 2.1.6 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/CODE_OF_CONDUCT.md +46 -0
  2. package/CONTRIBUTING.md +72 -0
  3. package/README.md +36 -22
  4. package/SECURITY.md +16 -0
  5. package/dist/index.js +856 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.umd.js +263 -0
  8. package/dist/index.umd.js.map +1 -0
  9. package/dist/leaflet.public.js +1273 -0
  10. package/dist/leaflet.public.js.map +1 -0
  11. package/dist/leaflet.public.umd.js +276 -0
  12. package/dist/leaflet.public.umd.js.map +1 -0
  13. package/dist/maplibregl.js +1297 -0
  14. package/dist/maplibregl.js.map +1 -0
  15. package/dist/maplibregl.umd.js +276 -0
  16. package/dist/maplibregl.umd.js.map +1 -0
  17. package/dist/maptilersdk.js +1305 -0
  18. package/dist/maptilersdk.js.map +1 -0
  19. package/dist/maptilersdk.umd.js +276 -0
  20. package/dist/maptilersdk.umd.js.map +1 -0
  21. package/dist/src/components/clear-icon.d.ts +10 -0
  22. package/dist/src/components/fail-icon.d.ts +10 -0
  23. package/dist/src/components/loading-icon.d.ts +10 -0
  24. package/dist/src/components/marker.d.ts +10 -0
  25. package/dist/src/components/reverse-geocoding-icon.d.ts +10 -0
  26. package/dist/src/components/search-icon.d.ts +10 -0
  27. package/dist/src/controls/leaflet-control.d.ts +58 -0
  28. package/dist/src/controls/leaflet-events.d.ts +42 -0
  29. package/dist/src/controls/leaflet-options.d.ts +84 -0
  30. package/dist/src/controls/maplibregl-control.d.ts +55 -0
  31. package/dist/src/controls/maplibregl-events.d.ts +44 -0
  32. package/dist/src/controls/maplibregl-options.d.ts +104 -0
  33. package/dist/src/controls/maptilersdk-control.d.ts +6 -0
  34. package/dist/src/controls/maptilersdk-events.d.ts +2 -0
  35. package/dist/src/controls/maptilersdk-options.d.ts +10 -0
  36. package/dist/src/geocoder/geocoder-events.d.ts +46 -0
  37. package/dist/src/geocoder/geocoder-feature-item.d.ts +22 -0
  38. package/{svelte/types.d.ts → dist/src/geocoder/geocoder-options.d.ts} +12 -148
  39. package/dist/src/geocoder/geocoder.d.ts +112 -0
  40. package/dist/src/index.d.ts +9 -0
  41. package/dist/src/leaflet.public.d.ts +7 -0
  42. package/dist/src/maplibregl.d.ts +7 -0
  43. package/dist/src/maptilersdk.d.ts +7 -0
  44. package/dist/src/types.d.ts +45 -0
  45. package/dist/src/utils/geo-utils.d.ts +6 -0
  46. package/dist/src/utils/mask.d.ts +2 -0
  47. package/dist/src/utils/proximity.d.ts +2 -0
  48. package/package.json +84 -116
  49. package/MapLibreBasedGeocodingControl.d.ts +0 -3072
  50. package/geo-coordinates-parser.t.d.ts +0 -8
  51. package/geoUtils.d.ts +0 -3
  52. package/leaflet-controller.d.ts +0 -12
  53. package/leaflet-controller.js +0 -2475
  54. package/leaflet-controller.js.map +0 -1
  55. package/leaflet-controller.umd.js +0 -2
  56. package/leaflet-controller.umd.js.map +0 -1
  57. package/leaflet.d.ts +0 -131
  58. package/leaflet.js +0 -5055
  59. package/leaflet.js.map +0 -1
  60. package/leaflet.umd.js +0 -14
  61. package/leaflet.umd.js.map +0 -1
  62. package/maplibregl-controller.d.ts +0 -19
  63. package/maplibregl-controller.js +0 -2418
  64. package/maplibregl-controller.js.map +0 -1
  65. package/maplibregl-controller.umd.js +0 -2
  66. package/maplibregl-controller.umd.js.map +0 -1
  67. package/maplibregl.d.ts +0 -2509
  68. package/maplibregl.js +0 -5115
  69. package/maplibregl.js.map +0 -1
  70. package/maplibregl.umd.js +0 -14
  71. package/maplibregl.umd.js.map +0 -1
  72. package/maptilersdk.d.ts +0 -2504
  73. package/maptilersdk.js +0 -5125
  74. package/maptilersdk.js.map +0 -1
  75. package/maptilersdk.umd.js +0 -14
  76. package/maptilersdk.umd.js.map +0 -1
  77. package/mask.d.ts +0 -2
  78. package/openlayers-controller.d.ts +0 -15
  79. package/openlayers-controller.js +0 -2174
  80. package/openlayers-controller.js.map +0 -1
  81. package/openlayers-controller.umd.js +0 -2
  82. package/openlayers-controller.umd.js.map +0 -1
  83. package/openlayers.d.ts +0 -109
  84. package/openlayers.js +0 -5018
  85. package/openlayers.js.map +0 -1
  86. package/openlayers.umd.js +0 -14
  87. package/openlayers.umd.js.map +0 -1
  88. package/proximity.d.ts +0 -2
  89. package/react.d.ts +0 -45
  90. package/react.js +0 -2768
  91. package/react.js.map +0 -1
  92. package/react.umd.js +0 -14
  93. package/react.umd.js.map +0 -1
  94. package/style.css +0 -1
  95. package/svelte/ClearIcon.svelte +0 -12
  96. package/svelte/ClearIcon.svelte.d.ts +0 -25
  97. package/svelte/FailIcon.svelte +0 -12
  98. package/svelte/FailIcon.svelte.d.ts +0 -25
  99. package/svelte/FeatureItem.svelte +0 -246
  100. package/svelte/FeatureItem.svelte.d.ts +0 -26
  101. package/svelte/GeocodingControl.svelte +0 -919
  102. package/svelte/GeocodingControl.svelte.d.ts +0 -105
  103. package/svelte/LoadingIcon.svelte +0 -40
  104. package/svelte/LoadingIcon.svelte.d.ts +0 -25
  105. package/svelte/MapLibreBasedGeocodingControl.d.ts +0 -3072
  106. package/svelte/MapLibreBasedGeocodingControl.js +0 -210
  107. package/svelte/MarkerIcon.svelte +0 -71
  108. package/svelte/MarkerIcon.svelte.d.ts +0 -18
  109. package/svelte/ReverseGeocodingIcon.svelte +0 -12
  110. package/svelte/ReverseGeocodingIcon.svelte.d.ts +0 -25
  111. package/svelte/SearchIcon.svelte +0 -26
  112. package/svelte/SearchIcon.svelte.d.ts +0 -25
  113. package/svelte/geo-coordinates-parser.t.d.ts +0 -8
  114. package/svelte/geo-coordinates-parser.t.js +0 -1
  115. package/svelte/geoUtils.d.ts +0 -3
  116. package/svelte/geoUtils.js +0 -18
  117. package/svelte/info.json +0 -1
  118. package/svelte/leaflet-controller.d.ts +0 -12
  119. package/svelte/leaflet-controller.js +0 -274
  120. package/svelte/leaflet.d.ts +0 -131
  121. package/svelte/leaflet.js +0 -116
  122. package/svelte/maplibregl-controller.d.ts +0 -19
  123. package/svelte/maplibregl-controller.js +0 -279
  124. package/svelte/maplibregl.d.ts +0 -2509
  125. package/svelte/maplibregl.js +0 -17
  126. package/svelte/maptilersdk.d.ts +0 -2504
  127. package/svelte/maptilersdk.js +0 -32
  128. package/svelte/mask.d.ts +0 -2
  129. package/svelte/mask.js +0 -54
  130. package/svelte/openlayers-controller.d.ts +0 -15
  131. package/svelte/openlayers-controller.js +0 -283
  132. package/svelte/openlayers.d.ts +0 -109
  133. package/svelte/openlayers.js +0 -178
  134. package/svelte/proximity.d.ts +0 -2
  135. package/svelte/proximity.js +0 -60
  136. package/svelte/react.d.ts +0 -45
  137. package/svelte/react.js +0 -106
  138. package/svelte/types.js +0 -1
  139. package/svelte/vanilla.d.ts +0 -61
  140. package/svelte/vanilla.js +0 -101
  141. package/svelte/vite-env.d.ts +0 -2
  142. package/types.d.ts +0 -391
  143. package/vanilla.d.ts +0 -61
  144. package/vanilla.js +0 -2772
  145. package/vanilla.js.map +0 -1
  146. package/vanilla.umd.js +0 -14
  147. package/vanilla.umd.js.map +0 -1
  148. /package/{icons → dist/icons}/10pin.svg +0 -0
  149. /package/{icons → dist/icons}/9pin.svg +0 -0
  150. /package/{icons → dist/icons}/advertising_column.svg +0 -0
  151. /package/{icons → dist/icons}/aerodrome.svg +0 -0
  152. /package/{icons → dist/icons}/alcohol.svg +0 -0
  153. /package/{icons → dist/icons}/alpine_hut.svg +0 -0
  154. /package/{icons → dist/icons}/amusement_arcade.svg +0 -0
  155. /package/{icons → dist/icons}/amusement_park.svg +0 -0
  156. /package/{icons → dist/icons}/apartment.svg +0 -0
  157. /package/{icons → dist/icons}/archaeological_site.svg +0 -0
  158. /package/{icons → dist/icons}/area.svg +0 -0
  159. /package/{icons → dist/icons}/art.svg +0 -0
  160. /package/{icons → dist/icons}/arts_centre.svg +0 -0
  161. /package/{icons → dist/icons}/artwork.svg +0 -0
  162. /package/{icons → dist/icons}/audioguide.svg +0 -0
  163. /package/{icons → dist/icons}/bag.svg +0 -0
  164. /package/{icons → dist/icons}/beauty.svg +0 -0
  165. /package/{icons → dist/icons}/bed.svg +0 -0
  166. /package/{icons → dist/icons}/bell_tower.svg +0 -0
  167. /package/{icons → dist/icons}/beverages.svg +0 -0
  168. /package/{icons → dist/icons}/bicycle_repair_station.svg +0 -0
  169. /package/{icons → dist/icons}/biergarten.svg +0 -0
  170. /package/{icons → dist/icons}/bird_hide.svg +0 -0
  171. /package/{icons → dist/icons}/boat_rental.svg +0 -0
  172. /package/{icons → dist/icons}/bookmaker.svg +0 -0
  173. /package/{icons → dist/icons}/books.svg +0 -0
  174. /package/{icons → dist/icons}/bowl.svg +0 -0
  175. /package/{icons → dist/icons}/bowling_alley.svg +0 -0
  176. /package/{icons → dist/icons}/bunker.svg +0 -0
  177. /package/{icons → dist/icons}/bureau_de_change.svg +0 -0
  178. /package/{icons → dist/icons}/bus_station.svg +0 -0
  179. /package/{icons → dist/icons}/bust.svg +0 -0
  180. /package/{icons → dist/icons}/camping.svg +0 -0
  181. /package/{icons → dist/icons}/car_parts.svg +0 -0
  182. /package/{icons → dist/icons}/car_wash.svg +0 -0
  183. /package/{icons → dist/icons}/caravan_park.svg +0 -0
  184. /package/{icons → dist/icons}/carpet.svg +0 -0
  185. /package/{icons → dist/icons}/cattle_grid.svg +0 -0
  186. /package/{icons → dist/icons}/cave_entrance.svg +0 -0
  187. /package/{icons → dist/icons}/chalet.svg +0 -0
  188. /package/{icons → dist/icons}/charity.svg +0 -0
  189. /package/{icons → dist/icons}/chemist.svg +0 -0
  190. /package/{icons → dist/icons}/chimney.svg +0 -0
  191. /package/{icons → dist/icons}/church.svg +0 -0
  192. /package/{icons → dist/icons}/city_gate.svg +0 -0
  193. /package/{icons → dist/icons}/clinic.svg +0 -0
  194. /package/{icons → dist/icons}/clothes.svg +0 -0
  195. /package/{icons → dist/icons}/coffee.svg +0 -0
  196. /package/{icons → dist/icons}/community_centre.svg +0 -0
  197. /package/{icons → dist/icons}/computer.svg +0 -0
  198. /package/{icons → dist/icons}/consulate.svg +0 -0
  199. /package/{icons → dist/icons}/copyshop.svg +0 -0
  200. /package/{icons → dist/icons}/cosmetics.svg +0 -0
  201. /package/{icons → dist/icons}/courthouse.svg +0 -0
  202. /package/{icons → dist/icons}/crane.svg +0 -0
  203. /package/{icons → dist/icons}/dairy.svg +0 -0
  204. /package/{icons → dist/icons}/deli.svg +0 -0
  205. /package/{icons → dist/icons}/department_store.svg +0 -0
  206. /package/{icons → dist/icons}/diy.svg +0 -0
  207. /package/{icons → dist/icons}/electronics.svg +0 -0
  208. /package/{icons → dist/icons}/embankment.svg +0 -0
  209. /package/{icons → dist/icons}/embassy.svg +0 -0
  210. /package/{icons → dist/icons}/excrement_bags.svg +0 -0
  211. /package/{icons → dist/icons}/fabric.svg +0 -0
  212. /package/{icons → dist/icons}/farmyard.svg +0 -0
  213. /package/{icons → dist/icons}/ferry.svg +0 -0
  214. /package/{icons → dist/icons}/firepit.svg +0 -0
  215. /package/{icons → dist/icons}/firestation.svg +0 -0
  216. /package/{icons → dist/icons}/fishing.svg +0 -0
  217. /package/{icons → dist/icons}/fitness.svg +0 -0
  218. /package/{icons → dist/icons}/ford.svg +0 -0
  219. /package/{icons → dist/icons}/fort.svg +0 -0
  220. /package/{icons → dist/icons}/fortress.svg +0 -0
  221. /package/{icons → dist/icons}/full-height_turnstile.svg +0 -0
  222. /package/{icons → dist/icons}/generator_wind.svg +0 -0
  223. /package/{icons → dist/icons}/golf_pin.svg +0 -0
  224. /package/{icons → dist/icons}/greengrocer.svg +0 -0
  225. /package/{icons → dist/icons}/guest_house.svg +0 -0
  226. /package/{icons → dist/icons}/helipad.svg +0 -0
  227. /package/{icons → dist/icons}/hifi.svg +0 -0
  228. /package/{icons → dist/icons}/hostel.svg +0 -0
  229. /package/{icons → dist/icons}/hotel.svg +0 -0
  230. /package/{icons → dist/icons}/housenumber.svg +0 -0
  231. /package/{icons → dist/icons}/houseware.svg +0 -0
  232. /package/{icons → dist/icons}/hunting_stand.svg +0 -0
  233. /package/{icons → dist/icons}/interior_decoration.svg +0 -0
  234. /package/{icons → dist/icons}/internet_cafe.svg +0 -0
  235. /package/{icons → dist/icons}/kindergarten.svg +0 -0
  236. /package/{icons → dist/icons}/kissing_gate.svg +0 -0
  237. /package/{icons → dist/icons}/manor.svg +0 -0
  238. /package/{icons → dist/icons}/map.svg +0 -0
  239. /package/{icons → dist/icons}/marker_reverse.svg +0 -0
  240. /package/{icons → dist/icons}/marker_selected.svg +0 -0
  241. /package/{icons → dist/icons}/marker_unselected.svg +0 -0
  242. /package/{icons → dist/icons}/marketplace.svg +0 -0
  243. /package/{icons → dist/icons}/massage.svg +0 -0
  244. /package/{icons → dist/icons}/mast.svg +0 -0
  245. /package/{icons → dist/icons}/mast_communications.svg +0 -0
  246. /package/{icons → dist/icons}/mast_lighting.svg +0 -0
  247. /package/{icons → dist/icons}/medical_supply.svg +0 -0
  248. /package/{icons → dist/icons}/memorial.svg +0 -0
  249. /package/{icons → dist/icons}/miniature_golf.svg +0 -0
  250. /package/{icons → dist/icons}/motel.svg +0 -0
  251. /package/{icons → dist/icons}/mountain_range.svg +0 -0
  252. /package/{icons → dist/icons}/multifaith.svg +0 -0
  253. /package/{icons → dist/icons}/musical_instrument.svg +0 -0
  254. /package/{icons → dist/icons}/newsagent.svg +0 -0
  255. /package/{icons → dist/icons}/nightclub.svg +0 -0
  256. /package/{icons → dist/icons}/ocean.svg +0 -0
  257. /package/{icons → dist/icons}/office.svg +0 -0
  258. /package/{icons → dist/icons}/outdoor_seating.svg +0 -0
  259. /package/{icons → dist/icons}/palace.svg +0 -0
  260. /package/{icons → dist/icons}/parcel_locker.svg +0 -0
  261. /package/{icons → dist/icons}/parking_space.svg +0 -0
  262. /package/{icons → dist/icons}/parking_tickets.svg +0 -0
  263. /package/{icons → dist/icons}/pet.svg +0 -0
  264. /package/{icons → dist/icons}/photo.svg +0 -0
  265. /package/{icons → dist/icons}/picnic.svg +0 -0
  266. /package/{icons → dist/icons}/plaque.svg +0 -0
  267. /package/{icons → dist/icons}/poi.svg +0 -0
  268. /package/{icons → dist/icons}/post_box.svg +0 -0
  269. /package/{icons → dist/icons}/post_office.svg +0 -0
  270. /package/{icons → dist/icons}/postal_code.svg +0 -0
  271. /package/{icons → dist/icons}/pub.svg +0 -0
  272. /package/{icons → dist/icons}/public_bath.svg +0 -0
  273. /package/{icons → dist/icons}/public_bookcase.svg +0 -0
  274. /package/{icons → dist/icons}/public_building.svg +0 -0
  275. /package/{icons → dist/icons}/public_transport_tickets.svg +0 -0
  276. /package/{icons → dist/icons}/reverse.svg +0 -0
  277. /package/{icons → dist/icons}/river.svg +0 -0
  278. /package/{icons → dist/icons}/road.svg +0 -0
  279. /package/{icons → dist/icons}/saddle.svg +0 -0
  280. /package/{icons → dist/icons}/sauna.svg +0 -0
  281. /package/{icons → dist/icons}/sea.svg +0 -0
  282. /package/{icons → dist/icons}/second_hand.svg +0 -0
  283. /package/{icons → dist/icons}/shintoist.svg +0 -0
  284. /package/{icons → dist/icons}/shoe.svg +0 -0
  285. /package/{icons → dist/icons}/shower.svg +0 -0
  286. /package/{icons → dist/icons}/shrine.svg +0 -0
  287. /package/{icons → dist/icons}/sikhist.svg +0 -0
  288. /package/{icons → dist/icons}/slipway.svg +0 -0
  289. /package/{icons → dist/icons}/snowmobile.svg +0 -0
  290. /package/{icons → dist/icons}/social_facility.svg +0 -0
  291. /package/{icons → dist/icons}/sports.svg +0 -0
  292. /package/{icons → dist/icons}/sprite.json +0 -0
  293. /package/{icons → dist/icons}/sprite.png +0 -0
  294. /package/{icons → dist/icons}/sprite@2x.json +0 -0
  295. /package/{icons → dist/icons}/sprite@2x.png +0 -0
  296. /package/{icons → dist/icons}/stationery.svg +0 -0
  297. /package/{icons → dist/icons}/stile.svg +0 -0
  298. /package/{icons → dist/icons}/stone.svg +0 -0
  299. /package/{icons → dist/icons}/storage_tank.svg +0 -0
  300. /package/{icons → dist/icons}/stream.svg +0 -0
  301. /package/{icons → dist/icons}/street.svg +0 -0
  302. /package/{icons → dist/icons}/supermarket.svg +0 -0
  303. /package/{icons → dist/icons}/tea.svg +0 -0
  304. /package/{icons → dist/icons}/telescope_dish.svg +0 -0
  305. /package/{icons → dist/icons}/telescope_dome.svg +0 -0
  306. /package/{icons → dist/icons}/ticket.svg +0 -0
  307. /package/{icons → dist/icons}/tobacco.svg +0 -0
  308. /package/{icons → dist/icons}/tower_cantilever_communication.svg +0 -0
  309. /package/{icons → dist/icons}/tower_cooling.svg +0 -0
  310. /package/{icons → dist/icons}/tower_dish.svg +0 -0
  311. /package/{icons → dist/icons}/tower_dome.svg +0 -0
  312. /package/{icons → dist/icons}/tower_generic.svg +0 -0
  313. /package/{icons → dist/icons}/tower_lattice.svg +0 -0
  314. /package/{icons → dist/icons}/tower_lattice_communication.svg +0 -0
  315. /package/{icons → dist/icons}/tower_lattice_lighting.svg +0 -0
  316. /package/{icons → dist/icons}/tower_lighting.svg +0 -0
  317. /package/{icons → dist/icons}/townhall.svg +0 -0
  318. /package/{icons → dist/icons}/toys.svg +0 -0
  319. /package/{icons → dist/icons}/trade.svg +0 -0
  320. /package/{icons → dist/icons}/traffic_light.svg +0 -0
  321. /package/{icons → dist/icons}/train_station.svg +0 -0
  322. /package/{icons → dist/icons}/travel_agency.svg +0 -0
  323. /package/{icons → dist/icons}/tyres.svg +0 -0
  324. /package/{icons → dist/icons}/university.svg +0 -0
  325. /package/{icons → dist/icons}/variety_store.svg +0 -0
  326. /package/{icons → dist/icons}/vehicle_inspection.svg +0 -0
  327. /package/{icons → dist/icons}/vending_machine.svg +0 -0
  328. /package/{icons → dist/icons}/video.svg +0 -0
  329. /package/{icons → dist/icons}/video_games.svg +0 -0
  330. /package/{icons → dist/icons}/waste_disposal.svg +0 -0
  331. /package/{icons → dist/icons}/water_well.svg +0 -0
  332. /package/{icons → dist/icons}/waterfall.svg +0 -0
  333. /package/{icons → dist/icons}/wilderness_hut.svg +0 -0
package/react.js DELETED
@@ -1,2768 +0,0 @@
1
- var Oi = Object.defineProperty;
2
- var Ri = (i, e, t) => e in i ? Oi(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var gt = (i, e, t) => Ri(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { forwardRef as zi, useRef as zt, useEffect as ht, useImperativeHandle as Ui, createElement as Di } from "react";
5
- function P() {
6
- }
7
- function Ii(i, e) {
8
- for (const t in e) i[t] = e[t];
9
- return (
10
- /** @type {T & S} */
11
- i
12
- );
13
- }
14
- function $t(i) {
15
- return i();
16
- }
17
- function Ut() {
18
- return /* @__PURE__ */ Object.create(null);
19
- }
20
- function me(i) {
21
- i.forEach($t);
22
- }
23
- function ei(i) {
24
- return typeof i == "function";
25
- }
26
- function we(i, e) {
27
- return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
28
- }
29
- let Ye;
30
- function Y(i, e) {
31
- return i === e ? !0 : (Ye || (Ye = document.createElement("a")), Ye.href = e, i === Ye.href);
32
- }
33
- function Ai(i) {
34
- return Object.keys(i).length === 0;
35
- }
36
- function Pi(i, e, t, n) {
37
- if (i) {
38
- const r = ti(i, e, t, n);
39
- return i[0](r);
40
- }
41
- }
42
- function ti(i, e, t, n) {
43
- return i[1] && n ? Ii(t.ctx.slice(), i[1](n(e))) : t.ctx;
44
- }
45
- function Bi(i, e, t, n) {
46
- return i[2], e.dirty;
47
- }
48
- function Fi(i, e, t, n, r, c) {
49
- if (r) {
50
- const l = ti(e, t, n, c);
51
- i.p(l, r);
52
- }
53
- }
54
- function Gi(i) {
55
- if (i.ctx.length > 32) {
56
- const e = [], t = i.ctx.length / 32;
57
- for (let n = 0; n < t; n++)
58
- e[n] = -1;
59
- return e;
60
- }
61
- return -1;
62
- }
63
- function et(i) {
64
- return i ?? "";
65
- }
66
- function M(i, e) {
67
- i.appendChild(e);
68
- }
69
- function I(i, e, t) {
70
- i.insertBefore(e, t || null);
71
- }
72
- function D(i) {
73
- i.parentNode && i.parentNode.removeChild(i);
74
- }
75
- function U(i) {
76
- return document.createElement(i);
77
- }
78
- function ce(i) {
79
- return document.createElementNS("http://www.w3.org/2000/svg", i);
80
- }
81
- function be(i) {
82
- return document.createTextNode(i);
83
- }
84
- function $() {
85
- return be(" ");
86
- }
87
- function ji() {
88
- return be("");
89
- }
90
- function Z(i, e, t, n) {
91
- return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
92
- }
93
- function Hi(i) {
94
- return function(e) {
95
- return e.preventDefault(), i.call(this, e);
96
- };
97
- }
98
- function a(i, e, t) {
99
- t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
100
- }
101
- function Zi(i) {
102
- return Array.from(i.childNodes);
103
- }
104
- function Pe(i, e) {
105
- e = "" + e, i.data !== e && (i.data = /** @type {string} */
106
- e);
107
- }
108
- function Dt(i, e) {
109
- i.value = e ?? "";
110
- }
111
- function Ce(i, e, t) {
112
- i.classList.toggle(e, !!t);
113
- }
114
- function qi(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
115
- return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
116
- }
117
- let Be;
118
- function Ae(i) {
119
- Be = i;
120
- }
121
- function ii() {
122
- if (!Be) throw new Error("Function called outside component initialization");
123
- return Be;
124
- }
125
- function Qi(i) {
126
- ii().$$.on_destroy.push(i);
127
- }
128
- function ni() {
129
- const i = ii();
130
- return (e, t, { cancelable: n = !1 } = {}) => {
131
- const r = i.$$.callbacks[e];
132
- if (r) {
133
- const c = qi(
134
- /** @type {string} */
135
- e,
136
- t,
137
- { cancelable: n }
138
- );
139
- return r.slice().forEach((l) => {
140
- l.call(i, c);
141
- }), !c.defaultPrevented;
142
- }
143
- return !0;
144
- };
145
- }
146
- function Ki(i, e) {
147
- const t = i.$$.callbacks[e.type];
148
- t && t.slice().forEach((n) => n.call(this, e));
149
- }
150
- const Me = [], vt = [];
151
- let We = [];
152
- const It = [], Vi = /* @__PURE__ */ Promise.resolve();
153
- let Lt = !1;
154
- function Yi() {
155
- Lt || (Lt = !0, Vi.then(ri));
156
- }
157
- function _t(i) {
158
- We.push(i);
159
- }
160
- const bt = /* @__PURE__ */ new Set();
161
- let Ne = 0;
162
- function ri() {
163
- if (Ne !== 0)
164
- return;
165
- const i = Be;
166
- do {
167
- try {
168
- for (; Ne < Me.length; ) {
169
- const e = Me[Ne];
170
- Ne++, Ae(e), Xi(e.$$);
171
- }
172
- } catch (e) {
173
- throw Me.length = 0, Ne = 0, e;
174
- }
175
- for (Ae(null), Me.length = 0, Ne = 0; vt.length; ) vt.pop()();
176
- for (let e = 0; e < We.length; e += 1) {
177
- const t = We[e];
178
- bt.has(t) || (bt.add(t), t());
179
- }
180
- We.length = 0;
181
- } while (Me.length);
182
- for (; It.length; )
183
- It.pop()();
184
- Lt = !1, bt.clear(), Ae(i);
185
- }
186
- function Xi(i) {
187
- if (i.fragment !== null) {
188
- i.update(), me(i.before_update);
189
- const e = i.dirty;
190
- i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(_t);
191
- }
192
- }
193
- function Ji(i) {
194
- const e = [], t = [];
195
- We.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), We = e;
196
- }
197
- const Je = /* @__PURE__ */ new Set();
198
- let ye;
199
- function xe() {
200
- ye = {
201
- r: 0,
202
- c: [],
203
- p: ye
204
- // parent group
205
- };
206
- }
207
- function $e() {
208
- ye.r || me(ye.c), ye = ye.p;
209
- }
210
- function G(i, e) {
211
- i && i.i && (Je.delete(i), i.i(e));
212
- }
213
- function q(i, e, t, n) {
214
- if (i && i.o) {
215
- if (Je.has(i)) return;
216
- Je.add(i), ye.c.push(() => {
217
- Je.delete(i), n && (t && i.d(1), n());
218
- }), i.o(e);
219
- } else n && n();
220
- }
221
- function At(i) {
222
- return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
223
- }
224
- function xi(i, e) {
225
- q(i, 1, 1, () => {
226
- e.delete(i.key);
227
- });
228
- }
229
- function $i(i, e, t, n, r, c, l, o, d, u, f, h) {
230
- let v = i.length, y = c.length, E = v;
231
- const O = {};
232
- for (; E--; ) O[i[E].key] = E;
233
- const p = [], S = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), C = [];
234
- for (E = y; E--; ) {
235
- const w = h(r, c, E), g = t(w);
236
- let N = l.get(g);
237
- N ? C.push(() => N.p(w, e)) : (N = u(g, w), N.c()), S.set(g, p[E] = N), g in O && W.set(g, Math.abs(E - O[g]));
238
- }
239
- const H = /* @__PURE__ */ new Set(), X = /* @__PURE__ */ new Set();
240
- function Q(w) {
241
- G(w, 1), w.m(o, f), l.set(w.key, w), f = w.first, y--;
242
- }
243
- for (; v && y; ) {
244
- const w = p[y - 1], g = i[v - 1], N = w.key, k = g.key;
245
- w === g ? (f = w.first, v--, y--) : S.has(k) ? !l.has(N) || H.has(N) ? Q(w) : X.has(k) ? v-- : W.get(N) > W.get(k) ? (X.add(N), Q(w)) : (H.add(k), v--) : (d(g, l), v--);
246
- }
247
- for (; v--; ) {
248
- const w = i[v];
249
- S.has(w.key) || d(w, l);
250
- }
251
- for (; y; ) Q(p[y - 1]);
252
- return me(C), p;
253
- }
254
- function ve(i) {
255
- i && i.c();
256
- }
257
- function de(i, e, t) {
258
- const { fragment: n, after_update: r } = i.$$;
259
- n && n.m(e, t), _t(() => {
260
- const c = i.$$.on_mount.map($t).filter(ei);
261
- i.$$.on_destroy ? i.$$.on_destroy.push(...c) : me(c), i.$$.on_mount = [];
262
- }), r.forEach(_t);
263
- }
264
- function fe(i, e) {
265
- const t = i.$$;
266
- t.fragment !== null && (Ji(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
267
- }
268
- function en(i, e) {
269
- i.$$.dirty[0] === -1 && (Me.push(i), Yi(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
270
- }
271
- function Ee(i, e, t, n, r, c, l = null, o = [-1]) {
272
- const d = Be;
273
- Ae(i);
274
- const u = i.$$ = {
275
- fragment: null,
276
- ctx: [],
277
- // state
278
- props: c,
279
- update: P,
280
- not_equal: r,
281
- bound: Ut(),
282
- // lifecycle
283
- on_mount: [],
284
- on_destroy: [],
285
- on_disconnect: [],
286
- before_update: [],
287
- after_update: [],
288
- context: new Map(e.context || (d ? d.$$.context : [])),
289
- // everything else
290
- callbacks: Ut(),
291
- dirty: o,
292
- skip_bound: !1,
293
- root: e.target || d.$$.root
294
- };
295
- l && l(u.root);
296
- let f = !1;
297
- if (u.ctx = t ? t(i, e.props || {}, (h, v, ...y) => {
298
- const E = y.length ? y[0] : v;
299
- return u.ctx && r(u.ctx[h], u.ctx[h] = E) && (!u.skip_bound && u.bound[h] && u.bound[h](E), f && en(i, h)), v;
300
- }) : [], u.update(), f = !0, me(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
301
- if (e.hydrate) {
302
- const h = Zi(e.target);
303
- u.fragment && u.fragment.l(h), h.forEach(D);
304
- } else
305
- u.fragment && u.fragment.c();
306
- e.intro && G(i.$$.fragment), de(i, e.target, e.anchor), ri();
307
- }
308
- Ae(d);
309
- }
310
- class Se {
311
- constructor() {
312
- /**
313
- * ### PRIVATE API
314
- *
315
- * Do not use, may change at any time
316
- *
317
- * @type {any}
318
- */
319
- gt(this, "$$");
320
- /**
321
- * ### PRIVATE API
322
- *
323
- * Do not use, may change at any time
324
- *
325
- * @type {any}
326
- */
327
- gt(this, "$$set");
328
- }
329
- /** @returns {void} */
330
- $destroy() {
331
- fe(this, 1), this.$destroy = P;
332
- }
333
- /**
334
- * @template {Extract<keyof Events, string>} K
335
- * @param {K} type
336
- * @param {((e: Events[K]) => void) | null | undefined} callback
337
- * @returns {() => void}
338
- */
339
- $on(e, t) {
340
- if (!ei(t))
341
- return P;
342
- const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
343
- return n.push(t), () => {
344
- const r = n.indexOf(t);
345
- r !== -1 && n.splice(r, 1);
346
- };
347
- }
348
- /**
349
- * @param {Partial<Props>} props
350
- * @returns {void}
351
- */
352
- $set(e) {
353
- this.$$set && !Ai(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
354
- }
355
- }
356
- const tn = "4";
357
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(tn);
358
- function nn(i) {
359
- let e, t;
360
- return {
361
- c() {
362
- e = ce("svg"), t = ce("path"), a(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), a(e, "viewBox", "0 0 14 14"), a(e, "width", "13"), a(e, "height", "13"), a(e, "class", "svelte-en2qvf");
363
- },
364
- m(n, r) {
365
- I(n, e, r), M(e, t);
366
- },
367
- p: P,
368
- i: P,
369
- o: P,
370
- d(n) {
371
- n && D(e);
372
- }
373
- };
374
- }
375
- class oi extends Se {
376
- constructor(e) {
377
- super(), Ee(this, e, null, nn, we, {});
378
- }
379
- }
380
- function rn(i) {
381
- let e, t;
382
- return {
383
- c() {
384
- e = ce("svg"), t = ce("path"), a(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), a(e, "viewBox", "0 0 30 30"), a(e, "fill", "none"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "class", "svelte-d2loi5");
385
- },
386
- m(n, r) {
387
- I(n, e, r), M(e, t);
388
- },
389
- p: P,
390
- i: P,
391
- o: P,
392
- d(n) {
393
- n && D(e);
394
- }
395
- };
396
- }
397
- class si extends Se {
398
- constructor(e) {
399
- super(), Ee(this, e, null, rn, we, {});
400
- }
401
- }
402
- function on(i) {
403
- let e, t;
404
- return {
405
- c() {
406
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
407
- i[3] + "area.svg") || a(e, "src", t), a(
408
- e,
409
- "alt",
410
- /*placeType*/
411
- i[7]
412
- ), a(
413
- e,
414
- "title",
415
- /*placeType*/
416
- i[7]
417
- ), a(e, "class", "svelte-w9y5n9");
418
- },
419
- m(n, r) {
420
- I(n, e, r);
421
- },
422
- p(n, r) {
423
- r & /*iconsBaseUrl*/
424
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
425
- n[3] + "area.svg") && a(e, "src", t), r & /*placeType*/
426
- 128 && a(
427
- e,
428
- "alt",
429
- /*placeType*/
430
- n[7]
431
- ), r & /*placeType*/
432
- 128 && a(
433
- e,
434
- "title",
435
- /*placeType*/
436
- n[7]
437
- );
438
- },
439
- d(n) {
440
- n && D(e);
441
- }
442
- };
443
- }
444
- function sn(i) {
445
- let e, t;
446
- return {
447
- c() {
448
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
449
- i[3] + "reverse.svg") || a(e, "src", t), a(
450
- e,
451
- "alt",
452
- /*placeType*/
453
- i[7]
454
- ), a(
455
- e,
456
- "title",
457
- /*placeType*/
458
- i[7]
459
- ), a(e, "class", "svelte-w9y5n9");
460
- },
461
- m(n, r) {
462
- I(n, e, r);
463
- },
464
- p(n, r) {
465
- r & /*iconsBaseUrl*/
466
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
467
- n[3] + "reverse.svg") && a(e, "src", t), r & /*placeType*/
468
- 128 && a(
469
- e,
470
- "alt",
471
- /*placeType*/
472
- n[7]
473
- ), r & /*placeType*/
474
- 128 && a(
475
- e,
476
- "title",
477
- /*placeType*/
478
- n[7]
479
- );
480
- },
481
- d(n) {
482
- n && D(e);
483
- }
484
- };
485
- }
486
- function an(i) {
487
- let e, t;
488
- return {
489
- c() {
490
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
491
- i[3] + "poi.svg") || a(e, "src", t), a(
492
- e,
493
- "alt",
494
- /*placeType*/
495
- i[7]
496
- ), a(
497
- e,
498
- "title",
499
- /*placeType*/
500
- i[7]
501
- ), a(e, "class", "svelte-w9y5n9");
502
- },
503
- m(n, r) {
504
- I(n, e, r);
505
- },
506
- p(n, r) {
507
- r & /*iconsBaseUrl*/
508
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
509
- n[3] + "poi.svg") && a(e, "src", t), r & /*placeType*/
510
- 128 && a(
511
- e,
512
- "alt",
513
- /*placeType*/
514
- n[7]
515
- ), r & /*placeType*/
516
- 128 && a(
517
- e,
518
- "title",
519
- /*placeType*/
520
- n[7]
521
- );
522
- },
523
- d(n) {
524
- n && D(e);
525
- }
526
- };
527
- }
528
- function ln(i) {
529
- let e, t;
530
- return {
531
- c() {
532
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
533
- i[3] + "postal_code.svg") || a(e, "src", t), a(
534
- e,
535
- "alt",
536
- /*placeType*/
537
- i[7]
538
- ), a(
539
- e,
540
- "title",
541
- /*placeType*/
542
- i[7]
543
- ), a(e, "class", "svelte-w9y5n9");
544
- },
545
- m(n, r) {
546
- I(n, e, r);
547
- },
548
- p(n, r) {
549
- r & /*iconsBaseUrl*/
550
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
551
- n[3] + "postal_code.svg") && a(e, "src", t), r & /*placeType*/
552
- 128 && a(
553
- e,
554
- "alt",
555
- /*placeType*/
556
- n[7]
557
- ), r & /*placeType*/
558
- 128 && a(
559
- e,
560
- "title",
561
- /*placeType*/
562
- n[7]
563
- );
564
- },
565
- d(n) {
566
- n && D(e);
567
- }
568
- };
569
- }
570
- function un(i) {
571
- let e, t;
572
- return {
573
- c() {
574
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
575
- i[3] + "street.svg") || a(e, "src", t), a(
576
- e,
577
- "alt",
578
- /*placeType*/
579
- i[7]
580
- ), a(
581
- e,
582
- "title",
583
- /*placeType*/
584
- i[7]
585
- ), a(e, "class", "svelte-w9y5n9");
586
- },
587
- m(n, r) {
588
- I(n, e, r);
589
- },
590
- p(n, r) {
591
- r & /*iconsBaseUrl*/
592
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
593
- n[3] + "street.svg") && a(e, "src", t), r & /*placeType*/
594
- 128 && a(
595
- e,
596
- "alt",
597
- /*placeType*/
598
- n[7]
599
- ), r & /*placeType*/
600
- 128 && a(
601
- e,
602
- "title",
603
- /*placeType*/
604
- n[7]
605
- );
606
- },
607
- d(n) {
608
- n && D(e);
609
- }
610
- };
611
- }
612
- function cn(i) {
613
- let e, t;
614
- return {
615
- c() {
616
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
617
- i[3] + "road.svg") || a(e, "src", t), a(
618
- e,
619
- "alt",
620
- /*placeType*/
621
- i[7]
622
- ), a(
623
- e,
624
- "title",
625
- /*placeType*/
626
- i[7]
627
- ), a(e, "class", "svelte-w9y5n9");
628
- },
629
- m(n, r) {
630
- I(n, e, r);
631
- },
632
- p(n, r) {
633
- r & /*iconsBaseUrl*/
634
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
635
- n[3] + "road.svg") && a(e, "src", t), r & /*placeType*/
636
- 128 && a(
637
- e,
638
- "alt",
639
- /*placeType*/
640
- n[7]
641
- ), r & /*placeType*/
642
- 128 && a(
643
- e,
644
- "title",
645
- /*placeType*/
646
- n[7]
647
- );
648
- },
649
- d(n) {
650
- n && D(e);
651
- }
652
- };
653
- }
654
- function dn(i) {
655
- let e, t;
656
- return {
657
- c() {
658
- e = U("img"), Y(e.src, t = /*iconsBaseUrl*/
659
- i[3] + "housenumber.svg") || a(e, "src", t), a(
660
- e,
661
- "alt",
662
- /*placeType*/
663
- i[7]
664
- ), a(
665
- e,
666
- "title",
667
- /*placeType*/
668
- i[7]
669
- ), a(e, "class", "svelte-w9y5n9");
670
- },
671
- m(n, r) {
672
- I(n, e, r);
673
- },
674
- p(n, r) {
675
- r & /*iconsBaseUrl*/
676
- 8 && !Y(e.src, t = /*iconsBaseUrl*/
677
- n[3] + "housenumber.svg") && a(e, "src", t), r & /*placeType*/
678
- 128 && a(
679
- e,
680
- "alt",
681
- /*placeType*/
682
- n[7]
683
- ), r & /*placeType*/
684
- 128 && a(
685
- e,
686
- "title",
687
- /*placeType*/
688
- n[7]
689
- );
690
- },
691
- d(n) {
692
- n && D(e);
693
- }
694
- };
695
- }
696
- function fn(i) {
697
- let e, t, n, r;
698
- return {
699
- c() {
700
- e = U("img"), Y(e.src, t = /*imageUrl*/
701
- i[5]) || a(e, "src", t), a(
702
- e,
703
- "alt",
704
- /*category*/
705
- i[4]
706
- ), a(
707
- e,
708
- "title",
709
- /*placeType*/
710
- i[7]
711
- ), a(e, "class", "svelte-w9y5n9");
712
- },
713
- m(c, l) {
714
- I(c, e, l), n || (r = Z(
715
- e,
716
- "error",
717
- /*error_handler*/
718
- i[14]
719
- ), n = !0);
720
- },
721
- p(c, l) {
722
- l & /*imageUrl*/
723
- 32 && !Y(e.src, t = /*imageUrl*/
724
- c[5]) && a(e, "src", t), l & /*category*/
725
- 16 && a(
726
- e,
727
- "alt",
728
- /*category*/
729
- c[4]
730
- ), l & /*placeType*/
731
- 128 && a(
732
- e,
733
- "title",
734
- /*placeType*/
735
- c[7]
736
- );
737
- },
738
- d(c) {
739
- c && D(e), n = !1, r();
740
- }
741
- };
742
- }
743
- function mn(i) {
744
- let e, t;
745
- return {
746
- c() {
747
- e = U("div"), a(e, "class", "sprite-icon svelte-w9y5n9"), a(e, "style", t = `
748
- width: ${/*spriteIcon*/
749
- i[6].width / ie}px;
750
- height: ${/*spriteIcon*/
751
- i[6].height / ie}px;
752
- background-image: url(${/*iconsBaseUrl*/
753
- i[3]}sprite${yt}.png);
754
- background-position: -${/*spriteIcon*/
755
- i[6].x / ie}px -${/*spriteIcon*/
756
- i[6].y / ie}px;
757
- background-size: ${re.width / ie}px ${re.height / ie}px;
758
- `), a(
759
- e,
760
- "title",
761
- /*placeType*/
762
- i[7]
763
- );
764
- },
765
- m(n, r) {
766
- I(n, e, r);
767
- },
768
- p(n, r) {
769
- r & /*spriteIcon, iconsBaseUrl*/
770
- 72 && t !== (t = `
771
- width: ${/*spriteIcon*/
772
- n[6].width / ie}px;
773
- height: ${/*spriteIcon*/
774
- n[6].height / ie}px;
775
- background-image: url(${/*iconsBaseUrl*/
776
- n[3]}sprite${yt}.png);
777
- background-position: -${/*spriteIcon*/
778
- n[6].x / ie}px -${/*spriteIcon*/
779
- n[6].y / ie}px;
780
- background-size: ${re.width / ie}px ${re.height / ie}px;
781
- `) && a(e, "style", t), r & /*placeType*/
782
- 128 && a(
783
- e,
784
- "title",
785
- /*placeType*/
786
- n[7]
787
- );
788
- },
789
- d(n) {
790
- n && D(e);
791
- }
792
- };
793
- }
794
- function Pt(i) {
795
- let e, t;
796
- return {
797
- c() {
798
- e = U("span"), t = be(
799
- /*placeType*/
800
- i[7]
801
- ), a(e, "class", "secondary svelte-w9y5n9");
802
- },
803
- m(n, r) {
804
- I(n, e, r), M(e, t);
805
- },
806
- p(n, r) {
807
- r & /*placeType*/
808
- 128 && Pe(
809
- t,
810
- /*placeType*/
811
- n[7]
812
- );
813
- },
814
- d(n) {
815
- n && D(e);
816
- }
817
- };
818
- }
819
- function gn(i) {
820
- let e, t, n, r, c, l, o, d, u, f = (
821
- /*isReverse*/
822
- (i[8] ? (
823
- /*feature*/
824
- i[0].place_name
825
- ) : (
826
- /*feature*/
827
- i[0].place_name.replace(/,.*/, "")
828
- )) + ""
829
- ), h, v, y = (
830
- /*showPlaceType*/
831
- i[2] === "always" || /*showPlaceType*/
832
- i[2] !== "never" && !/*feature*/
833
- i[0].address && !/*feature*/
834
- i[0].id.startsWith("road.") && !/*feature*/
835
- i[0].id.startsWith("address.") && !/*feature*/
836
- i[0].id.startsWith("postal_code.") && (!/*feature*/
837
- i[0].id.startsWith("poi.") || !/*imageUrl*/
838
- i[5]) && !/*isReverse*/
839
- i[8]
840
- ), E, O, p = (
841
- /*isReverse*/
842
- (i[8] ? "" : (
843
- /*feature*/
844
- i[0].place_name.replace(/[^,]*,?\s*/, "")
845
- )) + ""
846
- ), S, W, C, H, X, Q;
847
- function w(L, m) {
848
- return m & /*feature*/
849
- 1 && (t = null), m & /*feature*/
850
- 1 && (n = null), m & /*feature*/
851
- 1 && (r = null), m & /*feature*/
852
- 1 && (c = null), re && /*spriteIcon*/
853
- L[6] ? mn : (
854
- /*imageUrl*/
855
- L[5] ? fn : (
856
- /*feature*/
857
- L[0].address ? dn : (t == null && (t = !!/*feature*/
858
- L[0].id.startsWith("road.")), t ? cn : (n == null && (n = !!/*feature*/
859
- L[0].id.startsWith("address.")), n ? un : (r == null && (r = !!/*feature*/
860
- L[0].id.startsWith("postal_code.")), r ? ln : (c == null && (c = !!/*feature*/
861
- L[0].id.startsWith("poi.")), c ? an : (
862
- /*isReverse*/
863
- L[8] ? sn : on
864
- )))))
865
- )
866
- );
867
- }
868
- let g = w(i, -1), N = g(i), k = y && Pt(i);
869
- return {
870
- c() {
871
- e = U("li"), N.c(), l = $(), o = U("span"), d = U("span"), u = U("span"), h = be(f), v = $(), k && k.c(), E = $(), O = U("span"), S = be(p), a(u, "class", "primary svelte-w9y5n9"), a(d, "class", "svelte-w9y5n9"), a(O, "class", "line2 svelte-w9y5n9"), a(o, "class", "texts svelte-w9y5n9"), a(e, "tabindex", "-1"), a(e, "role", "option"), a(e, "aria-selected", W = /*style*/
872
- i[1] === "selected"), a(e, "aria-checked", C = /*style*/
873
- i[1] === "picked"), a(e, "class", H = et(
874
- /*style*/
875
- i[1]
876
- ) + " svelte-w9y5n9");
877
- },
878
- m(L, m) {
879
- I(L, e, m), N.m(e, null), M(e, l), M(e, o), M(o, d), M(d, u), M(u, h), M(d, v), k && k.m(d, null), M(o, E), M(o, O), M(O, S), X || (Q = [
880
- Z(
881
- e,
882
- "mouseenter",
883
- /*mouseenter_handler*/
884
- i[13]
885
- ),
886
- Z(
887
- e,
888
- "focus",
889
- /*focus_handler*/
890
- i[15]
891
- ),
892
- Z(
893
- e,
894
- "click",
895
- /*click_handler*/
896
- i[16]
897
- )
898
- ], X = !0);
899
- },
900
- p(L, [m]) {
901
- g === (g = w(L, m)) && N ? N.p(L, m) : (N.d(1), N = g(L), N && (N.c(), N.m(e, l))), m & /*isReverse, feature*/
902
- 257 && f !== (f = /*isReverse*/
903
- (L[8] ? (
904
- /*feature*/
905
- L[0].place_name
906
- ) : (
907
- /*feature*/
908
- L[0].place_name.replace(/,.*/, "")
909
- )) + "") && Pe(h, f), m & /*showPlaceType, feature, imageUrl, isReverse*/
910
- 293 && (y = /*showPlaceType*/
911
- L[2] === "always" || /*showPlaceType*/
912
- L[2] !== "never" && !/*feature*/
913
- L[0].address && !/*feature*/
914
- L[0].id.startsWith("road.") && !/*feature*/
915
- L[0].id.startsWith("address.") && !/*feature*/
916
- L[0].id.startsWith("postal_code.") && (!/*feature*/
917
- L[0].id.startsWith("poi.") || !/*imageUrl*/
918
- L[5]) && !/*isReverse*/
919
- L[8]), y ? k ? k.p(L, m) : (k = Pt(L), k.c(), k.m(d, null)) : k && (k.d(1), k = null), m & /*isReverse, feature*/
920
- 257 && p !== (p = /*isReverse*/
921
- (L[8] ? "" : (
922
- /*feature*/
923
- L[0].place_name.replace(/[^,]*,?\s*/, "")
924
- )) + "") && Pe(S, p), m & /*style*/
925
- 2 && W !== (W = /*style*/
926
- L[1] === "selected") && a(e, "aria-selected", W), m & /*style*/
927
- 2 && C !== (C = /*style*/
928
- L[1] === "picked") && a(e, "aria-checked", C), m & /*style*/
929
- 2 && H !== (H = et(
930
- /*style*/
931
- L[1]
932
- ) + " svelte-w9y5n9") && a(e, "class", H);
933
- },
934
- i: P,
935
- o: P,
936
- d(L) {
937
- L && D(e), N.d(), k && k.d(), X = !1, me(Q);
938
- }
939
- };
940
- }
941
- const ai = typeof devicePixelRatio > "u" ? 1 : devicePixelRatio > 1.25, yt = ai ? "@2x" : "", ie = ai ? 2 : 1;
942
- let re, Xe;
943
- function hn(i, e, t) {
944
- let n, r, c, { feature: l } = e, { style: o = "default" } = e, { showPlaceType: d } = e, { missingIconsCache: u } = e, { iconsBaseUrl: f } = e;
945
- const h = ni();
946
- let v, y, E, O;
947
- function p() {
948
- Xe ?? (Xe = fetch(`${f}sprite${yt}.json`).then((g) => g.json()).then((g) => {
949
- re = g;
950
- }).catch(() => {
951
- re = null;
952
- }));
953
- }
954
- function S() {
955
- y && u.add(y), W();
956
- }
957
- function W() {
958
- re !== void 0 ? C() : (p(), Xe == null || Xe.then(C));
959
- }
960
- function C() {
961
- do {
962
- if (O--, t(4, v = n == null ? void 0 : n[O]), t(6, E = v ? re == null ? void 0 : re.icons[v] : void 0), E)
963
- break;
964
- t(5, y = v ? f + v.replace(/ /g, "_") + ".svg" : void 0);
965
- } while (O > -1 && (!y || u.has(y)));
966
- }
967
- function H(g) {
968
- Ki.call(this, i, g);
969
- }
970
- const X = () => S(), Q = () => h("select", void 0), w = (g) => {
971
- document.activeElement !== g.target && h("select", void 0);
972
- };
973
- return i.$$set = (g) => {
974
- "feature" in g && t(0, l = g.feature), "style" in g && t(1, o = g.style), "showPlaceType" in g && t(2, d = g.showPlaceType), "missingIconsCache" in g && t(11, u = g.missingIconsCache), "iconsBaseUrl" in g && t(3, f = g.iconsBaseUrl);
975
- }, i.$$.update = () => {
976
- var g, N, k, L, m;
977
- i.$$.dirty & /*feature*/
978
- 1 && t(12, n = (g = l.properties) == null ? void 0 : g.categories), i.$$.dirty & /*feature*/
979
- 1 && t(8, r = l.place_type[0] === "reverse"), i.$$.dirty & /*feature*/
980
- 1 && t(7, c = ((k = (N = l.properties) == null ? void 0 : N.categories) == null ? void 0 : k.join(", ")) ?? ((m = (L = l.properties) == null ? void 0 : L.place_type_name) == null ? void 0 : m[0]) ?? l.place_type[0]), i.$$.dirty & /*categories*/
981
- 4096 && (O = (n == null ? void 0 : n.length) ?? 0, W());
982
- }, [
983
- l,
984
- o,
985
- d,
986
- f,
987
- v,
988
- y,
989
- E,
990
- c,
991
- r,
992
- h,
993
- S,
994
- u,
995
- n,
996
- H,
997
- X,
998
- Q,
999
- w
1000
- ];
1001
- }
1002
- class bn extends Se {
1003
- constructor(e) {
1004
- super(), Ee(this, e, hn, gn, we, {
1005
- feature: 0,
1006
- style: 1,
1007
- showPlaceType: 2,
1008
- missingIconsCache: 11,
1009
- iconsBaseUrl: 3
1010
- });
1011
- }
1012
- }
1013
- function vn(i) {
1014
- let e;
1015
- return {
1016
- c() {
1017
- e = U("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>', a(e, "class", "svelte-7cmwmc");
1018
- },
1019
- m(t, n) {
1020
- I(t, e, n);
1021
- },
1022
- p: P,
1023
- i: P,
1024
- o: P,
1025
- d(t) {
1026
- t && D(e);
1027
- }
1028
- };
1029
- }
1030
- class Ln extends Se {
1031
- constructor(e) {
1032
- super(), Ee(this, e, null, vn, we, {});
1033
- }
1034
- }
1035
- function _n(i) {
1036
- let e, t;
1037
- return {
1038
- c() {
1039
- e = ce("svg"), t = ce("path"), a(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), a(e, "viewBox", "0 0 60.006 21.412"), a(e, "width", "14"), a(e, "height", "20"), a(e, "class", "svelte-en2qvf");
1040
- },
1041
- m(n, r) {
1042
- I(n, e, r), M(e, t);
1043
- },
1044
- p: P,
1045
- i: P,
1046
- o: P,
1047
- d(n) {
1048
- n && D(e);
1049
- }
1050
- };
1051
- }
1052
- class yn extends Se {
1053
- constructor(e) {
1054
- super(), Ee(this, e, null, _n, we, {});
1055
- }
1056
- }
1057
- function wn(i) {
1058
- let e, t, n;
1059
- return {
1060
- c() {
1061
- e = ce("svg"), t = ce("circle"), n = ce("path"), a(t, "cx", "4.789"), a(t, "cy", "4.787"), a(t, "r", "3.85"), a(t, "class", "svelte-1aq105l"), a(n, "d", "M12.063 12.063 7.635 7.635"), a(n, "class", "svelte-1aq105l"), a(e, "xmlns", "http://www.w3.org/2000/svg"), a(e, "width", "13"), a(e, "height", "13"), a(e, "viewBox", "0 0 13 13"), a(e, "class", "svelte-1aq105l");
1062
- },
1063
- m(r, c) {
1064
- I(r, e, c), M(e, t), M(e, n);
1065
- },
1066
- p: P,
1067
- i: P,
1068
- o: P,
1069
- d(r) {
1070
- r && D(e);
1071
- }
1072
- };
1073
- }
1074
- class En extends Se {
1075
- constructor(e) {
1076
- super(), Ee(this, e, null, wn, we, {});
1077
- }
1078
- }
1079
- function Sn(i, e, t) {
1080
- const n = e[1], r = e[0], c = n - r;
1081
- return i === n && t ? i : ((i - r) % c + c) % c + r;
1082
- }
1083
- function Bt(i) {
1084
- const e = [...i];
1085
- return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
1086
- }
1087
- let De;
1088
- async function pn(i, e, t) {
1089
- const n = i == null ? void 0 : i.getCenterAndZoom();
1090
- for (const r of e ?? [])
1091
- if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
1092
- if (r.type === "fixed")
1093
- return r.coordinates.join(",");
1094
- e: if (r.type === "client-geolocation") {
1095
- if (De && r.cachedLocationExpiry && De.time + r.cachedLocationExpiry > Date.now()) {
1096
- if (!De.coords)
1097
- break e;
1098
- return De.coords;
1099
- }
1100
- let c;
1101
- try {
1102
- return c = await new Promise((l, o) => {
1103
- t.signal.addEventListener("abort", () => {
1104
- o(Error("aborted"));
1105
- }), navigator.geolocation.getCurrentPosition(
1106
- (d) => {
1107
- l(
1108
- [d.coords.longitude, d.coords.latitude].map((u) => u.toFixed(6)).join(",")
1109
- );
1110
- },
1111
- (d) => {
1112
- o(d);
1113
- },
1114
- r
1115
- );
1116
- }), c;
1117
- } catch {
1118
- } finally {
1119
- r.cachedLocationExpiry && (De = {
1120
- time: Date.now(),
1121
- coords: c
1122
- });
1123
- }
1124
- if (t.signal.aborted)
1125
- return;
1126
- }
1127
- if (r.type === "server-geolocation")
1128
- return "ip";
1129
- if (n && r.type === "map-center")
1130
- return n[1].toFixed(6) + "," + n[2].toFixed(6);
1131
- }
1132
- }
1133
- const Tn = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, Ft = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, Gt = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, jt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, Ht = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, Zt = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
1134
- function kn(i) {
1135
- if (!["DMS", "DM", "DD"].includes(i))
1136
- throw new Error("invalid format specified");
1137
- if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
1138
- const e = this.decimalCoordinates.split(",").map((y) => Number(y.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), c = Math.abs(n), l = t > 0 ? "N" : "S", o = n > 0 ? "E" : "W";
1139
- let d;
1140
- i == "DD" && (d = `${r}° ${l}, ${c}° ${o}`);
1141
- const u = Math.floor(r), f = Math.floor(c), h = (r - u) * 60, v = (c - f) * 60;
1142
- if (i == "DM") {
1143
- let y = qt(h, 3).toFixed(3).padStart(6, "0"), E = qt(v, 3).toFixed(3).padStart(6, "0");
1144
- y.endsWith(".000") && E.endsWith(".000") && (y = y.replace(/\.000$/, ""), E = E.replace(/\.000$/, "")), d = `${u}° ${y}' ${l}, ${f}° ${E}' ${o}`;
1145
- }
1146
- if (i == "DMS") {
1147
- const y = Math.floor(h), E = Math.floor(v);
1148
- let O = ((h - y) * 60).toFixed(1).padStart(4, "0"), p = ((v - E) * 60).toFixed(1).padStart(4, "0");
1149
- const S = y.toString().padStart(2, "0"), W = E.toString().padStart(2, "0");
1150
- O.endsWith(".0") && p.endsWith(".0") && (O = O.replace(/\.0$/, ""), p = p.replace(/\.0$/, "")), d = `${u}° ${S}' ${O}" ${l}, ${f}° ${W}' ${p}" ${o}`;
1151
- }
1152
- return d;
1153
- } else
1154
- throw new Error("no decimal coordinates to convert");
1155
- }
1156
- function qt(i, e) {
1157
- const t = Math.pow(10, e);
1158
- return Math.round((i + Number.EPSILON) * t) / t;
1159
- }
1160
- function wt(i, e) {
1161
- e || (e = 5), i = i.replace(/\s+/g, " ").trim();
1162
- let t = null, n = null, r = "", c = "", l = null, o = [], d = !1;
1163
- if (Tn.test(i))
1164
- throw new Error("invalid coordinate value");
1165
- if (Ft.test(i))
1166
- if (o = Ft.exec(i), d = Ie(o), d)
1167
- t = Math.abs(o[1]) + o[2] / 60, Number(o[1]) < 0 && (t *= -1), n = Math.abs(o[3]) + o[4] / 60, Number(o[3]) < 0 && (n *= -1), l = "DM";
1168
- else
1169
- throw new Error("invalid coordinate format");
1170
- else if (Gt.test(i))
1171
- if (o = Gt.exec(i), d = Ie(o), d) {
1172
- if (t = o[2], n = o[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), l = "DD", Number(Math.round(t)) == Number(t))
1173
- throw new Error("integer only coordinate provided");
1174
- if (Number(Math.round(n)) == Number(n))
1175
- throw new Error("integer only coordinate provided");
1176
- o[1] ? (r = o[1], c = o[5]) : o[4] && (r = o[4], c = o[8]);
1177
- } else
1178
- throw new Error("invalid decimal coordinate format");
1179
- else if (jt.test(i))
1180
- if (o = jt.exec(i), d = Ie(o), d)
1181
- t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, l = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, l = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[9])), o[11] && (n += o[11] / 60), o[13] && (n += o[13].replace(",", ".") / 3600), parseInt(o[9]) < 0 && (n = -1 * n), o[1] ? (r = o[1], c = o[8]) : o[7] && (r = o[7], c = o[14]);
1182
- else
1183
- throw new Error("invalid DMS coordinates format");
1184
- else if (Ht.test(i))
1185
- if (o = Ht.exec(i), d = Ie(o), d)
1186
- t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, l = "DM"), o[6] && (t += o[6] / 3600, l = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12] / 60), o[14] && (n += o[14] / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], c = o[9]) : o[8] && (r = o[8], c = o[16]);
1187
- else
1188
- throw new Error("invalid DMS coordinates format");
1189
- else if (Zt.test(i)) {
1190
- if (o = Zt.exec(i), d = Ie(o), o.filter((u) => u).length <= 5)
1191
- throw new Error("invalid coordinates format");
1192
- if (d)
1193
- t = Math.abs(parseInt(o[2])), o[4] && (t += o[4].replace(",", ".") / 60, l = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, l = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12].replace(",", ".") / 60), o[14] && (n += o[14].replace(",", ".") / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], c = o[9]) : o[8] && (r = o[8], c = o[16]);
1194
- else
1195
- throw new Error("invalid coordinates format");
1196
- }
1197
- if (d) {
1198
- if (Math.abs(n) >= 180)
1199
- throw new Error("invalid longitude value");
1200
- if (Math.abs(t) >= 90)
1201
- throw new Error("invalid latitude value");
1202
- if (r && !c || !r && c)
1203
- throw new Error("invalid coordinates value");
1204
- if (r && r == c)
1205
- throw new Error("invalid coordinates format");
1206
- t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
1207
- let u = /S|SOUTH/i;
1208
- u.test(r) && t > 0 && (t = -1 * t), u = /W|WEST/i, u.test(c) && n > 0 && (n = -1 * n);
1209
- const f = o[0].trim();
1210
- let h, v;
1211
- const y = /[,/;\u0020]/g, E = f.match(y);
1212
- if (E == null) {
1213
- const S = Math.floor(i.length / 2);
1214
- h = f.substring(0, S).trim(), v = f.substring(S).trim();
1215
- } else {
1216
- let S;
1217
- E.length % 2 == 1 ? S = Math.floor(E.length / 2) : S = E.length / 2 - 1;
1218
- let W = 0;
1219
- if (S == 0)
1220
- W = f.indexOf(E[0]), h = f.substring(0, W).trim(), v = f.substring(W + 1).trim();
1221
- else {
1222
- let C = 0, H = 0;
1223
- for (; C <= S; )
1224
- W = f.indexOf(E[C], H), H = W + 1, C++;
1225
- h = f.substring(0, W).trim(), v = f.substring(W + 1).trim();
1226
- }
1227
- }
1228
- const O = h.split(".");
1229
- if (O.length == 2 && O[1] == 0 && O[1].length != 2)
1230
- throw new Error("invalid coordinates format");
1231
- const p = v.split(".");
1232
- if (p.length == 2 && p[1] == 0 && p[1].length != 2)
1233
- throw new Error("invalid coordinates format");
1234
- if (/^\d+$/.test(h) || /^\d+$/.test(v))
1235
- throw new Error("degree only coordinate/s provided");
1236
- return t = Number(Number(t).toFixed(e)), n = Number(Number(n).toFixed(e)), Object.freeze({
1237
- verbatimCoordinates: f,
1238
- verbatimLatitude: h,
1239
- verbatimLongitude: v,
1240
- decimalLatitude: t,
1241
- decimalLongitude: n,
1242
- decimalCoordinates: `${t},${n}`,
1243
- originalFormat: l,
1244
- closeEnough: Nn,
1245
- toCoordinateFormat: kn
1246
- });
1247
- } else
1248
- throw new Error("coordinates pattern match failed");
1249
- }
1250
- function Ie(i) {
1251
- if (!isNaN(i[0]))
1252
- return !1;
1253
- const e = [...i];
1254
- if (e.shift(), e.length % 2 > 0)
1255
- return !1;
1256
- const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
1257
- for (let c = 0; c < r; c++) {
1258
- const l = e[c], o = e[c + r], d = t.test(l) && t.test(o), u = n.test(l) && n.test(o), f = l == o;
1259
- if (!(l == null && o == null)) {
1260
- if (l == null || o == null)
1261
- return !1;
1262
- if (d || u || f)
1263
- continue;
1264
- return !1;
1265
- }
1266
- }
1267
- return !0;
1268
- }
1269
- function Qt(i, e) {
1270
- const t = Math.abs(i - e);
1271
- return Number(t.toFixed(6)) <= 1e-5;
1272
- }
1273
- function Nn(i) {
1274
- if (!i)
1275
- throw new Error("coords must be provided");
1276
- if (i.includes(",")) {
1277
- const e = i.split(",");
1278
- if (Number(e[0]) == NaN || Number(e[1]) == NaN)
1279
- throw new Error("coords are not valid decimals");
1280
- return Qt(this.decimalLatitude, Number(e[0])) && Qt(this.decimalLongitude, e[1]);
1281
- } else
1282
- throw new Error("coords being tested must be separated by a comma");
1283
- }
1284
- const Mn = Object.freeze({
1285
- DMS: "DMS",
1286
- DM: "DM",
1287
- DD: "DD"
1288
- });
1289
- wt.to = Mn;
1290
- const Cn = [
1291
- {
1292
- verbatimCoordinates: "40.123, -74.123",
1293
- verbatimLatitude: "40.123",
1294
- verbatimLongitude: "-74.123"
1295
- },
1296
- {
1297
- verbatimCoordinates: "40.123° N 74.123° W",
1298
- verbatimLatitude: "40.123° N",
1299
- verbatimLongitude: "74.123° W"
1300
- },
1301
- {
1302
- verbatimCoordinates: "40.123° N 74.123° W",
1303
- verbatimLatitude: "40.123° N",
1304
- verbatimLongitude: "74.123° W"
1305
- },
1306
- {
1307
- verbatimCoordinates: '40° 7´ 22.8" N 74° 7´ 22.8" W',
1308
- verbatimLatitude: '40° 7´ 22.8" N',
1309
- verbatimLongitude: '74° 7´ 22.8" W'
1310
- },
1311
- {
1312
- verbatimCoordinates: "40° 7.38’ , -74° 7.38’",
1313
- verbatimLatitude: "40° 7.38’",
1314
- verbatimLongitude: "-74° 7.38’"
1315
- },
1316
- {
1317
- verbatimCoordinates: "N40°7’22.8’’, W74°7’22.8’’",
1318
- verbatimLatitude: "N40°7’22.8’’",
1319
- verbatimLongitude: "W74°7’22.8’’"
1320
- },
1321
- {
1322
- verbatimCoordinates: '40°7’22.8"N, 74°7’22.8"W',
1323
- verbatimLatitude: '40°7’22.8"N',
1324
- verbatimLongitude: '74°7’22.8"W'
1325
- },
1326
- {
1327
- verbatimCoordinates: `40°7'22.8"N, 74°7'22.8"W`,
1328
- verbatimLatitude: `40°7'22.8"N`,
1329
- verbatimLongitude: `74°7'22.8"W`
1330
- },
1331
- {
1332
- verbatimCoordinates: "40 7 22.8, -74 7 22.8",
1333
- verbatimLatitude: "40 7 22.8",
1334
- verbatimLongitude: "-74 7 22.8"
1335
- },
1336
- {
1337
- verbatimCoordinates: "40.123 -74.123",
1338
- verbatimLatitude: "40.123",
1339
- verbatimLongitude: "-74.123"
1340
- },
1341
- {
1342
- verbatimCoordinates: "40.123°,-74.123°",
1343
- verbatimLatitude: "40.123°",
1344
- verbatimLongitude: "-74.123°"
1345
- },
1346
- {
1347
- verbatimCoordinates: "40.123N74.123W",
1348
- verbatimLatitude: "40.123N",
1349
- verbatimLongitude: "74.123W"
1350
- },
1351
- {
1352
- verbatimCoordinates: "4007.38N7407.38W",
1353
- verbatimLatitude: "4007.38N",
1354
- verbatimLongitude: "7407.38W"
1355
- },
1356
- {
1357
- verbatimCoordinates: '40°7’22.8"N, 74°7’22.8"W',
1358
- verbatimLatitude: '40°7’22.8"N',
1359
- verbatimLongitude: '74°7’22.8"W'
1360
- },
1361
- {
1362
- verbatimCoordinates: "400722.8N740722.8W",
1363
- verbatimLatitude: "400722.8N",
1364
- verbatimLongitude: "740722.8W"
1365
- },
1366
- {
1367
- verbatimCoordinates: "N 40 7.38 W 74 7.38",
1368
- verbatimLatitude: "N 40 7.38",
1369
- verbatimLongitude: "W 74 7.38"
1370
- },
1371
- {
1372
- verbatimCoordinates: "40:7:22.8N 74:7:22.8W",
1373
- verbatimLatitude: "40:7:22.8N",
1374
- verbatimLongitude: "74:7:22.8W"
1375
- },
1376
- {
1377
- verbatimCoordinates: "40:7:23N,74:7:23W",
1378
- verbatimLatitude: "40:7:23N",
1379
- verbatimLongitude: "74:7:23W",
1380
- decimalLatitude: 40.1230555555,
1381
- decimalLongitude: -74.1230555555
1382
- },
1383
- {
1384
- verbatimCoordinates: '40°7’23"N 74°7’23"W',
1385
- verbatimLatitude: '40°7’23"N',
1386
- verbatimLongitude: '74°7’23"W',
1387
- decimalLatitude: 40.1230555555,
1388
- decimalLongitude: -74.12305555555555
1389
- },
1390
- {
1391
- verbatimCoordinates: '40°7’23"S 74°7’23"E',
1392
- verbatimLatitude: '40°7’23"S',
1393
- verbatimLongitude: '74°7’23"E',
1394
- decimalLatitude: -40.1230555555,
1395
- decimalLongitude: 74.12305555555555
1396
- },
1397
- {
1398
- verbatimCoordinates: '40°7’23" -74°7’23"',
1399
- verbatimLatitude: '40°7’23"',
1400
- verbatimLongitude: '-74°7’23"',
1401
- decimalLatitude: 40.1230555555,
1402
- decimalLongitude: -74.123055555
1403
- },
1404
- {
1405
- verbatimCoordinates: '40d 7’ 23" N 74d 7’ 23" W',
1406
- verbatimLatitude: '40d 7’ 23" N',
1407
- verbatimLongitude: '74d 7’ 23" W',
1408
- decimalLatitude: 40.1230555555,
1409
- decimalLongitude: -74.123055555
1410
- },
1411
- {
1412
- verbatimCoordinates: "40.123N 74.123W",
1413
- verbatimLatitude: "40.123N",
1414
- verbatimLongitude: "74.123W"
1415
- },
1416
- {
1417
- verbatimCoordinates: "40° 7.38, -74° 7.38",
1418
- verbatimLatitude: "40° 7.38",
1419
- verbatimLongitude: "-74° 7.38"
1420
- },
1421
- {
1422
- verbatimCoordinates: "40° 7.38, -74° 7.38",
1423
- verbatimLatitude: "40° 7.38",
1424
- verbatimLongitude: "-74° 7.38"
1425
- },
1426
- {
1427
- verbatimCoordinates: "40 7 22.8; -74 7 22.8",
1428
- verbatimLatitude: "40 7 22.8",
1429
- verbatimLongitude: "-74 7 22.8"
1430
- }
1431
- ], Wn = {
1432
- decimalLatitude: 40.123,
1433
- decimalLongitude: -74.123
1434
- }, On = [
1435
- {
1436
- verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
1437
- verbatimLatitude: `50°4'17.698"south`,
1438
- verbatimLongitude: `14°24'2.826"east`,
1439
- decimalLatitude: -50.07158277777778,
1440
- decimalLongitude: 14.400785
1441
- },
1442
- {
1443
- verbatimCoordinates: "50d4m17.698S 14d24m2.826E",
1444
- verbatimLatitude: "50d4m17.698S",
1445
- verbatimLongitude: "14d24m2.826E",
1446
- decimalLatitude: -50.07158277777778,
1447
- decimalLongitude: 14.400785
1448
- },
1449
- {
1450
- verbatimCoordinates: "40:26:46N,79:56:55W",
1451
- verbatimLatitude: "40:26:46N",
1452
- verbatimLongitude: "79:56:55W",
1453
- decimalLatitude: 40.44611111111111,
1454
- decimalLongitude: -79.9486111111111
1455
- },
1456
- {
1457
- verbatimCoordinates: "40:26:46.302N 79:56:55.903W",
1458
- verbatimLatitude: "40:26:46.302N",
1459
- verbatimLongitude: "79:56:55.903W",
1460
- decimalLatitude: 40.446195,
1461
- decimalLongitude: -79.94886194444445
1462
- },
1463
- {
1464
- verbatimCoordinates: "40°26′47″N 79°58′36″W",
1465
- verbatimLatitude: "40°26′47″N",
1466
- verbatimLongitude: "79°58′36″W",
1467
- decimalLatitude: 40.44638888888889,
1468
- decimalLongitude: -79.97666666666667
1469
- },
1470
- {
1471
- verbatimCoordinates: "40d 26′ 47″ N 79d 58′ 36″ W",
1472
- verbatimLatitude: "40d 26′ 47″ N",
1473
- verbatimLongitude: "79d 58′ 36″ W",
1474
- decimalLatitude: 40.44638888888889,
1475
- decimalLongitude: -79.97666666666667
1476
- },
1477
- {
1478
- verbatimCoordinates: "40.446195N 79.948862W",
1479
- verbatimLatitude: "40.446195N",
1480
- verbatimLongitude: "79.948862W",
1481
- decimalLatitude: 40.446195,
1482
- decimalLongitude: -79.948862
1483
- },
1484
- {
1485
- verbatimCoordinates: "40,446195° 79,948862°",
1486
- verbatimLatitude: "40,446195°",
1487
- verbatimLongitude: "79,948862°",
1488
- decimalLatitude: 40.446195,
1489
- decimalLongitude: 79.948862
1490
- },
1491
- {
1492
- verbatimCoordinates: "40° 26.7717, -79° 56.93172",
1493
- verbatimLatitude: "40° 26.7717",
1494
- verbatimLongitude: "-79° 56.93172",
1495
- decimalLatitude: 40.446195,
1496
- decimalLongitude: -79.948862
1497
- },
1498
- {
1499
- verbatimCoordinates: "40.446195, -79.948862",
1500
- verbatimLatitude: "40.446195",
1501
- verbatimLongitude: "-79.948862",
1502
- decimalLatitude: 40.446195,
1503
- decimalLongitude: -79.948862
1504
- },
1505
- {
1506
- verbatimCoordinates: "40.123256; -74.123256",
1507
- verbatimLatitude: "40.123256",
1508
- verbatimLongitude: "-74.123256",
1509
- decimalLatitude: 40.123256,
1510
- decimalLongitude: -74.123256
1511
- },
1512
- {
1513
- verbatimCoordinates: "18°24S 22°45E",
1514
- verbatimLatitude: "18°24S",
1515
- verbatimLongitude: "22°45E",
1516
- decimalLatitude: -18.4,
1517
- decimalLongitude: 22.75
1518
- }
1519
- ], Rn = [
1520
- {
1521
- verbatimCoordinates: "10.432342S 10.6345345E",
1522
- verbatimLatitude: "10.432342S",
1523
- verbatimLongitude: "10.6345345E",
1524
- decimalLatitude: -10.432342,
1525
- decimalLongitude: 10.6345345
1526
- },
1527
- {
1528
- verbatimCoordinates: "10.00S 10.00E",
1529
- verbatimLatitude: "10.00S",
1530
- verbatimLongitude: "10.00E",
1531
- decimalLatitude: -10,
1532
- decimalLongitude: 10
1533
- },
1534
- {
1535
- verbatimCoordinates: "00.00S 01.00E",
1536
- verbatimLatitude: "00.00S",
1537
- verbatimLongitude: "01.00E",
1538
- decimalLatitude: 0,
1539
- decimalLongitude: 1
1540
- },
1541
- {
1542
- verbatimCoordinates: "18.24S 22.45E",
1543
- verbatimLatitude: "18.24S",
1544
- verbatimLongitude: "22.45E",
1545
- decimalLatitude: -18.4,
1546
- decimalLongitude: 22.75
1547
- },
1548
- {
1549
- verbatimCoordinates: "27deg 15min 45.2sec S 18deg 32min 53.7sec E",
1550
- verbatimLatitude: "27deg 15min 45.2sec S",
1551
- verbatimLongitude: "18deg 32min 53.7sec E",
1552
- decimalLatitude: -27.262555555555554,
1553
- decimalLongitude: 18.54825
1554
- },
1555
- {
1556
- verbatimCoordinates: "-23.3245° S / 28.2344° E",
1557
- verbatimLatitude: "-23.3245° S",
1558
- verbatimLongitude: "28.2344° E",
1559
- decimalLatitude: -23.3245,
1560
- decimalLongitude: 28.2344
1561
- },
1562
- {
1563
- verbatimCoordinates: "40° 26.7717 -79° 56.93172",
1564
- verbatimLatitude: "40° 26.7717",
1565
- verbatimLongitude: "-79° 56.93172",
1566
- decimalLatitude: 40.446195,
1567
- decimalLongitude: -79.948862
1568
- },
1569
- {
1570
- verbatimCoordinates: "27.15.45S 18.32.53E",
1571
- verbatimLatitude: "27.15.45S",
1572
- verbatimLongitude: "18.32.53E",
1573
- decimalLatitude: -27.2625,
1574
- decimalLongitude: 18.548055
1575
- },
1576
- {
1577
- verbatimCoordinates: "-27.15.45 18.32.53",
1578
- verbatimLatitude: "-27.15.45",
1579
- verbatimLongitude: "18.32.53",
1580
- decimalLatitude: -27.2625,
1581
- decimalLongitude: 18.548055
1582
- },
1583
- {
1584
- verbatimCoordinates: "27.15.45.2S 18.32.53.4E",
1585
- verbatimLatitude: "27.15.45.2S",
1586
- verbatimLongitude: "18.32.53.4E",
1587
- decimalLatitude: -27.262556,
1588
- decimalLongitude: 18.548167
1589
- },
1590
- {
1591
- verbatimCoordinates: "27.15.45,2S 18.32.53,4E",
1592
- verbatimLatitude: "27.15.45,2S",
1593
- verbatimLongitude: "18.32.53,4E",
1594
- decimalLatitude: -27.262556,
1595
- decimalLongitude: 18.548167
1596
- },
1597
- {
1598
- verbatimCoordinates: "S23.43563 ° E22.45634 °",
1599
- verbatimLatitude: "S23.43563 °",
1600
- verbatimLongitude: "E22.45634 °",
1601
- decimalLatitude: -23.43563,
1602
- decimalLongitude: 22.45634
1603
- },
1604
- {
1605
- verbatimCoordinates: "27,71372° S 23,07771° E",
1606
- verbatimLatitude: "27,71372° S",
1607
- verbatimLongitude: "23,07771° E",
1608
- decimalLatitude: -27.71372,
1609
- decimalLongitude: 23.07771
1610
- },
1611
- {
1612
- verbatimCoordinates: "27.45.34 S 23.23.23 E",
1613
- verbatimLatitude: "27.45.34 S",
1614
- verbatimLongitude: "23.23.23 E",
1615
- decimalLatitude: -27.759444,
1616
- decimalLongitude: 23.38972222
1617
- },
1618
- {
1619
- verbatimCoordinates: "S 27.45.34 E 23.23.23",
1620
- verbatimLatitude: "S 27.45.34",
1621
- verbatimLongitude: "E 23.23.23",
1622
- decimalLatitude: -27.759444,
1623
- decimalLongitude: 23.38972222
1624
- },
1625
- {
1626
- verbatimCoordinates: "53 16.3863,4 52.8171",
1627
- verbatimLatitude: "53 16.3863",
1628
- verbatimLongitude: "4 52.8171",
1629
- decimalLatitude: 53.273105,
1630
- decimalLongitude: 4.88029
1631
- },
1632
- {
1633
- verbatimCoordinates: "50 8.2914,-5 2.4447",
1634
- verbatimLatitude: "50 8.2914",
1635
- verbatimLongitude: "-5 2.4447",
1636
- decimalLatitude: 50.13819,
1637
- decimalLongitude: -5.040745
1638
- },
1639
- {
1640
- verbatimCoordinates: "N 48° 30,6410', E 18° 57,4583'",
1641
- verbatimLatitude: "N 48° 30,6410'",
1642
- verbatimLongitude: "E 18° 57,4583'",
1643
- decimalLatitude: 48.51068,
1644
- decimalLongitude: 18.95764
1645
- },
1646
- {
1647
- verbatimCoordinates: "1.23456, 18.33453",
1648
- verbatimLatitude: "1.23456",
1649
- verbatimLongitude: "18.33453",
1650
- decimalLatitude: 1.23456,
1651
- decimalLongitude: 18.33453
1652
- }
1653
- ];
1654
- function zn() {
1655
- const i = [];
1656
- return Cn.forEach((e) => {
1657
- e.decimalLatitude ? i.push(e) : i.push({ ...e, ...Wn });
1658
- }), [...i, ...On, ...Rn];
1659
- }
1660
- const Un = zn();
1661
- wt.formats = Un.map((i) => i.verbatimCoordinates);
1662
- const Dn = wt;
1663
- function Kt(i, e, t) {
1664
- const n = i.slice();
1665
- return n[97] = e[t], n[99] = t, n;
1666
- }
1667
- function Vt(i) {
1668
- let e, t;
1669
- return e = new Ln({}), {
1670
- c() {
1671
- ve(e.$$.fragment);
1672
- },
1673
- m(n, r) {
1674
- de(e, n, r), t = !0;
1675
- },
1676
- i(n) {
1677
- t || (G(e.$$.fragment, n), t = !0);
1678
- },
1679
- o(n) {
1680
- q(e.$$.fragment, n), t = !1;
1681
- },
1682
- d(n) {
1683
- fe(e, n);
1684
- }
1685
- };
1686
- }
1687
- function Yt(i) {
1688
- let e, t, n, r, c;
1689
- return t = new yn({}), {
1690
- c() {
1691
- e = U("button"), ve(t.$$.fragment), a(e, "type", "button"), a(
1692
- e,
1693
- "title",
1694
- /*reverseButtonTitle*/
1695
- i[10]
1696
- ), a(e, "class", "svelte-bz0zu3"), Ce(
1697
- e,
1698
- "active",
1699
- /*reverseActive*/
1700
- i[0]
1701
- );
1702
- },
1703
- m(l, o) {
1704
- I(l, e, o), de(t, e, null), n = !0, r || (c = Z(
1705
- e,
1706
- "click",
1707
- /*click_handler_3*/
1708
- i[79]
1709
- ), r = !0);
1710
- },
1711
- p(l, o) {
1712
- (!n || o[0] & /*reverseButtonTitle*/
1713
- 1024) && a(
1714
- e,
1715
- "title",
1716
- /*reverseButtonTitle*/
1717
- l[10]
1718
- ), (!n || o[0] & /*reverseActive*/
1719
- 1) && Ce(
1720
- e,
1721
- "active",
1722
- /*reverseActive*/
1723
- l[0]
1724
- );
1725
- },
1726
- i(l) {
1727
- n || (G(t.$$.fragment, l), n = !0);
1728
- },
1729
- o(l) {
1730
- q(t.$$.fragment, l), n = !1;
1731
- },
1732
- d(l) {
1733
- l && D(e), fe(t), r = !1, c();
1734
- }
1735
- };
1736
- }
1737
- function In(i) {
1738
- let e, t = [], n = /* @__PURE__ */ new Map(), r, c, l, o = At(
1739
- /*listFeatures*/
1740
- i[13]
1741
- );
1742
- const d = (u) => (
1743
- /*feature*/
1744
- u[97].id + /*feature*/
1745
- (u[97].address ? "," + /*feature*/
1746
- u[97].address : "")
1747
- );
1748
- for (let u = 0; u < o.length; u += 1) {
1749
- let f = Kt(i, o, u), h = d(f);
1750
- n.set(h, t[u] = Xt(h, f));
1751
- }
1752
- return {
1753
- c() {
1754
- e = U("ul");
1755
- for (let u = 0; u < t.length; u += 1)
1756
- t[u].c();
1757
- a(e, "class", "options svelte-bz0zu3"), a(e, "role", "listbox");
1758
- },
1759
- m(u, f) {
1760
- I(u, e, f);
1761
- for (let h = 0; h < t.length; h += 1)
1762
- t[h] && t[h].m(e, null);
1763
- r = !0, c || (l = [
1764
- Z(
1765
- e,
1766
- "mouseleave",
1767
- /*handleMouseLeave*/
1768
- i[27]
1769
- ),
1770
- Z(
1771
- e,
1772
- "blur",
1773
- /*blur_handler_1*/
1774
- i[83]
1775
- ),
1776
- Z(
1777
- e,
1778
- "keydown",
1779
- /*handleKeyDown*/
1780
- i[23]
1781
- )
1782
- ], c = !0);
1783
- },
1784
- p(u, f) {
1785
- f[0] & /*listFeatures, showPlaceType, selectedItemIndex, picked, missingIconsCache, iconsBaseUrl, handleMouseEnter, pick*/
1786
- 102823936 && (o = At(
1787
- /*listFeatures*/
1788
- u[13]
1789
- ), xe(), t = $i(t, f, d, 1, u, o, n, e, xi, Xt, null, Kt), $e());
1790
- },
1791
- i(u) {
1792
- if (!r) {
1793
- for (let f = 0; f < o.length; f += 1)
1794
- G(t[f]);
1795
- r = !0;
1796
- }
1797
- },
1798
- o(u) {
1799
- for (let f = 0; f < t.length; f += 1)
1800
- q(t[f]);
1801
- r = !1;
1802
- },
1803
- d(u) {
1804
- u && D(e);
1805
- for (let f = 0; f < t.length; f += 1)
1806
- t[f].d();
1807
- c = !1, me(l);
1808
- }
1809
- };
1810
- }
1811
- function An(i) {
1812
- let e, t, n, r, c, l;
1813
- return t = new si({}), {
1814
- c() {
1815
- e = U("div"), ve(t.$$.fragment), n = $(), r = U("div"), c = be(
1816
- /*noResultsMessage*/
1817
- i[8]
1818
- ), a(r, "class", "svelte-bz0zu3"), a(e, "class", "no-results svelte-bz0zu3");
1819
- },
1820
- m(o, d) {
1821
- I(o, e, d), de(t, e, null), M(e, n), M(e, r), M(r, c), l = !0;
1822
- },
1823
- p(o, d) {
1824
- (!l || d[0] & /*noResultsMessage*/
1825
- 256) && Pe(
1826
- c,
1827
- /*noResultsMessage*/
1828
- o[8]
1829
- );
1830
- },
1831
- i(o) {
1832
- l || (G(t.$$.fragment, o), l = !0);
1833
- },
1834
- o(o) {
1835
- q(t.$$.fragment, o), l = !1;
1836
- },
1837
- d(o) {
1838
- o && D(e), fe(t);
1839
- }
1840
- };
1841
- }
1842
- function Pn(i) {
1843
- let e = "", t;
1844
- return {
1845
- c() {
1846
- t = be(e);
1847
- },
1848
- m(n, r) {
1849
- I(n, t, r);
1850
- },
1851
- p: P,
1852
- i: P,
1853
- o: P,
1854
- d(n) {
1855
- n && D(t);
1856
- }
1857
- };
1858
- }
1859
- function Bn(i) {
1860
- let e, t, n, r, c, l, o, d, u, f, h;
1861
- return t = new si({}), d = new oi({}), {
1862
- c() {
1863
- e = U("div"), ve(t.$$.fragment), n = $(), r = U("div"), c = be(
1864
- /*errorMessage*/
1865
- i[7]
1866
- ), l = $(), o = U("button"), ve(d.$$.fragment), a(r, "class", "svelte-bz0zu3"), a(o, "class", "svelte-bz0zu3"), a(e, "class", "error svelte-bz0zu3");
1867
- },
1868
- m(v, y) {
1869
- I(v, e, y), de(t, e, null), M(e, n), M(e, r), M(r, c), M(e, l), M(e, o), de(d, o, null), u = !0, f || (h = Z(
1870
- o,
1871
- "click",
1872
- /*click_handler_4*/
1873
- i[80]
1874
- ), f = !0);
1875
- },
1876
- p(v, y) {
1877
- (!u || y[0] & /*errorMessage*/
1878
- 128) && Pe(
1879
- c,
1880
- /*errorMessage*/
1881
- v[7]
1882
- );
1883
- },
1884
- i(v) {
1885
- u || (G(t.$$.fragment, v), G(d.$$.fragment, v), u = !0);
1886
- },
1887
- o(v) {
1888
- q(t.$$.fragment, v), q(d.$$.fragment, v), u = !1;
1889
- },
1890
- d(v) {
1891
- v && D(e), fe(t), fe(d), f = !1, h();
1892
- }
1893
- };
1894
- }
1895
- function Xt(i, e) {
1896
- var o;
1897
- let t, n, r;
1898
- function c() {
1899
- return (
1900
- /*mouseenter_handler*/
1901
- e[81](
1902
- /*i*/
1903
- e[99]
1904
- )
1905
- );
1906
- }
1907
- function l() {
1908
- return (
1909
- /*select_handler*/
1910
- e[82](
1911
- /*feature*/
1912
- e[97]
1913
- )
1914
- );
1915
- }
1916
- return n = new bn({
1917
- props: {
1918
- feature: (
1919
- /*feature*/
1920
- e[97]
1921
- ),
1922
- showPlaceType: (
1923
- /*showPlaceType*/
1924
- e[11]
1925
- ),
1926
- style: (
1927
- /*selectedItemIndex*/
1928
- e[15] === /*i*/
1929
- e[99] ? "selected" : (
1930
- /*picked*/
1931
- ((o = e[14]) == null ? void 0 : o.id) === /*feature*/
1932
- e[97].id ? "picked" : "default"
1933
- )
1934
- ),
1935
- missingIconsCache: (
1936
- /*missingIconsCache*/
1937
- e[21]
1938
- ),
1939
- iconsBaseUrl: (
1940
- /*iconsBaseUrl*/
1941
- e[12]
1942
- )
1943
- }
1944
- }), n.$on("mouseenter", c), n.$on("select", l), {
1945
- key: i,
1946
- first: null,
1947
- c() {
1948
- t = ji(), ve(n.$$.fragment), this.first = t;
1949
- },
1950
- m(d, u) {
1951
- I(d, t, u), de(n, d, u), r = !0;
1952
- },
1953
- p(d, u) {
1954
- var h;
1955
- e = d;
1956
- const f = {};
1957
- u[0] & /*listFeatures*/
1958
- 8192 && (f.feature = /*feature*/
1959
- e[97]), u[0] & /*showPlaceType*/
1960
- 2048 && (f.showPlaceType = /*showPlaceType*/
1961
- e[11]), u[0] & /*selectedItemIndex, listFeatures, picked*/
1962
- 57344 && (f.style = /*selectedItemIndex*/
1963
- e[15] === /*i*/
1964
- e[99] ? "selected" : (
1965
- /*picked*/
1966
- ((h = e[14]) == null ? void 0 : h.id) === /*feature*/
1967
- e[97].id ? "picked" : "default"
1968
- )), u[0] & /*iconsBaseUrl*/
1969
- 4096 && (f.iconsBaseUrl = /*iconsBaseUrl*/
1970
- e[12]), n.$set(f);
1971
- },
1972
- i(d) {
1973
- r || (G(n.$$.fragment, d), r = !0);
1974
- },
1975
- o(d) {
1976
- q(n.$$.fragment, d), r = !1;
1977
- },
1978
- d(d) {
1979
- d && D(t), fe(n, d);
1980
- }
1981
- };
1982
- }
1983
- function Fn(i) {
1984
- let e, t, n, r, c, l, o, d, u, f, h, v, y, E, O, p, S, W, C, H, X, Q = !1;
1985
- c = new En({}), h = new oi({});
1986
- let w = (
1987
- /*abortController*/
1988
- i[20] && Vt()
1989
- ), g = (
1990
- /*enableReverse*/
1991
- i[6] === "button" && Yt(i)
1992
- );
1993
- const N = (
1994
- /*#slots*/
1995
- i[70].default
1996
- ), k = Pi(
1997
- N,
1998
- i,
1999
- /*$$scope*/
2000
- i[69],
2001
- null
2002
- ), L = [Bn, Pn, An, In], m = [];
2003
- function Le(_, B) {
2004
- var oe, ee;
2005
- return (
2006
- /*error*/
2007
- _[19] ? 0 : !/*focusedDelayed*/
2008
- _[16] && !/*keepListOpen*/
2009
- _[4] ? 1 : (
2010
- /*listFeatures*/
2011
- ((oe = _[13]) == null ? void 0 : oe.length) === 0 ? 2 : (
2012
- /*listFeatures*/
2013
- (ee = _[13]) != null && ee.length && /*focusedDelayed*/
2014
- (_[16] || /*keepListOpen*/
2015
- _[4]) ? 3 : -1
2016
- )
2017
- )
2018
- );
2019
- }
2020
- return ~(p = Le(i)) && (S = m[p] = L[p](i)), {
2021
- c() {
2022
- e = $(), t = U("form"), n = U("div"), r = U("button"), ve(c.$$.fragment), l = $(), o = U("input"), d = $(), u = U("div"), f = U("button"), ve(h.$$.fragment), v = $(), w && w.c(), y = $(), g && g.c(), E = $(), k && k.c(), O = $(), S && S.c(), a(r, "class", "search-button svelte-bz0zu3"), a(r, "type", "button"), a(
2023
- o,
2024
- "placeholder",
2025
- /*placeholder*/
2026
- i[9]
2027
- ), a(
2028
- o,
2029
- "aria-label",
2030
- /*placeholder*/
2031
- i[9]
2032
- ), a(o, "class", "svelte-bz0zu3"), a(f, "type", "button"), a(
2033
- f,
2034
- "title",
2035
- /*clearButtonTitle*/
2036
- i[3]
2037
- ), a(f, "class", "svelte-bz0zu3"), a(u, "class", "clear-button-container svelte-bz0zu3"), Ce(
2038
- u,
2039
- "displayable",
2040
- /*searchValue*/
2041
- i[1] !== ""
2042
- ), a(n, "class", "input-group svelte-bz0zu3"), a(t, "class", W = et(
2043
- /*className*/
2044
- i[2]
2045
- ) + " svelte-bz0zu3"), Ce(
2046
- t,
2047
- "can-collapse",
2048
- /*collapsed*/
2049
- i[5] && /*searchValue*/
2050
- i[1] === ""
2051
- );
2052
- },
2053
- m(_, B) {
2054
- I(_, e, B), I(_, t, B), M(t, n), M(n, r), de(c, r, null), M(n, l), M(n, o), i[72](o), Dt(
2055
- o,
2056
- /*searchValue*/
2057
- i[1]
2058
- ), M(n, d), M(n, u), M(u, f), de(h, f, null), M(u, v), w && w.m(u, null), M(n, y), g && g.m(n, null), M(n, E), k && k.m(n, null), M(t, O), ~p && m[p].m(t, null), C = !0, H || (X = [
2059
- Z(
2060
- r,
2061
- "click",
2062
- /*click_handler*/
2063
- i[71]
2064
- ),
2065
- Z(
2066
- o,
2067
- "input",
2068
- /*input_1_input_handler*/
2069
- i[73]
2070
- ),
2071
- Z(
2072
- o,
2073
- "focus",
2074
- /*focus_handler*/
2075
- i[74]
2076
- ),
2077
- Z(
2078
- o,
2079
- "blur",
2080
- /*blur_handler*/
2081
- i[75]
2082
- ),
2083
- Z(
2084
- o,
2085
- "click",
2086
- /*click_handler_1*/
2087
- i[76]
2088
- ),
2089
- Z(
2090
- o,
2091
- "keydown",
2092
- /*handleKeyDown*/
2093
- i[23]
2094
- ),
2095
- Z(
2096
- o,
2097
- "input",
2098
- /*handleInput*/
2099
- i[24]
2100
- ),
2101
- Z(
2102
- o,
2103
- "change",
2104
- /*change_handler*/
2105
- i[77]
2106
- ),
2107
- Z(
2108
- f,
2109
- "click",
2110
- /*click_handler_2*/
2111
- i[78]
2112
- ),
2113
- Z(t, "submit", Hi(
2114
- /*handleSubmit*/
2115
- i[22]
2116
- ))
2117
- ], H = !0);
2118
- },
2119
- p(_, B) {
2120
- (!C || B[0] & /*placeholder*/
2121
- 512) && a(
2122
- o,
2123
- "placeholder",
2124
- /*placeholder*/
2125
- _[9]
2126
- ), (!C || B[0] & /*placeholder*/
2127
- 512) && a(
2128
- o,
2129
- "aria-label",
2130
- /*placeholder*/
2131
- _[9]
2132
- ), B[0] & /*searchValue*/
2133
- 2 && o.value !== /*searchValue*/
2134
- _[1] && Dt(
2135
- o,
2136
- /*searchValue*/
2137
- _[1]
2138
- ), (!C || B[0] & /*clearButtonTitle*/
2139
- 8) && a(
2140
- f,
2141
- "title",
2142
- /*clearButtonTitle*/
2143
- _[3]
2144
- ), /*abortController*/
2145
- _[20] ? w ? B[0] & /*abortController*/
2146
- 1048576 && G(w, 1) : (w = Vt(), w.c(), G(w, 1), w.m(u, null)) : w && (xe(), q(w, 1, 1, () => {
2147
- w = null;
2148
- }), $e()), (!C || B[0] & /*searchValue*/
2149
- 2) && Ce(
2150
- u,
2151
- "displayable",
2152
- /*searchValue*/
2153
- _[1] !== ""
2154
- ), /*enableReverse*/
2155
- _[6] === "button" ? g ? (g.p(_, B), B[0] & /*enableReverse*/
2156
- 64 && G(g, 1)) : (g = Yt(_), g.c(), G(g, 1), g.m(n, E)) : g && (xe(), q(g, 1, 1, () => {
2157
- g = null;
2158
- }), $e()), k && k.p && (!C || B[2] & /*$$scope*/
2159
- 128) && Fi(
2160
- k,
2161
- N,
2162
- _,
2163
- /*$$scope*/
2164
- _[69],
2165
- C ? Bi(
2166
- N,
2167
- /*$$scope*/
2168
- _[69],
2169
- B,
2170
- null
2171
- ) : Gi(
2172
- /*$$scope*/
2173
- _[69]
2174
- ),
2175
- null
2176
- );
2177
- let oe = p;
2178
- p = Le(_), p === oe ? ~p && m[p].p(_, B) : (S && (xe(), q(m[oe], 1, 1, () => {
2179
- m[oe] = null;
2180
- }), $e()), ~p ? (S = m[p], S ? S.p(_, B) : (S = m[p] = L[p](_), S.c()), G(S, 1), S.m(t, null)) : S = null), (!C || B[0] & /*className*/
2181
- 4 && W !== (W = et(
2182
- /*className*/
2183
- _[2]
2184
- ) + " svelte-bz0zu3")) && a(t, "class", W), (!C || B[0] & /*className, collapsed, searchValue*/
2185
- 38) && Ce(
2186
- t,
2187
- "can-collapse",
2188
- /*collapsed*/
2189
- _[5] && /*searchValue*/
2190
- _[1] === ""
2191
- );
2192
- },
2193
- i(_) {
2194
- C || (G(Q), G(c.$$.fragment, _), G(h.$$.fragment, _), G(w), G(g), G(k, _), G(S), C = !0);
2195
- },
2196
- o(_) {
2197
- q(Q), q(c.$$.fragment, _), q(h.$$.fragment, _), q(w), q(g), q(k, _), q(S), C = !1;
2198
- },
2199
- d(_) {
2200
- _ && (D(e), D(t)), fe(c), i[72](null), fe(h), w && w.d(), g && g.d(), k && k.d(_), ~p && m[p].d(), H = !1, me(X);
2201
- }
2202
- };
2203
- }
2204
- function Gn(i, e, t) {
2205
- let n, r, c, { $$slots: l = {}, $$scope: o } = e;
2206
- const d = {
2207
- continental_marine: 4,
2208
- country: 4,
2209
- major_landform: 8,
2210
- region: 5,
2211
- subregion: 6,
2212
- county: 7,
2213
- joint_municipality: 8,
2214
- joint_submunicipality: 9,
2215
- municipality: 10,
2216
- municipal_district: 11,
2217
- locality: 12,
2218
- neighbourhood: 13,
2219
- place: 14,
2220
- postal_code: 14,
2221
- road: 16,
2222
- poi: 17,
2223
- address: 18,
2224
- "poi.peak": 15,
2225
- "poi.shop": 18,
2226
- "poi.cafe": 18,
2227
- "poi.restaurant": 18,
2228
- "poi.aerodrome": 13
2229
- };
2230
- let { class: u = void 0 } = e, { apiKey: f } = e, { bbox: h = void 0 } = e, { clearButtonTitle: v = "clear" } = e, { clearOnBlur: y = !1 } = e, { clearListOnPick: E = !1 } = e, { keepListOpen: O = !1 } = e, { collapsed: p = !1 } = e, { country: S = void 0 } = e, { debounceSearch: W = 200 } = e, { enableReverse: C = "never" } = e, { errorMessage: H = "Something went wrong…" } = e, { filter: X = () => !0 } = e, { flyTo: Q = !0 } = e, { fuzzyMatch: w = !0 } = e, { language: g = void 0 } = e, { limit: N = void 0 } = e;
2231
- const k = 41415112612;
2232
- let { reverseGeocodingLimit: L = k } = e, { mapController: m = void 0 } = e, { minLength: Le = 2 } = e, { noResultsMessage: _ = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: B = "Search" } = e, { proximity: oe = [{ type: "server-geolocation" }] } = e, { reverseActive: ee = C === "always" } = e, { reverseButtonTitle: Et = "toggle reverse geocoding" } = e, { searchValue: K = "" } = e, { pickedResultStyle: Fe = "full-geometry" } = e, { showPlaceType: St = "if-needed" } = e, { showResultsWhileTyping: Ge = !0 } = e, { selectFirst: pe = !0 } = e, { flyToSelected: je = !1 } = e, { markerOnSelected: He = !0 } = e, { types: tt = void 0 } = e;
2233
- const pt = [];
2234
- let { reverseGeocodingTypes: Ze = pt } = e, { exhaustiveReverseGeocoding: it = !1 } = e, { excludeTypes: nt = !1 } = e;
2235
- const Tt = void 0;
2236
- let { reverseGeocodingExcludeTypes: qe = Tt } = e, { zoom: Qe = d } = e, { apiUrl: rt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ot = {} } = e, { iconsBaseUrl: kt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.6/icons/" } = e, { adjustUrlQuery: st = () => {
2237
- } } = e, { adjustUrl: at = () => {
2238
- } } = e;
2239
- function li(s) {
2240
- ne.focus(s);
2241
- }
2242
- function ui() {
2243
- ne.blur();
2244
- }
2245
- function Nt(s, A = !0, F = !1) {
2246
- t(1, K = s), A ? (t(15, R = -1), Ct()) : (Wt(void 0, !F, F), setTimeout(() => {
2247
- ne.focus(), ne.select();
2248
- }));
2249
- }
2250
- function ci() {
2251
- t(13, T = void 0), t(14, b = void 0), t(15, R = -1);
2252
- }
2253
- function di() {
2254
- t(64, j = []), t(14, b = void 0);
2255
- }
2256
- let T, j, b, Mt = "", ne, R = -1, se, Ke = [], _e, Te, ke, lt, ue = !1;
2257
- const fi = /* @__PURE__ */ new Set(), ge = ni();
2258
- Qi(() => {
2259
- m && (m.setEventHandler(void 0), m.indicateReverse(!1), m.setSelectedMarker(-1), m.setFeatures(void 0, void 0, !1));
2260
- });
2261
- function Ct(s) {
2262
- if (t(17, ue = !1), Te && (clearTimeout(Te), Te = void 0), R > -1 && T)
2263
- t(14, b = T[R]), t(1, K = b.place_type[0] === "reverse" ? b.place_name : b.place_name.replace(/,.*/, "")), t(19, se = void 0), t(64, j = void 0), t(15, R = -1);
2264
- else if (K) {
2265
- const A = s || !ut(K);
2266
- ct(K, { exact: !0 }).then(() => {
2267
- t(64, j = T), t(14, b = void 0), A && mi();
2268
- }).catch((F) => t(19, se = F));
2269
- }
2270
- }
2271
- function ut(s) {
2272
- try {
2273
- return Dn(s, 6);
2274
- } catch {
2275
- return !1;
2276
- }
2277
- }
2278
- async function ct(s, { byId: A = !1, exact: F = !1 } = {}) {
2279
- var x, ae, he;
2280
- t(19, se = void 0), _e == null || _e.abort();
2281
- const J = new AbortController();
2282
- t(20, _e = J);
2283
- try {
2284
- const z = ut(s), Re = new URL(rt + "/" + encodeURIComponent(z ? z.decimalLongitude + "," + z.decimalLatitude : s) + ".json"), te = Re.searchParams;
2285
- g !== void 0 && te.set("language", Array.isArray(g) ? g.join(",") : g ?? "");
2286
- const [mt] = (m == null ? void 0 : m.getCenterAndZoom()) ?? [];
2287
- let le = (x = !z || Ze === pt ? tt : Ze) == null ? void 0 : x.map((V) => typeof V == "string" ? V : mt === void 0 || (V[0] ?? 0) <= mt && mt < (V[1] ?? 1 / 0) ? V[2] : void 0).filter((V) => V !== void 0);
2288
- le && (le = [...new Set(le)], te.set("types", le.join(",")));
2289
- const Rt = !z || qe === Tt ? nt : qe;
2290
- if (Rt && te.set("excludeTypes", String(Rt)), h && te.set("bbox", h.map((V) => V.toFixed(6)).join(",")), S && te.set("country", Array.isArray(S) ? S.join(",") : S), !A && !z) {
2291
- const V = await pn(m, oe, J);
2292
- V && te.set("proximity", V), (F || !Ge) && te.set("autocomplete", "false"), te.set("fuzzyMatch", String(w));
2293
- }
2294
- const ze = L === k ? N : L;
2295
- ze !== void 0 && ze > 1 && (le == null ? void 0 : le.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."), z ? (ze === 1 || ze !== void 0 && (it || (le == null ? void 0 : le.length) === 1)) && te.set("limit", String(ze)) : N !== void 0 && te.set("limit", String(N)), f && te.set("key", f), st(te), at(Re);
2296
- const Wi = Re.searchParams.get("types") === "" && Re.searchParams.get("excludeTypes") !== "true", Ve = Re.toString();
2297
- if (Ve === Mt) {
2298
- A ? (E && t(13, T = void 0), t(14, b = Ke[0])) : (t(13, T = Ke), ((ae = T[R]) == null ? void 0 : ae.id) !== (r == null ? void 0 : r.id) && t(15, R = -1));
2299
- return;
2300
- }
2301
- Mt = Ve;
2302
- let Ue;
2303
- if (Wi)
2304
- Ue = { type: "FeatureCollection", features: [] };
2305
- else {
2306
- const V = await fetch(Ve, { signal: J.signal, ...ot });
2307
- if (!V.ok)
2308
- throw new Error(await V.text());
2309
- Ue = await V.json();
2310
- }
2311
- ge("response", { url: Ve, featureCollection: Ue }), A ? (E && t(13, T = void 0), t(14, b = Ue.features[0]), Ke = [b]) : (t(13, T = Ue.features.filter(X)), z && T.unshift({
2312
- type: "Feature",
2313
- properties: {},
2314
- id: "reverse_" + z.decimalLongitude + "_" + z.decimalLatitude,
2315
- text: z.decimalLatitude + ", " + z.decimalLongitude,
2316
- place_name: z.decimalLatitude + ", " + z.decimalLongitude,
2317
- place_type: ["reverse"],
2318
- center: [z.decimalLongitude, z.decimalLatitude],
2319
- bbox: [
2320
- z.decimalLongitude,
2321
- z.decimalLatitude,
2322
- z.decimalLongitude,
2323
- z.decimalLatitude
2324
- ],
2325
- geometry: {
2326
- type: "Point",
2327
- coordinates: [z.decimalLongitude, z.decimalLatitude]
2328
- }
2329
- }), Ke = T, ((he = T[R]) == null ? void 0 : he.id) !== (r == null ? void 0 : r.id) && t(15, R = -1), z && ne.focus());
2330
- } catch (z) {
2331
- if (z && typeof z == "object" && "name" in z && z.name === "AbortError")
2332
- return;
2333
- throw z;
2334
- } finally {
2335
- J === _e && t(20, _e = void 0);
2336
- }
2337
- }
2338
- function mi() {
2339
- var J;
2340
- if (!(j != null && j.length) || !Q)
2341
- return;
2342
- const s = [180, 90, -180, -90], A = !j.some((x) => !x.matching_text);
2343
- let F;
2344
- for (const x of j) {
2345
- const ae = Oe(x);
2346
- if (F = F === void 0 ? ae : ae === void 0 ? F : Math.max(F, ae), A || !x.matching_text)
2347
- for (const he of [0, 1, 2, 3])
2348
- s[he] = Math[he < 2 ? "min" : "max"](s[he], ((J = x.bbox) == null ? void 0 : J[he]) ?? x.center[he % 2]);
2349
- }
2350
- m && j.length > 0 && (b && s[0] === s[2] && s[1] === s[3] ? m.flyTo(b.center, Oe(b)) : m.fitBounds(Bt(s), 50, F));
2351
- }
2352
- function dt() {
2353
- !b || !m || (!b.bbox || b.bbox[0] === b.bbox[2] && b.bbox[1] === b.bbox[3] ? m.flyTo(b.center, Oe(b)) : m.fitBounds(Bt(b.bbox), 50, Oe(b)));
2354
- }
2355
- function Oe(s) {
2356
- var F;
2357
- if (!s.bbox || s.bbox[0] !== s.bbox[2] && s.bbox[1] !== s.bbox[3])
2358
- return;
2359
- const A = s.id.replace(/\..*/, "");
2360
- return (Array.isArray((F = s.properties) == null ? void 0 : F.categories) ? s.properties.categories.reduce(
2361
- (J, x) => {
2362
- const ae = Qe[A + "." + x];
2363
- return J === void 0 ? ae : ae === void 0 ? J : Math.max(J, ae);
2364
- },
2365
- void 0
2366
- ) : void 0) ?? Qe[A];
2367
- }
2368
- function gi(s) {
2369
- t(0, ee = C === "always"), t(13, T = void 0), t(14, b = void 0), t(15, R = -1), Nt(s[1].toFixed(6) + ", " + Sn(s[0], [-180, 180], !0).toFixed(6), !1, !0);
2370
- }
2371
- function hi(s) {
2372
- if (!T)
2373
- return;
2374
- let A = s.key === "ArrowDown" ? 1 : s.key === "ArrowUp" ? -1 : 0;
2375
- A && (ne.focus(), t(17, ue = !0), s.preventDefault(), b && R === -1 && t(15, R = T.findIndex((F) => F.id === (b == null ? void 0 : b.id))), R === (b || pe ? 0 : -1) && A === -1 && t(15, R = T.length), t(15, R += A), R >= T.length && t(15, R = -1), R < 0 && (b || pe) && t(15, R = 0));
2376
- }
2377
- function Wt(s, A = !0, F = !1) {
2378
- if (t(19, se = void 0), t(14, b = void 0), t(17, ue = !0), Ge || F) {
2379
- if (Te && clearTimeout(Te), K.length < Le)
2380
- return;
2381
- const J = K;
2382
- Te = window.setTimeout(
2383
- () => {
2384
- ct(J).catch((x) => t(19, se = x));
2385
- },
2386
- A ? W : 0
2387
- );
2388
- } else
2389
- t(13, T = void 0), t(19, se = void 0);
2390
- }
2391
- function ft(s) {
2392
- b && (b == null ? void 0 : b.id) === (s == null ? void 0 : s.id) ? dt() : (t(14, b = s), t(1, K = s.place_name));
2393
- }
2394
- function Ot(s) {
2395
- t(15, R = s);
2396
- }
2397
- function bi() {
2398
- (!pe || b) && t(15, R = -1), je && dt();
2399
- }
2400
- const vi = () => ne.focus();
2401
- function Li(s) {
2402
- vt[s ? "unshift" : "push"](() => {
2403
- ne = s, t(18, ne);
2404
- });
2405
- }
2406
- function _i() {
2407
- K = this.value, t(1, K), t(17, ue), t(31, y), t(16, ke);
2408
- }
2409
- const yi = () => t(17, ue = !0), wi = () => t(17, ue = !1), Ei = () => t(17, ue = !0), Si = () => t(14, b = void 0), pi = () => {
2410
- t(1, K = ""), t(14, b = void 0), ne.focus();
2411
- }, Ti = () => t(0, ee = !ee), ki = () => t(19, se = void 0), Ni = (s) => Ot(s), Mi = (s) => ft(s), Ci = () => {
2412
- };
2413
- return i.$$set = (s) => {
2414
- "class" in s && t(2, u = s.class), "apiKey" in s && t(29, f = s.apiKey), "bbox" in s && t(30, h = s.bbox), "clearButtonTitle" in s && t(3, v = s.clearButtonTitle), "clearOnBlur" in s && t(31, y = s.clearOnBlur), "clearListOnPick" in s && t(32, E = s.clearListOnPick), "keepListOpen" in s && t(4, O = s.keepListOpen), "collapsed" in s && t(5, p = s.collapsed), "country" in s && t(33, S = s.country), "debounceSearch" in s && t(34, W = s.debounceSearch), "enableReverse" in s && t(6, C = s.enableReverse), "errorMessage" in s && t(7, H = s.errorMessage), "filter" in s && t(35, X = s.filter), "flyTo" in s && t(36, Q = s.flyTo), "fuzzyMatch" in s && t(37, w = s.fuzzyMatch), "language" in s && t(38, g = s.language), "limit" in s && t(39, N = s.limit), "reverseGeocodingLimit" in s && t(40, L = s.reverseGeocodingLimit), "mapController" in s && t(41, m = s.mapController), "minLength" in s && t(42, Le = s.minLength), "noResultsMessage" in s && t(8, _ = s.noResultsMessage), "placeholder" in s && t(9, B = s.placeholder), "proximity" in s && t(43, oe = s.proximity), "reverseActive" in s && t(0, ee = s.reverseActive), "reverseButtonTitle" in s && t(10, Et = s.reverseButtonTitle), "searchValue" in s && t(1, K = s.searchValue), "pickedResultStyle" in s && t(44, Fe = s.pickedResultStyle), "showPlaceType" in s && t(11, St = s.showPlaceType), "showResultsWhileTyping" in s && t(45, Ge = s.showResultsWhileTyping), "selectFirst" in s && t(46, pe = s.selectFirst), "flyToSelected" in s && t(47, je = s.flyToSelected), "markerOnSelected" in s && t(48, He = s.markerOnSelected), "types" in s && t(49, tt = s.types), "reverseGeocodingTypes" in s && t(50, Ze = s.reverseGeocodingTypes), "exhaustiveReverseGeocoding" in s && t(51, it = s.exhaustiveReverseGeocoding), "excludeTypes" in s && t(52, nt = s.excludeTypes), "reverseGeocodingExcludeTypes" in s && t(53, qe = s.reverseGeocodingExcludeTypes), "zoom" in s && t(54, Qe = s.zoom), "apiUrl" in s && t(55, rt = s.apiUrl), "fetchParameters" in s && t(56, ot = s.fetchParameters), "iconsBaseUrl" in s && t(12, kt = s.iconsBaseUrl), "adjustUrlQuery" in s && t(57, st = s.adjustUrlQuery), "adjustUrl" in s && t(58, at = s.adjustUrl), "$$scope" in s && t(69, o = s.$$scope);
2415
- }, i.$$.update = () => {
2416
- if (i.$$.dirty[0] & /*enableReverse*/
2417
- 64 && t(0, ee = C === "always"), i.$$.dirty[0] & /*picked*/
2418
- 16384 | i.$$.dirty[1] & /*pickedResultStyle*/
2419
- 8192 && Fe !== "marker-only" && b && !b.address && b.geometry.type === "Point" && b.place_type[0] !== "reverse" && ct(b.id, { byId: !0 }).catch((s) => t(19, se = s)), i.$$.dirty[0] & /*picked*/
2420
- 16384 | i.$$.dirty[1] & /*mapController, flyTo, clearListOnPick*/
2421
- 1058 | i.$$.dirty[2] & /*prevIdToFly*/
2422
- 8 && (m && b && b.id !== lt && Q && (dt(), E && t(13, T = void 0), t(64, j = void 0), t(15, R = -1)), t(65, lt = b == null ? void 0 : b.id)), i.$$.dirty[0] & /*focused, focusedDelayed*/
2423
- 196608 | i.$$.dirty[1] & /*clearOnBlur*/
2424
- 1 && setTimeout(() => {
2425
- t(16, ke = ue), y && !ke && t(1, K = "");
2426
- }), i.$$.dirty[0] & /*searchValue, listFeatures*/
2427
- 8194 | i.$$.dirty[1] & /*minLength*/
2428
- 2048 && K.length < Le && (t(13, T = void 0), t(19, se = void 0), t(64, j = T)), i.$$.dirty[0] & /*listFeatures, selectedItemIndex, picked*/
2429
- 57344 | i.$$.dirty[1] & /*selectFirst*/
2430
- 32768 && pe && T != null && T.length && R == -1 && !b && t(15, R = 0), i.$$.dirty[0] & /*listFeatures*/
2431
- 8192 | i.$$.dirty[2] & /*markedFeatures*/
2432
- 4 && j !== T && t(64, j = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2433
- 73729 | i.$$.dirty[1] & /*mapController*/
2434
- 1024 | i.$$.dirty[2] & /*markedFeatures*/
2435
- 4 && m && m.setEventHandler((s) => {
2436
- switch (s.type) {
2437
- case "mapClick":
2438
- ee && gi(s.coordinates);
2439
- break;
2440
- case "markerClick":
2441
- {
2442
- const A = T == null ? void 0 : T.find((F) => F.id === s.id);
2443
- A && ft(A);
2444
- }
2445
- break;
2446
- case "markerMouseEnter":
2447
- j && t(15, R = ke ? (T == null ? void 0 : T.findIndex((A) => A.id === s.id)) ?? -1 : -1);
2448
- break;
2449
- case "markerMouseLeave":
2450
- j && t(15, R = -1);
2451
- break;
2452
- }
2453
- }), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2454
- 40960 && t(66, r = T == null ? void 0 : T[R]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
2455
- 66592 | i.$$.dirty[2] & /*selected*/
2456
- 16 && m && r && Q && je && m.flyTo(r.center, Oe(r)), i.$$.dirty[1] & /*pickedResultStyle*/
2457
- 8192 && t(68, n = Fe === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
2458
- 132096 | i.$$.dirty[2] & /*showPolygonMarker*/
2459
- 64 && (He || m == null || m.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
2460
- 16384 | i.$$.dirty[1] & /*mapController, markerOnSelected*/
2461
- 132096 | i.$$.dirty[2] & /*markedFeatures, selected, showPolygonMarker*/
2462
- 84 && m && He && !j && (m.setFeatures(r ? [r] : void 0, b, n), m.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[0] & /*picked*/
2463
- 16384 | i.$$.dirty[1] & /*mapController*/
2464
- 1024 | i.$$.dirty[2] & /*markedFeatures, showPolygonMarker*/
2465
- 68 && m && m.setFeatures(j, b, n), i.$$.dirty[0] & /*selectedItemIndex*/
2466
- 32768 | i.$$.dirty[1] & /*mapController*/
2467
- 1024 | i.$$.dirty[2] & /*markedFeatures*/
2468
- 4 && j && m && m.setSelectedMarker(R), i.$$.dirty[0] & /*searchValue*/
2469
- 2 | i.$$.dirty[1] & /*mapController*/
2470
- 1024 && m) {
2471
- const s = ut(K);
2472
- m.setReverseMarker(s ? [s.decimalLongitude, s.decimalLatitude] : void 0);
2473
- }
2474
- i.$$.dirty[2] & /*selected*/
2475
- 16 && ge("select", { feature: r }), i.$$.dirty[0] & /*picked*/
2476
- 16384 && ge("pick", { feature: b }), i.$$.dirty[0] & /*listFeatures, focusedDelayed, keepListOpen*/
2477
- 73744 && t(67, c = !!(T != null && T.length) && (ke || O)), i.$$.dirty[2] & /*optionsVisible*/
2478
- 32 && ge("optionsvisibilitychange", { optionsVisible: c }), i.$$.dirty[0] & /*listFeatures*/
2479
- 8192 && ge("featureslisted", { features: T }), i.$$.dirty[2] & /*markedFeatures*/
2480
- 4 && ge("featuresmarked", { features: j }), i.$$.dirty[0] & /*reverseActive*/
2481
- 1 && ge("reversetoggle", { reverse: ee }), i.$$.dirty[0] & /*searchValue*/
2482
- 2 && ge("querychange", { query: K }), i.$$.dirty[0] & /*reverseActive*/
2483
- 1 | i.$$.dirty[1] & /*mapController*/
2484
- 1024 && m && m.indicateReverse(ee);
2485
- }, [
2486
- ee,
2487
- K,
2488
- u,
2489
- v,
2490
- O,
2491
- p,
2492
- C,
2493
- H,
2494
- _,
2495
- B,
2496
- Et,
2497
- St,
2498
- kt,
2499
- T,
2500
- b,
2501
- R,
2502
- ke,
2503
- ue,
2504
- ne,
2505
- se,
2506
- _e,
2507
- fi,
2508
- Ct,
2509
- hi,
2510
- Wt,
2511
- ft,
2512
- Ot,
2513
- bi,
2514
- d,
2515
- f,
2516
- h,
2517
- y,
2518
- E,
2519
- S,
2520
- W,
2521
- X,
2522
- Q,
2523
- w,
2524
- g,
2525
- N,
2526
- L,
2527
- m,
2528
- Le,
2529
- oe,
2530
- Fe,
2531
- Ge,
2532
- pe,
2533
- je,
2534
- He,
2535
- tt,
2536
- Ze,
2537
- it,
2538
- nt,
2539
- qe,
2540
- Qe,
2541
- rt,
2542
- ot,
2543
- st,
2544
- at,
2545
- li,
2546
- ui,
2547
- Nt,
2548
- ci,
2549
- di,
2550
- j,
2551
- lt,
2552
- r,
2553
- c,
2554
- n,
2555
- o,
2556
- l,
2557
- vi,
2558
- Li,
2559
- _i,
2560
- yi,
2561
- wi,
2562
- Ei,
2563
- Si,
2564
- pi,
2565
- Ti,
2566
- ki,
2567
- Ni,
2568
- Mi,
2569
- Ci
2570
- ];
2571
- }
2572
- class jn extends Se {
2573
- constructor(e) {
2574
- super(), Ee(
2575
- this,
2576
- e,
2577
- Gn,
2578
- Fn,
2579
- we,
2580
- {
2581
- ZOOM_DEFAULTS: 28,
2582
- class: 2,
2583
- apiKey: 29,
2584
- bbox: 30,
2585
- clearButtonTitle: 3,
2586
- clearOnBlur: 31,
2587
- clearListOnPick: 32,
2588
- keepListOpen: 4,
2589
- collapsed: 5,
2590
- country: 33,
2591
- debounceSearch: 34,
2592
- enableReverse: 6,
2593
- errorMessage: 7,
2594
- filter: 35,
2595
- flyTo: 36,
2596
- fuzzyMatch: 37,
2597
- language: 38,
2598
- limit: 39,
2599
- reverseGeocodingLimit: 40,
2600
- mapController: 41,
2601
- minLength: 42,
2602
- noResultsMessage: 8,
2603
- placeholder: 9,
2604
- proximity: 43,
2605
- reverseActive: 0,
2606
- reverseButtonTitle: 10,
2607
- searchValue: 1,
2608
- pickedResultStyle: 44,
2609
- showPlaceType: 11,
2610
- showResultsWhileTyping: 45,
2611
- selectFirst: 46,
2612
- flyToSelected: 47,
2613
- markerOnSelected: 48,
2614
- types: 49,
2615
- reverseGeocodingTypes: 50,
2616
- exhaustiveReverseGeocoding: 51,
2617
- excludeTypes: 52,
2618
- reverseGeocodingExcludeTypes: 53,
2619
- zoom: 54,
2620
- apiUrl: 55,
2621
- fetchParameters: 56,
2622
- iconsBaseUrl: 12,
2623
- adjustUrlQuery: 57,
2624
- adjustUrl: 58,
2625
- focus: 59,
2626
- blur: 60,
2627
- setQuery: 61,
2628
- clearList: 62,
2629
- clearMap: 63
2630
- },
2631
- null,
2632
- [-1, -1, -1, -1]
2633
- );
2634
- }
2635
- get ZOOM_DEFAULTS() {
2636
- return this.$$.ctx[28];
2637
- }
2638
- get focus() {
2639
- return this.$$.ctx[59];
2640
- }
2641
- get blur() {
2642
- return this.$$.ctx[60];
2643
- }
2644
- get setQuery() {
2645
- return this.$$.ctx[61];
2646
- }
2647
- get clearList() {
2648
- return this.$$.ctx[62];
2649
- }
2650
- get clearMap() {
2651
- return this.$$.ctx[63];
2652
- }
2653
- }
2654
- const Jt = [
2655
- "featuresListed",
2656
- "featuresMarked",
2657
- "optionsVisibilityChange",
2658
- "pick",
2659
- "queryChange",
2660
- "response",
2661
- "reverseToggle",
2662
- "select"
2663
- ], Hn = [
2664
- "adjustUrlQuery",
2665
- "adjustUrl",
2666
- "apiKey",
2667
- "apiUrl",
2668
- "bbox",
2669
- "class",
2670
- "clearButtonTitle",
2671
- "clearListOnPick",
2672
- "clearOnBlur",
2673
- "collapsed",
2674
- "country",
2675
- "debounceSearch",
2676
- "enableReverse",
2677
- "errorMessage",
2678
- "excludeTypes",
2679
- "reverseGeocodingExcludeTypes",
2680
- "exhaustiveReverseGeocoding",
2681
- "fetchParameters",
2682
- "filter",
2683
- "flyToSelected",
2684
- "fuzzyMatch",
2685
- "iconsBaseUrl",
2686
- "keepListOpen",
2687
- "language",
2688
- "limit",
2689
- "reverseGeocodingLimit",
2690
- "mapController",
2691
- "markerOnSelected",
2692
- "minLength",
2693
- "noResultsMessage",
2694
- "pickedResultStyle",
2695
- "placeholder",
2696
- "proximity",
2697
- "reverseActive",
2698
- "reverseButtonTitle",
2699
- "selectFirst",
2700
- "showPlaceType",
2701
- "showResultsWhileTyping",
2702
- "types",
2703
- "reverseGeocodingTypes",
2704
- "zoom"
2705
- ];
2706
- function xt(i) {
2707
- return "on" + i[0].toUpperCase() + i.slice(1);
2708
- }
2709
- const Qn = zi(function(e, t) {
2710
- const n = zt(void 0), r = zt(void 0), c = { ...e };
2711
- for (const l of Jt)
2712
- delete c[xt(l)];
2713
- ht(() => {
2714
- if (!n.current)
2715
- throw new Error();
2716
- const l = new jn({
2717
- target: n.current,
2718
- props: c
2719
- });
2720
- return r.current = l, () => l.$destroy();
2721
- }, []);
2722
- for (const l of Hn)
2723
- ht(() => {
2724
- r.current && e[l] !== void 0 && r.current.$set({ [l]: e[l] });
2725
- }, [e[l]]);
2726
- for (const l of Jt) {
2727
- const o = e[xt(l)];
2728
- ht(
2729
- () => {
2730
- var d;
2731
- return o && ((d = r.current) == null ? void 0 : d.$on(l.toLowerCase(), (u) => {
2732
- o(u.detail);
2733
- }));
2734
- },
2735
- [o]
2736
- );
2737
- }
2738
- return Ui(t, () => ({
2739
- setQuery: (l, o = !0) => {
2740
- var d;
2741
- return (d = r.current) == null ? void 0 : d.setQuery(l, o);
2742
- },
2743
- clearMap: () => {
2744
- var l;
2745
- return (l = r.current) == null ? void 0 : l.clearMap();
2746
- },
2747
- clearList: () => {
2748
- var l;
2749
- return (l = r.current) == null ? void 0 : l.clearList();
2750
- },
2751
- focus: (l) => {
2752
- var o;
2753
- return (o = r.current) == null ? void 0 : o.focus(l);
2754
- },
2755
- blur: () => {
2756
- var l;
2757
- return (l = r.current) == null ? void 0 : l.blur();
2758
- },
2759
- setReverseMode: (l) => {
2760
- var o;
2761
- return (o = r.current) == null ? void 0 : o.$set({ reverseActive: l });
2762
- }
2763
- })), Di("div", { ref: n });
2764
- });
2765
- export {
2766
- Qn as GeocodingControl
2767
- };
2768
- //# sourceMappingURL=react.js.map