node-red-contrib-tak-registration 0.3.1 → 0.6.0

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 (412) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@turf/along/package.json +41 -69
  3. package/node_modules/@turf/angle/package.json +44 -75
  4. package/node_modules/@turf/area/package.json +38 -68
  5. package/node_modules/@turf/bbox/package.json +37 -81
  6. package/node_modules/@turf/bbox-clip/package.json +44 -81
  7. package/node_modules/@turf/bbox-polygon/package.json +36 -66
  8. package/node_modules/@turf/bearing/package.json +36 -70
  9. package/node_modules/@turf/bezier-spline/package.json +39 -67
  10. package/node_modules/@turf/boolean-clockwise/package.json +42 -83
  11. package/node_modules/@turf/boolean-contains/package.json +46 -80
  12. package/node_modules/@turf/boolean-crosses/package.json +45 -79
  13. package/node_modules/@turf/boolean-disjoint/package.json +44 -79
  14. package/node_modules/@turf/boolean-equal/package.json +47 -84
  15. package/node_modules/@turf/boolean-intersects/package.json +42 -77
  16. package/node_modules/@turf/boolean-overlap/package.json +48 -82
  17. package/node_modules/@turf/boolean-parallel/package.json +42 -73
  18. package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
  19. package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
  20. package/node_modules/@turf/boolean-within/package.json +46 -79
  21. package/node_modules/@turf/buffer/package.json +47 -84
  22. package/node_modules/@turf/center/package.json +42 -73
  23. package/node_modules/@turf/center-mean/package.json +45 -78
  24. package/node_modules/@turf/center-median/package.json +45 -76
  25. package/node_modules/@turf/center-of-mass/package.json +40 -68
  26. package/node_modules/@turf/centroid/package.json +40 -74
  27. package/node_modules/@turf/circle/package.json +41 -71
  28. package/node_modules/@turf/clean-coords/package.json +40 -75
  29. package/node_modules/@turf/clone/package.json +36 -81
  30. package/node_modules/@turf/clusters/package.json +39 -70
  31. package/node_modules/@turf/clusters-dbscan/package.json +51 -88
  32. package/node_modules/@turf/clusters-kmeans/package.json +53 -90
  33. package/node_modules/@turf/collect/package.json +42 -73
  34. package/node_modules/@turf/combine/package.json +37 -65
  35. package/node_modules/@turf/concave/package.json +56 -111
  36. package/node_modules/@turf/convex/package.json +39 -68
  37. package/node_modules/@turf/destination/package.json +41 -75
  38. package/node_modules/@turf/difference/package.json +35 -63
  39. package/node_modules/@turf/dissolve/package.json +38 -66
  40. package/node_modules/@turf/distance/package.json +38 -83
  41. package/node_modules/@turf/distance-weight/package.json +40 -72
  42. package/node_modules/@turf/ellipse/package.json +43 -75
  43. package/node_modules/@turf/envelope/package.json +36 -65
  44. package/node_modules/@turf/explode/package.json +36 -67
  45. package/node_modules/@turf/flatten/package.json +39 -73
  46. package/node_modules/@turf/flip/package.json +36 -64
  47. package/node_modules/@turf/great-circle/package.json +41 -78
  48. package/node_modules/@turf/helpers/package.json +38 -184
  49. package/node_modules/@turf/hex-grid/package.json +50 -97
  50. package/node_modules/@turf/interpolate/package.json +47 -78
  51. package/node_modules/@turf/intersect/package.json +39 -69
  52. package/node_modules/@turf/invariant/package.json +36 -126
  53. package/node_modules/@turf/isobands/package.json +52 -83
  54. package/node_modules/@turf/isolines/package.json +48 -79
  55. package/node_modules/@turf/kinks/package.json +35 -63
  56. package/node_modules/@turf/length/package.json +43 -78
  57. package/node_modules/@turf/line-arc/package.json +36 -65
  58. package/node_modules/@turf/line-chunk/package.json +44 -84
  59. package/node_modules/@turf/line-intersect/package.json +46 -85
  60. package/node_modules/@turf/line-offset/package.json +41 -78
  61. package/node_modules/@turf/line-overlap/package.json +48 -80
  62. package/node_modules/@turf/line-segment/package.json +38 -70
  63. package/node_modules/@turf/line-slice/package.json +39 -67
  64. package/node_modules/@turf/line-slice-along/package.json +36 -65
  65. package/node_modules/@turf/line-split/package.json +46 -77
  66. package/node_modules/@turf/line-to-polygon/package.json +43 -74
  67. package/node_modules/@turf/mask/package.json +35 -63
  68. package/node_modules/@turf/meta/package.json +39 -128
  69. package/node_modules/@turf/midpoint/package.json +36 -64
  70. package/node_modules/@turf/moran-index/package.json +39 -70
  71. package/node_modules/@turf/nearest-point/package.json +39 -69
  72. package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
  73. package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
  74. package/node_modules/@turf/planepoint/package.json +34 -62
  75. package/node_modules/@turf/point-grid/package.json +45 -80
  76. package/node_modules/@turf/point-on-feature/package.json +40 -68
  77. package/node_modules/@turf/point-to-line-distance/package.json +46 -78
  78. package/node_modules/@turf/points-within-polygon/package.json +35 -64
  79. package/node_modules/@turf/polygon-smooth/package.json +37 -68
  80. package/node_modules/@turf/polygon-tangents/package.json +43 -77
  81. package/node_modules/@turf/polygon-to-line/package.json +39 -69
  82. package/node_modules/@turf/polygonize/package.json +43 -77
  83. package/node_modules/@turf/projection/package.json +44 -77
  84. package/node_modules/@turf/random/package.json +34 -62
  85. package/node_modules/@turf/rectangle-grid/package.json +43 -77
  86. package/node_modules/@turf/rewind/package.json +43 -83
  87. package/node_modules/@turf/rhumb-bearing/package.json +43 -85
  88. package/node_modules/@turf/rhumb-destination/package.json +44 -85
  89. package/node_modules/@turf/rhumb-distance/package.json +44 -84
  90. package/node_modules/@turf/sample/package.json +32 -60
  91. package/node_modules/@turf/sector/package.json +37 -65
  92. package/node_modules/@turf/shortest-path/package.json +45 -79
  93. package/node_modules/@turf/simplify/package.json +43 -77
  94. package/node_modules/@turf/square/package.json +33 -62
  95. package/node_modules/@turf/square-grid/package.json +40 -69
  96. package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
  97. package/node_modules/@turf/tag/package.json +38 -66
  98. package/node_modules/@turf/tesselate/package.json +40 -80
  99. package/node_modules/@turf/tin/package.json +34 -63
  100. package/node_modules/@turf/transform-rotate/package.json +45 -80
  101. package/node_modules/@turf/transform-scale/package.json +51 -86
  102. package/node_modules/@turf/transform-translate/package.json +44 -78
  103. package/node_modules/@turf/triangle-grid/package.json +42 -71
  104. package/node_modules/@turf/truncate/package.json +40 -72
  105. package/node_modules/@turf/turf/package.json +74 -102
  106. package/node_modules/@turf/union/package.json +39 -67
  107. package/node_modules/@turf/unkink-polygon/package.json +40 -68
  108. package/node_modules/@turf/voronoi/package.json +43 -83
  109. package/node_modules/@types/geojson/package.json +42 -66
  110. package/node_modules/adm-zip/LICENSE +21 -21
  111. package/node_modules/adm-zip/adm-zip.js +25 -22
  112. package/node_modules/adm-zip/headers/mainHeader.js +2 -1
  113. package/node_modules/adm-zip/package.json +28 -57
  114. package/node_modules/adm-zip/util/utils.js +1 -0
  115. package/node_modules/asynckit/package.json +40 -68
  116. package/node_modules/axios/CHANGELOG.md +473 -837
  117. package/node_modules/axios/LICENSE +4 -16
  118. package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  119. package/node_modules/axios/README.md +518 -114
  120. package/node_modules/axios/SECURITY.md +4 -3
  121. package/node_modules/axios/dist/axios.js +2759 -2070
  122. package/node_modules/axios/dist/axios.js.map +1 -0
  123. package/node_modules/axios/dist/axios.min.js +2 -2
  124. package/node_modules/axios/dist/axios.min.js.map +1 -0
  125. package/node_modules/axios/dist/browser/axios.cjs +3210 -0
  126. package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  127. package/node_modules/axios/dist/esm/axios.js +3232 -0
  128. package/node_modules/axios/dist/esm/axios.js.map +1 -0
  129. package/node_modules/axios/dist/esm/axios.min.js +2 -0
  130. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  131. package/node_modules/axios/dist/node/axios.cjs +4237 -0
  132. package/node_modules/axios/dist/node/axios.cjs.map +1 -0
  133. package/node_modules/axios/index.d.cts +532 -0
  134. package/node_modules/axios/index.d.ts +398 -72
  135. package/node_modules/axios/index.js +41 -1
  136. package/node_modules/axios/lib/adapters/adapters.js +59 -0
  137. package/node_modules/axios/lib/adapters/http.js +479 -217
  138. package/node_modules/axios/lib/adapters/xhr.js +95 -54
  139. package/node_modules/axios/lib/axios.js +49 -20
  140. package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
  141. package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  142. package/node_modules/axios/lib/cancel/isCancel.js +2 -2
  143. package/node_modules/axios/lib/core/Axios.js +155 -100
  144. package/node_modules/axios/lib/core/AxiosError.js +100 -0
  145. package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
  146. package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
  147. package/node_modules/axios/lib/core/buildFullPath.js +5 -4
  148. package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
  149. package/node_modules/axios/lib/core/mergeConfig.js +58 -52
  150. package/node_modules/axios/lib/core/settle.js +8 -6
  151. package/node_modules/axios/lib/core/transformData.js +15 -9
  152. package/node_modules/axios/lib/defaults/index.js +76 -41
  153. package/node_modules/axios/lib/defaults/transitional.js +1 -1
  154. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  155. package/node_modules/axios/lib/env/data.js +1 -3
  156. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
  157. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  158. package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  159. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  160. package/node_modules/axios/lib/helpers/bind.js +3 -7
  161. package/node_modules/axios/lib/helpers/buildURL.js +26 -33
  162. package/node_modules/axios/lib/helpers/callbackify.js +16 -0
  163. package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
  164. package/node_modules/axios/lib/helpers/cookies.js +43 -44
  165. package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
  166. package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
  167. package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  168. package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  169. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
  170. package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
  171. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
  172. package/node_modules/axios/lib/helpers/null.js +2 -0
  173. package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
  174. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  175. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  176. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  177. package/node_modules/axios/lib/helpers/spread.js +3 -2
  178. package/node_modules/axios/lib/helpers/throttle.js +33 -0
  179. package/node_modules/axios/lib/helpers/toFormData.js +203 -39
  180. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  181. package/node_modules/axios/lib/helpers/validator.js +27 -18
  182. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  183. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  184. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  185. package/node_modules/axios/lib/platform/browser/index.js +64 -0
  186. package/node_modules/axios/lib/platform/index.js +3 -0
  187. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  188. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  189. package/node_modules/axios/lib/platform/node/index.js +12 -0
  190. package/node_modules/axios/lib/utils.js +517 -144
  191. package/node_modules/axios/package.json +194 -93
  192. package/node_modules/call-bind/package.json +78 -109
  193. package/node_modules/combined-stream/package.json +14 -46
  194. package/node_modules/commander/package.json +20 -53
  195. package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
  196. package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
  197. package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
  198. package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
  199. package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
  200. package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
  201. package/node_modules/concaveman/package.json +15 -46
  202. package/node_modules/d3-array/package.json +19 -47
  203. package/node_modules/d3-geo/package.json +24 -52
  204. package/node_modules/d3-voronoi/package.json +19 -47
  205. package/node_modules/deep-equal/package.json +34 -64
  206. package/node_modules/define-properties/.eslintrc +10 -3
  207. package/node_modules/define-properties/.github/FUNDING.yml +12 -0
  208. package/node_modules/define-properties/.nycrc +9 -0
  209. package/node_modules/define-properties/CHANGELOG.md +39 -0
  210. package/node_modules/define-properties/README.md +11 -13
  211. package/node_modules/define-properties/index.js +12 -17
  212. package/node_modules/define-properties/package.json +85 -95
  213. package/node_modules/delayed-stream/package.json +14 -49
  214. package/node_modules/density-clustering/package.json +46 -70
  215. package/node_modules/earcut/README.md +12 -3
  216. package/node_modules/earcut/dist/earcut.dev.js +47 -50
  217. package/node_modules/earcut/dist/earcut.min.js +1 -1
  218. package/node_modules/earcut/package.json +26 -60
  219. package/node_modules/earcut/src/earcut.js +46 -49
  220. package/node_modules/follow-redirects/README.md +8 -1
  221. package/node_modules/follow-redirects/index.js +83 -36
  222. package/node_modules/follow-redirects/package.json +38 -74
  223. package/node_modules/form-data/package.json +37 -70
  224. package/node_modules/function-bind/package.json +23 -56
  225. package/node_modules/functions-have-names/.editorconfig +20 -0
  226. package/node_modules/functions-have-names/.eslintrc +19 -0
  227. package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
  228. package/node_modules/functions-have-names/.nycrc +9 -0
  229. package/node_modules/functions-have-names/CHANGELOG.md +89 -0
  230. package/node_modules/functions-have-names/LICENSE +21 -0
  231. package/node_modules/functions-have-names/README.md +40 -0
  232. package/node_modules/functions-have-names/index.js +31 -0
  233. package/node_modules/functions-have-names/package.json +55 -0
  234. package/node_modules/functions-have-names/test/index.js +65 -0
  235. package/node_modules/geojson-equality/package.json +23 -55
  236. package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
  237. package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
  238. package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
  239. package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
  240. package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
  241. package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
  242. package/node_modules/geojson-rbush/package.json +32 -71
  243. package/node_modules/get-intrinsic/.eslintrc +3 -8
  244. package/node_modules/get-intrinsic/.nycrc +0 -4
  245. package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
  246. package/node_modules/get-intrinsic/README.md +7 -1
  247. package/node_modules/get-intrinsic/index.js +29 -8
  248. package/node_modules/get-intrinsic/package.json +91 -104
  249. package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
  250. package/node_modules/has/package.json +21 -46
  251. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  252. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  253. package/node_modules/has-property-descriptors/.nycrc +9 -0
  254. package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
  255. package/node_modules/has-property-descriptors/LICENSE +21 -0
  256. package/node_modules/has-property-descriptors/README.md +43 -0
  257. package/node_modules/has-property-descriptors/index.js +33 -0
  258. package/node_modules/has-property-descriptors/package.json +70 -0
  259. package/node_modules/has-property-descriptors/test/index.js +57 -0
  260. package/node_modules/has-proto/.eslintrc +5 -0
  261. package/node_modules/has-proto/.github/FUNDING.yml +12 -0
  262. package/node_modules/has-proto/CHANGELOG.md +23 -0
  263. package/node_modules/has-proto/LICENSE +21 -0
  264. package/node_modules/has-proto/README.md +38 -0
  265. package/node_modules/has-proto/index.js +11 -0
  266. package/node_modules/has-proto/package.json +74 -0
  267. package/node_modules/has-proto/test/index.js +19 -0
  268. package/node_modules/has-symbols/package.json +99 -125
  269. package/node_modules/has-tostringtag/package.json +82 -109
  270. package/node_modules/is-arguments/package.json +89 -114
  271. package/node_modules/is-date-object/package.json +77 -108
  272. package/node_modules/is-regex/package.json +84 -112
  273. package/node_modules/mime-db/HISTORY.md +8 -0
  274. package/node_modules/mime-db/LICENSE +19 -18
  275. package/node_modules/mime-db/README.md +1 -1
  276. package/node_modules/mime-db/db.json +54 -6
  277. package/node_modules/mime-db/index.js +1 -0
  278. package/node_modules/mime-db/package.json +24 -66
  279. package/node_modules/mime-types/HISTORY.md +9 -0
  280. package/node_modules/mime-types/README.md +1 -1
  281. package/node_modules/mime-types/package.json +19 -62
  282. package/node_modules/object-assign/package.json +15 -49
  283. package/node_modules/object-is/package.json +85 -112
  284. package/node_modules/object-keys/package.json +86 -116
  285. package/node_modules/point-in-polygon/package.json +19 -48
  286. package/node_modules/polygon-clipping/package.json +41 -80
  287. package/node_modules/proxy-from-env/.eslintrc +29 -0
  288. package/node_modules/proxy-from-env/.travis.yml +10 -0
  289. package/node_modules/proxy-from-env/LICENSE +20 -0
  290. package/node_modules/proxy-from-env/README.md +131 -0
  291. package/node_modules/proxy-from-env/index.js +108 -0
  292. package/node_modules/proxy-from-env/package.json +34 -0
  293. package/node_modules/proxy-from-env/test.js +483 -0
  294. package/node_modules/quickselect/package.json +13 -41
  295. package/node_modules/rbush/README.md +95 -22
  296. package/node_modules/rbush/index.js +181 -131
  297. package/node_modules/rbush/package.json +39 -71
  298. package/node_modules/rbush/rbush.js +412 -360
  299. package/node_modules/rbush/rbush.min.js +1 -1
  300. package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
  301. package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
  302. package/node_modules/regexp.prototype.flags/implementation.js +9 -0
  303. package/node_modules/regexp.prototype.flags/package.json +98 -122
  304. package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
  305. package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
  306. package/node_modules/robust-predicates/package.json +25 -52
  307. package/node_modules/skmeans/package.json +18 -53
  308. package/node_modules/splaytree/Readme.md +58 -57
  309. package/node_modules/splaytree/dist/splay.esm.js +21 -8
  310. package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
  311. package/node_modules/splaytree/dist/splay.js +21 -8
  312. package/node_modules/splaytree/dist/splay.js.map +1 -1
  313. package/node_modules/splaytree/package.json +36 -68
  314. package/node_modules/splaytree/src/index.ts +16 -4
  315. package/node_modules/tinyqueue/package.json +34 -59
  316. package/node_modules/topojson-client/package.json +28 -56
  317. package/node_modules/topojson-server/package.json +27 -55
  318. package/node_modules/turf-jsts/package.json +33 -68
  319. package/node_modules/uuid/CHANGELOG.md +39 -0
  320. package/node_modules/uuid/README.md +30 -73
  321. package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  322. package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  323. package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  324. package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  325. package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  326. package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  327. package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  328. package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  329. package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  330. package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  331. package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  332. package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  333. package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  334. package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  335. package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  336. package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  337. package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
  338. package/node_modules/uuid/dist/esm-browser/native.js +4 -0
  339. package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
  340. package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
  341. package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
  342. package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
  343. package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
  344. package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
  345. package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
  346. package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
  347. package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
  348. package/node_modules/uuid/dist/esm-browser/version.js +1 -1
  349. package/node_modules/uuid/dist/esm-node/native.js +4 -0
  350. package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
  351. package/node_modules/uuid/dist/esm-node/v1.js +2 -2
  352. package/node_modules/uuid/dist/esm-node/v35.js +6 -4
  353. package/node_modules/uuid/dist/esm-node/v4.js +7 -2
  354. package/node_modules/uuid/dist/esm-node/version.js +1 -1
  355. package/node_modules/uuid/dist/index.js +18 -18
  356. package/node_modules/uuid/dist/native-browser.js +11 -0
  357. package/node_modules/uuid/dist/native.js +15 -0
  358. package/node_modules/uuid/dist/rng-browser.js +2 -3
  359. package/node_modules/uuid/dist/stringify.js +8 -3
  360. package/node_modules/uuid/dist/v1.js +2 -2
  361. package/node_modules/uuid/dist/v35.js +7 -5
  362. package/node_modules/uuid/dist/v4.js +8 -2
  363. package/node_modules/uuid/dist/version.js +1 -1
  364. package/node_modules/uuid/package.json +87 -120
  365. package/package.json +12 -8
  366. package/tak-ingest.html +40 -0
  367. package/tak-ingest.js +48 -0
  368. package/tak-registration.html +13 -2
  369. package/tak-registration.js +55 -7
  370. package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
  371. package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
  372. package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
  373. package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
  374. package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
  375. package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
  376. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
  377. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
  378. package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
  379. package/node_modules/axios/dist/axios.map +0 -1
  380. package/node_modules/axios/dist/axios.min.map +0 -1
  381. package/node_modules/axios/lib/cancel/Cancel.js +0 -19
  382. package/node_modules/axios/lib/core/createError.js +0 -18
  383. package/node_modules/axios/lib/core/enhanceError.js +0 -43
  384. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  385. package/node_modules/axios/tsconfig.json +0 -14
  386. package/node_modules/axios/tslint.json +0 -6
  387. package/node_modules/combined-stream/yarn.lock +0 -17
  388. package/node_modules/d3-array/yarn.lock +0 -939
  389. package/node_modules/define-properties/.jscs.json +0 -175
  390. package/node_modules/define-properties/.travis.yml +0 -233
  391. package/node_modules/define-properties/test/index.js +0 -125
  392. package/node_modules/get-intrinsic/.eslintignore +0 -1
  393. package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  394. package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  395. package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  396. package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  397. package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  398. package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  399. package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  400. package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  401. package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  402. package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  403. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
  404. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
  405. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
  406. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
  407. /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
  408. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
  409. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
  410. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
  411. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
  412. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/LICENSE +0 -0
@@ -1,475 +1,467 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
- typeof define === 'function' && define.amd ? define(factory) :
4
- (global = global || self, global.RBush = factory());
5
- }(this, function () { 'use strict';
1
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.rbush = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
+ 'use strict';
6
3
 
7
- function quickselect(arr, k, left, right, compare) {
8
- quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);
9
- }
10
-
11
- function quickselectStep(arr, k, left, right, compare) {
12
-
13
- while (right > left) {
14
- if (right - left > 600) {
15
- var n = right - left + 1;
16
- var m = k - left + 1;
17
- var z = Math.log(n);
18
- var s = 0.5 * Math.exp(2 * z / 3);
19
- var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
20
- var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
21
- var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
22
- quickselectStep(arr, k, newLeft, newRight, compare);
23
- }
24
-
25
- var t = arr[k];
26
- var i = left;
27
- var j = right;
4
+ module.exports = rbush;
5
+ module.exports.default = rbush;
28
6
 
29
- swap(arr, left, k);
30
- if (compare(arr[right], t) > 0) { swap(arr, left, right); }
7
+ var quickselect = require('quickselect');
31
8
 
32
- while (i < j) {
33
- swap(arr, i, j);
34
- i++;
35
- j--;
36
- while (compare(arr[i], t) < 0) { i++; }
37
- while (compare(arr[j], t) > 0) { j--; }
38
- }
9
+ function rbush(maxEntries, format) {
10
+ if (!(this instanceof rbush)) return new rbush(maxEntries, format);
39
11
 
40
- if (compare(arr[left], t) === 0) { swap(arr, left, j); }
41
- else {
42
- j++;
43
- swap(arr, j, right);
44
- }
12
+ // max entries in a node is 9 by default; min node fill is 40% for best performance
13
+ this._maxEntries = Math.max(4, maxEntries || 9);
14
+ this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
45
15
 
46
- if (j <= k) { left = j + 1; }
47
- if (k <= j) { right = j - 1; }
16
+ if (format) {
17
+ this._initFormat(format);
48
18
  }
49
- }
50
19
 
51
- function swap(arr, i, j) {
52
- var tmp = arr[i];
53
- arr[i] = arr[j];
54
- arr[j] = tmp;
20
+ this.clear();
55
21
  }
56
22
 
57
- function defaultCompare(a, b) {
58
- return a < b ? -1 : a > b ? 1 : 0;
59
- }
23
+ rbush.prototype = {
60
24
 
61
- var RBush = function RBush(maxEntries) {
62
- if ( maxEntries === void 0 ) maxEntries = 9;
25
+ all: function () {
26
+ return this._all(this.data, []);
27
+ },
63
28
 
64
- // max entries in a node is 9 by default; min node fill is 40% for best performance
65
- this._maxEntries = Math.max(4, maxEntries);
66
- this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
67
- this.clear();
68
- };
29
+ search: function (bbox) {
69
30
 
70
- RBush.prototype.all = function all () {
71
- return this._all(this.data, []);
72
- };
31
+ var node = this.data,
32
+ result = [],
33
+ toBBox = this.toBBox;
73
34
 
74
- RBush.prototype.search = function search (bbox) {
75
- var node = this.data;
76
- var result = [];
35
+ if (!intersects(bbox, node)) return result;
77
36
 
78
- if (!intersects(bbox, node)) { return result; }
37
+ var nodesToSearch = [],
38
+ i, len, child, childBBox;
79
39
 
80
- var toBBox = this.toBBox;
81
- var nodesToSearch = [];
40
+ while (node) {
41
+ for (i = 0, len = node.children.length; i < len; i++) {
82
42
 
83
- while (node) {
84
- for (var i = 0; i < node.children.length; i++) {
85
- var child = node.children[i];
86
- var childBBox = node.leaf ? toBBox(child) : child;
43
+ child = node.children[i];
44
+ childBBox = node.leaf ? toBBox(child) : child;
87
45
 
88
- if (intersects(bbox, childBBox)) {
89
- if (node.leaf) { result.push(child); }
90
- else if (contains(bbox, childBBox)) { this._all(child, result); }
91
- else { nodesToSearch.push(child); }
46
+ if (intersects(bbox, childBBox)) {
47
+ if (node.leaf) result.push(child);
48
+ else if (contains(bbox, childBBox)) this._all(child, result);
49
+ else nodesToSearch.push(child);
50
+ }
92
51
  }
52
+ node = nodesToSearch.pop();
93
53
  }
94
- node = nodesToSearch.pop();
95
- }
96
54
 
97
- return result;
98
- };
55
+ return result;
56
+ },
57
+
58
+ collides: function (bbox) {
99
59
 
100
- RBush.prototype.collides = function collides (bbox) {
101
- var node = this.data;
60
+ var node = this.data,
61
+ toBBox = this.toBBox;
102
62
 
103
- if (!intersects(bbox, node)) { return false; }
63
+ if (!intersects(bbox, node)) return false;
104
64
 
105
- var nodesToSearch = [];
106
- while (node) {
107
- for (var i = 0; i < node.children.length; i++) {
108
- var child = node.children[i];
109
- var childBBox = node.leaf ? this.toBBox(child) : child;
65
+ var nodesToSearch = [],
66
+ i, len, child, childBBox;
110
67
 
111
- if (intersects(bbox, childBBox)) {
112
- if (node.leaf || contains(bbox, childBBox)) { return true; }
113
- nodesToSearch.push(child);
68
+ while (node) {
69
+ for (i = 0, len = node.children.length; i < len; i++) {
70
+
71
+ child = node.children[i];
72
+ childBBox = node.leaf ? toBBox(child) : child;
73
+
74
+ if (intersects(bbox, childBBox)) {
75
+ if (node.leaf || contains(bbox, childBBox)) return true;
76
+ nodesToSearch.push(child);
77
+ }
114
78
  }
79
+ node = nodesToSearch.pop();
115
80
  }
116
- node = nodesToSearch.pop();
117
- }
118
81
 
119
- return false;
120
- };
82
+ return false;
83
+ },
121
84
 
122
- RBush.prototype.load = function load (data) {
123
- if (!(data && data.length)) { return this; }
85
+ load: function (data) {
86
+ if (!(data && data.length)) return this;
124
87
 
125
- if (data.length < this._minEntries) {
126
- for (var i = 0; i < data.length; i++) {
127
- this.insert(data[i]);
88
+ if (data.length < this._minEntries) {
89
+ for (var i = 0, len = data.length; i < len; i++) {
90
+ this.insert(data[i]);
91
+ }
92
+ return this;
128
93
  }
129
- return this;
130
- }
131
94
 
132
- // recursively build the tree with the given data from scratch using OMT algorithm
133
- var node = this._build(data.slice(), 0, data.length - 1, 0);
95
+ // recursively build the tree with the given data from scratch using OMT algorithm
96
+ var node = this._build(data.slice(), 0, data.length - 1, 0);
97
+
98
+ if (!this.data.children.length) {
99
+ // save as is if tree is empty
100
+ this.data = node;
134
101
 
135
- if (!this.data.children.length) {
136
- // save as is if tree is empty
137
- this.data = node;
102
+ } else if (this.data.height === node.height) {
103
+ // split root if trees have the same height
104
+ this._splitRoot(this.data, node);
138
105
 
139
- } else if (this.data.height === node.height) {
140
- // split root if trees have the same height
141
- this._splitRoot(this.data, node);
106
+ } else {
107
+ if (this.data.height < node.height) {
108
+ // swap trees if inserted one is bigger
109
+ var tmpNode = this.data;
110
+ this.data = node;
111
+ node = tmpNode;
112
+ }
142
113
 
143
- } else {
144
- if (this.data.height < node.height) {
145
- // swap trees if inserted one is bigger
146
- var tmpNode = this.data;
147
- this.data = node;
148
- node = tmpNode;
114
+ // insert the small tree into the large tree at appropriate level
115
+ this._insert(node, this.data.height - node.height - 1, true);
149
116
  }
150
117
 
151
- // insert the small tree into the large tree at appropriate level
152
- this._insert(node, this.data.height - node.height - 1, true);
153
- }
154
-
155
- return this;
156
- };
118
+ return this;
119
+ },
157
120
 
158
- RBush.prototype.insert = function insert (item) {
159
- if (item) { this._insert(item, this.data.height - 1); }
160
- return this;
161
- };
121
+ insert: function (item) {
122
+ if (item) this._insert(item, this.data.height - 1);
123
+ return this;
124
+ },
162
125
 
163
- RBush.prototype.clear = function clear () {
164
- this.data = createNode([]);
165
- return this;
166
- };
126
+ clear: function () {
127
+ this.data = createNode([]);
128
+ return this;
129
+ },
167
130
 
168
- RBush.prototype.remove = function remove (item, equalsFn) {
169
- if (!item) { return this; }
131
+ remove: function (item, equalsFn) {
132
+ if (!item) return this;
170
133
 
171
- var node = this.data;
172
- var bbox = this.toBBox(item);
173
- var path = [];
174
- var indexes = [];
175
- var i, parent, goingUp;
134
+ var node = this.data,
135
+ bbox = this.toBBox(item),
136
+ path = [],
137
+ indexes = [],
138
+ i, parent, index, goingUp;
176
139
 
177
- // depth-first iterative tree traversal
178
- while (node || path.length) {
140
+ // depth-first iterative tree traversal
141
+ while (node || path.length) {
179
142
 
180
- if (!node) { // go up
181
- node = path.pop();
182
- parent = path[path.length - 1];
183
- i = indexes.pop();
184
- goingUp = true;
185
- }
143
+ if (!node) { // go up
144
+ node = path.pop();
145
+ parent = path[path.length - 1];
146
+ i = indexes.pop();
147
+ goingUp = true;
148
+ }
186
149
 
187
- if (node.leaf) { // check current node
188
- var index = findItem(item, node.children, equalsFn);
150
+ if (node.leaf) { // check current node
151
+ index = findItem(item, node.children, equalsFn);
189
152
 
190
- if (index !== -1) {
191
- // item found, remove the item and condense tree upwards
192
- node.children.splice(index, 1);
193
- path.push(node);
194
- this._condense(path);
195
- return this;
153
+ if (index !== -1) {
154
+ // item found, remove the item and condense tree upwards
155
+ node.children.splice(index, 1);
156
+ path.push(node);
157
+ this._condense(path);
158
+ return this;
159
+ }
196
160
  }
197
- }
198
161
 
199
- if (!goingUp && !node.leaf && contains(node, bbox)) { // go down
200
- path.push(node);
201
- indexes.push(i);
202
- i = 0;
203
- parent = node;
204
- node = node.children[0];
162
+ if (!goingUp && !node.leaf && contains(node, bbox)) { // go down
163
+ path.push(node);
164
+ indexes.push(i);
165
+ i = 0;
166
+ parent = node;
167
+ node = node.children[0];
205
168
 
206
- } else if (parent) { // go right
207
- i++;
208
- node = parent.children[i];
209
- goingUp = false;
169
+ } else if (parent) { // go right
170
+ i++;
171
+ node = parent.children[i];
172
+ goingUp = false;
210
173
 
211
- } else { node = null; } // nothing found
212
- }
174
+ } else node = null; // nothing found
175
+ }
213
176
 
214
- return this;
215
- };
177
+ return this;
178
+ },
216
179
 
217
- RBush.prototype.toBBox = function toBBox (item) { return item; };
180
+ toBBox: function (item) { return item; },
218
181
 
219
- RBush.prototype.compareMinX = function compareMinX (a, b) { return a.minX - b.minX; };
220
- RBush.prototype.compareMinY = function compareMinY (a, b) { return a.minY - b.minY; };
182
+ compareMinX: compareNodeMinX,
183
+ compareMinY: compareNodeMinY,
221
184
 
222
- RBush.prototype.toJSON = function toJSON () { return this.data; };
185
+ toJSON: function () { return this.data; },
223
186
 
224
- RBush.prototype.fromJSON = function fromJSON (data) {
225
- this.data = data;
226
- return this;
227
- };
187
+ fromJSON: function (data) {
188
+ this.data = data;
189
+ return this;
190
+ },
228
191
 
229
- RBush.prototype._all = function _all (node, result) {
230
- var nodesToSearch = [];
231
- while (node) {
232
- if (node.leaf) { result.push.apply(result, node.children); }
233
- else { nodesToSearch.push.apply(nodesToSearch, node.children); }
192
+ _all: function (node, result) {
193
+ var nodesToSearch = [];
194
+ while (node) {
195
+ if (node.leaf) result.push.apply(result, node.children);
196
+ else nodesToSearch.push.apply(nodesToSearch, node.children);
234
197
 
235
- node = nodesToSearch.pop();
236
- }
237
- return result;
238
- };
198
+ node = nodesToSearch.pop();
199
+ }
200
+ return result;
201
+ },
239
202
 
240
- RBush.prototype._build = function _build (items, left, right, height) {
203
+ _build: function (items, left, right, height) {
241
204
 
242
- var N = right - left + 1;
243
- var M = this._maxEntries;
244
- var node;
205
+ var N = right - left + 1,
206
+ M = this._maxEntries,
207
+ node;
245
208
 
246
- if (N <= M) {
247
- // reached leaf level; return leaf
248
- node = createNode(items.slice(left, right + 1));
249
- calcBBox(node, this.toBBox);
250
- return node;
251
- }
209
+ if (N <= M) {
210
+ // reached leaf level; return leaf
211
+ node = createNode(items.slice(left, right + 1));
212
+ calcBBox(node, this.toBBox);
213
+ return node;
214
+ }
252
215
 
253
- if (!height) {
254
- // target height of the bulk-loaded tree
255
- height = Math.ceil(Math.log(N) / Math.log(M));
216
+ if (!height) {
217
+ // target height of the bulk-loaded tree
218
+ height = Math.ceil(Math.log(N) / Math.log(M));
256
219
 
257
- // target number of root entries to maximize storage utilization
258
- M = Math.ceil(N / Math.pow(M, height - 1));
259
- }
220
+ // target number of root entries to maximize storage utilization
221
+ M = Math.ceil(N / Math.pow(M, height - 1));
222
+ }
260
223
 
261
- node = createNode([]);
262
- node.leaf = false;
263
- node.height = height;
224
+ node = createNode([]);
225
+ node.leaf = false;
226
+ node.height = height;
264
227
 
265
- // split the items into M mostly square tiles
228
+ // split the items into M mostly square tiles
266
229
 
267
- var N2 = Math.ceil(N / M);
268
- var N1 = N2 * Math.ceil(Math.sqrt(M));
230
+ var N2 = Math.ceil(N / M),
231
+ N1 = N2 * Math.ceil(Math.sqrt(M)),
232
+ i, j, right2, right3;
269
233
 
270
- multiSelect(items, left, right, N1, this.compareMinX);
234
+ multiSelect(items, left, right, N1, this.compareMinX);
271
235
 
272
- for (var i = left; i <= right; i += N1) {
236
+ for (i = left; i <= right; i += N1) {
273
237
 
274
- var right2 = Math.min(i + N1 - 1, right);
238
+ right2 = Math.min(i + N1 - 1, right);
275
239
 
276
- multiSelect(items, i, right2, N2, this.compareMinY);
240
+ multiSelect(items, i, right2, N2, this.compareMinY);
277
241
 
278
- for (var j = i; j <= right2; j += N2) {
242
+ for (j = i; j <= right2; j += N2) {
279
243
 
280
- var right3 = Math.min(j + N2 - 1, right2);
244
+ right3 = Math.min(j + N2 - 1, right2);
281
245
 
282
- // pack each entry recursively
283
- node.children.push(this._build(items, j, right3, height - 1));
246
+ // pack each entry recursively
247
+ node.children.push(this._build(items, j, right3, height - 1));
248
+ }
284
249
  }
285
- }
286
250
 
287
- calcBBox(node, this.toBBox);
251
+ calcBBox(node, this.toBBox);
288
252
 
289
- return node;
290
- };
253
+ return node;
254
+ },
291
255
 
292
- RBush.prototype._chooseSubtree = function _chooseSubtree (bbox, node, level, path) {
293
- while (true) {
294
- path.push(node);
256
+ _chooseSubtree: function (bbox, node, level, path) {
295
257
 
296
- if (node.leaf || path.length - 1 === level) { break; }
258
+ var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;
297
259
 
298
- var minArea = Infinity;
299
- var minEnlargement = Infinity;
300
- var targetNode = (void 0);
260
+ while (true) {
261
+ path.push(node);
301
262
 
302
- for (var i = 0; i < node.children.length; i++) {
303
- var child = node.children[i];
304
- var area = bboxArea(child);
305
- var enlargement = enlargedArea(bbox, child) - area;
263
+ if (node.leaf || path.length - 1 === level) break;
306
264
 
307
- // choose entry with the least area enlargement
308
- if (enlargement < minEnlargement) {
309
- minEnlargement = enlargement;
310
- minArea = area < minArea ? area : minArea;
311
- targetNode = child;
265
+ minArea = minEnlargement = Infinity;
312
266
 
313
- } else if (enlargement === minEnlargement) {
314
- // otherwise choose one with the smallest area
315
- if (area < minArea) {
316
- minArea = area;
267
+ for (i = 0, len = node.children.length; i < len; i++) {
268
+ child = node.children[i];
269
+ area = bboxArea(child);
270
+ enlargement = enlargedArea(bbox, child) - area;
271
+
272
+ // choose entry with the least area enlargement
273
+ if (enlargement < minEnlargement) {
274
+ minEnlargement = enlargement;
275
+ minArea = area < minArea ? area : minArea;
317
276
  targetNode = child;
277
+
278
+ } else if (enlargement === minEnlargement) {
279
+ // otherwise choose one with the smallest area
280
+ if (area < minArea) {
281
+ minArea = area;
282
+ targetNode = child;
283
+ }
318
284
  }
319
285
  }
286
+
287
+ node = targetNode || node.children[0];
320
288
  }
321
289
 
322
- node = targetNode || node.children[0];
323
- }
290
+ return node;
291
+ },
324
292
 
325
- return node;
326
- };
293
+ _insert: function (item, level, isNode) {
327
294
 
328
- RBush.prototype._insert = function _insert (item, level, isNode) {
329
- var bbox = isNode ? item : this.toBBox(item);
330
- var insertPath = [];
295
+ var toBBox = this.toBBox,
296
+ bbox = isNode ? item : toBBox(item),
297
+ insertPath = [];
331
298
 
332
- // find the best node for accommodating the item, saving all nodes along the path too
333
- var node = this._chooseSubtree(bbox, this.data, level, insertPath);
299
+ // find the best node for accommodating the item, saving all nodes along the path too
300
+ var node = this._chooseSubtree(bbox, this.data, level, insertPath);
334
301
 
335
- // put the item into the node
336
- node.children.push(item);
337
- extend(node, bbox);
302
+ // put the item into the node
303
+ node.children.push(item);
304
+ extend(node, bbox);
338
305
 
339
- // split on node overflow; propagate upwards if necessary
340
- while (level >= 0) {
341
- if (insertPath[level].children.length > this._maxEntries) {
342
- this._split(insertPath, level);
343
- level--;
344
- } else { break; }
345
- }
306
+ // split on node overflow; propagate upwards if necessary
307
+ while (level >= 0) {
308
+ if (insertPath[level].children.length > this._maxEntries) {
309
+ this._split(insertPath, level);
310
+ level--;
311
+ } else break;
312
+ }
346
313
 
347
- // adjust bboxes along the insertion path
348
- this._adjustParentBBoxes(bbox, insertPath, level);
349
- };
314
+ // adjust bboxes along the insertion path
315
+ this._adjustParentBBoxes(bbox, insertPath, level);
316
+ },
350
317
 
351
- // split overflowed node into two
352
- RBush.prototype._split = function _split (insertPath, level) {
353
- var node = insertPath[level];
354
- var M = node.children.length;
355
- var m = this._minEntries;
318
+ // split overflowed node into two
319
+ _split: function (insertPath, level) {
356
320
 
357
- this._chooseSplitAxis(node, m, M);
321
+ var node = insertPath[level],
322
+ M = node.children.length,
323
+ m = this._minEntries;
358
324
 
359
- var splitIndex = this._chooseSplitIndex(node, m, M);
325
+ this._chooseSplitAxis(node, m, M);
360
326
 
361
- var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
362
- newNode.height = node.height;
363
- newNode.leaf = node.leaf;
327
+ var splitIndex = this._chooseSplitIndex(node, m, M);
364
328
 
365
- calcBBox(node, this.toBBox);
366
- calcBBox(newNode, this.toBBox);
329
+ var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
330
+ newNode.height = node.height;
331
+ newNode.leaf = node.leaf;
367
332
 
368
- if (level) { insertPath[level - 1].children.push(newNode); }
369
- else { this._splitRoot(node, newNode); }
370
- };
333
+ calcBBox(node, this.toBBox);
334
+ calcBBox(newNode, this.toBBox);
371
335
 
372
- RBush.prototype._splitRoot = function _splitRoot (node, newNode) {
373
- // split root node
374
- this.data = createNode([node, newNode]);
375
- this.data.height = node.height + 1;
376
- this.data.leaf = false;
377
- calcBBox(this.data, this.toBBox);
378
- };
336
+ if (level) insertPath[level - 1].children.push(newNode);
337
+ else this._splitRoot(node, newNode);
338
+ },
339
+
340
+ _splitRoot: function (node, newNode) {
341
+ // split root node
342
+ this.data = createNode([node, newNode]);
343
+ this.data.height = node.height + 1;
344
+ this.data.leaf = false;
345
+ calcBBox(this.data, this.toBBox);
346
+ },
379
347
 
380
- RBush.prototype._chooseSplitIndex = function _chooseSplitIndex (node, m, M) {
381
- var index;
382
- var minOverlap = Infinity;
383
- var minArea = Infinity;
348
+ _chooseSplitIndex: function (node, m, M) {
384
349
 
385
- for (var i = m; i <= M - m; i++) {
386
- var bbox1 = distBBox(node, 0, i, this.toBBox);
387
- var bbox2 = distBBox(node, i, M, this.toBBox);
350
+ var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;
388
351
 
389
- var overlap = intersectionArea(bbox1, bbox2);
390
- var area = bboxArea(bbox1) + bboxArea(bbox2);
352
+ minOverlap = minArea = Infinity;
391
353
 
392
- // choose distribution with minimum overlap
393
- if (overlap < minOverlap) {
394
- minOverlap = overlap;
395
- index = i;
354
+ for (i = m; i <= M - m; i++) {
355
+ bbox1 = distBBox(node, 0, i, this.toBBox);
356
+ bbox2 = distBBox(node, i, M, this.toBBox);
396
357
 
397
- minArea = area < minArea ? area : minArea;
358
+ overlap = intersectionArea(bbox1, bbox2);
359
+ area = bboxArea(bbox1) + bboxArea(bbox2);
398
360
 
399
- } else if (overlap === minOverlap) {
400
- // otherwise choose distribution with minimum area
401
- if (area < minArea) {
402
- minArea = area;
361
+ // choose distribution with minimum overlap
362
+ if (overlap < minOverlap) {
363
+ minOverlap = overlap;
403
364
  index = i;
365
+
366
+ minArea = area < minArea ? area : minArea;
367
+
368
+ } else if (overlap === minOverlap) {
369
+ // otherwise choose distribution with minimum area
370
+ if (area < minArea) {
371
+ minArea = area;
372
+ index = i;
373
+ }
404
374
  }
405
375
  }
406
- }
407
376
 
408
- return index || M - m;
409
- };
377
+ return index;
378
+ },
410
379
 
411
- // sorts node children by the best axis for split
412
- RBush.prototype._chooseSplitAxis = function _chooseSplitAxis (node, m, M) {
413
- var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX;
414
- var compareMinY = node.leaf ? this.compareMinY : compareNodeMinY;
415
- var xMargin = this._allDistMargin(node, m, M, compareMinX);
416
- var yMargin = this._allDistMargin(node, m, M, compareMinY);
380
+ // sorts node children by the best axis for split
381
+ _chooseSplitAxis: function (node, m, M) {
417
382
 
418
- // if total distributions margin value is minimal for x, sort by minX,
419
- // otherwise it's already sorted by minY
420
- if (xMargin < yMargin) { node.children.sort(compareMinX); }
421
- };
383
+ var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,
384
+ compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,
385
+ xMargin = this._allDistMargin(node, m, M, compareMinX),
386
+ yMargin = this._allDistMargin(node, m, M, compareMinY);
422
387
 
423
- // total margin of all possible split distributions where each node is at least m full
424
- RBush.prototype._allDistMargin = function _allDistMargin (node, m, M, compare) {
425
- node.children.sort(compare);
388
+ // if total distributions margin value is minimal for x, sort by minX,
389
+ // otherwise it's already sorted by minY
390
+ if (xMargin < yMargin) node.children.sort(compareMinX);
391
+ },
426
392
 
427
- var toBBox = this.toBBox;
428
- var leftBBox = distBBox(node, 0, m, toBBox);
429
- var rightBBox = distBBox(node, M - m, M, toBBox);
430
- var margin = bboxMargin(leftBBox) + bboxMargin(rightBBox);
393
+ // total margin of all possible split distributions where each node is at least m full
394
+ _allDistMargin: function (node, m, M, compare) {
431
395
 
432
- for (var i = m; i < M - m; i++) {
433
- var child = node.children[i];
434
- extend(leftBBox, node.leaf ? toBBox(child) : child);
435
- margin += bboxMargin(leftBBox);
436
- }
396
+ node.children.sort(compare);
437
397
 
438
- for (var i$1 = M - m - 1; i$1 >= m; i$1--) {
439
- var child$1 = node.children[i$1];
440
- extend(rightBBox, node.leaf ? toBBox(child$1) : child$1);
441
- margin += bboxMargin(rightBBox);
442
- }
398
+ var toBBox = this.toBBox,
399
+ leftBBox = distBBox(node, 0, m, toBBox),
400
+ rightBBox = distBBox(node, M - m, M, toBBox),
401
+ margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),
402
+ i, child;
443
403
 
444
- return margin;
445
- };
404
+ for (i = m; i < M - m; i++) {
405
+ child = node.children[i];
406
+ extend(leftBBox, node.leaf ? toBBox(child) : child);
407
+ margin += bboxMargin(leftBBox);
408
+ }
446
409
 
447
- RBush.prototype._adjustParentBBoxes = function _adjustParentBBoxes (bbox, path, level) {
448
- // adjust bboxes along the given tree path
449
- for (var i = level; i >= 0; i--) {
450
- extend(path[i], bbox);
451
- }
452
- };
410
+ for (i = M - m - 1; i >= m; i--) {
411
+ child = node.children[i];
412
+ extend(rightBBox, node.leaf ? toBBox(child) : child);
413
+ margin += bboxMargin(rightBBox);
414
+ }
415
+
416
+ return margin;
417
+ },
418
+
419
+ _adjustParentBBoxes: function (bbox, path, level) {
420
+ // adjust bboxes along the given tree path
421
+ for (var i = level; i >= 0; i--) {
422
+ extend(path[i], bbox);
423
+ }
424
+ },
425
+
426
+ _condense: function (path) {
427
+ // go through the path, removing empty nodes and updating bboxes
428
+ for (var i = path.length - 1, siblings; i >= 0; i--) {
429
+ if (path[i].children.length === 0) {
430
+ if (i > 0) {
431
+ siblings = path[i - 1].children;
432
+ siblings.splice(siblings.indexOf(path[i]), 1);
433
+
434
+ } else this.clear();
453
435
 
454
- RBush.prototype._condense = function _condense (path) {
455
- // go through the path, removing empty nodes and updating bboxes
456
- for (var i = path.length - 1, siblings = (void 0); i >= 0; i--) {
457
- if (path[i].children.length === 0) {
458
- if (i > 0) {
459
- siblings = path[i - 1].children;
460
- siblings.splice(siblings.indexOf(path[i]), 1);
436
+ } else calcBBox(path[i], this.toBBox);
437
+ }
438
+ },
439
+
440
+ _initFormat: function (format) {
441
+ // data format (minX, minY, maxX, maxY accessors)
442
+
443
+ // uses eval-type function compilation instead of just accepting a toBBox function
444
+ // because the algorithms are very sensitive to sorting functions performance,
445
+ // so they should be dead simple and without inner calls
461
446
 
462
- } else { this.clear(); }
447
+ var compareArr = ['return a', ' - b', ';'];
463
448
 
464
- } else { calcBBox(path[i], this.toBBox); }
449
+ this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));
450
+ this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));
451
+
452
+ this.toBBox = new Function('a',
453
+ 'return {minX: a' + format[0] +
454
+ ', minY: a' + format[1] +
455
+ ', maxX: a' + format[2] +
456
+ ', maxY: a' + format[3] + '};');
465
457
  }
466
458
  };
467
459
 
468
460
  function findItem(item, items, equalsFn) {
469
- if (!equalsFn) { return items.indexOf(item); }
461
+ if (!equalsFn) return items.indexOf(item);
470
462
 
471
463
  for (var i = 0; i < items.length; i++) {
472
- if (equalsFn(item, items[i])) { return i; }
464
+ if (equalsFn(item, items[i])) return i;
473
465
  }
474
466
  return -1;
475
467
  }
@@ -481,14 +473,14 @@ function calcBBox(node, toBBox) {
481
473
 
482
474
  // min bounding rectangle of node children from k to p-1
483
475
  function distBBox(node, k, p, toBBox, destNode) {
484
- if (!destNode) { destNode = createNode(null); }
476
+ if (!destNode) destNode = createNode(null);
485
477
  destNode.minX = Infinity;
486
478
  destNode.minY = Infinity;
487
479
  destNode.maxX = -Infinity;
488
480
  destNode.maxY = -Infinity;
489
481
 
490
- for (var i = k; i < p; i++) {
491
- var child = node.children[i];
482
+ for (var i = k, child; i < p; i++) {
483
+ child = node.children[i];
492
484
  extend(destNode, node.leaf ? toBBox(child) : child);
493
485
  }
494
486
 
@@ -515,10 +507,10 @@ function enlargedArea(a, b) {
515
507
  }
516
508
 
517
509
  function intersectionArea(a, b) {
518
- var minX = Math.max(a.minX, b.minX);
519
- var minY = Math.max(a.minY, b.minY);
520
- var maxX = Math.min(a.maxX, b.maxX);
521
- var maxY = Math.min(a.maxY, b.maxY);
510
+ var minX = Math.max(a.minX, b.minX),
511
+ minY = Math.max(a.minY, b.minY),
512
+ maxX = Math.min(a.maxX, b.maxX),
513
+ maxY = Math.min(a.maxY, b.maxY);
522
514
 
523
515
  return Math.max(0, maxX - minX) *
524
516
  Math.max(0, maxY - minY);
@@ -554,21 +546,81 @@ function createNode(children) {
554
546
  // combines selection algorithm with binary divide & conquer approach
555
547
 
556
548
  function multiSelect(arr, left, right, n, compare) {
557
- var stack = [left, right];
549
+ var stack = [left, right],
550
+ mid;
558
551
 
559
552
  while (stack.length) {
560
553
  right = stack.pop();
561
554
  left = stack.pop();
562
555
 
563
- if (right - left <= n) { continue; }
556
+ if (right - left <= n) continue;
564
557
 
565
- var mid = left + Math.ceil((right - left) / n / 2) * n;
558
+ mid = left + Math.ceil((right - left) / n / 2) * n;
566
559
  quickselect(arr, mid, left, right, compare);
567
560
 
568
561
  stack.push(left, mid, mid, right);
569
562
  }
570
563
  }
571
564
 
572
- return RBush;
565
+ },{"quickselect":2}],2:[function(require,module,exports){
566
+ 'use strict';
567
+
568
+ module.exports = quickselect;
569
+ module.exports.default = quickselect;
570
+
571
+ function quickselect(arr, k, left, right, compare) {
572
+ quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);
573
+ };
574
+
575
+ function quickselectStep(arr, k, left, right, compare) {
576
+
577
+ while (right > left) {
578
+ if (right - left > 600) {
579
+ var n = right - left + 1;
580
+ var m = k - left + 1;
581
+ var z = Math.log(n);
582
+ var s = 0.5 * Math.exp(2 * z / 3);
583
+ var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
584
+ var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
585
+ var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
586
+ quickselectStep(arr, k, newLeft, newRight, compare);
587
+ }
588
+
589
+ var t = arr[k];
590
+ var i = left;
591
+ var j = right;
592
+
593
+ swap(arr, left, k);
594
+ if (compare(arr[right], t) > 0) swap(arr, left, right);
595
+
596
+ while (i < j) {
597
+ swap(arr, i, j);
598
+ i++;
599
+ j--;
600
+ while (compare(arr[i], t) < 0) i++;
601
+ while (compare(arr[j], t) > 0) j--;
602
+ }
603
+
604
+ if (compare(arr[left], t) === 0) swap(arr, left, j);
605
+ else {
606
+ j++;
607
+ swap(arr, j, right);
608
+ }
609
+
610
+ if (j <= k) left = j + 1;
611
+ if (k <= j) right = j - 1;
612
+ }
613
+ }
614
+
615
+ function swap(arr, i, j) {
616
+ var tmp = arr[i];
617
+ arr[i] = arr[j];
618
+ arr[j] = tmp;
619
+ }
620
+
621
+ function defaultCompare(a, b) {
622
+ return a < b ? -1 : a > b ? 1 : 0;
623
+ }
573
624
 
574
- }));
625
+ },{}]},{},[1])(1)
626
+ });