@arcgis/core 5.0.0-next.73 → 5.0.0-next.75

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 (304) hide show
  1. package/Color.d.ts +8 -0
  2. package/WebDocument2D.d.ts +5 -30
  3. package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0b666327e8090a6e6f6a.js +1 -0
  6. package/assets/esri/core/workers/chunks/16a7edb381621085a631.js +1 -0
  7. package/assets/esri/core/workers/chunks/{e246b256347a281c13fd.js → 22288b62da20a7a78a4f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{7e37a3005f2ad2c0a918.js → 23cf4cbc389d2b50e968.js} +1 -1
  9. package/assets/esri/core/workers/chunks/4750f55a289bc0cf3d77.js +1 -0
  10. package/assets/esri/core/workers/chunks/{935a6dccb88557f98189.js → 76b516b8c110ad983bf6.js} +8 -6
  11. package/assets/esri/core/workers/chunks/a5181292b309b8249bd8.js +1 -0
  12. package/assets/esri/core/workers/chunks/ae733ee050f27f7d8924.js +1 -0
  13. package/assets/esri/core/workers/chunks/{64985e9b6e2edb3ceb37.js → b498db9715a722c52995.js} +45 -58
  14. package/assets/esri/core/workers/chunks/befeca51530bba5e8073.js +1 -0
  15. package/assets/esri/core/workers/chunks/cd788ed111e1e35cf9c8.js +1 -0
  16. package/assets/esri/core/workers/chunks/f35021214e534d5e0446.js +1 -0
  17. package/assets/esri/themes/base/widgets/_FeatureTable.scss +99 -22
  18. package/assets/esri/themes/dark/main.css +1 -1
  19. package/assets/esri/themes/light/main.css +1 -1
  20. package/assets/esri/themes/light/view.css +1 -1
  21. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
  22. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  23. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  24. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  25. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  26. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  27. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  28. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  29. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  30. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
  31. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  32. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  33. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  34. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  35. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  36. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  37. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  38. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  39. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  40. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  41. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  42. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  43. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  44. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  45. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  46. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  47. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  48. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  49. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  50. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  51. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  52. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  53. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  54. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  55. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  56. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  57. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  58. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  59. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  60. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  61. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  62. package/chunks/ComponentShader.glsl.js +1 -1
  63. package/chunks/GlowBlur.glsl.js +2 -3
  64. package/chunks/HUDMaterial.glsl.js +43 -56
  65. package/config.d.ts +6 -8
  66. package/config.js +1 -1
  67. package/core/Collection.d.ts +27 -1
  68. package/core/types.d.ts +0 -23
  69. package/core/urlUtils.d.ts +10 -0
  70. package/geometry/support/MeshTexture.d.ts +0 -2
  71. package/geometry/support/MeshVertexAttributes.d.ts +0 -2
  72. package/identity/IdentityManagerBase.d.ts +3 -6
  73. package/interfaces.d.ts +3 -3
  74. package/kernel.js +1 -1
  75. package/layers/BaseDynamicLayer.d.ts +1 -4
  76. package/layers/BaseElevationLayer.d.ts +3 -6
  77. package/layers/BuildingSceneLayer.d.ts +1 -4
  78. package/layers/CSVLayer.d.ts +1 -4
  79. package/layers/CatalogLayer.d.ts +1 -4
  80. package/layers/DimensionLayer.d.ts +1 -4
  81. package/layers/ElevationLayer.d.ts +3 -6
  82. package/layers/FeatureLayer.d.ts +1 -4
  83. package/layers/GaussianSplatLayer.d.ts +0 -1
  84. package/layers/GeoJSONLayer.d.ts +1 -4
  85. package/layers/GeoRSSLayer.d.ts +1 -4
  86. package/layers/GraphicsLayer.d.ts +1 -4
  87. package/layers/GroupLayer.d.ts +1 -4
  88. package/layers/ImageryLayer.d.ts +1 -4
  89. package/layers/ImageryTileLayer.d.ts +1 -4
  90. package/layers/IntegratedMesh3DTilesLayer.d.ts +1 -4
  91. package/layers/IntegratedMeshLayer.d.ts +1 -4
  92. package/layers/KMLLayer.d.ts +1 -4
  93. package/layers/Layer.d.ts +2 -6
  94. package/layers/LineOfSightLayer.d.ts +1 -4
  95. package/layers/MapImageLayer.d.ts +1 -4
  96. package/layers/MapNotesLayer.d.ts +1 -4
  97. package/layers/MediaLayer.d.ts +1 -4
  98. package/layers/OGCFeatureLayer.d.ts +1 -4
  99. package/layers/OrientedImageryLayer.d.ts +1 -4
  100. package/layers/ParquetLayer.d.ts +1 -4
  101. package/layers/PointCloudLayer.d.ts +1 -4
  102. package/layers/RouteLayer.d.ts +2 -5
  103. package/layers/SceneLayer.d.ts +1 -4
  104. package/layers/SubtypeGroupLayer.d.ts +1 -12
  105. package/layers/TileLayer.d.ts +1 -4
  106. package/layers/UnknownLayer.d.ts +1 -4
  107. package/layers/UnsupportedLayer.d.ts +1 -4
  108. package/layers/VectorTileLayer.d.ts +1 -4
  109. package/layers/VideoLayer.d.ts +1 -4
  110. package/layers/ViewshedLayer.d.ts +1 -4
  111. package/layers/VoxelLayer.d.ts +1 -4
  112. package/layers/WCSLayer.d.ts +1 -4
  113. package/layers/WFSLayer.d.ts +1 -4
  114. package/layers/WMSLayer.d.ts +1 -4
  115. package/layers/WMTSLayer.d.ts +1 -4
  116. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +1 -4
  117. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -4
  118. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -6
  119. package/layers/mixins/EditBusLayer.d.ts +0 -1
  120. package/layers/mixins/PublishableLayer.d.ts +15 -0
  121. package/layers/support/FeatureFilter.d.ts +0 -1
  122. package/layers/support/MosaicRule.d.ts +0 -4
  123. package/layers/support/PublishingInfo.d.ts +1 -1
  124. package/layers/support/types.d.ts +2 -2
  125. package/layers/types.d.ts +19 -6
  126. package/package.json +1 -1
  127. package/portal/PortalUser.d.ts +1 -1
  128. package/renderers/support/RendererLegendOptions.d.ts +0 -1
  129. package/request/types.d.ts +0 -1
  130. package/rest/support/NormalizationBinParametersMixin.d.ts +18 -20
  131. package/rest/support/PrintTemplate.d.ts +0 -1
  132. package/rest/support/RelationshipQuery.d.ts +1 -10
  133. package/rest/support/types.d.ts +29 -3
  134. package/smartMapping/heuristics/binLevel.d.ts +1 -1
  135. package/smartMapping/heuristics/scaleRange.d.ts +1 -1
  136. package/smartMapping/heuristics/sizeRange.d.ts +1 -1
  137. package/smartMapping/heuristics/types.d.ts +0 -2
  138. package/smartMapping/labels/bins.d.ts +1 -1
  139. package/smartMapping/labels/clusters.d.ts +1 -1
  140. package/smartMapping/popup/clusters.d.ts +1 -1
  141. package/smartMapping/popup/templates.d.ts +1 -1
  142. package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
  143. package/smartMapping/raster/renderers/colormap.d.ts +1 -1
  144. package/smartMapping/raster/renderers/flow.d.ts +0 -1
  145. package/smartMapping/raster/renderers/rgb.d.ts +1 -1
  146. package/smartMapping/raster/renderers/shadedRelief.d.ts +0 -1
  147. package/smartMapping/raster/renderers/stretch.d.ts +1 -1
  148. package/smartMapping/raster/renderers/uniqueValue.d.ts +0 -1
  149. package/smartMapping/raster/renderers/vectorField.d.ts +0 -1
  150. package/smartMapping/raster/support/utils.d.ts +0 -2
  151. package/smartMapping/renderers/color.d.ts +6 -6
  152. package/smartMapping/renderers/dotDensity.d.ts +0 -1
  153. package/smartMapping/renderers/heatmap.d.ts +1 -1
  154. package/smartMapping/renderers/location.d.ts +0 -1
  155. package/smartMapping/renderers/opacity.d.ts +1 -1
  156. package/smartMapping/renderers/pieChart.d.ts +0 -2
  157. package/smartMapping/renderers/predominance.d.ts +0 -1
  158. package/smartMapping/renderers/relationship.d.ts +0 -1
  159. package/smartMapping/renderers/size.d.ts +4 -6
  160. package/smartMapping/renderers/type.d.ts +9 -5
  161. package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
  162. package/smartMapping/statistics/classBreaks.d.ts +1 -1
  163. package/smartMapping/statistics/heatmapStatistics.d.ts +1 -1
  164. package/smartMapping/statistics/histogram.d.ts +1 -1
  165. package/smartMapping/statistics/predominantCategories.d.ts +1 -1
  166. package/smartMapping/statistics/summaryStatistics.d.ts +1 -1
  167. package/smartMapping/statistics/summaryStatisticsForAge.d.ts +1 -1
  168. package/smartMapping/statistics/support/ageUtils.d.ts +1 -1
  169. package/smartMapping/statistics/types.d.ts +26 -8
  170. package/smartMapping/statistics/uniqueValues.d.ts +1 -1
  171. package/smartMapping/symbology/color.d.ts +4 -4
  172. package/smartMapping/symbology/dotDensity.d.ts +3 -3
  173. package/smartMapping/symbology/flow.d.ts +3 -3
  174. package/smartMapping/symbology/heatmap.d.ts +3 -3
  175. package/smartMapping/symbology/location.d.ts +1 -1
  176. package/smartMapping/symbology/pieChart.d.ts +3 -3
  177. package/smartMapping/symbology/predominance.d.ts +3 -3
  178. package/smartMapping/symbology/relationship.d.ts +3 -3
  179. package/smartMapping/symbology/size.d.ts +1 -1
  180. package/smartMapping/symbology/support/colorRamps.d.ts +1 -1
  181. package/smartMapping/symbology/type.d.ts +3 -3
  182. package/support/revision.js +1 -1
  183. package/symbols/cim/types.d.ts +0 -12
  184. package/symbols/support/symbolUtils.d.ts +1 -1
  185. package/views/2d/MapViewConstraints.d.ts +2 -10
  186. package/views/2d/engine/brushes.js +1 -1
  187. package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
  188. package/views/2d/engine/vectorTiles/MemoryBuffer.js +1 -1
  189. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  190. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  191. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  192. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  193. package/views/2d/engine/vectorTiles/VertexMemoryBuffer.js +1 -1
  194. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  195. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  196. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  197. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  198. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  199. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  200. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  201. package/views/2d/engine/webgl/Painter.js +1 -1
  202. package/views/2d/engine/webgl/RenderingDevice.js +5 -0
  203. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  204. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  205. package/views/2d/engine/webgl/number.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +5 -0
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderCircle.js +5 -0
  209. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +5 -0
  210. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +5 -0
  211. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +5 -0
  212. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderOutline.js +5 -0
  213. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +5 -0
  214. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +5 -0
  215. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +5 -0
  216. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +5 -0
  217. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +5 -0
  218. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +5 -0
  219. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js +5 -0
  220. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  221. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  224. package/views/3d/layers/i3s/meshUtils.js +1 -1
  225. package/views/3d/state/NearFarHeuristic.js +1 -1
  226. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  227. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  228. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  229. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  230. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -4
  231. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -14
  232. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  233. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  234. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
  235. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  236. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  237. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  238. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +23 -20
  239. package/views/BreakpointsOwner.d.ts +2 -2
  240. package/views/LinkChartView.d.ts +0 -2
  241. package/views/View2D.d.ts +3 -15
  242. package/views/input/types.d.ts +2 -13
  243. package/views/layers/BuildingComponentSublayerView.d.ts +0 -1
  244. package/views/types.d.ts +2 -9
  245. package/views/webgl/RenderingContext.js +1 -1
  246. package/views/webgl/VertexArrayObject.js +1 -1
  247. package/views/webgl/renderState.js +1 -1
  248. package/webdoc/ips/SmoothingProperties.d.ts +1 -1
  249. package/webdoc/ips/SmoothingProperties.js +1 -1
  250. package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +10 -10
  251. package/widgets/BasemapLayerList/types.d.ts +6 -1
  252. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +0 -9
  253. package/widgets/Bookmarks/types.d.ts +0 -4
  254. package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
  255. package/widgets/CatalogLayerList/types.d.ts +5 -1
  256. package/widgets/Editor/VisibleElements.d.ts +0 -11
  257. package/widgets/ElevationProfile/types.d.ts +1 -1
  258. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  259. package/widgets/FeatureTable/FieldColumn.d.ts +0 -1
  260. package/widgets/FeatureTable/VisibleElements.d.ts +2 -16
  261. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +5 -3
  262. package/widgets/FeatureTable/support/AttachmentsViewOptions.js +1 -1
  263. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  264. package/widgets/FeatureTable.js +1 -1
  265. package/widgets/Features/FeaturesViewModel.d.ts +3 -27
  266. package/widgets/Features/FeaturesVisibleElements.d.ts +4 -4
  267. package/widgets/LayerList/LayerListViewModel.d.ts +20 -5
  268. package/widgets/LayerList/LayerListVisibleElements.d.ts +10 -12
  269. package/widgets/LayerList/ListItem.d.ts +33 -0
  270. package/widgets/LayerList/ListItemPanel.d.ts +8 -2
  271. package/widgets/LayerList/types.d.ts +58 -15
  272. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  273. package/widgets/Popup/PopupVisibleElements.d.ts +6 -6
  274. package/widgets/Popup/types.d.ts +1 -1
  275. package/widgets/ScaleRangeSlider/ScaleRanges.d.ts +1 -1
  276. package/widgets/Sketch/CreateToolVisibilityMap.d.ts +0 -4
  277. package/widgets/Sketch/VisibleElements.d.ts +0 -2
  278. package/widgets/Sketch/types.d.ts +1 -1
  279. package/widgets/TableList/ListItemPanel.d.ts +8 -0
  280. package/widgets/TableList/TableListViewModel.d.ts +9 -14
  281. package/widgets/TableList/TableListVisibleElements.d.ts +9 -11
  282. package/widgets/TableList/types.d.ts +13 -7
  283. package/widgets/support/SnappingControls/VisibleElements.d.ts +0 -4
  284. package/widgets/types.d.ts +1 -9
  285. package/assets/esri/core/workers/chunks/1d8fc0239c907ff5d1e8.js +0 -1
  286. package/assets/esri/core/workers/chunks/562cddaf63985e53ee6e.js +0 -1
  287. package/assets/esri/core/workers/chunks/b899b4e7979c13b99526.js +0 -1
  288. package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +0 -1
  289. package/assets/esri/core/workers/chunks/df2ba5f9d57080fca183.js +0 -1
  290. package/assets/esri/core/workers/chunks/ee175fd4ec706f7878c0.js +0 -1
  291. package/assets/esri/core/workers/chunks/fc00d7278b43df813c54.js +0 -1
  292. package/layers/mixins/ScaleRange.d.ts +0 -16
  293. package/views/2d/engine/vectorTiles/shaders/Programs.js +0 -5
  294. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +0 -5
  295. package/views/2d/engine/vectorTiles/shaders/sources/resolver.js +0 -5
  296. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +0 -5
  297. package/views/2d/engine/vtlBrushes.js +0 -5
  298. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +0 -5
  299. package/views/2d/engine/webgl/brushes/WGLBrushVTLCircle.js +0 -5
  300. package/views/2d/engine/webgl/brushes/WGLBrushVTLFill.js +0 -5
  301. package/views/2d/engine/webgl/brushes/WGLBrushVTLLine.js +0 -5
  302. package/views/2d/engine/webgl/brushes/WGLBrushVTLSymbol.js +0 -5
  303. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +0 -5
  304. package/widgets/FeatureTable/support/FeatureStore.d.ts +0 -1
@@ -8,7 +8,7 @@ smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
8
8
  return snow * snowCover;
9
9
  }`),e.code.add(n.H`vec3 applySnowToMRR(vec3 mrr, float snow) {
10
10
  return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
11
- }`))}},11725:(e,t,r)=>{r.d(t,{i:()=>l});var i=r(24326),n=r(49255),o=r(99550),a=r(43616),s=r(65786);class l{constructor(e,t){this.id=(0,i.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,a.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,a.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e,t,r=new o.E){return r.output=e,r.hasEmission=t.hasEmission&&(0,n._o)(e),r.hasHighlightMixTexture=8===e&&null!=t.highlightMixTexture,r}}s.Y},11868:(e,t,r)=>{r.d(t,{Wz:()=>o,oe:()=>n});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}function o(e){return(Array.isArray(e)?e.length:e.byteLength/8)<=i.y9?Array.from(e):new Float32Array(e)}},12791:(e,t,r)=>{r.d(t,{x:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}},13840:(e,t,r)=>{r.d(t,{r:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},14113:(e,t,r)=>{r.d(t,{N5:()=>s});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends a{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new h,this.varyings=new m,this.outputs=new p}get fragmentUniforms(){return this.fragment.uniforms.entries}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){const r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),a=n.code.generateSource(),s=n.main.generateSource(t),l=this.debugName?`// ${this.debugName}\n`:"",c="vertex"===e?g:v,d=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${l}\n${c}\n${d.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${u.join("\n")}\n${a.join("\n")}\n${s.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let a=0;a<i;++a)r[a](e,o,t,n)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class d{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class u extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new c(this),this.code=new d(this),this.constants=new f(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?.name!==e||i?.type!==t?this._entries.set(r,{name:e,type:t}):o().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class f{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=f._numberToFloatStr(r);break;case"int":i=f._numberToIntStr(r);break;case"uint":i=f._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])}, ${f._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])}, ${f._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])}, ${f._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>f._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const v="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",g="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},14314:(e,t,r)=>{r.d(t,{I:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",0,(i,n)=>i.setUniform4fv(e,t(n),r))}}},14527:(e,t,r)=>{r.d(t,{n:()=>vt});var i=r(31821),n=r(12791),o=r(31635),a=r(34727),s=r(97768),l=r(36708),c=r(78659),d=r(91429),u=r(37585),h=r(69540);let m=class extends h.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"rows",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"columns",void 0),m=(0,o.Cg)([(0,d.$K)("esri.CameraLayout")],m);const p=m;var f=r(69052),v=r(25482),g=r(56507),_=r(86738),x=r(43937),w=r(36005);let b=class extends((0,h.OU)(v.o)){constructor(...e){super(...e),this.position=new _.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new p}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,g.GB)(e.x||0),n.y=(0,g.GB)(e.y||0),n.z=e.hasZ?(0,g.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new _.A;return r.read(e,t),r.x=(0,g.GB)(r.x||0),r.y=(0,g.GB)(r.y||0),r.z=r.hasZ?(0,g.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,d.MZ)({type:_.A,json:{write:{isRequired:!0}}})],b.prototype,"position",void 0),(0,o.Cg)([(0,x.K)("position")],b.prototype,"writePosition",null),(0,o.Cg)([(0,w.w)("position")],b.prototype,"readPosition",null),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,d.wg)(e=>f.ie.normalize((0,g.GB)(e)))],b.prototype,"heading",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,d.wg)(e=>(0,a.qE)((0,g.GB)(e),-180,180))],b.prototype,"tilt",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,d.wg)(e=>(0,a.qE)((0,g.GB)(e,55),1,170))],b.prototype,"fov",void 0),(0,o.Cg)([(0,d.MZ)({type:p,nonNullable:!0,json:{read:!1,write:!1}})],b.prototype,"layout",void 0),b=(0,o.Cg)([(0,d.$K)("esri.Camera")],b);var y=r(9093),M=r(38954),T=r(51850),C=r(16930),S=(r(48353),r(9762),r(65806)),E=r(27993),A=r(73941),I=(r(19419),r(71351)),R=r(69622),O=r(53966),F=r(90629),P=r(58083),D=r(48163),H=r(87317),N=r(91829),z=r(82919),L=r(44280);const B=(0,T.vt)(),V=(0,T.vt)();var U;let G=U=class extends R.A{constructor(e){super(e),this._ray=(0,I.vt)(),this._viewport=(0,N.fA)(0,0,1,1),this._padding=(0,N.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,D.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,y.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,y.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,y.vt)(),this._frustumDirty=!0,this._frustum=(0,z.vt)(),this._fullViewport=(0,N.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,T.vt)(),this._up=(0,T.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,M.e)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,P.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,M.h)((0,T.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,M.h)((0,T.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,M.h)((0,T.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,H.s)((0,N.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,H.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,H.s)((0,N.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,H.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,H.a)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,H.f)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,P.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,P.B8)((0,y.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,y.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,M.B)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,P.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,P.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,d=(0,P.$h)((0,y.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),u=this._get("projectionMatrix");return u&&(0,P.aI)(u,d)?u:d}copyFrom(e){(0,M.d)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,H.f)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,H.f)(this._padding,e.padding),this.notifyChange("_padding"),(0,u.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,P.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,z.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,P.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,H.f)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new U).copyFrom(this)}equals(e){return(0,M.m)(this.eye,e.eye)&&(0,M.m)(this.center,e.center)&&(0,M.m)(this.up,e.up)&&(0,H.a)(this._viewport,e.viewport)&&(0,H.a)(this._padding,e.padding)&&(0,u.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,H.g)(e.screenPadding,this.screenPadding)>=t||(0,H.g)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,M.a)(k,e.eye,e.center),(0,M.a)($,this.eye,this.center);const r=(0,M.g)(k,$),i=(0,M.H)(k),n=(0,M.H)($),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,M.G)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,M.e)(k,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==j&&(0,M.d)(j,e),j[3]=1,(0,H.t)(j,j,this.projectionMatrix);const r=Math.abs(j[3]);(0,M.j)(j,j,1/r);const i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*j[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*j[1]),t[2]=.5*(j[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;j[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],j[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],j[2]=(2*e[2]-1)*e[3],j[3]=e[3],null!=this.inverseProjectionMatrix&&((0,H.t)(j,j,this.inverseProjectionMatrix),t[0]=j[0],t[1]=j[1],t[2]=j[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,Z),this.renderToScreen(Z,t),t}projectToRenderScreen(e,t){if(j[0]=e[0],j[1]=e[1],j[2]=e[2],j[3]=1,(0,H.t)(j,j,this.viewProjectionMatrix),0===j[3])return null;const r=j;(0,M.j)(r,r,1/Math.abs(j[3]));const i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,Z),t)}unprojectFromRenderScreen(e,t){if((0,P.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,P.B8)(W,W))return null;const r=this.fullViewport;return j[0]=2*(e[0]-r[0])/r[2]-1,j[1]=2*(e[1]-r[1])/r[3]-1,j[2]=2*e[2]-1,j[3]=1,(0,H.t)(j,j,W),0===j[3]?null:(t[0]=j[0]/j[3],t[1]=j[1]/j[3],t[2]=j[2]/j[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),d=r-l- -Math.min(this.fullWidth-n-r/2,0),u=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(d),Math.round(u)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,s=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,B),(0,M.e)(V,r,t);const i=(0,M.b)(V);return 0===i?0:(0,a.XM)((0,M.g)(V,B)/i)}(t,r,i));return e.frustumCoverage(s,n,o)}_computeUpGlobal(){(0,M.e)(k,this.center,this.eye);const e=(0,M.b)(this.center);e<1?(0,M.m)(this._up,T.Cb)&&((0,M.d)(this._up,T.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,M.g)(k,this.center))>.9999*(0,M.b)(k)*e||((0,M.f)($,k,this.center),(0,M.f)($,$,k),(0,M.n)($,$),(0,M.m)(this._up,$)||((0,M.d)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,M.C)(k,this.eye,this.center),Math.abs(k[2])<=.9999&&((0,M.j)(k,k,k[2]),(0,M.h)(k,-k[0],-k[1],1-k[2]),(0,M.n)(k,k),(0,M.m)(this._up,k)||((0,M.d)(this._up,k),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,M.m)(e,t)||((0,M.d)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):O.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,z.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,P.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,d.MZ)()],G.prototype,"_viewport",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_padding",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_fov",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_nearFar",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"pixelRatio",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_rows",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"rows",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_columns",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"columns",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"eye",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"center",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_center",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"up",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_up",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"viewMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"viewForward",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"viewUp",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"viewRight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"nearFar",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"near",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"far",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"viewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"screenViewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"screenPadding",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"x",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"y",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"width",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"height",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fullWidth",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fullHeight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"_aspect",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"padding",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"projectionMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fov",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fovX",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fovY",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"relativeElevation",void 0),G=U=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl.RenderCamera")],G);const j=(0,N.vt)(),W=(0,y.vt)(),k=(0,T.vt)(),$=(0,T.vt)(),Z=(0,F.r_)();r(49718),r(6867),r(16396),(0,T.vt)(),(0,T.vt)(),(0,T.vt)();var q=r(5443),Y=r(39829),X=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return 1===n?1:0;const s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(Q,t[0],t[0])&&J(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(Q,t[r],i)){case 1:J(e,i);break;case 3:J(e,(0,D.o8)(Q));break;case 2:J(e,(0,D.o8)(Q)),J(e,i)}}}}function J(e,t){0!==e.length&&(0,u.aI)(e.at(-1),t)||e.push(t)}const Q=(0,D.vt)();var ee=r(11964),te=r(27921);const re=(0,T.vt)(),ie=(0,T.vt)();function ne(){return{direction:(0,T.vt)(),up:(0,T.vt)()}}function oe(e,t,r,i,n){let o=(0,M.n)(re,e),s=(0,M.g)(o,i);const l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,M.g)(t,i)),s<.99?((0,M.d)(o,t),l&&(0,M.j)(o,o,-1)):o=null);let c=0;if(o){(0,M.j)(ie,i,(0,M.g)(i,o)),(0,M.e)(o,o,ie);const e=(0,M.g)(o,n)/((0,M.b)(o)*(0,M.b)(n));(0,M.f)(ie,o,n),c=((0,M.g)(ie,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}const d=(0,a.KJ)((0,a.XM)(-(0,M.g)(i,e)/(0,M.b)(e)));return r?(r.heading=c,r.tilt=d,r):{heading:c,tilt:d}}function ae(e,t,r,i){(0,M.e)(se,r,t),(0,te.T7)(i,(0,ee.LV)(t,se),e)||e===r||(0,M.d)(e,r)}const se=(0,T.vt)(),le=(0,T.fA)(0,1,0),ce=(0,T.fA)(0,0,1),de=(0,y.vt)(),ue=(0,T.vt)(),he=(0,T.vt)();function me(e,t,r,i=ne()){const{direction:n,up:o}=i;return(0,P.N9)(de,-(0,a.kU)(t)),(0,P.eL)(de,de,(0,a.kU)(r)),(0,M.p)(n,ce,de),(0,M.j)(n,n,-1),(0,M.p)(o,le,de),i}function pe(e,t,r,i,n){const o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,M.c)(e,i,o,a)}const fe=(0,T.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return oe(t,r,i,ce,le)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,T.vt)();return(0,M.j)(o,n.direction,-t),(0,M.i)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,I.LV)(t.origin,t.direction),n,fe)||pe(fe,r,i,t.endpoint,n),ae(fe,a,fe,l),s.push((0,D.fA)(fe[0],fe[1]))}return function(e,t,r){const i=e.map(e=>((0,M.h)(fe,e[0],e[1],0),t.fromRenderCoords(fe,fe,r),[fe[0],fe[1]]));return i.length<=2?new Y.A({spatialReference:r}):(i.push(i[0].slice()),(0,X.$3)(i)||i.reverse(),new Y.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,S.g)(t,ue,o),(0,S.g)(t,he,o),ue[0]-=r/2,he[0]+=r/2,ue[1]-=i/2,he[1]+=i/2,(0,E.F)(ue,o,ue,a),(0,E.F)(he,o,he,a),n?(n.xmin=ue[0],n.ymin=ue[1],n.xmax=he[0],n.ymax=he[1],n.spatialReference=a):n=new q.A(ue[0],ue[1],he[0],he[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ve=r(34304),ge=r(17136),_e=r(94008),xe=r(28735);class we{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,z.vt)(),this._points=(0,z.Qy)(),this.lines=new Array(12),this._origin=(0,T.vt)(),this._direction=(0,T.vt)(),this._boundingSphere=new _e.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,T.vt)(),endpoint:null}}update(e){(0,z.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,M.d)(this._origin,e.eye),(0,M.d)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,M.d)(this._points[t],e[t]);(0,z.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,z.m7)(this.frustum,e)}intersectsRay(e){return(0,z.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,z.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,z.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;be(this.lines[t],e[t],e[r]),be(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),be(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=Me;(0,M.n)(t,this.direction);const r=ye;(0,M.a)(r,this.points[4],e);const i=.5*(0,M.g)(r,r)/(0,M.g)(t,r),n=this._boundingSphere,o=(0,M.c)(Te,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=z.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function be(e,t,r){e.origin=t,e.endpoint=r,(0,M.C)(e.direction,t,r)}const ye=(0,T.vt)(),Me=(0,T.vt)(),Te=(0,T.vt)();r(86211);const Ce=(0,T.fA)(5802e-9,13558e-9,331e-7),Se=(0,T.fA)(65e-8*3,5643e-9,255e-9);(0,T.fA)(Ce[0]+Se[0],Ce[1]+Se[1],Ce[2]+Se[2]);class Ee{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ee(0,0)}static{this.Infinite=new Ee}}(0,T.vt)(),(0,T.vt)(),new _e.iy,(0,I.vt)();var Ae=r(32728);const Ie=(0,T.fA)(0,0,1),Re=(0,M.n)((0,T.vt)(),(0,T.fA)(1,1,1)),Oe=(0,y.vt)(),Fe=(0,T.vt)(),Pe=(0,T.vt)();function De(e,t,r,i=ne()){(0,M.f)(Fe,e,Ie),0===(0,M.g)(Fe,Fe)&&(0,M.f)(Fe,e,Re),(0,P.$0)(Oe,-(0,a.kU)(t),e),(0,P.e$)(Oe,Oe,-(0,a.kU)(r),Fe);const{up:n,direction:o}=i;return(0,M.f)(n,Fe,e),(0,M.n)(n,n),(0,M.p)(n,n,Oe),(0,M.n)(o,e),(0,M.q)(o,o),(0,M.p)(o,o,Oe),i}function He(e){const t=e[1];e[1]=-e[2],e[2]=t}function Ne(e,t){const r=De(t,e.heading,e.tilt);return e.up=r.up,e}function ze(e,t){const r=[],i=[],n=(0,ve.FD)();for(let o=0;o<e.length;o++){const a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,ee.Cr)(a,s,ke),c=(0,te.vE)(t,l.origin,l.vector,0,je);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{const[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,te.Qj)(t),d=(0,M.c)((0,T.vt)(),je,l,e*n),u=(0,M.c)((0,T.vt)(),je,l,e*-n);o.push(a),o.push(d),s.push(u)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Le={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Be=(0,T.fA)(1,0,0),Ve=(0,T.fA)(0,1,0),Ue=(0,T.vt)(),Ge=(0,T.vt)(),je=(0,T.vt)(),We=new _e.iy,ke=(0,ee.vt)(),$e=(0,N.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Fe,o=Pe;return(0,M.n)(n,e),(0,M.f)(Pe,n,Ie),0===(0,M.g)(Pe,Pe)&&(0,M.f)(Pe,n,Re),(0,M.f)(o,Pe,n),oe(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,T.vt)(),up:null,tilt:i,heading:r},o=Fe;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,l=(0,a.kU)(r),c=(0,a.kU)(i),d=Math.sin(l),u=Math.cos(l),h=Math.sin(c),m=Math.cos(c),p=(0,M.b)(o);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/h,t=(0,a.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const v=m*s,g=s*s*(h*h),_=u*u*g,x=f-v,w=x*x,b=_*(_+w-o[1]*o[1]);if(b<0)return(0,M.j)(n.eye,o,f/p),n.tilt=0,Ne(n,e);const y=Math.sqrt(b),C=o[1]*x,S=_+w;let E;if(E=u>0?-y+C:y+C,Math.abs(S)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,M.j)(n.eye,o,f/p),n.tilt=0,He(n.eye),Ne(n,e);n.eye[1]=E/S;const A=d*d*g,I=h*s,R=u*I*n.eye[1],O=n.eye[1]*n.eye[1],F=1-O,P=Math.sqrt(F),D=_*O+A-2*R*P*x+F*w;return Math.abs(D)<1e-8?((0,M.j)(n.eye,o,f/p),n.tilt=0,He(n.eye),Ne(n,e)):(n.eye[0]=(F*(f*o[0]-v*o[0])-I*P*(o[0]*n.eye[1]*u+o[2]*d))/D,n.eye[2]=(F*(f*o[2]-v*o[2])-I*P*(o[2]*n.eye[1]*u-o[0]*d))/D,(0,M.j)(n.eye,n.eye,f),He(n.eye),Ne(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,a.kU)(e),n=(0,M.b)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:De,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,M.b)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new we(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,d=1+(0,M.B)(c,t)/(l+o),u=Math.sqrt(d*d-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=Le,v=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return We.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(We,t)}(e),g=(0,a.qE)((u-h)/(m-h),0,1),_=Math.round((0,a.Cc)(p,f,g)),x=i.aboveGround,w=n.planes[5],b=[],y=(0,te.O_)(T.uY,Be,(0,te.vt)()),C=(0,te.O_)(T.uY,Ve,(0,te.vt)());(0,H.c)($e,0,0,0,0);const S=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-v:0,i=1===e&&x||3===e&&!x?v:1,s=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const d=n/_,u=0===n?0:(0,a.Cc)(t,i,1===e?1-(1-d)**2:3===e?d**2:d),h=(0,M.l)(Ge,s.origin,l.origin,u),m=(0,Ae.nu)(s.direction,l.direction,u,Ue);r.intersectManifoldClosestSilhouette((0,I.LV)(h,m),o,je),ae(je,c,je,w),b.push((0,T.o8)(je)),0!==b.length&&S((0,M.G)(b.at(-1),je));const p=((0,te.Tj)(y,je)?1:0)|((0,te.Tj)(C,je)?2:0);$e[p]=1}}b.length>2&&(0,M.G)(b[0],b.at(-1));const E=function(e,t,r){const i=2*(0,ve.FD)();return e.map(e=>{const n=[];let o=!1;for(const a of e)t.fromRenderCoords(a,je,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,je[1]]),n.push([null,je[1]]),o=!0):n.push([je[0],je[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,X.$3)(n)||n.reverse(),n})}((0,H.d)($e)>1?function(e,t){const r=[];for(const i of e)r.push(...ze(i,t));return r}(ze(b,y),C):[b],r,s);return new Y.A({rings:E,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c;const d=t.latitude,u=(0,A.tO)(e.spatialReference).radius,h=t.longitude,m=function(e,t,r){const i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(d,r,u)/2;o=h-m,s=h+m;const p=(0,a.kU)(d),v=(1+Math.sin(p))/(1-Math.sin(p)),g=(v+1)*Math.tan(i/u/2),_=g*g;function x(e){const t=Math.PI/2;return(e=f.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*v+_))),c=l+i/u,l=x(l),c=x(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=ge.Y_.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const w=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:C.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=w):n=new q.A(o,l,s,c,w),e.spatialReference&&e.spatialReference.isWebMercator&&(0,xe.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ze="ssao";(0,T.vt)();var qe=r(49186),Ye=r(10107),Xe=r(64108);let Ke=class extends R.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new qe.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,Ye.MZ)({constructOnly:!0})],Ke.prototype,"view",void 0),(0,o.Cg)([(0,Ye.MZ)({constructOnly:!0})],Ke.prototype,"consumes",void 0),(0,o.Cg)([(0,Ye.MZ)()],Ke.prototype,"produces",void 0),(0,o.Cg)([(0,Ye.MZ)({readOnly:!0})],Ke.prototype,"techniques",null),Ke=(0,o.Cg)([(0,Xe.$)("esri.views.3d.webgl.RenderNode")],Ke);var Je=r(13840),Qe=r(42958),et=r(95774),tt=r(90644);let rt=class extends Qe.w{constructor(){super(...arguments),this.shader=new Je.r(et.S,()=>r.e(9384).then(r.bind(r,59384)))}initializePipeline(){return(0,tt.Ey)({colorWrite:tt.kn})}};rt=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],rt);var it=r(65786);class nt extends it.Y{constructor(){super(...arguments),this.projScale=1}}class ot extends nt{constructor(){super(...arguments),this.intensity=1}}class at extends it.Y{}class st extends at{constructor(){super(...arguments),this.blurSize=(0,D.vt)()}}var lt=r(15581);let ct=class extends Qe.w{constructor(){super(...arguments),this.shader=new Je.r(lt.S,()=>r.e(191).then(r.bind(r,90191)))}initializePipeline(){return(0,tt.Ey)({colorWrite:tt.kn})}};ct=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],ct);var dt=r(63907),ut=r(76284),ht=r(67171);const mt=2;let pt=class extends Ke{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=Ze,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new ot,this._drawParameters=new st}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new ht.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new ut.A(this.renderingContext,t,e),this.techniques.precompile(ct),this.techniques.precompile(rt),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(dt.nI);if(!r||!i)return;const n=this.techniques.get(ct),o=this.techniques.get(rt);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,h=d.camera,m=h.relativeElevation,p=(0,a.qE)((5e5-m)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=f*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*ft/(0,lt.g)(h)**6*v;const g=h.fullViewport[2],_=h.fullViewport[3],x=this.fboCache.acquire(g,_,"ssao input",2);s.bindFramebuffer(x.fbo),s.setViewport(0,0,g,_),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const w=Math.round(g/mt),b=Math.round(_/mt),y=this.fboCache.acquire(w,b,"ssao blur",0);s.bindFramebuffer(y.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,u.hZ)(this._drawParameters.blurSize,0,mt/_),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,b),s.screen.draw(),x.release();const M=this.fboCache.acquire(w,b,Ze,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,g,_),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=y.getTexture(),(0,u.hZ)(this._drawParameters.blurSize,mt/g,0),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,b),s.screen.draw(),s.setViewport4fv(h.fullViewport),y.release(),f<1&&this.requestRender(2),M}};(0,o.Cg)([(0,d.MZ)()],pt.prototype,"consumes",void 0),(0,o.Cg)([(0,d.MZ)()],pt.prototype,"produces",void 0),(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],pt.prototype,"isEnabled",void 0),pt=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],pt);const ft=.5;function vt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1/mt),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
11
+ }`))}},11725:(e,t,r)=>{r.d(t,{i:()=>l});var i=r(24326),n=r(49255),o=r(99550),a=r(43616),s=r(65786);class l{constructor(e,t){this.id=(0,i.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,a.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,a.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e,t,r=new o.E){return r.output=e,r.hasEmission=t.hasEmission&&(0,n._o)(e),r.hasHighlightMixTexture=8===e&&null!=t.highlightMixTexture,r}}s.Y},11868:(e,t,r)=>{r.d(t,{Wz:()=>o,oe:()=>n});var i=r(34275);function n(e,t=!1){return e<=i.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}function o(e){return(Array.isArray(e)?e.length:e.byteLength/8)<=i.y9?Array.from(e):new Float32Array(e)}},12791:(e,t,r)=>{r.d(t,{x:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}},13840:(e,t,r)=>{r.d(t,{r:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},14113:(e,t,r)=>{r.d(t,{N5:()=>s});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class a{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends a{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new h,this.varyings=new m,this.outputs=new p}get fragmentUniforms(){return this.fragment.uniforms.entries}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){const r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),a=n.code.generateSource(),s=n.main.generateSource(t),l=this.debugName?`// ${this.debugName}\n`:"",c="vertex"===e?g:v,d=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${l}\n${c}\n${d.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${u.join("\n")}\n${a.join("\n")}\n${s.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let a=0;a<i;++a)r[a](e,o,t,n)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class d{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class u extends a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new c(this),this.code=new d(this),this.constants=new f(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?.name!==e||i?.type!==t?this._entries.set(r,{name:e,type:t}):o().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class f{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=f._numberToFloatStr(r);break;case"int":i=f._numberToIntStr(r);break;case"uint":i=f._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])}, ${f._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])}, ${f._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])}, ${f._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>f._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const v="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",g="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},14314:(e,t,r)=>{r.d(t,{I:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",0,(i,n)=>i.setUniform4fv(e,t(n),r))}}},14527:(e,t,r)=>{r.d(t,{n:()=>vt});var i=r(31821),n=r(12791),o=r(31635),a=r(34727),s=r(97768),l=r(36708),c=r(78659),d=r(91429),u=r(37585),h=r(69540);let m=class extends h.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"rows",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"columns",void 0),m=(0,o.Cg)([(0,d.$K)("esri.CameraLayout")],m);const p=m;var f=r(69052),v=r(25482),g=r(56507),_=r(86738),x=r(43937),w=r(36005);let b=class extends((0,h.OU)(v.o)){constructor(...e){super(...e),this.position=new _.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new p}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,g.GB)(e.x||0),n.y=(0,g.GB)(e.y||0),n.z=e.hasZ?(0,g.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new _.A;return r.read(e,t),r.x=(0,g.GB)(r.x||0),r.y=(0,g.GB)(r.y||0),r.z=r.hasZ?(0,g.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,d.MZ)({type:_.A,json:{write:{isRequired:!0}}})],b.prototype,"position",void 0),(0,o.Cg)([(0,x.K)("position")],b.prototype,"writePosition",null),(0,o.Cg)([(0,w.w)("position")],b.prototype,"readPosition",null),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,d.wg)(e=>f.ie.normalize((0,g.GB)(e)))],b.prototype,"heading",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,d.wg)(e=>(0,a.qE)((0,g.GB)(e),-180,180))],b.prototype,"tilt",void 0),(0,o.Cg)([(0,d.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,d.wg)(e=>(0,a.qE)((0,g.GB)(e,55),1,170))],b.prototype,"fov",void 0),(0,o.Cg)([(0,d.MZ)({type:p,nonNullable:!0,json:{read:!1,write:!1}})],b.prototype,"layout",void 0),b=(0,o.Cg)([(0,d.$K)("esri.Camera")],b);var y=r(9093),M=r(38954),T=r(51850),C=r(16930),S=(r(48353),r(9762),r(65806)),E=r(27993),A=r(73941),I=(r(19419),r(71351)),R=r(69622),O=r(53966),F=r(90629),P=r(58083),D=r(48163),H=r(87317),N=r(91829),z=r(82919),L=r(44280);const B=(0,T.vt)(),V=(0,T.vt)();var U;let G=U=class extends R.A{constructor(e){super(e),this._ray=(0,I.vt)(),this._viewport=(0,N.fA)(0,0,1,1),this._padding=(0,N.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,D.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,y.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,y.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,y.vt)(),this._frustumDirty=!0,this._frustum=(0,z.vt)(),this._fullViewport=(0,N.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,T.vt)(),this._up=(0,T.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,M.e)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,P.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,M.h)((0,T.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,M.h)((0,T.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,M.h)((0,T.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,H.s)((0,N.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,H.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,H.s)((0,N.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,H.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,H.a)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,H.f)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,P.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,P.B8)((0,y.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,y.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,M.B)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,P.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,P.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,a=-i/2+this.column*o,s=a+o,l=-r/2+this.row*n,c=l+n,d=(0,P.$h)((0,y.vt)(),a*(1+2*this._padding[3]/e),s*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),u=this._get("projectionMatrix");return u&&(0,P.aI)(u,d)?u:d}copyFrom(e){(0,M.d)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,H.f)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,H.f)(this._padding,e.padding),this.notifyChange("_padding"),(0,u.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,P.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,z.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,P.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,H.f)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new U).copyFrom(this)}equals(e){return(0,M.m)(this.eye,e.eye)&&(0,M.m)(this.center,e.center)&&(0,M.m)(this.up,e.up)&&(0,H.a)(this._viewport,e.viewport)&&(0,H.a)(this._padding,e.padding)&&(0,u.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,H.g)(e.screenPadding,this.screenPadding)>=t||(0,H.g)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,M.a)(k,e.eye,e.center),(0,M.a)($,this.eye,this.center);const r=(0,M.g)(k,$),i=(0,M.H)(k),n=(0,M.H)($),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,M.G)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,M.e)(k,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==j&&(0,M.d)(j,e),j[3]=1,(0,H.t)(j,j,this.projectionMatrix);const r=Math.abs(j[3]);(0,M.j)(j,j,1/r);const i=this.fullViewport;t[0]=(0,a.Cc)(0,i[0]+i[2],.5+.5*j[0]),t[1]=(0,a.Cc)(0,i[1]+i[3],.5+.5*j[1]),t[2]=.5*(j[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;j[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],j[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],j[2]=(2*e[2]-1)*e[3],j[3]=e[3],null!=this.inverseProjectionMatrix&&((0,H.t)(j,j,this.inverseProjectionMatrix),t[0]=j[0],t[1]=j[1],t[2]=j[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,Z),this.renderToScreen(Z,t),t}projectToRenderScreen(e,t){if(j[0]=e[0],j[1]=e[1],j[2]=e[2],j[3]=1,(0,H.t)(j,j,this.viewProjectionMatrix),0===j[3])return null;const r=j;(0,M.j)(r,r,1/Math.abs(j[3]));const i=this.fullViewport,n=(0,a.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,a.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,Z),t)}unprojectFromRenderScreen(e,t){if((0,P.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,P.B8)(W,W))return null;const r=this.fullViewport;return j[0]=2*(e[0]-r[0])/r[2]-1,j[1]=2*(e[1]-r[1])/r[3]-1,j[2]=2*e[2]-1,j[3]=1,(0,H.t)(j,j,W),0===j[3]?null:(t[0]=j[0]/j[3],t[1]=j[1]/j[3],t[2]=j[2]/j[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,a=Math.max(n-r/2,0),s=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),d=r-l- -Math.min(this.fullWidth-n-r/2,0),u=i-c- -Math.min(o-i/2,0);return[Math.round(a),Math.round(s),Math.round(d),Math.round(u)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,s=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,B),(0,M.e)(V,r,t);const i=(0,M.b)(V);return 0===i?0:(0,a.XM)((0,M.g)(V,B)/i)}(t,r,i));return e.frustumCoverage(s,n,o)}_computeUpGlobal(){(0,M.e)(k,this.center,this.eye);const e=(0,M.b)(this.center);e<1?(0,M.m)(this._up,T.Cb)&&((0,M.d)(this._up,T.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,M.g)(k,this.center))>.9999*(0,M.b)(k)*e||((0,M.f)($,k,this.center),(0,M.f)($,$,k),(0,M.n)($,$),(0,M.m)(this._up,$)||((0,M.d)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,M.C)(k,this.eye,this.center),Math.abs(k[2])<=.9999&&((0,M.j)(k,k,k[2]),(0,M.h)(k,-k[0],-k[1],1-k[2]),(0,M.n)(k,k),(0,M.m)(this._up,k)||((0,M.d)(this._up,k),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,M.m)(e,t)||((0,M.d)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):O.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,z.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,P.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,d.MZ)()],G.prototype,"_viewport",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_padding",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_fov",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_nearFar",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"pixelRatio",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"row",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"column",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_rows",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"rows",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_columns",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"columns",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"eye",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"center",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_center",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"up",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"_up",void 0),(0,o.Cg)([(0,d.MZ)()],G.prototype,"viewMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"viewForward",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"viewUp",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"viewRight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"nearFar",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"near",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"far",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"viewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"screenViewport",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"screenPadding",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"x",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"y",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"width",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"height",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fullWidth",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fullHeight",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"_aspect",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"padding",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"projectionMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fov",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fovX",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"fovY",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,d.MZ)({readOnly:!0})],G.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,d.MZ)()],G.prototype,"relativeElevation",void 0),G=U=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl.RenderCamera")],G);const j=(0,N.vt)(),W=(0,y.vt)(),k=(0,T.vt)(),$=(0,T.vt)(),Z=(0,F.r_)();r(49718),r(6867),r(16396),(0,T.vt)(),(0,T.vt)(),(0,T.vt)();var q=r(5443),Y=r(39829),X=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,a)=>{if(t[r]<i&&a[r]<i)return 1===n?0:1;if(t[r]>i&&a[r]>i)return 1===n?1:0;const s=(a[o]-t[o])/(a[r]-t[r]),l=t[o]+s*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(Q,t[0],t[0])&&J(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(Q,t[r],i)){case 1:J(e,i);break;case 3:J(e,(0,D.o8)(Q));break;case 2:J(e,(0,D.o8)(Q)),J(e,i)}}}}function J(e,t){0!==e.length&&(0,u.aI)(e.at(-1),t)||e.push(t)}const Q=(0,D.vt)();var ee=r(11964),te=r(27921);const re=(0,T.vt)(),ie=(0,T.vt)();function ne(){return{direction:(0,T.vt)(),up:(0,T.vt)()}}function oe(e,t,r,i,n){let o=(0,M.n)(re,e),s=(0,M.g)(o,i);const l=s>0;s=Math.abs(s),s>.99&&(s=Math.abs((0,M.g)(t,i)),s<.99?((0,M.d)(o,t),l&&(0,M.j)(o,o,-1)):o=null);let c=0;if(o){(0,M.j)(ie,i,(0,M.g)(i,o)),(0,M.e)(o,o,ie);const e=(0,M.g)(o,n)/((0,M.b)(o)*(0,M.b)(n));(0,M.f)(ie,o,n),c=((0,M.g)(ie,i)>0?1:-1)*(0,a.KJ)((0,a.XM)(e))}const d=(0,a.KJ)((0,a.XM)(-(0,M.g)(i,e)/(0,M.b)(e)));return r?(r.heading=c,r.tilt=d,r):{heading:c,tilt:d}}function ae(e,t,r,i){(0,M.e)(se,r,t),(0,te.T7)(i,(0,ee.LV)(t,se),e)||e===r||(0,M.d)(e,r)}const se=(0,T.vt)(),le=(0,T.fA)(0,1,0),ce=(0,T.fA)(0,0,1),de=(0,y.vt)(),ue=(0,T.vt)(),he=(0,T.vt)();function me(e,t,r,i=ne()){const{direction:n,up:o}=i;return(0,P.N9)(de,-(0,a.kU)(t)),(0,P.eL)(de,de,(0,a.kU)(r)),(0,M.p)(n,ce,de),(0,M.j)(n,n,-1),(0,M.p)(o,le,de),i}function pe(e,t,r,i,n){const o=t.lines[11].direction,a=(n-r.getAltitude(i))/o[2];(0,M.c)(e,i,o,a)}const fe=(0,T.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return oe(t,r,i,ce,le)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,T.vt)();return(0,M.j)(o,n.direction,-t),(0,M.i)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,a.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,a.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,a=e.state.camera.eye,s=[],l=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,I.LV)(t.origin,t.direction),n,fe)||pe(fe,r,i,t.endpoint,n),ae(fe,a,fe,l),s.push((0,D.fA)(fe[0],fe[1]))}return function(e,t,r){const i=e.map(e=>((0,M.h)(fe,e[0],e[1],0),t.fromRenderCoords(fe,fe,r),[fe[0],fe[1]]));return i.length<=2?new Y.A({spatialReference:r}):(i.push(i[0].slice()),(0,X.$3)(i)||i.reverse(),new Y.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(s,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,a=e.spatialReference??t.spatialReference;return(0,S.g)(t,ue,o),(0,S.g)(t,he,o),ue[0]-=r/2,he[0]+=r/2,ue[1]-=i/2,he[1]+=i/2,(0,E.F)(ue,o,ue,a),(0,E.F)(he,o,he,a),n?(n.xmin=ue[0],n.ymin=ue[1],n.xmax=he[0],n.ymax=he[1],n.spatialReference=a):n=new q.A(ue[0],ue[1],he[0],he[1],a),n}},Symbol.toStringTag,{value:"Module"}));var ve=r(34304),ge=r(17136),_e=r(94008),xe=r(28735);class we{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,z.vt)(),this._points=(0,z.Qy)(),this.lines=new Array(12),this._origin=(0,T.vt)(),this._direction=(0,T.vt)(),this._boundingSphere=new _e.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,T.vt)(),endpoint:null}}update(e){(0,z.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,M.d)(this._origin,e.eye),(0,M.d)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,M.d)(this._points[t],e[t]);(0,z.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,z.m7)(this.frustum,e)}intersectsRay(e){return(0,z.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,z.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,z.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;be(this.lines[t],e[t],e[r]),be(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),be(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=Me;(0,M.n)(t,this.direction);const r=ye;(0,M.a)(r,this.points[4],e);const i=.5*(0,M.g)(r,r)/(0,M.g)(t,r),n=this._boundingSphere,o=(0,M.c)(Te,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=z.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function be(e,t,r){e.origin=t,e.endpoint=r,(0,M.C)(e.direction,t,r)}const ye=(0,T.vt)(),Me=(0,T.vt)(),Te=(0,T.vt)();r(86211);const Ce=(0,T.fA)(5802e-9,13558e-9,331e-7),Se=(0,T.fA)(65e-8*3,5643e-9,255e-9);(0,T.fA)(Ce[0]+Se[0],Ce[1]+Se[1],Ce[2]+Se[2]);class Ee{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ee(0,0)}static{this.Infinite=new Ee}}(0,T.vt)(),(0,T.vt)(),new _e.iy,(0,I.vt)(),new q.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Ae=r(32728);const Ie=(0,T.fA)(0,0,1),Re=(0,M.n)((0,T.vt)(),(0,T.fA)(1,1,1)),Oe=(0,y.vt)(),Fe=(0,T.vt)(),Pe=(0,T.vt)();function De(e,t,r,i=ne()){(0,M.f)(Fe,e,Ie),0===(0,M.g)(Fe,Fe)&&(0,M.f)(Fe,e,Re),(0,P.$0)(Oe,-(0,a.kU)(t),e),(0,P.e$)(Oe,Oe,-(0,a.kU)(r),Fe);const{up:n,direction:o}=i;return(0,M.f)(n,Fe,e),(0,M.n)(n,n),(0,M.p)(n,n,Oe),(0,M.n)(o,e),(0,M.q)(o,o),(0,M.p)(o,o,Oe),i}function He(e){const t=e[1];e[1]=-e[2],e[2]=t}function Ne(e,t){const r=De(t,e.heading,e.tilt);return e.up=r.up,e}function ze(e,t){const r=[],i=[],n=(0,ve.FD)();for(let o=0;o<e.length;o++){const a=e[o],s=o===e.length-1?e[0]:e[o+1],l=(0,ee.Cr)(a,s,ke),c=(0,te.vE)(t,l.origin,l.vector,0,je);switch(c){case 2:r.push(a);break;case 3:i.push(a);break;case 0:case 1:{const[e,o,s]=0===c?[1,r,i]:[-1,i,r],l=(0,te.Qj)(t),d=(0,M.c)((0,T.vt)(),je,l,e*n),u=(0,M.c)((0,T.vt)(),je,l,e*-n);o.push(a),o.push(d),s.push(u)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Le={minCurvature:(0,a.kU)(5),maxCurvature:(0,a.kU)(50),minSamples:1,maxSamples:6},Be=(0,T.fA)(1,0,0),Ve=(0,T.fA)(0,1,0),Ue=(0,T.vt)(),Ge=(0,T.vt)(),je=(0,T.vt)(),We=new _e.iy,ke=(0,ee.vt)(),$e=(0,N.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Fe,o=Pe;return(0,M.n)(n,e),(0,M.f)(Pe,n,Ie),0===(0,M.g)(Pe,Pe)&&(0,M.f)(Pe,n,Re),(0,M.f)(o,Pe,n),oe(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,T.vt)(),up:null,tilt:i,heading:r},o=Fe;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const s=t,l=(0,a.kU)(r),c=(0,a.kU)(i),d=Math.sin(l),u=Math.cos(l),h=Math.sin(c),m=Math.cos(c),p=(0,M.b)(o);let f;if(Math.abs(c)<1e-8)f=s+p;else{const e=p/h,t=(0,a.YN)(s/e),r=Math.PI-c-t;f=e*Math.sin(r)}const v=m*s,g=s*s*(h*h),_=u*u*g,x=f-v,w=x*x,b=_*(_+w-o[1]*o[1]);if(b<0)return(0,M.j)(n.eye,o,f/p),n.tilt=0,Ne(n,e);const y=Math.sqrt(b),C=o[1]*x,S=_+w;let E;if(E=u>0?-y+C:y+C,Math.abs(S)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=s):(0,M.j)(n.eye,o,f/p),n.tilt=0,He(n.eye),Ne(n,e);n.eye[1]=E/S;const A=d*d*g,I=h*s,R=u*I*n.eye[1],O=n.eye[1]*n.eye[1],F=1-O,P=Math.sqrt(F),D=_*O+A-2*R*P*x+F*w;return Math.abs(D)<1e-8?((0,M.j)(n.eye,o,f/p),n.tilt=0,He(n.eye),Ne(n,e)):(n.eye[0]=(F*(f*o[0]-v*o[0])-I*P*(o[0]*n.eye[1]*u+o[2]*d))/D,n.eye[2]=(F*(f*o[2]-v*o[2])-I*P*(o[2]*n.eye[1]*u-o[0]*d))/D,(0,M.j)(n.eye,n.eye,f),He(n.eye),Ne(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,a.kU)(e),n=(0,M.b)(t);return(0,a.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:De,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,M.b)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,a.YN)(r/(n/Math.sin(e)));return(0,a.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new we(r);i.near=2,n.update(i);const o=r.getAltitude(t),s=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,d=1+(0,M.B)(c,t)/(l+o),u=Math.sqrt(d*d-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=Le,v=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return We.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(We,t)}(e),g=(0,a.qE)((u-h)/(m-h),0,1),_=Math.round((0,a.Cc)(p,f,g)),x=i.aboveGround,w=n.planes[5],b=[],y=(0,te.O_)(T.uY,Be,(0,te.vt)()),C=(0,te.O_)(T.uY,Ve,(0,te.vt)());(0,H.c)($e,0,0,0,0);const S=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-v:0,i=1===e&&x||3===e&&!x?v:1,s=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const d=n/_,u=0===n?0:(0,a.Cc)(t,i,1===e?1-(1-d)**2:3===e?d**2:d),h=(0,M.l)(Ge,s.origin,l.origin,u),m=(0,Ae.nu)(s.direction,l.direction,u,Ue);r.intersectManifoldClosestSilhouette((0,I.LV)(h,m),o,je),ae(je,c,je,w),b.push((0,T.o8)(je)),0!==b.length&&S((0,M.G)(b.at(-1),je));const p=((0,te.Tj)(y,je)?1:0)|((0,te.Tj)(C,je)?2:0);$e[p]=1}}b.length>2&&(0,M.G)(b[0],b.at(-1));const E=function(e,t,r){const i=2*(0,ve.FD)();return e.map(e=>{const n=[];let o=!1;for(const a of e)t.fromRenderCoords(a,je,r),Math.abs(a[0])<i&&Math.abs(a[1])<i?(n.push([null,je[1]]),n.push([null,je[1]]),o=!0):n.push([je[0],je[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,X.$3)(n)||n.reverse(),n})}((0,H.d)($e)>1?function(e,t){const r=[];for(const i of e)r.push(...ze(i,t));return r}(ze(b,y),C):[b],r,s);return new Y.A({rings:E,spatialReference:s})},toExtent:function(e,t,r,i,n){let o,s,l,c;const d=t.latitude,u=(0,A.tO)(e.spatialReference).radius,h=t.longitude,m=function(e,t,r){const i=t/r,n=(0,a.kU)(e),o=Math.sin(i/2),s=Math.cos(n),l=2*(0,a.YN)(Math.sqrt(o*o/(s*s)));return(0,a.KJ)(l)}(d,r,u)/2;o=h-m,s=h+m;const p=(0,a.kU)(d),v=(1+Math.sin(p))/(1-Math.sin(p)),g=(v+1)*Math.tan(i/u/2),_=g*g;function x(e){const t=Math.PI/2;return(e=f.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(g+Math.sqrt(4*v+_))),c=l+i/u,l=x(l),c=x(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,a.KJ)(l),-90),c=Math.min((0,a.KJ)(c),90),s=ge.Y_.monotonic(o,s),s-o>180){const e=(s-o-180)/2;o+=e,s-=e}const w=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:C.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=s,n.ymax=c,n.spatialReference=w):n=new q.A(o,l,s,c,w),e.spatialReference&&e.spatialReference.isWebMercator&&(0,xe.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const Ze="ssao";(0,T.vt)();var qe=r(49186),Ye=r(10107),Xe=r(64108);let Ke=class extends R.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces="composite-color",this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new qe.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,Ye.MZ)({constructOnly:!0})],Ke.prototype,"view",void 0),(0,o.Cg)([(0,Ye.MZ)({constructOnly:!0})],Ke.prototype,"consumes",void 0),(0,o.Cg)([(0,Ye.MZ)()],Ke.prototype,"produces",void 0),(0,o.Cg)([(0,Ye.MZ)({readOnly:!0})],Ke.prototype,"techniques",null),Ke=(0,o.Cg)([(0,Xe.$)("esri.views.3d.webgl.RenderNode")],Ke);var Je=r(13840),Qe=r(42958),et=r(95774),tt=r(90644);let rt=class extends Qe.w{constructor(){super(...arguments),this.shader=new Je.r(et.S,()=>r.e(9384).then(r.bind(r,59384)))}initializePipeline(){return(0,tt.Ey)({colorWrite:tt.kn})}};rt=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],rt);var it=r(65786);class nt extends it.Y{constructor(){super(...arguments),this.projScale=1}}class ot extends nt{constructor(){super(...arguments),this.intensity=1}}class at extends it.Y{}class st extends at{constructor(){super(...arguments),this.blurSize=(0,D.vt)()}}var lt=r(15581);let ct=class extends Qe.w{constructor(){super(...arguments),this.shader=new Je.r(lt.S,()=>r.e(191).then(r.bind(r,90191)))}initializePipeline(){return(0,tt.Ey)({colorWrite:tt.kn})}};ct=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],ct);var dt=r(63907),ut=r(76284),ht=r(67171);const mt=2;let pt=class extends Ke{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=Ze,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new ot,this._drawParameters=new st}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new ht.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new ut.A(this.renderingContext,t,e),this.techniques.precompile(ct),this.techniques.precompile(rt),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(dt.nI);if(!r||!i)return;const n=this.techniques.get(ct),o=this.techniques.get(rt);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,d=this.bindParameters,h=d.camera,m=h.relativeElevation,p=(0,a.qE)((5e5-m)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,v=f*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*ft/(0,lt.g)(h)**6*v;const g=h.fullViewport[2],_=h.fullViewport[3],x=this.fboCache.acquire(g,_,"ssao input",2);s.bindFramebuffer(x.fbo),s.setViewport(0,0,g,_),s.bindTechnique(n,d,this._passParameters,this._drawParameters),s.screen.draw();const w=Math.round(g/mt),b=Math.round(_/mt),y=this.fboCache.acquire(w,b,"ssao blur",0);s.bindFramebuffer(y.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,u.hZ)(this._drawParameters.blurSize,0,mt/_),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,b),s.screen.draw(),x.release();const M=this.fboCache.acquire(w,b,Ze,0);return s.bindFramebuffer(M.fbo),s.setViewport(0,0,g,_),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=y.getTexture(),(0,u.hZ)(this._drawParameters.blurSize,mt/g,0),s.bindTechnique(o,d,this._passParameters,this._drawParameters),s.setViewport(0,0,w,b),s.screen.draw(),s.setViewport4fv(h.fullViewport),y.release(),f<1&&this.requestRender(2),M}};(0,o.Cg)([(0,d.MZ)()],pt.prototype,"consumes",void 0),(0,o.Cg)([(0,d.MZ)()],pt.prototype,"produces",void 0),(0,o.Cg)([(0,d.MZ)({constructOnly:!0})],pt.prototype,"isEnabled",void 0),pt=(0,o.Cg)([(0,d.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],pt);const ft=.5;function vt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1/mt),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
12
12
  vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
13
13
  return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
14
14
  }
@@ -782,10 +782,12 @@ return color;
782
782
  `)),g&&x.code.add(u.H`
783
783
  vec4 dpTransformVertexTangent(vec4 _tangent) {
784
784
  ${r?n?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":n?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
785
- }`)}const w=(0,s.vt)()},72824:(e,t,r)=>{r.d(t,{Mh:()=>d,Zo:()=>u,gy:()=>h});var i=r(29242),n=r(91829),o=r(96336),a=r(33752),s=r(31821),l=r(98353),c=r(35644);function d(e,t){switch(t.normalType){case 0:case 1:e.include(o.Y,t),e.varyings.add("vNormalWorld","vec3"),e.varyings.add("vNormalView","vec3"),e.vertex.uniforms.add(new l.h("transformNormalGlobalFromModel",e=>e.transformNormalGlobalFromModel),new c.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal)).code.add(s.H`void forwardNormal() {
786
- vNormalWorld = transformNormalGlobalFromModel * normalModel();
787
- vNormalView = transformNormalViewFromGlobal * vNormalWorld;
788
- }`);break;case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class u extends a.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,i.vt)()}}class h extends a.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,i.vt)(),this.toMapSpace=(0,n.vt)()}}},74333:(e,t,r)=>{r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>o,SY:()=>l,mb:()=>a});var i=r(38954),n=r(51850);function o({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:a,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==a&&(null==s||(0,i.m)(s,n.uY))&&null==l&&(null==o||1===o)&&(null==r||1===r)}const a=(0,n.CN)(1,1,.5),s=(0,n.CN)(0,.6,.2),l=(0,n.CN)(0,1,.2)},76284:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(49186),n=r(44208),o=r(53966),a=r(97768),s=r(93637),l=r(74887),c=r(94656),d=r(63907),u=r(67171);const h=()=>o.A.getLogger("esri/views/webgl/textureUtils");function m(e){const{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&h().error("Negative dimension parameters are not allowed!");const{internalFormat:n}=e;if(n&&(p(n)||f(n))){const{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:n}=e;n&&h().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&h().error("Depth textures cannot sample mipmaps"):(9728!==i&&h().error("Depth textures without filtering must use NEAREST filtering"),r&&h().error("Depth textures without filtering cannot use compare function"))}}function p(e){return(0,s.a4)(d.SB,e)}function f(e){return(0,s.a4)(d.iE,e)}function v(e){return null!=e&&"type"in e&&"compressed"===e.type}function g(e){return null!=e&&!v(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function x(e,t,r,i=1){let n=Math.max(t,r);return 32879===e&&(n=Math.max(n,i)),Math.floor(Math.log2(n))+1}function w(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case d.ld.FLOAT:switch(e.pixelFormat){case 6408:return d.H0.RGBA32F;case 6407:return d.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case d.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return d.H0.RGBA8;case 6407:return d.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=34041===t?d.iE.DEPTH24_STENCIL8:6402===t?d.SB.DEPTH_COMPONENT24:t,e.internalFormat}class b extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case d.H0.R16F:case d.H0.R32F:case d.H0.R8_SNORM:case d.H0.R8:this.pixelFormat=6403;break;case d.H0.R8I:case d.H0.R8UI:case d.H0.R16I:case d.H0.R16UI:case d.H0.R32I:case d.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new b(e,t)}}const y=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements"),M=()=>o.A.getLogger("esri/views/webgl/Texture");class T{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=b.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return y?0:(0,u.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(d.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null,this._descriptor=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!v(e)&&this._descriptor.internalFormat&&(0,s.a4)(d.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!v(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,n,o,a,s=0){a||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=w(l);const{context:c,pixelFormat:d,dataType:u,target:h,isImmutable:m}=l;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const p=c.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+n>l.width||r+o>l.height)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=c;s&&(n&&o||M().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,s)),g(a)?f.texSubImage2D(h,e,t,r,n,o,d,u,a):v(a)?f.compressedTexSubImage2D(h,e,t,r,n,o,l.internalFormat,a.levels[e]):f.texSubImage2D(h,e,t,r,n,o,d,u,a),s&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),c.bindTexture(p,T.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,n,o,a,s,l){l||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update an uninitialized texture!");const c=this._descriptor;c.internalFormat=w(c);const{context:d,pixelFormat:u,dataType:h,isImmutable:m,target:p}=c;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");_(p)||M().warn("Attempting to set 3D texture data on a non-3D texture");const f=d.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);d.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||n<0||t+o>c.width||r+a>c.height||n+s>c.depth)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:g}=d;if(v(l))l=l.levels[e],g.compressedTexSubImage3D(p,e,t,r,n,o,a,s,c.internalFormat,l);else{const i=l;g.texSubImage3D(p,e,t,r,n,o,a,s,u,h,i)}d.bindTexture(f,T.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,m(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);const t=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,T.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,m(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,m(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),m(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=(0,a.DC)(this._compressionAbortController)}_setData(e,t){const r=this._descriptor,n=r.context?.gl;if(!n)return;(0,c.Y2)(n),this.hasWebGLTextureObject||(this._glName=n.createTexture(),r.context.instanceCounter.increment(d.vt.Texture,this)),m(r);const o=r.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(n);const a=t??r.target,l=_(a);if(g(e))this._setDataFromTexImageSource(e,a);else{const{width:t,height:o,depth:u}=r;if(null==t||null==o)throw new i.A("texture:missing-size","Width and height must be specified!");if(l&&null==u)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=w(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(a,r.internalFormat,r.hasMipmap,t,o,u),v(e)){if(!function(e){return null!=e&&(0,s.a4)(d.CQ,e)}(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,a)}else this._texImage(a,0,r.internalFormat,t,o,u,e),(0,c.Y2)(n),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,c.Y2)(n),r.context.bindTexture(o,T.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=w(i);const n=_(t),{width:o,height:a,depth:s}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);i.width&&i.height,i.width||(i.width=o),i.height||(i.height=a),n&&i.depth,n&&(i.depth=s),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,o,a,s),this._texImage(t,0,i.internalFormat,o,a,s,e),(0,c.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:n,height:o,depth:a}=i,s=e.levels,l=x(r,n,o,a),c=Math.min(l,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,c),this._forEachMipmapLevel((e,i,n,o)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,n,o,a)},c)}_texStorage(e,t,r,n,o,a){const{gl:s}=this._descriptor.context;if(!function(e){return d.XN.includes(e)}(t)&&!p(t)&&!f(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?x(e,n,o,a):1;if(_(e)){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,l,t,n,o,a)}else s.texStorage2D(e,l,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,o,a,s){const l=this._descriptor.context.gl,c=_(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,n,o,a,u,h,r)}else l.texSubImage2D(e,t,0,0,n,o,u,h,r)}}else{const d=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,n,o,a,0,u,h,d)}else l.texImage2D(e,t,r,n,o,0,u,h,d)}}_compressedTexImage(e,t,r,n,o,a,s){const l=this._descriptor.context.gl,c=_(e);if(this._descriptor.isImmutable){if(null!=s)if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,n,o,a,r,s)}else l.compressedTexSubImage2D(e,t,0,0,n,o,r,s)}else if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,n,o,a,0,s)}else l.compressedTexImage2D(e,t,r,n,o,0,s)}async _compressOnWorker(e){const{width:t,height:r,context:i,flipped:n,preMultiplyAlpha:o,hasMipmap:a}=this._descriptor,s=this._descriptor.compress?.compressionTracker,c=this._descriptor.compress?.compressionCallback,{compressedTextureETC:d,compressedTextureS3TC:u}=i.capabilities;if(!T.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!d&&!u)return;this.abortCompression();const h=new AbortController;let m;this._compressionAbortController=h,s?.increment();try{e instanceof Uint8Array?m=e.buffer:(m=await createImageBitmap(e,{imageOrientation:n?"flipY":"none"}),(0,l.Te)(h));const i={data:m,width:t,height:r,needsFlip:e instanceof Uint8Array&&this.descriptor.flipped,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:o,hasMipmap:a,hasETC:!!d,hasS3TC:!!u},s=await T.compressionWorkerHandle.invoke(i,h.signal,1);if((0,l.Te)(h),s.compressedTexture&&this.hasWebGLTextureObject){const e=this.usedMemory;this._descriptor.internalFormat=s.internalFormat,this._setData(s.compressedTexture),c?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||M().error("Texture compression failed!")}finally{s?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),m instanceof ImageBitmap&&m.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:a,target:s}=this._descriptor;const l=32879===s;if(null==r||null==n||l&&null==o)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),a&&(1!==r||1!==n||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),l&&(o=Math.max(1,o>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):9984!==r&&9986!==r||(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){const e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,c.Y2)(t)}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},76597:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(33120),n=r(31821);function o(e){(0,i.i$)(e),e.vertex.code.add(n.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
785
+ }`)}const w=(0,s.vt)()},72824:(e,t,r)=>{r.d(t,{Mh:()=>d,Zo:()=>u,gy:()=>h});var i=r(29242),n=r(91829),o=r(96336),a=r(33752),s=r(31821),l=r(98353),c=r(35644);function d(e,t){const{vertex:r,varyings:i}=e;switch(t.normalType){case 0:case 1:{e.include(o.Y,t),i.add("vNormalWorld","vec3"),i.add("vNormalView","vec3"),r.uniforms.add(new c.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal));const{hasModelRotationScale:n}=t;n&&r.uniforms.add(new l.h("transformNormalGlobalFromModel",e=>e.transformNormalGlobalFromModel)),r.code.add(s.H`
786
+ void forwardNormal() {
787
+ vNormalWorld = ${(0,s.If)(n,s.H`transformNormalGlobalFromModel * `)} normalModel();
788
+ vNormalView = transformNormalViewFromGlobal * vNormalWorld;
789
+ }
790
+ `);break}case 2:e.vertex.code.add(s.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class u extends a.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,i.vt)()}}class h extends a.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,i.vt)(),this.toMapSpace=(0,n.vt)()}}},74333:(e,t,r)=>{r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>o,SY:()=>l,mb:()=>a});var i=r(38954),n=r(51850);function o({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:a,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==a&&(null==s||(0,i.m)(s,n.uY))&&null==l&&(null==o||1===o)&&(null==r||1===r)}const a=(0,n.CN)(1,1,.5),s=(0,n.CN)(0,.6,.2),l=(0,n.CN)(0,1,.2)},76284:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(49186),n=r(44208),o=r(53966),a=r(97768),s=r(93637),l=r(74887),c=r(94656),d=r(63907),u=r(67171);const h=()=>o.A.getLogger("esri/views/webgl/textureUtils");function m(e){const{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&h().error("Negative dimension parameters are not allowed!");const{internalFormat:n}=e;if(n&&(p(n)||f(n))){const{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:n}=e;n&&h().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&h().error("Depth textures cannot sample mipmaps"):(9728!==i&&h().error("Depth textures without filtering must use NEAREST filtering"),r&&h().error("Depth textures without filtering cannot use compare function"))}}function p(e){return(0,s.a4)(d.SB,e)}function f(e){return(0,s.a4)(d.iE,e)}function v(e){return null!=e&&"type"in e&&"compressed"===e.type}function g(e){return null!=e&&!v(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function x(e,t,r,i=1){let n=Math.max(t,r);return 32879===e&&(n=Math.max(n,i)),Math.floor(Math.log2(n))+1}function w(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case d.ld.FLOAT:switch(e.pixelFormat){case 6408:return d.H0.RGBA32F;case 6407:return d.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case d.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return d.H0.RGBA8;case 6407:return d.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=34041===t?d.iE.DEPTH24_STENCIL8:6402===t?d.SB.DEPTH_COMPONENT24:t,e.internalFormat}class b extends u.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case d.H0.R16F:case d.H0.R32F:case d.H0.R8_SNORM:case d.H0.R8:this.pixelFormat=6403;break;case d.H0.R8I:case d.H0.R8UI:case d.H0.R16I:case d.H0.R16UI:case d.H0.R32I:case d.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new b(e,t)}}const y=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements"),M=()=>o.A.getLogger("esri/views/webgl/Texture");class T{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=b.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return y?0:(0,u.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(d.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null,this._descriptor=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!v(e)&&this._descriptor.internalFormat&&(0,s.a4)(d.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!v(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,n,o,a,s=0){a||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=w(l);const{context:c,pixelFormat:d,dataType:u,target:h,isImmutable:m}=l;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const p=c.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+n>l.width||r+o>l.height)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=c;s&&(n&&o||M().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,s)),g(a)?f.texSubImage2D(h,e,t,r,n,o,d,u,a):v(a)?f.compressedTexSubImage2D(h,e,t,r,n,o,l.internalFormat,a.levels[e]):f.texSubImage2D(h,e,t,r,n,o,d,u,a),s&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),c.bindTexture(p,T.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,n,o,a,s,l){l||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update an uninitialized texture!");const c=this._descriptor;c.internalFormat=w(c);const{context:d,pixelFormat:u,dataType:h,isImmutable:m,target:p}=c;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");_(p)||M().warn("Attempting to set 3D texture data on a non-3D texture");const f=d.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);d.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||n<0||t+o>c.width||r+a>c.height||n+s>c.depth)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:g}=d;if(v(l))l=l.levels[e],g.compressedTexSubImage3D(p,e,t,r,n,o,a,s,c.internalFormat,l);else{const i=l;g.texSubImage3D(p,e,t,r,n,o,a,s,u,h,i)}d.bindTexture(f,T.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,m(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);const t=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,T.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,m(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,m(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),m(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=(0,a.DC)(this._compressionAbortController)}_setData(e,t){const r=this._descriptor,n=r.context?.gl;if(!n)return;(0,c.Y2)(n),this.hasWebGLTextureObject||(this._glName=n.createTexture(),r.context.instanceCounter.increment(d.vt.Texture,this)),m(r);const o=r.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(n);const a=t??r.target,l=_(a);if(g(e))this._setDataFromTexImageSource(e,a);else{const{width:t,height:o,depth:u}=r;if(null==t||null==o)throw new i.A("texture:missing-size","Width and height must be specified!");if(l&&null==u)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=w(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(a,r.internalFormat,r.hasMipmap,t,o,u),v(e)){if(!function(e){return null!=e&&(0,s.a4)(d.CQ,e)}(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,a)}else this._texImage(a,0,r.internalFormat,t,o,u,e),(0,c.Y2)(n),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,c.Y2)(n),r.context.bindTexture(o,T.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=w(i);const n=_(t),{width:o,height:a,depth:s}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);i.width&&i.height,i.width||(i.width=o),i.height||(i.height=a),n&&i.depth,n&&(i.depth=s),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,o,a,s),this._texImage(t,0,i.internalFormat,o,a,s,e),(0,c.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:n,height:o,depth:a}=i,s=e.levels,l=x(r,n,o,a),c=Math.min(l,s.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,c),this._forEachMipmapLevel((e,i,n,o)=>{const a=s[Math.min(e,s.length-1)];this._compressedTexImage(r,e,t,i,n,o,a)},c)}_texStorage(e,t,r,n,o,a){const{gl:s}=this._descriptor.context;if(!function(e){return d.XN.includes(e)}(t)&&!p(t)&&!f(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?x(e,n,o,a):1;if(_(e)){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");s.texStorage3D(e,l,t,n,o,a)}else s.texStorage2D(e,l,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,o,a,s){const l=this._descriptor.context.gl,c=_(e),{isImmutable:d,pixelFormat:u,dataType:h}=this._descriptor;if(d){if(null!=s){const r=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,n,o,a,u,h,r)}else l.texSubImage2D(e,t,0,0,n,o,u,h,r)}}else{const d=s;if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,n,o,a,0,u,h,d)}else l.texImage2D(e,t,r,n,o,0,u,h,d)}}_compressedTexImage(e,t,r,n,o,a,s){const l=this._descriptor.context.gl,c=_(e);if(this._descriptor.isImmutable){if(null!=s)if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,n,o,a,r,s)}else l.compressedTexSubImage2D(e,t,0,0,n,o,r,s)}else if(c){if(null==a)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,n,o,a,0,s)}else l.compressedTexImage2D(e,t,r,n,o,0,s)}async _compressOnWorker(e){const{width:t,height:r,context:i,flipped:n,preMultiplyAlpha:o,hasMipmap:a}=this._descriptor,s=this._descriptor.compress?.compressionTracker,c=this._descriptor.compress?.compressionCallback,{compressedTextureETC:d,compressedTextureS3TC:u}=i.capabilities;if(!T.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!d&&!u)return;this.abortCompression();const h=new AbortController;let m;this._compressionAbortController=h,s?.increment();try{e instanceof Uint8Array?m=e.buffer:(m=await createImageBitmap(e,{imageOrientation:n?"flipY":"none"}),(0,l.Te)(h));const i={data:m,width:t,height:r,needsFlip:e instanceof Uint8Array&&this.descriptor.flipped,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:o,hasMipmap:a,hasETC:!!d,hasS3TC:!!u},s=await T.compressionWorkerHandle.invoke(i,h.signal,1);if((0,l.Te)(h),s.compressedTexture&&this.hasWebGLTextureObject){const e=this.usedMemory;this._descriptor.internalFormat=s.internalFormat,this._setData(s.compressedTexture),c?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||M().error("Texture compression failed!")}finally{s?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),m instanceof ImageBitmap&&m.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:a,target:s}=this._descriptor;const l=32879===s;if(null==r||null==n||l&&null==o)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),a&&(1!==r||1!==n||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),l&&(o=Math.max(1,o>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):9984!==r&&9986!==r||(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){const e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,c.Y2)(t)}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},76597:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(33120),n=r(31821);function o(e){(0,i.i$)(e),e.vertex.code.add(n.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
789
791
  vec4 eye = view * vec4(pos, 1.0);
790
792
  depth = calculateLinearDepth(nearFar,eye.z);
791
793
  return proj * eye;
@@ -979,7 +981,7 @@ vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceC
979
981
  vec3 outColorLinear = outDiffColor + specularComponent;
980
982
  vec3 outColor = delinearizeGamma(outColorLinear);
981
983
  return outColor;
982
- }`)}}(0,n.vt)()},89786:(e,t,r)=>{function i(e){const t=.3183098861837907;e.constants.add("PI","float",3.141592653589793),e.constants.add("LIGHT_NORMALIZATION","float",t),e.constants.add("INV_PI","float",t),e.constants.add("ONE_QUATER_PI","float",.78539816339745),e.constants.add("HALF_PI","float",1.570796326794897),e.constants.add("THREE_QUATER_PI","float",2.35619449019234),e.constants.add("TWO_PI","float",6.28318530717958),e.constants.add("PI_SQUARED","float",9.86960440108936)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}r.d(t,{Ey:()=>b,RC:()=>o,T8:()=>a,Uy:()=>d,Xt:()=>c,kn:()=>u,p3:()=>n}),i(0,771),i(1,0),i(1,1);const o=i(1,771),a=n(770,1,771,771),s=(n(0,0,768,1),{face:1029,mode:2305}),l={face:1028,mode:2305},c=e=>2===e?s:1===e?l:null,d={zNear:0,zFar:1},u={r:!0,g:!0,b:!0,a:!0};function h(e){return T.intern(e)}function m(e){return S.intern(e)}function p(e){return A.intern(e)}function f(e){return R.intern(e)}function v(e){return F.intern(e)}function g(e){return D.intern(e)}function _(e){return N.intern(e)}function x(e){return L.intern(e)}function w(e){return V.intern(e)}function b(e){return G.intern(e)}class y{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const T=new y(C,e=>({__tag:"Blending",...e}));function C(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const S=new y(E,e=>({__tag:"Culling",...e}));function E(e){return e?M([e.face,e.mode]):null}const A=new y(I,e=>({__tag:"PolygonOffset",...e}));function I(e){return e?M([e.factor,e.units]):null}const R=new y(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?M([e.func]):null}const F=new y(P,e=>({__tag:"StencilTest",...e}));function P(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const D=new y(H,e=>({__tag:"DepthWrite",...e}));function H(e){return e?M([e.zNear,e.zFar]):null}const N=new y(z,e=>({__tag:"ColorWrite",...e}));function z(e){return e?M([e.r,e.g,e.b,e.a]):null}const L=new y(B,e=>({__tag:"StencilWrite",...e}));function B(e){return e?M([e.mask]):null}const V=new y(U,e=>({__tag:"DrawBuffers",...e}));function U(e){return e?M(e.buffers):null}const G=new y(function(e){return e?M([C(e.blending),E(e.culling),I(e.polygonOffset),O(e.depthTest),P(e.stencilTest),H(e.depthWrite),z(e.colorWrite),B(e.stencilWrite),U(e.drawBuffers)]):null},e=>({blending:h(e.blending),culling:m(e.culling),polygonOffset:p(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:_(e.colorWrite),stencilWrite:x(e.stencilWrite),drawBuffers:w(e.drawBuffers)}))},92700:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821);function n(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`
984
+ }`)}}(0,n.vt)()},89786:(e,t,r)=>{function i(e){const t=.3183098861837907;e.constants.add("PI","float",3.141592653589793),e.constants.add("LIGHT_NORMALIZATION","float",t),e.constants.add("INV_PI","float",t),e.constants.add("ONE_QUATER_PI","float",.78539816339745),e.constants.add("HALF_PI","float",1.570796326794897),e.constants.add("THREE_QUATER_PI","float",2.35619449019234),e.constants.add("TWO_PI","float",6.28318530717958),e.constants.add("PI_SQUARED","float",9.86960440108936)}r.d(t,{p:()=>i})},90644:(e,t,r)=>{function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}r.d(t,{Ey:()=>b,RC:()=>o,T8:()=>a,Uy:()=>d,Xt:()=>c,kn:()=>u,p3:()=>n}),r(4718),i(0,771),i(1,0),i(1,1);const o=i(1,771),a=n(770,1,771,771),s=(n(0,0,768,1),{face:1029,mode:2305}),l={face:1028,mode:2305},c=e=>2===e?s:1===e?l:null,d={zNear:0,zFar:1},u={r:!0,g:!0,b:!0,a:!0};function h(e){return T.intern(e)}function m(e){return S.intern(e)}function p(e){return A.intern(e)}function f(e){return R.intern(e)}function v(e){return F.intern(e)}function g(e){return D.intern(e)}function _(e){return N.intern(e)}function x(e){return L.intern(e)}function w(e){return V.intern(e)}function b(e){return G.intern(e)}class y{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const T=new y(C,e=>({__tag:"Blending",...e}));function C(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const S=new y(E,e=>({__tag:"Culling",...e}));function E(e){return e?M([e.face,e.mode]):null}const A=new y(I,e=>({__tag:"PolygonOffset",...e}));function I(e){return e?M([e.factor,e.units]):null}const R=new y(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?M([e.func]):null}const F=new y(P,e=>({__tag:"StencilTest",...e}));function P(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const D=new y(H,e=>({__tag:"DepthWrite",...e}));function H(e){return e?M([e.zNear,e.zFar]):null}const N=new y(z,e=>({__tag:"ColorWrite",...e}));function z(e){return e?M([e.r,e.g,e.b,e.a]):null}const L=new y(B,e=>({__tag:"StencilWrite",...e}));function B(e){return e?M([e.mask]):null}const V=new y(U,e=>({__tag:"DrawBuffers",...e}));function U(e){return e?M(e.buffers):null}const G=new y(function(e){return e?M([C(e.blending),E(e.culling),I(e.polygonOffset),O(e.depthTest),P(e.stencilTest),H(e.depthWrite),z(e.colorWrite),B(e.stencilWrite),U(e.drawBuffers)]):null},e=>({blending:h(e.blending),culling:m(e.culling),polygonOffset:p(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:v(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:_(e.colorWrite),stencilWrite:x(e.stencilWrite),drawBuffers:w(e.drawBuffers)}))},92700:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(31821);function n(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`),e.vertex.code.add(i.H`
983
985
  void forwardNormalizedVertexColor() { vColor = color * ${i.H.float(1/255)}; }
984
986
  `)):e.vertex.code.add(i.H`void forwardVertexColor() {}
985
987
  void forwardNormalizedVertexColor() {}`)}},94656:(e,t,r)=>{r.d(t,{Y2:()=>c,en:()=>l});var i=r(49186),n=r(44208),o=r(53966);const a=()=>o.A.getLogger("esri.views.webgl.checkWebGLError"),s=!!(0,n.A)("enable-feature:webgl-debug");function l(){return s}function c(e,t=l()){if(t){const t=function(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e);if(t){const e=(new Error).stack;a().error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},95774:(e,t,r)=>{r.d(t,{S:()=>m,b:()=>h});var i=r(82048),n=r(52540),o=r(68259),a=r(20304),s=r(31821),l=r(15976),c=r(63761),d=r(14113);const u=4;function h(){const e=new d.N5,t=e.fragment;e.include(i.c);const r=(u+1)/2,h=1/(2*r*r);return t.include(n.E),t.uniforms.add(new c.N("depthMap",e=>e.depthTexture),new l.o("tex",e=>e.colorTexture),new o.t("blurSize",e=>e.blurSize),new a.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(s.H`
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710,7982],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(6606),r.e(8654),r.e(6647),r.e(6673),r.e(7005),r.e(8570),r.e(6011),r.e(8993),r.e(1437)]).then(r.bind(r,82411))).default,CSVLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(6606),r.e(8654),r.e(6647),r.e(1197)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(6606),r.e(6647),r.e(893),r.e(8628),r.e(2593),r.e(9279),r.e(9481)]).then(r.bind(r,83508))).default,DimensionLayer:async()=>(await Promise.all([r.e(3508),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(3508),r.e(9953),r.e(4802),r.e(8207)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(6606),r.e(8654),r.e(6647),r.e(9247)]).then(r.bind(r,68654))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(5890)]).then(r.bind(r,63201))).default,GroupLayer:async()=>(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(9953),r.e(1956),r.e(893),r.e(6673),r.e(8610),r.e(5142),r.e(8824)]).then(r.bind(r,87772))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(9953),r.e(6673),r.e(8610),r.e(8144),r.e(5142),r.e(2168),r.e(9478)]).then(r.bind(r,9478))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(5942),r.e(1312)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6011),r.e(5942),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1863)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(6606),r.e(8368),r.e(4649),r.e(217),r.e(8441),r.e(3463),r.e(8948),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(1224),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(6606),r.e(8368),r.e(4649),r.e(217),r.e(8441),r.e(3463),r.e(8948),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(7048),r.e(7656),r.e(5778)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(6606),r.e(8654),r.e(6647),r.e(3463),r.e(4769)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(3444),r.e(9203)]).then(r.bind(r,29203))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(8570),r.e(5977)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2712)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(6606),r.e(8654),r.e(6647),r.e(9361),r.e(5681)]).then(r.bind(r,9352))).default,ParquetLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(5695)]).then(r.bind(r,99680))).default,PointCloudLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6673),r.e(7885)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(217),r.e(9785)]).then(r.bind(r,34507))).default,SceneLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(6673),r.e(7005),r.e(8570),r.e(6011),r.e(8993),r.e(1086)]).then(r.bind(r,2e4))).default,StreamLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1956),r.e(8399),r.e(957),r.e(6606),r.e(6647),r.e(2318)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(4802),r.e(7048),r.e(3224)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(5859),r.e(5897),r.e(1776)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(3508),r.e(3910),r.e(6728),r.e(8303),r.e(957),r.e(3444),r.e(2274)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(3508),r.e(1224),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(1005)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(9953),r.e(8610),r.e(8144),r.e(5142),r.e(2168),r.e(5694)]).then(r.bind(r,20521))).default,WFSLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(6728),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(9573),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2848)]).then(r.bind(r,47314))).default}},7861:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(11254);async function n(e,a){return(await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}},23154:(e,a,r)=>{r.d(a,{K:()=>f,Q:()=>s});var t=r(77548),n=r(7861);const l=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:r,...l}=a||{},s=r?await r.fetchServiceMetadata(e,l):await(0,n.L)(e,l),i=(0,t.G$)();d(s),c(s);const o={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return o;const u=`${(0,t.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(u,l):await(0,n.L)(u,l);return d(y),c(y),o.layersJSON={layers:y.layers,tables:y.tables},o}function i(e){const{type:a}=e;return!!a&&l.has(a)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(y)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(77548),c=r(4513),u=r(7861);const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function d(e){const{properties:a,url:c}=e,d={...a,url:c},p=await async function(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.L)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===c,L="SceneServer"===c,b={parsedUrl:r,Constructor:null,layerId:p||L?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.L)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.L)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.L)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.L)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.L)(e,{customParameters:a});b.sourceJSON=r,b.preferredUrl=(0,o.$x)(),f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l,c=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=(0,o.$x)(e,{preferredHost:a.preferredHost}),c=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.L)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.L)(t,{customParameters:a}).catch(()=>null);return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.L)(e,{customParameters:r})}const y=t?.layers,d=t?.tables;return{preferredUrl:l,layers:y?.map(e=>({id:e.id})).reverse()||[],tables:d?.map(e=>({serverUrl:n,id:e.id})).reverse()||[],layerInfos:c?y:[],tableInfos:c?d:[]}}(e,c,a);if(p&&(b.preferredUrl=r.preferredUrl,b.sublayerInfos=r.layerInfos,b.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)b.layers=r.layers,b.tables=r.tables,p&&r.layerInfos?.length&&(b.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(h((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach((e,a)=>{n.set(e,t[a])}),e=>n.get(e.type)}(r.layerInfos));else if(p||L){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(b.layerId=r.layers[0]?.id??r.tables[0]?.id,b.sourceJSON=e,p){const a=e?.type;f=(0,i.K)(a)}}}return b.Constructor=await h(f),b}(c,a?.customParameters),{Constructor:L,layerId:b,sourceJSON:S,parsedUrl:v,layers:P,tables:g}=p;if(P.length+g.length===0)return null!=b&&(d.layerId=b),null!=S&&(d.sourceJSON=S),new L(d);const I=new(0,(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default)({title:v.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await h("FeatureLayer");a.tables.forEach(({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)})}}(I,p,d),I}function f(e,a){return e?e.find(({id:e})=>e===a):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(11254),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}}}]);