@nasa-terra/components 0.0.203 → 0.0.205

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 (1457) hide show
  1. package/cdn/apis/harmony.api.d.ts +5 -0
  2. package/cdn/chunks/GeoTIFF.CENKOG7R.js +19979 -0
  3. package/cdn/chunks/chunk.2232XEJQ.js +29 -0
  4. package/cdn/chunks/chunk.2B2TSVNY.js +978 -0
  5. package/cdn/chunks/chunk.2NNYMNZ5.js +29 -0
  6. package/cdn/chunks/chunk.2NX4H2BN.js +19 -0
  7. package/cdn/chunks/chunk.2WBW37NH.js +19 -0
  8. package/cdn/chunks/chunk.2X7DAD43.js +29 -0
  9. package/cdn/chunks/chunk.2XT2DXDS.js +528 -0
  10. package/cdn/chunks/chunk.34A6RU6E.js +29 -0
  11. package/cdn/chunks/chunk.3A3Y63MA.js +19 -0
  12. package/cdn/chunks/chunk.3JB5ESJU.js +8969 -0
  13. package/cdn/chunks/chunk.3TH37PLU.js +1121 -0
  14. package/cdn/chunks/chunk.3XHPRPKJ.js +1009 -0
  15. package/cdn/chunks/chunk.4FAAL7CU.js +897 -0
  16. package/cdn/chunks/chunk.4JTU674G.js +48 -0
  17. package/cdn/chunks/chunk.4KBZ7BIR.js +29 -0
  18. package/cdn/chunks/chunk.4PDH3KAH.js +1945 -0
  19. package/cdn/chunks/chunk.4RS5WH4G.js +19 -0
  20. package/cdn/chunks/chunk.4W7HENDQ.js +19 -0
  21. package/cdn/chunks/chunk.5256OMFI.js +62 -0
  22. package/cdn/chunks/chunk.577EXZQP.js +19 -0
  23. package/cdn/chunks/chunk.5DIIZV4K.js +791 -0
  24. package/cdn/chunks/chunk.5DIVPJOJ.js +1653 -0
  25. package/cdn/chunks/chunk.5F22YVKZ.js +19 -0
  26. package/cdn/chunks/chunk.5GC6XXMO.js +19 -0
  27. package/cdn/chunks/chunk.5GD3GQER.js +33 -0
  28. package/cdn/chunks/chunk.5JGHWKZV.js +38 -0
  29. package/cdn/chunks/chunk.5MCRMJ7W.js +110 -0
  30. package/cdn/chunks/chunk.5MFAIDYF.js +19 -0
  31. package/cdn/chunks/chunk.5QQP4HY5.js +29 -0
  32. package/cdn/chunks/chunk.5SGSESUV.js +39 -0
  33. package/cdn/chunks/chunk.5T32ADMR.js +32 -0
  34. package/cdn/chunks/chunk.5TUINKG3.js +19 -0
  35. package/cdn/chunks/chunk.5Z5FTYHQ.js +29 -0
  36. package/cdn/chunks/chunk.64ZLB3XD.js +37 -0
  37. package/cdn/chunks/chunk.67MZVSO7.js +234 -0
  38. package/cdn/chunks/chunk.6KW23GBD.js +3035 -0
  39. package/cdn/chunks/chunk.6NU4LT46.js +189 -0
  40. package/cdn/chunks/chunk.6ONOP4ID.js +29 -0
  41. package/cdn/chunks/chunk.6RBN3R3S.js +19 -0
  42. package/cdn/chunks/chunk.6RVC4QTE.js +19 -0
  43. package/cdn/chunks/chunk.6VGVAUYK.js +256 -0
  44. package/cdn/chunks/chunk.6XBVIYCV.js +32 -0
  45. package/cdn/chunks/chunk.76VAMCFM.js +824 -0
  46. package/cdn/chunks/chunk.7FTE5V2B.js +19 -0
  47. package/cdn/chunks/chunk.7OFUJKBW.js +30 -0
  48. package/cdn/chunks/chunk.7RUFZ7VF.js +475 -0
  49. package/cdn/chunks/chunk.A4KWAYQH.js +4980 -0
  50. package/cdn/chunks/chunk.A63JCTKT.js +19 -0
  51. package/cdn/chunks/chunk.AQ5OKPLZ.js +19 -0
  52. package/cdn/chunks/chunk.AQ5T22QG.js +41 -0
  53. package/cdn/chunks/chunk.ASGNUKTS.js +1131 -0
  54. package/cdn/chunks/chunk.AUWT3HKD.js +940 -0
  55. package/cdn/chunks/chunk.BD5JLOM4.js +357 -0
  56. package/cdn/chunks/chunk.BL2T5FVE.js +10 -0
  57. package/cdn/chunks/chunk.BNIVIVSF.js +2544 -0
  58. package/cdn/chunks/chunk.BPTXUG3W.js +35 -0
  59. package/cdn/chunks/chunk.BQPBQZFS.js +360 -0
  60. package/cdn/chunks/chunk.BYBKLA6W.js +255 -0
  61. package/cdn/chunks/chunk.CHNYNA6A.js +19 -0
  62. package/cdn/chunks/chunk.CISSBK6B.js +1820 -0
  63. package/cdn/chunks/chunk.CN3HAOBC.js +83 -0
  64. package/cdn/chunks/chunk.CO3P3PQN.js +19 -0
  65. package/cdn/chunks/chunk.CSF2PMFW.js +1075 -0
  66. package/cdn/chunks/chunk.CT6JWWV2.js +93 -0
  67. package/cdn/chunks/chunk.CY2NA7DX.js +1040 -0
  68. package/cdn/chunks/chunk.D2OCF56Z.js +74 -0
  69. package/cdn/chunks/chunk.D3WDJ4SS.js +149 -0
  70. package/cdn/chunks/chunk.D52LQ4J3.js +19 -0
  71. package/cdn/chunks/chunk.D5OYZFRL.js +134 -0
  72. package/cdn/chunks/chunk.D6W64PXN.js +19 -0
  73. package/cdn/chunks/chunk.D7YRDTVS.js +134 -0
  74. package/cdn/chunks/chunk.DLBLZUXI.js +19 -0
  75. package/cdn/chunks/chunk.DMAOIRXE.js +19 -0
  76. package/cdn/chunks/chunk.E2RZP3XA.js +19 -0
  77. package/cdn/chunks/chunk.E6423VVS.js +47 -0
  78. package/cdn/chunks/chunk.EAUBUUN5.js +32 -0
  79. package/cdn/chunks/chunk.EBGQWXBG.js +19 -0
  80. package/cdn/chunks/chunk.EDPOC2S3.js +29 -0
  81. package/cdn/chunks/chunk.EH63H56Z.js +333 -0
  82. package/cdn/chunks/chunk.EIAV6I5D.js +600 -0
  83. package/cdn/chunks/chunk.EOTDTPZM.js +259 -0
  84. package/cdn/chunks/chunk.EP6PSBZE.js +100 -0
  85. package/cdn/chunks/chunk.EVAUERXR.js +431 -0
  86. package/cdn/chunks/chunk.F2DLSNNG.js +625 -0
  87. package/cdn/chunks/chunk.F6FVKFVH.js +60 -0
  88. package/cdn/chunks/chunk.FEIRWXAI.js +34 -0
  89. package/cdn/chunks/chunk.FK5JYFNX.js +29 -0
  90. package/cdn/chunks/chunk.FP2ISOJN.js +106 -0
  91. package/cdn/chunks/chunk.FRGR3SUX.js +19 -0
  92. package/cdn/chunks/chunk.G2FP3NMR.js +32 -0
  93. package/cdn/chunks/chunk.G4RHOTZM.js +19 -0
  94. package/cdn/chunks/chunk.G56LMKFK.js +190 -0
  95. package/cdn/chunks/chunk.GAYO2WF7.js +810 -0
  96. package/cdn/chunks/chunk.GGKAPJYB.js +4089 -0
  97. package/cdn/chunks/chunk.GGRHSJRY.js +278 -0
  98. package/cdn/chunks/chunk.GMXOAOYE.js +897 -0
  99. package/cdn/chunks/chunk.GPTTHV22.js +19 -0
  100. package/cdn/chunks/chunk.GSM3UO7L.js +125 -0
  101. package/cdn/chunks/chunk.GUDMVVPM.js +29 -0
  102. package/cdn/chunks/chunk.GWGONIHM.js +621 -0
  103. package/cdn/chunks/chunk.GXLMJLQN.js +19 -0
  104. package/cdn/chunks/chunk.H3M3UFJW.js +225 -0
  105. package/cdn/chunks/chunk.H4CIEYCI.js +274 -0
  106. package/cdn/chunks/chunk.HAMWPWKH.js +536 -0
  107. package/cdn/chunks/chunk.HJX5NP2U.js +49 -0
  108. package/cdn/chunks/chunk.HUS54CD5.js +152 -0
  109. package/cdn/chunks/chunk.HV7OZEJM.js +37 -0
  110. package/cdn/chunks/chunk.HVZFV4RK.js +271 -0
  111. package/cdn/chunks/chunk.I2EO4UEA.js +128 -0
  112. package/cdn/chunks/chunk.I2S4BY2H.js +19 -0
  113. package/cdn/chunks/chunk.IBOPN3BA.js +74 -0
  114. package/cdn/chunks/chunk.IIVOE5EV.js +34 -0
  115. package/cdn/chunks/chunk.ILWTJYAG.js +19 -0
  116. package/cdn/chunks/chunk.IMCWFOML.js +132 -0
  117. package/cdn/chunks/chunk.IPQAZBW5.js +33 -0
  118. package/cdn/chunks/chunk.IWKAVEX2.js +521 -0
  119. package/cdn/chunks/chunk.IXCWTH7X.js +19 -0
  120. package/cdn/chunks/chunk.J2O5J6LC.js +33 -0
  121. package/cdn/chunks/chunk.J665CST2.js +32 -0
  122. package/cdn/chunks/chunk.J7VOBHYB.js +29 -0
  123. package/cdn/chunks/chunk.JRHREVZG.js +195 -0
  124. package/cdn/chunks/chunk.JRT7GG7P.js +193 -0
  125. package/cdn/chunks/chunk.JZBAAUKG.js +37 -0
  126. package/cdn/chunks/chunk.K6JQEUEF.js +855 -0
  127. package/cdn/chunks/chunk.KBU6MR53.js +19 -0
  128. package/cdn/chunks/chunk.KH6TDNWG.js +32 -0
  129. package/cdn/chunks/chunk.KKACL6TT.js +19 -0
  130. package/cdn/chunks/chunk.KORCC6ZC.js +136 -0
  131. package/cdn/chunks/chunk.KOZYPVDG.js +29 -0
  132. package/cdn/chunks/chunk.KRVDOVGU.js +27 -0
  133. package/cdn/chunks/chunk.KVNYSD7J.js +35 -0
  134. package/cdn/chunks/chunk.KVY6HP36.js +504 -0
  135. package/cdn/chunks/chunk.KYTQLAV4.js +33 -0
  136. package/cdn/chunks/chunk.L2JTE4GG.js +29 -0
  137. package/cdn/chunks/chunk.L3IVPHBN.js +29 -0
  138. package/cdn/chunks/chunk.L3RRPSVD.js +310 -0
  139. package/cdn/chunks/chunk.LA6TV4TX.js +231 -0
  140. package/cdn/chunks/chunk.LFASDJBV.js +19 -0
  141. package/cdn/chunks/chunk.LFKTPFJU.js +19 -0
  142. package/cdn/chunks/chunk.LFL3PUXL.js +78 -0
  143. package/cdn/chunks/chunk.LI42WZVM.js +19 -0
  144. package/cdn/chunks/chunk.LNONJFUN.js +19 -0
  145. package/cdn/chunks/chunk.LUKHK72N.js +1038 -0
  146. package/cdn/chunks/chunk.M3QGLBMX.js +256 -0
  147. package/cdn/chunks/chunk.M57M7AQ5.js +19 -0
  148. package/cdn/chunks/chunk.MC7GK7JH.js +36 -0
  149. package/cdn/chunks/chunk.MC7JQJRG.js +32 -0
  150. package/cdn/chunks/chunk.ML5BEAMW.js +276 -0
  151. package/cdn/chunks/chunk.MMF6FZHE.js +19 -0
  152. package/cdn/chunks/chunk.MO4YNF4J.js +29 -0
  153. package/cdn/chunks/chunk.MUSKX3GU.js +138 -0
  154. package/cdn/chunks/chunk.N7GDICRN.js +568 -0
  155. package/cdn/chunks/chunk.NDYEK3K4.js +19 -0
  156. package/cdn/chunks/chunk.NHZJYK2Q.js +111 -0
  157. package/cdn/chunks/chunk.NRLNKN7I.js +17 -0
  158. package/cdn/chunks/chunk.NSKILA2A.js +29 -0
  159. package/cdn/chunks/chunk.NWO2MF5T.js +375 -0
  160. package/cdn/chunks/chunk.NX7VOYQH.js +610 -0
  161. package/cdn/chunks/chunk.NZA757GX.js +60 -0
  162. package/cdn/chunks/chunk.O2NOKPSY.js +169 -0
  163. package/cdn/chunks/chunk.OIOVBL5M.js +32 -0
  164. package/cdn/chunks/chunk.OSNWOWQ2.js +2337 -0
  165. package/cdn/chunks/chunk.OSRGCUJJ.js +891 -0
  166. package/cdn/chunks/chunk.OVC7EVR4.js +32 -0
  167. package/cdn/chunks/chunk.PEGHDN3D.js +32 -0
  168. package/cdn/chunks/chunk.PKU5OUHL.js +19 -0
  169. package/cdn/chunks/chunk.PVAQWFRB.js +224 -0
  170. package/cdn/chunks/chunk.PVNZZZCV.js +1307 -0
  171. package/cdn/chunks/chunk.QBDCDA3E.js +754 -0
  172. package/cdn/chunks/chunk.QDRW3JBM.js +113 -0
  173. package/cdn/chunks/chunk.QFRFT4W5.js +19 -0
  174. package/cdn/chunks/chunk.QJPYGHSA.js +29 -0
  175. package/cdn/chunks/chunk.QN4G5N5L.js +591 -0
  176. package/cdn/chunks/chunk.QQYFIC2N.js +19 -0
  177. package/cdn/chunks/chunk.QR6SCWOR.js +19 -0
  178. package/cdn/chunks/chunk.QRGGKLJQ.js +29 -0
  179. package/cdn/chunks/chunk.QSX2ASPV.js +36 -0
  180. package/cdn/chunks/chunk.QV7MGHUO.js +32 -0
  181. package/cdn/chunks/chunk.QYLVSRAZ.js +442 -0
  182. package/cdn/chunks/chunk.R6TDRJ2T.js +28 -0
  183. package/cdn/chunks/chunk.RRQO6C7V.js +208 -0
  184. package/cdn/chunks/chunk.RRT5M4B3.js +104 -0
  185. package/cdn/chunks/chunk.RZNXY5DA.js +85 -0
  186. package/cdn/chunks/chunk.S2MHJ2BL.js +529 -0
  187. package/cdn/chunks/chunk.S2P2KBX3.js +19 -0
  188. package/cdn/chunks/chunk.S5UFNVHZ.js +1768 -0
  189. package/cdn/chunks/chunk.SAMOMNBR.js +32 -0
  190. package/cdn/chunks/chunk.SPWHG3FQ.js +36 -0
  191. package/cdn/chunks/chunk.SRIL2GZR.js +19 -0
  192. package/cdn/chunks/chunk.T32DCJPK.js +33 -0
  193. package/cdn/chunks/chunk.T3YLYNOF.js +2977 -0
  194. package/cdn/chunks/chunk.T7754SP4.js +33 -0
  195. package/cdn/chunks/chunk.T7KRTL2U.js +19 -0
  196. package/cdn/chunks/chunk.TAY4BUTR.js +92 -0
  197. package/cdn/chunks/chunk.TBU3QGJR.js +29 -0
  198. package/cdn/chunks/chunk.TEEU5HFN.js +284 -0
  199. package/cdn/chunks/chunk.TFRA4ITH.js +32 -0
  200. package/cdn/chunks/chunk.TFRHDABM.js +19 -0
  201. package/cdn/chunks/chunk.THX4K42R.js +19 -0
  202. package/cdn/chunks/chunk.TKLGXW34.js +19 -0
  203. package/cdn/chunks/chunk.TMAJCFSJ.js +19 -0
  204. package/cdn/chunks/chunk.TMPSEY4M.js +876 -0
  205. package/cdn/chunks/chunk.TULXWHMT.js +19 -0
  206. package/cdn/chunks/chunk.U42UGPIF.js +34 -0
  207. package/cdn/chunks/chunk.U7RFQUL4.js +117 -0
  208. package/cdn/chunks/chunk.UHSY6WVZ.js +19 -0
  209. package/cdn/chunks/chunk.UI7YLIQD.js +19 -0
  210. package/cdn/chunks/chunk.UK5FWG26.js +621 -0
  211. package/cdn/chunks/chunk.UMPFH3IG.js +32 -0
  212. package/cdn/chunks/chunk.UW4VQ2ZT.js +29 -0
  213. package/cdn/chunks/chunk.UWQGPSGJ.js +123 -0
  214. package/cdn/chunks/chunk.UYISI6DV.js +161 -0
  215. package/cdn/chunks/chunk.VBP6ZZXJ.js +104 -0
  216. package/cdn/chunks/chunk.VNSMUAG2.js +19 -0
  217. package/cdn/chunks/chunk.VQFDZZR5.js +64743 -0
  218. package/cdn/chunks/chunk.VTJ45MEV.js +68 -0
  219. package/cdn/chunks/chunk.VXTFCFJP.js +29 -0
  220. package/cdn/chunks/chunk.VYRHCJMA.js +19 -0
  221. package/cdn/chunks/chunk.W5BKCYRV.js +19 -0
  222. package/cdn/chunks/chunk.W7NVJUQD.js +42 -0
  223. package/cdn/chunks/chunk.WAIMZWDO.js +32 -0
  224. package/cdn/chunks/chunk.WCOQW5IP.js +29 -0
  225. package/cdn/chunks/chunk.WENZIKZU.js +37 -0
  226. package/cdn/chunks/chunk.WLIBRD3E.js +36 -0
  227. package/cdn/chunks/chunk.WMGJ3MAP.js +415 -0
  228. package/cdn/chunks/chunk.WT45RB6M.js +86 -0
  229. package/cdn/chunks/chunk.WVIQ74WP.js +29 -0
  230. package/cdn/chunks/chunk.WVKE7GDV.js +82 -0
  231. package/cdn/chunks/chunk.X6V5UTEC.js +19 -0
  232. package/cdn/chunks/chunk.XE7NSCVW.js +35 -0
  233. package/cdn/chunks/chunk.XEPXVSXX.js +19 -0
  234. package/cdn/chunks/chunk.XFTU6F75.js +19 -0
  235. package/cdn/chunks/chunk.XGGJLW76.js +19 -0
  236. package/cdn/chunks/chunk.XIPDYSFN.js +32 -0
  237. package/cdn/chunks/chunk.XIY5GTZR.js +19 -0
  238. package/cdn/chunks/chunk.XLUZ67JF.js +11763 -0
  239. package/cdn/chunks/chunk.Y7SR4L5C.js +19 -0
  240. package/cdn/chunks/chunk.YJ7H7EYL.js +71 -0
  241. package/cdn/chunks/chunk.YKDCWNZE.js +17319 -0
  242. package/cdn/chunks/chunk.YMH7U2K5.js +29 -0
  243. package/cdn/chunks/chunk.YU5KVALN.js +29 -0
  244. package/cdn/chunks/chunk.Z6ZRFFCE.js +35 -0
  245. package/cdn/chunks/chunk.ZG6QTQKO.js +162 -0
  246. package/cdn/chunks/chunk.ZL4AGGZE.js +35 -0
  247. package/cdn/chunks/chunk.ZL6COYU6.js +19 -0
  248. package/cdn/chunks/chunk.ZNSSJSKK.js +158 -0
  249. package/cdn/chunks/lerc.IIII5MJ5.js +2099 -0
  250. package/cdn/components/accordion/accordion.component.js +5 -5
  251. package/cdn/components/accordion/accordion.js +6 -6
  252. package/cdn/components/alert/alert.component.js +4 -4
  253. package/cdn/components/alert/alert.js +5 -5
  254. package/cdn/components/avatar/avatar.component.js +5 -5
  255. package/cdn/components/avatar/avatar.js +6 -6
  256. package/cdn/components/badge/badge.component.js +3 -3
  257. package/cdn/components/badge/badge.js +4 -4
  258. package/cdn/components/banner/banner.component.js +3 -3
  259. package/cdn/components/banner/banner.js +4 -4
  260. package/cdn/components/breadcrumb/breadcrumb.component.js +2 -2
  261. package/cdn/components/breadcrumb/breadcrumb.js +3 -3
  262. package/cdn/components/breadcrumbs/breadcrumbs.component.js +2 -2
  263. package/cdn/components/breadcrumbs/breadcrumbs.js +3 -3
  264. package/cdn/components/browse-variables/browse-variables.component.d.ts +1 -1
  265. package/cdn/components/browse-variables/browse-variables.component.js +21 -21
  266. package/cdn/components/browse-variables/browse-variables.controller.js +2 -2
  267. package/cdn/components/browse-variables/browse-variables.js +22 -22
  268. package/cdn/components/button/button.component.js +6 -6
  269. package/cdn/components/button/button.js +7 -7
  270. package/cdn/components/button-group/button-group.component.js +2 -2
  271. package/cdn/components/button-group/button-group.js +3 -3
  272. package/cdn/components/caption/caption.component.js +2 -2
  273. package/cdn/components/caption/caption.js +3 -3
  274. package/cdn/components/card/card.component.js +2 -2
  275. package/cdn/components/card/card.js +3 -3
  276. package/cdn/components/checkbox/checkbox.component.js +5 -5
  277. package/cdn/components/checkbox/checkbox.js +6 -6
  278. package/cdn/components/chip/chip.component.js +2 -2
  279. package/cdn/components/chip/chip.js +3 -3
  280. package/cdn/components/combobox/combobox.component.js +5 -5
  281. package/cdn/components/combobox/combobox.js +6 -6
  282. package/cdn/components/data-access/data-access.component.d.ts +11 -11
  283. package/cdn/components/data-access/data-access.component.js +69 -56
  284. package/cdn/components/data-access/data-access.js +70 -57
  285. package/cdn/components/data-grid/data-grid.component.js +3 -3
  286. package/cdn/components/data-grid/data-grid.js +4 -4
  287. package/cdn/components/data-rods/data-rods.component.d.ts +7 -11
  288. package/cdn/components/data-rods/data-rods.component.js +79 -67
  289. package/cdn/components/data-rods/data-rods.js +80 -68
  290. package/cdn/components/data-subsetter/data-subsetter.component.d.ts +8 -5
  291. package/cdn/components/data-subsetter/data-subsetter.component.js +83 -72
  292. package/cdn/components/data-subsetter/data-subsetter.js +84 -73
  293. package/cdn/components/data-subsetter/data-subsetter.styles.js +1 -1
  294. package/cdn/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  295. package/cdn/components/data-subsetter-history/data-subsetter-history.component.d.ts +4 -7
  296. package/cdn/components/data-subsetter-history/data-subsetter-history.component.js +84 -73
  297. package/cdn/components/data-subsetter-history/data-subsetter-history.js +85 -74
  298. package/cdn/components/date-picker/date-picker.component.d.ts +3 -4
  299. package/cdn/components/date-picker/date-picker.component.js +14 -14
  300. package/cdn/components/date-picker/date-picker.js +15 -15
  301. package/cdn/components/date-range-slider/date-range-slider.component.js +3 -3
  302. package/cdn/components/date-range-slider/date-range-slider.js +4 -4
  303. package/cdn/components/dialog/dialog.component.js +8 -8
  304. package/cdn/components/dialog/dialog.js +9 -9
  305. package/cdn/components/divider/divider.component.js +2 -2
  306. package/cdn/components/divider/divider.js +3 -3
  307. package/cdn/components/dropdown/dropdown.component.js +4 -4
  308. package/cdn/components/dropdown/dropdown.js +5 -5
  309. package/cdn/components/earthdata-login/earthdata-login.component.d.ts +3 -1
  310. package/cdn/components/earthdata-login/earthdata-login.component.js +16 -17
  311. package/cdn/components/earthdata-login/earthdata-login.js +17 -18
  312. package/cdn/components/file-upload/file-upload.component.js +2 -2
  313. package/cdn/components/file-upload/file-upload.js +3 -3
  314. package/cdn/components/harmony-history/harmony-history.component.d.ts +3 -6
  315. package/cdn/components/harmony-history/harmony-history.component.js +12 -13
  316. package/cdn/components/harmony-history/harmony-history.js +13 -14
  317. package/cdn/components/icon/icon.component.js +3 -3
  318. package/cdn/components/icon/icon.js +4 -4
  319. package/cdn/components/input/input.component.js +5 -5
  320. package/cdn/components/input/input.js +6 -6
  321. package/cdn/components/loader/loader.component.js +2 -2
  322. package/cdn/components/loader/loader.js +3 -3
  323. package/cdn/components/login/login.component.d.ts +3 -1
  324. package/cdn/components/login/login.component.js +12 -13
  325. package/cdn/components/login/login.js +13 -14
  326. package/cdn/components/map/controls/draw-toolbar.control.d.ts +5 -2
  327. package/cdn/components/map/controls/draw-toolbar.control.js +18 -8
  328. package/cdn/components/map/controls/layer-picker.control.d.ts +16 -0
  329. package/cdn/components/map/controls/layer-picker.control.js +13 -0
  330. package/cdn/components/map/layers/base.layer.d.ts +10 -0
  331. package/cdn/components/map/layers/base.layer.js +25 -14
  332. package/cdn/components/map/layers/borders.layer.js +21 -13
  333. package/cdn/components/map/layers/boundary.d.ts +30 -0
  334. package/cdn/components/map/layers/boundary.js +20 -0
  335. package/cdn/components/map/layers/common.d.ts +2 -0
  336. package/cdn/components/map/layers/geotiff.layer.js +12 -7
  337. package/cdn/components/map/layers/gibs-vector.layer.js +26 -18
  338. package/cdn/components/map/layers/gibs.layer.d.ts +6 -0
  339. package/cdn/components/map/layers/gibs.layer.js +26 -18
  340. package/cdn/components/map/layers/labels.layer.js +21 -13
  341. package/cdn/components/map/layers/layer.js +28 -20
  342. package/cdn/components/map/layers/xyz.layer.js +17 -12
  343. package/cdn/components/map/map.component.d.ts +73 -21
  344. package/cdn/components/map/map.component.js +43 -29
  345. package/cdn/components/map/map.js +44 -30
  346. package/cdn/components/map/map.service.d.ts +92 -9
  347. package/cdn/components/map/map.service.js +33 -19
  348. package/cdn/components/map/map.styles.js +1 -1
  349. package/cdn/components/map/projections.js +4 -3
  350. package/cdn/components/map/type.d.ts +7 -0
  351. package/cdn/components/menu/menu.component.js +2 -2
  352. package/cdn/components/menu/menu.js +3 -3
  353. package/cdn/components/menu-item/menu-item.component.js +7 -7
  354. package/cdn/components/menu-item/menu-item.js +8 -8
  355. package/cdn/components/option/option.component.js +4 -4
  356. package/cdn/components/option/option.js +5 -5
  357. package/cdn/components/pagination/pagination.component.js +4 -4
  358. package/cdn/components/pagination/pagination.js +5 -5
  359. package/cdn/components/plot/plot.component.js +2 -2
  360. package/cdn/components/plot/plot.js +3 -3
  361. package/cdn/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  362. package/cdn/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  363. package/cdn/components/plot-toolbar/plot-toolbar.component.d.ts +4 -4
  364. package/cdn/components/plot-toolbar/plot-toolbar.component.js +54 -42
  365. package/cdn/components/plot-toolbar/plot-toolbar.js +55 -43
  366. package/cdn/components/popup/popup.component.js +2 -2
  367. package/cdn/components/popup/popup.js +3 -3
  368. package/cdn/components/progress-bar/progress-bar.component.js +2 -2
  369. package/cdn/components/progress-bar/progress-bar.js +3 -3
  370. package/cdn/components/radio/radio.component.js +3 -3
  371. package/cdn/components/radio/radio.js +4 -4
  372. package/cdn/components/radio-group/radio-group.component.js +3 -3
  373. package/cdn/components/radio-group/radio-group.js +4 -4
  374. package/cdn/components/scroll-hint/scroll-hint.component.js +4 -4
  375. package/cdn/components/scroll-hint/scroll-hint.js +5 -5
  376. package/cdn/components/select/select.component.js +8 -8
  377. package/cdn/components/select/select.js +9 -9
  378. package/cdn/components/site-header/site-header.component.js +5 -5
  379. package/cdn/components/site-header/site-header.js +5 -5
  380. package/cdn/components/site-navigation/site-navigation.component.js +2 -2
  381. package/cdn/components/site-navigation/site-navigation.js +2 -2
  382. package/cdn/components/skeleton/skeleton.component.js +2 -2
  383. package/cdn/components/skeleton/skeleton.js +3 -3
  384. package/cdn/components/slider/slider.component.js +2 -2
  385. package/cdn/components/slider/slider.js +3 -3
  386. package/cdn/components/spatial-picker/spatial-picker.component.d.ts +0 -10
  387. package/cdn/components/spatial-picker/spatial-picker.component.js +53 -39
  388. package/cdn/components/spatial-picker/spatial-picker.js +54 -40
  389. package/cdn/components/status-indicator/status-indicator.component.js +2 -2
  390. package/cdn/components/status-indicator/status-indicator.js +3 -3
  391. package/cdn/components/stepper/stepper.component.js +2 -2
  392. package/cdn/components/stepper/stepper.js +3 -3
  393. package/cdn/components/stepper-step/stepper-step.component.js +4 -4
  394. package/cdn/components/stepper-step/stepper-step.js +5 -5
  395. package/cdn/components/tab/tab.component.js +4 -4
  396. package/cdn/components/tab/tab.js +5 -5
  397. package/cdn/components/tab-panel/tab-panel.component.js +3 -3
  398. package/cdn/components/tab-panel/tab-panel.js +4 -4
  399. package/cdn/components/tabs/tabs.component.d.ts +2 -1
  400. package/cdn/components/tabs/tabs.component.js +4 -4
  401. package/cdn/components/tabs/tabs.js +5 -5
  402. package/cdn/components/tag/tag.component.js +4 -4
  403. package/cdn/components/tag/tag.js +5 -5
  404. package/cdn/components/textarea/textarea.component.js +4 -4
  405. package/cdn/components/textarea/textarea.js +5 -5
  406. package/cdn/components/time-average-map/time-average-map.component.d.ts +10 -14
  407. package/cdn/components/time-average-map/time-average-map.component.js +66 -54
  408. package/cdn/components/time-average-map/time-average-map.controller.js +7 -7
  409. package/cdn/components/time-average-map/time-average-map.js +67 -55
  410. package/cdn/components/time-series/time-series.component.d.ts +2 -10
  411. package/cdn/components/time-series/time-series.component.js +66 -54
  412. package/cdn/components/time-series/time-series.controller.js +7 -7
  413. package/cdn/components/time-series/time-series.js +67 -55
  414. package/cdn/components/toast/toast.component.js +5 -5
  415. package/cdn/components/toast/toast.js +6 -6
  416. package/cdn/components/toggle/toggle.component.js +4 -4
  417. package/cdn/components/toggle/toggle.js +5 -5
  418. package/cdn/components/tooltip/tooltip.component.js +4 -4
  419. package/cdn/components/tooltip/tooltip.js +5 -5
  420. package/cdn/components/variable-combobox/variable-combobox.component.d.ts +5 -9
  421. package/cdn/components/variable-combobox/variable-combobox.component.js +14 -12
  422. package/cdn/components/variable-combobox/variable-combobox.js +15 -13
  423. package/cdn/components/variable-keyword-search/variable-keyword-search.component.d.ts +2 -2
  424. package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +10 -10
  425. package/cdn/components/variable-keyword-search/variable-keyword-search.js +11 -11
  426. package/cdn/custom-elements.json +10670 -8582
  427. package/cdn/events/events.d.ts +2 -2
  428. package/cdn/events/terra-map.d.ts +55 -0
  429. package/cdn/mixins/auth.mixin.d.ts +23 -0
  430. package/cdn/mixins/mixin.types.d.ts +1 -0
  431. package/cdn/mixins/query-client.mixin.d.ts +1 -1
  432. package/cdn/react/accordion/index.js +6 -6
  433. package/cdn/react/alert/index.js +5 -5
  434. package/cdn/react/avatar/index.js +6 -6
  435. package/cdn/react/badge/index.js +4 -4
  436. package/cdn/react/banner/index.js +4 -4
  437. package/cdn/react/breadcrumb/index.js +3 -3
  438. package/cdn/react/breadcrumbs/index.js +3 -3
  439. package/cdn/react/browse-variables/index.js +22 -22
  440. package/cdn/react/button/index.js +7 -7
  441. package/cdn/react/button-group/index.js +3 -3
  442. package/cdn/react/caption/index.js +3 -3
  443. package/cdn/react/card/index.js +3 -3
  444. package/cdn/react/checkbox/index.js +6 -6
  445. package/cdn/react/chip/index.js +3 -3
  446. package/cdn/react/combobox/index.js +6 -6
  447. package/cdn/react/data-access/index.js +70 -57
  448. package/cdn/react/data-grid/index.js +4 -4
  449. package/cdn/react/data-rods/index.d.ts +6 -1
  450. package/cdn/react/data-rods/index.js +80 -68
  451. package/cdn/react/data-subsetter/index.d.ts +3 -0
  452. package/cdn/react/data-subsetter/index.js +84 -73
  453. package/cdn/react/data-subsetter-history/index.d.ts +6 -1
  454. package/cdn/react/data-subsetter-history/index.js +85 -74
  455. package/cdn/react/date-picker/index.js +15 -15
  456. package/cdn/react/date-range-slider/index.js +4 -4
  457. package/cdn/react/dialog/index.js +9 -9
  458. package/cdn/react/divider/index.js +3 -3
  459. package/cdn/react/dropdown/index.js +5 -5
  460. package/cdn/react/earthdata-login/index.js +17 -18
  461. package/cdn/react/file-upload/index.js +3 -3
  462. package/cdn/react/harmony-history/index.d.ts +3 -0
  463. package/cdn/react/harmony-history/index.js +13 -14
  464. package/cdn/react/icon/index.js +4 -4
  465. package/cdn/react/index.d.ts +24 -24
  466. package/cdn/react/index.js +277 -265
  467. package/cdn/react/input/index.js +6 -6
  468. package/cdn/react/loader/index.js +3 -3
  469. package/cdn/react/login/index.js +13 -14
  470. package/cdn/react/map/index.d.ts +32 -1
  471. package/cdn/react/map/index.js +44 -30
  472. package/cdn/react/menu/index.js +3 -3
  473. package/cdn/react/menu-item/index.js +8 -8
  474. package/cdn/react/option/index.js +5 -5
  475. package/cdn/react/pagination/index.js +5 -5
  476. package/cdn/react/plot/index.js +3 -3
  477. package/cdn/react/plot-toolbar/index.d.ts +6 -1
  478. package/cdn/react/plot-toolbar/index.js +55 -43
  479. package/cdn/react/popup/index.js +3 -3
  480. package/cdn/react/progress-bar/index.js +3 -3
  481. package/cdn/react/radio/index.js +4 -4
  482. package/cdn/react/radio-group/index.js +4 -4
  483. package/cdn/react/scroll-hint/index.js +5 -5
  484. package/cdn/react/select/index.js +9 -9
  485. package/cdn/react/site-header/index.js +6 -6
  486. package/cdn/react/site-navigation/index.js +3 -3
  487. package/cdn/react/skeleton/index.js +3 -3
  488. package/cdn/react/slider/index.js +3 -3
  489. package/cdn/react/spatial-picker/index.js +54 -40
  490. package/cdn/react/status-indicator/index.js +3 -3
  491. package/cdn/react/stepper/index.js +3 -3
  492. package/cdn/react/stepper-step/index.js +5 -5
  493. package/cdn/react/tab/index.js +5 -5
  494. package/cdn/react/tab-panel/index.js +4 -4
  495. package/cdn/react/tabs/index.js +5 -5
  496. package/cdn/react/tag/index.js +5 -5
  497. package/cdn/react/textarea/index.js +5 -5
  498. package/cdn/react/time-average-map/index.d.ts +6 -1
  499. package/cdn/react/time-average-map/index.js +67 -55
  500. package/cdn/react/time-series/index.d.ts +3 -0
  501. package/cdn/react/time-series/index.js +67 -55
  502. package/cdn/react/toast/index.js +6 -6
  503. package/cdn/react/toggle/index.js +5 -5
  504. package/cdn/react/tooltip/index.js +5 -5
  505. package/cdn/react/variable-combobox/index.d.ts +4 -1
  506. package/cdn/react/variable-combobox/index.js +15 -13
  507. package/cdn/react/variable-keyword-search/index.d.ts +1 -1
  508. package/cdn/react/variable-keyword-search/index.js +11 -11
  509. package/cdn/terra-ui-components.js +278 -266
  510. package/cdn/types/vue/index.d.ts +1037 -870
  511. package/cdn/utilities/date.d.ts +4 -0
  512. package/cdn/utilities/date.js +3 -1
  513. package/cdn/utilities/variable-task.js +2 -2
  514. package/cdn/vscode.html-custom-data.json +692 -661
  515. package/cdn/web-types.json +2243 -2077
  516. package/dist/apis/harmony.api.d.ts +5 -0
  517. package/dist/chunks/chunk.25A7KRDN.js +19 -0
  518. package/dist/chunks/chunk.2C5HNR5L.js +4 -0
  519. package/dist/chunks/chunk.2O3IOB3J.js +1 -0
  520. package/dist/chunks/chunk.33OXTI3O.js +22 -0
  521. package/dist/chunks/chunk.345LFJWT.js +1 -0
  522. package/dist/chunks/chunk.3D65L7Z7.js +1 -0
  523. package/dist/chunks/chunk.3GAETZS7.js +12 -0
  524. package/dist/chunks/chunk.3IH7Q4YU.js +1 -0
  525. package/dist/chunks/chunk.424PTQE6.js +1 -0
  526. package/dist/chunks/chunk.43YXC3BX.js +1 -0
  527. package/dist/chunks/chunk.45H2PNH4.js +1 -0
  528. package/dist/chunks/chunk.47YM7IJH.js +1 -0
  529. package/dist/chunks/chunk.4A2YMU2A.js +1 -0
  530. package/dist/chunks/chunk.4BU5K6UJ.js +1 -0
  531. package/dist/chunks/chunk.4HQHKAPL.js +1 -0
  532. package/dist/chunks/chunk.4POG3VJI.js +148 -0
  533. package/dist/chunks/chunk.4QRZ7ROR.js +299 -0
  534. package/dist/chunks/chunk.4WJQSWQN.js +1 -0
  535. package/dist/chunks/chunk.52VRTKYJ.js +1 -0
  536. package/dist/chunks/chunk.55FJVUS6.js +43 -0
  537. package/dist/chunks/chunk.55S45QN4.js +1 -0
  538. package/dist/chunks/chunk.574Z2YXE.js +1 -0
  539. package/dist/chunks/chunk.5EE4HG2I.js +1 -0
  540. package/dist/chunks/chunk.5SZGFRLL.js +1 -0
  541. package/dist/chunks/chunk.5TJN4Z3R.js +1 -0
  542. package/dist/chunks/chunk.5TYJPHW2.js +1 -0
  543. package/dist/chunks/chunk.5UYKLBWJ.js +8 -0
  544. package/dist/chunks/chunk.5VNCJX27.js +55 -0
  545. package/dist/chunks/chunk.64725NP3.js +1 -0
  546. package/dist/chunks/chunk.6HO3MVIP.js +1 -0
  547. package/dist/chunks/chunk.6I57S7FR.js +27 -0
  548. package/dist/chunks/chunk.6XHCRR5R.js +9 -0
  549. package/dist/chunks/chunk.73HKAO6V.js +11 -0
  550. package/dist/chunks/chunk.7COB35MT.js +75 -0
  551. package/dist/chunks/chunk.7NCUNKBE.js +1 -0
  552. package/dist/chunks/chunk.7NXWYAIR.js +1 -0
  553. package/dist/chunks/chunk.7SLU543S.js +1 -0
  554. package/dist/chunks/chunk.7XQG4HG3.js +1 -0
  555. package/dist/chunks/chunk.A2ZTVI45.js +154 -0
  556. package/dist/chunks/chunk.AAUFO4KA.js +1 -0
  557. package/dist/chunks/chunk.AFNS7NIK.js +1 -0
  558. package/dist/chunks/chunk.AHL4S3IT.js +1 -0
  559. package/dist/chunks/chunk.AHS4Q35I.js +1 -0
  560. package/dist/chunks/chunk.AIWYS7YQ.js +1 -0
  561. package/dist/chunks/chunk.ALIRA2AC.js +1 -0
  562. package/dist/chunks/chunk.ATILEODB.js +18 -0
  563. package/dist/chunks/chunk.B3X6VXDL.js +1 -0
  564. package/dist/chunks/chunk.B4BXOMMQ.js +1 -0
  565. package/dist/chunks/chunk.BCGQKSR6.js +1 -0
  566. package/dist/chunks/chunk.BOZFOR5U.js +1 -0
  567. package/dist/chunks/chunk.BQB6XWSY.js +1 -0
  568. package/dist/chunks/chunk.BW5OZ5PS.js +1 -0
  569. package/dist/chunks/chunk.BXPTMVQE.js +1 -0
  570. package/dist/chunks/chunk.C6OX4NX6.js +74 -0
  571. package/dist/chunks/chunk.C7VEVA2Y.js +20 -0
  572. package/dist/chunks/chunk.CEOBCS56.js +1 -0
  573. package/dist/chunks/chunk.CGTXCYPM.js +41 -0
  574. package/dist/chunks/chunk.CH2PWIJD.js +5 -0
  575. package/dist/chunks/chunk.CLY6HMJZ.js +121 -0
  576. package/dist/chunks/chunk.CNGZOMLD.js +1 -0
  577. package/dist/chunks/chunk.CPFON5LM.js +1 -0
  578. package/dist/chunks/chunk.CQUQVS3M.js +1 -0
  579. package/dist/chunks/chunk.CRHOUQZH.js +1023 -0
  580. package/dist/chunks/chunk.CVKACFML.js +1 -0
  581. package/dist/chunks/chunk.D3JQRTEL.js +1 -0
  582. package/dist/chunks/chunk.DH5QWPH3.js +126 -0
  583. package/dist/chunks/chunk.DJ5BXB5G.js +48 -0
  584. package/dist/chunks/chunk.DKBGIHHD.js +1 -0
  585. package/dist/chunks/chunk.DOT4H7LX.js +2 -0
  586. package/dist/chunks/chunk.DTKNWAYL.js +62 -0
  587. package/dist/chunks/chunk.DWQMS6BC.js +1 -0
  588. package/dist/chunks/chunk.E477TJOR.js +1 -0
  589. package/dist/chunks/chunk.E4ELJE6I.js +35 -0
  590. package/dist/chunks/chunk.EB3ZPXT6.js +1 -0
  591. package/dist/chunks/chunk.EP2O3QZD.js +1 -0
  592. package/dist/chunks/chunk.EP5CSYKQ.js +1 -0
  593. package/dist/chunks/chunk.EQV2PFSY.js +1 -0
  594. package/dist/chunks/chunk.ER2IYY3T.js +1 -0
  595. package/dist/chunks/chunk.EV5P56DN.js +1 -0
  596. package/dist/chunks/chunk.F3NCEQ7X.js +1 -0
  597. package/dist/chunks/chunk.FSZCT7LX.js +26 -0
  598. package/dist/chunks/chunk.G3ZRWDDX.js +1 -0
  599. package/dist/chunks/chunk.G57LF47A.js +1 -0
  600. package/dist/chunks/chunk.GABTYKJH.js +1 -0
  601. package/dist/chunks/chunk.GHAZYRJA.js +1 -0
  602. package/dist/chunks/chunk.GP5SO7WB.js +43 -0
  603. package/dist/chunks/chunk.GQKEZMI5.js +64 -0
  604. package/dist/chunks/chunk.GUCJK7CQ.js +1 -0
  605. package/dist/chunks/chunk.GVVBO4QC.js +30 -0
  606. package/dist/chunks/chunk.H57KVCKB.js +4 -0
  607. package/dist/chunks/chunk.HCPPIK6X.js +1 -0
  608. package/dist/chunks/chunk.HDBWSDNO.js +1 -0
  609. package/dist/chunks/chunk.HDQVEOLO.js +1 -0
  610. package/dist/chunks/chunk.HKOYW5P7.js +1 -0
  611. package/dist/chunks/chunk.HPJUOBS5.js +1 -0
  612. package/dist/chunks/chunk.HTEGCYSS.js +2 -0
  613. package/dist/chunks/chunk.I2766Z6G.js +1 -0
  614. package/dist/chunks/chunk.I6OSLDVJ.js +1 -0
  615. package/dist/chunks/chunk.I6WZHDJR.js +1 -0
  616. package/dist/chunks/chunk.ID6GATFM.js +1 -0
  617. package/dist/chunks/chunk.IDQKGC62.js +1 -0
  618. package/dist/chunks/chunk.IRLLX53J.js +47 -0
  619. package/dist/chunks/chunk.IS2NEHYI.js +1 -0
  620. package/dist/chunks/chunk.IS4IX5PC.js +1 -0
  621. package/dist/chunks/chunk.J6W2UPV5.js +1 -0
  622. package/dist/chunks/chunk.JBNOA3A2.js +1 -0
  623. package/dist/chunks/chunk.JDM4WI4S.js +20 -0
  624. package/dist/chunks/chunk.JIF57YBB.js +1 -0
  625. package/dist/chunks/chunk.JM33IYJC.js +1 -0
  626. package/dist/chunks/chunk.JMLZNWOP.js +14 -0
  627. package/dist/chunks/chunk.JRCA2SKL.js +145 -0
  628. package/dist/chunks/chunk.JVSJPJIU.js +5 -0
  629. package/dist/chunks/chunk.JZKLCWMN.js +1 -0
  630. package/dist/chunks/chunk.JZLGMRZU.js +157 -0
  631. package/dist/chunks/chunk.K5BRJBGT.js +1 -0
  632. package/dist/chunks/chunk.KACJAQNX.js +6 -0
  633. package/dist/chunks/chunk.KEJYVX6V.js +55 -0
  634. package/dist/chunks/chunk.KF3WZUJB.js +1 -0
  635. package/dist/chunks/chunk.KGWY64U3.js +1 -0
  636. package/dist/chunks/chunk.KHUTJ2EC.js +1 -0
  637. package/dist/chunks/chunk.KOQ6WD4F.js +1 -0
  638. package/dist/chunks/chunk.KPNLEIXC.js +99 -0
  639. package/dist/chunks/chunk.KZAPYGJP.js +1 -0
  640. package/dist/chunks/chunk.L5QDGGS7.js +1 -0
  641. package/dist/chunks/chunk.LCYI63EA.js +20 -0
  642. package/dist/chunks/chunk.LEZEAL23.js +1 -0
  643. package/dist/chunks/chunk.LM6MTY2M.js +37 -0
  644. package/dist/chunks/chunk.LOLJACKL.js +1 -0
  645. package/dist/chunks/chunk.LQU34HVZ.js +1 -0
  646. package/dist/chunks/chunk.LVAET76P.js +1 -0
  647. package/dist/chunks/chunk.LXFMQAKV.js +1 -0
  648. package/dist/chunks/chunk.LYEGL5BZ.js +1 -0
  649. package/dist/chunks/chunk.LZZE65EN.js +1 -0
  650. package/dist/chunks/chunk.MCJ2GX4A.js +30 -0
  651. package/dist/chunks/chunk.MDKK4AJV.js +17 -0
  652. package/dist/chunks/chunk.MF67H5JA.js +1 -0
  653. package/dist/chunks/chunk.MGU32BIU.js +59 -0
  654. package/dist/chunks/chunk.MK3X5JIU.js +65 -0
  655. package/dist/chunks/chunk.MLR4ZKRU.js +1 -0
  656. package/dist/chunks/chunk.MQIO6BEA.js +1 -0
  657. package/dist/chunks/chunk.MU4BRZ5R.js +1 -0
  658. package/dist/chunks/chunk.MWPFFGL3.js +1 -0
  659. package/dist/chunks/chunk.MXMEA7TP.js +1 -0
  660. package/dist/chunks/chunk.N3V2FL7Q.js +1 -0
  661. package/dist/chunks/chunk.NARLVFIQ.js +33 -0
  662. package/dist/chunks/chunk.NK753QCZ.js +1 -0
  663. package/dist/chunks/chunk.NOXPOPPM.js +1 -0
  664. package/dist/chunks/chunk.NTZXYW2X.js +1 -0
  665. package/dist/chunks/chunk.NV3ZCWPP.js +1 -0
  666. package/dist/chunks/chunk.O2UN3QQG.js +1 -0
  667. package/dist/chunks/chunk.O47BMDEV.js +1 -0
  668. package/dist/chunks/chunk.OJM5RA3G.js +1 -0
  669. package/dist/chunks/chunk.OM4YQXHL.js +1 -0
  670. package/dist/chunks/chunk.OVTNI4H2.js +1 -0
  671. package/dist/chunks/chunk.OWXS5GVL.js +1 -0
  672. package/dist/chunks/chunk.OZSD4QYB.js +1 -0
  673. package/dist/chunks/chunk.PIKCG752.js +1 -0
  674. package/dist/chunks/chunk.PLSGWBX4.js +42 -0
  675. package/dist/chunks/chunk.PP6KREF2.js +5 -0
  676. package/dist/chunks/chunk.PQVZB2P2.js +67 -0
  677. package/dist/chunks/chunk.PRUHQ3VS.js +1 -0
  678. package/dist/chunks/chunk.PWFX3VPM.js +1 -0
  679. package/dist/chunks/chunk.PXVAQ2MA.js +55 -0
  680. package/dist/chunks/chunk.Q6O6LV3R.js +1 -0
  681. package/dist/chunks/chunk.QB7E6R2H.js +1 -0
  682. package/dist/chunks/chunk.QJRLPQ4M.js +1 -0
  683. package/dist/chunks/chunk.QOQWXEK5.js +1 -0
  684. package/dist/chunks/chunk.QVDEJXKO.js +1 -0
  685. package/dist/chunks/chunk.RKMR7V7J.js +1 -0
  686. package/dist/chunks/chunk.RLTSECXU.js +1 -0
  687. package/dist/chunks/chunk.RQYBMFWH.js +25 -0
  688. package/dist/chunks/chunk.S6IY5EKN.js +1 -0
  689. package/dist/chunks/chunk.SD2Q7EO2.js +23 -0
  690. package/dist/chunks/chunk.SEBIDNZM.js +1 -0
  691. package/dist/chunks/chunk.SF2OZFKQ.js +26 -0
  692. package/dist/chunks/chunk.SFK6BRQV.js +16 -0
  693. package/dist/chunks/chunk.SJTIVT6P.js +1 -0
  694. package/dist/chunks/chunk.SKK3NN5J.js +129 -0
  695. package/dist/chunks/chunk.SXGO5MEK.js +100 -0
  696. package/dist/chunks/chunk.TANXPJFE.js +1 -0
  697. package/dist/chunks/chunk.TATIBHUA.js +1 -0
  698. package/dist/chunks/chunk.TOON2INB.js +39 -0
  699. package/dist/chunks/chunk.TPUQNE3A.js +1 -0
  700. package/dist/chunks/chunk.TUGWQPTL.js +1 -0
  701. package/dist/chunks/chunk.TVERDMGY.js +113 -0
  702. package/dist/chunks/chunk.TWRNH5K5.js +1 -0
  703. package/dist/chunks/chunk.UQ6BNK6J.js +1 -0
  704. package/dist/chunks/chunk.UR7PHRDS.js +345 -0
  705. package/dist/chunks/chunk.V4XJH6YL.js +80 -0
  706. package/dist/chunks/chunk.VEPO6QAD.js +1 -0
  707. package/dist/chunks/chunk.VGN6LMHA.js +1 -0
  708. package/dist/chunks/chunk.VGQNQREB.js +1 -0
  709. package/dist/chunks/chunk.VSYDUDNW.js +1286 -0
  710. package/dist/chunks/chunk.W2E2TLSM.js +176 -0
  711. package/dist/chunks/chunk.WQ6USVYL.js +1 -0
  712. package/dist/chunks/chunk.WSBH5HTI.js +1 -0
  713. package/dist/chunks/chunk.WVBRHYTU.js +1 -0
  714. package/dist/chunks/chunk.X66E247Y.js +1 -0
  715. package/dist/chunks/chunk.XAPKFJEL.js +1 -0
  716. package/dist/chunks/chunk.XCYCEX7B.js +1 -0
  717. package/dist/chunks/chunk.XYOSJOLJ.js +1 -0
  718. package/dist/chunks/chunk.XZJS7S7T.js +280 -0
  719. package/dist/chunks/chunk.Y6ESPBDJ.js +1 -0
  720. package/dist/chunks/chunk.Y6HSCFK2.js +1 -0
  721. package/dist/chunks/chunk.YA7JZZG4.js +1 -0
  722. package/dist/chunks/chunk.YBALUVPL.js +1 -0
  723. package/dist/chunks/chunk.YFCEZZRF.js +1 -0
  724. package/dist/chunks/chunk.YLGPGQY4.js +566 -0
  725. package/dist/chunks/chunk.YLNZLECF.js +9 -0
  726. package/dist/chunks/chunk.YMDGNLGV.js +1 -0
  727. package/dist/chunks/chunk.YNN3NBWK.js +1 -0
  728. package/dist/chunks/chunk.YO67MSZK.js +780 -0
  729. package/dist/chunks/chunk.YY3G7NCY.js +35 -0
  730. package/dist/chunks/chunk.YZJEAHZH.js +1 -0
  731. package/dist/chunks/chunk.YZXEYQ6F.js +1 -0
  732. package/dist/chunks/chunk.ZBHNSZBH.js +24 -0
  733. package/dist/chunks/chunk.ZCPIP5RL.js +774 -0
  734. package/dist/chunks/chunk.ZFCVEZXM.js +11 -0
  735. package/dist/components/accordion/accordion.component.js +1 -1
  736. package/dist/components/accordion/accordion.js +1 -1
  737. package/dist/components/alert/alert.component.js +1 -1
  738. package/dist/components/alert/alert.js +1 -1
  739. package/dist/components/avatar/avatar.component.js +1 -1
  740. package/dist/components/avatar/avatar.js +1 -1
  741. package/dist/components/badge/badge.component.js +1 -1
  742. package/dist/components/badge/badge.js +1 -1
  743. package/dist/components/banner/banner.component.js +1 -1
  744. package/dist/components/banner/banner.js +1 -1
  745. package/dist/components/breadcrumb/breadcrumb.component.js +1 -1
  746. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  747. package/dist/components/breadcrumbs/breadcrumbs.component.js +1 -1
  748. package/dist/components/breadcrumbs/breadcrumbs.js +1 -1
  749. package/dist/components/browse-variables/browse-variables.component.d.ts +1 -1
  750. package/dist/components/browse-variables/browse-variables.component.js +1 -1
  751. package/dist/components/browse-variables/browse-variables.controller.js +1 -1
  752. package/dist/components/browse-variables/browse-variables.js +1 -1
  753. package/dist/components/button/button.component.js +1 -1
  754. package/dist/components/button/button.js +1 -1
  755. package/dist/components/button-group/button-group.component.js +1 -1
  756. package/dist/components/button-group/button-group.js +1 -1
  757. package/dist/components/caption/caption.component.js +1 -1
  758. package/dist/components/caption/caption.js +1 -1
  759. package/dist/components/card/card.component.js +1 -1
  760. package/dist/components/card/card.js +1 -1
  761. package/dist/components/checkbox/checkbox.component.js +1 -1
  762. package/dist/components/checkbox/checkbox.js +1 -1
  763. package/dist/components/chip/chip.component.js +1 -1
  764. package/dist/components/chip/chip.js +1 -1
  765. package/dist/components/combobox/combobox.component.js +1 -1
  766. package/dist/components/combobox/combobox.js +1 -1
  767. package/dist/components/data-access/data-access.component.d.ts +11 -11
  768. package/dist/components/data-access/data-access.component.js +1 -1
  769. package/dist/components/data-access/data-access.js +1 -1
  770. package/dist/components/data-grid/data-grid.component.js +1 -1
  771. package/dist/components/data-grid/data-grid.js +1 -1
  772. package/dist/components/data-rods/data-rods.component.d.ts +7 -11
  773. package/dist/components/data-rods/data-rods.component.js +1 -1
  774. package/dist/components/data-rods/data-rods.js +1 -1
  775. package/dist/components/data-subsetter/data-subsetter.component.d.ts +8 -5
  776. package/dist/components/data-subsetter/data-subsetter.component.js +1 -1
  777. package/dist/components/data-subsetter/data-subsetter.js +1 -1
  778. package/dist/components/data-subsetter/data-subsetter.styles.js +1 -1
  779. package/dist/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
  780. package/dist/components/data-subsetter-history/data-subsetter-history.component.d.ts +4 -7
  781. package/dist/components/data-subsetter-history/data-subsetter-history.component.js +1 -1
  782. package/dist/components/data-subsetter-history/data-subsetter-history.js +1 -1
  783. package/dist/components/date-picker/date-picker.component.d.ts +3 -4
  784. package/dist/components/date-picker/date-picker.component.js +1 -1
  785. package/dist/components/date-picker/date-picker.js +1 -1
  786. package/dist/components/date-range-slider/date-range-slider.component.js +1 -1
  787. package/dist/components/date-range-slider/date-range-slider.js +1 -1
  788. package/dist/components/dialog/dialog.component.js +1 -1
  789. package/dist/components/dialog/dialog.js +1 -1
  790. package/dist/components/divider/divider.component.js +1 -1
  791. package/dist/components/divider/divider.js +1 -1
  792. package/dist/components/dropdown/dropdown.component.js +1 -1
  793. package/dist/components/dropdown/dropdown.js +1 -1
  794. package/dist/components/earthdata-login/earthdata-login.component.d.ts +3 -1
  795. package/dist/components/earthdata-login/earthdata-login.component.js +1 -1
  796. package/dist/components/earthdata-login/earthdata-login.js +1 -1
  797. package/dist/components/file-upload/file-upload.component.js +1 -1
  798. package/dist/components/file-upload/file-upload.js +1 -1
  799. package/dist/components/harmony-history/harmony-history.component.d.ts +3 -6
  800. package/dist/components/harmony-history/harmony-history.component.js +1 -1
  801. package/dist/components/harmony-history/harmony-history.js +1 -1
  802. package/dist/components/icon/icon.component.js +1 -1
  803. package/dist/components/icon/icon.js +1 -1
  804. package/dist/components/input/input.component.js +1 -1
  805. package/dist/components/input/input.js +1 -1
  806. package/dist/components/loader/loader.component.js +1 -1
  807. package/dist/components/loader/loader.js +1 -1
  808. package/dist/components/login/login.component.d.ts +3 -1
  809. package/dist/components/login/login.component.js +1 -1
  810. package/dist/components/login/login.js +1 -1
  811. package/dist/components/map/controls/draw-toolbar.control.d.ts +5 -2
  812. package/dist/components/map/controls/draw-toolbar.control.js +1 -1
  813. package/dist/components/map/controls/layer-picker.control.d.ts +16 -0
  814. package/dist/components/map/controls/layer-picker.control.js +1 -0
  815. package/dist/components/map/layers/base.layer.d.ts +10 -0
  816. package/dist/components/map/layers/base.layer.js +1 -1
  817. package/dist/components/map/layers/boundary.d.ts +30 -0
  818. package/dist/components/map/layers/boundary.js +1 -0
  819. package/dist/components/map/layers/common.d.ts +2 -0
  820. package/dist/components/map/layers/gibs-vector.layer.js +1 -1
  821. package/dist/components/map/layers/gibs.layer.d.ts +6 -0
  822. package/dist/components/map/layers/gibs.layer.js +1 -1
  823. package/dist/components/map/layers/layer.js +1 -1
  824. package/dist/components/map/map.component.d.ts +73 -21
  825. package/dist/components/map/map.component.js +1 -1
  826. package/dist/components/map/map.js +1 -1
  827. package/dist/components/map/map.service.d.ts +92 -9
  828. package/dist/components/map/map.service.js +1 -1
  829. package/dist/components/map/map.styles.js +1 -1
  830. package/dist/components/map/type.d.ts +7 -0
  831. package/dist/components/map/type.js +1 -1
  832. package/dist/components/menu/menu.component.js +1 -1
  833. package/dist/components/menu/menu.js +1 -1
  834. package/dist/components/menu-item/menu-item.component.js +1 -1
  835. package/dist/components/menu-item/menu-item.js +1 -1
  836. package/dist/components/option/option.component.js +1 -1
  837. package/dist/components/option/option.js +1 -1
  838. package/dist/components/pagination/pagination.component.js +1 -1
  839. package/dist/components/pagination/pagination.js +1 -1
  840. package/dist/components/plot/plot.component.js +1 -1
  841. package/dist/components/plot/plot.js +1 -1
  842. package/dist/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
  843. package/dist/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
  844. package/dist/components/plot-toolbar/plot-toolbar.component.d.ts +4 -4
  845. package/dist/components/plot-toolbar/plot-toolbar.component.js +1 -1
  846. package/dist/components/plot-toolbar/plot-toolbar.js +1 -1
  847. package/dist/components/popup/popup.component.js +1 -1
  848. package/dist/components/popup/popup.js +1 -1
  849. package/dist/components/progress-bar/progress-bar.component.js +1 -1
  850. package/dist/components/progress-bar/progress-bar.js +1 -1
  851. package/dist/components/radio/radio.component.js +1 -1
  852. package/dist/components/radio/radio.js +1 -1
  853. package/dist/components/radio-group/radio-group.component.js +1 -1
  854. package/dist/components/radio-group/radio-group.js +1 -1
  855. package/dist/components/scroll-hint/scroll-hint.component.js +1 -1
  856. package/dist/components/scroll-hint/scroll-hint.js +1 -1
  857. package/dist/components/select/select.component.js +1 -1
  858. package/dist/components/select/select.js +1 -1
  859. package/dist/components/site-header/site-header.component.js +1 -1
  860. package/dist/components/site-header/site-header.js +1 -1
  861. package/dist/components/site-navigation/site-navigation.component.js +1 -1
  862. package/dist/components/site-navigation/site-navigation.js +1 -1
  863. package/dist/components/skeleton/skeleton.component.js +1 -1
  864. package/dist/components/skeleton/skeleton.js +1 -1
  865. package/dist/components/slider/slider.component.js +1 -1
  866. package/dist/components/slider/slider.js +1 -1
  867. package/dist/components/spatial-picker/spatial-picker.component.d.ts +0 -10
  868. package/dist/components/spatial-picker/spatial-picker.component.js +1 -1
  869. package/dist/components/spatial-picker/spatial-picker.js +1 -1
  870. package/dist/components/status-indicator/status-indicator.component.js +1 -1
  871. package/dist/components/status-indicator/status-indicator.js +1 -1
  872. package/dist/components/stepper/stepper.component.js +1 -1
  873. package/dist/components/stepper/stepper.js +1 -1
  874. package/dist/components/stepper-step/stepper-step.component.js +1 -1
  875. package/dist/components/stepper-step/stepper-step.js +1 -1
  876. package/dist/components/tab/tab.component.js +1 -1
  877. package/dist/components/tab/tab.js +1 -1
  878. package/dist/components/tab-panel/tab-panel.component.js +1 -1
  879. package/dist/components/tab-panel/tab-panel.js +1 -1
  880. package/dist/components/tabs/tabs.component.d.ts +2 -1
  881. package/dist/components/tabs/tabs.component.js +1 -1
  882. package/dist/components/tabs/tabs.js +1 -1
  883. package/dist/components/tag/tag.component.js +1 -1
  884. package/dist/components/tag/tag.js +1 -1
  885. package/dist/components/textarea/textarea.component.js +1 -1
  886. package/dist/components/textarea/textarea.js +1 -1
  887. package/dist/components/time-average-map/time-average-map.component.d.ts +10 -14
  888. package/dist/components/time-average-map/time-average-map.component.js +1 -1
  889. package/dist/components/time-average-map/time-average-map.controller.js +1 -1
  890. package/dist/components/time-average-map/time-average-map.js +1 -1
  891. package/dist/components/time-series/time-series.component.d.ts +2 -10
  892. package/dist/components/time-series/time-series.component.js +1 -1
  893. package/dist/components/time-series/time-series.controller.js +1 -1
  894. package/dist/components/time-series/time-series.js +1 -1
  895. package/dist/components/toast/toast.component.js +1 -1
  896. package/dist/components/toast/toast.js +1 -1
  897. package/dist/components/toggle/toggle.component.js +1 -1
  898. package/dist/components/toggle/toggle.js +1 -1
  899. package/dist/components/tooltip/tooltip.component.js +1 -1
  900. package/dist/components/tooltip/tooltip.js +1 -1
  901. package/dist/components/variable-combobox/variable-combobox.component.d.ts +5 -9
  902. package/dist/components/variable-combobox/variable-combobox.component.js +1 -1
  903. package/dist/components/variable-combobox/variable-combobox.js +1 -1
  904. package/dist/components/variable-keyword-search/variable-keyword-search.component.d.ts +2 -2
  905. package/dist/components/variable-keyword-search/variable-keyword-search.component.js +1 -1
  906. package/dist/components/variable-keyword-search/variable-keyword-search.js +1 -1
  907. package/dist/custom-elements.json +10670 -8582
  908. package/dist/events/events.d.ts +2 -2
  909. package/dist/events/terra-map.d.ts +55 -0
  910. package/dist/mixins/auth.mixin.d.ts +23 -0
  911. package/dist/mixins/mixin.types.d.ts +1 -0
  912. package/dist/mixins/query-client.mixin.d.ts +1 -1
  913. package/dist/react/accordion/index.js +1 -1
  914. package/dist/react/alert/index.js +1 -1
  915. package/dist/react/avatar/index.js +1 -1
  916. package/dist/react/badge/index.js +1 -1
  917. package/dist/react/banner/index.js +1 -1
  918. package/dist/react/breadcrumb/index.js +1 -1
  919. package/dist/react/breadcrumbs/index.js +1 -1
  920. package/dist/react/browse-variables/index.js +1 -1
  921. package/dist/react/button/index.js +1 -1
  922. package/dist/react/button-group/index.js +1 -1
  923. package/dist/react/caption/index.js +1 -1
  924. package/dist/react/card/index.js +1 -1
  925. package/dist/react/checkbox/index.js +1 -1
  926. package/dist/react/chip/index.js +1 -1
  927. package/dist/react/combobox/index.js +1 -1
  928. package/dist/react/data-access/index.js +1 -1
  929. package/dist/react/data-grid/index.js +1 -1
  930. package/dist/react/data-rods/index.d.ts +6 -1
  931. package/dist/react/data-rods/index.js +1 -1
  932. package/dist/react/data-subsetter/index.d.ts +3 -0
  933. package/dist/react/data-subsetter/index.js +1 -1
  934. package/dist/react/data-subsetter-history/index.d.ts +6 -1
  935. package/dist/react/data-subsetter-history/index.js +1 -1
  936. package/dist/react/date-picker/index.js +1 -1
  937. package/dist/react/date-range-slider/index.js +1 -1
  938. package/dist/react/dialog/index.js +1 -1
  939. package/dist/react/divider/index.js +1 -1
  940. package/dist/react/dropdown/index.js +1 -1
  941. package/dist/react/earthdata-login/index.js +1 -1
  942. package/dist/react/file-upload/index.js +1 -1
  943. package/dist/react/harmony-history/index.d.ts +3 -0
  944. package/dist/react/harmony-history/index.js +1 -1
  945. package/dist/react/icon/index.js +1 -1
  946. package/dist/react/index.d.ts +24 -24
  947. package/dist/react/index.js +1 -1
  948. package/dist/react/input/index.js +1 -1
  949. package/dist/react/loader/index.js +1 -1
  950. package/dist/react/login/index.js +1 -1
  951. package/dist/react/map/index.d.ts +32 -1
  952. package/dist/react/map/index.js +1 -1
  953. package/dist/react/menu/index.js +1 -1
  954. package/dist/react/menu-item/index.js +1 -1
  955. package/dist/react/option/index.js +1 -1
  956. package/dist/react/pagination/index.js +1 -1
  957. package/dist/react/plot/index.js +1 -1
  958. package/dist/react/plot-toolbar/index.d.ts +6 -1
  959. package/dist/react/plot-toolbar/index.js +1 -1
  960. package/dist/react/popup/index.js +1 -1
  961. package/dist/react/progress-bar/index.js +1 -1
  962. package/dist/react/radio/index.js +1 -1
  963. package/dist/react/radio-group/index.js +1 -1
  964. package/dist/react/scroll-hint/index.js +1 -1
  965. package/dist/react/select/index.js +1 -1
  966. package/dist/react/site-header/index.js +1 -1
  967. package/dist/react/site-navigation/index.js +1 -1
  968. package/dist/react/skeleton/index.js +1 -1
  969. package/dist/react/slider/index.js +1 -1
  970. package/dist/react/spatial-picker/index.js +1 -1
  971. package/dist/react/status-indicator/index.js +1 -1
  972. package/dist/react/stepper/index.js +1 -1
  973. package/dist/react/stepper-step/index.js +1 -1
  974. package/dist/react/tab/index.js +1 -1
  975. package/dist/react/tab-panel/index.js +1 -1
  976. package/dist/react/tabs/index.js +1 -1
  977. package/dist/react/tag/index.js +1 -1
  978. package/dist/react/textarea/index.js +1 -1
  979. package/dist/react/time-average-map/index.d.ts +6 -1
  980. package/dist/react/time-average-map/index.js +1 -1
  981. package/dist/react/time-series/index.d.ts +3 -0
  982. package/dist/react/time-series/index.js +1 -1
  983. package/dist/react/toast/index.js +1 -1
  984. package/dist/react/toggle/index.js +1 -1
  985. package/dist/react/tooltip/index.js +1 -1
  986. package/dist/react/variable-combobox/index.d.ts +4 -1
  987. package/dist/react/variable-combobox/index.js +1 -1
  988. package/dist/react/variable-keyword-search/index.d.ts +1 -1
  989. package/dist/react/variable-keyword-search/index.js +1 -1
  990. package/dist/terra-ui-components.js +1 -1
  991. package/dist/terra_ui_components-0.0.205-py3-none-any.whl +0 -0
  992. package/dist/terra_ui_components-0.0.205.tar.gz +0 -0
  993. package/dist/types/vue/index.d.ts +1037 -870
  994. package/dist/utilities/date.d.ts +4 -0
  995. package/dist/utilities/date.js +1 -1
  996. package/dist/utilities/variable-task.js +1 -1
  997. package/dist/vscode.html-custom-data.json +692 -661
  998. package/dist/web-types.json +2243 -2077
  999. package/package.json +6 -4
  1000. package/cdn/auth/auth.controller.d.ts +0 -16
  1001. package/cdn/chunks/GeoTIFF.KMHPSKO6.js +0 -19975
  1002. package/cdn/chunks/chunk.27KCXEZH.js +0 -431
  1003. package/cdn/chunks/chunk.2AFX3VCL.js +0 -125
  1004. package/cdn/chunks/chunk.2DFPSVL6.js +0 -68
  1005. package/cdn/chunks/chunk.2DPXUVUW.js +0 -357
  1006. package/cdn/chunks/chunk.2EKGBKN2.js +0 -19
  1007. package/cdn/chunks/chunk.2FSYZKPK.js +0 -29
  1008. package/cdn/chunks/chunk.2HXJHNH3.js +0 -5339
  1009. package/cdn/chunks/chunk.2IA6WV7R.js +0 -19
  1010. package/cdn/chunks/chunk.2NRTTHOD.js +0 -30
  1011. package/cdn/chunks/chunk.2PJPIGBI.js +0 -1122
  1012. package/cdn/chunks/chunk.2RYJM2TF.js +0 -19
  1013. package/cdn/chunks/chunk.2UATMVXP.js +0 -261
  1014. package/cdn/chunks/chunk.2UUMIAXS.js +0 -19
  1015. package/cdn/chunks/chunk.3A3QJT7L.js +0 -29
  1016. package/cdn/chunks/chunk.3UXSNM76.js +0 -32
  1017. package/cdn/chunks/chunk.4CVCW4V3.js +0 -32
  1018. package/cdn/chunks/chunk.4HFZS2GO.js +0 -19
  1019. package/cdn/chunks/chunk.4KCMI4UU.js +0 -1036
  1020. package/cdn/chunks/chunk.4M7FMP7T.js +0 -442
  1021. package/cdn/chunks/chunk.4OETFOY2.js +0 -71
  1022. package/cdn/chunks/chunk.4UI7P3Y4.js +0 -19
  1023. package/cdn/chunks/chunk.4VE4DO4N.js +0 -19
  1024. package/cdn/chunks/chunk.4YE3LB3R.js +0 -19
  1025. package/cdn/chunks/chunk.4ZBYMDD6.js +0 -189
  1026. package/cdn/chunks/chunk.5CDWDWX5.js +0 -136
  1027. package/cdn/chunks/chunk.5CLU2XHI.js +0 -29
  1028. package/cdn/chunks/chunk.5G4MIKDW.js +0 -19
  1029. package/cdn/chunks/chunk.5KHCLX4N.js +0 -64743
  1030. package/cdn/chunks/chunk.5N76KCT4.js +0 -285
  1031. package/cdn/chunks/chunk.5OEHZWXQ.js +0 -19
  1032. package/cdn/chunks/chunk.5U22JWZL.js +0 -117
  1033. package/cdn/chunks/chunk.5USXBJV5.js +0 -35
  1034. package/cdn/chunks/chunk.5YQFC77E.js +0 -37
  1035. package/cdn/chunks/chunk.6E7Z4C4E.js +0 -19
  1036. package/cdn/chunks/chunk.6FWN6ZZC.js +0 -32
  1037. package/cdn/chunks/chunk.6J2OCJ7J.js +0 -84
  1038. package/cdn/chunks/chunk.6LOJQVYN.js +0 -36
  1039. package/cdn/chunks/chunk.6OC7H5OH.js +0 -28
  1040. package/cdn/chunks/chunk.6QEEVDUE.js +0 -427
  1041. package/cdn/chunks/chunk.6SAM6SI7.js +0 -19
  1042. package/cdn/chunks/chunk.6VTIK2C6.js +0 -19
  1043. package/cdn/chunks/chunk.75FXMQOA.js +0 -19
  1044. package/cdn/chunks/chunk.7HUACA54.js +0 -29
  1045. package/cdn/chunks/chunk.7L2TSDLJ.js +0 -2028
  1046. package/cdn/chunks/chunk.7N55EAUN.js +0 -17305
  1047. package/cdn/chunks/chunk.7VOSRG7X.js +0 -19
  1048. package/cdn/chunks/chunk.7WUVQEAR.js +0 -256
  1049. package/cdn/chunks/chunk.7Y44JBIB.js +0 -550
  1050. package/cdn/chunks/chunk.7ZI27RZO.js +0 -1136
  1051. package/cdn/chunks/chunk.ACUUMB46.js +0 -33
  1052. package/cdn/chunks/chunk.AFJMWE55.js +0 -29
  1053. package/cdn/chunks/chunk.AH535OUT.js +0 -19
  1054. package/cdn/chunks/chunk.AJTI5LZT.js +0 -60
  1055. package/cdn/chunks/chunk.AL34JKBE.js +0 -19
  1056. package/cdn/chunks/chunk.ANOS3OTE.js +0 -29
  1057. package/cdn/chunks/chunk.AP5WCU4L.js +0 -134
  1058. package/cdn/chunks/chunk.AQQD3TGI.js +0 -19
  1059. package/cdn/chunks/chunk.AWU6UL7H.js +0 -19
  1060. package/cdn/chunks/chunk.AYV43FGZ.js +0 -110
  1061. package/cdn/chunks/chunk.B6MUHPWI.js +0 -19
  1062. package/cdn/chunks/chunk.BHW5IL3I.js +0 -19
  1063. package/cdn/chunks/chunk.BPRI6OGA.js +0 -29
  1064. package/cdn/chunks/chunk.BPTWMSFM.js +0 -259
  1065. package/cdn/chunks/chunk.BTPIPKWK.js +0 -29
  1066. package/cdn/chunks/chunk.C2SRCC4M.js +0 -19
  1067. package/cdn/chunks/chunk.C3SXIMJF.js +0 -29
  1068. package/cdn/chunks/chunk.CDYBBCIE.js +0 -29
  1069. package/cdn/chunks/chunk.CHKUZKW6.js +0 -19
  1070. package/cdn/chunks/chunk.CJG6IYUQ.js +0 -699
  1071. package/cdn/chunks/chunk.COA7ZPCF.js +0 -86
  1072. package/cdn/chunks/chunk.CV4QCJYB.js +0 -29
  1073. package/cdn/chunks/chunk.CV7V62DS.js +0 -33
  1074. package/cdn/chunks/chunk.CWNNDPJR.js +0 -36
  1075. package/cdn/chunks/chunk.CWVFOCEY.js +0 -123
  1076. package/cdn/chunks/chunk.D6DZ2ABR.js +0 -19
  1077. package/cdn/chunks/chunk.DAHT4D47.js +0 -19
  1078. package/cdn/chunks/chunk.DDCWMDIC.js +0 -32
  1079. package/cdn/chunks/chunk.DNVJF7IY.js +0 -39
  1080. package/cdn/chunks/chunk.DOAEM5ON.js +0 -4083
  1081. package/cdn/chunks/chunk.DOLQGIFG.js +0 -19
  1082. package/cdn/chunks/chunk.DPKA4G53.js +0 -601
  1083. package/cdn/chunks/chunk.DTUP6KDY.js +0 -19
  1084. package/cdn/chunks/chunk.DXQUJESD.js +0 -8969
  1085. package/cdn/chunks/chunk.E52YFLSL.js +0 -32
  1086. package/cdn/chunks/chunk.E6S2GD5C.js +0 -31
  1087. package/cdn/chunks/chunk.EQDMPPT6.js +0 -1413
  1088. package/cdn/chunks/chunk.ERJEIORY.js +0 -36
  1089. package/cdn/chunks/chunk.F26CV3RM.js +0 -32
  1090. package/cdn/chunks/chunk.F5ATUIYK.js +0 -29
  1091. package/cdn/chunks/chunk.FALB73Y2.js +0 -37
  1092. package/cdn/chunks/chunk.FCQ22IGW.js +0 -104
  1093. package/cdn/chunks/chunk.FQ6BZ3IY.js +0 -234
  1094. package/cdn/chunks/chunk.FS3BAWIP.js +0 -19
  1095. package/cdn/chunks/chunk.FUANKNNM.js +0 -19
  1096. package/cdn/chunks/chunk.FVMOO5PZ.js +0 -111
  1097. package/cdn/chunks/chunk.FWA7FNBM.js +0 -29
  1098. package/cdn/chunks/chunk.FXGGRWLG.js +0 -106
  1099. package/cdn/chunks/chunk.G5C4B32K.js +0 -32
  1100. package/cdn/chunks/chunk.GAE7V6RB.js +0 -93
  1101. package/cdn/chunks/chunk.GBGE6X2T.js +0 -1018
  1102. package/cdn/chunks/chunk.GBR3XNSE.js +0 -19
  1103. package/cdn/chunks/chunk.GDXZZBNN.js +0 -29
  1104. package/cdn/chunks/chunk.GEZJ4HAT.js +0 -128
  1105. package/cdn/chunks/chunk.GHYNGNCL.js +0 -19
  1106. package/cdn/chunks/chunk.GVSCZXYP.js +0 -152
  1107. package/cdn/chunks/chunk.H4THPLKV.js +0 -375
  1108. package/cdn/chunks/chunk.H6DYN62P.js +0 -19
  1109. package/cdn/chunks/chunk.H7ILJBVJ.js +0 -29
  1110. package/cdn/chunks/chunk.HA24JYMN.js +0 -34
  1111. package/cdn/chunks/chunk.HBVD5YDA.js +0 -19
  1112. package/cdn/chunks/chunk.HDOVTS2Z.js +0 -333
  1113. package/cdn/chunks/chunk.HE3V76OH.js +0 -29
  1114. package/cdn/chunks/chunk.HSQJHXWN.js +0 -19
  1115. package/cdn/chunks/chunk.HWXTC2NL.js +0 -475
  1116. package/cdn/chunks/chunk.I3ZCGZPC.js +0 -629
  1117. package/cdn/chunks/chunk.IDRFRYGU.js +0 -19
  1118. package/cdn/chunks/chunk.IPAGICZN.js +0 -38
  1119. package/cdn/chunks/chunk.IUV6CTRY.js +0 -231
  1120. package/cdn/chunks/chunk.IW2V63Q4.js +0 -278
  1121. package/cdn/chunks/chunk.J2QE6B7T.js +0 -158
  1122. package/cdn/chunks/chunk.J5WVGYHM.js +0 -1071
  1123. package/cdn/chunks/chunk.JGXF7ZXQ.js +0 -32
  1124. package/cdn/chunks/chunk.JTDMKEVX.js +0 -19
  1125. package/cdn/chunks/chunk.JU2BT7V3.js +0 -29
  1126. package/cdn/chunks/chunk.JUAS37EG.js +0 -47
  1127. package/cdn/chunks/chunk.KCLVMBYX.js +0 -19
  1128. package/cdn/chunks/chunk.KLVTN4RA.js +0 -1780
  1129. package/cdn/chunks/chunk.KNOXZXLV.js +0 -62
  1130. package/cdn/chunks/chunk.KNWDEVCZ.js +0 -872
  1131. package/cdn/chunks/chunk.KTH7B5P7.js +0 -32
  1132. package/cdn/chunks/chunk.KVXAUKHU.js +0 -29
  1133. package/cdn/chunks/chunk.L453DWOS.js +0 -162
  1134. package/cdn/chunks/chunk.L4APEYLE.js +0 -33
  1135. package/cdn/chunks/chunk.L6RUQB6F.js +0 -113
  1136. package/cdn/chunks/chunk.LEJPCXRH.js +0 -575
  1137. package/cdn/chunks/chunk.LGHXPOGX.js +0 -19
  1138. package/cdn/chunks/chunk.LMFFT6QZ.js +0 -19
  1139. package/cdn/chunks/chunk.LV52UGIG.js +0 -19
  1140. package/cdn/chunks/chunk.LYTJDP4F.js +0 -528
  1141. package/cdn/chunks/chunk.M6TNRFZO.js +0 -32
  1142. package/cdn/chunks/chunk.MB55MNWI.js +0 -132
  1143. package/cdn/chunks/chunk.MDV3HVPR.js +0 -82
  1144. package/cdn/chunks/chunk.MKKKY7LJ.js +0 -17565
  1145. package/cdn/chunks/chunk.ML6OFHI2.js +0 -60
  1146. package/cdn/chunks/chunk.MMMP6IHT.js +0 -36
  1147. package/cdn/chunks/chunk.MR7XEWMN.js +0 -29
  1148. package/cdn/chunks/chunk.N26HWWE7.js +0 -92
  1149. package/cdn/chunks/chunk.N6YZ3GGB.js +0 -19
  1150. package/cdn/chunks/chunk.NKJ73Q6Z.js +0 -101
  1151. package/cdn/chunks/chunk.NOJRNK7A.js +0 -1303
  1152. package/cdn/chunks/chunk.O5KNCAFH.js +0 -29
  1153. package/cdn/chunks/chunk.OHLWFMUZ.js +0 -19
  1154. package/cdn/chunks/chunk.OK2PJLA4.js +0 -19
  1155. package/cdn/chunks/chunk.OMERHZ7O.js +0 -1646
  1156. package/cdn/chunks/chunk.OQR3DOIL.js +0 -29
  1157. package/cdn/chunks/chunk.OVV6CMBK.js +0 -74
  1158. package/cdn/chunks/chunk.OXFYKL76.js +0 -19
  1159. package/cdn/chunks/chunk.P5MFJJGP.js +0 -195
  1160. package/cdn/chunks/chunk.P6OHZPUZ.js +0 -2786
  1161. package/cdn/chunks/chunk.PH3LKMHS.js +0 -32
  1162. package/cdn/chunks/chunk.PIEU7GT4.js +0 -29
  1163. package/cdn/chunks/chunk.PILGSWUJ.js +0 -29
  1164. package/cdn/chunks/chunk.PLI3TNYY.js +0 -33
  1165. package/cdn/chunks/chunk.PPCOW47J.js +0 -535
  1166. package/cdn/chunks/chunk.PRI7AVJX.js +0 -19
  1167. package/cdn/chunks/chunk.PWPIV2JK.js +0 -225
  1168. package/cdn/chunks/chunk.QCEPDQ6M.js +0 -32
  1169. package/cdn/chunks/chunk.QJUVJPT6.js +0 -19
  1170. package/cdn/chunks/chunk.QP2APML5.js +0 -536
  1171. package/cdn/chunks/chunk.QS7RKQGD.js +0 -19
  1172. package/cdn/chunks/chunk.QZCCAT7W.js +0 -19
  1173. package/cdn/chunks/chunk.QZIIYAVZ.js +0 -19
  1174. package/cdn/chunks/chunk.QZQ7MTL4.js +0 -34
  1175. package/cdn/chunks/chunk.RBBPG6SO.js +0 -621
  1176. package/cdn/chunks/chunk.RL57R2DM.js +0 -37
  1177. package/cdn/chunks/chunk.RMUH4JXF.js +0 -35
  1178. package/cdn/chunks/chunk.RSH7CL7U.js +0 -310
  1179. package/cdn/chunks/chunk.RXXY2DKG.js +0 -19
  1180. package/cdn/chunks/chunk.S5BNWB7B.js +0 -185
  1181. package/cdn/chunks/chunk.SDVBNJQZ.js +0 -19
  1182. package/cdn/chunks/chunk.SIK75J6S.js +0 -35
  1183. package/cdn/chunks/chunk.SJEEWCBY.js +0 -19
  1184. package/cdn/chunks/chunk.SQWR5Y2X.js +0 -134
  1185. package/cdn/chunks/chunk.SWNYIRFX.js +0 -19
  1186. package/cdn/chunks/chunk.SZJZTSTJ.js +0 -36
  1187. package/cdn/chunks/chunk.T35HK4YD.js +0 -83
  1188. package/cdn/chunks/chunk.T4QHXOJU.js +0 -29
  1189. package/cdn/chunks/chunk.T7A4P7JA.js +0 -19
  1190. package/cdn/chunks/chunk.TA7CFXHM.js +0 -276
  1191. package/cdn/chunks/chunk.TBL6KAUU.js +0 -19
  1192. package/cdn/chunks/chunk.TDCXTEE4.js +0 -29
  1193. package/cdn/chunks/chunk.TFX7LPOA.js +0 -29
  1194. package/cdn/chunks/chunk.TTKS7OPN.js +0 -49
  1195. package/cdn/chunks/chunk.TW72W3FG.js +0 -41
  1196. package/cdn/chunks/chunk.TZ7K6LRZ.js +0 -29
  1197. package/cdn/chunks/chunk.U64UG2NF.js +0 -897
  1198. package/cdn/chunks/chunk.UCGET3OV.js +0 -610
  1199. package/cdn/chunks/chunk.UFODDLBF.js +0 -190
  1200. package/cdn/chunks/chunk.UI7I6F4E.js +0 -29
  1201. package/cdn/chunks/chunk.UL6GPUWY.js +0 -169
  1202. package/cdn/chunks/chunk.UNE5PGU3.js +0 -149
  1203. package/cdn/chunks/chunk.USSOPHIF.js +0 -161
  1204. package/cdn/chunks/chunk.UVQGTCUS.js +0 -621
  1205. package/cdn/chunks/chunk.VAS4SJTV.js +0 -893
  1206. package/cdn/chunks/chunk.VATEZWZS.js +0 -360
  1207. package/cdn/chunks/chunk.VCKHZSH2.js +0 -19
  1208. package/cdn/chunks/chunk.VHHZPEYC.js +0 -29
  1209. package/cdn/chunks/chunk.VM6WPB7T.js +0 -32
  1210. package/cdn/chunks/chunk.VNCKECHZ.js +0 -853
  1211. package/cdn/chunks/chunk.VPMAHEJA.js +0 -32
  1212. package/cdn/chunks/chunk.VQF367DL.js +0 -35
  1213. package/cdn/chunks/chunk.VUXL5UGT.js +0 -2574
  1214. package/cdn/chunks/chunk.W5FQPPPY.js +0 -19
  1215. package/cdn/chunks/chunk.WCBO7P6T.js +0 -34
  1216. package/cdn/chunks/chunk.WO24QJYS.js +0 -1005
  1217. package/cdn/chunks/chunk.WSRDV4NV.js +0 -19
  1218. package/cdn/chunks/chunk.WTGU6E45.js +0 -224
  1219. package/cdn/chunks/chunk.XDVFVONG.js +0 -1945
  1220. package/cdn/chunks/chunk.XNJGPB57.js +0 -35
  1221. package/cdn/chunks/chunk.XXLSM7RI.js +0 -138
  1222. package/cdn/chunks/chunk.Y6OCTUUR.js +0 -19
  1223. package/cdn/chunks/chunk.YAWLOXFX.js +0 -271
  1224. package/cdn/chunks/chunk.YJHDQGK3.js +0 -19
  1225. package/cdn/chunks/chunk.YN7XE2VP.js +0 -940
  1226. package/cdn/chunks/chunk.YTKNBCBF.js +0 -19
  1227. package/cdn/chunks/chunk.Z3PZC46D.js +0 -33
  1228. package/cdn/chunks/chunk.Z5U6BAQK.js +0 -292
  1229. package/cdn/chunks/chunk.ZAS2SUGL.js +0 -19
  1230. package/cdn/chunks/chunk.ZI2LY2UP.js +0 -524
  1231. package/cdn/chunks/chunk.ZRSUDLUY.js +0 -754
  1232. package/cdn/chunks/chunk.ZWUG6EZN.js +0 -544
  1233. package/cdn/chunks/chunk.ZYF3AML6.js +0 -521
  1234. package/cdn/chunks/chunk.ZYGBGEUR.js +0 -48
  1235. package/cdn/chunks/chunk.ZYYDEEKW.js +0 -19
  1236. package/cdn/chunks/lerc.OJS5YQI3.js +0 -2099
  1237. package/cdn/events/terra-map-change.d.ts +0 -14
  1238. package/dist/auth/auth.controller.d.ts +0 -16
  1239. package/dist/chunks/chunk.24QTPUF2.js +0 -6
  1240. package/dist/chunks/chunk.2A67CXHH.js +0 -5
  1241. package/dist/chunks/chunk.2PQNGBP2.js +0 -1
  1242. package/dist/chunks/chunk.2SYEDAOV.js +0 -1
  1243. package/dist/chunks/chunk.2UREYJJ6.js +0 -65
  1244. package/dist/chunks/chunk.2URJIUFD.js +0 -1
  1245. package/dist/chunks/chunk.2VLYWQGB.js +0 -1
  1246. package/dist/chunks/chunk.2XENK37L.js +0 -20
  1247. package/dist/chunks/chunk.33ZH43TV.js +0 -1
  1248. package/dist/chunks/chunk.345UCNEF.js +0 -1
  1249. package/dist/chunks/chunk.347H65MH.js +0 -1
  1250. package/dist/chunks/chunk.3BGJ2Y4W.js +0 -1
  1251. package/dist/chunks/chunk.3OSNYXIB.js +0 -37
  1252. package/dist/chunks/chunk.3SBCV5YV.js +0 -74
  1253. package/dist/chunks/chunk.4AODHTLA.js +0 -1
  1254. package/dist/chunks/chunk.4JUNRLEC.js +0 -1
  1255. package/dist/chunks/chunk.4O6EGUET.js +0 -6
  1256. package/dist/chunks/chunk.4PNNISNN.js +0 -12
  1257. package/dist/chunks/chunk.4PXK26WC.js +0 -1
  1258. package/dist/chunks/chunk.4RJ73FTA.js +0 -1
  1259. package/dist/chunks/chunk.5DG6GZR2.js +0 -1
  1260. package/dist/chunks/chunk.5OFG6SIJ.js +0 -1
  1261. package/dist/chunks/chunk.5UIZ5N7P.js +0 -345
  1262. package/dist/chunks/chunk.5WH5YKQV.js +0 -129
  1263. package/dist/chunks/chunk.5WXBL2P4.js +0 -299
  1264. package/dist/chunks/chunk.5YTPWERZ.js +0 -1
  1265. package/dist/chunks/chunk.67VTCJF4.js +0 -527
  1266. package/dist/chunks/chunk.6DD3MA2P.js +0 -1
  1267. package/dist/chunks/chunk.6J72MJEC.js +0 -1
  1268. package/dist/chunks/chunk.6OCFGLDL.js +0 -1
  1269. package/dist/chunks/chunk.6Q54KXMC.js +0 -157
  1270. package/dist/chunks/chunk.6R6NM245.js +0 -39
  1271. package/dist/chunks/chunk.6SHAP35V.js +0 -55
  1272. package/dist/chunks/chunk.6SW4NJHL.js +0 -42
  1273. package/dist/chunks/chunk.6TALLYX6.js +0 -1
  1274. package/dist/chunks/chunk.6ZIINXUV.js +0 -1
  1275. package/dist/chunks/chunk.7D3QWHPQ.js +0 -1
  1276. package/dist/chunks/chunk.7DGA6X4U.js +0 -23
  1277. package/dist/chunks/chunk.7KZSDLA2.js +0 -11
  1278. package/dist/chunks/chunk.7LR6X6Z6.js +0 -1
  1279. package/dist/chunks/chunk.7TW5XUJL.js +0 -1
  1280. package/dist/chunks/chunk.7V4HIKGV.js +0 -20
  1281. package/dist/chunks/chunk.A3VSFB3O.js +0 -1
  1282. package/dist/chunks/chunk.ADGVYX3D.js +0 -1
  1283. package/dist/chunks/chunk.ALYHNSZZ.js +0 -30
  1284. package/dist/chunks/chunk.AMKSX4J2.js +0 -1
  1285. package/dist/chunks/chunk.AVBBSQQN.js +0 -26
  1286. package/dist/chunks/chunk.BCBEL5J3.js +0 -1
  1287. package/dist/chunks/chunk.BFSQRKZP.js +0 -67
  1288. package/dist/chunks/chunk.BIMQKSIE.js +0 -1
  1289. package/dist/chunks/chunk.BJFYPKRH.js +0 -1
  1290. package/dist/chunks/chunk.BK22YUL3.js +0 -1
  1291. package/dist/chunks/chunk.BMUYWCSS.js +0 -1
  1292. package/dist/chunks/chunk.BRHNY634.js +0 -1
  1293. package/dist/chunks/chunk.BVNNUSMK.js +0 -1
  1294. package/dist/chunks/chunk.C6CZYR3X.js +0 -1
  1295. package/dist/chunks/chunk.C6YOBRFC.js +0 -1
  1296. package/dist/chunks/chunk.CO3YFDGB.js +0 -27
  1297. package/dist/chunks/chunk.CQK6QHLB.js +0 -1
  1298. package/dist/chunks/chunk.CQPFMW2K.js +0 -1
  1299. package/dist/chunks/chunk.CRDPEWYE.js +0 -1
  1300. package/dist/chunks/chunk.CS4EGLGP.js +0 -1
  1301. package/dist/chunks/chunk.CSXC6DPV.js +0 -280
  1302. package/dist/chunks/chunk.DH6S4SMY.js +0 -9
  1303. package/dist/chunks/chunk.DKS4TU3H.js +0 -1
  1304. package/dist/chunks/chunk.DTISX46U.js +0 -1
  1305. package/dist/chunks/chunk.DWB7WY2B.js +0 -1
  1306. package/dist/chunks/chunk.DYY5ZEGD.js +0 -8
  1307. package/dist/chunks/chunk.E264AGUB.js +0 -1
  1308. package/dist/chunks/chunk.E2LODYPF.js +0 -1
  1309. package/dist/chunks/chunk.E36ROOQP.js +0 -1
  1310. package/dist/chunks/chunk.E6SYKRYA.js +0 -18
  1311. package/dist/chunks/chunk.E7D32WNL.js +0 -99
  1312. package/dist/chunks/chunk.EAIG3OAM.js +0 -1
  1313. package/dist/chunks/chunk.EPJM7OIN.js +0 -1
  1314. package/dist/chunks/chunk.EYLQFCG6.js +0 -1
  1315. package/dist/chunks/chunk.F2LSSWTW.js +0 -1
  1316. package/dist/chunks/chunk.F2OOGC7E.js +0 -1
  1317. package/dist/chunks/chunk.F463ZO54.js +0 -26
  1318. package/dist/chunks/chunk.F4QJ3AAN.js +0 -1
  1319. package/dist/chunks/chunk.FCLASTZJ.js +0 -59
  1320. package/dist/chunks/chunk.FEUU6PRO.js +0 -1231
  1321. package/dist/chunks/chunk.FFJ4LVA4.js +0 -1
  1322. package/dist/chunks/chunk.FLY7SZ43.js +0 -1
  1323. package/dist/chunks/chunk.FTSUICBL.js +0 -5
  1324. package/dist/chunks/chunk.FU4VAT7K.js +0 -126
  1325. package/dist/chunks/chunk.FY5MRGO2.js +0 -4
  1326. package/dist/chunks/chunk.G2RBM77C.js +0 -80
  1327. package/dist/chunks/chunk.G5WS7EAO.js +0 -1
  1328. package/dist/chunks/chunk.GCVZMOL6.js +0 -1
  1329. package/dist/chunks/chunk.GFJZ3U6O.js +0 -1
  1330. package/dist/chunks/chunk.GVQ3ULCA.js +0 -1
  1331. package/dist/chunks/chunk.GVWKFBDB.js +0 -1
  1332. package/dist/chunks/chunk.GZC4MHZL.js +0 -1
  1333. package/dist/chunks/chunk.GZJI67IH.js +0 -1
  1334. package/dist/chunks/chunk.HBM2PGPH.js +0 -1
  1335. package/dist/chunks/chunk.HFNSDYFF.js +0 -1
  1336. package/dist/chunks/chunk.HJ7H55BL.js +0 -1
  1337. package/dist/chunks/chunk.HMGPFX2Y.js +0 -1
  1338. package/dist/chunks/chunk.IGXIZYGS.js +0 -1
  1339. package/dist/chunks/chunk.IKZERRE2.js +0 -1
  1340. package/dist/chunks/chunk.IL752DKI.js +0 -1
  1341. package/dist/chunks/chunk.ILG3LGC7.js +0 -1
  1342. package/dist/chunks/chunk.ILLKI5UT.js +0 -1
  1343. package/dist/chunks/chunk.IT5GSXLK.js +0 -1
  1344. package/dist/chunks/chunk.IX7TDXLM.js +0 -1
  1345. package/dist/chunks/chunk.J74HQDC4.js +0 -113
  1346. package/dist/chunks/chunk.JDUDVTGM.js +0 -33
  1347. package/dist/chunks/chunk.JER3EYSI.js +0 -43
  1348. package/dist/chunks/chunk.JFQVCD2G.js +0 -1
  1349. package/dist/chunks/chunk.JJDVDIMZ.js +0 -1
  1350. package/dist/chunks/chunk.JUCYMLNQ.js +0 -24
  1351. package/dist/chunks/chunk.JWV3256S.js +0 -1
  1352. package/dist/chunks/chunk.K3JWAUPW.js +0 -1
  1353. package/dist/chunks/chunk.K7EEMK7S.js +0 -1
  1354. package/dist/chunks/chunk.KQQP67QH.js +0 -1
  1355. package/dist/chunks/chunk.L7LZXSLB.js +0 -1
  1356. package/dist/chunks/chunk.L7TU4EE7.js +0 -1
  1357. package/dist/chunks/chunk.LBQFMWHH.js +0 -1
  1358. package/dist/chunks/chunk.LHS2JI5C.js +0 -1
  1359. package/dist/chunks/chunk.LRB2T4C6.js +0 -1
  1360. package/dist/chunks/chunk.LSBA65NF.js +0 -55
  1361. package/dist/chunks/chunk.LVJYASQH.js +0 -41
  1362. package/dist/chunks/chunk.M5IM24X6.js +0 -1
  1363. package/dist/chunks/chunk.M7GAVBP4.js +0 -1
  1364. package/dist/chunks/chunk.MRAFQ6FC.js +0 -1
  1365. package/dist/chunks/chunk.MSEAPM5O.js +0 -43
  1366. package/dist/chunks/chunk.MXJCFEZ4.js +0 -780
  1367. package/dist/chunks/chunk.NFGRTKHK.js +0 -35
  1368. package/dist/chunks/chunk.NM6S6YGL.js +0 -30
  1369. package/dist/chunks/chunk.NNGAFMYS.js +0 -1
  1370. package/dist/chunks/chunk.NS34WRBV.js +0 -154
  1371. package/dist/chunks/chunk.NZ4QJK47.js +0 -176
  1372. package/dist/chunks/chunk.NZERF5GE.js +0 -1
  1373. package/dist/chunks/chunk.O36CSOQK.js +0 -11
  1374. package/dist/chunks/chunk.OAFIM27Q.js +0 -1
  1375. package/dist/chunks/chunk.OBJ27374.js +0 -1
  1376. package/dist/chunks/chunk.ONZTNAIQ.js +0 -1
  1377. package/dist/chunks/chunk.OQ4IT42W.js +0 -1
  1378. package/dist/chunks/chunk.OSAQ45F4.js +0 -145
  1379. package/dist/chunks/chunk.OSDEVN34.js +0 -1001
  1380. package/dist/chunks/chunk.P23PNMO2.js +0 -1
  1381. package/dist/chunks/chunk.PGC2LCDL.js +0 -1
  1382. package/dist/chunks/chunk.PGUHY4NZ.js +0 -1
  1383. package/dist/chunks/chunk.PHWB36E5.js +0 -4
  1384. package/dist/chunks/chunk.PIP3HL2S.js +0 -1
  1385. package/dist/chunks/chunk.PM3RUTRJ.js +0 -1
  1386. package/dist/chunks/chunk.PNRCW5GH.js +0 -48
  1387. package/dist/chunks/chunk.PO5EHL4Q.js +0 -1
  1388. package/dist/chunks/chunk.PSNV3IQZ.js +0 -1
  1389. package/dist/chunks/chunk.Q6CVPPFA.js +0 -1
  1390. package/dist/chunks/chunk.QDFHF7LY.js +0 -1
  1391. package/dist/chunks/chunk.QEKPRA6B.js +0 -1
  1392. package/dist/chunks/chunk.QGXUQL5S.js +0 -1
  1393. package/dist/chunks/chunk.QGZOQXT5.js +0 -148
  1394. package/dist/chunks/chunk.QH3KZBRJ.js +0 -1
  1395. package/dist/chunks/chunk.QK5M4OHI.js +0 -1
  1396. package/dist/chunks/chunk.R6RTP7QP.js +0 -1
  1397. package/dist/chunks/chunk.RBPNA4JU.js +0 -22
  1398. package/dist/chunks/chunk.REIUDVA3.js +0 -1
  1399. package/dist/chunks/chunk.RH76C7M7.js +0 -1
  1400. package/dist/chunks/chunk.RHDTWIMS.js +0 -1
  1401. package/dist/chunks/chunk.RKLTK3FR.js +0 -1
  1402. package/dist/chunks/chunk.RLOQMCKP.js +0 -1
  1403. package/dist/chunks/chunk.S65R5GMI.js +0 -1
  1404. package/dist/chunks/chunk.S6AD3O5Y.js +0 -2
  1405. package/dist/chunks/chunk.S6UNY7TY.js +0 -1
  1406. package/dist/chunks/chunk.SAVXAZC3.js +0 -1
  1407. package/dist/chunks/chunk.SDFUXOW6.js +0 -47
  1408. package/dist/chunks/chunk.SM2LJQQZ.js +0 -1
  1409. package/dist/chunks/chunk.SN4M25TW.js +0 -1
  1410. package/dist/chunks/chunk.SP4US3KC.js +0 -1
  1411. package/dist/chunks/chunk.SP7J3EGR.js +0 -1
  1412. package/dist/chunks/chunk.ST6Y273B.js +0 -1
  1413. package/dist/chunks/chunk.SW4EXLIK.js +0 -100
  1414. package/dist/chunks/chunk.SYA4MGC4.js +0 -1
  1415. package/dist/chunks/chunk.T3RRBLSI.js +0 -1
  1416. package/dist/chunks/chunk.T5MMUQEM.js +0 -2
  1417. package/dist/chunks/chunk.T5UOTK5T.js +0 -14
  1418. package/dist/chunks/chunk.TCJYR6XR.js +0 -75
  1419. package/dist/chunks/chunk.TEJABDMI.js +0 -1
  1420. package/dist/chunks/chunk.TOUSLOQP.js +0 -19
  1421. package/dist/chunks/chunk.TWL4OKWI.js +0 -1
  1422. package/dist/chunks/chunk.TXJOFCEB.js +0 -20
  1423. package/dist/chunks/chunk.U5DWDLRH.js +0 -25
  1424. package/dist/chunks/chunk.UBXADY37.js +0 -566
  1425. package/dist/chunks/chunk.UJUBD5K6.js +0 -1
  1426. package/dist/chunks/chunk.UMIX7BEK.js +0 -1
  1427. package/dist/chunks/chunk.UNPFONVM.js +0 -121
  1428. package/dist/chunks/chunk.VM42BF4S.js +0 -1
  1429. package/dist/chunks/chunk.VO2NGMYX.js +0 -1
  1430. package/dist/chunks/chunk.VPEIRF5L.js +0 -1
  1431. package/dist/chunks/chunk.VQBTIXTR.js +0 -1
  1432. package/dist/chunks/chunk.VRGYQH3V.js +0 -1
  1433. package/dist/chunks/chunk.W22Z5NC6.js +0 -1
  1434. package/dist/chunks/chunk.W2AIXOEB.js +0 -1
  1435. package/dist/chunks/chunk.W37YFNFN.js +0 -1
  1436. package/dist/chunks/chunk.W7LK5SL4.js +0 -1
  1437. package/dist/chunks/chunk.WHM6GYCJ.js +0 -1
  1438. package/dist/chunks/chunk.WSK5WSL4.js +0 -1
  1439. package/dist/chunks/chunk.X3J4I27U.js +0 -1
  1440. package/dist/chunks/chunk.XD4664TI.js +0 -16
  1441. package/dist/chunks/chunk.XIGVC4SV.js +0 -62
  1442. package/dist/chunks/chunk.XS3KPVEZ.js +0 -1
  1443. package/dist/chunks/chunk.XX7TMK7N.js +0 -1
  1444. package/dist/chunks/chunk.Y5DJ2TIT.js +0 -1
  1445. package/dist/chunks/chunk.YH36XKHI.js +0 -1
  1446. package/dist/chunks/chunk.YJCP5H5H.js +0 -1
  1447. package/dist/chunks/chunk.YUFCED44.js +0 -64
  1448. package/dist/chunks/chunk.Z5WR5G6V.js +0 -35
  1449. package/dist/chunks/chunk.ZAO2ZNCW.js +0 -1
  1450. package/dist/chunks/chunk.ZCO5H22U.js +0 -1
  1451. package/dist/chunks/chunk.ZJRSMGBD.js +0 -1
  1452. package/dist/chunks/chunk.ZOFZPC6S.js +0 -9
  1453. package/dist/chunks/chunk.ZWQ5GUBX.js +0 -55
  1454. package/dist/chunks/chunk.ZZDDQ567.js +0 -1
  1455. package/dist/events/terra-map-change.d.ts +0 -14
  1456. package/dist/terra_ui_components-0.0.203-py3-none-any.whl +0 -0
  1457. package/dist/terra_ui_components-0.0.203.tar.gz +0 -0
@@ -1,4083 +0,0 @@
1
- import {
2
- create as create2,
3
- fromTransform
4
- } from "./chunk.UD3TU5V6.js";
5
- import {
6
- BooleanType,
7
- CallExpression,
8
- ColorType,
9
- NumberArrayType,
10
- NumberType,
11
- Ops,
12
- SizeType,
13
- StringType,
14
- isType,
15
- newParsingContext,
16
- parse,
17
- typeName
18
- } from "./chunk.VNCKECHZ.js";
19
- import {
20
- BaseTile_default,
21
- ImageTile_default,
22
- LRUCache_default,
23
- Tile_default
24
- } from "./chunk.KNWDEVCZ.js";
25
- import {
26
- DataTile_default,
27
- TileRange_default,
28
- TileState_default,
29
- asArrayLike,
30
- asImageLike,
31
- createOrUpdate2 as createOrUpdate,
32
- getKey
33
- } from "./chunk.J5WVGYHM.js";
34
- import {
35
- EventType_default as EventType_default2,
36
- Event_default,
37
- Layer_default,
38
- Property_default,
39
- asArray
40
- } from "./chunk.2HXJHNH3.js";
41
- import {
42
- Disposable_default,
43
- EventType_default,
44
- SAFARI_BUG_237906,
45
- Target_default,
46
- abstract,
47
- apply,
48
- assert,
49
- compose,
50
- create,
51
- createCanvasContext2D,
52
- descending,
53
- getUid,
54
- reset,
55
- rotate,
56
- scale,
57
- toSize,
58
- translate
59
- } from "./chunk.EQDMPPT6.js";
60
- import {
61
- boundingExtent,
62
- clear,
63
- containsCoordinate,
64
- equivalent,
65
- fromUserExtent,
66
- getIntersection,
67
- getRotatedViewport,
68
- isEmpty2 as isEmpty
69
- } from "./chunk.KLVTN4RA.js";
70
- import {
71
- __spreadProps,
72
- __spreadValues,
73
- init_buffer,
74
- init_dirname,
75
- init_process
76
- } from "./chunk.IIJBAEGD.js";
77
-
78
- // src/components/map/layers/geotiff.layer.ts
79
- init_dirname();
80
- init_buffer();
81
- init_process();
82
-
83
- // node_modules/ol/layer/WebGLTile.js
84
- init_dirname();
85
- init_buffer();
86
- init_process();
87
-
88
- // node_modules/ol/expr/gpu.js
89
- init_dirname();
90
- init_buffer();
91
- init_process();
92
-
93
- // node_modules/ol/renderer/webgl/TileLayer.js
94
- init_dirname();
95
- init_buffer();
96
- init_process();
97
-
98
- // node_modules/ol/webgl.js
99
- init_dirname();
100
- init_buffer();
101
- init_process();
102
- var ARRAY_BUFFER = 34962;
103
- var ELEMENT_ARRAY_BUFFER = 34963;
104
- var STREAM_DRAW = 35040;
105
- var STATIC_DRAW = 35044;
106
- var DYNAMIC_DRAW = 35048;
107
- var UNSIGNED_BYTE = 5121;
108
- var UNSIGNED_SHORT = 5123;
109
- var UNSIGNED_INT = 5125;
110
- var FLOAT = 5126;
111
- var CONTEXT_IDS = ["experimental-webgl", "webgl", "webkit-3d", "moz-webgl"];
112
- function getContext(canvas, attributes) {
113
- attributes = Object.assign(
114
- {
115
- preserveDrawingBuffer: true,
116
- antialias: SAFARI_BUG_237906 ? false : true
117
- // https://bugs.webkit.org/show_bug.cgi?id=237906
118
- },
119
- attributes
120
- );
121
- const ii = CONTEXT_IDS.length;
122
- for (let i = 0; i < ii; ++i) {
123
- try {
124
- const context = canvas.getContext(CONTEXT_IDS[i], attributes);
125
- if (context) {
126
- return (
127
- /** @type {!WebGLRenderingContext} */
128
- context
129
- );
130
- }
131
- } catch (e) {
132
- }
133
- }
134
- return null;
135
- }
136
-
137
- // node_modules/ol/webgl/Buffer.js
138
- init_dirname();
139
- init_buffer();
140
- init_process();
141
- var BufferUsage = {
142
- STATIC_DRAW,
143
- STREAM_DRAW,
144
- DYNAMIC_DRAW
145
- };
146
- var WebGLArrayBuffer = class {
147
- /**
148
- * @param {number} type Buffer type, either ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.
149
- * @param {number} [usage] Intended usage, either `STATIC_DRAW`, `STREAM_DRAW` or `DYNAMIC_DRAW`.
150
- * Default is `STATIC_DRAW`.
151
- */
152
- constructor(type, usage) {
153
- this.array_ = null;
154
- this.type_ = type;
155
- assert(
156
- type === ARRAY_BUFFER || type === ELEMENT_ARRAY_BUFFER,
157
- "A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"
158
- );
159
- this.usage_ = usage !== void 0 ? usage : BufferUsage.STATIC_DRAW;
160
- }
161
- /**
162
- * Populates the buffer with an array of the given size (all values will be zeroes).
163
- * @param {number} size Array size
164
- * @return {WebGLArrayBuffer} This
165
- */
166
- ofSize(size) {
167
- this.array_ = new (getArrayClassForType(this.type_))(size);
168
- return this;
169
- }
170
- /**
171
- * Populates the buffer with an array of the given size.
172
- * @param {Array<number>} array Numerical array
173
- * @return {WebGLArrayBuffer} This
174
- */
175
- fromArray(array) {
176
- this.array_ = getArrayClassForType(this.type_).from(array);
177
- return this;
178
- }
179
- /**
180
- * Populates the buffer with a raw binary array buffer.
181
- * @param {ArrayBuffer} buffer Raw binary buffer to populate the array with. Note that this buffer must have been
182
- * initialized for the same typed array class.
183
- * @return {WebGLArrayBuffer} This
184
- */
185
- fromArrayBuffer(buffer) {
186
- this.array_ = new (getArrayClassForType(this.type_))(buffer);
187
- return this;
188
- }
189
- /**
190
- * @return {number} Buffer type.
191
- */
192
- getType() {
193
- return this.type_;
194
- }
195
- /**
196
- * Will return null if the buffer was not initialized
197
- * @return {Float32Array|Uint32Array|null} Array.
198
- */
199
- getArray() {
200
- return this.array_;
201
- }
202
- /**
203
- * @param {Float32Array|Uint32Array} array Array.
204
- */
205
- setArray(array) {
206
- const ArrayType = getArrayClassForType(this.type_);
207
- if (!(array instanceof ArrayType)) {
208
- throw new Error(`Expected ${ArrayType}`);
209
- }
210
- this.array_ = array;
211
- }
212
- /**
213
- * @return {number} Usage.
214
- */
215
- getUsage() {
216
- return this.usage_;
217
- }
218
- /**
219
- * Will return 0 if the buffer is not initialized
220
- * @return {number} Array size
221
- */
222
- getSize() {
223
- return this.array_ ? this.array_.length : 0;
224
- }
225
- };
226
- function getArrayClassForType(type) {
227
- switch (type) {
228
- case ARRAY_BUFFER:
229
- return Float32Array;
230
- case ELEMENT_ARRAY_BUFFER:
231
- return Uint32Array;
232
- default:
233
- return Float32Array;
234
- }
235
- }
236
- var Buffer_default = WebGLArrayBuffer;
237
-
238
- // node_modules/ol/webgl/Helper.js
239
- init_dirname();
240
- init_buffer();
241
- init_process();
242
-
243
- // node_modules/ol/webgl/ContextEventType.js
244
- init_dirname();
245
- init_buffer();
246
- init_process();
247
- var ContextEventType_default = {
248
- LOST: "webglcontextlost",
249
- RESTORED: "webglcontextrestored"
250
- };
251
-
252
- // node_modules/ol/webgl/PostProcessingPass.js
253
- init_dirname();
254
- init_buffer();
255
- init_process();
256
- var DEFAULT_VERTEX_SHADER = `
257
- precision mediump float;
258
-
259
- attribute vec2 a_position;
260
- varying vec2 v_texCoord;
261
- varying vec2 v_screenCoord;
262
-
263
- uniform vec2 u_screenSize;
264
-
265
- void main() {
266
- v_texCoord = a_position * 0.5 + 0.5;
267
- v_screenCoord = v_texCoord * u_screenSize;
268
- gl_Position = vec4(a_position, 0.0, 1.0);
269
- }
270
- `;
271
- var DEFAULT_FRAGMENT_SHADER = `
272
- precision mediump float;
273
-
274
- uniform sampler2D u_image;
275
- uniform float u_opacity;
276
-
277
- varying vec2 v_texCoord;
278
-
279
- void main() {
280
- gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
281
- }
282
- `;
283
- var WebGLPostProcessingPass = class {
284
- /**
285
- * @param {Options} options Options.
286
- */
287
- constructor(options) {
288
- this.gl_ = options.webGlContext;
289
- const gl = this.gl_;
290
- this.scaleRatio_ = options.scaleRatio || 1;
291
- this.renderTargetTexture_ = gl.createTexture();
292
- this.renderTargetTextureSize_ = null;
293
- this.frameBuffer_ = gl.createFramebuffer();
294
- this.depthBuffer_ = gl.createRenderbuffer();
295
- const vertexShader = (
296
- /** @type {WebGLShader} */
297
- gl.createShader(gl.VERTEX_SHADER)
298
- );
299
- gl.shaderSource(
300
- vertexShader,
301
- options.vertexShader || DEFAULT_VERTEX_SHADER
302
- );
303
- gl.compileShader(vertexShader);
304
- const fragmentShader = (
305
- /** @type {WebGLShader} */
306
- gl.createShader(gl.FRAGMENT_SHADER)
307
- );
308
- gl.shaderSource(
309
- fragmentShader,
310
- options.fragmentShader || DEFAULT_FRAGMENT_SHADER
311
- );
312
- gl.compileShader(fragmentShader);
313
- if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
314
- const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(
315
- fragmentShader
316
- )}`;
317
- throw new Error(message);
318
- }
319
- this.renderTargetProgram_ = /** @type {WebGLProgram} */
320
- gl.createProgram();
321
- gl.attachShader(this.renderTargetProgram_, vertexShader);
322
- gl.attachShader(this.renderTargetProgram_, fragmentShader);
323
- gl.linkProgram(this.renderTargetProgram_);
324
- this.renderTargetVerticesBuffer_ = gl.createBuffer();
325
- const verticesArray = [-1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1];
326
- gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);
327
- gl.bufferData(
328
- gl.ARRAY_BUFFER,
329
- new Float32Array(verticesArray),
330
- gl.STATIC_DRAW
331
- );
332
- this.renderTargetAttribLocation_ = gl.getAttribLocation(
333
- this.renderTargetProgram_,
334
- "a_position"
335
- );
336
- this.renderTargetUniformLocation_ = gl.getUniformLocation(
337
- this.renderTargetProgram_,
338
- "u_screenSize"
339
- );
340
- this.renderTargetOpacityLocation_ = gl.getUniformLocation(
341
- this.renderTargetProgram_,
342
- "u_opacity"
343
- );
344
- this.renderTargetTextureLocation_ = gl.getUniformLocation(
345
- this.renderTargetProgram_,
346
- "u_image"
347
- );
348
- this.uniforms_ = [];
349
- if (options.uniforms) {
350
- const uniforms = options.uniforms;
351
- Object.keys(uniforms).forEach((name) => {
352
- this.uniforms_.push({
353
- value: (
354
- /** @type {import("./Helper.js").UniformValue} */
355
- uniforms[name]
356
- ),
357
- location: gl.getUniformLocation(this.renderTargetProgram_, name)
358
- });
359
- });
360
- }
361
- }
362
- getRenderTargetTexture() {
363
- return this.renderTargetTexture_;
364
- }
365
- /**
366
- * Get the WebGL rendering context
367
- * @return {WebGLRenderingContext} The rendering context.
368
- */
369
- getGL() {
370
- return this.gl_;
371
- }
372
- /**
373
- * Initialize the render target texture of the post process, make sure it is at the
374
- * right size and bind it as a render target for the next draw calls.
375
- * The last step to be initialized will be the one where the primitives are rendered.
376
- * @param {import("../Map.js").FrameState} frameState current frame state
377
- */
378
- init(frameState) {
379
- const gl = this.getGL();
380
- const textureSize = [
381
- gl.drawingBufferWidth * this.scaleRatio_,
382
- gl.drawingBufferHeight * this.scaleRatio_
383
- ];
384
- gl.bindFramebuffer(gl.FRAMEBUFFER, this.getFrameBuffer());
385
- gl.bindRenderbuffer(gl.RENDERBUFFER, this.getDepthBuffer());
386
- gl.viewport(0, 0, textureSize[0], textureSize[1]);
387
- if (!this.renderTargetTextureSize_ || this.renderTargetTextureSize_[0] !== textureSize[0] || this.renderTargetTextureSize_[1] !== textureSize[1]) {
388
- this.renderTargetTextureSize_ = textureSize;
389
- const level = 0;
390
- const internalFormat = gl.RGBA;
391
- const border = 0;
392
- const format = gl.RGBA;
393
- const type = gl.UNSIGNED_BYTE;
394
- const data = null;
395
- gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);
396
- gl.texImage2D(
397
- gl.TEXTURE_2D,
398
- level,
399
- internalFormat,
400
- textureSize[0],
401
- textureSize[1],
402
- border,
403
- format,
404
- type,
405
- data
406
- );
407
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
408
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
409
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
410
- gl.framebufferTexture2D(
411
- gl.FRAMEBUFFER,
412
- gl.COLOR_ATTACHMENT0,
413
- gl.TEXTURE_2D,
414
- this.renderTargetTexture_,
415
- 0
416
- );
417
- gl.renderbufferStorage(
418
- gl.RENDERBUFFER,
419
- gl.DEPTH_COMPONENT16,
420
- textureSize[0],
421
- textureSize[1]
422
- );
423
- gl.framebufferRenderbuffer(
424
- gl.FRAMEBUFFER,
425
- gl.DEPTH_ATTACHMENT,
426
- gl.RENDERBUFFER,
427
- this.depthBuffer_
428
- );
429
- }
430
- }
431
- /**
432
- * Render to the next postprocessing pass (or to the canvas if final pass).
433
- * @param {import("../Map.js").FrameState} frameState current frame state
434
- * @param {WebGLPostProcessingPass} [nextPass] Next pass, optional
435
- * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [preCompose] Called before composing.
436
- * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [postCompose] Called before composing.
437
- */
438
- apply(frameState, nextPass, preCompose, postCompose) {
439
- const gl = this.getGL();
440
- const size = frameState.size;
441
- gl.bindFramebuffer(
442
- gl.FRAMEBUFFER,
443
- nextPass ? nextPass.getFrameBuffer() : null
444
- );
445
- gl.activeTexture(gl.TEXTURE0);
446
- gl.bindTexture(gl.TEXTURE_2D, this.renderTargetTexture_);
447
- if (!nextPass) {
448
- const canvasId = getUid(gl.canvas);
449
- if (!frameState.renderTargets[canvasId]) {
450
- const attributes = gl.getContextAttributes();
451
- if (attributes && attributes.preserveDrawingBuffer) {
452
- gl.clearColor(0, 0, 0, 0);
453
- gl.clearDepth(1);
454
- gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
455
- }
456
- frameState.renderTargets[canvasId] = true;
457
- }
458
- }
459
- gl.disable(gl.DEPTH_TEST);
460
- gl.enable(gl.BLEND);
461
- gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
462
- gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);
463
- gl.bindBuffer(gl.ARRAY_BUFFER, this.renderTargetVerticesBuffer_);
464
- gl.useProgram(this.renderTargetProgram_);
465
- gl.enableVertexAttribArray(this.renderTargetAttribLocation_);
466
- gl.vertexAttribPointer(
467
- this.renderTargetAttribLocation_,
468
- 2,
469
- gl.FLOAT,
470
- false,
471
- 0,
472
- 0
473
- );
474
- gl.uniform2f(this.renderTargetUniformLocation_, size[0], size[1]);
475
- gl.uniform1i(this.renderTargetTextureLocation_, 0);
476
- const opacity = frameState.layerStatesArray[frameState.layerIndex].opacity;
477
- gl.uniform1f(this.renderTargetOpacityLocation_, opacity);
478
- this.applyUniforms(frameState);
479
- if (preCompose) {
480
- preCompose(gl, frameState);
481
- }
482
- gl.drawArrays(gl.TRIANGLES, 0, 6);
483
- if (postCompose) {
484
- postCompose(gl, frameState);
485
- }
486
- }
487
- /**
488
- * @return {WebGLFramebuffer} Frame buffer
489
- */
490
- getFrameBuffer() {
491
- return this.frameBuffer_;
492
- }
493
- /**
494
- * @return {WebGLRenderbuffer} Depth buffer
495
- */
496
- getDepthBuffer() {
497
- return this.depthBuffer_;
498
- }
499
- /**
500
- * Sets the custom uniforms based on what was given in the constructor.
501
- * @param {import("../Map.js").FrameState} frameState Frame state.
502
- * @private
503
- */
504
- applyUniforms(frameState) {
505
- const gl = this.getGL();
506
- let value;
507
- let textureSlot = 1;
508
- this.uniforms_.forEach(function(uniform) {
509
- value = typeof uniform.value === "function" ? uniform.value(frameState) : uniform.value;
510
- if (value instanceof HTMLCanvasElement || value instanceof ImageData) {
511
- if (!uniform.texture) {
512
- uniform.texture = gl.createTexture();
513
- }
514
- gl.activeTexture(gl.TEXTURE0 + textureSlot);
515
- gl.bindTexture(gl.TEXTURE_2D, uniform.texture);
516
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
517
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
518
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
519
- if (value instanceof ImageData) {
520
- gl.texImage2D(
521
- gl.TEXTURE_2D,
522
- 0,
523
- gl.RGBA,
524
- gl.RGBA,
525
- value.width,
526
- value.height,
527
- 0,
528
- gl.UNSIGNED_BYTE,
529
- new Uint8Array(value.data)
530
- );
531
- } else {
532
- gl.texImage2D(
533
- gl.TEXTURE_2D,
534
- 0,
535
- gl.RGBA,
536
- gl.RGBA,
537
- gl.UNSIGNED_BYTE,
538
- value
539
- );
540
- }
541
- gl.uniform1i(uniform.location, textureSlot++);
542
- } else if (Array.isArray(value)) {
543
- switch (value.length) {
544
- case 2:
545
- gl.uniform2f(uniform.location, value[0], value[1]);
546
- return;
547
- case 3:
548
- gl.uniform3f(uniform.location, value[0], value[1], value[2]);
549
- return;
550
- case 4:
551
- gl.uniform4f(
552
- uniform.location,
553
- value[0],
554
- value[1],
555
- value[2],
556
- value[3]
557
- );
558
- return;
559
- case 16:
560
- gl.uniformMatrix4fv(uniform.location, false, value);
561
- return;
562
- default:
563
- return;
564
- }
565
- } else if (typeof value === "number") {
566
- gl.uniform1f(uniform.location, value);
567
- }
568
- });
569
- }
570
- };
571
- var PostProcessingPass_default = WebGLPostProcessingPass;
572
-
573
- // node_modules/ol/webgl/Helper.js
574
- var DefaultUniform = {
575
- PROJECTION_MATRIX: "u_projectionMatrix",
576
- INVERT_PROJECTION_MATRIX: "u_invertProjectionMatrix",
577
- TIME: "u_time",
578
- ZOOM: "u_zoom",
579
- RESOLUTION: "u_resolution",
580
- ROTATION: "u_rotation",
581
- VIEWPORT_SIZE_PX: "u_viewportSizePx",
582
- PIXEL_RATIO: "u_pixelRatio",
583
- HIT_DETECTION: "u_hitDetection"
584
- };
585
- var AttributeType = {
586
- UNSIGNED_BYTE,
587
- UNSIGNED_SHORT,
588
- UNSIGNED_INT,
589
- FLOAT
590
- };
591
- var canvasCache = {};
592
- function getSharedCanvasCacheKey(key) {
593
- return "shared/" + key;
594
- }
595
- var uniqueCanvasCacheKeyCount = 0;
596
- function getUniqueCanvasCacheKey() {
597
- const key = "unique/" + uniqueCanvasCacheKeyCount;
598
- uniqueCanvasCacheKeyCount += 1;
599
- return key;
600
- }
601
- function getOrCreateContext(key) {
602
- let cacheItem = canvasCache[key];
603
- if (!cacheItem) {
604
- const canvas = document.createElement("canvas");
605
- canvas.width = 1;
606
- canvas.height = 1;
607
- canvas.style.position = "absolute";
608
- canvas.style.left = "0";
609
- const context = (
610
- /** @type {WebGLRenderingContext} */
611
- getContext(canvas)
612
- );
613
- cacheItem = { users: 0, context };
614
- canvasCache[key] = cacheItem;
615
- }
616
- cacheItem.users += 1;
617
- return cacheItem.context;
618
- }
619
- function releaseCanvas(key) {
620
- const cacheItem = canvasCache[key];
621
- if (!cacheItem) {
622
- return;
623
- }
624
- cacheItem.users -= 1;
625
- if (cacheItem.users > 0) {
626
- return;
627
- }
628
- const gl = cacheItem.context;
629
- const extension = gl.getExtension("WEBGL_lose_context");
630
- if (extension) {
631
- extension.loseContext();
632
- }
633
- const canvas = gl.canvas;
634
- canvas.width = 1;
635
- canvas.height = 1;
636
- delete canvasCache[key];
637
- }
638
- var WebGLHelper = class extends Disposable_default {
639
- /**
640
- * @param {Options} [options] Options.
641
- */
642
- constructor(options) {
643
- var _a;
644
- super();
645
- options = options || {};
646
- this.boundHandleWebGLContextLost_ = this.handleWebGLContextLost.bind(this);
647
- this.boundHandleWebGLContextRestored_ = this.handleWebGLContextRestored.bind(this);
648
- this.canvasCacheKey_ = options.canvasCacheKey ? getSharedCanvasCacheKey(options.canvasCacheKey) : getUniqueCanvasCacheKey();
649
- this.gl_ = getOrCreateContext(this.canvasCacheKey_);
650
- this.bufferCache_ = {};
651
- this.extensionCache_ = {};
652
- this.currentProgram_ = null;
653
- this.needsToBeRecreated_ = false;
654
- const canvas = this.gl_.canvas;
655
- canvas.addEventListener(
656
- ContextEventType_default.LOST,
657
- /** @type {EventListener} */
658
- this.boundHandleWebGLContextLost_
659
- );
660
- canvas.addEventListener(
661
- ContextEventType_default.RESTORED,
662
- /** @type {EventListener} */
663
- this.boundHandleWebGLContextRestored_
664
- );
665
- this.tmpMat4_ = create2();
666
- this.uniformLocationsByProgram_ = {};
667
- this.attribLocationsByProgram_ = {};
668
- this.uniforms_ = [];
669
- if (options.uniforms) {
670
- this.setUniforms(options.uniforms);
671
- }
672
- this.postProcessPasses_ = ((_a = options.postProcesses) == null ? void 0 : _a.length) ? options.postProcesses.map(
673
- (options2) => new PostProcessingPass_default({
674
- webGlContext: this.gl_,
675
- scaleRatio: options2.scaleRatio,
676
- vertexShader: options2.vertexShader,
677
- fragmentShader: options2.fragmentShader,
678
- uniforms: options2.uniforms
679
- })
680
- ) : [new PostProcessingPass_default({ webGlContext: this.gl_ })];
681
- this.shaderCompileErrors_ = null;
682
- this.startTime_ = Date.now();
683
- this.maxAttributeCount_ = this.gl_.getParameter(
684
- this.gl_.MAX_VERTEX_ATTRIBS
685
- );
686
- }
687
- /**
688
- * @param {Object<string, UniformValue>} uniforms Uniform definitions.
689
- */
690
- setUniforms(uniforms) {
691
- this.uniforms_ = [];
692
- this.addUniforms(uniforms);
693
- }
694
- /**
695
- * @param {Object<string, UniformValue>} uniforms Uniform definitions.
696
- */
697
- addUniforms(uniforms) {
698
- for (const name in uniforms) {
699
- this.uniforms_.push({
700
- name,
701
- value: uniforms[name]
702
- });
703
- }
704
- }
705
- /**
706
- * @param {string} canvasCacheKey The canvas cache key.
707
- * @return {boolean} The provided key matches the one this helper was constructed with.
708
- */
709
- canvasCacheKeyMatches(canvasCacheKey) {
710
- return this.canvasCacheKey_ === getSharedCanvasCacheKey(canvasCacheKey);
711
- }
712
- /**
713
- * Get a WebGL extension. If the extension is not supported, null is returned.
714
- * Extensions are cached after they are enabled for the first time.
715
- * @param {string} name The extension name.
716
- * @return {Object|null} The extension or null if not supported.
717
- */
718
- getExtension(name) {
719
- if (name in this.extensionCache_) {
720
- return this.extensionCache_[name];
721
- }
722
- const extension = this.gl_.getExtension(name);
723
- this.extensionCache_[name] = extension;
724
- return extension;
725
- }
726
- /**
727
- * Will throw if the extension is not available
728
- * @return {ANGLE_instanced_arrays} Extension
729
- */
730
- getInstancedRenderingExtension_() {
731
- const ext = this.getExtension("ANGLE_instanced_arrays");
732
- assert(
733
- !!ext,
734
- "WebGL extension 'ANGLE_instanced_arrays' is required for vector rendering"
735
- );
736
- return (
737
- /** @type {ANGLE_instanced_arrays} */
738
- ext
739
- );
740
- }
741
- /**
742
- * Just bind the buffer if it's in the cache. Otherwise create
743
- * the WebGL buffer, bind it, populate it, and add an entry to
744
- * the cache.
745
- * @param {import("./Buffer.js").default} buffer Buffer.
746
- */
747
- bindBuffer(buffer) {
748
- const gl = this.gl_;
749
- const bufferKey = getUid(buffer);
750
- let bufferCache = this.bufferCache_[bufferKey];
751
- if (!bufferCache) {
752
- const webGlBuffer = gl.createBuffer();
753
- bufferCache = {
754
- buffer,
755
- webGlBuffer
756
- };
757
- this.bufferCache_[bufferKey] = bufferCache;
758
- }
759
- gl.bindBuffer(buffer.getType(), bufferCache.webGlBuffer);
760
- }
761
- /**
762
- * Update the data contained in the buffer array; this is required for the
763
- * new data to be rendered
764
- * @param {import("./Buffer.js").default} buffer Buffer.
765
- */
766
- flushBufferData(buffer) {
767
- const gl = this.gl_;
768
- this.bindBuffer(buffer);
769
- gl.bufferData(buffer.getType(), buffer.getArray(), buffer.getUsage());
770
- }
771
- /**
772
- * @param {import("./Buffer.js").default} buf Buffer.
773
- */
774
- deleteBuffer(buf) {
775
- const bufferKey = getUid(buf);
776
- delete this.bufferCache_[bufferKey];
777
- }
778
- /**
779
- * Clean up.
780
- * @override
781
- */
782
- disposeInternal() {
783
- const canvas = this.gl_.canvas;
784
- canvas.removeEventListener(
785
- ContextEventType_default.LOST,
786
- /** @type {EventListener} */
787
- this.boundHandleWebGLContextLost_
788
- );
789
- canvas.removeEventListener(
790
- ContextEventType_default.RESTORED,
791
- /** @type {EventListener} */
792
- this.boundHandleWebGLContextRestored_
793
- );
794
- releaseCanvas(this.canvasCacheKey_);
795
- }
796
- /**
797
- * Clear the buffer & set the viewport to draw.
798
- * Post process passes will be initialized here, the first one being bound as a render target for
799
- * subsequent draw calls.
800
- * @param {import("../Map.js").FrameState} frameState current frame state
801
- * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.
802
- * @param {boolean} [enableDepth] If true, enables depth testing.
803
- */
804
- prepareDraw(frameState, disableAlphaBlend, enableDepth) {
805
- const gl = this.gl_;
806
- const canvas = this.getCanvas();
807
- const size = frameState.size;
808
- const pixelRatio = frameState.pixelRatio;
809
- if (canvas.width !== size[0] * pixelRatio || canvas.height !== size[1] * pixelRatio) {
810
- canvas.width = size[0] * pixelRatio;
811
- canvas.height = size[1] * pixelRatio;
812
- canvas.style.width = size[0] + "px";
813
- canvas.style.height = size[1] + "px";
814
- }
815
- for (let i = this.postProcessPasses_.length - 1; i >= 0; i--) {
816
- this.postProcessPasses_[i].init(frameState);
817
- }
818
- gl.bindTexture(gl.TEXTURE_2D, null);
819
- gl.clearColor(0, 0, 0, 0);
820
- gl.depthRange(0, 1);
821
- gl.clearDepth(1);
822
- gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
823
- gl.enable(gl.BLEND);
824
- gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);
825
- if (enableDepth) {
826
- gl.enable(gl.DEPTH_TEST);
827
- gl.depthFunc(gl.LEQUAL);
828
- } else {
829
- gl.disable(gl.DEPTH_TEST);
830
- }
831
- }
832
- /**
833
- * @param {WebGLFramebuffer|null} frameBuffer The frame buffer.
834
- * @param {WebGLTexture} [texture] The texture.
835
- */
836
- bindFrameBuffer(frameBuffer, texture) {
837
- const gl = this.getGL();
838
- gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
839
- if (texture) {
840
- gl.framebufferTexture2D(
841
- gl.FRAMEBUFFER,
842
- gl.COLOR_ATTACHMENT0,
843
- gl.TEXTURE_2D,
844
- texture,
845
- 0
846
- );
847
- }
848
- }
849
- /**
850
- * Bind the frame buffer from the initial render.
851
- */
852
- bindInitialFrameBuffer() {
853
- const gl = this.getGL();
854
- const frameBuffer = this.postProcessPasses_[0].getFrameBuffer();
855
- gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);
856
- const texture = this.postProcessPasses_[0].getRenderTargetTexture();
857
- gl.framebufferTexture2D(
858
- gl.FRAMEBUFFER,
859
- gl.COLOR_ATTACHMENT0,
860
- gl.TEXTURE_2D,
861
- texture,
862
- 0
863
- );
864
- }
865
- /**
866
- * Prepare a program to use a texture.
867
- * @param {WebGLTexture} texture The texture.
868
- * @param {number} slot The texture slot.
869
- * @param {string} uniformName The corresponding uniform name.
870
- */
871
- bindTexture(texture, slot, uniformName) {
872
- const gl = this.gl_;
873
- gl.activeTexture(gl.TEXTURE0 + slot);
874
- gl.bindTexture(gl.TEXTURE_2D, texture);
875
- gl.uniform1i(this.getUniformLocation(uniformName), slot);
876
- }
877
- /**
878
- * Set up an attribute array buffer for use in the vertex shader.
879
- * @param {import("./Buffer.js").default} buffer The buffer.
880
- * @param {string} attributeName The attribute name.
881
- * @param {number} size The number of components per attribute vertex.
882
- */
883
- bindAttribute(buffer, attributeName, size) {
884
- const gl = this.getGL();
885
- this.bindBuffer(buffer);
886
- const index = this.getAttributeLocation(attributeName);
887
- gl.enableVertexAttribArray(index);
888
- gl.vertexAttribPointer(index, size, gl.FLOAT, false, 0, 0);
889
- }
890
- /**
891
- * Clear the render target & bind it for future draw operations.
892
- * This is similar to `prepareDraw`, only post processes will not be applied.
893
- * Note: the whole viewport will be drawn to the render target, regardless of its size.
894
- * @param {import("../Map.js").FrameState} frameState current frame state
895
- * @param {import("./RenderTarget.js").default} renderTarget Render target to draw to
896
- * @param {boolean} [disableAlphaBlend] If true, no alpha blending will happen.
897
- * @param {boolean} [enableDepth] If true, enables depth testing.
898
- */
899
- prepareDrawToRenderTarget(frameState, renderTarget, disableAlphaBlend, enableDepth) {
900
- const gl = this.gl_;
901
- const size = renderTarget.getSize();
902
- gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());
903
- gl.bindRenderbuffer(gl.RENDERBUFFER, renderTarget.getDepthbuffer());
904
- gl.viewport(0, 0, size[0], size[1]);
905
- gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());
906
- gl.clearColor(0, 0, 0, 0);
907
- gl.depthRange(0, 1);
908
- gl.clearDepth(1);
909
- gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
910
- gl.enable(gl.BLEND);
911
- gl.blendFunc(gl.ONE, disableAlphaBlend ? gl.ZERO : gl.ONE_MINUS_SRC_ALPHA);
912
- if (enableDepth) {
913
- gl.enable(gl.DEPTH_TEST);
914
- gl.depthFunc(gl.LEQUAL);
915
- } else {
916
- gl.disable(gl.DEPTH_TEST);
917
- }
918
- }
919
- /**
920
- * Execute a draw call based on the currently bound program, texture, buffers, attributes.
921
- * @param {number} start Start index.
922
- * @param {number} end End index.
923
- */
924
- drawElements(start, end) {
925
- const gl = this.gl_;
926
- this.getExtension("OES_element_index_uint");
927
- const elementType = gl.UNSIGNED_INT;
928
- const elementSize = 4;
929
- const numItems = end - start;
930
- const offsetInBytes = start * elementSize;
931
- gl.drawElements(gl.TRIANGLES, numItems, elementType, offsetInBytes);
932
- }
933
- /**
934
- * Execute a draw call similar to `drawElements`, but using instanced rendering.
935
- * Will have no effect if `enableAttributesInstanced` was not called for this rendering pass.
936
- * @param {number} start Start index.
937
- * @param {number} end End index.
938
- * @param {number} instanceCount The number of instances to render
939
- */
940
- drawElementsInstanced(start, end, instanceCount) {
941
- const gl = this.gl_;
942
- this.getExtension("OES_element_index_uint");
943
- const ext = this.getInstancedRenderingExtension_();
944
- const elementType = gl.UNSIGNED_INT;
945
- const elementSize = 4;
946
- const numItems = end - start;
947
- const offsetInBytes = start * elementSize;
948
- ext.drawElementsInstancedANGLE(
949
- gl.TRIANGLES,
950
- numItems,
951
- elementType,
952
- offsetInBytes,
953
- instanceCount
954
- );
955
- for (let i = 0; i < this.maxAttributeCount_; i++) {
956
- ext.vertexAttribDivisorANGLE(i, 0);
957
- }
958
- }
959
- /**
960
- * Apply the successive post process passes which will eventually render to the actual canvas.
961
- * @param {import("../Map.js").FrameState} frameState current frame state
962
- * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [preCompose] Called before composing.
963
- * @param {function(WebGLRenderingContext, import("../Map.js").FrameState):void} [postCompose] Called before composing.
964
- */
965
- finalizeDraw(frameState, preCompose, postCompose) {
966
- for (let i = 0, ii = this.postProcessPasses_.length; i < ii; i++) {
967
- if (i === ii - 1) {
968
- this.postProcessPasses_[i].apply(
969
- frameState,
970
- void 0,
971
- preCompose,
972
- postCompose
973
- );
974
- } else {
975
- this.postProcessPasses_[i].apply(
976
- frameState,
977
- this.postProcessPasses_[i + 1]
978
- );
979
- }
980
- }
981
- }
982
- /**
983
- * @return {HTMLCanvasElement} Canvas.
984
- */
985
- getCanvas() {
986
- return (
987
- /** @type {HTMLCanvasElement} */
988
- this.gl_.canvas
989
- );
990
- }
991
- /**
992
- * Get the WebGL rendering context
993
- * @return {WebGLRenderingContext} The rendering context.
994
- */
995
- getGL() {
996
- return this.gl_;
997
- }
998
- /**
999
- * Sets the default matrix uniforms for a given frame state. This is called internally in `prepareDraw`.
1000
- * @param {import("../Map.js").FrameState} frameState Frame state.
1001
- */
1002
- applyFrameState(frameState) {
1003
- const size = frameState.size;
1004
- const rotation = frameState.viewState.rotation;
1005
- const pixelRatio = frameState.pixelRatio;
1006
- this.setUniformFloatValue(
1007
- DefaultUniform.TIME,
1008
- (Date.now() - this.startTime_) * 1e-3
1009
- );
1010
- this.setUniformFloatValue(DefaultUniform.ZOOM, frameState.viewState.zoom);
1011
- this.setUniformFloatValue(
1012
- DefaultUniform.RESOLUTION,
1013
- frameState.viewState.resolution
1014
- );
1015
- this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, pixelRatio);
1016
- this.setUniformFloatVec2(DefaultUniform.VIEWPORT_SIZE_PX, [
1017
- size[0],
1018
- size[1]
1019
- ]);
1020
- this.setUniformFloatValue(DefaultUniform.ROTATION, rotation);
1021
- }
1022
- /**
1023
- * Sets the `u_hitDetection` uniform.
1024
- * @param {boolean} enabled Whether to enable the hit detection code path
1025
- */
1026
- applyHitDetectionUniform(enabled) {
1027
- const loc = this.getUniformLocation(DefaultUniform.HIT_DETECTION);
1028
- if (loc) {
1029
- this.getGL().uniform1i(loc, enabled ? 1 : 0);
1030
- }
1031
- if (enabled) {
1032
- this.setUniformFloatValue(DefaultUniform.PIXEL_RATIO, 0.5);
1033
- }
1034
- }
1035
- /**
1036
- * Sets the custom uniforms based on what was given in the constructor. This is called internally in `prepareDraw`.
1037
- * @param {import("../Map.js").FrameState} frameState Frame state.
1038
- */
1039
- applyUniforms(frameState) {
1040
- const gl = this.gl_;
1041
- let value;
1042
- let textureSlot = 0;
1043
- this.uniforms_.forEach((uniform) => {
1044
- value = typeof uniform.value === "function" ? uniform.value(frameState) : uniform.value;
1045
- if (value instanceof HTMLCanvasElement || value instanceof HTMLImageElement || value instanceof ImageData || value instanceof WebGLTexture) {
1046
- if (value instanceof WebGLTexture && !uniform.texture) {
1047
- uniform.prevValue = void 0;
1048
- uniform.texture = value;
1049
- } else if (!uniform.texture) {
1050
- uniform.prevValue = void 0;
1051
- uniform.texture = gl.createTexture();
1052
- }
1053
- this.bindTexture(uniform.texture, textureSlot, uniform.name);
1054
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
1055
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1056
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1057
- const imageReady = !(value instanceof HTMLImageElement) || /** @type {HTMLImageElement} */
1058
- value.complete;
1059
- if (!(value instanceof WebGLTexture) && imageReady && uniform.prevValue !== value) {
1060
- uniform.prevValue = value;
1061
- gl.texImage2D(
1062
- gl.TEXTURE_2D,
1063
- 0,
1064
- gl.RGBA,
1065
- gl.RGBA,
1066
- gl.UNSIGNED_BYTE,
1067
- value
1068
- );
1069
- }
1070
- textureSlot++;
1071
- } else if (Array.isArray(value) && value.length === 6) {
1072
- this.setUniformMatrixValue(
1073
- uniform.name,
1074
- fromTransform(this.tmpMat4_, value)
1075
- );
1076
- } else if (Array.isArray(value) && value.length <= 4) {
1077
- switch (value.length) {
1078
- case 2:
1079
- gl.uniform2f(
1080
- this.getUniformLocation(uniform.name),
1081
- value[0],
1082
- value[1]
1083
- );
1084
- return;
1085
- case 3:
1086
- gl.uniform3f(
1087
- this.getUniformLocation(uniform.name),
1088
- value[0],
1089
- value[1],
1090
- value[2]
1091
- );
1092
- return;
1093
- case 4:
1094
- gl.uniform4f(
1095
- this.getUniformLocation(uniform.name),
1096
- value[0],
1097
- value[1],
1098
- value[2],
1099
- value[3]
1100
- );
1101
- return;
1102
- default:
1103
- return;
1104
- }
1105
- } else if (typeof value === "number") {
1106
- gl.uniform1f(this.getUniformLocation(uniform.name), value);
1107
- }
1108
- });
1109
- }
1110
- /**
1111
- * Set up a program for use. The program will be set as the current one. Then, the uniforms used
1112
- * in the program will be set based on the current frame state and the helper configuration.
1113
- * @param {WebGLProgram} program Program.
1114
- * @param {import("../Map.js").FrameState} [frameState] Frame state.
1115
- */
1116
- useProgram(program, frameState) {
1117
- this.disableAllAttributes_();
1118
- const gl = this.gl_;
1119
- gl.useProgram(program);
1120
- this.currentProgram_ = program;
1121
- if (frameState) {
1122
- this.applyFrameState(frameState);
1123
- this.applyUniforms(frameState);
1124
- }
1125
- }
1126
- /**
1127
- * Will attempt to compile a vertex or fragment shader based on source
1128
- * On error, the shader will be returned but
1129
- * `gl.getShaderParameter(shader, gl.COMPILE_STATUS)` will return `true`
1130
- * Use `gl.getShaderInfoLog(shader)` to have details
1131
- * @param {string} source Shader source
1132
- * @param {ShaderType} type VERTEX_SHADER or FRAGMENT_SHADER
1133
- * @return {WebGLShader} Shader object
1134
- */
1135
- compileShader(source, type) {
1136
- const gl = this.gl_;
1137
- const shader = (
1138
- /** @type {WebGLShader} */
1139
- gl.createShader(type)
1140
- );
1141
- gl.shaderSource(shader, source);
1142
- gl.compileShader(shader);
1143
- return shader;
1144
- }
1145
- /**
1146
- * Create a program for a vertex and fragment shader. Throws if shader compilation fails.
1147
- * @param {string} fragmentShaderSource Fragment shader source.
1148
- * @param {string} vertexShaderSource Vertex shader source.
1149
- * @return {WebGLProgram} Program
1150
- */
1151
- getProgram(fragmentShaderSource, vertexShaderSource) {
1152
- const gl = this.gl_;
1153
- const fragmentShader = this.compileShader(
1154
- fragmentShaderSource,
1155
- gl.FRAGMENT_SHADER
1156
- );
1157
- const vertexShader = this.compileShader(
1158
- vertexShaderSource,
1159
- gl.VERTEX_SHADER
1160
- );
1161
- const program = gl.createProgram();
1162
- gl.attachShader(program, fragmentShader);
1163
- gl.attachShader(program, vertexShader);
1164
- gl.linkProgram(program);
1165
- if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
1166
- const message = `Fragment shader compilation failed: ${gl.getShaderInfoLog(
1167
- fragmentShader
1168
- )}`;
1169
- throw new Error(message);
1170
- }
1171
- gl.deleteShader(fragmentShader);
1172
- if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
1173
- const message = `Vertex shader compilation failed: ${gl.getShaderInfoLog(
1174
- vertexShader
1175
- )}`;
1176
- throw new Error(message);
1177
- }
1178
- gl.deleteShader(vertexShader);
1179
- if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
1180
- const message = `GL program linking failed: ${gl.getProgramInfoLog(
1181
- program
1182
- )}`;
1183
- throw new Error(message);
1184
- }
1185
- return program;
1186
- }
1187
- /**
1188
- * Will get the location from the shader or the cache
1189
- * @param {string} name Uniform name
1190
- * @return {WebGLUniformLocation|null} uniformLocation
1191
- */
1192
- getUniformLocation(name) {
1193
- const programUid = getUid(
1194
- /** @type {Object} */
1195
- this.currentProgram_
1196
- );
1197
- if (this.uniformLocationsByProgram_[programUid] === void 0) {
1198
- this.uniformLocationsByProgram_[programUid] = {};
1199
- }
1200
- if (this.uniformLocationsByProgram_[programUid][name] === void 0) {
1201
- this.uniformLocationsByProgram_[programUid][name] = this.currentProgram_ && this.gl_.getUniformLocation(this.currentProgram_, name);
1202
- }
1203
- return this.uniformLocationsByProgram_[programUid][name];
1204
- }
1205
- /**
1206
- * Will get the location from the shader or the cache
1207
- * @param {string} name Attribute name
1208
- * @return {number} attribLocation
1209
- */
1210
- getAttributeLocation(name) {
1211
- const programUid = getUid(
1212
- /** @type {Object} */
1213
- this.currentProgram_
1214
- );
1215
- if (this.attribLocationsByProgram_[programUid] === void 0) {
1216
- this.attribLocationsByProgram_[programUid] = {};
1217
- }
1218
- if (this.attribLocationsByProgram_[programUid][name] === void 0) {
1219
- this.attribLocationsByProgram_[programUid][name] = this.currentProgram_ ? this.gl_.getAttribLocation(this.currentProgram_, name) : -1;
1220
- }
1221
- return this.attribLocationsByProgram_[programUid][name];
1222
- }
1223
- /**
1224
- * Sets the given transform to apply the rotation/translation/scaling of the given frame state.
1225
- * The resulting transform can be used to convert world space coordinates to view coordinates in the [-1, 1] range.
1226
- * @param {import("../Map.js").FrameState} frameState Frame state.
1227
- * @param {import("../transform.js").Transform} transform Transform to update.
1228
- * @param {boolean} [ignoreRotation] If true, view rotation will not be added to the transform
1229
- * @return {import("../transform.js").Transform} The updated transform object.
1230
- */
1231
- makeProjectionTransform(frameState, transform, ignoreRotation) {
1232
- const size = frameState.size;
1233
- const rotation = ignoreRotation ? 0 : frameState.viewState.rotation;
1234
- const resolution = frameState.viewState.resolution;
1235
- const center = frameState.viewState.center;
1236
- compose(
1237
- transform,
1238
- 0,
1239
- 0,
1240
- 2 / (resolution * size[0]),
1241
- 2 / (resolution * size[1]),
1242
- -rotation,
1243
- -center[0],
1244
- -center[1]
1245
- );
1246
- return transform;
1247
- }
1248
- /**
1249
- * Give a value for a standard float uniform
1250
- * @param {string} uniform Uniform name
1251
- * @param {number} value Value
1252
- */
1253
- setUniformFloatValue(uniform, value) {
1254
- this.gl_.uniform1f(this.getUniformLocation(uniform), value);
1255
- }
1256
- /**
1257
- * Give a value for a vec2 uniform
1258
- * @param {string} uniform Uniform name
1259
- * @param {Array<number>} value Array of length 4.
1260
- */
1261
- setUniformFloatVec2(uniform, value) {
1262
- this.gl_.uniform2fv(this.getUniformLocation(uniform), value);
1263
- }
1264
- /**
1265
- * Give a value for a vec4 uniform
1266
- * @param {string} uniform Uniform name
1267
- * @param {Array<number>} value Array of length 4.
1268
- */
1269
- setUniformFloatVec4(uniform, value) {
1270
- this.gl_.uniform4fv(this.getUniformLocation(uniform), value);
1271
- }
1272
- /**
1273
- * Give a value for a standard matrix4 uniform
1274
- * @param {string} uniform Uniform name
1275
- * @param {Array<number>} value Matrix value
1276
- */
1277
- setUniformMatrixValue(uniform, value) {
1278
- this.gl_.uniformMatrix4fv(this.getUniformLocation(uniform), false, value);
1279
- }
1280
- /**
1281
- * Disable all vertex attributes.
1282
- * @private
1283
- */
1284
- disableAllAttributes_() {
1285
- for (let i = 0; i < this.maxAttributeCount_; i++) {
1286
- this.gl_.disableVertexAttribArray(i);
1287
- }
1288
- }
1289
- /**
1290
- * Will set the currently bound buffer to an attribute of the shader program. Used by `#enableAttributes`
1291
- * internally.
1292
- * @param {string} attribName Attribute name
1293
- * @param {number} size Number of components per attributes
1294
- * @param {number} type UNSIGNED_INT, UNSIGNED_BYTE, UNSIGNED_SHORT or FLOAT
1295
- * @param {number} stride Stride in bytes (0 means attribs are packed)
1296
- * @param {number} offset Offset in bytes
1297
- * @param {boolean} instanced Whether the attribute is used for instanced rendering
1298
- * @private
1299
- */
1300
- enableAttributeArray_(attribName, size, type, stride, offset, instanced) {
1301
- const location = this.getAttributeLocation(attribName);
1302
- if (location < 0) {
1303
- return;
1304
- }
1305
- this.gl_.enableVertexAttribArray(location);
1306
- this.gl_.vertexAttribPointer(location, size, type, false, stride, offset);
1307
- if (instanced) {
1308
- this.getInstancedRenderingExtension_().vertexAttribDivisorANGLE(
1309
- location,
1310
- 1
1311
- );
1312
- }
1313
- }
1314
- /**
1315
- * @private
1316
- * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer
1317
- * @param {boolean} instanced Whether the attributes are instanced.
1318
- */
1319
- enableAttributes_(attributes, instanced) {
1320
- const stride = computeAttributesStride(attributes);
1321
- let offset = 0;
1322
- for (let i = 0; i < attributes.length; i++) {
1323
- const attr = attributes[i];
1324
- if (attr.name) {
1325
- this.enableAttributeArray_(
1326
- attr.name,
1327
- attr.size,
1328
- attr.type || FLOAT,
1329
- stride,
1330
- offset,
1331
- instanced
1332
- );
1333
- }
1334
- offset += attr.size * getByteSizeFromType(attr.type || FLOAT);
1335
- }
1336
- }
1337
- /**
1338
- * Will enable the following attributes to be read from the currently bound buffer,
1339
- * i.e. tell the GPU where to read the different attributes in the buffer. An error in the
1340
- * size/type/order of attributes will most likely break the rendering and throw a WebGL exception.
1341
- * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer
1342
- */
1343
- enableAttributes(attributes) {
1344
- this.enableAttributes_(attributes, false);
1345
- }
1346
- /**
1347
- * Will enable these attributes as instanced, meaning that they will only be read
1348
- * once per instance instead of per vertex.
1349
- * @param {Array<AttributeDescription>} attributes Ordered list of attributes to read from the buffer
1350
- */
1351
- enableAttributesInstanced(attributes) {
1352
- this.enableAttributes_(attributes, true);
1353
- }
1354
- /**
1355
- * WebGL context was lost
1356
- * @param {WebGLContextEvent} event The context loss event.
1357
- * @private
1358
- */
1359
- handleWebGLContextLost(event) {
1360
- clear(this.bufferCache_);
1361
- this.currentProgram_ = null;
1362
- event.preventDefault();
1363
- }
1364
- /**
1365
- * WebGL context was restored
1366
- * @private
1367
- */
1368
- handleWebGLContextRestored() {
1369
- this.needsToBeRecreated_ = true;
1370
- }
1371
- /**
1372
- * Returns whether this helper needs to be recreated, as the context was lost and then restored.
1373
- * @return {boolean} Whether this helper needs to be recreated.
1374
- */
1375
- needsToBeRecreated() {
1376
- return this.needsToBeRecreated_;
1377
- }
1378
- /**
1379
- * Will create or reuse a given webgl texture and apply the given size. If no image data
1380
- * specified, the texture will be empty, otherwise image data will be used and the `size`
1381
- * parameter will be ignored. If a Uint8Array is provided for data, a size must also be provided.
1382
- * Note: wrap parameters are set to clamp to edge, min filter is set to linear.
1383
- * @param {Array<number>} size Expected size of the texture
1384
- * @param {ImageData|HTMLImageElement|HTMLCanvasElement|Uint8Array|null} data Image data/object to bind to the texture
1385
- * @param {WebGLTexture} [texture] Existing texture to reuse
1386
- * @param {boolean} [nearest] Use gl.NEAREST for min/mag filter.
1387
- * @return {WebGLTexture} The generated texture
1388
- */
1389
- createTexture(size, data, texture, nearest) {
1390
- const gl = this.gl_;
1391
- texture = texture || gl.createTexture();
1392
- const filter = nearest ? gl.NEAREST : gl.LINEAR;
1393
- gl.bindTexture(gl.TEXTURE_2D, texture);
1394
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, filter);
1395
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, filter);
1396
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1397
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1398
- const level = 0;
1399
- const internalFormat = gl.RGBA;
1400
- const border = 0;
1401
- const format = gl.RGBA;
1402
- const type = gl.UNSIGNED_BYTE;
1403
- if (data instanceof Uint8Array) {
1404
- gl.texImage2D(
1405
- gl.TEXTURE_2D,
1406
- level,
1407
- internalFormat,
1408
- size[0],
1409
- size[1],
1410
- border,
1411
- format,
1412
- type,
1413
- data
1414
- );
1415
- } else if (data) {
1416
- gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, format, type, data);
1417
- } else {
1418
- gl.texImage2D(
1419
- gl.TEXTURE_2D,
1420
- level,
1421
- internalFormat,
1422
- size[0],
1423
- size[1],
1424
- border,
1425
- format,
1426
- type,
1427
- null
1428
- );
1429
- }
1430
- return texture;
1431
- }
1432
- };
1433
- function computeAttributesStride(attributes) {
1434
- let stride = 0;
1435
- for (let i = 0; i < attributes.length; i++) {
1436
- const attr = attributes[i];
1437
- stride += attr.size * getByteSizeFromType(attr.type || FLOAT);
1438
- }
1439
- return stride;
1440
- }
1441
- function getByteSizeFromType(type) {
1442
- switch (type) {
1443
- case AttributeType.UNSIGNED_BYTE:
1444
- return Uint8Array.BYTES_PER_ELEMENT;
1445
- case AttributeType.UNSIGNED_SHORT:
1446
- return Uint16Array.BYTES_PER_ELEMENT;
1447
- case AttributeType.UNSIGNED_INT:
1448
- return Uint32Array.BYTES_PER_ELEMENT;
1449
- case AttributeType.FLOAT:
1450
- default:
1451
- return Float32Array.BYTES_PER_ELEMENT;
1452
- }
1453
- }
1454
- var Helper_default = WebGLHelper;
1455
-
1456
- // node_modules/ol/webgl/TileTexture.js
1457
- init_dirname();
1458
- init_buffer();
1459
- init_process();
1460
-
1461
- // node_modules/ol/webgl/BaseTileRepresentation.js
1462
- init_dirname();
1463
- init_buffer();
1464
- init_process();
1465
- var BaseTileRepresentation = class extends Target_default {
1466
- /**
1467
- * @param {TileRepresentationOptions<TileType>} options The tile representation options.
1468
- */
1469
- constructor(options) {
1470
- super();
1471
- this.tile;
1472
- this.handleTileChange_ = this.handleTileChange_.bind(this);
1473
- this.gutter = options.gutter || 0;
1474
- this.helper = options.helper;
1475
- this.loaded = false;
1476
- this.ready = false;
1477
- }
1478
- /**
1479
- * @param {TileType} tile Tile.
1480
- */
1481
- setTile(tile) {
1482
- if (tile !== this.tile) {
1483
- if (this.tile) {
1484
- this.tile.removeEventListener(EventType_default.CHANGE, this.handleTileChange_);
1485
- }
1486
- this.tile = tile;
1487
- this.loaded = tile.getState() === TileState_default.LOADED;
1488
- if (this.loaded) {
1489
- this.uploadTile();
1490
- } else {
1491
- if (tile instanceof ImageTile_default) {
1492
- const image = tile.getImage();
1493
- if (image instanceof Image && !image.crossOrigin) {
1494
- image.crossOrigin = "anonymous";
1495
- }
1496
- }
1497
- tile.addEventListener(EventType_default.CHANGE, this.handleTileChange_);
1498
- }
1499
- }
1500
- }
1501
- /**
1502
- * @abstract
1503
- * @protected
1504
- */
1505
- uploadTile() {
1506
- abstract();
1507
- }
1508
- setReady() {
1509
- this.ready = true;
1510
- this.dispatchEvent(EventType_default.CHANGE);
1511
- }
1512
- handleTileChange_() {
1513
- if (this.tile.getState() === TileState_default.LOADED) {
1514
- this.loaded = true;
1515
- this.uploadTile();
1516
- }
1517
- }
1518
- /**
1519
- * @param {import("./Helper.js").default|null} helper The WebGL helper.
1520
- */
1521
- setHelper(helper) {
1522
- this.helper = /** @type {import("./Helper.js").default} */
1523
- helper;
1524
- if (this.helper && this.loaded) {
1525
- this.uploadTile();
1526
- }
1527
- }
1528
- /**
1529
- * @override
1530
- */
1531
- disposeInternal() {
1532
- this.setHelper(null);
1533
- this.tile.removeEventListener(EventType_default.CHANGE, this.handleTileChange_);
1534
- }
1535
- };
1536
- var BaseTileRepresentation_default = BaseTileRepresentation;
1537
-
1538
- // node_modules/ol/webgl/TileTexture.js
1539
- function bindAndConfigure(gl, texture, interpolate) {
1540
- const resampleFilter = interpolate ? gl.LINEAR : gl.NEAREST;
1541
- gl.bindTexture(gl.TEXTURE_2D, texture);
1542
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
1543
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
1544
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, resampleFilter);
1545
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, resampleFilter);
1546
- }
1547
- function uploadImageTexture(gl, texture, image, interpolate) {
1548
- bindAndConfigure(gl, texture, interpolate);
1549
- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
1550
- }
1551
- function uploadDataTexture(helper, texture, data, size, bandCount, interpolate) {
1552
- const gl = helper.getGL();
1553
- let textureType;
1554
- let canInterpolate;
1555
- if (data instanceof Float32Array) {
1556
- textureType = gl.FLOAT;
1557
- helper.getExtension("OES_texture_float");
1558
- const extension = helper.getExtension("OES_texture_float_linear");
1559
- canInterpolate = extension !== null;
1560
- } else {
1561
- textureType = gl.UNSIGNED_BYTE;
1562
- canInterpolate = true;
1563
- }
1564
- bindAndConfigure(gl, texture, interpolate && canInterpolate);
1565
- const bytesPerRow = data.byteLength / size[1];
1566
- let unpackAlignment = 1;
1567
- if (bytesPerRow % 8 === 0) {
1568
- unpackAlignment = 8;
1569
- } else if (bytesPerRow % 4 === 0) {
1570
- unpackAlignment = 4;
1571
- } else if (bytesPerRow % 2 === 0) {
1572
- unpackAlignment = 2;
1573
- }
1574
- let format;
1575
- switch (bandCount) {
1576
- case 1: {
1577
- format = gl.LUMINANCE;
1578
- break;
1579
- }
1580
- case 2: {
1581
- format = gl.LUMINANCE_ALPHA;
1582
- break;
1583
- }
1584
- case 3: {
1585
- format = gl.RGB;
1586
- break;
1587
- }
1588
- case 4: {
1589
- format = gl.RGBA;
1590
- break;
1591
- }
1592
- default: {
1593
- throw new Error(`Unsupported number of bands: ${bandCount}`);
1594
- }
1595
- }
1596
- const oldUnpackAlignment = gl.getParameter(gl.UNPACK_ALIGNMENT);
1597
- gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);
1598
- gl.texImage2D(
1599
- gl.TEXTURE_2D,
1600
- 0,
1601
- format,
1602
- size[0],
1603
- size[1],
1604
- 0,
1605
- format,
1606
- textureType,
1607
- data
1608
- );
1609
- gl.pixelStorei(gl.UNPACK_ALIGNMENT, oldUnpackAlignment);
1610
- }
1611
- var pixelContext = null;
1612
- function createPixelContext() {
1613
- pixelContext = createCanvasContext2D(1, 1, void 0, {
1614
- willReadFrequently: true
1615
- });
1616
- }
1617
- var TileTexture = class extends BaseTileRepresentation_default {
1618
- /**
1619
- * @param {import("./BaseTileRepresentation.js").TileRepresentationOptions<TileType>} options The tile texture options.
1620
- */
1621
- constructor(options) {
1622
- super(options);
1623
- this.textures = [];
1624
- this.renderSize_ = toSize(
1625
- options.grid.getTileSize(options.tile.tileCoord[0])
1626
- );
1627
- this.bandCount = NaN;
1628
- const coords = new Buffer_default(ARRAY_BUFFER, STATIC_DRAW);
1629
- coords.fromArray([
1630
- 0,
1631
- // P0
1632
- 1,
1633
- 1,
1634
- // P1
1635
- 1,
1636
- 1,
1637
- // P2
1638
- 0,
1639
- 0,
1640
- // P3
1641
- 0
1642
- ]);
1643
- options.helper.flushBufferData(coords);
1644
- this.coords = coords;
1645
- this.setTile(options.tile);
1646
- }
1647
- /**
1648
- * @override
1649
- * @param {import("./Helper.js").default} helper The WebGL helper.
1650
- */
1651
- setHelper(helper) {
1652
- var _a, _b;
1653
- const gl = (_a = this.helper) == null ? void 0 : _a.getGL();
1654
- if (gl) {
1655
- (_b = this.helper) == null ? void 0 : _b.deleteBuffer(this.coords);
1656
- for (let i = 0; i < this.textures.length; ++i) {
1657
- gl.deleteTexture(this.textures[i]);
1658
- }
1659
- }
1660
- super.setHelper(helper);
1661
- if (helper) {
1662
- helper.flushBufferData(this.coords);
1663
- }
1664
- }
1665
- /**
1666
- * @override
1667
- */
1668
- uploadTile() {
1669
- const helper = this.helper;
1670
- if (!helper) {
1671
- return;
1672
- }
1673
- const gl = helper.getGL();
1674
- const tile = this.tile;
1675
- this.textures.length = 0;
1676
- let data;
1677
- if (tile instanceof ImageTile_default || tile instanceof Tile_default) {
1678
- data = tile.getImage();
1679
- } else {
1680
- data = tile.getData();
1681
- }
1682
- if (!data) {
1683
- return;
1684
- }
1685
- const image = asImageLike(data);
1686
- if (image) {
1687
- const texture = gl.createTexture();
1688
- this.textures.push(texture);
1689
- this.bandCount = 4;
1690
- uploadImageTexture(gl, texture, image, tile.interpolate);
1691
- this.setReady();
1692
- return;
1693
- }
1694
- const arrayData = asArrayLike(data);
1695
- if (!arrayData) {
1696
- return;
1697
- }
1698
- data = arrayData;
1699
- const sourceTileSize = (
1700
- /** @type {DataTile} */
1701
- tile.getSize()
1702
- );
1703
- const pixelSize = [
1704
- sourceTileSize[0] + 2 * this.gutter,
1705
- sourceTileSize[1] + 2 * this.gutter
1706
- ];
1707
- const isFloat = data instanceof Float32Array;
1708
- const pixelCount = pixelSize[0] * pixelSize[1];
1709
- const DataType = isFloat ? Float32Array : Uint8Array;
1710
- const bytesPerElement = DataType.BYTES_PER_ELEMENT;
1711
- const arrayLike = (
1712
- /** @type {import("../DataTile.js").ArrayLike} */
1713
- data
1714
- );
1715
- const bytesPerRow = arrayLike.byteLength / pixelSize[1];
1716
- this.bandCount = Math.floor(bytesPerRow / bytesPerElement / pixelSize[0]);
1717
- const textureCount = Math.ceil(this.bandCount / 4);
1718
- if (textureCount === 1) {
1719
- const texture = gl.createTexture();
1720
- this.textures.push(texture);
1721
- uploadDataTexture(
1722
- helper,
1723
- texture,
1724
- data,
1725
- pixelSize,
1726
- this.bandCount,
1727
- tile.interpolate
1728
- );
1729
- this.setReady();
1730
- return;
1731
- }
1732
- const textureDataArrays = new Array(textureCount);
1733
- for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {
1734
- const texture = gl.createTexture();
1735
- this.textures.push(texture);
1736
- const bandCount = textureIndex < textureCount - 1 ? 4 : (this.bandCount - 1) % 4 + 1;
1737
- textureDataArrays[textureIndex] = new DataType(pixelCount * bandCount);
1738
- }
1739
- let dataIndex = 0;
1740
- let rowOffset = 0;
1741
- const colCount = pixelSize[0] * this.bandCount;
1742
- for (let rowIndex = 0; rowIndex < pixelSize[1]; ++rowIndex) {
1743
- for (let colIndex = 0; colIndex < colCount; ++colIndex) {
1744
- const dataValue = (
1745
- /** @type {Float32Array|Uint8ClampedArray|Uint8Array} */
1746
- arrayLike[rowOffset + colIndex]
1747
- );
1748
- const pixelIndex = Math.floor(dataIndex / this.bandCount);
1749
- const bandIndex = colIndex % this.bandCount;
1750
- const textureIndex = Math.floor(bandIndex / 4);
1751
- const textureData = textureDataArrays[textureIndex];
1752
- const bandCount = textureData.length / pixelCount;
1753
- const textureBandIndex = bandIndex % 4;
1754
- textureData[pixelIndex * bandCount + textureBandIndex] = dataValue;
1755
- ++dataIndex;
1756
- }
1757
- rowOffset += bytesPerRow / bytesPerElement;
1758
- }
1759
- for (let textureIndex = 0; textureIndex < textureCount; ++textureIndex) {
1760
- const texture = this.textures[textureIndex];
1761
- const textureData = textureDataArrays[textureIndex];
1762
- const bandCount = textureData.length / pixelCount;
1763
- uploadDataTexture(
1764
- helper,
1765
- texture,
1766
- textureData,
1767
- pixelSize,
1768
- bandCount,
1769
- tile.interpolate
1770
- );
1771
- }
1772
- this.setReady();
1773
- }
1774
- /**
1775
- * @param {import("../DataTile.js").ImageLike} image The image.
1776
- * @param {number} renderCol The column index (in rendered tile space).
1777
- * @param {number} renderRow The row index (in rendered tile space).
1778
- * @return {Uint8ClampedArray|null} The data.
1779
- * @private
1780
- */
1781
- getImagePixelData_(image, renderCol, renderRow) {
1782
- const gutter = this.gutter;
1783
- const renderWidth = this.renderSize_[0];
1784
- const renderHeight = this.renderSize_[1];
1785
- if (!pixelContext) {
1786
- createPixelContext();
1787
- }
1788
- const context = (
1789
- /** @type {CanvasRenderingContext2D} */
1790
- pixelContext
1791
- );
1792
- context.clearRect(0, 0, 1, 1);
1793
- const sourceWidth = image.width;
1794
- const sourceHeight = image.height;
1795
- const sourceWidthWithoutGutter = sourceWidth - 2 * gutter;
1796
- const sourceHeightWithoutGutter = sourceHeight - 2 * gutter;
1797
- const sourceCol = gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));
1798
- const sourceRow = gutter + Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));
1799
- let data;
1800
- try {
1801
- context.drawImage(image, sourceCol, sourceRow, 1, 1, 0, 0, 1, 1);
1802
- data = context.getImageData(0, 0, 1, 1).data;
1803
- } catch (e) {
1804
- pixelContext = null;
1805
- return null;
1806
- }
1807
- return data;
1808
- }
1809
- /**
1810
- * @param {import("../DataTile.js").ArrayLike} data The data.
1811
- * @param {import("../size.js").Size} sourceSize The size.
1812
- * @param {number} renderCol The column index (in rendered tile space).
1813
- * @param {number} renderRow The row index (in rendered tile space).
1814
- * @return {import("../DataTile.js").ArrayLike|null} The data.
1815
- * @private
1816
- */
1817
- getArrayPixelData_(data, sourceSize, renderCol, renderRow) {
1818
- const gutter = this.gutter;
1819
- const renderWidth = this.renderSize_[0];
1820
- const renderHeight = this.renderSize_[1];
1821
- const sourceWidthWithoutGutter = sourceSize[0];
1822
- const sourceHeightWithoutGutter = sourceSize[1];
1823
- const sourceWidth = sourceWidthWithoutGutter + 2 * gutter;
1824
- const sourceHeight = sourceHeightWithoutGutter + 2 * gutter;
1825
- const sourceCol = gutter + Math.floor(sourceWidthWithoutGutter * (renderCol / renderWidth));
1826
- const sourceRow = gutter + Math.floor(sourceHeightWithoutGutter * (renderRow / renderHeight));
1827
- if (data instanceof DataView) {
1828
- const bytesPerPixel = data.byteLength / (sourceWidth * sourceHeight);
1829
- const offset2 = bytesPerPixel * (sourceRow * sourceWidth + sourceCol);
1830
- const buffer = data.buffer.slice(offset2, offset2 + bytesPerPixel);
1831
- return new DataView(buffer);
1832
- }
1833
- const offset = this.bandCount * (sourceRow * sourceWidth + sourceCol);
1834
- return data.slice(offset, offset + this.bandCount);
1835
- }
1836
- /**
1837
- * Get data for a pixel. If the tile is not loaded, null is returned.
1838
- * @param {number} renderCol The column index (in rendered tile space).
1839
- * @param {number} renderRow The row index (in rendered tile space).
1840
- * @return {import("../DataTile.js").ArrayLike|null} The data.
1841
- */
1842
- getPixelData(renderCol, renderRow) {
1843
- if (!this.loaded) {
1844
- return null;
1845
- }
1846
- if (this.tile instanceof DataTile_default) {
1847
- const tileData = this.tile.getData();
1848
- if (!tileData) {
1849
- return null;
1850
- }
1851
- const arrayData = asArrayLike(tileData);
1852
- if (arrayData) {
1853
- const sourceSize = this.tile.getSize();
1854
- return this.getArrayPixelData_(
1855
- arrayData,
1856
- sourceSize,
1857
- renderCol,
1858
- renderRow
1859
- );
1860
- }
1861
- const imageData = asImageLike(tileData);
1862
- if (!imageData) {
1863
- return null;
1864
- }
1865
- return this.getImagePixelData_(imageData, renderCol, renderRow);
1866
- }
1867
- const image = this.tile.getImage();
1868
- if (!image) {
1869
- return null;
1870
- }
1871
- return this.getImagePixelData_(image, renderCol, renderRow);
1872
- }
1873
- };
1874
- var TileTexture_default = TileTexture;
1875
-
1876
- // node_modules/ol/renderer/webgl/TileLayerBase.js
1877
- init_dirname();
1878
- init_buffer();
1879
- init_process();
1880
-
1881
- // node_modules/ol/renderer/webgl/Layer.js
1882
- init_dirname();
1883
- init_buffer();
1884
- init_process();
1885
- var WebGLLayerRenderer = class _WebGLLayerRenderer extends Layer_default {
1886
- /**
1887
- * @param {LayerType} layer Layer.
1888
- * @param {Options} [options] Options.
1889
- */
1890
- constructor(layer, options) {
1891
- super(layer);
1892
- options = options || {};
1893
- this.inversePixelTransform_ = create();
1894
- this.postProcesses_ = options.postProcesses;
1895
- this.uniforms_ = options.uniforms;
1896
- this.helper;
1897
- this.onMapChanged_ = () => {
1898
- this.clearCache();
1899
- this.removeHelper();
1900
- };
1901
- layer.addChangeListener(Property_default.MAP, this.onMapChanged_);
1902
- this.dispatchPreComposeEvent = this.dispatchPreComposeEvent.bind(this);
1903
- this.dispatchPostComposeEvent = this.dispatchPostComposeEvent.bind(this);
1904
- }
1905
- /**
1906
- * @param {WebGLRenderingContext} context The WebGL rendering context.
1907
- * @param {import("../../Map.js").FrameState} frameState Frame state.
1908
- * @protected
1909
- */
1910
- dispatchPreComposeEvent(context, frameState) {
1911
- const layer = this.getLayer();
1912
- if (layer.hasListener(EventType_default2.PRECOMPOSE)) {
1913
- const event = new Event_default(
1914
- EventType_default2.PRECOMPOSE,
1915
- void 0,
1916
- frameState,
1917
- context
1918
- );
1919
- layer.dispatchEvent(event);
1920
- }
1921
- }
1922
- /**
1923
- * @param {WebGLRenderingContext} context The WebGL rendering context.
1924
- * @param {import("../../Map.js").FrameState} frameState Frame state.
1925
- * @protected
1926
- */
1927
- dispatchPostComposeEvent(context, frameState) {
1928
- const layer = this.getLayer();
1929
- if (layer.hasListener(EventType_default2.POSTCOMPOSE)) {
1930
- const event = new Event_default(
1931
- EventType_default2.POSTCOMPOSE,
1932
- void 0,
1933
- frameState,
1934
- context
1935
- );
1936
- layer.dispatchEvent(event);
1937
- }
1938
- }
1939
- /**
1940
- * Reset options (only handles uniforms).
1941
- * @param {Options} options Options.
1942
- */
1943
- reset(options) {
1944
- var _a;
1945
- this.uniforms_ = (_a = options.uniforms) != null ? _a : {};
1946
- if (this.helper) {
1947
- this.helper.setUniforms(this.uniforms_);
1948
- }
1949
- }
1950
- /**
1951
- * @protected
1952
- */
1953
- removeHelper() {
1954
- if (this.helper) {
1955
- this.helper.dispose();
1956
- this.helper = /** @type {import("../../webgl/Helper.js").default} */
1957
- /** @type {unknown} */
1958
- void 0;
1959
- }
1960
- }
1961
- /**
1962
- * Determine whether renderFrame should be called.
1963
- * @param {import("../../Map.js").FrameState} frameState Frame state.
1964
- * @return {boolean} Layer is ready to be rendered.
1965
- * @override
1966
- */
1967
- prepareFrame(frameState) {
1968
- if (this.getLayer().getRenderSource()) {
1969
- let incrementGroup = true;
1970
- let groupNumber = -1;
1971
- let className;
1972
- for (let i = 0, ii = frameState.layerStatesArray.length; i < ii; i++) {
1973
- const layer = (
1974
- /** @type {import("../../layer/Layer.js").default} */
1975
- frameState.layerStatesArray[i].layer
1976
- );
1977
- const renderer = layer.getRenderer();
1978
- if (!(renderer instanceof _WebGLLayerRenderer)) {
1979
- incrementGroup = true;
1980
- continue;
1981
- }
1982
- const layerClassName = layer.getClassName();
1983
- if (incrementGroup || layerClassName !== className) {
1984
- groupNumber += 1;
1985
- incrementGroup = false;
1986
- }
1987
- className = layerClassName;
1988
- if (renderer === this) {
1989
- break;
1990
- }
1991
- }
1992
- const canvasCacheKey = "map/" + frameState.mapId + "/group/" + groupNumber;
1993
- if (!this.helper || !this.helper.canvasCacheKeyMatches(canvasCacheKey) || this.helper.needsToBeRecreated()) {
1994
- this.removeHelper();
1995
- this.helper = new Helper_default({
1996
- postProcesses: this.postProcesses_,
1997
- uniforms: this.uniforms_,
1998
- canvasCacheKey
1999
- });
2000
- if (className) {
2001
- this.helper.getCanvas().className = className;
2002
- }
2003
- this.afterHelperCreated();
2004
- }
2005
- }
2006
- return this.prepareFrameInternal(frameState);
2007
- }
2008
- /**
2009
- * @protected
2010
- */
2011
- afterHelperCreated() {
2012
- }
2013
- /**
2014
- * Determine whether renderFrame should be called.
2015
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2016
- * @return {boolean} Layer is ready to be rendered.
2017
- * @protected
2018
- */
2019
- prepareFrameInternal(frameState) {
2020
- return true;
2021
- }
2022
- /**
2023
- * @protected
2024
- */
2025
- clearCache() {
2026
- }
2027
- /**
2028
- * @protected
2029
- * @param {Array<PostProcessesOptions>} postProcesses New post processes array
2030
- */
2031
- setPostProcesses(postProcesses) {
2032
- this.postProcesses_ = postProcesses;
2033
- this.removeHelper();
2034
- }
2035
- /**
2036
- * @protected
2037
- * @return {Array<PostProcessesOptions>} Array of post processes
2038
- */
2039
- getPostProcesses() {
2040
- var _a;
2041
- return (_a = this.postProcesses_) != null ? _a : [];
2042
- }
2043
- /**
2044
- * Clean up.
2045
- * @override
2046
- */
2047
- disposeInternal() {
2048
- var _a;
2049
- this.clearCache();
2050
- this.removeHelper();
2051
- (_a = this.getLayer()) == null ? void 0 : _a.removeChangeListener(
2052
- Property_default.MAP,
2053
- this.onMapChanged_
2054
- );
2055
- super.disposeInternal();
2056
- }
2057
- /**
2058
- * @param {import("../../render/EventType.js").default} type Event type.
2059
- * @param {WebGLRenderingContext} context The rendering context.
2060
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2061
- * @private
2062
- */
2063
- dispatchRenderEvent_(type, context, frameState) {
2064
- const layer = this.getLayer();
2065
- if (layer.hasListener(type)) {
2066
- compose(
2067
- this.inversePixelTransform_,
2068
- 0,
2069
- 0,
2070
- frameState.pixelRatio,
2071
- -frameState.pixelRatio,
2072
- 0,
2073
- 0,
2074
- -frameState.size[1]
2075
- );
2076
- const event = new Event_default(
2077
- type,
2078
- this.inversePixelTransform_,
2079
- frameState,
2080
- context
2081
- );
2082
- layer.dispatchEvent(event);
2083
- }
2084
- }
2085
- /**
2086
- * @param {WebGLRenderingContext} context The rendering context.
2087
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2088
- * @protected
2089
- */
2090
- preRender(context, frameState) {
2091
- this.dispatchRenderEvent_(EventType_default2.PRERENDER, context, frameState);
2092
- }
2093
- /**
2094
- * @param {WebGLRenderingContext} context The rendering context.
2095
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2096
- * @protected
2097
- */
2098
- postRender(context, frameState) {
2099
- this.dispatchRenderEvent_(EventType_default2.POSTRENDER, context, frameState);
2100
- }
2101
- };
2102
- var Layer_default2 = WebGLLayerRenderer;
2103
-
2104
- // node_modules/ol/renderer/webgl/TileLayerBase.js
2105
- var Uniforms = __spreadProps(__spreadValues({}, DefaultUniform), {
2106
- TILE_TRANSFORM: "u_tileTransform",
2107
- TRANSITION_ALPHA: "u_transitionAlpha",
2108
- DEPTH: "u_depth",
2109
- RENDER_EXTENT: "u_renderExtent",
2110
- // intersection of layer, source, and view extent
2111
- GLOBAL_ALPHA: "u_globalAlpha"
2112
- });
2113
- function depthForZ(z) {
2114
- return 1 / (z + 2);
2115
- }
2116
- function newTileRepresentationLookup() {
2117
- return { tileIds: /* @__PURE__ */ new Set(), representationsByZ: {} };
2118
- }
2119
- function lookupHasTile(tileRepresentationLookup, tile) {
2120
- return tileRepresentationLookup.tileIds.has(getUid(tile));
2121
- }
2122
- function addTileRepresentationToLookup(tileRepresentationLookup, tileRepresentation, z) {
2123
- const representationsByZ = tileRepresentationLookup.representationsByZ;
2124
- if (!(z in representationsByZ)) {
2125
- representationsByZ[z] = /* @__PURE__ */ new Set();
2126
- }
2127
- representationsByZ[z].add(tileRepresentation);
2128
- tileRepresentationLookup.tileIds.add(getUid(tileRepresentation.tile));
2129
- }
2130
- function removeTileRepresentationFromLookup(tileRepresentationLookup, tileRepresentation, z) {
2131
- const representations = tileRepresentationLookup.representationsByZ[z];
2132
- if (representations) {
2133
- representations.delete(tileRepresentation);
2134
- }
2135
- tileRepresentationLookup.tileIds.delete(getUid(tileRepresentation.tile));
2136
- }
2137
- function getRenderExtent(frameState, extent) {
2138
- const layerState = frameState.layerStatesArray[frameState.layerIndex];
2139
- if (layerState.extent) {
2140
- extent = getIntersection(
2141
- extent,
2142
- fromUserExtent(layerState.extent, frameState.viewState.projection)
2143
- );
2144
- }
2145
- const layer = layerState.layer;
2146
- if (!layer) {
2147
- return extent;
2148
- }
2149
- const source = (
2150
- /** @type {import("../../source/Tile.js").default} */
2151
- layer.getRenderSource()
2152
- );
2153
- if (!source.getWrapX()) {
2154
- const gridExtent = source.getTileGridForProjection(frameState.viewState.projection).getExtent();
2155
- if (gridExtent) {
2156
- extent = getIntersection(extent, gridExtent);
2157
- }
2158
- }
2159
- return extent;
2160
- }
2161
- function getCacheKey(source, tileCoord, key = source.getKey()) {
2162
- return `${getUid(source)},${key},${getKey(tileCoord)}`;
2163
- }
2164
- var WebGLBaseTileLayerRenderer = class extends Layer_default2 {
2165
- /**
2166
- * @param {LayerType} tileLayer Tile layer.
2167
- * @param {Options} options Options.
2168
- */
2169
- constructor(tileLayer, options) {
2170
- super(tileLayer, {
2171
- uniforms: options.uniforms,
2172
- postProcesses: options.postProcesses
2173
- });
2174
- this.renderComplete = false;
2175
- this.tileTransform_ = create();
2176
- this.tmpCoords_ = [0, 0];
2177
- this.tmpCoords2_ = [0, 0];
2178
- this.tmpExtent_ = [0, 0, 0, 0];
2179
- this.tmpTransform_ = create();
2180
- this.tmpMat4_ = create2();
2181
- this.tempTileRange_ = new TileRange_default(0, 0, 0, 0);
2182
- this.tempTileCoord_ = createOrUpdate(0, 0, 0);
2183
- this.tempSize_ = [0, 0];
2184
- const cacheSize = options.cacheSize !== void 0 ? options.cacheSize : 512;
2185
- this.tileRepresentationCache = new LRUCache_default(cacheSize);
2186
- this.maxStaleKeys = cacheSize * 0.5;
2187
- this.frameState = null;
2188
- this.renderedProjection_ = void 0;
2189
- this.sourceTileCache_ = null;
2190
- }
2191
- /**
2192
- * @param {Options} options Options.
2193
- * @override
2194
- */
2195
- reset(options) {
2196
- super.reset({
2197
- uniforms: options.uniforms
2198
- });
2199
- }
2200
- /**
2201
- * Determine whether renderFrame should be called.
2202
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2203
- * @return {boolean} Layer is ready to be rendered.
2204
- * @override
2205
- */
2206
- prepareFrameInternal(frameState) {
2207
- if (!this.renderedProjection_) {
2208
- this.renderedProjection_ = frameState.viewState.projection;
2209
- } else if (frameState.viewState.projection !== this.renderedProjection_) {
2210
- this.clearCache();
2211
- this.renderedProjection_ = frameState.viewState.projection;
2212
- }
2213
- const layer = this.getLayer();
2214
- const source = layer.getRenderSource();
2215
- if (!source) {
2216
- return false;
2217
- }
2218
- const extent = frameState.extent;
2219
- if (!extent || isEmpty(getRenderExtent(frameState, extent))) {
2220
- return false;
2221
- }
2222
- return source.getState() === "ready";
2223
- }
2224
- /**
2225
- * @abstract
2226
- * @param {import("../../webgl/BaseTileRepresentation.js").TileRepresentationOptions<TileType>} options tile representation options
2227
- * @return {TileRepresentation} A new tile representation
2228
- * @protected
2229
- */
2230
- createTileRepresentation(options) {
2231
- return abstract();
2232
- }
2233
- /**
2234
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2235
- * @param {import("../../extent.js").Extent} extent The extent to be rendered.
2236
- * @param {number} initialZ The zoom level.
2237
- * @param {TileRepresentationLookup} tileRepresentationLookup The zoom level.
2238
- * @param {number} preload Number of additional levels to load.
2239
- */
2240
- enqueueTiles(frameState, extent, initialZ, tileRepresentationLookup, preload) {
2241
- const viewState = frameState.viewState;
2242
- const tileLayer = this.getLayer();
2243
- const tileSource = tileLayer.getRenderSource();
2244
- const tileGrid = tileSource.getTileGridForProjection(viewState.projection);
2245
- const gutter = tileSource.getGutterForProjection(viewState.projection);
2246
- const tileSourceKey = getUid(tileSource);
2247
- if (!(tileSourceKey in frameState.wantedTiles)) {
2248
- frameState.wantedTiles[tileSourceKey] = {};
2249
- }
2250
- const wantedTiles = frameState.wantedTiles[tileSourceKey];
2251
- const tileRepresentationCache = this.tileRepresentationCache;
2252
- const map = tileLayer.getMapInternal();
2253
- const minZ = Math.max(
2254
- initialZ - preload,
2255
- tileGrid.getMinZoom(),
2256
- tileGrid.getZForResolution(
2257
- Math.min(
2258
- tileLayer.getMaxResolution(),
2259
- map ? map.getView().getResolutionForZoom(Math.max(tileLayer.getMinZoom(), 0)) : tileGrid.getResolution(0)
2260
- ),
2261
- tileSource.zDirection
2262
- )
2263
- );
2264
- const rotation = viewState.rotation;
2265
- const viewport = rotation ? getRotatedViewport(
2266
- viewState.center,
2267
- viewState.resolution,
2268
- rotation,
2269
- frameState.size
2270
- ) : void 0;
2271
- for (let z = initialZ; z >= minZ; --z) {
2272
- const tileRange = tileGrid.getTileRangeForExtentAndZ(
2273
- extent,
2274
- z,
2275
- this.tempTileRange_
2276
- );
2277
- const tileResolution = tileGrid.getResolution(z);
2278
- for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {
2279
- for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {
2280
- if (rotation && !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)) {
2281
- continue;
2282
- }
2283
- const tileCoord = createOrUpdate(z, x, y, this.tempTileCoord_);
2284
- const cacheKey = getCacheKey(tileSource, tileCoord);
2285
- let tileRepresentation;
2286
- let tile;
2287
- if (tileRepresentationCache.containsKey(cacheKey)) {
2288
- tileRepresentation = tileRepresentationCache.get(cacheKey);
2289
- tile = tileRepresentation.tile;
2290
- }
2291
- if (!tileRepresentation || tileRepresentation.tile.key !== tileSource.getKey()) {
2292
- const sourceProjection = tileSource.getProjection();
2293
- const sourceTileCache = sourceProjection && !equivalent(sourceProjection, viewState.projection) ? this.getSourceTileCache_() : void 0;
2294
- tile = tileSource.getTile(
2295
- z,
2296
- x,
2297
- y,
2298
- frameState.pixelRatio,
2299
- viewState.projection,
2300
- sourceTileCache
2301
- );
2302
- if (!tile) {
2303
- continue;
2304
- }
2305
- }
2306
- if (!tile) {
2307
- continue;
2308
- }
2309
- if (lookupHasTile(tileRepresentationLookup, tile)) {
2310
- continue;
2311
- }
2312
- if (!tileRepresentation) {
2313
- tileRepresentation = this.createTileRepresentation({
2314
- tile,
2315
- grid: tileGrid,
2316
- helper: this.helper,
2317
- gutter
2318
- });
2319
- tileRepresentationCache.set(cacheKey, tileRepresentation);
2320
- } else {
2321
- tileRepresentation.setTile(tile);
2322
- }
2323
- addTileRepresentationToLookup(
2324
- tileRepresentationLookup,
2325
- tileRepresentation,
2326
- z
2327
- );
2328
- const tileQueueKey = tile.getKey();
2329
- wantedTiles[tileQueueKey] = true;
2330
- if (tile.getState() === TileState_default.IDLE) {
2331
- if (!frameState.tileQueue.isKeyQueued(tileQueueKey)) {
2332
- frameState.tileQueue.enqueue([
2333
- tile,
2334
- tileSourceKey,
2335
- tileGrid.getTileCoordCenter(tileCoord),
2336
- tileResolution
2337
- ]);
2338
- }
2339
- }
2340
- }
2341
- }
2342
- }
2343
- }
2344
- /**
2345
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2346
- * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha
2347
- * @protected
2348
- */
2349
- beforeTilesRender(frameState, tilesWithAlpha) {
2350
- var _a;
2351
- const currentFrameState = (_a = this.frameState) != null ? _a : frameState;
2352
- this.helper.prepareDraw(currentFrameState, !tilesWithAlpha, true);
2353
- }
2354
- /**
2355
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2356
- * @return {boolean} If returns false, tile mask rendering will be skipped
2357
- * @protected
2358
- */
2359
- beforeTilesMaskRender(frameState) {
2360
- return false;
2361
- }
2362
- /**
2363
- * @param {TileRepresentation} tileRepresentation Tile representation
2364
- * @param {import("../../transform.js").Transform} tileTransform Tile transform
2365
- * @param {import("../../Map.js").FrameState} frameState Frame state
2366
- * @param {import("../../extent.js").Extent} renderExtent Render extent
2367
- * @param {number} tileResolution Tile resolution
2368
- * @param {import("../../size.js").Size} tileSize Tile size
2369
- * @param {import("../../coordinate.js").Coordinate} tileOrigin Tile origin
2370
- * @param {import("../../extent.js").Extent} tileExtent tile Extent
2371
- * @param {number} depth Depth
2372
- * @param {number} gutter Gutter
2373
- * @param {number} alpha Alpha
2374
- * @protected
2375
- */
2376
- renderTile(tileRepresentation, tileTransform, frameState, renderExtent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha) {
2377
- }
2378
- /**
2379
- * @param {TileRepresentation} tileRepresentation Tile representation
2380
- * @param {number} tileZ Tile Z
2381
- * @param {import("../../extent.js").Extent} extent Render extent
2382
- * @param {number} depth Depth
2383
- * @protected
2384
- */
2385
- renderTileMask(tileRepresentation, tileZ, extent, depth) {
2386
- }
2387
- /**
2388
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2389
- * @param {TileRepresentation} tileRepresentation Tile representation.
2390
- * @param {number} tileZ Tile Z.
2391
- * @param {number} gutter Gutter.
2392
- * @param {import("../../extent.js").Extent} extent Render extent.
2393
- * @param {Object<string, number>} alphaLookup Alpha lookup.
2394
- * @param {import("../../tilegrid/TileGrid.js").default} tileGrid Tile grid.
2395
- * @private
2396
- */
2397
- drawTile_(frameState, tileRepresentation, tileZ, gutter, extent, alphaLookup, tileGrid) {
2398
- if (!tileRepresentation.ready) {
2399
- return;
2400
- }
2401
- const tile = tileRepresentation.tile;
2402
- const tileCoord = tile.tileCoord;
2403
- const tileCoordKey = getKey(tileCoord);
2404
- const alpha = tileCoordKey in alphaLookup ? alphaLookup[tileCoordKey] : 1;
2405
- const tileResolution = tileGrid.getResolution(tileZ);
2406
- const tileSize = toSize(tileGrid.getTileSize(tileZ), this.tempSize_);
2407
- const tileOrigin = tileGrid.getOrigin(tileZ);
2408
- const tileExtent = tileGrid.getTileCoordExtent(tileCoord);
2409
- const depth = alpha < 1 ? -1 : depthForZ(tileZ);
2410
- if (alpha < 1) {
2411
- frameState.animate = true;
2412
- }
2413
- const viewState = frameState.viewState;
2414
- const centerX = viewState.center[0];
2415
- const centerY = viewState.center[1];
2416
- const tileWidthWithGutter = tileSize[0] + 2 * gutter;
2417
- const tileHeightWithGutter = tileSize[1] + 2 * gutter;
2418
- const aspectRatio = tileWidthWithGutter / tileHeightWithGutter;
2419
- const centerI = (centerX - tileOrigin[0]) / (tileSize[0] * tileResolution);
2420
- const centerJ = (tileOrigin[1] - centerY) / (tileSize[1] * tileResolution);
2421
- const tileScale = viewState.resolution / tileResolution;
2422
- const tileCenterI = tileCoord[1];
2423
- const tileCenterJ = tileCoord[2];
2424
- reset(this.tileTransform_);
2425
- scale(
2426
- this.tileTransform_,
2427
- 2 / (frameState.size[0] * tileScale / tileWidthWithGutter),
2428
- -2 / (frameState.size[1] * tileScale / tileWidthWithGutter)
2429
- );
2430
- rotate(this.tileTransform_, viewState.rotation);
2431
- scale(this.tileTransform_, 1, 1 / aspectRatio);
2432
- translate(
2433
- this.tileTransform_,
2434
- (tileSize[0] * (tileCenterI - centerI) - gutter) / tileWidthWithGutter,
2435
- (tileSize[1] * (tileCenterJ - centerJ) - gutter) / tileHeightWithGutter
2436
- );
2437
- this.renderTile(
2438
- /** @type {TileRepresentation} */
2439
- tileRepresentation,
2440
- this.tileTransform_,
2441
- frameState,
2442
- extent,
2443
- tileResolution,
2444
- tileSize,
2445
- tileOrigin,
2446
- tileExtent,
2447
- depth,
2448
- gutter,
2449
- alpha
2450
- );
2451
- }
2452
- /**
2453
- * Render the layer.
2454
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2455
- * @return {HTMLElement} The rendered element.
2456
- * @override
2457
- */
2458
- renderFrame(frameState) {
2459
- this.frameState = frameState;
2460
- this.renderComplete = true;
2461
- const gl = this.helper.getGL();
2462
- this.preRender(gl, frameState);
2463
- const viewState = frameState.viewState;
2464
- const tileLayer = this.getLayer();
2465
- const tileSource = tileLayer.getRenderSource();
2466
- const tileGrid = tileSource.getTileGridForProjection(viewState.projection);
2467
- const gutter = tileSource.getGutterForProjection(viewState.projection);
2468
- const frameExtent = frameState.extent;
2469
- if (!frameExtent) {
2470
- return this.helper.getCanvas();
2471
- }
2472
- const extent = getRenderExtent(frameState, frameExtent);
2473
- const z = tileGrid.getZForResolution(
2474
- viewState.resolution,
2475
- tileSource.zDirection
2476
- );
2477
- this.updateStaleKeys(tileSource.getKey());
2478
- const tileRepresentationLookup = newTileRepresentationLookup();
2479
- const preload = tileLayer.getPreload();
2480
- if (frameState.nextExtent) {
2481
- const targetZ = tileGrid.getZForResolution(
2482
- viewState.nextResolution,
2483
- tileSource.zDirection
2484
- );
2485
- const nextExtent = getRenderExtent(frameState, frameState.nextExtent);
2486
- this.enqueueTiles(
2487
- frameState,
2488
- nextExtent,
2489
- targetZ,
2490
- tileRepresentationLookup,
2491
- preload
2492
- );
2493
- }
2494
- this.enqueueTiles(frameState, extent, z, tileRepresentationLookup, 0);
2495
- if (preload > 0) {
2496
- setTimeout(() => {
2497
- this.enqueueTiles(
2498
- frameState,
2499
- extent,
2500
- z - 1,
2501
- tileRepresentationLookup,
2502
- preload - 1
2503
- );
2504
- }, 0);
2505
- }
2506
- const alphaLookup = {};
2507
- let blend = false;
2508
- const representationsByZ = tileRepresentationLookup.representationsByZ;
2509
- if (z in representationsByZ) {
2510
- const uid = getUid(this);
2511
- const time = frameState.time;
2512
- for (const tileRepresentation of representationsByZ[z]) {
2513
- const tile = tileRepresentation.tile;
2514
- if (tile.getState() === TileState_default.EMPTY) {
2515
- continue;
2516
- }
2517
- const tileCoord = tile.tileCoord;
2518
- const tileCoordKey = getKey(tileCoord);
2519
- if (tileRepresentation.ready) {
2520
- const alpha = tile.getAlpha(uid, time);
2521
- if (alpha === 1) {
2522
- tile.endTransition(uid);
2523
- continue;
2524
- }
2525
- blend = true;
2526
- alphaLookup[tileCoordKey] = alpha;
2527
- }
2528
- this.renderComplete = false;
2529
- const hasStaleTile = this.findStaleTile_(
2530
- tileCoord,
2531
- tileRepresentationLookup
2532
- );
2533
- if (hasStaleTile) {
2534
- delete alphaLookup[tileCoordKey];
2535
- removeTileRepresentationFromLookup(
2536
- tileRepresentationLookup,
2537
- tileRepresentation,
2538
- z
2539
- );
2540
- frameState.animate = true;
2541
- continue;
2542
- }
2543
- const coveredByChildren = this.findAltTiles_(
2544
- tileGrid,
2545
- tileCoord,
2546
- z + 1,
2547
- tileRepresentationLookup
2548
- );
2549
- if (coveredByChildren) {
2550
- continue;
2551
- }
2552
- const minZoom = tileGrid.getMinZoom();
2553
- for (let parentZ = z - 1; parentZ >= minZoom; --parentZ) {
2554
- const coveredByParent = this.findAltTiles_(
2555
- tileGrid,
2556
- tileCoord,
2557
- parentZ,
2558
- tileRepresentationLookup
2559
- );
2560
- if (coveredByParent) {
2561
- break;
2562
- }
2563
- }
2564
- }
2565
- }
2566
- const zs = Object.keys(representationsByZ).map(Number).sort(descending);
2567
- const renderTileMask = this.beforeTilesMaskRender(frameState);
2568
- if (renderTileMask) {
2569
- for (let j = 0, jj = zs.length; j < jj; ++j) {
2570
- const tileZ = zs[j];
2571
- for (const tileRepresentation of representationsByZ[tileZ]) {
2572
- const tileCoord = tileRepresentation.tile.tileCoord;
2573
- const tileCoordKey = getKey(tileCoord);
2574
- if (tileCoordKey in alphaLookup) {
2575
- continue;
2576
- }
2577
- const tileExtent = tileGrid.getTileCoordExtent(tileCoord);
2578
- this.renderTileMask(
2579
- /** @type {TileRepresentation} */
2580
- tileRepresentation,
2581
- tileZ,
2582
- tileExtent,
2583
- depthForZ(tileZ)
2584
- );
2585
- }
2586
- }
2587
- }
2588
- this.beforeTilesRender(frameState, blend);
2589
- for (let j = 0, jj = zs.length; j < jj; ++j) {
2590
- const tileZ = zs[j];
2591
- for (const tileRepresentation of representationsByZ[tileZ]) {
2592
- const tileCoord = tileRepresentation.tile.tileCoord;
2593
- const tileCoordKey = getKey(tileCoord);
2594
- if (tileCoordKey in alphaLookup) {
2595
- continue;
2596
- }
2597
- this.drawTile_(
2598
- frameState,
2599
- /** @type {TileRepresentation} */
2600
- tileRepresentation,
2601
- tileZ,
2602
- gutter,
2603
- extent,
2604
- alphaLookup,
2605
- tileGrid
2606
- );
2607
- }
2608
- }
2609
- if (z in representationsByZ) {
2610
- for (const tileRepresentation of representationsByZ[z]) {
2611
- const tileCoord = tileRepresentation.tile.tileCoord;
2612
- const tileCoordKey = getKey(tileCoord);
2613
- if (tileCoordKey in alphaLookup) {
2614
- this.drawTile_(
2615
- frameState,
2616
- /** @type {TileRepresentation} */
2617
- tileRepresentation,
2618
- z,
2619
- gutter,
2620
- extent,
2621
- alphaLookup,
2622
- tileGrid
2623
- );
2624
- }
2625
- }
2626
- }
2627
- this.beforeFinalize(frameState);
2628
- this.helper.finalizeDraw(
2629
- frameState,
2630
- this.dispatchPreComposeEvent,
2631
- this.dispatchPostComposeEvent
2632
- );
2633
- const canvas = this.helper.getCanvas();
2634
- const tileRepresentationCache = this.tileRepresentationCache;
2635
- tileRepresentationCache.expireCache();
2636
- this.postRender(gl, frameState);
2637
- return canvas;
2638
- }
2639
- /**
2640
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2641
- * @protected
2642
- */
2643
- beforeFinalize(frameState) {
2644
- }
2645
- /**
2646
- * Look for a ready tile at the same coordinate from a previous source key.
2647
- * A match is added to the provided lookup at the target zoom level.
2648
- * @param {import("../../tilecoord.js").TileCoord} tileCoord The target tile coordinate.
2649
- * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of
2650
- * tile representations by zoom level.
2651
- * @return {boolean} A stale tile was found and added to the lookup.
2652
- * @private
2653
- */
2654
- findStaleTile_(tileCoord, tileRepresentationLookup) {
2655
- const tileRepresentationCache = this.tileRepresentationCache;
2656
- const source = this.getLayer().getRenderSource();
2657
- const z = tileCoord[0];
2658
- const staleKeys = this.getStaleKeys();
2659
- for (let i = 0, ii = staleKeys.length; i < ii; ++i) {
2660
- const cacheKey = getCacheKey(source, tileCoord, staleKeys[i]);
2661
- if (tileRepresentationCache.containsKey(cacheKey)) {
2662
- const tileRepresentation = tileRepresentationCache.get(cacheKey);
2663
- if (tileRepresentation.ready && !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)) {
2664
- tileRepresentation.tile.endTransition(getUid(this));
2665
- addTileRepresentationToLookup(
2666
- tileRepresentationLookup,
2667
- tileRepresentation,
2668
- z
2669
- );
2670
- return true;
2671
- }
2672
- }
2673
- }
2674
- return false;
2675
- }
2676
- /**
2677
- * Look for tiles covering the provided tile coordinate at an alternate
2678
- * zoom level. Loaded tiles will be added to the provided tile representation lookup.
2679
- * @param {import("../../tilegrid/TileGrid.js").default} tileGrid The tile grid.
2680
- * @param {import("../../tilecoord.js").TileCoord} tileCoord The target tile coordinate.
2681
- * @param {number} altZ The alternate zoom level.
2682
- * @param {TileRepresentationLookup} tileRepresentationLookup Lookup of
2683
- * tile representations by zoom level.
2684
- * @return {boolean} The tile coordinate is covered by loaded tiles at the alternate zoom level.
2685
- * @private
2686
- */
2687
- findAltTiles_(tileGrid, tileCoord, altZ, tileRepresentationLookup) {
2688
- const tileRange = tileGrid.getTileRangeForTileCoordAndZ(
2689
- tileCoord,
2690
- altZ,
2691
- this.tempTileRange_
2692
- );
2693
- if (!tileRange) {
2694
- return false;
2695
- }
2696
- let covered = true;
2697
- const tileRepresentationCache = this.tileRepresentationCache;
2698
- const source = this.getLayer().getRenderSource();
2699
- for (let x = tileRange.minX; x <= tileRange.maxX; ++x) {
2700
- for (let y = tileRange.minY; y <= tileRange.maxY; ++y) {
2701
- const cacheKey = getCacheKey(source, [altZ, x, y]);
2702
- let loaded = false;
2703
- if (tileRepresentationCache.containsKey(cacheKey)) {
2704
- const tileRepresentation = tileRepresentationCache.get(cacheKey);
2705
- if (tileRepresentation.ready && !lookupHasTile(tileRepresentationLookup, tileRepresentation.tile)) {
2706
- addTileRepresentationToLookup(
2707
- tileRepresentationLookup,
2708
- tileRepresentation,
2709
- altZ
2710
- );
2711
- loaded = true;
2712
- }
2713
- }
2714
- if (!loaded) {
2715
- covered = false;
2716
- }
2717
- }
2718
- }
2719
- return covered;
2720
- }
2721
- /**
2722
- * @override
2723
- */
2724
- /**
2725
- * @return {import("../../structs/LRUCache.js").default<import("../../Tile.js").default>} Source tile cache.
2726
- * @private
2727
- */
2728
- getSourceTileCache_() {
2729
- if (!this.sourceTileCache_) {
2730
- this.sourceTileCache_ = new LRUCache_default(512);
2731
- }
2732
- return this.sourceTileCache_;
2733
- }
2734
- /**
2735
- * @override
2736
- */
2737
- clearCache() {
2738
- var _a;
2739
- super.clearCache();
2740
- const tileRepresentationCache = this.tileRepresentationCache;
2741
- tileRepresentationCache.forEach(
2742
- (tileRepresentation) => tileRepresentation.dispose()
2743
- );
2744
- tileRepresentationCache.clear();
2745
- (_a = this.sourceTileCache_) == null ? void 0 : _a.clear();
2746
- }
2747
- /**
2748
- * @override
2749
- */
2750
- afterHelperCreated() {
2751
- super.afterHelperCreated();
2752
- this.tileRepresentationCache.forEach(
2753
- (tileRepresentation) => tileRepresentation.setHelper(this.helper)
2754
- );
2755
- }
2756
- /**
2757
- * Clean up.
2758
- * @override
2759
- */
2760
- disposeInternal() {
2761
- super.disposeInternal();
2762
- this.frameState = null;
2763
- }
2764
- /**
2765
- * Apply the render extent as a uniform; the render extent uniform is expressed in the same coordinate space as the geometries in the render buffers,
2766
- * whereas the input render extent is expressed in full world coordinates.
2767
- * @protected
2768
- * @param {import("../../extent.js").Extent} renderExtent Render extent in map units (world coordinates)
2769
- * @param {import('../../transform.js').Transform} worldToLocalTransform Transform.
2770
- */
2771
- applyRenderExtentUniform(renderExtent, worldToLocalTransform) {
2772
- this.tmpCoords_[0] = renderExtent[0];
2773
- this.tmpCoords_[1] = renderExtent[1];
2774
- apply(worldToLocalTransform, this.tmpCoords_);
2775
- this.tmpCoords2_[0] = renderExtent[2];
2776
- this.tmpCoords2_[1] = renderExtent[3];
2777
- apply(worldToLocalTransform, this.tmpCoords2_);
2778
- this.tmpExtent_[0] = this.tmpCoords_[0];
2779
- this.tmpExtent_[1] = this.tmpCoords_[1];
2780
- this.tmpExtent_[2] = this.tmpCoords2_[0];
2781
- this.tmpExtent_[3] = this.tmpCoords2_[1];
2782
- this.helper.setUniformFloatVec4(Uniforms.RENDER_EXTENT, this.tmpExtent_);
2783
- }
2784
- };
2785
- var TileLayerBase_default = WebGLBaseTileLayerRenderer;
2786
-
2787
- // node_modules/ol/renderer/webgl/TileLayer.js
2788
- var Uniforms2 = __spreadProps(__spreadValues({}, Uniforms), {
2789
- TILE_TEXTURE_ARRAY: "u_tileTextures",
2790
- TEXTURE_PIXEL_WIDTH: "u_texturePixelWidth",
2791
- TEXTURE_PIXEL_HEIGHT: "u_texturePixelHeight",
2792
- TEXTURE_RESOLUTION: "u_textureResolution"
2793
- // map units per texture pixel
2794
- });
2795
- var Attributes = {
2796
- TEXTURE_COORD: "a_textureCoord"
2797
- };
2798
- var attributeDescriptions = [
2799
- {
2800
- name: Attributes.TEXTURE_COORD,
2801
- size: 2,
2802
- type: AttributeType.FLOAT
2803
- }
2804
- ];
2805
- var WebGLTileLayerRenderer = class extends TileLayerBase_default {
2806
- /**
2807
- * @param {LayerType} tileLayer Tile layer.
2808
- * @param {Options} options Options.
2809
- */
2810
- constructor(tileLayer, options) {
2811
- super(tileLayer, options);
2812
- this.program_;
2813
- this.vertexShader_ = options.vertexShader;
2814
- this.fragmentShader_ = options.fragmentShader;
2815
- this.indices_ = new Buffer_default(ELEMENT_ARRAY_BUFFER, STATIC_DRAW);
2816
- this.indices_.fromArray([0, 1, 3, 1, 2, 3]);
2817
- this.paletteTextures_ = options.paletteTextures || [];
2818
- }
2819
- /**
2820
- * @param {Options} options Options.
2821
- * @override
2822
- */
2823
- reset(options) {
2824
- super.reset(options);
2825
- if (this.helper) {
2826
- const gl = this.helper.getGL();
2827
- for (const paletteTexture of this.paletteTextures_) {
2828
- paletteTexture.delete(gl);
2829
- }
2830
- }
2831
- this.vertexShader_ = options.vertexShader;
2832
- this.fragmentShader_ = options.fragmentShader;
2833
- this.paletteTextures_ = options.paletteTextures || [];
2834
- if (this.helper) {
2835
- this.program_ = this.helper.getProgram(
2836
- this.fragmentShader_,
2837
- this.vertexShader_
2838
- );
2839
- const gl = this.helper.getGL();
2840
- for (const paletteTexture of this.paletteTextures_) {
2841
- paletteTexture.getTexture(gl);
2842
- }
2843
- }
2844
- }
2845
- /**
2846
- * @override
2847
- */
2848
- afterHelperCreated() {
2849
- super.afterHelperCreated();
2850
- const gl = this.helper.getGL();
2851
- for (const paletteTexture of this.paletteTextures_) {
2852
- paletteTexture.getTexture(gl);
2853
- }
2854
- this.program_ = this.helper.getProgram(
2855
- this.fragmentShader_,
2856
- this.vertexShader_
2857
- );
2858
- const indices = this.indices_;
2859
- if (indices) {
2860
- this.helper.flushBufferData(indices);
2861
- }
2862
- }
2863
- /**
2864
- * @override
2865
- */
2866
- removeHelper() {
2867
- if (this.helper) {
2868
- const gl = this.helper.getGL();
2869
- for (const paletteTexture of this.paletteTextures_) {
2870
- paletteTexture.delete(gl);
2871
- }
2872
- }
2873
- super.removeHelper();
2874
- }
2875
- /**
2876
- * @param {import("../../webgl/BaseTileRepresentation.js").TileRepresentationOptions<import("../../webgl/TileTexture.js").TileType>} options Tile representation options.
2877
- * @override
2878
- */
2879
- createTileRepresentation(options) {
2880
- return new TileTexture_default(options);
2881
- }
2882
- /**
2883
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2884
- * @param {boolean} tilesWithAlpha True if at least one of the rendered tiles has alpha.
2885
- * @override
2886
- */
2887
- beforeTilesRender(frameState, tilesWithAlpha) {
2888
- super.beforeTilesRender(frameState, tilesWithAlpha);
2889
- const program = this.program_;
2890
- if (program) {
2891
- this.helper.useProgram(program, frameState);
2892
- }
2893
- }
2894
- /**
2895
- * @param {TileTextureRepresentation} tileTexture Tile texture.
2896
- * @param {import("../../transform.js").Transform} tileTransform Tile transform.
2897
- * @param {import("../../Map.js").FrameState} frameState Frame state.
2898
- * @param {import("../../extent.js").Extent} renderExtent Render extent.
2899
- * @param {number} tileResolution Tile resolution.
2900
- * @param {import("../../size.js").Size} tileSize Tile size.
2901
- * @param {import("../../coordinate.js").Coordinate} tileOrigin Tile origin.
2902
- * @param {import("../../extent.js").Extent} tileExtent Tile extent.
2903
- * @param {number} depth Depth.
2904
- * @param {number} gutter Gutter.
2905
- * @param {number} alpha Alpha.
2906
- * @override
2907
- */
2908
- renderTile(tileTexture, tileTransform, frameState, renderExtent, tileResolution, tileSize, tileOrigin, tileExtent, depth, gutter, alpha) {
2909
- const gl = this.helper.getGL();
2910
- this.helper.bindBuffer(tileTexture.coords);
2911
- const tileIndices = this.indices_;
2912
- if (tileIndices) {
2913
- this.helper.bindBuffer(tileIndices);
2914
- }
2915
- this.helper.enableAttributes(attributeDescriptions);
2916
- let textureSlot = 0;
2917
- while (textureSlot < tileTexture.textures.length) {
2918
- const uniformName = `${Uniforms2.TILE_TEXTURE_ARRAY}[${textureSlot}]`;
2919
- this.helper.bindTexture(
2920
- tileTexture.textures[textureSlot],
2921
- textureSlot,
2922
- uniformName
2923
- );
2924
- ++textureSlot;
2925
- }
2926
- for (let paletteIndex = 0; paletteIndex < this.paletteTextures_.length; ++paletteIndex) {
2927
- const paletteTexture = this.paletteTextures_[paletteIndex];
2928
- const texture = paletteTexture.getTexture(gl);
2929
- this.helper.bindTexture(texture, textureSlot, paletteTexture.name);
2930
- ++textureSlot;
2931
- }
2932
- const viewState = frameState.viewState;
2933
- const tileWidthWithGutter = tileSize[0] + 2 * gutter;
2934
- const tileHeightWithGutter = tileSize[1] + 2 * gutter;
2935
- const tile = tileTexture.tile;
2936
- const tileCoord = tile.tileCoord;
2937
- const tileCenterI = tileCoord[1];
2938
- const tileCenterJ = tileCoord[2];
2939
- this.helper.setUniformMatrixValue(
2940
- Uniforms2.TILE_TRANSFORM,
2941
- fromTransform(this.tmpMat4_, tileTransform)
2942
- );
2943
- this.helper.setUniformFloatValue(Uniforms2.TRANSITION_ALPHA, alpha);
2944
- this.helper.setUniformFloatValue(Uniforms2.DEPTH, depth);
2945
- let gutterExtent = renderExtent;
2946
- if (gutter > 0) {
2947
- gutterExtent = tileExtent;
2948
- getIntersection(gutterExtent, renderExtent, gutterExtent);
2949
- }
2950
- const textureOriginX = tileOrigin[0] + tileCenterI * tileSize[0] * tileResolution - gutter * tileResolution;
2951
- const textureOriginY = tileOrigin[1] - tileCenterJ * tileSize[1] * tileResolution + gutter * tileResolution;
2952
- const extentTransform = translate(
2953
- reset(this.tmpTransform_),
2954
- -textureOriginX,
2955
- -textureOriginY
2956
- );
2957
- this.applyRenderExtentUniform(gutterExtent, extentTransform);
2958
- this.helper.setUniformFloatValue(Uniforms2.RESOLUTION, viewState.resolution);
2959
- this.helper.setUniformFloatValue(Uniforms2.ZOOM, viewState.zoom);
2960
- this.helper.setUniformFloatValue(
2961
- Uniforms2.TEXTURE_PIXEL_WIDTH,
2962
- tileWidthWithGutter
2963
- );
2964
- this.helper.setUniformFloatValue(
2965
- Uniforms2.TEXTURE_PIXEL_HEIGHT,
2966
- tileHeightWithGutter
2967
- );
2968
- this.helper.setUniformFloatValue(
2969
- Uniforms2.TEXTURE_RESOLUTION,
2970
- tileResolution
2971
- );
2972
- const indices = this.indices_;
2973
- if (indices) {
2974
- this.helper.drawElements(0, indices.getSize());
2975
- }
2976
- }
2977
- /**
2978
- * @param {import("../../pixel.js").Pixel} pixel Pixel.
2979
- * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Data at the pixel location.
2980
- * @override
2981
- */
2982
- getData(pixel) {
2983
- var _a;
2984
- const gl = this.helper.getGL();
2985
- if (!gl) {
2986
- return null;
2987
- }
2988
- const frameState = this.frameState;
2989
- if (!frameState) {
2990
- return null;
2991
- }
2992
- const layer = this.getLayer();
2993
- const coordinate = apply(
2994
- frameState.pixelToCoordinateTransform,
2995
- pixel.slice()
2996
- );
2997
- const viewState = frameState.viewState;
2998
- const layerExtent = layer.getExtent();
2999
- if (layerExtent) {
3000
- if (!containsCoordinate(
3001
- fromUserExtent(layerExtent, viewState.projection),
3002
- coordinate
3003
- )) {
3004
- return null;
3005
- }
3006
- }
3007
- const sources = layer.getSources(
3008
- boundingExtent([coordinate]),
3009
- viewState.resolution
3010
- );
3011
- let i, source, tileGrid;
3012
- for (i = sources.length - 1; i >= 0; --i) {
3013
- source = sources[i];
3014
- if (source.getState() === "ready") {
3015
- tileGrid = source.getTileGridForProjection(viewState.projection);
3016
- if (source.getWrapX()) {
3017
- break;
3018
- }
3019
- const gridExtent = tileGrid.getExtent();
3020
- if (!gridExtent || containsCoordinate(gridExtent, coordinate)) {
3021
- break;
3022
- }
3023
- }
3024
- }
3025
- if (i < 0 || !source || !tileGrid) {
3026
- return null;
3027
- }
3028
- const tileTextureCache = this.tileRepresentationCache;
3029
- for (let z = tileGrid.getZForResolution(viewState.resolution); z >= tileGrid.getMinZoom(); --z) {
3030
- const tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);
3031
- const cacheKey = getCacheKey(source, tileCoord);
3032
- if (!tileTextureCache.containsKey(cacheKey)) {
3033
- continue;
3034
- }
3035
- const tileTexture = tileTextureCache.get(cacheKey);
3036
- const tile = tileTexture.tile;
3037
- if (tile.getState() === TileState_default.EMPTY) {
3038
- return null;
3039
- }
3040
- if (!tileTexture.loaded) {
3041
- continue;
3042
- }
3043
- const tileOrigin = tileGrid.getOrigin(z);
3044
- const tileSize = toSize(tileGrid.getTileSize(z));
3045
- const tileResolution = tileGrid.getResolution(z);
3046
- const col = (coordinate[0] - tileOrigin[0]) / tileResolution - tileCoord[1] * tileSize[0];
3047
- const row = (tileOrigin[1] - coordinate[1]) / tileResolution - tileCoord[2] * tileSize[1];
3048
- return (_a = tileTexture.getPixelData(col, row)) != null ? _a : null;
3049
- }
3050
- return null;
3051
- }
3052
- /**
3053
- * Clean up.
3054
- * @override
3055
- */
3056
- disposeInternal() {
3057
- const helper = this.helper;
3058
- if (helper) {
3059
- const gl = helper.getGL();
3060
- for (const paletteTexture of this.paletteTextures_) {
3061
- paletteTexture.delete(gl);
3062
- }
3063
- this.paletteTextures_.length = 0;
3064
- const program = this.program_;
3065
- if (program) {
3066
- gl.deleteProgram(program);
3067
- }
3068
- this.program_ = void 0;
3069
- const indicesBuffer = this.indices_;
3070
- if (indicesBuffer) {
3071
- helper.deleteBuffer(indicesBuffer);
3072
- }
3073
- this.indices_ = void 0;
3074
- }
3075
- super.disposeInternal();
3076
- }
3077
- };
3078
- var TileLayer_default = WebGLTileLayerRenderer;
3079
-
3080
- // node_modules/ol/webgl/PaletteTexture.js
3081
- init_dirname();
3082
- init_buffer();
3083
- init_process();
3084
- var PaletteTexture = class {
3085
- /**
3086
- * @param {string} name The name of the texture.
3087
- * @param {Uint8Array} data The texture data.
3088
- */
3089
- constructor(name, data) {
3090
- this.name = name;
3091
- this.data = data;
3092
- this.texture_ = null;
3093
- }
3094
- /**
3095
- * @param {WebGLRenderingContext} gl Rendering context.
3096
- * @return {WebGLTexture} The texture.
3097
- */
3098
- getTexture(gl) {
3099
- if (!this.texture_) {
3100
- const texture = gl.createTexture();
3101
- gl.bindTexture(gl.TEXTURE_2D, texture);
3102
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
3103
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
3104
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
3105
- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
3106
- gl.texImage2D(
3107
- gl.TEXTURE_2D,
3108
- 0,
3109
- gl.RGBA,
3110
- this.data.length / 4,
3111
- 1,
3112
- 0,
3113
- gl.RGBA,
3114
- gl.UNSIGNED_BYTE,
3115
- this.data
3116
- );
3117
- this.texture_ = texture;
3118
- }
3119
- return this.texture_;
3120
- }
3121
- /**
3122
- * @param {WebGLRenderingContext} gl Rendering context.
3123
- */
3124
- delete(gl) {
3125
- if (this.texture_) {
3126
- gl.deleteTexture(this.texture_);
3127
- }
3128
- this.texture_ = null;
3129
- }
3130
- };
3131
- var PaletteTexture_default = PaletteTexture;
3132
-
3133
- // node_modules/ol/expr/gpu.js
3134
- function computeOperatorFunctionName(operator, context) {
3135
- return `operator_${operator}_${Object.keys(context.functions).length}`;
3136
- }
3137
- function numberToGlsl(v) {
3138
- const s = v.toString();
3139
- return s.includes(".") ? s : s + ".0";
3140
- }
3141
- function arrayToGlsl(array) {
3142
- if (array.length < 2 || array.length > 4) {
3143
- throw new Error(
3144
- "`formatArray` can only output `vec2`, `vec3` or `vec4` arrays."
3145
- );
3146
- }
3147
- return `vec${array.length}(${array.map(numberToGlsl).join(", ")})`;
3148
- }
3149
- function colorToGlsl(color) {
3150
- const array = asArray(color);
3151
- const alpha = array.length > 3 ? array[3] : 1;
3152
- return arrayToGlsl([array[0] / 255, array[1] / 255, array[2] / 255, alpha]);
3153
- }
3154
- function sizeToGlsl(size) {
3155
- const array = toSize(size);
3156
- return arrayToGlsl(array);
3157
- }
3158
- var stringToFloatMap = {};
3159
- var stringToFloatCounter = 0;
3160
- function getStringNumberEquivalent(string) {
3161
- if (!(string in stringToFloatMap)) {
3162
- stringToFloatMap[string] = stringToFloatCounter++;
3163
- }
3164
- return stringToFloatMap[string];
3165
- }
3166
- function stringToGlsl(string) {
3167
- return numberToGlsl(getStringNumberEquivalent(string));
3168
- }
3169
- function uniformNameForVariable(variableName) {
3170
- return "u_var_" + variableName;
3171
- }
3172
- function newCompilationContext(inputVariables) {
3173
- return {
3174
- variables: /* @__PURE__ */ new Map(),
3175
- properties: /* @__PURE__ */ new Map(),
3176
- functions: {},
3177
- bandCount: 0,
3178
- featureId: false,
3179
- geometryType: false,
3180
- inputVariables
3181
- };
3182
- }
3183
- var GET_BAND_VALUE_FUNC = "getBandValue";
3184
- var PALETTE_TEXTURE_ARRAY = "u_paletteTextures";
3185
- var FEATURE_ID_PROPERTY_NAME = "featureId";
3186
- var GEOMETRY_TYPE_PROPERTY_NAME = "geometryType";
3187
- var UNDEFINED_PROP_VALUE = -9999999;
3188
- function buildExpression(encoded, type, parsingContext, compilationContext) {
3189
- const expression = parse(encoded, type, parsingContext);
3190
- compilationContext.properties = new Map([
3191
- ...compilationContext.properties,
3192
- ...parsingContext.properties
3193
- ]);
3194
- compilationContext.variables = new Map([
3195
- ...compilationContext.variables,
3196
- ...parsingContext.variables
3197
- ]);
3198
- return compile(expression, type, compilationContext);
3199
- }
3200
- function createCompiler(output) {
3201
- return (context, expression, type) => {
3202
- const length = expression.args.length;
3203
- const args = new Array(length);
3204
- for (let i = 0; i < length; ++i) {
3205
- args[i] = compile(expression.args[i], type, context);
3206
- }
3207
- return output(args, context);
3208
- };
3209
- }
3210
- var compilers = {
3211
- [Ops.Get]: (context, expression) => {
3212
- const firstArg = (
3213
- /** @type {LiteralExpression} */
3214
- expression.args[0]
3215
- );
3216
- const propName = (
3217
- /** @type {string} */
3218
- firstArg.value
3219
- );
3220
- let result = "a_prop_" + propName;
3221
- if (isType(expression.type, BooleanType)) {
3222
- result = `(${result} > 0.0)`;
3223
- }
3224
- return result;
3225
- },
3226
- [Ops.Id]: (context) => {
3227
- context.featureId = true;
3228
- return "a_" + FEATURE_ID_PROPERTY_NAME;
3229
- },
3230
- [Ops.GeometryType]: (context) => {
3231
- context.geometryType = true;
3232
- return "a_" + GEOMETRY_TYPE_PROPERTY_NAME;
3233
- },
3234
- [Ops.LineMetric]: () => "currentLineMetric",
3235
- // this variable is assumed to always be present in shaders, default is 0.
3236
- [Ops.Var]: (context, expression) => {
3237
- const firstArg = (
3238
- /** @type {LiteralExpression} */
3239
- expression.args[0]
3240
- );
3241
- const varName = (
3242
- /** @type {string} */
3243
- firstArg.value
3244
- );
3245
- let result = uniformNameForVariable(varName);
3246
- if (isType(expression.type, BooleanType)) {
3247
- result = `(${result} > 0.0)`;
3248
- }
3249
- return result;
3250
- },
3251
- [Ops.Has]: (context, expression) => {
3252
- const firstArg = (
3253
- /** @type {LiteralExpression} */
3254
- expression.args[0]
3255
- );
3256
- const propName = (
3257
- /** @type {string} */
3258
- firstArg.value
3259
- );
3260
- return `(a_prop_${propName} != ${numberToGlsl(UNDEFINED_PROP_VALUE)})`;
3261
- },
3262
- [Ops.Resolution]: () => "u_resolution",
3263
- [Ops.Zoom]: () => "u_zoom",
3264
- [Ops.Time]: () => "u_time",
3265
- [Ops.Any]: createCompiler((compiledArgs) => `(${compiledArgs.join(` || `)})`),
3266
- [Ops.All]: createCompiler((compiledArgs) => `(${compiledArgs.join(` && `)})`),
3267
- [Ops.Not]: createCompiler(([value]) => `(!${value})`),
3268
- [Ops.Equal]: createCompiler(
3269
- ([firstValue, secondValue]) => `(${firstValue} == ${secondValue})`
3270
- ),
3271
- [Ops.NotEqual]: createCompiler(
3272
- ([firstValue, secondValue]) => `(${firstValue} != ${secondValue})`
3273
- ),
3274
- [Ops.GreaterThan]: createCompiler(
3275
- ([firstValue, secondValue]) => `(${firstValue} > ${secondValue})`
3276
- ),
3277
- [Ops.GreaterThanOrEqualTo]: createCompiler(
3278
- ([firstValue, secondValue]) => `(${firstValue} >= ${secondValue})`
3279
- ),
3280
- [Ops.LessThan]: createCompiler(
3281
- ([firstValue, secondValue]) => `(${firstValue} < ${secondValue})`
3282
- ),
3283
- [Ops.LessThanOrEqualTo]: createCompiler(
3284
- ([firstValue, secondValue]) => `(${firstValue} <= ${secondValue})`
3285
- ),
3286
- [Ops.Multiply]: createCompiler(
3287
- (compiledArgs) => `(${compiledArgs.join(" * ")})`
3288
- ),
3289
- [Ops.Divide]: createCompiler(
3290
- ([firstValue, secondValue]) => `(${firstValue} / ${secondValue})`
3291
- ),
3292
- [Ops.Add]: createCompiler((compiledArgs) => `(${compiledArgs.join(" + ")})`),
3293
- [Ops.Subtract]: createCompiler(
3294
- ([firstValue, secondValue]) => `(${firstValue} - ${secondValue})`
3295
- ),
3296
- [Ops.Clamp]: createCompiler(
3297
- ([value, min, max]) => `clamp(${value}, ${min}, ${max})`
3298
- ),
3299
- [Ops.Mod]: createCompiler(([value, modulo]) => `mod(${value}, ${modulo})`),
3300
- [Ops.Pow]: createCompiler(([value, power]) => `pow(${value}, ${power})`),
3301
- [Ops.Abs]: createCompiler(([value]) => `abs(${value})`),
3302
- [Ops.Floor]: createCompiler(([value]) => `floor(${value})`),
3303
- [Ops.Ceil]: createCompiler(([value]) => `ceil(${value})`),
3304
- [Ops.Round]: createCompiler(([value]) => `floor(${value} + 0.5)`),
3305
- [Ops.Sin]: createCompiler(([value]) => `sin(${value})`),
3306
- [Ops.Cos]: createCompiler(([value]) => `cos(${value})`),
3307
- [Ops.Atan]: createCompiler(([firstValue, secondValue]) => {
3308
- return secondValue !== void 0 ? `atan(${firstValue}, ${secondValue})` : `atan(${firstValue})`;
3309
- }),
3310
- [Ops.Sqrt]: createCompiler(([value]) => `sqrt(${value})`),
3311
- [Ops.Match]: createCompiler((compiledArgs) => {
3312
- const input = compiledArgs[0];
3313
- const fallback = compiledArgs[compiledArgs.length - 1];
3314
- let result = fallback;
3315
- for (let i = compiledArgs.length - 3; i >= 1; i -= 2) {
3316
- const match = compiledArgs[i];
3317
- const output = compiledArgs[i + 1];
3318
- result = `(${input} == ${match} ? ${output} : ${result})`;
3319
- }
3320
- return result;
3321
- }),
3322
- [Ops.Between]: createCompiler(
3323
- ([value, min, max]) => `(${value} >= ${min} && ${value} <= ${max})`
3324
- ),
3325
- [Ops.Interpolate]: createCompiler(([exponent, input, ...compiledArgs]) => {
3326
- let result = "";
3327
- for (let i = 0; i < compiledArgs.length - 2; i += 2) {
3328
- const stop1 = compiledArgs[i];
3329
- const output1 = result || compiledArgs[i + 1];
3330
- const stop2 = compiledArgs[i + 2];
3331
- const output2 = compiledArgs[i + 3];
3332
- let ratio;
3333
- if (exponent === numberToGlsl(1)) {
3334
- ratio = `(${input} - ${stop1}) / (${stop2} - ${stop1})`;
3335
- } else {
3336
- ratio = `(pow(${exponent}, (${input} - ${stop1})) - 1.0) / (pow(${exponent}, (${stop2} - ${stop1})) - 1.0)`;
3337
- }
3338
- result = `mix(${output1}, ${output2}, clamp(${ratio}, 0.0, 1.0))`;
3339
- }
3340
- return result;
3341
- }),
3342
- [Ops.Case]: createCompiler((compiledArgs) => {
3343
- const fallback = compiledArgs[compiledArgs.length - 1];
3344
- let result = fallback;
3345
- for (let i = compiledArgs.length - 3; i >= 0; i -= 2) {
3346
- const condition = compiledArgs[i];
3347
- const output = compiledArgs[i + 1];
3348
- result = `(${condition} ? ${output} : ${result})`;
3349
- }
3350
- return result;
3351
- }),
3352
- [Ops.In]: createCompiler(([needle, ...haystack], context) => {
3353
- const funcName = computeOperatorFunctionName("in", context);
3354
- const tests = [];
3355
- for (let i = 0; i < haystack.length; i += 1) {
3356
- tests.push(` if (inputValue == ${haystack[i]}) { return true; }`);
3357
- }
3358
- context.functions[funcName] = `bool ${funcName}(float inputValue) {
3359
- ${tests.join("\n")}
3360
- return false;
3361
- }`;
3362
- return `${funcName}(${needle})`;
3363
- }),
3364
- [Ops.Array]: createCompiler(
3365
- (args) => `vec${args.length}(${args.join(", ")})`
3366
- ),
3367
- [Ops.Color]: createCompiler((compiledArgs) => {
3368
- if (compiledArgs.length === 1) {
3369
- return `vec4(vec3(${compiledArgs[0]} / 255.0), 1.0)`;
3370
- }
3371
- if (compiledArgs.length === 2) {
3372
- return `vec4(vec3(${compiledArgs[0]} / 255.0), ${compiledArgs[1]})`;
3373
- }
3374
- const rgb = compiledArgs.slice(0, 3).map((color) => `${color} / 255.0`);
3375
- if (compiledArgs.length === 3) {
3376
- return `vec4(${rgb.join(", ")}, 1.0)`;
3377
- }
3378
- const alpha = compiledArgs[3];
3379
- return `vec4(${rgb.join(", ")}, ${alpha})`;
3380
- }),
3381
- [Ops.Band]: createCompiler(([band, xOffset, yOffset], context) => {
3382
- if (!(GET_BAND_VALUE_FUNC in context.functions)) {
3383
- let ifBlocks = "";
3384
- const bandCount = context.bandCount || 1;
3385
- for (let i = 0; i < bandCount; i++) {
3386
- const colorIndex = Math.floor(i / 4);
3387
- let bandIndex = i % 4;
3388
- if (i === bandCount - 1 && bandIndex === 1) {
3389
- bandIndex = 3;
3390
- }
3391
- const textureName = `${Uniforms2.TILE_TEXTURE_ARRAY}[${colorIndex}]`;
3392
- ifBlocks += ` if (band == ${i + 1}.0) {
3393
- return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];
3394
- }
3395
- `;
3396
- }
3397
- context.functions[GET_BAND_VALUE_FUNC] = `float getBandValue(float band, float xOffset, float yOffset) {
3398
- float dx = xOffset / ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3399
- float dy = yOffset / ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3400
- ${ifBlocks}
3401
- }`;
3402
- }
3403
- return `${GET_BAND_VALUE_FUNC}(${band}, ${xOffset != null ? xOffset : "0.0"}, ${yOffset != null ? yOffset : "0.0"})`;
3404
- }),
3405
- [Ops.Palette]: (context, expression) => {
3406
- const [index, ...colors] = expression.args;
3407
- const numColors = colors.length;
3408
- const palette = new Uint8Array(numColors * 4);
3409
- for (let i = 0; i < colors.length; i++) {
3410
- const parsedValue = (
3411
- /** @type {string | Array<number>} */
3412
- /** @type {LiteralExpression} */
3413
- colors[i].value
3414
- );
3415
- const color = asArray(parsedValue);
3416
- const offset = i * 4;
3417
- palette[offset] = color[0];
3418
- palette[offset + 1] = color[1];
3419
- palette[offset + 2] = color[2];
3420
- palette[offset + 3] = color[3] * 255;
3421
- }
3422
- if (!context.paletteTextures) {
3423
- context.paletteTextures = [];
3424
- }
3425
- const paletteName = `${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}]`;
3426
- const paletteTexture = new PaletteTexture_default(paletteName, palette);
3427
- context.paletteTextures.push(paletteTexture);
3428
- const compiledIndex = compile(index, NumberType, context);
3429
- return `texture2D(${paletteName}, vec2((${compiledIndex} + 0.5) / ${numColors}.0, 0.5))`;
3430
- }
3431
- // TODO: unimplemented
3432
- // Ops.Number
3433
- // Ops.String
3434
- // Ops.Coalesce
3435
- // Ops.Concat
3436
- // Ops.ToString
3437
- // Ops.Has
3438
- };
3439
- function compile(expression, returnType, context) {
3440
- if (expression instanceof CallExpression) {
3441
- const compiler = compilers[expression.operator];
3442
- if (compiler === void 0) {
3443
- throw new Error(
3444
- `No compiler defined for this operator: ${JSON.stringify(
3445
- expression.operator
3446
- )}`
3447
- );
3448
- }
3449
- return compiler(context, expression, returnType);
3450
- }
3451
- if ((expression.type & NumberType) > 0) {
3452
- return numberToGlsl(
3453
- /** @type {number} */
3454
- expression.value
3455
- );
3456
- }
3457
- if ((expression.type & BooleanType) > 0) {
3458
- return expression.value.toString();
3459
- }
3460
- if ((expression.type & StringType) > 0) {
3461
- return stringToGlsl(expression.value.toString());
3462
- }
3463
- if ((expression.type & ColorType) > 0) {
3464
- return colorToGlsl(
3465
- /** @type {Array<number> | string} */
3466
- expression.value
3467
- );
3468
- }
3469
- if ((expression.type & NumberArrayType) > 0) {
3470
- return arrayToGlsl(
3471
- /** @type {Array<number>} */
3472
- expression.value
3473
- );
3474
- }
3475
- if ((expression.type & SizeType) > 0) {
3476
- return sizeToGlsl(
3477
- /** @type {number|import('../size.js').Size} */
3478
- expression.value
3479
- );
3480
- }
3481
- throw new Error(
3482
- `Unexpected expression ${expression.value} (expected type ${typeName(
3483
- returnType
3484
- )})`
3485
- );
3486
- }
3487
-
3488
- // node_modules/ol/render/webgl/compileUtil.js
3489
- init_dirname();
3490
- init_buffer();
3491
- init_process();
3492
- function expressionToGlsl(compilationContext, value, expectedType, parsingContext) {
3493
- return buildExpression(
3494
- value,
3495
- expectedType != null ? expectedType : 0,
3496
- parsingContext != null ? parsingContext : newParsingContext(compilationContext.inputVariables),
3497
- compilationContext
3498
- );
3499
- }
3500
-
3501
- // node_modules/ol/layer/WebGLTile.js
3502
- function parseStyle(style, bandCount, nodataBandIndex) {
3503
- const vertexShader = `
3504
- attribute vec2 ${Attributes.TEXTURE_COORD};
3505
- uniform mat4 ${Uniforms2.TILE_TRANSFORM};
3506
- uniform float ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3507
- uniform float ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3508
- uniform float ${Uniforms2.TEXTURE_RESOLUTION};
3509
- uniform float ${Uniforms2.DEPTH};
3510
-
3511
- varying vec2 v_textureCoord;
3512
- varying vec2 v_localMapCoord;
3513
-
3514
- void main() {
3515
- v_textureCoord = ${Attributes.TEXTURE_COORD};
3516
- v_localMapCoord = vec2(
3517
- ${Uniforms2.TEXTURE_PIXEL_WIDTH} * ${Uniforms2.TEXTURE_RESOLUTION} * v_textureCoord[0],
3518
- -1. * ${Uniforms2.TEXTURE_PIXEL_HEIGHT} * ${Uniforms2.TEXTURE_RESOLUTION} * v_textureCoord[1]
3519
- );
3520
- gl_Position = ${Uniforms2.TILE_TRANSFORM} * vec4(${Attributes.TEXTURE_COORD}, ${Uniforms2.DEPTH}, 1.0);
3521
- }
3522
- `;
3523
- const context = __spreadProps(__spreadValues({}, newCompilationContext()), {
3524
- bandCount
3525
- });
3526
- const pipeline = [];
3527
- if (style.color !== void 0) {
3528
- const color = expressionToGlsl(context, style.color, ColorType);
3529
- pipeline.push(`color = ${color};`);
3530
- }
3531
- if (style.contrast !== void 0) {
3532
- const contrast = expressionToGlsl(context, style.contrast, NumberType);
3533
- pipeline.push(
3534
- `color.rgb = clamp((${contrast} + 1.0) * color.rgb - (${contrast} / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`
3535
- );
3536
- }
3537
- if (style.exposure !== void 0) {
3538
- const exposure = expressionToGlsl(context, style.exposure, NumberType);
3539
- pipeline.push(
3540
- `color.rgb = clamp((${exposure} + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`
3541
- );
3542
- }
3543
- if (style.saturation !== void 0) {
3544
- const saturation = expressionToGlsl(context, style.saturation, NumberType);
3545
- pipeline.push(`
3546
- float saturation = ${saturation} + 1.0;
3547
- float sr = (1.0 - saturation) * 0.2126;
3548
- float sg = (1.0 - saturation) * 0.7152;
3549
- float sb = (1.0 - saturation) * 0.0722;
3550
- mat3 saturationMatrix = mat3(
3551
- sr + saturation, sr, sr,
3552
- sg, sg + saturation, sg,
3553
- sb, sb, sb + saturation
3554
- );
3555
- color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));
3556
- `);
3557
- }
3558
- if (style.gamma !== void 0) {
3559
- const gamma = expressionToGlsl(context, style.gamma, NumberType);
3560
- pipeline.push(`color.rgb = pow(color.rgb, vec3(1.0 / ${gamma}));`);
3561
- }
3562
- if (style.brightness !== void 0) {
3563
- const brightness = expressionToGlsl(context, style.brightness, NumberType);
3564
- pipeline.push(
3565
- `color.rgb = clamp(color.rgb + ${brightness}, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));`
3566
- );
3567
- }
3568
- const uniforms = {};
3569
- const numVariables = context.variables.size;
3570
- if (numVariables > 1 && !style.variables) {
3571
- throw new Error(
3572
- `Missing variables in style (expected ${Array.from(context.variables.keys())})`
3573
- );
3574
- }
3575
- const styleVariables = style.variables || {};
3576
- for (const [variableName] of context.variables.entries()) {
3577
- if (!(variableName in styleVariables)) {
3578
- throw new Error(`Missing '${variableName}' in style variables`);
3579
- }
3580
- const uniformName = uniformNameForVariable(variableName);
3581
- uniforms[uniformName] = function() {
3582
- let value = styleVariables[variableName];
3583
- if (typeof value === "string") {
3584
- value = getStringNumberEquivalent(value);
3585
- }
3586
- return value !== void 0 ? value : -9999999;
3587
- };
3588
- }
3589
- const uniformDeclarations = Object.keys(uniforms).map(function(name) {
3590
- return `uniform float ${name};`;
3591
- });
3592
- const bandCountValue = bandCount !== void 0 ? bandCount : 4;
3593
- const textureCount = Math.ceil(bandCountValue / 4);
3594
- uniformDeclarations.push(
3595
- `uniform sampler2D ${Uniforms2.TILE_TEXTURE_ARRAY}[${textureCount}];`
3596
- );
3597
- if (context.paletteTextures) {
3598
- uniformDeclarations.push(
3599
- `uniform sampler2D ${PALETTE_TEXTURE_ARRAY}[${context.paletteTextures.length}];`
3600
- );
3601
- }
3602
- if (nodataBandIndex && nodataBandIndex > 0 && !("getBandValue" in context.functions)) {
3603
- let ifBlocks = "";
3604
- for (let i = 0; i < bandCountValue; i++) {
3605
- const colorIndex = Math.floor(i / 4);
3606
- let bandIndex = i % 4;
3607
- if (i === bandCountValue - 1 && bandIndex === 1) {
3608
- bandIndex = 3;
3609
- }
3610
- const textureName = `${Uniforms2.TILE_TEXTURE_ARRAY}[${colorIndex}]`;
3611
- ifBlocks += ` if (band == ${i + 1}.0) {
3612
- return texture2D(${textureName}, v_textureCoord + vec2(dx, dy))[${bandIndex}];
3613
- }
3614
- `;
3615
- }
3616
- context.functions["getBandValue"] = `float getBandValue(float band, float xOffset, float yOffset) {
3617
- float dx = xOffset / ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3618
- float dy = yOffset / ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3619
- ${ifBlocks}
3620
- }`;
3621
- }
3622
- const functionDefintions = Object.keys(context.functions).map(
3623
- function(name) {
3624
- return context.functions[name];
3625
- }
3626
- );
3627
- const fragmentShader = `
3628
- #ifdef GL_FRAGMENT_PRECISION_HIGH
3629
- precision highp float;
3630
- #else
3631
- precision mediump float;
3632
- #endif
3633
-
3634
- varying vec2 v_textureCoord;
3635
- varying vec2 v_localMapCoord;
3636
- uniform vec4 ${Uniforms2.RENDER_EXTENT};
3637
- uniform float ${Uniforms2.TRANSITION_ALPHA};
3638
- uniform float ${Uniforms2.TEXTURE_PIXEL_WIDTH};
3639
- uniform float ${Uniforms2.TEXTURE_PIXEL_HEIGHT};
3640
- uniform float ${Uniforms2.RESOLUTION};
3641
- uniform float ${Uniforms2.ZOOM};
3642
-
3643
- ${uniformDeclarations.join("\n")}
3644
-
3645
- ${functionDefintions.join("\n")}
3646
-
3647
- void main() {
3648
- if (
3649
- v_localMapCoord[0] < ${Uniforms2.RENDER_EXTENT}[0] ||
3650
- v_localMapCoord[1] < ${Uniforms2.RENDER_EXTENT}[1] ||
3651
- v_localMapCoord[0] > ${Uniforms2.RENDER_EXTENT}[2] ||
3652
- v_localMapCoord[1] > ${Uniforms2.RENDER_EXTENT}[3]
3653
- ) {
3654
- discard;
3655
- }
3656
-
3657
- vec4 color = texture2D(${Uniforms2.TILE_TEXTURE_ARRAY}[0], v_textureCoord);
3658
-
3659
- ${nodataBandIndex && style.color === void 0 ? `color.a = getBandValue(${nodataBandIndex}.0, 0.0, 0.0);` : ""}
3660
-
3661
- ${nodataBandIndex ? `if (getBandValue(${nodataBandIndex}.0, 0.0, 0.0) == 0.0) { discard; }` : ""}
3662
-
3663
- ${pipeline.join("\n")}
3664
-
3665
- gl_FragColor = color;
3666
- gl_FragColor.rgb *= gl_FragColor.a;
3667
- gl_FragColor *= ${Uniforms2.TRANSITION_ALPHA};
3668
- }`;
3669
- return {
3670
- vertexShader,
3671
- fragmentShader,
3672
- uniforms,
3673
- paletteTextures: context.paletteTextures || []
3674
- };
3675
- }
3676
- var WebGLTileLayer = class extends BaseTile_default {
3677
- /**
3678
- * @param {Options} [options] Tile layer options.
3679
- */
3680
- constructor(options) {
3681
- options = options ? Object.assign({}, options) : {};
3682
- const style = options.style || {};
3683
- delete options.style;
3684
- super(options);
3685
- this.sources_ = /** @type {Array<SourceType>|function(import("../extent.js").Extent, number):Array<SourceType>|undefined} */
3686
- options.sources;
3687
- this.renderedSource_ = null;
3688
- this.renderedResolution_ = NaN;
3689
- this.style_ = style;
3690
- this.styleVariables_ = this.style_.variables || {};
3691
- this.styleBandCount_ = NaN;
3692
- this.styleNodataBandIndex_ = void 0;
3693
- this.handleSourceUpdate_();
3694
- this.addChangeListener(Property_default.SOURCE, this.handleSourceUpdate_);
3695
- }
3696
- /**
3697
- * Gets the sources for this layer, for a given extent and resolution.
3698
- * @param {import("../extent.js").Extent} extent Extent.
3699
- * @param {number} resolution Resolution.
3700
- * @return {Array<SourceType>} Sources.
3701
- */
3702
- getSources(extent, resolution) {
3703
- const source = this.getSource();
3704
- if (this.sources_) {
3705
- return typeof this.sources_ === "function" ? this.sources_(extent, resolution) || [] : this.sources_;
3706
- }
3707
- return source ? [source] : [];
3708
- }
3709
- /**
3710
- * @return {SourceType|null} The source being rendered.
3711
- * @override
3712
- */
3713
- getRenderSource() {
3714
- return this.renderedSource_ || this.getSource();
3715
- }
3716
- /**
3717
- * @return {import("../source/Source.js").State} Source state.
3718
- * @override
3719
- */
3720
- getSourceState() {
3721
- const source = this.getRenderSource();
3722
- return source ? source.getState() : "undefined";
3723
- }
3724
- /**
3725
- * @private
3726
- */
3727
- handleSourceUpdate_() {
3728
- var _a;
3729
- if (this.hasRenderer()) {
3730
- (_a = this.getRenderer()) == null ? void 0 : _a.clearCache();
3731
- }
3732
- const source = this.getSource();
3733
- if (source) {
3734
- if (source.getState() === "loading") {
3735
- const onChange = () => {
3736
- if (source.getState() === "ready") {
3737
- source.removeEventListener("change", onChange);
3738
- this.setStyle(this.style_);
3739
- }
3740
- };
3741
- source.addEventListener("change", onChange);
3742
- } else {
3743
- this.setStyle(this.style_);
3744
- }
3745
- }
3746
- }
3747
- /**
3748
- * @private
3749
- * @return {SourceType|null} The first render source (or null).
3750
- */
3751
- getFirstSource_() {
3752
- const max = Number.MAX_SAFE_INTEGER;
3753
- const sources = this.getSources([-max, -max, max, max], max);
3754
- return sources && sources.length ? sources[0] : null;
3755
- }
3756
- /**
3757
- * Whether reprojecting the source to the given projection appends a coverage
3758
- * alpha band (only for sources that do not already carry an alpha band).
3759
- * @private
3760
- * @param {SourceType} source The render source.
3761
- * @param {import("../proj/Projection.js").default} [projection] The render projection.
3762
- * @return {boolean} A coverage band is added.
3763
- */
3764
- usesCoverageBand_(source, projection) {
3765
- if (!source || !projection || source.hasAlpha !== false) {
3766
- return false;
3767
- }
3768
- const sourceProjection = source.getProjection();
3769
- return !!sourceProjection && !equivalent(sourceProjection, projection);
3770
- }
3771
- /**
3772
- * @private
3773
- * @param {import("../proj/Projection.js").default} [projection] The render projection.
3774
- * @return {number} The number of source bands.
3775
- */
3776
- getSourceBandCount_(projection) {
3777
- const source = this.getFirstSource_();
3778
- const bandCount = source && "bandCount" in source ? source.bandCount : 4;
3779
- return this.usesCoverageBand_(
3780
- /** @type {SourceType} */
3781
- source,
3782
- projection
3783
- ) ? bandCount + 1 : bandCount;
3784
- }
3785
- /**
3786
- * @private
3787
- * @param {import("../proj/Projection.js").default} [projection] The render projection.
3788
- * @return {number|undefined} The 1-based band index for the nodata alpha band.
3789
- */
3790
- getSourceNodataBandIndex_(projection) {
3791
- const source = this.getFirstSource_();
3792
- if (!source) {
3793
- return void 0;
3794
- }
3795
- if (this.usesCoverageBand_(source, projection)) {
3796
- return source.bandCount + 1;
3797
- }
3798
- return "nodataBandIndex" in source ? source.nodataBandIndex : void 0;
3799
- }
3800
- /**
3801
- * Parse the style for the given render projection, tracking the band layout
3802
- * used. The render projection determines whether a coverage band is added
3803
- * for reprojected alpha-less sources.
3804
- * @private
3805
- * @param {import("../proj/Projection.js").default} [projection] The render projection.
3806
- * @return {ReturnType<typeof parseStyle>} The parsed style.
3807
- */
3808
- parseStyleForRender_(projection) {
3809
- const bandCount = this.getSourceBandCount_(projection);
3810
- const nodataBandIndex = this.getSourceNodataBandIndex_(projection);
3811
- this.styleBandCount_ = bandCount;
3812
- this.styleNodataBandIndex_ = nodataBandIndex;
3813
- return parseStyle(this.style_, bandCount, nodataBandIndex);
3814
- }
3815
- /**
3816
- * Rebuild the shaders for the given render projection and apply them to the
3817
- * renderer.
3818
- * @private
3819
- * @param {import("../proj/Projection.js").default} [projection] The render projection.
3820
- */
3821
- applyShaders_(projection) {
3822
- var _a;
3823
- const parsedStyle = this.parseStyleForRender_(projection);
3824
- (_a = this.getRenderer()) == null ? void 0 : _a.reset({
3825
- vertexShader: parsedStyle.vertexShader,
3826
- fragmentShader: parsedStyle.fragmentShader,
3827
- uniforms: parsedStyle.uniforms,
3828
- paletteTextures: parsedStyle.paletteTextures
3829
- });
3830
- }
3831
- /**
3832
- * @override
3833
- */
3834
- createRenderer() {
3835
- var _a, _b;
3836
- const projection = (_b = (_a = this.getMapInternal()) == null ? void 0 : _a.getView()) == null ? void 0 : _b.getProjection();
3837
- const parsedStyle = this.parseStyleForRender_(projection);
3838
- return new TileLayer_default(this, {
3839
- vertexShader: parsedStyle.vertexShader,
3840
- fragmentShader: parsedStyle.fragmentShader,
3841
- uniforms: parsedStyle.uniforms,
3842
- cacheSize: this.getCacheSize(),
3843
- paletteTextures: parsedStyle.paletteTextures
3844
- });
3845
- }
3846
- /**
3847
- * @param {import("../Map.js").FrameState} frameState Frame state.
3848
- * @param {Array<SourceType>} sources Sources.
3849
- * @return {HTMLElement} Canvas.
3850
- */
3851
- renderSources(frameState, sources) {
3852
- const layerRenderer = this.getRenderer();
3853
- if (!layerRenderer) {
3854
- return (
3855
- /** @type {HTMLElement} */
3856
- document.createElement("div")
3857
- );
3858
- }
3859
- let canvas;
3860
- for (let i = 0, ii = sources.length; i < ii; ++i) {
3861
- this.renderedSource_ = sources[i];
3862
- if (layerRenderer.prepareFrame(frameState)) {
3863
- canvas = layerRenderer.renderFrame(frameState);
3864
- }
3865
- }
3866
- return canvas || /** @type {HTMLElement} */
3867
- document.createElement("div");
3868
- }
3869
- /**
3870
- * @param {?import("../Map.js").FrameState} frameState Frame state.
3871
- * @param {HTMLElement} target Target which the renderer may (but need not) use
3872
- * for rendering its content.
3873
- * @return {HTMLElement} The rendered element.
3874
- * @override
3875
- */
3876
- render(frameState, target) {
3877
- this.rendered = true;
3878
- if (!frameState) {
3879
- return (
3880
- /** @type {HTMLElement} */
3881
- document.createElement("div")
3882
- );
3883
- }
3884
- const viewState = frameState.viewState;
3885
- const extent = frameState.extent;
3886
- if (!extent) {
3887
- return (
3888
- /** @type {HTMLElement} */
3889
- document.createElement("div")
3890
- );
3891
- }
3892
- if (this.hasRenderer()) {
3893
- const projection = viewState.projection;
3894
- if (this.getSourceBandCount_(projection) !== this.styleBandCount_ || this.getSourceNodataBandIndex_(projection) !== this.styleNodataBandIndex_) {
3895
- this.applyShaders_(projection);
3896
- }
3897
- }
3898
- const sources = this.getSources(extent, viewState.resolution);
3899
- let ready = true;
3900
- for (let i = 0, ii = sources.length; i < ii; ++i) {
3901
- const source = sources[i];
3902
- const sourceState = source.getState();
3903
- if (sourceState == "loading") {
3904
- const onChange = () => {
3905
- if (source.getState() == "ready") {
3906
- source.removeEventListener("change", onChange);
3907
- this.changed();
3908
- }
3909
- };
3910
- source.addEventListener("change", onChange);
3911
- }
3912
- ready = ready && sourceState == "ready";
3913
- }
3914
- const canvas = this.renderSources(frameState, sources);
3915
- const renderer = this.getRenderer();
3916
- if ((renderer == null ? void 0 : renderer.renderComplete) && ready) {
3917
- this.renderedResolution_ = viewState.resolution;
3918
- return canvas;
3919
- }
3920
- if (this.renderedResolution_ > 0.5 * viewState.resolution) {
3921
- const altSources = this.getSources(
3922
- extent,
3923
- this.renderedResolution_
3924
- ).filter((source) => !sources.includes(source));
3925
- if (altSources.length > 0) {
3926
- return this.renderSources(frameState, altSources);
3927
- }
3928
- }
3929
- return canvas;
3930
- }
3931
- /**
3932
- * Update the layer style. The `updateStyleVariables` function is a more efficient
3933
- * way to update layer rendering. In cases where the whole style needs to be updated,
3934
- * this method may be called instead. Note that calling this method will also replace
3935
- * any previously set variables, so the new style also needs to include new variables,
3936
- * if needed.
3937
- * @param {Style} style The new style.
3938
- */
3939
- setStyle(style) {
3940
- var _a, _b;
3941
- this.styleVariables_ = style.variables || {};
3942
- this.style_ = style;
3943
- if (this.hasRenderer()) {
3944
- const projection = (_b = (_a = this.getMapInternal()) == null ? void 0 : _a.getView()) == null ? void 0 : _b.getProjection();
3945
- this.applyShaders_(projection);
3946
- this.changed();
3947
- }
3948
- }
3949
- /**
3950
- * Update any variables used by the layer style and trigger a re-render.
3951
- * @param {Object<string, number>} variables Variables to update.
3952
- * @api
3953
- */
3954
- updateStyleVariables(variables) {
3955
- Object.assign(this.styleVariables_, variables);
3956
- this.changed();
3957
- }
3958
- };
3959
- WebGLTileLayer.prototype.dispose;
3960
- var WebGLTile_default = WebGLTileLayer;
3961
-
3962
- // src/components/map/layers/geotiff.layer.ts
3963
- async function getNoDataValue(gtSource, fallback) {
3964
- var _a, _b, _c;
3965
- await gtSource.getView();
3966
- try {
3967
- const gtImage = (_b = (_a = gtSource.sourceImagery_) == null ? void 0 : _a[0]) == null ? void 0 : _b[0];
3968
- const tagValue = (_c = gtImage == null ? void 0 : gtImage.fileDirectory) == null ? void 0 : _c.GDAL_NODATA;
3969
- return tagValue !== void 0 ? parseFloat(tagValue) : fallback;
3970
- } catch (error) {
3971
- console.warn(
3972
- "Failed to read GDAL_NODATA tag from GeoTIFF source; falling back to configured noDataValue.",
3973
- error
3974
- );
3975
- return fallback;
3976
- }
3977
- }
3978
- function computeMinMax(pixels, noDataValue) {
3979
- let min = Infinity;
3980
- let max = -Infinity;
3981
- for (let i = 0; i < pixels.length; i++) {
3982
- const val = pixels[i];
3983
- if (!Number.isNaN(val) && val !== noDataValue) {
3984
- if (val < min) min = val;
3985
- if (val > max) max = val;
3986
- }
3987
- }
3988
- return { min, max };
3989
- }
3990
- async function getMinMax(gtSource, noDataValue) {
3991
- await gtSource.getView();
3992
- const gtImage = gtSource.sourceImagery_[0][0];
3993
- const rasterData = await gtImage.readRasters({ samples: [0] });
3994
- return computeMinMax(rasterData[0], noDataValue);
3995
- }
3996
- function buildStopsFromColors(colors, min, max) {
3997
- const steps = colors.length;
3998
- const delta = (max - min) / (steps - 1);
3999
- const stops = new Array(steps * 2);
4000
- const dataVals = [];
4001
- for (let i = 0; i < steps; i++) {
4002
- stops[i * 2] = min + i * delta;
4003
- stops[i * 2 + 1] = colors[i];
4004
- dataVals.push((min + i * delta).toExponential(2));
4005
- }
4006
- const legendValues = [];
4007
- for (let i = colors.length - 1; i > 0; i--) {
4008
- const curVal = parseFloat(dataVals[i]);
4009
- if (curVal >= min && curVal <= max) {
4010
- legendValues.push({ value: dataVals[i], rgb: colors[i] });
4011
- }
4012
- }
4013
- return { stops, legendValues };
4014
- }
4015
- async function buildColorStops(colorMapName, min, max, steps, reverse) {
4016
- const { default: colormap } = await import("./colormap.EECGBITI.js");
4017
- const colors = colormap({
4018
- colormap: colorMapName,
4019
- nshades: steps,
4020
- format: "rgba"
4021
- });
4022
- if (reverse) {
4023
- colors.reverse();
4024
- }
4025
- return buildStopsFromColors(colors, min, max);
4026
- }
4027
- async function buildGeoTiffLayer(config) {
4028
- const {
4029
- url,
4030
- bands = [1],
4031
- noDataValue,
4032
- opacity,
4033
- colorMapName = "viridis",
4034
- colorSteps = 72,
4035
- reverseColors = false
4036
- } = config;
4037
- const { default: GeoTIFF } = await import("./GeoTIFF.KMHPSKO6.js");
4038
- const gtSource = new GeoTIFF({
4039
- sources: [{ url, bands, nodata: noDataValue }],
4040
- // Enable wrapping so the GeoTIFF is always visible when scrolling
4041
- wrapX: true,
4042
- interpolate: false,
4043
- normalize: false
4044
- });
4045
- const layer = new WebGLTile_default({ source: gtSource });
4046
- if (opacity !== void 0) {
4047
- layer.setOpacity(opacity);
4048
- }
4049
- const resolvedNoDataValue = await getNoDataValue(gtSource, noDataValue);
4050
- const { min, max } = await getMinMax(gtSource, resolvedNoDataValue);
4051
- const { stops: colorStops, legendValues } = await buildColorStops(
4052
- colorMapName,
4053
- min,
4054
- max,
4055
- colorSteps,
4056
- reverseColors
4057
- );
4058
- layer.setStyle({
4059
- color: [
4060
- "case",
4061
- ["==", ["band", 2], 0],
4062
- [0, 0, 0, 0],
4063
- ["interpolate", ["linear"], ["band", 1], ...colorStops]
4064
- ]
4065
- });
4066
- const view = await gtSource.getView();
4067
- return {
4068
- layer,
4069
- extent: view.extent,
4070
- projection: view.projection,
4071
- min,
4072
- max,
4073
- colorStops,
4074
- legendValues
4075
- };
4076
- }
4077
-
4078
- export {
4079
- WebGLTile_default,
4080
- computeMinMax,
4081
- buildStopsFromColors,
4082
- buildGeoTiffLayer
4083
- };