@unovis/ts 1.0.0-alpha.4

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 (504) hide show
  1. package/LICENSE +193 -0
  2. package/components/area/config.d.ts +25 -0
  3. package/components/area/config.js +16 -0
  4. package/components/area/config.js.map +1 -0
  5. package/components/area/index.d.ts +19 -0
  6. package/components/area/index.js +103 -0
  7. package/components/area/index.js.map +1 -0
  8. package/components/area/style.d.ts +3 -0
  9. package/components/area/style.js +32 -0
  10. package/components/area/style.js.map +1 -0
  11. package/components/area/types.d.ts +6 -0
  12. package/components/axis/config.d.ts +74 -0
  13. package/components/axis/config.js +33 -0
  14. package/components/axis/config.js.map +1 -0
  15. package/components/axis/index.d.ts +51 -0
  16. package/components/axis/index.js +291 -0
  17. package/components/axis/index.js.map +1 -0
  18. package/components/axis/modules/tick.d.ts +5 -0
  19. package/components/axis/modules/tick.js +48 -0
  20. package/components/axis/modules/tick.js.map +1 -0
  21. package/components/axis/style.d.ts +9 -0
  22. package/components/axis/style.js +95 -0
  23. package/components/axis/style.js.map +1 -0
  24. package/components/axis/types.d.ts +4 -0
  25. package/components/axis/types.js +8 -0
  26. package/components/axis/types.js.map +1 -0
  27. package/components/brush/config.d.ts +42 -0
  28. package/components/brush/config.js +24 -0
  29. package/components/brush/config.js.map +1 -0
  30. package/components/brush/index.d.ts +28 -0
  31. package/components/brush/index.js +199 -0
  32. package/components/brush/index.js.map +1 -0
  33. package/components/brush/style.d.ts +5 -0
  34. package/components/brush/style.js +63 -0
  35. package/components/brush/style.js.map +1 -0
  36. package/components/brush/types.d.ts +7 -0
  37. package/components/brush/types.js +8 -0
  38. package/components/brush/types.js.map +1 -0
  39. package/components/bullet-legend/config.d.ts +24 -0
  40. package/components/bullet-legend/config.js +16 -0
  41. package/components/bullet-legend/config.js.map +1 -0
  42. package/components/bullet-legend/index.d.ts +19 -0
  43. package/components/bullet-legend/index.js +79 -0
  44. package/components/bullet-legend/index.js.map +1 -0
  45. package/components/bullet-legend/style.d.ts +6 -0
  46. package/components/bullet-legend/style.js +66 -0
  47. package/components/bullet-legend/style.js.map +1 -0
  48. package/components/bullet-legend/types.d.ts +7 -0
  49. package/components/chord-diagram/config.d.ts +42 -0
  50. package/components/chord-diagram/config.js +25 -0
  51. package/components/chord-diagram/config.js.map +1 -0
  52. package/components/chord-diagram/index.d.ts +52 -0
  53. package/components/chord-diagram/index.js +280 -0
  54. package/components/chord-diagram/index.js.map +1 -0
  55. package/components/chord-diagram/modules/label.d.ts +8 -0
  56. package/components/chord-diagram/modules/label.js +128 -0
  57. package/components/chord-diagram/modules/label.js.map +1 -0
  58. package/components/chord-diagram/modules/link.d.ts +20 -0
  59. package/components/chord-diagram/modules/link.js +35 -0
  60. package/components/chord-diagram/modules/link.js.map +1 -0
  61. package/components/chord-diagram/modules/node.d.ts +17 -0
  62. package/components/chord-diagram/modules/node.js +52 -0
  63. package/components/chord-diagram/modules/node.js.map +1 -0
  64. package/components/chord-diagram/style.d.ts +13 -0
  65. package/components/chord-diagram/style.js +88 -0
  66. package/components/chord-diagram/style.js.map +1 -0
  67. package/components/chord-diagram/types.d.ts +40 -0
  68. package/components/chord-diagram/types.js +8 -0
  69. package/components/chord-diagram/types.js.map +1 -0
  70. package/components/crosshair/config.d.ts +43 -0
  71. package/components/crosshair/config.js +19 -0
  72. package/components/crosshair/config.js.map +1 -0
  73. package/components/crosshair/index.d.ts +35 -0
  74. package/components/crosshair/index.js +180 -0
  75. package/components/crosshair/index.js.map +1 -0
  76. package/components/crosshair/style.d.ts +4 -0
  77. package/components/crosshair/style.js +25 -0
  78. package/components/crosshair/style.js.map +1 -0
  79. package/components/crosshair/types.d.ts +13 -0
  80. package/components/donut/config.d.ts +45 -0
  81. package/components/donut/config.js +25 -0
  82. package/components/donut/config.js.map +1 -0
  83. package/components/donut/index.d.ts +20 -0
  84. package/components/donut/index.js +84 -0
  85. package/components/donut/index.js.map +1 -0
  86. package/components/donut/modules/arc.d.ts +10 -0
  87. package/components/donut/modules/arc.js +53 -0
  88. package/components/donut/modules/arc.js.map +1 -0
  89. package/components/donut/style.d.ts +6 -0
  90. package/components/donut/style.js +53 -0
  91. package/components/donut/style.js.map +1 -0
  92. package/components/donut/types.d.ts +12 -0
  93. package/components/flow-legend/config.d.ts +26 -0
  94. package/components/flow-legend/config.js +17 -0
  95. package/components/flow-legend/config.js.map +1 -0
  96. package/components/flow-legend/index.d.ts +16 -0
  97. package/components/flow-legend/index.js +73 -0
  98. package/components/flow-legend/index.js.map +1 -0
  99. package/components/flow-legend/style.d.ts +8 -0
  100. package/components/flow-legend/style.js +80 -0
  101. package/components/flow-legend/style.js.map +1 -0
  102. package/components/flow-legend/types.d.ts +9 -0
  103. package/components/flow-legend/types.js +8 -0
  104. package/components/flow-legend/types.js.map +1 -0
  105. package/components/free-brush/config.d.ts +45 -0
  106. package/components/free-brush/config.js +24 -0
  107. package/components/free-brush/config.js.map +1 -0
  108. package/components/free-brush/index.d.ts +20 -0
  109. package/components/free-brush/index.js +191 -0
  110. package/components/free-brush/index.js.map +1 -0
  111. package/components/free-brush/style.d.ts +4 -0
  112. package/components/free-brush/style.js +50 -0
  113. package/components/free-brush/style.js.map +1 -0
  114. package/components/free-brush/types.d.ts +7 -0
  115. package/components/free-brush/types.js +9 -0
  116. package/components/free-brush/types.js.map +1 -0
  117. package/components/graph/config.d.ts +207 -0
  118. package/components/graph/config.js +75 -0
  119. package/components/graph/config.js.map +1 -0
  120. package/components/graph/index.d.ts +125 -0
  121. package/components/graph/index.js +653 -0
  122. package/components/graph/index.js.map +1 -0
  123. package/components/graph/modules/layout-helpers.d.ts +2 -0
  124. package/components/graph/modules/layout-helpers.js +11 -0
  125. package/components/graph/modules/layout-helpers.js.map +1 -0
  126. package/components/graph/modules/layout.d.ts +9 -0
  127. package/components/graph/modules/layout.js +343 -0
  128. package/components/graph/modules/layout.js.map +1 -0
  129. package/components/graph/modules/link/helper.d.ts +25 -0
  130. package/components/graph/modules/link/helper.js +78 -0
  131. package/components/graph/modules/link/helper.js.map +1 -0
  132. package/components/graph/modules/link/index.d.ts +12 -0
  133. package/components/graph/modules/link/index.js +201 -0
  134. package/components/graph/modules/link/index.js.map +1 -0
  135. package/components/graph/modules/link/style.d.ts +15 -0
  136. package/components/graph/modules/link/style.js +112 -0
  137. package/components/graph/modules/link/style.js.map +1 -0
  138. package/components/graph/modules/node/helper.d.ts +21 -0
  139. package/components/graph/modules/node/helper.js +127 -0
  140. package/components/graph/modules/node/helper.js.map +1 -0
  141. package/components/graph/modules/node/index.d.ts +12 -0
  142. package/components/graph/modules/node/index.js +248 -0
  143. package/components/graph/modules/node/index.js.map +1 -0
  144. package/components/graph/modules/node/style.d.ts +24 -0
  145. package/components/graph/modules/node/style.js +273 -0
  146. package/components/graph/modules/node/style.js.map +1 -0
  147. package/components/graph/modules/panel/helper.d.ts +16 -0
  148. package/components/graph/modules/panel/helper.js +110 -0
  149. package/components/graph/modules/panel/helper.js.map +1 -0
  150. package/components/graph/modules/panel/index.d.ts +7 -0
  151. package/components/graph/modules/panel/index.js +103 -0
  152. package/components/graph/modules/panel/index.js.map +1 -0
  153. package/components/graph/modules/panel/style.d.ts +14 -0
  154. package/components/graph/modules/panel/style.js +123 -0
  155. package/components/graph/modules/panel/style.js.map +1 -0
  156. package/components/graph/modules/shape.d.ts +7 -0
  157. package/components/graph/modules/shape.js +80 -0
  158. package/components/graph/modules/shape.js.map +1 -0
  159. package/components/graph/modules/zoom-levels.d.ts +6 -0
  160. package/components/graph/modules/zoom-levels.js +10 -0
  161. package/components/graph/modules/zoom-levels.js.map +1 -0
  162. package/components/graph/style.d.ts +6 -0
  163. package/components/graph/style.js +66 -0
  164. package/components/graph/style.js.map +1 -0
  165. package/components/graph/types.d.ts +120 -0
  166. package/components/graph/types.js +29 -0
  167. package/components/graph/types.js.map +1 -0
  168. package/components/grouped-bar/config.d.ts +36 -0
  169. package/components/grouped-bar/config.js +20 -0
  170. package/components/grouped-bar/config.js.map +1 -0
  171. package/components/grouped-bar/index.d.ts +30 -0
  172. package/components/grouped-bar/index.js +231 -0
  173. package/components/grouped-bar/index.js.map +1 -0
  174. package/components/grouped-bar/style.d.ts +5 -0
  175. package/components/grouped-bar/style.js +36 -0
  176. package/components/grouped-bar/style.js.map +1 -0
  177. package/components/leaflet-flow-map/config.d.ts +46 -0
  178. package/components/leaflet-flow-map/config.js +25 -0
  179. package/components/leaflet-flow-map/config.js.map +1 -0
  180. package/components/leaflet-flow-map/index.d.ts +51 -0
  181. package/components/leaflet-flow-map/index.js +219 -0
  182. package/components/leaflet-flow-map/index.js.map +1 -0
  183. package/components/leaflet-flow-map/renderer-utils.d.ts +5 -0
  184. package/components/leaflet-flow-map/renderer-utils.js +15 -0
  185. package/components/leaflet-flow-map/renderer-utils.js.map +1 -0
  186. package/components/leaflet-flow-map/renderer.d.ts +26 -0
  187. package/components/leaflet-flow-map/renderer.js +117 -0
  188. package/components/leaflet-flow-map/renderer.js.map +1 -0
  189. package/components/leaflet-flow-map/shaders.d.ts +2 -0
  190. package/components/leaflet-flow-map/shaders.js +27 -0
  191. package/components/leaflet-flow-map/shaders.js.map +1 -0
  192. package/components/leaflet-flow-map/types.d.ts +23 -0
  193. package/components/leaflet-map/config.d.ts +175 -0
  194. package/components/leaflet-map/config.js +67 -0
  195. package/components/leaflet-map/config.js.map +1 -0
  196. package/components/leaflet-map/index.d.ts +95 -0
  197. package/components/leaflet-map/index.js +648 -0
  198. package/components/leaflet-map/index.js.map +1 -0
  199. package/components/leaflet-map/leaflet.css.js +4 -0
  200. package/components/leaflet-map/leaflet.css.js.map +1 -0
  201. package/components/leaflet-map/modules/clusterBackground.d.ts +4 -0
  202. package/components/leaflet-map/modules/clusterBackground.js +27 -0
  203. package/components/leaflet-map/modules/clusterBackground.js.map +1 -0
  204. package/components/leaflet-map/modules/donut.d.ts +3 -0
  205. package/components/leaflet-map/modules/donut.js +25 -0
  206. package/components/leaflet-map/modules/donut.js.map +1 -0
  207. package/components/leaflet-map/modules/map.d.ts +13 -0
  208. package/components/leaflet-map/modules/map.js +143 -0
  209. package/components/leaflet-map/modules/map.js.map +1 -0
  210. package/components/leaflet-map/modules/node.d.ts +8 -0
  211. package/components/leaflet-map/modules/node.js +148 -0
  212. package/components/leaflet-map/modules/node.js.map +1 -0
  213. package/components/leaflet-map/modules/selectionRing.d.ts +6 -0
  214. package/components/leaflet-map/modules/selectionRing.js +41 -0
  215. package/components/leaflet-map/modules/selectionRing.js.map +1 -0
  216. package/components/leaflet-map/modules/utils.d.ts +49 -0
  217. package/components/leaflet-map/modules/utils.js +206 -0
  218. package/components/leaflet-map/modules/utils.js.map +1 -0
  219. package/components/leaflet-map/renderer/leaflet-maplibre-gl.js +273 -0
  220. package/components/leaflet-map/renderer/leaflet-maplibre-gl.js.map +1 -0
  221. package/components/leaflet-map/renderer/map-style.d.ts +4 -0
  222. package/components/leaflet-map/renderer/map-style.js +15 -0
  223. package/components/leaflet-map/renderer/map-style.js.map +1 -0
  224. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json.js +40 -0
  225. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-dark-theme.json.js.map +1 -0
  226. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json.js +40 -0
  227. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-light-theme.json.js.map +1 -0
  228. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json.js +4987 -0
  229. package/components/leaflet-map/renderer/mapboxgl/mapboxgl-settings.json.js.map +1 -0
  230. package/components/leaflet-map/renderer/mapboxgl-layer.d.ts +7 -0
  231. package/components/leaflet-map/renderer/mapboxgl-layer.js +27 -0
  232. package/components/leaflet-map/renderer/mapboxgl-layer.js.map +1 -0
  233. package/components/leaflet-map/renderer/mapboxgl-utils.d.ts +5 -0
  234. package/components/leaflet-map/renderer/mapboxgl-utils.js +39 -0
  235. package/components/leaflet-map/renderer/mapboxgl-utils.js.map +1 -0
  236. package/components/leaflet-map/renderer/maplibre-gl.css.js +4 -0
  237. package/components/leaflet-map/renderer/maplibre-gl.css.js.map +1 -0
  238. package/components/leaflet-map/style.d.ts +19 -0
  239. package/components/leaflet-map/style.js +192 -0
  240. package/components/leaflet-map/style.js.map +1 -0
  241. package/components/leaflet-map/types.d.ts +70 -0
  242. package/components/leaflet-map/types.js +10 -0
  243. package/components/leaflet-map/types.js.map +1 -0
  244. package/components/line/config.d.ts +30 -0
  245. package/components/line/config.js +17 -0
  246. package/components/line/config.js.map +1 -0
  247. package/components/line/index.d.ts +27 -0
  248. package/components/line/index.js +139 -0
  249. package/components/line/index.js.map +1 -0
  250. package/components/line/style.d.ts +6 -0
  251. package/components/line/style.js +35 -0
  252. package/components/line/style.js.map +1 -0
  253. package/components/line/types.d.ts +12 -0
  254. package/components/radial-dendrogram/config.d.ts +34 -0
  255. package/components/radial-dendrogram/config.js +20 -0
  256. package/components/radial-dendrogram/config.js.map +1 -0
  257. package/components/radial-dendrogram/index.d.ts +22 -0
  258. package/components/radial-dendrogram/index.js +98 -0
  259. package/components/radial-dendrogram/index.js.map +1 -0
  260. package/components/radial-dendrogram/modules/label.d.ts +8 -0
  261. package/components/radial-dendrogram/modules/label.js +70 -0
  262. package/components/radial-dendrogram/modules/label.js.map +1 -0
  263. package/components/radial-dendrogram/modules/link.d.ts +19 -0
  264. package/components/radial-dendrogram/modules/link.js +59 -0
  265. package/components/radial-dendrogram/modules/link.js.map +1 -0
  266. package/components/radial-dendrogram/modules/node.d.ts +16 -0
  267. package/components/radial-dendrogram/modules/node.js +51 -0
  268. package/components/radial-dendrogram/modules/node.js.map +1 -0
  269. package/components/radial-dendrogram/style.d.ts +6 -0
  270. package/components/radial-dendrogram/style.js +54 -0
  271. package/components/radial-dendrogram/style.js.map +1 -0
  272. package/components/radial-dendrogram/types.d.ts +34 -0
  273. package/components/sankey/config.d.ts +162 -0
  274. package/components/sankey/config.js +65 -0
  275. package/components/sankey/config.js.map +1 -0
  276. package/components/sankey/index.d.ts +59 -0
  277. package/components/sankey/index.js +299 -0
  278. package/components/sankey/index.js.map +1 -0
  279. package/components/sankey/modules/label.d.ts +23 -0
  280. package/components/sankey/modules/label.js +164 -0
  281. package/components/sankey/modules/label.js.map +1 -0
  282. package/components/sankey/modules/link.d.ts +13 -0
  283. package/components/sankey/modules/link.js +108 -0
  284. package/components/sankey/modules/link.js.map +1 -0
  285. package/components/sankey/modules/node.d.ts +10 -0
  286. package/components/sankey/modules/node.js +156 -0
  287. package/components/sankey/modules/node.js.map +1 -0
  288. package/components/sankey/style.d.ts +20 -0
  289. package/components/sankey/style.js +164 -0
  290. package/components/sankey/style.js.map +1 -0
  291. package/components/sankey/types.d.ts +84 -0
  292. package/components/sankey/types.js +34 -0
  293. package/components/sankey/types.js.map +1 -0
  294. package/components/scatter/config.d.ts +44 -0
  295. package/components/scatter/config.js +23 -0
  296. package/components/scatter/config.js.map +1 -0
  297. package/components/scatter/index.d.ts +19 -0
  298. package/components/scatter/index.js +123 -0
  299. package/components/scatter/index.js.map +1 -0
  300. package/components/scatter/modules/point.d.ts +7 -0
  301. package/components/scatter/modules/point.js +98 -0
  302. package/components/scatter/modules/point.js.map +1 -0
  303. package/components/scatter/style.d.ts +5 -0
  304. package/components/scatter/style.js +53 -0
  305. package/components/scatter/style.js.map +1 -0
  306. package/components/scatter/types.d.ts +13 -0
  307. package/components/stacked-bar/config.d.ts +38 -0
  308. package/components/stacked-bar/config.js +20 -0
  309. package/components/stacked-bar/config.js.map +1 -0
  310. package/components/stacked-bar/index.d.ts +27 -0
  311. package/components/stacked-bar/index.js +193 -0
  312. package/components/stacked-bar/index.js.map +1 -0
  313. package/components/stacked-bar/style.d.ts +5 -0
  314. package/components/stacked-bar/style.js +36 -0
  315. package/components/stacked-bar/style.js.map +1 -0
  316. package/components/stacked-bar/types.d.ts +5 -0
  317. package/components/timeline/config.d.ts +43 -0
  318. package/components/timeline/config.js +23 -0
  319. package/components/timeline/config.js.map +1 -0
  320. package/components/timeline/index.d.ts +43 -0
  321. package/components/timeline/index.js +235 -0
  322. package/components/timeline/index.js.map +1 -0
  323. package/components/timeline/style.d.ts +12 -0
  324. package/components/timeline/style.js +86 -0
  325. package/components/timeline/style.js.map +1 -0
  326. package/components/tooltip/config.d.ts +46 -0
  327. package/components/tooltip/config.js +19 -0
  328. package/components/tooltip/config.js.map +1 -0
  329. package/components/tooltip/index.d.ts +34 -0
  330. package/components/tooltip/index.js +147 -0
  331. package/components/tooltip/index.js.map +1 -0
  332. package/components/tooltip/style.js +72 -0
  333. package/components/tooltip/style.js.map +1 -0
  334. package/components/topojson-map/config.d.ts +99 -0
  335. package/components/topojson-map/config.js +42 -0
  336. package/components/topojson-map/config.js.map +1 -0
  337. package/components/topojson-map/index.d.ts +52 -0
  338. package/components/topojson-map/index.js +355 -0
  339. package/components/topojson-map/index.js.map +1 -0
  340. package/components/topojson-map/style.d.ts +11 -0
  341. package/components/topojson-map/style.js +97 -0
  342. package/components/topojson-map/style.js.map +1 -0
  343. package/components/topojson-map/types.d.ts +48 -0
  344. package/components/topojson-map/types.js +45 -0
  345. package/components/topojson-map/types.js.map +1 -0
  346. package/components/topojson-map/utils.d.ts +3 -0
  347. package/components/topojson-map/utils.js +30 -0
  348. package/components/topojson-map/utils.js.map +1 -0
  349. package/components/vis-controls/config.d.ts +12 -0
  350. package/components/vis-controls/config.js +13 -0
  351. package/components/vis-controls/config.js.map +1 -0
  352. package/components/vis-controls/index.d.ts +14 -0
  353. package/components/vis-controls/index.js +52 -0
  354. package/components/vis-controls/index.js.map +1 -0
  355. package/components/vis-controls/style.d.ts +11 -0
  356. package/components/vis-controls/style.js +75 -0
  357. package/components/vis-controls/style.js.map +1 -0
  358. package/components/vis-controls/types.d.ts +13 -0
  359. package/components/vis-controls/types.js +8 -0
  360. package/components/vis-controls/types.js.map +1 -0
  361. package/components/xy-labels/config.d.ts +48 -0
  362. package/components/xy-labels/config.js +25 -0
  363. package/components/xy-labels/config.js.map +1 -0
  364. package/components/xy-labels/index.d.ts +15 -0
  365. package/components/xy-labels/index.js +86 -0
  366. package/components/xy-labels/index.js.map +1 -0
  367. package/components/xy-labels/modules/label.d.ts +9 -0
  368. package/components/xy-labels/modules/label.js +105 -0
  369. package/components/xy-labels/modules/label.js.map +1 -0
  370. package/components/xy-labels/style.d.ts +5 -0
  371. package/components/xy-labels/style.js +53 -0
  372. package/components/xy-labels/style.js.map +1 -0
  373. package/components/xy-labels/types.d.ts +23 -0
  374. package/components/xy-labels/types.js +9 -0
  375. package/components/xy-labels/types.js.map +1 -0
  376. package/components.d.ts +52 -0
  377. package/containers/single-container/config.d.ts +12 -0
  378. package/containers/single-container/config.js +12 -0
  379. package/containers/single-container/config.js.map +1 -0
  380. package/containers/single-container/index.d.ts +17 -0
  381. package/containers/single-container/index.js +115 -0
  382. package/containers/single-container/index.js.map +1 -0
  383. package/containers/xy-container/config.d.ts +99 -0
  384. package/containers/xy-container/config.js +30 -0
  385. package/containers/xy-container/config.js.map +1 -0
  386. package/containers/xy-container/index.d.ts +33 -0
  387. package/containers/xy-container/index.js +322 -0
  388. package/containers/xy-container/index.js.map +1 -0
  389. package/containers.d.ts +6 -0
  390. package/core/component/config.d.ts +58 -0
  391. package/core/component/config.js +14 -0
  392. package/core/component/config.js.map +1 -0
  393. package/core/component/index.d.ts +38 -0
  394. package/core/component/index.js +112 -0
  395. package/core/component/index.js.map +1 -0
  396. package/core/component/types.d.ts +2 -0
  397. package/core/config/index.d.ts +3 -0
  398. package/core/config/index.js +16 -0
  399. package/core/config/index.js.map +1 -0
  400. package/core/container/config.d.ts +38 -0
  401. package/core/container/config.js +29 -0
  402. package/core/container/config.js.map +1 -0
  403. package/core/container/index.d.ts +25 -0
  404. package/core/container/index.js +92 -0
  405. package/core/container/index.js.map +1 -0
  406. package/core/xy-component/config.d.ts +38 -0
  407. package/core/xy-component/config.js +20 -0
  408. package/core/xy-component/config.js.map +1 -0
  409. package/core/xy-component/index.d.ts +25 -0
  410. package/core/xy-component/index.js +65 -0
  411. package/core/xy-component/index.js.map +1 -0
  412. package/data-models/core.d.ts +6 -0
  413. package/data-models/core.js +14 -0
  414. package/data-models/core.js.map +1 -0
  415. package/data-models/graph.d.ts +24 -0
  416. package/data-models/graph.js +101 -0
  417. package/data-models/graph.js.map +1 -0
  418. package/data-models/map-graph.d.ts +23 -0
  419. package/data-models/map-graph.js +59 -0
  420. package/data-models/map-graph.js.map +1 -0
  421. package/data-models/map.d.ts +5 -0
  422. package/data-models/map.js +12 -0
  423. package/data-models/map.js.map +1 -0
  424. package/data-models/series.d.ts +6 -0
  425. package/data-models/series.js +19 -0
  426. package/data-models/series.js.map +1 -0
  427. package/index.d.ts +4 -0
  428. package/index.js +49 -0
  429. package/index.js.map +1 -0
  430. package/maps/china-provinces.json.js +140373 -0
  431. package/maps/fr-regions.json.js +14162 -0
  432. package/maps/germany-regions.json.js +35760 -0
  433. package/maps/ind-regions.json.js +290584 -0
  434. package/maps/uk-regions.json.js +96233 -0
  435. package/maps/us-counties.json.js +206318 -0
  436. package/maps/us-states.json.js +16345 -0
  437. package/maps/world-110m-alpha.json.js +251366 -0
  438. package/maps/world-simple.json.js +89428 -0
  439. package/maps/world-simplest.json.js +28175 -0
  440. package/maps.d.ts +60 -0
  441. package/maps.js +23 -0
  442. package/package.json +58 -0
  443. package/styles/colors.d.ts +4 -0
  444. package/styles/colors.js +11 -0
  445. package/styles/colors.js.map +1 -0
  446. package/styles/css-variables.d.ts +2 -0
  447. package/styles/css-variables.js +16 -0
  448. package/styles/css-variables.js.map +1 -0
  449. package/types/accessor.d.ts +5 -0
  450. package/types/component.d.ts +13 -0
  451. package/types/component.js +14 -0
  452. package/types/component.js.map +1 -0
  453. package/types/curve.d.ts +40 -0
  454. package/types/curve.js +46 -0
  455. package/types/curve.js.map +1 -0
  456. package/types/data.d.ts +7 -0
  457. package/types/direction.d.ts +6 -0
  458. package/types/direction.js +10 -0
  459. package/types/direction.js.map +1 -0
  460. package/types/graph.d.ts +35 -0
  461. package/types/map.d.ts +4 -0
  462. package/types/misc.d.ts +8 -0
  463. package/types/position.d.ts +20 -0
  464. package/types/position.js +27 -0
  465. package/types/position.js.map +1 -0
  466. package/types/scale.d.ts +23 -0
  467. package/types/scale.js +27 -0
  468. package/types/scale.js.map +1 -0
  469. package/types/shape.d.ts +7 -0
  470. package/types/shape.js +11 -0
  471. package/types/shape.js.map +1 -0
  472. package/types/spacing.d.ts +6 -0
  473. package/types/symbol.d.ts +18 -0
  474. package/types/symbol.js +24 -0
  475. package/types/symbol.js.map +1 -0
  476. package/types/text.d.ts +38 -0
  477. package/types/text.js +31 -0
  478. package/types/text.js.map +1 -0
  479. package/types.d.ts +28 -0
  480. package/utils/color.d.ts +9 -0
  481. package/utils/color.js +26 -0
  482. package/utils/color.js.map +1 -0
  483. package/utils/d3.d.ts +3 -0
  484. package/utils/d3.js +16 -0
  485. package/utils/d3.js.map +1 -0
  486. package/utils/data.d.ts +123 -0
  487. package/utils/data.js +193 -0
  488. package/utils/data.js.map +1 -0
  489. package/utils/html.d.ts +1 -0
  490. package/utils/html.js +15 -0
  491. package/utils/html.js.map +1 -0
  492. package/utils/map.d.ts +2 -0
  493. package/utils/map.js +20 -0
  494. package/utils/map.js.map +1 -0
  495. package/utils/misc.d.ts +16 -0
  496. package/utils/misc.js +42 -0
  497. package/utils/misc.js.map +1 -0
  498. package/utils/path.d.ts +21 -0
  499. package/utils/path.js +144 -0
  500. package/utils/path.js.map +1 -0
  501. package/utils/scale.d.ts +1 -0
  502. package/utils/text.d.ts +17 -0
  503. package/utils/text.js +196 -0
  504. package/utils/text.js.map +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sources":["../../../../src/components/leaflet-map/modules/node.ts"],"sourcesContent":["import { select, Selection } from 'd3-selection'\nimport { color } from 'd3-color'\nimport type L from 'leaflet'\n\n// Types\nimport { Rect } from 'types/misc'\n\n// Utils\nimport { smartTransition } from 'utils/d3'\nimport { estimateTextSize, trimTextMiddle } from 'utils/text'\nimport { clamp, getString } from 'utils/data'\nimport { rectIntersect } from 'utils/misc'\nimport { hexToBrightness } from 'utils/color'\nimport { getPointPos } from './utils'\n\n// Local Types\nimport { LeafletMapPointDatum, LeafletMapClusterDatum, LeafletMapPoint, LeafletMapPointShape } from '../types'\n\n// Modules\nimport { updateDonut } from './donut'\n\n// Config\nimport { LeafletMapConfigInterface } from '../config'\n\nimport * as s from '../style'\n\nconst BOTTOM_LABEL_TOP_MARGIN = 10\nconst BOTTOM_LABEL_FONT_SIZE = 10\n\nexport function createNodes<D> (selection: Selection<SVGGElement, LeafletMapPoint<D>, SVGGElement, Record<string, unknown>[]>): void {\n selection.append('path')\n .attr('class', s.pointPath)\n .attr('id', d => `point-${d.id}`)\n .style('opacity', 0)\n\n selection.append('g')\n .attr('class', s.donutCluster)\n\n selection.append('text')\n .attr('class', s.innerLabel)\n .attr('id', d => `label-${d.id}`)\n .attr('dy', '0.32em')\n\n selection.append('text')\n .attr('class', s.bottomLabel)\n .attr('dy', '0.32em')\n .attr('opacity', 1)\n}\n\nexport function updateNodes<D> (\n selection: Selection<SVGGElement, LeafletMapPoint<D>, SVGGElement, Record<string, unknown>[]>,\n config: LeafletMapConfigInterface<D>,\n leafletMap: L.Map,\n mapMoveZoomUpdateOnly: boolean\n): void {\n selection.each((d: LeafletMapPoint<D>, i: number, elements: SVGGElement[]) => {\n const group = select(elements[i])\n const node: Selection<SVGPathElement, any, SVGGElement, any> = group.select(`.${s.pointPath}`)\n const innerLabel: Selection<SVGTextElement, any, SVGElement, any> = group.select(`.${s.innerLabel}`)\n const bottomLabel: Selection<SVGTextElement, any, SVGElement, any> = group.select(`.${s.bottomLabel}`)\n\n const { x, y } = getPointPos(d, leafletMap)\n const donutData = d.donutData\n const isCluster = (d.properties as LeafletMapClusterDatum<D>).cluster\n const fromExpandedCluster = !!(d.properties as LeafletMapPointDatum<D>).expandedClusterPoint\n\n const innerLabelText = getString(d.properties, isCluster ? config.clusterLabel : config.pointLabel) ?? ''\n const bottomLabelText = getString(d.properties, isCluster ? config.clusterBottomLabel : config.pointBottomLabel) ?? ''\n const pointCursor = getString(d.properties, config.pointCursor)\n const pointShape = getString(d.properties as LeafletMapPointDatum<D>, config.pointShape)\n const isRing = pointShape === LeafletMapPointShape.Ring\n const isCircular = (pointShape === LeafletMapPointShape.Circle) || isRing || isCluster || !pointShape\n\n // To get updated on every render call\n const ringWidth = (isCluster && config.clusterRingWidth) || (isRing && config.pointRingWidth) || 0\n group.attr('transform', `translate(${x},${y})`)\n group.select(`.${s.donutCluster}`)\n .call(updateDonut, donutData, isCircular ? d.radius : 0, ringWidth)\n\n node.attr('d', d.path)\n node.style('cursor', isCluster ? 'pointer' : pointCursor)\n bottomLabel.attr('transform', `translate(0,${d.radius + BOTTOM_LABEL_TOP_MARGIN})`)\n innerLabel.attr('font-size', () => {\n const fontSize = d.radius / Math.pow(innerLabelText.length, 0.4)\n return clamp(fontSize, fontSize, 16)\n })\n\n if (mapMoveZoomUpdateOnly) return\n\n // Updates required only when data changes\n node\n .classed(s.pointPathCluster, isCluster)\n .classed(s.pointPathRing, isRing)\n .style('fill', d.color)\n .style('stroke', d.color) // being used for hover\n .style('stroke-width', ringWidth)\n .style('opacity', 1)\n\n innerLabel\n .text(innerLabelText || null)\n .attr('visibility', innerLabelText ? null : 'hidden')\n .style('fill', () => {\n const c = getComputedStyle(node.node()).fill\n const hex = color(c)?.hex()\n if (!hex) return null\n\n const brightness = hexToBrightness(hex)\n return brightness > 0.5 ? 'var(--vis-map-point-label-text-color-dark)' : 'var(--vis-map-point-label-text-color-light)'\n })\n\n const bottomLabelTextTrimmed = trimTextMiddle(bottomLabelText, 15)\n bottomLabel\n .text(bottomLabelTextTrimmed)\n .attr('font-size', BOTTOM_LABEL_FONT_SIZE)\n .attr('visibility', fromExpandedCluster ? 'hidden' : null)\n })\n}\n\nexport function collideLabels<D> (\n selection: Selection<SVGGElement, LeafletMapPoint<D>, SVGGElement, Record<string, unknown>[]>,\n leafletMap: L.Map\n): void {\n selection.each((datum1: LeafletMapPoint<D>, i, elements) => {\n const group1HTMLNode = elements[i]\n const group1 = select(group1HTMLNode)\n const label1: Selection<SVGTextElement, any, SVGElement, any> = group1.select(`.${s.bottomLabel}`)\n // eslint-disable-next-line dot-notation\n group1HTMLNode['labelVisible'] = true\n\n // Calculate bounding rect of point's bottom label\n const p1Pos = getPointPos(datum1, leafletMap)\n const label1Size = estimateTextSize(label1, BOTTOM_LABEL_FONT_SIZE, 0.32, true, 0.6)\n const label1BoundingRect: Rect = {\n x: p1Pos.x - label1Size.width / 2,\n y: p1Pos.y - label1Size.height / 2 + datum1.radius + BOTTOM_LABEL_TOP_MARGIN,\n width: label1Size.width,\n height: label1Size.height,\n }\n\n for (let j = 0; j < elements.length; j += 1) {\n if (i === j) continue\n const group2HTMLNode = elements[j]\n const group2 = select(group2HTMLNode)\n const label2: Selection<SVGTextElement, any, SVGElement, any> = group2.select(`.${s.bottomLabel}`)\n const datum2 = group2.datum() as LeafletMapPoint<D>\n\n // Calculate bounding rect of the second point's circle\n const p2Pos = getPointPos(datum2, leafletMap)\n const point2BoundingRect = {\n x: p2Pos.x - datum2.radius,\n y: p2Pos.y - datum2.radius,\n width: 2 * datum2.radius,\n height: 2 * datum2.radius,\n }\n\n let intersect = rectIntersect(label1BoundingRect, point2BoundingRect)\n\n // If there's not intersection, check a collision with the second point's label\n // eslint-disable-next-line dot-notation\n const label2Visible = group2HTMLNode['labelVisible']\n if (!intersect && label2Visible) {\n const label2Size = estimateTextSize(label2, BOTTOM_LABEL_FONT_SIZE, 0.32, true, 0.6)\n intersect = rectIntersect(label1BoundingRect, {\n x: p2Pos.x - label2Size.width / 2,\n y: p2Pos.y + datum2.radius + BOTTOM_LABEL_TOP_MARGIN - label2Size.height / 2,\n width: label2Size.width,\n height: label2Size.height,\n })\n }\n\n if (intersect) {\n // eslint-disable-next-line dot-notation\n group1HTMLNode['labelVisible'] = false\n break\n }\n }\n\n // eslint-disable-next-line dot-notation\n smartTransition(label1, 0).attr('opacity', group1HTMLNode['labelVisible'] ? 1 : 0)\n })\n}\n\nexport function removeNodes<D> (selection: Selection<SVGGElement, LeafletMapPoint<D>, SVGGElement, Record<string, unknown>[]>): void {\n selection.remove()\n}\n"],"names":["s.pointPath","s.donutCluster","s.innerLabel","s.bottomLabel","innerLabel","bottomLabel","s.pointPathCluster","s.pointPathRing"],"mappings":";;;;;;;;;;;;AA0BA,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAClC,MAAM,sBAAsB,GAAG,EAAE,CAAA;AAE3B,SAAU,WAAW,CAAK,SAA6F,EAAA;AAC3H,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;AACrB,SAAA,IAAI,CAAC,OAAO,EAAEA,SAAW,CAAC;AAC1B,SAAA,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAA,MAAA,EAAS,CAAC,CAAC,EAAE,CAAA,CAAE,CAAC;AAChC,SAAA,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;AAEtB,IAAA,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC;AAClB,SAAA,IAAI,CAAC,OAAO,EAAEC,YAAc,CAAC,CAAA;AAEhC,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;AACrB,SAAA,IAAI,CAAC,OAAO,EAAEC,UAAY,CAAC;AAC3B,SAAA,IAAI,CAAC,IAAI,EAAE,CAAC,IAAI,CAAA,MAAA,EAAS,CAAC,CAAC,EAAE,CAAA,CAAE,CAAC;AAChC,SAAA,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAEvB,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;AACrB,SAAA,IAAI,CAAC,OAAO,EAAEC,WAAa,CAAC;AAC5B,SAAA,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;AACpB,SAAA,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;AACvB,CAAC;AAEK,SAAU,WAAW,CACzB,SAA6F,EAC7F,MAAoC,EACpC,UAAiB,EACjB,qBA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,KAAK;oBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,iBAAA,CAAC,CAAA;AACH,aAAA;AAED,YAAA,IAAI,SAAS,EAAE;;AAEb,gBAAA,cAAc,CAAC,cAAc,CAAC,GAAG,KAAK,CAAA;gBACtC,MAAK;AACN,aAAA;AACF,SAAA;;QAGD,eAAe,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA;AACpF,KAAC,CAAC,CAAA;AACJ,CAAC;AAEK,SAAU,WAAW,CAAK,SAA6F,EAAA;IAC3H,SAAS,CAAC,MAAM,EAAE,CAAA;AACpB;;;;"}
@@ -0,0 +1,6 @@
1
+ import type L from 'leaflet';
2
+ import { Selection } from 'd3-selection';
3
+ import { LeafletMapPoint } from '../types';
4
+ import { LeafletMapConfigInterface } from '../config';
5
+ export declare function createNodeSelectionRing(selection: Selection<SVGGElement, Record<string, unknown>[], SVGElement, Record<string, unknown>[]>): void;
6
+ export declare function updateNodeSelectionRing<D>(selection: Selection<SVGGElement, Record<string, unknown>[], SVGElement, Record<string, unknown>[]>, selectedPoint: LeafletMapPoint<D>, pointData: LeafletMapPoint<D>[], config: LeafletMapConfigInterface<D>, leafletMap: L.Map): void;
@@ -0,0 +1,41 @@
1
+ import { getString } from '../../../utils/data.js';
2
+ import { getPointPos } from './utils.js';
3
+ import { pointSelection, pointSelectionRing } from '../style.js';
4
+
5
+ // Utils
6
+ function createNodeSelectionRing(selection) {
7
+ selection.datum({ _zIndex: 3 });
8
+ selection.append('path').attr('class', pointSelection);
9
+ }
10
+ function updateNodeSelectionRing(selection, selectedPoint, pointData, config, leafletMap) {
11
+ selection.attr('class', pointSelectionRing);
12
+ const pointSelection$1 = selection.select(`.${pointSelection}`);
13
+ if (selectedPoint) {
14
+ const isCluster = selectedPoint.isCluster;
15
+ const selectedPointId = getString(selectedPoint.properties, config.pointId);
16
+ const foundPoint = pointData.find(d => isCluster
17
+ ? (d.id === selectedPoint.id)
18
+ : (selectedPointId && (getString(d.properties, config.pointId) === selectedPointId)));
19
+ selection
20
+ .attr('transform', d => {
21
+ const { x, y } = getPointPos(foundPoint !== null && foundPoint !== void 0 ? foundPoint : selectedPoint, leafletMap);
22
+ return `translate(${x},${y})`;
23
+ })
24
+ .classed(`${selectedPoint.properties.shape}`, true);
25
+ pointSelection$1
26
+ .classed('active', Boolean(foundPoint))
27
+ .attr('d', foundPoint ? foundPoint.path : null)
28
+ .style('fill', 'transparent')
29
+ .style('stroke-width', 1)
30
+ .style('stroke', d => {
31
+ const node = foundPoint || selectedPoint;
32
+ return node === null || node === void 0 ? void 0 : node.color;
33
+ });
34
+ }
35
+ else {
36
+ pointSelection$1.classed('active', false);
37
+ }
38
+ }
39
+
40
+ export { createNodeSelectionRing, updateNodeSelectionRing };
41
+ //# sourceMappingURL=selectionRing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"selectionRing.js","sources":["../../../../src/components/leaflet-map/modules/selectionRing.ts"],"sourcesContent":["import type L from 'leaflet'\nimport { Selection } from 'd3-selection'\n\n// Utils\nimport { getString } from 'utils/data'\nimport { getPointPos } from './utils'\n\n// Local Types\nimport { LeafletMapPoint, LeafletMapPointDatum } from '../types'\n\n// Config\nimport { LeafletMapConfigInterface } from '../config'\n\nimport * as s from '../style'\n\n\nexport function createNodeSelectionRing (selection: Selection<SVGGElement, Record<string, unknown>[], SVGElement, Record<string, unknown>[]>): void {\n selection.datum({ _zIndex: 3 })\n selection.append('path').attr('class', s.pointSelection)\n}\n\nexport function updateNodeSelectionRing<D> (\n selection: Selection<SVGGElement, Record<string, unknown>[], SVGElement, Record<string, unknown>[]>,\n selectedPoint: LeafletMapPoint<D>,\n pointData: LeafletMapPoint<D>[],\n config: LeafletMapConfigInterface<D>,\n leafletMap: L.Map\n): void {\n selection.attr('class', s.pointSelectionRing)\n const pointSelection = selection.select(`.${s.pointSelection}`)\n if (selectedPoint) {\n const isCluster = selectedPoint.isCluster\n const selectedPointId: string | undefined = getString(selectedPoint.properties as LeafletMapPointDatum<D>, config.pointId)\n const foundPoint = pointData.find(d =>\n isCluster\n ? (d.id === selectedPoint.id)\n : (selectedPointId && (getString(d.properties as LeafletMapPointDatum<D>, config.pointId) === selectedPointId))\n )\n selection\n .attr('transform', d => {\n const { x, y } = getPointPos<D>(foundPoint ?? selectedPoint, leafletMap)\n return `translate(${x},${y})`\n })\n .classed(`${(selectedPoint.properties as LeafletMapPointDatum<D>).shape}`, true)\n\n pointSelection\n .classed('active', Boolean(foundPoint))\n .attr('d', foundPoint ? foundPoint.path : null)\n .style('fill', 'transparent')\n .style('stroke-width', 1)\n .style('stroke', d => {\n const node = foundPoint || selectedPoint\n return node?.color\n })\n } else {\n pointSelection.classed('active', false)\n }\n}\n"],"names":["s.pointSelection","s.pointSelectionRing","pointSelection"],"mappings":";;;;AAGA;AAaM,SAAU,uBAAuB,CAAE,SAAmG,EAAA;IAC1I,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;AAC/B,IAAA,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,EAAEA,cAAgB,CAAC,CAAA;AAC1D,CAAC;AAEK,SAAU,uBAAuB,CACrC,SAAmG,EACnG,aAAiC,EACjC,SAA+B,EAC/B,MAAoC,EACpC,UAAiB,EAAA;IAEjB,SAAS,CAAC,IAAI,CAAC,OAAO,EAAEC,kBAAoB,CAAC,CAAA;AAC7C,IAAA,MAAMC,gBAAc,GAAG,SAAS,CAAC,MAAM,CAAC,CAAI,CAAA,EAAAF,cAAgB,CAAE,CAAA,CAAC,CAAA;AAC/D,IAAA,IAAI,aAAa,EAAE;AACjB,QAAA,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CAAA;AACzC,QAAA,MAAM,eAAe,GAAuB,SAAS,CAAC,aAAa,CAAC,UAAqC,EAAE,MAAM,CAAC,O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@@ -0,0 +1,49 @@
1
+ import type L from 'leaflet';
2
+ import Supercluster, { ClusterFeature, PointFeature } from 'supercluster';
3
+ import { NumericAccessor, StringAccessor } from "../../../types/accessor";
4
+ import { LeafletMapPoint, LeafletMapPointShape, LeafletMapPieDatum, LeafletMapPointStyles, PointExpandedClusterProperties, LeafletMapPointDatum, LeafletMapClusterDatum } from '../types';
5
+ import { LeafletMapConfig } from '../config';
6
+ export declare function bBoxMerge(bBoxArray: ({
7
+ x1: number;
8
+ x2: number;
9
+ y1: number;
10
+ y2: number;
11
+ })[]): {
12
+ x: number;
13
+ y: number;
14
+ width: number;
15
+ height: number;
16
+ };
17
+ export declare const getNextZoomLevelOnClusterClick: (level: number) => number;
18
+ export declare function projectPoint(geoJSONPoint: any, leafletMap: L.Map): {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ export declare function getPointRadius<D>(geoPoint: ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<LeafletMapPointDatum<D>> | PointFeature<PointExpandedClusterProperties<D>>, pointRadius: NumericAccessor<D>, zoomLevel: number): number;
23
+ export declare function getPointPos<D>(point: LeafletMapPoint<D> | ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<LeafletMapPointDatum<D>>, leafletMap: L.Map): {
24
+ x: number;
25
+ y: number;
26
+ };
27
+ export declare function getPointDisplayOrder<D>(d: LeafletMapPoint<D>, pointStatus: StringAccessor<LeafletMapPointDatum<D> | LeafletMapClusterDatum<D>>, colorMap: LeafletMapPointStyles<D>): number;
28
+ export declare function toGeoJSONPoint<D>(d: D, pointLatitude: NumericAccessor<D>, pointLongitude: NumericAccessor<D>): PointFeature<D>;
29
+ export declare function calculateClusterIndex<D>(data: D[], config: LeafletMapConfig<D>, maxClusterZoomLevel?: number): Supercluster<D>;
30
+ export declare function getNodePathData({ x, y }: {
31
+ x: number;
32
+ y: number;
33
+ }, radius: number, shape: LeafletMapPointShape): string;
34
+ export declare function getDonutData<D>(d: LeafletMapClusterDatum<D> | LeafletMapPointDatum<D>, colorMap: LeafletMapPointStyles<D>): LeafletMapPieDatum[];
35
+ export declare function geoJsonPointToScreenPoint<D>(geoPoint: ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<LeafletMapPointDatum<D>>, i: number, leafletMap: L.Map, config: LeafletMapConfig<D>): LeafletMapPoint<D>;
36
+ export declare function shouldClusterExpand<D>(cluster: LeafletMapPoint<D>, zoomLevel: number, midLevel?: number, maxLevel?: number, maxClusterZoomLevel?: number): boolean;
37
+ export declare function findPointAndClusterByPointId<D>(points: LeafletMapPoint<D>[], id: string, pointId: StringAccessor<D>): {
38
+ point: PointFeature<D> | undefined;
39
+ cluster: LeafletMapPoint<D> | undefined;
40
+ };
41
+ export declare function getNodeRelativePosition<D>(d: LeafletMapPoint<D>, leafletMap: L.Map): {
42
+ x: number;
43
+ y: number;
44
+ };
45
+ export declare function getClusterRadius<D>(cluster: {
46
+ points: PointFeature<PointExpandedClusterProperties<D>>[];
47
+ cluster: LeafletMapPoint<D>;
48
+ }): number;
49
+ export declare function getClustersAndPoints<D>(clusterIndex: Supercluster<D>, leafletMap: L.Map, customBounds?: [number, number, number, number]): (ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<D>)[];
@@ -0,0 +1,206 @@
1
+ import { max, min } from 'd3-array';
2
+ import Supercluster from 'supercluster';
3
+ import { getString, clamp, getNumber } from '../../../utils/data.js';
4
+ import { getColor } from '../../../utils/color.js';
5
+ import { circlePath, polygon } from '../../../utils/path.js';
6
+ import { getHTMLTransform } from '../../../utils/html.js';
7
+ import { LeafletMapPointShape } from '../types.js';
8
+
9
+ function bBoxMerge(bBoxArray) {
10
+ let box = { x1: 0, x2: 0, y1: 0, y2: 0 };
11
+ bBoxArray.forEach(coords => {
12
+ if (!box) {
13
+ box = Object.assign({}, coords);
14
+ }
15
+ else {
16
+ if (box.x1 > coords.x1)
17
+ box.x1 = coords.x1;
18
+ if (box.y1 > coords.y1)
19
+ box.y1 = coords.y1;
20
+ if (box.x2 < coords.x2)
21
+ box.x2 = coords.x2;
22
+ if (box.y2 < coords.y2)
23
+ box.y2 = coords.y2;
24
+ }
25
+ });
26
+ return {
27
+ x: box.x1,
28
+ y: box.y1,
29
+ width: box.x2 - box.x1,
30
+ height: box.y2 - box.y1,
31
+ };
32
+ }
33
+ const getNextZoomLevelOnClusterClick = (level) => clamp(1 + level * 1.5, level, 12);
34
+ function projectPoint(geoJSONPoint, leafletMap) {
35
+ const lat = geoJSONPoint.geometry.coordinates[1];
36
+ const lon = geoJSONPoint.geometry.coordinates[0];
37
+ const projected = leafletMap.latLngToLayerPoint([lat, lon]);
38
+ return projected;
39
+ }
40
+ function getPointRadius(geoPoint, pointRadius, zoomLevel) {
41
+ const isDynamic = !pointRadius;
42
+ const radius = isDynamic ? 1 + 2 * Math.pow(zoomLevel, 0.80) : getNumber(geoPoint.properties, pointRadius);
43
+ const isCluster = geoPoint.properties.cluster;
44
+ return (isCluster && isDynamic)
45
+ ? clamp(Math.pow(geoPoint.properties.point_count, 0.35) * radius, radius * 1.1, radius * 3)
46
+ : radius;
47
+ }
48
+ function getPointPos(point, leafletMap) {
49
+ const properties = point.properties;
50
+ const isFromCluster = !!(properties).expandedClusterPoint;
51
+ if (isFromCluster) {
52
+ const { x, y } = projectPoint(properties.expandedClusterPoint, leafletMap);
53
+ return {
54
+ x: x + properties.dx,
55
+ y: y + properties.dy,
56
+ };
57
+ }
58
+ else {
59
+ return projectPoint(point, leafletMap);
60
+ }
61
+ }
62
+ function toGeoJSONPoint(d, pointLatitude, pointLongitude) {
63
+ const lat = getNumber(d, pointLatitude);
64
+ const lon = getNumber(d, pointLongitude);
65
+ return {
66
+ type: 'Feature',
67
+ properties: Object.assign({}, d),
68
+ geometry: {
69
+ type: 'Point',
70
+ coordinates: [lon, lat],
71
+ },
72
+ };
73
+ }
74
+ function calculateClusterIndex(data, config, maxClusterZoomLevel = 23) {
75
+ const { colorMap, pointShape, pointLatitude, pointLongitude, clusteringDistance } = config;
76
+ return new Supercluster({
77
+ radius: clusteringDistance,
78
+ maxZoom: maxClusterZoomLevel,
79
+ map: (d) => {
80
+ const shape = getString(d, pointShape);
81
+ const clusterPoint = { shape };
82
+ for (const key of Object.keys(colorMap)) {
83
+ clusterPoint[key] = d[key] || 0;
84
+ }
85
+ return clusterPoint;
86
+ },
87
+ reduce: (acc, clusterPoint) => {
88
+ var _a, _b;
89
+ acc.shape = acc.shape === clusterPoint.shape ? acc.shape : LeafletMapPointShape.Circle;
90
+ acc.value = ((_a = acc.value) !== null && _a !== void 0 ? _a : 0) + ((_b = clusterPoint.value) !== null && _b !== void 0 ? _b : 0);
91
+ for (const key of Object.keys(colorMap)) {
92
+ acc[key] += clusterPoint[key];
93
+ }
94
+ },
95
+ }).load(data.map(d => toGeoJSONPoint(d, pointLatitude, pointLongitude)));
96
+ }
97
+ function getNodePathData({ x, y }, radius, shape) {
98
+ switch (shape) {
99
+ case LeafletMapPointShape.Triangle:
100
+ return polygon(radius * 2, 3);
101
+ case LeafletMapPointShape.Square:
102
+ return polygon(radius * 2, 4);
103
+ case LeafletMapPointShape.Circle:
104
+ case LeafletMapPointShape.Ring:
105
+ default:
106
+ return circlePath(x, y, radius);
107
+ }
108
+ }
109
+ function getDonutData(d, colorMap) {
110
+ return Object.keys(colorMap).map(key => ({
111
+ name: key,
112
+ value: d[key],
113
+ color: colorMap[key].color,
114
+ className: colorMap[key].className,
115
+ }));
116
+ }
117
+ function geoJsonPointToScreenPoint(geoPoint, i, leafletMap, config) {
118
+ var _a;
119
+ const zoomLevel = leafletMap.getZoom();
120
+ const isCluster = geoPoint.properties.cluster;
121
+ const clusterIndex = geoPoint.properties.clusterIndex;
122
+ const clusterPoints = isCluster ? clusterIndex.getLeaves(geoPoint.properties.cluster_id, Infinity).map(d => d.properties) : undefined;
123
+ const { x, y } = getPointPos(geoPoint, leafletMap);
124
+ const id = isCluster ? `cluster-${geoPoint.id}` : ((_a = getString(geoPoint.properties, config.pointId)) !== null && _a !== void 0 ? _a : geoPoint.geometry.coordinates.join(''));
125
+ const pointColor = getColor(geoPoint.properties, isCluster ? config.clusterColor : config.pointColor);
126
+ const radius = getPointRadius(geoPoint, isCluster ? config.clusterRadius : config.pointRadius, zoomLevel);
127
+ const shape = isCluster ? LeafletMapPointShape.Circle : getString(geoPoint.properties, config.pointShape);
128
+ const isRing = shape === LeafletMapPointShape.Ring;
129
+ const donutData = getDonutData(geoPoint.properties, config.colorMap);
130
+ const maxValue = max(donutData, d => d.value);
131
+ const maxValueIndex = donutData.map(d => d.value).indexOf(maxValue);
132
+ const biggestDatum = donutData[maxValueIndex !== null && maxValueIndex !== void 0 ? maxValueIndex : 0];
133
+ const color = isCluster ? pointColor
134
+ : (isRing ? null : (pointColor !== null && pointColor !== void 0 ? pointColor : biggestDatum === null || biggestDatum === void 0 ? void 0 : biggestDatum.color));
135
+ const bbox = { x1: x - radius, y1: y - radius, x2: x + radius, y2: y + radius };
136
+ const path = getNodePathData({ x: 0, y: 0 }, radius, shape);
137
+ const _zIndex = 0;
138
+ const screenPoint = Object.assign(Object.assign({}, geoPoint), { id,
139
+ bbox,
140
+ radius,
141
+ donutData,
142
+ path,
143
+ color,
144
+ isCluster,
145
+ clusterIndex,
146
+ clusterPoints,
147
+ _zIndex });
148
+ return screenPoint;
149
+ }
150
+ function shouldClusterExpand(cluster, zoomLevel, midLevel = 4, maxLevel = 11, maxClusterZoomLevel = 23) {
151
+ if (!cluster)
152
+ return false;
153
+ const clusterExpansionZoomLevel = cluster.clusterIndex.getClusterExpansionZoom(cluster.id);
154
+ return clusterExpansionZoomLevel >= maxClusterZoomLevel ||
155
+ zoomLevel >= maxLevel ||
156
+ (zoomLevel >= midLevel && cluster && cluster.properties.point_count < 20);
157
+ }
158
+ function findPointAndClusterByPointId(points, id, pointId) {
159
+ let point;
160
+ let cluster;
161
+ points.forEach(p => {
162
+ var _a;
163
+ if (p.isCluster) {
164
+ const leaves = (_a = p.clusterIndex.getLeaves(p.properties.cluster_id, Infinity)) !== null && _a !== void 0 ? _a : [];
165
+ const foundPoint = leaves.find(d => getString(d.properties, pointId) === id);
166
+ if (foundPoint) {
167
+ point = foundPoint;
168
+ cluster = p;
169
+ }
170
+ }
171
+ });
172
+ return { point, cluster };
173
+ }
174
+ function getNodeRelativePosition(d, leafletMap) {
175
+ const paneTransform = getHTMLTransform(leafletMap.getPane('mapPane'));
176
+ const { x, y } = getPointPos(d, leafletMap);
177
+ return { x: x + paneTransform[0], y: y + paneTransform[1] };
178
+ }
179
+ function getClusterRadius(cluster) {
180
+ const { points } = cluster;
181
+ const minX = min(points.map(d => d.properties.dx - d.properties.r));
182
+ const maxX = max(points.map(d => d.properties.dx + d.properties.r));
183
+ const minY = min(points.map(d => d.properties.dy - d.properties.r));
184
+ const maxY = max(points.map(d => d.properties.dy + d.properties.r));
185
+ return Math.sqrt(Math.pow((maxX - minX), 2) + Math.pow((maxY - minY), 2)) * 0.5;
186
+ }
187
+ function getClustersAndPoints(clusterIndex, leafletMap, customBounds) {
188
+ const leafletBounds = leafletMap.getBounds();
189
+ const southWest = leafletBounds.getSouthWest();
190
+ const northEast = leafletBounds.getNorthEast();
191
+ const bounds = customBounds || [southWest.lng, southWest.lat, northEast.lng, northEast.lat];
192
+ const zoom = Math.round(leafletMap.getZoom());
193
+ const points = clusterIndex.getClusters(bounds, zoom); // as ClusterFeature<LeafletMapPointDatum<D>>[]
194
+ for (const p of points) {
195
+ const point = p;
196
+ const isCluster = point.properties.cluster;
197
+ if (isCluster) {
198
+ point.properties.clusterIndex = clusterIndex;
199
+ point.properties.clusterPoints = clusterIndex.getLeaves(point.properties.cluster_id, Infinity).map(d => d.properties);
200
+ }
201
+ }
202
+ return points;
203
+ }
204
+
205
+ export { bBoxMerge, calculateClusterIndex, findPointAndClusterByPointId, geoJsonPointToScreenPoint, getClusterRadius, getClustersAndPoints, getDonutData, getNextZoomLevelOnClusterClick, getNodePathData, getNodeRelativePosition, getPointPos, getPointRadius, projectPoint, shouldClusterExpand, toGeoJSONPoint };
206
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sources":["../../../../src/components/leaflet-map/modules/utils.ts"],"sourcesContent":["import type L from 'leaflet'\nimport { min, max } from 'd3-array'\nimport Supercluster, { ClusterFeature, PointFeature } from 'supercluster'\n\n// Utils\nimport { clamp, getString, getNumber } from 'utils/data'\nimport { getColor } from 'utils/color'\nimport { polygon, circlePath } from 'utils/path'\nimport { getHTMLTransform } from 'utils/html'\n\n// Types\nimport { NumericAccessor, StringAccessor } from 'types/accessor'\n\n// Local Types\nimport {\n LeafletMapPoint,\n LeafletMapPointShape,\n LeafletMapPieDatum,\n LeafletMapPointStyles,\n PointExpandedClusterProperties,\n LeafletMapPointDatum,\n LeafletMapClusterDatum,\n} from '../types'\n\n// Config\nimport { LeafletMapConfig } from '../config'\n\nexport function bBoxMerge (\n bBoxArray: ({x1: number; x2: number; y1: number; y2: number})[]):\n { x: number; y: number; width: number; height: number } {\n let box = { x1: 0, x2: 0, y1: 0, y2: 0 }\n bBoxArray.forEach(coords => {\n if (!box) {\n box = { ...coords }\n } else {\n if (box.x1 > coords.x1) box.x1 = coords.x1\n if (box.y1 > coords.y1) box.y1 = coords.y1\n if (box.x2 < coords.x2) box.x2 = coords.x2\n if (box.y2 < coords.y2) box.y2 = coords.y2\n }\n })\n\n return {\n x: box.x1,\n y: box.y1,\n width: box.x2 - box.x1,\n height: box.y2 - box.y1,\n }\n}\n\nexport const getNextZoomLevelOnClusterClick = (level: number): number => clamp(1 + level * 1.5, level, 12)\n\nexport function projectPoint (geoJSONPoint, leafletMap: L.Map): { x: number; y: number } {\n const lat = geoJSONPoint.geometry.coordinates[1]\n const lon = geoJSONPoint.geometry.coordinates[0]\n const projected = leafletMap.latLngToLayerPoint([lat, lon])\n return projected\n}\n\nexport function getPointRadius<D> (\n geoPoint: ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<LeafletMapPointDatum<D>> | PointFeature<PointExpandedClusterProperties<D>>,\n pointRadius: NumericAccessor<D>,\n zoomLevel: number\n): number {\n const isDynamic = !pointRadius\n const radius = isDynamic ? 1 + 2 * Math.pow(zoomLevel, 0.80) : getNumber((geoPoint.properties as LeafletMapPointDatum<D>), pointRadius)\n\n const isCluster = (geoPoint as ClusterFeature<D>).properties.cluster\n return (isCluster && isDynamic)\n ? clamp(Math.pow((geoPoint as ClusterFeature<D>).properties.point_count, 0.35) * radius, radius * 1.1, radius * 3)\n : radius\n}\n\nexport function getPointPos<D> (point: LeafletMapPoint<D> | ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<LeafletMapPointDatum<D>>, leafletMap: L.Map): { x: number; y: number } {\n const properties = point.properties as LeafletMapPointDatum<D>\n const isFromCluster = !!(properties).expandedClusterPoint\n\n if (isFromCluster) {\n const { x, y } = projectPoint(properties.expandedClusterPoint, leafletMap)\n return {\n x: x + properties.dx,\n y: y + properties.dy,\n }\n } else {\n return projectPoint(point, leafletMap)\n }\n}\n\nexport function getPointDisplayOrder<D> (\n d: LeafletMapPoint<D>,\n pointStatus: StringAccessor<LeafletMapPointDatum<D> | LeafletMapClusterDatum<D>>,\n colorMap: LeafletMapPointStyles<D>\n): number {\n const status = getString(d.properties, pointStatus)\n const statusList = Object.keys(colorMap)\n return Object.keys(statusList).indexOf(status)\n}\n\nexport function toGeoJSONPoint<D> (d: D, pointLatitude: NumericAccessor<D>, pointLongitude: NumericAccessor<D>): PointFeature<D> {\n const lat = getNumber(d, pointLatitude) as number\n const lon = getNumber(d, pointLongitude) as number\n\n return {\n type: 'Feature',\n properties: {\n ...d,\n },\n geometry: {\n type: 'Point',\n coordinates: [lon, lat],\n },\n }\n}\n\nexport function calculateClusterIndex<D> (data: D[], config: LeafletMapConfig<D>, maxClusterZoomLevel = 23): Supercluster<D> {\n const { colorMap, pointShape, pointLatitude, pointLongitude, clusteringDistance } = config\n return new Supercluster<D, Supercluster.AnyProps>({\n radius: clusteringDistance,\n maxZoom: maxClusterZoomLevel,\n map: (d): Supercluster.AnyProps => {\n const shape = getString(d, pointShape)\n\n const clusterPoint = { shape }\n for (const key of Object.keys(colorMap)) {\n clusterPoint[key] = d[key] || 0\n }\n\n return clusterPoint\n },\n reduce: (acc, clusterPoint): void => {\n acc.shape = acc.shape === clusterPoint.shape ? acc.shape : LeafletMapPointShape.Circle\n acc.value = (acc.value ?? 0) + (clusterPoint.value ?? 0)\n\n for (const key of Object.keys(colorMap)) {\n acc[key] += clusterPoint[key]\n }\n },\n }).load(data.map(d => toGeoJSONPoint(d, pointLatitude, pointLongitude)))\n}\n\nexport function getNodePathData ({ x, y }: { x: number; y: number }, radius: number, shape: LeafletMapPointShape): string {\n switch (shape) {\n case LeafletMapPointShape.Triangle:\n return polygon(radius * 2, 3)\n case LeafletMapPointShape.Square:\n return polygon(radius * 2, 4)\n case LeafletMapPointShape.Circle:\n case LeafletMapPointShape.Ring:\n default:\n return circlePath(x, y, radius)\n }\n}\n\nexport function getDonutData<D> (\n d: LeafletMapClusterDatum<D> | LeafletMapPointDatum<D>,\n colorMap: LeafletMapPointStyles<D>\n): LeafletMapPieDatum[] {\n return Object.keys(colorMap).map(key => ({\n name: key,\n value: d[key],\n color: colorMap[key].color,\n className: colorMap[key].className,\n }))\n}\n\nexport function geoJsonPointToScreenPoint<D> (\n geoPoint: ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<LeafletMapPointDatum<D>>,\n i: number,\n leafletMap: L.Map,\n config: LeafletMapConfig<D>\n): LeafletMapPoint<D> {\n const zoomLevel = leafletMap.getZoom()\n const isCluster = (geoPoint.properties as LeafletMapClusterDatum<D>).cluster\n const clusterIndex = (geoPoint.properties as LeafletMapClusterDatum<D>).clusterIndex\n const clusterPoints = isCluster ? clusterIndex.getLeaves((geoPoint.properties as LeafletMapClusterDatum<D>).cluster_id as number, Infinity).map(d => d.properties) : undefined\n const { x, y } = getPointPos(geoPoint, leafletMap)\n\n const id = isCluster ? `cluster-${geoPoint.id}` : (getString(geoPoint.properties as LeafletMapPointDatum<D>, config.pointId) ?? geoPoint.geometry.coordinates.join(''))\n const pointColor = getColor(geoPoint.properties, isCluster ? config.clusterColor : config.pointColor)\n const radius = getPointRadius(geoPoint, isCluster ? config.clusterRadius : config.pointRadius, zoomLevel)\n const shape = isCluster ? LeafletMapPointShape.Circle : getString(geoPoint.properties as LeafletMapPointDatum<D>, config.pointShape) as LeafletMapPointShape\n const isRing = shape === LeafletMapPointShape.Ring\n\n const donutData = getDonutData(geoPoint.properties, config.colorMap)\n const maxValue = max(donutData, d => d.value)\n const maxValueIndex = donutData.map(d => d.value).indexOf(maxValue)\n const biggestDatum = donutData[maxValueIndex ?? 0]\n\n const color = isCluster ? pointColor\n : (isRing ? null : (pointColor ?? biggestDatum?.color))\n const bbox = { x1: x - radius, y1: y - radius, x2: x + radius, y2: y + radius }\n const path = getNodePathData({ x: 0, y: 0 }, radius, shape)\n const _zIndex = 0\n\n const screenPoint: LeafletMapPoint<D> = {\n ...geoPoint,\n id,\n bbox,\n radius,\n donutData,\n path,\n color,\n isCluster,\n clusterIndex,\n clusterPoints,\n _zIndex,\n }\n\n return screenPoint\n}\n\nexport function shouldClusterExpand<D> (\n cluster: LeafletMapPoint<D>,\n zoomLevel: number,\n midLevel = 4,\n maxLevel = 11,\n maxClusterZoomLevel = 23\n): boolean {\n if (!cluster) return false\n\n const clusterExpansionZoomLevel: number = cluster.clusterIndex.getClusterExpansionZoom(cluster.id as number)\n return clusterExpansionZoomLevel >= maxClusterZoomLevel ||\n zoomLevel >= maxLevel ||\n (zoomLevel >= midLevel && cluster && (cluster.properties as LeafletMapClusterDatum<D>).point_count < 20)\n}\n\nexport function findPointAndClusterByPointId<D> (\n points: LeafletMapPoint<D>[],\n id: string,\n pointId: StringAccessor<D>\n): {\n point: PointFeature<D> | undefined;\n cluster: LeafletMapPoint<D> | undefined;\n } {\n let point\n let cluster\n points.forEach(p => {\n if (p.isCluster) {\n const leaves = p.clusterIndex.getLeaves((p.properties as LeafletMapClusterDatum<D>).cluster_id as number, Infinity) ?? []\n const foundPoint = leaves.find(d => getString(d.properties, pointId) === id)\n if (foundPoint) {\n point = foundPoint\n cluster = p\n }\n }\n })\n return { point, cluster }\n}\n\nexport function getNodeRelativePosition<D> (d: LeafletMapPoint<D>, leafletMap: L.Map): { x: number; y: number } {\n const paneTransform = getHTMLTransform(leafletMap.getPane('mapPane'))\n const { x, y } = getPointPos(d, leafletMap)\n return { x: x + paneTransform[0], y: y + paneTransform[1] }\n}\n\nexport function getClusterRadius<D> (cluster: { points: PointFeature<PointExpandedClusterProperties<D>>[]; cluster: LeafletMapPoint<D> }): number {\n const { points } = cluster\n const minX = min<number>(points.map(d => d.properties.dx - d.properties.r))\n const maxX = max<number>(points.map(d => d.properties.dx + d.properties.r))\n const minY = min<number>(points.map(d => d.properties.dy - d.properties.r))\n const maxY = max<number>(points.map(d => d.properties.dy + d.properties.r))\n return Math.sqrt((maxX - minX) ** 2 + (maxY - minY) ** 2) * 0.5\n}\n\nexport function getClustersAndPoints<D> (\n clusterIndex: Supercluster<D>,\n leafletMap: L.Map,\n customBounds?: [number, number, number, number]\n): (ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<D>)[] {\n const leafletBounds = leafletMap.getBounds()\n const southWest = leafletBounds.getSouthWest()\n const northEast = leafletBounds.getNorthEast()\n const bounds = customBounds || [southWest.lng, southWest.lat, northEast.lng, northEast.lat]\n const zoom = Math.round(leafletMap.getZoom())\n const points = clusterIndex.getClusters(bounds, zoom) // as ClusterFeature<LeafletMapPointDatum<D>>[]\n\n for (const p of points) {\n const point = p as ClusterFeature<LeafletMapClusterDatum<D>>\n const isCluster = point.properties.cluster\n if (isCluster) {\n point.properties.clusterIndex = clusterIndex\n point.properties.clusterPoints = clusterIndex.getLeaves(point.properties.cluster_id, Infinity).map(d => d.properties)\n }\n }\n\n return points as (ClusterFeature<LeafletMapClusterDatum<D>> | PointFeature<D>)[]\n}\n"],"names":[],"mappings":";;;;;;;;AA2BM,SAAU,SAAS,CACvB,SAA+D,EAAA;AAE/D,IAAA,IAAI,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