node-red-contrib-tak-registration 0.16.0 → 0.16.3

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 (1065) hide show
  1. package/node_modules/@turf/along/README.md +3 -1
  2. package/node_modules/@turf/along/dist/cjs/index.cjs +2 -2
  3. package/node_modules/@turf/along/dist/cjs/index.cjs.map +1 -1
  4. package/node_modules/@turf/along/dist/cjs/index.d.cts +1 -1
  5. package/node_modules/@turf/along/dist/esm/index.d.ts +1 -1
  6. package/node_modules/@turf/along/dist/esm/index.js +2 -2
  7. package/node_modules/@turf/along/dist/esm/index.js.map +1 -1
  8. package/node_modules/@turf/along/package.json +12 -12
  9. package/node_modules/@turf/angle/dist/cjs/index.cjs +2 -2
  10. package/node_modules/@turf/angle/dist/cjs/index.cjs.map +1 -1
  11. package/node_modules/@turf/angle/dist/esm/index.js +2 -2
  12. package/node_modules/@turf/angle/dist/esm/index.js.map +1 -1
  13. package/node_modules/@turf/angle/package.json +16 -16
  14. package/node_modules/@turf/area/dist/cjs/index.cjs +2 -2
  15. package/node_modules/@turf/area/dist/cjs/index.cjs.map +1 -1
  16. package/node_modules/@turf/area/dist/esm/index.js +2 -2
  17. package/node_modules/@turf/area/dist/esm/index.js.map +1 -1
  18. package/node_modules/@turf/area/package.json +10 -10
  19. package/node_modules/@turf/bbox/dist/cjs/index.cjs +2 -2
  20. package/node_modules/@turf/bbox/dist/cjs/index.cjs.map +1 -1
  21. package/node_modules/@turf/bbox/dist/esm/index.js +2 -2
  22. package/node_modules/@turf/bbox/dist/esm/index.js.map +1 -1
  23. package/node_modules/@turf/bbox/package.json +9 -9
  24. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs +2 -2
  25. package/node_modules/@turf/bbox-clip/dist/cjs/index.cjs.map +1 -1
  26. package/node_modules/@turf/bbox-clip/dist/esm/index.js +2 -2
  27. package/node_modules/@turf/bbox-clip/dist/esm/index.js.map +1 -1
  28. package/node_modules/@turf/bbox-clip/package.json +11 -11
  29. package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs +2 -2
  30. package/node_modules/@turf/bbox-polygon/dist/cjs/index.cjs.map +1 -1
  31. package/node_modules/@turf/bbox-polygon/dist/esm/index.js +2 -2
  32. package/node_modules/@turf/bbox-polygon/dist/esm/index.js.map +1 -1
  33. package/node_modules/@turf/bbox-polygon/package.json +8 -8
  34. package/node_modules/@turf/bearing/dist/cjs/index.cjs +2 -2
  35. package/node_modules/@turf/bearing/dist/cjs/index.cjs.map +1 -1
  36. package/node_modules/@turf/bearing/dist/esm/index.js +2 -2
  37. package/node_modules/@turf/bearing/dist/esm/index.js.map +1 -1
  38. package/node_modules/@turf/bearing/package.json +11 -11
  39. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +2 -2
  40. package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -1
  41. package/node_modules/@turf/bezier-spline/dist/esm/index.js +2 -2
  42. package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -1
  43. package/node_modules/@turf/bezier-spline/package.json +10 -10
  44. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs +2 -2
  45. package/node_modules/@turf/boolean-clockwise/dist/cjs/index.cjs.map +1 -1
  46. package/node_modules/@turf/boolean-clockwise/dist/esm/index.js +2 -2
  47. package/node_modules/@turf/boolean-clockwise/dist/esm/index.js.map +1 -1
  48. package/node_modules/@turf/boolean-clockwise/package.json +10 -10
  49. package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs +2 -2
  50. package/node_modules/@turf/boolean-concave/dist/cjs/index.cjs.map +1 -1
  51. package/node_modules/@turf/boolean-concave/dist/esm/index.js +2 -2
  52. package/node_modules/@turf/boolean-concave/dist/esm/index.js.map +1 -1
  53. package/node_modules/@turf/boolean-concave/package.json +10 -10
  54. package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs +2 -2
  55. package/node_modules/@turf/boolean-contains/dist/cjs/index.cjs.map +1 -1
  56. package/node_modules/@turf/boolean-contains/dist/esm/index.js +2 -2
  57. package/node_modules/@turf/boolean-contains/dist/esm/index.js.map +1 -1
  58. package/node_modules/@turf/boolean-contains/package.json +13 -13
  59. package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs +2 -2
  60. package/node_modules/@turf/boolean-crosses/dist/cjs/index.cjs.map +1 -1
  61. package/node_modules/@turf/boolean-crosses/dist/esm/index.js +2 -2
  62. package/node_modules/@turf/boolean-crosses/dist/esm/index.js.map +1 -1
  63. package/node_modules/@turf/boolean-crosses/package.json +13 -13
  64. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs +2 -2
  65. package/node_modules/@turf/boolean-disjoint/dist/cjs/index.cjs.map +1 -1
  66. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js +2 -2
  67. package/node_modules/@turf/boolean-disjoint/dist/esm/index.js.map +1 -1
  68. package/node_modules/@turf/boolean-disjoint/package.json +12 -12
  69. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs +2 -2
  70. package/node_modules/@turf/boolean-equal/dist/cjs/index.cjs.map +1 -1
  71. package/node_modules/@turf/boolean-equal/dist/esm/index.js +2 -2
  72. package/node_modules/@turf/boolean-equal/dist/esm/index.js.map +1 -1
  73. package/node_modules/@turf/boolean-equal/package.json +11 -11
  74. package/node_modules/@turf/boolean-intersects/README.md +1 -1
  75. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs +2 -2
  76. package/node_modules/@turf/boolean-intersects/dist/cjs/index.cjs.map +1 -1
  77. package/node_modules/@turf/boolean-intersects/dist/esm/index.js +2 -2
  78. package/node_modules/@turf/boolean-intersects/dist/esm/index.js.map +1 -1
  79. package/node_modules/@turf/boolean-intersects/package.json +10 -10
  80. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs +2 -2
  81. package/node_modules/@turf/boolean-overlap/dist/cjs/index.cjs.map +1 -1
  82. package/node_modules/@turf/boolean-overlap/dist/esm/index.js +2 -2
  83. package/node_modules/@turf/boolean-overlap/dist/esm/index.js.map +1 -1
  84. package/node_modules/@turf/boolean-overlap/package.json +13 -13
  85. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs +2 -2
  86. package/node_modules/@turf/boolean-parallel/dist/cjs/index.cjs.map +1 -1
  87. package/node_modules/@turf/boolean-parallel/dist/esm/index.js +2 -2
  88. package/node_modules/@turf/boolean-parallel/dist/esm/index.js.map +1 -1
  89. package/node_modules/@turf/boolean-parallel/package.json +12 -12
  90. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs +2 -2
  91. package/node_modules/@turf/boolean-point-in-polygon/dist/cjs/index.cjs.map +1 -1
  92. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +2 -2
  93. package/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js.map +1 -1
  94. package/node_modules/@turf/boolean-point-in-polygon/package.json +9 -9
  95. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs +2 -2
  96. package/node_modules/@turf/boolean-point-on-line/dist/cjs/index.cjs.map +1 -1
  97. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js +2 -2
  98. package/node_modules/@turf/boolean-point-on-line/dist/esm/index.js.map +1 -1
  99. package/node_modules/@turf/boolean-point-on-line/package.json +11 -11
  100. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs +2 -2
  101. package/node_modules/@turf/boolean-touches/dist/cjs/index.cjs.map +1 -1
  102. package/node_modules/@turf/boolean-touches/dist/esm/index.js +2 -2
  103. package/node_modules/@turf/boolean-touches/dist/esm/index.js.map +1 -1
  104. package/node_modules/@turf/boolean-touches/package.json +12 -12
  105. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs +2 -2
  106. package/node_modules/@turf/boolean-valid/dist/cjs/index.cjs.map +1 -1
  107. package/node_modules/@turf/boolean-valid/dist/esm/index.js +2 -2
  108. package/node_modules/@turf/boolean-valid/dist/esm/index.js.map +1 -1
  109. package/node_modules/@turf/boolean-valid/package.json +17 -17
  110. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs +2 -2
  111. package/node_modules/@turf/boolean-within/dist/cjs/index.cjs.map +1 -1
  112. package/node_modules/@turf/boolean-within/dist/esm/index.js +2 -2
  113. package/node_modules/@turf/boolean-within/dist/esm/index.js.map +1 -1
  114. package/node_modules/@turf/boolean-within/package.json +13 -13
  115. package/node_modules/@turf/buffer/README.md +3 -3
  116. package/node_modules/@turf/buffer/dist/cjs/index.cjs +2 -2
  117. package/node_modules/@turf/buffer/dist/cjs/index.cjs.map +1 -1
  118. package/node_modules/@turf/buffer/dist/esm/index.js +2 -2
  119. package/node_modules/@turf/buffer/dist/esm/index.js.map +1 -1
  120. package/node_modules/@turf/buffer/package.json +13 -13
  121. package/node_modules/@turf/center/dist/cjs/index.cjs +2 -2
  122. package/node_modules/@turf/center/dist/cjs/index.cjs.map +1 -1
  123. package/node_modules/@turf/center/dist/esm/index.js +2 -2
  124. package/node_modules/@turf/center/dist/esm/index.js.map +1 -1
  125. package/node_modules/@turf/center/package.json +13 -13
  126. package/node_modules/@turf/center-mean/dist/cjs/index.cjs +2 -2
  127. package/node_modules/@turf/center-mean/dist/cjs/index.cjs.map +1 -1
  128. package/node_modules/@turf/center-mean/dist/esm/index.js +2 -2
  129. package/node_modules/@turf/center-mean/dist/esm/index.js.map +1 -1
  130. package/node_modules/@turf/center-mean/package.json +14 -14
  131. package/node_modules/@turf/center-median/dist/cjs/index.cjs +2 -2
  132. package/node_modules/@turf/center-median/dist/cjs/index.cjs.map +1 -1
  133. package/node_modules/@turf/center-median/dist/esm/index.js +2 -2
  134. package/node_modules/@turf/center-median/dist/esm/index.js.map +1 -1
  135. package/node_modules/@turf/center-median/package.json +17 -17
  136. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs +2 -2
  137. package/node_modules/@turf/center-of-mass/dist/cjs/index.cjs.map +1 -1
  138. package/node_modules/@turf/center-of-mass/dist/esm/index.js +2 -2
  139. package/node_modules/@turf/center-of-mass/dist/esm/index.js.map +1 -1
  140. package/node_modules/@turf/center-of-mass/package.json +14 -14
  141. package/node_modules/@turf/centroid/dist/cjs/index.cjs +2 -2
  142. package/node_modules/@turf/centroid/dist/cjs/index.cjs.map +1 -1
  143. package/node_modules/@turf/centroid/dist/esm/index.js +2 -2
  144. package/node_modules/@turf/centroid/dist/esm/index.js.map +1 -1
  145. package/node_modules/@turf/centroid/package.json +11 -11
  146. package/node_modules/@turf/circle/README.md +13 -13
  147. package/node_modules/@turf/circle/dist/cjs/index.cjs +2 -2
  148. package/node_modules/@turf/circle/dist/cjs/index.cjs.map +1 -1
  149. package/node_modules/@turf/circle/dist/cjs/index.d.cts +2 -2
  150. package/node_modules/@turf/circle/dist/esm/index.d.ts +2 -2
  151. package/node_modules/@turf/circle/dist/esm/index.js +2 -2
  152. package/node_modules/@turf/circle/dist/esm/index.js.map +1 -1
  153. package/node_modules/@turf/circle/package.json +11 -11
  154. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs +33 -49
  155. package/node_modules/@turf/clean-coords/dist/cjs/index.cjs.map +1 -1
  156. package/node_modules/@turf/clean-coords/dist/esm/index.js +33 -49
  157. package/node_modules/@turf/clean-coords/dist/esm/index.js.map +1 -1
  158. package/node_modules/@turf/clean-coords/package.json +15 -12
  159. package/node_modules/@turf/clone/dist/cjs/index.cjs +2 -2
  160. package/node_modules/@turf/clone/dist/cjs/index.cjs.map +1 -1
  161. package/node_modules/@turf/clone/dist/esm/index.js +2 -2
  162. package/node_modules/@turf/clone/dist/esm/index.js.map +1 -1
  163. package/node_modules/@turf/clone/package.json +9 -9
  164. package/node_modules/@turf/clusters/package.json +9 -9
  165. package/node_modules/@turf/clusters-dbscan/README.md +2 -2
  166. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs +3 -8
  167. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.cjs.map +1 -1
  168. package/node_modules/@turf/clusters-dbscan/dist/cjs/index.d.cts +1 -1
  169. package/node_modules/@turf/clusters-dbscan/dist/esm/index.d.ts +1 -1
  170. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js +4 -9
  171. package/node_modules/@turf/clusters-dbscan/dist/esm/index.js.map +1 -1
  172. package/node_modules/@turf/clusters-dbscan/package.json +15 -15
  173. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs +2 -2
  174. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.cjs.map +1 -1
  175. package/node_modules/@turf/clusters-kmeans/dist/cjs/index.d.cts +1 -1
  176. package/node_modules/@turf/clusters-kmeans/dist/esm/index.d.ts +1 -1
  177. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js +2 -2
  178. package/node_modules/@turf/clusters-kmeans/dist/esm/index.js.map +1 -1
  179. package/node_modules/@turf/clusters-kmeans/package.json +15 -15
  180. package/node_modules/@turf/collect/dist/cjs/index.cjs +3 -8
  181. package/node_modules/@turf/collect/dist/cjs/index.cjs.map +1 -1
  182. package/node_modules/@turf/collect/dist/esm/index.js +3 -8
  183. package/node_modules/@turf/collect/dist/esm/index.js.map +1 -1
  184. package/node_modules/@turf/collect/package.json +11 -11
  185. package/node_modules/@turf/combine/dist/cjs/index.cjs +2 -2
  186. package/node_modules/@turf/combine/dist/cjs/index.cjs.map +1 -1
  187. package/node_modules/@turf/combine/dist/esm/index.js +2 -2
  188. package/node_modules/@turf/combine/dist/esm/index.js.map +1 -1
  189. package/node_modules/@turf/combine/package.json +9 -9
  190. package/node_modules/@turf/concave/README.md +2 -2
  191. package/node_modules/@turf/concave/dist/cjs/index.cjs +2 -2
  192. package/node_modules/@turf/concave/dist/cjs/index.cjs.map +1 -1
  193. package/node_modules/@turf/concave/dist/cjs/index.d.cts +1 -1
  194. package/node_modules/@turf/concave/dist/esm/index.d.ts +1 -1
  195. package/node_modules/@turf/concave/dist/esm/index.js +2 -2
  196. package/node_modules/@turf/concave/dist/esm/index.js.map +1 -1
  197. package/node_modules/@turf/concave/package.json +14 -14
  198. package/node_modules/@turf/convex/dist/cjs/index.cjs +2 -2
  199. package/node_modules/@turf/convex/dist/cjs/index.cjs.map +1 -1
  200. package/node_modules/@turf/convex/dist/esm/index.js +2 -2
  201. package/node_modules/@turf/convex/dist/esm/index.js.map +1 -1
  202. package/node_modules/@turf/convex/package.json +11 -11
  203. package/node_modules/@turf/destination/README.md +2 -2
  204. package/node_modules/@turf/destination/dist/cjs/index.cjs +5 -2
  205. package/node_modules/@turf/destination/dist/cjs/index.cjs.map +1 -1
  206. package/node_modules/@turf/destination/dist/cjs/index.d.cts +1 -1
  207. package/node_modules/@turf/destination/dist/esm/index.d.ts +1 -1
  208. package/node_modules/@turf/destination/dist/esm/index.js +5 -2
  209. package/node_modules/@turf/destination/dist/esm/index.js.map +1 -1
  210. package/node_modules/@turf/destination/package.json +14 -11
  211. package/node_modules/@turf/difference/dist/cjs/index.cjs +2 -2
  212. package/node_modules/@turf/difference/dist/cjs/index.cjs.map +1 -1
  213. package/node_modules/@turf/difference/dist/esm/index.js +2 -2
  214. package/node_modules/@turf/difference/dist/esm/index.js.map +1 -1
  215. package/node_modules/@turf/difference/package.json +11 -11
  216. package/node_modules/@turf/dissolve/dist/cjs/index.cjs +2 -2
  217. package/node_modules/@turf/dissolve/dist/cjs/index.cjs.map +1 -1
  218. package/node_modules/@turf/dissolve/dist/esm/index.js +2 -2
  219. package/node_modules/@turf/dissolve/dist/esm/index.js.map +1 -1
  220. package/node_modules/@turf/dissolve/package.json +12 -12
  221. package/node_modules/@turf/distance/README.md +2 -2
  222. package/node_modules/@turf/distance/dist/cjs/index.cjs +2 -2
  223. package/node_modules/@turf/distance/dist/cjs/index.cjs.map +1 -1
  224. package/node_modules/@turf/distance/dist/cjs/index.d.cts +1 -1
  225. package/node_modules/@turf/distance/dist/esm/index.d.ts +1 -1
  226. package/node_modules/@turf/distance/dist/esm/index.js +2 -2
  227. package/node_modules/@turf/distance/dist/esm/index.js.map +1 -1
  228. package/node_modules/@turf/distance/package.json +10 -10
  229. package/node_modules/@turf/distance-weight/dist/cjs/index.cjs +2 -2
  230. package/node_modules/@turf/distance-weight/dist/cjs/index.cjs.map +1 -1
  231. package/node_modules/@turf/distance-weight/dist/esm/index.js +2 -2
  232. package/node_modules/@turf/distance-weight/dist/esm/index.js.map +1 -1
  233. package/node_modules/@turf/distance-weight/package.json +12 -12
  234. package/node_modules/@turf/ellipse/README.md +2 -2
  235. package/node_modules/@turf/ellipse/dist/cjs/index.cjs +62 -39
  236. package/node_modules/@turf/ellipse/dist/cjs/index.cjs.map +1 -1
  237. package/node_modules/@turf/ellipse/dist/cjs/index.d.cts +1 -1
  238. package/node_modules/@turf/ellipse/dist/esm/index.d.ts +1 -1
  239. package/node_modules/@turf/ellipse/dist/esm/index.js +64 -41
  240. package/node_modules/@turf/ellipse/dist/esm/index.js.map +1 -1
  241. package/node_modules/@turf/ellipse/package.json +21 -18
  242. package/node_modules/@turf/envelope/dist/cjs/index.cjs +2 -2
  243. package/node_modules/@turf/envelope/dist/cjs/index.cjs.map +1 -1
  244. package/node_modules/@turf/envelope/dist/esm/index.js +2 -2
  245. package/node_modules/@turf/envelope/dist/esm/index.js.map +1 -1
  246. package/node_modules/@turf/envelope/package.json +10 -10
  247. package/node_modules/@turf/explode/dist/cjs/index.cjs +2 -2
  248. package/node_modules/@turf/explode/dist/cjs/index.cjs.map +1 -1
  249. package/node_modules/@turf/explode/dist/esm/index.js +2 -2
  250. package/node_modules/@turf/explode/dist/esm/index.js.map +1 -1
  251. package/node_modules/@turf/explode/package.json +10 -10
  252. package/node_modules/@turf/flatten/dist/cjs/index.cjs +2 -2
  253. package/node_modules/@turf/flatten/dist/cjs/index.cjs.map +1 -1
  254. package/node_modules/@turf/flatten/dist/esm/index.js +2 -2
  255. package/node_modules/@turf/flatten/dist/esm/index.js.map +1 -1
  256. package/node_modules/@turf/flatten/package.json +10 -10
  257. package/node_modules/@turf/flip/dist/cjs/index.cjs +2 -2
  258. package/node_modules/@turf/flip/dist/cjs/index.cjs.map +1 -1
  259. package/node_modules/@turf/flip/dist/esm/index.js +2 -2
  260. package/node_modules/@turf/flip/dist/esm/index.js.map +1 -1
  261. package/node_modules/@turf/flip/package.json +11 -11
  262. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs +2 -2
  263. package/node_modules/@turf/geojson-rbush/dist/cjs/index.cjs.map +1 -1
  264. package/node_modules/@turf/geojson-rbush/dist/esm/index.js +2 -2
  265. package/node_modules/@turf/geojson-rbush/dist/esm/index.js.map +1 -1
  266. package/node_modules/@turf/geojson-rbush/package.json +12 -12
  267. package/node_modules/@turf/great-circle/dist/cjs/index.cjs +3 -3
  268. package/node_modules/@turf/great-circle/dist/cjs/index.cjs.map +1 -1
  269. package/node_modules/@turf/great-circle/dist/esm/index.js +3 -3
  270. package/node_modules/@turf/great-circle/dist/esm/index.js.map +1 -1
  271. package/node_modules/@turf/great-circle/package.json +10 -10
  272. package/node_modules/@turf/helpers/README.md +1 -1
  273. package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -1
  274. package/node_modules/@turf/helpers/dist/cjs/index.d.cts +1 -1
  275. package/node_modules/@turf/helpers/dist/esm/index.d.ts +1 -1
  276. package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -1
  277. package/node_modules/@turf/helpers/package.json +7 -7
  278. package/node_modules/@turf/hex-grid/README.md +7 -5
  279. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs +2 -2
  280. package/node_modules/@turf/hex-grid/dist/cjs/index.cjs.map +1 -1
  281. package/node_modules/@turf/hex-grid/dist/cjs/index.d.cts +4 -4
  282. package/node_modules/@turf/hex-grid/dist/esm/index.d.ts +4 -4
  283. package/node_modules/@turf/hex-grid/dist/esm/index.js +2 -2
  284. package/node_modules/@turf/hex-grid/dist/esm/index.js.map +1 -1
  285. package/node_modules/@turf/hex-grid/package.json +14 -14
  286. package/node_modules/@turf/interpolate/README.md +7 -5
  287. package/node_modules/@turf/interpolate/dist/cjs/index.cjs +2 -2
  288. package/node_modules/@turf/interpolate/dist/cjs/index.cjs.map +1 -1
  289. package/node_modules/@turf/interpolate/dist/esm/index.js +2 -2
  290. package/node_modules/@turf/interpolate/dist/esm/index.js.map +1 -1
  291. package/node_modules/@turf/interpolate/package.json +19 -19
  292. package/node_modules/@turf/intersect/dist/cjs/index.cjs +2 -2
  293. package/node_modules/@turf/intersect/dist/cjs/index.cjs.map +1 -1
  294. package/node_modules/@turf/intersect/dist/esm/index.js +2 -2
  295. package/node_modules/@turf/intersect/dist/esm/index.js.map +1 -1
  296. package/node_modules/@turf/intersect/package.json +11 -11
  297. package/node_modules/@turf/invariant/package.json +8 -8
  298. package/node_modules/@turf/isobands/README.md +1 -1
  299. package/node_modules/@turf/isobands/dist/cjs/index.cjs +313 -9
  300. package/node_modules/@turf/isobands/dist/cjs/index.cjs.map +1 -1
  301. package/node_modules/@turf/isobands/dist/cjs/index.d.cts +1 -1
  302. package/node_modules/@turf/isobands/dist/esm/index.d.ts +1 -1
  303. package/node_modules/@turf/isobands/dist/esm/index.js +313 -9
  304. package/node_modules/@turf/isobands/dist/esm/index.js.map +1 -1
  305. package/node_modules/@turf/isobands/package.json +22 -22
  306. package/node_modules/@turf/isolines/README.md +1 -1
  307. package/node_modules/@turf/isolines/dist/cjs/index.cjs +192 -7
  308. package/node_modules/@turf/isolines/dist/cjs/index.cjs.map +1 -1
  309. package/node_modules/@turf/isolines/dist/cjs/index.d.cts +1 -1
  310. package/node_modules/@turf/isolines/dist/esm/index.d.ts +1 -1
  311. package/node_modules/@turf/isolines/dist/esm/index.js +192 -7
  312. package/node_modules/@turf/isolines/dist/esm/index.js.map +1 -1
  313. package/node_modules/@turf/isolines/package.json +19 -19
  314. package/node_modules/@turf/kinks/dist/cjs/index.cjs +2 -2
  315. package/node_modules/@turf/kinks/dist/cjs/index.cjs.map +1 -1
  316. package/node_modules/@turf/kinks/dist/esm/index.js +2 -2
  317. package/node_modules/@turf/kinks/dist/esm/index.js.map +1 -1
  318. package/node_modules/@turf/kinks/package.json +10 -10
  319. package/node_modules/@turf/length/README.md +2 -2
  320. package/node_modules/@turf/length/dist/cjs/index.cjs +2 -2
  321. package/node_modules/@turf/length/dist/cjs/index.cjs.map +1 -1
  322. package/node_modules/@turf/length/dist/cjs/index.d.cts +1 -1
  323. package/node_modules/@turf/length/dist/esm/index.d.ts +1 -1
  324. package/node_modules/@turf/length/dist/esm/index.js +2 -2
  325. package/node_modules/@turf/length/dist/esm/index.js.map +1 -1
  326. package/node_modules/@turf/length/package.json +11 -11
  327. package/node_modules/@turf/line-arc/README.md +2 -2
  328. package/node_modules/@turf/line-arc/dist/cjs/index.cjs +2 -2
  329. package/node_modules/@turf/line-arc/dist/cjs/index.cjs.map +1 -1
  330. package/node_modules/@turf/line-arc/dist/cjs/index.d.cts +1 -1
  331. package/node_modules/@turf/line-arc/dist/esm/index.d.ts +1 -1
  332. package/node_modules/@turf/line-arc/dist/esm/index.js +2 -2
  333. package/node_modules/@turf/line-arc/dist/esm/index.js.map +1 -1
  334. package/node_modules/@turf/line-arc/package.json +12 -12
  335. package/node_modules/@turf/line-chunk/README.md +2 -2
  336. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs +2 -2
  337. package/node_modules/@turf/line-chunk/dist/cjs/index.cjs.map +1 -1
  338. package/node_modules/@turf/line-chunk/dist/esm/index.js +2 -2
  339. package/node_modules/@turf/line-chunk/dist/esm/index.js.map +1 -1
  340. package/node_modules/@turf/line-chunk/package.json +12 -12
  341. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs +2 -2
  342. package/node_modules/@turf/line-intersect/dist/cjs/index.cjs.map +1 -1
  343. package/node_modules/@turf/line-intersect/dist/esm/index.js +2 -2
  344. package/node_modules/@turf/line-intersect/dist/esm/index.js.map +1 -1
  345. package/node_modules/@turf/line-intersect/package.json +10 -10
  346. package/node_modules/@turf/line-offset/README.md +2 -2
  347. package/node_modules/@turf/line-offset/dist/cjs/index.cjs +2 -2
  348. package/node_modules/@turf/line-offset/dist/cjs/index.cjs.map +1 -1
  349. package/node_modules/@turf/line-offset/dist/esm/index.js +2 -2
  350. package/node_modules/@turf/line-offset/dist/esm/index.js.map +1 -1
  351. package/node_modules/@turf/line-offset/package.json +11 -11
  352. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs +2 -2
  353. package/node_modules/@turf/line-overlap/dist/cjs/index.cjs.map +1 -1
  354. package/node_modules/@turf/line-overlap/dist/esm/index.js +2 -2
  355. package/node_modules/@turf/line-overlap/dist/esm/index.js.map +1 -1
  356. package/node_modules/@turf/line-overlap/package.json +15 -15
  357. package/node_modules/@turf/line-segment/dist/cjs/index.cjs +2 -2
  358. package/node_modules/@turf/line-segment/dist/cjs/index.cjs.map +1 -1
  359. package/node_modules/@turf/line-segment/dist/esm/index.js +2 -2
  360. package/node_modules/@turf/line-segment/dist/esm/index.js.map +1 -1
  361. package/node_modules/@turf/line-segment/package.json +11 -11
  362. package/node_modules/@turf/line-slice/dist/cjs/index.cjs +2 -2
  363. package/node_modules/@turf/line-slice/dist/cjs/index.cjs.map +1 -1
  364. package/node_modules/@turf/line-slice/dist/esm/index.js +2 -2
  365. package/node_modules/@turf/line-slice/dist/esm/index.js.map +1 -1
  366. package/node_modules/@turf/line-slice/package.json +11 -11
  367. package/node_modules/@turf/line-slice-along/README.md +2 -2
  368. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs +2 -2
  369. package/node_modules/@turf/line-slice-along/dist/cjs/index.cjs.map +1 -1
  370. package/node_modules/@turf/line-slice-along/dist/esm/index.js +2 -2
  371. package/node_modules/@turf/line-slice-along/dist/esm/index.js.map +1 -1
  372. package/node_modules/@turf/line-slice-along/package.json +12 -12
  373. package/node_modules/@turf/line-split/README.md +4 -1
  374. package/node_modules/@turf/line-split/dist/cjs/index.cjs +2 -7
  375. package/node_modules/@turf/line-split/dist/cjs/index.cjs.map +1 -1
  376. package/node_modules/@turf/line-split/dist/esm/index.js +2 -7
  377. package/node_modules/@turf/line-split/dist/esm/index.js.map +1 -1
  378. package/node_modules/@turf/line-split/package.json +16 -17
  379. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs +2 -2
  380. package/node_modules/@turf/line-to-polygon/dist/cjs/index.cjs.map +1 -1
  381. package/node_modules/@turf/line-to-polygon/dist/esm/index.js +2 -2
  382. package/node_modules/@turf/line-to-polygon/dist/esm/index.js.map +1 -1
  383. package/node_modules/@turf/line-to-polygon/package.json +12 -12
  384. package/node_modules/@turf/mask/dist/cjs/index.cjs +2 -2
  385. package/node_modules/@turf/mask/dist/cjs/index.cjs.map +1 -1
  386. package/node_modules/@turf/mask/dist/esm/index.js +2 -2
  387. package/node_modules/@turf/mask/dist/esm/index.js.map +1 -1
  388. package/node_modules/@turf/mask/package.json +10 -10
  389. package/node_modules/@turf/meta/package.json +7 -7
  390. package/node_modules/@turf/midpoint/dist/cjs/index.cjs +2 -2
  391. package/node_modules/@turf/midpoint/dist/cjs/index.cjs.map +1 -1
  392. package/node_modules/@turf/midpoint/dist/esm/index.js +2 -2
  393. package/node_modules/@turf/midpoint/dist/esm/index.js.map +1 -1
  394. package/node_modules/@turf/midpoint/package.json +11 -11
  395. package/node_modules/@turf/moran-index/dist/cjs/index.cjs +2 -2
  396. package/node_modules/@turf/moran-index/dist/cjs/index.cjs.map +1 -1
  397. package/node_modules/@turf/moran-index/dist/esm/index.js +2 -2
  398. package/node_modules/@turf/moran-index/dist/esm/index.js.map +1 -1
  399. package/node_modules/@turf/moran-index/package.json +11 -11
  400. package/node_modules/@turf/nearest-neighbor-analysis/README.md +1 -1
  401. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs +2 -2
  402. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.cjs.map +1 -1
  403. package/node_modules/@turf/nearest-neighbor-analysis/dist/cjs/index.d.cts +2 -2
  404. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.d.ts +2 -2
  405. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js +2 -2
  406. package/node_modules/@turf/nearest-neighbor-analysis/dist/esm/index.js.map +1 -1
  407. package/node_modules/@turf/nearest-neighbor-analysis/package.json +17 -17
  408. package/node_modules/@turf/nearest-point/README.md +2 -2
  409. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs +2 -2
  410. package/node_modules/@turf/nearest-point/dist/cjs/index.cjs.map +1 -1
  411. package/node_modules/@turf/nearest-point/dist/cjs/index.d.cts +6 -7
  412. package/node_modules/@turf/nearest-point/dist/esm/index.d.ts +6 -7
  413. package/node_modules/@turf/nearest-point/dist/esm/index.js +2 -2
  414. package/node_modules/@turf/nearest-point/dist/esm/index.js.map +1 -1
  415. package/node_modules/@turf/nearest-point/package.json +12 -12
  416. package/node_modules/@turf/nearest-point-on-line/README.md +6 -2
  417. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs +45 -52
  418. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.cjs.map +1 -1
  419. package/node_modules/@turf/nearest-point-on-line/dist/cjs/index.d.cts +5 -1
  420. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.d.ts +5 -1
  421. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js +45 -52
  422. package/node_modules/@turf/nearest-point-on-line/dist/esm/index.js.map +1 -1
  423. package/node_modules/@turf/nearest-point-on-line/package.json +20 -15
  424. package/node_modules/@turf/nearest-point-to-line/README.md +2 -2
  425. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs +2 -2
  426. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.cjs.map +1 -1
  427. package/node_modules/@turf/nearest-point-to-line/dist/cjs/index.d.cts +1 -1
  428. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.d.ts +1 -1
  429. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js +2 -2
  430. package/node_modules/@turf/nearest-point-to-line/dist/esm/index.js.map +1 -1
  431. package/node_modules/@turf/nearest-point-to-line/package.json +14 -14
  432. package/node_modules/@turf/planepoint/dist/cjs/index.cjs +2 -2
  433. package/node_modules/@turf/planepoint/dist/cjs/index.cjs.map +1 -1
  434. package/node_modules/@turf/planepoint/dist/esm/index.js +2 -2
  435. package/node_modules/@turf/planepoint/dist/esm/index.js.map +1 -1
  436. package/node_modules/@turf/planepoint/package.json +9 -9
  437. package/node_modules/@turf/point-grid/dist/cjs/index.cjs +2 -2
  438. package/node_modules/@turf/point-grid/dist/cjs/index.cjs.map +1 -1
  439. package/node_modules/@turf/point-grid/dist/esm/index.js +2 -2
  440. package/node_modules/@turf/point-grid/dist/esm/index.js.map +1 -1
  441. package/node_modules/@turf/point-grid/package.json +14 -14
  442. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs +2 -2
  443. package/node_modules/@turf/point-on-feature/dist/cjs/index.cjs.map +1 -1
  444. package/node_modules/@turf/point-on-feature/dist/esm/index.js +2 -2
  445. package/node_modules/@turf/point-on-feature/dist/esm/index.js.map +1 -1
  446. package/node_modules/@turf/point-on-feature/package.json +15 -15
  447. package/node_modules/@turf/point-to-line-distance/README.md +5 -4
  448. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs +2 -2
  449. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.cjs.map +1 -1
  450. package/node_modules/@turf/point-to-line-distance/dist/cjs/index.d.cts +1 -2
  451. package/node_modules/@turf/point-to-line-distance/dist/esm/index.d.ts +1 -2
  452. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js +2 -2
  453. package/node_modules/@turf/point-to-line-distance/dist/esm/index.js.map +1 -1
  454. package/node_modules/@turf/point-to-line-distance/package.json +18 -18
  455. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs +3 -3
  456. package/node_modules/@turf/point-to-polygon-distance/dist/cjs/index.cjs.map +1 -1
  457. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js +3 -3
  458. package/node_modules/@turf/point-to-polygon-distance/dist/esm/index.js.map +1 -1
  459. package/node_modules/@turf/point-to-polygon-distance/package.json +14 -14
  460. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs +2 -2
  461. package/node_modules/@turf/points-within-polygon/dist/cjs/index.cjs.map +1 -1
  462. package/node_modules/@turf/points-within-polygon/dist/esm/index.js +2 -2
  463. package/node_modules/@turf/points-within-polygon/dist/esm/index.js.map +1 -1
  464. package/node_modules/@turf/points-within-polygon/package.json +10 -10
  465. package/node_modules/@turf/polygon-smooth/README.md +1 -1
  466. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs +2 -2
  467. package/node_modules/@turf/polygon-smooth/dist/cjs/index.cjs.map +1 -1
  468. package/node_modules/@turf/polygon-smooth/dist/cjs/index.d.cts +1 -1
  469. package/node_modules/@turf/polygon-smooth/dist/esm/index.d.ts +1 -1
  470. package/node_modules/@turf/polygon-smooth/dist/esm/index.js +2 -2
  471. package/node_modules/@turf/polygon-smooth/dist/esm/index.js.map +1 -1
  472. package/node_modules/@turf/polygon-smooth/package.json +11 -11
  473. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs +2 -2
  474. package/node_modules/@turf/polygon-tangents/dist/cjs/index.cjs.map +1 -1
  475. package/node_modules/@turf/polygon-tangents/dist/esm/index.js +2 -2
  476. package/node_modules/@turf/polygon-tangents/dist/esm/index.js.map +1 -1
  477. package/node_modules/@turf/polygon-tangents/package.json +14 -14
  478. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs +2 -2
  479. package/node_modules/@turf/polygon-to-line/dist/cjs/index.cjs.map +1 -1
  480. package/node_modules/@turf/polygon-to-line/dist/esm/index.js +2 -2
  481. package/node_modules/@turf/polygon-to-line/dist/esm/index.js.map +1 -1
  482. package/node_modules/@turf/polygon-to-line/package.json +10 -10
  483. package/node_modules/@turf/polygonize/dist/cjs/index.cjs +2 -2
  484. package/node_modules/@turf/polygonize/dist/cjs/index.cjs.map +1 -1
  485. package/node_modules/@turf/polygonize/dist/esm/index.js +2 -2
  486. package/node_modules/@turf/polygonize/dist/esm/index.js.map +1 -1
  487. package/node_modules/@turf/polygonize/package.json +13 -13
  488. package/node_modules/@turf/projection/package.json +12 -12
  489. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs +2 -2
  490. package/node_modules/@turf/quadrat-analysis/dist/cjs/index.cjs.map +1 -1
  491. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js +2 -2
  492. package/node_modules/@turf/quadrat-analysis/dist/esm/index.js.map +1 -1
  493. package/node_modules/@turf/quadrat-analysis/package.json +18 -18
  494. package/node_modules/@turf/random/package.json +9 -9
  495. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs +2 -2
  496. package/node_modules/@turf/rectangle-grid/dist/cjs/index.cjs.map +1 -1
  497. package/node_modules/@turf/rectangle-grid/dist/esm/index.js +2 -2
  498. package/node_modules/@turf/rectangle-grid/dist/esm/index.js.map +1 -1
  499. package/node_modules/@turf/rectangle-grid/package.json +13 -13
  500. package/node_modules/@turf/rewind/dist/cjs/index.cjs +2 -2
  501. package/node_modules/@turf/rewind/dist/cjs/index.cjs.map +1 -1
  502. package/node_modules/@turf/rewind/dist/esm/index.js +2 -2
  503. package/node_modules/@turf/rewind/dist/esm/index.js.map +1 -1
  504. package/node_modules/@turf/rewind/package.json +13 -13
  505. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs +2 -2
  506. package/node_modules/@turf/rhumb-bearing/dist/cjs/index.cjs.map +1 -1
  507. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js +2 -2
  508. package/node_modules/@turf/rhumb-bearing/dist/esm/index.js.map +1 -1
  509. package/node_modules/@turf/rhumb-bearing/package.json +11 -11
  510. package/node_modules/@turf/rhumb-destination/README.md +2 -2
  511. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs +2 -2
  512. package/node_modules/@turf/rhumb-destination/dist/cjs/index.cjs.map +1 -1
  513. package/node_modules/@turf/rhumb-destination/dist/cjs/index.d.cts +1 -1
  514. package/node_modules/@turf/rhumb-destination/dist/esm/index.d.ts +1 -1
  515. package/node_modules/@turf/rhumb-destination/dist/esm/index.js +2 -2
  516. package/node_modules/@turf/rhumb-destination/dist/esm/index.js.map +1 -1
  517. package/node_modules/@turf/rhumb-destination/package.json +11 -11
  518. package/node_modules/@turf/rhumb-distance/README.md +8 -9
  519. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs +2 -2
  520. package/node_modules/@turf/rhumb-distance/dist/cjs/index.cjs.map +1 -1
  521. package/node_modules/@turf/rhumb-distance/dist/cjs/index.d.cts +2 -3
  522. package/node_modules/@turf/rhumb-distance/dist/esm/index.d.ts +2 -3
  523. package/node_modules/@turf/rhumb-distance/dist/esm/index.js +2 -2
  524. package/node_modules/@turf/rhumb-distance/dist/esm/index.js.map +1 -1
  525. package/node_modules/@turf/rhumb-distance/package.json +11 -11
  526. package/node_modules/@turf/sample/dist/cjs/index.cjs +2 -2
  527. package/node_modules/@turf/sample/dist/cjs/index.cjs.map +1 -1
  528. package/node_modules/@turf/sample/dist/esm/index.js +2 -2
  529. package/node_modules/@turf/sample/dist/esm/index.js.map +1 -1
  530. package/node_modules/@turf/sample/package.json +8 -8
  531. package/node_modules/@turf/sector/README.md +2 -2
  532. package/node_modules/@turf/sector/dist/cjs/index.cjs +2 -2
  533. package/node_modules/@turf/sector/dist/cjs/index.cjs.map +1 -1
  534. package/node_modules/@turf/sector/dist/cjs/index.d.cts +1 -1
  535. package/node_modules/@turf/sector/dist/esm/index.d.ts +1 -1
  536. package/node_modules/@turf/sector/dist/esm/index.js +2 -2
  537. package/node_modules/@turf/sector/dist/esm/index.js.map +1 -1
  538. package/node_modules/@turf/sector/package.json +14 -14
  539. package/node_modules/@turf/shortest-path/README.md +5 -3
  540. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs +10 -14
  541. package/node_modules/@turf/shortest-path/dist/cjs/index.cjs.map +1 -1
  542. package/node_modules/@turf/shortest-path/dist/cjs/index.d.cts +1 -1
  543. package/node_modules/@turf/shortest-path/dist/esm/index.d.ts +1 -1
  544. package/node_modules/@turf/shortest-path/dist/esm/index.js +10 -14
  545. package/node_modules/@turf/shortest-path/dist/esm/index.js.map +1 -1
  546. package/node_modules/@turf/shortest-path/package.json +20 -19
  547. package/node_modules/@turf/simplify/README.md +13 -13
  548. package/node_modules/@turf/simplify/dist/cjs/index.cjs +6 -3
  549. package/node_modules/@turf/simplify/dist/cjs/index.cjs.map +1 -1
  550. package/node_modules/@turf/simplify/dist/cjs/index.d.cts +11 -12
  551. package/node_modules/@turf/simplify/dist/esm/index.d.ts +11 -12
  552. package/node_modules/@turf/simplify/dist/esm/index.js +6 -3
  553. package/node_modules/@turf/simplify/dist/esm/index.js.map +1 -1
  554. package/node_modules/@turf/simplify/package.json +13 -13
  555. package/node_modules/@turf/square/dist/cjs/index.cjs +2 -2
  556. package/node_modules/@turf/square/dist/cjs/index.cjs.map +1 -1
  557. package/node_modules/@turf/square/dist/esm/index.js +2 -2
  558. package/node_modules/@turf/square/dist/esm/index.js.map +1 -1
  559. package/node_modules/@turf/square/package.json +9 -9
  560. package/node_modules/@turf/square-grid/dist/cjs/index.cjs +2 -2
  561. package/node_modules/@turf/square-grid/dist/cjs/index.cjs.map +1 -1
  562. package/node_modules/@turf/square-grid/dist/esm/index.js +2 -2
  563. package/node_modules/@turf/square-grid/dist/esm/index.js.map +1 -1
  564. package/node_modules/@turf/square-grid/package.json +12 -12
  565. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs +2 -2
  566. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.cjs.map +1 -1
  567. package/node_modules/@turf/standard-deviational-ellipse/dist/cjs/index.d.cts +1 -1
  568. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.d.ts +1 -1
  569. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js +2 -2
  570. package/node_modules/@turf/standard-deviational-ellipse/dist/esm/index.js.map +1 -1
  571. package/node_modules/@turf/standard-deviational-ellipse/package.json +16 -16
  572. package/node_modules/@turf/tag/dist/cjs/index.cjs +2 -2
  573. package/node_modules/@turf/tag/dist/cjs/index.cjs.map +1 -1
  574. package/node_modules/@turf/tag/dist/esm/index.js +2 -2
  575. package/node_modules/@turf/tag/dist/esm/index.js.map +1 -1
  576. package/node_modules/@turf/tag/package.json +11 -11
  577. package/node_modules/@turf/tesselate/dist/cjs/index.cjs +2 -2
  578. package/node_modules/@turf/tesselate/dist/cjs/index.cjs.map +1 -1
  579. package/node_modules/@turf/tesselate/dist/esm/index.js +2 -2
  580. package/node_modules/@turf/tesselate/dist/esm/index.js.map +1 -1
  581. package/node_modules/@turf/tesselate/package.json +8 -8
  582. package/node_modules/@turf/tin/dist/cjs/index.cjs +2 -2
  583. package/node_modules/@turf/tin/dist/cjs/index.cjs.map +1 -1
  584. package/node_modules/@turf/tin/dist/esm/index.js +2 -2
  585. package/node_modules/@turf/tin/dist/esm/index.js.map +1 -1
  586. package/node_modules/@turf/tin/package.json +8 -8
  587. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs +2 -2
  588. package/node_modules/@turf/transform-rotate/dist/cjs/index.cjs.map +1 -1
  589. package/node_modules/@turf/transform-rotate/dist/esm/index.js +2 -2
  590. package/node_modules/@turf/transform-rotate/dist/esm/index.js.map +1 -1
  591. package/node_modules/@turf/transform-rotate/package.json +17 -17
  592. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs +2 -2
  593. package/node_modules/@turf/transform-scale/dist/cjs/index.cjs.map +1 -1
  594. package/node_modules/@turf/transform-scale/dist/esm/index.js +2 -2
  595. package/node_modules/@turf/transform-scale/dist/esm/index.js.map +1 -1
  596. package/node_modules/@turf/transform-scale/package.json +21 -21
  597. package/node_modules/@turf/transform-translate/README.md +8 -3
  598. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs +2 -2
  599. package/node_modules/@turf/transform-translate/dist/cjs/index.cjs.map +1 -1
  600. package/node_modules/@turf/transform-translate/dist/cjs/index.d.cts +4 -1
  601. package/node_modules/@turf/transform-translate/dist/esm/index.d.ts +4 -1
  602. package/node_modules/@turf/transform-translate/dist/esm/index.js +2 -2
  603. package/node_modules/@turf/transform-translate/dist/esm/index.js.map +1 -1
  604. package/node_modules/@turf/transform-translate/package.json +14 -14
  605. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs +2 -2
  606. package/node_modules/@turf/triangle-grid/dist/cjs/index.cjs.map +1 -1
  607. package/node_modules/@turf/triangle-grid/dist/esm/index.js +2 -2
  608. package/node_modules/@turf/triangle-grid/dist/esm/index.js.map +1 -1
  609. package/node_modules/@turf/triangle-grid/package.json +13 -13
  610. package/node_modules/@turf/truncate/dist/cjs/index.cjs +2 -2
  611. package/node_modules/@turf/truncate/dist/cjs/index.cjs.map +1 -1
  612. package/node_modules/@turf/truncate/dist/esm/index.js +2 -2
  613. package/node_modules/@turf/truncate/dist/esm/index.js.map +1 -1
  614. package/node_modules/@turf/truncate/package.json +10 -10
  615. package/node_modules/@turf/turf/package.json +125 -125
  616. package/node_modules/@turf/turf/turf.min.js +2 -11
  617. package/node_modules/@turf/union/dist/cjs/index.cjs +2 -2
  618. package/node_modules/@turf/union/dist/cjs/index.cjs.map +1 -1
  619. package/node_modules/@turf/union/dist/esm/index.js +2 -2
  620. package/node_modules/@turf/union/dist/esm/index.js.map +1 -1
  621. package/node_modules/@turf/union/package.json +11 -11
  622. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs +2 -2
  623. package/node_modules/@turf/unkink-polygon/dist/cjs/index.cjs.map +1 -1
  624. package/node_modules/@turf/unkink-polygon/dist/esm/index.js +2 -2
  625. package/node_modules/@turf/unkink-polygon/dist/esm/index.js.map +1 -1
  626. package/node_modules/@turf/unkink-polygon/package.json +13 -13
  627. package/node_modules/@turf/voronoi/dist/cjs/index.cjs +2 -2
  628. package/node_modules/@turf/voronoi/dist/cjs/index.cjs.map +1 -1
  629. package/node_modules/@turf/voronoi/dist/esm/index.js +2 -2
  630. package/node_modules/@turf/voronoi/dist/esm/index.js.map +1 -1
  631. package/node_modules/@turf/voronoi/package.json +12 -12
  632. package/node_modules/@types/node/README.md +2 -2
  633. package/node_modules/@types/node/assert/strict.d.ts +105 -2
  634. package/node_modules/@types/node/assert.d.ts +162 -101
  635. package/node_modules/@types/node/async_hooks.d.ts +26 -6
  636. package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  637. package/node_modules/@types/node/buffer.d.ts +15 -7
  638. package/node_modules/@types/node/child_process.d.ts +91 -164
  639. package/node_modules/@types/node/cluster.d.ts +19 -20
  640. package/node_modules/@types/node/console.d.ts +19 -18
  641. package/node_modules/@types/node/crypto.d.ts +1264 -356
  642. package/node_modules/@types/node/dgram.d.ts +10 -9
  643. package/node_modules/@types/node/diagnostics_channel.d.ts +18 -15
  644. package/node_modules/@types/node/dns/promises.d.ts +36 -9
  645. package/node_modules/@types/node/dns.d.ts +95 -37
  646. package/node_modules/@types/node/domain.d.ts +1 -1
  647. package/node_modules/@types/node/events.d.ts +81 -36
  648. package/node_modules/@types/node/fs/promises.d.ts +104 -59
  649. package/node_modules/@types/node/fs.d.ts +414 -137
  650. package/node_modules/@types/node/globals.d.ts +149 -350
  651. package/node_modules/@types/node/globals.typedarray.d.ts +20 -0
  652. package/node_modules/@types/node/http.d.ts +191 -37
  653. package/node_modules/@types/node/http2.d.ts +266 -67
  654. package/node_modules/@types/node/https.d.ts +97 -63
  655. package/node_modules/@types/node/index.d.ts +16 -7
  656. package/node_modules/@types/node/inspector.d.ts +206 -3931
  657. package/node_modules/@types/node/inspector.generated.d.ts +4233 -0
  658. package/node_modules/@types/node/module.d.ts +153 -31
  659. package/node_modules/@types/node/net.d.ts +36 -17
  660. package/node_modules/@types/node/os.d.ts +22 -10
  661. package/node_modules/@types/node/package.json +14 -84
  662. package/node_modules/@types/node/path.d.ts +1 -1
  663. package/node_modules/@types/node/perf_hooks.d.ts +30 -18
  664. package/node_modules/@types/node/process.d.ts +40 -34
  665. package/node_modules/@types/node/punycode.d.ts +1 -1
  666. package/node_modules/@types/node/querystring.d.ts +1 -1
  667. package/node_modules/@types/node/readline/promises.d.ts +1 -2
  668. package/node_modules/@types/node/readline.d.ts +13 -13
  669. package/node_modules/@types/node/repl.d.ts +25 -17
  670. package/node_modules/@types/node/sea.d.ts +10 -1
  671. package/node_modules/@types/node/sqlite.d.ts +438 -9
  672. package/node_modules/@types/node/stream/consumers.d.ts +2 -2
  673. package/node_modules/@types/node/stream/web.d.ts +13 -54
  674. package/node_modules/@types/node/stream.d.ts +68 -47
  675. package/node_modules/@types/node/string_decoder.d.ts +3 -3
  676. package/node_modules/@types/node/test.d.ts +2034 -1975
  677. package/node_modules/@types/node/timers/promises.d.ts +1 -1
  678. package/node_modules/@types/node/timers.d.ts +1 -3
  679. package/node_modules/@types/node/tls.d.ts +124 -114
  680. package/node_modules/@types/node/trace_events.d.ts +6 -6
  681. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  682. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  683. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +17 -0
  684. package/node_modules/@types/node/ts5.6/index.d.ts +18 -7
  685. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  686. package/node_modules/@types/node/ts5.7/index.d.ts +103 -0
  687. package/node_modules/@types/node/tty.d.ts +1 -1
  688. package/node_modules/@types/node/url.d.ts +119 -34
  689. package/node_modules/@types/node/util.d.ts +46 -305
  690. package/node_modules/@types/node/v8.d.ts +100 -37
  691. package/node_modules/@types/node/vm.d.ts +299 -110
  692. package/node_modules/@types/node/wasi.d.ts +23 -2
  693. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  694. package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
  695. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  696. package/node_modules/@types/node/web-globals/events.d.ts +97 -0
  697. package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
  698. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  699. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  700. package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
  701. package/node_modules/@types/node/worker_threads.d.ts +225 -75
  702. package/node_modules/@types/node/zlib.d.ts +44 -33
  703. package/node_modules/axios/CHANGELOG.md +410 -288
  704. package/node_modules/axios/README.md +156 -51
  705. package/node_modules/axios/dist/axios.js +471 -330
  706. package/node_modules/axios/dist/axios.js.map +1 -1
  707. package/node_modules/axios/dist/axios.min.js +2 -2
  708. package/node_modules/axios/dist/axios.min.js.map +1 -1
  709. package/node_modules/axios/dist/browser/axios.cjs +407 -265
  710. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  711. package/node_modules/axios/dist/esm/axios.js +407 -265
  712. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  713. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  714. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  715. package/node_modules/axios/dist/node/axios.cjs +723 -305
  716. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  717. package/node_modules/axios/index.d.cts +16 -5
  718. package/node_modules/axios/index.d.ts +17 -4
  719. package/node_modules/axios/lib/adapters/adapters.js +89 -42
  720. package/node_modules/axios/lib/adapters/fetch.js +221 -162
  721. package/node_modules/axios/lib/adapters/http.js +242 -42
  722. package/node_modules/axios/lib/adapters/xhr.js +11 -8
  723. package/node_modules/axios/lib/core/Axios.js +0 -2
  724. package/node_modules/axios/lib/core/AxiosError.js +10 -3
  725. package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
  726. package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
  727. package/node_modules/axios/lib/core/mergeConfig.js +4 -4
  728. package/node_modules/axios/lib/defaults/index.js +1 -1
  729. package/node_modules/axios/lib/env/data.js +1 -1
  730. package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
  731. package/node_modules/axios/lib/helpers/bind.js +7 -0
  732. package/node_modules/axios/lib/helpers/buildURL.js +1 -3
  733. package/node_modules/axios/lib/helpers/cookies.js +24 -13
  734. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
  735. package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
  736. package/node_modules/axios/lib/utils.js +5 -3
  737. package/node_modules/axios/package.json +26 -15
  738. package/node_modules/bignumber.js/CHANGELOG.md +6 -1
  739. package/node_modules/bignumber.js/README.md +5 -4
  740. package/node_modules/bignumber.js/bignumber.js +2 -2
  741. package/node_modules/bignumber.js/bignumber.mjs +2 -2
  742. package/node_modules/bignumber.js/package.json +1 -1
  743. package/node_modules/fast-xml-parser/CHANGELOG.md +9 -0
  744. package/node_modules/fast-xml-parser/README.md +1 -1
  745. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  746. package/node_modules/fast-xml-parser/lib/fxp.d.cts +1 -1
  747. package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  748. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  749. package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  750. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  751. package/node_modules/fast-xml-parser/package.json +1 -1
  752. package/node_modules/fast-xml-parser/src/fxp.d.ts +2 -2
  753. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +1 -1
  754. package/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +4 -4
  755. package/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +297 -287
  756. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +24 -12
  757. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +4 -4
  758. package/node_modules/follow-redirects/package.json +1 -1
  759. package/node_modules/form-data/CHANGELOG.md +60 -2
  760. package/node_modules/form-data/README.md +4 -4
  761. package/node_modules/form-data/lib/form_data.js +2 -2
  762. package/node_modules/form-data/package.json +4 -4
  763. package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
  764. package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
  765. package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
  766. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  767. package/node_modules/protobufjs/dist/protobuf.js +2 -2
  768. package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
  769. package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
  770. package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
  771. package/node_modules/protobufjs/package.json +1 -1
  772. package/node_modules/undici-types/agent.d.ts +12 -11
  773. package/node_modules/undici-types/api.d.ts +24 -24
  774. package/node_modules/undici-types/balanced-pool.d.ts +11 -11
  775. package/node_modules/undici-types/cache-interceptor.d.ts +172 -0
  776. package/node_modules/undici-types/client-stats.d.ts +15 -0
  777. package/node_modules/undici-types/client.d.ts +18 -18
  778. package/node_modules/undici-types/cookies.d.ts +2 -0
  779. package/node_modules/undici-types/diagnostics-channel.d.ts +18 -10
  780. package/node_modules/undici-types/dispatcher.d.ts +119 -99
  781. package/node_modules/undici-types/env-http-proxy-agent.d.ts +4 -3
  782. package/node_modules/undici-types/errors.d.ts +66 -54
  783. package/node_modules/undici-types/eventsource.d.ts +9 -4
  784. package/node_modules/undici-types/fetch.d.ts +18 -16
  785. package/node_modules/undici-types/formdata.d.ts +7 -7
  786. package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
  787. package/node_modules/undici-types/global-origin.d.ts +5 -5
  788. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  789. package/node_modules/undici-types/handlers.d.ts +8 -8
  790. package/node_modules/undici-types/header.d.ts +157 -1
  791. package/node_modules/undici-types/index.d.ts +56 -47
  792. package/node_modules/undici-types/interceptors.d.ts +30 -8
  793. package/node_modules/undici-types/mock-agent.d.ts +36 -18
  794. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  795. package/node_modules/undici-types/mock-client.d.ts +6 -4
  796. package/node_modules/undici-types/mock-errors.d.ts +3 -3
  797. package/node_modules/undici-types/mock-interceptor.d.ts +21 -20
  798. package/node_modules/undici-types/mock-pool.d.ts +6 -4
  799. package/node_modules/undici-types/package.json +1 -1
  800. package/node_modules/undici-types/patch.d.ts +0 -4
  801. package/node_modules/undici-types/pool-stats.d.ts +8 -8
  802. package/node_modules/undici-types/pool.d.ts +14 -12
  803. package/node_modules/undici-types/proxy-agent.d.ts +5 -4
  804. package/node_modules/undici-types/readable.d.ts +18 -15
  805. package/node_modules/undici-types/retry-agent.d.ts +1 -1
  806. package/node_modules/undici-types/retry-handler.d.ts +19 -10
  807. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  808. package/node_modules/undici-types/util.d.ts +3 -3
  809. package/node_modules/undici-types/utility.d.ts +7 -0
  810. package/node_modules/undici-types/webidl.d.ts +142 -29
  811. package/node_modules/undici-types/websocket.d.ts +38 -2
  812. package/node_modules/uuid/README.md +8 -19
  813. package/node_modules/uuid/dist/{esm-browser/uuid-bin.js → uuid-bin.js} +1 -1
  814. package/node_modules/uuid/dist/{esm-browser/v4.js → v4.js} +7 -4
  815. package/node_modules/uuid/{dist/esm → dist-node}/md5.js +1 -1
  816. package/node_modules/uuid/dist-node/native.js +2 -0
  817. package/node_modules/uuid/{dist/esm → dist-node}/rng.js +1 -1
  818. package/node_modules/uuid/{dist/esm → dist-node}/sha1.js +1 -1
  819. package/node_modules/uuid/{dist/esm → dist-node}/uuid-bin.js +1 -1
  820. package/node_modules/uuid/{dist/esm → dist-node}/v4.js +7 -4
  821. package/node_modules/uuid/package.json +28 -41
  822. package/package.json +7 -7
  823. package/tak-registration.bak +557 -0
  824. package/tak-registration.js +19 -19
  825. package/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  826. package/node_modules/@types/node/compatibility/index.d.ts +0 -9
  827. package/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  828. package/node_modules/@types/node/dom-events.d.ts +0 -124
  829. package/node_modules/marchingsquares/.eslintrc.json +0 -81
  830. package/node_modules/marchingsquares/Changelog.md +0 -81
  831. package/node_modules/marchingsquares/LICENSE.md +0 -37
  832. package/node_modules/marchingsquares/README.md +0 -312
  833. package/node_modules/marchingsquares/VERSION +0 -1
  834. package/node_modules/marchingsquares/agpl-3.0.txt +0 -661
  835. package/node_modules/marchingsquares/dist/marchingsquares-esm.js +0 -3410
  836. package/node_modules/marchingsquares/dist/marchingsquares-isobands.js +0 -2513
  837. package/node_modules/marchingsquares/dist/marchingsquares-isobands.min.js +0 -9
  838. package/node_modules/marchingsquares/dist/marchingsquares-isocontours.js +0 -1209
  839. package/node_modules/marchingsquares/dist/marchingsquares-isocontours.min.js +0 -9
  840. package/node_modules/marchingsquares/dist/marchingsquares-isolines.js +0 -1209
  841. package/node_modules/marchingsquares/dist/marchingsquares-isolines.min.js +0 -9
  842. package/node_modules/marchingsquares/dist/marchingsquares.js +0 -3424
  843. package/node_modules/marchingsquares/dist/marchingsquares.min.js +0 -9
  844. package/node_modules/marchingsquares/examples/contour/index.html +0 -117
  845. package/node_modules/marchingsquares/examples/editor/draw-lines.js +0 -60
  846. package/node_modules/marchingsquares/examples/editor/index.html +0 -39
  847. package/node_modules/marchingsquares/examples/editor/script.js +0 -110
  848. package/node_modules/marchingsquares/examples/editor/styles.css +0 -37
  849. package/node_modules/marchingsquares/examples/require/app.js +0 -9
  850. package/node_modules/marchingsquares/examples/require/index.html +0 -14
  851. package/node_modules/marchingsquares/examples/require/main.js +0 -98
  852. package/node_modules/marchingsquares/examples/require/require.js +0 -5
  853. package/node_modules/marchingsquares/examples/simple/index.html +0 -115
  854. package/node_modules/marchingsquares/examples/vienna/index.html +0 -229
  855. package/node_modules/marchingsquares/examples/vienna/vienna_basin.png +0 -0
  856. package/node_modules/marchingsquares/examples/vienna/vienna_data.js +0 -514
  857. package/node_modules/marchingsquares/package.json +0 -47
  858. package/node_modules/marchingsquares/rollup.config.js +0 -122
  859. package/node_modules/marchingsquares/rollup.config.test.js +0 -14
  860. package/node_modules/marchingsquares/src/interpolation.js +0 -84
  861. package/node_modules/marchingsquares/src/isobands.js +0 -1883
  862. package/node_modules/marchingsquares/src/isolines.js +0 -638
  863. package/node_modules/marchingsquares/src/main.js +0 -4
  864. package/node_modules/marchingsquares/src/options.js +0 -80
  865. package/node_modules/marchingsquares/src/polygons.js +0 -531
  866. package/node_modules/marchingsquares/src/quadtree.js +0 -228
  867. package/node_modules/marchingsquares/test/data/in/isoBands-example-case.json +0 -14
  868. package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-0_3.json +0 -12
  869. package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-3_5.json +0 -12
  870. package/node_modules/marchingsquares/test/data/in/isoBands-issue#6-5_7.json +0 -12
  871. package/node_modules/marchingsquares/test/data/in/isoBands-minimal.json +0 -8
  872. package/node_modules/marchingsquares/test/data/in/isoBands-simple.json +0 -9
  873. package/node_modules/marchingsquares/test/data/in/isoLines-example-case.json +0 -13
  874. package/node_modules/marchingsquares/test/data/in/isoLines-simple.json +0 -8
  875. package/node_modules/marchingsquares/test/data/out/isoBands-example-case.json +0 -72
  876. package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-0_3.json +0 -9
  877. package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-3_5.json +0 -36
  878. package/node_modules/marchingsquares/test/data/out/isoBands-issue#6-5_7.json +0 -8
  879. package/node_modules/marchingsquares/test/data/out/isoBands-minimal.json +0 -10
  880. package/node_modules/marchingsquares/test/data/out/isoBands-simple.json +0 -25
  881. package/node_modules/marchingsquares/test/data/out/isoLines-example-case.json +0 -481
  882. package/node_modules/marchingsquares/test/data/out/isoLines-simple.json +0 -8
  883. package/node_modules/marchingsquares/test/test.js +0 -152
  884. package/node_modules/undici-types/file.d.ts +0 -39
  885. package/node_modules/undici-types/filereader.d.ts +0 -54
  886. package/node_modules/uuid/dist/cjs/index.d.ts +0 -15
  887. package/node_modules/uuid/dist/cjs/index.js +0 -31
  888. package/node_modules/uuid/dist/cjs/max.d.ts +0 -2
  889. package/node_modules/uuid/dist/cjs/max.js +0 -3
  890. package/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
  891. package/node_modules/uuid/dist/cjs/md5.js +0 -13
  892. package/node_modules/uuid/dist/cjs/native.d.ts +0 -6
  893. package/node_modules/uuid/dist/cjs/native.js +0 -4
  894. package/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
  895. package/node_modules/uuid/dist/cjs/nil.js +0 -3
  896. package/node_modules/uuid/dist/cjs/package.json +0 -1
  897. package/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
  898. package/node_modules/uuid/dist/cjs/parse.js +0 -11
  899. package/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
  900. package/node_modules/uuid/dist/cjs/regex.js +0 -3
  901. package/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
  902. package/node_modules/uuid/dist/cjs/rng.js +0 -13
  903. package/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
  904. package/node_modules/uuid/dist/cjs/sha1.js +0 -13
  905. package/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
  906. package/node_modules/uuid/dist/cjs/stringify.js +0 -39
  907. package/node_modules/uuid/dist/cjs/types.d.ts +0 -21
  908. package/node_modules/uuid/dist/cjs/types.js +0 -2
  909. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
  910. package/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
  911. package/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
  912. package/node_modules/uuid/dist/cjs/v1.js +0 -87
  913. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
  914. package/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
  915. package/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
  916. package/node_modules/uuid/dist/cjs/v3.js +0 -14
  917. package/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
  918. package/node_modules/uuid/dist/cjs/v35.js +0 -41
  919. package/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
  920. package/node_modules/uuid/dist/cjs/v4.js +0 -29
  921. package/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
  922. package/node_modules/uuid/dist/cjs/v5.js +0 -14
  923. package/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
  924. package/node_modules/uuid/dist/cjs/v6.js +0 -19
  925. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
  926. package/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
  927. package/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
  928. package/node_modules/uuid/dist/cjs/v7.js +0 -69
  929. package/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
  930. package/node_modules/uuid/dist/cjs/validate.js +0 -7
  931. package/node_modules/uuid/dist/cjs/version.d.ts +0 -2
  932. package/node_modules/uuid/dist/cjs/version.js +0 -10
  933. package/node_modules/uuid/dist/cjs-browser/index.js +0 -31
  934. package/node_modules/uuid/dist/cjs-browser/max.js +0 -3
  935. package/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
  936. package/node_modules/uuid/dist/cjs-browser/native.js +0 -4
  937. package/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
  938. package/node_modules/uuid/dist/cjs-browser/package.json +0 -1
  939. package/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
  940. package/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
  941. package/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
  942. package/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
  943. package/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
  944. package/node_modules/uuid/dist/cjs-browser/types.js +0 -2
  945. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
  946. package/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
  947. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
  948. package/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
  949. package/node_modules/uuid/dist/cjs-browser/v35.js +0 -41
  950. package/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
  951. package/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
  952. package/node_modules/uuid/dist/cjs-browser/v6.js +0 -19
  953. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
  954. package/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
  955. package/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
  956. package/node_modules/uuid/dist/cjs-browser/version.js +0 -10
  957. package/node_modules/uuid/dist/esm/index.d.ts +0 -15
  958. package/node_modules/uuid/dist/esm/max.d.ts +0 -2
  959. package/node_modules/uuid/dist/esm/md5.d.ts +0 -4
  960. package/node_modules/uuid/dist/esm/native.d.ts +0 -6
  961. package/node_modules/uuid/dist/esm/native.js +0 -2
  962. package/node_modules/uuid/dist/esm/nil.d.ts +0 -2
  963. package/node_modules/uuid/dist/esm/parse.d.ts +0 -2
  964. package/node_modules/uuid/dist/esm/regex.d.ts +0 -2
  965. package/node_modules/uuid/dist/esm/rng.d.ts +0 -1
  966. package/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
  967. package/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
  968. package/node_modules/uuid/dist/esm/types.d.ts +0 -21
  969. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
  970. package/node_modules/uuid/dist/esm/v1.d.ts +0 -11
  971. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
  972. package/node_modules/uuid/dist/esm/v3.d.ts +0 -9
  973. package/node_modules/uuid/dist/esm/v35.d.ts +0 -7
  974. package/node_modules/uuid/dist/esm/v4.d.ts +0 -4
  975. package/node_modules/uuid/dist/esm/v5.d.ts +0 -9
  976. package/node_modules/uuid/dist/esm/v6.d.ts +0 -4
  977. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
  978. package/node_modules/uuid/dist/esm/v7.d.ts +0 -9
  979. package/node_modules/uuid/dist/esm/validate.d.ts +0 -2
  980. package/node_modules/uuid/dist/esm/version.d.ts +0 -2
  981. package/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
  982. package/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
  983. package/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
  984. package/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
  985. package/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
  986. package/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
  987. package/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
  988. package/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
  989. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
  990. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
  991. package/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
  992. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
  993. package/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
  994. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
  995. package/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
  996. package/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
  997. package/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
  998. package/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
  999. package/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
  1000. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
  1001. package/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
  1002. package/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
  1003. package/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
  1004. /package/node_modules/uuid/dist/{cjs-browser/index.d.ts → index.d.ts} +0 -0
  1005. /package/node_modules/uuid/dist/{esm/index.js → index.js} +0 -0
  1006. /package/node_modules/uuid/dist/{cjs-browser/max.d.ts → max.d.ts} +0 -0
  1007. /package/node_modules/uuid/dist/{esm/max.js → max.js} +0 -0
  1008. /package/node_modules/uuid/dist/{cjs-browser/md5.d.ts → md5.d.ts} +0 -0
  1009. /package/node_modules/uuid/dist/{esm-browser/md5.js → md5.js} +0 -0
  1010. /package/node_modules/uuid/dist/{cjs-browser/native.d.ts → native.d.ts} +0 -0
  1011. /package/node_modules/uuid/dist/{esm-browser/native.js → native.js} +0 -0
  1012. /package/node_modules/uuid/dist/{cjs-browser/nil.d.ts → nil.d.ts} +0 -0
  1013. /package/node_modules/uuid/dist/{esm/nil.js → nil.js} +0 -0
  1014. /package/node_modules/uuid/dist/{cjs-browser/parse.d.ts → parse.d.ts} +0 -0
  1015. /package/node_modules/uuid/dist/{esm/parse.js → parse.js} +0 -0
  1016. /package/node_modules/uuid/dist/{cjs-browser/regex.d.ts → regex.d.ts} +0 -0
  1017. /package/node_modules/uuid/dist/{esm/regex.js → regex.js} +0 -0
  1018. /package/node_modules/uuid/dist/{cjs-browser/rng.d.ts → rng.d.ts} +0 -0
  1019. /package/node_modules/uuid/dist/{esm-browser/rng.js → rng.js} +0 -0
  1020. /package/node_modules/uuid/dist/{cjs-browser/sha1.d.ts → sha1.d.ts} +0 -0
  1021. /package/node_modules/uuid/dist/{esm-browser/sha1.js → sha1.js} +0 -0
  1022. /package/node_modules/uuid/dist/{cjs-browser/stringify.d.ts → stringify.d.ts} +0 -0
  1023. /package/node_modules/uuid/dist/{esm/stringify.js → stringify.js} +0 -0
  1024. /package/node_modules/uuid/dist/{cjs-browser/types.d.ts → types.d.ts} +0 -0
  1025. /package/node_modules/uuid/dist/{esm/types.js → types.js} +0 -0
  1026. /package/node_modules/uuid/dist/{cjs-browser/uuid-bin.d.ts → uuid-bin.d.ts} +0 -0
  1027. /package/node_modules/uuid/dist/{cjs-browser/v1.d.ts → v1.d.ts} +0 -0
  1028. /package/node_modules/uuid/dist/{esm/v1.js → v1.js} +0 -0
  1029. /package/node_modules/uuid/dist/{cjs-browser/v1ToV6.d.ts → v1ToV6.d.ts} +0 -0
  1030. /package/node_modules/uuid/dist/{esm/v1ToV6.js → v1ToV6.js} +0 -0
  1031. /package/node_modules/uuid/dist/{cjs-browser/v3.d.ts → v3.d.ts} +0 -0
  1032. /package/node_modules/uuid/dist/{esm/v3.js → v3.js} +0 -0
  1033. /package/node_modules/uuid/dist/{cjs-browser/v35.d.ts → v35.d.ts} +0 -0
  1034. /package/node_modules/uuid/dist/{esm/v35.js → v35.js} +0 -0
  1035. /package/node_modules/uuid/dist/{cjs-browser/v4.d.ts → v4.d.ts} +0 -0
  1036. /package/node_modules/uuid/dist/{cjs-browser/v5.d.ts → v5.d.ts} +0 -0
  1037. /package/node_modules/uuid/dist/{esm/v5.js → v5.js} +0 -0
  1038. /package/node_modules/uuid/dist/{cjs-browser/v6.d.ts → v6.d.ts} +0 -0
  1039. /package/node_modules/uuid/dist/{esm/v6.js → v6.js} +0 -0
  1040. /package/node_modules/uuid/dist/{cjs-browser/v6ToV1.d.ts → v6ToV1.d.ts} +0 -0
  1041. /package/node_modules/uuid/dist/{esm/v6ToV1.js → v6ToV1.js} +0 -0
  1042. /package/node_modules/uuid/dist/{cjs-browser/v7.d.ts → v7.d.ts} +0 -0
  1043. /package/node_modules/uuid/dist/{esm/v7.js → v7.js} +0 -0
  1044. /package/node_modules/uuid/dist/{cjs-browser/validate.d.ts → validate.d.ts} +0 -0
  1045. /package/node_modules/uuid/dist/{esm/validate.js → validate.js} +0 -0
  1046. /package/node_modules/uuid/dist/{cjs-browser/version.d.ts → version.d.ts} +0 -0
  1047. /package/node_modules/uuid/dist/{esm/version.js → version.js} +0 -0
  1048. /package/node_modules/uuid/{dist/esm → dist-node}/bin/uuid +0 -0
  1049. /package/node_modules/uuid/{dist/esm-browser → dist-node}/index.js +0 -0
  1050. /package/node_modules/uuid/{dist/esm-browser → dist-node}/max.js +0 -0
  1051. /package/node_modules/uuid/{dist/esm-browser → dist-node}/nil.js +0 -0
  1052. /package/node_modules/uuid/{dist/esm-browser → dist-node}/parse.js +0 -0
  1053. /package/node_modules/uuid/{dist/esm-browser → dist-node}/regex.js +0 -0
  1054. /package/node_modules/uuid/{dist/esm-browser → dist-node}/stringify.js +0 -0
  1055. /package/node_modules/uuid/{dist/esm-browser → dist-node}/types.js +0 -0
  1056. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1.js +0 -0
  1057. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v1ToV6.js +0 -0
  1058. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v3.js +0 -0
  1059. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v35.js +0 -0
  1060. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v5.js +0 -0
  1061. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6.js +0 -0
  1062. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v6ToV1.js +0 -0
  1063. /package/node_modules/uuid/{dist/esm-browser → dist-node}/v7.js +0 -0
  1064. /package/node_modules/uuid/{dist/esm-browser → dist-node}/validate.js +0 -0
  1065. /package/node_modules/uuid/{dist/esm-browser → dist-node}/version.js +0 -0
@@ -13,7 +13,7 @@ If the line is shorter than the segment length then the original line is returne
13
13
  * `segmentLength` **[number][6]** how long to make each segment
14
14
  * `options` **[Object][7]** Optional parameters (optional, default `{}`)
15
15
 
16
- * `options.units` **[string][8]** units can be degrees, radians, miles, or kilometers (optional, default `'kilometers'`)
16
+ * `options.units` **Units** Supports all valid Turf [Units][8] (optional, default `'kilometers'`)
17
17
  * `options.reverse` **[boolean][9]** reverses coordinates to start the first chunked segment at the end (optional, default `false`)
18
18
 
19
19
  ### Examples
@@ -43,7 +43,7 @@ Returns **[FeatureCollection][2]<[LineString][1]>** collection of line segments
43
43
 
44
44
  [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
45
45
 
46
- [8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
46
+ [8]: https://turfjs.org/docs/api/types/Units
47
47
 
48
48
  [9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
49
49
 
@@ -38,9 +38,9 @@ function sliceLineSegments(line, segmentLength, units, callback) {
38
38
  callback(outline, i);
39
39
  }
40
40
  }
41
- var turf_line_chunk_default = lineChunk;
41
+ var index_default = lineChunk;
42
42
 
43
43
 
44
44
 
45
- exports.default = turf_line_chunk_default; exports.lineChunk = lineChunk;
45
+ exports.default = index_default; exports.lineChunk = lineChunk;
46
46
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-chunk/dist/cjs/index.cjs","../../index.js"],"names":[],"mappings":"AAAA;ACAA,sCAAuB;AACvB,wDAA+B;AAC/B,kCAA4B;AAC5B,wCAA4C;AAqB5C,SAAS,SAAA,CAAU,OAAA,EAAS,aAAA,EAAe,OAAA,EAAS;AAElD,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,IAAI,MAAA,EAAQ,OAAA,CAAQ,KAAA;AACpB,EAAA,IAAI,QAAA,EAAU,OAAA,CAAQ,OAAA;AAGtB,EAAA,GAAA,CAAI,CAAC,OAAA,EAAS,MAAM,IAAI,KAAA,CAAM,qBAAqB,CAAA;AACnD,EAAA,GAAA,CAAI,cAAA,GAAiB,CAAA;AACnB,IAAA,MAAM,IAAI,KAAA,CAAM,sCAAsC,CAAA;AAGxD,EAAA,IAAI,QAAA,EAAU,CAAC,CAAA;AAGf,EAAA,+BAAA,OAAY,EAAS,QAAA,CAAU,OAAA,EAAS;AAEtC,IAAA,GAAA,CAAI,OAAA;AACF,MAAA,OAAA,CAAQ,QAAA,CAAS,YAAA,EAAc,OAAA,CAAQ,QAAA,CAAS,WAAA,CAAY,OAAA,CAAQ,CAAA;AAEtE,IAAA,iBAAA,CAAkB,OAAA,EAAS,aAAA,EAAe,KAAA,EAAO,QAAA,CAAU,OAAA,EAAS;AAClE,MAAA,OAAA,CAAQ,IAAA,CAAK,OAAO,CAAA;AAAA,IACtB,CAAC,CAAA;AAAA,EACH,CAAC,CAAA;AACD,EAAA,OAAO,wCAAA,OAAyB,CAAA;AAClC;AAYA,SAAS,iBAAA,CAAkB,IAAA,EAAM,aAAA,EAAe,KAAA,EAAO,QAAA,EAAU;AAC/D,EAAA,IAAI,WAAA,EAAa,4BAAA,IAAO,EAAM,EAAE,MAAa,CAAC,CAAA;AAG9C,EAAA,GAAA,CAAI,WAAA,GAAc,aAAA,EAAe,OAAO,QAAA,CAAS,IAAI,CAAA;AAErD,EAAA,IAAI,iBAAA,EAAmB,WAAA,EAAa,aAAA;AAGpC,EAAA,GAAA,CAAI,CAAC,MAAA,CAAO,SAAA,CAAU,gBAAgB,CAAA,EAAG;AACvC,IAAA,iBAAA,EAAmB,IAAA,CAAK,KAAA,CAAM,gBAAgB,EAAA,EAAI,CAAA;AAAA,EACpD;AAEA,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,gBAAA,EAAkB,CAAA,EAAA,EAAK;AACzC,IAAA,IAAI,QAAA,EAAU,4CAAA;AAAA,MACZ,IAAA;AAAA,MACA,cAAA,EAAgB,CAAA;AAAA,MAChB,cAAA,EAAA,CAAiB,EAAA,EAAI,CAAA,CAAA;AAAA,MACrB,EAAE,MAAa;AAAA,IACjB,CAAA;AACA,IAAA,QAAA,CAAS,OAAA,EAAS,CAAC,CAAA;AAAA,EACrB;AACF;AAGA,IAAO,wBAAA,EAAQ,SAAA;AD9Cf;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/turf/turf/packages/turf-line-chunk/dist/cjs/index.cjs","sourcesContent":[null,"import { length } from \"@turf/length\";\nimport { lineSliceAlong } from \"@turf/line-slice-along\";\nimport { flattenEach } from \"@turf/meta\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\n\n/**\n * Divides a {@link LineString} into chunks of a specified length.\n * If the line is shorter than the segment length then the original line is returned.\n *\n * @function\n * @param {FeatureCollection|Geometry|Feature<LineString|MultiLineString>} geojson the lines to split\n * @param {number} segmentLength how long to make each segment\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] units can be degrees, radians, miles, or kilometers\n * @param {boolean} [options.reverse=false] reverses coordinates to start the first chunked segment at the end\n * @returns {FeatureCollection<LineString>} collection of line segments\n * @example\n * var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n *\n * var chunk = turf.lineChunk(line, 15, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [chunk];\n */\nfunction lineChunk(geojson, segmentLength, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var reverse = options.reverse;\n\n // Validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (segmentLength <= 0)\n throw new Error(\"segmentLength must be greater than 0\");\n\n // Container\n var results = [];\n\n // Flatten each feature to simple LineString\n flattenEach(geojson, function (feature) {\n // reverses coordinates to start the first chunked segment at the end\n if (reverse)\n feature.geometry.coordinates = feature.geometry.coordinates.reverse();\n\n sliceLineSegments(feature, segmentLength, units, function (segment) {\n results.push(segment);\n });\n });\n return featureCollection(results);\n}\n\n/**\n * Slice Line Segments\n *\n * @private\n * @param {Feature<LineString>} line GeoJSON LineString\n * @param {number} segmentLength how long to make each segment\n * @param {string}[units='kilometers'] units can be degrees, radians, miles, or kilometers\n * @param {Function} callback iterate over sliced line segments\n * @returns {void}\n */\nfunction sliceLineSegments(line, segmentLength, units, callback) {\n var lineLength = length(line, { units: units });\n\n // If the line is shorter than the segment length then the orginal line is returned.\n if (lineLength <= segmentLength) return callback(line);\n\n var numberOfSegments = lineLength / segmentLength;\n\n // If numberOfSegments is integer, no need to plus 1\n if (!Number.isInteger(numberOfSegments)) {\n numberOfSegments = Math.floor(numberOfSegments) + 1;\n }\n\n for (var i = 0; i < numberOfSegments; i++) {\n var outline = lineSliceAlong(\n line,\n segmentLength * i,\n segmentLength * (i + 1),\n { units: units }\n );\n callback(outline, i);\n }\n}\n\nexport { lineChunk };\nexport default lineChunk;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-chunk/dist/cjs/index.cjs","../../index.js"],"names":[],"mappings":"AAAA;ACAA,sCAAuB;AACvB,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BAAA,EAAmB,WAAA,EAAa,aAAA;AAGpC,EAAA,GAAA,CAAI,CAAC,MAAA,CAAO,SAAA,CAAU,gBAAgB,CAAA,EAAG;AACvC,IAAA,iBAAA,EAAmB,IAAA,CAAK,KAAA,CAAM,gBAAgB,EAAA,EAAI,CAAA;AAAA,EACpD;AAEA,EAAA,IAAA,CAAA,IAAS,EAAA,EAAI,CAAA,EAAG,EAAA,EAAI,gBAAA,EAAkB,CAAA,EAAA,EAAK;AACzC,IAAA,IAAI,QAAA,EAAU,4CAAA;AAAA,MACZ,IAAA;AAAA,MACA,cAAA,EAAgB,CAAA;AAAA,MAChB,cAAA,EAAA,CAAiB,EAAA,EAAI,CAAA,CAAA;AAAA,MACrB,EAAE,MAAa;AAAA,IACjB,CAAA;AACA,IAAA,QAAA,CAAS,OAAA,EAAS,CAAC,CAAA;AAAA,EACrB;AACF;AAGA,IAAO,cAAA,EAAQ,SAAA;AD9Cf;AACE;AACA;AACF,+DAAC","file":"/home/runner/work/turf/turf/packages/turf-line-chunk/dist/cjs/index.cjs","sourcesContent":[null,"import { length } from \"@turf/length\";\nimport { lineSliceAlong } from \"@turf/line-slice-along\";\nimport { flattenEach } from \"@turf/meta\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\n\n/**\n * Divides a {@link LineString} into chunks of a specified length.\n * If the line is shorter than the segment length then the original line is returned.\n *\n * @function\n * @param {FeatureCollection|Geometry|Feature<LineString|MultiLineString>} geojson the lines to split\n * @param {number} segmentLength how long to make each segment\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}\n * @param {boolean} [options.reverse=false] reverses coordinates to start the first chunked segment at the end\n * @returns {FeatureCollection<LineString>} collection of line segments\n * @example\n * var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n *\n * var chunk = turf.lineChunk(line, 15, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [chunk];\n */\nfunction lineChunk(geojson, segmentLength, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var reverse = options.reverse;\n\n // Validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (segmentLength <= 0)\n throw new Error(\"segmentLength must be greater than 0\");\n\n // Container\n var results = [];\n\n // Flatten each feature to simple LineString\n flattenEach(geojson, function (feature) {\n // reverses coordinates to start the first chunked segment at the end\n if (reverse)\n feature.geometry.coordinates = feature.geometry.coordinates.reverse();\n\n sliceLineSegments(feature, segmentLength, units, function (segment) {\n results.push(segment);\n });\n });\n return featureCollection(results);\n}\n\n/**\n * Slice Line Segments\n *\n * @private\n * @param {Feature<LineString>} line GeoJSON LineString\n * @param {number} segmentLength how long to make each segment\n * @param {Units}[units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}\n * @param {Function} callback iterate over sliced line segments\n * @returns {void}\n */\nfunction sliceLineSegments(line, segmentLength, units, callback) {\n var lineLength = length(line, { units: units });\n\n // If the line is shorter than the segment length then the orginal line is returned.\n if (lineLength <= segmentLength) return callback(line);\n\n var numberOfSegments = lineLength / segmentLength;\n\n // If numberOfSegments is integer, no need to plus 1\n if (!Number.isInteger(numberOfSegments)) {\n numberOfSegments = Math.floor(numberOfSegments) + 1;\n }\n\n for (var i = 0; i < numberOfSegments; i++) {\n var outline = lineSliceAlong(\n line,\n segmentLength * i,\n segmentLength * (i + 1),\n { units: units }\n );\n callback(outline, i);\n }\n}\n\nexport { lineChunk };\nexport default lineChunk;\n"]}
@@ -38,9 +38,9 @@ function sliceLineSegments(line, segmentLength, units, callback) {
38
38
  callback(outline, i);
39
39
  }
40
40
  }
41
- var turf_line_chunk_default = lineChunk;
41
+ var index_default = lineChunk;
42
42
  export {
43
- turf_line_chunk_default as default,
43
+ index_default as default,
44
44
  lineChunk
45
45
  };
46
46
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.js"],"sourcesContent":["import { length } from \"@turf/length\";\nimport { lineSliceAlong } from \"@turf/line-slice-along\";\nimport { flattenEach } from \"@turf/meta\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\n\n/**\n * Divides a {@link LineString} into chunks of a specified length.\n * If the line is shorter than the segment length then the original line is returned.\n *\n * @function\n * @param {FeatureCollection|Geometry|Feature<LineString|MultiLineString>} geojson the lines to split\n * @param {number} segmentLength how long to make each segment\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] units can be degrees, radians, miles, or kilometers\n * @param {boolean} [options.reverse=false] reverses coordinates to start the first chunked segment at the end\n * @returns {FeatureCollection<LineString>} collection of line segments\n * @example\n * var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n *\n * var chunk = turf.lineChunk(line, 15, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [chunk];\n */\nfunction lineChunk(geojson, segmentLength, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var reverse = options.reverse;\n\n // Validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (segmentLength <= 0)\n throw new Error(\"segmentLength must be greater than 0\");\n\n // Container\n var results = [];\n\n // Flatten each feature to simple LineString\n flattenEach(geojson, function (feature) {\n // reverses coordinates to start the first chunked segment at the end\n if (reverse)\n feature.geometry.coordinates = feature.geometry.coordinates.reverse();\n\n sliceLineSegments(feature, segmentLength, units, function (segment) {\n results.push(segment);\n });\n });\n return featureCollection(results);\n}\n\n/**\n * Slice Line Segments\n *\n * @private\n * @param {Feature<LineString>} line GeoJSON LineString\n * @param {number} segmentLength how long to make each segment\n * @param {string}[units='kilometers'] units can be degrees, radians, miles, or kilometers\n * @param {Function} callback iterate over sliced line segments\n * @returns {void}\n */\nfunction sliceLineSegments(line, segmentLength, units, callback) {\n var lineLength = length(line, { units: units });\n\n // If the line is shorter than the segment length then the orginal line is returned.\n if (lineLength <= segmentLength) return callback(line);\n\n var numberOfSegments = lineLength / segmentLength;\n\n // If numberOfSegments is integer, no need to plus 1\n if (!Number.isInteger(numberOfSegments)) {\n numberOfSegments = Math.floor(numberOfSegments) + 1;\n }\n\n for (var i = 0; i < numberOfSegments; i++) {\n var outline = lineSliceAlong(\n line,\n segmentLength * i,\n segmentLength * (i + 1),\n { units: units }\n );\n callback(outline, i);\n }\n}\n\nexport { lineChunk };\nexport default lineChunk;\n"],"mappings":";AAAA,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB,gBAAgB;AAqB5C,SAAS,UAAU,SAAS,eAAe,SAAS;AAElD,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,MAAI,QAAQ,QAAQ;AACpB,MAAI,UAAU,QAAQ;AAGtB,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,qBAAqB;AACnD,MAAI,iBAAiB;AACnB,UAAM,IAAI,MAAM,sCAAsC;AAGxD,MAAI,UAAU,CAAC;AAGf,cAAY,SAAS,SAAU,SAAS;AAEtC,QAAI;AACF,cAAQ,SAAS,cAAc,QAAQ,SAAS,YAAY,QAAQ;AAEtE,sBAAkB,SAAS,eAAe,OAAO,SAAU,SAAS;AAClE,cAAQ,KAAK,OAAO;AAAA,IACtB,CAAC;AAAA,EACH,CAAC;AACD,SAAO,kBAAkB,OAAO;AAClC;AAYA,SAAS,kBAAkB,MAAM,eAAe,OAAO,UAAU;AAC/D,MAAI,aAAa,OAAO,MAAM,EAAE,MAAa,CAAC;AAG9C,MAAI,cAAc,cAAe,QAAO,SAAS,IAAI;AAErD,MAAI,mBAAmB,aAAa;AAGpC,MAAI,CAAC,OAAO,UAAU,gBAAgB,GAAG;AACvC,uBAAmB,KAAK,MAAM,gBAAgB,IAAI;AAAA,EACpD;AAEA,WAAS,IAAI,GAAG,IAAI,kBAAkB,KAAK;AACzC,QAAI,UAAU;AAAA,MACZ;AAAA,MACA,gBAAgB;AAAA,MAChB,iBAAiB,IAAI;AAAA,MACrB,EAAE,MAAa;AAAA,IACjB;AACA,aAAS,SAAS,CAAC;AAAA,EACrB;AACF;AAGA,IAAO,0BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.js"],"sourcesContent":["import { length } from \"@turf/length\";\nimport { lineSliceAlong } from \"@turf/line-slice-along\";\nimport { flattenEach } from \"@turf/meta\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\n\n/**\n * Divides a {@link LineString} into chunks of a specified length.\n * If the line is shorter than the segment length then the original line is returned.\n *\n * @function\n * @param {FeatureCollection|Geometry|Feature<LineString|MultiLineString>} geojson the lines to split\n * @param {number} segmentLength how long to make each segment\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}\n * @param {boolean} [options.reverse=false] reverses coordinates to start the first chunked segment at the end\n * @returns {FeatureCollection<LineString>} collection of line segments\n * @example\n * var line = turf.lineString([[-95, 40], [-93, 45], [-85, 50]]);\n *\n * var chunk = turf.lineChunk(line, 15, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [chunk];\n */\nfunction lineChunk(geojson, segmentLength, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n var reverse = options.reverse;\n\n // Validation\n if (!geojson) throw new Error(\"geojson is required\");\n if (segmentLength <= 0)\n throw new Error(\"segmentLength must be greater than 0\");\n\n // Container\n var results = [];\n\n // Flatten each feature to simple LineString\n flattenEach(geojson, function (feature) {\n // reverses coordinates to start the first chunked segment at the end\n if (reverse)\n feature.geometry.coordinates = feature.geometry.coordinates.reverse();\n\n sliceLineSegments(feature, segmentLength, units, function (segment) {\n results.push(segment);\n });\n });\n return featureCollection(results);\n}\n\n/**\n * Slice Line Segments\n *\n * @private\n * @param {Feature<LineString>} line GeoJSON LineString\n * @param {number} segmentLength how long to make each segment\n * @param {Units}[units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}\n * @param {Function} callback iterate over sliced line segments\n * @returns {void}\n */\nfunction sliceLineSegments(line, segmentLength, units, callback) {\n var lineLength = length(line, { units: units });\n\n // If the line is shorter than the segment length then the orginal line is returned.\n if (lineLength <= segmentLength) return callback(line);\n\n var numberOfSegments = lineLength / segmentLength;\n\n // If numberOfSegments is integer, no need to plus 1\n if (!Number.isInteger(numberOfSegments)) {\n numberOfSegments = Math.floor(numberOfSegments) + 1;\n }\n\n for (var i = 0; i < numberOfSegments; i++) {\n var outline = lineSliceAlong(\n line,\n segmentLength * i,\n segmentLength * (i + 1),\n { units: units }\n );\n callback(outline, i);\n }\n}\n\nexport { lineChunk };\nexport default lineChunk;\n"],"mappings":";AAAA,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB,gBAAgB;AAqB5C,SAAS,UAAU,SAAS,eAAe,SAAS;AAElD,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,MAAI,QAAQ,QAAQ;AACpB,MAAI,UAAU,QAAQ;AAGtB,MAAI,CAAC,QAAS,OAAM,IAAI,MAAM,qBAAqB;AACnD,MAAI,iBAAiB;AACnB,UAAM,IAAI,MAAM,sCAAsC;AAGxD,MAAI,UAAU,CAAC;AAGf,cAAY,SAAS,SAAU,SAAS;AAEtC,QAAI;AACF,cAAQ,SAAS,cAAc,QAAQ,SAAS,YAAY,QAAQ;AAEtE,sBAAkB,SAAS,eAAe,OAAO,SAAU,SAAS;AAClE,cAAQ,KAAK,OAAO;AAAA,IACtB,CAAC;AAAA,EACH,CAAC;AACD,SAAO,kBAAkB,OAAO;AAClC;AAYA,SAAS,kBAAkB,MAAM,eAAe,OAAO,UAAU;AAC/D,MAAI,aAAa,OAAO,MAAM,EAAE,MAAa,CAAC;AAG9C,MAAI,cAAc,cAAe,QAAO,SAAS,IAAI;AAErD,MAAI,mBAAmB,aAAa;AAGpC,MAAI,CAAC,OAAO,UAAU,gBAAgB,GAAG;AACvC,uBAAmB,KAAK,MAAM,gBAAgB,IAAI;AAAA,EACpD;AAEA,WAAS,IAAI,GAAG,IAAI,kBAAkB,KAAK;AACzC,QAAI,UAAU;AAAA,MACZ;AAAA,MACA,gBAAgB;AAAA,MAChB,iBAAiB,IAAI;AAAA,MACrB,EAAE,MAAa;AAAA,IACjB;AACA,aAAS,SAAS,CAAC;AAAA,EACrB;AACF;AAGA,IAAO,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/line-chunk",
3
- "version": "7.2.0",
4
- "description": "turf line-chunk module",
3
+ "version": "7.3.0",
4
+ "description": "Divides a LineString into chunks of a specified length.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Tim Channell <@tcql>",
@@ -59,23 +59,23 @@
59
59
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
60
60
  },
61
61
  "devDependencies": {
62
- "@turf/truncate": "^7.2.0",
62
+ "@turf/truncate": "7.3.0",
63
63
  "@types/benchmark": "^2.1.5",
64
- "@types/tape": "^4.13.4",
64
+ "@types/tape": "^5.8.1",
65
65
  "benchmark": "^2.1.4",
66
66
  "load-json-file": "^7.0.1",
67
67
  "npm-run-all": "^4.1.5",
68
68
  "tape": "^5.9.0",
69
- "tsup": "^8.3.5",
70
- "tsx": "^4.19.2",
71
- "write-json-file": "^5.0.0"
69
+ "tsup": "^8.4.0",
70
+ "tsx": "^4.19.4",
71
+ "write-json-file": "^6.0.0"
72
72
  },
73
73
  "dependencies": {
74
- "@turf/helpers": "^7.2.0",
75
- "@turf/length": "^7.2.0",
76
- "@turf/line-slice-along": "^7.2.0",
77
- "@turf/meta": "^7.2.0",
74
+ "@turf/helpers": "7.3.0",
75
+ "@turf/length": "7.3.0",
76
+ "@turf/line-slice-along": "7.3.0",
77
+ "@turf/meta": "7.3.0",
78
78
  "@types/geojson": "^7946.0.10"
79
79
  },
80
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
80
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
81
81
  }
@@ -40,9 +40,9 @@ function lineIntersect(line1, line2, options = {}) {
40
40
  }
41
41
  return _helpers.featureCollection.call(void 0, results.map((r) => _helpers.point.call(void 0, r)));
42
42
  }
43
- var turf_line_intersect_default = lineIntersect;
43
+ var index_default = lineIntersect;
44
44
 
45
45
 
46
46
 
47
- exports.default = turf_line_intersect_default; exports.lineIntersect = lineIntersect;
47
+ exports.default = index_default; exports.lineIntersect = lineIntersect;
48
48
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-intersect/dist/cjs/index.cjs","../../index.ts","../../lib/sweepline-intersections-export.ts"],"names":[],"mappings":"AAAA;ACAA,wCAAkD;ADElD;AACA;AECA,iJAAgB;AAET,IAAM,uBAAA,EAAyB,gCAAA;AFAtC;AACA;ACwBA,SAAS,aAAA,CAIP,KAAA,EACA,KAAA,EACA,QAAA,EAGI,CAAC,CAAA,EACqB;AAC1B,EAAA,MAAM,EAAE,iBAAA,EAAmB,IAAA,EAAM,wBAAA,EAA0B,KAAK,EAAA,EAAI,OAAA;AACpE,EAAA,IAAI,SAAA,EAA+B,CAAC,CAAA;AACpC,EAAA,GAAA,CAAI,KAAA,CAAM,KAAA,IAAS,mBAAA;AACjB,IAAA,SAAA,EAAW,QAAA,CAAS,MAAA,CAAO,KAAA,CAAM,QAAQ,CAAA;AAAA,EAAA,KAAA,GAAA,CAClC,KAAA,CAAM,KAAA,IAAS,SAAA,EAAW,QAAA,CAAS,IAAA,CAAK,KAAK,CAAA;AAAA,EAAA,KAAA,GAAA,CAEpD,KAAA,CAAM,KAAA,IAAS,aAAA,GACf,KAAA,CAAM,KAAA,IAAS,UAAA,GACf,KAAA,CAAM,KAAA,IAAS,kBAAA,GACf,KAAA,CAAM,KAAA,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AC,CAAA,EAAA,GAAM,4BAAA,CAAO,CAAC,CAAC,CAAA;AACvD;AAGA,IAAO,4BAAA,EAAQ,aAAA;AD/Cf;AACE;AACA;AACF,qFAAC","file":"/home/runner/work/turf/turf/packages/turf-line-intersect/dist/cjs/index.cjs","sourcesContent":[null,"import { feature, featureCollection, point } from \"@turf/helpers\";\nimport {\n Feature,\n FeatureCollection,\n LineString,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport type { Intersection } from \"sweepline-intersections\";\nimport { sweeplineIntersections as findIntersections } from \"./lib/sweepline-intersections-export.js\";\n\n/**\n * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).\n *\n * @function\n * @param {GeoJSON} line1 any LineString or Polygon\n * @param {GeoJSON} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.removeDuplicates=true] remove duplicate intersections\n * @param {boolean} [options.ignoreSelfIntersections=true] ignores self-intersections on input features\n * @returns {FeatureCollection<Point>} point(s) that intersect both\n * @example\n * var line1 = turf.lineString([[126, -11], [129, -21]]);\n * var line2 = turf.lineString([[123, -18], [131, -14]]);\n * var intersects = turf.lineIntersect(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, intersects]\n */\nfunction lineIntersect<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: FeatureCollection<G1> | Feature<G1> | G1,\n line2: FeatureCollection<G2> | Feature<G2> | G2,\n options: {\n removeDuplicates?: boolean;\n ignoreSelfIntersections?: boolean;\n } = {}\n): FeatureCollection<Point> {\n const { removeDuplicates = true, ignoreSelfIntersections = true } = options;\n let features: Feature<G1 | G2>[] = [];\n if (line1.type === \"FeatureCollection\")\n features = features.concat(line1.features);\n else if (line1.type === \"Feature\") features.push(line1);\n else if (\n line1.type === \"LineString\" ||\n line1.type === \"Polygon\" ||\n line1.type === \"MultiLineString\" ||\n line1.type === \"MultiPolygon\"\n ) {\n features.push(feature(line1));\n }\n\n if (line2.type === \"FeatureCollection\")\n features = features.concat(line2.features);\n else if (line2.type === \"Feature\") features.push(line2);\n else if (\n line2.type === \"LineString\" ||\n line2.type === \"Polygon\" ||\n line2.type === \"MultiLineString\" ||\n line2.type === \"MultiPolygon\"\n ) {\n features.push(feature(line2));\n }\n\n const intersections = findIntersections(\n featureCollection(features),\n ignoreSelfIntersections\n );\n\n let results: Intersection[] = [];\n if (removeDuplicates) {\n const unique: Record<string, boolean> = {};\n intersections.forEach((intersection) => {\n const key = intersection.join(\",\");\n if (!unique[key]) {\n unique[key] = true;\n results.push(intersection);\n }\n });\n } else {\n results = intersections;\n }\n return featureCollection(results.map((r) => point(r)));\n}\n\nexport { lineIntersect };\nexport default lineIntersect;\n","// Get around problems with moduleResolution node16 and some older libraries.\n// Manifests as \"This expression is not callable ... has no call signatures\"\n// https://stackoverflow.com/a/74709714\n\nimport lib from \"sweepline-intersections\";\n\nexport const sweeplineIntersections = lib as unknown as typeof lib.default;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-intersect/dist/cjs/index.cjs","../../index.ts","../../lib/sweepline-intersections-export.ts"],"names":[],"mappings":"AAAA;ACAA,wCAAkD;ADElD;AACA;AECA,iJAAgB;AAET,IAAM,uBAAA,EAAyB,gCAAA;AFAtC;AACA;ACwBA,SAAS,aAAA,CAIP,KAAA,EACA,KAAA,EACA,QAAA,EAGI,CAAC,CAAA,EACqB;AAC1B,EAAA,MAAM,EAAE,iBAAA,EAAmB,IAAA,EAAM,wBAAA,EAA0B,KAAK,EAAA,EAAI,OAAA;AACpE,EAAA,IAAI,SAAA,EAA+B,CAAC,CAAA;AACpC,EAAA,GAAA,CAAI,KAAA,CAAM,KAAA,IAAS,mBAAA;AACjB,IAAA,SAAA,EAAW,QAAA,CAAS,MAAA,CAAO,KAAA,CAAM,QAAQ,CAAA;AAAA,EAAA,KAAA,GAAA,CAClC,KAAA,CAAM,KAAA,IA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IAAA;AACd,QAAA,OAAA,CAAQ,IAAA,CAAK,YAAY,CAAA;AAAA,MAC3B;AAAA,IACF,CAAC,CAAA;AAAA,EACH,EAAA,KAAO;AACL,IAAA,QAAA,EAAU,aAAA;AAAA,EACZ;AACA,EAAA,OAAO,wCAAA,OAAkB,CAAQ,GAAA,CAAI,CAAC,CAAA,EAAA,GAAM,4BAAA,CAAO,CAAC,CAAC,CAAA;AACvD;AAGA,IAAO,cAAA,EAAQ,aAAA;AD/Cf;AACE;AACA;AACF,uEAAC","file":"/home/runner/work/turf/turf/packages/turf-line-intersect/dist/cjs/index.cjs","sourcesContent":[null,"import { feature, featureCollection, point } from \"@turf/helpers\";\nimport {\n Feature,\n FeatureCollection,\n LineString,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport type { Intersection } from \"sweepline-intersections\";\nimport { sweeplineIntersections as findIntersections } from \"./lib/sweepline-intersections-export.js\";\n\n/**\n * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).\n *\n * @function\n * @param {GeoJSON} line1 any LineString or Polygon\n * @param {GeoJSON} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.removeDuplicates=true] remove duplicate intersections\n * @param {boolean} [options.ignoreSelfIntersections=true] ignores self-intersections on input features\n * @returns {FeatureCollection<Point>} point(s) that intersect both\n * @example\n * var line1 = turf.lineString([[126, -11], [129, -21]]);\n * var line2 = turf.lineString([[123, -18], [131, -14]]);\n * var intersects = turf.lineIntersect(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, intersects]\n */\nfunction lineIntersect<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: FeatureCollection<G1> | Feature<G1> | G1,\n line2: FeatureCollection<G2> | Feature<G2> | G2,\n options: {\n removeDuplicates?: boolean;\n ignoreSelfIntersections?: boolean;\n } = {}\n): FeatureCollection<Point> {\n const { removeDuplicates = true, ignoreSelfIntersections = true } = options;\n let features: Feature<G1 | G2>[] = [];\n if (line1.type === \"FeatureCollection\")\n features = features.concat(line1.features);\n else if (line1.type === \"Feature\") features.push(line1);\n else if (\n line1.type === \"LineString\" ||\n line1.type === \"Polygon\" ||\n line1.type === \"MultiLineString\" ||\n line1.type === \"MultiPolygon\"\n ) {\n features.push(feature(line1));\n }\n\n if (line2.type === \"FeatureCollection\")\n features = features.concat(line2.features);\n else if (line2.type === \"Feature\") features.push(line2);\n else if (\n line2.type === \"LineString\" ||\n line2.type === \"Polygon\" ||\n line2.type === \"MultiLineString\" ||\n line2.type === \"MultiPolygon\"\n ) {\n features.push(feature(line2));\n }\n\n const intersections = findIntersections(\n featureCollection(features),\n ignoreSelfIntersections\n );\n\n let results: Intersection[] = [];\n if (removeDuplicates) {\n const unique: Record<string, boolean> = {};\n intersections.forEach((intersection) => {\n const key = intersection.join(\",\");\n if (!unique[key]) {\n unique[key] = true;\n results.push(intersection);\n }\n });\n } else {\n results = intersections;\n }\n return featureCollection(results.map((r) => point(r)));\n}\n\nexport { lineIntersect };\nexport default lineIntersect;\n","// Get around problems with moduleResolution node16 and some older libraries.\n// Manifests as \"This expression is not callable ... has no call signatures\"\n// https://stackoverflow.com/a/74709714\n\nimport lib from \"sweepline-intersections\";\n\nexport const sweeplineIntersections = lib as unknown as typeof lib.default;\n"]}
@@ -40,9 +40,9 @@ function lineIntersect(line1, line2, options = {}) {
40
40
  }
41
41
  return featureCollection(results.map((r) => point(r)));
42
42
  }
43
- var turf_line_intersect_default = lineIntersect;
43
+ var index_default = lineIntersect;
44
44
  export {
45
- turf_line_intersect_default as default,
45
+ index_default as default,
46
46
  lineIntersect
47
47
  };
48
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../lib/sweepline-intersections-export.ts"],"sourcesContent":["import { feature, featureCollection, point } from \"@turf/helpers\";\nimport {\n Feature,\n FeatureCollection,\n LineString,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport type { Intersection } from \"sweepline-intersections\";\nimport { sweeplineIntersections as findIntersections } from \"./lib/sweepline-intersections-export.js\";\n\n/**\n * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).\n *\n * @function\n * @param {GeoJSON} line1 any LineString or Polygon\n * @param {GeoJSON} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.removeDuplicates=true] remove duplicate intersections\n * @param {boolean} [options.ignoreSelfIntersections=true] ignores self-intersections on input features\n * @returns {FeatureCollection<Point>} point(s) that intersect both\n * @example\n * var line1 = turf.lineString([[126, -11], [129, -21]]);\n * var line2 = turf.lineString([[123, -18], [131, -14]]);\n * var intersects = turf.lineIntersect(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, intersects]\n */\nfunction lineIntersect<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: FeatureCollection<G1> | Feature<G1> | G1,\n line2: FeatureCollection<G2> | Feature<G2> | G2,\n options: {\n removeDuplicates?: boolean;\n ignoreSelfIntersections?: boolean;\n } = {}\n): FeatureCollection<Point> {\n const { removeDuplicates = true, ignoreSelfIntersections = true } = options;\n let features: Feature<G1 | G2>[] = [];\n if (line1.type === \"FeatureCollection\")\n features = features.concat(line1.features);\n else if (line1.type === \"Feature\") features.push(line1);\n else if (\n line1.type === \"LineString\" ||\n line1.type === \"Polygon\" ||\n line1.type === \"MultiLineString\" ||\n line1.type === \"MultiPolygon\"\n ) {\n features.push(feature(line1));\n }\n\n if (line2.type === \"FeatureCollection\")\n features = features.concat(line2.features);\n else if (line2.type === \"Feature\") features.push(line2);\n else if (\n line2.type === \"LineString\" ||\n line2.type === \"Polygon\" ||\n line2.type === \"MultiLineString\" ||\n line2.type === \"MultiPolygon\"\n ) {\n features.push(feature(line2));\n }\n\n const intersections = findIntersections(\n featureCollection(features),\n ignoreSelfIntersections\n );\n\n let results: Intersection[] = [];\n if (removeDuplicates) {\n const unique: Record<string, boolean> = {};\n intersections.forEach((intersection) => {\n const key = intersection.join(\",\");\n if (!unique[key]) {\n unique[key] = true;\n results.push(intersection);\n }\n });\n } else {\n results = intersections;\n }\n return featureCollection(results.map((r) => point(r)));\n}\n\nexport { lineIntersect };\nexport default lineIntersect;\n","// Get around problems with moduleResolution node16 and some older libraries.\n// Manifests as \"This expression is not callable ... has no call signatures\"\n// https://stackoverflow.com/a/74709714\n\nimport lib from \"sweepline-intersections\";\n\nexport const sweeplineIntersections = lib as unknown as typeof lib.default;\n"],"mappings":";AAAA,SAAS,SAAS,mBAAmB,aAAa;;;ACIlD,OAAO,SAAS;AAET,IAAM,yBAAyB;;;ADyBtC,SAAS,cAIP,OACA,OACA,UAGI,CAAC,GACqB;AAC1B,QAAM,EAAE,mBAAmB,MAAM,0BAA0B,KAAK,IAAI;AACpE,MAAI,WAA+B,CAAC;AACpC,MAAI,MAAM,SAAS;AACjB,eAAW,SAAS,OAAO,MAAM,QAAQ;AAAA,WAClC,MAAM,SAAS,UAAW,UAAS,KAAK,KAAK;AAAA,WAEpD,MAAM,SAAS,gBACf,MAAM,SAAS,aACf,MAAM,SAAS,qBACf,MAAM,SAAS,gBACf;AACA,aAAS,KAAK,QAAQ,KAAK,CAAC;AAAA,EAC9B;AAEA,MAAI,MAAM,SAAS;AACjB,eAAW,SAAS,OAAO,MAAM,QAAQ;AAAA,WAClC,MAAM,SAAS,UAAW,UAAS,KAAK,KAAK;AAAA,WAEpD,MAAM,SAAS,gBACf,MAAM,SAAS,aACf,MAAM,SAAS,qBACf,MAAM,SAAS,gBACf;AACA,aAAS,KAAK,QAAQ,KAAK,CAAC;AAAA,EAC9B;AAEA,QAAM,gBAAgB;AAAA,IACpB,kBAAkB,QAAQ;AAAA,IAC1B;AAAA,EACF;AAEA,MAAI,UAA0B,CAAC;AAC/B,MAAI,kBAAkB;AACpB,UAAM,SAAkC,CAAC;AACzC,kBAAc,QAAQ,CAAC,iBAAiB;AACtC,YAAM,MAAM,aAAa,KAAK,GAAG;AACjC,UAAI,CAAC,OAAO,GAAG,GAAG;AAChB,eAAO,GAAG,IAAI;AACd,gBAAQ,KAAK,YAAY;AAAA,MAC3B;AAAA,IACF,CAAC;AAAA,EACH,OAAO;AACL,cAAU;AAAA,EACZ;AACA,SAAO,kBAAkB,QAAQ,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC;AACvD;AAGA,IAAO,8BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts","../../lib/sweepline-intersections-export.ts"],"sourcesContent":["import { feature, featureCollection, point } from \"@turf/helpers\";\nimport {\n Feature,\n FeatureCollection,\n LineString,\n MultiLineString,\n MultiPolygon,\n Point,\n Polygon,\n} from \"geojson\";\nimport type { Intersection } from \"sweepline-intersections\";\nimport { sweeplineIntersections as findIntersections } from \"./lib/sweepline-intersections-export.js\";\n\n/**\n * Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).\n *\n * @function\n * @param {GeoJSON} line1 any LineString or Polygon\n * @param {GeoJSON} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {boolean} [options.removeDuplicates=true] remove duplicate intersections\n * @param {boolean} [options.ignoreSelfIntersections=true] ignores self-intersections on input features\n * @returns {FeatureCollection<Point>} point(s) that intersect both\n * @example\n * var line1 = turf.lineString([[126, -11], [129, -21]]);\n * var line2 = turf.lineString([[123, -18], [131, -14]]);\n * var intersects = turf.lineIntersect(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, intersects]\n */\nfunction lineIntersect<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: FeatureCollection<G1> | Feature<G1> | G1,\n line2: FeatureCollection<G2> | Feature<G2> | G2,\n options: {\n removeDuplicates?: boolean;\n ignoreSelfIntersections?: boolean;\n } = {}\n): FeatureCollection<Point> {\n const { removeDuplicates = true, ignoreSelfIntersections = true } = options;\n let features: Feature<G1 | G2>[] = [];\n if (line1.type === \"FeatureCollection\")\n features = features.concat(line1.features);\n else if (line1.type === \"Feature\") features.push(line1);\n else if (\n line1.type === \"LineString\" ||\n line1.type === \"Polygon\" ||\n line1.type === \"MultiLineString\" ||\n line1.type === \"MultiPolygon\"\n ) {\n features.push(feature(line1));\n }\n\n if (line2.type === \"FeatureCollection\")\n features = features.concat(line2.features);\n else if (line2.type === \"Feature\") features.push(line2);\n else if (\n line2.type === \"LineString\" ||\n line2.type === \"Polygon\" ||\n line2.type === \"MultiLineString\" ||\n line2.type === \"MultiPolygon\"\n ) {\n features.push(feature(line2));\n }\n\n const intersections = findIntersections(\n featureCollection(features),\n ignoreSelfIntersections\n );\n\n let results: Intersection[] = [];\n if (removeDuplicates) {\n const unique: Record<string, boolean> = {};\n intersections.forEach((intersection) => {\n const key = intersection.join(\",\");\n if (!unique[key]) {\n unique[key] = true;\n results.push(intersection);\n }\n });\n } else {\n results = intersections;\n }\n return featureCollection(results.map((r) => point(r)));\n}\n\nexport { lineIntersect };\nexport default lineIntersect;\n","// Get around problems with moduleResolution node16 and some older libraries.\n// Manifests as \"This expression is not callable ... has no call signatures\"\n// https://stackoverflow.com/a/74709714\n\nimport lib from \"sweepline-intersections\";\n\nexport const sweeplineIntersections = lib as unknown as typeof lib.default;\n"],"mappings":";AAAA,SAAS,SAAS,mBAAmB,aAAa;;;ACIlD,OAAO,SAAS;AAET,IAAM,yBAAyB;;;ADyBtC,SAAS,cAIP,OACA,OACA,UAGI,CAAC,GACqB;AAC1B,QAAM,EAAE,mBAAmB,MAAM,0BAA0B,KAAK,IAAI;AACpE,MAAI,WAA+B,CAAC;AACpC,MAAI,MAAM,SAAS;AACjB,eAAW,SAAS,OAAO,MAAM,QAAQ;AAAA,WAClC,MAAM,SAAS,UAAW,UAAS,KAAK,KAAK;AAAA,WAEpD,MAAM,SAAS,gBACf,MAAM,SAAS,aACf,MAAM,SAAS,qBACf,MAAM,SAAS,gBACf;AACA,aAAS,KAAK,QAAQ,KAAK,CAAC;AAAA,EAC9B;AAEA,MAAI,MAAM,SAAS;AACjB,eAAW,SAAS,OAAO,MAAM,QAAQ;AAAA,WAClC,MAAM,SAAS,UAAW,UAAS,KAAK,KAAK;AAAA,WAEpD,MAAM,SAAS,gBACf,MAAM,SAAS,aACf,MAAM,SAAS,qBACf,MAAM,SAAS,gBACf;AACA,aAAS,KAAK,QAAQ,KAAK,CAAC;AAAA,EAC9B;AAEA,QAAM,gBAAgB;AAAA,IACpB,kBAAkB,QAAQ;AAAA,IAC1B;AAAA,EACF;AAEA,MAAI,UAA0B,CAAC;AAC/B,MAAI,kBAAkB;AACpB,UAAM,SAAkC,CAAC;AACzC,kBAAc,QAAQ,CAAC,iBAAiB;AACtC,YAAM,MAAM,aAAa,KAAK,GAAG;AACjC,UAAI,CAAC,OAAO,GAAG,GAAG;AAChB,eAAO,GAAG,IAAI;AACd,gBAAQ,KAAK,YAAY;AAAA,MAC3B;AAAA,IACF,CAAC;AAAA,EACH,OAAO;AACL,cAAU;AAAA,EACZ;AACA,SAAO,kBAAkB,QAAQ,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC;AACvD;AAGA,IAAO,gBAAQ;","names":[]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/line-intersect",
3
- "version": "7.2.0",
4
- "description": "turf line-intersect module",
3
+ "version": "7.3.0",
4
+ "description": "Takes any LineString or Polygon GeoJSON and returns the intersecting point(s).",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "Denis Carriere <@DenisCarriere>",
@@ -56,23 +56,23 @@
56
56
  "test:tape": "tsx test.ts"
57
57
  },
58
58
  "devDependencies": {
59
- "@turf/truncate": "^7.2.0",
59
+ "@turf/truncate": "7.3.0",
60
60
  "@types/benchmark": "^2.1.5",
61
- "@types/tape": "^4.13.4",
61
+ "@types/tape": "^5.8.1",
62
62
  "benchmark": "^2.1.4",
63
63
  "load-json-file": "^7.0.1",
64
64
  "npm-run-all": "^4.1.5",
65
65
  "tape": "^5.9.0",
66
- "tsup": "^8.3.5",
67
- "tsx": "^4.19.2",
68
- "typescript": "^5.5.4",
69
- "write-json-file": "^5.0.0"
66
+ "tsup": "^8.4.0",
67
+ "tsx": "^4.19.4",
68
+ "typescript": "^5.8.3",
69
+ "write-json-file": "^6.0.0"
70
70
  },
71
71
  "dependencies": {
72
- "@turf/helpers": "^7.2.0",
72
+ "@turf/helpers": "7.3.0",
73
73
  "@types/geojson": "^7946.0.10",
74
74
  "sweepline-intersections": "^1.5.0",
75
75
  "tslib": "^2.8.1"
76
76
  },
77
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
77
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
78
78
  }
@@ -12,7 +12,7 @@ Takes a [line][1] and returns a [line][1] at offset by the specified distance.
12
12
  * `distance` **[number][5]** distance to offset the line (can be of negative value)
13
13
  * `options` **[Object][6]** Optional parameters (optional, default `{}`)
14
14
 
15
- * `options.units` **[string][7]** can be degrees, radians, miles, kilometers, inches, yards, meters (optional, default `'kilometers'`)
15
+ * `options.units` **Units** Supports all valid Turf [Units][7]. (optional, default `'kilometers'`)
16
16
 
17
17
  ### Examples
18
18
 
@@ -40,7 +40,7 @@ Returns **[Feature][3]<([LineString][1] | [MultiLineString][4])>** Line offset f
40
40
 
41
41
  [6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
42
42
 
43
- [7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
43
+ [7]: https://turfjs.org/docs/api/types/Units
44
44
 
45
45
  <!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->
46
46
 
@@ -120,9 +120,9 @@ function processSegment(point1, point2, offset) {
120
120
  [out2x, out2y]
121
121
  ];
122
122
  }
123
- var turf_line_offset_default = lineOffset;
123
+ var index_default = lineOffset;
124
124
 
125
125
 
126
126
 
127
- exports.default = turf_line_offset_default; exports.lineOffset = lineOffset;
127
+ exports.default = index_default; exports.lineOffset = lineOffset;
128
128
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-offset/dist/cjs/index.cjs","../../index.js","../../lib/intersection.js"],"names":["intersection"],"mappings":"AAAA;ACAA,kCAA4B;AAC5B,4CAAmC;AACnC;AACE;AACA;AACA;AACA;AAAA,wCACK;ADEP;AACA;AEGA,SAAS,EAAA,CAAG,OAAA,EAAS;AACnB,EAAA,IAAI,MAAA,EAAQ,OAAA,CAAQ,CAAC,CAAA;AACrB,EAAA,IAAI,IAAA,EAAM,OAAA,CAAQ,CAAC,CAAA;AACnB,EAAA,OAAO,CAAC,GAAA,CAAI,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG,GAAA,CAAI,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAC,CAAA;AAC9C;AAUA,SAAS,YAAA,CAAa,EAAA,EAAI,EAAA,EAAI;AAC5B,EAAA,OAAO,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAA;AACrC;AAUA,SAAS,GAAA,CAAI,EAAA,EAAI,EAAA,EAAI;AACnB,EAAA,OAAO,CAAC,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAA,EAAG,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAC,CAAA;AACtC;AAUA,SAAS,GAAA,CAAI,EAAA,EAAI,EAAA,EAAI;AACnB,EAAA,OAAO,CAAC,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAA,EAAG,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAC,CAAA;AACtC;AAUA,SAAS,UAAA,CAA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EAAA,EAAM,CAAA;AAC7D,EAAA,OAAO;AAAA,IACL,CAAC,KAAA,EAAO,KAAK,CAAA;AAAA,IACb,CAAC,KAAA,EAAO,KAAK;AAAA,EACf,CAAA;AACF;AAGA,IAAO,yBAAA,EAAQ,UAAA;ADVf;AACE;AACA;AACF,4EAAC","file":"/home/runner/work/turf/turf/packages/turf-line-offset/dist/cjs/index.cjs","sourcesContent":[null,"import { flattenEach } from \"@turf/meta\";\nimport { getCoords, getType } from \"@turf/invariant\";\nimport {\n isObject,\n lineString,\n multiLineString,\n lengthToDegrees,\n} from \"@turf/helpers\";\nimport { intersection } from \"./lib/intersection.js\";\n\n/**\n * Takes a {@link LineString|line} and returns a {@link LineString|line} at offset by the specified distance.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString>} geojson input GeoJSON\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, kilometers, inches, yards, meters\n * @returns {Feature<LineString|MultiLineString>} Line offset from the input line\n * @example\n * var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { \"stroke\": \"#F00\" });\n *\n * var offsetLine = turf.lineOffset(line, 2, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [offsetLine, line]\n * offsetLine.properties.stroke = \"#00F\"\n */\nfunction lineOffset(geojson, distance, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n\n // Valdiation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n\n var type = getType(geojson);\n var properties = geojson.properties;\n\n switch (type) {\n case \"LineString\":\n return lineOffsetFeature(geojson, distance, units);\n case \"MultiLineString\":\n var coords = [];\n flattenEach(geojson, function (feature) {\n coords.push(\n lineOffsetFeature(feature, distance, units).geometry.coordinates\n );\n });\n return multiLineString(coords, properties);\n default:\n throw new Error(\"geometry \" + type + \" is not supported\");\n }\n}\n\n/**\n * Line Offset\n *\n * @private\n * @param {Geometry|Feature<LineString>} line input line\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {string} [units=kilometers] units\n * @returns {Feature<LineString>} Line offset from the input line\n */\nfunction lineOffsetFeature(line, distance, units) {\n var segments = [];\n var offsetDegrees = lengthToDegrees(distance, units);\n var coords = getCoords(line);\n var finalCoords = [];\n coords.forEach(function (currentCoords, index) {\n if (index !== coords.length - 1) {\n var segment = processSegment(\n currentCoords,\n coords[index + 1],\n offsetDegrees\n );\n segments.push(segment);\n if (index > 0) {\n var seg2Coords = segments[index - 1];\n var intersects = intersection(segment, seg2Coords);\n\n // Handling for line segments that aren't straight\n if (intersects !== false) {\n seg2Coords[1] = intersects;\n segment[0] = intersects;\n }\n\n finalCoords.push(seg2Coords[0]);\n if (index === coords.length - 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n // Handling for lines that only have 1 segment\n if (coords.length === 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n });\n return lineString(finalCoords, line.properties);\n}\n\n/**\n * Process Segment\n * Inspiration taken from http://stackoverflow.com/questions/2825412/draw-a-parallel-line\n *\n * @private\n * @param {Array<number>} point1 Point coordinates\n * @param {Array<number>} point2 Point coordinates\n * @param {number} offset Offset\n * @returns {Array<Array<number>>} offset points\n */\nfunction processSegment(point1, point2, offset) {\n var L = Math.sqrt(\n (point1[0] - point2[0]) * (point1[0] - point2[0]) +\n (point1[1] - point2[1]) * (point1[1] - point2[1])\n );\n\n var out1x = point1[0] + (offset * (point2[1] - point1[1])) / L;\n var out2x = point2[0] + (offset * (point2[1] - point1[1])) / L;\n var out1y = point1[1] + (offset * (point1[0] - point2[0])) / L;\n var out2y = point2[1] + (offset * (point1[0] - point2[0])) / L;\n return [\n [out1x, out1y],\n [out2x, out2y],\n ];\n}\n\nexport { lineOffset };\nexport default lineOffset;\n","/**\n * https://github.com/rook2pawn/node-intersection\n *\n * Author @rook2pawn\n */\n\n/**\n * AB\n *\n * @private\n * @param {Array<Array<number>>} segment - 2 vertex line segment\n * @returns {Array<number>} coordinates [x, y]\n */\nfunction ab(segment) {\n var start = segment[0];\n var end = segment[1];\n return [end[0] - start[0], end[1] - start[1]];\n}\n\n/**\n * Cross Product\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Cross Product\n */\nfunction crossProduct(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n\n/**\n * Add\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Add\n */\nfunction add(v1, v2) {\n return [v1[0] + v2[0], v1[1] + v2[1]];\n}\n\n/**\n * Sub\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Sub\n */\nfunction sub(v1, v2) {\n return [v1[0] - v2[0], v1[1] - v2[1]];\n}\n\n/**\n * scalarMult\n *\n * @private\n * @param {number} s scalar\n * @param {Array<number>} v coordinates [x, y]\n * @returns {Array<number>} scalarMult\n */\nfunction scalarMult(s, v) {\n return [s * v[0], s * v[1]];\n}\n\n/**\n * Intersect Segments\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>} intersection\n */\nfunction intersectSegments(a, b) {\n var p = a[0];\n var r = ab(a);\n var q = b[0];\n var s = ab(b);\n\n var cross = crossProduct(r, s);\n var qmp = sub(q, p);\n var numerator = crossProduct(qmp, s);\n var t = numerator / cross;\n var intersection = add(p, scalarMult(t, r));\n return intersection;\n}\n\n/**\n * Is Parallel\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {boolean} true if a and b are parallel (or co-linear)\n */\nfunction isParallel(a, b) {\n var r = ab(a);\n var s = ab(b);\n return crossProduct(r, s) === 0;\n}\n\n/**\n * Intersection\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>|boolean} true if a and b are parallel (or co-linear)\n */\nfunction intersection(a, b) {\n if (isParallel(a, b)) return false;\n return intersectSegments(a, b);\n}\n\nexport { intersection };\nexport default intersection;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-offset/dist/cjs/index.cjs","../../index.js","../../lib/intersection.js"],"names":["intersection"],"mappings":"AAAA;ACAA,kCAA4B;AAC5B,4CAAmC;AACnC;AACE;AACA;AACA;AACA;AAAA,wCACK;ADEP;AACA;AEGA,SAAS,EAAA,CAAG,OAAA,EAAS;AACnB,EAAA,IAAI,MAAA,EAAQ,OAAA,CAAQ,CAAC,CAAA;AACrB,EAAA,IAAI,IAAA,EAAM,OAAA,CAAQ,CAAC,CAAA;AACnB,EAAA,OAAO,CAAC,GAAA,CAAI,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAA,EAAG,GAAA,CAAI,CAAC,EAAA,EAAI,KAAA,CAAM,CAAC,CAAC,CAAA;AAC9C;AAUA,SAAS,YAAA,CAAa,EAAA,EAAI,EAAA,EAAI;AAC5B,EAAA,OAAO,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAA;AACrC;AAUA,SAAS,GAAA,CAAI,EAAA,EAAI,EAAA,EAAI;AACnB,EAAA,OAAO,CAAC,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAA,EAAG,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CAAC,CAAA;AACtC;AAUA,SAAS,GAAA,CAAI,EAAA,EAAI,EAAA,EAAI;AACnB,EAAA,OAAO,CAAC,EAAA,CAAG,CAAC,EAAA,EAAI,EAAA,CAAG,CAAC,CA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,CAAO,CAAC,EAAA,EAAK,OAAA,EAAA,CAAU,MAAA,CAAO,CAAC,EAAA,EAAI,MAAA,CAAO,CAAC,CAAA,EAAA,EAAM,CAAA;AAC7D,EAAA,OAAO;AAAA,IACL,CAAC,KAAA,EAAO,KAAK,CAAA;AAAA,IACb,CAAC,KAAA,EAAO,KAAK;AAAA,EACf,CAAA;AACF;AAGA,IAAO,cAAA,EAAQ,UAAA;ADVf;AACE;AACA;AACF,iEAAC","file":"/home/runner/work/turf/turf/packages/turf-line-offset/dist/cjs/index.cjs","sourcesContent":[null,"import { flattenEach } from \"@turf/meta\";\nimport { getCoords, getType } from \"@turf/invariant\";\nimport {\n isObject,\n lineString,\n multiLineString,\n lengthToDegrees,\n} from \"@turf/helpers\";\nimport { intersection } from \"./lib/intersection.js\";\n\n/**\n * Takes a {@link LineString|line} and returns a {@link LineString|line} at offset by the specified distance.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString>} geojson input GeoJSON\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}.\n * @returns {Feature<LineString|MultiLineString>} Line offset from the input line\n * @example\n * var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { \"stroke\": \"#F00\" });\n *\n * var offsetLine = turf.lineOffset(line, 2, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [offsetLine, line]\n * offsetLine.properties.stroke = \"#00F\"\n */\nfunction lineOffset(geojson, distance, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n\n // Valdiation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n\n var type = getType(geojson);\n var properties = geojson.properties;\n\n switch (type) {\n case \"LineString\":\n return lineOffsetFeature(geojson, distance, units);\n case \"MultiLineString\":\n var coords = [];\n flattenEach(geojson, function (feature) {\n coords.push(\n lineOffsetFeature(feature, distance, units).geometry.coordinates\n );\n });\n return multiLineString(coords, properties);\n default:\n throw new Error(\"geometry \" + type + \" is not supported\");\n }\n}\n\n/**\n * Line Offset\n *\n * @private\n * @param {Geometry|Feature<LineString>} line input line\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {string} [units=kilometers] units\n * @returns {Feature<LineString>} Line offset from the input line\n */\nfunction lineOffsetFeature(line, distance, units) {\n var segments = [];\n var offsetDegrees = lengthToDegrees(distance, units);\n var coords = getCoords(line);\n var finalCoords = [];\n coords.forEach(function (currentCoords, index) {\n if (index !== coords.length - 1) {\n var segment = processSegment(\n currentCoords,\n coords[index + 1],\n offsetDegrees\n );\n segments.push(segment);\n if (index > 0) {\n var seg2Coords = segments[index - 1];\n var intersects = intersection(segment, seg2Coords);\n\n // Handling for line segments that aren't straight\n if (intersects !== false) {\n seg2Coords[1] = intersects;\n segment[0] = intersects;\n }\n\n finalCoords.push(seg2Coords[0]);\n if (index === coords.length - 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n // Handling for lines that only have 1 segment\n if (coords.length === 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n });\n return lineString(finalCoords, line.properties);\n}\n\n/**\n * Process Segment\n * Inspiration taken from http://stackoverflow.com/questions/2825412/draw-a-parallel-line\n *\n * @private\n * @param {Array<number>} point1 Point coordinates\n * @param {Array<number>} point2 Point coordinates\n * @param {number} offset Offset\n * @returns {Array<Array<number>>} offset points\n */\nfunction processSegment(point1, point2, offset) {\n var L = Math.sqrt(\n (point1[0] - point2[0]) * (point1[0] - point2[0]) +\n (point1[1] - point2[1]) * (point1[1] - point2[1])\n );\n\n var out1x = point1[0] + (offset * (point2[1] - point1[1])) / L;\n var out2x = point2[0] + (offset * (point2[1] - point1[1])) / L;\n var out1y = point1[1] + (offset * (point1[0] - point2[0])) / L;\n var out2y = point2[1] + (offset * (point1[0] - point2[0])) / L;\n return [\n [out1x, out1y],\n [out2x, out2y],\n ];\n}\n\nexport { lineOffset };\nexport default lineOffset;\n","/**\n * https://github.com/rook2pawn/node-intersection\n *\n * Author @rook2pawn\n */\n\n/**\n * AB\n *\n * @private\n * @param {Array<Array<number>>} segment - 2 vertex line segment\n * @returns {Array<number>} coordinates [x, y]\n */\nfunction ab(segment) {\n var start = segment[0];\n var end = segment[1];\n return [end[0] - start[0], end[1] - start[1]];\n}\n\n/**\n * Cross Product\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Cross Product\n */\nfunction crossProduct(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n\n/**\n * Add\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Add\n */\nfunction add(v1, v2) {\n return [v1[0] + v2[0], v1[1] + v2[1]];\n}\n\n/**\n * Sub\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Sub\n */\nfunction sub(v1, v2) {\n return [v1[0] - v2[0], v1[1] - v2[1]];\n}\n\n/**\n * scalarMult\n *\n * @private\n * @param {number} s scalar\n * @param {Array<number>} v coordinates [x, y]\n * @returns {Array<number>} scalarMult\n */\nfunction scalarMult(s, v) {\n return [s * v[0], s * v[1]];\n}\n\n/**\n * Intersect Segments\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>} intersection\n */\nfunction intersectSegments(a, b) {\n var p = a[0];\n var r = ab(a);\n var q = b[0];\n var s = ab(b);\n\n var cross = crossProduct(r, s);\n var qmp = sub(q, p);\n var numerator = crossProduct(qmp, s);\n var t = numerator / cross;\n var intersection = add(p, scalarMult(t, r));\n return intersection;\n}\n\n/**\n * Is Parallel\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {boolean} true if a and b are parallel (or co-linear)\n */\nfunction isParallel(a, b) {\n var r = ab(a);\n var s = ab(b);\n return crossProduct(r, s) === 0;\n}\n\n/**\n * Intersection\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>|boolean} true if a and b are parallel (or co-linear)\n */\nfunction intersection(a, b) {\n if (isParallel(a, b)) return false;\n return intersectSegments(a, b);\n}\n\nexport { intersection };\nexport default intersection;\n"]}
@@ -120,9 +120,9 @@ function processSegment(point1, point2, offset) {
120
120
  [out2x, out2y]
121
121
  ];
122
122
  }
123
- var turf_line_offset_default = lineOffset;
123
+ var index_default = lineOffset;
124
124
  export {
125
- turf_line_offset_default as default,
125
+ index_default as default,
126
126
  lineOffset
127
127
  };
128
128
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.js","../../lib/intersection.js"],"sourcesContent":["import { flattenEach } from \"@turf/meta\";\nimport { getCoords, getType } from \"@turf/invariant\";\nimport {\n isObject,\n lineString,\n multiLineString,\n lengthToDegrees,\n} from \"@turf/helpers\";\nimport { intersection } from \"./lib/intersection.js\";\n\n/**\n * Takes a {@link LineString|line} and returns a {@link LineString|line} at offset by the specified distance.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString>} geojson input GeoJSON\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {Object} [options={}] Optional parameters\n * @param {string} [options.units='kilometers'] can be degrees, radians, miles, kilometers, inches, yards, meters\n * @returns {Feature<LineString|MultiLineString>} Line offset from the input line\n * @example\n * var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { \"stroke\": \"#F00\" });\n *\n * var offsetLine = turf.lineOffset(line, 2, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [offsetLine, line]\n * offsetLine.properties.stroke = \"#00F\"\n */\nfunction lineOffset(geojson, distance, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n\n // Valdiation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n\n var type = getType(geojson);\n var properties = geojson.properties;\n\n switch (type) {\n case \"LineString\":\n return lineOffsetFeature(geojson, distance, units);\n case \"MultiLineString\":\n var coords = [];\n flattenEach(geojson, function (feature) {\n coords.push(\n lineOffsetFeature(feature, distance, units).geometry.coordinates\n );\n });\n return multiLineString(coords, properties);\n default:\n throw new Error(\"geometry \" + type + \" is not supported\");\n }\n}\n\n/**\n * Line Offset\n *\n * @private\n * @param {Geometry|Feature<LineString>} line input line\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {string} [units=kilometers] units\n * @returns {Feature<LineString>} Line offset from the input line\n */\nfunction lineOffsetFeature(line, distance, units) {\n var segments = [];\n var offsetDegrees = lengthToDegrees(distance, units);\n var coords = getCoords(line);\n var finalCoords = [];\n coords.forEach(function (currentCoords, index) {\n if (index !== coords.length - 1) {\n var segment = processSegment(\n currentCoords,\n coords[index + 1],\n offsetDegrees\n );\n segments.push(segment);\n if (index > 0) {\n var seg2Coords = segments[index - 1];\n var intersects = intersection(segment, seg2Coords);\n\n // Handling for line segments that aren't straight\n if (intersects !== false) {\n seg2Coords[1] = intersects;\n segment[0] = intersects;\n }\n\n finalCoords.push(seg2Coords[0]);\n if (index === coords.length - 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n // Handling for lines that only have 1 segment\n if (coords.length === 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n });\n return lineString(finalCoords, line.properties);\n}\n\n/**\n * Process Segment\n * Inspiration taken from http://stackoverflow.com/questions/2825412/draw-a-parallel-line\n *\n * @private\n * @param {Array<number>} point1 Point coordinates\n * @param {Array<number>} point2 Point coordinates\n * @param {number} offset Offset\n * @returns {Array<Array<number>>} offset points\n */\nfunction processSegment(point1, point2, offset) {\n var L = Math.sqrt(\n (point1[0] - point2[0]) * (point1[0] - point2[0]) +\n (point1[1] - point2[1]) * (point1[1] - point2[1])\n );\n\n var out1x = point1[0] + (offset * (point2[1] - point1[1])) / L;\n var out2x = point2[0] + (offset * (point2[1] - point1[1])) / L;\n var out1y = point1[1] + (offset * (point1[0] - point2[0])) / L;\n var out2y = point2[1] + (offset * (point1[0] - point2[0])) / L;\n return [\n [out1x, out1y],\n [out2x, out2y],\n ];\n}\n\nexport { lineOffset };\nexport default lineOffset;\n","/**\n * https://github.com/rook2pawn/node-intersection\n *\n * Author @rook2pawn\n */\n\n/**\n * AB\n *\n * @private\n * @param {Array<Array<number>>} segment - 2 vertex line segment\n * @returns {Array<number>} coordinates [x, y]\n */\nfunction ab(segment) {\n var start = segment[0];\n var end = segment[1];\n return [end[0] - start[0], end[1] - start[1]];\n}\n\n/**\n * Cross Product\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Cross Product\n */\nfunction crossProduct(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n\n/**\n * Add\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Add\n */\nfunction add(v1, v2) {\n return [v1[0] + v2[0], v1[1] + v2[1]];\n}\n\n/**\n * Sub\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Sub\n */\nfunction sub(v1, v2) {\n return [v1[0] - v2[0], v1[1] - v2[1]];\n}\n\n/**\n * scalarMult\n *\n * @private\n * @param {number} s scalar\n * @param {Array<number>} v coordinates [x, y]\n * @returns {Array<number>} scalarMult\n */\nfunction scalarMult(s, v) {\n return [s * v[0], s * v[1]];\n}\n\n/**\n * Intersect Segments\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>} intersection\n */\nfunction intersectSegments(a, b) {\n var p = a[0];\n var r = ab(a);\n var q = b[0];\n var s = ab(b);\n\n var cross = crossProduct(r, s);\n var qmp = sub(q, p);\n var numerator = crossProduct(qmp, s);\n var t = numerator / cross;\n var intersection = add(p, scalarMult(t, r));\n return intersection;\n}\n\n/**\n * Is Parallel\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {boolean} true if a and b are parallel (or co-linear)\n */\nfunction isParallel(a, b) {\n var r = ab(a);\n var s = ab(b);\n return crossProduct(r, s) === 0;\n}\n\n/**\n * Intersection\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>|boolean} true if a and b are parallel (or co-linear)\n */\nfunction intersection(a, b) {\n if (isParallel(a, b)) return false;\n return intersectSegments(a, b);\n}\n\nexport { intersection };\nexport default intersection;\n"],"mappings":";AAAA,SAAS,mBAAmB;AAC5B,SAAS,WAAW,eAAe;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACMP,SAAS,GAAG,SAAS;AACnB,MAAI,QAAQ,QAAQ,CAAC;AACrB,MAAI,MAAM,QAAQ,CAAC;AACnB,SAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC;AAC9C;AAUA,SAAS,aAAa,IAAI,IAAI;AAC5B,SAAO,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC;AACrC;AAUA,SAAS,IAAI,IAAI,IAAI;AACnB,SAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC;AACtC;AAUA,SAAS,IAAI,IAAI,IAAI;AACnB,SAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC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AO,CAAC,MAC5C,OAAO,CAAC,IAAI,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,EACnD;AAEA,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,SAAO;AAAA,IACL,CAAC,OAAO,KAAK;AAAA,IACb,CAAC,OAAO,KAAK;AAAA,EACf;AACF;AAGA,IAAO,2BAAQ;","names":["intersection"]}
1
+ {"version":3,"sources":["../../index.js","../../lib/intersection.js"],"sourcesContent":["import { flattenEach } from \"@turf/meta\";\nimport { getCoords, getType } from \"@turf/invariant\";\nimport {\n isObject,\n lineString,\n multiLineString,\n lengthToDegrees,\n} from \"@turf/helpers\";\nimport { intersection } from \"./lib/intersection.js\";\n\n/**\n * Takes a {@link LineString|line} and returns a {@link LineString|line} at offset by the specified distance.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString>} geojson input GeoJSON\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {Object} [options={}] Optional parameters\n * @param {Units} [options.units='kilometers'] Supports all valid Turf {@link https://turfjs.org/docs/api/types/Units Units}.\n * @returns {Feature<LineString|MultiLineString>} Line offset from the input line\n * @example\n * var line = turf.lineString([[-83, 30], [-84, 36], [-78, 41]], { \"stroke\": \"#F00\" });\n *\n * var offsetLine = turf.lineOffset(line, 2, {units: 'miles'});\n *\n * //addToMap\n * var addToMap = [offsetLine, line]\n * offsetLine.properties.stroke = \"#00F\"\n */\nfunction lineOffset(geojson, distance, options) {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var units = options.units;\n\n // Valdiation\n if (!geojson) throw new Error(\"geojson is required\");\n if (distance === undefined || distance === null || isNaN(distance))\n throw new Error(\"distance is required\");\n\n var type = getType(geojson);\n var properties = geojson.properties;\n\n switch (type) {\n case \"LineString\":\n return lineOffsetFeature(geojson, distance, units);\n case \"MultiLineString\":\n var coords = [];\n flattenEach(geojson, function (feature) {\n coords.push(\n lineOffsetFeature(feature, distance, units).geometry.coordinates\n );\n });\n return multiLineString(coords, properties);\n default:\n throw new Error(\"geometry \" + type + \" is not supported\");\n }\n}\n\n/**\n * Line Offset\n *\n * @private\n * @param {Geometry|Feature<LineString>} line input line\n * @param {number} distance distance to offset the line (can be of negative value)\n * @param {string} [units=kilometers] units\n * @returns {Feature<LineString>} Line offset from the input line\n */\nfunction lineOffsetFeature(line, distance, units) {\n var segments = [];\n var offsetDegrees = lengthToDegrees(distance, units);\n var coords = getCoords(line);\n var finalCoords = [];\n coords.forEach(function (currentCoords, index) {\n if (index !== coords.length - 1) {\n var segment = processSegment(\n currentCoords,\n coords[index + 1],\n offsetDegrees\n );\n segments.push(segment);\n if (index > 0) {\n var seg2Coords = segments[index - 1];\n var intersects = intersection(segment, seg2Coords);\n\n // Handling for line segments that aren't straight\n if (intersects !== false) {\n seg2Coords[1] = intersects;\n segment[0] = intersects;\n }\n\n finalCoords.push(seg2Coords[0]);\n if (index === coords.length - 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n // Handling for lines that only have 1 segment\n if (coords.length === 2) {\n finalCoords.push(segment[0]);\n finalCoords.push(segment[1]);\n }\n }\n });\n return lineString(finalCoords, line.properties);\n}\n\n/**\n * Process Segment\n * Inspiration taken from http://stackoverflow.com/questions/2825412/draw-a-parallel-line\n *\n * @private\n * @param {Array<number>} point1 Point coordinates\n * @param {Array<number>} point2 Point coordinates\n * @param {number} offset Offset\n * @returns {Array<Array<number>>} offset points\n */\nfunction processSegment(point1, point2, offset) {\n var L = Math.sqrt(\n (point1[0] - point2[0]) * (point1[0] - point2[0]) +\n (point1[1] - point2[1]) * (point1[1] - point2[1])\n );\n\n var out1x = point1[0] + (offset * (point2[1] - point1[1])) / L;\n var out2x = point2[0] + (offset * (point2[1] - point1[1])) / L;\n var out1y = point1[1] + (offset * (point1[0] - point2[0])) / L;\n var out2y = point2[1] + (offset * (point1[0] - point2[0])) / L;\n return [\n [out1x, out1y],\n [out2x, out2y],\n ];\n}\n\nexport { lineOffset };\nexport default lineOffset;\n","/**\n * https://github.com/rook2pawn/node-intersection\n *\n * Author @rook2pawn\n */\n\n/**\n * AB\n *\n * @private\n * @param {Array<Array<number>>} segment - 2 vertex line segment\n * @returns {Array<number>} coordinates [x, y]\n */\nfunction ab(segment) {\n var start = segment[0];\n var end = segment[1];\n return [end[0] - start[0], end[1] - start[1]];\n}\n\n/**\n * Cross Product\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Cross Product\n */\nfunction crossProduct(v1, v2) {\n return v1[0] * v2[1] - v2[0] * v1[1];\n}\n\n/**\n * Add\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Add\n */\nfunction add(v1, v2) {\n return [v1[0] + v2[0], v1[1] + v2[1]];\n}\n\n/**\n * Sub\n *\n * @private\n * @param {Array<number>} v1 coordinates [x, y]\n * @param {Array<number>} v2 coordinates [x, y]\n * @returns {Array<number>} Sub\n */\nfunction sub(v1, v2) {\n return [v1[0] - v2[0], v1[1] - v2[1]];\n}\n\n/**\n * scalarMult\n *\n * @private\n * @param {number} s scalar\n * @param {Array<number>} v coordinates [x, y]\n * @returns {Array<number>} scalarMult\n */\nfunction scalarMult(s, v) {\n return [s * v[0], s * v[1]];\n}\n\n/**\n * Intersect Segments\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>} intersection\n */\nfunction intersectSegments(a, b) {\n var p = a[0];\n var r = ab(a);\n var q = b[0];\n var s = ab(b);\n\n var cross = crossProduct(r, s);\n var qmp = sub(q, p);\n var numerator = crossProduct(qmp, s);\n var t = numerator / cross;\n var intersection = add(p, scalarMult(t, r));\n return intersection;\n}\n\n/**\n * Is Parallel\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {boolean} true if a and b are parallel (or co-linear)\n */\nfunction isParallel(a, b) {\n var r = ab(a);\n var s = ab(b);\n return crossProduct(r, s) === 0;\n}\n\n/**\n * Intersection\n *\n * @private\n * @param {Array<number>} a coordinates [x, y]\n * @param {Array<number>} b coordinates [x, y]\n * @returns {Array<number>|boolean} true if a and b are parallel (or co-linear)\n */\nfunction intersection(a, b) {\n if (isParallel(a, b)) return false;\n return intersectSegments(a, b);\n}\n\nexport { intersection };\nexport default intersection;\n"],"mappings":";AAAA,SAAS,mBAAmB;AAC5B,SAAS,WAAW,eAAe;AACnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACMP,SAAS,GAAG,SAAS;AACnB,MAAI,QAAQ,QAAQ,CAAC;AACrB,MAAI,MAAM,QAAQ,CAAC;AACnB,SAAO,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC;AAC9C;AAUA,SAAS,aAAa,IAAI,IAAI;AAC5B,SAAO,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC;AACrC;AAUA,SAAS,IAAI,IAAI,IAAI;AACnB,SAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC;AACtC;AAUA,SAAS,IAAI,IAAI,IAAI;AACnB,SAAO,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,CAAC,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AO,CAAC,IAAI,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,OAAO,CAAC;AAAA,EACnD;AAEA,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,MAAI,QAAQ,OAAO,CAAC,IAAK,UAAU,OAAO,CAAC,IAAI,OAAO,CAAC,KAAM;AAC7D,SAAO;AAAA,IACL,CAAC,OAAO,KAAK;AAAA,IACb,CAAC,OAAO,KAAK;AAAA,EACf;AACF;AAGA,IAAO,gBAAQ;","names":["intersection"]}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turf/line-offset",
3
- "version": "7.2.0",
4
- "description": "turf line-offset module",
3
+ "version": "7.3.0",
4
+ "description": "Takes a line and returns a line at offset by the specified distance.",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
7
7
  "David Wee <@rook2pawn>",
@@ -57,22 +57,22 @@
57
57
  "test:types": "tsc --esModuleInterop --module node16 --moduleResolution node16 --noEmit --strict types.ts"
58
58
  },
59
59
  "devDependencies": {
60
- "@turf/truncate": "^7.2.0",
60
+ "@turf/truncate": "7.3.0",
61
61
  "@types/benchmark": "^2.1.5",
62
- "@types/tape": "^4.13.4",
62
+ "@types/tape": "^5.8.1",
63
63
  "benchmark": "^2.1.4",
64
64
  "load-json-file": "^7.0.1",
65
65
  "npm-run-all": "^4.1.5",
66
66
  "tape": "^5.9.0",
67
- "tsup": "^8.3.5",
68
- "tsx": "^4.19.2",
69
- "write-json-file": "^5.0.0"
67
+ "tsup": "^8.4.0",
68
+ "tsx": "^4.19.4",
69
+ "write-json-file": "^6.0.0"
70
70
  },
71
71
  "dependencies": {
72
- "@turf/helpers": "^7.2.0",
73
- "@turf/invariant": "^7.2.0",
74
- "@turf/meta": "^7.2.0",
72
+ "@turf/helpers": "7.3.0",
73
+ "@turf/invariant": "7.3.0",
74
+ "@turf/meta": "7.3.0",
75
75
  "@types/geojson": "^7946.0.10"
76
76
  },
77
- "gitHead": "7b0f0374c4668cd569f8904c71e2ae7d941be867"
77
+ "gitHead": "9f58a103e8f9a587ab640307ed03ba5233913ddd"
78
78
  }
@@ -73,9 +73,9 @@ function concatSegment(line, segment) {
73
73
  else return;
74
74
  return line;
75
75
  }
76
- var turf_line_overlap_default = lineOverlap;
76
+ var index_default = lineOverlap;
77
77
 
78
78
 
79
79
 
80
- exports.default = turf_line_overlap_default; exports.lineOverlap = lineOverlap;
80
+ exports.default = index_default; exports.lineOverlap = lineOverlap;
81
81
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-overlap/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACAA,mDAAsC;AACtC,iDAA4B;AAC5B,iEAAmC;AACnC,iEAAmC;AACnC,4CAA0B;AAC1B,kCAAyC;AAUzC,wCAA4C;AAC5C,8GAAkB;AAoBlB,SAAS,WAAA,CAIP,KAAA,EACA,KAAA,EACA,QAAA,EAAkC,CAAC,CAAA,EACJ;AAE/B,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,IAAI,UAAA,EAAY,OAAA,CAAQ,UAAA,GAAa,CAAA;AAGrC,EAAA,IAAI,SAAA,EAAqD,CAAC,CAAA;AAG1D,EAAA,IAAI,KAAA,EAAO,wCAAA,CAAkB;AAG7B,EAAA,MAAM,KAAA,EAAY,sCAAA,KAAiB,CAAA;AACnC,EAAA,IAAA,CAAK,IAAA,CAAK,IAAI,CAAA;AACd,EAAA,IAAI,cAAA;AAC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,SAAS,aAAA,CACP,IAAA,EACA,OAAA,EACA;AACA,EAAA,IAAI,OAAA,EAAS,kCAAA,OAAiB,CAAA;AAC9B,EAAA,IAAI,WAAA,EAAa,kCAAA,IAAc,CAAA;AAC/B,EAAA,IAAI,MAAA,EAAQ,UAAA,CAAW,CAAC,CAAA;AACxB,EAAA,IAAI,IAAA,EAAM,UAAA,CAAW,UAAA,CAAW,OAAA,EAAS,CAAC,CAAA;AAC1C,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,QAAA,CAAS,WAAA;AAEzB,EAAA,GAAA,CAAI,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,KAAK,CAAA,EAAG,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAAA,GAAA,CAC1C,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,GAAG,CAAA,EAAG,IAAA,CAAK,IAAA,CAAK,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAAA,GAAA,CAC1C,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,KAAK,CAAA,EAAG,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAAA,GAAA,CAC/C,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,GAAG,CAAA,EAAG,IAAA,CAAK,IAAA,CAAK,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAC9C,MAAA;AAGL,EAAA,OAAO,IAAA;AACT;AAGA,IAAO,0BAAA,EAAQ,WAAA;AD5Ff;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/turf/turf/packages/turf-line-overlap/dist/cjs/index.cjs","sourcesContent":[null,"import { geojsonRbush as rbush } from \"@turf/geojson-rbush\";\nimport { lineSegment } from \"@turf/line-segment\";\nimport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nimport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureEach, segmentEach } from \"@turf/meta\";\nimport {\n FeatureCollection,\n Feature,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\nimport equal from \"fast-deep-equal\";\n\n/**\n * Takes any LineString or Polygon and returns the overlapping lines between both features.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line1 any LineString or Polygon\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=0] Tolerance distance to match overlapping line segments (in kilometers)\n * @returns {FeatureCollection<LineString>} lines(s) that are overlapping between both features\n * @example\n * var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\n * var line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n *\n * var overlapping = turf.lineOverlap(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, overlapping]\n */\nfunction lineOverlap<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: Feature<G1> | G1,\n line2: Feature<G2> | G2,\n options: { tolerance?: number } = {}\n): FeatureCollection<LineString> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var tolerance = options.tolerance || 0;\n\n // Containers\n var features: Feature<LineString, GeoJsonProperties>[] = [];\n\n // Create Spatial Index\n var tree = rbush<LineString>();\n\n // To-Do -- HACK way to support typescript\n const line: any = lineSegment(line1);\n tree.load(line);\n var overlapSegment: Feature<LineString> | undefined;\n let additionalSegments: Feature<LineString>[] = [];\n\n // Line Intersection\n\n // Iterate over line segments\n segmentEach(line2, function (segment) {\n var doesOverlaps = false;\n\n if (!segment) {\n return;\n }\n\n // Iterate over each segments which falls within the same bounds\n featureEach(tree.search(segment), function (match) {\n if (doesOverlaps === false) {\n var coordsSegment = getCoords(segment).sort();\n var coordsMatch: any = getCoords(match).sort();\n\n // Segment overlaps feature\n if (equal(coordsSegment, coordsMatch)) {\n doesOverlaps = true;\n // Overlaps already exists - only append last coordinate of segment\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n // Match segments which don't share nodes (Issue #901)\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsSegment[0], match) &&\n booleanPointOnLine(coordsSegment[1], match)\n : nearestPointOnLine(match, coordsSegment[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(match, coordsSegment[1]).properties.dist! <=\n tolerance\n ) {\n doesOverlaps = true;\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsMatch[0], segment) &&\n booleanPointOnLine(coordsMatch[1], segment)\n : nearestPointOnLine(segment, coordsMatch[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(segment, coordsMatch[1]).properties.dist! <=\n tolerance\n ) {\n // Do not define (doesOverlap = true) since more matches can occur within the same segment\n // doesOverlaps = true;\n if (overlapSegment) {\n const combinedSegment = concatSegment(overlapSegment, match);\n if (combinedSegment) {\n overlapSegment = combinedSegment;\n } else {\n additionalSegments.push(match);\n }\n } else overlapSegment = match;\n }\n }\n });\n\n // Segment doesn't overlap - add overlaps to results & reset\n if (doesOverlaps === false && overlapSegment) {\n features.push(overlapSegment);\n if (additionalSegments.length) {\n features = features.concat(additionalSegments);\n additionalSegments = [];\n }\n overlapSegment = undefined;\n }\n });\n // Add last segment if exists\n if (overlapSegment) features.push(overlapSegment);\n\n return featureCollection(features);\n}\n\n/**\n * Concat Segment\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<LineString>} segment 2-vertex LineString\n * @returns {Feature<LineString>} concat linestring\n */\nfunction concatSegment(\n line: Feature<LineString>,\n segment: Feature<LineString>\n) {\n var coords = getCoords(segment);\n var lineCoords = getCoords(line);\n var start = lineCoords[0];\n var end = lineCoords[lineCoords.length - 1];\n var geom = line.geometry.coordinates;\n\n if (equal(coords[0], start)) geom.unshift(coords[1]);\n else if (equal(coords[0], end)) geom.push(coords[1]);\n else if (equal(coords[1], start)) geom.unshift(coords[0]);\n else if (equal(coords[1], end)) geom.push(coords[0]);\n else return; // If the overlap leaves the segment unchanged, return undefined so that this can be identified.\n\n // Otherwise return the mutated line.\n return line;\n}\n\nexport { lineOverlap };\nexport default lineOverlap;\n"]}
1
+ {"version":3,"sources":["/home/runner/work/turf/turf/packages/turf-line-overlap/dist/cjs/index.cjs","../../index.ts"],"names":[],"mappings":"AAAA;ACAA,mDAAsC;AACtC,iDAA4B;AAC5B,iEAAmC;AACnC,iEAAmC;AACnC,4CAA0B;AAC1B,kCAAyC;AAUzC,wCAA4C;AAC5C,8GAAkB;AAoBlB,SAAS,WAAA,CAIP,KAAA,EACA,KAAA,EACA,QAAA,EAAkC,CAAC,CAAA,EACJ;AAE/B,EAAA,QAAA,EAAU,QAAA,GAAW,CAAC,CAAA;AACtB,EAAA,GAAA,CAAI,CAAC,+BAAA,OAAgB,CAAA,EAAG,MAAM,IAAI,KAAA,CAAM,oBAAoB,CAAA;AAC5D,EAAA,IAAI,UAAA,EAAY,OAAA,CAAQ,UAAA,GAAa,CAAA;AAGrC,EAAA,IAAI,SAAA,EAAqD,CAAC,CAAA;AAG1D,EAAA,IAAI,KAAA,EAAO,wCAAA,CAAkB;AAG7B,EAAA,MAAM,KAAA,EAAY,sCAAA,KAAiB,CAAA;AACnC,EAAA,IAAA,CAAK,IAAA,CAAK,IAAI,CAAA;AACd,EAAA,IAAI,cAAA;AACJ,EAAA,IAAI,mBAAA,EAA4C,CAAC,CAAA;AAKjD,EAAA,+BAAA,KAAY,EAAO,QAAA,CAAU,OAAA,EAAS;AACpC,IAAA,IAAI,aAAA,EAAe,KAAA;AAEnB,IAAA,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AAA,IAAI,MAAA,EAAQ,UAAA,CAAW,CAAC,CAAA;AACxB,EAAA,IAAI,IAAA,EAAM,UAAA,CAAW,UAAA,CAAW,OAAA,EAAS,CAAC,CAAA;AAC1C,EAAA,IAAI,KAAA,EAAO,IAAA,CAAK,QAAA,CAAS,WAAA;AAEzB,EAAA,GAAA,CAAI,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,KAAK,CAAA,EAAG,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAAA,GAAA,CAC1C,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,GAAG,CAAA,EAAG,IAAA,CAAK,IAAA,CAAK,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAAA,GAAA,CAC1C,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,KAAK,CAAA,EAAG,IAAA,CAAK,OAAA,CAAQ,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAAA,GAAA,CAC/C,qCAAA,MAAM,CAAO,CAAC,CAAA,EAAG,GAAG,CAAA,EAAG,IAAA,CAAK,IAAA,CAAK,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,EAAA,KAC9C,MAAA;AAGL,EAAA,OAAO,IAAA;AACT;AAGA,IAAO,cAAA,EAAQ,WAAA;AD5Ff;AACE;AACA;AACF,mEAAC","file":"/home/runner/work/turf/turf/packages/turf-line-overlap/dist/cjs/index.cjs","sourcesContent":[null,"import { geojsonRbush as rbush } from \"@turf/geojson-rbush\";\nimport { lineSegment } from \"@turf/line-segment\";\nimport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nimport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureEach, segmentEach } from \"@turf/meta\";\nimport {\n FeatureCollection,\n Feature,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\nimport equal from \"fast-deep-equal\";\n\n/**\n * Takes any LineString or Polygon and returns the overlapping lines between both features.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line1 any LineString or Polygon\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=0] Tolerance distance to match overlapping line segments (in kilometers)\n * @returns {FeatureCollection<LineString>} lines(s) that are overlapping between both features\n * @example\n * var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\n * var line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n *\n * var overlapping = turf.lineOverlap(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, overlapping]\n */\nfunction lineOverlap<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: Feature<G1> | G1,\n line2: Feature<G2> | G2,\n options: { tolerance?: number } = {}\n): FeatureCollection<LineString> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var tolerance = options.tolerance || 0;\n\n // Containers\n var features: Feature<LineString, GeoJsonProperties>[] = [];\n\n // Create Spatial Index\n var tree = rbush<LineString>();\n\n // To-Do -- HACK way to support typescript\n const line: any = lineSegment(line1);\n tree.load(line);\n var overlapSegment: Feature<LineString> | undefined;\n let additionalSegments: Feature<LineString>[] = [];\n\n // Line Intersection\n\n // Iterate over line segments\n segmentEach(line2, function (segment) {\n var doesOverlaps = false;\n\n if (!segment) {\n return;\n }\n\n // Iterate over each segments which falls within the same bounds\n featureEach(tree.search(segment), function (match) {\n if (doesOverlaps === false) {\n var coordsSegment = getCoords(segment).sort();\n var coordsMatch: any = getCoords(match).sort();\n\n // Segment overlaps feature\n if (equal(coordsSegment, coordsMatch)) {\n doesOverlaps = true;\n // Overlaps already exists - only append last coordinate of segment\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n // Match segments which don't share nodes (Issue #901)\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsSegment[0], match) &&\n booleanPointOnLine(coordsSegment[1], match)\n : nearestPointOnLine(match, coordsSegment[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(match, coordsSegment[1]).properties.dist! <=\n tolerance\n ) {\n doesOverlaps = true;\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsMatch[0], segment) &&\n booleanPointOnLine(coordsMatch[1], segment)\n : nearestPointOnLine(segment, coordsMatch[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(segment, coordsMatch[1]).properties.dist! <=\n tolerance\n ) {\n // Do not define (doesOverlap = true) since more matches can occur within the same segment\n // doesOverlaps = true;\n if (overlapSegment) {\n const combinedSegment = concatSegment(overlapSegment, match);\n if (combinedSegment) {\n overlapSegment = combinedSegment;\n } else {\n additionalSegments.push(match);\n }\n } else overlapSegment = match;\n }\n }\n });\n\n // Segment doesn't overlap - add overlaps to results & reset\n if (doesOverlaps === false && overlapSegment) {\n features.push(overlapSegment);\n if (additionalSegments.length) {\n features = features.concat(additionalSegments);\n additionalSegments = [];\n }\n overlapSegment = undefined;\n }\n });\n // Add last segment if exists\n if (overlapSegment) features.push(overlapSegment);\n\n return featureCollection(features);\n}\n\n/**\n * Concat Segment\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<LineString>} segment 2-vertex LineString\n * @returns {Feature<LineString>} concat linestring\n */\nfunction concatSegment(\n line: Feature<LineString>,\n segment: Feature<LineString>\n) {\n var coords = getCoords(segment);\n var lineCoords = getCoords(line);\n var start = lineCoords[0];\n var end = lineCoords[lineCoords.length - 1];\n var geom = line.geometry.coordinates;\n\n if (equal(coords[0], start)) geom.unshift(coords[1]);\n else if (equal(coords[0], end)) geom.push(coords[1]);\n else if (equal(coords[1], start)) geom.unshift(coords[0]);\n else if (equal(coords[1], end)) geom.push(coords[0]);\n else return; // If the overlap leaves the segment unchanged, return undefined so that this can be identified.\n\n // Otherwise return the mutated line.\n return line;\n}\n\nexport { lineOverlap };\nexport default lineOverlap;\n"]}
@@ -73,9 +73,9 @@ function concatSegment(line, segment) {
73
73
  else return;
74
74
  return line;
75
75
  }
76
- var turf_line_overlap_default = lineOverlap;
76
+ var index_default = lineOverlap;
77
77
  export {
78
- turf_line_overlap_default as default,
78
+ index_default as default,
79
79
  lineOverlap
80
80
  };
81
81
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { geojsonRbush as rbush } from \"@turf/geojson-rbush\";\nimport { lineSegment } from \"@turf/line-segment\";\nimport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nimport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureEach, segmentEach } from \"@turf/meta\";\nimport {\n FeatureCollection,\n Feature,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\nimport equal from \"fast-deep-equal\";\n\n/**\n * Takes any LineString or Polygon and returns the overlapping lines between both features.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line1 any LineString or Polygon\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=0] Tolerance distance to match overlapping line segments (in kilometers)\n * @returns {FeatureCollection<LineString>} lines(s) that are overlapping between both features\n * @example\n * var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\n * var line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n *\n * var overlapping = turf.lineOverlap(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, overlapping]\n */\nfunction lineOverlap<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: Feature<G1> | G1,\n line2: Feature<G2> | G2,\n options: { tolerance?: number } = {}\n): FeatureCollection<LineString> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var tolerance = options.tolerance || 0;\n\n // Containers\n var features: Feature<LineString, GeoJsonProperties>[] = [];\n\n // Create Spatial Index\n var tree = rbush<LineString>();\n\n // To-Do -- HACK way to support typescript\n const line: any = lineSegment(line1);\n tree.load(line);\n var overlapSegment: Feature<LineString> | undefined;\n let additionalSegments: Feature<LineString>[] = [];\n\n // Line Intersection\n\n // Iterate over line segments\n segmentEach(line2, function (segment) {\n var doesOverlaps = false;\n\n if (!segment) {\n return;\n }\n\n // Iterate over each segments which falls within the same bounds\n featureEach(tree.search(segment), function (match) {\n if (doesOverlaps === false) {\n var coordsSegment = getCoords(segment).sort();\n var coordsMatch: any = getCoords(match).sort();\n\n // Segment overlaps feature\n if (equal(coordsSegment, coordsMatch)) {\n doesOverlaps = true;\n // Overlaps already exists - only append last coordinate of segment\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n // Match segments which don't share nodes (Issue #901)\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsSegment[0], match) &&\n booleanPointOnLine(coordsSegment[1], match)\n : nearestPointOnLine(match, coordsSegment[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(match, coordsSegment[1]).properties.dist! <=\n tolerance\n ) {\n doesOverlaps = true;\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsMatch[0], segment) &&\n booleanPointOnLine(coordsMatch[1], segment)\n : nearestPointOnLine(segment, coordsMatch[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(segment, coordsMatch[1]).properties.dist! <=\n tolerance\n ) {\n // Do not define (doesOverlap = true) since more matches can occur within the same segment\n // doesOverlaps = true;\n if (overlapSegment) {\n const combinedSegment = concatSegment(overlapSegment, match);\n if (combinedSegment) {\n overlapSegment = combinedSegment;\n } else {\n additionalSegments.push(match);\n }\n } else overlapSegment = match;\n }\n }\n });\n\n // Segment doesn't overlap - add overlaps to results & reset\n if (doesOverlaps === false && overlapSegment) {\n features.push(overlapSegment);\n if (additionalSegments.length) {\n features = features.concat(additionalSegments);\n additionalSegments = [];\n }\n overlapSegment = undefined;\n }\n });\n // Add last segment if exists\n if (overlapSegment) features.push(overlapSegment);\n\n return featureCollection(features);\n}\n\n/**\n * Concat Segment\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<LineString>} segment 2-vertex LineString\n * @returns {Feature<LineString>} concat linestring\n */\nfunction concatSegment(\n line: Feature<LineString>,\n segment: Feature<LineString>\n) {\n var coords = getCoords(segment);\n var lineCoords = getCoords(line);\n var start = lineCoords[0];\n var end = lineCoords[lineCoords.length - 1];\n var geom = line.geometry.coordinates;\n\n if (equal(coords[0], start)) geom.unshift(coords[1]);\n else if (equal(coords[0], end)) geom.push(coords[1]);\n else if (equal(coords[1], start)) geom.unshift(coords[0]);\n else if (equal(coords[1], end)) geom.push(coords[0]);\n else return; // If the overlap leaves the segment unchanged, return undefined so that this can be identified.\n\n // Otherwise return the mutated line.\n return line;\n}\n\nexport { lineOverlap };\nexport default lineOverlap;\n"],"mappings":";AAAA,SAAS,gBAAgB,aAAa;AACtC,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAS,aAAa,mBAAmB;AAUzC,SAAS,mBAAmB,gBAAgB;AAC5C,OAAO,WAAW;AAoBlB,SAAS,YAIP,OACA,OACA,UAAkC,C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,kBAAM,kBAAkB,cAAc,gBAAgB,KAAK;AAC3D,gBAAI,iBAAiB;AACnB,+BAAiB;AAAA,YACnB,OAAO;AACL,iCAAmB,KAAK,KAAK;AAAA,YAC/B;AAAA,UACF,MAAO,kBAAiB;AAAA,QAC1B;AAAA,MACF;AAAA,IACF,CAAC;AAGD,QAAI,iBAAiB,SAAS,gBAAgB;AAC5C,eAAS,KAAK,cAAc;AAC5B,UAAI,mBAAmB,QAAQ;AAC7B,mBAAW,SAAS,OAAO,kBAAkB;AAC7C,6BAAqB,CAAC;AAAA,MACxB;AACA,uBAAiB;AAAA,IACnB;AAAA,EACF,CAAC;AAED,MAAI,eAAgB,UAAS,KAAK,cAAc;AAEhD,SAAO,kBAAkB,QAAQ;AACnC;AAUA,SAAS,cACP,MACA,SACA;AACA,MAAI,SAAS,UAAU,OAAO;AAC9B,MAAI,aAAa,UAAU,IAAI;AAC/B,MAAI,QAAQ,WAAW,CAAC;AACxB,MAAI,MAAM,WAAW,WAAW,SAAS,CAAC;AAC1C,MAAI,OAAO,KAAK,SAAS;AAEzB,MAAI,MAAM,OAAO,CAAC,GAAG,KAAK,EAAG,MAAK,QAAQ,OAAO,CAAC,CAAC;AAAA,WAC1C,MAAM,OAAO,CAAC,GAAG,GAAG,EAAG,MAAK,KAAK,OAAO,CAAC,CAAC;AAAA,WAC1C,MAAM,OAAO,CAAC,GAAG,KAAK,EAAG,MAAK,QAAQ,OAAO,CAAC,CAAC;AAAA,WAC/C,MAAM,OAAO,CAAC,GAAG,GAAG,EAAG,MAAK,KAAK,OAAO,CAAC,CAAC;AAAA,MAC9C;AAGL,SAAO;AACT;AAGA,IAAO,4BAAQ;","names":[]}
1
+ {"version":3,"sources":["../../index.ts"],"sourcesContent":["import { geojsonRbush as rbush } from \"@turf/geojson-rbush\";\nimport { lineSegment } from \"@turf/line-segment\";\nimport { nearestPointOnLine } from \"@turf/nearest-point-on-line\";\nimport { booleanPointOnLine } from \"@turf/boolean-point-on-line\";\nimport { getCoords } from \"@turf/invariant\";\nimport { featureEach, segmentEach } from \"@turf/meta\";\nimport {\n FeatureCollection,\n Feature,\n LineString,\n MultiLineString,\n Polygon,\n MultiPolygon,\n GeoJsonProperties,\n} from \"geojson\";\nimport { featureCollection, isObject } from \"@turf/helpers\";\nimport equal from \"fast-deep-equal\";\n\n/**\n * Takes any LineString or Polygon and returns the overlapping lines between both features.\n *\n * @function\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line1 any LineString or Polygon\n * @param {Geometry|Feature<LineString|MultiLineString|Polygon|MultiPolygon>} line2 any LineString or Polygon\n * @param {Object} [options={}] Optional parameters\n * @param {number} [options.tolerance=0] Tolerance distance to match overlapping line segments (in kilometers)\n * @returns {FeatureCollection<LineString>} lines(s) that are overlapping between both features\n * @example\n * var line1 = turf.lineString([[115, -35], [125, -30], [135, -30], [145, -35]]);\n * var line2 = turf.lineString([[115, -25], [125, -30], [135, -30], [145, -25]]);\n *\n * var overlapping = turf.lineOverlap(line1, line2);\n *\n * //addToMap\n * var addToMap = [line1, line2, overlapping]\n */\nfunction lineOverlap<\n G1 extends LineString | MultiLineString | Polygon | MultiPolygon,\n G2 extends LineString | MultiLineString | Polygon | MultiPolygon,\n>(\n line1: Feature<G1> | G1,\n line2: Feature<G2> | G2,\n options: { tolerance?: number } = {}\n): FeatureCollection<LineString> {\n // Optional parameters\n options = options || {};\n if (!isObject(options)) throw new Error(\"options is invalid\");\n var tolerance = options.tolerance || 0;\n\n // Containers\n var features: Feature<LineString, GeoJsonProperties>[] = [];\n\n // Create Spatial Index\n var tree = rbush<LineString>();\n\n // To-Do -- HACK way to support typescript\n const line: any = lineSegment(line1);\n tree.load(line);\n var overlapSegment: Feature<LineString> | undefined;\n let additionalSegments: Feature<LineString>[] = [];\n\n // Line Intersection\n\n // Iterate over line segments\n segmentEach(line2, function (segment) {\n var doesOverlaps = false;\n\n if (!segment) {\n return;\n }\n\n // Iterate over each segments which falls within the same bounds\n featureEach(tree.search(segment), function (match) {\n if (doesOverlaps === false) {\n var coordsSegment = getCoords(segment).sort();\n var coordsMatch: any = getCoords(match).sort();\n\n // Segment overlaps feature\n if (equal(coordsSegment, coordsMatch)) {\n doesOverlaps = true;\n // Overlaps already exists - only append last coordinate of segment\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n // Match segments which don't share nodes (Issue #901)\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsSegment[0], match) &&\n booleanPointOnLine(coordsSegment[1], match)\n : nearestPointOnLine(match, coordsSegment[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(match, coordsSegment[1]).properties.dist! <=\n tolerance\n ) {\n doesOverlaps = true;\n if (overlapSegment) {\n overlapSegment =\n concatSegment(overlapSegment, segment) || overlapSegment;\n } else overlapSegment = segment;\n } else if (\n tolerance === 0\n ? booleanPointOnLine(coordsMatch[0], segment) &&\n booleanPointOnLine(coordsMatch[1], segment)\n : nearestPointOnLine(segment, coordsMatch[0]).properties.dist! <=\n tolerance &&\n nearestPointOnLine(segment, coordsMatch[1]).properties.dist! <=\n tolerance\n ) {\n // Do not define (doesOverlap = true) since more matches can occur within the same segment\n // doesOverlaps = true;\n if (overlapSegment) {\n const combinedSegment = concatSegment(overlapSegment, match);\n if (combinedSegment) {\n overlapSegment = combinedSegment;\n } else {\n additionalSegments.push(match);\n }\n } else overlapSegment = match;\n }\n }\n });\n\n // Segment doesn't overlap - add overlaps to results & reset\n if (doesOverlaps === false && overlapSegment) {\n features.push(overlapSegment);\n if (additionalSegments.length) {\n features = features.concat(additionalSegments);\n additionalSegments = [];\n }\n overlapSegment = undefined;\n }\n });\n // Add last segment if exists\n if (overlapSegment) features.push(overlapSegment);\n\n return featureCollection(features);\n}\n\n/**\n * Concat Segment\n *\n * @private\n * @param {Feature<LineString>} line LineString\n * @param {Feature<LineString>} segment 2-vertex LineString\n * @returns {Feature<LineString>} concat linestring\n */\nfunction concatSegment(\n line: Feature<LineString>,\n segment: Feature<LineString>\n) {\n var coords = getCoords(segment);\n var lineCoords = getCoords(line);\n var start = lineCoords[0];\n var end = lineCoords[lineCoords.length - 1];\n var geom = line.geometry.coordinates;\n\n if (equal(coords[0], start)) geom.unshift(coords[1]);\n else if (equal(coords[0], end)) geom.push(coords[1]);\n else if (equal(coords[1], start)) geom.unshift(coords[0]);\n else if (equal(coords[1], end)) geom.push(coords[0]);\n else return; // If the overlap leaves the segment unchanged, return undefined so that this can be identified.\n\n // Otherwise return the mutated line.\n return line;\n}\n\nexport { lineOverlap };\nexport default lineOverlap;\n"],"mappings":";AAAA,SAAS,gBAAgB,aAAa;AACtC,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAC1B,SAAS,aAAa,mBAAmB;AAUzC,SAAS,mBAAmB,gBAAgB;AAC5C,OAAO,WAAW;AAoBlB,SAAS,YAIP,OACA,OACA,UAAkC,CAAC,GACJ;AAE/B,YAAU,WAAW,CAAC;AACtB,MAAI,CAAC,SAAS,OAAO,EAAG,OAAM,IAAI,MAAM,oBAAoB;AAC5D,MAAI,YAAY,QAAQ,aAAa;AAGrC,MAAI,WAAqD,CAAC;AAG1D,MAAI,OAAO,MAAkB;AAG7B,QAAM,OAAY,YAAY,KAAK;AACnC,OAAK,KAAK,IAAI;AACd,MAAI;AACJ,MAAI,qBAA4C,CAAC;AAKjD,cAAY,OAAO,SAAU,SAAS;AACpC,QAAI,eAAe;AAEnB,QAAI,CAAC,SAAS;AACZ;AAAA,IACF;AAGA,gBAAY,KAAK,OAAO,OAAO,GAAG,SAAU,OAAO;AACjD,UAAI,iBAAiB,OAAO;AAC1B,YAAI,gBAAgB,UAAU,OAAO,EAAE,KAAK;AAC5C,YAAI,cAAmB,UAAU,KAAK,EAAE,KAAK;AAG7C,YAAI,MAAM,eAAe,WAAW,GAAG;AACrC,yBAAe;AAEf,cAAI,gBAAgB;AAClB,6BACE,cAAc,gBAAgB,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