@performant-software/geospatial 3.1.18-beta.0 → 3.1.18-beta.10

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 (365) hide show
  1. package/dist/index.cjs100.js +1 -1
  2. package/dist/index.cjs101.js +1 -1
  3. package/dist/index.cjs102.js +1 -1
  4. package/dist/index.cjs103.js +1 -1
  5. package/dist/index.cjs106.js +1 -1
  6. package/dist/index.cjs107.js +1 -1
  7. package/dist/index.cjs109.js +1 -1
  8. package/dist/index.cjs110.js +1 -1
  9. package/dist/index.cjs111.js +1 -1
  10. package/dist/index.cjs112.js +1 -1
  11. package/dist/index.cjs117.js +1 -1
  12. package/dist/index.cjs118.js +1 -1
  13. package/dist/index.cjs119.js +1 -1
  14. package/dist/index.cjs120.js +1 -1
  15. package/dist/index.cjs123.js +1 -1
  16. package/dist/index.cjs124.js +1 -1
  17. package/dist/index.cjs125.js +1 -1
  18. package/dist/index.cjs129.js +1 -1
  19. package/dist/index.cjs13.js +1 -1
  20. package/dist/index.cjs13.js.map +1 -1
  21. package/dist/index.cjs132.js +1 -1
  22. package/dist/index.cjs136.js +1 -1
  23. package/dist/index.cjs139.js +1 -1
  24. package/dist/index.cjs147.js +1 -1
  25. package/dist/index.cjs148.js +1 -1
  26. package/dist/index.cjs149.js +1 -1
  27. package/dist/index.cjs150.js +1 -1
  28. package/dist/index.cjs151.js +1 -1
  29. package/dist/index.cjs152.js +1 -1
  30. package/dist/index.cjs153.js +1 -1
  31. package/dist/index.cjs155.js +1 -1
  32. package/dist/index.cjs156.js +1 -1
  33. package/dist/index.cjs157.js +1 -1
  34. package/dist/index.cjs158.js +1 -1
  35. package/dist/index.cjs159.js +1 -1
  36. package/dist/index.cjs16.js +1 -1
  37. package/dist/index.cjs160.js +1 -1
  38. package/dist/index.cjs161.js +1 -1
  39. package/dist/index.cjs162.js +1 -1
  40. package/dist/index.cjs163.js +1 -1
  41. package/dist/index.cjs166.js +1 -1
  42. package/dist/index.cjs167.js +1 -1
  43. package/dist/index.cjs169.js +1 -1
  44. package/dist/index.cjs17.js +1 -1
  45. package/dist/index.cjs170.js +1 -1
  46. package/dist/index.cjs171.js +1 -1
  47. package/dist/index.cjs172.js +1 -1
  48. package/dist/index.cjs173.js +1 -1
  49. package/dist/index.cjs174.js +1 -1
  50. package/dist/index.cjs175.js +1 -1
  51. package/dist/index.cjs176.js +1 -1
  52. package/dist/index.cjs18.js +1 -1
  53. package/dist/index.cjs182.js +1 -1
  54. package/dist/index.cjs183.js +1 -1
  55. package/dist/index.cjs184.js +1 -1
  56. package/dist/index.cjs185.js +1 -1
  57. package/dist/index.cjs186.js +1 -1
  58. package/dist/index.cjs19.js +1 -1
  59. package/dist/index.cjs2.js +1 -1
  60. package/dist/index.cjs2.js.map +1 -1
  61. package/dist/index.cjs20.js +1 -1
  62. package/dist/index.cjs205.js +1 -1
  63. package/dist/index.cjs205.js.map +1 -1
  64. package/dist/index.cjs206.js +1 -1
  65. package/dist/index.cjs206.js.map +1 -1
  66. package/dist/index.cjs207.js +1 -1
  67. package/dist/index.cjs207.js.map +1 -1
  68. package/dist/index.cjs208.js +1 -1
  69. package/dist/index.cjs208.js.map +1 -1
  70. package/dist/index.cjs209.js +1 -1
  71. package/dist/index.cjs209.js.map +1 -1
  72. package/dist/index.cjs21.js +1 -1
  73. package/dist/index.cjs210.js +1 -1
  74. package/dist/index.cjs210.js.map +1 -1
  75. package/dist/index.cjs211.js +1 -1
  76. package/dist/index.cjs211.js.map +1 -1
  77. package/dist/index.cjs212.js +1 -1
  78. package/dist/index.cjs212.js.map +1 -1
  79. package/dist/index.cjs213.js +1 -1
  80. package/dist/index.cjs213.js.map +1 -1
  81. package/dist/index.cjs214.js +1 -1
  82. package/dist/index.cjs214.js.map +1 -1
  83. package/dist/index.cjs215.js +1 -1
  84. package/dist/index.cjs215.js.map +1 -1
  85. package/dist/index.cjs216.js +1 -1
  86. package/dist/index.cjs216.js.map +1 -1
  87. package/dist/index.cjs217.js +1 -1
  88. package/dist/index.cjs217.js.map +1 -1
  89. package/dist/index.cjs218.js +1 -1
  90. package/dist/index.cjs218.js.map +1 -1
  91. package/dist/index.cjs219.js +1 -1
  92. package/dist/index.cjs219.js.map +1 -1
  93. package/dist/index.cjs22.js +1 -1
  94. package/dist/index.cjs220.js +1 -1
  95. package/dist/index.cjs220.js.map +1 -1
  96. package/dist/index.cjs221.js +1 -1
  97. package/dist/index.cjs221.js.map +1 -1
  98. package/dist/index.cjs222.js +1 -1
  99. package/dist/index.cjs222.js.map +1 -1
  100. package/dist/index.cjs223.js +1 -1
  101. package/dist/index.cjs223.js.map +1 -1
  102. package/dist/index.cjs224.js +1 -1
  103. package/dist/index.cjs224.js.map +1 -1
  104. package/dist/index.cjs225.js +1 -1
  105. package/dist/index.cjs225.js.map +1 -1
  106. package/dist/index.cjs226.js +1 -1
  107. package/dist/index.cjs226.js.map +1 -1
  108. package/dist/index.cjs227.js +1 -1
  109. package/dist/index.cjs227.js.map +1 -1
  110. package/dist/index.cjs228.js +1 -1
  111. package/dist/index.cjs228.js.map +1 -1
  112. package/dist/index.cjs229.js +1 -1
  113. package/dist/index.cjs229.js.map +1 -1
  114. package/dist/index.cjs23.js +1 -1
  115. package/dist/index.cjs230.js +1 -1
  116. package/dist/index.cjs230.js.map +1 -1
  117. package/dist/index.cjs231.js +1 -1
  118. package/dist/index.cjs231.js.map +1 -1
  119. package/dist/index.cjs232.js +1 -1
  120. package/dist/index.cjs232.js.map +1 -1
  121. package/dist/index.cjs233.js +1 -1
  122. package/dist/index.cjs233.js.map +1 -1
  123. package/dist/index.cjs234.js +1 -1
  124. package/dist/index.cjs234.js.map +1 -1
  125. package/dist/index.cjs235.js +1 -1
  126. package/dist/index.cjs235.js.map +1 -1
  127. package/dist/index.cjs236.js +1 -1
  128. package/dist/index.cjs236.js.map +1 -1
  129. package/dist/index.cjs237.js +1 -1
  130. package/dist/index.cjs237.js.map +1 -1
  131. package/dist/index.cjs238.js +1 -1
  132. package/dist/index.cjs238.js.map +1 -1
  133. package/dist/index.cjs239.js +1 -1
  134. package/dist/index.cjs239.js.map +1 -1
  135. package/dist/index.cjs24.js +1 -1
  136. package/dist/index.cjs242.js +1 -1
  137. package/dist/index.cjs243.js +1 -1
  138. package/dist/index.cjs243.js.map +1 -1
  139. package/dist/index.cjs244.js +1 -1
  140. package/dist/index.cjs244.js.map +1 -1
  141. package/dist/index.cjs245.js +1 -1
  142. package/dist/index.cjs245.js.map +1 -1
  143. package/dist/index.cjs246.js +1 -1
  144. package/dist/index.cjs246.js.map +1 -1
  145. package/dist/index.cjs25.js +1 -1
  146. package/dist/index.cjs254.js +1 -1
  147. package/dist/index.cjs258.js +1 -1
  148. package/dist/index.cjs259.js +1 -1
  149. package/dist/index.cjs26.js +1 -1
  150. package/dist/index.cjs262.js +1 -1
  151. package/dist/index.cjs266.js +1 -1
  152. package/dist/index.cjs266.js.map +1 -1
  153. package/dist/index.cjs267.js +1 -1
  154. package/dist/index.cjs267.js.map +1 -1
  155. package/dist/index.cjs268.js +1 -1
  156. package/dist/index.cjs268.js.map +1 -1
  157. package/dist/index.cjs27.js +1 -1
  158. package/dist/index.cjs38.js +1 -1
  159. package/dist/index.cjs40.js +1 -1
  160. package/dist/index.cjs42.js +1 -1
  161. package/dist/index.cjs43.js +1 -1
  162. package/dist/index.cjs44.js +1 -1
  163. package/dist/index.cjs46.js +1 -1
  164. package/dist/index.cjs47.js +1 -1
  165. package/dist/index.cjs48.js +1 -1
  166. package/dist/index.cjs50.js +1 -1
  167. package/dist/index.cjs51.js +1 -1
  168. package/dist/index.cjs52.js +1 -1
  169. package/dist/index.cjs56.js +1 -1
  170. package/dist/index.cjs57.js +1 -1
  171. package/dist/index.cjs58.js +1 -1
  172. package/dist/index.cjs60.js +1 -1
  173. package/dist/index.cjs61.js +1 -1
  174. package/dist/index.cjs63.js +1 -1
  175. package/dist/index.cjs88.js +1 -1
  176. package/dist/index.cjs95.js +1 -1
  177. package/dist/index.cjs96.js +1 -1
  178. package/dist/index.cjs97.js +1 -1
  179. package/dist/index.cjs98.js +1 -1
  180. package/dist/index.cjs99.js +1 -1
  181. package/dist/index.es100.js +1 -1
  182. package/dist/index.es101.js +1 -1
  183. package/dist/index.es102.js +1 -1
  184. package/dist/index.es103.js +1 -1
  185. package/dist/index.es106.js +1 -1
  186. package/dist/index.es107.js +1 -1
  187. package/dist/index.es109.js +3 -3
  188. package/dist/index.es110.js +1 -1
  189. package/dist/index.es111.js +2 -2
  190. package/dist/index.es112.js +1 -1
  191. package/dist/index.es117.js +1 -1
  192. package/dist/index.es118.js +1 -1
  193. package/dist/index.es119.js +1 -1
  194. package/dist/index.es120.js +1 -1
  195. package/dist/index.es123.js +2 -2
  196. package/dist/index.es124.js +2 -2
  197. package/dist/index.es125.js +1 -1
  198. package/dist/index.es129.js +2 -2
  199. package/dist/index.es13.js +65 -42
  200. package/dist/index.es13.js.map +1 -1
  201. package/dist/index.es132.js +1 -1
  202. package/dist/index.es136.js +1 -1
  203. package/dist/index.es139.js +1 -1
  204. package/dist/index.es147.js +1 -1
  205. package/dist/index.es148.js +1 -1
  206. package/dist/index.es149.js +1 -1
  207. package/dist/index.es150.js +2 -2
  208. package/dist/index.es151.js +1 -1
  209. package/dist/index.es152.js +1 -1
  210. package/dist/index.es153.js +1 -1
  211. package/dist/index.es155.js +2 -2
  212. package/dist/index.es156.js +2 -2
  213. package/dist/index.es157.js +1 -1
  214. package/dist/index.es158.js +1 -1
  215. package/dist/index.es159.js +1 -1
  216. package/dist/index.es16.js +4 -4
  217. package/dist/index.es160.js +1 -1
  218. package/dist/index.es161.js +2 -2
  219. package/dist/index.es162.js +2 -2
  220. package/dist/index.es163.js +1 -1
  221. package/dist/index.es166.js +2 -2
  222. package/dist/index.es167.js +2 -2
  223. package/dist/index.es169.js +2 -2
  224. package/dist/index.es17.js +3 -3
  225. package/dist/index.es170.js +1 -1
  226. package/dist/index.es171.js +2 -2
  227. package/dist/index.es172.js +1 -1
  228. package/dist/index.es173.js +2 -2
  229. package/dist/index.es174.js +1 -1
  230. package/dist/index.es175.js +1 -1
  231. package/dist/index.es176.js +1 -1
  232. package/dist/index.es18.js +3 -3
  233. package/dist/index.es182.js +1 -1
  234. package/dist/index.es183.js +2 -2
  235. package/dist/index.es184.js +1 -1
  236. package/dist/index.es185.js +1 -1
  237. package/dist/index.es186.js +1 -1
  238. package/dist/index.es19.js +1 -1
  239. package/dist/index.es2.js +7 -7
  240. package/dist/index.es2.js.map +1 -1
  241. package/dist/index.es20.js +1 -1
  242. package/dist/index.es205.js +242 -7
  243. package/dist/index.es205.js.map +1 -1
  244. package/dist/index.es206.js +42 -4
  245. package/dist/index.es206.js.map +1 -1
  246. package/dist/index.es207.js +3 -4
  247. package/dist/index.es207.js.map +1 -1
  248. package/dist/index.es208.js +11 -3
  249. package/dist/index.es208.js.map +1 -1
  250. package/dist/index.es209.js +11 -3
  251. package/dist/index.es209.js.map +1 -1
  252. package/dist/index.es21.js +1 -1
  253. package/dist/index.es210.js +30 -8
  254. package/dist/index.es210.js.map +1 -1
  255. package/dist/index.es211.js +13 -18
  256. package/dist/index.es211.js.map +1 -1
  257. package/dist/index.es212.js +4 -20
  258. package/dist/index.es212.js.map +1 -1
  259. package/dist/index.es213.js +6 -11
  260. package/dist/index.es213.js.map +1 -1
  261. package/dist/index.es214.js +4 -14
  262. package/dist/index.es214.js.map +1 -1
  263. package/dist/index.es215.js +4 -6
  264. package/dist/index.es215.js.map +1 -1
  265. package/dist/index.es216.js +3 -8
  266. package/dist/index.es216.js.map +1 -1
  267. package/dist/index.es217.js +3 -7
  268. package/dist/index.es217.js.map +1 -1
  269. package/dist/index.es218.js +8 -21
  270. package/dist/index.es218.js.map +1 -1
  271. package/dist/index.es219.js +17 -8
  272. package/dist/index.es219.js.map +1 -1
  273. package/dist/index.es22.js +1 -1
  274. package/dist/index.es220.js +21 -9
  275. package/dist/index.es220.js.map +1 -1
  276. package/dist/index.es221.js +13 -4
  277. package/dist/index.es221.js.map +1 -1
  278. package/dist/index.es222.js +14 -10
  279. package/dist/index.es222.js.map +1 -1
  280. package/dist/index.es223.js +5 -7
  281. package/dist/index.es223.js.map +1 -1
  282. package/dist/index.es224.js +6 -19
  283. package/dist/index.es224.js.map +1 -1
  284. package/dist/index.es225.js +6 -10
  285. package/dist/index.es225.js.map +1 -1
  286. package/dist/index.es226.js +20 -16
  287. package/dist/index.es226.js.map +1 -1
  288. package/dist/index.es227.js +10 -4
  289. package/dist/index.es227.js.map +1 -1
  290. package/dist/index.es228.js +9 -18
  291. package/dist/index.es228.js.map +1 -1
  292. package/dist/index.es229.js +4 -12
  293. package/dist/index.es229.js.map +1 -1
  294. package/dist/index.es23.js +1 -1
  295. package/dist/index.es230.js +10 -3
  296. package/dist/index.es230.js.map +1 -1
  297. package/dist/index.es231.js +7 -4
  298. package/dist/index.es231.js.map +1 -1
  299. package/dist/index.es232.js +20 -242
  300. package/dist/index.es232.js.map +1 -1
  301. package/dist/index.es233.js +9 -41
  302. package/dist/index.es233.js.map +1 -1
  303. package/dist/index.es234.js +18 -3
  304. package/dist/index.es234.js.map +1 -1
  305. package/dist/index.es235.js +3 -10
  306. package/dist/index.es235.js.map +1 -1
  307. package/dist/index.es236.js +17 -10
  308. package/dist/index.es236.js.map +1 -1
  309. package/dist/index.es237.js +11 -30
  310. package/dist/index.es237.js.map +1 -1
  311. package/dist/index.es238.js +3 -13
  312. package/dist/index.es238.js.map +1 -1
  313. package/dist/index.es239.js +4 -4
  314. package/dist/index.es239.js.map +1 -1
  315. package/dist/index.es24.js +1 -1
  316. package/dist/index.es242.js +1 -1
  317. package/dist/index.es243.js +19 -6
  318. package/dist/index.es243.js.map +1 -1
  319. package/dist/index.es244.js +22 -5
  320. package/dist/index.es244.js.map +1 -1
  321. package/dist/index.es245.js +4 -19
  322. package/dist/index.es245.js.map +1 -1
  323. package/dist/index.es246.js +7 -22
  324. package/dist/index.es246.js.map +1 -1
  325. package/dist/index.es25.js +1 -1
  326. package/dist/index.es254.js +1 -1
  327. package/dist/index.es258.js +1 -1
  328. package/dist/index.es259.js +2 -2
  329. package/dist/index.es26.js +2 -2
  330. package/dist/index.es262.js +1 -1
  331. package/dist/index.es266.js +15 -4
  332. package/dist/index.es266.js.map +1 -1
  333. package/dist/index.es267.js +4 -69
  334. package/dist/index.es267.js.map +1 -1
  335. package/dist/index.es268.js +69 -15
  336. package/dist/index.es268.js.map +1 -1
  337. package/dist/index.es27.js +2 -2
  338. package/dist/index.es38.js +1 -1
  339. package/dist/index.es40.js +2 -2
  340. package/dist/index.es42.js +2 -2
  341. package/dist/index.es43.js +2 -2
  342. package/dist/index.es44.js +2 -2
  343. package/dist/index.es46.js +1 -1
  344. package/dist/index.es47.js +2 -2
  345. package/dist/index.es48.js +2 -2
  346. package/dist/index.es50.js +1 -1
  347. package/dist/index.es51.js +1 -1
  348. package/dist/index.es52.js +1 -1
  349. package/dist/index.es56.js +2 -2
  350. package/dist/index.es57.js +3 -3
  351. package/dist/index.es58.js +1 -1
  352. package/dist/index.es60.js +1 -1
  353. package/dist/index.es61.js +1 -1
  354. package/dist/index.es63.js +1 -1
  355. package/dist/index.es88.js +1 -1
  356. package/dist/index.es95.js +1 -1
  357. package/dist/index.es96.js +1 -1
  358. package/dist/index.es97.js +1 -1
  359. package/dist/index.es98.js +1 -1
  360. package/dist/index.es99.js +1 -1
  361. package/package.json +1 -1
  362. package/src/components/CertaintyLayer.js +10 -4
  363. package/src/utils/Map.js +36 -27
  364. package/types/components/CertaintyLayer.js.flow +10 -4
  365. package/types/utils/Map.js.flow +36 -27
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs205.js"),t=s("Symbol");module.exports=t;
1
+ "use strict";const s=require("./index.cjs213.js"),t=s("Symbol");module.exports=t;
2
2
  //# sourceMappingURL=index.cjs100.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index.cjs205.js"),e=r("ArrayBuffer");module.exports=e;
1
+ "use strict";const r=require("./index.cjs213.js"),e=r("ArrayBuffer");module.exports=e;
2
2
  //# sourceMappingURL=index.cjs101.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs205.js"),r=require("./index.cjs38.js"),a=require("./index.cjs101.js"),i=require("./index.cjs39.js");var s=t("DataView");function n(e){return e!=null&&r(e.getInt8)&&a(e.buffer)}const u=i.hasDataViewBug?n:s;module.exports=u;
1
+ "use strict";const t=require("./index.cjs213.js"),r=require("./index.cjs38.js"),a=require("./index.cjs101.js"),i=require("./index.cjs39.js");var s=t("DataView");function n(e){return e!=null&&r(e.getInt8)&&a(e.buffer)}const u=i.hasDataViewBug?n:s;module.exports=u;
2
2
  //# sourceMappingURL=index.cjs102.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index.cjs37.js"),e=require("./index.cjs205.js"),s=r.nativeIsArray||e("Array");module.exports=s;
1
+ "use strict";const r=require("./index.cjs37.js"),e=require("./index.cjs213.js"),s=r.nativeIsArray||e("Array");module.exports=s;
2
2
  //# sourceMappingURL=index.cjs103.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs37.js"),r=require("./index.cjs102.js"),i=require("./index.cjs127.js"),s=require("./index.cjs207.js");var n=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function a(t){return e.nativeIsView?e.nativeIsView(t)&&!r(t):s(t)&&n.test(e.toString.call(t))}const u=e.supportsArrayBuffer?a:i(!1);module.exports=u;
1
+ "use strict";const e=require("./index.cjs37.js"),r=require("./index.cjs102.js"),i=require("./index.cjs127.js"),s=require("./index.cjs215.js");var n=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function a(t){return e.nativeIsView?e.nativeIsView(t)&&!r(t):s(t)&&n.test(e.toString.call(t))}const u=e.supportsArrayBuffer?a:i(!1);module.exports=u;
2
2
  //# sourceMappingURL=index.cjs106.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs208.js"),n=require("./index.cjs103.js"),i=require("./index.cjs95.js"),s=require("./index.cjs40.js"),u=require("./index.cjs111.js");function c(r){if(r==null)return!0;var e=t(r);return typeof e=="number"&&(n(r)||i(r)||s(r))?e===0:t(u(r))===0}module.exports=c;
1
+ "use strict";const t=require("./index.cjs216.js"),n=require("./index.cjs103.js"),i=require("./index.cjs95.js"),s=require("./index.cjs40.js"),u=require("./index.cjs111.js");function c(r){if(r==null)return!0;var e=t(r);return typeof e=="number"&&(n(r)||i(r)||s(r))?e===0:t(u(r))===0}module.exports=c;
2
2
  //# sourceMappingURL=index.cjs107.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const h=require("./index.cjs41.js"),l=require("./index.cjs37.js"),j=require("./index.cjs209.js"),m=require("./index.cjs106.js"),q=require("./index.cjs38.js"),D=require("./index.cjs39.js"),y=require("./index.cjs102.js"),w=require("./index.cjs111.js"),O=require("./index.cjs206.js"),v=require("./index.cjs210.js");var B="[object DataView]";function p(e,r,n,u){if(e===r)return e!==0||1/e===1/r;if(e==null||r==null)return!1;if(e!==e)return r!==r;var i=typeof e;return i!=="function"&&i!=="object"&&typeof r!="object"?!1:_(e,r,n,u)}function _(e,r,n,u){e instanceof h&&(e=e._wrapped),r instanceof h&&(r=r._wrapped);var i=l.toString.call(e);if(i!==l.toString.call(r))return!1;if(D.hasDataViewBug&&i=="[object Object]"&&y(e)){if(!y(r))return!1;i=B}switch(i){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:+e==0?1/+e===1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return l.SymbolProto.valueOf.call(e)===l.SymbolProto.valueOf.call(r);case"[object ArrayBuffer]":case B:return _(v(e),v(r),n,u)}var f=i==="[object Array]";if(!f&&m(e)){var d=j(e);if(d!==j(r))return!1;if(e.buffer===r.buffer&&e.byteOffset===r.byteOffset)return!0;f=!0}if(!f){if(typeof e!="object"||typeof r!="object")return!1;var s=e.constructor,o=r.constructor;if(s!==o&&!(q(s)&&s instanceof s&&q(o)&&o instanceof o)&&"constructor"in e&&"constructor"in r)return!1}n=n||[],u=u||[];for(var t=n.length;t--;)if(n[t]===e)return u[t]===r;if(n.push(e),u.push(r),f){if(t=e.length,t!==r.length)return!1;for(;t--;)if(!p(e[t],r[t],n,u))return!1}else{var g=w(e),c;if(t=g.length,w(r).length!==t)return!1;for(;t--;)if(c=g[t],!(O(r,c)&&p(e[c],r[c],n,u)))return!1}return n.pop(),u.pop(),!0}function V(e,r){return p(e,r)}module.exports=V;
1
+ "use strict";const h=require("./index.cjs41.js"),l=require("./index.cjs37.js"),j=require("./index.cjs217.js"),m=require("./index.cjs106.js"),q=require("./index.cjs38.js"),D=require("./index.cjs39.js"),y=require("./index.cjs102.js"),w=require("./index.cjs111.js"),O=require("./index.cjs214.js"),v=require("./index.cjs218.js");var B="[object DataView]";function p(e,r,n,u){if(e===r)return e!==0||1/e===1/r;if(e==null||r==null)return!1;if(e!==e)return r!==r;var i=typeof e;return i!=="function"&&i!=="object"&&typeof r!="object"?!1:_(e,r,n,u)}function _(e,r,n,u){e instanceof h&&(e=e._wrapped),r instanceof h&&(r=r._wrapped);var i=l.toString.call(e);if(i!==l.toString.call(r))return!1;if(D.hasDataViewBug&&i=="[object Object]"&&y(e)){if(!y(r))return!1;i=B}switch(i){case"[object RegExp]":case"[object String]":return""+e==""+r;case"[object Number]":return+e!=+e?+r!=+r:+e==0?1/+e===1/r:+e==+r;case"[object Date]":case"[object Boolean]":return+e==+r;case"[object Symbol]":return l.SymbolProto.valueOf.call(e)===l.SymbolProto.valueOf.call(r);case"[object ArrayBuffer]":case B:return _(v(e),v(r),n,u)}var f=i==="[object Array]";if(!f&&m(e)){var d=j(e);if(d!==j(r))return!1;if(e.buffer===r.buffer&&e.byteOffset===r.byteOffset)return!0;f=!0}if(!f){if(typeof e!="object"||typeof r!="object")return!1;var s=e.constructor,o=r.constructor;if(s!==o&&!(q(s)&&s instanceof s&&q(o)&&o instanceof o)&&"constructor"in e&&"constructor"in r)return!1}n=n||[],u=u||[];for(var t=n.length;t--;)if(n[t]===e)return u[t]===r;if(n.push(e),u.push(r),f){if(t=e.length,t!==r.length)return!1;for(;t--;)if(!p(e[t],r[t],n,u))return!1}else{var g=w(e),c;if(t=g.length,w(r).length!==t)return!1;for(;t--;)if(c=g[t],!(O(r,c)&&p(e[c],r[c],n,u)))return!1}return n.pop(),u.pop(),!0}function V(e,r){return p(e,r)}module.exports=V;
2
2
  //# sourceMappingURL=index.cjs109.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs205.js"),t=e("WeakSet");module.exports=t;
1
+ "use strict";const e=require("./index.cjs213.js"),t=e("WeakSet");module.exports=t;
2
2
  //# sourceMappingURL=index.cjs110.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs90.js"),s=require("./index.cjs37.js"),i=require("./index.cjs206.js"),u=require("./index.cjs212.js");function c(e){if(!n(e))return[];if(s.nativeKeys)return s.nativeKeys(e);var r=[];for(var t in e)i(e,t)&&r.push(t);return s.hasEnumBug&&u(e,r),r}module.exports=c;
1
+ "use strict";const n=require("./index.cjs90.js"),s=require("./index.cjs37.js"),i=require("./index.cjs214.js"),u=require("./index.cjs220.js");function c(e){if(!n(e))return[];if(s.nativeKeys)return s.nativeKeys(e);var r=[];for(var t in e)i(e,t)&&r.push(t);return s.hasEnumBug&&u(e,r),r}module.exports=c;
2
2
  //# sourceMappingURL=index.cjs111.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs90.js"),u=require("./index.cjs37.js"),n=require("./index.cjs212.js");function i(r){if(!t(r))return[];var e=[];for(var s in r)e.push(s);return u.hasEnumBug&&n(r,e),e}module.exports=i;
1
+ "use strict";const t=require("./index.cjs90.js"),u=require("./index.cjs37.js"),n=require("./index.cjs220.js");function i(r){if(!t(r))return[];var e=[];for(var s in r)e.push(s);return u.hasEnumBug&&n(r,e),e}module.exports=i;
2
2
  //# sourceMappingURL=index.cjs112.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs213.js"),s=require("./index.cjs112.js"),r=e(s);module.exports=r;
1
+ "use strict";const e=require("./index.cjs221.js"),s=require("./index.cjs112.js"),r=e(s);module.exports=r;
2
2
  //# sourceMappingURL=index.cjs117.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs213.js"),s=require("./index.cjs111.js"),r=e(s);module.exports=r;
1
+ "use strict";const e=require("./index.cjs221.js"),s=require("./index.cjs111.js"),r=e(s);module.exports=r;
2
2
  //# sourceMappingURL=index.cjs118.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs213.js"),s=require("./index.cjs112.js"),r=e(s,!0);module.exports=r;
1
+ "use strict";const e=require("./index.cjs221.js"),s=require("./index.cjs112.js"),r=e(s,!0);module.exports=r;
2
2
  //# sourceMappingURL=index.cjs119.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs214.js"),s=require("./index.cjs118.js");function u(t,e){var r=n(t);return e&&s(r,e),r}module.exports=u;
1
+ "use strict";const n=require("./index.cjs222.js"),s=require("./index.cjs118.js");function u(t,e){var r=n(t);return e&&s(r,e),r}module.exports=u;
2
2
  //# sourceMappingURL=index.cjs120.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const i=require("./index.cjs215.js"),s=require("./index.cjs216.js"),u=require("./index.cjs92.js");function o(t,r,n){var e=s(t,i(r));return u(e)?n:e}module.exports=o;
1
+ "use strict";const i=require("./index.cjs223.js"),s=require("./index.cjs224.js"),u=require("./index.cjs92.js");function o(t,r,n){var e=s(t,i(r));return u(e)?n:e}module.exports=o;
2
2
  //# sourceMappingURL=index.cjs123.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const u=require("./index.cjs206.js"),a=require("./index.cjs215.js");function c(e,r){r=a(r);for(var n=r.length,t=0;t<n;t++){var s=r[t];if(!u(e,s))return!1;e=e[s]}return!!n}module.exports=c;
1
+ "use strict";const u=require("./index.cjs214.js"),a=require("./index.cjs223.js");function c(e,r){r=a(r);for(var n=r.length,t=0;t<n;t++){var s=r[t];if(!u(e,s))return!1;e=e[s]}return!!n}module.exports=c;
2
2
  //# sourceMappingURL=index.cjs124.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const v=require("./index.cjs217.js"),a=require("./index.cjs111.js");function f(s,r,n){r=v(r,n);for(var u=a(s),o=u.length,l={},t=0;t<o;t++){var c=u[t];l[c]=r(s[c],c,s)}return l}module.exports=f;
1
+ "use strict";const v=require("./index.cjs225.js"),a=require("./index.cjs111.js");function f(s,r,n){r=v(r,n);for(var u=a(s),o=u.length,l={},t=0;t<o;t++){var c=u[t];l[c]=r(s[c],c,s)}return l}module.exports=f;
2
2
  //# sourceMappingURL=index.cjs125.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs216.js"),n=require("./index.cjs215.js");function o(e){return e=n(e),function(r){return t(r,e)}}module.exports=o;
1
+ "use strict";const t=require("./index.cjs224.js"),n=require("./index.cjs223.js");function o(e){return e=n(e),function(r){return t(r,e)}}module.exports=o;
2
2
  //# sourceMappingURL=index.cjs129.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const f=require("./index.cjs68.js"),s=require("./index.cjs69.js"),d=require("./index.cjs70.js"),y=require("./index.cjs71.js"),m=require("./index.cjs72.js"),u=require("./index.cjs67.js"),l=require("./index.cjs36.js");require("./index.cjs37.js");require("./index.cjs38.js");require("./index.cjs39.js");require("./index.cjs40.js");require("./index.cjs41.js");require("./index.cjs42.js");require("./index.cjs43.js");require("./index.cjs44.js");require("./index.cjs45.js");require("./index.cjs46.js");require("./index.cjs47.js");require("./index.cjs48.js");require("./index.cjs49.js");require("./index.cjs50.js");require("./index.cjs51.js");require("./index.cjs52.js");require("./index.cjs53.js");require("./index.cjs54.js");require("./index.cjs55.js");require("./index.cjs56.js");require("./index.cjs57.js");require("./index.cjs58.js");require("./index.cjs59.js");require("./index.cjs60.js");require("./index.cjs61.js");require("./index.cjs62.js");require("./index.cjs63.js");const p=-90,g=90,x=-180,L=180,n=(e,i)=>m.default(e.coordinates,i,{units:"kilometers",steps:32}),_=(e,i)=>{const t=[];for(const r of e)if(i(r))if(r.geometry?.type==="FeatureCollection")for(const o of r.geometry.features)o.geometry?.type==="Point"&&t.push(n(o.geometry,i(r)));else if(r.geometry.type==="GeometryCollection")for(const o of r.geometry.geometries)o.type==="Point"&&t.push(n(o,i(r)));else r.geometry?.type==="Point"&&t.push(n(r.geometry,i(r)));return u.featureCollection(t)},b=(e,i,t={})=>{const r=new f.WarpedMapLayer(i);e.addLayer(r),t.url?r.addGeoreferenceAnnotationByUrl(t.url):t.manifest&&r.addGeoreferenceAnnotation(t.manifest),t.opacity&&r.setOpacity(t.opacity)},M=(e,i=null)=>{const t=s.bbox(e);if(!a(t))return null;const r=d.bboxPolygon(t);let o;return i?o=y.buffer(r,i,{units:"miles"}):o=r,s.bbox(o)},I=(e,i)=>e&&e.removeLayer(i),v=(e,i,t,r)=>{const o={id:e.record_id,ccode:[],title:e.name,uuid:e.uuid,record_id:e.record_id,name:e.name,names:e.names?.map(q=>({toponym:q})),type:e.type,items:[i],url:e.url,originalProperties:r||{}},c=parseInt(e.record_id,10);return u.feature(t,o,{id:c})},A=e=>u.featureCollection(e),a=e=>l.every(e,l.isFinite),B=e=>{let i=!1;if(e){const[t,r]=e;i=t>=p&&t<=g&&r>=x&&r<=L}return i},C={addGeoreferenceLayer:b,getCertaintyCircles:_,getBoundingBox:M,removeLayer:I,toFeature:v,toFeatureCollection:A,validateBoundingBox:a,validateCoordinates:B};module.exports=C;
1
+ "use strict";const y=require("./index.cjs68.js"),s=require("./index.cjs69.js"),d=require("./index.cjs70.js"),f=require("./index.cjs71.js"),p=require("./index.cjs72.js"),a=require("./index.cjs67.js"),l=require("./index.cjs36.js");require("./index.cjs37.js");require("./index.cjs38.js");require("./index.cjs39.js");require("./index.cjs40.js");require("./index.cjs41.js");require("./index.cjs42.js");require("./index.cjs43.js");require("./index.cjs44.js");require("./index.cjs45.js");require("./index.cjs46.js");require("./index.cjs47.js");require("./index.cjs48.js");require("./index.cjs49.js");require("./index.cjs50.js");require("./index.cjs51.js");require("./index.cjs52.js");require("./index.cjs53.js");require("./index.cjs54.js");require("./index.cjs55.js");require("./index.cjs56.js");require("./index.cjs57.js");require("./index.cjs58.js");require("./index.cjs59.js");require("./index.cjs60.js");require("./index.cjs61.js");require("./index.cjs62.js");require("./index.cjs63.js");const g=-90,m=90,x=-180,L=180,u=(e,i)=>p.default(e.coordinates,i,{units:"kilometers",steps:32}),_=(e,i)=>{if(e.geometry?.type==="FeatureCollection"){let r=[];for(const t of e.geometry.features)if(t.geometry?.type==="Point"){const{geometry:n,type:o}=u(t.geometry,i);r.push({...t,geometry:n,type:o})}return{...e,geometry:{type:"GeometryCollection",geometries:r}}}else{if(e?.type==="GeometryCollection")return{...e,geometries:e.geometries.map(r=>r.type==="Point"?u(r,i):r)};if(e.geometry?.type==="Point"){const{geometry:r,type:t}=u(e.geometry,i);return{...e,geometry:r,type:t}}}return e},b=(e,i,r={})=>{const t=new y.WarpedMapLayer(i);e.addLayer(t),r.url?t.addGeoreferenceAnnotationByUrl(r.url):r.manifest&&t.addGeoreferenceAnnotation(r.manifest),r.opacity&&t.setOpacity(r.opacity)},C=(e,i=null)=>{const r=s.bbox(e);if(!c(r))return null;const t=d.bboxPolygon(r);let n;return i?n=f.buffer(t,i,{units:"miles"}):n=t,s.bbox(n)},M=(e,i)=>e&&e.removeLayer(i),G=(e,i,r,t)=>{const n={id:e.record_id,ccode:[],title:e.name,uuid:e.uuid,record_id:e.record_id,name:e.name,names:e.names?.map(q=>({toponym:q})),type:e.type,items:[i],url:e.url,originalProperties:t||{}},o=parseInt(e.record_id,10);return a.feature(r,n,{id:o})},I=e=>a.featureCollection(e),c=e=>l.every(e,l.isFinite),v=e=>{let i=!1;if(e){const[r,t]=e;i=r>=g&&r<=m&&t>=x&&t<=L}return i},A={addGeoreferenceLayer:b,toCertaintyCircle:_,getBoundingBox:C,removeLayer:M,toFeature:G,toFeatureCollection:I,validateBoundingBox:c,validateCoordinates:v};module.exports=A;
2
2
  //# sourceMappingURL=index.cjs13.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs13.js","sources":["../src/utils/Map.js"],"sourcesContent":["// @flow\n\nimport { WarpedMapLayer } from '@allmaps/maplibre';\nimport {\n bbox,\n bboxPolygon,\n buffer,\n feature,\n featureCollection\n} from '@turf/turf';\nimport _ from 'underscore';\nimport circle from '@turf/circle';\n\nconst MIN_LATITUDE = -90;\nconst MAX_LATITUDE = 90;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n\n/**\n * Returns a GeoJSON circle feature with the given center point and radius.\n * @param point - The center point of the circle.\n * @param radius - The radius of the circle in kilometers.\n * @returns {Feature<Geometry, Properties>} - The GeoJSON circle feature.\n */\nconst buildCircle = (point, radius) => (\n circle(point.coordinates, radius, { units: 'kilometers', steps: 32 })\n);\n\n/**\n * Returns a GeoJSON feature collection containing circles for each item in the given array.\n */\nconst getCertaintyCircles = (\n items,\n getCertaintyRadius: (item: any) => number | undefined\n) => {\n const features = [];\n\n for (const item of items) {\n if (getCertaintyRadius(item)) {\n if (item.geometry?.type === 'FeatureCollection') {\n for (const childFeature of item.geometry.features) {\n if (childFeature.geometry?.type === 'Point') {\n features.push(buildCircle(childFeature.geometry, getCertaintyRadius(item)));\n }\n }\n } else if (item.geometry.type === 'GeometryCollection') {\n for (const geometry of item.geometry.geometries) {\n if (geometry.type === 'Point') {\n features.push(buildCircle(geometry, getCertaintyRadius(item)));\n }\n }\n } else if (item.geometry?.type === 'Point') {\n features.push(buildCircle(item.geometry, getCertaintyRadius(item)));\n }\n }\n }\n\n return featureCollection(features);\n};\n\n/**\n * Adds the geo-referenced image layer to the passed map.\n *\n * @param map\n * @param layerId\n * @param options\n */\nconst addGeoreferenceLayer = (map, layerId, options = {}) => {\n const warpedMapLayer = new WarpedMapLayer(layerId);\n map.addLayer(warpedMapLayer);\n\n if (options.url) {\n warpedMapLayer.addGeoreferenceAnnotationByUrl(options.url);\n } else if (options.manifest) {\n warpedMapLayer.addGeoreferenceAnnotation(options.manifest);\n }\n\n if (options.opacity) {\n warpedMapLayer.setOpacity(options.opacity);\n }\n};\n\n/**\n * Returns a bounding box for the passed geometry (with optional buffer).\n *\n * @param data\n * @param bufferDistance\n *\n * @returns {BBox}\n */\nconst getBoundingBox = (data, bufferDistance = null) => {\n // Convert the GeoJSON into a bounding box\n const box = bbox(data);\n\n if (!validateBoundingBox(box)) {\n return null;\n }\n\n // Convert the bounding box to a polygon\n const polygon = bboxPolygon(box);\n\n // Create a buffer around the polygon (if a distance is provided)\n let polygonBuffer;\n\n if (bufferDistance) {\n polygonBuffer = buffer(polygon, bufferDistance, { units: 'miles' });\n } else {\n polygonBuffer = polygon;\n }\n\n // Convert the buffer to a bounding box\n return bbox(polygonBuffer);\n};\n\n/**\n * Removes a layer from the passed map.\n *\n * @param map\n * @param layerId\n *\n * @returns {*}\n */\nconst removeLayer = (map, layerId) => map && map.removeLayer(layerId);\n\n/**\n * Wraps the passed record in a feature.\n *\n * @param record\n * @param item\n * @param geometry\n * @param originalProperties\n *\n * @returns {Feature<Geometry, {\n * id: *,\n * ccode: [],\n * title: *,\n * uuid: *,\n * record_id: *,\n * name: *,\n * names: *,\n * type: *,\n * items: [*],\n * url: *\n * }>}\n */\nconst toFeature = (record: any, item: any, geometry: any, originalProperties?: any) => {\n const properties = {\n id: record.record_id,\n ccode: [],\n title: record.name,\n uuid: record.uuid,\n record_id: record.record_id,\n name: record.name,\n names: record.names?.map((toponym: string) => ({ toponym })),\n type: record.type,\n items: [item],\n url: record.url,\n originalProperties: originalProperties || {}\n };\n\n const id = parseInt(record.record_id, 10);\n return feature(geometry, properties, { id });\n};\n\n/**\n * Returns a feature collection for the passed set of features.\n *\n * @param features\n *\n * @returns {FeatureCollection<Geometry, GeoJsonProperties>}\n */\nconst toFeatureCollection = (features: Array<any>) => featureCollection(features);\n\n/**\n * Validates that the passed bounding box contains finite coordinates.\n *\n * @param boundingBox\n *\n * @returns {*}\n */\nconst validateBoundingBox = (boundingBox: Array<number>) => _.every(boundingBox, _.isFinite);\n\n/**\n * Returns true if the passed coordinates are valid.\n *\n * @param coordinates\n *\n * @returns {boolean}\n */\nconst validateCoordinates = (coordinates) => {\n let valid = false;\n\n if (coordinates) {\n const [latitude, longitude] = coordinates;\n\n valid = latitude >= MIN_LATITUDE\n && latitude <= MAX_LATITUDE\n && longitude >= MIN_LONGITUDE\n && longitude <= MAX_LONGITUDE;\n }\n\n return valid;\n};\n\nexport default {\n addGeoreferenceLayer,\n getCertaintyCircles,\n getBoundingBox,\n removeLayer,\n toFeature,\n toFeatureCollection,\n validateBoundingBox,\n validateCoordinates\n};\n"],"names":["MIN_LATITUDE","MAX_LATITUDE","MIN_LONGITUDE","MAX_LONGITUDE","buildCircle","point","radius","circle","getCertaintyCircles","items","getCertaintyRadius","features","item","childFeature","geometry","featureCollection","addGeoreferenceLayer","map","layerId","options","warpedMapLayer","WarpedMapLayer","getBoundingBox","data","bufferDistance","box","bbox","validateBoundingBox","polygon","bboxPolygon","polygonBuffer","buffer","removeLayer","toFeature","record","originalProperties","properties","toponym","id","feature","toFeatureCollection","boundingBox","_","validateCoordinates","coordinates","valid","latitude","longitude","MapUtils"],"mappings":"y9BAaA,MAAMA,EAAe,IACfC,EAAe,GACfC,EAAgB,KAChBC,EAAgB,IAQhBC,EAAc,CAACC,EAAOC,IAC1BC,EAAAA,QAAOF,EAAM,YAAaC,EAAQ,CAAE,MAAO,aAAc,MAAO,GAAI,EAMhEE,EAAsB,CAC1BC,EACAC,IACG,CACH,MAAMC,EAAW,CAAA,EAEjB,UAAWC,KAAQH,EACjB,GAAIC,EAAmBE,CAAI,EACzB,GAAIA,EAAK,UAAU,OAAS,oBAC1B,UAAWC,KAAgBD,EAAK,SAAS,SACnCC,EAAa,UAAU,OAAS,SAClCF,EAAS,KAAKP,EAAYS,EAAa,SAAU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O,CAACtB,CAAI,EACZ,IAAKsB,EAAO,IACZ,mBAAoBC,GAAsB,CAAA,CAAC,EAGvCG,EAAK,SAASJ,EAAO,UAAW,EAAE,EACxC,OAAOK,EAAAA,QAAQzB,EAAUsB,EAAY,CAAE,GAAAE,EAAI,CAC7C,EASME,EAAuB7B,GAAyBI,EAAAA,kBAAkBJ,CAAQ,EAS1EgB,EAAuBc,GAA+BC,EAAE,MAAMD,EAAaC,EAAE,QAAQ,EASrFC,EAAuBC,GAAgB,CAC3C,IAAIC,EAAQ,GAEZ,GAAID,EAAa,CACf,KAAM,CAACE,EAAUC,CAAS,EAAIH,EAE9BC,EAAQC,GAAY9C,GACf8C,GAAY7C,GACZ8C,GAAa7C,GACb6C,GAAa5C,CACpB,CAEA,OAAO0C,CACT,EAEAG,EAAe,CACb,qBAAAhC,EACA,oBAAAR,EACA,eAAAc,EACA,YAAAU,EACA,UAAAC,EACA,oBAAAO,EACA,oBAAAb,EACA,oBAAAgB,CACF"}
1
+ {"version":3,"file":"index.cjs13.js","sources":["../src/utils/Map.js"],"sourcesContent":["// @flow\n\nimport { WarpedMapLayer } from '@allmaps/maplibre';\nimport {\n bbox,\n bboxPolygon,\n buffer,\n feature,\n featureCollection\n} from '@turf/turf';\nimport _ from 'underscore';\nimport circle from '@turf/circle';\n\nconst MIN_LATITUDE = -90;\nconst MAX_LATITUDE = 90;\nconst MIN_LONGITUDE = -180;\nconst MAX_LONGITUDE = 180;\n\n/**\n * Returns a GeoJSON circle feature with the given center point and radius.\n * @param point - The center point of the circle.\n * @param radius - The radius of the circle in kilometers.\n * @returns {Feature<Geometry, Properties>} - The GeoJSON circle feature.\n */\nconst buildCircle = (point, radius) => (\n circle(point.coordinates, radius, { units: 'kilometers', steps: 32 })\n);\n\nconst toCertaintyCircle = (item, radius: number) => {\n if (item.geometry?.type === 'FeatureCollection') {\n let children = [];\n\n for (const childFeature of item.geometry.features) {\n if (childFeature.geometry?.type === 'Point') {\n const { geometry, type } = buildCircle(childFeature.geometry, radius);\n children.push({\n ...childFeature,\n geometry,\n type\n });\n }\n }\n\n return {\n ...item,\n geometry: {\n type: 'GeometryCollection',\n geometries: children\n }\n };\n } else if (item?.type === 'GeometryCollection') {\n return {\n ...item,\n geometries: item.geometries.map((geometry) => geometry.type === 'Point'\n ? buildCircle(geometry, radius)\n : geometry)\n };\n } else if (item.geometry?.type === 'Point') {\n const { geometry, type } = buildCircle(item.geometry, radius);\n return {\n ...item,\n geometry,\n type\n };\n }\n\n return item;\n};\n\n/**\n * Adds the geo-referenced image layer to the passed map.\n *\n * @param map\n * @param layerId\n * @param options\n */\nconst addGeoreferenceLayer = (map, layerId, options = {}) => {\n const warpedMapLayer = new WarpedMapLayer(layerId);\n map.addLayer(warpedMapLayer);\n\n if (options.url) {\n warpedMapLayer.addGeoreferenceAnnotationByUrl(options.url);\n } else if (options.manifest) {\n warpedMapLayer.addGeoreferenceAnnotation(options.manifest);\n }\n\n if (options.opacity) {\n warpedMapLayer.setOpacity(options.opacity);\n }\n};\n\n/**\n * Returns a bounding box for the passed geometry (with optional buffer).\n *\n * @param data\n * @param bufferDistance\n *\n * @returns {BBox}\n */\nconst getBoundingBox = (data, bufferDistance = null) => {\n // Convert the GeoJSON into a bounding box\n const box = bbox(data);\n\n if (!validateBoundingBox(box)) {\n return null;\n }\n\n // Convert the bounding box to a polygon\n const polygon = bboxPolygon(box);\n\n // Create a buffer around the polygon (if a distance is provided)\n let polygonBuffer;\n\n if (bufferDistance) {\n polygonBuffer = buffer(polygon, bufferDistance, { units: 'miles' });\n } else {\n polygonBuffer = polygon;\n }\n\n // Convert the buffer to a bounding box\n return bbox(polygonBuffer);\n};\n\n/**\n * Removes a layer from the passed map.\n *\n * @param map\n * @param layerId\n *\n * @returns {*}\n */\nconst removeLayer = (map, layerId) => map && map.removeLayer(layerId);\n\n/**\n * Wraps the passed record in a feature.\n *\n * @param record\n * @param item\n * @param geometry\n * @param originalProperties\n *\n * @returns {Feature<Geometry, {\n * id: *,\n * ccode: [],\n * title: *,\n * uuid: *,\n * record_id: *,\n * name: *,\n * names: *,\n * type: *,\n * items: [*],\n * url: *\n * }>}\n */\nconst toFeature = (record: any, item: any, geometry: any, originalProperties?: any) => {\n const properties = {\n id: record.record_id,\n ccode: [],\n title: record.name,\n uuid: record.uuid,\n record_id: record.record_id,\n name: record.name,\n names: record.names?.map((toponym: string) => ({ toponym })),\n type: record.type,\n items: [item],\n url: record.url,\n originalProperties: originalProperties || {}\n };\n\n const id = parseInt(record.record_id, 10);\n return feature(geometry, properties, { id });\n};\n\n/**\n * Returns a feature collection for the passed set of features.\n *\n * @param features\n *\n * @returns {FeatureCollection<Geometry, GeoJsonProperties>}\n */\nconst toFeatureCollection = (features: Array<any>) => featureCollection(features);\n\n/**\n * Validates that the passed bounding box contains finite coordinates.\n *\n * @param boundingBox\n *\n * @returns {*}\n */\nconst validateBoundingBox = (boundingBox: Array<number>) => _.every(boundingBox, _.isFinite);\n\n/**\n * Returns true if the passed coordinates are valid.\n *\n * @param coordinates\n *\n * @returns {boolean}\n */\nconst validateCoordinates = (coordinates) => {\n let valid = false;\n\n if (coordinates) {\n const [latitude, longitude] = coordinates;\n\n valid = latitude >= MIN_LATITUDE\n && latitude <= MAX_LATITUDE\n && longitude >= MIN_LONGITUDE\n && longitude <= MAX_LONGITUDE;\n }\n\n return valid;\n};\n\nexport default {\n addGeoreferenceLayer,\n toCertaintyCircle,\n getBoundingBox,\n removeLayer,\n toFeature,\n toFeatureCollection,\n validateBoundingBox,\n validateCoordinates\n};\n"],"names":["MIN_LATITUDE","MAX_LATITUDE","MIN_LONGITUDE","MAX_LONGITUDE","buildCircle","point","radius","circle","toCertaintyCircle","item","children","childFeature","geometry","type","addGeoreferenceLayer","map","layerId","options","warpedMapLayer","WarpedMapLayer","getBoundingBox","data","bufferDistance","box","bbox","validateBoundingBox","polygon","bboxPolygon","polygonBuffer","buffer","removeLayer","toFeature","record","originalProperties","properties","toponym","id","feature","toFeatureCollection","features","featureCollection","boundingBox","_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AAAb,EACA,oBAAAkB,CACF"}
@@ -1,2 +1,2 @@
1
- "use strict";const u=require("./index.cjs218.js");function a(o,c,t){var s=Array(Math.max(0,o));c=u(c,t,1);for(var r=0;r<o;r++)s[r]=c(r);return s}module.exports=a;
1
+ "use strict";const u=require("./index.cjs226.js");function a(o,c,t){var s=Array(Math.max(0,o));c=u(c,t,1);for(var r=0;r<o;r++)s[r]=c(r);return s}module.exports=a;
2
2
  //# sourceMappingURL=index.cjs132.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs38.js"),v=require("./index.cjs215.js");function c(e,r,t){r=v(r);var i=r.length;if(!i)return s(t)?t.call(e):t;for(var u=0;u<i;u++){var n=e?.[r[u]];n===void 0&&(n=t,u=i),e=s(n)?n.call(e):n}return e}module.exports=c;
1
+ "use strict";const s=require("./index.cjs38.js"),v=require("./index.cjs223.js");function c(e,r,t){r=v(r);var i=r.length;if(!i)return s(t)?t.call(e):t;for(var u=0;u<i;u++){var n=e?.[r[u]];n===void 0&&(n=t,u=i),e=s(n)?n.call(e):n}return e}module.exports=c;
2
2
  //# sourceMappingURL=index.cjs136.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const i=require("./index.cjs206.js");function n(c,a){var e=function(s){var r=e.cache,t=""+(a?a.apply(this,arguments):s);return i(r,t)||(r[t]=c.apply(this,arguments)),r[t]};return e.cache={},e}module.exports=n;
1
+ "use strict";const i=require("./index.cjs214.js");function n(c,a){var e=function(s){var r=e.cache,t=""+(a?a.apply(this,arguments):s);return i(r,t)||(r[t]=c.apply(this,arguments)),r[t]};return e.cache={},e}module.exports=n;
2
2
  //# sourceMappingURL=index.cjs139.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const y=require("./index.cjs217.js"),c=require("./index.cjs111.js");function k(e,n,u){n=y(n,u);for(var t=c(e),r,s=0,f=t.length;s<f;s++)if(r=t[s],n(e[r],r,e))return r}module.exports=k;
1
+ "use strict";const y=require("./index.cjs225.js"),c=require("./index.cjs111.js");function k(e,n,u){n=y(n,u);for(var t=c(e),r,s=0,f=t.length;s<f;s++)if(r=t[s],n(e[r],r,e))return r}module.exports=k;
2
2
  //# sourceMappingURL=index.cjs147.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs225.js"),r=e(1);module.exports=r;
1
+ "use strict";const e=require("./index.cjs233.js"),r=e(1);module.exports=r;
2
2
  //# sourceMappingURL=index.cjs148.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs225.js"),t=e(-1);module.exports=t;
1
+ "use strict";const e=require("./index.cjs233.js"),t=e(-1);module.exports=t;
2
2
  //# sourceMappingURL=index.cjs149.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const l=require("./index.cjs217.js"),t=require("./index.cjs208.js");function v(e,u,o,c){o=l(o,c,1);for(var h=o(u),r=0,n=t(e);r<n;){var s=Math.floor((r+n)/2);o(e[s])<h?r=s+1:n=s}return r}module.exports=v;
1
+ "use strict";const l=require("./index.cjs225.js"),t=require("./index.cjs216.js");function v(e,u,o,c){o=l(o,c,1);for(var h=o(u),r=0,n=t(e);r<n;){var s=Math.floor((r+n)/2);o(e[s])<h?r=s+1:n=s}return r}module.exports=v;
2
2
  //# sourceMappingURL=index.cjs150.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs150.js"),r=require("./index.cjs148.js"),n=require("./index.cjs226.js"),t=n(1,r,e);module.exports=t;
1
+ "use strict";const e=require("./index.cjs150.js"),r=require("./index.cjs148.js"),n=require("./index.cjs234.js"),t=n(1,r,e);module.exports=t;
2
2
  //# sourceMappingURL=index.cjs151.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs149.js"),t=require("./index.cjs226.js"),n=t(-1,e);module.exports=n;
1
+ "use strict";const e=require("./index.cjs149.js"),t=require("./index.cjs234.js"),n=t(-1,e);module.exports=n;
2
2
  //# sourceMappingURL=index.cjs152.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs227.js"),d=require("./index.cjs148.js"),u=require("./index.cjs147.js");function c(e,i,n){var t=s(e)?d:u,r=t(e,i,n);if(r!==void 0&&r!==-1)return e[r]}module.exports=c;
1
+ "use strict";const s=require("./index.cjs235.js"),d=require("./index.cjs148.js"),u=require("./index.cjs147.js");function c(e,i,n){var t=s(e)?d:u,r=t(e,i,n);if(r!==void 0&&r!==-1)return e[r]}module.exports=c;
2
2
  //# sourceMappingURL=index.cjs153.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("./index.cjs218.js"),u=require("./index.cjs227.js"),f=require("./index.cjs111.js");function h(n,i,c){i=t(i,c);var r,e;if(u(n))for(r=0,e=n.length;r<e;r++)i(n[r],r,n);else{var s=f(n);for(r=0,e=s.length;r<e;r++)i(n[s[r]],s[r],n)}return n}module.exports=h;
1
+ "use strict";const t=require("./index.cjs226.js"),u=require("./index.cjs235.js"),f=require("./index.cjs111.js");function h(n,i,c){i=t(i,c);var r,e;if(u(n))for(r=0,e=n.length;r<e;r++)i(n[r],r,n);else{var s=f(n);for(r=0,e=s.length;r<e;r++)i(n[s[r]],s[r],n)}return n}module.exports=h;
2
2
  //# sourceMappingURL=index.cjs155.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const l=require("./index.cjs217.js"),n=require("./index.cjs227.js"),q=require("./index.cjs111.js");function v(r,t,k){t=l(t,k);for(var u=!n(r)&&q(r),c=(u||r).length,a=Array(c),s=0;s<c;s++){var e=u?u[s]:s;a[s]=t(r[e],e,r)}return a}module.exports=v;
1
+ "use strict";const l=require("./index.cjs225.js"),n=require("./index.cjs235.js"),q=require("./index.cjs111.js");function v(r,t,k){t=l(t,k);for(var u=!n(r)&&q(r),c=(u||r).length,a=Array(c),s=0;s<c;s++){var e=u?u[s]:s;a[s]=t(r[e],e,r)}return a}module.exports=v;
2
2
  //# sourceMappingURL=index.cjs156.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs228.js"),c=e(1);module.exports=c;
1
+ "use strict";const e=require("./index.cjs236.js"),c=e(1);module.exports=c;
2
2
  //# sourceMappingURL=index.cjs157.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs228.js"),t=e(-1);module.exports=t;
1
+ "use strict";const e=require("./index.cjs236.js"),t=e(-1);module.exports=t;
2
2
  //# sourceMappingURL=index.cjs158.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const i=require("./index.cjs217.js"),o=require("./index.cjs155.js");function f(n,r,u){var s=[];return r=i(r,u),o(n,function(t,c,e){r(t,c,e)&&s.push(t)}),s}module.exports=f;
1
+ "use strict";const i=require("./index.cjs225.js"),o=require("./index.cjs155.js");function f(n,r,u){var s=[];return r=i(r,u),o(n,function(t,c,e){r(t,c,e)&&s.push(t)}),s}module.exports=f;
2
2
  //# sourceMappingURL=index.cjs159.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),g=require("./index.cjs28.js"),m=require("./index.cjs232.js"),v=require("./index.cjs233.js"),y=require("./index.cjs234.js"),E=require("./index.cjs235.js");function L(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(c,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return c.default=e,Object.freeze(c)}const s=L(r),d=s.createContext(null);function x(e,c){const a=r.useContext(g.MountedMapsContext),[i,M]=r.useState(null),u=r.useRef(),{current:l}=r.useRef({mapLib:null,map:null});r.useEffect(()=>{const h=e.mapLib;let f=!0,n;return Promise.resolve(h||Promise.resolve().then(()=>require("./index.cjs32.js")).then(t=>t.Li)).then(t=>{if(!f)return;if(!t)throw new Error("Invalid mapLib");const o="Map"in t?t:t.default;if(!o.Map)throw new Error("Invalid mapLib");E(o,e),e.reuseMaps&&(n=m.reuse(e,u.current)),n||(n=new m(o.Map,e,u.current)),l.map=v(n),l.mapLib=o,M(n),a?.onMapMount(l.map,e.id)}).catch(t=>{const{onError:o}=e;o?o({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{f=!1,n&&(a?.onMapUnmount(e.id),e.reuseMaps?n.recycle():n.destroy())}},[]),y(()=>{i&&i.setProps(e)}),r.useImperativeHandle(c,()=>l.map,[i]);const b=r.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),p={height:"100%"};return s.createElement("div",{id:e.id,ref:u,style:b},i&&s.createElement(d.Provider,{value:l},s.createElement("div",{"mapboxgl-children":"",style:p},e.children)))}const w=s.forwardRef(x);exports.Map=w;exports.MapContext=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),g=require("./index.cjs28.js"),m=require("./index.cjs205.js"),v=require("./index.cjs206.js"),y=require("./index.cjs207.js"),E=require("./index.cjs208.js");function L(e){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(c,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return c.default=e,Object.freeze(c)}const s=L(r),d=s.createContext(null);function x(e,c){const a=r.useContext(g.MountedMapsContext),[i,M]=r.useState(null),u=r.useRef(),{current:l}=r.useRef({mapLib:null,map:null});r.useEffect(()=>{const h=e.mapLib;let f=!0,n;return Promise.resolve(h||Promise.resolve().then(()=>require("./index.cjs32.js")).then(t=>t.Li)).then(t=>{if(!f)return;if(!t)throw new Error("Invalid mapLib");const o="Map"in t?t:t.default;if(!o.Map)throw new Error("Invalid mapLib");E(o,e),e.reuseMaps&&(n=m.reuse(e,u.current)),n||(n=new m(o.Map,e,u.current)),l.map=v(n),l.mapLib=o,M(n),a?.onMapMount(l.map,e.id)}).catch(t=>{const{onError:o}=e;o?o({type:"error",target:null,originalEvent:null,error:t}):console.error(t)}),()=>{f=!1,n&&(a?.onMapUnmount(e.id),e.reuseMaps?n.recycle():n.destroy())}},[]),y(()=>{i&&i.setProps(e)}),r.useImperativeHandle(c,()=>l.map,[i]);const b=r.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),p={height:"100%"};return s.createElement("div",{id:e.id,ref:u,style:b},i&&s.createElement(d.Provider,{value:l},s.createElement("div",{"mapboxgl-children":"",style:p},e.children)))}const w=s.forwardRef(x);exports.Map=w;exports.MapContext=d;
2
2
  //# sourceMappingURL=index.cjs16.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./index.cjs159.js"),n=require("./index.cjs143.js"),i=require("./index.cjs217.js");function s(e,r,t){return c(e,n(i(r)),t)}module.exports=s;
1
+ "use strict";const c=require("./index.cjs159.js"),n=require("./index.cjs143.js"),i=require("./index.cjs225.js");function s(e,r,t){return c(e,n(i(r)),t)}module.exports=s;
2
2
  //# sourceMappingURL=index.cjs160.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const v=require("./index.cjs217.js"),a=require("./index.cjs227.js"),c=require("./index.cjs111.js");function i(r,s,n){s=v(s,n);for(var t=!a(r)&&c(r),f=(t||r).length,e=0;e<f;e++){var u=t?t[e]:e;if(!s(r[u],u,r))return!1}return!0}module.exports=i;
1
+ "use strict";const v=require("./index.cjs225.js"),a=require("./index.cjs235.js"),c=require("./index.cjs111.js");function i(r,s,n){s=v(s,n);for(var t=!a(r)&&c(r),f=(t||r).length,e=0;e<f;e++){var u=t?t[e]:e;if(!s(r[u],u,r))return!1}return!0}module.exports=i;
2
2
  //# sourceMappingURL=index.cjs161.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const a=require("./index.cjs217.js"),c=require("./index.cjs227.js"),i=require("./index.cjs111.js");function k(r,e,n){e=a(e,n);for(var t=!c(r)&&i(r),f=(t||r).length,s=0;s<f;s++){var u=t?t[s]:s;if(e(r[u],u,r))return!0}return!1}module.exports=k;
1
+ "use strict";const a=require("./index.cjs225.js"),c=require("./index.cjs235.js"),i=require("./index.cjs111.js");function k(r,e,n){e=a(e,n);for(var t=!c(r)&&i(r),f=(t||r).length,s=0;s<f;s++){var u=t?t[s]:s;if(e(r[u],u,r))return!0}return!1}module.exports=k;
2
2
  //# sourceMappingURL=index.cjs162.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs227.js"),n=require("./index.cjs113.js"),u=require("./index.cjs151.js");function c(e,r,i,t){return s(e)||(e=n(e)),(typeof i!="number"||t)&&(i=0),u(e,r,i)>=0}module.exports=c;
1
+ "use strict";const s=require("./index.cjs235.js"),n=require("./index.cjs113.js"),u=require("./index.cjs151.js");function c(e,r,i,t){return s(e)||(e=n(e)),(typeof i!="number"||t)&&(i=0),u(e,r,i)>=0}module.exports=c;
2
2
  //# sourceMappingURL=index.cjs163.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const p=require("./index.cjs227.js"),a=require("./index.cjs113.js"),m=require("./index.cjs217.js"),q=require("./index.cjs155.js");function I(n,u,s){var r=-1/0,f=-1/0,i,t;if(u==null||typeof u=="number"&&typeof n[0]!="object"&&n!=null){n=p(n)?n:a(n);for(var e=0,c=n.length;e<c;e++)i=n[e],i!=null&&i>r&&(r=i)}else u=m(u,s),q(n,function(l,y,o){t=u(l,y,o),(t>f||t===-1/0&&r===-1/0)&&(r=l,f=t)});return r}module.exports=I;
1
+ "use strict";const p=require("./index.cjs235.js"),a=require("./index.cjs113.js"),m=require("./index.cjs225.js"),q=require("./index.cjs155.js");function I(n,u,s){var r=-1/0,f=-1/0,i,t;if(u==null||typeof u=="number"&&typeof n[0]!="object"&&n!=null){n=p(n)?n:a(n);for(var e=0,c=n.length;e<c;e++)i=n[e],i!=null&&i>r&&(r=i)}else u=m(u,s),q(n,function(l,y,o){t=u(l,y,o),(t>f||t===-1/0&&r===-1/0)&&(r=l,f=t)});return r}module.exports=I;
2
2
  //# sourceMappingURL=index.cjs166.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const p=require("./index.cjs227.js"),m=require("./index.cjs113.js"),q=require("./index.cjs217.js"),I=require("./index.cjs155.js");function a(n,u,s){var i=1/0,f=1/0,r,t;if(u==null||typeof u=="number"&&typeof n[0]!="object"&&n!=null){n=p(n)?n:m(n);for(var e=0,c=n.length;e<c;e++)r=n[e],r!=null&&r<i&&(i=r)}else u=q(u,s),I(n,function(l,y,o){t=u(l,y,o),(t<f||t===1/0&&i===1/0)&&(i=l,f=t)});return i}module.exports=a;
1
+ "use strict";const p=require("./index.cjs235.js"),m=require("./index.cjs113.js"),q=require("./index.cjs225.js"),I=require("./index.cjs155.js");function a(n,u,s){var i=1/0,f=1/0,r,t;if(u==null||typeof u=="number"&&typeof n[0]!="object"&&n!=null){n=p(n)?n:m(n);for(var e=0,c=n.length;e<c;e++)r=n[e],r!=null&&r<i&&(i=r)}else u=q(u,s),I(n,function(l,y,o){t=u(l,y,o),(t<f||t===1/0&&i===1/0)&&(i=l,f=t)});return i}module.exports=a;
2
2
  //# sourceMappingURL=index.cjs167.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs227.js"),h=require("./index.cjs113.js"),m=require("./index.cjs208.js"),i=require("./index.cjs133.js"),o=require("./index.cjs175.js");function q(r,t,l){if(t==null||l)return n(r)||(r=h(r)),r[i(r.length-1)];var e=o(r),s=m(e);t=Math.max(Math.min(t,s),0);for(var c=s-1,a=0;a<t;a++){var u=i(a,c),v=e[a];e[a]=e[u],e[u]=v}return e.slice(0,t)}module.exports=q;
1
+ "use strict";const n=require("./index.cjs235.js"),h=require("./index.cjs113.js"),m=require("./index.cjs216.js"),i=require("./index.cjs133.js"),o=require("./index.cjs175.js");function q(r,t,l){if(t==null||l)return n(r)||(r=h(r)),r[i(r.length-1)];var e=o(r),s=m(e);t=Math.max(Math.min(t,s),0);for(var c=s-1,a=0;a<t;a++){var u=i(a,c),v=e[a];e[a]=e[u],e[u]=v}return e.slice(0,t)}module.exports=q;
2
2
  //# sourceMappingURL=index.cjs169.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const a=require("react"),D=require("react-dom"),P=require("./index.cjs236.js"),q=require("./index.cjs16.js"),C=require("./index.cjs237.js"),k=require("./index.cjs238.js");function N(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,l.get?l:{enumerable:!0,get:()=>t[s]})}}return i.default=t,Object.freeze(i)}const O=N(a);a.memo(a.forwardRef((t,i)=>{const{map:s,mapLib:l}=a.useContext(q.MapContext),c=a.useRef({props:t}),e=a.useMemo(()=>{let g=!1;O.Children.forEach(t.children,n=>{n&&(g=!0)});const y={...t,element:g?document.createElement("div"):void 0},o=new l.Marker(y);return o.setLngLat([t.longitude,t.latitude]),o.getElement().addEventListener("click",n=>{c.current.props.onClick?.({type:"click",target:o,originalEvent:n})}),o.on("dragstart",n=>{const r=n;r.lngLat=e.getLngLat(),c.current.props.onDragStart?.(r)}),o.on("drag",n=>{const r=n;r.lngLat=e.getLngLat(),c.current.props.onDrag?.(r)}),o.on("dragend",n=>{const r=n;r.lngLat=e.getLngLat(),c.current.props.onDragEnd?.(r)}),o},[]);a.useEffect(()=>(e.addTo(s.getMap()),()=>{e.remove()}),[]);const{longitude:f,latitude:m,offset:u,style:d,draggable:p=!1,popup:L=null,rotation:E=0,rotationAlignment:R="auto",pitchAlignment:b="auto"}=t;a.useEffect(()=>{P.applyReactStyle(e.getElement(),d)},[d]),a.useImperativeHandle(i,()=>e,[]);const v=c.current.props;(e.getLngLat().lng!==f||e.getLngLat().lat!==m)&&e.setLngLat([f,m]),u&&!C.arePointsEqual(e.getOffset(),u)&&e.setOffset(u),e.isDraggable()!==p&&e.setDraggable(p),e.getRotation()!==E&&e.setRotation(E),e.getRotationAlignment()!==R&&e.setRotationAlignment(R),e.getPitchAlignment()!==b&&e.setPitchAlignment(b),e.getPopup()!==L&&e.setPopup(L);const h=k.compareClassNames(v.className,t.className);if(h)for(const g of h)e.toggleClassName(g);return c.current.props=t,D.createPortal(t.children,e.getElement())}));
1
+ "use strict";const a=require("react"),D=require("react-dom"),P=require("./index.cjs209.js"),q=require("./index.cjs16.js"),C=require("./index.cjs210.js"),k=require("./index.cjs211.js");function N(t){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const l=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(i,s,l.get?l:{enumerable:!0,get:()=>t[s]})}}return i.default=t,Object.freeze(i)}const O=N(a);a.memo(a.forwardRef((t,i)=>{const{map:s,mapLib:l}=a.useContext(q.MapContext),c=a.useRef({props:t}),e=a.useMemo(()=>{let g=!1;O.Children.forEach(t.children,n=>{n&&(g=!0)});const y={...t,element:g?document.createElement("div"):void 0},o=new l.Marker(y);return o.setLngLat([t.longitude,t.latitude]),o.getElement().addEventListener("click",n=>{c.current.props.onClick?.({type:"click",target:o,originalEvent:n})}),o.on("dragstart",n=>{const r=n;r.lngLat=e.getLngLat(),c.current.props.onDragStart?.(r)}),o.on("drag",n=>{const r=n;r.lngLat=e.getLngLat(),c.current.props.onDrag?.(r)}),o.on("dragend",n=>{const r=n;r.lngLat=e.getLngLat(),c.current.props.onDragEnd?.(r)}),o},[]);a.useEffect(()=>(e.addTo(s.getMap()),()=>{e.remove()}),[]);const{longitude:f,latitude:m,offset:u,style:d,draggable:p=!1,popup:L=null,rotation:E=0,rotationAlignment:R="auto",pitchAlignment:b="auto"}=t;a.useEffect(()=>{P.applyReactStyle(e.getElement(),d)},[d]),a.useImperativeHandle(i,()=>e,[]);const v=c.current.props;(e.getLngLat().lng!==f||e.getLngLat().lat!==m)&&e.setLngLat([f,m]),u&&!C.arePointsEqual(e.getOffset(),u)&&e.setOffset(u),e.isDraggable()!==p&&e.setDraggable(p),e.getRotation()!==E&&e.setRotation(E),e.getRotationAlignment()!==R&&e.setRotationAlignment(R),e.getPitchAlignment()!==b&&e.setPitchAlignment(b),e.getPopup()!==L&&e.setPopup(L);const h=k.compareClassNames(v.className,t.className);if(h)for(const g of h)e.toggleClassName(g);return c.current.props=t,D.createPortal(t.children,e.getElement())}));
2
2
  //# sourceMappingURL=index.cjs17.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs217.js"),a=require("./index.cjs164.js"),d=require("./index.cjs156.js");function f(u,t,c){var o=0;return t=s(t,c),a(d(u,function(i,n,r){return{value:i,index:o++,criteria:t(i,n,r)}}).sort(function(i,n){var r=i.criteria,e=n.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(r<e||e===void 0)return-1}return i.index-n.index}),"value")}module.exports=f;
1
+ "use strict";const s=require("./index.cjs225.js"),a=require("./index.cjs164.js"),d=require("./index.cjs156.js");function f(u,t,c){var o=0;return t=s(t,c),a(d(u,function(i,n,r){return{value:i,index:o++,criteria:t(i,n,r)}}).sort(function(i,n){var r=i.criteria,e=n.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(r<e||e===void 0)return-1}return i.index-n.index}),"value")}module.exports=f;
2
2
  //# sourceMappingURL=index.cjs170.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./index.cjs229.js"),i=require("./index.cjs206.js"),n=c(function(o,r,s){i(o,s)?o[s].push(r):o[s]=[r]});module.exports=n;
1
+ "use strict";const c=require("./index.cjs237.js"),i=require("./index.cjs214.js"),n=c(function(o,r,s){i(o,s)?o[s].push(r):o[s]=[r]});module.exports=n;
2
2
  //# sourceMappingURL=index.cjs171.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const o=require("./index.cjs229.js"),r=o(function(t,e,n){t[n]=e});module.exports=r;
1
+ "use strict";const o=require("./index.cjs237.js"),r=o(function(t,e,n){t[n]=e});module.exports=r;
2
2
  //# sourceMappingURL=index.cjs172.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs229.js"),s=require("./index.cjs206.js"),t=n(function(o,e,c){s(o,c)?o[c]++:o[c]=1});module.exports=t;
1
+ "use strict";const n=require("./index.cjs237.js"),s=require("./index.cjs214.js"),t=n(function(o,e,c){s(o,c)?o[c]++:o[c]=1});module.exports=t;
2
2
  //# sourceMappingURL=index.cjs173.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const s=require("./index.cjs229.js"),u=s(function(t,r,o){t[o?0:1].push(r)},!0);module.exports=u;
1
+ "use strict";const s=require("./index.cjs237.js"),u=s(function(t,r,o){t[o?0:1].push(r)},!0);module.exports=u;
2
2
  //# sourceMappingURL=index.cjs174.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs103.js"),u=require("./index.cjs37.js"),t=require("./index.cjs95.js"),i=require("./index.cjs227.js"),f=require("./index.cjs156.js"),n=require("./index.cjs126.js"),s=require("./index.cjs113.js");var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function d(r){return r?e(r)?u.slice.call(r):t(r)?r.match(c):i(r)?f(r,n):s(r):[]}module.exports=d;
1
+ "use strict";const e=require("./index.cjs103.js"),u=require("./index.cjs37.js"),t=require("./index.cjs95.js"),i=require("./index.cjs235.js"),f=require("./index.cjs156.js"),n=require("./index.cjs126.js"),s=require("./index.cjs113.js");var c=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function d(r){return r?e(r)?u.slice.call(r):t(r)?r.match(c):i(r)?f(r,n):s(r):[]}module.exports=d;
2
2
  //# sourceMappingURL=index.cjs175.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index.cjs227.js"),t=require("./index.cjs111.js");function n(e){return e==null?0:r(e)?e.length:t(e).length}module.exports=n;
1
+ "use strict";const r=require("./index.cjs235.js"),t=require("./index.cjs111.js");function n(e){return e==null?0:r(e)?e.length:t(e).length}module.exports=n;
2
2
  //# sourceMappingURL=index.cjs176.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const f=require("react-dom"),a=require("react"),m=require("./index.cjs236.js"),d=require("./index.cjs16.js"),g=require("./index.cjs237.js"),h=require("./index.cjs238.js");a.memo(a.forwardRef((e,l)=>{const{map:u,mapLib:r}=a.useContext(d.MapContext),i=a.useMemo(()=>document.createElement("div"),[]),s=a.useRef({props:e}),t=a.useMemo(()=>{const n={...e},o=new r.Popup(n);return o.setLngLat([e.longitude,e.latitude]),o.once("open",c=>{s.current.props.onOpen?.(c)}),o},[]);if(a.useEffect(()=>{const n=o=>{s.current.props.onClose?.(o)};return t.on("close",n),t.setDOMContent(i).addTo(u.getMap()),()=>{t.off("close",n),t.isOpen()&&t.remove()}},[]),a.useEffect(()=>{m.applyReactStyle(t.getElement(),e.style)},[e.style]),a.useImperativeHandle(l,()=>t,[]),t.isOpen()){const n=s.current.props;(t.getLngLat().lng!==e.longitude||t.getLngLat().lat!==e.latitude)&&t.setLngLat([e.longitude,e.latitude]),e.offset&&!g.deepEqual(n.offset,e.offset)&&t.setOffset(e.offset),(n.anchor!==e.anchor||n.maxWidth!==e.maxWidth)&&(t.options.anchor=e.anchor,t.setMaxWidth(e.maxWidth));const o=h.compareClassNames(n.className,e.className);if(o)for(const c of o)t.toggleClassName(c);s.current.props=e}return f.createPortal(e.children,i)}));
1
+ "use strict";const f=require("react-dom"),a=require("react"),m=require("./index.cjs209.js"),d=require("./index.cjs16.js"),g=require("./index.cjs210.js"),h=require("./index.cjs211.js");a.memo(a.forwardRef((e,l)=>{const{map:u,mapLib:r}=a.useContext(d.MapContext),i=a.useMemo(()=>document.createElement("div"),[]),s=a.useRef({props:e}),t=a.useMemo(()=>{const n={...e},o=new r.Popup(n);return o.setLngLat([e.longitude,e.latitude]),o.once("open",c=>{s.current.props.onOpen?.(c)}),o},[]);if(a.useEffect(()=>{const n=o=>{s.current.props.onClose?.(o)};return t.on("close",n),t.setDOMContent(i).addTo(u.getMap()),()=>{t.off("close",n),t.isOpen()&&t.remove()}},[]),a.useEffect(()=>{m.applyReactStyle(t.getElement(),e.style)},[e.style]),a.useImperativeHandle(l,()=>t,[]),t.isOpen()){const n=s.current.props;(t.getLngLat().lng!==e.longitude||t.getLngLat().lat!==e.latitude)&&t.setLngLat([e.longitude,e.latitude]),e.offset&&!g.deepEqual(n.offset,e.offset)&&t.setOffset(e.offset),(n.anchor!==e.anchor||n.maxWidth!==e.maxWidth)&&(t.options.anchor=e.anchor,t.setMaxWidth(e.maxWidth));const o=h.compareClassNames(n.className,e.className);if(o)for(const c of o)t.toggleClassName(c);s.current.props=e}return f.createPortal(e.children,i)}));
2
2
  //# sourceMappingURL=index.cjs18.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs224.js");function r(t,e){return n(t,e,!1)}module.exports=r;
1
+ "use strict";const n=require("./index.cjs232.js");function r(t,e){return n(t,e,!1)}module.exports=r;
2
2
  //# sourceMappingURL=index.cjs182.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const p=require("./index.cjs93.js"),_=require("./index.cjs217.js"),b=require("./index.cjs208.js"),g=require("./index.cjs163.js");function i(o,h,s,r){p(h)||(r=s,s=h,h=!1),s!=null&&(s=_(s,r));for(var f=[],q=[],u=0,l=b(o);u<l;u++){var n=o[u],c=s?s(n,u,o):n;h&&!s?((!u||q!==c)&&f.push(n),q=c):s?g(q,c)||(q.push(c),f.push(n)):g(f,n)||f.push(n)}return f}module.exports=i;
1
+ "use strict";const p=require("./index.cjs93.js"),_=require("./index.cjs225.js"),b=require("./index.cjs216.js"),g=require("./index.cjs163.js");function i(o,h,s,r){p(h)||(r=s,s=h,h=!1),s!=null&&(s=_(s,r));for(var f=[],q=[],u=0,l=b(o);u<l;u++){var n=o[u],c=s?s(n,u,o):n;h&&!s?((!u||q!==c)&&f.push(n),q=c):s?g(q,c)||(q.push(c),f.push(n)):g(f,n)||f.push(n)}return f}module.exports=i;
2
2
  //# sourceMappingURL=index.cjs183.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./index.cjs208.js"),o=require("./index.cjs163.js");function g(s){for(var e=[],u=arguments.length,n=0,a=c(s);n<a;n++){var t=s[n];if(!o(e,t)){var r;for(r=1;r<u&&o(arguments[r],t);r++);r===u&&e.push(t)}}return e}module.exports=g;
1
+ "use strict";const c=require("./index.cjs216.js"),o=require("./index.cjs163.js");function g(s){for(var e=[],u=arguments.length,n=0,a=c(s);n<a;n++){var t=s[n];if(!o(e,t)){var r;for(r=1;r<u&&o(arguments[r],t);r++);r===u&&e.push(t)}}return e}module.exports=g;
2
2
  //# sourceMappingURL=index.cjs184.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs166.js"),s=require("./index.cjs208.js"),c=require("./index.cjs164.js");function o(t){for(var e=t&&n(t,s).length||0,u=Array(e),r=0;r<e;r++)u[r]=c(t,r);return u}module.exports=o;
1
+ "use strict";const n=require("./index.cjs166.js"),s=require("./index.cjs216.js"),c=require("./index.cjs164.js");function o(t){for(var e=t&&n(t,s).length||0,u=Array(e),r=0;r<e;r++)u[r]=c(t,r);return u}module.exports=o;
2
2
  //# sourceMappingURL=index.cjs185.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const c=require("./index.cjs208.js");function u(r,n){for(var t={},e=0,o=c(r);e<o;e++)n?t[r[e]]=n[e]:t[r[e][0]]=r[e][1];return t}module.exports=u;
1
+ "use strict";const c=require("./index.cjs216.js");function u(r,n){for(var t={},e=0,o=c(r);e<o;e++)n?t[r[e]]=n[e]:t[r[e][0]]=r[e][1];return t}module.exports=u;
2
2
  //# sourceMappingURL=index.cjs186.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react"),i=require("./index.cjs236.js"),r=require("./index.cjs30.js");function l(t){const n=r.useControl(({mapLib:o})=>new o.AttributionControl(t),{position:t.position});return e.useEffect(()=>{i.applyReactStyle(n._container,t.style)},[t.style]),null}e.memo(l);
1
+ "use strict";const e=require("react"),i=require("./index.cjs209.js"),r=require("./index.cjs30.js");function l(t){const n=r.useControl(({mapLib:o})=>new o.AttributionControl(t),{position:t.position});return e.useEffect(()=>{i.applyReactStyle(n._container,t.style)},[t.style]),null}e.memo(l);
2
2
  //# sourceMappingURL=index.cjs19.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const r=require("./index.cjs15.js");require("react");require("./index.cjs16.js");require("./index.cjs17.js");require("./index.cjs18.js");require("./index.cjs19.js");require("./index.cjs20.js");require("./index.cjs21.js");require("./index.cjs22.js");require("./index.cjs23.js");require("./index.cjs24.js");require("./index.cjs25.js");const u=require("./index.cjs26.js"),s=require("./index.cjs27.js");require("./index.cjs28.js");const i=require("./index.cjs14.js"),n=require("./index.cjs13.js"),q=e=>{const t=n.getCertaintyCircles([e.geometry],()=>e.certaintyRadius);return r.jsxRuntimeExports.jsx(u.Source,{data:t,type:"geojson",children:r.jsxRuntimeExports.jsx(s.Layer,{...i.fill,id:"certainty-layer",paint:{...i.fill.paint}})})};module.exports=q;
1
+ "use strict";const r=require("./index.cjs15.js"),u=require("react");require("./index.cjs16.js");require("./index.cjs17.js");require("./index.cjs18.js");require("./index.cjs19.js");require("./index.cjs20.js");require("./index.cjs21.js");require("./index.cjs22.js");require("./index.cjs23.js");require("./index.cjs24.js");require("./index.cjs25.js");const n=require("./index.cjs26.js"),s=require("./index.cjs27.js");require("./index.cjs28.js");const t=require("./index.cjs14.js"),a=require("./index.cjs13.js"),c=e=>{const i=u.useMemo(()=>e.geometry?a.toCertaintyCircle(e.geometry,e.certaintyRadius):{},[e.geometry,e.certaintyRadius]);return r.jsxRuntimeExports.jsx(n.Source,{data:i,type:"geojson",children:r.jsxRuntimeExports.jsx(s.Layer,{...t.fill,id:"certainty-layer",paint:{...t.fill.paint}})})};module.exports=c;
2
2
  //# sourceMappingURL=index.cjs2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs2.js","sources":["../src/components/CertaintyLayer.js"],"sourcesContent":["// @flow\n\nimport React from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\nimport MapStyles from '../utils/MapStyles';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n geometry?: any,\n certaintyRadius: number\n};\n\n/**\n * Renders circles with the given certainty_radius circumference around all points in a new layer.\n */\nconst CertaintyLayer = (props: Props) => {\n const circles = MapUtils.getCertaintyCircles([props.geometry], () => props.certaintyRadius);\n\n return (\n <Source\n data={circles}\n type='geojson'\n >\n <Layer\n {...MapStyles.fill}\n id='certainty-layer'\n paint={{\n ...MapStyles.fill.paint,\n }}\n />\n </Source>\n );\n};\n\nexport default CertaintyLayer;\n\n"],"names":["CertaintyLayer","props","circles","MapUtils","jsx","Source","Layer","MapStyles"],"mappings":"0fAeMA,EAAkBC,GAAiB,CACvC,MAAMC,EAAUC,EAAS,oBAAoB,CAACF,EAAM,QAAQ,EAAG,IAAMA,EAAM,eAAe,EAE1F,OACEG,EAAAA,kBAAAA,IAACC,EAAAA,OAAA,CACC,KAAMH,EACN,KAAK,UAEL,SAAAE,EAAAA,kBAAAA,IAACE,EAAAA,MAAA,CACE,GAAGC,EAAU,KACd,GAAG,kBACH,MAAO,CACL,GAAGA,EAAU,KAAK,KAAA,CACpB,CAAA,CACF,CAAA,CAGN"}
1
+ {"version":3,"file":"index.cjs2.js","sources":["../src/components/CertaintyLayer.js"],"sourcesContent":["// @flow\n\nimport React, { useMemo } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\nimport MapStyles from '../utils/MapStyles';\nimport MapUtils from '../utils/Map';\n\ntype Props = {\n geometry?: any,\n certaintyRadius: number\n};\n\n/**\n * Renders circles with the given certainty_radius circumference around all points in a new layer.\n */\nconst CertaintyLayer = (props: Props) => {\n const data = useMemo(() => {\n if (props.geometry) {\n return MapUtils.toCertaintyCircle(props.geometry, props.certaintyRadius);\n } else {\n return {};\n }\n }, [props.geometry, props.certaintyRadius]);\n\n return (\n <Source\n data={data}\n type='geojson'\n >\n <Layer\n {...MapStyles.fill}\n id='certainty-layer'\n paint={{\n ...MapStyles.fill.paint\n }}\n />\n </Source>\n );\n};\n\nexport default CertaintyLayer;\n\n"],"names":["CertaintyLayer","props","data","useMemo","MapUtils","jsx","Source","Layer","MapStyles"],"mappings":"4fAeMA,EAAkBC,GAAiB,CACvC,MAAMC,EAAOC,EAAAA,QAAQ,IACfF,EAAM,SACDG,EAAS,kBAAkBH,EAAM,SAAUA,EAAM,eAAe,EAEhE,CAAA,EAER,CAACA,EAAM,SAAUA,EAAM,eAAe,CAAC,EAE1C,OACEI,EAAAA,kBAAAA,IAACC,EAAAA,OAAA,CACC,KAAAJ,EACA,KAAK,UAEL,SAAAG,EAAAA,kBAAAA,IAACE,EAAAA,MAAA,CACE,GAAGC,EAAU,KACd,GAAG,kBACH,MAAO,CACL,GAAGA,EAAU,KAAK,KAAA,CACpB,CAAA,CACF,CAAA,CAGN"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),l=require("./index.cjs236.js"),r=require("./index.cjs30.js");function c(e){const n=r.useControl(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return t.useEffect(()=>{l.applyReactStyle(n._controlContainer,e.style)},[e.style]),null}const u=t.memo(c);exports.FullscreenControl=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),l=require("./index.cjs209.js"),r=require("./index.cjs30.js");function c(e){const n=r.useControl(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return t.useEffect(()=>{l.applyReactStyle(n._controlContainer,e.style)},[e.style]),null}const u=t.memo(c);exports.FullscreenControl=u;
2
2
  //# sourceMappingURL=index.cjs20.js.map
@@ -1,2 +1,2 @@
1
- "use strict";const n=require("./index.cjs37.js");function u(t){var r="[object "+t+"]";return function(e){return n.toString.call(e)===r}}module.exports=u;
1
+ "use strict";const d=require("./index.cjs243.js"),p=require("./index.cjs244.js"),i=require("./index.cjs210.js"),c={version:8,sources:{},layers:[]},u={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},h={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},m={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},f=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],v=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class l{constructor(t,o,a){this._map=null,this._internalUpdate=!1,this._hoveredFeatures=null,this._propsedCameraUpdate=null,this._styleComponents={},this._onEvent=e=>{const s=this.props[m[e.type]];s?s(e):e.type==="error"&&console.error(e.error)},this._onCameraEvent=e=>{if(this._internalUpdate)return;e.viewState=this._propsedCameraUpdate||d.transformToViewState(this._map.transform);const s=this.props[h[e.type]];s&&s(e)},this._onCameraUpdate=e=>this._internalUpdate?e:(this._propsedCameraUpdate=d.transformToViewState(e),d.applyViewStateToTransform(e,this.props)),this._onPointerEvent=e=>{(e.type==="mousemove"||e.type==="mouseout")&&this._updateHover(e);const s=this.props[u[e.type]];s&&(this.props.interactiveLayerIds&&e.type!=="mouseover"&&e.type!=="mouseout"&&(e.features=this._hoveredFeatures||this._queryRenderedFeatures(e.point)),s(e),delete e.features)},this._MapClass=t,this.props=o,this._initialize(a)}get map(){return this._map}setProps(t){const o=this.props;this.props=t;const a=this._updateSettings(t,o),e=this._updateSize(t),s=this._updateViewState(t);this._updateStyle(t,o),this._updateStyleComponents(t),this._updateHandlers(t,o),(a||e||s&&!this._map.isMoving())&&this.redraw()}static reuse(t,o){const a=l.savedMaps.pop();if(!a)return null;const e=a.map,s=e.getContainer();for(o.className=s.className;s.childNodes.length>0;)o.appendChild(s.childNodes[0]);e._container=o;const n=e._resizeObserver;n&&(n.disconnect(),n.observe(o)),a.setProps({...t,styleDiffing:!1}),e.resize();const{initialViewState:r}=t;return r&&(r.bounds?e.fitBounds(r.bounds,{...r.fitBoundsOptions,duration:0}):a._updateViewState(r)),e.isStyleLoaded()?e.fire("load"):e.once("style.load",()=>e.fire("load")),e._update(),a}_initialize(t){const{props:o}=this,{mapStyle:a=c}=o,e={...o,...o.initialViewState,container:t,style:p.normalizeStyle(a)},s=e.initialViewState||e.viewState||e;if(Object.assign(e,{center:[s.longitude||0,s.latitude||0],zoom:s.zoom||0,pitch:s.pitch||0,bearing:s.bearing||0}),o.gl){const r=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=r,o.gl)}const n=new this._MapClass(e);s.padding&&n.setPadding(s.padding),o.cursor&&(n.getCanvas().style.cursor=o.cursor),n.transformCameraUpdate=this._onCameraUpdate,n.on("style.load",()=>{this._styleComponents={light:n.getLight(),sky:n.getSky(),projection:n.getProjection?.(),terrain:n.getTerrain()},this._updateStyleComponents(this.props)}),n.on("sourcedata",()=>{this._updateStyleComponents(this.props)});for(const r in u)n.on(r,this._onPointerEvent);for(const r in h)n.on(r,this._onCameraEvent);for(const r in m)n.on(r,this._onEvent);this._map=n}recycle(){this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(),l.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_updateSize(t){const{viewState:o}=t;if(o){const a=this._map;if(o.width!==a.transform.width||o.height!==a.transform.height)return a.resize(),!0}return!1}_updateViewState(t){const o=this._map,a=o.transform;if(!o.isMoving()){const s=d.applyViewStateToTransform(a,t);if(Object.keys(s).length>0)return this._internalUpdate=!0,o.jumpTo(s),this._internalUpdate=!1,!0}return!1}_updateSettings(t,o){const a=this._map;let e=!1;for(const s of f)s in t&&!i.deepEqual(t[s],o[s])&&(e=!0,a[`set${s[0].toUpperCase()}${s.slice(1)}`]?.call(a,t[s]));return e}_updateStyle(t,o){if(t.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==o.mapStyle){const{mapStyle:a=c,styleDiffing:e=!0}=t,s={diff:e};"localIdeographFontFamily"in t&&(s.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(p.normalizeStyle(a),s)}}_updateStyleComponents({light:t,projection:o,sky:a,terrain:e}){const s=this._map,n=this._styleComponents;s.style._loaded&&(t&&!i.deepEqual(t,n.light)&&(n.light=t,s.setLight(t)),o&&!i.deepEqual(o,n.projection)&&o!==n.projection?.type&&(n.projection=typeof o=="string"?{type:o}:o,s.setProjection?.(n.projection)),a&&!i.deepEqual(a,n.sky)&&(n.sky=a,s.setSky(a)),e!==void 0&&!i.deepEqual(e,n.terrain)&&(!e||s.getSource(e.source))&&(n.terrain=e,s.setTerrain(e)))}_updateHandlers(t,o){const a=this._map;for(const e of v){const s=t[e]??!0,n=o[e]??!0;i.deepEqual(s,n)||(s?a[e].enable(s):a[e].disable())}}_queryRenderedFeatures(t){const o=this._map,{interactiveLayerIds:a=[]}=this.props;try{return o.queryRenderedFeatures(t,{layers:a.filter(o.getLayer.bind(o))})}catch{return[]}}_updateHover(t){const{props:o}=this;if(o.interactiveLayerIds&&(o.onMouseMove||o.onMouseEnter||o.onMouseLeave)){const e=t.type,s=this._hoveredFeatures?.length>0,n=this._queryRenderedFeatures(t.point),r=n.length>0;!r&&s&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=n,r&&!s&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=e}else this._hoveredFeatures=null}}l.savedMaps=[];module.exports=l;
2
2
  //# sourceMappingURL=index.cjs205.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs205.js","sources":["../node_modules/underscore/modules/_tagTester.js"],"sourcesContent":["import { toString } from './_setup.js';\n\n// Internal function for creating a `toString`-based type tester.\nexport default function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n}\n"],"names":["tagTester","name","tag","obj","toString"],"mappings":"iDAGA,SAAwBA,EAAUC,EAAM,CACtC,IAAIC,EAAM,WAAaD,EAAO,IAC9B,OAAO,SAASE,EAAK,CACnB,OAAOC,WAAS,KAAKD,CAAG,IAAMD,CAChC,CACF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs205.js","sources":["../../../node_modules/@vis.gl/react-maplibre/dist/maplibre/maplibre.js"],"sourcesContent":["import { transformToViewState, applyViewStateToTransform } from \"../utils/transform.js\";\nimport { normalizeStyle } from \"../utils/style-utils.js\";\nimport { deepEqual } from \"../utils/deep-equal.js\";\nconst DEFAULT_STYLE = { version: 8, sources: {}, layers: [] };\nconst pointerEvents = {\n mousedown: 'onMouseDown',\n mouseup: 'onMouseUp',\n mouseover: 'onMouseOver',\n mousemove: 'onMouseMove',\n click: 'onClick',\n dblclick: 'onDblClick',\n mouseenter: 'onMouseEnter',\n mouseleave: 'onMouseLeave',\n mouseout: 'onMouseOut',\n contextmenu: 'onContextMenu',\n touchstart: 'onTouchStart',\n touchend: 'onTouchEnd',\n touchmove: 'onTouchMove',\n touchcancel: 'onTouchCancel'\n};\nconst cameraEvents = {\n movestart: 'onMoveStart',\n move: 'onMove',\n moveend: 'onMoveEnd',\n dragstart: 'onDragStart',\n drag: 'onDrag',\n dragend: 'onDragEnd',\n zoomstart: 'onZoomStart',\n zoom: 'onZoom',\n zoomend: 'onZoomEnd',\n rotatestart: 'onRotateStart',\n rotate: 'onRotate',\n rotateend: 'onRotateEnd',\n pitchstart: 'onPitchStart',\n pitch: 'onPitch',\n pitchend: 'onPitchEnd'\n};\nconst otherEvents = {\n wheel: 'onWheel',\n boxzoomstart: 'onBoxZoomStart',\n boxzoomend: 'onBoxZoomEnd',\n boxzoomcancel: 'onBoxZoomCancel',\n resize: 'onResize',\n load: 'onLoad',\n render: 'onRender',\n idle: 'onIdle',\n remove: 'onRemove',\n data: 'onData',\n styledata: 'onStyleData',\n sourcedata: 'onSourceData',\n error: 'onError'\n};\nconst settingNames = [\n 'minZoom',\n 'maxZoom',\n 'minPitch',\n 'maxPitch',\n 'maxBounds',\n 'projection',\n 'renderWorldCopies'\n];\nconst handlerNames = [\n 'scrollZoom',\n 'boxZoom',\n 'dragRotate',\n 'dragPan',\n 'keyboard',\n 'doubleClickZoom',\n 'touchZoomRotate',\n 'touchPitch'\n];\n/**\n * A wrapper for mapbox-gl's Map class\n */\nclass Maplibre {\n constructor(MapClass, props, container) {\n // mapboxgl.Map instance\n this._map = null;\n // Internal states\n this._internalUpdate = false;\n this._hoveredFeatures = null;\n this._propsedCameraUpdate = null;\n this._styleComponents = {};\n this._onEvent = (e) => {\n // @ts-ignore\n const cb = this.props[otherEvents[e.type]];\n if (cb) {\n cb(e);\n }\n else if (e.type === 'error') {\n console.error(e.error); // eslint-disable-line\n }\n };\n this._onCameraEvent = (e) => {\n if (this._internalUpdate) {\n return;\n }\n e.viewState = this._propsedCameraUpdate || transformToViewState(this._map.transform);\n // @ts-ignore\n const cb = this.props[cameraEvents[e.type]];\n if (cb) {\n cb(e);\n }\n };\n this._onCameraUpdate = (tr) => {\n if (this._internalUpdate) {\n return tr;\n }\n this._propsedCameraUpdate = transformToViewState(tr);\n return applyViewStateToTransform(tr, this.props);\n };\n this._onPointerEvent = (e) => {\n if (e.type === 'mousemove' || e.type === 'mouseout') {\n this._updateHover(e);\n }\n // @ts-ignore\n const cb = this.props[pointerEvents[e.type]];\n if (cb) {\n if (this.props.interactiveLayerIds && e.type !== 'mouseover' && e.type !== 'mouseout') {\n e.features = this._hoveredFeatures || this._queryRenderedFeatures(e.point);\n }\n cb(e);\n delete e.features;\n }\n };\n this._MapClass = MapClass;\n this.props = props;\n this._initialize(container);\n }\n get map() {\n return this._map;\n }\n setProps(props) {\n const oldProps = this.props;\n this.props = props;\n const settingsChanged = this._updateSettings(props, oldProps);\n const sizeChanged = this._updateSize(props);\n const viewStateChanged = this._updateViewState(props);\n this._updateStyle(props, oldProps);\n this._updateStyleComponents(props);\n this._updateHandlers(props, oldProps);\n // If 1) view state has changed to match props and\n // 2) the props change is not triggered by map events,\n // it's driven by an external state change. Redraw immediately\n if (settingsChanged || sizeChanged || (viewStateChanged && !this._map.isMoving())) {\n this.redraw();\n }\n }\n static reuse(props, container) {\n const that = Maplibre.savedMaps.pop();\n if (!that) {\n return null;\n }\n const map = that.map;\n // When reusing the saved map, we need to reparent the map(canvas) and other child nodes\n // intoto the new container from the props.\n // Step 1: reparenting child nodes from old container to new container\n const oldContainer = map.getContainer();\n container.className = oldContainer.className;\n while (oldContainer.childNodes.length > 0) {\n container.appendChild(oldContainer.childNodes[0]);\n }\n // Step 2: replace the internal container with new container from the react component\n // @ts-ignore\n map._container = container;\n // With maplibre-gl as mapLib, map uses ResizeObserver to observe when its container resizes.\n // When reusing the saved map, we need to disconnect the observer and observe the new container.\n // Step 3: telling the ResizeObserver to disconnect and observe the new container\n // @ts-ignore\n const resizeObserver = map._resizeObserver;\n if (resizeObserver) {\n resizeObserver.disconnect();\n resizeObserver.observe(container);\n }\n // Step 4: apply new props\n that.setProps({ ...props, styleDiffing: false });\n map.resize();\n const { initialViewState } = props;\n if (initialViewState) {\n if (initialViewState.bounds) {\n map.fitBounds(initialViewState.bounds, { ...initialViewState.fitBoundsOptions, duration: 0 });\n }\n else {\n that._updateViewState(initialViewState);\n }\n }\n // Simulate load event\n if (map.isStyleLoaded()) {\n map.fire('load');\n }\n else {\n map.once('style.load', () => map.fire('load'));\n }\n // Force reload\n // @ts-ignore\n map._update();\n return that;\n }\n /* eslint-disable complexity,max-statements */\n _initialize(container) {\n const { props } = this;\n const { mapStyle = DEFAULT_STYLE } = props;\n const mapOptions = {\n ...props,\n ...props.initialViewState,\n container,\n style: normalizeStyle(mapStyle)\n };\n const viewState = mapOptions.initialViewState || mapOptions.viewState || mapOptions;\n Object.assign(mapOptions, {\n center: [viewState.longitude || 0, viewState.latitude || 0],\n zoom: viewState.zoom || 0,\n pitch: viewState.pitch || 0,\n bearing: viewState.bearing || 0\n });\n if (props.gl) {\n // eslint-disable-next-line\n const getContext = HTMLCanvasElement.prototype.getContext;\n // Hijack canvas.getContext to return our own WebGLContext\n // This will be called inside the mapboxgl.Map constructor\n // @ts-expect-error\n HTMLCanvasElement.prototype.getContext = () => {\n // Unhijack immediately\n HTMLCanvasElement.prototype.getContext = getContext;\n return props.gl;\n };\n }\n const map = new this._MapClass(mapOptions);\n // Props that are not part of constructor options\n if (viewState.padding) {\n map.setPadding(viewState.padding);\n }\n if (props.cursor) {\n map.getCanvas().style.cursor = props.cursor;\n }\n // add listeners\n map.transformCameraUpdate = this._onCameraUpdate;\n map.on('style.load', () => {\n // Map style has changed, this would have wiped out all settings from props\n this._styleComponents = {\n light: map.getLight(),\n sky: map.getSky(),\n // @ts-ignore getProjection() does not exist in v4\n projection: map.getProjection?.(),\n terrain: map.getTerrain()\n };\n this._updateStyleComponents(this.props);\n });\n map.on('sourcedata', () => {\n // Some sources have loaded, we may need them to attach terrain\n this._updateStyleComponents(this.props);\n });\n for (const eventName in pointerEvents) {\n map.on(eventName, this._onPointerEvent);\n }\n for (const eventName in cameraEvents) {\n map.on(eventName, this._onCameraEvent);\n }\n for (const eventName in otherEvents) {\n map.on(eventName, this._onEvent);\n }\n this._map = map;\n }\n /* eslint-enable complexity,max-statements */\n recycle() {\n // Clean up unnecessary elements before storing for reuse.\n const container = this.map.getContainer();\n const children = container.querySelector('[mapboxgl-children]');\n children?.remove();\n Maplibre.savedMaps.push(this);\n }\n destroy() {\n this._map.remove();\n }\n // Force redraw the map now. Typically resize() and jumpTo() is reflected in the next\n // render cycle, which is managed by Mapbox's animation loop.\n // This removes the synchronization issue caused by requestAnimationFrame.\n redraw() {\n const map = this._map;\n // map._render will throw error if style does not exist\n // https://github.com/mapbox/mapbox-gl-js/blob/fb9fc316da14e99ff4368f3e4faa3888fb43c513\n // /src/ui/map.js#L1834\n if (map.style) {\n // cancel the scheduled update\n if (map._frame) {\n map._frame.cancel();\n map._frame = null;\n }\n // the order is important - render() may schedule another update\n map._render();\n }\n }\n /* Trigger map resize if size is controlled\n @param {object} nextProps\n @returns {bool} true if size has changed\n */\n _updateSize(nextProps) {\n // Check if size is controlled\n const { viewState } = nextProps;\n if (viewState) {\n const map = this._map;\n if (viewState.width !== map.transform.width || viewState.height !== map.transform.height) {\n map.resize();\n return true;\n }\n }\n return false;\n }\n // Adapted from map.jumpTo\n /* Update camera to match props\n @param {object} nextProps\n @param {bool} triggerEvents - should fire camera events\n @returns {bool} true if anything is changed\n */\n _updateViewState(nextProps) {\n const map = this._map;\n const tr = map.transform;\n const isMoving = map.isMoving();\n // Avoid manipulating the real transform when interaction/animation is ongoing\n // as it would interfere with Mapbox's handlers\n if (!isMoving) {\n const changes = applyViewStateToTransform(tr, nextProps);\n if (Object.keys(changes).length > 0) {\n this._internalUpdate = true;\n map.jumpTo(changes);\n this._internalUpdate = false;\n return true;\n }\n }\n return false;\n }\n /* Update camera constraints and projection settings to match props\n @param {object} nextProps\n @param {object} currProps\n @returns {bool} true if anything is changed\n */\n _updateSettings(nextProps, currProps) {\n const map = this._map;\n let changed = false;\n for (const propName of settingNames) {\n if (propName in nextProps && !deepEqual(nextProps[propName], currProps[propName])) {\n changed = true;\n const setter = map[`set${propName[0].toUpperCase()}${propName.slice(1)}`];\n setter?.call(map, nextProps[propName]);\n }\n }\n return changed;\n }\n /* Update map style to match props */\n _updateStyle(nextProps, currProps) {\n if (nextProps.cursor !== currProps.cursor) {\n this._map.getCanvas().style.cursor = nextProps.cursor || '';\n }\n if (nextProps.mapStyle !== currProps.mapStyle) {\n const { mapStyle = DEFAULT_STYLE, styleDiffing = true } = nextProps;\n const options = {\n diff: styleDiffing\n };\n if ('localIdeographFontFamily' in nextProps) {\n // @ts-ignore Mapbox specific prop\n options.localIdeographFontFamily = nextProps.localIdeographFontFamily;\n }\n this._map.setStyle(normalizeStyle(mapStyle), options);\n }\n }\n /* Update fog, light, projection and terrain to match props\n * These props are special because\n * 1. They can not be applied right away. Certain conditions (style loaded, source loaded, etc.) must be met\n * 2. They can be overwritten by mapStyle\n */\n _updateStyleComponents({ light, projection, sky, terrain }) {\n const map = this._map;\n const currProps = this._styleComponents;\n // We can safely manipulate map style once it's loaded\n if (map.style._loaded) {\n if (light && !deepEqual(light, currProps.light)) {\n currProps.light = light;\n map.setLight(light);\n }\n if (projection &&\n !deepEqual(projection, currProps.projection) &&\n projection !== currProps.projection?.type) {\n currProps.projection = typeof projection === 'string' ? { type: projection } : projection;\n // @ts-ignore setProjection does not exist in v4\n map.setProjection?.(currProps.projection);\n }\n if (sky && !deepEqual(sky, currProps.sky)) {\n currProps.sky = sky;\n map.setSky(sky);\n }\n if (terrain !== undefined && !deepEqual(terrain, currProps.terrain)) {\n if (!terrain || map.getSource(terrain.source)) {\n currProps.terrain = terrain;\n map.setTerrain(terrain);\n }\n }\n }\n }\n /* Update interaction handlers to match props */\n _updateHandlers(nextProps, currProps) {\n const map = this._map;\n for (const propName of handlerNames) {\n const newValue = nextProps[propName] ?? true;\n const oldValue = currProps[propName] ?? true;\n if (!deepEqual(newValue, oldValue)) {\n if (newValue) {\n map[propName].enable(newValue);\n }\n else {\n map[propName].disable();\n }\n }\n }\n }\n _queryRenderedFeatures(point) {\n const map = this._map;\n const { interactiveLayerIds = [] } = this.props;\n try {\n return map.queryRenderedFeatures(point, {\n layers: interactiveLayerIds.filter(map.getLayer.bind(map))\n });\n }\n catch {\n // May fail if style is not loaded\n return [];\n }\n }\n _updateHover(e) {\n const { props } = this;\n const shouldTrackHoveredFeatures = props.interactiveLayerIds && (props.onMouseMove || props.onMouseEnter || props.onMouseLeave);\n if (shouldTrackHoveredFeatures) {\n const eventType = e.type;\n const wasHovering = this._hoveredFeatures?.length > 0;\n const features = this._queryRenderedFeatures(e.point);\n const isHovering = features.length > 0;\n if (!isHovering && wasHovering) {\n e.type = 'mouseleave';\n this._onPointerEvent(e);\n }\n this._hoveredFeatures = features;\n if (isHovering && !wasHovering) {\n e.type = 'mouseenter';\n this._onPointerEvent(e);\n }\n e.type = eventType;\n }\n else {\n this._hoveredFeatures = null;\n }\n }\n}\nMaplibre.savedMaps = [];\nexport default Maplibre;\n//# sourceMappingURL=maplibre.js.map"],"names":["DEFAULT_STYLE","pointerEvents","cameraEvents","otherEvents","settingNames","handlerNames","Maplibre","MapClass","props","container","cb","transformToViewState","tr","applyViewStateToTransform","oldProps","settingsChanged","sizeChanged","viewStateChanged","that","map","oldContainer","resizeObserver","initialViewState","mapStyle","mapOptions","normalizeStyle","viewState","getContext","eventName","nextProps","changes","currProps","changed","propName","deepEqual","styleDiffing","options","light","projection","sky","terrain","newValue","oldValue","point","interactiveLayerIds","e","eventType","wasHovering","features","isHovering"],"mappings":"gHAGMA,EAAgB,CAAE,QAAS,EAAG,QAAS,CAAA,EAAI,OAAQ,EAAC,EACpDC,EAAgB,CAClB,UAAW,cACX,QAAS,YACT,UAAW,cACX,UAAW,cACX,MAAO,UACP,SAAU,aACV,WAAY,eACZ,WAAY,eACZ,SAAU,aACV,YAAa,gBACb,WAAY,eACZ,SAAU,aACV,UAAW,cACX,YAAa,eACjB,EACMC,EAAe,CACjB,UAAW,cACX,KAAM,SACN,QAAS,YACT,UAAW,cACX,KAAM,SACN,QAAS,YACT,UAAW,cACX,KAAM,SACN,QAAS,YACT,YAAa,gBACb,OAAQ,WACR,UAAW,cACX,WAAY,eACZ,MAAO,UACP,SAAU,YACd,EACMC,EAAc,CAChB,MAAO,UACP,aAAc,iBACd,WAAY,eACZ,cAAe,kBACf,OAAQ,WACR,KAAM,SACN,OAAQ,WACR,KAAM,SACN,OAAQ,WACR,KAAM,SACN,UAAW,cACX,WAAY,eACZ,MAAO,SACX,EACMC,EAAe,CACjB,UACA,UACA,WACA,WACA,YACA,aACA,mBACJ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0B,EAAG,CACZ,KAAM,CAAE,MAAArC,GAAU,KAElB,GADmCA,EAAM,sBAAwBA,EAAM,aAAeA,EAAM,cAAgBA,EAAM,cAClF,CAC5B,MAAMsC,EAAYD,EAAE,KACdE,EAAc,KAAK,kBAAkB,OAAS,EAC9CC,EAAW,KAAK,uBAAuBH,EAAE,KAAK,EAC9CI,EAAaD,EAAS,OAAS,EACjC,CAACC,GAAcF,IACfF,EAAE,KAAO,aACT,KAAK,gBAAgBA,CAAC,GAE1B,KAAK,iBAAmBG,EACpBC,GAAc,CAACF,IACfF,EAAE,KAAO,aACT,KAAK,gBAAgBA,CAAC,GAE1BA,EAAE,KAAOC,CACb,MAEI,KAAK,iBAAmB,IAEhC,CACJ,CACAxC,EAAS,UAAY,CAAA","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("./index.cjs37.js");function s(r,t){return r!=null&&e.hasOwnProperty.call(r,t)}module.exports=s;
1
+ "use strict";const s=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function n(r){if(!r)return null;const o=r.map,t={getMap:()=>o};for(const e of i(o))!(e in t)&&!s.includes(e)&&(t[e]=o[e].bind(o));return t}function i(r){const o=new Set;let t=r;for(;t;){for(const e of Object.getOwnPropertyNames(t))e[0]!=="_"&&typeof r[e]=="function"&&e!=="fire"&&e!=="setEventedParent"&&o.add(e);t=Object.getPrototypeOf(t)}return Array.from(o)}module.exports=n;
2
2
  //# sourceMappingURL=index.cjs206.js.map