@arcgis/core 4.33.0-next.20250416 → 4.33.0-next.20250418

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 (352) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/analysis/DimensionAnalysis.js +1 -1
  4. package/analysis/DirectLineMeasurementAnalysis.js +1 -1
  5. package/analysis/LengthDimension.js +1 -1
  6. package/analysis/LineOfSightAnalysis.js +1 -1
  7. package/analysis/SliceAnalysis.js +1 -1
  8. package/analysis/Viewshed.js +1 -1
  9. package/analysis/ViewshedAnalysis.js +1 -1
  10. package/assets/components/assets/icon/browserJoin16.json +1 -0
  11. package/assets/components/assets/icon/browserJoin24.json +1 -0
  12. package/assets/components/assets/icon/browserJoin32.json +1 -0
  13. package/assets/components/assets/icon/browserPlus16.json +1 -0
  14. package/assets/components/assets/icon/browserPlus24.json +1 -0
  15. package/assets/components/assets/icon/browserPlus32.json +1 -0
  16. package/assets/components/assets/icon/check16.json +1 -1
  17. package/assets/components/assets/icon/check24.json +1 -1
  18. package/assets/components/assets/icon/check32.json +1 -1
  19. package/assets/components/assets/icon/classroomGis16.json +1 -0
  20. package/assets/components/assets/icon/classroomGis24.json +1 -0
  21. package/assets/components/assets/icon/classroomGis32.json +1 -0
  22. package/assets/components/assets/icon/documentLearning16.json +1 -0
  23. package/assets/components/assets/icon/documentLearning24.json +1 -0
  24. package/assets/components/assets/icon/documentLearning32.json +1 -0
  25. package/assets/components/assets/icon/doubleFloatSet16.json +1 -0
  26. package/assets/components/assets/icon/doubleFloatSet24.json +1 -0
  27. package/assets/components/assets/icon/doubleFloatSet32.json +1 -0
  28. package/assets/components/assets/icon/eLearningGis16.json +1 -0
  29. package/assets/components/assets/icon/eLearningGis24.json +1 -0
  30. package/assets/components/assets/icon/eLearningGis32.json +1 -0
  31. package/assets/components/assets/icon/language216.json +1 -0
  32. package/assets/components/assets/icon/language224.json +1 -0
  33. package/assets/components/assets/icon/language232.json +1 -0
  34. package/assets/components/assets/icon/layerSet16.json +1 -0
  35. package/assets/components/assets/icon/layerSet24.json +1 -0
  36. package/assets/components/assets/icon/layerSet32.json +1 -0
  37. package/assets/components/assets/icon/learningGisWorkflow16.json +1 -0
  38. package/assets/components/assets/icon/learningGisWorkflow24.json +1 -0
  39. package/assets/components/assets/icon/learningGisWorkflow32.json +1 -0
  40. package/assets/components/assets/icon/learningSteps16.json +1 -0
  41. package/assets/components/assets/icon/learningSteps24.json +1 -0
  42. package/assets/components/assets/icon/learningSteps32.json +1 -0
  43. package/assets/components/assets/icon/learningWebCourse16.json +1 -0
  44. package/assets/components/assets/icon/learningWebCourse24.json +1 -0
  45. package/assets/components/assets/icon/learningWebCourse32.json +1 -0
  46. package/assets/components/assets/icon/mapInformation16.json +1 -0
  47. package/assets/components/assets/icon/mapInformation24.json +1 -0
  48. package/assets/components/assets/icon/mapInformation32.json +1 -0
  49. package/assets/components/assets/icon/mooc16.json +1 -0
  50. package/assets/components/assets/icon/mooc24.json +1 -0
  51. package/assets/components/assets/icon/mooc32.json +1 -0
  52. package/assets/components/assets/icon/multipleVariablesSet16.json +1 -0
  53. package/assets/components/assets/icon/multipleVariablesSet24.json +1 -0
  54. package/assets/components/assets/icon/multipleVariablesSet32.json +1 -0
  55. package/assets/components/assets/icon/parameters16.json +1 -0
  56. package/assets/components/assets/icon/parameters24.json +1 -0
  57. package/assets/components/assets/icon/parameters32.json +1 -0
  58. package/assets/components/assets/icon/parametersGear16.json +1 -0
  59. package/assets/components/assets/icon/parametersGear24.json +1 -0
  60. package/assets/components/assets/icon/parametersGear32.json +1 -0
  61. package/assets/components/assets/icon/parametersPlus16.json +1 -0
  62. package/assets/components/assets/icon/parametersPlus24.json +1 -0
  63. package/assets/components/assets/icon/parametersPlus32.json +1 -0
  64. package/assets/components/assets/icon/storymapExperience16.json +1 -0
  65. package/assets/components/assets/icon/storymapExperience24.json +1 -0
  66. package/assets/components/assets/icon/storymapExperience32.json +1 -0
  67. package/assets/components/assets/icon/stringSet16.json +1 -0
  68. package/assets/components/assets/icon/stringSet24.json +1 -0
  69. package/assets/components/assets/icon/stringSet32.json +1 -0
  70. package/assets/components/assets/icon/tableSet16.json +1 -0
  71. package/assets/components/assets/icon/tableSet24.json +1 -0
  72. package/assets/components/assets/icon/tableSet32.json +1 -0
  73. package/assets/components/assets/icon/variablePlus16.json +1 -0
  74. package/assets/components/assets/icon/variablePlus24.json +1 -0
  75. package/assets/components/assets/icon/variablePlus32.json +1 -0
  76. package/assets/components/assets/icon/videoLearning16.json +1 -0
  77. package/assets/components/assets/icon/videoLearning24.json +1 -0
  78. package/assets/components/assets/icon/videoLearning32.json +1 -0
  79. package/assets/esri/core/workers/RemoteClient.js +1 -1
  80. package/assets/esri/core/workers/chunks/02176f84d6d57f1bc1c8.js +2 -0
  81. package/assets/esri/core/workers/chunks/{75e01c6404cbd51daabc.js.LICENSE.txt → 02176f84d6d57f1bc1c8.js.LICENSE.txt} +1 -1
  82. package/assets/esri/core/workers/chunks/05cba30c0d3855de7a65.js +1 -0
  83. package/assets/esri/core/workers/chunks/{7ef9bcd58af499a14a08.js → 089a19381b66cd074425.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{984c5047ab1fa632ca09.js → 0a7cba60a5286ba621d4.js} +1 -1
  85. package/assets/esri/core/workers/chunks/0be7a0f4c4f4f91d1957.js +1 -0
  86. package/assets/esri/core/workers/chunks/0c6f2808c57ff820bfdd.js +2 -0
  87. package/assets/esri/core/workers/chunks/{baed733a29aa65efc2a0.js.LICENSE.txt → 0c6f2808c57ff820bfdd.js.LICENSE.txt} +7 -1
  88. package/assets/esri/core/workers/chunks/103c78c8bfdb56227bc0.js +1 -0
  89. package/assets/esri/core/workers/chunks/184d7c8ea818bec5c462.js +1 -0
  90. package/assets/esri/core/workers/chunks/{4523ba4a3c8987abca56.js → 1c75f7e4d2e9c8e377e7.js} +1 -1
  91. package/assets/esri/core/workers/chunks/1e1c3243ac82c969bb1f.js +1 -0
  92. package/assets/esri/core/workers/chunks/22f604726529ee6f8c25.js +1 -0
  93. package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +1 -0
  94. package/assets/esri/core/workers/chunks/25142d431dd1e5e82234.js +1 -0
  95. package/assets/esri/core/workers/chunks/25e19bd171eeb5634a4f.js +1 -0
  96. package/assets/esri/core/workers/chunks/26924d2f03b8a1b7a9b2.js +1 -0
  97. package/assets/esri/core/workers/chunks/27482132abb939a1cdb7.js +1 -0
  98. package/assets/esri/core/workers/chunks/2ae1dbdac9f24f4a3c84.js +1 -0
  99. package/assets/esri/core/workers/chunks/31b2ceed80796c7f6c03.js +1 -0
  100. package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +1 -0
  101. package/assets/esri/core/workers/chunks/3521a53f826f0ce6ac33.js +1 -0
  102. package/assets/esri/core/workers/chunks/3697ec74522cc5059098.js +1 -0
  103. package/assets/esri/core/workers/chunks/{60472225a228e499b1a2.js → 38557792ff9516fc991b.js} +1 -1
  104. package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +1 -0
  105. package/assets/esri/core/workers/chunks/38f9ede26098eb03ca2d.js +2 -0
  106. package/assets/esri/core/workers/chunks/{239821543abbd63c5787.js.LICENSE.txt → 38f9ede26098eb03ca2d.js.LICENSE.txt} +3 -3
  107. package/assets/esri/core/workers/chunks/3f3a2c6ce48d832bf2f1.js +1 -0
  108. package/assets/esri/core/workers/chunks/{82493f51a2182f76dd2f.js → 459e3e507e8ea3e7e6ab.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{f4111bb5e5a4910b684a.js → 4867a515ddbdab97cc61.js} +1 -1
  110. package/assets/esri/core/workers/chunks/51b5dfc7085272d26b89.js +1 -0
  111. package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +1 -0
  112. package/assets/esri/core/workers/chunks/53eaad20c4f55dae21e0.js +1 -0
  113. package/assets/esri/core/workers/chunks/55eff05354069f34bb1d.js +1 -0
  114. package/assets/esri/core/workers/chunks/569e9ec636199d1f1744.js +1 -0
  115. package/assets/esri/core/workers/chunks/598fade09fa4da759ac2.js +1 -0
  116. package/assets/esri/core/workers/chunks/5ac3096139e3eafd0e1d.js +1 -0
  117. package/assets/esri/core/workers/chunks/{93d06a1a0b700ddb3807.js → 5bdd5ae2d2f23ef6b331.js} +1 -1
  118. package/assets/esri/core/workers/chunks/5db336767959507c07e5.js +2 -0
  119. package/assets/esri/core/workers/chunks/{c03bffa13841e4f80379.js.LICENSE.txt → 5db336767959507c07e5.js.LICENSE.txt} +2 -2
  120. package/assets/esri/core/workers/chunks/5e5225623977e61fd0ef.js +1 -0
  121. package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +1 -0
  122. package/assets/esri/core/workers/chunks/64640051f1fd787a3362.js +1 -0
  123. package/assets/esri/core/workers/chunks/6d230c55cde66ee905b3.js +1 -0
  124. package/assets/esri/core/workers/chunks/{c1bd47cde53918f454ca.js → 729407e372c8353cf871.js} +1 -1
  125. package/assets/esri/core/workers/chunks/{29283c19e1ccdc6cfbde.js → 736a11e64e5f03e3936b.js} +34 -33
  126. package/assets/esri/core/workers/chunks/769b66cca8347f0f84db.js +1 -0
  127. package/assets/esri/core/workers/chunks/7c4746f60332620f75c5.js +1 -0
  128. package/assets/esri/core/workers/chunks/{b6dd25bccb9f6e19c18e.js → 7c7ff11246479382974c.js} +1 -1
  129. package/assets/esri/core/workers/chunks/7fce62ef3f0b011e0d35.js +1 -0
  130. package/assets/esri/core/workers/chunks/814d72abbfdd4552e4ec.js +2 -0
  131. package/assets/esri/core/workers/chunks/{373782e9f5d61616fde4.js.LICENSE.txt → 814d72abbfdd4552e4ec.js.LICENSE.txt} +1 -6
  132. package/assets/esri/core/workers/chunks/{07f206719763173faa8d.js → 873327fc41edd3830afa.js} +4 -4
  133. package/assets/esri/core/workers/chunks/8ea182c2fc20dba79ef2.js +1 -0
  134. package/assets/esri/core/workers/chunks/{d58fae2fc9d148e015ae.js → 90dc783a617ff053e862.js} +1 -1
  135. package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +1 -0
  136. package/assets/esri/core/workers/chunks/93f792f5b94f3745b57d.js +2 -0
  137. package/assets/esri/core/workers/chunks/{3845e1d47bb51c06682e.js.LICENSE.txt → 93f792f5b94f3745b57d.js.LICENSE.txt} +1 -1
  138. package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +1 -0
  139. package/assets/esri/core/workers/chunks/a276980c06d5d311a37e.js +1 -0
  140. package/assets/esri/core/workers/chunks/a600194cfe26aedc21dd.js +1 -0
  141. package/assets/esri/core/workers/chunks/{a4239e301728d594afa5.js → a6b14665a46c2af5ac11.js} +1 -1
  142. package/assets/esri/core/workers/chunks/ae13bd77a25ce8b54631.js +1 -0
  143. package/assets/esri/core/workers/chunks/ae156b99e60a2bf940e4.js +1 -0
  144. package/assets/esri/core/workers/chunks/b2f1d1721a9dd88a1adf.js +1 -0
  145. package/assets/esri/core/workers/chunks/{4275dcec730a11173661.js → b7fc99ec15e2c86a6425.js} +1 -1
  146. package/assets/esri/core/workers/chunks/b8248939373e25a8d6db.js +1 -0
  147. package/assets/esri/core/workers/chunks/bbaadce582df7e20397b.js +1 -0
  148. package/assets/esri/core/workers/chunks/{18404cd87d29b2bdc7bf.js → c4dba6cf17aece714d22.js} +1 -1
  149. package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js +2 -0
  150. package/assets/esri/core/workers/chunks/{e4d522ade82192f32d54.js.LICENSE.txt → c5d786166a5609b85276.js.LICENSE.txt} +1 -1
  151. package/assets/esri/core/workers/chunks/{c589d32f8efcca6bf712.js → c6b08fdc0421258efcf5.js} +1 -1
  152. package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +1 -0
  153. package/assets/esri/core/workers/chunks/{eb61e484f090fca28937.js → cb2be1a81bdd3443f758.js} +1 -1
  154. package/assets/esri/core/workers/chunks/ccc50f28f217e50cc2c3.js +1 -0
  155. package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +1 -0
  156. package/assets/esri/core/workers/chunks/{df1225a3e751a662c182.js → d04efa51da9b4eb3a8a7.js} +1 -1
  157. package/assets/esri/core/workers/chunks/d28e2c9bdf514236b011.js +1 -0
  158. package/assets/esri/core/workers/chunks/d434d44916d32d4b10d5.js +1 -0
  159. package/assets/esri/core/workers/chunks/{50c1753ee3dc0d28ffd7.js → d696abbb1b13ac1a689b.js} +1 -1
  160. package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js +2 -0
  161. package/assets/esri/core/workers/chunks/dbaa4b8d37aab40d7bd1.js.LICENSE.txt +3 -0
  162. package/assets/esri/core/workers/chunks/{4a15308b54734247f38e.js → dd8e72d6784a8ebc115d.js} +1 -1
  163. package/assets/esri/core/workers/chunks/de0784474d2e9e504a91.js +1 -0
  164. package/assets/esri/core/workers/chunks/{aca3ccb9599bcc444617.js → e1472af8f5d64c057d04.js} +1 -1
  165. package/assets/esri/core/workers/chunks/e27fa1e84f16b7f19a90.js +1 -0
  166. package/assets/esri/core/workers/chunks/e2cd6038d9c7167b128e.js +1 -0
  167. package/assets/esri/core/workers/chunks/{0252d853419adc203f04.js → ef6e805c49e1afdf966b.js} +1 -1
  168. package/assets/esri/core/workers/chunks/f2bc75a718a10065011d.js +1 -0
  169. package/assets/esri/core/workers/chunks/{1263391920fbb8926ced.js → f34ce3c37a385b341631.js} +1 -1
  170. package/assets/esri/core/workers/chunks/{e3d25d027885eb1a415f.js → f458a40e1f8fce3ad23c.js} +1 -1
  171. package/assets/esri/core/workers/chunks/f65b720b750aebca1bcd.js +1 -0
  172. package/assets/esri/core/workers/chunks/fdcbd28f38bc485ac5e3.js +1 -0
  173. package/assets/esri/themes/dark/main.css +1 -1
  174. package/assets/esri/themes/light/main.css +1 -1
  175. package/assets/esri/themes/light/view.css +1 -1
  176. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  178. package/chunks/BloomComposition.glsl.js +25 -19
  179. package/chunks/ChapmanAtmosphere.glsl.js +1 -1
  180. package/chunks/ComponentShader.glsl.js +14 -14
  181. package/chunks/DefaultMaterial.glsl.js +6 -6
  182. package/chunks/Fog.glsl.js +3 -3
  183. package/chunks/Haze.glsl.js +1 -1
  184. package/chunks/OITBlend.glsl.js +1 -0
  185. package/chunks/Path.glsl.js +3 -3
  186. package/chunks/RealisticTree.glsl.js +5 -5
  187. package/chunks/SSAO.glsl.js +5 -4
  188. package/chunks/Viewshed.glsl.js +1 -1
  189. package/core/promiseUtils.d.ts +1 -0
  190. package/core/urlUtils.d.ts +4 -0
  191. package/identity/IdentityModal.js +1 -1
  192. package/interfaces.d.ts +335 -42
  193. package/intl/date.js +1 -1
  194. package/intl/messages.js +1 -1
  195. package/intl/number.js +1 -1
  196. package/layers/FeatureLayer.js +1 -1
  197. package/layers/ParquetLayer.js +1 -1
  198. package/layers/VideoLayer.js +1 -1
  199. package/layers/ViewshedLayer.js +1 -1
  200. package/layers/graphics/sources/ParquetSource.js +1 -1
  201. package/layers/save/featureLayerUtils.js +1 -1
  202. package/layers/support/ParquetEncodingBase.js +5 -0
  203. package/layers/support/ParquetEncodingLocation.js +5 -0
  204. package/layers/support/ParquetEncodingWkb.js +5 -0
  205. package/layers/support/domainUtils.js +1 -1
  206. package/layers/support/fieldUtils.js +1 -1
  207. package/layers/support/labelingInfo.js +1 -1
  208. package/layers/support/layerUtils.js +1 -1
  209. package/layers/support/parquetUtils.js +5 -0
  210. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  211. package/layers/video/VideoController.js +1 -1
  212. package/layers/video/videoUtils.js +1 -1
  213. package/libs/parquet/parquet.js +1 -1
  214. package/networks/UtilityNetwork.js +1 -1
  215. package/package.json +2 -2
  216. package/portal/PortalItem.js +1 -1
  217. package/portal/PortalUser.js +1 -1
  218. package/portal/support/portalItemUtils.js +1 -1
  219. package/rest/featureService/FeatureService.js +1 -1
  220. package/rest/networks/support/NetworkElement.js +1 -1
  221. package/rest/networks/support/TelecomNetworkElement.js +5 -0
  222. package/rest/networks/trace.js +1 -1
  223. package/rest/print.js +1 -1
  224. package/support/TablesMixin.js +1 -1
  225. package/support/modeUtils.js +5 -0
  226. package/support/revision.js +1 -1
  227. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  228. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  229. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  230. package/views/2d/layers/VideoLayerView2D.js +1 -1
  231. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  232. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  233. package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +1 -1
  234. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  235. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  236. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  237. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  238. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  239. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  240. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  241. package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
  242. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  243. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
  244. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  245. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  246. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
  247. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  248. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  249. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +1 -1
  250. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
  251. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  252. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
  253. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  254. package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
  255. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  256. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  257. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  258. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  259. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  260. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +20 -2
  261. package/views/ToolViewManager.js +1 -1
  262. package/views/analysis/analysisViewUtils.js +1 -1
  263. package/views/draw/support/HighlightHelper.js +1 -1
  264. package/views/interactive/InteractiveToolBase.js +1 -1
  265. package/views/interactive/Tooltip.js +1 -1
  266. package/views/interactive/interactiveToolUtils.js +1 -1
  267. package/views/interactive/keybindings.js +1 -1
  268. package/views/ui/UI.js +1 -1
  269. package/webdoc/support/saveUtils.js +1 -1
  270. package/webdoc/support/webdocSaveUtils.js +1 -1
  271. package/widgets/Editor.js +1 -1
  272. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  273. package/widgets/Feature/FeatureMedia.js +1 -1
  274. package/widgets/Feature/support/featureUtils.js +1 -1
  275. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  276. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  277. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  278. package/widgets/FeatureTable.js +1 -1
  279. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  280. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  281. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  282. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  283. package/widgets/OrientedImageryViewer.js +1 -1
  284. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  285. package/widgets/Slider/SliderViewModel.js +1 -1
  286. package/widgets/Slider.js +1 -1
  287. package/widgets/TimeSlider.js +1 -1
  288. package/widgets/support/AnalysisViewModel.js +1 -1
  289. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  290. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  291. package/widgets/support/widget.js +1 -1
  292. package/assets/esri/core/workers/chunks/0297e55a49ca0d1231ef.js +0 -1
  293. package/assets/esri/core/workers/chunks/04008648c59031bca8ea.js +0 -1
  294. package/assets/esri/core/workers/chunks/067dda58592fbf4fb812.js +0 -1
  295. package/assets/esri/core/workers/chunks/0b4e63e705db09dbe171.js +0 -1
  296. package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +0 -1
  297. package/assets/esri/core/workers/chunks/1b87fa15470cce26feea.js +0 -1
  298. package/assets/esri/core/workers/chunks/239821543abbd63c5787.js +0 -2
  299. package/assets/esri/core/workers/chunks/272a309760dacb13dee3.js +0 -1
  300. package/assets/esri/core/workers/chunks/2791f1f2791087d0217f.js +0 -1
  301. package/assets/esri/core/workers/chunks/35dccd3883d2e466c42e.js +0 -1
  302. package/assets/esri/core/workers/chunks/364860a42edc0c3b8d5b.js +0 -1
  303. package/assets/esri/core/workers/chunks/373782e9f5d61616fde4.js +0 -2
  304. package/assets/esri/core/workers/chunks/37e49d1a1407c193dcd0.js +0 -1
  305. package/assets/esri/core/workers/chunks/37e4f588a6896f98bce3.js +0 -1
  306. package/assets/esri/core/workers/chunks/3845e1d47bb51c06682e.js +0 -2
  307. package/assets/esri/core/workers/chunks/3f6dc811b5d515c2725c.js +0 -1
  308. package/assets/esri/core/workers/chunks/42aab2a336ee22fd9055.js +0 -1
  309. package/assets/esri/core/workers/chunks/4ba34124054752b363c0.js +0 -1
  310. package/assets/esri/core/workers/chunks/4baef5262ce401bf81bb.js +0 -1
  311. package/assets/esri/core/workers/chunks/593396b4c210da77a131.js +0 -1
  312. package/assets/esri/core/workers/chunks/5b32c2a1b276352593dc.js +0 -1
  313. package/assets/esri/core/workers/chunks/5df4e73905c0ae75e37c.js +0 -1
  314. package/assets/esri/core/workers/chunks/5fb9bb3ac2f60dbd59c4.js +0 -1
  315. package/assets/esri/core/workers/chunks/66e90f7d473d1f688254.js +0 -1
  316. package/assets/esri/core/workers/chunks/68d7babbe7e0d934e056.js +0 -1
  317. package/assets/esri/core/workers/chunks/6e6b60779c11efc128af.js +0 -1
  318. package/assets/esri/core/workers/chunks/759c12b0715279e3c0f6.js +0 -1
  319. package/assets/esri/core/workers/chunks/75e01c6404cbd51daabc.js +0 -2
  320. package/assets/esri/core/workers/chunks/77660e18ea793ae85f83.js +0 -1
  321. package/assets/esri/core/workers/chunks/7f36cffc6ed984b7e467.js +0 -1
  322. package/assets/esri/core/workers/chunks/7f86c9ec45f4fae1fb49.js +0 -1
  323. package/assets/esri/core/workers/chunks/879d672d12f9ef2e1b50.js +0 -1
  324. package/assets/esri/core/workers/chunks/90442f47c9f31f26b453.js +0 -1
  325. package/assets/esri/core/workers/chunks/91439b59260b0fb04be9.js +0 -1
  326. package/assets/esri/core/workers/chunks/96978d039f183565bffa.js +0 -1
  327. package/assets/esri/core/workers/chunks/999a4f7ca581f28cc1c4.js +0 -1
  328. package/assets/esri/core/workers/chunks/af41dcc8006cd0f451c2.js +0 -1
  329. package/assets/esri/core/workers/chunks/af9fda47d02c51a2c7da.js +0 -1
  330. package/assets/esri/core/workers/chunks/baed733a29aa65efc2a0.js +0 -2
  331. package/assets/esri/core/workers/chunks/c03bffa13841e4f80379.js +0 -2
  332. package/assets/esri/core/workers/chunks/c7ab674764312d65348f.js +0 -1
  333. package/assets/esri/core/workers/chunks/ca0572fe5614005acceb.js +0 -1
  334. package/assets/esri/core/workers/chunks/d2c7067bb6654c0e2793.js +0 -1
  335. package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +0 -1
  336. package/assets/esri/core/workers/chunks/d89f105b8a0b13dd8e5f.js +0 -1
  337. package/assets/esri/core/workers/chunks/e13caf9691f556071e31.js +0 -1
  338. package/assets/esri/core/workers/chunks/e14449f07ed3386f4f2b.js +0 -1
  339. package/assets/esri/core/workers/chunks/e31bb256921807464715.js +0 -1
  340. package/assets/esri/core/workers/chunks/e4d522ade82192f32d54.js +0 -2
  341. package/assets/esri/core/workers/chunks/e5713b757f770a138b8c.js +0 -1
  342. package/assets/esri/core/workers/chunks/e6544e966f14fb410157.js +0 -1
  343. package/assets/esri/core/workers/chunks/e792603b7cc3ddd133f3.js +0 -1
  344. package/assets/esri/core/workers/chunks/e7cb4003c45e42b48ea6.js +0 -1
  345. package/assets/esri/core/workers/chunks/eb011e8b14db37ddb110.js +0 -1
  346. package/assets/esri/core/workers/chunks/efb0f3ec2344adcb24f3.js +0 -1
  347. package/assets/esri/core/workers/chunks/f0c864425f000ab87a7b.js +0 -1
  348. package/assets/esri/core/workers/chunks/f7d33d18bf1bd4db9df8.js +0 -1
  349. package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +0 -1
  350. package/assets/esri/core/workers/chunks/fa2d836d4a844b26b84e.js +0 -1
  351. package/layers/support/parquetLayerUtils.js +0 -5
  352. package/support/themeUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{unitRGBAFromColor as i}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as s,lerp as a}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as h,destroyMaybe as o,releaseMaybe as d}from"../../../../core/maybe.js";import{throwIfAborted as l}from"../../../../core/promiseUtils.js";import{watch as _,syncAndInitial as u,initial as p,sync as m}from"../../../../core/reactiveUtils.js";import{signal as c}from"../../../../core/signal.js";import{Milliseconds as g}from"../../../../core/time.js";import{property as f}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as b}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as A,invert as T,multiply as E}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as P,create as R}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{s as S}from"../../../../chunks/vec42.js";import{ZEROS as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{fromValues as C,ZEROS as w}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as O}from"../../../../geometry/support/Indices.js";import{RenderCategory as N,InternalRenderCategory as D}from"../../webgl.js";import{debugFlags as y}from"../../support/debugFlags.js";import{ColorFormat as x,DepthRenderbuffer16f as H}from"../../webgl/formats.js";import{FBOCache as M,defaultWebGLFBO as L}from"../core/FBOCache.js";import{RenderPassManager as F}from"../core/renderPasses/RenderPassManager.js";import{ShaderOutput as U,isColorOrColorEmission as v}from"../core/shaderLibrary/ShaderOutput.js";import{HUDRenderStyle as G}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{distanceFadeEnd as q}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as V}from"../effects/RenderNodes.js";import{RenderPluginManager as j}from"../effects/RenderPluginManager.js";import{Blit as B}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as Q,renderHighlightBuffer as W}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as z}from"./AnimationTimer.js";import{AnimationTimeStep as Y}from"./AnimationTimeStep.js";import{RenderRequestType as X}from"./basicInterfaces.js";import{BoundingInfo as K}from"./BoundingInfo.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as Z}from"./depthRangeUtils.js";import{hudFragmentOpacityParameters as $}from"./hudFragmentOpacityParameters.js";import{MainFramebuffer as ee}from"./MainFramebuffer.js";import{RenderOccludedFlag as te}from"./Material.js";import{OITPass as re}from"./OITPass.js";import{RenderContext as ie,defaultRenderOccludedMask as se}from"./RenderContext.js";import{RendererBase as ae}from"./RendererBase.js";import{RendererTarget as ne}from"./rendererUtils.js";import{setupFeatureDefaults as he,RenderFeature as oe}from"./RenderFeature.js";import{RenderPluginInput as de}from"./RenderPluginInput.js";import{RenderSlot as le}from"./RenderSlot.js";import{ShadowAccumulator as _e}from"./ShadowAccumulator.js";import{ShadowMap as ue,SnapshotSlot as pe}from"./ShadowMap.js";import me from"./SliceHelper.js";import{Transparency as ce}from"./edgeRendering/interfaces.js";import{MergedRenderer as ge}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as fe}from"../parts/renderUtils.js";import{RendererPerformanceInfo as be,PerformanceCategory as Ae}from"../statistics/RendererPerformanceInfo.js";import{RenderState as Te}from"../../../support/RenderState.js";import{DepthStencilAttachment as Ee,PixelFormat as Pe,PixelType as Re,FramebufferBit as Se,ColorAttachment1 as Ie,ColorAttachment2 as Ce}from"../../../webgl/enums.js";let we=class extends ae{constructor(e,t,r,s,a,n){super({stage:e}),this._techniques=r,this._rctx=s,this._compositingHelper=a,this._requestRender=n,this._pluginsHas={hudElements:!1,water:!1},this.renderPassManager=new F,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=C(0,0,0,1),this._sliceHelper=new me,this._blit=null,this._oitblend=null,this._state=c(Te.IDLE),this._highQualityTransparencyEnabled=!0,this._ssrEnabled=!1,this._hasAnimations=!1,this._animationTimestep=new Y,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=c(0),this._lastFrameTime=g(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new de,this._releaseNormals=e=>{e.some((({name:e})=>"normals"===e))&&this._pluginInput.release("normals")},this._debugNeedsDepth=!1,this.fboCache=new M(s),this._renderStateFeatures=c(he(!has("disable-feature:high-quality-idle"),e.view.qualityProfile)),this._framebuffer=new ee(this.fboCache),this.performanceInfo=new be(this._rctx),this._shadowMap=new ue(this.fboCache,e.viewingMode),this._shadowAccumulator=new _e(this.fboCache,r,e,(e=>{const t=this.shadowsEnabled;this._shadowMap.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),this._shadowMap.enabled=t}),((t,r,i)=>{const s=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,r,i,!0,s),this._renderShadowCascades(U.Shadow,t.shadowMap),t.shadowMap.finish(),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)}),n),this._renderContext=new ie(this._rctx,this._shadowMap,r),this._nodes=new V(this._renderContext),this._plugins=new j({renderContext:this._renderContext,techniques:r,materials:t,requestRender:n,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this._plugins.add(this.renderPassManager),this.addHandles([_((()=>e.view.state.camera),(()=>n()),u),_((()=>y.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES),(e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(ce.TRANSPARENT):()=>{},n()}),p),_((()=>e.view.environment.background?.color),(e=>{const t=e?i(e):w;S(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),n()}),u),_((()=>e.view.state.camera.relativeElevation),(e=>this._inGlobeView=(e??1/0)>=q),u),_((()=>this._bindParameters.clouds.fadeFactor),(()=>this._bindParameters.fadeLighting()),m),_((()=>this._bindParameters.clouds.data?.state),(()=>n()),m),_((()=>e.view.state.highlights),(e=>{this._bindParameters.highlights=e,n()}),p)])}destroy(){this._gpuTimerHandle=n(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowMap.dispose(),this._shadowAccumulator.dispose(),this._loadEdgeViewTask=h(this._loadEdgeViewTask),this._edgeView=o(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.fboCache.destroy(),this._plugins.destroy(),this._blit=null,this._oitblend=null,K.prune(),ge.prune(),O()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _framebufferSize(){return this._framebuffer.size}updateRenderFeatures(e=null,t=!has("disable-feature:high-quality-idle")){this._renderStateFeatures.value=he(t,e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,r){this._renderStateFeatures.mutate((i=>i.set(t,e,r))),this._requestRender()}get _highQualityTransparency(){return this._highQualityTransparencyEnabled||this.isFeatureEnabled(oe.HighQualityTransparency)}get hasReflections(){return this._pluginsHas.water&&(this._ssrEnabled||this.isFeatureEnabled(oe.WaterReflection))}get _hasHighlights(){return this._plugins.produces(U.Highlight,le.OPAQUE_MATERIAL,le.TRANSPARENT_MATERIAL,le.DRAPED_MATERIAL,le.HUD_MATERIAL,le.LABEL_MATERIAL)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(U.Highlight,le.HUD_MATERIAL,le.LABEL_MATERIAL)}get hasSSAO(){return(this.stage.view.qualitySettings.ambientOcclusion||this.isFeatureEnabled(oe.SSAO))&&!this._inGlobeView}get hasSMAA(){return this.stage.view.qualitySettings.antialiasingEnabled||this.isFeatureEnabled(oe.Antialiasing)}get fullResolutionAtmosphere(){return this.stage.view.qualitySettings.highResolutionAtmosphere||this.isFeatureEnabled(oe.HighResolutionAtmosphere)}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=d(this._bindParameters.ssr.lastFrameColor),this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth),this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth)}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._disposeBindBuffers()}_disposeBindBuffers(){this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.depth=d(this._bindParameters.depth),this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility)}get updating(){return null!=this._edgeView&&this._edgeView.updating||this._shadowAccumulator.running||this._plugins.updating||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=r((async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");l(e);const r=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ge(this.stage.view.resourceController)});return this.addHandles(_((()=>r.updating),(()=>this._requestRender()),m)),this._requestRender(),this._edgeViewCallbacks.forEach((e=>e(r))),this._edgeViewCallbacks.length=0,r}))),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&A(this._bindParameters.ssr.reprojectionMatrix,P)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:t,_bindParameters:r}=this;if(void 0!==e.qualitySettings?.reflections&&this._ssrEnabled!==e.qualitySettings.reflections&&(this._ssrEnabled=e.qualitySettings.reflections,this._requestRender()),void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&t.maxCascades!==e.shadowMapMaxCascades&&(t.maxCascades=e.shadowMapMaxCascades,this._requestRender()),null!=e.environment){null!=e.environment.weather&&(this._bindParameters.weather=e.environment.weather,this._bindParameters.weatherVisible=!!e.weatherVisible);const t="virtual"!==e.environment.lighting.type;r.enableFillLights!==t&&(r.enableFillLights=t,this._requestRender())}void 0!==e.highQualityTransparency&&this._highQualityTransparencyEnabled!==e.highQualityTransparency&&(this._highQualityTransparencyEnabled=e.highQualityTransparency,this._requestRender()),void 0!==e.shadowCast&&this._shadowAccumulator.setOptions(e.shadowCast)}set slicePlane(e){this._sliceHelper.plane!==e&&(this._sliceHelper.plane=e,this._requestRender())}get plugins(){return this._plugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this._highQualityTransparency&&this._hasOITSupport}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}updateHasFlags(){const has=this._pluginsHas;has.hudElements=this._plugins.produces(U.Color,...Me),has.water=this._plugins.produces(U.Normal,le.DRAPED_WATER),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new z(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const r=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?n(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,r=ne.Default,i=!1){try{return this._isRendering=!0,this._render(e,t,r,i)}catch(s){console.error(`Exception during rendering: ${s}`)}finally{this._isRendering=!1}return new fe(this._pluginInput.get(N.FINAL),null)}_updateHUDOccludedFragmentOpacity(e,t){const{idleOpacity:r,navigatingOpacity:i,maxDelta:n,tiltFadeStart:h,tiltFadeEnd:o,altitudeStart:d,altitudeEnd:l}=$,_=this.stage.view,u=_.stateManager.camera,p=_.qualitySettings.fadeDuration,m=e===Te.IDLE?r:i,c=s((u.tilt-h)/(o-h),0,1),g=s(((u.position.z??0)-d)/(l-d),0,1),f=a(a(1,m,c),1,g),b=this._bindParameters.hudOccludedFragmentOpacity;if(p<=0||b===f||0===this._lastFrameTime||this._lastFrameTime>t)return this._bindParameters.hudOccludedFragmentOpacity=f,void(this._lastFrameTime=t);const A=t-this._lastFrameTime;this._lastFrameTime=t;const T=Math.max(1-r,Math.abs(r-i)),E=Math.min(T*A/p,n);E>=Math.abs(f-b)?this._bindParameters.hudOccludedFragmentOpacity=f:(this._bindParameters.hudOccludedFragmentOpacity=b+Math.sign(f-b)*E,this._requestRender())}_render(e,t,r=ne.Default,i){this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r===ne.Default,this._disposeBindBuffers();const{camera:s,contentCamera:a,mode:n,alignPixelEnabled:h}=e;this._state.value=n;const o=this._nodes.produces("magnifier-color"),l=this._nodes.produces(N.FINAL),_=this._nodes.require("emissive",D.TRANSPARENT_ENVIRONMENT,N.COMPOSITE,N.FINAL)>0&&this._plugins.hasEmissions,u=_?U.ColorEmission:U.Color;this._renderContext.time=t,this._renderContext.output=u,this._bindParameters.oitPass=re.NONE,this._bindParameters.alignPixelEnabled=h,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null,this._bindParameters.slicePlane=this._sliceHelper.plane,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._renderOverlay(t),s.setGLViewport(this._rctx);const p=this._framebuffer,m=p.initialize(s.fullWidth,s.fullHeight,this._backgroundColor,_);this.hasReflections?(m?.setName("last frame color"),this._bindParameters.ssr.lastFrameColor=m):m?.release(),this._ensureBindParametersCamera(s,a),this._updateHUDOccludedFragmentOpacity(n,t),this._plugins.prepareRender(),this._bindParameters.shadowHighlightsVisible=this._needsShadowHighlight&&!i;const c=this._highQualityTransparency&&this._hasTransparentTerrain,g=this._plugins.produces(U.Color,...xe);this._precompilePrepasses(),this.performanceInfo.advance(Ae.PREPARE);const f=this._computeDepthRange(s);this._renderShadowMap(s,this._bindParameters.lighting.mainLight.direction,f),this._ensureBindParametersCamera(s,a),this._pluginInput.set("normals",this._renderNormals()),this._renderRemainingGeometryDepth(),this._renderShadowAccumulation(f,s,a),this._ensureBindParametersSSR(t),this._precompileShaders(c,g,u),this._renderContext.output=u,p.bind(),this._bindParameters.mainDepth=p.depth.attachment;const b=this.plugins.produces(U.Color,...ye);b&&this._renderOpaqueGeometry(),p.update((e=>this._renderNodes(N.OPAQUE,e,b))),this.fboCache.debugCallback?.(N.OPAQUE,p.color.fbo),p.update((e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e))),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,p.color.fbo),this._renderTerrainDepth(c),this._renderEdges(ce.OPAQUE),p.bind(),this._renderPlugins(le.VOXEL,Ae.VOXEL),this._renderHiddenTransparentEdges(),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,u):this._renderTransparentGeometry()),p.update((e=>this._renderNodes(N.TRANSPARENT,e,g))),this.fboCache.debugCallback?.(N.TRANSPARENT,p.color.fbo),this._renderGeometryDepth(c),this._renderHUDVisibility(),c||this._plugins.render(this._pluginInput,le.LINE_CALLOUTS),this._renderEdges(ce.TRANSPARENT);const A=this._hasTransparentTerrain?this._renderTransparentTerrain():null;A&&(this.performanceInfo.advance(Ae.TRANSPARENT_TERRAIN),this._bindParameters.hudVisibility&&(c?this._renderLineCallouts(G.Occluded):(this._rctx.bindFramebuffer(this._bindParameters.hudVisibility?.fbo),this._compositingHelper.compositeHUD(this._bindParameters,A.getTexture())),this._renderHUD(G.Occluded,p.color,u))),this._bindParameters.cullAboveTerrain=!1,A&&(p.bind(),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,A.getTexture()),A.release(),c&&(this._renderEdges(ce.OPAQUE),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,u):this._renderTransparentGeometry(),this.performanceInfo.advance(Ae.TRANSPARENT)),this._renderEdges(ce.TRANSPARENT))),this._bindParameters.ssao=d(this._bindParameters.ssao),c&&this._renderLineCallouts(G.NotOccluded),this._bindParameters.terrainDepthTest=!1,this._renderTransparentEnvironment(),this._pluginInput.set(D.FOCUSAREA,this._renderFocusAreaGeometry()),p.update((e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e))),p.update((e=>this._renderNodes(D.VIEWSHED,e))),p.update((e=>this._renderNodes(D.LASERLINES,e))),p.update((e=>this._renderNodes(D.FOCUSAREA_COLOR,e))),p.update((e=>this._renderNodes(D.OCCLUDED,e))),this._pluginInput.set("highlights",this._renderHighlightPrepass());const T=r===ne.ObjectAndLayerID?this._renderObjectAndLayerIdColor():null;p.update((e=>this._renderNodes(N.COMPOSITE,e))),this._pluginInput.release(D.FOCUSAREA);const E=!(r!==ne.Default||l||o&&!i),P=this._pluginInput.get(N.COMPOSITE),R=E?L:this.fboCache.acquire(P.fbo.width,P.fbo.height,D.ANTIALIASING),S=this._nodes.produces(D.ANTIALIASING)?this._renderNodes(D.ANTIALIASING,R):this._blitFBO(P,R,!1);let I;this._pluginInput.set(D.ANTIALIASING,S),this._hasHUDHighlights?(this._renderHUD(G.NotOccluded,S,u),I=this._renderNodes(D.HIGHLIGHTS,S)):(I=this._renderNodes(D.HIGHLIGHTS,S),this._renderHUD(G.NotOccluded,I,u));const C=this._renderNodes(D.MAGNIFIER,I);return o&&!i&&r===ne.Default&&!l&&this._blitFBO(C),l?(C.attachDepth(p.depth),this._blitFBO(this._renderNodes(N.FINAL,C)),C.detachDepth()):this._pluginInput.set(N.FINAL,C),this._pluginInput.release("highlights"),this.onPostRender&&this.onPostRender(),this._releaseFBOs(),p.releaseDepth(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),this.performanceInfo.finishFrame(),r!==ne.Default&&(this._releaseFBOs(),this._disposeOffscreenBuffers()),new fe(this._pluginInput.get(N.FINAL),T)}_precompileShaders(e,t,r){++this._plugins.context.techniques.precompiling,this._renderContext.output=r,this._precompileOpaqueGeometry(),this._nodes.precompile(D.OPAQUE_ENVIRONMENT),this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,this._renderContext.output=U.Depth,this._plugins.precompile(le.TRANSPARENT_TERRAIN),e&&(this._precompileOpaqueGeometry(),this._precompileTransparentGeometry()),this._renderContext.output=r,this._plugins.precompile(le.TRANSPARENT_TERRAIN),t&&(this._precompileTransparentGeometry(),this._hasTransparentTerrain&&(this._bindParameters.cullAboveTerrain=!1,this._precompileTransparentGeometry(),this._bindParameters.cullAboveTerrain=e)),this._nodes.precompile(D.FOCUSAREA),this._needsHUDVisibility&&this._plugins.precompile(le.OCCLUSION_PIXELS),this._plugins.precompile(le.LINE_CALLOUTS),this._precompileHUD(G.Occluded),this._bindParameters.terrainDepthTest=!1,this._bindParameters.cullAboveTerrain=!1,this._nodes.precompile(D.VIEWSHED,D.LASERLINES,D.FOCUSAREA_COLOR,D.OCCLUDED,D.ANTIALIASING,D.HIGHLIGHTS);const i=this._bindParameters;i.highlightMixTexture=i.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(G.NotOccluded),this._hasHighlights&&(i.highlights.forEach(((e,t)=>{i.highlightLevel=t,this._precompileAllGeometry(U.Highlight)})),i.highlightLevel=null),i.highlightMixTexture=null,this._nodes.precompile(N.COMPOSITE,D.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){if(!this._nodes.produces(D.FOCUSAREA))return null;const{width:e,height:t}=this._framebufferSize;let r=this.fboCache.acquire(e,t,D.FOCUSAREA);return r=this._nodes.render(r,this._pluginInput),this.performanceInfo.advance(Ae.FOCUS_AREA_MASK),r}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._renderContext.output;++this._techniques.precompiling;const t=this._framebufferSize;let r=this.fboCache.acquire(t.width,t.height,"olid");return r.acquireDepth(Ee),r=this._nodes.render(r,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(Ae.OBJECT_AND_LAYER_ID_COLOR),this._renderContext.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,r=e===X.BACKGROUND;if(r||t){const e=r?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const s=Math.max(e,i);this._animationTimestep.frame(s,r)}}readMainDepth(e,t){const{mainDepth:r,camera:i}=this._bindParameters;if(!r)return;const s=this.fboCache.acquire(this._framebufferSize.width,this._framebufferSize.height,"linear-depth");this._rctx.bindFramebuffer(s.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(w),this._compositingHelper.blitDepthToLinearDepth(this._bindParameters,r),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),s.fbo?.readPixels(e[0],e[1],e[2],e[3],Pe.RGBA,Re.UNSIGNED_BYTE,t),s.release()}readHUDVisibility(e,t,r,i,s){this._bindParameters.hudVisibility?.fbo?.readPixels(e,t,r,i,Pe.RGBA,Re.UNSIGNED_BYTE,s)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_renderEdges(e){const t=this._edgeView;if(!t?.shouldRender())return;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"edges"),s=()=>t.render(this._bindParameters,e),a=this._bindParameters.geometryDepth;this.renderToTargets(s,i,a??this._framebuffer.depth,w),this._framebuffer.bind(),this._compositingHelper.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(e===ce.OPAQUE?Ae.OPAQUE_EDGES:Ae.TRANSPARENT_EDGES)}_renderOverlay(e){this._bindParameters.overlay=this.overlay?.render(e),this._bindParameters.overlay&&this.performanceInfo.advance(Ae.OVERLAY)}_renderShadowMap(e,t,r){if(!this.shadowsEnabled)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(oe.HighResolutionShadows),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight?(this._renderShadowCascades(U.ShadowHighlight,this._shadowMap),i.moveSnapshot(pe.Highlight),this._renderShadowCascades(U.ShadowExcludeHighlight,this._shadowMap),i.copySnapshot(pe.ExcludeHighlight),this._renderShadowCascades(U.ShadowHighlight,this._shadowMap)):this._renderShadowCascades(U.Shadow),i.finish(),e.setGLViewport(this._rctx),this.performanceInfo.advance(Ae.SHADOW_MAP)}_precompileShadowCascades(e){for(const t of this._shadowMap.cascades)t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.camera),this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._shadowMap){for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e)}get _needsDepth(){return this._plugins.consumes(U.Depth)||this._nodes.requireGeometryDepth()||this.hasReflections||this._needsShadowHighlight||this._needsShadowAccumulation||this._debugNeedsDepth}_renderRemainingGeometryDepth(){const e=this._pluginInput.get("normals");if(e){const t=this._needsDepth?e.getAttachment(Ee):null;t?.retain(),this._pluginInput.set(D.SSAO,this._renderSSAO()),this._renderGeometryWithoutNormalsDepth(t)}else this._renderAllGeometryDepth()}_renderGeometryWithoutNormalsDepth(e){if(!this._needsDepth||!e)return void(this._bindParameters.depth=d(this._bindParameters.depth));const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"depth");r.attachDepth(e),e.release(),this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(Se.STENCIL),this._renderGeometryWithoutNormals(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=r.obtainDepthTexture(),r.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderAllGeometryDepth(){if(!this._needsDepth)return void(this._bindParameters.depth=d(this._bindParameters.depth));const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"depth").acquireDepth(Ee);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this.renderAllGeometry(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=t.obtainDepthTexture(),t.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderTerrainDepth(e){if(this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,!e)return void(this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth));const t=this._renderContext.output;this._renderContext.output=U.Depth;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"terrain depth").acquireDepth(Ee);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderTransparentTerrain(),d(this._bindParameters.terrainDepth),this._bindParameters.terrainDepth=i.obtainDepthTexture(),this._renderContext.output=t,i.release()}_renderGeometryDepth(e){if(!e)return void(this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth));const t=this._renderContext.output,{width:r,height:i}=this._framebufferSize,s=this.fboCache.acquire(r,i,"geometry depth").acquireDepth(Ee);this._rctx.bindFramebuffer(s.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderOpaqueAndTransparentGeometry(U.Depth),this._renderContext.output=t,d(this._bindParameters.geometryDepth),this._bindParameters.geometryDepth=s.obtainDepthTexture(),s.release()}get _needsDepthRange(){return this._shadowMap.enabled||this._needsShadowAccumulation}_computeDepthRange(e){if(!this._needsDepthRange)return J.zero;const t=Z(e,this._plugins.plugins,this.stage.layers);return t.union(this._plugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}get _normalsRequired(){const e=this._nodes.require("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED,D.LASERLINES);return(this.hasSSAO?1:0)+e}_precompilePrepasses(){this._normalsRequired&&this._precompileAllGeometry(U.Normal),this._needsDepth&&this._precompileAllGeometry(U.Depth),this.shadowsEnabled&&(this._needsShadowHighlight?(this._precompileShadowCascades(U.ShadowHighlight),this._precompileShadowCascades(U.ShadowExcludeHighlight),this._precompileShadowCascades(U.ShadowHighlight)):this._precompileShadowCascades(U.Shadow)),this._needsShadowAccumulation&&this._precompileAllGeometry(U.Shadow)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"normals",x.RGBA8);r.acquireDepth(Ee),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(w,!0,!0),this._renderGeometryWithNormals(U.Normal);const i=this._nodes.optional("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(Ae.NORMALS),r}_renderSSAO(){const e=this._pluginInput.get("normals");if(!this.hasSSAO||!e)return void e?.detachDepth();L.setName(D.SSAO);const t=this._nodes.render(L,this._pluginInput);return this._bindParameters.ssao=t,e.detachDepth(),this._pluginInput.release("normals"),this.performanceInfo.advance(Ae.SSAO),t}_precompileAllGeometry(e){const t=this._renderContext.output;this._renderContext.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(le.TRANSPARENT_TERRAIN),this._renderContext.output=t}renderAllGeometry(e){this._renderContext.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentTerrain()}precompileSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const r of t)this._renderContext.renderOccludedMask=r,this.precompileSlots(e,...He);this._renderContext.renderOccludedMask=se}renderSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.forAll((e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t,this._pluginInput)}))}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>te.Occlude&&this._plugins.render(this._pluginInput,le.OCCLUDED_TERRAIN),this.renderSlots(e,...He),this._renderContext.renderOccludedMask=se}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,le.HUD_MATERIAL)}precompileViewshedShadowMap(){this._precompileAllGeometry(U.ViewshedShadow)}renderViewshedShadowMap(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(U.ViewshedShadow),this._ensureBindParametersCamera(t,r),this._bindParameters.camera.setGLViewport(this._rctx),this._renderContext.output=i}_renderOpaqueAndTransparentGeometry(e){this._renderContext.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...Ne),this._renderTransparentTerrain()}_renderGeometryWithoutNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...De)}_precompileOpaqueGeometry(){this._plugins.precompile(...ye)}_renderOpaqueGeometry(){this._plugins.render(this._pluginInput,...ye)}_renderTransparentGeometry(){this._plugins.render(this._pluginInput,...xe)}get _hasTransparentTerrain(){return this._plugins.produces(U.Color,le.TRANSPARENT_TERRAIN)}_renderTransparentTerrain(){const e=()=>this._plugins.render(this._pluginInput,le.TRANSPARENT_TERRAIN);if(!v(this._renderContext.output))return void e();const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"transparent terrain");return this.renderToTargets(e,r,this._framebuffer.depth,w),r}get _needsHUDVisibility(){return this._plugins.produces(this._renderContext.output,le.OCCLUSION_PIXELS)}_renderHUDVisibility(){if(!this._needsHUDVisibility)return void(this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility));const{width:e,height:t}=this._framebufferSize;let r=this._bindParameters.hudVisibility;r?.fbo?.width===e&&r?.fbo?.height===t||(r?.release(),r=this.fboCache.acquire(e,t,"hud visibility",x.RGBA4),this._bindParameters.hudVisibility=r);const i=this._bindParameters.geometryDepth;r.attachDepth(i||this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer([0,1,0,1]),this._plugins.render(this._pluginInput,le.OCCLUSION_PIXELS),r.detachDepth(),this._framebuffer.bind(),this.performanceInfo.advance(Ae.HUD_VISIBILITY)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,e===G.Occluded){const e=()=>this._plugins.render(this._pluginInput,le.LINE_CALLOUTS),t=this._framebufferSize,r=this.fboCache.acquireDepth(H,t.width,t.height,"line callouts");this.renderToTargets(e,this._framebuffer.color,r,void 0,!0,!0),r.release()}else this._plugins.render(this._pluginInput,le.LINE_CALLOUTS)}_precompileHUD(e){if(this._precompileHUDOutput(e),this._hasHighlights){const t=this._renderContext.output;this._renderContext.output=U.Highlight,this._precompileHUDOutput(e),this._renderContext.output=t}}_precompileHUDOutput(e){const t=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...Me),this._bindParameters.hudRenderStyle=t}_renderHUD(e,t,r){if(this._pluginsHas.hudElements){if(this._oitEnabled){const i=this._renderOIT(Oe.HUD,r,e);this._rctx.bindFramebuffer(t.fbo),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,i.getTexture()),i.release()}else if(this._renderContext.output=r,e===G.Occluded){const t=()=>this._renderHUDElements(e),r=this._framebufferSize,i=this.fboCache.acquireDepth(H,r.width,r.height,"hud");this.renderToTargets(t,this._framebuffer.color,i,void 0,!0,!0),i.release()}else t.acquireDepth(H),this._rctx.bindFramebuffer(t.fbo),this._renderHUDElements(e),t.detachDepth();this.performanceInfo.advance(e===G.Occluded?Ae.HUD_OCCLUDED:Ae.HUD)}}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,...Me)}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(U.ShadowHighlight,le.OPAQUE_MATERIAL)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:r}=this,i=this._framebufferSize,{highlights:s}=r,a=e.acquire(i.width,i.height,"highlights",s.length>Q?x.RG8UI:x.R8UI);a.acquireDepth(Ee),t.bindFramebuffer(a.fbo);const{gl:n}=t;return n.clearBufferuiv(n.COLOR,0,[0,0,0,0]),this._renderContext.output=U.Highlight,t.bindFramebuffer(a.fbo),W(t,e,i,r,(()=>this._renderHighlightGeometries())),this.performanceInfo.advance(Ae.HIGHLIGHTS),a}_renderHighlightGeometries(){this._plugins.render(this._pluginInput,...Le),this._rctx.clear(Se.DEPTH),this._renderHUDElements(G.Both)}get _needsShadowAccumulation(){return this._shadowAccumulator.accumulating}_renderShadowAccumulation(e,t,r){this._needsShadowAccumulation&&this._bindParameters.depth&&this._shadowAccumulator.renderAccumulation(this._bindParameters.depth,e,t,r)&&this.performanceInfo.advance(Ae.ACCUMULATED_SHADOWS)}_precompileTransparentGeometry(){this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...xe)}_renderOIT(e,t,r=G.Both){const i=e===Oe.HUD,s=this._framebufferSize,a=i?this.fboCache.acquire(s.width,s.height,"oit hud composite"):null,n=i?()=>this._renderHUDElements(r):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=this._renderContext.output;this._renderContext.output=t,h.oitPass=re.ColorAlpha;const d=a?"oit hud color+alpha":"oit color+alpha",l=t===U.ColorEmission,_=this.fboCache.acquire(s.width,s.height,d,l?x.RGBA16F:x.RGBA16F_NEAREST);l&&_.acquireColor(Ie,x.RGBA16F,"emissive"),_.acquireColor(l?Ce:Ie,x.R16F),a||_.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(_.fbo),this._rctx.clearFramebuffer([0,0,0,1]),l&&this._rctx.clearBuffer(1,I),n(),_.detachDepth(),h.oitPass=re.FrontFace;const u=this.fboCache.acquire(s.width,s.height,a?"oit hud front":"oit front");return l&&u.acquireColor(Ie,x.RGBA16F,"emissive"),a?u.acquireDepth(H):u.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(u.fbo),this._rctx.clearFramebuffer(w,!!a),n(),u.detachDepth(),h.oitPass=re.NONE,a?(this._rctx.bindFramebuffer(a.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(Se.COLOR)):this._framebuffer.bind(),this._oitblend??=new k(this._techniques),this._oitblend.blend(this._rctx,_,u,h,l),a?.detachDepth(),u.release(),_.release(),this._renderContext.output=o,a}_renderTransparentEnvironment(){this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(Ae.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(this._pluginInput,le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),this.performanceInfo.advance(Ae.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderPlugins(e,t){this._plugins.produces(this._renderContext.output,e)&&(this._plugins.render(this._pluginInput,e),this.performanceInfo.advance(t))}_renderNodes(e,t,r=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return r&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNormals);return this.performanceInfo.advance(e),i}_blitFBO(e,t=L,r=!0){return this._blit??=new B(this._techniques),this._blit.blit(this._rctx,e,t,this._bindParameters),this._pluginInput.set(e.name,t),r&&e.release(),t}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=P:(T(Ue,this._bindParameters.camera.viewMatrix),T(Fe,this._bindParameters.camera.projectionMatrix),E(ve,Ue,Fe),E(ve,this._renderContext.lastFrameCamera.viewMatrix,ve),E(ve,this._renderContext.lastFrameCamera.projectionMatrix,ve),this._reprojectionMatrix=ve);const t=this.stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=t>0?Math.min(t,e-this._ssrEnableTime)/t:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=P,this._ssrEnableTime=null}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,r,i){this._bindParameters.updateLighting(e,t,r,i),this._requestRender(X.UPDATE)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0}}renderToTargets(e,t,r,i,s=!1,a=!1){t.attachDepth(r),this._rctx.bindFramebuffer(t.fbo),this._rctx.clearFramebuffer(i,s,a),e(),t.detachDepth()}get test(){}};var Oe;e([f({readOnly:!0})],we.prototype,"fullResolutionAtmosphere",null),e([f()],we.prototype,"_edgeView",void 0),e([f()],we.prototype,"updating",null),we=e([b("esri.views.3d.webgl-engine.lib.Renderer")],we),function(e){e[e.Geometry=0]="Geometry",e[e.HUD=1]="HUD"}(Oe||(Oe={}));const Ne=[le.INTEGRATED_MESH,le.OPAQUE_TERRAIN,le.OPAQUE_MATERIAL,le.TRANSPARENT_MATERIAL],De=[le.OPAQUE_MATERIAL_WITHOUT_NORMALS,le.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],ye=[le.INTEGRATED_MESH,le.OPAQUE_TERRAIN,le.OPAQUE_MATERIAL,le.OPAQUE_MATERIAL_WITHOUT_NORMALS],xe=[le.TRANSPARENT_MATERIAL,le.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],He=[le.OPAQUE_MATERIAL,le.TRANSPARENT_MATERIAL,le.TRANSPARENT_MATERIAL_WITHOUT_DEPTH],Me=[le.LINE_CALLOUTS_HUD_DEPTH,le.HUD_MATERIAL,le.LABEL_MATERIAL],Le=[le.TRANSPARENT_MATERIAL,le.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,le.OPAQUE_MATERIAL,le.OPAQUE_MATERIAL_WITHOUT_NORMALS,le.TRANSPARENT_TERRAIN,le.INTEGRATED_MESH,le.OPAQUE_TERRAIN],Fe=R(),Ue=R(),ve=R();function Ge(e){return t=>e.immediate.schedule(t)}export{we as Renderer};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{update as t}from"../../../../core/arrayUtils.js";import{createTask as r}from"../../../../core/asyncUtils.js";import{unitRGBAFromColor as i}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as s,lerp as a}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as h,destroyMaybe as o,releaseMaybe as d}from"../../../../core/maybe.js";import{throwIfAborted as _}from"../../../../core/promiseUtils.js";import{watch as l,syncAndInitial as p,initial as u,sync as m}from"../../../../core/reactiveUtils.js";import{signal as c}from"../../../../core/signal.js";import{Milliseconds as g}from"../../../../core/time.js";import{property as f}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import{subclass as b}from"../../../../core/accessorSupport/decorators/subclass.js";import{equals as A,invert as T,multiply as E}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as P,create as R}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{s as S}from"../../../../chunks/vec42.js";import{ZEROS as I}from"../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{fromValues as C,ZEROS as w}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{pruneIndexArrays as O}from"../../../../geometry/support/Indices.js";import{RenderCategory as N,InternalRenderCategory as D}from"../../webgl.js";import{debugFlags as y}from"../../support/debugFlags.js";import{ColorFormat as x,DepthRenderbuffer16f as H}from"../../webgl/formats.js";import{FBOCache as M,defaultWebGLFBO as L}from"../core/FBOCache.js";import{RenderPassManager as F}from"../core/renderPasses/RenderPassManager.js";import{ShaderOutput as U,isColorOrColorEmission as v}from"../core/shaderLibrary/ShaderOutput.js";import{HUDRenderStyle as G}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{distanceFadeEnd as q}from"../core/shaderLibrary/shading/ScreenSpaceConstants.js";import{RenderNodes as V}from"../effects/RenderNodes.js";import{RenderPluginManager as j}from"../effects/RenderPluginManager.js";import{Blit as B}from"../effects/blit/Blit.js";import{maxHighlightsPerChannel as Q,renderHighlightBuffer as W}from"../effects/highlight/Highlight.js";import{OITBlend as k}from"../effects/transparency/OITBlend.js";import{AnimationTimer as z}from"./AnimationTimer.js";import{AnimationTimeStep as Y}from"./AnimationTimeStep.js";import{RenderRequestType as X}from"./basicInterfaces.js";import{BoundingInfo as K}from"./BoundingInfo.js";import{DepthRange as J}from"./DepthRange.js";import{depthRangeFromScene as Z}from"./depthRangeUtils.js";import{hudFragmentOpacityParameters as $}from"./hudFragmentOpacityParameters.js";import{MainFramebuffer as ee}from"./MainFramebuffer.js";import{RenderOccludedFlag as te}from"./Material.js";import{OITPass as re}from"./OITPass.js";import{RenderContext as ie,defaultRenderOccludedMask as se}from"./RenderContext.js";import{RendererBase as ae}from"./RendererBase.js";import{RendererTarget as ne}from"./rendererUtils.js";import{setupFeatureDefaults as he,RenderFeature as oe}from"./RenderFeature.js";import{RenderPluginInput as de}from"./RenderPluginInput.js";import{RenderSlot as _e}from"./RenderSlot.js";import{ShadowAccumulator as le}from"./ShadowAccumulator.js";import{ShadowMap as pe,SnapshotSlot as ue}from"./ShadowMap.js";import me from"./SliceHelper.js";import{Transparency as ce}from"./edgeRendering/interfaces.js";import{MergedRenderer as ge}from"../materials/renderers/MergedRenderer.js";import{RenderSceneResult as fe}from"../parts/renderUtils.js";import{RendererPerformanceInfo as be,PerformanceCategory as Ae}from"../statistics/RendererPerformanceInfo.js";import{RenderState as Te}from"../../../support/RenderState.js";import{DepthStencilAttachment as Ee,PixelFormat as Pe,PixelType as Re,FramebufferBit as Se,ColorAttachment1 as Ie,ColorAttachment2 as Ce}from"../../../webgl/enums.js";let we=class extends ae{constructor(e,t,r,s,a,n){super({stage:e}),this._techniques=r,this._rctx=s,this._compositingHelper=a,this._requestRender=n,this._pluginsHas={hudElements:!1,water:!1},this.renderPassManager=new F,this._isRendering=!1,this._inGlobeView=!1,this._backgroundColor=C(0,0,0,1),this._sliceHelper=new me,this._blit=null,this._oitblend=null,this._state=c(Te.IDLE),this._highQualityTransparencyEnabled=!0,this._ssrEnabled=!1,this._hasAnimations=!1,this._animationTimestep=new Y,this._loadEdgeViewTask=null,this._edgeViewCallbacks=[],this._reprojectionMatrixVersion=c(0),this._lastFrameTime=g(0),this._renderHiddenTransparentEdges=()=>{},this._pluginInput=new de,this._releaseNormals=e=>{e.some((({name:e})=>"normals"===e))&&this._pluginInput.release("normals")},this._debugNeedsDepth=!1,this.fboCache=new M(s),this._renderStateFeatures=c(he(!has("disable-feature:high-quality-idle"),e.view.qualityProfile)),this._framebuffer=new ee(this.fboCache),this.performanceInfo=new be(this._rctx),this._shadowMap=new pe(this.fboCache,e.viewingMode),this._shadowAccumulator=new le(this.fboCache,r,e,(e=>{const t=this.shadowsEnabled;this._shadowMap.enabled=!0,this._ensureBindParametersCamera(e.camera,e.contentCamera),this._plugins.prepareRender(),this._shadowMap.enabled=t}),((t,r,i)=>{const s=e.view.qualitySettings.maximumPixelRatio;t.shadowMap.start(t.camera,r,i,!0,s),this._renderShadowCascades(U.Shadow,t.shadowMap),t.shadowMap.finish(),t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.contentCamera)}),n),this._renderContext=new ie(this._rctx,this._shadowMap,r),this._nodes=new V(this._renderContext),this._plugins=new j({renderContext:this._renderContext,techniques:r,materials:t,requestRender:n,controller:e,fbos:this.fboCache,isFeatureEnabled:e=>this.isFeatureEnabled(e)}),this._plugins.add(this.renderPassManager),this.addHandles([l((()=>e.view.state.camera),(()=>n()),p),l((()=>y.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES),(e=>{this._renderHiddenTransparentEdges=e?()=>this._renderEdges(ce.TRANSPARENT):()=>{},n()}),u),l((()=>e.view.environment.background?.color),(e=>{const t=e?i(e):w;S(this._backgroundColor,t[0]*t[3],t[1]*t[3],t[2]*t[3],t[3]),n()}),p),l((()=>e.view.state.camera.relativeElevation),(e=>this._inGlobeView=(e??1/0)>=q),p),l((()=>this._bindParameters.clouds.fadeFactor),(()=>this._bindParameters.fadeLighting()),m),l((()=>this._bindParameters.clouds.data?.state),(()=>n()),m),l((()=>e.view.state.highlights),(e=>{this._bindParameters.highlights=e,n()}),u)])}destroy(){this._gpuTimerHandle=n(this._gpuTimerHandle),this._nodes.destroy(),this._framebuffer.dispose(),this._shadowMap.dispose(),this._shadowAccumulator.dispose(),this._loadEdgeViewTask=h(this._loadEdgeViewTask),this._edgeView=o(this._edgeView),this.renderPassManager.dispose(),this._releaseFBOs(),this._disposeOffscreenBuffers(),this.fboCache.destroy(),this._plugins.destroy(),this._blit=null,this._oitblend=null,K.prune(),ge.prune(),O()}get renderContext(){return this._renderContext}get _bindParameters(){return this._renderContext.bind}get _framebufferSize(){return this._framebuffer.size}updateRenderFeatures(e=null,t=!has("disable-feature:high-quality-idle")){this._renderStateFeatures.value=he(t,e),this._requestRender()}isFeatureEnabled(e,t=this._state.value){return this._renderStateFeatures.value.get(t,e)??!1}setFeatureEnabled(e,t,r){this._renderStateFeatures.mutate((i=>i.set(t,e,r))),this._requestRender()}get _highQualityTransparency(){return this._highQualityTransparencyEnabled||this.isFeatureEnabled(oe.HighQualityTransparency)}get hasReflections(){return this._pluginsHas.water&&(this._ssrEnabled||this.isFeatureEnabled(oe.WaterReflection))}get _hasHighlights(){return this._plugins.produces(U.Highlight,_e.OPAQUE_MATERIAL,_e.TRANSPARENT_MATERIAL,_e.DRAPED_MATERIAL,_e.HUD_MATERIAL,_e.LABEL_MATERIAL)}hasHighlight(e){return this._plugins.hasHighlight(e)}get _hasHUDHighlights(){return this._plugins.produces(U.Highlight,_e.HUD_MATERIAL,_e.LABEL_MATERIAL)}get hasSSAO(){return(this.stage.view.qualitySettings.ambientOcclusion||this.isFeatureEnabled(oe.SSAO))&&!this._inGlobeView}get hasSMAA(){return this.stage.view.qualitySettings.antialiasingEnabled||this.isFeatureEnabled(oe.Antialiasing)}get fullResolutionAtmosphere(){return this.stage.view.qualitySettings.highResolutionAtmosphere||this.isFeatureEnabled(oe.HighResolutionAtmosphere)}_releaseFBOs(){this._bindParameters.ssr.lastFrameColor=d(this._bindParameters.ssr.lastFrameColor),this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth),this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth)}_disposeOffscreenBuffers(){this._framebuffer.dispose(),this._disposeBindBuffers()}_disposeBindBuffers(){this._shadowMap.disposeOffscreenBuffers(),this._bindParameters.depth=d(this._bindParameters.depth),this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility)}get updating(){return this._loadEdgeViewTask&&!this._loadEdgeViewTask.finished||this._edgeView?.updating||this._shadowAccumulator.running||this._plugins.updating||!this.isCameraFinal}loadEdgeView(){return this._loadEdgeViewTask||(this._loadEdgeViewTask=r((async e=>{const{EdgeView:t}=await import("./edgeRendering/EdgeView.js");_(e);const r=this._edgeView=new t({rctx:this._rctx,renderSR:this.stage.view.renderSpatialReference,viewingMode:this.stage.view.stage.viewingMode,techniques:this._techniques,setNeedsRender:()=>this._requestRender(),schedule:Ge(this.stage.view.resourceController)});return this.addHandles(l((()=>r.updating),(()=>this._requestRender()),m)),this._requestRender(),this._edgeViewCallbacks.forEach((e=>e(r))),this._edgeViewCallbacks.length=0,r}))),this._loadEdgeViewTask.promise}withEdgeView(e){this.loadEdgeView(),null==this._edgeView?this._edgeViewCallbacks.push(e):e(this._edgeView)}get edgeView(){return this._edgeView}get isCameraFinal(){return this._reprojectionMatrixVersion.value>=0&&A(this._bindParameters.ssr.reprojectionMatrix,P)}set _reprojectionMatrix(e){t(this._bindParameters.ssr.reprojectionMatrix,e)&&this._reprojectionMatrixVersion.value++}get shadowsEnabled(){return!!this._shadowMap?.enabled}setParameters(e){const{_shadowMap:t,_bindParameters:r}=this;if(void 0!==e.qualitySettings?.reflections&&this._ssrEnabled!==e.qualitySettings.reflections&&(this._ssrEnabled=e.qualitySettings.reflections,this._requestRender()),void 0!==e.shadowMap&&this._shadowMap.enabled!==e.shadowMap&&(this._shadowMap.enabled=e.shadowMap,this._requestRender()),void 0!==e.shadowMapMaxCascades&&t.maxCascades!==e.shadowMapMaxCascades&&(t.maxCascades=e.shadowMapMaxCascades,this._requestRender()),null!=e.environment){null!=e.environment.weather&&(this._bindParameters.weather=e.environment.weather,this._bindParameters.weatherVisible=!!e.weatherVisible);const t="virtual"!==e.environment.lighting.type;r.enableFillLights!==t&&(r.enableFillLights=t,this._requestRender())}void 0!==e.highQualityTransparency&&this._highQualityTransparencyEnabled!==e.highQualityTransparency&&(this._highQualityTransparencyEnabled=e.highQualityTransparency,this._requestRender()),void 0!==e.shadowCast&&this._shadowAccumulator.setOptions(e.shadowCast)}set slicePlane(e){this._sliceHelper.plane!==e&&(this._sliceHelper.plane=e,this._requestRender())}get plugins(){return this._plugins}get _hasOITSupport(){return this._rctx.driverTest.floatBufferBlend.result}get _oitEnabled(){return this._highQualityTransparency&&this._hasOITSupport}commit(e,t){return this._isRendering&&console.warn("Renderer.modify called while rendering"),!!super.commit(e,t,this._plugins.context)&&(this.updateHasFlags(),!0)}rendererAdded(e){this._plugins.add(e)}rendererRemoved(e){this._plugins.remove(e)}updateHasFlags(){const has=this._pluginsHas;has.hudElements=this._plugins.produces(U.Color,...Me),has.water=this._plugins.produces(U.Normal,_e.DRAPED_WATER),this._bindParameters.hasOccludees=this._plugins.hasOccludees,this._requestRender()}updateAnimation(e,t){this._animationTimer??=new z(e.camera,t),this._animationTimer.advance(e.camera,t,this._animationTimeDilation);const r=this._hasAnimations;return this._hasAnimations=this._plugins.updateAnimation(this._animationTimer),this._hasAnimations=this._nodes.updateAnimation(this._animationTimer)||this._hasAnimations,this._hasAnimations!==r&&(this._gpuTimerHandle=r?n(this._gpuTimerHandle):this.performanceInfo.enableGPUPerformanceInfo()),this._hasAnimations}get animationTimestep(){return this._animationTimestep.value}get _animationTimeDilation(){return this._animationTimestep.timeDilation}resetAnimation(){this._animationTimestep.clear()}tick(){this.fboCache.clean()}render(e,t,r=ne.Default,i=!1){try{return this._isRendering=!0,this._render(e,t,r,i)}catch(s){console.error(`Exception during rendering: ${s}`)}finally{this._isRendering=!1}return new fe(this._pluginInput.get(N.FINAL),null)}_updateHUDOccludedFragmentOpacity(e,t){const{idleOpacity:r,navigatingOpacity:i,maxDelta:n,tiltFadeStart:h,tiltFadeEnd:o,altitudeStart:d,altitudeEnd:_}=$,l=this.stage.view,p=l.stateManager.camera,u=l.qualitySettings.fadeDuration,m=e===Te.IDLE?r:i,c=s((p.tilt-h)/(o-h),0,1),g=s(((p.position.z??0)-d)/(_-d),0,1),f=a(a(1,m,c),1,g),b=this._bindParameters.hudOccludedFragmentOpacity;if(u<=0||b===f||0===this._lastFrameTime||this._lastFrameTime>t)return this._bindParameters.hudOccludedFragmentOpacity=f,void(this._lastFrameTime=t);const A=t-this._lastFrameTime;this._lastFrameTime=t;const T=Math.max(1-r,Math.abs(r-i)),E=Math.min(T*A/u,n);E>=Math.abs(f-b)?this._bindParameters.hudOccludedFragmentOpacity=f:(this._bindParameters.hudOccludedFragmentOpacity=b+Math.sign(f-b)*E,this._requestRender())}_render(e,t,r=ne.Default,i){this.performanceInfo.startFrame(),this.fboCache.frameStart(),this.fboCache.interactive=r===ne.Default,this._disposeBindBuffers();const{camera:s,contentCamera:a,mode:n,alignPixelEnabled:h}=e;this._state.value=n;const o=this._nodes.produces("magnifier-color"),_=this._nodes.produces(N.FINAL),l=this._nodes.require("emissive",D.TRANSPARENT_ENVIRONMENT,N.COMPOSITE,N.FINAL)>0&&this._plugins.hasEmissions,p=l?U.ColorEmission:U.Color;this._renderContext.time=t,this._renderContext.output=p,this._bindParameters.oitPass=re.NONE,this._bindParameters.alignPixelEnabled=h,this._bindParameters.decorations=!i,this._bindParameters.mainDepth=null,this._bindParameters.slicePlane=this._sliceHelper.plane,this._bindParameters.viewshedEnabled=this._nodes.produces(D.VIEWSHED),this._renderOverlay(t),s.setGLViewport(this._rctx);const u=this._framebuffer,m=u.initialize(s.fullWidth,s.fullHeight,this._backgroundColor,l);this.hasReflections?(m?.setName("last frame color"),this._bindParameters.ssr.lastFrameColor=m):m?.release(),this._ensureBindParametersCamera(s,a),this._updateHUDOccludedFragmentOpacity(n,t),this._plugins.prepareRender(),this._bindParameters.shadowHighlightsVisible=this._needsShadowHighlight&&!i;const c=this._highQualityTransparency&&this._hasTransparentTerrain,g=this._plugins.produces(U.Color,...xe);this._precompilePrepasses(),this.performanceInfo.advance(Ae.PREPARE);const f=this._computeDepthRange(s);this._renderShadowMap(s,this._bindParameters.lighting.mainLight.direction,f),this._ensureBindParametersCamera(s,a),this._pluginInput.set("normals",this._renderNormals()),this._renderRemainingGeometryDepth(),this._renderShadowAccumulation(f,s,a),this._ensureBindParametersSSR(t),this._precompileShaders(c,g,p),this._renderContext.output=p,u.bind(),this._bindParameters.mainDepth=u.depth.attachment;const b=this.plugins.produces(U.Color,...ye);b&&this._renderOpaqueGeometry(),u.update((e=>this._renderNodes(N.OPAQUE,e,b))),this.fboCache.debugCallback?.(N.OPAQUE,u.color.fbo),u.update((e=>this._renderNodes(D.OPAQUE_ENVIRONMENT,e))),this.fboCache.debugCallback?.(D.OPAQUE_ENVIRONMENT,u.color.fbo),this._renderTerrainDepth(c),this._renderEdges(ce.OPAQUE),u.bind(),this._renderPlugins(_e.VOXEL,Ae.VOXEL),this._renderHiddenTransparentEdges(),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,p):this._renderTransparentGeometry()),u.update((e=>this._renderNodes(N.TRANSPARENT,e,g))),this.fboCache.debugCallback?.(N.TRANSPARENT,u.color.fbo),this._renderGeometryDepth(c),this._renderHUDVisibility(),c||this._plugins.render(this._pluginInput,_e.LINE_CALLOUTS),this._renderEdges(ce.TRANSPARENT);const A=this._hasTransparentTerrain?this._renderTransparentTerrain():null;A&&(this.performanceInfo.advance(Ae.TRANSPARENT_TERRAIN),this._bindParameters.hudVisibility&&(c?this._renderLineCallouts(G.Occluded):(this._rctx.bindFramebuffer(this._bindParameters.hudVisibility?.fbo),this._compositingHelper.compositeHUD(this._bindParameters,A.getTexture())),this._renderHUD(G.Occluded,u.color,p))),this._bindParameters.cullAboveTerrain=!1,A&&(u.bind(),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,A.getTexture()),A.release(),c&&(this._renderEdges(ce.OPAQUE),g&&(this._oitEnabled?this._renderOIT(Oe.Geometry,p):this._renderTransparentGeometry(),this.performanceInfo.advance(Ae.TRANSPARENT)),this._renderEdges(ce.TRANSPARENT))),this._bindParameters.ssao=d(this._bindParameters.ssao),c&&this._renderLineCallouts(G.NotOccluded),this._bindParameters.terrainDepthTest=!1,this._renderTransparentEnvironment(),this._pluginInput.set(D.FOCUSAREA,this._renderFocusAreaGeometry()),u.update((e=>this._renderNodes(D.TRANSPARENT_ENVIRONMENT,e))),u.update((e=>this._renderNodes(D.VIEWSHED,e))),u.update((e=>this._renderNodes(D.LASERLINES,e))),u.update((e=>this._renderNodes(D.FOCUSAREA_COLOR,e))),u.update((e=>this._renderNodes(D.OCCLUDED,e))),this._pluginInput.set("highlights",this._renderHighlightPrepass());const T=r===ne.ObjectAndLayerID?this._renderObjectAndLayerIdColor():null;u.update((e=>this._renderNodes(N.COMPOSITE,e))),this._pluginInput.release(D.FOCUSAREA);const E=!(r!==ne.Default||_||o&&!i),P=this._pluginInput.get(N.COMPOSITE),R=E?L:this.fboCache.acquire(P.fbo.width,P.fbo.height,D.ANTIALIASING),S=this._nodes.produces(D.ANTIALIASING)?this._renderNodes(D.ANTIALIASING,R):this._blitFBO(P,R,!1);let I;this._pluginInput.set(D.ANTIALIASING,S),this._hasHUDHighlights?(this._renderHUD(G.NotOccluded,S,p),I=this._renderNodes(D.HIGHLIGHTS,S)):(I=this._renderNodes(D.HIGHLIGHTS,S),this._renderHUD(G.NotOccluded,I,p));const C=this._renderNodes(D.MAGNIFIER,I);return o&&!i&&r===ne.Default&&!_&&this._blitFBO(C),_?(C.attachDepth(u.depth),this._blitFBO(this._renderNodes(N.FINAL,C)),C.detachDepth()):this._pluginInput.set(N.FINAL,C),this._pluginInput.release("highlights"),this.onPostRender&&this.onPostRender(),this._releaseFBOs(),u.releaseDepth(),this._renderContext.lastFrameCamera.copyFrom(this._bindParameters.camera),this.fboCache.frameEnd(),this.performanceInfo.finishFrame(),r!==ne.Default&&(this._releaseFBOs(),this._disposeOffscreenBuffers()),new fe(this._pluginInput.get(N.FINAL),T)}_precompileShaders(e,t,r){++this._plugins.context.techniques.precompiling,this._renderContext.output=r,this._precompileOpaqueGeometry(),this._nodes.precompile(D.OPAQUE_ENVIRONMENT),this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,this._renderContext.output=U.Depth,this._plugins.precompile(_e.TRANSPARENT_TERRAIN),e&&(this._precompileOpaqueGeometry(),this._precompileTransparentGeometry()),this._renderContext.output=r,this._plugins.precompile(_e.TRANSPARENT_TERRAIN),t&&(this._precompileTransparentGeometry(),this._hasTransparentTerrain&&(this._bindParameters.cullAboveTerrain=!1,this._precompileTransparentGeometry(),this._bindParameters.cullAboveTerrain=e)),this._nodes.precompile(D.FOCUSAREA),this._needsHUDVisibility&&this._plugins.precompile(_e.OCCLUSION_PIXELS),this._plugins.precompile(_e.LINE_CALLOUTS),this._precompileHUD(G.Occluded),this._bindParameters.terrainDepthTest=!1,this._bindParameters.cullAboveTerrain=!1,this._nodes.precompile(D.VIEWSHED,D.LASERLINES,D.FOCUSAREA_COLOR,D.OCCLUDED,D.ANTIALIASING,D.HIGHLIGHTS);const i=this._bindParameters;i.highlightMixTexture=i.highlights.length>1?this._rctx.emptyTexture:null,this._precompileHUD(G.NotOccluded),this._hasHighlights&&(i.highlights.forEach(((e,t)=>{i.highlightLevel=t,this._precompileAllGeometry(U.Highlight)})),i.highlightLevel=null),i.highlightMixTexture=null,this._nodes.precompile(N.COMPOSITE,D.MAGNIFIER),this._shadowAccumulator.precompile(),this._plugins.precompile(_e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),--this._plugins.context.techniques.precompiling}_renderFocusAreaGeometry(){if(!this._nodes.produces(D.FOCUSAREA))return null;const{width:e,height:t}=this._framebufferSize;let r=this.fboCache.acquire(e,t,D.FOCUSAREA);return r=this._nodes.render(r,this._pluginInput),this.performanceInfo.advance(Ae.FOCUS_AREA_MASK),r}_renderObjectAndLayerIdColor(){if(!this._nodes.produces("olid"))return null;const e=this._renderContext.output;++this._techniques.precompiling;const t=this._framebufferSize;let r=this.fboCache.acquire(t.width,t.height,"olid");return r.acquireDepth(Ee),r=this._nodes.render(r,this._pluginInput),--this._techniques.precompiling,this.performanceInfo.advance(Ae.OBJECT_AND_LAYER_ID_COLOR),this._renderContext.output=e,r}finish(e){this._hasAnimations||this._animationTimestep.clear();const t=this.performanceInfo.gpuSamplingEnabled,r=e===X.BACKGROUND;if(r||t){const e=r?this.performanceInfo.elapsedTime:0;let i=0;t?i=this.performanceInfo.totalGPUTimeSampler.last:this._rctx.gl.finish();const s=Math.max(e,i);this._animationTimestep.frame(s,r)}}readMainDepth(e,t){const{mainDepth:r,camera:i}=this._bindParameters;if(!r)return;const s=this.fboCache.acquire(this._framebufferSize.width,this._framebufferSize.height,"linear-depth");this._rctx.bindFramebuffer(s.fbo),i.setGLViewport(this._rctx),this._rctx.setScissorRect(e[0],e[1],e[2],e[3]),this._rctx.setScissorTestEnabled(!0),this._rctx.clearFramebuffer(w),this._compositingHelper.blitDepthToLinearDepth(this._bindParameters,r),this._rctx.setScissorTestEnabled(!1),this._rctx.setScissorRect(0,0,this._rctx.gl.canvas.width,this._rctx.gl.canvas.width),s.fbo?.readPixels(e[0],e[1],e[2],e[3],Pe.RGBA,Re.UNSIGNED_BYTE,t),s.release()}readHUDVisibility(e,t,r,i,s){this._bindParameters.hudVisibility?.fbo?.readPixels(e,t,r,i,Pe.RGBA,Re.UNSIGNED_BYTE,s)}readAccumulatedShadow(e){return this._shadowAccumulator.readAccumulatedShadow(e[0],e[1])}_renderEdges(e){const t=this._edgeView;if(!t?.shouldRender())return;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"edges"),s=()=>t.render(this._bindParameters,e),a=this._bindParameters.geometryDepth;this.renderToTargets(s,i,a??this._framebuffer.depth,w),this._framebuffer.bind(),this._compositingHelper.composite(this._bindParameters,i.getTexture()),i.release(),this.performanceInfo.advance(e===ce.OPAQUE?Ae.OPAQUE_EDGES:Ae.TRANSPARENT_EDGES)}_renderOverlay(e){this._bindParameters.overlay=this.overlay?.render(e),this._bindParameters.overlay&&this.performanceInfo.advance(Ae.OVERLAY)}_renderShadowMap(e,t,r){if(!this.shadowsEnabled)return;const i=this._shadowMap;i.start(e,t,r,this.isFeatureEnabled(oe.HighResolutionShadows),this.stage.view.qualitySettings.maximumPixelRatio),this._needsShadowHighlight?(this._renderShadowCascades(U.ShadowHighlight,this._shadowMap),i.moveSnapshot(ue.Highlight),this._renderShadowCascades(U.ShadowExcludeHighlight,this._shadowMap),i.copySnapshot(ue.ExcludeHighlight),this._renderShadowCascades(U.ShadowHighlight,this._shadowMap)):this._renderShadowCascades(U.Shadow),i.finish(),e.setGLViewport(this._rctx),this.performanceInfo.advance(Ae.SHADOW_MAP)}_precompileShadowCascades(e){for(const t of this._shadowMap.cascades)t.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(t.camera,t.camera),this._precompileAllGeometry(e)}_renderShadowCascades(e,t=this._shadowMap){for(const r of t.cascades)r.camera.setGLViewport(this._rctx),this._ensureBindParametersCamera(r.camera,r.camera),this.renderAllGeometry(e)}get _needsDepth(){return this._plugins.consumes(U.Depth)||this._nodes.requireGeometryDepth()||this.hasReflections||this._needsShadowHighlight||this._needsShadowAccumulation||this._debugNeedsDepth}_renderRemainingGeometryDepth(){const e=this._pluginInput.get("normals");if(e){const t=this._needsDepth?e.getAttachment(Ee):null;t?.retain(),this._pluginInput.set(D.SSAO,this._renderSSAO()),this._renderGeometryWithoutNormalsDepth(t)}else this._renderAllGeometryDepth()}_renderGeometryWithoutNormalsDepth(e){if(!this._needsDepth||!e)return void(this._bindParameters.depth=d(this._bindParameters.depth));const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"depth");r.attachDepth(e),e.release(),this._rctx.bindFramebuffer(r.fbo),this._rctx.clear(Se.STENCIL),this._renderGeometryWithoutNormals(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=r.obtainDepthTexture(),r.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderAllGeometryDepth(){if(!this._needsDepth)return void(this._bindParameters.depth=d(this._bindParameters.depth));const e=this._framebufferSize,t=this.fboCache.acquire(e.width,e.height,"depth").acquireDepth(Ee);this._rctx.bindFramebuffer(t.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this.renderAllGeometry(U.Depth),d(this._bindParameters.depth),this._bindParameters.depth=t.obtainDepthTexture(),t.release(),this.performanceInfo.advance(Ae.DEPTH)}_renderTerrainDepth(e){if(this._bindParameters.terrainDepthTest=e,this._bindParameters.cullAboveTerrain=e,!e)return void(this._bindParameters.terrainDepth=d(this._bindParameters.terrainDepth));const t=this._renderContext.output;this._renderContext.output=U.Depth;const r=this._framebufferSize,i=this.fboCache.acquire(r.width,r.height,"terrain depth").acquireDepth(Ee);this._rctx.bindFramebuffer(i.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderTransparentTerrain(),d(this._bindParameters.terrainDepth),this._bindParameters.terrainDepth=i.obtainDepthTexture(),this._renderContext.output=t,i.release()}_renderGeometryDepth(e){if(!e)return void(this._bindParameters.geometryDepth=d(this._bindParameters.geometryDepth));const t=this._renderContext.output,{width:r,height:i}=this._framebufferSize,s=this.fboCache.acquire(r,i,"geometry depth").acquireDepth(Ee);this._rctx.bindFramebuffer(s.fbo),this._rctx.clear(Se.DEPTH|Se.STENCIL),this._renderOpaqueAndTransparentGeometry(U.Depth),this._renderContext.output=t,d(this._bindParameters.geometryDepth),this._bindParameters.geometryDepth=s.obtainDepthTexture(),s.release()}get _needsDepthRange(){return this._shadowMap.enabled||this._needsShadowAccumulation}_computeDepthRange(e){if(!this._needsDepthRange)return J.zero;const t=Z(e,this._plugins.plugins,this.stage.layers);return t.union(this._plugins.queryDepthRange(e)),t.near=Math.max(e.near,t.near),t.far=Math.min(e.far,t.far),t}get _normalsRequired(){const e=this._nodes.require("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED,D.LASERLINES);return(this.hasSSAO?1:0)+e}_precompilePrepasses(){this._normalsRequired&&this._precompileAllGeometry(U.Normal),this._needsDepth&&this._precompileAllGeometry(U.Depth),this.shadowsEnabled&&(this._needsShadowHighlight?(this._precompileShadowCascades(U.ShadowHighlight),this._precompileShadowCascades(U.ShadowExcludeHighlight),this._precompileShadowCascades(U.ShadowHighlight)):this._precompileShadowCascades(U.Shadow)),this._needsShadowAccumulation&&this._precompileAllGeometry(U.Shadow)}_renderNormals(){const e=this._normalsRequired;if(0===e)return;const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"normals",x.RGBA8);r.acquireDepth(Ee),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer(w,!0,!0),this._renderGeometryWithNormals(U.Normal);const i=this._nodes.optional("normals",N.FINAL,N.COMPOSITE,N.OPAQUE,N.TRANSPARENT,D.VIEWSHED);return r.retain(e+i-1),this.performanceInfo.advance(Ae.NORMALS),r}_renderSSAO(){const e=this._pluginInput.get("normals");if(!this.hasSSAO||!e)return void e?.detachDepth();L.setName(D.SSAO);const t=this._nodes.render(L,this._pluginInput);return this._bindParameters.ssao=t,e.detachDepth(),this._pluginInput.release("normals"),this.performanceInfo.advance(Ae.SSAO),t}_precompileAllGeometry(e){const t=this._renderContext.output;this._renderContext.output=e,this._precompileOpaqueGeometry(),this._precompileTransparentGeometry(),this._plugins.precompile(_e.TRANSPARENT_TERRAIN),this._renderContext.output=t}renderAllGeometry(e){this._renderContext.output=e,this._renderOpaqueAndTransparentGeometry(e),this._renderTransparentTerrain()}precompileSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.precompile(this._renderContext)}precompileOccludedSlots(e,t){for(const r of t)this._renderContext.renderOccludedMask=r,this.precompileSlots(e,...He);this._renderContext.renderOccludedMask=se}renderSlots(e,...t){for(const r of t)this._bindParameters.slot=r,e.forAll((e=>{const t=e.acquireTechniques(this._renderContext);t&&e.render(this._renderContext,t,this._pluginInput)}))}renderOccludedSlots(e,t){this._renderContext.renderOccludedMask=t,this.plugins.renderOccludedFlags>te.Occlude&&this._plugins.render(this._pluginInput,_e.OCCLUDED_TERRAIN),this.renderSlots(e,...He),this._renderContext.renderOccludedMask=se}renderHUD(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,_e.HUD_MATERIAL)}precompileViewshedShadowMap(){this._precompileAllGeometry(U.ViewshedShadow)}renderViewshedShadowMap(e){const{camera:t,contentCamera:r}=this._bindParameters,i=this._renderContext.output;e.setGLViewport(this._rctx),this._ensureBindParametersCamera(e,e),this.renderAllGeometry(U.ViewshedShadow),this._ensureBindParametersCamera(t,r),this._bindParameters.camera.setGLViewport(this._rctx),this._renderContext.output=i}_renderOpaqueAndTransparentGeometry(e){this._renderContext.output=e,this._renderOpaqueGeometry(),this._renderTransparentGeometry()}_renderGeometryWithNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...Ne),this._renderTransparentTerrain()}_renderGeometryWithoutNormals(e){this._renderContext.output=e,this._plugins.render(this._pluginInput,...De)}_precompileOpaqueGeometry(){this._plugins.precompile(...ye)}_renderOpaqueGeometry(){this._plugins.render(this._pluginInput,...ye)}_renderTransparentGeometry(){this._plugins.render(this._pluginInput,...xe)}get _hasTransparentTerrain(){return this._plugins.produces(U.Color,_e.TRANSPARENT_TERRAIN)}_renderTransparentTerrain(){const e=()=>this._plugins.render(this._pluginInput,_e.TRANSPARENT_TERRAIN);if(!v(this._renderContext.output))return void e();const t=this._framebufferSize,r=this.fboCache.acquire(t.width,t.height,"transparent terrain");return this.renderToTargets(e,r,this._framebuffer.depth,w),r}get _needsHUDVisibility(){return this._plugins.produces(this._renderContext.output,_e.OCCLUSION_PIXELS)}_renderHUDVisibility(){if(!this._needsHUDVisibility)return void(this._bindParameters.hudVisibility=d(this._bindParameters.hudVisibility));const{width:e,height:t}=this._framebufferSize;let r=this._bindParameters.hudVisibility;r?.fbo?.width===e&&r?.fbo?.height===t||(r?.release(),r=this.fboCache.acquire(e,t,"hud visibility",x.RGBA4),this._bindParameters.hudVisibility=r);const i=this._bindParameters.geometryDepth;r.attachDepth(i||this._framebuffer.depth),this._rctx.bindFramebuffer(r.fbo),this._rctx.clearFramebuffer([0,1,0,1]),this._plugins.render(this._pluginInput,_e.OCCLUSION_PIXELS),r.detachDepth(),this._framebuffer.bind(),this.performanceInfo.advance(Ae.HUD_VISIBILITY)}_renderLineCallouts(e){if(this._bindParameters.hudRenderStyle=e,e===G.Occluded){const e=()=>this._plugins.render(this._pluginInput,_e.LINE_CALLOUTS),t=this._framebufferSize,r=this.fboCache.acquireDepth(H,t.width,t.height,"line callouts");this.renderToTargets(e,this._framebuffer.color,r,void 0,!0,!0),r.release()}else this._plugins.render(this._pluginInput,_e.LINE_CALLOUTS)}_precompileHUD(e){if(this._precompileHUDOutput(e),this._hasHighlights){const t=this._renderContext.output;this._renderContext.output=U.Highlight,this._precompileHUDOutput(e),this._renderContext.output=t}}_precompileHUDOutput(e){const t=this._bindParameters.hudRenderStyle;this._bindParameters.hudRenderStyle=e,this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...Me),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...Me),this._bindParameters.hudRenderStyle=t}_renderHUD(e,t,r){if(this._pluginsHas.hudElements){if(this._oitEnabled){const i=this._renderOIT(Oe.HUD,r,e);this._rctx.bindFramebuffer(t.fbo),this._compositingHelper.compositePreMultipliedAlpha(this._bindParameters,i.getTexture()),i.release()}else if(this._renderContext.output=r,e===G.Occluded){const t=()=>this._renderHUDElements(e),r=this._framebufferSize,i=this.fboCache.acquireDepth(H,r.width,r.height,"hud");this.renderToTargets(t,this._framebuffer.color,i,void 0,!0,!0),i.release()}else t.acquireDepth(H),this._rctx.bindFramebuffer(t.fbo),this._renderHUDElements(e),t.detachDepth();this.performanceInfo.advance(e===G.Occluded?Ae.HUD_OCCLUDED:Ae.HUD)}}_renderHUDElements(e){this._bindParameters.hudRenderStyle=e,this._plugins.render(this._pluginInput,...Me)}get _needsShadowHighlight(){return this.shadowsEnabled&&this._plugins.produces(U.ShadowHighlight,_e.OPAQUE_MATERIAL)}_renderHighlightPrepass(){if(!this._hasHighlights)return;const{fboCache:e,_rctx:t,_bindParameters:r}=this,i=this._framebufferSize,{highlights:s}=r,a=e.acquire(i.width,i.height,"highlights",s.length>Q?x.RG8UI:x.R8UI);a.acquireDepth(Ee),t.bindFramebuffer(a.fbo);const{gl:n}=t;return n.clearBufferuiv(n.COLOR,0,[0,0,0,0]),this._renderContext.output=U.Highlight,t.bindFramebuffer(a.fbo),W(t,e,i,r,(()=>this._renderHighlightGeometries())),this.performanceInfo.advance(Ae.HIGHLIGHTS),a}_renderHighlightGeometries(){this._plugins.render(this._pluginInput,...Le),this._rctx.clear(Se.DEPTH),this._renderHUDElements(G.Both)}get _needsShadowAccumulation(){return this._shadowAccumulator.accumulating}_renderShadowAccumulation(e,t,r){this._needsShadowAccumulation&&this._bindParameters.depth&&this._shadowAccumulator.renderAccumulation(this._bindParameters.depth,e,t,r)&&this.performanceInfo.advance(Ae.ACCUMULATED_SHADOWS)}_precompileTransparentGeometry(){this._oitEnabled&&v(this._renderContext.output)?(this._bindParameters.oitPass=re.ColorAlpha,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.FrontFace,this._plugins.precompile(...xe),this._bindParameters.oitPass=re.NONE):this._plugins.precompile(...xe)}_renderOIT(e,t,r=G.Both){const i=e===Oe.HUD,s=this._framebufferSize,a=i?this.fboCache.acquire(s.width,s.height,"oit hud composite"):null,n=i?()=>this._renderHUDElements(r):()=>this._renderTransparentGeometry(),h=this._bindParameters,o=this._renderContext.output;this._renderContext.output=t,h.oitPass=re.ColorAlpha;const d=a?"oit hud color+alpha":"oit color+alpha",_=t===U.ColorEmission,l=this.fboCache.acquire(s.width,s.height,d,_?x.RGBA16F:x.RGBA16F_NEAREST);_&&l.acquireColor(Ie,x.RGBA16F,"emissive"),l.acquireColor(_?Ce:Ie,x.R16F),a||l.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(l.fbo),this._rctx.clearFramebuffer([0,0,0,1]),_&&this._rctx.clearBuffer(1,I),n(),l.detachDepth(),h.oitPass=re.FrontFace;const p=this.fboCache.acquire(s.width,s.height,a?"oit hud front":"oit front");return _&&p.acquireColor(Ie,x.RGBA16F,"emissive"),a?p.acquireDepth(H):p.attachDepth(this._framebuffer.depth),this._rctx.bindFramebuffer(p.fbo),this._rctx.clearFramebuffer(w,!!a),n(),p.detachDepth(),h.oitPass=re.NONE,a?(this._rctx.bindFramebuffer(a.fbo),this._rctx.setClearColor(0,0,0,1e-13),this._rctx.clear(Se.COLOR)):this._framebuffer.bind(),this._oitblend??=new k(this._techniques),this._oitblend.blend(this._rctx,l,p,h,_),a?.detachDepth(),p.release(),l.release(),this._renderContext.output=o,a}_renderTransparentEnvironment(){this._shadowAccumulator.render(this._bindParameters),this.performanceInfo.advance(Ae.APPLY_ACCUMULATED_SHADOWS),this._framebuffer.bind(),this._plugins.render(this._pluginInput,_e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH),this.performanceInfo.advance(Ae.TRANSPARENT_MATERIAL_WITHOUT_DEPTH)}_renderPlugins(e,t){this._plugins.produces(this._renderContext.output,e)&&(this._plugins.render(this._pluginInput,e),this.performanceInfo.advance(t))}_renderNodes(e,t,r=!1){if(t.setName(e),this._pluginInput.set(e,t),!this._nodes.produces(e))return r&&this.performanceInfo.advance(e),t;const i=this._nodes.render(t,this._pluginInput,this._releaseNormals);return this.performanceInfo.advance(e),i}_blitFBO(e,t=L,r=!0){return this._blit??=new B(this._techniques),this._blit.blit(this._rctx,e,t,this._bindParameters),this._pluginInput.set(e.name,t),r&&e.release(),t}_ensureBindParametersCamera(e,t){this._bindParameters.camera=e,this._bindParameters.contentCamera=t}_ensureBindParametersSSR(e){if(this._bindParameters.ssr.lastFrameColor){null==this._ssrEnableTime&&(this._ssrEnableTime=e),this._renderContext.lastFrameCamera.equals(this._bindParameters.camera)?this._reprojectionMatrix=P:(T(Ue,this._bindParameters.camera.viewMatrix),T(Fe,this._bindParameters.camera.projectionMatrix),E(ve,Ue,Fe),E(ve,this._renderContext.lastFrameCamera.viewMatrix,ve),E(ve,this._renderContext.lastFrameCamera.projectionMatrix,ve),this._reprojectionMatrix=ve);const t=this.stage.view.qualitySettings.fadeDuration;this._bindParameters.ssr.fadeFactor=t>0?Math.min(t,e-this._ssrEnableTime)/t:1,this._bindParameters.ssr.fadeFactor<1&&this._requestRender()}else this._reprojectionMatrix=P,this._ssrEnableTime=null}addRenderNode(e){this._nodes.add(e),this._requestRender()}removeRenderNode(e){this._nodes.remove(e),this._requestRender()}updateLighting(e,t,r,i){this._bindParameters.updateLighting(e,t,r,i),this._requestRender(X.UPDATE)}get usedMemory(){return{fbos:this.fboCache.usedMemory,plugins:this._plugins.usedMemory,edges:this.edgeView?.usedMemory??0}}renderToTargets(e,t,r,i,s=!1,a=!1){t.attachDepth(r),this._rctx.bindFramebuffer(t.fbo),this._rctx.clearFramebuffer(i,s,a),e(),t.detachDepth()}get test(){}};var Oe;e([f({readOnly:!0})],we.prototype,"fullResolutionAtmosphere",null),e([f()],we.prototype,"_edgeView",void 0),e([f()],we.prototype,"updating",null),we=e([b("esri.views.3d.webgl-engine.lib.Renderer")],we),function(e){e[e.Geometry=0]="Geometry",e[e.HUD=1]="HUD"}(Oe||(Oe={}));const Ne=[_e.INTEGRATED_MESH,_e.OPAQUE_TERRAIN,_e.OPAQUE_MATERIAL,_e.TRANSPARENT_MATERIAL],De=[_e.OPAQUE_MATERIAL_WITHOUT_NORMALS,_e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],ye=[_e.INTEGRATED_MESH,_e.OPAQUE_TERRAIN,_e.OPAQUE_MATERIAL,_e.OPAQUE_MATERIAL_WITHOUT_NORMALS],xe=[_e.TRANSPARENT_MATERIAL,_e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS],He=[_e.OPAQUE_MATERIAL,_e.TRANSPARENT_MATERIAL,_e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH],Me=[_e.LINE_CALLOUTS_HUD_DEPTH,_e.HUD_MATERIAL,_e.LABEL_MATERIAL],Le=[_e.TRANSPARENT_MATERIAL,_e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS,_e.OPAQUE_MATERIAL,_e.OPAQUE_MATERIAL_WITHOUT_NORMALS,_e.TRANSPARENT_TERRAIN,_e.INTEGRATED_MESH,_e.OPAQUE_TERRAIN],Fe=R(),Ue=R(),ve=R();function Ge(e){return t=>e.immediate.schedule(t)}export{we as Renderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{p as e,i as r,c as t,n as s,d as a,l as i,h as o,f as n,q as l}from"../../../../chunks/vec32.js";import{ZEROS as c,create as m,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as h}from"../../../../symbols/support/materialUtils.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as f,isShadowRelatedOutput as T,is3DGeometryOutput as v,ShaderOutput as x,isColorOrColorEmission as g}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as b}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as S}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as O}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as M}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as y}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as w,AlphaDiscardMode as C}from"../lib/basicInterfaces.js";import{GLTextureMaterial as R}from"../lib/GLTextureMaterial.js";import{Material as A}from"../lib/Material.js";import{OITPolygonOffsetLimit as I}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as P}from"../lib/RayIntersections.js";import{RenderSlot as j}from"../lib/RenderSlot.js";import{VertexAttribute as E}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as L}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as D}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as N}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as _,DefaultMaterialPassParameters as B}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as V}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as z}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as U}from"../../../../webscene/support/AlphaCutoff.js";class q extends A{constructor(e,r){super(e,W),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[j.OPAQUE_MATERIAL,e=>(f(e)||T(e))&&!this.transparent],[j.TRANSPARENT_MATERIAL,e=>(f(e)||T(e))&&this.transparent&&this.parameters.writeDepth],[j.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(v(e)||T(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=H(this.parameters),this._configuration=new V(r.spherical)}isVisibleForOutput(e){return e!==x.Shadow&&e!==x.ShadowExcludeHighlight&&e!==x.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r?1:s[3])>=U}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,c)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===h.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===h.Color)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=!a&&!!t.normalTextureId,s.hasColorTexture=!!t.textureId,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.isInstanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.vvSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?b.Attribute:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,null!=t.customDepthTest&&(s.customDepthTest=t.customDepthTest),s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?w.None:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?O.WindingOrder:i&&"normal"===o?O.View:i&&"winding-order"===o?O.WindingOrder:O.None,s.instancedColor=t.hasInstancedColor,g(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.vvColor=!!t.vvColor,s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?M.Schematic:M.Normal:M.Disabled,s.hasMetallicRoughnessTexture=!a&&!!t.metallicRoughnessTextureId,s.emissionSource=a?S.None:null!=t.emissiveTextureId&&t.emissiveSource===h.Emissive?S.Texture:t.usePBR?t.emissiveSource===h.Emissive?S.EmissiveColor:S.SymbolColor:S.None,s.hasOcclusionTexture=!a&&!!t.occlusionTextureId,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.camera.relativeElevation<I,s.snowCover=G(r),s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,c,m,u,h,d){if(null!=this.parameters.verticalOffset){const e=m.camera;r(X,c[12],c[13],c[14]);let d=null;switch(m.viewingMode){case p.Global:d=s(J,X);break;case p.Local:d=t(J,Y)}let f=0;const T=a(Z,X,e.eye),v=i(T),x=o(T,T,1/v);let g=null;this.parameters.screenSizePerspective&&(g=n(d,x)),f+=N(e,v,this.parameters.verticalOffset,g??0,this.parameters.screenSizePerspective),o(d,d,f),l(K,d,m.transform.inverseRotation),u=a(F,u,K),h=a(Q,h,K)}P(e,m,u,h,L(m.verticalOffset),d)}createGLMaterial(e){return new k(e)}createBufferWriter(){return new D(this._vertexBufferLayout)}get transparent(){const{parameters:{drivenOpacity:e,opacity:r,externalColor:[t,s,a,i],layerOpacity:o,texture:n,textureId:l,textureAlphaMode:c,colorMixMode:m}}=this;return e||r<1&&"replace"!==m||i<1&&"ignore"!==m||o<1||(null!=n||null!=l)&&c!==C.Opaque&&c!==C.Mask&&"replace"!==m}}class k extends R{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?z:_,e)}}class W extends B{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function G(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}function H(e){const r=d().vec3f(E.POSITION);e.normalType===b.Compressed?r.vec2i16(E.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(E.NORMAL),e.hasVertexTangents&&r.vec4f(E.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f16(E.UV0),e.hasVertexColors&&r.vec4u8(E.COLOR),e.hasSymbolColors&&r.vec4u8(E.SYMBOLCOLOR),y()&&r.vec4u8(E.OLIDCOLOR),r}const F=m(),Q=m(),Y=u(0,0,1),J=m(),K=m(),X=m(),Z=m();export{k as DefaultGLMaterial,q as DefaultMaterial,W as DefaultMaterialParameters};
5
+ import{p as e,i as r,c as t,n as s,d as a,l as i,h as o,f as n,q as l}from"../../../../chunks/vec32.js";import{ZEROS as c,create as m,fromValues as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{EmissiveSourceMode as h}from"../../../../symbols/support/materialUtils.js";import{ViewingMode as p}from"../../../ViewingMode.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import{is3DGeometryOutputMRT as f,isShadowRelatedOutput as T,is3DGeometryOutput as v,ShaderOutput as x,isColorOrColorEmission as g,isColorEmission as b}from"../core/shaderLibrary/ShaderOutput.js";import{NormalType as S}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{EmissionSource as O}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as M}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as y}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as w}from"../effects/geometry/olidUtils.js";import{CullFaceOptions as C,AlphaDiscardMode as R}from"../lib/basicInterfaces.js";import{GLTextureMaterial as A}from"../lib/GLTextureMaterial.js";import{Material as I}from"../lib/Material.js";import{OITPolygonOffsetLimit as P}from"../lib/OrderIndependentTransparency.js";import{intersectTriangleGeometry as j}from"../lib/RayIntersections.js";import{RenderSlot as E}from"../lib/RenderSlot.js";import{VertexAttribute as L}from"../lib/VertexAttribute.js";import{getVerticalOffsetObject3D as D}from"../lib/verticalOffsetUtils.js";import{DefaultBufferWriter as N}from"./DefaultBufferWriter.js";import{verticalOffsetAtDistance as B}from"./internal/MaterialUtil.js";import{DefaultMaterialTechnique as _,DefaultMaterialPassParameters as V}from"../shaders/DefaultMaterialTechnique.js";import{DefaultMaterialTechniqueConfiguration as z}from"../shaders/DefaultMaterialTechniqueConfiguration.js";import{RealisticTreeTechnique as U}from"../shaders/RealisticTreeTechnique.js";import{alphaCutoff as q}from"../../../../webscene/support/AlphaCutoff.js";class k extends I{constructor(e,r){super(e,G),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[E.OPAQUE_MATERIAL,e=>(f(e)||T(e))&&!this.transparent],[E.TRANSPARENT_MATERIAL,e=>(f(e)||T(e))&&this.transparent&&this.parameters.writeDepth],[E.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>(v(e)||T(e))&&this.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=F(this.parameters),this._configuration=new z(r.spherical)}isVisibleForOutput(e){return e!==x.Shadow&&e!==x.ShadowExcludeHighlight&&e!==x.ShadowHighlight||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:r,opacity:t,externalColor:s}=this.parameters;return e*("replace"===r?1:t)*("ignore"===r?1:s[3])>=q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!e(this.parameters.emissiveBaseColor,c)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(this.parameters.emissiveSource===h.Emissive&&this._hasEmissiveBase||this.parameters.emissiveSource===h.Color)}getConfiguration(e,r){const{parameters:t,_configuration:s}=this,{treeRendering:a,doubleSided:i,doubleSidedType:o}=t;return super.getConfiguration(e,r,this._configuration),s.hasNormalTexture=!a&&!!t.normalTextureId,s.hasColorTexture=!!t.textureId,s.hasVertexTangents=!a&&t.hasVertexTangents,s.instanced=t.isInstanced,s.instancedDoublePrecision=t.instancedDoublePrecision,s.vvSize=!!t.vvSize,s.hasVerticalOffset=null!=t.verticalOffset,s.hasScreenSizePerspective=null!=t.screenSizePerspective,s.hasSlicePlane=t.hasSlicePlane,s.alphaDiscardMode=t.textureAlphaMode,s.normalType=a?S.Attribute:t.normalType,s.transparent=this.transparent,s.writeDepth=t.writeDepth,null!=t.customDepthTest&&(s.customDepthTest=t.customDepthTest),s.hasOccludees=r.hasOccludees,s.cullFace=t.hasSlicePlane?C.None:t.cullFace,s.cullAboveTerrain=r.cullAboveTerrain,s.hasModelTransformation=!a&&null!=t.modelTransformation,s.hasVertexColors=t.hasVertexColors,s.hasSymbolColors=t.hasSymbolColors,s.doubleSidedMode=a?M.WindingOrder:i&&"normal"===o?M.View:i&&"winding-order"===o?M.WindingOrder:M.None,s.instancedColor=t.hasInstancedColor,g(e)?(s.terrainDepthTest=r.terrainDepthTest,s.receiveShadows=t.receiveShadows,s.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=r.ssao):(s.terrainDepthTest=!1,s.receiveShadows=s.receiveAmbientOcclusion=!1),s.vvColor=!!t.vvColor,s.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,s.pbrMode=t.usePBR?t.isSchematic?y.Schematic:y.Normal:y.Disabled,s.hasMetallicRoughnessTexture=!a&&!!t.metallicRoughnessTextureId,s.emissionSource=a?O.None:null!=t.emissiveTextureId&&t.emissiveSource===h.Emissive?O.Texture:t.usePBR?t.emissiveSource===h.Emissive?O.EmissiveColor:O.SymbolColor:O.None,s.hasOcclusionTexture=!a&&!!t.occlusionTextureId,s.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),s.oitPass=r.oitPass,s.enableOffset=r.camera.relativeElevation<P,s.snowCover=H(r),s.hasBloom=b(e),s.hasColorTextureTransform=!!t.colorTextureTransformMatrix,s.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,s.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,s.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,s.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix,s}intersect(e,c,m,u,h,d){if(null!=this.parameters.verticalOffset){const e=m.camera;r(Z,c[12],c[13],c[14]);let d=null;switch(m.viewingMode){case p.Global:d=s(K,Z);break;case p.Local:d=t(K,J)}let f=0;const T=a($,Z,e.eye),v=i(T),x=o(T,T,1/v);let g=null;this.parameters.screenSizePerspective&&(g=n(d,x)),f+=B(e,v,this.parameters.verticalOffset,g??0,this.parameters.screenSizePerspective),o(d,d,f),l(X,d,m.transform.inverseRotation),u=a(Q,u,X),h=a(Y,h,X)}j(e,m,u,h,D(m.verticalOffset),d)}createGLMaterial(e){return new W(e)}createBufferWriter(){return new N(this._vertexBufferLayout)}get transparent(){const{parameters:{drivenOpacity:e,opacity:r,externalColor:[t,s,a,i],layerOpacity:o,texture:n,textureId:l,textureAlphaMode:c,colorMixMode:m}}=this;return e||r<1&&"replace"!==m||i<1&&"ignore"!==m||o<1||(null!=n||null!=l)&&c!==R.Opaque&&c!==R.Mask&&"replace"!==m}}class W extends A{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const s=e.camera.viewInverseTransposeMatrix;return r(t.origin,s[3],s[7],s[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?U:_,e)}}class G extends V{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}}function H(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}function F(e){const r=d().vec3f(L.POSITION);e.normalType===S.Compressed?r.vec2i16(L.NORMALCOMPRESSED,{glNormalized:!0}):r.vec3f(L.NORMAL),e.hasVertexTangents&&r.vec4f(L.TANGENT);return(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&r.vec2f16(L.UV0),e.hasVertexColors&&r.vec4u8(L.COLOR),e.hasSymbolColors&&r.vec4u8(L.SYMBOLCOLOR),w()&&r.vec4u8(L.OLIDCOLOR),r}const Q=m(),Y=m(),J=u(0,0,1),K=m(),X=m(),Z=m(),$=m();export{W as DefaultGLMaterial,k as DefaultMaterial,G as DefaultMaterialParameters};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as s,is3DGeometryOutputMRT as a,isColorOrColorEmission as o,ShaderOutput as n}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as h}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as c}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as u}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as m}from"../effects/geometry/olidUtils.js";import l from"../lib/GLMaterial.js";import{Material as p}from"../lib/Material.js";import{isPathGeometry as d}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as f,intersectAabbInvDir as b}from"../lib/RayIntersections.js";import{RenderSlot as g}from"../lib/RenderSlot.js";import{VertexAttribute as v}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as S}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as T,PathTechnique as A,PathPassParameters as O}from"./PathTechnique.js";import{PathTechniqueConfiguration as R}from"./PathTechniqueConfiguration.js";import{alphaCutoff as y}from"../../../../webscene/support/AlphaCutoff.js";class E extends p{constructor(e,t){super(e,j),this.vertexAttributeLocations=T,this.supportsEdges=!0,this.produces=new Map([[g.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&s(e)||a(e))&&!this.transparent],[g.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&s(e)||a(e))&&this.transparent]]),this._configuration=new R(t.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,o(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?c.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?c.WindingOrder:c.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?u.Schematic:u.Disabled,this._configuration.emissionSource=this.parameters.usePBR?h.SymbolColor:h.None,this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==n.Shadow&&e!==n.ShadowExcludeHighlight&&e!==n.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=y}intersect(r,s,a,o,n,h){const c=r;if(!d(c))return;const u=c.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:a}=this.parameters.vvSize,o=u.sizeAttributeValue;Number.isNaN(o)?(m[0]*=a[0],m[1]*=a[2]):(m[0]*=e(t[0]+o*i[0],r[0],s[0]),m[1]*=e(t[2]+o*i[2],r[2],s[2]))}const l=new f(!1,a.options.normalRequired),p=Math.max(m[0],m[1]),g=r.boundingInfo;if(null==g)return void P(u,m,o,n,l,h);const v=i(g.bbMin[0]-p,g.bbMin[1]-p,g.bbMin[2]-p,g.bbMax[0]+p,g.bbMax[1]+p,g.bbMax[2]+p),S=[n[0]-o[0],n[1]-o[1],n[2]-o[2]],T=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),A=[T/S[0],T/S[1],T/S[2]];b(v,o,A,a.tolerance)&&P(u,m,o,n,l,h)}createBufferWriter(){return new S(this._layout)}get _layout(){const e=r().vec3f(v.POSITION).vec4f16(v.PROFILEVERTEXANDNORMAL).vec3f16(v.PROFILEAUXDATA).vec2i16(v.PROFILERIGHT,{glNormalized:!0}).vec2i16(v.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&e.f32(v.SIZEFEATUREATTRIBUTE),this.parameters.vvColor&&e.f16(v.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&e.f16(v.OPACITYFEATUREATTRIBUTE),m()&&e.vec4u8(v.OLIDCOLOR),e}createGLMaterial(e){return new _(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}class _ extends l{beginSlot(e){return this.getTechnique(A,e)}}function P(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class j extends O{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{j as Parameters,E as PathMaterial};
5
+ import{clamp as e}from"../../../../core/mathUtils.js";import{clone as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{fromValues as i}from"../../../../geometry/support/aaBoundingBox.js";import{newLayout as r}from"../../support/buffer/InterleavedLayout.js";import{isShadowRelatedOutput as s,is3DGeometryOutputMRT as a,isColorOrColorEmission as o,isColorEmission as n,ShaderOutput as h}from"../core/shaderLibrary/ShaderOutput.js";import{EmissionSource as c}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as u}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as m}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{olidEnabled as l}from"../effects/geometry/olidUtils.js";import p from"../lib/GLMaterial.js";import{Material as d}from"../lib/Material.js";import{isPathGeometry as f}from"../lib/PathGeometry.js";import{MeshIntersectionOptions as b,intersectAabbInvDir as g}from"../lib/RayIntersections.js";import{RenderSlot as v}from"../lib/RenderSlot.js";import{VertexAttribute as S}from"../lib/VertexAttribute.js";import{DefaultBufferWriter as T}from"./DefaultBufferWriter.js";import{vertexAttributeLocations as A,PathTechnique as O,PathPassParameters as R}from"./PathTechnique.js";import{PathTechniqueConfiguration as y}from"./PathTechniqueConfiguration.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class _ extends d{constructor(e,t){super(e,w),this.vertexAttributeLocations=A,this.supportsEdges=!0,this.produces=new Map([[v.OPAQUE_MATERIAL,e=>(this.parameters.castShadows&&s(e)||a(e))&&!this.transparent],[v.TRANSPARENT_MATERIAL,e=>(this.parameters.castShadows&&s(e)||a(e))&&this.transparent]]),this._configuration=new y(t.spherical)}get hasEmissions(){return this.parameters.emissiveStrength>0}getConfiguration(e,t){return super.getConfiguration(e,t,this._configuration),this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.vvOpacity=!!this.parameters.vvOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=t.hasOccludees,o(e)?(this._configuration.doubleSidedMode=this.parameters.doubleSided&&"normal"===this.parameters.doubleSidedType?u.View:this.parameters.doubleSided&&"winding-order"===this.parameters.doubleSidedType?u.WindingOrder:u.None,this._configuration.receiveShadows=t.shadowMap.enabled,this._configuration.receiveAmbientOcclusion=null!=t.ssao):this._configuration.receiveShadows=this._configuration.receiveAmbientOcclusion=!1,this._configuration.pbrMode=this.parameters.usePBR?m.Schematic:m.Disabled,this._configuration.emissionSource=this.parameters.usePBR?c.SymbolColor:c.None,this._configuration.hasBloom=n(e),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}isVisibleForOutput(e){return e!==h.Shadow&&e!==h.ShadowExcludeHighlight&&e!==h.ShadowHighlight||this.parameters.castShadows}get visible(){return this.parameters.opacity>=E}intersect(r,s,a,o,n,h){const c=r;if(!f(c))return;const u=c.path,m=t(this.parameters.size);if(this.parameters.vvSize){const{offset:t,factor:i,minSize:r,maxSize:s,fallback:a}=this.parameters.vvSize,o=u.sizeAttributeValue;Number.isNaN(o)?(m[0]*=a[0],m[1]*=a[2]):(m[0]*=e(t[0]+o*i[0],r[0],s[0]),m[1]*=e(t[2]+o*i[2],r[2],s[2]))}const l=new b(!1,a.options.normalRequired),p=Math.max(m[0],m[1]),d=r.boundingInfo;if(null==d)return void j(u,m,o,n,l,h);const v=i(d.bbMin[0]-p,d.bbMin[1]-p,d.bbMin[2]-p,d.bbMax[0]+p,d.bbMax[1]+p,d.bbMax[2]+p),S=[n[0]-o[0],n[1]-o[1],n[2]-o[2]],T=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]),A=[T/S[0],T/S[1],T/S[2]];g(v,o,A,a.tolerance)&&j(u,m,o,n,l,h)}createBufferWriter(){return new T(this._layout)}get _layout(){const e=r().vec3f(S.POSITION).vec4f16(S.PROFILEVERTEXANDNORMAL).vec3f16(S.PROFILEAUXDATA).vec2i16(S.PROFILERIGHT,{glNormalized:!0}).vec2i16(S.PROFILEUP,{glNormalized:!0});return this.parameters.vvSize&&e.f32(S.SIZEFEATUREATTRIBUTE),this.parameters.vvColor&&e.f16(S.COLORFEATUREATTRIBUTE),this.parameters.vvOpacity&&e.f16(S.OPACITYFEATUREATTRIBUTE),l()&&e.vec4u8(S.OLIDCOLOR),e}createGLMaterial(e){return new P(e)}get transparent(){const{parameters:e}=this;return e.drivenOpacity||e.opacity<1}}class P extends p{beginSlot(e){return this.getTechnique(O,e)}}function j(e,t,i,r,s,a){e.baked.size&&e.baked.size[0]===t[0]&&e.baked.size[1]===t[1]||e.baked.bake(t),e.baked.intersect(i,r,s,a)}class w extends R{constructor(){super(...arguments),this.doubleSided=!1,this.doubleSidedType="normal",this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1}}export{w as Parameters,_ as PathMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as t}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as o}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as a}from"./DefaultTechniqueConfiguration.js";class n extends a{constructor(e){super(),this.spherical=e,this.pbrMode=i.Disabled,this.doubleSidedMode=r.None,this.emissionSource=o.None,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=t.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.objectAndLayerIdColorInstanced=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([s({count:i.COUNT})],n.prototype,"pbrMode",void 0),e([s({count:r.COUNT})],n.prototype,"doubleSidedMode",void 0),e([s({count:o.COUNT})],n.prototype,"emissionSource",void 0),e([s()],n.prototype,"receiveShadows",void 0),e([s()],n.prototype,"receiveAmbientOcclusion",void 0),e([s()],n.prototype,"vvSize",void 0),e([s()],n.prototype,"vvColor",void 0),e([s()],n.prototype,"vvOpacity",void 0),e([s()],n.prototype,"transparent",void 0),e([s()],n.prototype,"hasOccludees",void 0),e([s()],n.prototype,"terrainDepthTest",void 0),e([s()],n.prototype,"cullAboveTerrain",void 0);export{n as PathTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{TextureCoordinateType as o}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as t}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as s}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as a}from"./DefaultTechniqueConfiguration.js";class h extends a{constructor(e){super(),this.spherical=e,this.pbrMode=s.Disabled,this.doubleSidedMode=r.None,this.emissionSource=t.None,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.vvSize=!1,this.vvColor=!1,this.vvOpacity=!1,this.transparent=!1,this.hasOccludees=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.hasBloom=!1,this.textureCoordinateType=o.None,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!1,this.objectAndLayerIdColorInstanced=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.draped=!1,this.overlayEnabled=!1}get discardInvisibleFragments(){return this.transparent}}e([i({count:s.COUNT})],h.prototype,"pbrMode",void 0),e([i({count:r.COUNT})],h.prototype,"doubleSidedMode",void 0),e([i({count:t.COUNT})],h.prototype,"emissionSource",void 0),e([i()],h.prototype,"receiveShadows",void 0),e([i()],h.prototype,"receiveAmbientOcclusion",void 0),e([i()],h.prototype,"vvSize",void 0),e([i()],h.prototype,"vvColor",void 0),e([i()],h.prototype,"vvOpacity",void 0),e([i()],h.prototype,"transparent",void 0),e([i()],h.prototype,"hasOccludees",void 0),e([i()],h.prototype,"terrainDepthTest",void 0),e([i()],h.prototype,"cullAboveTerrain",void 0),e([i()],h.prototype,"hasBloom",void 0);export{h as PathTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{NormalType as t}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as o}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as s}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as a}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as h,CullFaceOptions as n,DepthTestFunction as p}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as l}from"../materials/DefaultTechniqueConfiguration.js";class c extends l{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=h.Opaque,this.doubleSidedMode=r.None,this.pbrMode=i.Disabled,this.cullFace=n.None,this.normalType=t.Attribute,this.customDepthTest=p.Less,this.emissionSource=s.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===s.Texture||this.hasOcclusionTexture||this.hasNormalTexture?o.Default:o.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([a({count:h.COUNT})],c.prototype,"alphaDiscardMode",void 0),e([a({count:r.COUNT})],c.prototype,"doubleSidedMode",void 0),e([a({count:i.COUNT})],c.prototype,"pbrMode",void 0),e([a({count:n.COUNT})],c.prototype,"cullFace",void 0),e([a({count:t.COUNT})],c.prototype,"normalType",void 0),e([a({count:p.COUNT})],c.prototype,"customDepthTest",void 0),e([a({count:s.COUNT})],c.prototype,"emissionSource",void 0),e([a()],c.prototype,"hasVertexColors",void 0),e([a()],c.prototype,"hasSymbolColors",void 0),e([a()],c.prototype,"hasVerticalOffset",void 0),e([a()],c.prototype,"hasColorTexture",void 0),e([a()],c.prototype,"hasMetallicRoughnessTexture",void 0),e([a()],c.prototype,"hasOcclusionTexture",void 0),e([a()],c.prototype,"hasNormalTexture",void 0),e([a()],c.prototype,"hasScreenSizePerspective",void 0),e([a()],c.prototype,"hasVertexTangents",void 0),e([a()],c.prototype,"hasOccludees",void 0),e([a()],c.prototype,"instancedDoublePrecision",void 0),e([a()],c.prototype,"hasModelTransformation",void 0),e([a()],c.prototype,"offsetBackfaces",void 0),e([a()],c.prototype,"vvSize",void 0),e([a()],c.prototype,"vvColor",void 0),e([a()],c.prototype,"receiveShadows",void 0),e([a()],c.prototype,"receiveAmbientOcclusion",void 0),e([a()],c.prototype,"textureAlphaPremultiplied",void 0),e([a()],c.prototype,"instanced",void 0),e([a()],c.prototype,"instancedColor",void 0),e([a()],c.prototype,"writeDepth",void 0),e([a()],c.prototype,"transparent",void 0),e([a()],c.prototype,"enableOffset",void 0),e([a()],c.prototype,"terrainDepthTest",void 0),e([a()],c.prototype,"cullAboveTerrain",void 0),e([a()],c.prototype,"snowCover",void 0),e([a()],c.prototype,"hasColorTextureTransform",void 0),e([a()],c.prototype,"hasEmissionTextureTransform",void 0),e([a()],c.prototype,"hasNormalTextureTransform",void 0),e([a()],c.prototype,"hasOcclusionTextureTransform",void 0),e([a()],c.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{c as DefaultMaterialTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{NormalType as t}from"../core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateType as o}from"../core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{EmissionSource as s}from"../core/shaderLibrary/output/Emissions.glsl.js";import{NormalsDoubleSidedMode as r}from"../core/shaderLibrary/shading/Normals.glsl.js";import{PBRMode as i}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{parameter as a}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{AlphaDiscardMode as h,CullFaceOptions as p,DepthTestFunction as n}from"../lib/basicInterfaces.js";import{DefaultTechniqueConfiguration as l}from"../materials/DefaultTechniqueConfiguration.js";class d extends l{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=h.Opaque,this.doubleSidedMode=r.None,this.pbrMode=i.Disabled,this.cullFace=p.None,this.normalType=t.Attribute,this.customDepthTest=n.Less,this.emissionSource=s.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasBloom=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===s.Texture||this.hasOcclusionTexture||this.hasNormalTexture?o.Default:o.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([a({count:h.COUNT})],d.prototype,"alphaDiscardMode",void 0),e([a({count:r.COUNT})],d.prototype,"doubleSidedMode",void 0),e([a({count:i.COUNT})],d.prototype,"pbrMode",void 0),e([a({count:p.COUNT})],d.prototype,"cullFace",void 0),e([a({count:t.COUNT})],d.prototype,"normalType",void 0),e([a({count:n.COUNT})],d.prototype,"customDepthTest",void 0),e([a({count:s.COUNT})],d.prototype,"emissionSource",void 0),e([a()],d.prototype,"hasVertexColors",void 0),e([a()],d.prototype,"hasSymbolColors",void 0),e([a()],d.prototype,"hasVerticalOffset",void 0),e([a()],d.prototype,"hasColorTexture",void 0),e([a()],d.prototype,"hasMetallicRoughnessTexture",void 0),e([a()],d.prototype,"hasOcclusionTexture",void 0),e([a()],d.prototype,"hasNormalTexture",void 0),e([a()],d.prototype,"hasScreenSizePerspective",void 0),e([a()],d.prototype,"hasVertexTangents",void 0),e([a()],d.prototype,"hasOccludees",void 0),e([a()],d.prototype,"instancedDoublePrecision",void 0),e([a()],d.prototype,"hasModelTransformation",void 0),e([a()],d.prototype,"offsetBackfaces",void 0),e([a()],d.prototype,"vvSize",void 0),e([a()],d.prototype,"vvColor",void 0),e([a()],d.prototype,"receiveShadows",void 0),e([a()],d.prototype,"receiveAmbientOcclusion",void 0),e([a()],d.prototype,"textureAlphaPremultiplied",void 0),e([a()],d.prototype,"instanced",void 0),e([a()],d.prototype,"instancedColor",void 0),e([a()],d.prototype,"writeDepth",void 0),e([a()],d.prototype,"transparent",void 0),e([a()],d.prototype,"enableOffset",void 0),e([a()],d.prototype,"terrainDepthTest",void 0),e([a()],d.prototype,"cullAboveTerrain",void 0),e([a()],d.prototype,"snowCover",void 0),e([a()],d.prototype,"hasBloom",void 0),e([a()],d.prototype,"hasColorTextureTransform",void 0),e([a()],d.prototype,"hasEmissionTextureTransform",void 0),e([a()],d.prototype,"hasNormalTextureTransform",void 0),e([a()],d.prototype,"hasOcclusionTextureTransform",void 0),e([a()],d.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{d as DefaultMaterialTechniqueConfiguration};
@@ -2,6 +2,24 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{glsl as e}from"../core/shaderModules/glsl.js";function o(o){o.code.add(e`vec3 tonemapACES(vec3 x) {
5
+ import{glsl as o}from"../core/shaderModules/glsl.js";var e;function r(r,a){switch(a.toneMapping){case e.SimpleExposure:r.code.add(o`vec3 tonemapSimpleExposure(vec3 x, float exposure) {
6
+ return vec3(1.0) - exp(-x * exposure);
7
+ }`);break;case e.KronosNeutral:r.code.add(o`vec3 tonemapKhronosNeutral(vec3 color, float exposure) {
8
+ const float startCompression = 0.8 - 0.04;
9
+ const float desaturation = 0.15;
10
+ color *= exposure;
11
+ float x = min( color.r, min( color.g, color.b ) );
12
+ float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
13
+ color -= offset;
14
+ float peak = max( color.r, max( color.g, color.b ) );
15
+ if ( peak < startCompression ) {
16
+ return color;
17
+ }
18
+ float d = 1.0 - startCompression;
19
+ float newPeak = 1.0 - d * d / ( peak + d - startCompression );
20
+ color *= newPeak / peak;
21
+ float g = 1.0 - 1.0 / ( desaturation * ( peak - newPeak ) + 1.0 );
22
+ return mix( color, vec3( newPeak ), g );
23
+ }`);break;case e.ACES:r.code.add(o`vec3 tonemapACES(vec3 x) {
6
24
  return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
7
- }`)}export{o as ToneMapping};
25
+ }`)}}!function(o){o[o.ACES=0]="ACES",o[o.KronosNeutral=1]="KronosNeutral",o[o.SimpleExposure=2]="SimpleExposure",o[o.COUNT=3]="COUNT"}(e||(e={}));export{r as ToneMapping,e as ToneMappingFunction};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import{clock as e}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as r}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as c}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m}from"./interactive/interactiveToolUtils.js";import{EditableFlag as d}from"./interactive/interfaces.js";import{ToolViewManagerManipulatorState as v}from"./interactive/ToolViewManagerManipulatorState.js";const _="attached",g="tools",T=1e3;let f=class extends o{constructor(t){super(t),this._updatingHandles=new h,this._clock=e,this._manipulatorState=new v,this.tools=new i,this.cursor=null,this._interacting=!1,this._interactingTimeout=T,this._interactingTimeoutHandle=null,this._forEachTool=t=>{for(const o of this.tools.items)if(t(o))return}}initialize(){this.addHandles([this.view.on(u,(t=>{this._handleInputEvent(t)}),c.TOOL),...p(this.tools),this.tools.on("before-add",(({item:t})=>{this._updateToolEditableFlag(t)})),this.tools.on("before-remove",(({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()})),this.tools.on("change",(()=>{this._refreshToolWatchers()}))])}destroy(){this.activeTool=null,this.tools.drain((t=>t.destroy())),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy()}get _manipulatorStateEventArgs(){return{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const o=this.activeTool;this._set("activeTool",t),null!=o&&o.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const e of this.tools){this._updateToolEditableFlag(e);const t=m(e);null!=this.activeTool&&t||this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs,!t)}this._updateCursor()}get updating(){return this._updatingHandles.updating||this.tools.some((t=>t.updating))}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=r(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout((()=>this._interacting=!1),this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s((()=>{const{state:t}=this.view;return"camera"in t&&t.camera}),(()=>this._forEachManipulator((t=>t.onViewChange())))),this.view.elevationProvider?.on("elevation-change",(t=>this._forEachManipulator((o=>o.onElevationChange(t)))))],_):this.addHandles(s((()=>this.view.extent),(()=>this._forEachManipulator((t=>t.onViewChange())))))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(_),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){this._forEachTool((o=>{o.manipulators&&o.manipulators.forEach((({manipulator:e})=>t(e,o)))}))}_handleInputEvent(t){let o=!1;const e={...t,stopPropagation:()=>{o=!0,t.stopPropagation()}};null!=this.activeTool?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(e):this._forEachTool((t=>{!o&&t.visible&&t.handleInputEvent(e)})),!o&&"key-down"===t.type&&"Escape"===t.key&&this.activeTool&&(t.stopPropagation(),this.activeTool=null),this._manipulatorState.handleInputEvent(e,this._manipulatorStateEventArgs),o||null==this.activeTool||this.activeTool.handleInputEventAfter(e),this._manipulatorState.handleHoverEvent(e,this._forEachTool),this._updateCursor(),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators()||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(g),this._forEachTool((t=>{if(t instanceof o){const o=s((()=>[t.cursor,t.visible,t.editable]),(()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()}));this.addHandles(o,g)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",(o=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,o.item.manipulator)})),t.manipulators.on("change",(()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}))],g)})),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateToolEditableFlag(t){t.setEditableFlag?.(d.MANAGER,null==this.activeTool||t===this.activeTool)}_updateCursor(){let t=this._manipulatorState.cursor;null==t&&this._forEachTool((o=>!(null==o.cursor||!o.visible)&&(t=o.cursor,!0))),this._get("cursor")!==t&&this._set("cursor",t)}_removeIncompleteTools(t){this.tools.filter((o=>(null==t||o!==t)&&!o.created&&o.removeIncompleteOnCancel)).forEach((t=>{this.tools.remove(t)}))}get test(){}};t([n({constructOnly:!0,nonNullable:!0})],f.prototype,"view",void 0),t([n({value:null})],f.prototype,"activeTool",null),t([n({readOnly:!0,type:i})],f.prototype,"tools",void 0),t([n({readOnly:!0})],f.prototype,"cursor",void 0),t([n({readOnly:!0})],f.prototype,"updating",null),t([n()],f.prototype,"_interacting",void 0),t([n({readOnly:!0})],f.prototype,"interacting",null),f=t([l("esri.views.ToolViewManager")],f);export{f as ToolViewManager,T as interactingTimeout};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import{clock as e}from"../core/clock.js";import i from"../core/Collection.js";import"../core/has.js";import a from"../core/Logger.js";import{removeMaybe as r}from"../core/maybe.js";import{watch as s}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../core/support/UpdatingHandles.js";import{ViewEventPriorities as c}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolCollectionHandles as p,areToolManipulatorsEditable as m,isCancelEvent as d}from"./interactive/interactiveToolUtils.js";import{EditableFlag as v}from"./interactive/interfaces.js";import{ToolViewManagerManipulatorState as _}from"./interactive/ToolViewManagerManipulatorState.js";const g="attached",T="tools",f=1e3;let E=class extends o{constructor(t){super(t),this._updatingHandles=new h,this._clock=e,this._manipulatorState=new _,this.tools=new i,this.cursor=null,this._interacting=!1,this._interactingTimeout=f,this._interactingTimeoutHandle=null,this._forEachTool=t=>{for(const o of this.tools.items)if(t(o))return}}initialize(){this.addHandles([this.view.on(u,(t=>{this._handleInputEvent(t)}),c.TOOL),...p(this.tools),this.tools.on("before-add",(({item:t})=>{this._updateToolEditableFlag(t)})),this.tools.on("before-remove",(({item:t})=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()})),this.tools.on("change",(()=>{this._refreshToolWatchers()}))])}destroy(){this.activeTool=null,this.tools.drain((t=>t.destroy())),this._clearInteractingTimeout(),this._interacting=!1,this._updatingHandles.destroy()}get _manipulatorStateEventArgs(){return{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view}}set activeTool(t){if(null!=t&&!this.view.ready)return void a.getLogger(this).error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return;const o=this.activeTool;this._set("activeTool",t),null!=o&&o.deactivate(),null!=t&&t.activate(),this._removeIncompleteTools(t);for(const e of this.tools){this._updateToolEditableFlag(e);const t=m(e);null!=this.activeTool&&t||this._manipulatorState.clearPointers(e,this._manipulatorStateEventArgs,!t)}this._updateCursor()}get updating(){return this._updatingHandles.updating||this.tools.some((t=>t.updating))}get interacting(){return this._interacting}_clearInteractingTimeout(){this._interactingTimeoutHandle=r(this._interactingTimeoutHandle)}_startInteractingTimeout(){this._clearInteractingTimeout(),this._interactingTimeoutHandle=this._clock.setTimeout((()=>this._interacting=!1),this._interactingTimeout)}attach(){"3d"===this.view.type?this.addHandles([s((()=>{const{state:t}=this.view;return"camera"in t&&t.camera}),(()=>this._forEachManipulator((t=>t.onViewChange())))),this.view.elevationProvider?.on("elevation-change",(t=>this._forEachManipulator((o=>o.onElevationChange(t)))))],g):this.addHandles(s((()=>this.view.extent),(()=>this._forEachManipulator((t=>t.onViewChange())))))}detach(){this.activeTool=null,this.tools.removeAll(),this.removeHandles(g),this._clearInteractingTimeout(),this._interacting=!1}_forEachManipulator(t){this._forEachTool((o=>{o.manipulators&&o.manipulators.forEach((({manipulator:e})=>t(e,o)))}))}_handleInputEvent(t){let o=!1;const e={...t,stopPropagation:()=>{o=!0,t.stopPropagation()}};null!=this.activeTool?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(e):this._forEachTool((t=>{!o&&t.visible&&t.handleInputEvent(e)})),!o&&d(t)&&this.activeTool&&(t.stopPropagation(),this.activeTool.cancel(),this.activeTool=null),this._manipulatorState.handleInputEvent(e,this._manipulatorStateEventArgs),o||null==this.activeTool||this.activeTool.handleInputEventAfter(e),this._manipulatorState.handleHoverEvent(e,this._forEachTool),this._updateCursor(),"pointer-move"===t.type&&(this._manipulatorState.hasFocusedManipulators()||this.activeTool)&&(this._interacting=!0,this._startInteractingTimeout())}_refreshToolWatchers(){this.removeHandles(T),this._forEachTool((t=>{if(t instanceof o){const o=s((()=>[t.cursor,t.visible,t.editable]),(()=>{m(t)||this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs),this._updateCursor()}));this.addHandles(o,T)}t.manipulators&&this.addHandles([t.manipulators.on("after-remove",(o=>{this._manipulatorState.clearPointers(t,this._manipulatorStateEventArgs,!0,o.item.manipulator)})),t.manipulators.on("change",(()=>{this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}))],T)})),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateToolEditableFlag(t){t.setEditableFlag?.(v.MANAGER,null==this.activeTool||t===this.activeTool)}_updateCursor(){let t=this._manipulatorState.cursor;null==t&&this._forEachTool((o=>!(null==o.cursor||!o.visible)&&(t=o.cursor,!0))),this._get("cursor")!==t&&this._set("cursor",t)}_removeIncompleteTools(t){this.tools.filter((o=>(null==t||o!==t)&&!o.created&&o.removeIncompleteOnCancel)).forEach((t=>{this.tools.remove(t)}))}get test(){}};t([n({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),t([n({value:null})],E.prototype,"activeTool",null),t([n({readOnly:!0,type:i})],E.prototype,"tools",void 0),t([n({readOnly:!0})],E.prototype,"cursor",void 0),t([n({readOnly:!0})],E.prototype,"updating",null),t([n()],E.prototype,"_interacting",void 0),t([n({readOnly:!0})],E.prototype,"interacting",null),E=t([l("esri.views.ToolViewManager")],E);export{E as ToolViewManager,f as interactingTimeout};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{createTask as o}from"../../core/asyncUtils.js";import{removeMaybe as t}from"../../core/maybe.js";import{onAbort as i}from"../../core/promiseUtils.js";import{whenOnce as e,watch as n,syncAndInitial as r}from"../../core/reactiveUtils.js";function l(n,r){n.interactive=!0;const{tool:l,view:a}=n;a.activeTool=l;let c=i(r,(()=>{a.activeTool===l&&(a.activeTool=null)}));return o((async o=>{await e((()=>null==l||!l.active),o),c=t(c)}),r)}function a(o,t){return n((()=>o.interactive),(()=>c(o,t)),r)}function c(o,t){o.interactive?s(o,t):v(o)}function s(o,t){v(o);const{view:i,analysis:e}=o,n=new t({view:i,analysis:e,analysisViewData:o});return o.tool=n,i.tools.add(n),n}function v(o){const{view:t,tool:i}=o;null!=i&&(t.tools.remove(i),o.tool=null)}export{l as activateAnalysisViewTool,a as connectAnalysisViewToTool,v as removeAnalysisViewTool};
5
+ import{createTask as o}from"../../core/asyncUtils.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{removeMaybe as i}from"../../core/maybe.js";import{onAbort as n,ignoreAbortErrors as e,throwIfAborted as r,isAbortError as a}from"../../core/promiseUtils.js";import{whenOnce as l,watch as s,syncAndInitial as c,on as m}from"../../core/reactiveUtils.js";function u(t,e){t.interactive=!0;const{tool:r,view:a}=t;a.activeTool=r;let s=n(e,(()=>{a.activeTool===r&&(a.activeTool=null)}));return o((async o=>{await l((()=>null==r||!r.active),o),s=i(s)}),e)}function v(o,t){return s((()=>o.interactive),(()=>f(o,t)),c)}function f(o,t){o.interactive?p(o,t):w(o)}function p(o,t){w(o);const{view:i,analysis:n}=o,e=new t({view:i,analysis:n,analysisViewData:o});return o.tool=e,i.tools.add(e),e}function w(o){const{view:t,tool:i}=o;null!=i&&(t.tools.remove(i),o.tool=null)}function y(i,n){const{userOperation:l}=i;return o((async o=>{if(l){const t=e(l.promise);l?.abort(),await t,r(o)}const n=u(i,{signal:o}),{analysis:s}=i,c=()=>!s.valid,v=t([m((()=>i.tool),"cancel",(()=>{c()&&n.abort()}))]);try{await n.promise}catch(f){if(!a(f)||c())throw f}finally{v?.remove()}}),n)}export{u as activateAnalysisViewTool,v as connectAnalysisViewToTool,w as removeAnalysisViewTool,y as startExclusiveInteractiveOperation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{findLayerView as e}from"./layerUtils.js";import{defaultHighlightName as i}from"../../support/HighlightDefaults.js";import{highlightsSupported as h}from"../../support/layerViewUtils.js";import{getHighlightKeyForFeature as l}from"../../../widgets/Feature/support/featureUtils.js";let a=class extends t{constructor(r){super(r),this.view=null,this.highlightName=i}add(r){const t=!r||Array.isArray(r)?r:[r];t?.length&&t.forEach((r=>this._highlight(r)))}remove(r){const t=!r||Array.isArray(r)?r:[r];t?.length&&t.forEach((r=>this._removeHighlight(r)))}removeAll(){this.removeAllHandles()}_highlight(r){const t=e(this.view,r.layer);h(t)&&this.addHandles(t.highlight(r,{name:this.highlightName}),l(r))}_removeHighlight(r){r&&this.removeHandles(l(r))}};r([o()],a.prototype,"view",void 0),r([o({constructOnly:!0})],a.prototype,"highlightName",void 0),a=r([s("esri.views.draw.support.HighlightHelper")],a);const p=a;export{p as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Accessor.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{findLayerView as o}from"./layerUtils.js";import{defaultHighlightName as s}from"../../support/HighlightDefaults.js";import{highlightsSupported as h}from"../../support/layerViewUtils.js";let a=class extends r{constructor(e){super(e),this._layerViewCache=new Map,this.highlightName=s,this.view=null}add(e,r){const t=!e||Array.isArray(e)?e:[e];if(!t?.length)return;const i=r??this.highlightName;t.forEach((e=>this._highlight(e,i)))}getKeyForFeature(e){const r=e.getObjectId();return null!=r?`oid:${r}`:`uid:${e.uid}`}remove(e){const r=!e||Array.isArray(e)?e:[e];r?.length&&r.forEach((e=>e&&this._removeHighlight(this.getKeyForFeature(e))))}removeByKey(e){e?.forEach((e=>e&&this._removeHighlight(e)))}removeAll(){this.removeAllHandles()}update(e,r){this.remove(e),this.add(e,r)}_highlight(e,r){const t=e.layer??e.sourceLayer;if(!t)return;const i=this._layerViewCache.get(t);if(i)return void this.addHandles(i.highlight(e,{name:r}),this.getKeyForFeature(e));const s=o(this.view,t);h(s)&&(this._layerViewCache.set(t,s),this.addHandles(s.highlight(e,{name:r}),this.getKeyForFeature(e)))}_removeHighlight(e){this.removeHandles(e)}};e([t()],a.prototype,"_layerViewCache",void 0),e([t()],a.prototype,"highlightName",void 0),e([t()],a.prototype,"view",void 0),a=e([i("esri.views.draw.support.HighlightHelper")],a);const l=a;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import"../../core/has.js";import"../../core/Logger.js";import{createResolver as i}from"../../core/promiseUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{EditableFlag as s}from"./interfaces.js";import{ManipulatorCollection as r}from"./ManipulatorCollection.js";let n=class extends e{constructor(t){super(t),this.manipulators=new r,this.automaticManipulatorSelection=!0,this.hasGrabbedManipulators=!1,this.hasHoveredManipulators=!1,this.firstGrabbedManipulator=null,this.created=!1,this.removeIncompleteOnCancel=!0,this._editableFlags=new Map([[s.MANAGER,!0],[s.USER,!0]]),this._creationFinishedResolver=i()}get active(){return null!=this.view&&this.view.activeTool===this}set visible(t){this._get("visible")!==t&&(this._set("visible",t),this._syncVisible())}get editable(){return this.getEditableFlag(s.USER)}set editable(t){this.setEditableFlag(s.USER,t)}get updating(){return!1}get cursor(){return null}get hasFocusedManipulators(){return this.hasGrabbedManipulators||this.hasHoveredManipulators}destroy(){this.manipulators.destroy(),this._set("view",null)}onAdd(){this._syncVisible()}activate(){null!=this.view&&(this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}handleInputEvent(t){this.onInputEvent(t)}handleInputEventAfter(t){this.onInputEventAfter(t)}setEditableFlag(t,e){this._editableFlags.set(t,e),this.manipulators.isToolEditable=this.internallyEditable,this._updateManipulatorAttachment(),t===s.USER&&this.notifyChange("editable"),this.onEditableChange(),this.onManipulatorSelectionChanged()}getEditableFlag(t){return this._editableFlags.get(t)??!1}endDrag(){const t=this.view.inputManager.latestPointerLocation;if(!t)return;let e=!1;this.manipulators.forEach((({manipulator:i})=>{i.dragging&&(e=!0,i.events.emit("drag",{action:"end",start:t,screenPoint:t}))})),e&&(this.view.toolViewManager.activeTool=null)}whenCreated(){return this._creationFinishedResolver.promise}onManipulatorSelectionChanged(){}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(t){}onInputEventAfter(t){}get internallyEditable(){return this.getEditableFlag(s.USER)&&this.getEditableFlag(s.MANAGER)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this),this._set("created",!0)}_syncVisible(){if(this.initialized)if(this.visible)this._show();else if(this._hide(),this.active)return void(this.view.activeTool=null)}_show(){this._updateManipulatorAttachment(),this.onShow()}_hide(){this._updateManipulatorAttachment(),this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};t([a({constructOnly:!0})],n.prototype,"view",void 0),t([a({readOnly:!0})],n.prototype,"active",null),t([a({value:!0})],n.prototype,"visible",null),t([a({value:!0})],n.prototype,"editable",null),t([a({readOnly:!0})],n.prototype,"manipulators",void 0),t([a({readOnly:!0})],n.prototype,"updating",null),t([a()],n.prototype,"cursor",null),t([a({readOnly:!0})],n.prototype,"automaticManipulatorSelection",void 0),t([a()],n.prototype,"hasFocusedManipulators",null),t([a()],n.prototype,"hasGrabbedManipulators",void 0),t([a()],n.prototype,"hasHoveredManipulators",void 0),t([a()],n.prototype,"firstGrabbedManipulator",void 0),t([a({readOnly:!0})],n.prototype,"created",void 0),t([a({readOnly:!0})],n.prototype,"removeIncompleteOnCancel",void 0),n=t([o("esri.views.interactive.InteractiveToolBase")],n);export{n as InteractiveToolBase};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import"../../core/has.js";import"../../core/Logger.js";import{createResolver as i}from"../../core/promiseUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{EditableFlag as s}from"./interfaces.js";import{ManipulatorCollection as r}from"./ManipulatorCollection.js";let n=class extends e.EventedAccessor{constructor(t){super(t),this.manipulators=new r,this.automaticManipulatorSelection=!0,this.hasGrabbedManipulators=!1,this.hasHoveredManipulators=!1,this.firstGrabbedManipulator=null,this.created=!1,this.removeIncompleteOnCancel=!0,this._editableFlags=new Map([[s.MANAGER,!0],[s.USER,!0]]),this._creationFinishedResolver=i()}get active(){return null!=this.view&&this.view.activeTool===this}set visible(t){this._get("visible")!==t&&(this._set("visible",t),this._syncVisible())}get editable(){return this.getEditableFlag(s.USER)}set editable(t){this.setEditableFlag(s.USER,t)}get updating(){return!1}get cursor(){return null}get hasFocusedManipulators(){return this.hasGrabbedManipulators||this.hasHoveredManipulators}destroy(){this.manipulators.destroy(),this._set("view",null)}onAdd(){this._syncVisible()}activate(){null!=this.view&&(this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}cancel(){this.emit("cancel")}handleInputEvent(t){this.onInputEvent(t)}handleInputEventAfter(t){this.onInputEventAfter(t)}setEditableFlag(t,e){this._editableFlags.set(t,e),this.manipulators.isToolEditable=this.internallyEditable,this._updateManipulatorAttachment(),t===s.USER&&this.notifyChange("editable"),this.onEditableChange(),this.onManipulatorSelectionChanged()}getEditableFlag(t){return this._editableFlags.get(t)??!1}endDrag(){const t=this.view.inputManager.latestPointerLocation;if(!t)return;let e=!1;this.manipulators.forEach((({manipulator:i})=>{i.dragging&&(e=!0,i.events.emit("drag",{action:"end",start:t,screenPoint:t}))})),e&&(this.view.toolViewManager.activeTool=null)}whenCreated(){return this._creationFinishedResolver.promise}onManipulatorSelectionChanged(){}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(t){}onInputEventAfter(t){}get internallyEditable(){return this.getEditableFlag(s.USER)&&this.getEditableFlag(s.MANAGER)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this),this._set("created",!0)}_syncVisible(){if(this.initialized)if(this.visible)this._show();else if(this._hide(),this.active)return void(this.view.activeTool=null)}_show(){this._updateManipulatorAttachment(),this.onShow()}_hide(){this._updateManipulatorAttachment(),this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};t([a({constructOnly:!0})],n.prototype,"view",void 0),t([a({readOnly:!0})],n.prototype,"active",null),t([a({value:!0})],n.prototype,"visible",null),t([a({value:!0})],n.prototype,"editable",null),t([a({readOnly:!0})],n.prototype,"manipulators",void 0),t([a({readOnly:!0})],n.prototype,"updating",null),t([a()],n.prototype,"cursor",null),t([a({readOnly:!0})],n.prototype,"automaticManipulatorSelection",void 0),t([a()],n.prototype,"hasFocusedManipulators",null),t([a()],n.prototype,"hasGrabbedManipulators",void 0),t([a()],n.prototype,"hasHoveredManipulators",void 0),t([a()],n.prototype,"firstGrabbedManipulator",void 0),t([a({readOnly:!0})],n.prototype,"created",void 0),t([a({readOnly:!0})],n.prototype,"removeIncompleteOnCancel",void 0),n=t([o("esri.views.interactive.InteractiveToolBase")],n);export{n as InteractiveToolBase};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{on as o}from"../../core/events.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as i,when as s,syncAndInitial as r,initial as c,sync as l}from"../../core/reactiveUtils.js";import{cloneScreenPoint as a,createScreenPoint as p}from"../../core/screenUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{setCalciteThemeClass as f}from"../../support/themeUtils.js";import{base as d}from"./tooltip/css.js";import{tooltipContentFactory as m}from"./tooltip/content/tooltipContentFactory.js";import{isRTL as v}from"../../widgets/support/widgetUtils.js";const y={base:`${d}`,ltr:`${d}--ltr`,rtl:`${d}--rtl`,debug:`${d}--debug`},g=20,_=16,C="bottom-end";let b=class extends e.EventedAccessor{constructor(t){super(t),this.info=null,this.options=null,this.position=null,this.content=null,this._focused=!1,this.outerContainer=document.createElement("div"),this.debug=!1,this._lastPosition=null,this._rtl=!1,this._prevXY=[0,0]}initialize(){const{outerContainer:t}=this;this.addHandles([i((()=>this.view.overlay?.surface),(e=>{t.remove(),e?.appendChild(t),this._rtl=v(e)}),r),i((()=>this.info),((e,o)=>{if(null!=this.content&&null!=e&&null!=o&&e.type===o.type)this.content.info=e;else{n(this.content);const o=m(this,e);o?(this.content=o,o.container&&t.appendChild(o.container),this.exitInputMode()):this.content=null}}),r),i((()=>({container:this.outerContainer,style:this._outerContainerStyle})),(({container:t,style:e})=>{Object.assign(t.style,e)}),c),i((()=>({outerContainer:this.outerContainer,placement:this.effectivePlacement,effectiveOffset:this._effectiveOffset,rtl:this._rtl,debug:this.debug})),(({outerContainer:t,placement:e,effectiveOffset:o,rtl:n,debug:i})=>{const{classList:s}=t;s.add(y.base),s.toggle(y.rtl,n),s.toggle(y.ltr,!n),s.toggle(y.debug,i),this.outerContainer.style.setProperty("--offset",`${o}px`),f(t),w(t,e)}),c),s((()=>"feedback"===this.mode),(()=>{this.position=null,this._clearOverride("effectivePlacement")}),l),o(this.outerContainer,"paste",(t=>{this.emit("paste",t)})),o(this.outerContainer,["focusin","focusout"],(()=>{setTimeout((()=>{this._focused=this.content?.container?.contains(document.activeElement)??!1}))}))])}destroy(){this.info=null,this.content=n(this.content),this.outerContainer.remove()}get mode(){return this.content?.mode??"feedback"}get focused(){return this._focused}get visible(){return"none"!==this._outerContainerStyle.display}get contentContainer(){return this.content?.container}get effectivePlacement(){const t=this.options?.placement;return"auto"===t?"bottom-end":t??C}get _screenPoint(){const{inputManager:t}=this.view;return t?.multiTouchActive?null:t?.latestPointerLocation}get _effectiveOffset(){return this.options?.offset??g}get _outerContainerStyle(){const t=this.position??this._screenPoint;if(this._lastPosition=a(t),null!=t&&null!=this.content){return{display:"block",transform:`translate(${Math.round(t.x)}px, ${Math.round(t.y)}px)`}}return{display:"none",transform:"none"}}clear(){this.info=null}async enterInputMode(t){const e=this.position??this._lastPosition??this._screenPoint,o=this.position=a(e),{effectivePlacement:n}=this;this._override("effectivePlacement",n);const i=()=>{o&&(this.position=j(this.contentContainer,o,this._effectiveOffset,this.view),Object.assign(this.outerContainer.style,this._outerContainerStyle))};await(this.content?.enterInputMode(t,i))}async exitInputMode(t){await(this.content?.exitInputMode(t))}onDragStart(t,e){this._prevXY=[t,e]}onDrag(t,e){const o=t-this._prevXY[0],n=e-this._prevXY[1];this._prevXY=[t,e];const{position:i}=this;if(i){const{view:s}=this,r=t-s.position[0],c=e-s.position[1];if(r<0||r>s.width||c<0||c>s.height-_)return;this.position=p(i.x+o,i.y+n)}}onDragEnd(){this._prevXY=[0,0]}};function j(t,e,o,n){if(!t||!n.container)return e;const i=t.getBoundingClientRect(),{left:s,top:r}=n.container.getBoundingClientRect();let{x:c,y:l}=e;const a=i.left-s-o;a<0&&(c-=a);const u=i.right-s+o-n.width;u>0&&(c-=u);const h=i.top-r-o;h<0&&(l-=h);const f=i.bottom-r+o-n.height;return f>0&&(l-=f),p(c,l)}t([u({nonNullable:!0})],b.prototype,"view",void 0),t([u()],b.prototype,"info",void 0),t([u()],b.prototype,"options",void 0),t([u()],b.prototype,"position",void 0),t([u()],b.prototype,"content",void 0),t([u({readOnly:!0})],b.prototype,"mode",null),t([u()],b.prototype,"_focused",void 0),t([u({readOnly:!0})],b.prototype,"focused",null),t([u({readOnly:!0})],b.prototype,"outerContainer",void 0),t([u({readOnly:!0})],b.prototype,"contentContainer",null),t([u({readOnly:!0})],b.prototype,"effectivePlacement",null),t([u()],b.prototype,"debug",void 0),t([u()],b.prototype,"_lastPosition",void 0),t([u()],b.prototype,"_screenPoint",null),t([u()],b.prototype,"_rtl",void 0),t([u()],b.prototype,"_effectiveOffset",null),t([u()],b.prototype,"_outerContainerStyle",null),b=t([h("esri.views.interactive.Tooltip")],b);const P=["top","bottom","leading","trailing"].flatMap((t=>[O(`${t}-start`),O(t),O(`${t}-end`)]));function O(t){return`${y.base}--${t}`}function w({classList:t},e){P.forEach((e=>t.remove(e))),t.add(O(e))}const x=b;export{x as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{on as o}from"../../core/events.js";import{destroyMaybe as n}from"../../core/maybe.js";import{watch as i,when as s,syncAndInitial as r,initial as c,sync as l}from"../../core/reactiveUtils.js";import{cloneScreenPoint as a,createScreenPoint as p}from"../../core/screenUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{setCalciteModeClass as f}from"../../support/modeUtils.js";import{base as d}from"./tooltip/css.js";import{tooltipContentFactory as m}from"./tooltip/content/tooltipContentFactory.js";import{isRTL as v}from"../../widgets/support/widgetUtils.js";const y={base:`${d}`,ltr:`${d}--ltr`,rtl:`${d}--rtl`,debug:`${d}--debug`},g=20,_=16,C="bottom-end";let b=class extends e.EventedAccessor{constructor(t){super(t),this.info=null,this.options=null,this.position=null,this.content=null,this._focused=!1,this.outerContainer=document.createElement("div"),this.debug=!1,this._lastPosition=null,this._rtl=!1,this._prevXY=[0,0]}initialize(){const{outerContainer:t}=this;this.addHandles([i((()=>this.view.overlay?.surface),(e=>{t.remove(),e?.appendChild(t),this._rtl=v(e)}),r),i((()=>this.info),((e,o)=>{if(null!=this.content&&null!=e&&null!=o&&e.type===o.type)this.content.info=e;else{n(this.content);const o=m(this,e);o?(this.content=o,o.container&&t.appendChild(o.container),this.exitInputMode()):this.content=null}}),r),i((()=>({container:this.outerContainer,style:this._outerContainerStyle})),(({container:t,style:e})=>{Object.assign(t.style,e)}),c),i((()=>({outerContainer:this.outerContainer,placement:this.effectivePlacement,effectiveOffset:this._effectiveOffset,rtl:this._rtl,debug:this.debug})),(({outerContainer:t,placement:e,effectiveOffset:o,rtl:n,debug:i})=>{const{classList:s}=t;s.add(y.base),s.toggle(y.rtl,n),s.toggle(y.ltr,!n),s.toggle(y.debug,i),this.outerContainer.style.setProperty("--offset",`${o}px`),f(t),w(t,e)}),c),s((()=>"feedback"===this.mode),(()=>{this.position=null,this._clearOverride("effectivePlacement")}),l),o(this.outerContainer,"paste",(t=>{this.emit("paste",t)})),o(this.outerContainer,["focusin","focusout"],(()=>{setTimeout((()=>{this._focused=this.content?.container?.contains(document.activeElement)??!1}))}))])}destroy(){this.info=null,this.content=n(this.content),this.outerContainer.remove()}get mode(){return this.content?.mode??"feedback"}get focused(){return this._focused}get visible(){return"none"!==this._outerContainerStyle.display}get contentContainer(){return this.content?.container}get effectivePlacement(){const t=this.options?.placement;return"auto"===t?"bottom-end":t??C}get _screenPoint(){const{inputManager:t}=this.view;return t?.multiTouchActive?null:t?.latestPointerLocation}get _effectiveOffset(){return this.options?.offset??g}get _outerContainerStyle(){const t=this.position??this._screenPoint;if(this._lastPosition=a(t),null!=t&&null!=this.content){return{display:"block",transform:`translate(${Math.round(t.x)}px, ${Math.round(t.y)}px)`}}return{display:"none",transform:"none"}}clear(){this.info=null}async enterInputMode(t){const e=this.position??this._lastPosition??this._screenPoint,o=this.position=a(e),{effectivePlacement:n}=this;this._override("effectivePlacement",n);const i=()=>{o&&(this.position=j(this.contentContainer,o,this._effectiveOffset,this.view),Object.assign(this.outerContainer.style,this._outerContainerStyle))};await(this.content?.enterInputMode(t,i))}async exitInputMode(t){await(this.content?.exitInputMode(t))}onDragStart(t,e){this._prevXY=[t,e]}onDrag(t,e){const o=t-this._prevXY[0],n=e-this._prevXY[1];this._prevXY=[t,e];const{position:i}=this;if(i){const{view:s}=this,r=t-s.position[0],c=e-s.position[1];if(r<0||r>s.width||c<0||c>s.height-_)return;this.position=p(i.x+o,i.y+n)}}onDragEnd(){this._prevXY=[0,0]}};function j(t,e,o,n){if(!t||!n.container)return e;const i=t.getBoundingClientRect(),{left:s,top:r}=n.container.getBoundingClientRect();let{x:c,y:l}=e;const a=i.left-s-o;a<0&&(c-=a);const u=i.right-s+o-n.width;u>0&&(c-=u);const h=i.top-r-o;h<0&&(l-=h);const f=i.bottom-r+o-n.height;return f>0&&(l-=f),p(c,l)}t([u({nonNullable:!0})],b.prototype,"view",void 0),t([u()],b.prototype,"info",void 0),t([u()],b.prototype,"options",void 0),t([u()],b.prototype,"position",void 0),t([u()],b.prototype,"content",void 0),t([u({readOnly:!0})],b.prototype,"mode",null),t([u()],b.prototype,"_focused",void 0),t([u({readOnly:!0})],b.prototype,"focused",null),t([u({readOnly:!0})],b.prototype,"outerContainer",void 0),t([u({readOnly:!0})],b.prototype,"contentContainer",null),t([u({readOnly:!0})],b.prototype,"effectivePlacement",null),t([u()],b.prototype,"debug",void 0),t([u()],b.prototype,"_lastPosition",void 0),t([u()],b.prototype,"_screenPoint",null),t([u()],b.prototype,"_rtl",void 0),t([u()],b.prototype,"_effectiveOffset",null),t([u()],b.prototype,"_outerContainerStyle",null),b=t([h("esri.views.interactive.Tooltip")],b);const P=["top","bottom","leading","trailing"].flatMap((t=>[O(`${t}-start`),O(t),O(`${t}-end`)]));function O(t){return`${y.base}--${t}`}function w({classList:t},e){P.forEach((e=>t.remove(e))),t.add(O(e))}const x=b;export{x as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Logger.js";import{EditableFlag as t}from"./interfaces.js";function o(t){return[t.on("before-add",(o=>{const i=o.item;if(null==i||t.includes(i))return e.getLogger("esri.views.interactive.interactiveToolUtils").warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."),void o.preventDefault();i.onAdd()})),t.on("after-remove",(e=>{const t=e.item;t.active&&(t.view.activeTool=null),t.destroy()}))]}function i(e){return e.visible&&null!=e.getEditableFlag&&e.getEditableFlag(t.USER)&&e.getEditableFlag(t.MANAGER)}export{i as areToolManipulatorsEditable,o as getToolCollectionHandles};
5
+ import e from"../../core/Logger.js";import{EditableFlag as t}from"./interfaces.js";import{interactiveToolKeys as o}from"./keybindings.js";function i(t){return[t.on("before-add",(o=>{const i=o.item;if(null==i||t.includes(i))return e.getLogger("esri.views.interactive.interactiveToolUtils").warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."),void o.preventDefault();i.onAdd()})),t.on("after-remove",(e=>{const t=e.item;t.active&&(t.view.activeTool=null),t.destroy()}))]}function n(e){return e.visible&&null!=e.getEditableFlag&&e.getEditableFlag(t.USER)&&e.getEditableFlag(t.MANAGER)}function r(e){return"key-down"===e.type&&e.key===o.cancel}export{n as areToolManipulatorsEditable,i as getToolCollectionHandles,r as isCancelEvent};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{remove as e}from"../../core/arrayUtils.js";import{makeHandle as t,handlesGroup as i}from"../../core/handleUtils.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{ViewEventPriorities as r}from"../input/InputManager.js";import{primaryKey as n}from"../input/keys.js";const s="z",a="r",p={redo:a,undo:s,center:"Alt",constraint:"Shift",cancel:"Escape",delete:["Backspace","Delete"],complete:"Enter",vertexAdd:"f",pan:" "},c={toggle:"Control"},f={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},d={moveUp:{key:"ArrowUp",modifier:"Shift",repeats:!0},moveDown:{key:"ArrowDown",modifier:"Shift",repeats:!0},moveLeft:{key:"ArrowLeft",modifier:"Shift",repeats:!0},moveRight:{key:"ArrowRight",modifier:"Shift",repeats:!0},scaleUp:{key:"+",modifier:"Shift"},scaleDown:{key:"-",modifier:"Shift"},factorModifier:{key:n,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},editSourcePoints:{key:"Alt",continuePropagation:!0},undo:s,redo:a};class h{constructor(){this._bindings=new Map}add(e,t){return this.addToggle(e,(e=>{"key-down"===e.type&&t(e)}))}addToggle(i,r){const n=m.fromDefinition(i,r),s=o(this._bindings,n.key,(()=>[]));return s.push(n),t((()=>e(s,n)))}register(e,t=r.WIDGET){return i([e.on("key-down",(t=>this.dispatch(e.inputManager,t)),t),e.on("key-up",(t=>this.dispatch(e.inputManager,t)),t)])}dispatch(e,t){const i=t.key,o=this._bindings.get(i);if(o)for(const r of o)r.process(e,t)}}class m{constructor(e,t,i,o,r){this.key=e,this.modifiers=t,this.repeats=i,this.continuePropagation=o,this.callback=r}process(e,t){if(!(t.key!==this.key||"repeat"in t&&t.repeat&&!this.repeats)){for(const t of this.modifiers)if(!e.isModifierKeyDown(t))return;this.continuePropagation||t.stopPropagation(),this.callback(t)}}static fromDefinition(e,t){if("string"==typeof e)return new m(e,[],!1,!1,t);const{key:i,modifier:o,repeats:r,continuePropagation:n}=e;return new m(i,o?Array.isArray(o)?o:[o]:[],!!r,!!n,t)}}export{h as KeyBindings,d as mediaKeys,p as sketchKeys,c as snappingKeys,f as tooltipKeys};
5
+ import{remove as e}from"../../core/arrayUtils.js";import{makeHandle as t,handlesGroup as i}from"../../core/handleUtils.js";import{getOrCreateMapValue as o}from"../../core/MapUtils.js";import{ViewEventPriorities as r}from"../input/InputManager.js";import{primaryKey as n}from"../input/keys.js";const s="z",a="r",p={cancel:"Escape",complete:"Enter"},c={...p,redo:a,undo:s,center:"Alt",constraint:"Shift",delete:["Backspace","Delete"],vertexAdd:"f",pan:" "},f={toggle:"Control"},d={enterInputMode:"Tab",commit:"Enter",discard:"Escape",next:"Tab"},h={moveUp:{key:"ArrowUp",modifier:"Shift",repeats:!0},moveDown:{key:"ArrowDown",modifier:"Shift",repeats:!0},moveLeft:{key:"ArrowLeft",modifier:"Shift",repeats:!0},moveRight:{key:"ArrowRight",modifier:"Shift",repeats:!0},scaleUp:{key:"+",modifier:"Shift"},scaleDown:{key:"-",modifier:"Shift"},factorModifier:{key:n,continuePropagation:!0},toggleOpacity:"t",preserveAspectRatio:{key:"Shift",continuePropagation:!0},rotateIncrements:{key:"Shift",continuePropagation:!0},editSourcePoints:{key:"Alt",continuePropagation:!0},undo:s,redo:a};class m{constructor(){this._bindings=new Map}add(e,t){return this.addToggle(e,(e=>{"key-down"===e.type&&t(e)}))}addToggle(i,r){const n=g.fromDefinition(i,r),s=o(this._bindings,n.key,(()=>[]));return s.push(n),t((()=>e(s,n)))}register(e,t=r.WIDGET){return i([e.on("key-down",(t=>this.dispatch(e.inputManager,t)),t),e.on("key-up",(t=>this.dispatch(e.inputManager,t)),t)])}dispatch(e,t){const i=t.key,o=this._bindings.get(i);if(o)for(const r of o)r.process(e,t)}}class g{constructor(e,t,i,o,r){this.key=e,this.modifiers=t,this.repeats=i,this.continuePropagation=o,this.callback=r}process(e,t){if(!(t.key!==this.key||"repeat"in t&&t.repeat&&!this.repeats)){for(const t of this.modifiers)if(!e.isModifierKeyDown(t))return;this.continuePropagation||t.stopPropagation(),this.callback(t)}}static fromDefinition(e,t){if("string"==typeof e)return new g(e,[],!1,!1,t);const{key:i,modifier:o,repeats:r,continuePropagation:n}=e;return new g(i,o?Array.isArray(o)?o:[o]:[],!!r,!!n,t)}}export{m as KeyBindings,p as interactiveToolKeys,h as mediaKeys,c as sketchKeys,f as snappingKeys,d as tooltipKeys};
package/views/ui/UI.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import"../../intl.js";import o from"../../core/Accessor.js";import{isSome as e}from"../../core/arrayUtils.js";import n from"../../core/Evented.js";import{makeHandle as i}from"../../core/handleUtils.js";import{watch as r,initial as s}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{cast as p}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{setCalciteThemeClass as c}from"../../support/themeUtils.js";import l from"./Component.js";import{isRTL as h}from"../../widgets/support/widgetUtils.js";import{getLocale as m,onLocaleChange as u}from"../../intl/locale.js";const f={left:0,top:0,bottom:0,right:0},_={bottom:30,top:15,right:15,left:15},g="esri-ui",y={ui:g,corner:`${g}-corner`,innerContainer:`${g}-inner-container`,manualContainer:`${g}-manual-container`,cornerContainer:`${g}-corner-container`,topLeft:`${g}-top-left`,topRight:`${g}-top-right`,bottomLeft:`${g}-bottom-left`,bottomRight:`${g}-bottom-right`};function C(t){return t&&!t._started&&"function"==typeof t.postMixInProperties&&"function"==typeof t.buildRendering&&"function"==typeof t.postCreate&&"function"==typeof t.startup}function v(t){return 0===t?"0":`${t}px`}function b(t){const o="object"==typeof t&&null!==t&&Object.getPrototypeOf(t);return(null===o||o===Object.prototype)&&("component"in t||"index"in t||"position"in t)?t:null}function w(t,{top:o,bottom:e,left:n,right:i}){t.style.top=o,t.style.bottom=e,t.style.left=n,t.style.right=i}let P=class extends n.EventedAccessor{constructor(t){super(t),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentMap=new Map,this._removeWidgetHandleKey=Symbol("componentOnRemoveSymbol"),this._locale=m(),this.view=null,this._applyViewPadding=()=>{const t=this.container;t&&w(t,this._toPixelPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const t=this._innerContainer;t&&w(t,this._toPixelPosition(this.padding))},this._initContainers()}initialize(){this.addHandles([r((()=>[this.view?.padding,this.container]),this._applyViewPadding,s),r((()=>this.padding),this._applyUIPadding,s),r((()=>[this.container,this._locale]),(([t,o])=>{t&&t.setAttribute("lang",o)}),s),u((t=>{this._locale=t}))])}destroy(){this.container=null;for(const t of this._components)t.destroy();this._components.length=0,this._componentMap.clear()}set container(t){const o=this._get("container");t!==o&&(t&&(t.classList.add(y.ui),c(t),this._attachContainers(t)),o&&(o.classList.remove(y.ui),w(o,{top:"",bottom:"",left:"",right:""}),o.textContent=""),this._set("container",t))}get height(){const t=this.view?.height??0;if(0===t)return t;const o=this._getViewPadding(),{top:e,bottom:n}=o;return Math.max(t-e-n,0)}get padding(){return this._get("padding")}set padding(t){this._overrideIfSome("padding",t)}castPadding(t){return"number"==typeof t?{bottom:t,top:t,right:t,left:t}:{..._,...t}}get width(){const t=this.view?.width??0;if(0===t)return t;const o=this._getViewPadding(),{left:e,right:n}=o;return Math.max(t-e-n,0)}add(t,o){let e,n,i;if(Array.isArray(t))return void t.forEach((t=>this.add(t,o)));const r=b(t);r&&({index:e,position:o,component:t,key:n}=r),o&&"object"==typeof o&&({index:e,key:n,position:o,internal:i}=o),!t||o&&!this._isValidPosition(o)||this._add(t,o,e,n,i)}remove(t,o){if(!t)return;if(Array.isArray(t))return t.map((t=>this.remove(t,o)));const e=this._find(t);if(e){if(this._componentMap.has(e)&&this._componentMap.get(e)?.key!==o)return;const t=this._components.indexOf(e),n=e.node.parentNode;return n?.removeChild(e.node),this._componentMap.delete(e),e.widget?.removeHandlesReference(this._removeWidgetHandleKey),this._components.splice(t,1)[0]}}empty(t,o={removeInternal:!1}){if(Array.isArray(t)){for(const e of t)this.empty(e,o);return}const e=this._positionNameToContainerLookup[t??"manual"],n=Array.prototype.slice.call(e.children).map((t=>this._findByNode(t))).filter((t=>{if(null==t)return!1;return!(this._componentMap.get(t)?.internal??!1)||o.removeInternal}));for(const i of n)this.remove(i)}move(t,o){if(Array.isArray(t)&&t.forEach((t=>this.move(t,o))),!t)return;let e;const n=b(t)||b(o);if(n&&(e=n.index,o=n.position,t=n.component||t),o&&!this._isValidPosition(o))return;const i=this.remove(t);i&&this.add(i,{position:o,index:e})}find(t){if(!t)return null;const o=this._findById(t);return o&&(o.widget||o.node)}getComponents(t,o={includeInternal:!1}){return t?Array.isArray(t)?t.flatMap((t=>this._getComponentsAtPosition(t,o))):this._getComponentsAtPosition(t,o):this._components.filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}getPosition(t){for(const o in this._positionNameToContainerLookup){if(this._positionNameToContainerLookup[o].contains(t))return o}return null}_add(t,e,n,r,s){t instanceof l||(t=new l({node:t}));const{widget:a}=t;null!=a&&a instanceof o&&a.addHandles(i((()=>{queueMicrotask((()=>this.remove(t)))})),this._removeWidgetHandleKey),this._place({component:t,position:e,index:n}),this._components.push(t),this._componentMap.set(t,{key:r,internal:s})}_find(t){return t?t instanceof l?this._findByComponent(t):"string"==typeof t?this._findById(t):this._findByNode(t.domNode||t):null}_getViewPadding(){return this.view?.padding??f}_attachContainers(t){t.appendChild(this._innerContainer),t.appendChild(this._manualContainer)}_initContainers(){const t=document.createElement("div");t.classList.add(y.innerContainer,y.cornerContainer);const o=document.createElement("div");o.classList.add(y.innerContainer,y.manualContainer);const e=document.createElement("div");e.classList.add(y.topLeft,y.corner),t.appendChild(e);const n=document.createElement("div");n.classList.add(y.topRight,y.corner),t.appendChild(n);const i=document.createElement("div");i.classList.add(y.bottomLeft,y.corner),t.appendChild(i);const r=document.createElement("div");r.classList.add(y.bottomRight,y.corner),t.appendChild(r),this._innerContainer=t,this._manualContainer=o;const s=h();this._cornerNameToContainerLookup={"top-left":e,"top-right":n,"bottom-left":i,"bottom-right":r,"top-leading":s?n:e,"top-trailing":s?e:n,"bottom-leading":s?r:i,"bottom-trailing":s?i:r},this._positionNameToContainerLookup={manual:o,...this._cornerNameToContainerLookup}}_isValidPosition(t){return!!this._positionNameToContainerLookup[t]}_place(t){const o=t.position??"manual",{component:e,index:n}=t,i=this._positionNameToContainerLookup[o],r=null!=n&&n>-1;if(C(e.widget)&&e.widget.startup(),!r)return void i.appendChild(e.node);const s=Array.from(i.children);if(0===n){const{firstChild:t}=i;return void(t?t.parentNode?.insertBefore(e.node,t):i.appendChild(e.node))}if(n>=s.length)return void i.appendChild(e.node);const a=s[n];a.parentNode?.insertBefore(e.node,a)}_toPixelPosition(t){return{top:v(t.top),left:v(t.left),right:v(t.right),bottom:v(t.bottom)}}_findByComponent(t){return this._components.find((o=>o===t))??null}_findById(t){return this._components.find((({id:o})=>o===t))??null}_findByNode(t){return this._components.find((({node:o})=>o===t))??null}_getComponentsAtPosition(t,o){const n=this._positionNameToContainerLookup[t];return Array.prototype.slice.call(n.children).map((t=>this._findByNode(t))).filter(e).filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}};t([a()],P.prototype,"_locale",void 0),t([a()],P.prototype,"container",null),t([a()],P.prototype,"height",null),t([a({value:_})],P.prototype,"padding",null),t([p("padding")],P.prototype,"castPadding",null),t([a()],P.prototype,"view",void 0),t([a()],P.prototype,"width",null),P=t([d("esri.views.ui.UI")],P);const L=P;export{L as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import"../../intl.js";import o from"../../core/Accessor.js";import{isSome as e}from"../../core/arrayUtils.js";import n from"../../core/Evented.js";import{makeHandle as i}from"../../core/handleUtils.js";import{watch as r,initial as s}from"../../core/reactiveUtils.js";import{property as a}from"../../core/accessorSupport/decorators/property.js";import{cast as d}from"../../core/accessorSupport/decorators/cast.js";import"../../core/has.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{setCalciteModeClass as c}from"../../support/modeUtils.js";import l from"./Component.js";import{isRTL as h}from"../../widgets/support/widgetUtils.js";import{getLocale as m,onLocaleChange as u}from"../../intl/locale.js";const f={left:0,top:0,bottom:0,right:0},_={bottom:30,top:15,right:15,left:15},g="esri-ui",y={ui:g,corner:`${g}-corner`,innerContainer:`${g}-inner-container`,manualContainer:`${g}-manual-container`,cornerContainer:`${g}-corner-container`,topLeft:`${g}-top-left`,topRight:`${g}-top-right`,bottomLeft:`${g}-bottom-left`,bottomRight:`${g}-bottom-right`};function C(t){return t&&!t._started&&"function"==typeof t.postMixInProperties&&"function"==typeof t.buildRendering&&"function"==typeof t.postCreate&&"function"==typeof t.startup}function v(t){return 0===t?"0":`${t}px`}function b(t){const o="object"==typeof t&&null!==t&&Object.getPrototypeOf(t);return(null===o||o===Object.prototype)&&("component"in t||"index"in t||"position"in t)?t:null}function w(t,{top:o,bottom:e,left:n,right:i}){t.style.top=o,t.style.bottom=e,t.style.left=n,t.style.right=i}let P=class extends n.EventedAccessor{constructor(t){super(t),this._cornerNameToContainerLookup={},this._positionNameToContainerLookup={},this._components=new Array,this._componentMap=new Map,this._removeWidgetHandleKey=Symbol("componentOnRemoveSymbol"),this._locale=m(),this.view=null,this._applyViewPadding=()=>{const t=this.container;t&&w(t,this._toPixelPosition(this._getViewPadding()))},this._applyUIPadding=()=>{const t=this._innerContainer;t&&w(t,this._toPixelPosition(this.padding))},this._initContainers()}initialize(){this.addHandles([r((()=>[this.view?.padding,this.container]),this._applyViewPadding,s),r((()=>this.padding),this._applyUIPadding,s),r((()=>[this.container,this._locale]),(([t,o])=>{t&&t.setAttribute("lang",o)}),s),u((t=>{this._locale=t}))])}destroy(){this.container=null;for(const t of this._components)t.destroy();this._components.length=0,this._componentMap.clear()}set container(t){const o=this._get("container");t!==o&&(t&&(t.classList.add(y.ui),c(t),this._attachContainers(t)),o&&(o.classList.remove(y.ui),w(o,{top:"",bottom:"",left:"",right:""}),o.textContent=""),this._set("container",t))}get height(){const t=this.view?.height??0;if(0===t)return t;const o=this._getViewPadding(),{top:e,bottom:n}=o;return Math.max(t-e-n,0)}get padding(){return this._get("padding")}set padding(t){this._overrideIfSome("padding",t)}castPadding(t){return"number"==typeof t?{bottom:t,top:t,right:t,left:t}:{..._,...t}}get width(){const t=this.view?.width??0;if(0===t)return t;const o=this._getViewPadding(),{left:e,right:n}=o;return Math.max(t-e-n,0)}add(t,o){let e,n,i;if(Array.isArray(t))return void t.forEach((t=>this.add(t,o)));const r=b(t);r&&({index:e,position:o,component:t,key:n}=r),o&&"object"==typeof o&&({index:e,key:n,position:o,internal:i}=o),!t||o&&!this._isValidPosition(o)||this._add(t,o,e,n,i)}remove(t,o){if(!t)return;if(Array.isArray(t))return t.map((t=>this.remove(t,o)));const e=this._find(t);if(e){if(this._componentMap.has(e)&&this._componentMap.get(e)?.key!==o)return;const t=this._components.indexOf(e),n=e.node.parentNode;return n?.removeChild(e.node),this._componentMap.delete(e),e.widget?.removeHandlesReference(this._removeWidgetHandleKey),this._components.splice(t,1)[0]}}empty(t,o={removeInternal:!1}){if(Array.isArray(t)){for(const e of t)this.empty(e,o);return}const e=this._positionNameToContainerLookup[t??"manual"],n=Array.prototype.slice.call(e.children).map((t=>this._findByNode(t))).filter((t=>{if(null==t)return!1;return!(this._componentMap.get(t)?.internal??!1)||o.removeInternal}));for(const i of n)this.remove(i)}move(t,o){if(Array.isArray(t)&&t.forEach((t=>this.move(t,o))),!t)return;let e;const n=b(t)||b(o);if(n&&(e=n.index,o=n.position,t=n.component||t),o&&!this._isValidPosition(o))return;const i=this.remove(t);i&&this.add(i,{position:o,index:e})}find(t){if(!t)return null;const o=this._findById(t);return o&&(o.widget||o.node)}getComponents(t,o={includeInternal:!1}){return t?Array.isArray(t)?t.flatMap((t=>this._getComponentsAtPosition(t,o))):this._getComponentsAtPosition(t,o):this._components.filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}getPosition(t){for(const o in this._positionNameToContainerLookup){if(this._positionNameToContainerLookup[o].contains(t))return o}return null}_add(t,e,n,r,s){t instanceof l||(t=new l({node:t}));const{widget:a}=t;null!=a&&a instanceof o&&a.addHandles(i((()=>{queueMicrotask((()=>this.remove(t)))})),this._removeWidgetHandleKey),this._place({component:t,position:e,index:n}),this._components.push(t),this._componentMap.set(t,{key:r,internal:s})}_find(t){return t?t instanceof l?this._findByComponent(t):"string"==typeof t?this._findById(t):this._findByNode(t.domNode||t):null}_getViewPadding(){return this.view?.padding??f}_attachContainers(t){t.appendChild(this._innerContainer),t.appendChild(this._manualContainer)}_initContainers(){const t=document.createElement("div");t.classList.add(y.innerContainer,y.cornerContainer);const o=document.createElement("div");o.classList.add(y.innerContainer,y.manualContainer);const e=document.createElement("div");e.classList.add(y.topLeft,y.corner),t.appendChild(e);const n=document.createElement("div");n.classList.add(y.topRight,y.corner),t.appendChild(n);const i=document.createElement("div");i.classList.add(y.bottomLeft,y.corner),t.appendChild(i);const r=document.createElement("div");r.classList.add(y.bottomRight,y.corner),t.appendChild(r),this._innerContainer=t,this._manualContainer=o;const s=h();this._cornerNameToContainerLookup={"top-left":e,"top-right":n,"bottom-left":i,"bottom-right":r,"top-leading":s?n:e,"top-trailing":s?e:n,"bottom-leading":s?r:i,"bottom-trailing":s?i:r},this._positionNameToContainerLookup={manual:o,...this._cornerNameToContainerLookup}}_isValidPosition(t){return!!this._positionNameToContainerLookup[t]}_place(t){const o=t.position??"manual",{component:e,index:n}=t,i=this._positionNameToContainerLookup[o],r=null!=n&&n>-1;if(C(e.widget)&&e.widget.startup(),!r)return void i.appendChild(e.node);const s=Array.from(i.children);if(0===n){const{firstChild:t}=i;return void(t?t.parentNode?.insertBefore(e.node,t):i.appendChild(e.node))}if(n>=s.length)return void i.appendChild(e.node);const a=s[n];a.parentNode?.insertBefore(e.node,a)}_toPixelPosition(t){return{top:v(t.top),left:v(t.left),right:v(t.right),bottom:v(t.bottom)}}_findByComponent(t){return this._components.find((o=>o===t))??null}_findById(t){return this._components.find((({id:o})=>o===t))??null}_findByNode(t){return this._components.find((({node:o})=>o===t))??null}_getComponentsAtPosition(t,o){const n=this._positionNameToContainerLookup[t];return Array.prototype.slice.call(n.children).map((t=>this._findByNode(t))).filter(e).filter((t=>o.includeInternal||!this._componentMap.get(t)?.internal)).map((({widget:t,node:o})=>t??o))}};t([a()],P.prototype,"_locale",void 0),t([a()],P.prototype,"container",null),t([a()],P.prototype,"height",null),t([a({value:_})],P.prototype,"padding",null),t([d("padding")],P.prototype,"castPadding",null),t([a()],P.prototype,"view",void 0),t([a()],P.prototype,"width",null),P=t([p("esri.views.ui.UI")],P);const L=P;export{L as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";async function r(e){const r=[];for(const o of e.allLayers)if("beforeSave"in o&&"function"==typeof o.beforeSave){const e=o.beforeSave();e&&r.push(e)}await Promise.allSettled(r)}const o=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function t(r,t,n){let s=(r.messages??[]).filter((({type:e})=>"error"===e)).map((({name:r,message:o,details:t})=>new e(r,o,t)));if(r.blockedRelativeUrls&&(s=s.concat(r.blockedRelativeUrls.map((r=>new e("url:unsupported",`Relative url '${r}' is not supported`))))),n){const{ignoreUnsupported:e,supplementalUnsupportedErrors:r=[],requiredPropertyChecksDisabled:t}=n;e&&(s=s.filter((({name:e})=>!(o.has(e)||r.includes(e))))),t&&(s=s.filter((e=>"web-document-write:property-required"!==e.name)))}if(s.length>0)throw new e(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}export{r as beforeSave,t as evaluateWriteErrors};
5
+ import e from"../../core/Error.js";import{getLayersWithChartSupport as r}from"../../layers/support/layerUtils.js";async function o(e){const r=[];for(const o of e.allLayers)if("beforeSave"in o&&"function"==typeof o.beforeSave){const e=o.beforeSave();e&&r.push(e)}await Promise.allSettled(r)}const t=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(r,o,s){let n=(r.messages??[]).filter((({type:e})=>"error"===e)).map((({name:r,message:o,details:t})=>new e(r,o,t)));if(r.blockedRelativeUrls&&(n=n.concat(r.blockedRelativeUrls.map((r=>new e("url:unsupported",`Relative url '${r}' is not supported`))))),s){const{ignoreUnsupported:e,supplementalUnsupportedErrors:r=[],requiredPropertyChecksDisabled:o}=s;e&&(n=n.filter((({name:e})=>!(t.has(e)||r.includes(e))))),o&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new e(o.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}function n(e){return r(e).some((e=>!!e.charts?.length))}export{o as beforeSave,s as evaluateWriteErrors,n as hasCharts};