@maptiler/geocoding-control 2.1.7 → 3.0.0-rc.2

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 (338) hide show
  1. package/CODE_OF_CONDUCT.md +46 -0
  2. package/CONTRIBUTING.md +72 -0
  3. package/README.md +115 -43
  4. package/SECURITY.md +16 -0
  5. package/dist/index.js +860 -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 +1251 -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 +1275 -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 +1283 -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/base-control.d.ts +44 -0
  28. package/dist/src/controls/leaflet-control.d.ts +27 -0
  29. package/dist/src/controls/leaflet-events.d.ts +42 -0
  30. package/dist/src/controls/leaflet-options.d.ts +84 -0
  31. package/dist/src/controls/maplibregl-control.d.ts +34 -0
  32. package/dist/src/controls/maplibregl-events.d.ts +44 -0
  33. package/dist/src/controls/maplibregl-options.d.ts +104 -0
  34. package/dist/src/controls/maptilersdk-control.d.ts +7 -0
  35. package/dist/src/controls/maptilersdk-events.d.ts +2 -0
  36. package/dist/src/controls/maptilersdk-options.d.ts +10 -0
  37. package/dist/src/controls/openlayers-control.d.ts +35 -0
  38. package/dist/src/controls/openlayers-events.d.ts +43 -0
  39. package/dist/src/controls/openlayers-options.d.ts +83 -0
  40. package/dist/src/geocoder/geocoder-events.d.ts +46 -0
  41. package/dist/src/geocoder/geocoder-feature-item.d.ts +22 -0
  42. package/{svelte/types.d.ts → dist/src/geocoder/geocoder-options.d.ts} +23 -143
  43. package/dist/src/geocoder/geocoder.d.ts +113 -0
  44. package/dist/src/index.d.ts +9 -0
  45. package/dist/src/leaflet.public.d.ts +7 -0
  46. package/dist/src/maplibregl.d.ts +7 -0
  47. package/dist/src/maptilersdk.d.ts +7 -0
  48. package/dist/src/openlayers.public.d.ts +7 -0
  49. package/dist/src/types.d.ts +46 -0
  50. package/dist/src/utils/geo-utils.d.ts +6 -0
  51. package/dist/src/utils/mask.d.ts +2 -0
  52. package/dist/src/utils/proximity.d.ts +2 -0
  53. package/package.json +84 -112
  54. package/MapLibreBasedGeocodingControl.d.ts +0 -3072
  55. package/geo-coordinates-parser.t.d.ts +0 -8
  56. package/geoUtils.d.ts +0 -3
  57. package/leaflet-controller.d.ts +0 -12
  58. package/leaflet-controller.js +0 -2475
  59. package/leaflet-controller.js.map +0 -1
  60. package/leaflet-controller.umd.js +0 -2
  61. package/leaflet-controller.umd.js.map +0 -1
  62. package/leaflet.d.ts +0 -131
  63. package/leaflet.js +0 -5082
  64. package/leaflet.js.map +0 -1
  65. package/leaflet.umd.js +0 -14
  66. package/leaflet.umd.js.map +0 -1
  67. package/maplibregl-controller.d.ts +0 -19
  68. package/maplibregl-controller.js +0 -2418
  69. package/maplibregl-controller.js.map +0 -1
  70. package/maplibregl-controller.umd.js +0 -2
  71. package/maplibregl-controller.umd.js.map +0 -1
  72. package/maplibregl.d.ts +0 -2509
  73. package/maplibregl.js +0 -5142
  74. package/maplibregl.js.map +0 -1
  75. package/maplibregl.umd.js +0 -14
  76. package/maplibregl.umd.js.map +0 -1
  77. package/maptilersdk.d.ts +0 -2504
  78. package/maptilersdk.js +0 -5152
  79. package/maptilersdk.js.map +0 -1
  80. package/maptilersdk.umd.js +0 -14
  81. package/maptilersdk.umd.js.map +0 -1
  82. package/mask.d.ts +0 -2
  83. package/openlayers-controller.d.ts +0 -15
  84. package/openlayers-controller.js +0 -2174
  85. package/openlayers-controller.js.map +0 -1
  86. package/openlayers-controller.umd.js +0 -2
  87. package/openlayers-controller.umd.js.map +0 -1
  88. package/openlayers.d.ts +0 -109
  89. package/openlayers.js +0 -5045
  90. package/openlayers.js.map +0 -1
  91. package/openlayers.umd.js +0 -14
  92. package/openlayers.umd.js.map +0 -1
  93. package/proximity.d.ts +0 -2
  94. package/react.d.ts +0 -45
  95. package/react.js +0 -2795
  96. package/react.js.map +0 -1
  97. package/react.umd.js +0 -14
  98. package/react.umd.js.map +0 -1
  99. package/style.css +0 -1
  100. package/svelte/ClearIcon.svelte +0 -12
  101. package/svelte/ClearIcon.svelte.d.ts +0 -25
  102. package/svelte/FailIcon.svelte +0 -12
  103. package/svelte/FailIcon.svelte.d.ts +0 -25
  104. package/svelte/FeatureItem.svelte +0 -246
  105. package/svelte/FeatureItem.svelte.d.ts +0 -26
  106. package/svelte/GeocodingControl.svelte +0 -921
  107. package/svelte/GeocodingControl.svelte.d.ts +0 -105
  108. package/svelte/LoadingIcon.svelte +0 -40
  109. package/svelte/LoadingIcon.svelte.d.ts +0 -25
  110. package/svelte/MapLibreBasedGeocodingControl.d.ts +0 -3072
  111. package/svelte/MapLibreBasedGeocodingControl.js +0 -210
  112. package/svelte/MarkerIcon.svelte +0 -71
  113. package/svelte/MarkerIcon.svelte.d.ts +0 -18
  114. package/svelte/ReverseGeocodingIcon.svelte +0 -12
  115. package/svelte/ReverseGeocodingIcon.svelte.d.ts +0 -25
  116. package/svelte/SearchIcon.svelte +0 -26
  117. package/svelte/SearchIcon.svelte.d.ts +0 -25
  118. package/svelte/geo-coordinates-parser.t.d.ts +0 -8
  119. package/svelte/geo-coordinates-parser.t.js +0 -1
  120. package/svelte/geoUtils.d.ts +0 -3
  121. package/svelte/geoUtils.js +0 -18
  122. package/svelte/info.json +0 -1
  123. package/svelte/leaflet-controller.d.ts +0 -12
  124. package/svelte/leaflet-controller.js +0 -274
  125. package/svelte/leaflet.d.ts +0 -131
  126. package/svelte/leaflet.js +0 -116
  127. package/svelte/maplibregl-controller.d.ts +0 -19
  128. package/svelte/maplibregl-controller.js +0 -279
  129. package/svelte/maplibregl.d.ts +0 -2509
  130. package/svelte/maplibregl.js +0 -17
  131. package/svelte/maptilersdk.d.ts +0 -2504
  132. package/svelte/maptilersdk.js +0 -32
  133. package/svelte/mask.d.ts +0 -2
  134. package/svelte/mask.js +0 -54
  135. package/svelte/openlayers-controller.d.ts +0 -15
  136. package/svelte/openlayers-controller.js +0 -283
  137. package/svelte/openlayers.d.ts +0 -109
  138. package/svelte/openlayers.js +0 -178
  139. package/svelte/proximity.d.ts +0 -2
  140. package/svelte/proximity.js +0 -60
  141. package/svelte/react.d.ts +0 -45
  142. package/svelte/react.js +0 -106
  143. package/svelte/types.js +0 -1
  144. package/svelte/vanilla.d.ts +0 -61
  145. package/svelte/vanilla.js +0 -101
  146. package/svelte/vite-env.d.ts +0 -2
  147. package/types.d.ts +0 -391
  148. package/vanilla.d.ts +0 -61
  149. package/vanilla.js +0 -2799
  150. package/vanilla.js.map +0 -1
  151. package/vanilla.umd.js +0 -14
  152. package/vanilla.umd.js.map +0 -1
  153. /package/{icons → dist/icons}/10pin.svg +0 -0
  154. /package/{icons → dist/icons}/9pin.svg +0 -0
  155. /package/{icons → dist/icons}/advertising_column.svg +0 -0
  156. /package/{icons → dist/icons}/aerodrome.svg +0 -0
  157. /package/{icons → dist/icons}/alcohol.svg +0 -0
  158. /package/{icons → dist/icons}/alpine_hut.svg +0 -0
  159. /package/{icons → dist/icons}/amusement_arcade.svg +0 -0
  160. /package/{icons → dist/icons}/amusement_park.svg +0 -0
  161. /package/{icons → dist/icons}/apartment.svg +0 -0
  162. /package/{icons → dist/icons}/archaeological_site.svg +0 -0
  163. /package/{icons → dist/icons}/area.svg +0 -0
  164. /package/{icons → dist/icons}/art.svg +0 -0
  165. /package/{icons → dist/icons}/arts_centre.svg +0 -0
  166. /package/{icons → dist/icons}/artwork.svg +0 -0
  167. /package/{icons → dist/icons}/audioguide.svg +0 -0
  168. /package/{icons → dist/icons}/bag.svg +0 -0
  169. /package/{icons → dist/icons}/beauty.svg +0 -0
  170. /package/{icons → dist/icons}/bed.svg +0 -0
  171. /package/{icons → dist/icons}/bell_tower.svg +0 -0
  172. /package/{icons → dist/icons}/beverages.svg +0 -0
  173. /package/{icons → dist/icons}/bicycle_repair_station.svg +0 -0
  174. /package/{icons → dist/icons}/biergarten.svg +0 -0
  175. /package/{icons → dist/icons}/bird_hide.svg +0 -0
  176. /package/{icons → dist/icons}/boat_rental.svg +0 -0
  177. /package/{icons → dist/icons}/bookmaker.svg +0 -0
  178. /package/{icons → dist/icons}/books.svg +0 -0
  179. /package/{icons → dist/icons}/bowl.svg +0 -0
  180. /package/{icons → dist/icons}/bowling_alley.svg +0 -0
  181. /package/{icons → dist/icons}/bunker.svg +0 -0
  182. /package/{icons → dist/icons}/bureau_de_change.svg +0 -0
  183. /package/{icons → dist/icons}/bus_station.svg +0 -0
  184. /package/{icons → dist/icons}/bust.svg +0 -0
  185. /package/{icons → dist/icons}/camping.svg +0 -0
  186. /package/{icons → dist/icons}/car_parts.svg +0 -0
  187. /package/{icons → dist/icons}/car_wash.svg +0 -0
  188. /package/{icons → dist/icons}/caravan_park.svg +0 -0
  189. /package/{icons → dist/icons}/carpet.svg +0 -0
  190. /package/{icons → dist/icons}/cattle_grid.svg +0 -0
  191. /package/{icons → dist/icons}/cave_entrance.svg +0 -0
  192. /package/{icons → dist/icons}/chalet.svg +0 -0
  193. /package/{icons → dist/icons}/charity.svg +0 -0
  194. /package/{icons → dist/icons}/chemist.svg +0 -0
  195. /package/{icons → dist/icons}/chimney.svg +0 -0
  196. /package/{icons → dist/icons}/church.svg +0 -0
  197. /package/{icons → dist/icons}/city_gate.svg +0 -0
  198. /package/{icons → dist/icons}/clinic.svg +0 -0
  199. /package/{icons → dist/icons}/clothes.svg +0 -0
  200. /package/{icons → dist/icons}/coffee.svg +0 -0
  201. /package/{icons → dist/icons}/community_centre.svg +0 -0
  202. /package/{icons → dist/icons}/computer.svg +0 -0
  203. /package/{icons → dist/icons}/consulate.svg +0 -0
  204. /package/{icons → dist/icons}/copyshop.svg +0 -0
  205. /package/{icons → dist/icons}/cosmetics.svg +0 -0
  206. /package/{icons → dist/icons}/courthouse.svg +0 -0
  207. /package/{icons → dist/icons}/crane.svg +0 -0
  208. /package/{icons → dist/icons}/dairy.svg +0 -0
  209. /package/{icons → dist/icons}/deli.svg +0 -0
  210. /package/{icons → dist/icons}/department_store.svg +0 -0
  211. /package/{icons → dist/icons}/diy.svg +0 -0
  212. /package/{icons → dist/icons}/electronics.svg +0 -0
  213. /package/{icons → dist/icons}/embankment.svg +0 -0
  214. /package/{icons → dist/icons}/embassy.svg +0 -0
  215. /package/{icons → dist/icons}/excrement_bags.svg +0 -0
  216. /package/{icons → dist/icons}/fabric.svg +0 -0
  217. /package/{icons → dist/icons}/farmyard.svg +0 -0
  218. /package/{icons → dist/icons}/ferry.svg +0 -0
  219. /package/{icons → dist/icons}/firepit.svg +0 -0
  220. /package/{icons → dist/icons}/firestation.svg +0 -0
  221. /package/{icons → dist/icons}/fishing.svg +0 -0
  222. /package/{icons → dist/icons}/fitness.svg +0 -0
  223. /package/{icons → dist/icons}/ford.svg +0 -0
  224. /package/{icons → dist/icons}/fort.svg +0 -0
  225. /package/{icons → dist/icons}/fortress.svg +0 -0
  226. /package/{icons → dist/icons}/full-height_turnstile.svg +0 -0
  227. /package/{icons → dist/icons}/generator_wind.svg +0 -0
  228. /package/{icons → dist/icons}/golf_pin.svg +0 -0
  229. /package/{icons → dist/icons}/greengrocer.svg +0 -0
  230. /package/{icons → dist/icons}/guest_house.svg +0 -0
  231. /package/{icons → dist/icons}/helipad.svg +0 -0
  232. /package/{icons → dist/icons}/hifi.svg +0 -0
  233. /package/{icons → dist/icons}/hostel.svg +0 -0
  234. /package/{icons → dist/icons}/hotel.svg +0 -0
  235. /package/{icons → dist/icons}/housenumber.svg +0 -0
  236. /package/{icons → dist/icons}/houseware.svg +0 -0
  237. /package/{icons → dist/icons}/hunting_stand.svg +0 -0
  238. /package/{icons → dist/icons}/interior_decoration.svg +0 -0
  239. /package/{icons → dist/icons}/internet_cafe.svg +0 -0
  240. /package/{icons → dist/icons}/kindergarten.svg +0 -0
  241. /package/{icons → dist/icons}/kissing_gate.svg +0 -0
  242. /package/{icons → dist/icons}/manor.svg +0 -0
  243. /package/{icons → dist/icons}/map.svg +0 -0
  244. /package/{icons → dist/icons}/marker_reverse.svg +0 -0
  245. /package/{icons → dist/icons}/marker_selected.svg +0 -0
  246. /package/{icons → dist/icons}/marker_unselected.svg +0 -0
  247. /package/{icons → dist/icons}/marketplace.svg +0 -0
  248. /package/{icons → dist/icons}/massage.svg +0 -0
  249. /package/{icons → dist/icons}/mast.svg +0 -0
  250. /package/{icons → dist/icons}/mast_communications.svg +0 -0
  251. /package/{icons → dist/icons}/mast_lighting.svg +0 -0
  252. /package/{icons → dist/icons}/medical_supply.svg +0 -0
  253. /package/{icons → dist/icons}/memorial.svg +0 -0
  254. /package/{icons → dist/icons}/miniature_golf.svg +0 -0
  255. /package/{icons → dist/icons}/motel.svg +0 -0
  256. /package/{icons → dist/icons}/mountain_range.svg +0 -0
  257. /package/{icons → dist/icons}/multifaith.svg +0 -0
  258. /package/{icons → dist/icons}/musical_instrument.svg +0 -0
  259. /package/{icons → dist/icons}/newsagent.svg +0 -0
  260. /package/{icons → dist/icons}/nightclub.svg +0 -0
  261. /package/{icons → dist/icons}/ocean.svg +0 -0
  262. /package/{icons → dist/icons}/office.svg +0 -0
  263. /package/{icons → dist/icons}/outdoor_seating.svg +0 -0
  264. /package/{icons → dist/icons}/palace.svg +0 -0
  265. /package/{icons → dist/icons}/parcel_locker.svg +0 -0
  266. /package/{icons → dist/icons}/parking_space.svg +0 -0
  267. /package/{icons → dist/icons}/parking_tickets.svg +0 -0
  268. /package/{icons → dist/icons}/pet.svg +0 -0
  269. /package/{icons → dist/icons}/photo.svg +0 -0
  270. /package/{icons → dist/icons}/picnic.svg +0 -0
  271. /package/{icons → dist/icons}/plaque.svg +0 -0
  272. /package/{icons → dist/icons}/poi.svg +0 -0
  273. /package/{icons → dist/icons}/post_box.svg +0 -0
  274. /package/{icons → dist/icons}/post_office.svg +0 -0
  275. /package/{icons → dist/icons}/postal_code.svg +0 -0
  276. /package/{icons → dist/icons}/pub.svg +0 -0
  277. /package/{icons → dist/icons}/public_bath.svg +0 -0
  278. /package/{icons → dist/icons}/public_bookcase.svg +0 -0
  279. /package/{icons → dist/icons}/public_building.svg +0 -0
  280. /package/{icons → dist/icons}/public_transport_tickets.svg +0 -0
  281. /package/{icons → dist/icons}/reverse.svg +0 -0
  282. /package/{icons → dist/icons}/river.svg +0 -0
  283. /package/{icons → dist/icons}/road.svg +0 -0
  284. /package/{icons → dist/icons}/saddle.svg +0 -0
  285. /package/{icons → dist/icons}/sauna.svg +0 -0
  286. /package/{icons → dist/icons}/sea.svg +0 -0
  287. /package/{icons → dist/icons}/second_hand.svg +0 -0
  288. /package/{icons → dist/icons}/shintoist.svg +0 -0
  289. /package/{icons → dist/icons}/shoe.svg +0 -0
  290. /package/{icons → dist/icons}/shower.svg +0 -0
  291. /package/{icons → dist/icons}/shrine.svg +0 -0
  292. /package/{icons → dist/icons}/sikhist.svg +0 -0
  293. /package/{icons → dist/icons}/slipway.svg +0 -0
  294. /package/{icons → dist/icons}/snowmobile.svg +0 -0
  295. /package/{icons → dist/icons}/social_facility.svg +0 -0
  296. /package/{icons → dist/icons}/sports.svg +0 -0
  297. /package/{icons → dist/icons}/sprite.json +0 -0
  298. /package/{icons → dist/icons}/sprite.png +0 -0
  299. /package/{icons → dist/icons}/sprite@2x.json +0 -0
  300. /package/{icons → dist/icons}/sprite@2x.png +0 -0
  301. /package/{icons → dist/icons}/stationery.svg +0 -0
  302. /package/{icons → dist/icons}/stile.svg +0 -0
  303. /package/{icons → dist/icons}/stone.svg +0 -0
  304. /package/{icons → dist/icons}/storage_tank.svg +0 -0
  305. /package/{icons → dist/icons}/stream.svg +0 -0
  306. /package/{icons → dist/icons}/street.svg +0 -0
  307. /package/{icons → dist/icons}/supermarket.svg +0 -0
  308. /package/{icons → dist/icons}/tea.svg +0 -0
  309. /package/{icons → dist/icons}/telescope_dish.svg +0 -0
  310. /package/{icons → dist/icons}/telescope_dome.svg +0 -0
  311. /package/{icons → dist/icons}/ticket.svg +0 -0
  312. /package/{icons → dist/icons}/tobacco.svg +0 -0
  313. /package/{icons → dist/icons}/tower_cantilever_communication.svg +0 -0
  314. /package/{icons → dist/icons}/tower_cooling.svg +0 -0
  315. /package/{icons → dist/icons}/tower_dish.svg +0 -0
  316. /package/{icons → dist/icons}/tower_dome.svg +0 -0
  317. /package/{icons → dist/icons}/tower_generic.svg +0 -0
  318. /package/{icons → dist/icons}/tower_lattice.svg +0 -0
  319. /package/{icons → dist/icons}/tower_lattice_communication.svg +0 -0
  320. /package/{icons → dist/icons}/tower_lattice_lighting.svg +0 -0
  321. /package/{icons → dist/icons}/tower_lighting.svg +0 -0
  322. /package/{icons → dist/icons}/townhall.svg +0 -0
  323. /package/{icons → dist/icons}/toys.svg +0 -0
  324. /package/{icons → dist/icons}/trade.svg +0 -0
  325. /package/{icons → dist/icons}/traffic_light.svg +0 -0
  326. /package/{icons → dist/icons}/train_station.svg +0 -0
  327. /package/{icons → dist/icons}/travel_agency.svg +0 -0
  328. /package/{icons → dist/icons}/tyres.svg +0 -0
  329. /package/{icons → dist/icons}/university.svg +0 -0
  330. /package/{icons → dist/icons}/variety_store.svg +0 -0
  331. /package/{icons → dist/icons}/vehicle_inspection.svg +0 -0
  332. /package/{icons → dist/icons}/vending_machine.svg +0 -0
  333. /package/{icons → dist/icons}/video.svg +0 -0
  334. /package/{icons → dist/icons}/video_games.svg +0 -0
  335. /package/{icons → dist/icons}/waste_disposal.svg +0 -0
  336. /package/{icons → dist/icons}/water_well.svg +0 -0
  337. /package/{icons → dist/icons}/waterfall.svg +0 -0
  338. /package/{icons → dist/icons}/wilderness_hut.svg +0 -0
package/react.js DELETED
@@ -1,2795 +0,0 @@
1
- var Ri = Object.defineProperty;
2
- var zi = (i, e, t) => e in i ? Ri(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var gt = (i, e, t) => zi(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { forwardRef as Ui, useRef as zt, useEffect as ht, useImperativeHandle as Di, createElement as Ii } from "react";
5
- function G() {
6
- }
7
- function Ai(i, e) {
8
- for (const t in e) i[t] = e[t];
9
- return (
10
- /** @type {T & S} */
11
- i
12
- );
13
- }
14
- function ei(i) {
15
- return i();
16
- }
17
- function Ut() {
18
- return /* @__PURE__ */ Object.create(null);
19
- }
20
- function me(i) {
21
- i.forEach(ei);
22
- }
23
- function ti(i) {
24
- return typeof i == "function";
25
- }
26
- function ye(i, e) {
27
- return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
28
- }
29
- let Je;
30
- function X(i, e) {
31
- return i === e ? !0 : (Je || (Je = document.createElement("a")), Je.href = e, i === Je.href);
32
- }
33
- function Pi(i) {
34
- return Object.keys(i).length === 0;
35
- }
36
- function Bi(i, e, t, n) {
37
- if (i) {
38
- const r = ii(i, e, t, n);
39
- return i[0](r);
40
- }
41
- }
42
- function ii(i, e, t, n) {
43
- return i[1] && n ? Ai(t.ctx.slice(), i[1](n(e))) : t.ctx;
44
- }
45
- function Fi(i, e, t, n) {
46
- return i[2], e.dirty;
47
- }
48
- function Gi(i, e, t, n, r, u) {
49
- if (r) {
50
- const a = ii(e, t, n, u);
51
- i.p(a, r);
52
- }
53
- }
54
- function ji(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 N(i, e) {
67
- i.appendChild(e);
68
- }
69
- function A(i, e, t) {
70
- i.insertBefore(e, t || null);
71
- }
72
- function I(i) {
73
- i.parentNode && i.parentNode.removeChild(i);
74
- }
75
- function z(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 Hi() {
88
- return be("");
89
- }
90
- function Q(i, e, t, n) {
91
- return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
92
- }
93
- function Zi(i) {
94
- return function(e) {
95
- return e.preventDefault(), i.call(this, e);
96
- };
97
- }
98
- function l(i, e, t) {
99
- t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
100
- }
101
- function qi(i) {
102
- return Array.from(i.childNodes);
103
- }
104
- function Fe(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 Ge;
118
- function Be(i) {
119
- Ge = i;
120
- }
121
- function ni() {
122
- if (!Ge) throw new Error("Function called outside component initialization");
123
- return Ge;
124
- }
125
- function Ki(i) {
126
- ni().$$.on_destroy.push(i);
127
- }
128
- function ri() {
129
- const i = ni();
130
- return (e, t, { cancelable: n = !1 } = {}) => {
131
- const r = i.$$.callbacks[e];
132
- if (r) {
133
- const u = Qi(
134
- /** @type {string} */
135
- e,
136
- t,
137
- { cancelable: n }
138
- );
139
- return r.slice().forEach((a) => {
140
- a.call(i, u);
141
- }), !u.defaultPrevented;
142
- }
143
- return !0;
144
- };
145
- }
146
- function Vi(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 = [], Yi = /* @__PURE__ */ Promise.resolve();
153
- let Lt = !1;
154
- function Xi() {
155
- Lt || (Lt = !0, Yi.then(oi));
156
- }
157
- function _t(i) {
158
- We.push(i);
159
- }
160
- const bt = /* @__PURE__ */ new Set();
161
- let Ne = 0;
162
- function oi() {
163
- if (Ne !== 0)
164
- return;
165
- const i = Ge;
166
- do {
167
- try {
168
- for (; Ne < Me.length; ) {
169
- const e = Me[Ne];
170
- Ne++, Be(e), Ji(e.$$);
171
- }
172
- } catch (e) {
173
- throw Me.length = 0, Ne = 0, e;
174
- }
175
- for (Be(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(), Be(i);
185
- }
186
- function Ji(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 xi(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 $e = /* @__PURE__ */ new Set();
198
- let _e;
199
- function Ae() {
200
- _e = {
201
- r: 0,
202
- c: [],
203
- p: _e
204
- // parent group
205
- };
206
- }
207
- function Pe() {
208
- _e.r || me(_e.c), _e = _e.p;
209
- }
210
- function P(i, e) {
211
- i && i.i && ($e.delete(i), i.i(e));
212
- }
213
- function q(i, e, t, n) {
214
- if (i && i.o) {
215
- if ($e.has(i)) return;
216
- $e.add(i), _e.c.push(() => {
217
- $e.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 $i(i, e) {
225
- q(i, 1, 1, () => {
226
- e.delete(i.key);
227
- });
228
- }
229
- function en(i, e, t, n, r, u, a, o, d, c, f, L) {
230
- let b = i.length, E = u.length, g = b;
231
- const p = {};
232
- for (; g--; ) p[i[g].key] = g;
233
- const U = [], k = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ new Map(), B = [];
234
- for (g = E; g--; ) {
235
- const w = L(r, u, g), _ = t(w);
236
- let S = a.get(_);
237
- S ? B.push(() => S.p(w, e)) : (S = c(_, w), S.c()), k.set(_, U[g] = S), _ in p && W.set(_, Math.abs(g - p[_]));
238
- }
239
- const K = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Set();
240
- function M(w) {
241
- P(w, 1), w.m(o, f), a.set(w.key, w), f = w.first, E--;
242
- }
243
- for (; b && E; ) {
244
- const w = U[E - 1], _ = i[b - 1], S = w.key, D = _.key;
245
- w === _ ? (f = w.first, b--, E--) : k.has(D) ? !a.has(S) || K.has(S) ? M(w) : C.has(D) ? b-- : W.get(S) > W.get(D) ? (C.add(S), M(w)) : (K.add(D), b--) : (d(_, a), b--);
246
- }
247
- for (; b--; ) {
248
- const w = i[b];
249
- k.has(w.key) || d(w, a);
250
- }
251
- for (; E; ) M(U[E - 1]);
252
- return me(B), U;
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 u = i.$$.on_mount.map(ei).filter(ti);
261
- i.$$.on_destroy ? i.$$.on_destroy.push(...u) : me(u), i.$$.on_mount = [];
262
- }), r.forEach(_t);
263
- }
264
- function fe(i, e) {
265
- const t = i.$$;
266
- t.fragment !== null && (xi(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
267
- }
268
- function tn(i, e) {
269
- i.$$.dirty[0] === -1 && (Me.push(i), Xi(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
270
- }
271
- function we(i, e, t, n, r, u, a = null, o = [-1]) {
272
- const d = Ge;
273
- Be(i);
274
- const c = i.$$ = {
275
- fragment: null,
276
- ctx: [],
277
- // state
278
- props: u,
279
- update: G,
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
- a && a(c.root);
296
- let f = !1;
297
- if (c.ctx = t ? t(i, e.props || {}, (L, b, ...E) => {
298
- const g = E.length ? E[0] : b;
299
- return c.ctx && r(c.ctx[L], c.ctx[L] = g) && (!c.skip_bound && c.bound[L] && c.bound[L](g), f && tn(i, L)), b;
300
- }) : [], c.update(), f = !0, me(c.before_update), c.fragment = n ? n(c.ctx) : !1, e.target) {
301
- if (e.hydrate) {
302
- const L = qi(e.target);
303
- c.fragment && c.fragment.l(L), L.forEach(I);
304
- } else
305
- c.fragment && c.fragment.c();
306
- e.intro && P(i.$$.fragment), de(i, e.target, e.anchor), oi();
307
- }
308
- Be(d);
309
- }
310
- class Ee {
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 = G;
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 (!ti(t))
341
- return G;
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 && !Pi(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
354
- }
355
- }
356
- const nn = "4";
357
- typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(nn);
358
- function rn(i) {
359
- let e, t;
360
- return {
361
- c() {
362
- e = ce("svg"), t = ce("path"), l(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"), l(e, "viewBox", "0 0 14 14"), l(e, "width", "13"), l(e, "height", "13"), l(e, "class", "svelte-en2qvf");
363
- },
364
- m(n, r) {
365
- A(n, e, r), N(e, t);
366
- },
367
- p: G,
368
- i: G,
369
- o: G,
370
- d(n) {
371
- n && I(e);
372
- }
373
- };
374
- }
375
- class si extends Ee {
376
- constructor(e) {
377
- super(), we(this, e, null, rn, ye, {});
378
- }
379
- }
380
- function on(i) {
381
- let e, t;
382
- return {
383
- c() {
384
- e = ce("svg"), t = ce("path"), l(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"), l(e, "viewBox", "0 0 30 30"), l(e, "fill", "none"), l(e, "xmlns", "http://www.w3.org/2000/svg"), l(e, "class", "svelte-d2loi5");
385
- },
386
- m(n, r) {
387
- A(n, e, r), N(e, t);
388
- },
389
- p: G,
390
- i: G,
391
- o: G,
392
- d(n) {
393
- n && I(e);
394
- }
395
- };
396
- }
397
- class li extends Ee {
398
- constructor(e) {
399
- super(), we(this, e, null, on, ye, {});
400
- }
401
- }
402
- function sn(i) {
403
- let e, t;
404
- return {
405
- c() {
406
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
407
- i[3] + "area.svg") || l(e, "src", t), l(
408
- e,
409
- "alt",
410
- /*placeType*/
411
- i[7]
412
- ), l(
413
- e,
414
- "title",
415
- /*placeType*/
416
- i[7]
417
- ), l(e, "class", "svelte-w9y5n9");
418
- },
419
- m(n, r) {
420
- A(n, e, r);
421
- },
422
- p(n, r) {
423
- r & /*iconsBaseUrl*/
424
- 8 && !X(e.src, t = /*iconsBaseUrl*/
425
- n[3] + "area.svg") && l(e, "src", t), r & /*placeType*/
426
- 128 && l(
427
- e,
428
- "alt",
429
- /*placeType*/
430
- n[7]
431
- ), r & /*placeType*/
432
- 128 && l(
433
- e,
434
- "title",
435
- /*placeType*/
436
- n[7]
437
- );
438
- },
439
- d(n) {
440
- n && I(e);
441
- }
442
- };
443
- }
444
- function ln(i) {
445
- let e, t;
446
- return {
447
- c() {
448
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
449
- i[3] + "reverse.svg") || l(e, "src", t), l(
450
- e,
451
- "alt",
452
- /*placeType*/
453
- i[7]
454
- ), l(
455
- e,
456
- "title",
457
- /*placeType*/
458
- i[7]
459
- ), l(e, "class", "svelte-w9y5n9");
460
- },
461
- m(n, r) {
462
- A(n, e, r);
463
- },
464
- p(n, r) {
465
- r & /*iconsBaseUrl*/
466
- 8 && !X(e.src, t = /*iconsBaseUrl*/
467
- n[3] + "reverse.svg") && l(e, "src", t), r & /*placeType*/
468
- 128 && l(
469
- e,
470
- "alt",
471
- /*placeType*/
472
- n[7]
473
- ), r & /*placeType*/
474
- 128 && l(
475
- e,
476
- "title",
477
- /*placeType*/
478
- n[7]
479
- );
480
- },
481
- d(n) {
482
- n && I(e);
483
- }
484
- };
485
- }
486
- function an(i) {
487
- let e, t;
488
- return {
489
- c() {
490
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
491
- i[3] + "poi.svg") || l(e, "src", t), l(
492
- e,
493
- "alt",
494
- /*placeType*/
495
- i[7]
496
- ), l(
497
- e,
498
- "title",
499
- /*placeType*/
500
- i[7]
501
- ), l(e, "class", "svelte-w9y5n9");
502
- },
503
- m(n, r) {
504
- A(n, e, r);
505
- },
506
- p(n, r) {
507
- r & /*iconsBaseUrl*/
508
- 8 && !X(e.src, t = /*iconsBaseUrl*/
509
- n[3] + "poi.svg") && l(e, "src", t), r & /*placeType*/
510
- 128 && l(
511
- e,
512
- "alt",
513
- /*placeType*/
514
- n[7]
515
- ), r & /*placeType*/
516
- 128 && l(
517
- e,
518
- "title",
519
- /*placeType*/
520
- n[7]
521
- );
522
- },
523
- d(n) {
524
- n && I(e);
525
- }
526
- };
527
- }
528
- function un(i) {
529
- let e, t;
530
- return {
531
- c() {
532
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
533
- i[3] + "postal_code.svg") || l(e, "src", t), l(
534
- e,
535
- "alt",
536
- /*placeType*/
537
- i[7]
538
- ), l(
539
- e,
540
- "title",
541
- /*placeType*/
542
- i[7]
543
- ), l(e, "class", "svelte-w9y5n9");
544
- },
545
- m(n, r) {
546
- A(n, e, r);
547
- },
548
- p(n, r) {
549
- r & /*iconsBaseUrl*/
550
- 8 && !X(e.src, t = /*iconsBaseUrl*/
551
- n[3] + "postal_code.svg") && l(e, "src", t), r & /*placeType*/
552
- 128 && l(
553
- e,
554
- "alt",
555
- /*placeType*/
556
- n[7]
557
- ), r & /*placeType*/
558
- 128 && l(
559
- e,
560
- "title",
561
- /*placeType*/
562
- n[7]
563
- );
564
- },
565
- d(n) {
566
- n && I(e);
567
- }
568
- };
569
- }
570
- function cn(i) {
571
- let e, t;
572
- return {
573
- c() {
574
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
575
- i[3] + "street.svg") || l(e, "src", t), l(
576
- e,
577
- "alt",
578
- /*placeType*/
579
- i[7]
580
- ), l(
581
- e,
582
- "title",
583
- /*placeType*/
584
- i[7]
585
- ), l(e, "class", "svelte-w9y5n9");
586
- },
587
- m(n, r) {
588
- A(n, e, r);
589
- },
590
- p(n, r) {
591
- r & /*iconsBaseUrl*/
592
- 8 && !X(e.src, t = /*iconsBaseUrl*/
593
- n[3] + "street.svg") && l(e, "src", t), r & /*placeType*/
594
- 128 && l(
595
- e,
596
- "alt",
597
- /*placeType*/
598
- n[7]
599
- ), r & /*placeType*/
600
- 128 && l(
601
- e,
602
- "title",
603
- /*placeType*/
604
- n[7]
605
- );
606
- },
607
- d(n) {
608
- n && I(e);
609
- }
610
- };
611
- }
612
- function dn(i) {
613
- let e, t;
614
- return {
615
- c() {
616
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
617
- i[3] + "road.svg") || l(e, "src", t), l(
618
- e,
619
- "alt",
620
- /*placeType*/
621
- i[7]
622
- ), l(
623
- e,
624
- "title",
625
- /*placeType*/
626
- i[7]
627
- ), l(e, "class", "svelte-w9y5n9");
628
- },
629
- m(n, r) {
630
- A(n, e, r);
631
- },
632
- p(n, r) {
633
- r & /*iconsBaseUrl*/
634
- 8 && !X(e.src, t = /*iconsBaseUrl*/
635
- n[3] + "road.svg") && l(e, "src", t), r & /*placeType*/
636
- 128 && l(
637
- e,
638
- "alt",
639
- /*placeType*/
640
- n[7]
641
- ), r & /*placeType*/
642
- 128 && l(
643
- e,
644
- "title",
645
- /*placeType*/
646
- n[7]
647
- );
648
- },
649
- d(n) {
650
- n && I(e);
651
- }
652
- };
653
- }
654
- function fn(i) {
655
- let e, t;
656
- return {
657
- c() {
658
- e = z("img"), X(e.src, t = /*iconsBaseUrl*/
659
- i[3] + "housenumber.svg") || l(e, "src", t), l(
660
- e,
661
- "alt",
662
- /*placeType*/
663
- i[7]
664
- ), l(
665
- e,
666
- "title",
667
- /*placeType*/
668
- i[7]
669
- ), l(e, "class", "svelte-w9y5n9");
670
- },
671
- m(n, r) {
672
- A(n, e, r);
673
- },
674
- p(n, r) {
675
- r & /*iconsBaseUrl*/
676
- 8 && !X(e.src, t = /*iconsBaseUrl*/
677
- n[3] + "housenumber.svg") && l(e, "src", t), r & /*placeType*/
678
- 128 && l(
679
- e,
680
- "alt",
681
- /*placeType*/
682
- n[7]
683
- ), r & /*placeType*/
684
- 128 && l(
685
- e,
686
- "title",
687
- /*placeType*/
688
- n[7]
689
- );
690
- },
691
- d(n) {
692
- n && I(e);
693
- }
694
- };
695
- }
696
- function mn(i) {
697
- let e, t, n, r;
698
- return {
699
- c() {
700
- e = z("img"), X(e.src, t = /*imageUrl*/
701
- i[5]) || l(e, "src", t), l(
702
- e,
703
- "alt",
704
- /*category*/
705
- i[4]
706
- ), l(
707
- e,
708
- "title",
709
- /*placeType*/
710
- i[7]
711
- ), l(e, "class", "svelte-w9y5n9");
712
- },
713
- m(u, a) {
714
- A(u, e, a), n || (r = Q(
715
- e,
716
- "error",
717
- /*error_handler*/
718
- i[14]
719
- ), n = !0);
720
- },
721
- p(u, a) {
722
- a & /*imageUrl*/
723
- 32 && !X(e.src, t = /*imageUrl*/
724
- u[5]) && l(e, "src", t), a & /*category*/
725
- 16 && l(
726
- e,
727
- "alt",
728
- /*category*/
729
- u[4]
730
- ), a & /*placeType*/
731
- 128 && l(
732
- e,
733
- "title",
734
- /*placeType*/
735
- u[7]
736
- );
737
- },
738
- d(u) {
739
- u && I(e), n = !1, r();
740
- }
741
- };
742
- }
743
- function gn(i) {
744
- let e, t;
745
- return {
746
- c() {
747
- e = z("div"), l(e, "class", "sprite-icon svelte-w9y5n9"), l(e, "style", t = `
748
- width: ${/*spriteIcon*/
749
- i[6].width / te}px;
750
- height: ${/*spriteIcon*/
751
- i[6].height / te}px;
752
- background-image: url(${/*iconsBaseUrl*/
753
- i[3]}sprite${yt}.png);
754
- background-position: -${/*spriteIcon*/
755
- i[6].x / te}px -${/*spriteIcon*/
756
- i[6].y / te}px;
757
- background-size: ${ne.width / te}px ${ne.height / te}px;
758
- `), l(
759
- e,
760
- "title",
761
- /*placeType*/
762
- i[7]
763
- );
764
- },
765
- m(n, r) {
766
- A(n, e, r);
767
- },
768
- p(n, r) {
769
- r & /*spriteIcon, iconsBaseUrl*/
770
- 72 && t !== (t = `
771
- width: ${/*spriteIcon*/
772
- n[6].width / te}px;
773
- height: ${/*spriteIcon*/
774
- n[6].height / te}px;
775
- background-image: url(${/*iconsBaseUrl*/
776
- n[3]}sprite${yt}.png);
777
- background-position: -${/*spriteIcon*/
778
- n[6].x / te}px -${/*spriteIcon*/
779
- n[6].y / te}px;
780
- background-size: ${ne.width / te}px ${ne.height / te}px;
781
- `) && l(e, "style", t), r & /*placeType*/
782
- 128 && l(
783
- e,
784
- "title",
785
- /*placeType*/
786
- n[7]
787
- );
788
- },
789
- d(n) {
790
- n && I(e);
791
- }
792
- };
793
- }
794
- function Pt(i) {
795
- let e, t;
796
- return {
797
- c() {
798
- e = z("span"), t = be(
799
- /*placeType*/
800
- i[7]
801
- ), l(e, "class", "secondary svelte-w9y5n9");
802
- },
803
- m(n, r) {
804
- A(n, e, r), N(e, t);
805
- },
806
- p(n, r) {
807
- r & /*placeType*/
808
- 128 && Fe(
809
- t,
810
- /*placeType*/
811
- n[7]
812
- );
813
- },
814
- d(n) {
815
- n && I(e);
816
- }
817
- };
818
- }
819
- function hn(i) {
820
- let e, t, n, r, u, a, o, d, c, f = (
821
- /*isReverse*/
822
- (i[8] ? (
823
- /*feature*/
824
- i[0].place_name
825
- ) : (
826
- /*feature*/
827
- i[0].place_name.replace(/,.*/, "")
828
- )) + ""
829
- ), L, b, E = (
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
- ), g, p, U = (
841
- /*isReverse*/
842
- (i[8] ? "" : (
843
- /*feature*/
844
- i[0].place_name.replace(/[^,]*,?\s*/, "")
845
- )) + ""
846
- ), k, W, B, K, C, M;
847
- function w(v, 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 && (u = null), ne && /*spriteIcon*/
853
- v[6] ? gn : (
854
- /*imageUrl*/
855
- v[5] ? mn : (
856
- /*feature*/
857
- v[0].address ? fn : (t == null && (t = !!/*feature*/
858
- v[0].id.startsWith("road.")), t ? dn : (n == null && (n = !!/*feature*/
859
- v[0].id.startsWith("address.")), n ? cn : (r == null && (r = !!/*feature*/
860
- v[0].id.startsWith("postal_code.")), r ? un : (u == null && (u = !!/*feature*/
861
- v[0].id.startsWith("poi.")), u ? an : (
862
- /*isReverse*/
863
- v[8] ? ln : sn
864
- )))))
865
- )
866
- );
867
- }
868
- let _ = w(i, -1), S = _(i), D = E && Pt(i);
869
- return {
870
- c() {
871
- e = z("li"), S.c(), a = $(), o = z("span"), d = z("span"), c = z("span"), L = be(f), b = $(), D && D.c(), g = $(), p = z("span"), k = be(U), l(c, "class", "primary svelte-w9y5n9"), l(d, "class", "svelte-w9y5n9"), l(p, "class", "line2 svelte-w9y5n9"), l(o, "class", "texts svelte-w9y5n9"), l(e, "tabindex", "-1"), l(e, "role", "option"), l(e, "aria-selected", W = /*style*/
872
- i[1] === "selected"), l(e, "aria-checked", B = /*style*/
873
- i[1] === "picked"), l(e, "class", K = et(
874
- /*style*/
875
- i[1]
876
- ) + " svelte-w9y5n9");
877
- },
878
- m(v, m) {
879
- A(v, e, m), S.m(e, null), N(e, a), N(e, o), N(o, d), N(d, c), N(c, L), N(d, b), D && D.m(d, null), N(o, g), N(o, p), N(p, k), C || (M = [
880
- Q(
881
- e,
882
- "mouseenter",
883
- /*mouseenter_handler*/
884
- i[13]
885
- ),
886
- Q(
887
- e,
888
- "focus",
889
- /*focus_handler*/
890
- i[15]
891
- ),
892
- Q(
893
- e,
894
- "click",
895
- /*click_handler*/
896
- i[16]
897
- )
898
- ], C = !0);
899
- },
900
- p(v, [m]) {
901
- _ === (_ = w(v, m)) && S ? S.p(v, m) : (S.d(1), S = _(v), S && (S.c(), S.m(e, a))), m & /*isReverse, feature*/
902
- 257 && f !== (f = /*isReverse*/
903
- (v[8] ? (
904
- /*feature*/
905
- v[0].place_name
906
- ) : (
907
- /*feature*/
908
- v[0].place_name.replace(/,.*/, "")
909
- )) + "") && Fe(L, f), m & /*showPlaceType, feature, imageUrl, isReverse*/
910
- 293 && (E = /*showPlaceType*/
911
- v[2] === "always" || /*showPlaceType*/
912
- v[2] !== "never" && !/*feature*/
913
- v[0].address && !/*feature*/
914
- v[0].id.startsWith("road.") && !/*feature*/
915
- v[0].id.startsWith("address.") && !/*feature*/
916
- v[0].id.startsWith("postal_code.") && (!/*feature*/
917
- v[0].id.startsWith("poi.") || !/*imageUrl*/
918
- v[5]) && !/*isReverse*/
919
- v[8]), E ? D ? D.p(v, m) : (D = Pt(v), D.c(), D.m(d, null)) : D && (D.d(1), D = null), m & /*isReverse, feature*/
920
- 257 && U !== (U = /*isReverse*/
921
- (v[8] ? "" : (
922
- /*feature*/
923
- v[0].place_name.replace(/[^,]*,?\s*/, "")
924
- )) + "") && Fe(k, U), m & /*style*/
925
- 2 && W !== (W = /*style*/
926
- v[1] === "selected") && l(e, "aria-selected", W), m & /*style*/
927
- 2 && B !== (B = /*style*/
928
- v[1] === "picked") && l(e, "aria-checked", B), m & /*style*/
929
- 2 && K !== (K = et(
930
- /*style*/
931
- v[1]
932
- ) + " svelte-w9y5n9") && l(e, "class", K);
933
- },
934
- i: G,
935
- o: G,
936
- d(v) {
937
- v && I(e), S.d(), D && D.d(), C = !1, me(M);
938
- }
939
- };
940
- }
941
- const ai = typeof devicePixelRatio > "u" ? 1 : devicePixelRatio > 1.25, yt = ai ? "@2x" : "", te = ai ? 2 : 1;
942
- let ne, xe;
943
- function bn(i, e, t) {
944
- let n, r, u, { feature: a } = e, { style: o = "default" } = e, { showPlaceType: d } = e, { missingIconsCache: c } = e, { iconsBaseUrl: f } = e;
945
- const L = ri();
946
- let b, E, g, p;
947
- function U() {
948
- xe ?? (xe = fetch(`${f}sprite${yt}.json`).then((_) => _.json()).then((_) => {
949
- ne = _;
950
- }).catch(() => {
951
- ne = null;
952
- }));
953
- }
954
- function k() {
955
- E && c.add(E), W();
956
- }
957
- function W() {
958
- ne !== void 0 ? B() : (U(), xe == null || xe.then(B));
959
- }
960
- function B() {
961
- do {
962
- if (p--, t(4, b = n == null ? void 0 : n[p]), t(6, g = b ? ne == null ? void 0 : ne.icons[b] : void 0), g)
963
- break;
964
- t(5, E = b ? f + b.replace(/ /g, "_") + ".svg" : void 0);
965
- } while (p > -1 && (!E || c.has(E)));
966
- }
967
- function K(_) {
968
- Vi.call(this, i, _);
969
- }
970
- const C = () => k(), M = () => L("select", void 0), w = (_) => {
971
- document.activeElement !== _.target && L("select", void 0);
972
- };
973
- return i.$$set = (_) => {
974
- "feature" in _ && t(0, a = _.feature), "style" in _ && t(1, o = _.style), "showPlaceType" in _ && t(2, d = _.showPlaceType), "missingIconsCache" in _ && t(11, c = _.missingIconsCache), "iconsBaseUrl" in _ && t(3, f = _.iconsBaseUrl);
975
- }, i.$$.update = () => {
976
- var _, S, D, v, m;
977
- i.$$.dirty & /*feature*/
978
- 1 && t(12, n = (_ = a.properties) == null ? void 0 : _.categories), i.$$.dirty & /*feature*/
979
- 1 && t(8, r = a.place_type[0] === "reverse"), i.$$.dirty & /*feature*/
980
- 1 && t(7, u = ((D = (S = a.properties) == null ? void 0 : S.categories) == null ? void 0 : D.join(", ")) ?? ((m = (v = a.properties) == null ? void 0 : v.place_type_name) == null ? void 0 : m[0]) ?? a.place_type[0]), i.$$.dirty & /*categories*/
981
- 4096 && (p = (n == null ? void 0 : n.length) ?? 0, W());
982
- }, [
983
- a,
984
- o,
985
- d,
986
- f,
987
- b,
988
- E,
989
- g,
990
- u,
991
- r,
992
- L,
993
- k,
994
- c,
995
- n,
996
- K,
997
- C,
998
- M,
999
- w
1000
- ];
1001
- }
1002
- class vn extends Ee {
1003
- constructor(e) {
1004
- super(), we(this, e, bn, hn, ye, {
1005
- feature: 0,
1006
- style: 1,
1007
- showPlaceType: 2,
1008
- missingIconsCache: 11,
1009
- iconsBaseUrl: 3
1010
- });
1011
- }
1012
- }
1013
- function Ln(i) {
1014
- let e;
1015
- return {
1016
- c() {
1017
- e = z("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="loading-icon svelte-1ocfouu"><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>', l(e, "class", "svelte-1ocfouu");
1018
- },
1019
- m(t, n) {
1020
- A(t, e, n);
1021
- },
1022
- p: G,
1023
- i: G,
1024
- o: G,
1025
- d(t) {
1026
- t && I(e);
1027
- }
1028
- };
1029
- }
1030
- class _n extends Ee {
1031
- constructor(e) {
1032
- super(), we(this, e, null, Ln, ye, {});
1033
- }
1034
- }
1035
- function yn(i) {
1036
- let e, t;
1037
- return {
1038
- c() {
1039
- e = ce("svg"), t = ce("path"), l(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"), l(e, "viewBox", "0 0 60.006 21.412"), l(e, "width", "14"), l(e, "height", "20"), l(e, "class", "svelte-en2qvf");
1040
- },
1041
- m(n, r) {
1042
- A(n, e, r), N(e, t);
1043
- },
1044
- p: G,
1045
- i: G,
1046
- o: G,
1047
- d(n) {
1048
- n && I(e);
1049
- }
1050
- };
1051
- }
1052
- class wn extends Ee {
1053
- constructor(e) {
1054
- super(), we(this, e, null, yn, ye, {});
1055
- }
1056
- }
1057
- function En(i) {
1058
- let e, t, n;
1059
- return {
1060
- c() {
1061
- e = ce("svg"), t = ce("circle"), n = ce("path"), l(t, "cx", "4.789"), l(t, "cy", "4.787"), l(t, "r", "3.85"), l(t, "class", "svelte-1aq105l"), l(n, "d", "M12.063 12.063 7.635 7.635"), l(n, "class", "svelte-1aq105l"), l(e, "xmlns", "http://www.w3.org/2000/svg"), l(e, "width", "13"), l(e, "height", "13"), l(e, "viewBox", "0 0 13 13"), l(e, "class", "svelte-1aq105l");
1062
- },
1063
- m(r, u) {
1064
- A(r, e, u), N(e, t), N(e, n);
1065
- },
1066
- p: G,
1067
- i: G,
1068
- o: G,
1069
- d(r) {
1070
- r && I(e);
1071
- }
1072
- };
1073
- }
1074
- class Sn extends Ee {
1075
- constructor(e) {
1076
- super(), we(this, e, null, En, ye, {});
1077
- }
1078
- }
1079
- function pn(i, e, t) {
1080
- const n = e[1], r = e[0], u = n - r;
1081
- return i === n && t ? i : ((i - r) % u + u) % u + 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 kn(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 u;
1101
- try {
1102
- return u = await new Promise((a, o) => {
1103
- t.signal.addEventListener("abort", () => {
1104
- o(Error("aborted"));
1105
- }), navigator.geolocation.getCurrentPosition(
1106
- (d) => {
1107
- a(
1108
- [d.coords.longitude, d.coords.latitude].map((c) => c.toFixed(6)).join(",")
1109
- );
1110
- },
1111
- (d) => {
1112
- o(d);
1113
- },
1114
- r
1115
- );
1116
- }), u;
1117
- } catch {
1118
- } finally {
1119
- r.cachedLocationExpiry && (De = {
1120
- time: Date.now(),
1121
- coords: u
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 Nn(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((E) => Number(E.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), u = Math.abs(n), a = t > 0 ? "N" : "S", o = n > 0 ? "E" : "W";
1139
- let d;
1140
- i == "DD" && (d = `${r}° ${a}, ${u}° ${o}`);
1141
- const c = Math.floor(r), f = Math.floor(u), L = (r - c) * 60, b = (u - f) * 60;
1142
- if (i == "DM") {
1143
- let E = qt(L, 3).toFixed(3).padStart(6, "0"), g = qt(b, 3).toFixed(3).padStart(6, "0");
1144
- E.endsWith(".000") && g.endsWith(".000") && (E = E.replace(/\.000$/, ""), g = g.replace(/\.000$/, "")), d = `${c}° ${E}' ${a}, ${f}° ${g}' ${o}`;
1145
- }
1146
- if (i == "DMS") {
1147
- const E = Math.floor(L), g = Math.floor(b);
1148
- let p = ((L - E) * 60).toFixed(1).padStart(4, "0"), U = ((b - g) * 60).toFixed(1).padStart(4, "0");
1149
- const k = E.toString().padStart(2, "0"), W = g.toString().padStart(2, "0");
1150
- p.endsWith(".0") && U.endsWith(".0") && (p = p.replace(/\.0$/, ""), U = U.replace(/\.0$/, "")), d = `${c}° ${k}' ${p}" ${a}, ${f}° ${W}' ${U}" ${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 = "", u = "", a = 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), a = "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(",", ".")), a = "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], u = o[5]) : o[4] && (r = o[4], u = 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, a = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, a = "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], u = o[8]) : o[7] && (r = o[7], u = 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, a = "DM"), o[6] && (t += o[6] / 3600, a = "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], u = o[9]) : o[8] && (r = o[8], u = 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((c) => c).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, a = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, a = "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], u = o[9]) : o[8] && (r = o[8], u = 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 && !u || !r && u)
1203
- throw new Error("invalid coordinates value");
1204
- if (r && r == u)
1205
- throw new Error("invalid coordinates format");
1206
- t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
1207
- let c = /S|SOUTH/i;
1208
- c.test(r) && t > 0 && (t = -1 * t), c = /W|WEST/i, c.test(u) && n > 0 && (n = -1 * n);
1209
- const f = o[0].trim();
1210
- let L, b;
1211
- const E = /[,/;\u0020]/g, g = f.match(E);
1212
- if (g == null) {
1213
- const k = Math.floor(i.length / 2);
1214
- L = f.substring(0, k).trim(), b = f.substring(k).trim();
1215
- } else {
1216
- let k;
1217
- g.length % 2 == 1 ? k = Math.floor(g.length / 2) : k = g.length / 2 - 1;
1218
- let W = 0;
1219
- if (k == 0)
1220
- W = f.indexOf(g[0]), L = f.substring(0, W).trim(), b = f.substring(W + 1).trim();
1221
- else {
1222
- let B = 0, K = 0;
1223
- for (; B <= k; )
1224
- W = f.indexOf(g[B], K), K = W + 1, B++;
1225
- L = f.substring(0, W).trim(), b = f.substring(W + 1).trim();
1226
- }
1227
- }
1228
- const p = L.split(".");
1229
- if (p.length == 2 && p[1] == 0 && p[1].length != 2)
1230
- throw new Error("invalid coordinates format");
1231
- const U = b.split(".");
1232
- if (U.length == 2 && U[1] == 0 && U[1].length != 2)
1233
- throw new Error("invalid coordinates format");
1234
- if (/^\d+$/.test(L) || /^\d+$/.test(b))
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: L,
1239
- verbatimLongitude: b,
1240
- decimalLatitude: t,
1241
- decimalLongitude: n,
1242
- decimalCoordinates: `${t},${n}`,
1243
- originalFormat: a,
1244
- closeEnough: Mn,
1245
- toCoordinateFormat: Nn
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 u = 0; u < r; u++) {
1258
- const a = e[u], o = e[u + r], d = t.test(a) && t.test(o), c = n.test(a) && n.test(o), f = a == o;
1259
- if (!(a == null && o == null)) {
1260
- if (a == null || o == null)
1261
- return !1;
1262
- if (d || c || 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 Mn(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 Cn = Object.freeze({
1285
- DMS: "DMS",
1286
- DM: "DM",
1287
- DD: "DD"
1288
- });
1289
- wt.to = Cn;
1290
- const Wn = [
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
- ], On = {
1432
- decimalLatitude: 40.123,
1433
- decimalLongitude: -74.123
1434
- }, Rn = [
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
- ], zn = [
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 Un() {
1655
- const i = [];
1656
- return Wn.forEach((e) => {
1657
- e.decimalLatitude ? i.push(e) : i.push({ ...e, ...On });
1658
- }), [...i, ...Rn, ...zn];
1659
- }
1660
- const Dn = Un();
1661
- wt.formats = Dn.map((i) => i.verbatimCoordinates);
1662
- const In = 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, n, r, u;
1669
- return t = new si({}), {
1670
- c() {
1671
- e = z("button"), ve(t.$$.fragment), l(e, "type", "button"), l(
1672
- e,
1673
- "title",
1674
- /*clearButtonTitle*/
1675
- i[3]
1676
- ), l(e, "class", "svelte-bz0zu3");
1677
- },
1678
- m(a, o) {
1679
- A(a, e, o), de(t, e, null), n = !0, r || (u = Q(
1680
- e,
1681
- "click",
1682
- /*click_handler_2*/
1683
- i[78]
1684
- ), r = !0);
1685
- },
1686
- p(a, o) {
1687
- (!n || o[0] & /*clearButtonTitle*/
1688
- 8) && l(
1689
- e,
1690
- "title",
1691
- /*clearButtonTitle*/
1692
- a[3]
1693
- );
1694
- },
1695
- i(a) {
1696
- n || (P(t.$$.fragment, a), n = !0);
1697
- },
1698
- o(a) {
1699
- q(t.$$.fragment, a), n = !1;
1700
- },
1701
- d(a) {
1702
- a && I(e), fe(t), r = !1, u();
1703
- }
1704
- };
1705
- }
1706
- function Yt(i) {
1707
- let e, t;
1708
- return e = new _n({}), {
1709
- c() {
1710
- ve(e.$$.fragment);
1711
- },
1712
- m(n, r) {
1713
- de(e, n, r), t = !0;
1714
- },
1715
- i(n) {
1716
- t || (P(e.$$.fragment, n), t = !0);
1717
- },
1718
- o(n) {
1719
- q(e.$$.fragment, n), t = !1;
1720
- },
1721
- d(n) {
1722
- fe(e, n);
1723
- }
1724
- };
1725
- }
1726
- function Xt(i) {
1727
- let e, t, n, r, u;
1728
- return t = new wn({}), {
1729
- c() {
1730
- e = z("button"), ve(t.$$.fragment), l(e, "type", "button"), l(
1731
- e,
1732
- "title",
1733
- /*reverseButtonTitle*/
1734
- i[10]
1735
- ), l(e, "class", "svelte-bz0zu3"), Ce(
1736
- e,
1737
- "active",
1738
- /*reverseActive*/
1739
- i[0]
1740
- );
1741
- },
1742
- m(a, o) {
1743
- A(a, e, o), de(t, e, null), n = !0, r || (u = Q(
1744
- e,
1745
- "click",
1746
- /*click_handler_3*/
1747
- i[79]
1748
- ), r = !0);
1749
- },
1750
- p(a, o) {
1751
- (!n || o[0] & /*reverseButtonTitle*/
1752
- 1024) && l(
1753
- e,
1754
- "title",
1755
- /*reverseButtonTitle*/
1756
- a[10]
1757
- ), (!n || o[0] & /*reverseActive*/
1758
- 1) && Ce(
1759
- e,
1760
- "active",
1761
- /*reverseActive*/
1762
- a[0]
1763
- );
1764
- },
1765
- i(a) {
1766
- n || (P(t.$$.fragment, a), n = !0);
1767
- },
1768
- o(a) {
1769
- q(t.$$.fragment, a), n = !1;
1770
- },
1771
- d(a) {
1772
- a && I(e), fe(t), r = !1, u();
1773
- }
1774
- };
1775
- }
1776
- function An(i) {
1777
- let e, t = [], n = /* @__PURE__ */ new Map(), r, u, a, o = At(
1778
- /*listFeatures*/
1779
- i[13]
1780
- );
1781
- const d = (c) => (
1782
- /*feature*/
1783
- c[97].id + /*feature*/
1784
- (c[97].address ? "," + /*feature*/
1785
- c[97].address : "")
1786
- );
1787
- for (let c = 0; c < o.length; c += 1) {
1788
- let f = Kt(i, o, c), L = d(f);
1789
- n.set(L, t[c] = Jt(L, f));
1790
- }
1791
- return {
1792
- c() {
1793
- e = z("ul");
1794
- for (let c = 0; c < t.length; c += 1)
1795
- t[c].c();
1796
- l(e, "class", "options svelte-bz0zu3"), l(e, "role", "listbox");
1797
- },
1798
- m(c, f) {
1799
- A(c, e, f);
1800
- for (let L = 0; L < t.length; L += 1)
1801
- t[L] && t[L].m(e, null);
1802
- r = !0, u || (a = [
1803
- Q(
1804
- e,
1805
- "mouseleave",
1806
- /*handleMouseLeave*/
1807
- i[27]
1808
- ),
1809
- Q(
1810
- e,
1811
- "blur",
1812
- /*blur_handler_1*/
1813
- i[83]
1814
- ),
1815
- Q(
1816
- e,
1817
- "keydown",
1818
- /*handleKeyDown*/
1819
- i[23]
1820
- )
1821
- ], u = !0);
1822
- },
1823
- p(c, f) {
1824
- f[0] & /*listFeatures, showPlaceType, selectedItemIndex, picked, missingIconsCache, iconsBaseUrl, handleMouseEnter, pick*/
1825
- 102823936 && (o = At(
1826
- /*listFeatures*/
1827
- c[13]
1828
- ), Ae(), t = en(t, f, d, 1, c, o, n, e, $i, Jt, null, Kt), Pe());
1829
- },
1830
- i(c) {
1831
- if (!r) {
1832
- for (let f = 0; f < o.length; f += 1)
1833
- P(t[f]);
1834
- r = !0;
1835
- }
1836
- },
1837
- o(c) {
1838
- for (let f = 0; f < t.length; f += 1)
1839
- q(t[f]);
1840
- r = !1;
1841
- },
1842
- d(c) {
1843
- c && I(e);
1844
- for (let f = 0; f < t.length; f += 1)
1845
- t[f].d();
1846
- u = !1, me(a);
1847
- }
1848
- };
1849
- }
1850
- function Pn(i) {
1851
- let e, t, n, r, u, a;
1852
- return t = new li({}), {
1853
- c() {
1854
- e = z("div"), ve(t.$$.fragment), n = $(), r = z("div"), u = be(
1855
- /*noResultsMessage*/
1856
- i[8]
1857
- ), l(r, "class", "svelte-bz0zu3"), l(e, "class", "no-results svelte-bz0zu3");
1858
- },
1859
- m(o, d) {
1860
- A(o, e, d), de(t, e, null), N(e, n), N(e, r), N(r, u), a = !0;
1861
- },
1862
- p(o, d) {
1863
- (!a || d[0] & /*noResultsMessage*/
1864
- 256) && Fe(
1865
- u,
1866
- /*noResultsMessage*/
1867
- o[8]
1868
- );
1869
- },
1870
- i(o) {
1871
- a || (P(t.$$.fragment, o), a = !0);
1872
- },
1873
- o(o) {
1874
- q(t.$$.fragment, o), a = !1;
1875
- },
1876
- d(o) {
1877
- o && I(e), fe(t);
1878
- }
1879
- };
1880
- }
1881
- function Bn(i) {
1882
- let e = "", t;
1883
- return {
1884
- c() {
1885
- t = be(e);
1886
- },
1887
- m(n, r) {
1888
- A(n, t, r);
1889
- },
1890
- p: G,
1891
- i: G,
1892
- o: G,
1893
- d(n) {
1894
- n && I(t);
1895
- }
1896
- };
1897
- }
1898
- function Fn(i) {
1899
- let e, t, n, r, u, a, o, d, c, f, L;
1900
- return t = new li({}), d = new si({}), {
1901
- c() {
1902
- e = z("div"), ve(t.$$.fragment), n = $(), r = z("div"), u = be(
1903
- /*errorMessage*/
1904
- i[7]
1905
- ), a = $(), o = z("button"), ve(d.$$.fragment), l(r, "class", "svelte-bz0zu3"), l(o, "class", "svelte-bz0zu3"), l(e, "class", "error svelte-bz0zu3");
1906
- },
1907
- m(b, E) {
1908
- A(b, e, E), de(t, e, null), N(e, n), N(e, r), N(r, u), N(e, a), N(e, o), de(d, o, null), c = !0, f || (L = Q(
1909
- o,
1910
- "click",
1911
- /*click_handler_4*/
1912
- i[80]
1913
- ), f = !0);
1914
- },
1915
- p(b, E) {
1916
- (!c || E[0] & /*errorMessage*/
1917
- 128) && Fe(
1918
- u,
1919
- /*errorMessage*/
1920
- b[7]
1921
- );
1922
- },
1923
- i(b) {
1924
- c || (P(t.$$.fragment, b), P(d.$$.fragment, b), c = !0);
1925
- },
1926
- o(b) {
1927
- q(t.$$.fragment, b), q(d.$$.fragment, b), c = !1;
1928
- },
1929
- d(b) {
1930
- b && I(e), fe(t), fe(d), f = !1, L();
1931
- }
1932
- };
1933
- }
1934
- function Jt(i, e) {
1935
- var o;
1936
- let t, n, r;
1937
- function u() {
1938
- return (
1939
- /*mouseenter_handler*/
1940
- e[81](
1941
- /*i*/
1942
- e[99]
1943
- )
1944
- );
1945
- }
1946
- function a() {
1947
- return (
1948
- /*select_handler*/
1949
- e[82](
1950
- /*feature*/
1951
- e[97]
1952
- )
1953
- );
1954
- }
1955
- return n = new vn({
1956
- props: {
1957
- feature: (
1958
- /*feature*/
1959
- e[97]
1960
- ),
1961
- showPlaceType: (
1962
- /*showPlaceType*/
1963
- e[11]
1964
- ),
1965
- style: (
1966
- /*selectedItemIndex*/
1967
- e[15] === /*i*/
1968
- e[99] ? "selected" : (
1969
- /*picked*/
1970
- ((o = e[14]) == null ? void 0 : o.id) === /*feature*/
1971
- e[97].id ? "picked" : "default"
1972
- )
1973
- ),
1974
- missingIconsCache: (
1975
- /*missingIconsCache*/
1976
- e[21]
1977
- ),
1978
- iconsBaseUrl: (
1979
- /*iconsBaseUrl*/
1980
- e[12]
1981
- )
1982
- }
1983
- }), n.$on("mouseenter", u), n.$on("select", a), {
1984
- key: i,
1985
- first: null,
1986
- c() {
1987
- t = Hi(), ve(n.$$.fragment), this.first = t;
1988
- },
1989
- m(d, c) {
1990
- A(d, t, c), de(n, d, c), r = !0;
1991
- },
1992
- p(d, c) {
1993
- var L;
1994
- e = d;
1995
- const f = {};
1996
- c[0] & /*listFeatures*/
1997
- 8192 && (f.feature = /*feature*/
1998
- e[97]), c[0] & /*showPlaceType*/
1999
- 2048 && (f.showPlaceType = /*showPlaceType*/
2000
- e[11]), c[0] & /*selectedItemIndex, listFeatures, picked*/
2001
- 57344 && (f.style = /*selectedItemIndex*/
2002
- e[15] === /*i*/
2003
- e[99] ? "selected" : (
2004
- /*picked*/
2005
- ((L = e[14]) == null ? void 0 : L.id) === /*feature*/
2006
- e[97].id ? "picked" : "default"
2007
- )), c[0] & /*iconsBaseUrl*/
2008
- 4096 && (f.iconsBaseUrl = /*iconsBaseUrl*/
2009
- e[12]), n.$set(f);
2010
- },
2011
- i(d) {
2012
- r || (P(n.$$.fragment, d), r = !0);
2013
- },
2014
- o(d) {
2015
- q(n.$$.fragment, d), r = !1;
2016
- },
2017
- d(d) {
2018
- d && I(t), fe(n, d);
2019
- }
2020
- };
2021
- }
2022
- function Gn(i) {
2023
- let e, t, n, r, u, a, o, d, c, f, L, b, E, g, p, U, k, W, B, K = !1;
2024
- u = new Sn({});
2025
- let C = !/*abortController*/
2026
- i[20] && Vt(i), M = (
2027
- /*abortController*/
2028
- i[20] && Yt()
2029
- ), w = (
2030
- /*enableReverse*/
2031
- i[6] === "button" && Xt(i)
2032
- );
2033
- const _ = (
2034
- /*#slots*/
2035
- i[70].default
2036
- ), S = Bi(
2037
- _,
2038
- i,
2039
- /*$$scope*/
2040
- i[69],
2041
- null
2042
- ), D = [Fn, Bn, Pn, An], v = [];
2043
- function m(y, j) {
2044
- var le, Se;
2045
- return (
2046
- /*error*/
2047
- y[19] ? 0 : !/*focusedDelayed*/
2048
- y[16] && !/*keepListOpen*/
2049
- y[4] ? 1 : (
2050
- /*listFeatures*/
2051
- ((le = y[13]) == null ? void 0 : le.length) === 0 ? 2 : (
2052
- /*listFeatures*/
2053
- (Se = y[13]) != null && Se.length && /*focusedDelayed*/
2054
- (y[16] || /*keepListOpen*/
2055
- y[4]) ? 3 : -1
2056
- )
2057
- )
2058
- );
2059
- }
2060
- return ~(g = m(i)) && (p = v[g] = D[g](i)), {
2061
- c() {
2062
- e = $(), t = z("form"), n = z("div"), r = z("button"), ve(u.$$.fragment), a = $(), o = z("input"), d = $(), c = z("div"), C && C.c(), f = $(), M && M.c(), L = $(), w && w.c(), b = $(), S && S.c(), E = $(), p && p.c(), l(r, "class", "search-button svelte-bz0zu3"), l(r, "type", "button"), l(
2063
- o,
2064
- "placeholder",
2065
- /*placeholder*/
2066
- i[9]
2067
- ), l(
2068
- o,
2069
- "aria-label",
2070
- /*placeholder*/
2071
- i[9]
2072
- ), l(o, "class", "svelte-bz0zu3"), l(c, "class", "clear-button-container svelte-bz0zu3"), Ce(
2073
- c,
2074
- "displayable",
2075
- /*searchValue*/
2076
- i[1] !== ""
2077
- ), l(n, "class", "input-group svelte-bz0zu3"), l(t, "class", U = et(
2078
- /*className*/
2079
- i[2]
2080
- ) + " svelte-bz0zu3"), Ce(
2081
- t,
2082
- "can-collapse",
2083
- /*collapsed*/
2084
- i[5] && /*searchValue*/
2085
- i[1] === ""
2086
- );
2087
- },
2088
- m(y, j) {
2089
- A(y, e, j), A(y, t, j), N(t, n), N(n, r), de(u, r, null), N(n, a), N(n, o), i[72](o), Dt(
2090
- o,
2091
- /*searchValue*/
2092
- i[1]
2093
- ), N(n, d), N(n, c), C && C.m(c, null), N(c, f), M && M.m(c, null), N(n, L), w && w.m(n, null), N(n, b), S && S.m(n, null), N(t, E), ~g && v[g].m(t, null), k = !0, W || (B = [
2094
- Q(
2095
- r,
2096
- "click",
2097
- /*click_handler*/
2098
- i[71]
2099
- ),
2100
- Q(
2101
- o,
2102
- "input",
2103
- /*input_1_input_handler*/
2104
- i[73]
2105
- ),
2106
- Q(
2107
- o,
2108
- "focus",
2109
- /*focus_handler*/
2110
- i[74]
2111
- ),
2112
- Q(
2113
- o,
2114
- "blur",
2115
- /*blur_handler*/
2116
- i[75]
2117
- ),
2118
- Q(
2119
- o,
2120
- "click",
2121
- /*click_handler_1*/
2122
- i[76]
2123
- ),
2124
- Q(
2125
- o,
2126
- "keydown",
2127
- /*handleKeyDown*/
2128
- i[23]
2129
- ),
2130
- Q(
2131
- o,
2132
- "input",
2133
- /*handleInput*/
2134
- i[24]
2135
- ),
2136
- Q(
2137
- o,
2138
- "change",
2139
- /*change_handler*/
2140
- i[77]
2141
- ),
2142
- Q(t, "submit", Zi(
2143
- /*handleSubmit*/
2144
- i[22]
2145
- ))
2146
- ], W = !0);
2147
- },
2148
- p(y, j) {
2149
- (!k || j[0] & /*placeholder*/
2150
- 512) && l(
2151
- o,
2152
- "placeholder",
2153
- /*placeholder*/
2154
- y[9]
2155
- ), (!k || j[0] & /*placeholder*/
2156
- 512) && l(
2157
- o,
2158
- "aria-label",
2159
- /*placeholder*/
2160
- y[9]
2161
- ), j[0] & /*searchValue*/
2162
- 2 && o.value !== /*searchValue*/
2163
- y[1] && Dt(
2164
- o,
2165
- /*searchValue*/
2166
- y[1]
2167
- ), /*abortController*/
2168
- y[20] ? C && (Ae(), q(C, 1, 1, () => {
2169
- C = null;
2170
- }), Pe()) : C ? (C.p(y, j), j[0] & /*abortController*/
2171
- 1048576 && P(C, 1)) : (C = Vt(y), C.c(), P(C, 1), C.m(c, f)), /*abortController*/
2172
- y[20] ? M ? j[0] & /*abortController*/
2173
- 1048576 && P(M, 1) : (M = Yt(), M.c(), P(M, 1), M.m(c, null)) : M && (Ae(), q(M, 1, 1, () => {
2174
- M = null;
2175
- }), Pe()), (!k || j[0] & /*searchValue*/
2176
- 2) && Ce(
2177
- c,
2178
- "displayable",
2179
- /*searchValue*/
2180
- y[1] !== ""
2181
- ), /*enableReverse*/
2182
- y[6] === "button" ? w ? (w.p(y, j), j[0] & /*enableReverse*/
2183
- 64 && P(w, 1)) : (w = Xt(y), w.c(), P(w, 1), w.m(n, b)) : w && (Ae(), q(w, 1, 1, () => {
2184
- w = null;
2185
- }), Pe()), S && S.p && (!k || j[2] & /*$$scope*/
2186
- 128) && Gi(
2187
- S,
2188
- _,
2189
- y,
2190
- /*$$scope*/
2191
- y[69],
2192
- k ? Fi(
2193
- _,
2194
- /*$$scope*/
2195
- y[69],
2196
- j,
2197
- null
2198
- ) : ji(
2199
- /*$$scope*/
2200
- y[69]
2201
- ),
2202
- null
2203
- );
2204
- let le = g;
2205
- g = m(y), g === le ? ~g && v[g].p(y, j) : (p && (Ae(), q(v[le], 1, 1, () => {
2206
- v[le] = null;
2207
- }), Pe()), ~g ? (p = v[g], p ? p.p(y, j) : (p = v[g] = D[g](y), p.c()), P(p, 1), p.m(t, null)) : p = null), (!k || j[0] & /*className*/
2208
- 4 && U !== (U = et(
2209
- /*className*/
2210
- y[2]
2211
- ) + " svelte-bz0zu3")) && l(t, "class", U), (!k || j[0] & /*className, collapsed, searchValue*/
2212
- 38) && Ce(
2213
- t,
2214
- "can-collapse",
2215
- /*collapsed*/
2216
- y[5] && /*searchValue*/
2217
- y[1] === ""
2218
- );
2219
- },
2220
- i(y) {
2221
- k || (P(K), P(u.$$.fragment, y), P(C), P(M), P(w), P(S, y), P(p), k = !0);
2222
- },
2223
- o(y) {
2224
- q(K), q(u.$$.fragment, y), q(C), q(M), q(w), q(S, y), q(p), k = !1;
2225
- },
2226
- d(y) {
2227
- y && (I(e), I(t)), fe(u), i[72](null), C && C.d(), M && M.d(), w && w.d(), S && S.d(y), ~g && v[g].d(), W = !1, me(B);
2228
- }
2229
- };
2230
- }
2231
- function jn(i, e, t) {
2232
- let n, r, u, { $$slots: a = {}, $$scope: o } = e;
2233
- const d = {
2234
- continental_marine: 4,
2235
- country: 4,
2236
- major_landform: 8,
2237
- region: 5,
2238
- subregion: 6,
2239
- county: 7,
2240
- joint_municipality: 8,
2241
- joint_submunicipality: 9,
2242
- municipality: 10,
2243
- municipal_district: 11,
2244
- locality: 12,
2245
- neighbourhood: 13,
2246
- place: 14,
2247
- postal_code: 14,
2248
- road: 16,
2249
- poi: 17,
2250
- address: 18,
2251
- "poi.peak": 15,
2252
- "poi.shop": 18,
2253
- "poi.cafe": 18,
2254
- "poi.restaurant": 18,
2255
- "poi.aerodrome": 13
2256
- };
2257
- let { class: c = void 0 } = e, { apiKey: f = void 0 } = e, { bbox: L = void 0 } = e, { clearButtonTitle: b = "clear" } = e, { clearOnBlur: E = !1 } = e, { clearListOnPick: g = !1 } = e, { keepListOpen: p = !1 } = e, { collapsed: U = !1 } = e, { country: k = void 0 } = e, { debounceSearch: W = 200 } = e, { enableReverse: B = "never" } = e, { errorMessage: K = "Something went wrong…" } = e, { filter: C = () => !0 } = e, { flyTo: M = !0 } = e, { fuzzyMatch: w = !0 } = e, { language: _ = void 0 } = e, { limit: S = void 0 } = e;
2258
- const D = 41415112612;
2259
- let { reverseGeocodingLimit: v = D } = e, { mapController: m = void 0 } = e, { minLength: y = 2 } = e, { noResultsMessage: j = "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: le = "Search" } = e, { proximity: Se = [{ type: "server-geolocation" }] } = e, { reverseActive: ae = B === "always" } = e, { reverseButtonTitle: Et = "toggle reverse geocoding" } = e, { searchValue: V = "" } = e, { pickedResultStyle: je = "full-geometry" } = e, { showPlaceType: St = "if-needed" } = e, { showResultsWhileTyping: He = !0 } = e, { selectFirst: pe = !0 } = e, { flyToSelected: Ze = !1 } = e, { markerOnSelected: qe = !0 } = e, { types: tt = void 0 } = e;
2260
- const pt = [];
2261
- let { reverseGeocodingTypes: Qe = pt } = e, { exhaustiveReverseGeocoding: it = !1 } = e, { excludeTypes: nt = !1 } = e;
2262
- const kt = void 0;
2263
- let { reverseGeocodingExcludeTypes: Ke = kt } = e, { zoom: Ve = d } = e, { apiUrl: rt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: ot = {} } = e, { iconsBaseUrl: Tt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.1.7/icons/" } = e, { adjustUrlQuery: st = () => {
2264
- } } = e, { adjustUrl: lt = () => {
2265
- } } = e;
2266
- function ui(s) {
2267
- ie.focus(s);
2268
- }
2269
- function ci() {
2270
- ie.blur();
2271
- }
2272
- function Nt(s, F = !0, H = !1) {
2273
- t(1, V = s), F ? (t(15, O = -1), Ct()) : (Wt(void 0, !H, H), setTimeout(() => {
2274
- ie.focus(), ie.select();
2275
- }));
2276
- }
2277
- function di() {
2278
- t(13, T = void 0), t(14, h = void 0), t(15, O = -1);
2279
- }
2280
- function fi() {
2281
- t(64, Z = []), t(14, h = void 0);
2282
- }
2283
- let T, Z, h, Mt = "", ie, O = -1, re, Ye = [], Le, ke, Te, at, ue = !1;
2284
- const mi = /* @__PURE__ */ new Set(), ge = ri();
2285
- Ki(() => {
2286
- m && (m.setEventHandler(void 0), m.indicateReverse(!1), m.setSelectedMarker(-1), m.setFeatures(void 0, void 0, !1));
2287
- });
2288
- function Ct(s) {
2289
- if (t(17, ue = !1), ke && (clearTimeout(ke), ke = void 0), O > -1 && T)
2290
- t(14, h = T[O]), t(1, V = h.place_type[0] === "reverse" ? h.place_name : h.place_name.replace(/,.*/, "")), t(19, re = void 0), t(64, Z = void 0), t(15, O = -1);
2291
- else if (V) {
2292
- const F = s || !ut(V);
2293
- ct(V, { exact: !0 }).then(() => {
2294
- t(64, Z = T), t(14, h = void 0), F && gi();
2295
- }).catch((H) => t(19, re = H));
2296
- }
2297
- }
2298
- function ut(s) {
2299
- try {
2300
- return In(s, 6);
2301
- } catch {
2302
- return !1;
2303
- }
2304
- }
2305
- async function ct(s, { byId: F = !1, exact: H = !1 } = {}) {
2306
- var x, oe, he;
2307
- t(19, re = void 0), Le == null || Le.abort();
2308
- const J = new AbortController();
2309
- t(20, Le = J);
2310
- try {
2311
- const R = ut(s), Re = new URL(rt + "/" + encodeURIComponent(R ? R.decimalLongitude + "," + R.decimalLatitude : s) + ".json"), ee = Re.searchParams;
2312
- _ !== void 0 && ee.set("language", Array.isArray(_) ? _.join(",") : _ ?? "");
2313
- const [mt] = (m == null ? void 0 : m.getCenterAndZoom()) ?? [];
2314
- let se = (x = !R || Qe === pt ? tt : Qe) == null ? void 0 : x.map((Y) => typeof Y == "string" ? Y : mt === void 0 || (Y[0] ?? 0) <= mt && mt < (Y[1] ?? 1 / 0) ? Y[2] : void 0).filter((Y) => Y !== void 0);
2315
- se && (se = [...new Set(se)], ee.set("types", se.join(",")));
2316
- const Rt = !R || Ke === kt ? nt : Ke;
2317
- if (Rt && ee.set("excludeTypes", String(Rt)), L && ee.set("bbox", L.map((Y) => Y.toFixed(6)).join(",")), k && ee.set("country", Array.isArray(k) ? k.join(",") : k), !F && !R) {
2318
- const Y = await kn(m, Se, J);
2319
- Y && ee.set("proximity", Y), (H || !He) && ee.set("autocomplete", "false"), ee.set("fuzzyMatch", String(w));
2320
- }
2321
- const ze = v === D ? S : v;
2322
- ze !== void 0 && ze > 1 && (se == null ? void 0 : se.length) !== 1 && console.warn("For reverse geocoding when limit > 1 then types must contain single value."), R ? (ze === 1 || ze !== void 0 && (it || (se == null ? void 0 : se.length) === 1)) && ee.set("limit", String(ze)) : S !== void 0 && ee.set("limit", String(S)), f && ee.set("key", f), st(ee), lt(Re);
2323
- const Oi = Re.searchParams.get("types") === "" && Re.searchParams.get("excludeTypes") !== "true", Xe = Re.toString();
2324
- if (Xe === Mt) {
2325
- F ? (g && t(13, T = void 0), t(14, h = Ye[0])) : (t(13, T = Ye), ((oe = T[O]) == null ? void 0 : oe.id) !== (r == null ? void 0 : r.id) && t(15, O = -1));
2326
- return;
2327
- }
2328
- Mt = Xe;
2329
- let Ue;
2330
- if (Oi)
2331
- Ue = { type: "FeatureCollection", features: [] };
2332
- else {
2333
- const Y = await fetch(Xe, { signal: J.signal, ...ot });
2334
- if (!Y.ok)
2335
- throw new Error(await Y.text());
2336
- Ue = await Y.json();
2337
- }
2338
- ge("response", { url: Xe, featureCollection: Ue }), F ? (g && t(13, T = void 0), t(14, h = Ue.features[0]), Ye = [h]) : (t(13, T = Ue.features.filter(C)), R && T.unshift({
2339
- type: "Feature",
2340
- properties: {},
2341
- id: "reverse_" + R.decimalLongitude + "_" + R.decimalLatitude,
2342
- text: R.decimalLatitude + ", " + R.decimalLongitude,
2343
- place_name: R.decimalLatitude + ", " + R.decimalLongitude,
2344
- place_type: ["reverse"],
2345
- center: [R.decimalLongitude, R.decimalLatitude],
2346
- bbox: [
2347
- R.decimalLongitude,
2348
- R.decimalLatitude,
2349
- R.decimalLongitude,
2350
- R.decimalLatitude
2351
- ],
2352
- geometry: {
2353
- type: "Point",
2354
- coordinates: [R.decimalLongitude, R.decimalLatitude]
2355
- }
2356
- }), Ye = T, ((he = T[O]) == null ? void 0 : he.id) !== (r == null ? void 0 : r.id) && t(15, O = -1), R && ie.focus());
2357
- } catch (R) {
2358
- if (R && typeof R == "object" && "name" in R && R.name === "AbortError")
2359
- return;
2360
- throw R;
2361
- } finally {
2362
- J === Le && t(20, Le = void 0);
2363
- }
2364
- }
2365
- function gi() {
2366
- var J;
2367
- if (!(Z != null && Z.length) || !M)
2368
- return;
2369
- const s = [180, 90, -180, -90], F = !Z.some((x) => !x.matching_text);
2370
- let H;
2371
- for (const x of Z) {
2372
- const oe = Oe(x);
2373
- if (H = H === void 0 ? oe : oe === void 0 ? H : Math.max(H, oe), F || !x.matching_text)
2374
- for (const he of [0, 1, 2, 3])
2375
- s[he] = Math[he < 2 ? "min" : "max"](s[he], ((J = x.bbox) == null ? void 0 : J[he]) ?? x.center[he % 2]);
2376
- }
2377
- m && Z.length > 0 && (h && s[0] === s[2] && s[1] === s[3] ? m.flyTo(h.center, Oe(h)) : m.fitBounds(Bt(s), 50, H));
2378
- }
2379
- function dt() {
2380
- !h || !m || (!h.bbox || h.bbox[0] === h.bbox[2] && h.bbox[1] === h.bbox[3] ? m.flyTo(h.center, Oe(h)) : m.fitBounds(Bt(h.bbox), 50, Oe(h)));
2381
- }
2382
- function Oe(s) {
2383
- var H;
2384
- if (!s.bbox || s.bbox[0] !== s.bbox[2] && s.bbox[1] !== s.bbox[3])
2385
- return;
2386
- const F = s.id.replace(/\..*/, "");
2387
- return (Array.isArray((H = s.properties) == null ? void 0 : H.categories) ? s.properties.categories.reduce(
2388
- (J, x) => {
2389
- const oe = Ve[F + "." + x];
2390
- return J === void 0 ? oe : oe === void 0 ? J : Math.max(J, oe);
2391
- },
2392
- void 0
2393
- ) : void 0) ?? Ve[F];
2394
- }
2395
- function hi(s) {
2396
- t(0, ae = B === "always"), t(13, T = void 0), t(14, h = void 0), t(15, O = -1), Nt(s[1].toFixed(6) + ", " + pn(s[0], [-180, 180], !0).toFixed(6), !1, !0);
2397
- }
2398
- function bi(s) {
2399
- if (!T)
2400
- return;
2401
- let F = s.key === "ArrowDown" ? 1 : s.key === "ArrowUp" ? -1 : 0;
2402
- F && (ie.focus(), t(17, ue = !0), s.preventDefault(), h && O === -1 && t(15, O = T.findIndex((H) => H.id === (h == null ? void 0 : h.id))), O === (h || pe ? 0 : -1) && F === -1 && t(15, O = T.length), t(15, O += F), O >= T.length && t(15, O = -1), O < 0 && (h || pe) && t(15, O = 0));
2403
- }
2404
- function Wt(s, F = !0, H = !1) {
2405
- if (t(19, re = void 0), t(14, h = void 0), t(17, ue = !0), He || H) {
2406
- if (ke && clearTimeout(ke), V.length < y)
2407
- return;
2408
- const J = V;
2409
- ke = window.setTimeout(
2410
- () => {
2411
- ct(J).catch((x) => t(19, re = x));
2412
- },
2413
- F ? W : 0
2414
- );
2415
- } else
2416
- t(13, T = void 0), t(19, re = void 0);
2417
- }
2418
- function ft(s) {
2419
- h && (h == null ? void 0 : h.id) === (s == null ? void 0 : s.id) ? dt() : (t(14, h = s), t(1, V = s.place_name));
2420
- }
2421
- function Ot(s) {
2422
- t(15, O = s);
2423
- }
2424
- function vi() {
2425
- (!pe || h) && t(15, O = -1), Ze && dt();
2426
- }
2427
- const Li = () => ie.focus();
2428
- function _i(s) {
2429
- vt[s ? "unshift" : "push"](() => {
2430
- ie = s, t(18, ie);
2431
- });
2432
- }
2433
- function yi() {
2434
- V = this.value, t(1, V), t(17, ue), t(31, E), t(16, Te);
2435
- }
2436
- const wi = () => t(17, ue = !0), Ei = () => t(17, ue = !1), Si = () => t(17, ue = !0), pi = () => t(14, h = void 0), ki = () => {
2437
- t(1, V = ""), t(14, h = void 0), ie.focus();
2438
- }, Ti = () => t(0, ae = !ae), Ni = () => t(19, re = void 0), Mi = (s) => Ot(s), Ci = (s) => ft(s), Wi = () => {
2439
- };
2440
- return i.$$set = (s) => {
2441
- "class" in s && t(2, c = s.class), "apiKey" in s && t(29, f = s.apiKey), "bbox" in s && t(30, L = s.bbox), "clearButtonTitle" in s && t(3, b = s.clearButtonTitle), "clearOnBlur" in s && t(31, E = s.clearOnBlur), "clearListOnPick" in s && t(32, g = s.clearListOnPick), "keepListOpen" in s && t(4, p = s.keepListOpen), "collapsed" in s && t(5, U = s.collapsed), "country" in s && t(33, k = s.country), "debounceSearch" in s && t(34, W = s.debounceSearch), "enableReverse" in s && t(6, B = s.enableReverse), "errorMessage" in s && t(7, K = s.errorMessage), "filter" in s && t(35, C = s.filter), "flyTo" in s && t(36, M = s.flyTo), "fuzzyMatch" in s && t(37, w = s.fuzzyMatch), "language" in s && t(38, _ = s.language), "limit" in s && t(39, S = s.limit), "reverseGeocodingLimit" in s && t(40, v = s.reverseGeocodingLimit), "mapController" in s && t(41, m = s.mapController), "minLength" in s && t(42, y = s.minLength), "noResultsMessage" in s && t(8, j = s.noResultsMessage), "placeholder" in s && t(9, le = s.placeholder), "proximity" in s && t(43, Se = s.proximity), "reverseActive" in s && t(0, ae = s.reverseActive), "reverseButtonTitle" in s && t(10, Et = s.reverseButtonTitle), "searchValue" in s && t(1, V = s.searchValue), "pickedResultStyle" in s && t(44, je = s.pickedResultStyle), "showPlaceType" in s && t(11, St = s.showPlaceType), "showResultsWhileTyping" in s && t(45, He = s.showResultsWhileTyping), "selectFirst" in s && t(46, pe = s.selectFirst), "flyToSelected" in s && t(47, Ze = s.flyToSelected), "markerOnSelected" in s && t(48, qe = s.markerOnSelected), "types" in s && t(49, tt = s.types), "reverseGeocodingTypes" in s && t(50, Qe = s.reverseGeocodingTypes), "exhaustiveReverseGeocoding" in s && t(51, it = s.exhaustiveReverseGeocoding), "excludeTypes" in s && t(52, nt = s.excludeTypes), "reverseGeocodingExcludeTypes" in s && t(53, Ke = s.reverseGeocodingExcludeTypes), "zoom" in s && t(54, Ve = s.zoom), "apiUrl" in s && t(55, rt = s.apiUrl), "fetchParameters" in s && t(56, ot = s.fetchParameters), "iconsBaseUrl" in s && t(12, Tt = s.iconsBaseUrl), "adjustUrlQuery" in s && t(57, st = s.adjustUrlQuery), "adjustUrl" in s && t(58, lt = s.adjustUrl), "$$scope" in s && t(69, o = s.$$scope);
2442
- }, i.$$.update = () => {
2443
- if (i.$$.dirty[0] & /*enableReverse*/
2444
- 64 && t(0, ae = B === "always"), i.$$.dirty[0] & /*picked*/
2445
- 16384 | i.$$.dirty[1] & /*pickedResultStyle*/
2446
- 8192 && je !== "marker-only" && h && !h.address && h.geometry.type === "Point" && h.place_type[0] !== "reverse" && ct(h.id, { byId: !0 }).catch((s) => t(19, re = s)), i.$$.dirty[0] & /*picked*/
2447
- 16384 | i.$$.dirty[1] & /*mapController, flyTo, clearListOnPick*/
2448
- 1058 | i.$$.dirty[2] & /*prevIdToFly*/
2449
- 8 && (m && h && h.id !== at && M && (dt(), g && t(13, T = void 0), t(64, Z = void 0), t(15, O = -1)), t(65, at = h == null ? void 0 : h.id)), i.$$.dirty[0] & /*focused, focusedDelayed*/
2450
- 196608 | i.$$.dirty[1] & /*clearOnBlur*/
2451
- 1 && setTimeout(() => {
2452
- t(16, Te = ue), E && !Te && t(1, V = "");
2453
- }), i.$$.dirty[0] & /*searchValue, listFeatures*/
2454
- 8194 | i.$$.dirty[1] & /*minLength*/
2455
- 2048 && V.length < y && (t(13, T = void 0), t(19, re = void 0), t(64, Z = T)), i.$$.dirty[0] & /*listFeatures, selectedItemIndex, picked*/
2456
- 57344 | i.$$.dirty[1] & /*selectFirst*/
2457
- 32768 && pe && T != null && T.length && O == -1 && !h && t(15, O = 0), i.$$.dirty[0] & /*listFeatures*/
2458
- 8192 | i.$$.dirty[2] & /*markedFeatures*/
2459
- 4 && Z !== T && t(64, Z = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
2460
- 73729 | i.$$.dirty[1] & /*mapController*/
2461
- 1024 | i.$$.dirty[2] & /*markedFeatures*/
2462
- 4 && m && m.setEventHandler((s) => {
2463
- switch (s.type) {
2464
- case "mapClick":
2465
- ae && hi(s.coordinates);
2466
- break;
2467
- case "markerClick":
2468
- {
2469
- const F = T == null ? void 0 : T.find((H) => H.id === s.id);
2470
- F && ft(F);
2471
- }
2472
- break;
2473
- case "markerMouseEnter":
2474
- Z && t(15, O = Te ? (T == null ? void 0 : T.findIndex((F) => F.id === s.id)) ?? -1 : -1);
2475
- break;
2476
- case "markerMouseLeave":
2477
- Z && t(15, O = -1);
2478
- break;
2479
- }
2480
- }), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
2481
- 40960 && t(66, r = T == null ? void 0 : T[O]), i.$$.dirty[1] & /*mapController, flyTo, flyToSelected*/
2482
- 66592 | i.$$.dirty[2] & /*selected*/
2483
- 16 && m && r && M && Ze && m.flyTo(r.center, Oe(r)), i.$$.dirty[1] & /*pickedResultStyle*/
2484
- 8192 && t(68, n = je === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController*/
2485
- 132096 | i.$$.dirty[2] & /*showPolygonMarker*/
2486
- 64 && (qe || m == null || m.setFeatures(void 0, void 0, n)), i.$$.dirty[0] & /*picked*/
2487
- 16384 | i.$$.dirty[1] & /*mapController, markerOnSelected*/
2488
- 132096 | i.$$.dirty[2] & /*markedFeatures, selected, showPolygonMarker*/
2489
- 84 && m && qe && !Z && (m.setFeatures(r ? [r] : void 0, h, n), m.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[0] & /*picked*/
2490
- 16384 | i.$$.dirty[1] & /*mapController*/
2491
- 1024 | i.$$.dirty[2] & /*markedFeatures, showPolygonMarker*/
2492
- 68 && m && m.setFeatures(Z, h, n), i.$$.dirty[0] & /*selectedItemIndex*/
2493
- 32768 | i.$$.dirty[1] & /*mapController*/
2494
- 1024 | i.$$.dirty[2] & /*markedFeatures*/
2495
- 4 && Z && m && m.setSelectedMarker(O), i.$$.dirty[0] & /*searchValue*/
2496
- 2 | i.$$.dirty[1] & /*mapController*/
2497
- 1024 && m) {
2498
- const s = ut(V);
2499
- m.setReverseMarker(s ? [s.decimalLongitude, s.decimalLatitude] : void 0);
2500
- }
2501
- i.$$.dirty[2] & /*selected*/
2502
- 16 && ge("select", { feature: r }), i.$$.dirty[0] & /*picked*/
2503
- 16384 && ge("pick", { feature: h }), i.$$.dirty[0] & /*listFeatures, focusedDelayed, keepListOpen*/
2504
- 73744 && t(67, u = !!(T != null && T.length) && (Te || p)), i.$$.dirty[2] & /*optionsVisible*/
2505
- 32 && ge("optionsvisibilitychange", { optionsVisible: u }), i.$$.dirty[0] & /*listFeatures*/
2506
- 8192 && ge("featureslisted", { features: T }), i.$$.dirty[2] & /*markedFeatures*/
2507
- 4 && ge("featuresmarked", { features: Z }), i.$$.dirty[0] & /*reverseActive*/
2508
- 1 && ge("reversetoggle", { reverse: ae }), i.$$.dirty[0] & /*searchValue*/
2509
- 2 && ge("querychange", { query: V }), i.$$.dirty[0] & /*reverseActive*/
2510
- 1 | i.$$.dirty[1] & /*mapController*/
2511
- 1024 && m && m.indicateReverse(ae);
2512
- }, [
2513
- ae,
2514
- V,
2515
- c,
2516
- b,
2517
- p,
2518
- U,
2519
- B,
2520
- K,
2521
- j,
2522
- le,
2523
- Et,
2524
- St,
2525
- Tt,
2526
- T,
2527
- h,
2528
- O,
2529
- Te,
2530
- ue,
2531
- ie,
2532
- re,
2533
- Le,
2534
- mi,
2535
- Ct,
2536
- bi,
2537
- Wt,
2538
- ft,
2539
- Ot,
2540
- vi,
2541
- d,
2542
- f,
2543
- L,
2544
- E,
2545
- g,
2546
- k,
2547
- W,
2548
- C,
2549
- M,
2550
- w,
2551
- _,
2552
- S,
2553
- v,
2554
- m,
2555
- y,
2556
- Se,
2557
- je,
2558
- He,
2559
- pe,
2560
- Ze,
2561
- qe,
2562
- tt,
2563
- Qe,
2564
- it,
2565
- nt,
2566
- Ke,
2567
- Ve,
2568
- rt,
2569
- ot,
2570
- st,
2571
- lt,
2572
- ui,
2573
- ci,
2574
- Nt,
2575
- di,
2576
- fi,
2577
- Z,
2578
- at,
2579
- r,
2580
- u,
2581
- n,
2582
- o,
2583
- a,
2584
- Li,
2585
- _i,
2586
- yi,
2587
- wi,
2588
- Ei,
2589
- Si,
2590
- pi,
2591
- ki,
2592
- Ti,
2593
- Ni,
2594
- Mi,
2595
- Ci,
2596
- Wi
2597
- ];
2598
- }
2599
- class Hn extends Ee {
2600
- constructor(e) {
2601
- super(), we(
2602
- this,
2603
- e,
2604
- jn,
2605
- Gn,
2606
- ye,
2607
- {
2608
- ZOOM_DEFAULTS: 28,
2609
- class: 2,
2610
- apiKey: 29,
2611
- bbox: 30,
2612
- clearButtonTitle: 3,
2613
- clearOnBlur: 31,
2614
- clearListOnPick: 32,
2615
- keepListOpen: 4,
2616
- collapsed: 5,
2617
- country: 33,
2618
- debounceSearch: 34,
2619
- enableReverse: 6,
2620
- errorMessage: 7,
2621
- filter: 35,
2622
- flyTo: 36,
2623
- fuzzyMatch: 37,
2624
- language: 38,
2625
- limit: 39,
2626
- reverseGeocodingLimit: 40,
2627
- mapController: 41,
2628
- minLength: 42,
2629
- noResultsMessage: 8,
2630
- placeholder: 9,
2631
- proximity: 43,
2632
- reverseActive: 0,
2633
- reverseButtonTitle: 10,
2634
- searchValue: 1,
2635
- pickedResultStyle: 44,
2636
- showPlaceType: 11,
2637
- showResultsWhileTyping: 45,
2638
- selectFirst: 46,
2639
- flyToSelected: 47,
2640
- markerOnSelected: 48,
2641
- types: 49,
2642
- reverseGeocodingTypes: 50,
2643
- exhaustiveReverseGeocoding: 51,
2644
- excludeTypes: 52,
2645
- reverseGeocodingExcludeTypes: 53,
2646
- zoom: 54,
2647
- apiUrl: 55,
2648
- fetchParameters: 56,
2649
- iconsBaseUrl: 12,
2650
- adjustUrlQuery: 57,
2651
- adjustUrl: 58,
2652
- focus: 59,
2653
- blur: 60,
2654
- setQuery: 61,
2655
- clearList: 62,
2656
- clearMap: 63
2657
- },
2658
- null,
2659
- [-1, -1, -1, -1]
2660
- );
2661
- }
2662
- get ZOOM_DEFAULTS() {
2663
- return this.$$.ctx[28];
2664
- }
2665
- get focus() {
2666
- return this.$$.ctx[59];
2667
- }
2668
- get blur() {
2669
- return this.$$.ctx[60];
2670
- }
2671
- get setQuery() {
2672
- return this.$$.ctx[61];
2673
- }
2674
- get clearList() {
2675
- return this.$$.ctx[62];
2676
- }
2677
- get clearMap() {
2678
- return this.$$.ctx[63];
2679
- }
2680
- }
2681
- const xt = [
2682
- "featuresListed",
2683
- "featuresMarked",
2684
- "optionsVisibilityChange",
2685
- "pick",
2686
- "queryChange",
2687
- "response",
2688
- "reverseToggle",
2689
- "select"
2690
- ], Zn = [
2691
- "adjustUrlQuery",
2692
- "adjustUrl",
2693
- "apiKey",
2694
- "apiUrl",
2695
- "bbox",
2696
- "class",
2697
- "clearButtonTitle",
2698
- "clearListOnPick",
2699
- "clearOnBlur",
2700
- "collapsed",
2701
- "country",
2702
- "debounceSearch",
2703
- "enableReverse",
2704
- "errorMessage",
2705
- "excludeTypes",
2706
- "reverseGeocodingExcludeTypes",
2707
- "exhaustiveReverseGeocoding",
2708
- "fetchParameters",
2709
- "filter",
2710
- "flyToSelected",
2711
- "fuzzyMatch",
2712
- "iconsBaseUrl",
2713
- "keepListOpen",
2714
- "language",
2715
- "limit",
2716
- "reverseGeocodingLimit",
2717
- "mapController",
2718
- "markerOnSelected",
2719
- "minLength",
2720
- "noResultsMessage",
2721
- "pickedResultStyle",
2722
- "placeholder",
2723
- "proximity",
2724
- "reverseActive",
2725
- "reverseButtonTitle",
2726
- "selectFirst",
2727
- "showPlaceType",
2728
- "showResultsWhileTyping",
2729
- "types",
2730
- "reverseGeocodingTypes",
2731
- "zoom"
2732
- ];
2733
- function $t(i) {
2734
- return "on" + i[0].toUpperCase() + i.slice(1);
2735
- }
2736
- const Kn = Ui(function(e, t) {
2737
- const n = zt(void 0), r = zt(void 0), u = { ...e };
2738
- for (const a of xt)
2739
- delete u[$t(a)];
2740
- ht(() => {
2741
- if (!n.current)
2742
- throw new Error();
2743
- const a = new Hn({
2744
- target: n.current,
2745
- props: u
2746
- });
2747
- return r.current = a, () => a.$destroy();
2748
- }, []);
2749
- for (const a of Zn)
2750
- ht(() => {
2751
- r.current && e[a] !== void 0 && r.current.$set({ [a]: e[a] });
2752
- }, [e[a]]);
2753
- for (const a of xt) {
2754
- const o = e[$t(a)];
2755
- ht(
2756
- () => {
2757
- var d;
2758
- return o && ((d = r.current) == null ? void 0 : d.$on(a.toLowerCase(), (c) => {
2759
- o(c.detail);
2760
- }));
2761
- },
2762
- [o]
2763
- );
2764
- }
2765
- return Di(t, () => ({
2766
- setQuery: (a, o = !0) => {
2767
- var d;
2768
- return (d = r.current) == null ? void 0 : d.setQuery(a, o);
2769
- },
2770
- clearMap: () => {
2771
- var a;
2772
- return (a = r.current) == null ? void 0 : a.clearMap();
2773
- },
2774
- clearList: () => {
2775
- var a;
2776
- return (a = r.current) == null ? void 0 : a.clearList();
2777
- },
2778
- focus: (a) => {
2779
- var o;
2780
- return (o = r.current) == null ? void 0 : o.focus(a);
2781
- },
2782
- blur: () => {
2783
- var a;
2784
- return (a = r.current) == null ? void 0 : a.blur();
2785
- },
2786
- setReverseMode: (a) => {
2787
- var o;
2788
- return (o = r.current) == null ? void 0 : o.$set({ reverseActive: a });
2789
- }
2790
- })), Ii("div", { ref: n });
2791
- });
2792
- export {
2793
- Kn as GeocodingControl
2794
- };
2795
- //# sourceMappingURL=react.js.map