@arcgis/core 5.2.0-next.3 → 5.2.0-next.5

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 (477) hide show
  1. package/Graphic.d.ts +2 -1
  2. package/Map.js +1 -1
  3. package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
  4. package/analysis/ShadowCast/TotalDurationOptions.d.ts +7 -9
  5. package/analysis/ShadowCastAnalysis.d.ts +7 -6
  6. package/arcgisGlobal.d.ts +5 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
  10. package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
  11. package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +1 -0
  12. package/assets/esri/core/workers/chunks/{701125f6cdd91ff3655f.js → 1252da05832e576d4def.js} +2 -2
  13. package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
  14. package/assets/esri/core/workers/chunks/{e87d02af6d6b05e19d93.js → 16713986893adfbc9331.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
  16. package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
  17. package/assets/esri/core/workers/chunks/1a527c0740d9f4fa0791.js +1 -0
  18. package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +1 -0
  19. package/assets/esri/core/workers/chunks/{c88fd4f69cb2b53b48ec.js → 1b0765403b06294b3e1d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/1bd8a7f92a428eedb22e.js +1 -0
  21. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
  22. package/assets/esri/core/workers/chunks/24acf3dd541347c2b297.js +1 -0
  23. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
  24. package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
  25. package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
  27. package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +1 -0
  28. package/assets/esri/core/workers/chunks/{fbcf09526dc1bbe94b91.js → 2e8db0f05df2e38a14e1.js} +2 -2
  29. package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
  30. package/assets/esri/core/workers/chunks/{9a11ff75009fef45b8c1.js → 325bfac7cfa28a6d568f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/32f24a66f684de3c243d.js +1 -0
  32. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
  33. package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +1 -0
  34. package/assets/esri/core/workers/chunks/40df6ffeb61fea80aae3.js +1 -0
  35. package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +1 -0
  36. package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
  37. package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
  38. package/assets/esri/core/workers/chunks/438f35d41c6851736818.js +30 -0
  39. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
  40. package/assets/esri/core/workers/chunks/47d49777a3b3cd8e18bd.js +1 -0
  41. package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +1 -0
  42. package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +1 -0
  43. package/assets/esri/core/workers/chunks/4e97c01698ef36cc5e0e.js +1 -0
  44. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
  45. package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
  46. package/assets/esri/core/workers/chunks/544174c33628846284a1.js +1 -0
  47. package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
  48. package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +1 -0
  49. package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
  50. package/assets/esri/core/workers/chunks/55d168c13491fcdfb284.js +1 -0
  51. package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{0a530fbbb4486c670ea2.js → 5c7aff9604b4576a0e1d.js} +1 -1
  53. package/assets/esri/core/workers/chunks/603177137eb680afe371.js +1 -0
  54. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
  55. package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
  56. package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +1 -0
  57. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
  58. package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 6a53c8db554be55c5885.js} +46 -36
  59. package/assets/esri/core/workers/chunks/6af88bb722bbb37db198.js +2 -0
  60. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
  61. package/assets/esri/core/workers/chunks/{a70fa35b2d19460637e9.js → 70d8f5bdb452cee41536.js} +2 -2
  62. package/assets/esri/core/workers/chunks/728151d24334027af635.js +1 -0
  63. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
  64. package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 7a823bb1b72764897dd5.js} +1 -1
  67. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
  68. package/assets/esri/core/workers/chunks/7c292f7b181f3b93352b.js +1 -0
  69. package/assets/esri/core/workers/chunks/{f69c44479ee3fd8c831d.js → 7d220f574ebf2740c208.js} +1 -1
  70. package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
  71. package/assets/esri/core/workers/chunks/{24b43fb12fc3009fdc30.js → 7f1fcddc8dd42a1b67d9.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{e95ce76b5b816256a519.js → 7f54d3835c0ce573a942.js} +1 -1
  73. package/assets/esri/core/workers/chunks/804ab5f614efa12a131b.js +1 -0
  74. package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +1 -0
  75. package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{5cdf87e7a59ace38df87.js → 84b0b6e099d949e0fea5.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
  78. package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
  79. package/assets/esri/core/workers/chunks/86a767c2b0b1e37ff493.js +1 -0
  80. package/assets/esri/core/workers/chunks/{702a3ef9e1b3442cbee7.js → 8b8b63be961eb73250a0.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
  83. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
  84. package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
  85. package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
  86. package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
  87. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +1 -0
  88. package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +30 -0
  89. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
  90. package/assets/esri/core/workers/chunks/{40df608337d562553ce1.js → a0fce639319d59becd01.js} +2 -2
  91. package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{762e23466308f22d7076.js → aea384f4d88121da8f54.js} +1 -1
  93. package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
  94. package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
  95. package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
  96. package/assets/esri/core/workers/chunks/ba693317ed3939587f30.js +1 -0
  97. package/assets/esri/core/workers/chunks/be0eab592db0e651b023.js +30 -0
  98. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
  99. package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{18c4207b1cb0777560ba.js → cf3036711bbe6095eaed.js} +1 -1
  102. package/assets/esri/core/workers/chunks/d21bf107698fef03125e.js +1 -0
  103. package/assets/esri/core/workers/chunks/d6d87bfa9e6d233385a9.js +262 -0
  104. package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
  105. package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
  106. package/assets/esri/core/workers/chunks/{2f99a95facddc44319a9.js → da3c54e27a808f4fcc18.js} +1 -1
  107. package/assets/esri/core/workers/chunks/dc259eed58fde3f5cb5c.js +1 -0
  108. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
  109. package/assets/esri/core/workers/chunks/e6e15e9e890b864fb395.js +1 -0
  110. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
  111. package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
  112. package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
  113. package/assets/esri/core/workers/chunks/{39987c06636e757d1f00.js → eda083e9d12e45da0a7b.js} +1 -1
  114. package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +1 -0
  115. package/assets/esri/core/workers/chunks/f58ddf37dee066a5c0d8.js +1 -0
  116. package/assets/esri/core/workers/chunks/fb0afb41a3d87d59f574.js +1 -0
  117. package/assets/esri/core/workers/chunks/{5c6742728fa705d2e16e.js → fc9fbc8e4e459edf4e37.js} +1 -1
  118. package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
  119. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +53 -7
  120. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
  121. package/assets/esri/themes/dark/main.css +1 -1
  122. package/assets/esri/themes/light/main.css +1 -1
  123. package/assets/esri/themes/light/view.css +1 -1
  124. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
  125. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
  126. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
  127. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
  128. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
  129. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
  130. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
  131. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
  132. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
  133. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
  134. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
  135. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  136. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
  137. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
  138. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
  139. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
  140. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
  141. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
  142. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
  143. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
  144. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
  145. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
  146. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
  147. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
  148. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
  149. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
  150. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
  151. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
  152. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
  153. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
  154. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
  155. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
  156. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
  157. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
  158. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
  159. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
  160. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
  161. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
  162. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
  163. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  164. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  165. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  166. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  167. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  168. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  169. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  170. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  171. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  172. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  173. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  174. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  175. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  176. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  177. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  178. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  179. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  180. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  181. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  182. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  183. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  184. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  185. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +1 -1
  186. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  187. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  188. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  189. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  190. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  191. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  192. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  193. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  194. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  195. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  196. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  197. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  198. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  199. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  200. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  201. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  202. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  203. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  204. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  205. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  206. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  207. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  208. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  209. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  210. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  211. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  212. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  213. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  214. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  215. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  216. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  217. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  218. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  219. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  220. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  221. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  222. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  223. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  224. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  225. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  226. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  227. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  228. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  229. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  230. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  231. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  232. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  233. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  234. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  235. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  236. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  237. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  238. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  239. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  240. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  241. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  242. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  243. package/chunks/GlobalIllumination.glsl.js +40 -30
  244. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  245. package/chunks/ShadowCastVisualize.glsl.js +20 -23
  246. package/config.js +1 -1
  247. package/core/screenUtils.js +1 -1
  248. package/editing/templates/TemplateListItem.d.ts +61 -0
  249. package/editing/templates/TemplateListItem.js +2 -0
  250. package/geometry/support/heightModelInfoUtils.js +1 -1
  251. package/interfaces.d.ts +21 -0
  252. package/kernel.js +1 -1
  253. package/layers/AnnotationLayer.d.ts +42 -0
  254. package/layers/AnnotationLayer.js +2 -0
  255. package/layers/DimensionFeatureLayer.d.ts +36 -1
  256. package/layers/DimensionFeatureLayer.js +1 -1
  257. package/layers/FeatureLayer.d.ts +43 -14
  258. package/layers/FeatureLayer.js +1 -1
  259. package/layers/ImageryTileLayer.js +1 -1
  260. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  261. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  262. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  263. package/layers/mixins/PortalLayer.js +1 -1
  264. package/layers/mixins/TiledImagery.js +1 -1
  265. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  266. package/layers/raster/datasets/RasterFactory.js +1 -1
  267. package/layers/support/SymbolLayerDrawing.d.ts +10 -0
  268. package/layers/support/rasterJobHelper.js +2 -0
  269. package/layers/types.d.ts +3 -4
  270. package/networks/support/networkFieldUtils.js +1 -1
  271. package/package.json +1 -1
  272. package/rest/support/AttributeBinsQuery.d.ts +5 -5
  273. package/rest/support/OutDistance.d.ts +50 -0
  274. package/rest/support/OutDistance.js +1 -1
  275. package/rest/support/Query.d.ts +46 -5
  276. package/rest/support/Query.js +1 -1
  277. package/rest/support/TopFeaturesQuery.d.ts +5 -5
  278. package/support/basemapEnsureType.js +1 -1
  279. package/support/revision.js +1 -1
  280. package/symbols/cim/CIMOperators.js +1 -1
  281. package/symbols/cim/CIMSymbolHelper.js +1 -1
  282. package/symbols/cim/utils.js +1 -1
  283. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  284. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  285. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  286. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  287. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  288. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  289. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  290. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  291. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  292. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  293. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +1 -1
  294. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  295. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  296. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  297. package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
  298. package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
  299. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  300. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  301. package/views/2d/layerViewModuleImportUtils.js +1 -1
  302. package/views/2d/layers/AnnotationLayerView2D.js +2 -0
  303. package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
  304. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  305. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  306. package/views/2d/layers/RouteLayerView2D.js +1 -1
  307. package/views/2d/layers/TileLayerView2D.js +1 -1
  308. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  309. package/views/2d/layers/features/FeatureContainer.js +1 -1
  310. package/views/2d/layers/features/Processor.js +1 -1
  311. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
  312. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  313. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  314. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  315. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  316. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  317. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  318. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  319. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  320. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  321. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  322. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  323. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  324. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  325. package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
  326. package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
  327. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  328. package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
  329. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
  330. package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
  331. package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
  332. package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
  333. package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
  334. package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
  335. package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
  336. package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
  337. package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
  338. package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
  339. package/views/2d/layers/support/annodime/fields.js +2 -0
  340. package/views/2d/layers/support/annodime/unsupported.js +2 -0
  341. package/views/2d/layers/support/annodime/utils.js +2 -0
  342. package/views/2d/layers/support/annodime/virtualFields.js +2 -0
  343. package/views/2d/support/clippingUtils.js +1 -1
  344. package/views/2d/support/hitTestUtils.js +1 -1
  345. package/views/2d/types.d.ts +5 -1
  346. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  347. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  348. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  349. package/views/3d/layerViewModuleImportUtils.js +1 -1
  350. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  351. package/views/3d/layers/TileLayerView3D.js +1 -1
  352. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  353. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  354. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  355. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  356. package/views/3d/types.d.ts +2 -0
  357. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  358. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  359. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  360. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  361. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  362. package/views/PopupView.d.ts +3 -3
  363. package/views/PopupView.js +1 -1
  364. package/views/SceneView.js +1 -1
  365. package/views/View2D.js +1 -1
  366. package/views/draw/DrawTool.d.ts +34 -1
  367. package/views/layers/AnnotationLayerView.d.ts +18 -0
  368. package/views/layers/AnnotationLayerView.js +2 -0
  369. package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
  370. package/views/layers/DimensionFeatureLayerView.js +2 -0
  371. package/views/layers/FeatureLikeLayerView.d.ts +2 -1
  372. package/views/layers/FeatureLikeLayerView.js +1 -1
  373. package/views/layers/ImageryLayerView.d.ts +1 -1
  374. package/views/layers/ImageryLayerView.js +1 -1
  375. package/views/layers/ImageryTileLayerView.js +1 -1
  376. package/views/layers/WMSLayerView.js +1 -1
  377. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  378. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  379. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  380. package/widgets/BatchAttributeForm/css.js +1 -1
  381. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  382. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  383. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
  384. package/widgets/BatchAttributeForm.d.ts +26 -1
  385. package/widgets/BatchAttributeForm.js +1 -1
  386. package/widgets/FeatureForm.js +1 -1
  387. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  388. package/widgets/OrientedImageryViewer/css.js +1 -1
  389. package/widgets/OrientedImageryViewer.js +1 -1
  390. package/widgets/Print/PrintViewModel.js +1 -1
  391. package/widgets/Sketch/support/PluginManager.js +1 -1
  392. package/widgets/Sketch.js +1 -1
  393. package/widgets/support/iconUtils.js +1 -1
  394. package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
  395. package/assets/esri/core/workers/chunks/019a4fe7e085b2fc6ae9.js +0 -1
  396. package/assets/esri/core/workers/chunks/023837e5d9d2b6af66d8.js +0 -1
  397. package/assets/esri/core/workers/chunks/03c46880b69ce75a010f.js +0 -1
  398. package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
  399. package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
  400. package/assets/esri/core/workers/chunks/074f5e6aaeafca13bf72.js +0 -1
  401. package/assets/esri/core/workers/chunks/0e549d942d6cba1608cf.js +0 -1
  402. package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
  403. package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
  404. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
  405. package/assets/esri/core/workers/chunks/27d7c701306efeea6b82.js +0 -1
  406. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
  407. package/assets/esri/core/workers/chunks/2bdfae998371e3aa9f2d.js +0 -1
  408. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
  409. package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +0 -1
  410. package/assets/esri/core/workers/chunks/32f128a1615d71bbe899.js +0 -2
  411. package/assets/esri/core/workers/chunks/375bdaf44e1ed6141601.js +0 -1
  412. package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
  413. package/assets/esri/core/workers/chunks/41074d383af3662673ca.js +0 -1
  414. package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
  415. package/assets/esri/core/workers/chunks/4b01858e05a4b90331a4.js +0 -30
  416. package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
  417. package/assets/esri/core/workers/chunks/4bfeac7338df9e0b7ce1.js +0 -1
  418. package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
  419. package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
  420. package/assets/esri/core/workers/chunks/4ffcca40e7aa24c8cc35.js +0 -1
  421. package/assets/esri/core/workers/chunks/534dd93c72ea448ee908.js +0 -1
  422. package/assets/esri/core/workers/chunks/548c34ea88f113d03c93.js +0 -30
  423. package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
  424. package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
  425. package/assets/esri/core/workers/chunks/6920e7f700a9ba280dba.js +0 -1
  426. package/assets/esri/core/workers/chunks/6b1f2b36bdc6b2ff2ea5.js +0 -1
  427. package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
  428. package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
  429. package/assets/esri/core/workers/chunks/708bd77e6d723e3f0aa8.js +0 -1
  430. package/assets/esri/core/workers/chunks/75a7de23c05435ec7649.js +0 -1
  431. package/assets/esri/core/workers/chunks/75dfdd85abbac26ac899.js +0 -1
  432. package/assets/esri/core/workers/chunks/798c4d3201fcc9f2a42b.js +0 -1
  433. package/assets/esri/core/workers/chunks/817fd88fe9a48caf69fb.js +0 -1
  434. package/assets/esri/core/workers/chunks/82f7d83a2073d1b0111c.js +0 -1
  435. package/assets/esri/core/workers/chunks/860465c4f44c373d0a1c.js +0 -1
  436. package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
  437. package/assets/esri/core/workers/chunks/89916fe83f48b2df4b0d.js +0 -1
  438. package/assets/esri/core/workers/chunks/8a68884d40f6f6de1d12.js +0 -1
  439. package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
  440. package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
  441. package/assets/esri/core/workers/chunks/961995d8da45a9203255.js +0 -1
  442. package/assets/esri/core/workers/chunks/978b7d10054e17161145.js +0 -1
  443. package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
  444. package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
  445. package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
  446. package/assets/esri/core/workers/chunks/b684ff4bc93bd60d6a19.js +0 -1
  447. package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
  448. package/assets/esri/core/workers/chunks/cd2b2babcdc130b4c368.js +0 -1
  449. package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
  450. package/assets/esri/core/workers/chunks/d39f5590022d910ee951.js +0 -1
  451. package/assets/esri/core/workers/chunks/d412a43060441d347fb4.js +0 -1
  452. package/assets/esri/core/workers/chunks/d41b847d08c42e5329d6.js +0 -262
  453. package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
  454. package/assets/esri/core/workers/chunks/d8c2bed12f937228c763.js +0 -1
  455. package/assets/esri/core/workers/chunks/de916dd0c11aefb6832e.js +0 -1
  456. package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +0 -30
  457. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
  458. package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
  459. package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
  460. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
  461. package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
  462. package/assets/esri/core/workers/chunks/f9f331c76c96743d8522.js +0 -1
  463. package/assets/esri/core/workers/chunks/fcbacca99c5a3ee5b69a.js +0 -1
  464. package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
  465. package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
  466. package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
  467. package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
  468. package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
  469. package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
  470. package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
  471. package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
  472. package/views/layers/support/dimensionUtils.js +0 -2
  473. /package/assets/esri/core/workers/chunks/{701125f6cdd91ff3655f.js.LICENSE.txt → 1252da05832e576d4def.js.LICENSE.txt} +0 -0
  474. /package/assets/esri/core/workers/chunks/{fbcf09526dc1bbe94b91.js.LICENSE.txt → 2e8db0f05df2e38a14e1.js.LICENSE.txt} +0 -0
  475. /package/assets/esri/core/workers/chunks/{32f128a1615d71bbe899.js.LICENSE.txt → 6af88bb722bbb37db198.js.LICENSE.txt} +0 -0
  476. /package/assets/esri/core/workers/chunks/{40df608337d562553ce1.js.LICENSE.txt → 70d8f5bdb452cee41536.js.LICENSE.txt} +0 -0
  477. /package/assets/esri/core/workers/chunks/{a70fa35b2d19460637e9.js.LICENSE.txt → a0fce639319d59becd01.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import{makeHandle as e}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{clamp as s,roundDownToNearest as a,roundToNearest as r,roundUpToNearest as n}from"../../../../core/mathUtils.js";import{removeMaybe as l,abortMaybe as d}from"../../../../core/maybe.js";import{throwIfAborted as h}from"../../../../core/promiseUtils.js";import{initial as u}from"../../../../core/reactiveUtils.js";import{createScreenPoint as p}from"../../../../core/screenUtils.js";import{throttle as c}from"../../../../core/throttle.js";import{convertTime as m}from"../../../../core/timeUtils.js";import{property as _,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{formatDuration as w}from"../../../../intl/duration.js";import{onLocaleChange as v,prefersRTL as y}from"../../../../intl/locale.js";import{fetchMessageBundle as T}from"../../../../intl/messages.js";import{substitute as D}from"../../../../intl/substitute.js";let x=class extends o{constructor(t){super(t),this.throttleDelay=M,this._tooltipElement=b(),this._tooltipContentElement=S(),this._updatingHandles=new f,this._messagesTask=null,this._screenPoint=null,this._shadowDurationTask=null,this.shadowDuration=null,this._throttledUpdateShadowDuration=null,this._onPointerMove=({x:t,y:o})=>{const i=p(t,o);this._screenPoint=i,this._throttledUpdateShadowDuration?.(this.view,i)},this._updateShadowDuration=(t,o)=>{this._abortShadowDurationTask(),this._shadowDurationTask=i(async i=>{const{results:e,ground:s}=await t.hitTest(o);if(h(i),0===e.length&&!s.mapPoint)return void(this.shadowDuration=null);const a=await this.getDuration(o,i);h(i),this.shadowDuration=a<0?null:a})}}initialize(){this._tooltipElement.appendChild(this._tooltipContentElement);const t=()=>{this._messagesTask?.abort(),this._messagesTask=i(()=>T("esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis"))};t(),this.addHandles([v(t),this._updatingHandles.add(()=>({enabled:this.isVisible(),surface:this.view.surface}),({enabled:t,surface:o})=>{t&&o?(o.appendChild(this._tooltipElement),this._startTracking(this.view)):(this.removeHandles(P),this._tooltipElement.remove())},u),this._updatingHandles.add(()=>this._styles,t=>{Object.assign(this._tooltipElement.style,t)},u),this._updatingHandles.add(()=>this._formattedText,t=>{this._tooltipContentElement.innerText=t},u),this._updatingHandles.add(()=>this.throttleDelay,t=>{this._throttledUpdateShadowDuration=c(this._updateShadowDuration,t)},u),e(()=>{this._throttledUpdateShadowDuration=l(this._throttledUpdateShadowDuration)})])}destroy(){this._updatingHandles.destroy(),this._tooltipElement.remove()}get updating(){return this._updatingHandles.updating||null!=this._shadowDurationTask&&!this._shadowDurationTask?.finished||null!=this._messagesTask&&!this._messagesTask?.finished||!0===this._throttledUpdateShadowDuration?.hasPendingUpdates()}get _formattedText(){const t=this._messagesTask?.value,o=this.shadowDuration;return null==t||null==o?"":"total-duration"===this.getMode()&&"hourly"===this.getTotalDurationMode()?this._formatHourlyText(t,o):this._formatExactText(t,o)}_formatExactText(t,o){return D(this.getVisualizeSunlight()?t.sunlightDuration:t.shadowDuration,{duration:E(U(o))})}_formatHourlyText(t,o){const i=this.getTotalDuration();if(i<=0)return this._formatExactText(t,0);const e=s(o,0,i);return this.getVisualizeSunlight()?this._formatHourlySunlightText(t,e,i):this._formatHourlyShadowText(t,e,i)}_formatHourlySunlightText(t,o,i){if(o===i)return this._formatExactText(t,o);const e=a(o,$),s=Math.min(i,e+$);return 0===e?D(t.sunlightDurationLessThan,{duration:j(e,s)}):D(t.sunlightDurationAtLeastLessThan,{minDuration:E(e),maxDuration:j(e,s)})}_formatHourlyShadowText(t,o,i){if(0===o)return this._formatExactText(t,o);const e=n(o,$)-$,s=Math.min(i,e+$);return D(t.shadowDurationMoreThanUpTo,{minDuration:E(e),maxDuration:j(e,s)})}get _styles(){const t=this._screenPoint;return t&&this._formattedText?{display:"block",transform:`translate(${t.x}px, ${t.y}px)`}:{display:"none"}}get testData(){}_startTracking(t){if(this.hasHandles(P))return;const o=o=>{this.hasHandles(z)||(o&&this._onPointerMove(o),this.addHandles(t.on("pointer-move",this._onPointerMove),z))},i=()=>{this.removeHandles(z),this._abortShadowDurationTask(),this._screenPoint=null,this.shadowDuration=null};this.addHandles([t.on("pointer-enter",o),t.on("pointer-leave",i),t.on("pointer-down",i),t.on("pointer-up",o),t.on("pointer-drag",t=>{"end"===t.action?o(t):i()}),t.on("click",o=>{const i=p(o.x,o.y);this._screenPoint=i,this._updateShadowDuration(t,i)}),e(()=>this._abortShadowDurationTask())],P),o()}_abortShadowDurationTask(){this._shadowDurationTask=d(this._shadowDurationTask)}};function b(){const t=H(document.createElement("div"),{position:"absolute",top:"0",left:"0",pointerEvents:"none"});return t.style.setProperty("--tooltip-arrow-size","6px"),t.style.setProperty("--tooltip-background","var(--calcite-color-foreground-1)"),t.appendChild(k()),t}function S(){return H(document.createElement("div"),{color:"var(--calcite-color-text-1)",fontSize:"var(--calcite-font-size-sm)",position:"absolute",width:"max-content",transform:"translate(0, -100%)",insetInlineStart:"calc(var(--calcite-spacing-lg) * -1)",marginTop:"calc((var(--tooltip-arrow-size) * -1) - var(--calcite-spacing-xxs))",background:"var(--tooltip-background)",paddingInline:"var(--calcite-spacing-md)",paddingBlock:"var(--calcite-spacing-xs)",pointerEvents:"none",borderRadius:"var(--calcite-corner-radius-sm)"})}function k(){return H(document.createElement("div"),{display:"block",position:"absolute",width:"0",height:"0",bottom:"-1px",left:"50%",transform:"translate(-50%, 0)",borderTop:"var(--tooltip-arrow-size) solid var(--tooltip-background)",borderRight:"var(--tooltip-arrow-size) solid transparent",borderBottom:"var(--tooltip-arrow-size) solid transparent",borderLeft:"var(--tooltip-arrow-size) solid transparent",pointerEvents:"none"})}function H(t,o){return Object.assign(t.style,o),t}function E(t){const o=w(t,void 0,{unitDisplay:"narrow"});return y()?`${L}${o}${A}`:o}function j(t,o){return E(t+U(Math.max(0,o-t)))}function U(t){const o=r(t,t<V?C:V);return t>0&&0===o?C:o}t([_()],x.prototype,"view",void 0),t([_()],x.prototype,"isVisible",void 0),t([_()],x.prototype,"getDuration",void 0),t([_()],x.prototype,"getMode",void 0),t([_()],x.prototype,"getTotalDurationMode",void 0),t([_()],x.prototype,"getTotalDuration",void 0),t([_()],x.prototype,"throttleDelay",void 0),t([_()],x.prototype,"updating",null),t([_()],x.prototype,"getVisualizeSunlight",void 0),t([_()],x.prototype,"_messagesTask",void 0),t([_()],x.prototype,"_screenPoint",void 0),t([_()],x.prototype,"_shadowDurationTask",void 0),t([_()],x.prototype,"shadowDuration",void 0),t([_()],x.prototype,"_throttledUpdateShadowDuration",void 0),t([_()],x.prototype,"_formattedText",null),t([_()],x.prototype,"_styles",null),x=t([g("esri.views.3d.analysis.ShadowCast.ShadowCastTooltip")],x);const P=Symbol("tracking"),z=Symbol("pointer"),M=300,C=m(1,"minutes","milliseconds"),V=m(15,"minutes","milliseconds"),$=m(1,"hours","milliseconds"),L="⁨",A="⁩";export{x as ShadowCastTooltip};
2
+ import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import{makeHandle as e}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{clamp as s,roundUpToNearest as a,roundToNearest as r}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as l}from"../../../../core/maybe.js";import{throwIfAborted as d}from"../../../../core/promiseUtils.js";import{initial as h}from"../../../../core/reactiveUtils.js";import{createScreenPoint as u}from"../../../../core/screenUtils.js";import{throttle as p}from"../../../../core/throttle.js";import{convertTime as c}from"../../../../core/timeUtils.js";import{property as m,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import{formatDuration as w}from"../../../../intl/duration.js";import{onLocaleChange as f,prefersRTL as y}from"../../../../intl/locale.js";import{fetchMessageBundle as v}from"../../../../intl/messages.js";import{substitute as D}from"../../../../intl/substitute.js";let T=class extends o{constructor(t){super(t),this.throttleDelay=P,this._tooltipElement=S(),this._tooltipContentElement=x(),this._updatingHandles=new _,this._messagesTask=null,this._screenPoint=null,this._shadowDurationTask=null,this.shadowDuration=null,this._throttledUpdateShadowDuration=null,this._onPointerMove=({x:t,y:o})=>{const i=u(t,o);this._screenPoint=i,this._throttledUpdateShadowDuration?.(this.view,i)},this._updateShadowDuration=(t,o)=>{this._abortShadowDurationTask(),this._shadowDurationTask=i(async i=>{const{results:e,ground:s}=await t.hitTest(o);if(d(i),0===e.length&&!s.mapPoint)return void(this.shadowDuration=null);const a=await this.getDuration(o,i);d(i),this.shadowDuration=a<0?null:a})}}initialize(){this._tooltipElement.appendChild(this._tooltipContentElement);const t=()=>{this._messagesTask?.abort(),this._messagesTask=i(()=>v("esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis"))};t(),this.addHandles([f(t),this._updatingHandles.add(()=>({enabled:this.isVisible(),surface:this.view.surface}),({enabled:t,surface:o})=>{t&&o?(o.appendChild(this._tooltipElement),this._startTracking(this.view)):(this.removeHandles(z),this._tooltipElement.remove())},h),this._updatingHandles.add(()=>this._styles,t=>{Object.assign(this._tooltipElement.style,t)},h),this._updatingHandles.add(()=>this._formattedText,t=>{this._tooltipContentElement.innerText=t},h),this._updatingHandles.add(()=>this.throttleDelay,t=>{this._throttledUpdateShadowDuration=p(this._updateShadowDuration,t)},h),e(()=>{this._throttledUpdateShadowDuration=n(this._throttledUpdateShadowDuration)})])}destroy(){this._updatingHandles.destroy(),this._tooltipElement.remove()}get updating(){return this._updatingHandles.updating||null!=this._shadowDurationTask&&!this._shadowDurationTask?.finished||null!=this._messagesTask&&!this._messagesTask?.finished||!0===this._throttledUpdateShadowDuration?.hasPendingUpdates()}get _formattedText(){const t=this._messagesTask?.value,o=this.shadowDuration;return null==t||null==o?"":"total-duration"===this.getMode()&&"hourly"===this.getTotalDurationMode()?this._formatHourlyText(t,o):this._formatExactText(t,o)}_formatExactText(t,o){return D(this.getVisualizeSunlight()?t.sunlightDuration:t.shadowDuration,{duration:H(U(o))})}_formatHourlyText(t,o){const i=this.getTotalDuration();if(i<=0)return this._formatExactText(t,0);const e=s(o,0,i);return 0===e&&this.getShowsSeparateZeroBucketInHourlyMode()?D(this.getVisualizeSunlight()?t.sunlightDuration:t.shadowDuration,{duration:H(0)}):this.getVisualizeSunlight()?this._formatHourlySunlightText(t,e,i):this._formatHourlyShadowText(t,e,i)}_formatHourlySunlightText(t,o,i){const e=E(o,i),s=Math.min(i,e+$);return 0===e?D(t.sunlightDurationLessThan,{duration:j(e,s)}):D(t.sunlightDurationAtLeastLessThan,{minDuration:H(e),maxDuration:j(e,s)})}_formatHourlyShadowText(t,o,i){const e=E(o,i),s=Math.min(i,e+$);return D(t.shadowDurationMoreThanUpTo,{minDuration:H(e),maxDuration:j(e,s)})}get _styles(){const t=this._screenPoint;return t&&this._formattedText?{display:"block",transform:`translate(${t.x}px, ${t.y}px)`}:{display:"none"}}get testData(){}_startTracking(t){if(this.hasHandles(z))return;const o=o=>{this.hasHandles(M)||(o&&this._onPointerMove(o),this.addHandles(t.on("pointer-move",this._onPointerMove),M))},i=()=>{this.removeHandles(M),this._abortShadowDurationTask(),this._screenPoint=null,this.shadowDuration=null};this.addHandles([t.on("pointer-enter",o),t.on("pointer-leave",i),t.on("pointer-down",i),t.on("pointer-up",o),t.on("pointer-drag",t=>{"end"===t.action?o(t):i()}),t.on("click",o=>{const i=u(o.x,o.y);this._screenPoint=i,this._updateShadowDuration(t,i)}),e(()=>this._abortShadowDurationTask())],z),o()}_abortShadowDurationTask(){this._shadowDurationTask=l(this._shadowDurationTask)}};function S(){const t=k(document.createElement("div"),{position:"absolute",top:"0",left:"0",pointerEvents:"none"});return t.style.setProperty("--tooltip-arrow-size","6px"),t.style.setProperty("--tooltip-background","var(--calcite-color-foreground-1)"),t.appendChild(b()),t}function x(){return k(document.createElement("div"),{color:"var(--calcite-color-text-1)",fontSize:"var(--calcite-font-size-sm)",position:"absolute",width:"max-content",transform:"translate(0, -100%)",insetInlineStart:"calc(var(--calcite-spacing-lg) * -1)",marginTop:"calc((var(--tooltip-arrow-size) * -1) - var(--calcite-spacing-xxs))",background:"var(--tooltip-background)",paddingInline:"var(--calcite-spacing-md)",paddingBlock:"var(--calcite-spacing-xs)",pointerEvents:"none",borderRadius:"var(--calcite-corner-radius-sm)"})}function b(){return k(document.createElement("div"),{display:"block",position:"absolute",width:"0",height:"0",bottom:"-1px",left:"50%",transform:"translate(-50%, 0)",borderTop:"var(--tooltip-arrow-size) solid var(--tooltip-background)",borderRight:"var(--tooltip-arrow-size) solid transparent",borderBottom:"var(--tooltip-arrow-size) solid transparent",borderLeft:"var(--tooltip-arrow-size) solid transparent",pointerEvents:"none"})}function k(t,o){return Object.assign(t.style,o),t}function H(t){const o=w(t,void 0,{unitDisplay:"narrow"});return y()?`${B}${o}${I}`:o}function j(t,o){return H(t+U(Math.max(0,o-t)))}function E(t,o){if(t<=0)return 0;const i=a(t,$);return s(i-$,0,o)}function U(t){const o=r(t,t<V?C:V);return t>0&&0===o?C:o}t([m()],T.prototype,"view",void 0),t([m()],T.prototype,"isVisible",void 0),t([m()],T.prototype,"getDuration",void 0),t([m()],T.prototype,"getMode",void 0),t([m()],T.prototype,"getShowsSeparateZeroBucketInHourlyMode",void 0),t([m()],T.prototype,"getTotalDurationMode",void 0),t([m()],T.prototype,"getTotalDuration",void 0),t([m()],T.prototype,"throttleDelay",void 0),t([m()],T.prototype,"updating",null),t([m()],T.prototype,"getVisualizeSunlight",void 0),t([m()],T.prototype,"_messagesTask",void 0),t([m()],T.prototype,"_screenPoint",void 0),t([m()],T.prototype,"_shadowDurationTask",void 0),t([m()],T.prototype,"shadowDuration",void 0),t([m()],T.prototype,"_throttledUpdateShadowDuration",void 0),t([m()],T.prototype,"_formattedText",null),t([m()],T.prototype,"_styles",null),T=t([g("esri.views.3d.analysis.ShadowCast.ShadowCastTooltip")],T);const z=Symbol("tracking"),M=Symbol("pointer"),P=300,C=c(1,"minutes","milliseconds"),V=c(15,"minutes","milliseconds"),$=c(1,"hours","milliseconds"),B="⁨",I="⁩";export{T as ShadowCastTooltip};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t,equals as i}from"../../../core/arrayUtils.js";import{createTask as s}from"../../../core/asyncUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import n from"../../../core/Logger.js";import{abortMaybe as a,destroyMaybe as o}from"../../../core/maybe.js";import{after as l,throwIfAborted as u,isPromiseLike as c}from"../../../core/promiseUtils.js";import{watch as p,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{createScreenPointArray as h,createRenderScreenPointArray as m}from"../../../core/screenUtils.js";import{offsetDateUTC as g,convertTime as _}from"../../../core/timeUtils.js";import{property as y,subclass as f}from"../../../core/accessorSupport/decorators.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as D}from"../../../core/support/UpdatingHandles.js";import{projectAsync as C}from"../../../geometry/projectionUtils.js";import{e as b}from"../../../chunks/containsOperator.js";import{n as V}from"../../../chunks/boundedPlane.js";import{polygonToVolume as T}from"../focusAreaUtils.js";import U from"./AnalysisView3D.js";import{registerAnalysisView as P,hideOtherAnalysisViews as S}from"./ShadowCast/analysisViewRegister.js";import{ShadowCastTooltip as O}from"./ShadowCast/ShadowCastTooltip.js";import{ElevationContext as x}from"../layers/graphics/ElevationContext.js";import{longitudeToTimezone as j}from"../support/earthUtils.js";import{computeDirectionsOverTime as z}from"../support/sunUtils.js";import{maxColorRampSize as A}from"../webgl-engine/shaders/colorRampParameters.js";import{breadthFirstBinaryPartitioning as R}from"../../../widgets/support/traversalUtils.js";let L=class extends U{constructor(e){super(e),this.type="shadow-cast-view-3d",this.analysis=null,this._updatingHandles=new D,this._stopPreviewingTask=null,this._updatedRecently=!1,this._tooltip=null,this._previousVolume=null}initialize(){this.addHandles([P(this.view,this),p(()=>({dependencies:this._previewDependencies,sceneUpdating:this._sceneUpdating}),()=>{a(this._stopPreviewingTask),this._updatedRecently=!0,this._stopPreviewingTask=s(async e=>{await l(B,e),u(e),this._updatedRecently=!1})},{sync:!0,initial:!0,equals:(e,t)=>G(e.dependencies,t.dependencies)&&(e.sceneUpdating===t.sceneUpdating||!e.sceneUpdating)}),p(()=>({renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t})=>{t&&S(this.view,this),e?.setParameters({shadowCast:{enabled:t}})},d),p(()=>({renderer:this._renderer,parameters:this._visualizationParameters,visible:this.visible}),({renderer:e,parameters:t,visible:i})=>{k(e,i,t)},d),p(()=>({renderer:this._renderer,lightDirections:this._lightDirections,lightDirectionsContext:this._lightDirectionsContext,visible:this.visible}),({renderer:e,lightDirections:t,lightDirectionsContext:i,visible:s})=>{k(e,s,{lightDirections:t,lightDirectionsContext:i})},d),p(()=>({renderer:this._renderer,previewing:this._previewing,visible:this.visible}),({renderer:e,previewing:t,visible:i})=>{k(e,i,{previewing:t})},d),p(()=>({analysisVolume:this._analysisVolume,renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t,analysisVolume:i})=>{k(e,t,{analysisVolume:i})},d)]),this.interactive=!0,this._tooltip=new O({getDuration:(e,t)=>this._getDurationAtScreen(e,t),getMode:()=>this.analysis.mode,getTotalDuration:()=>this._totalDuration,getTotalDurationMode:()=>this.analysis.totalDurationOptions.mode,getVisualizeSunlight:()=>this.analysis.visualizeSunlight,isVisible:()=>this.interactive&&this.visible,view:this.view})}destroy(){this.visible&&k(this._renderer,!0,{enabled:!1}),this._tooltip=o(this._tooltip),this._stopPreviewingTask=a(this._stopPreviewingTask),this._updatingHandles=o(this._updatingHandles)}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return this._previewing||null!=this._stopPreviewingTask&&!this._stopPreviewingTask.finished||!0===this._tooltip?.updating||this._updatingHandles.updating}get visible(){return super.visible}set visible(e){super.visible=e}get _previewing(){return this._updatedRecently||this._sceneUpdating}get _sceneUpdating(){const{view:e}=this;if(null==e?.allLayerViews)return!0;const{stationary:t,graphicsView:i}=e;return!t||this._shadowLayerViews.some(e=>e.updating)||!i?.suspended&&!!i?.updating}get _effectiveUtcOffset(){return this.analysis.utcOffset??this._utcOffsetAuto}get _utcOffsetAuto(){const e=this._referencePosition;return null!=e?j(e[0],!1):0}get _dateUTCOffset(){let e=this.analysis.date;return e=g(e,-e.getTimezoneOffset(),"minutes"),e=g(e,-this._effectiveUtcOffset,"hours"),e}get _startDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.startTimeOfDay)}get _endDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.endTimeOfDay)}get _referencePosition(){return this.view?.environmentManager?.referencePositionGeographic}get _totalDurationInterval(){return this._totalDuration>0?Math.floor(this._totalDuration/(q-1)):q}get _interval(){const e=this._totalDurationInterval;switch(this.analysis.mode){case"min-duration":return this._totalDuration>0?e:0;case"total-duration":return e;case"discrete":return this.analysis.discreteOptions.interval||e}}get _intervalContext(){const{mode:e,minDurationOptions:t}=this.analysis;return"min-duration"===e&&t.contextEnabled?t.contextOptions.interval||this._totalDurationInterval:-1}get _totalDurationSampleCount(){return this._lightDirections.length}get _totalDuration(){const{startTimeOfDay:e,endTimeOfDay:t}=this.analysis;return t-e}get _lightDirections(){return this._calculateLightDirections(this._interval)}get _lightDirectionsContext(){return this._calculateLightDirections(this._intervalContext)}_calculateLightDirections(e){const{view:t}=this;if(e<=0)return[];const i="global"===t.viewingMode?F:this._referencePosition;if(null==i)return[];const s=z(this._startDateTimeUTC,this._endDateTimeUTC,e,i,t.state.viewingMode,q),r=s.length;N.length=0;const n=R(0,r,N),a=new Array(r);for(let o=0;o<r;++o)a[o]=s[n[o]];return a}get _analysisVolume(){const{geometry:e}=this.analysis;if(null==e)return this._previousVolume=null,null;try{const t=T(e,this.view,J);return null==t?(this._previousVolume=null,null):c(t)?(this._updatingHandles.consumePromise(t),this._previousVolume):(this._previousVolume=t,t)}catch(t){return n.getLogger(this).error(new r("shadowcastanalysisview3d:projection-failed","Failed to project analysis area geometry to view spatial reference",{geometry:e,error:t})),null}}get _visualizationParameters(){if(!this.visible)return null;switch(this.analysis.mode){case"min-duration":return this._minDurationVisualizationParameters;case"total-duration":return this._durationVisualizationParameters;case"discrete":return this._discreteVisualizationParameters}}get _minDurationVisualizationParameters(){const{color:e,minDuration:t}=this.analysis.minDurationOptions,i=this._totalDuration;return{rendersSunlight:this.analysis.visualizeSunlight,visualization:2,thresholdColor:e.toUnitRGBA(),threshold:i>0?t/this._totalDuration:0,...this._minDurationContextVisualizationParameters}}get _minDurationContextVisualizationParameters(){const{minDurationOptions:e}=this.analysis;if(!e.contextEnabled)return{};const{color:t,colorStops:i}=e.contextOptions,s=1/this._lightDirectionsContext.length;return{visualization:3,gradientColorRamp:this._getEffectiveShadowCastColorRamp(t,i,s)}}get _durationVisualizationParameters(){const{color:e,colorStops:t,mode:i}=this.analysis.totalDurationOptions,s=this._totalDuration,r=s>0&&"hourly"===i?I/s:0,n=this._getEffectiveShadowCastColorRamp(e,t,1/s);return 0===r?{...this._discreteVisualizationParameters,gradientColorRamp:n}:{rendersSunlight:this.analysis.visualizeSunlight,bandedGradientColorRamp:n,visualization:1,bandSize:r}}get _discreteVisualizationParameters(){const{color:e,colorStops:t}=this.analysis.discreteOptions,i=1/this._lightDirections.length;return{rendersSunlight:this.analysis.visualizeSunlight,gradientColorRamp:this._getEffectiveShadowCastColorRamp(e,t,i),visualization:0}}get _shadowLayerViews(){return this.view.allLayerViews.items.filter(M)}get _previewDependencies(){const{view:e}=this,i=e.slice.plane,s=this._shadowLayerViews,r=s.map(e=>e.layer).filter(t),n=s.map(e=>e.suspended),a=r.map(e=>e.visible),o=r.map(e=>e.opacity),l=!!e.graphicsView?.suspended,u=r.filter(e=>"definitionExpression"in e).map(e=>e.definitionExpression),c=s.filter(e=>"filter"in e).map(e=>e.filter);return{slicePlane:i,startDateUTC:this._startDateTimeUTC,endDateUTC:this._endDateTimeUTC,layerViewSuspended:n,graphicsViewSuspended:l,layerVisibilities:a,layerOpacities:o,filters:c,definitionExpressions:u}}get _renderer(){return this.view?.stage?.renderer}get testData(){}async getDurationAtScreen(e){return this._getDurationAtScreen(e)}async _getDurationAtScreen(e,t){if(!await this._isScreenPointInAnalysisArea(e,t))return-1;const{_renderer:i,_totalDurationSampleCount:s}=this;if(null==i||0===s)return 0;const r=this.view.state.camera.screenToRender(h(e.x,e.y),m()),n=i.readAccumulatedShadow(r);return(this.analysis.visualizeSunlight?1-n:n)*this._totalDuration}async _isScreenPointInAnalysisArea(e,t){const{geometry:i}=this.analysis;if(!i)return!0;const s=await this.view.hitTest(e);u(t);const r=s.results.find(e=>e.mapPoint)?.mapPoint??s?.ground?.mapPoint;if(!r)return!1;const n=await C(r,i.spatialReference,{signal:t});return u(t),null!=n&&b(i,n)}_getEffectiveShadowCastColorRamp(e,t,i){if(null!=t){t.length>A&&n.getLogger(this).warnOnce("ShadowCastAnalysis supports at most 8 color stops");const e=t.map(e=>[e.value*i,e.color.toUnitRGBA()]);return e.sort(([e],[t])=>e-t),e}return H(e)}};e([y({readOnly:!0,type:["shadow-cast-view-3d"]})],L.prototype,"type",void 0),e([y({constructOnly:!0,nonNullable:!0})],L.prototype,"analysis",void 0),e([y({readOnly:!0})],L.prototype,"updating",null),e([y()],L.prototype,"_stopPreviewingTask",void 0),e([y()],L.prototype,"_updatedRecently",void 0),e([y()],L.prototype,"_tooltip",void 0),e([y()],L.prototype,"_sceneUpdating",null),e([y()],L.prototype,"_effectiveUtcOffset",null),e([y()],L.prototype,"_utcOffsetAuto",null),e([y()],L.prototype,"_dateUTCOffset",null),e([y()],L.prototype,"_startDateTimeUTC",null),e([y()],L.prototype,"_endDateTimeUTC",null),e([y()],L.prototype,"_referencePosition",null),e([y()],L.prototype,"_interval",null),e([y()],L.prototype,"_intervalContext",null),e([y()],L.prototype,"_totalDurationSampleCount",null),e([y()],L.prototype,"_totalDuration",null),e([y()],L.prototype,"_lightDirections",null),e([y()],L.prototype,"_lightDirectionsContext",null),e([y()],L.prototype,"_analysisVolume",null),e([y()],L.prototype,"_visualizationParameters",null),e([y()],L.prototype,"_minDurationVisualizationParameters",null),e([y()],L.prototype,"_minDurationContextVisualizationParameters",null),e([y()],L.prototype,"_durationVisualizationParameters",null),e([y()],L.prototype,"_discreteVisualizationParameters",null),e([y()],L.prototype,"_shadowLayerViews",null),e([y()],L.prototype,"_previewDependencies",null),e([y()],L.prototype,"_renderer",null),L=e([f("esri.views.3d.analysis.ShadowCastAnalysisView3D")],L);const E=L;function k(e,t,i){t&&null!=i&&e?.setParameters({shadowCast:i})}function H(e){const t=e.toUnitRGBA();return[[0,w(t[0],t[1],t[2],0)],[1,t]]}function M(e){if(e.suspended)return!1;switch(e.type){case"building-scene-3d":case"csv-3d":case"elevation-3d":case"feature-3d":case"geojson-3d":case"integrated-mesh-3d":case"integrated-mesh-3dtiles":case"ogc-feature-3d":case"route-3d":case"scene-layer-3d":case"scene-layer-graphics-3d":case"stream-3d":case"wms-3d":case"catalog-footprint-3d":return!0;case"base-dynamic-3d":case"catalog-3d":case"catalog-dynamic-group-3d":case"dimension-3d":case"gaussian-splat-3d":case"imagery-3d":case"imagery-tile-3d":case"line-of-sight-3d":case"map-image-3d":case"point-cloud-3d":case"tile-3d":case"vector-tile-3d":case"viewshed-3d":case"voxel-3d":case"wfs-3d":case"wmts-3d":case"media-3d":case"group":default:return!1;case"graphics-3d":return e.layer.graphics.some(e=>{const{symbol:t}=e;return null==t||"text"!==t.type&&!("symbolLayers"in t)||"text"!==t.type&&t.symbolLayers.some(e=>"text"!==e.type)})}}function G(e,t){if(e===t)return!0;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;const s=V(e.slicePlane,t.slicePlane),r=e.startDateUTC.valueOf()===t.startDateUTC.valueOf()&&e.endDateUTC.valueOf()===t.endDateUTC.valueOf(),n=i(e.layerViewSuspended,t.layerViewSuspended)&&e.graphicsViewSuspended===t.graphicsViewSuspended,a=i(e.layerVisibilities,t.layerVisibilities),o=i(e.layerOpacities,t.layerOpacities),l=i(e.filters,t.filters),u=i(e.definitionExpressions,t.definitionExpressions);return s&&r&&n&&a&&o&&l&&u}const I=_(1,"hours","milliseconds"),B=500,q=255,F=v(),N=[],J=new x;export{E as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t,equals as i}from"../../../core/arrayUtils.js";import{createTask as s}from"../../../core/asyncUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import n from"../../../core/Logger.js";import{abortMaybe as a,destroyMaybe as o}from"../../../core/maybe.js";import{after as l,throwIfAborted as u,isPromiseLike as c}from"../../../core/promiseUtils.js";import{watch as p,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{createScreenPointArray as h,createRenderScreenPointArray as m}from"../../../core/screenUtils.js";import{offsetDateUTC as g,convertTime as y}from"../../../core/timeUtils.js";import{property as _,subclass as f}from"../../../core/accessorSupport/decorators.js";import{create as v}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as D}from"../../../core/support/UpdatingHandles.js";import{projectAsync as C}from"../../../geometry/projectionUtils.js";import{e as b}from"../../../chunks/containsOperator.js";import{n as S}from"../../../chunks/boundedPlane.js";import{polygonToVolume as V}from"../focusAreaUtils.js";import T from"./AnalysisView3D.js";import{registerAnalysisView as U,hideOtherAnalysisViews as P}from"./ShadowCast/analysisViewRegister.js";import{ShadowCastTooltip as O}from"./ShadowCast/ShadowCastTooltip.js";import{ElevationContext as x}from"../layers/graphics/ElevationContext.js";import{longitudeToTimezone as j}from"../support/earthUtils.js";import{computeDirectionsOverTime as z}from"../support/sunUtils.js";import{maxColorRampSize as A}from"../webgl-engine/shaders/colorRampParameters.js";import{breadthFirstBinaryPartitioning as R}from"../../../widgets/support/traversalUtils.js";let k=class extends T{constructor(e){super(e),this.type="shadow-cast-view-3d",this.analysis=null,this._updatingHandles=new D,this._stopPreviewingTask=null,this._updatedRecently=!1,this._tooltip=null,this._previousVolume=null}initialize(){this.addHandles([U(this.view,this),p(()=>({dependencies:this._previewDependencies,sceneUpdating:this._sceneUpdating}),()=>{a(this._stopPreviewingTask),this._updatedRecently=!0,this._stopPreviewingTask=s(async e=>{await l(G,e),u(e),this._updatedRecently=!1})},{sync:!0,initial:!0,equals:(e,t)=>I(e.dependencies,t.dependencies)&&(e.sceneUpdating===t.sceneUpdating||!e.sceneUpdating)}),p(()=>({renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t})=>{t&&P(this.view,this),e?.setParameters({shadowCast:{enabled:t}})},d),p(()=>({renderer:this._renderer,parameters:this._visualizationParameters,visible:this.visible}),({renderer:e,parameters:t,visible:i})=>{E(e,i,t)},d),p(()=>({renderer:this._renderer,lightDirections:this._lightDirections,lightDirectionsContext:this._lightDirectionsContext,visible:this.visible}),({renderer:e,lightDirections:t,lightDirectionsContext:i,visible:s})=>{E(e,s,{lightDirections:t,lightDirectionsContext:i})},d),p(()=>({renderer:this._renderer,previewing:this._previewing,visible:this.visible}),({renderer:e,previewing:t,visible:i})=>{E(e,i,{previewing:t})},d),p(()=>({analysisVolume:this._analysisVolume,renderer:this._renderer,visible:this.visible}),({renderer:e,visible:t,analysisVolume:i})=>{E(e,t,{analysisVolume:i})},d)]),this.interactive=!0,this._tooltip=new O({getDuration:(e,t)=>this._getDurationAtScreen(e,t),getMode:()=>this.analysis.mode,getShowsSeparateZeroBucketInHourlyMode:()=>this._showsSeparateZeroBucketInHourlyMode,getTotalDuration:()=>this._totalDuration,getTotalDurationMode:()=>this.analysis.totalDurationOptions.mode,getVisualizeSunlight:()=>this.analysis.visualizeSunlight,isVisible:()=>this.interactive&&this.visible,view:this.view})}destroy(){this.visible&&E(this._renderer,!0,{enabled:!1}),this._tooltip=o(this._tooltip),this._stopPreviewingTask=a(this._stopPreviewingTask),this._updatingHandles=o(this._updatingHandles)}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get updating(){return this._previewing||null!=this._stopPreviewingTask&&!this._stopPreviewingTask.finished||!0===this._tooltip?.updating||this._updatingHandles.updating}get visible(){return super.visible}set visible(e){super.visible=e}get _previewing(){return this._updatedRecently||this._sceneUpdating}get _sceneUpdating(){const{view:e}=this;if(null==e?.allLayerViews)return!0;const{stationary:t,graphicsView:i}=e;return!t||this._shadowLayerViews.some(e=>e.updating)||!i?.suspended&&!!i?.updating}get _effectiveUtcOffset(){return this.analysis.utcOffset??this._utcOffsetAuto}get _utcOffsetAuto(){const e=this._referencePosition;return null!=e?j(e[0],!1):0}get _dateUTCOffset(){let e=this.analysis.date;return e=g(e,-e.getTimezoneOffset(),"minutes"),e=g(e,-this._effectiveUtcOffset,"hours"),e}get _startDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.startTimeOfDay)}get _endDateTimeUTC(){return g(this._dateUTCOffset,this.analysis.endTimeOfDay)}get _referencePosition(){return this.view?.environmentManager?.referencePositionGeographic}get _totalDurationInterval(){return this._totalDuration>0?Math.floor(this._totalDuration/(Z-1)):Z}get _interval(){const e=this._totalDurationInterval;switch(this.analysis.mode){case"min-duration":return this._totalDuration>0?e:0;case"total-duration":return e;case"discrete":return this.analysis.discreteOptions.interval||e}}get _intervalContext(){const{mode:e,minDurationOptions:t}=this.analysis;return"min-duration"===e&&t.contextEnabled?t.contextOptions.interval||this._totalDurationInterval:-1}get _totalDurationSampleCount(){return this._lightDirections.length}get _totalDuration(){const{startTimeOfDay:e,endTimeOfDay:t}=this.analysis;return t-e}get _lightDirections(){return this._calculateLightDirections(this._interval)}get _lightDirectionsContext(){return this._calculateLightDirections(this._intervalContext)}_calculateLightDirections(e){const{view:t}=this;if(e<=0)return[];const i="global"===t.viewingMode?q:this._referencePosition;if(null==i)return[];const s=z(this._startDateTimeUTC,this._endDateTimeUTC,e,i,t.state.viewingMode,Z),r=s.length;F.length=0;const n=R(0,r,F),a=new Array(r);for(let o=0;o<r;++o)a[o]=s[n[o]];return a}get _analysisVolume(){const{geometry:e}=this.analysis;if(null==e)return this._previousVolume=null,null;try{const t=V(e,this.view,N);return null==t?(this._previousVolume=null,null):c(t)?(this._updatingHandles.consumePromise(t),this._previousVolume):(this._previousVolume=t,t)}catch(t){return n.getLogger(this).error(new r("shadowcastanalysisview3d:projection-failed","Failed to project analysis area geometry to view spatial reference",{geometry:e,error:t})),null}}get _visualizationParameters(){if(!this.visible)return null;switch(this.analysis.mode){case"min-duration":return this._minDurationVisualizationParameters;case"total-duration":return this._durationVisualizationParameters;case"discrete":return this._discreteVisualizationParameters}}get _minDurationVisualizationParameters(){const{color:e,minDuration:t}=this.analysis.minDurationOptions,i=this._totalDuration;return{rendersSunlight:this.analysis.visualizeSunlight,visualization:2,thresholdColor:e.toUnitRGBA(),threshold:i>0?t/this._totalDuration:0,...this._minDurationContextVisualizationParameters}}get _minDurationContextVisualizationParameters(){const{minDurationOptions:e,visualizeSunlight:t}=this.analysis;if(!e.contextEnabled||t)return{};const{color:i,colorStops:s}=e.contextOptions,r=1/this._lightDirectionsContext.length;return{visualization:3,gradientColorRamp:this._getEffectiveShadowCastColorRamp(i,s,r)}}get _durationVisualizationParameters(){const{color:e,colorStops:t,mode:i}=this.analysis.totalDurationOptions,s=this._totalDuration,r=s>0&&"hourly"===i?B/s:0,n=this._getEffectiveShadowCastColorRamp(e,t,1/s);return 0===r?{...this._discreteVisualizationParameters,gradientColorRamp:n}:{rendersSunlight:this.analysis.visualizeSunlight,bandedGradientColorRamp:n,visualization:1,bandSize:r}}get _showsSeparateZeroBucketInHourlyMode(){const{colorStops:e}=this.analysis.totalDurationOptions;if(null==e||0===e.length)return!0;return e.reduce((e,t)=>Math.min(e,t.value),1/0)<=0}get _discreteVisualizationParameters(){const{color:e,colorStops:t}=this.analysis.discreteOptions,i=1/this._lightDirections.length;return{rendersSunlight:this.analysis.visualizeSunlight,gradientColorRamp:this._getEffectiveShadowCastColorRamp(e,t,i),visualization:0}}get _shadowLayerViews(){return this.view.allLayerViews.items.filter(M)}get _previewDependencies(){const{view:e}=this,i=e.slice.plane,s=this._shadowLayerViews,r=s.map(e=>e.layer).filter(t),n=s.map(e=>e.suspended),a=r.map(e=>e.visible),o=r.map(e=>e.opacity),l=!!e.graphicsView?.suspended,u=r.filter(e=>"definitionExpression"in e).map(e=>e.definitionExpression),c=s.filter(e=>"filter"in e).map(e=>e.filter);return{slicePlane:i,startDateUTC:this._startDateTimeUTC,endDateUTC:this._endDateTimeUTC,layerViewSuspended:n,graphicsViewSuspended:l,layerVisibilities:a,layerOpacities:o,filters:c,definitionExpressions:u}}get _renderer(){return this.view?.stage?.renderer}get testData(){}async getDurationAtScreen(e){return this._getDurationAtScreen(e)}async _getDurationAtScreen(e,t){if(!await this._isScreenPointInAnalysisArea(e,t))return-1;const{_renderer:i,_totalDurationSampleCount:s}=this;if(null==i||0===s)return 0;const r=this.view.state.camera.screenToRender(h(e.x,e.y),m()),n=i.readAccumulatedShadow(r);return(this.analysis.visualizeSunlight?1-n:n)*this._totalDuration}async _isScreenPointInAnalysisArea(e,t){const{geometry:i}=this.analysis;if(!i)return!0;const s=await this.view.hitTest(e);u(t);const r=s.results.find(e=>e.mapPoint)?.mapPoint??s?.ground?.mapPoint;if(!r)return!1;const n=await C(r,i.spatialReference,{signal:t});return u(t),null!=n&&b(i,n)}_getEffectiveShadowCastColorRamp(e,t,i){if(null!=t){t.length>A&&n.getLogger(this).warnOnce("ShadowCastAnalysis supports at most 8 color stops");const e=t.map(e=>[e.value*i,e.color.toUnitRGBA()]);return e.sort(([e],[t])=>e-t),e}return H(e)}};e([_({readOnly:!0,type:["shadow-cast-view-3d"]})],k.prototype,"type",void 0),e([_({constructOnly:!0,nonNullable:!0})],k.prototype,"analysis",void 0),e([_({readOnly:!0})],k.prototype,"updating",null),e([_()],k.prototype,"_stopPreviewingTask",void 0),e([_()],k.prototype,"_updatedRecently",void 0),e([_()],k.prototype,"_tooltip",void 0),e([_()],k.prototype,"_sceneUpdating",null),e([_()],k.prototype,"_effectiveUtcOffset",null),e([_()],k.prototype,"_utcOffsetAuto",null),e([_()],k.prototype,"_dateUTCOffset",null),e([_()],k.prototype,"_startDateTimeUTC",null),e([_()],k.prototype,"_endDateTimeUTC",null),e([_()],k.prototype,"_referencePosition",null),e([_()],k.prototype,"_interval",null),e([_()],k.prototype,"_intervalContext",null),e([_()],k.prototype,"_totalDurationSampleCount",null),e([_()],k.prototype,"_totalDuration",null),e([_()],k.prototype,"_lightDirections",null),e([_()],k.prototype,"_lightDirectionsContext",null),e([_()],k.prototype,"_analysisVolume",null),e([_()],k.prototype,"_visualizationParameters",null),e([_()],k.prototype,"_minDurationVisualizationParameters",null),e([_()],k.prototype,"_minDurationContextVisualizationParameters",null),e([_()],k.prototype,"_durationVisualizationParameters",null),e([_()],k.prototype,"_showsSeparateZeroBucketInHourlyMode",null),e([_()],k.prototype,"_discreteVisualizationParameters",null),e([_()],k.prototype,"_shadowLayerViews",null),e([_()],k.prototype,"_previewDependencies",null),e([_()],k.prototype,"_renderer",null),k=e([f("esri.views.3d.analysis.ShadowCastAnalysisView3D")],k);const L=k;function E(e,t,i){t&&null!=i&&e?.setParameters({shadowCast:i})}function H(e){const t=e.toUnitRGBA();return[[0,w(t[0],t[1],t[2],0)],[1,t]]}function M(e){if(e.suspended)return!1;switch(e.type){case"building-scene-3d":case"csv-3d":case"elevation-3d":case"feature-3d":case"geojson-3d":case"integrated-mesh-3d":case"integrated-mesh-3dtiles":case"ogc-feature-3d":case"route-3d":case"scene-layer-3d":case"scene-layer-graphics-3d":case"stream-3d":case"wms-3d":case"catalog-footprint-3d":return!0;case"base-dynamic-3d":case"catalog-3d":case"catalog-dynamic-group-3d":case"dimension-3d":case"gaussian-splat-3d":case"imagery-3d":case"imagery-tile-3d":case"line-of-sight-3d":case"map-image-3d":case"point-cloud-3d":case"tile-3d":case"vector-tile-3d":case"viewshed-3d":case"voxel-3d":case"wfs-3d":case"wmts-3d":case"media-3d":case"group":default:return!1;case"graphics-3d":return e.layer.graphics.some(e=>{const{symbol:t}=e;return null==t||"text"!==t.type&&!("symbolLayers"in t)||"text"!==t.type&&t.symbolLayers.some(e=>"text"!==e.type)})}}function I(e,t){if(e===t)return!0;if(null==e&&null==t)return!0;if(null==e||null==t)return!1;const s=S(e.slicePlane,t.slicePlane),r=e.startDateUTC.valueOf()===t.startDateUTC.valueOf()&&e.endDateUTC.valueOf()===t.endDateUTC.valueOf(),n=i(e.layerViewSuspended,t.layerViewSuspended)&&e.graphicsViewSuspended===t.graphicsViewSuspended,a=i(e.layerVisibilities,t.layerVisibilities),o=i(e.layerOpacities,t.layerOpacities),l=i(e.filters,t.filters),u=i(e.definitionExpressions,t.definitionExpressions);return s&&r&&n&&a&&o&&l&&u}const B=y(1,"hours","milliseconds"),G=500,Z=255,q=v(),F=[],N=new x;export{L as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{EventEmitter as e}from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{initial as a}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as s}from"../../../../../core/support/UpdatingHandles.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as d}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as c}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{canMoveZOperations as m}from"../manipulatorUtils.js";import{createVisualElements as b}from"../visualElementUtils.js";import{ExtentMove as v}from"./extentTransform/ExtentMove.js";import{ExtentRotate as _}from"./extentTransform/ExtentRotate.js";import{ExtentScale as g}from"./extentTransform/ExtentScale.js";import{TransformBounds as f}from"./extentTransform/extentUtils.js";import{PreserveAspectRatio as y}from"./extentTransform/PreserveAspectRatio.js";import{SnapRotation as j}from"./extentTransform/SnapRotation.js";import{OutlineVisualElement as M}from"../../visualElements/OutlineVisualElement.js";import{InteractiveToolBase as x}from"../../../../interactive/InteractiveToolBase.js";import R from"../../../../interactive/sketch/SketchOptions.js";import{makeTooltip as E}from"../../../../interactive/tooltip/tooltipCommonUtils.js";let S=class extends x{get updating(){return!!this.object.updating||this._extentMove.updating||this._extentScale.updating||this._updatingHandles.updating}constructor(t){super(t),this.events=new e,this._updatingHandles=new s,this.enableZ=!0,this.enableScaling=!0,this.enableRotation=!0,this.sketchOptions=new R,this._preserveAspectRatio=new y,this._snapRotation=new j,this.grabbing=!1,this.inputState=null,this._attachmentOrigin=null,this.type="transform-3d",this._outlineVisualElement=null}initialize(){const{view:t,object:e}=this,o=this._bounds=new f(this,()=>this._updateManipulators());this._extentMove=new v(this,o),this._extentScale=new g(this,o,()=>this._preserveAspectRatio.createDragEventPipelineStep()),this._extentRotate=new _(this,o,()=>this._snapRotation.createDragEventPipelineStep()),this.addHandles([this._updatingHandles.add(()=>this.enableZ,()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,0)),this._updatingHandles.add(()=>this.enableScaling,()=>this._extentScale.forEachManipulator(t=>this._updateManipulatorAvailability(t,2))),this._updatingHandles.add(()=>this.enableRotation,()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,3))]),this._updateManipulators(),this._updateAllManipulatorAvailability();const n=b({view:t,object:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>i()});if(null!=n){const{visualElement:t}=n;t instanceof M&&(this._outlineVisualElement=t,this.addHandles(t.events.on("attachment-origin-changed",()=>this._bounds.updateDisplayBounds()))),this.addHandles(n)}this.addHandles([e.on("committed",()=>this._onGeometryChanged()),this._updatingHandles.add(()=>this.object.visible,()=>this._updateAllManipulatorAvailability()),this._updatingHandles.add(()=>this.object.isDraped,()=>this._graphicDrapedChanged(),a),this._updatingHandles.add(()=>t.pointsOfInterest?.centerOnSurfaceFrequent.location,()=>o.updateDisplayBounds())]);const s=t=>{this.addHandles(t.events.on("grab-changed",()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()}))};this._forEachManipulator(s);const r=(t,i)=>{this.addHandles(t.events.on("immediate-click",t=>{1===i&&this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()}))};this._forEachManipulator(r),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._extentMove.destroy(),this._extentScale.destroy(),this._extentRotate.destroy(),this.tooltip.destroy(),this._updatingHandles.destroy(),this._set("view",null),this._set("object",null)}_initializeTooltip(){const{view:t}=this;this.tooltip=E(()=>({view:t,options:this.sketchOptions.tooltips}));const e=()=>{this.tooltip.info=this._getUpdatedTooltipInfo()};this.addHandles([this._updatingHandles.add(()=>[this.sketchOptions.tooltips.effectiveEnabled,this.preserveAspectRatio],e)]),this._forEachManipulator(t=>{this.addHandles([t.events.on(["focus-changed","grab-changed"],e),t.events.on("drag",t=>{"cancel"===t.action?this.tooltip.clear():e()})])})}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles(O),this._bounds.updateDisplayBounds(),this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",t=>{null!=this._attachmentOrigin&&r(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()}),O)}_updateManipulators(){if(!this.visible)return;const t=this._bounds.displayBounds,e=p(t,l.get());this._extentMove.updateManipulators(e,t),this._extentScale.updateManipulators(e,t),this._extentRotate.updateManipulators(e,t)}_updateAllManipulatorAvailability(){this._forEachManipulator((t,e)=>this._updateManipulatorAvailability(t,e))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof c){const a=this.object.visible,o=this.enableZ&&m(this.object.operations,this.object.elevationInfo);switch(e){case 3:t.available=a&&this.enableRotation;break;case 2:t.available=a&&(this.enableScaling||this.enableRotation||o),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?h:d;break;case 0:t.available=a&&o;break;default:t.available=a}}}_forEachManipulator(t){this._extentMove.forEachManipulator(t),this._extentScale.forEachManipulator(t),this._extentRotate.forEachManipulator(t)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(t){this._snapRotation.enabled=t,this._set("snapRotation",t)}get attachmentOrigin(){const t=this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin;return this._attachmentOrigin=t??this.object.origin??u(this.object)?.extent?.center,this._attachmentOrigin}reset(){}cancelDrag(){if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}this.inputState=null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const t=this.object.operations?.redo();t&&this._bounds.updateMapBoundsFromOperation(t)}}get test(){}};t([o()],S.prototype,"updating",null),t([o({constructOnly:!0,nonNullable:!0})],S.prototype,"view",void 0),t([o({constructOnly:!0,nonNullable:!0})],S.prototype,"object",void 0),t([o()],S.prototype,"enableZ",void 0),t([o()],S.prototype,"enableScaling",void 0),t([o()],S.prototype,"enableRotation",void 0),t([o({constructOnly:!0,type:R})],S.prototype,"sketchOptions",void 0),t([o()],S.prototype,"preserveAspectRatio",null),t([o()],S.prototype,"snapRotation",null),t([o()],S.prototype,"grabbing",void 0),t([o()],S.prototype,"inputState",void 0),t([o({readOnly:!0})],S.prototype,"type",void 0),t([o()],S.prototype,"tooltip",void 0),S=t([n("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],S);const O="draped-elevation-changes";export{S as ExtentTransformTool};
2
+ import{__decorate as t}from"tslib";import{EventEmitter as e}from"../../../../../core/Evented.js";import{makeHandle as i}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{initial as a}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as s}from"../../../../../core/support/UpdatingHandles.js";import{containsXY as r}from"../../../../../geometry/support/aaBoundingRect.js";import{sm4d as l}from"../../../../../geometry/support/vectorStacks.js";import{calculateBoundedPlaneTranslateRotate as p,resizeNormal as h,resizeOutlineOnly as d}from"../../../analysis/Slice/sliceToolUtils.js";import{Manipulator3D as c}from"../../Manipulator3D.js";import{manipulatedObjectGeometry as u}from"../manipulatedObjectUtils.js";import{canMoveZOperations as m}from"../manipulatorUtils.js";import{createVisualElements as b}from"../visualElementUtils.js";import{ExtentMove as v}from"./extentTransform/ExtentMove.js";import{ExtentRotate as _}from"./extentTransform/ExtentRotate.js";import{ExtentScale as g}from"./extentTransform/ExtentScale.js";import{TransformBounds as f}from"./extentTransform/extentUtils.js";import{PreserveAspectRatio as y}from"./extentTransform/PreserveAspectRatio.js";import{SnapRotation as j}from"./extentTransform/SnapRotation.js";import{OutlineVisualElement as M}from"../../visualElements/OutlineVisualElement.js";import{InteractiveToolBase as x}from"../../../../interactive/InteractiveToolBase.js";import R from"../../../../interactive/sketch/SketchOptions.js";import{makeTooltip as E}from"../../../../interactive/tooltip/tooltipCommonUtils.js";let S=class extends x{get updating(){return!this.destroying&&!this.destroyed&&(!!this.object.updating||this._extentMove.updating||this._extentScale.updating||this._updatingHandles.updating)}constructor(t){super(t),this.events=new e,this._updatingHandles=new s,this.enableZ=!0,this.enableScaling=!0,this.enableRotation=!0,this.sketchOptions=new R,this._preserveAspectRatio=new y,this._snapRotation=new j,this.grabbing=!1,this.inputState=null,this._attachmentOrigin=null,this.type="transform-3d",this._outlineVisualElement=null}initialize(){const{view:t,object:e}=this,o=this._bounds=new f(this,()=>this._updateManipulators());this._extentMove=new v(this,o),this._extentScale=new g(this,o,()=>this._preserveAspectRatio.createDragEventPipelineStep()),this._extentRotate=new _(this,o,()=>this._snapRotation.createDragEventPipelineStep()),this.addHandles([this._updatingHandles.add(()=>this.enableZ,()=>this._updateManipulatorAvailability(this._extentMove.moveZManipulator,0)),this._updatingHandles.add(()=>this.enableScaling,()=>this._extentScale.forEachManipulator(t=>this._updateManipulatorAvailability(t,2))),this._updatingHandles.add(()=>this.enableRotation,()=>this._updateManipulatorAvailability(this._extentRotate.rotateManipulator,3))]),this._updateManipulators(),this._updateAllManipulatorAvailability();const n=b({view:t,object:e,forEachManipulator:t=>this._forEachManipulator(t),onManipulatorsChanged:()=>i()});if(null!=n){const{visualElement:t}=n;t instanceof M&&(this._outlineVisualElement=t,this.addHandles(t.events.on("attachment-origin-changed",()=>this._bounds.updateDisplayBounds()))),this.addHandles(n)}this.addHandles([e.on("committed",()=>this._onGeometryChanged()),this._updatingHandles.add(()=>this.object.visible,()=>this._updateAllManipulatorAvailability()),this._updatingHandles.add(()=>this.object.isDraped,()=>this._graphicDrapedChanged(),a),this._updatingHandles.add(()=>t.pointsOfInterest?.centerOnSurfaceFrequent.location,()=>o.updateDisplayBounds())]);const s=t=>{this.addHandles(t.events.on("grab-changed",()=>{this.grabbing=t.grabbing,this._updateAllManipulatorAvailability()}))};this._forEachManipulator(s);const r=(t,i)=>{this.addHandles(t.events.on("immediate-click",t=>{1===i&&this.events.emit("immediate-click",{...t,object:e}),t.stopPropagation()}))};this._forEachManipulator(r),this._initializeTooltip(),this.finishToolCreation()}destroy(){this._extentMove.destroy(),this._extentScale.destroy(),this._extentRotate.destroy(),this.tooltip.destroy(),this._updatingHandles.destroy(),this._set("view",null),this._set("object",null)}_initializeTooltip(){const{view:t}=this;this.tooltip=E(()=>({view:t,options:this.sketchOptions.tooltips}));const e=()=>{this.tooltip.info=this._getUpdatedTooltipInfo()};this.addHandles([this._updatingHandles.add(()=>[this.sketchOptions.tooltips.effectiveEnabled,this.preserveAspectRatio],e)]),this._forEachManipulator(t=>{this.addHandles([t.events.on(["focus-changed","grab-changed"],e),t.events.on("drag",t=>{"cancel"===t.action?this.tooltip.clear():e()})])})}_getUpdatedTooltipInfo(){return this.sketchOptions.tooltips.effectiveEnabled?this._extentMove.getUpdatedTooltipInfo()??this._extentScale.getUpdatedTooltipInfo()??this._extentRotate.getUpdatedTooltipInfo():null}_onGeometryChanged(){this._bounds.updateDisplayBounds()}_graphicDrapedChanged(){this.removeHandles(O),this._bounds.updateDisplayBounds(),this.object.isDraped&&this.addHandles(this.view.elevationProvider.on("elevation-change",t=>{null!=this._attachmentOrigin&&r(t.extent,this._attachmentOrigin.x,this._attachmentOrigin.y)&&this._bounds.updateDisplayBounds()}),O)}_updateManipulators(){if(!this.visible)return;const t=this._bounds.displayBounds,e=p(t,l.get());this._extentMove.updateManipulators(e,t),this._extentScale.updateManipulators(e,t),this._extentRotate.updateManipulators(e,t)}_updateAllManipulatorAvailability(){this._forEachManipulator((t,e)=>this._updateManipulatorAvailability(t,e))}_updateManipulatorAvailability(t,e){const i=this.grabbing&&!t.grabbing;if(t.interactive=!i,t instanceof c){const a=this.object.visible,o=this.enableZ&&m(this.object.operations,this.object.elevationInfo);switch(e){case 3:t.available=a&&this.enableRotation;break;case 2:t.available=a&&(this.enableScaling||this.enableRotation||o),t.interactive=!i&&this.enableScaling,t.state=this.enableScaling?h:d;break;case 0:t.available=a&&o;break;default:t.available=a}}}_forEachManipulator(t){this._extentMove.forEachManipulator(t),this._extentScale.forEachManipulator(t),this._extentRotate.forEachManipulator(t)}get preserveAspectRatio(){return this._preserveAspectRatio.enabled}set preserveAspectRatio(t){this._preserveAspectRatio.enabled=t,this._set("preserveAspectRatio",t)}get snapRotation(){return this._snapRotation.enabled}set snapRotation(t){this._snapRotation.enabled=t,this._set("snapRotation",t)}get attachmentOrigin(){const t=this.object.isDraped?null:this._outlineVisualElement?.attachmentOrigin;return this._attachmentOrigin=t??this.object.origin??u(this.object)?.extent?.center,this._attachmentOrigin}reset(){}cancelDrag(){if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}this.inputState=null}get canUndo(){return!!this.object.operations?.canUndo}undo(){if(null!=this.inputState)this.view.activeTool=null;else if(this.canUndo){const t=this.object.operations?.undo();t&&this._bounds.updateMapBoundsFromOperationInverse(t)}}get canRedo(){return!!this.object.operations?.canRedo}redo(){if(this.canRedo){const t=this.object.operations?.redo();t&&this._bounds.updateMapBoundsFromOperation(t)}}get test(){}};t([o()],S.prototype,"updating",null),t([o({constructOnly:!0,nonNullable:!0})],S.prototype,"view",void 0),t([o({constructOnly:!0,nonNullable:!0})],S.prototype,"object",void 0),t([o()],S.prototype,"enableZ",void 0),t([o()],S.prototype,"enableScaling",void 0),t([o()],S.prototype,"enableRotation",void 0),t([o({constructOnly:!0,type:R})],S.prototype,"sketchOptions",void 0),t([o()],S.prototype,"preserveAspectRatio",null),t([o()],S.prototype,"snapRotation",null),t([o()],S.prototype,"grabbing",void 0),t([o()],S.prototype,"inputState",void 0),t([o({readOnly:!0})],S.prototype,"type",void 0),t([o()],S.prototype,"tooltip",void 0),S=t([n("esri.views.3d.interactive.editingTools.transform.ExtentTransformTool")],S);const O="draped-elevation-changes";export{S as ExtentTransformTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Error.js";const r=()=>import("./layers/TileLayerView3D.js"),a=()=>import("./layers/ElevationLayerView3D.js"),i={"base-dynamic":()=>import("./layers/BaseDynamicLayerView3D.js"),"base-elevation":a,"base-tile":r,"bing-maps":r,"building-scene":()=>import("./layers/BuildingSceneLayerView3D.js"),catalog:()=>import("./layers/CatalogLayerView3D.js"),"catalog-dynamic-group":()=>import("./layers/CatalogDynamicGroupLayerView3D.js"),"catalog-footprint":()=>import("./layers/CatalogFootprintLayerView3D.js"),csv:()=>import("./layers/CSVLayerView3D.js"),dimension:()=>import("./layers/DimensionLayerView3D.js"),elevation:a,feature:()=>import("./layers/FeatureLayerView3D.js"),"gaussian-splat":()=>import("./layers/GaussianSplatLayerView3D.js"),geojson:()=>import("./layers/GeoJSONLayerView3D.js"),graphics:()=>import("./layers/GraphicsLayerView3D.js"),group:()=>import("./layers/GroupLayerView3D.js"),imagery:()=>import("./layers/ImageryLayerView3D.js"),"integrated-mesh":()=>import("./layers/IntegratedMeshLayerView3D.js"),"integrated-mesh-3dtiles":()=>import("./layers/IntegratedMesh3DTilesLayerView3D.js"),"line-of-sight":()=>import("./layers/LineOfSightLayerView3D.js"),"map-image":()=>import("./layers/MapImageLayerView3D.js"),media:()=>import("./layers/MediaLayerView3D.js"),"ogc-feature":()=>import("./layers/OGCFeatureLayerView3D.js"),"open-street-map":r,"oriented-imagery":()=>import("./layers/FeatureLayerView3D.js"),"point-cloud":()=>import("./layers/PointCloudLayerView3D.js"),viewshed:()=>import("./layers/ViewshedLayerView3D.js"),voxel:()=>import("./layers/VoxelLayerView3D.js"),route:()=>import("./layers/RouteLayerView3D.js"),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?import("./layers/SceneLayerView3D.js"):import("./layers/SceneLayerGraphicsView3D.js"),stream:()=>import("./layers/StreamLayerView3D.js"),tile:r,"imagery-tile":()=>import("./layers/ImageryTileLayerView3D.js"),"vector-tile":()=>import("./layers/VectorTileLayerView3D.js"),wcs:()=>import("./layers/ImageryTileLayerView3D.js"),"web-tile":r,wfs:()=>import("./layers/WFSLayerView3D.js"),wms:()=>import("./layers/WMSLayerView3D.js"),wmts:()=>import("./layers/WMTSLayerView3D.js"),"geo-rss":null,kml:null,"knowledge-graph-sublayer":null,"knowledge-graph":null,"link-chart":null,"map-notes":null,parquet:null,"subtype-group":null,unknown:null,unsupported:null,video:null,"dimension-feature":null};function s(r){const a=r.declaredClass?r.declaredClass.slice(r.declaredClass.lastIndexOf(".")+1):"Unknown",i=a.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new e(`${i}:view-not-supported`,`${a} is not supported in 3D`)}const t=new Map,l={hasLayerViewModule:e=>null!=i[e.type],importLayerView:e=>{const r=o(e),a=t.get(r);if(a)return a;const l=i[e.type];if(null==l)throw s(e);const y=l(e);return t.set(r,y),y}};function o(e){return"scene"===e.type?`${e.type}-${e.profile}`:e.type}export{l as layerView3DImporter};
2
+ import e from"../../core/Error.js";const r=()=>import("./layers/TileLayerView3D.js"),a=()=>import("./layers/ElevationLayerView3D.js"),i={"base-dynamic":()=>import("./layers/BaseDynamicLayerView3D.js"),"base-elevation":a,"base-tile":r,"bing-maps":r,"building-scene":()=>import("./layers/BuildingSceneLayerView3D.js"),catalog:()=>import("./layers/CatalogLayerView3D.js"),"catalog-dynamic-group":()=>import("./layers/CatalogDynamicGroupLayerView3D.js"),"catalog-footprint":()=>import("./layers/CatalogFootprintLayerView3D.js"),csv:()=>import("./layers/CSVLayerView3D.js"),dimension:()=>import("./layers/DimensionLayerView3D.js"),elevation:a,feature:()=>import("./layers/FeatureLayerView3D.js"),"gaussian-splat":()=>import("./layers/GaussianSplatLayerView3D.js"),geojson:()=>import("./layers/GeoJSONLayerView3D.js"),graphics:()=>import("./layers/GraphicsLayerView3D.js"),group:()=>import("./layers/GroupLayerView3D.js"),imagery:()=>import("./layers/ImageryLayerView3D.js"),"integrated-mesh":()=>import("./layers/IntegratedMeshLayerView3D.js"),"integrated-mesh-3dtiles":()=>import("./layers/IntegratedMesh3DTilesLayerView3D.js"),"line-of-sight":()=>import("./layers/LineOfSightLayerView3D.js"),"map-image":()=>import("./layers/MapImageLayerView3D.js"),media:()=>import("./layers/MediaLayerView3D.js"),"ogc-feature":()=>import("./layers/OGCFeatureLayerView3D.js"),"open-street-map":r,"oriented-imagery":()=>import("./layers/FeatureLayerView3D.js"),"point-cloud":()=>import("./layers/PointCloudLayerView3D.js"),viewshed:()=>import("./layers/ViewshedLayerView3D.js"),voxel:()=>import("./layers/VoxelLayerView3D.js"),route:()=>import("./layers/RouteLayerView3D.js"),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?import("./layers/SceneLayerView3D.js"):import("./layers/SceneLayerGraphicsView3D.js"),stream:()=>import("./layers/StreamLayerView3D.js"),tile:r,"imagery-tile":()=>import("./layers/ImageryTileLayerView3D.js"),"vector-tile":()=>import("./layers/VectorTileLayerView3D.js"),wcs:()=>import("./layers/ImageryTileLayerView3D.js"),"web-tile":r,wfs:()=>import("./layers/WFSLayerView3D.js"),wms:()=>import("./layers/WMSLayerView3D.js"),wmts:()=>import("./layers/WMTSLayerView3D.js"),annotation:null,"geo-rss":null,kml:null,"knowledge-graph-sublayer":null,"knowledge-graph":null,"link-chart":null,"map-notes":null,parquet:null,"subtype-group":null,unknown:null,unsupported:null,video:null,"dimension-feature":null};function s(r){const a=r.declaredClass?r.declaredClass.slice(r.declaredClass.lastIndexOf(".")+1):"Unknown",i=a.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new e(`${i}:view-not-supported`,`${a} is not supported in 3D`)}const t=new Map,l={hasLayerViewModule:e=>null!=i[e.type],importLayerView:e=>{const r=o(e),a=t.get(r);if(a)return a;const l=i[e.type];if(null==l)throw s(e);const y=l(e);return t.set(r,y),y}};function o(e){return"scene"===e.type?`${e.type}-${e.profile}`:e.type}export{l as layerView3DImporter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{destroyHandle as t}from"../../../core/handleUtils.js";import{subclass as i}from"../../../core/accessorSupport/decorators.js";import r from"./DrapedSubView3D.js";import{DynamicLayerView3D as s}from"./DynamicLayerView3D.js";import{SublayerPopupHighlightHelper3D as p}from"./support/SublayerPopupHighlightHelper3D.js";import a from"../../layers/MapImageLayerView.js";let h=class extends(a(s)){constructor(){super(...arguments),this.type="map-image-3d"}initialize(){this._updatingHandles.add(()=>this.exportImageVersion,()=>this._updatingHandles.addPromise(this.refreshDebounced())),this._popupHighlightHelper=new p({view:this.view,layerView:this,updatingHandles:this._updatingHandles}),this.addHandles(t(this._popupHighlightHelper))}fetchPopupFeaturesAtTarget(e,t){return this._popupHighlightHelper.fetchPopupFeaturesAtTarget(e,t)}highlight(e,t){return this._popupHighlightHelper.highlight(e,t)}getFetchOptions(){return{timeExtent:this.timeExtent,scale:this.view.scale}}_initSubView(){this.subView=new r({layerView:this})}};h=e([i("esri.views.3d.layers.MapImageLayerView3D")],h);const o=h;export{o as default};
2
+ import{__decorate as e}from"tslib";import{destroyHandle as t}from"../../../core/handleUtils.js";import{subclass as i}from"../../../core/accessorSupport/decorators.js";import r from"./DrapedSubView3D.js";import{DynamicLayerView3D as s}from"./DynamicLayerView3D.js";import{SublayerPopupHighlightHelper3D as p}from"./support/SublayerPopupHighlightHelper3D.js";import a from"../../layers/MapImageLayerView.js";let h=class extends(a(s)){constructor(){super(...arguments),this.type="map-image-3d"}initialize(){this._updatingHandles.add(()=>this.exportImageVersion,()=>this._updatingHandles.addPromise(this.refreshDebounced())),this._popupHighlightHelper=new p({view:this.view,layerView:this,updatingHandles:this._updatingHandles}),this.addHandles(t(this._popupHighlightHelper))}fetchPopupFeaturesAtTarget(e,t,i){return this._popupHighlightHelper.fetchPopupFeaturesAtTarget(t,i)}highlight(e,t){return this._popupHighlightHelper.highlight(e,t)}getFetchOptions(){return{timeExtent:this.timeExtent,scale:this.view.scale}}_initSubView(){this.subView=new r({layerView:this})}};h=e([i("esri.views.3d.layers.MapImageLayerView3D")],h);const o=h;export{o as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{destroyHandle as i,makeHandle as r}from"../../../core/handleUtils.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{property as l,subclass as o}from"../../../core/accessorSupport/decorators.js";import{canProjectWithoutEngine as a}from"../../../geometry/projectionUtils.js";import{LayerView3D as p}from"./LayerView3D.js";import{TiledLayerView3D as n}from"./TiledLayerView3D.js";import{SublayerPopupHighlightHelper3D as h}from"./support/SublayerPopupHighlightHelper3D.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as f}from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as u}from"../../layers/support/MapServiceLayerViewHelper.js";let y=class extends(f(n(p(m)))){constructor(){super(...arguments),this.type="tile-3d"}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get tileInfo(){return this.layer.tileInfo}initialize(){if("web-tile"===this.layer.type){const e=this.layer.fullExtent?.spatialReference,i=this.layer.tileInfo?.spatialReference;if(null==e||null==i||!a(e,i)){const e="defaults"===this.layer.originOf("fullExtent")||null==this.layer.fullExtent?"SceneView requires fullExtent to be specified by the user on WebTileLayer":"SceneView requires fullExtent to be specified in the same spatial reference as tileInfo on WebTileLayer";this.addResolvingPromise(Promise.reject(new t("layerview:incompatible-fullextent",e)))}}if(u(this,this.layer)){const e=new h({view:this.view,layerView:this,updatingHandles:this._updatingHandles});this._popupHighlightHelper=e,this.addHandles(i(e))}this._addTilingSchemeMatchPromise()}async fetchTile([e,t,i],r){const l=await this.layer.fetchImageBitmapTile(e,t,i,{...r,allowDeriveTypeFromData:!0,imageOrientation:"flipY"});return s(r),l}async fetchPopupFeaturesAtTarget(e,t){return this._popupHighlightHelper?.fetchPopupFeaturesAtTarget(e,t)??[]}highlight(e,t){return this._popupHighlightHelper?.highlight(e,t)??r()}async doRefresh(){this.suspended||this.emit("data-changed")}};e([l()],y.prototype,"imageFormatIsOpaque",null),e([l()],y.prototype,"hasMixedImageFormats",null),e([l()],y.prototype,"layer",void 0),e([l()],y.prototype,"tileInfo",null),y=e([o("esri.views.3d.layers.TileLayerView3D")],y);const c=y;export{c as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{destroyHandle as i,makeHandle as r}from"../../../core/handleUtils.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{property as l,subclass as o}from"../../../core/accessorSupport/decorators.js";import{canProjectWithoutEngine as a}from"../../../geometry/projectionUtils.js";import{LayerView3D as p}from"./LayerView3D.js";import{TiledLayerView3D as n}from"./TiledLayerView3D.js";import{SublayerPopupHighlightHelper3D as h}from"./support/SublayerPopupHighlightHelper3D.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as f}from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as u}from"../../layers/support/MapServiceLayerViewHelper.js";let y=class extends(f(n(p(m)))){constructor(){super(...arguments),this.type="tile-3d"}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get tileInfo(){return this.layer.tileInfo}initialize(){if("web-tile"===this.layer.type){const e=this.layer.fullExtent?.spatialReference,i=this.layer.tileInfo?.spatialReference;if(null==e||null==i||!a(e,i)){const e="defaults"===this.layer.originOf("fullExtent")||null==this.layer.fullExtent?"SceneView requires fullExtent to be specified by the user on WebTileLayer":"SceneView requires fullExtent to be specified in the same spatial reference as tileInfo on WebTileLayer";this.addResolvingPromise(Promise.reject(new t("layerview:incompatible-fullextent",e)))}}if(u(this,this.layer)){const e=new h({view:this.view,layerView:this,updatingHandles:this._updatingHandles});this._popupHighlightHelper=e,this.addHandles(i(e))}this._addTilingSchemeMatchPromise()}async fetchTile([e,t,i],r){const l=await this.layer.fetchImageBitmapTile(e,t,i,{...r,allowDeriveTypeFromData:!0,imageOrientation:"flipY"});return s(r),l}async fetchPopupFeaturesAtTarget(e,t,i){return this._popupHighlightHelper?.fetchPopupFeaturesAtTarget(t,i)??[]}highlight(e,t){return this._popupHighlightHelper?.highlight(e,t)??r()}async doRefresh(){this.suspended||this.emit("data-changed")}};e([l()],y.prototype,"imageFormatIsOpaque",null),e([l()],y.prototype,"hasMixedImageFormats",null),e([l()],y.prototype,"layer",void 0),e([l()],y.prototype,"tileInfo",null),y=e([o("esri.views.3d.layers.TileLayerView3D")],y);const c=y;export{c as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{clone as e}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as t}from"../../../../core/units.js";import{normalFromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as s,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a,sub as l,cross as c,add as m,normalize as p,transformMat4 as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as u,create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as g,ZEROS as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as f}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as b,fromBuffer as x,intersectsClippingArea as _}from"../../../../geometry/support/aaBoundingBox.js";import{getZeroIndexArray as C}from"../../../../geometry/support/Indices.js";import{f as v}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as w,SnappingCandidateEdge as S}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as j}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as P,SampleElevationInfo as I}from"./elevationAlignmentUtils.js";import{extrudePolygon as E}from"./extrudeUtils.js";import{Object3DEdgeState as A,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as O}from"./graphicUtils.js";import{geometryAsPolygon as D}from"./polygonUtils.js";import{createMaterial as M}from"../support/edgeUtils.js";import{encodeNaNUInt8 as G}from"../support/symbolColorUtils.js";import{debugFlags as L}from"../../support/debugFlags.js";import{SamplePosition as V}from"../../support/ElevationProvider.js";import{loadTessellationUtils as R,preloadedPolygonToRenderInfoElevationAligned as B}from"../../support/renderInfoUtils/polygon.js";import{Attribute as F}from"../../webgl-engine/lib/Attribute.js";import{Geometry as T}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as N}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as H,compressNormal as q}from"../../webgl-engine/lib/Normals.js";import{Object3D as W}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as k}from"../../webgl-engine/materials/DefaultMaterial.js";const Z=["polygon","extent"];class J extends z{constructor(e,t,r,i){super(e,t,r,i,ee(t)),this.ensureDrapedStatus(!1)}async doLoad(){const e=this.symbolLayer,t=e?.material,r=this.symbolLayer.material?.color?.a,i=this._hasDrivenColorOrOpacity,s=this.needsDrivenTransparentPass||i&&null!=r&&r<1,n=t?.emissive,o=("color"===n?.source?n?.strength:void 0)??0,a=!i&&(null==r||0===r),l=i?g:this._materialColor?.toUnitRGBA()??y,c={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:u,diffuse:u,externalColor:l,opacity:a?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:i,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:e.castShadows,emissiveStrengthFromSymbol:o,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},m=new k(c,this._context),p=new k({...c,cullFace:2},this._context);this._materials[0]=m,this._materials[1]=p,this._updateTransparentDepedentMaterialParameters(),await R()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Z,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(e.renderingInfo,this._materialColor,!1);G(r,r);const i=this.createElevationContextForGraphic(t);return this._createAs3DShape(t,e.renderingInfo,r,i,t.uid)}layerOpacityChanged(e,t){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),e?.forEach(e=>t(e)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,P)}slicePlaneEnabledChanged(e,t){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e?.forEach(e=>{const r=t(e);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const e={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(e),this._materials[1]?.setParameters(e),!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?j(e.size.output,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}_containsRenderableGeometry(e){return"polygonIndexCount"in e&&"outlineIndexCount"in e?e.polygonIndexCount>0||e.outlineIndexCount>0:super._containsRenderableGeometry(e)}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?0:1}async queryForSnapping(r,i,s,n){const o=this._getExtrusionSize(s)*this._context.renderCoordsHelper.unitInMeters/t(i),{objectId:a,target:l}=r,c=e(l);switch(c.z=(c.z??0)+o,r.type){case"edge":{const{start:t,end:i}=r,s=e(t),n=e(i);return s.z=(s.z??0)+o,n.z=(n.z??0)+o,[new S(a,c,1/0,s,n)]}case"vertex":return[new w(a,c,1/0),new S(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,n,a,l){const c=D(e.geometry);if(null==c)return null;if(0===c.rings.length||!c.rings.some(e=>e.length>0))return this._logGeometryValidationWarnings(c.rings,"rings","ExtrudeSymbol3DLayer"),null;const m=B(c,this._context.elevationProvider,this._context.renderCoordsHelper,a,{outlineOutput:"tessellated-indices"});if(null==m)return;this._logGeometryCreationWarnings(m,c.rings,"rings","ExtrudeSymbol3DLayer");const p=O(c);if(null==p)return null;const h=new Array,u=new Array,g=b(),y=o(),C=d(),w=1===this._context.renderCoordsHelper.viewingMode;w||this._context.renderCoordsHelper.worldUpAtPosition(null,C),f(c.spatialReference,[p.x,p.y,0],y,this._context.renderCoordsHelper.spatialReference);const S=o();s(S,y);const j=i();r(j,S);const I=new Map,z=this._materials[0];if(this._context.clippingExtent&&(x(m.mapPositions,g),!_(g,this._context.clippingExtent)))return;if(0===m.polygonIndexCount&&0===m.outlineIndexCount)return;const G=this._getExtrusionSize(t),L=E(m,{height:G,worldUp:C,spherical:w,requireElevation:!0,requireNormals:!0,requireSizes:!0});if(null==L)return;v(L.vertices,L.vertices,S);const V=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:l,layerViewUid:this._context.layerViewUid}),R=new le(L.vertices,L.elevation,H(L.normals),L.sizes),F=K(z,L.indices,L.indices.length-L.bottomIndices.length,R,n,V),T=m.vertexCount,N=L.polygonVertexCount,q=2*m.outlineSegmentCount,k=m.polygonIndexCount/3,Z=new ce(T,N,q,k);if($(F,Z,y),I.set(F,Z),h.push(F,K(this._materials[1],L.bottomIndices,0,R,n,V)),u.push(R.heights),0===h.length)return null;const J=new W({geometries:h,layerViewUid:this._context.layerViewUid,graphicUid:l,isElevationSource:!0});J.transformation=y;const Q=M(this.symbolLayer,{opacity:this._getLayerOpacity()}),X=Q?new A(this._materials[0],Q,this._context.slicePlaneEnabled):null,ee=new U(this,J,null,(e,t,r,i,s)=>Y(e,t,r,i,s,u,I),a,X);return ee.alignedSampledElevation=m.sampledElevation,ee.needsElevationUpdates=P(a.mode),ee}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const e=this._materials[0];e&&e.setParameters({cullFace:e.transparent?0:2})}}function K(e,t,r,i,s,n){const{attributeIndices:o,drawIndices:a}=Q(t),l=[["position",new F(i.positions,o,3,!0)],["normalCompressed",new F(i.normals,o,2,!0)]];if(e.parameters.hasSymbolColors){const e=C(o.length);l.push(["symbolColor",new F(s,e,4,!0)])}return new T(e,l,i.elevation,0,n,r,null,a)}function Q(e){const t=new Array,r=new Map,i=new Array;for(let s=0;s<e.length;++s){const n=e[s];let o=r.get(n);null==o&&(o=t.length,t.push(n),r.set(n,o)),i.push(o)}return{attributeIndices:t,drawIndices:i}}const X=d();function Y(e,t,r,i,s,l,c){const m=e.stageObject,p=m.geometries,u=p.length,d="absolute-height"!==t.mode;let g=0;const y=m.transformation,f=n(o(),y);for(let n=0;n<u;n+=2){const e=p[n];if(!N(e))continue;const t=e.getMutableAttribute("position").data,o=l[n/2],u=new V(e.mapPositions),b=t.length/3;let x=!1,_=0;{let e=0;for(let n=0;n<b;n++){X[0]=t[e],X[1]=t[e+1],X[2]=t[e+2],i(u,ie),d&&(_+=ie.sampledElevation),L.ENABLE_OPTIMIZATIONS?(a(te,t[e],t[e+1],t[e+2]),h(te,te,y),s.setAltitude(te,ie.z+o[e/3]),h(te,te,f)):(a(te,u.array[u.offset],u.array[u.offset+1],ie.z+o[e/3]),null!=r&&s.toRenderCoords(te,r,te),h(te,te,f)),t[e]=te[0],t[e+1]=te[1],t[e+2]=te[2];const n=se/s.unitInMeters;(Math.abs(X[0]-t[e])>=n||Math.abs(X[1]-t[e+1])>=n||Math.abs(X[2]-t[e+2])>=n)&&(x=!0),u.offset+=3,e+=3}}if(x){const t=c.get(e);t&&$(e,t,y),m.geometryVertexAttributeUpdated(p[n],"normalCompressed"),e.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n],"position"),p[n+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n+1],"position")}g+=_/b}return g/u}function $(e,t,r){const i=e.getMutableAttribute("position"),s=e.getMutableAttribute("normalCompressed").data,n=i.data,o=e.primitivePositionIndices,{topVertexStart:u,topVertexCount:d,topFaceStart:g,topFaceCount:y}=t,f=g+y,b=u+d,x=ne,_=oe,C=ae,v=re,w=te;a(w,0,0,0);const S=(e,t)=>{const i=3*e;a(t,n[i+0],n[i+1],n[i+2]),h(t,t,r)};for(let a=g;a<f;++a){const e=3*a;S(o[e+0],x[0]),S(o[e+1],x[1]),S(o[e+2],x[2]),l(_,x[1],x[0]),l(C,x[2],x[0]),c(v,_,C),m(w,w,v)}p(w,w);for(let a=u;a<b;++a){const e=w[0],t=w[1],r=w[2];q(s,a,e,t,r)}}function ee(e){return 1===(e.material?.color?.a??0)}const te=d(),re=d(),ie=new I,se=.01,ne=[d(),d(),d()],oe=d(),ae=d();class le{constructor(e,t,r,i){this.positions=e,this.elevation=t,this.normals=r,this.heights=i}}class ce{constructor(e,t,r,i){this.topVertexStart=e,this.topVertexCount=t,this.topFaceStart=r,this.topFaceCount=i}}export{J as Graphics3DExtrudeSymbolLayer};
2
+ import{clone as e}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as t}from"../../../../core/units.js";import{normalFromMat4 as r}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as s,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as a,sub as l,cross as c,add as m,normalize as p,transformMat4 as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as u,create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as g,ZEROS as y}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{computeTranslationToOriginAndRotation as f}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as b,fromBuffer as x,intersectsClippingArea as _}from"../../../../geometry/support/aaBoundingBox.js";import{getZeroIndexArray as C}from"../../../../geometry/support/Indices.js";import{f as v}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as w,SnappingCandidateEdge as S}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as j}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as I,SampleElevationInfo as P}from"./elevationAlignmentUtils.js";import{extrudePolygon as E}from"./extrudeUtils.js";import{Object3DEdgeState as A,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as O}from"./graphicUtils.js";import{geometryAsPolygon as D}from"./polygonUtils.js";import{createMaterial as M}from"../support/edgeUtils.js";import{encodeNaNUInt8 as G}from"../support/symbolColorUtils.js";import{debugFlags as L}from"../../support/debugFlags.js";import{SamplePosition as V}from"../../support/ElevationProvider.js";import{loadTessellationUtils as R,preloadedPolygonToRenderInfoElevationAligned as B}from"../../support/renderInfoUtils/polygon.js";import{Attribute as F}from"../../webgl-engine/lib/Attribute.js";import{Geometry as T}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as N}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as H,compressNormal as q}from"../../webgl-engine/lib/Normals.js";import{Object3D as W}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as k}from"../../webgl-engine/materials/DefaultMaterial.js";const Z=["polygon","extent"];class J extends z{constructor(e,t,r,i){super(e,t,r,i,ee(t)),this.ensureDrapedStatus(!1)}async doLoad(){const e=this.symbolLayer,t=e?.material,r=this.symbolLayer.material?.color?.a,i=this._hasDrivenColorOrOpacity,s=this.needsDrivenTransparentPass||i&&null!=r&&r<1,n=t?.emissive,o=("color"===n?.source?n?.strength:void 0)??0,a=!i&&(null==r||0===r),l=i?g:this._materialColor?.toUnitRGBA()??y,c={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,useIndexing:!0,ambient:u,diffuse:u,externalColor:l,opacity:a?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:i,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:e.castShadows,emissiveStrengthFromSymbol:o,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},m=new k(c,this._context),p=new k({...c,cullFace:2},this._context);this._materials[0]=m,this._materials[1]=p,this._updateTransparentDepedentMaterialParameters(),await R()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,Z,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(e.renderingInfo,this._materialColor,!1);G(r,r);const i=this.createElevationContextForGraphic(t);return this._createAs3DShape(t,e.renderingInfo,r,i,t.uid)}layerOpacityChanged(e,t){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),e?.forEach(e=>t(e)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,I)}slicePlaneEnabledChanged(e,t){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e?.forEach(e=>{const r=t(e);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const e={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(e),this._materials[1]?.setParameters(e),!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?j(e.size.output,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}_containsRenderableGeometry(e){return"polygonIndexCount"in e&&"outlineIndexCount"in e?e.polygonIndexCount>0||e.outlineIndexCount>0:super._containsRenderableGeometry(e)}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?0:1}async queryForSnapping(r,i,s,n){const o=this._getExtrusionSize(s)*this._context.renderCoordsHelper.unitInMeters/t(i),{objectId:a,target:l}=r,c=e(l);switch(c.z=(c.z??0)+o,r.type){case"edge":{const{start:t,end:i}=r,s=e(t),n=e(i);return s.z=(s.z??0)+o,n.z=(n.z??0)+o,[new S(a,c,1/0,s,n)]}case"vertex":return[new w(a,c,1/0),new S(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,n,a,l){const c=D(e.geometry);if(null==c)return null;if(0===c.rings.length||!c.rings.some(e=>e.length>0))return this._logGeometryValidationWarnings(c.rings,"rings","ExtrudeSymbol3DLayer"),null;const m=B(c,this._context.elevationProvider,this._context.renderCoordsHelper,a,{outlineOutput:"tessellated-indices"});if(null==m)return;this._logGeometryCreationWarnings(m,c.rings,"rings","ExtrudeSymbol3DLayer");const p=O(c);if(null==p)return null;const h=new Array,u=new Array,g=b(),y=o(),C=d(),w=1===this._context.renderCoordsHelper.viewingMode;w||this._context.renderCoordsHelper.worldUpAtPosition(null,C),f(c.spatialReference,[p.x,p.y,0],y,this._context.renderCoordsHelper.spatialReference);const S=o();s(S,y);const j=i();r(j,S);const P=new Map,z=this._materials[0];if(this._context.clippingExtent&&(x(m.mapPositions,g),!_(g,this._context.clippingExtent)))return;if(0===m.polygonIndexCount&&0===m.outlineIndexCount)return;const G=this._getExtrusionSize(t),L=E(m,{height:G,worldUp:C,spherical:w,requireElevation:!0,requireNormals:!0,requireSizes:!0});if(null==L)return;v(L.vertices,L.vertices,S);const V=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:l,layerViewUid:this._context.layerViewUid}),R=new le(L.vertices,L.elevation,H(L.normals),L.sizes),F=K(z,L.indices,L.indices.length-L.bottomIndices.length,R,n,V),T=m.vertexCount,N=L.polygonVertexCount,q=2*m.outlineSegmentCount,k=m.polygonIndexCount/3,Z=new ce(T,N,q,k);if($(F,Z,y),P.set(F,Z),h.push(F),L.bottomIndices.length>0&&h.push(K(this._materials[1],L.bottomIndices,0,R,n,V)),u.push(R.heights),0===h.length)return null;const J=new W({geometries:h,layerViewUid:this._context.layerViewUid,graphicUid:l,isElevationSource:!0});J.transformation=y;const Q=M(this.symbolLayer,{opacity:this._getLayerOpacity()}),X=Q?new A(this._materials[0],Q,this._context.slicePlaneEnabled):null,ee=new U(this,J,null,(e,t,r,i,s)=>Y(e,t,r,i,s,u,P),a,X);return ee.alignedSampledElevation=m.sampledElevation,ee.needsElevationUpdates=I(a.mode),ee}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const e=this._materials[0];e&&e.setParameters({cullFace:e.transparent?0:2})}}function K(e,t,r,i,s,n){const{attributeIndices:o,drawIndices:a}=Q(t),l=[["position",new F(i.positions,o,3,!0)],["normalCompressed",new F(i.normals,o,2,!0)]];if(e.parameters.hasSymbolColors){const e=C(o.length);l.push(["symbolColor",new F(s,e,4,!0)])}return new T(e,l,i.elevation,0,n,r,null,a)}function Q(e){const t=new Array,r=new Map,i=new Array;for(let s=0;s<e.length;++s){const n=e[s];let o=r.get(n);null==o&&(o=t.length,t.push(n),r.set(n,o)),i.push(o)}return{attributeIndices:t,drawIndices:i}}const X=d();function Y(e,t,r,i,s,l,c){const m=e.stageObject,p=m.geometries,u=p.length,d="absolute-height"!==t.mode;let g=0;const y=m.transformation,f=n(o(),y);for(let n=0,o=0;n<u;++n){const e=p[n],t=c.get(e);if(!t||!N(e))continue;const u=e.getMutableAttribute("position").data,b=l[o++],x=new V(e.mapPositions),_=u.length/3;let C=!1,v=0;{let e=0;for(let t=0;t<_;t++){X[0]=u[e],X[1]=u[e+1],X[2]=u[e+2],i(x,ie),d&&(v+=ie.sampledElevation),L.ENABLE_OPTIMIZATIONS?(a(te,u[e],u[e+1],u[e+2]),h(te,te,y),s.setAltitude(te,ie.z+b[e/3]),h(te,te,f)):(a(te,x.array[x.offset],x.array[x.offset+1],ie.z+b[e/3]),null!=r&&s.toRenderCoords(te,r,te),h(te,te,f)),u[e]=te[0],u[e+1]=te[1],u[e+2]=te[2];const t=se/s.unitInMeters;(Math.abs(X[0]-u[e])>=t||Math.abs(X[1]-u[e+1])>=t||Math.abs(X[2]-u[e+2])>=t)&&(C=!0),x.offset+=3,e+=3}}if(C){$(e,t,y),m.geometryVertexAttributeUpdated(p[n],"normalCompressed"),e.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n],"position");const r=p[n+1],i=!c.has(r);r&&i&&(r.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(r,"position"))}g+=v/_}return g/u}function $(e,t,r){const i=e.getMutableAttribute("position"),s=e.getMutableAttribute("normalCompressed").data,n=i.data,o=e.primitivePositionIndices,{topVertexStart:u,topVertexCount:d,topFaceStart:g,topFaceCount:y}=t,f=g+y,b=u+d,x=ne,_=oe,C=ae,v=re,w=te;a(w,0,0,0);const S=(e,t)=>{const i=3*e;a(t,n[i+0],n[i+1],n[i+2]),h(t,t,r)};for(let a=g;a<f;++a){const e=3*a;S(o[e+0],x[0]),S(o[e+1],x[1]),S(o[e+2],x[2]),l(_,x[1],x[0]),l(C,x[2],x[0]),c(v,_,C),m(w,w,v)}p(w,w);for(let a=u;a<b;++a){const e=w[0],t=w[1],r=w[2];q(s,a,e,t,r)}}function ee(e){return 1===(e.material?.color?.a??0)}const te=d(),re=d(),ie=new P,se=.01,ne=[d(),d(),d()],oe=d(),ae=d();class le{constructor(e,t,r,i){this.positions=e,this.elevation=t,this.normals=r,this.heights=i}}class ce{constructor(e,t,r,i){this.topVertexStart=e,this.topVertexCount=t,this.topFaceStart=r,this.topFaceCount=i}}export{J as Graphics3DExtrudeSymbolLayer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{defaultObjectPrimitive as e}from"../../../../symbols/support/primitives.js";import{pathNumCircleProfileSubdivisions as r,pathNumRoundJoinSubdivisions as t,pathNumRoundCapExtrusionSubdivisions as a}from"./Graphics3DPathSymbolLayerConstants.js";import{primitiveLodResources as s}from"./primitiveObjectSymbolUtils.js";import{EstimatedSymbolComplexity as u,SymbolComplexityMemory as o,EstimatedAggregateSymbolComplexity as b,AggregateSymbolComplexity as i,SymbolComplexity as y}from"./SymbolComplexity.js";import{hasEdges as n}from"../support/edgeUtils.js";import{DefaultMaterial as c}from"../../webgl-engine/materials/DefaultMaterial.js";const P=new u({});function l(e){if("web-style"===e.type)return P;return F(e.symbolLayers.toArray().map(r=>p(e,r)))}function F(e){let r=0,t=0,a=0,s=!1,u=0;const y=new o;for(const o of e)null!=o&&(r+=o.verticesPerFeature,t+=o.verticesPerCoordinate,a+=o.drawCallsPerFeature,y.bytesPerFeature+=o.memory.bytesPerFeature,y.bytesPerFeatureLabel+=o.memory.bytesPerFeatureLabel,y.resourceBytes+=o.memory.resourceBytes,y.draped.bytesPerFeature+=o.memory.bytesPerFeature,y.draped.bytesPerFeatureLabel+=o.memory.bytesPerFeatureLabel,s=s||o.estimated,++u);return s?new b(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:y}):new i(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:y})}function m(e){const r=F(e);return r.numComplexities>0&&(r.verticesPerFeature/=r.numComplexities,r.verticesPerCoordinate/=r.numComplexities,r.drawCallsPerFeature/=r.numComplexities,r.memory.bytesPerFeature/=r.numComplexities,r.memory.bytesPerFeatureLabel/=r.numComplexities,r.memory.resourceBytes/=r.numComplexities,r.memory.draped.bytesPerFeature/=r.numComplexities,r.memory.draped.bytesPerFeatureLabel/=r.numComplexities),r}const d={};function p(s,o){const b=L(s,o),i=n(o)?2:0;switch(o.type){case"extrude":return new y({verticesPerFeature:-12,verticesPerCoordinate:12,drawCallsPerFeature:i,memory:b});case"fill":if("mesh-3d"===s.type)return new y({drawCallsPerFeature:i,memory:b});if(null!=o.outline&&o.outline.size>0)return new y({verticesPerFeature:-12,verticesPerCoordinate:9,memory:b});case"water":return new y({verticesPerFeature:-6,verticesPerCoordinate:3,memory:b});case"line":return new y({verticesPerFeature:-6,verticesPerCoordinate:6,memory:b});case"object":return o.resource?.href?new u({verticesPerFeature:100,memory:b}):{...C(o.resource?.primitive??e),memory:b};case"path":{let e=0,s=0;switch(o.profile){case"circle":e=r;break;case"quad":e=4;break;default:return void o.profile}switch(o.join){case"round":s=t;break;case"miter":case"bevel":s=1;break;default:return}const u=2*e,i=e*s*2,n=i+u;let c=-2*i-u;switch(o.cap){case"none":break;case"butt":case"square":c+=2*(e-1);break;case"round":c+=2*(e*(a-1)*2+e);break;default:return}return new y({verticesPerFeature:c,verticesPerCoordinate:n,memory:b})}case"text":{const e="label-3d"===s.type?0:2;return new y({verticesPerFeature:6,memory:b,drawCallsPerFeature:e})}case"icon":return new y({verticesPerFeature:6,memory:b});default:return}}function L(e,r){const t="point-3d"===e.type;switch(r.type){case"extrude":return r.edges&&r.edges.size>0?w.EXTRUDE_EDGES:w.EXTRUDE;case"fill":return null!=r.outline&&r.outline.size>0?w.FILL_OUTLINE:w.FILL;case"water":return w.FILL;case"line":return"round"===r.join?w.LINE_ROUND:w.LINE_MITER;case"path":switch(r.join){case"round":switch(r.profile){case"circle":return w.PATH_ROUND_CIRCLE;case"quad":return w.PATH_ROUND_QUAD;default:return void r.profile}case"miter":case"bevel":switch(r.profile){case"circle":return w.PATH_MITER_CIRCLE;case"quad":return w.PATH_MITER_QUAD;default:return void r.profile}default:return}case"object":return t?w.OBJECT_POINT:w.OBJECT_POLYGON;case"icon":case"text":return t?w.ICON_POINT:w.ICON_POLYGON;default:return}}function C(e){const r=d[e];if(r)return r;const t=f(s(e,new c({},{spherical:!0})).levels);return d[e]=new y({verticesPerFeature:t}),d[e]}function f(e){return e.reduce((e,r,t)=>e+r.numVertices*(1/10**t),0)/e.reduce((e,r,t)=>e+1/10**t,0)}const w={ICON_POINT:{bytesPerFeature:2658,bytesPerFeatureLabel:3484,resourceBytes:0,draped:{bytesPerFeature:1845,bytesPerFeatureLabel:3498}},ICON_POLYGON:{bytesPerFeature:3086,bytesPerFeatureLabel:2996,resourceBytes:0,draped:{bytesPerFeature:2694,bytesPerFeatureLabel:3014}},OBJECT_POINT:{bytesPerFeature:497,bytesPerFeatureLabel:2933,resourceBytes:0,draped:{bytesPerFeature:497,bytesPerFeatureLabel:2933}},OBJECT_POLYGON:{bytesPerFeature:867,bytesPerFeatureLabel:2491,resourceBytes:0,draped:{bytesPerFeature:867,bytesPerFeatureLabel:2491}},LINE_MITER:{bytesPerFeature:2337,bytesPerFeatureLabel:2658,resourceBytes:0,draped:{bytesPerFeature:1864,bytesPerFeatureLabel:2656}},LINE_ROUND:{bytesPerFeature:2341,bytesPerFeatureLabel:2672,resourceBytes:0,draped:{bytesPerFeature:1873,bytesPerFeatureLabel:2643}},PATH_MITER_CIRCLE:{bytesPerFeature:22374,bytesPerFeatureLabel:2558,resourceBytes:0,draped:{bytesPerFeature:22374,bytesPerFeatureLabel:2558}},PATH_ROUND_CIRCLE:{bytesPerFeature:24004,bytesPerFeatureLabel:2598,resourceBytes:0,draped:{bytesPerFeature:24004,bytesPerFeatureLabel:2598}},PATH_MITER_QUAD:{bytesPerFeature:24040,bytesPerFeatureLabel:2940,resourceBytes:0,draped:{bytesPerFeature:24040,bytesPerFeatureLabel:2940}},PATH_ROUND_QUAD:{bytesPerFeature:23088,bytesPerFeatureLabel:2886,resourceBytes:0,draped:{bytesPerFeature:23088,bytesPerFeatureLabel:2886}},FILL:{bytesPerFeature:3059,bytesPerFeatureLabel:2838,resourceBytes:0,draped:{bytesPerFeature:2352,bytesPerFeatureLabel:2808}},FILL_OUTLINE:{bytesPerFeature:3093,bytesPerFeatureLabel:2632,resourceBytes:0,draped:{bytesPerFeature:2480,bytesPerFeatureLabel:2601}},EXTRUDE:{bytesPerFeature:5075,bytesPerFeatureLabel:2559,resourceBytes:0,draped:{bytesPerFeature:5075,bytesPerFeatureLabel:2559}},EXTRUDE_EDGES:{bytesPerFeature:2843,bytesPerFeatureLabel:2139,resourceBytes:0,draped:{bytesPerFeature:2843,bytesPerFeatureLabel:2139}}};if(has("esri-tests-disable-symbol-memory-estimators"))for(const E in w){const e=w[E];e.bytesPerFeature=0,e.bytesPerFeatureLabel=0,e.draped.bytesPerFeature=0,e.draped.bytesPerFeatureLabel=0}export{m as averageSymbolComplexities,l as defaultSymbolComplexity,p as defaultSymbolLayerComplexity,L as defaultSymbolLayerMemoryComplexity,P as emptySymbolComplexity,f as estimateNumVerticesForLods,w as memoryEstimators,F as totalSymbolComplexities};
2
+ import has from"../../../../core/has.js";import{defaultObjectPrimitive as e}from"../../../../symbols/support/primitives.js";import{pathNumCircleProfileSubdivisions as r,pathNumRoundJoinSubdivisions as t,pathNumRoundCapExtrusionSubdivisions as a}from"./Graphics3DPathSymbolLayerConstants.js";import{primitiveLodResources as s}from"./primitiveObjectSymbolUtils.js";import{EstimatedSymbolComplexity as u,SymbolComplexityMemory as o,EstimatedAggregateSymbolComplexity as b,AggregateSymbolComplexity as i,SymbolComplexity as y}from"./SymbolComplexity.js";import{hasEdges as n}from"../support/edgeUtils.js";import{DefaultMaterial as c}from"../../webgl-engine/materials/DefaultMaterial.js";const P=new u({});function l(e){if("web-style"===e.type)return P;return F(e.symbolLayers.toArray().map(r=>p(e,r)))}function F(e){let r=0,t=0,a=0,s=!1,u=0;const y=new o;for(const o of e)null!=o&&(r+=o.verticesPerFeature,t+=o.verticesPerCoordinate,a+=o.drawCallsPerFeature,y.bytesPerFeature+=o.memory.bytesPerFeature,y.bytesPerFeatureLabel+=o.memory.bytesPerFeatureLabel,y.resourceBytes+=o.memory.resourceBytes,y.draped.bytesPerFeature+=o.memory.bytesPerFeature,y.draped.bytesPerFeatureLabel+=o.memory.bytesPerFeatureLabel,s=s||o.estimated,++u);return s?new b(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:y}):new i(u,{verticesPerFeature:r,verticesPerCoordinate:t,drawCallsPerFeature:a,memory:y})}function m(e){const r=F(e);return r.numComplexities>0&&(r.verticesPerFeature/=r.numComplexities,r.verticesPerCoordinate/=r.numComplexities,r.drawCallsPerFeature/=r.numComplexities,r.memory.bytesPerFeature/=r.numComplexities,r.memory.bytesPerFeatureLabel/=r.numComplexities,r.memory.resourceBytes/=r.numComplexities,r.memory.draped.bytesPerFeature/=r.numComplexities,r.memory.draped.bytesPerFeatureLabel/=r.numComplexities),r}const d={};function p(s,o){const b=L(s,o),i=n(o)?2:0;switch(o.type){case"extrude":return new y({verticesPerFeature:-12,verticesPerCoordinate:12,drawCallsPerFeature:i,memory:b});case"fill":if("mesh-3d"===s.type)return new y({drawCallsPerFeature:i,memory:b});if(null!=o.outline&&o.outline.size>0)return new y({verticesPerFeature:-12,verticesPerCoordinate:9,memory:b});case"water":return new y({verticesPerFeature:-6,verticesPerCoordinate:3,memory:b});case"line":return new y({verticesPerFeature:-6,verticesPerCoordinate:6,memory:b});case"object":return o.resource?.href?new u({verticesPerFeature:100,memory:b}):{...C(o.resource?.primitive??e),memory:b};case"path":{let e=0,s=0;switch(o.profile){case"circle":e=r;break;case"quad":e=4;break;default:return void o.profile}switch(o.join){case"round":s=t;break;case"miter":case"bevel":s=1;break;default:return}const u=2*e,i=e*s*2,n=i+u;let c=-2*i-u;switch(o.cap){case"none":break;case"butt":case"square":c+=2*(e-1);break;case"round":c+=2*(e*(a-1)*2+e);break;default:return}return new y({verticesPerFeature:c,verticesPerCoordinate:n,memory:b})}case"text":{const e="label-3d"===s.type?0:2;return new y({verticesPerFeature:6,memory:b,drawCallsPerFeature:e})}case"icon":return new y({verticesPerFeature:6,memory:b});default:return}}function L(e,r){const t="point-3d"===e.type;switch(r.type){case"extrude":return r.edges&&r.edges.size>0?w.EXTRUDE_EDGES:w.EXTRUDE;case"fill":return null!=r.outline&&r.outline.size>0?w.FILL_OUTLINE:w.FILL;case"water":return w.FILL;case"line":return"round"===r.join?w.LINE_ROUND:w.LINE_MITER;case"path":switch(r.join){case"round":switch(r.profile){case"circle":return w.PATH_ROUND_CIRCLE;case"quad":return w.PATH_ROUND_QUAD;default:return void r.profile}case"miter":case"bevel":switch(r.profile){case"circle":return w.PATH_MITER_CIRCLE;case"quad":return w.PATH_MITER_QUAD;default:return void r.profile}default:return}case"object":return t?w.OBJECT_POINT:w.OBJECT_POLYGON;case"icon":case"text":return t?w.ICON_POINT:w.ICON_POLYGON;default:return}}function C(e){const r=d[e];if(r)return r;const t=f(s(e,new c({},{spherical:!0})).levels);return d[e]=new y({verticesPerFeature:t}),d[e]}function f(e){return e.reduce((e,r,t)=>e+r.numVertices*(1/10**t),0)/e.reduce((e,r,t)=>e+1/10**t,0)}const w={ICON_POINT:{bytesPerFeature:2604,bytesPerFeatureLabel:3465,resourceBytes:0,draped:{bytesPerFeature:1781,bytesPerFeatureLabel:3456}},ICON_POLYGON:{bytesPerFeature:3198,bytesPerFeatureLabel:2941,resourceBytes:0,draped:{bytesPerFeature:2308,bytesPerFeatureLabel:3006}},OBJECT_POINT:{bytesPerFeature:877,bytesPerFeatureLabel:2952,resourceBytes:0,draped:{bytesPerFeature:877,bytesPerFeatureLabel:2952}},OBJECT_POLYGON:{bytesPerFeature:1307,bytesPerFeatureLabel:2520,resourceBytes:0,draped:{bytesPerFeature:1307,bytesPerFeatureLabel:2520}},LINE_MITER:{bytesPerFeature:2544,bytesPerFeatureLabel:2677,resourceBytes:0,draped:{bytesPerFeature:1924,bytesPerFeatureLabel:2664}},LINE_ROUND:{bytesPerFeature:2564,bytesPerFeatureLabel:2679,resourceBytes:0,draped:{bytesPerFeature:1928,bytesPerFeatureLabel:2673}},PATH_MITER_CIRCLE:{bytesPerFeature:13378,bytesPerFeatureLabel:2656,resourceBytes:0,draped:{bytesPerFeature:13378,bytesPerFeatureLabel:2656}},PATH_ROUND_CIRCLE:{bytesPerFeature:13524,bytesPerFeatureLabel:2686,resourceBytes:0,draped:{bytesPerFeature:13524,bytesPerFeatureLabel:2686}},PATH_MITER_QUAD:{bytesPerFeature:15185,bytesPerFeatureLabel:2993,resourceBytes:0,draped:{bytesPerFeature:15185,bytesPerFeatureLabel:2993}},PATH_ROUND_QUAD:{bytesPerFeature:13151,bytesPerFeatureLabel:2986,resourceBytes:0,draped:{bytesPerFeature:13151,bytesPerFeatureLabel:2986}},FILL:{bytesPerFeature:3514,bytesPerFeatureLabel:2845,resourceBytes:0,draped:{bytesPerFeature:2733,bytesPerFeatureLabel:2837}},FILL_OUTLINE:{bytesPerFeature:3618,bytesPerFeatureLabel:2593,resourceBytes:0,draped:{bytesPerFeature:2828,bytesPerFeatureLabel:2583}},EXTRUDE:{bytesPerFeature:5657,bytesPerFeatureLabel:2569,resourceBytes:0,draped:{bytesPerFeature:5657,bytesPerFeatureLabel:2569}},EXTRUDE_EDGES:{bytesPerFeature:3074,bytesPerFeatureLabel:2172,resourceBytes:0,draped:{bytesPerFeature:3074,bytesPerFeatureLabel:2172}}};if(has("esri-tests-disable-symbol-memory-estimators"))for(const E in w){const e=w[E];e.bytesPerFeature=0,e.bytesPerFeatureLabel=0,e.draped.bytesPerFeature=0,e.draped.bytesPerFeatureLabel=0}export{m as averageSymbolComplexities,l as defaultSymbolComplexity,p as defaultSymbolLayerComplexity,L as defaultSymbolLayerMemoryComplexity,P as emptySymbolComplexity,f as estimateNumVerticesForLods,w as memoryEstimators,F as totalSymbolComplexities};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{watch as r,sync as n,initial as s,when as i,on as o}from"../../../../core/reactiveUtils.js";import{property as a,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{add as u,exactEquals as d,copy as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as p}from"../../../../core/support/UpdatingHandles.js";import{create as l}from"../../../../geometry/support/ray.js";import{debugFlags as _}from"../debugFlags.js";import{DebugPoint as m}from"../debugUtils.js";import{fromRenderAtEye as C}from"../geometryUtils/ray.js";import{CameraOnSurface as g}from"./CameraOnSurface.js";import{CenterOnSurface as y}from"./CenterOnSurface.js";import{ContentGeometryUpdates as O}from"./ContentGeometryUpdates.js";import{Focus as A}from"./Focus.js";import{StableSurfaceCenter as w}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{Intersector as I}from"../../webgl-engine/lib/Intersector.js";import{terrainId as v}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{PropertiesPool as b}from"../../../support/PropertiesPool.js";import{TaskPriority as R}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this.renderPointOfView=f(),this._pois=new Array,this._updatingHandles=new p,this._debugCenters=null,this._tmpRay=l(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new b({renderPointOfView:()=>f()},this),this._contentIntersector=new I(e.view.state.viewingMode),this._surfaceIntersector=new I(e.view.state.viewingMode),this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=0}initialize(){const{state:e,groundView:t,renderCoordsHelper:a,map:c}=this.view,u=()=>this._estimateSurfaceAltitudeAtCenter(),d=this.view.resourceController.scheduler,h=t?.elevationQueryCache,f={state:e,scheduler:d,surface:t,renderCoordsHelper:a};this._set("centerOnSurfaceInfrequent",new y({...f,task:R.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new y({...f,task:R.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new y({...f,task:R.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new g({...f,cache:h,task:R.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...f,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new O(this.view.allLayerViews,()=>this.view.graphicsView)),this._set("surfaceOrigin",new w({cache:h,view:this.view})),this._set("focus",new A({state:e,scheduler:d,surface:t,renderCoordsHelper:a,centerOnSurface:this.centerOnSurfaceFrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus),this.addHandles([r(()=>e.contentCamera,e=>this._cameraChanged(e),n),this._updatingHandles.add(()=>t.groundExtent,()=>this._updateCenterPointsOfInterest()),this._updatingHandles.add(()=>this.view.map?.ground?.navigationConstraint?.type,e=>{this._surfaceIntersector.options.backfacesTerrain="none"===e},s),i(()=>!t.updating,()=>this._updateCenterPointsOfInterest(),n),o(()=>this.surfaceGeometryUpdates.events,"request-update",()=>this._updateCenterPointsOfInterest()),o(()=>this.contentGeometryUpdates.events,"request-update",()=>this._updateCenterOnContent()),this._updatingHandles.add(()=>_.SHOW_POI,e=>this._setDebug(e),s)]),this._cameraChanged(this.view.state.contentCamera);for(const r of this._pois)r.runTask()}destroy(){this._setDebug(!1),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this._pois.length=0,this.surfaceOrigin.destroy(),this._updatingHandles.destroy(),this._set("centerOnSurfaceInfrequent",null),this._set("centerOnSurfaceFrequent",null),this._set("centerOnContent",null),this._set("cameraOnSurface",null),this._set("surfaceGeometryUpdates",null),this._set("contentGeometryUpdates",null),this._set("surfaceOrigin",null),this._set("focus",null)}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some(e=>e.updating))||this._updatingHandles.updating}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,j,U)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(j):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){const{view:e}=this,{groundView:t}=e;if(!t)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const r=this._centerRay;if(null==r)return this._surfaceAltitudeAtCenter;const n=r.origin,s=u(j,r.origin,r.direction);return this._surfaceIntersector.resetWithRay(r,e.state.contentCamera),t.intersect(this._surfaceIntersector,null,n,s),this._surfaceIntersector.results.min.getIntersectionPoint(j)&&(this._surfaceAltitudeAtCenter=e.renderCoordsHelper.getAltitude(j)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const n=C(t,e,H);if(null==n)return null;const s=n.origin,i=u(j,n.origin,n.direction);return this._surfaceIntersector.resetWithRay(n,t),this.view.groundView.intersect(this._surfaceIntersector,null,s,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",h(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters?.forEach(e=>e.hide()),void this.removeHandles("debug");if(!this._debugCenters){this._debugCenters=new Map;const e=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(e,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(e,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(e,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(e,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(e,"green","Focus"))}for(const t of this._pois)this.addHandles(this._updatingHandles.add(()=>t.renderLocation,e=>this._debugCenters?.get(t)?.show(e,t.renderCoordsHelper.spatialReference),s),"debug")}get test(){}};e([a()],P.prototype,"centerOnContent",void 0),e([a()],P.prototype,"centerOnSurfaceFrequent",void 0),e([a()],P.prototype,"centerOnSurfaceInfrequent",void 0),e([a()],P.prototype,"cameraOnSurface",void 0),e([a()],P.prototype,"focus",void 0),e([a()],P.prototype,"renderPointOfView",void 0),e([a()],P.prototype,"surfaceOrigin",void 0),e([a()],P.prototype,"contentGeometryUpdates",void 0),e([a()],P.prototype,"surfaceGeometryUpdates",void 0),e([a({constructOnly:!0})],P.prototype,"view",void 0),e([a()],P.prototype,"updating",null),P=e([c("esri.views.3d.support.pointsOfInterest.PointsOfInterest")],P);const j=f(),H=l(),U={exclude:new Set([v])};export{P as PointsOfInterest};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{watch as r,sync as n,initial as s,when as i,on as o}from"../../../../core/reactiveUtils.js";import{property as a,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{add as u,exactEquals as d,copy as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{create as _}from"../../../../geometry/support/ray.js";import{debugFlags as l}from"../debugFlags.js";import{DebugPoint as m}from"../debugUtils.js";import{fromRenderAtEye as C}from"../geometryUtils/ray.js";import{CameraOnSurface as g}from"./CameraOnSurface.js";import{CenterOnSurface as y}from"./CenterOnSurface.js";import{ContentGeometryUpdates as O}from"./ContentGeometryUpdates.js";import{Focus as A}from"./Focus.js";import{StableSurfaceCenter as w}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{Intersector as I}from"../../webgl-engine/lib/Intersector.js";import{terrainId as v}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{PropertiesPool as b}from"../../../support/PropertiesPool.js";import{TaskPriority as R}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this.renderPointOfView=p(),this._pois=new Array,this._updatingHandles=new f,this._debugCenters=null,this._tmpRay=_(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._contentChangedSinceLastUpdate=!0,this._propertiesPool=new b({renderPointOfView:()=>p()},this),this._contentIntersector=new I(e.view.state.viewingMode),this._surfaceIntersector=new I(e.view.state.viewingMode),this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=0}initialize(){const{state:e,groundView:t,renderCoordsHelper:a,map:c}=this.view,u=()=>this._estimateSurfaceAltitudeAtCenter(),d=this.view.resourceController.scheduler,h=t?.elevationQueryCache,p={state:e,scheduler:d,surface:t,renderCoordsHelper:a};this._set("centerOnSurfaceInfrequent",new y({...p,task:R.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new y({...p,task:R.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new y({...p,task:R.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()})),this._set("cameraOnSurface",new g({...p,cache:h,task:R.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...p,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new O(this.view.allLayerViews,()=>this.view.graphicsView)),this._set("surfaceOrigin",new w({cache:h,view:this.view})),this._set("focus",new A({state:e,scheduler:d,surface:t,renderCoordsHelper:a,centerOnSurface:this.centerOnSurfaceFrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus),this.addHandles([r(()=>e.contentCamera,e=>this._cameraChanged(e),n),this._updatingHandles.add(()=>t.groundExtent,()=>this._updateCenterPointsOfInterest()),this._updatingHandles.add(()=>this.view.map?.ground?.navigationConstraint?.type,e=>{this._surfaceIntersector.options.backfacesTerrain="none"===e},s),i(()=>!t.updating&&this._contentChangedSinceLastUpdate,()=>{this._updateCenterPointsOfInterest(),this._contentChangedSinceLastUpdate=!1},n),o(()=>this.surfaceGeometryUpdates.events,"request-update",()=>this._updateCenterPointsOfInterest()),o(()=>this.contentGeometryUpdates.events,"request-update",()=>{this._contentChangedSinceLastUpdate=!0,this._updateCenterOnContent()}),this._updatingHandles.add(()=>l.SHOW_POI,e=>this._setDebug(e),s)]),this._cameraChanged(this.view.state.contentCamera);for(const r of this._pois)r.runTask()}destroy(){this._setDebug(!1),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this._pois.length=0,this.surfaceOrigin.destroy(),this._updatingHandles.destroy(),this._set("centerOnSurfaceInfrequent",null),this._set("centerOnSurfaceFrequent",null),this._set("centerOnContent",null),this._set("cameraOnSurface",null),this._set("surfaceGeometryUpdates",null),this._set("contentGeometryUpdates",null),this._set("surfaceOrigin",null),this._set("focus",null)}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some(e=>e.updating))||this._updatingHandles.updating}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,U,H)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(U):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){const{view:e}=this,{groundView:t}=e;if(!t)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const r=this._centerRay;if(null==r)return this._surfaceAltitudeAtCenter;const n=r.origin,s=u(U,r.origin,r.direction);return this._surfaceIntersector.resetWithRay(r,e.state.contentCamera),t.intersect(this._surfaceIntersector,null,n,s),this._surfaceIntersector.results.min.getIntersectionPoint(U)&&(this._surfaceAltitudeAtCenter=e.renderCoordsHelper.getAltitude(U)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const n=C(t,e,j);if(null==n)return null;const s=n.origin,i=u(U,n.origin,n.direction);return this._surfaceIntersector.resetWithRay(n,t),this.view.groundView.intersect(this._surfaceIntersector,null,s,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",h(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters?.forEach(e=>e.hide()),void this.removeHandles("debug");if(!this._debugCenters){this._debugCenters=new Map;const e=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(e,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(e,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(e,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(e,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(e,"green","Focus"))}for(const t of this._pois)this.addHandles(this._updatingHandles.add(()=>t.renderLocation,e=>this._debugCenters?.get(t)?.show(e,t.renderCoordsHelper.spatialReference),s),"debug")}get test(){}};e([a()],P.prototype,"centerOnContent",void 0),e([a()],P.prototype,"centerOnSurfaceFrequent",void 0),e([a()],P.prototype,"centerOnSurfaceInfrequent",void 0),e([a()],P.prototype,"cameraOnSurface",void 0),e([a()],P.prototype,"focus",void 0),e([a()],P.prototype,"renderPointOfView",void 0),e([a()],P.prototype,"surfaceOrigin",void 0),e([a()],P.prototype,"contentGeometryUpdates",void 0),e([a()],P.prototype,"surfaceGeometryUpdates",void 0),e([a({constructOnly:!0})],P.prototype,"view",void 0),e([a()],P.prototype,"updating",null),P=e([c("esri.views.3d.support.pointsOfInterest.PointsOfInterest")],P);const U=p(),j=_(),H={exclude:new Set([v])};export{P as PointsOfInterest};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function e(e){switch(e.type){case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case null:case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
2
+ function e(e){switch(e.type){case"annotation":case"building-scene":case"catalog":case"catalog-dynamic-group":case"catalog-footprint":case"csv":case"dimension":case"dimension-feature":case"feature":case"gaussian-splat":case"geo-rss":case"geojson":case"graphics":case"group":case"integrated-mesh":case"integrated-mesh-3dtiles":case"kml":case"knowledge-graph":case"link-chart":case"knowledge-graph-sublayer":case"line-of-sight":case"map-notes":case"ogc-feature":case"oriented-imagery":case"point-cloud":case"route":case"scene":case"stream":case"viewshed":case"voxel":case"subtype-group":case"unknown":case"unsupported":case"wfs":case"parquet":case"imagery":case"imagery-tile":return!1;case"base-dynamic":case"base-elevation":case"base-tile":case"bing-maps":case"elevation":case"map-image":case"media":case"open-street-map":case"tile":case"vector-tile":case"video":case"wcs":case"web-tile":case"wms":case"wmts":return!0;default:return e.type,!1}}export{e as isTerrainSurfaceLayer};
@@ -19,6 +19,8 @@ import type { PointCloudLayerView } from "../layers/PointCloudLayerView.js";
19
19
 
20
20
  /** @since 5.0 */
21
21
  export interface LayerView3DMap {
22
+ /** @since 5.1 */
23
+ annotation: never;
22
24
  /** @since 5.0 */
23
25
  "base-dynamic": never;
24
26
  /** @since 5.0 */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Logger.js";import{abortMaybe as r,disposeMaybe as a,releaseMaybe as s}from"../../../../../core/maybe.js";import{throwIfAborted as i,isAbortError as o}from"../../../../../core/promiseUtils.js";import{watch as l,syncAndInitial as n}from"../../../../../core/reactiveUtils.js";import{property as m,subclass as u}from"../../../../../core/accessorSupport/decorators.js";import{set as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{requestImage as c}from"../../../../../request/image.js";import{InternalRenderCategory as p}from"../../../webgl.js";import _ from"../../../webgl/RenderNode.js";import{a as d}from"../../../../../chunks/GlobalIllumination.glsl.js";import{a as b}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as f}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as g}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as w}from"./GlobalIlluminationTechniqueConfiguration.js";import{a as I}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as x}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as P,ColorAttachment1 as T,SizedPixelFormat as F}from"../../../../webgl/enums.js";import q from"../../../../webgl/Texture.js";import{TextureDescriptor as C}from"../../../../webgl/TextureDescriptor.js";const j=1;let y=class extends _{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=p.AMBIENT_ILLUMINATION,this._passParameters=new d,this._drawParameters=new b,this._drawParametersUpscale=new I,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new w,this._globalIllumination=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await import("./BlueNoise.js")).data;i(e),await this._loadBlueNoiseTexture(t,e),i(e)}catch(r){o(r)||t.getLogger(this).errorOnce("Failed to load blue noise texture:",r)}this.addHandles(l(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._resetAccumulatedFrames(),this._requestRender()},n))}destroy(){this._abortController=r(this._abortController),this._passParameters.noiseTexture=a(this._passParameters.noiseTexture),this._globalIllumination=s(this._globalIllumination)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||this._resetAccumulatedFrames()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._globalIllumination?.retain(),this._globalIllumination;const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),a=t?.getTexture(P),s=this._mode;if(!r||!a)return this._emptyOutput;if(0===s)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=i.hasEmission;const o=this.techniques.getCompiled(g,this._configuration),l=this.techniques.getCompiled(f),n=1===s,m=n?this._lowQualityResolutionScale:1,u=n?this.techniques.getCompiled(x):null;if(!o||!l||n&&!u)return this._requestRender(),this._emptyOutput;const c=this.renderingContext,{camera:_}=i;this._passParameters.normalTexture=r,this._passParameters.depthTexture=a,this._passParameters.projScale=1/_.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=m;const{fullWidth:d,fullHeight:b}=_,w=Math.max(1,Math.floor(d*m)),I=Math.max(1,Math.floor(b*m)),F=this.fboCache.acquire(w,I,"global illumination input").acquireColor(T,0);c.bindFramebuffer(F.fbo),c.setViewport(0,0,w,I),c.bindTechnique(o,i,this._passParameters,this._drawParameters),c.screen.draw();const q=F.obtainAttachment(T),C=Math.max(1,Math.round(w/j)),y=Math.max(1,Math.round(I/j)),G=this.fboCache.acquire(C,y,"global illumination blur horizontal");c.bindFramebuffer(G.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=q.attachment,h(this._drawParameters.blurSize,0,j/I),c.bindTechnique(l,i,this._passParameters,this._drawParameters),c.setViewport(0,0,C,y),c.screen.draw(),F.release();const A=n?"global illumination blur vertical":p.AMBIENT_ILLUMINATION,B=this.fboCache.acquire(C,y,A);c.bindFramebuffer(B.fbo),c.setViewport(0,0,C,y),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParameters.texture=G.getTexture(),this._drawParameters.weightTexture=q.attachment,h(this._drawParameters.blurSize,j/C,0),c.bindTechnique(l,i,this._passParameters,this._drawParameters),c.setViewport(0,0,C,y),c.screen.draw(),G.release(),B.attachColor(q,T),q.release();let M=B;return u&&(M=this.fboCache.acquire(d,b,p.AMBIENT_ILLUMINATION).acquireColor(T,0),c.bindFramebuffer(M.fbo),c.setViewport(0,0,d,b),c.setClearColor(1,1,1,0),c.clear(16384),this._drawParametersUpscale.colorTexture=B.getTexture(),this._drawParametersUpscale.weightTexture=B.getTexture(T),c.bindTechnique(u,i,this._passParameters,this._drawParametersUpscale),c.screen.draw(),B.release()),c.setViewport4fv(_.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._cacheGlobalIllumination(M),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),M}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_cacheGlobalIllumination(e){this._globalIllumination!==e&&(this._globalIllumination=s(this._globalIllumination),this._globalIllumination=e,this._globalIllumination.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,a=this.fboCache.acquire(t,r,p.AMBIENT_ILLUMINATION).acquireColor(T,0);return e.bindFramebuffer(a.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),a}async _loadBlueNoiseTexture(e,t){i(t);const r=await c(e,{signal:t});if(i(t),!r)return;const a=new C;a.internalFormat=F.RGBA8,a.wrapMode=10497,a.isImmutable=!0,this._passParameters.noiseTexture=new q(this.renderingContext,a,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_resetAccumulatedFrames(){this._passParameters.accumulatedFrames=0,this._globalIllumination=s(this._globalIllumination)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._resetAccumulatedFrames(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};e([m()],y.prototype,"consumes",void 0),e([m()],y.prototype,"produces",void 0),e([m()],y.prototype,"_abortController",void 0),y=e([u("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],y);export{y as GlobalIllumination,j as blurSizePixels};
2
+ import{__decorate as e}from"tslib";import{releaseMaybe as t}from"../../../../../core/maybe.js";import{watch as a,syncAndInitial as r}from"../../../../../core/reactiveUtils.js";import{property as s,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{set as l}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{InternalRenderCategory as o}from"../../../webgl.js";import n from"../../../webgl/RenderNode.js";import{a as m}from"../../../../../chunks/GlobalIllumination.glsl.js";import{a as u}from"../../../../../chunks/GlobalIlluminationBlur.glsl.js";import{GlobalIlluminationBlurTechnique as h}from"./GlobalIlluminationBlurTechnique.js";import{GlobalIlluminationTechnique as c}from"./GlobalIlluminationTechnique.js";import{GlobalIlluminationTechniqueConfiguration as _}from"./GlobalIlluminationTechniqueConfiguration.js";import{a as p}from"../../../../../chunks/GlobalIlluminationUpscale.glsl.js";import{GlobalIlluminationUpscaleTechnique as d}from"./GlobalIlluminationUpscaleTechnique.js";import{DepthStencilAttachment as b,ColorAttachment1 as f}from"../../../../webgl/enums.js";const g=1;let I=class extends n{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=o.AMBIENT_ILLUMINATION,this._passParameters=new m,this._drawParameters=new u,this._drawParametersUpscale=new p,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new _,this._globalIllumination=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles(a(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._resetAccumulatedFrames(),this._requestRender()},r))}destroy(){this._globalIllumination=t(this._globalIllumination)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||this._resetAccumulatedFrames()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._globalIllumination?.retain(),this._globalIllumination;const t=e.find(({name:e})=>"normals"===e),a=t?.getTexture(),r=t?.getTexture(b),s=this._mode;if(!a||!r)return this._emptyOutput;if(0===s)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const i=this.bindParameters;this._configuration.hasEmission=i.hasEmission;const n=this.techniques.getCompiled(c,this._configuration),m=this.techniques.getCompiled(h),u=1===s,_=u?this._lowQualityResolutionScale:1,p=u?this.techniques.getCompiled(d):null;if(!n||!m||u&&!p)return this._requestRender(),this._emptyOutput;const I=this.renderingContext,{camera:w}=i;this._passParameters.normalTexture=a,this._passParameters.depthTexture=r,this._passParameters.projScale=1/w.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=_;const{fullWidth:P,fullHeight:x}=w,T=Math.max(1,Math.floor(P*_)),q=Math.max(1,Math.floor(x*_)),F=this.fboCache.acquire(T,q,"global illumination input").acquireColor(f,0);I.bindFramebuffer(F.fbo),I.setViewport(0,0,T,q),I.bindTechnique(n,i,this._passParameters,this._drawParameters),I.screen.draw();const C=F.obtainAttachment(f),j=Math.max(1,Math.round(T/g)),G=Math.max(1,Math.round(q/g)),y=this.fboCache.acquire(j,G,"global illumination blur horizontal");I.bindFramebuffer(y.fbo),this._drawParameters.texture=F.getTexture(),this._drawParameters.weightTexture=C.attachment,l(this._drawParameters.blurSize,0,g/q),I.bindTechnique(m,i,this._passParameters,this._drawParameters),I.setViewport(0,0,j,G),I.screen.draw(),F.release();const A=u?"global illumination blur vertical":o.AMBIENT_ILLUMINATION,M=this.fboCache.acquire(j,G,A);I.bindFramebuffer(M.fbo),I.setViewport(0,0,j,G),I.setClearColor(1,1,1,0),I.clear(16384),this._drawParameters.texture=y.getTexture(),this._drawParameters.weightTexture=C.attachment,l(this._drawParameters.blurSize,g/j,0),I.bindTechnique(m,i,this._passParameters,this._drawParameters),I.setViewport(0,0,j,G),I.screen.draw(),y.release(),M.attachColor(C,f),C.release();let R=M;return p&&(R=this.fboCache.acquire(P,x,o.AMBIENT_ILLUMINATION).acquireColor(f,0),I.bindFramebuffer(R.fbo),I.setViewport(0,0,P,x),I.setClearColor(1,1,1,0),I.clear(16384),this._drawParametersUpscale.colorTexture=M.getTexture(),this._drawParametersUpscale.weightTexture=M.getTexture(f),I.bindTechnique(p,i,this._passParameters,this._drawParametersUpscale),I.screen.draw(),M.release()),I.setViewport4fv(w.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._cacheGlobalIllumination(R),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),R}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_cacheGlobalIllumination(e){this._globalIllumination!==e&&(this._globalIllumination=t(this._globalIllumination),this._globalIllumination=e,this._globalIllumination.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:a}=this.bindParameters.camera,r=this.fboCache.acquire(t,a,o.AMBIENT_ILLUMINATION).acquireColor(f,0);return e.bindFramebuffer(r.fbo),e.setViewport(0,0,t,a),e.clearBuffer(0,[0,0,0,1]),e.clearBuffer(1,[0,0,0,0]),r}get _canRender(){const e=this.bindParameters;return!(!e.reprojection.lastFrameColor||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_resetAccumulatedFrames(){this._passParameters.accumulatedFrames=0,this._globalIllumination=t(this._globalIllumination)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._resetAccumulatedFrames(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};e([s()],I.prototype,"consumes",void 0),e([s()],I.prototype,"produces",void 0),I=e([i("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],I);export{I as GlobalIllumination,g as blurSizePixels};