@arcgis/core 4.33.0-next.20250422 → 4.33.0-next.20250424

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 (329) hide show
  1. package/Graphic.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/analysis/Analysis.d.ts +4 -0
  4. package/analysis/Analysis.js +1 -1
  5. package/analysis/SliceAnalysis.js +1 -1
  6. package/analysis/SlicePlane.js +1 -1
  7. package/analysis/support/AnalysisOriginWebScene.d.ts +4 -0
  8. package/analysis/support/AnalysisOriginWebScene.js +5 -0
  9. package/analysis/support/SliceAnalysisExcludedLayer.js +5 -0
  10. package/arcade/geometry/constructors.js +1 -1
  11. package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -0
  12. package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -0
  13. package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -0
  14. package/assets/components/assets/icon/mosaicMethodByAttribute16.json +1 -0
  15. package/assets/components/assets/icon/mosaicMethodByAttribute24.json +1 -0
  16. package/assets/components/assets/icon/mosaicMethodByAttribute32.json +1 -0
  17. package/assets/components/assets/icon/mosaicMethodClosestToCenter16.json +1 -0
  18. package/assets/components/assets/icon/mosaicMethodClosestToCenter24.json +1 -0
  19. package/assets/components/assets/icon/mosaicMethodClosestToCenter32.json +1 -0
  20. package/assets/components/assets/icon/mosaicMethodClosestToNadir16.json +1 -0
  21. package/assets/components/assets/icon/mosaicMethodClosestToNadir24.json +1 -0
  22. package/assets/components/assets/icon/mosaicMethodClosestToNadir32.json +1 -0
  23. package/assets/components/assets/icon/mosaicMethodFirst16.json +1 -0
  24. package/assets/components/assets/icon/mosaicMethodFirst24.json +1 -0
  25. package/assets/components/assets/icon/mosaicMethodFirst32.json +1 -0
  26. package/assets/components/assets/icon/mosaicMethodLast16.json +1 -0
  27. package/assets/components/assets/icon/mosaicMethodLast24.json +1 -0
  28. package/assets/components/assets/icon/mosaicMethodLast32.json +1 -0
  29. package/assets/components/assets/icon/mosaicMethodLockRaster16.json +1 -0
  30. package/assets/components/assets/icon/mosaicMethodLockRaster24.json +1 -0
  31. package/assets/components/assets/icon/mosaicMethodLockRaster32.json +1 -0
  32. package/assets/components/assets/icon/mosaicMethodMaximum16.json +1 -0
  33. package/assets/components/assets/icon/mosaicMethodMaximum24.json +1 -0
  34. package/assets/components/assets/icon/mosaicMethodMaximum32.json +1 -0
  35. package/assets/components/assets/icon/mosaicMethodMean16.json +1 -0
  36. package/assets/components/assets/icon/mosaicMethodMean24.json +1 -0
  37. package/assets/components/assets/icon/mosaicMethodMean32.json +1 -0
  38. package/assets/components/assets/icon/mosaicMethodMinimum16.json +1 -0
  39. package/assets/components/assets/icon/mosaicMethodMinimum24.json +1 -0
  40. package/assets/components/assets/icon/mosaicMethodMinimum32.json +1 -0
  41. package/assets/components/assets/icon/mosaicMethodNone16.json +1 -0
  42. package/assets/components/assets/icon/mosaicMethodNone24.json +1 -0
  43. package/assets/components/assets/icon/mosaicMethodNone32.json +1 -0
  44. package/assets/components/assets/icon/mosaicMethodNorthWest16.json +1 -0
  45. package/assets/components/assets/icon/mosaicMethodNorthWest24.json +1 -0
  46. package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -0
  47. package/assets/components/assets/icon/mosaicMethodSeamline16.json +1 -0
  48. package/assets/components/assets/icon/mosaicMethodSeamline24.json +1 -0
  49. package/assets/components/assets/icon/mosaicMethodSeamline32.json +1 -0
  50. package/assets/components/assets/icon/mosaicMethodSum16.json +1 -0
  51. package/assets/components/assets/icon/mosaicMethodSum24.json +1 -0
  52. package/assets/components/assets/icon/mosaicMethodSum32.json +1 -0
  53. package/assets/esri/core/workers/RemoteClient.js +1 -1
  54. package/assets/esri/core/workers/chunks/{b2f9f0767dadf185120c.js → 00612d6e05b1c8647668.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{d4d011eea16a89a5aad9.js → 0219c3f9408d3fa3c9a0.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{f54546c155fba2fd3a7e.js → 05d7d8ff3e4cbad32580.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{b1e275607d9754079f60.js → 079434fe765c53d304f2.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{4f8782b3b6ad414409e8.js → 0a48b9734ab4c64a6f4f.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{0eed612e82a279ac8d1e.js → 11b55e7e76e50fe11bbe.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{ccc50f28f217e50cc2c3.js → 1427e7953c3d8c87c5e8.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{184d7c8ea818bec5c462.js → 146b3699a9e8b1f2dcc2.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{8ba7d44eff348004f084.js → 1a6d2d090b643a87408a.js} +1 -1
  63. package/assets/esri/core/workers/chunks/1b8cc83aa1179245b2dc.js +1 -0
  64. package/assets/esri/core/workers/chunks/{5e5225623977e61fd0ef.js → 213adc87c843d627c5d6.js} +1 -1
  65. package/assets/esri/core/workers/chunks/235efd948ae470a6f238.js +1 -0
  66. package/assets/esri/core/workers/chunks/{60d3b329e69f3cddb7f4.js → 265f69d153b7b6f07e42.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{769b66cca8347f0f84db.js → 279bbd61b32577693a4a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/290b065b377f9d2ee058.js +1 -0
  69. package/assets/esri/core/workers/chunks/29d3245261a7223124ed.js +1 -0
  70. package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js → 30551c1d3e4fa7be86c1.js} +2 -2
  71. package/assets/esri/core/workers/chunks/{0c6f2808c57ff820bfdd.js.LICENSE.txt → 30551c1d3e4fa7be86c1.js.LICENSE.txt} +1 -1
  72. package/assets/esri/core/workers/chunks/335b539893569e3d7b82.js +1 -0
  73. package/assets/esri/core/workers/chunks/{78242f2bf742b33d99fa.js → 3795793643f4db64af0e.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js → 3cf001abca8ad933bccf.js} +2 -2
  75. package/assets/esri/core/workers/chunks/{38f9ede26098eb03ca2d.js.LICENSE.txt → 3cf001abca8ad933bccf.js.LICENSE.txt} +1 -1
  76. package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js → 543eb46b55cacd6e1dbc.js} +2 -2
  77. package/assets/esri/core/workers/chunks/{dbaa4b8d37aab40d7bd1.js.LICENSE.txt → 543eb46b55cacd6e1dbc.js.LICENSE.txt} +1 -1
  78. package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js → 577f24923fa4d08360e4.js} +2 -2
  79. package/assets/esri/core/workers/chunks/{93f792f5b94f3745b57d.js.LICENSE.txt → 577f24923fa4d08360e4.js.LICENSE.txt} +1 -1
  80. package/assets/esri/core/workers/chunks/5958af341014e13475d2.js +1 -0
  81. package/assets/esri/core/workers/chunks/{f46c4a69ef2f763e905b.js → 5d63dfa5a60c88e03b28.js} +1 -1
  82. package/assets/esri/core/workers/chunks/60f7cd05e88701f43d3f.js +1 -0
  83. package/assets/esri/core/workers/chunks/{26e0a0a13060cd3e4291.js → 626ba3a7dee952308566.js} +1 -1
  84. package/assets/esri/core/workers/chunks/7bfa18dd8771d4932533.js +1 -0
  85. package/assets/esri/core/workers/chunks/7cd32b10ed0e18e44ef2.js +1 -0
  86. package/assets/esri/core/workers/chunks/7ffa68d69c138db1295d.js +1 -0
  87. package/assets/esri/core/workers/chunks/8dd26b12c625d20196ed.js +319 -0
  88. package/assets/esri/core/workers/chunks/91f8547a13f0461045ef.js +1 -0
  89. package/assets/esri/core/workers/chunks/9661ee8569ee208e6237.js +1 -0
  90. package/assets/esri/core/workers/chunks/{c2f38c66fae2cdb57445.js → 96e5d192c8d23c1e324f.js} +1 -1
  91. package/assets/esri/core/workers/chunks/974742af7beb000c4b4a.js +1 -0
  92. package/assets/esri/core/workers/chunks/{e27fa1e84f16b7f19a90.js → 9850ff14bd9c7da81c65.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{796cf1c2ca9955595836.js → 9b2ab27159500315fbc1.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{a276980c06d5d311a37e.js → 9f416cc5673665f8c37c.js} +1 -1
  95. package/assets/esri/core/workers/chunks/a0c51c4c30a5f749dfc6.js +1 -0
  96. package/assets/esri/core/workers/chunks/a79511b926a2830bb160.js +1 -0
  97. package/assets/esri/core/workers/chunks/{fdcbd28f38bc485ac5e3.js → ab6ecd8eeec5ff761b34.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js → ac9c6779771ec855da79.js} +2 -2
  99. package/assets/esri/core/workers/chunks/{814d72abbfdd4552e4ec.js.LICENSE.txt → ac9c6779771ec855da79.js.LICENSE.txt} +1 -1
  100. package/assets/esri/core/workers/chunks/{ef6e805c49e1afdf966b.js → c054198c6438cb57f188.js} +1 -1
  101. package/assets/esri/core/workers/chunks/c5d786166a5609b85276.js.LICENSE.txt +1 -1
  102. package/assets/esri/core/workers/chunks/{5bdd5ae2d2f23ef6b331.js → c87e2a63b96e0da77dfe.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{601fc99426f0213b0769.js → cbec01223d51cdb9ee79.js} +1 -1
  104. package/assets/esri/core/workers/chunks/cc4dd739c4c7e3ccea3f.js +1 -0
  105. package/assets/esri/core/workers/chunks/{90c893959145827961ac.js → cd9343c78a7c3acdbbcd.js} +1 -1
  106. package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +1 -0
  107. package/assets/esri/core/workers/chunks/{26fcbe053194bd78fcc3.js → d8474dca270b25705699.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js → d8dc922f7466300b668f.js} +2 -2
  109. package/assets/esri/core/workers/chunks/{5db336767959507c07e5.js.LICENSE.txt → d8dc922f7466300b668f.js.LICENSE.txt} +1 -1
  110. package/assets/esri/core/workers/chunks/{96cddbbeef61a4f33f29.js → db5913824d5e5a2a8365.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{48a1bb1e171dd06a7c6e.js → dd94585508f49863dc15.js} +1 -1
  112. package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +2 -0
  113. package/assets/esri/core/workers/chunks/{02176f84d6d57f1bc1c8.js.LICENSE.txt → e524462c63834fae7e01.js.LICENSE.txt} +1 -1
  114. package/assets/esri/core/workers/chunks/{e7e987558cf017c62458.js → ebfa4a0334401f5e004a.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{736a11e64e5f03e3936b.js → f2cef954b58c6604642c.js} +64 -64
  116. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  117. package/assets/esri/themes/dark/main.css +1 -1
  118. package/assets/esri/themes/light/main.css +1 -1
  119. package/assets/esri/themes/light/view.css +1 -1
  120. package/chunks/BloomBlur.glsl.js +7 -7
  121. package/chunks/BloomComposition.glsl.js +24 -25
  122. package/chunks/Bufferer-CicaNej1.js +1 -1
  123. package/chunks/Envelope.js +1 -1
  124. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  125. package/chunks/Geometry.js +1 -1
  126. package/chunks/OperatorGeodesicBuffer.js +1 -1
  127. package/chunks/OperatorGeodeticArea.js +1 -1
  128. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  129. package/chunks/OperatorGeodeticLength.js +1 -1
  130. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  131. package/chunks/OperatorProximityGeodesic.js +1 -1
  132. package/chunks/OperatorShapePreservingLength.js +1 -1
  133. package/chunks/OperatorShapePreservingProject.js +1 -1
  134. package/chunks/OperatorSimplifyOGC.js +5 -0
  135. package/chunks/Point2D.js +1 -1
  136. package/chunks/ProjectionTransformation.js +1 -1
  137. package/chunks/QuadraticBezier.js +1 -1
  138. package/chunks/cameraUtilsSpherical.js +1 -1
  139. package/chunks/languageUtils.js +1 -1
  140. package/chunks/relateOperator.js +1 -1
  141. package/chunks/sphere.js +1 -1
  142. package/chunks/vxlLayer.js +1 -1
  143. package/core/Collection.js +1 -1
  144. package/core/JSONSupport.js +1 -1
  145. package/core/SetUtils.js +1 -1
  146. package/{views/webgl/GLObjectType.js → core/support/jsonUtils.js} +1 -1
  147. package/core/urlUtils.js +1 -1
  148. package/geometry/Mesh.js +1 -1
  149. package/geometry/operators/extendOperator.js +1 -1
  150. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  151. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  152. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  153. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  154. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  155. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  156. package/geometry/operators/gx/operatorSimplifyOGC.js +5 -0
  157. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  158. package/geometry/operators/reshapeOperator.js +1 -1
  159. package/geometry/operators/simplifyOGCOperator.d.ts +6 -0
  160. package/geometry/operators/simplifyOGCOperator.js +5 -0
  161. package/geometry/operators/support/jsonConverter.js +1 -1
  162. package/geometry/support/normalizeUtilsSync.js +1 -1
  163. package/geometry/support/sphere.js +1 -1
  164. package/interfaces.d.ts +442 -113
  165. package/layers/DimensionLayer.js +1 -1
  166. package/layers/RouteLayer.js +1 -1
  167. package/layers/SubtypeGroupLayer.js +1 -1
  168. package/layers/ViewshedLayer.js +1 -1
  169. package/layers/graphics/data/QueryEngine.js +1 -1
  170. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  171. package/layers/orientedImagery/transformations/utils.js +1 -1
  172. package/layers/support/FieldsIndex.js +1 -1
  173. package/layers/support/VideoElement.js +1 -1
  174. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  175. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  176. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  177. package/layers/support/rasterFormats/{TiffTags.js → tiffTag.js} +1 -1
  178. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  179. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  180. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  181. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  182. package/layers/support/rasterFunctions/RemapFunction.js +1 -1
  183. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  184. package/layers/support/videoUtils.js +5 -0
  185. package/package.json +2 -2
  186. package/portal/schemas/definitions.js +1 -1
  187. package/renderers/UniqueValueRenderer.js +1 -1
  188. package/renderers/support/colorRampUtils.js +1 -1
  189. package/support/revision.js +1 -1
  190. package/symbols/IconSymbol3DLayer.js +1 -1
  191. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  192. package/versionManagement/utils.js +1 -1
  193. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  195. package/views/2d/engine/webgl/textureUtils.js +1 -1
  196. package/views/2d/layers/MediaLayerView2D.js +1 -1
  197. package/views/2d/layers/TileLayerView2D.js +1 -1
  198. package/views/2d/layers/support/DebugOverlay.js +1 -1
  199. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  200. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  201. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  202. package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
  203. package/views/3d/analysis/Viewshed/ViewshedAnalysisVisualization.js +1 -1
  204. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  205. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  206. package/views/3d/camera/constraintUtils/distance.js +1 -1
  207. package/views/3d/camera/intersectionUtils.js +1 -1
  208. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  209. package/views/3d/environment/atmosphereUtils.js +1 -1
  210. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  211. package/views/3d/interactive/visualElements/EngineVisualElement.js +1 -1
  212. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  213. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  214. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  215. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  216. package/views/3d/interactive/visualElements/MarkerVisualElement.js +1 -1
  217. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  218. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  219. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  220. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  221. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  222. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  223. package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
  224. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  225. package/views/3d/interactive/visualElements/ViewshedShapeVisualElement.js +1 -1
  226. package/views/3d/interactive/visualElements/VisualElement.js +1 -1
  227. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  228. package/views/3d/layers/I3SMeshView3D.js +1 -1
  229. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  230. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  231. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  232. package/views/3d/layers/graphics/pipeline/PipelineCommand.js +1 -1
  233. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  234. package/views/3d/layers/graphics/pipeline/TileActionSynchronizer.js +5 -0
  235. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  236. package/views/3d/state/ConstraintsManager.js +1 -1
  237. package/views/3d/state/NearFarHeuristic.js +1 -1
  238. package/views/3d/state/ViewState.js +1 -1
  239. package/views/3d/state/ViewStateManager.js +1 -1
  240. package/views/3d/state/utils/navigationUtils.js +1 -1
  241. package/views/3d/support/cameraUtilsSpherical.js +1 -1
  242. package/views/3d/support/geometryUtils/sphere.js +1 -1
  243. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  244. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  245. package/views/3d/webgl/ManagedFBO.js +1 -1
  246. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  247. package/views/3d/webgl-engine/core/FBOCacheFormats.js +5 -0
  248. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +12 -14
  249. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
  250. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  251. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  252. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  253. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  254. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  255. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  256. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  257. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  258. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  259. package/views/3d/webgl-engine/lib/DepthRange.js +1 -1
  260. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  261. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  262. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  263. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  264. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  265. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  266. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  267. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  268. package/views/SceneView.js +1 -1
  269. package/views/VideoView.js +1 -1
  270. package/views/interactive/Tooltip.js +1 -1
  271. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  272. package/views/layers/LineOfSightLayerView.d.ts +4 -0
  273. package/views/layers/LineOfSightLayerView.js +5 -0
  274. package/views/webgl/FBOAttachmentType.js +5 -0
  275. package/views/webgl/FramebufferObject.js +1 -1
  276. package/views/webgl/Renderbuffer.js +1 -1
  277. package/views/webgl/RenderbufferDescriptor.js +1 -1
  278. package/views/webgl/Texture.js +1 -1
  279. package/views/webgl/TextureDescriptor.js +1 -1
  280. package/webscene/InitialViewProperties.js +1 -1
  281. package/webscene/Presentation.js +1 -1
  282. package/webscene/Slide.js +1 -1
  283. package/webscene/SlideLegendInfo.js +1 -1
  284. package/webscene/background/ColorBackground.js +1 -1
  285. package/webscene/spec-certification/api.js +1 -1
  286. package/webscene/spec-certification/compare.js +1 -1
  287. package/webscene/spec-certification/index.js +1 -1
  288. package/webscene/spec-certification/spec.js +1 -1
  289. package/webscene/spec-certification/utils.js +1 -1
  290. package/webscene/support/Description.js +1 -1
  291. package/webscene/support/SlideElements.js +1 -1
  292. package/webscene/support/SlideEnvironment.js +1 -1
  293. package/webscene/support/SlideGround.js +1 -1
  294. package/webscene/support/SlideVisibleLayer.js +1 -1
  295. package/webscene/support/Title.js +1 -1
  296. package/webscene/support/analysisUtils.js +5 -0
  297. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  298. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  299. package/widgets/Editor/EditorViewModel.js +1 -1
  300. package/widgets/Editor/UpdateWorkflow.js +1 -1
  301. package/widgets/Editor/support/SketchController.js +5 -0
  302. package/widgets/Editor/workflowUtils.js +1 -1
  303. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  304. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  305. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  306. package/widgets/FeatureTable.js +1 -1
  307. package/widgets/LayerList/LayerListItem.js +1 -1
  308. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  309. package/widgets/Widget.js +1 -1
  310. package/widgets/support/SelectionList.js +1 -1
  311. package/widgets/support/SnappingControls.js +1 -1
  312. package/assets/esri/core/workers/chunks/02176f84d6d57f1bc1c8.js +0 -2
  313. package/assets/esri/core/workers/chunks/244d2196bac5ef279436.js +0 -1
  314. package/assets/esri/core/workers/chunks/32f2e0c88046b39916cc.js +0 -1
  315. package/assets/esri/core/workers/chunks/388a763da712ca71ccf4.js +0 -1
  316. package/assets/esri/core/workers/chunks/5ffc3ca6c6a4d32e1282.js +0 -1
  317. package/assets/esri/core/workers/chunks/642a595353a86f3717e3.js +0 -1
  318. package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +0 -1
  319. package/assets/esri/core/workers/chunks/873327fc41edd3830afa.js +0 -319
  320. package/assets/esri/core/workers/chunks/93e9dfd1ba8f393c6c47.js +0 -1
  321. package/assets/esri/core/workers/chunks/95379fdd6917c8a84c71.js +0 -1
  322. package/assets/esri/core/workers/chunks/9b21dc4659922cc577cb.js +0 -1
  323. package/assets/esri/core/workers/chunks/a197c86d42cc9ce21924.js +0 -1
  324. package/assets/esri/core/workers/chunks/d81bebbb6fe000200d35.js +0 -1
  325. package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +0 -1
  326. package/assets/esri/core/workers/chunks/dd8e72d6784a8ebc115d.js +0 -1
  327. package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +0 -1
  328. package/assets/esri/core/workers/chunks/e9fba86036b8fe700a41.js +0 -1
  329. package/views/3d/webgl/formats.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfNotAbortError as i,throwIfAborted as n,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as c}from"../../../../core/unitFormatUtils.js";import{defaultLengthUnit as p,defaultVerticalLengthUnit as d,defaultAreaUnit as u}from"../../../../core/unitUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as g}from"../../keybindings.js";import{table as _,contentHeader as y,contentHeaderSpacer as b,contentHeaderActions as v,contentInputMode as w,content as I,helpMessageText as j,helpMessageIcon as k,helpMessage as A,drawContentHeaderActions as C}from"../css.js";import{getFormatters as U}from"../fields/parsingAndFormattingUtils.js";import M from"../../../../widgets/Widget.js";import{loadCalciteComponents as F}from"../../../../widgets/support/componentsUtils.js";import{classes as x}from"../../../../widgets/support/widgetUtils.js";import{messageBundle as D}from"../../../../widgets/support/decorators/messageBundle.js";import{tsx as T,tsxFragment as H}from"../../../../widgets/support/jsxFactory.js";const E=Symbol("dragHandles");let S=class extends M{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=s(U),this._onHeaderPointerDown=t=>{const e=t.target;e instanceof HTMLElement&&"calcite-button"!==e?.tagName?.toLowerCase()&&(this.removeHandles(E),e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",(({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)})),o(e,["pointerup","pointercancel"],(o=>{this.removeHandles(E),e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()})),o(e,"touchstart",(t=>t.preventDefault()))],E))},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),s=o.length,i=o.indexOf(t);if(-1===i)return void this.exitInputMode();const n=((i+("commit-and-next"===e?1:-1))%s+s)%s;L(o.at(n))},this._onKeyDown=t=>{switch(t.code){case g.next:return this._onNextKey(t);case g.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.sketchOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:c(t,e,"abbr")}),{inputUnits:o}=this.info.sketchOptions.values,s=f(this.tooltip.view),i=o.length??s,n=o.verticalLength??s,r=o.area??s;return{length:e(p(i)),verticalLength:e(d(n)),area:e(u(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,sketchOptions:this.info.sketchOptions,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.sketchOptions.tooltips,e=this._renderedContent,o=this._renderedActions,s=this._renderedHelpMessage,i=e.length>0,n=i||!!s,r="input"===this.mode;return T("div",{class:x(I,r&&w),onkeydown:this._onKeyDown,tabIndex:-1},r&&n&&t.header?T("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},T("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",onclick:this._onDiscard,scale:"s",tabIndex:-1}),o.length>0?T(H,null,T("div",{class:b,key:"spacer"}),T("div",{class:v,key:"actions"},o)):null):null,i?T("div",{class:_,key:"content"},...e):null,s)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return F({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){i(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const s=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),s instanceof HTMLElement&&s.focus()}catch(e){i(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),s=e.at(-1);o&&s&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),L(s)):document.activeElement===s&&(t.preventDefault(),t.stopPropagation(),L(o)))}get _renderedContent(){return N(this._renderContent())}get _renderedActions(){return N(this._renderActions())}get _renderedHelpMessage(){const{sketchOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const s=t.tooltips.helpMessageIcon??"information";return T("div",{class:A,key:"help-message"},s?T("calcite-icon",{class:k,icon:s,scale:"s"}):null,T("div",{class:j},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),n(e);const o=this._getFocusableInputs(),s=t?o.find((e=>e.getAttribute("data-field-name")===t)):o.at(0);await L(s)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const s=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if(!this.domNode?.firstChild||!document.startViewTransition||e())return void await s();this.autoRenderingEnabled=!1;const i=this._transitionInfo={transition:document.startViewTransition((async()=>{this.destroyed||i!==this._transitionInfo||(this.autoRenderingEnabled=!0,await s())})),mode:t};try{await i.transition.finished}finally{i===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(O);await a()}_getFocusableInputs(){return Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[])}_getFocusableElements(){const t=this.domNode?.querySelector(`.${C}`);return[...Array.from(t?.querySelectorAll(`.${v} calcite-button:not([disabled])`)??[]),...this._getFocusableInputs()]}};async function L(t){await(t?.setFocus())}function N(t){return(Array.isArray(t)?t:[t]).flat(10).filter((t=>!!t))}t([D("esri/core/t9n/Units"),h()],S.prototype,"_messagesUnits",void 0),t([D("esri/views/interactive/tooltip/t9n/Tooltip"),h()],S.prototype,"_messagesTooltip",void 0),t([h()],S.prototype,"info",void 0),t([h()],S.prototype,"tooltip",void 0),t([h()],S.prototype,"_mode",void 0),t([h()],S.prototype,"mode",null),t([h()],S.prototype,"_displayUnits",null),t([h()],S.prototype,"_inputUnitInfos",null),t([h()],S.prototype,"_formatters",null),t([h()],S.prototype,"fieldContext",null),t([h()],S.prototype,"_renderedContent",null),t([h()],S.prototype,"_renderedActions",null),t([h()],S.prototype,"_renderedHelpMessage",null),t([h()],S.prototype,"_defaultHelpMessage",null),S=t([m("esri.views.interactive.tooltip.content.TooltipContent")],S);const O=20;export{S as TooltipContent};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{prefersReducedMotion as e}from"../../../../core/a11yUtils.js";import{on as o}from"../../../../core/events.js";import"../../../../core/has.js";import{memoize as s}from"../../../../core/memoize.js";import{throwIfNotAbortError as i,throwIfAborted as n,after as r}from"../../../../core/promiseUtils.js";import{waitAnimationFrame as a,waitTick as l}from"../../../../core/scheduling.js";import{unitName as c}from"../../../../core/unitFormatUtils.js";import{defaultLengthUnit as p,defaultVerticalLengthUnit as d,defaultAreaUnit as u}from"../../../../core/unitUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as f}from"../../../../support/getDefaultUnitForView.js";import{tooltipKeys as g}from"../../keybindings.js";import{table as _,contentHeader as y,contentHeaderSpacer as b,contentHeaderActions as v,contentInputMode as w,content as I,helpMessageText as j,helpMessageIcon as k,helpMessage as A,drawContentHeaderActions as C}from"../css.js";import{getFormatters as U}from"../fields/parsingAndFormattingUtils.js";import M from"../../../../widgets/Widget.js";import{loadCalciteComponents as D}from"../../../../widgets/support/componentsUtils.js";import{classes as F}from"../../../../widgets/support/widgetUtils.js";import{messageBundle as x}from"../../../../widgets/support/decorators/messageBundle.js";import{tsx as T,tsxFragment as H}from"../../../../widgets/support/jsxFactory.js";const E=Symbol("dragHandles");let S=class extends M{constructor(){super(...arguments),this._focusAbortController=new AbortController,this._transitionInfo=null,this._mode="feedback",this._getFormatters=s(U),this._onHeaderPointerDown=t=>{const e=t.target;e instanceof HTMLElement&&"calcite-button"!==e?.tagName?.toLowerCase()&&(this.removeHandles(E),t.preventDefault(),t.stopPropagation(),e.setPointerCapture(t.pointerId),this.tooltip.onDragStart(t.clientX,t.clientY),this.addHandles([o(e,"pointermove",(({clientX:t,clientY:e})=>{this.tooltip.onDrag(t,e)})),o(e,["pointerup","pointercancel"],(o=>{this.removeHandles(E),e.releasePointerCapture(t.pointerId),this.tooltip.onDragEnd()})),o(e,"touchstart",(t=>t.preventDefault()))],E))},this._onDiscard=()=>{this.destroyed||(this.tooltip.emit("discard"),this.info.clearInputValues(),this.exitInputMode())},this._onCommit=(t,e)=>{if(this.destroyed)return;if(this.tooltip.emit("commit",{type:e}),"commit-and-exit"===e)return void this.exitInputMode();if("commit-on-blur"===e)return;const o=this._getFocusableElements(),s=o.length,i=o.indexOf(t);if(-1===i)return void this.exitInputMode();const n=((i+("commit-and-next"===e?1:-1))%s+s)%s;L(o.at(n))},this._onKeyDown=t=>{switch(t.code){case g.next:return this._onNextKey(t);case g.discard:return t.stopPropagation(),this._onDiscard()}}}get mode(){return this._mode}get _displayUnits(){const{displayUnits:t}=this.info.sketchOptions.values,e=f(this.tooltip.view);return{length:t.length??e,verticalLength:t.verticalLength??e,area:t.area??e}}get _inputUnitInfos(){const t=this._messagesUnits,e=e=>({unit:e,abbreviation:c(t,e,"abbr")}),{inputUnits:o}=this.info.sketchOptions.values,s=f(this.tooltip.view),i=o.length??s,n=o.verticalLength??s,r=o.area??s;return{length:e(p(i)),verticalLength:e(d(n)),area:e(u(r)),angle:e("degrees")}}get _formatters(){return this._getFormatters(this._messagesUnits,this._displayUnits)}get fieldContext(){return{formatters:this._formatters,inputUnitInfos:this._inputUnitInfos,messages:this._messagesTooltip,sketchOptions:this.info.sketchOptions,onCommit:this._onCommit,onDiscard:this._onDiscard}}render(){const{visibleElements:t}=this.info.sketchOptions.tooltips,e=this._renderedContent,o=this._renderedActions,s=this._renderedHelpMessage,i=e.length>0,n=i||!!s,r="input"===this.mode;return T("div",{class:F(I,r&&w),onkeydown:this._onKeyDown,tabIndex:-1},r&&n&&t.header?T("div",{class:y,"data-testid":"tooltip-header",key:"header",onpointerdown:this._onHeaderPointerDown},T("calcite-button",{appearance:"transparent","data-testid":"tooltip-back-button",iconFlipRtl:"both",iconStart:"chevron-left",key:"discard-button",kind:"neutral",onclick:this._onDiscard,scale:"s",tabIndex:-1}),o.length>0?T(H,null,T("div",{class:b,key:"spacer"}),T("div",{class:v,key:"actions"},o)):null):null,i?T("div",{class:_,key:"content"},...e):null,s)}destroy(){this._focusAbortController.abort(),this._transitionInfo?.transition.skipTransition()}_renderActions(){return null}loadDependencies(){return D({button:()=>import("@esri/calcite-components/dist/components/calcite-button"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),input:()=>import("@esri/calcite-components/dist/components/calcite-input")})}async enterInputMode(t,e){try{await this._transitionTo("input",e),await this._focusField(t)}catch(o){i(o)}}async exitInputMode({focusOnView:t=!0}={}){try{const{container:e,info:o}=this;o.clearInputValues();const s=t?e?.closest(".esri-view")?.querySelector(".esri-view-surface"):null;await this._transitionTo("feedback"),s instanceof HTMLElement&&s.focus()}catch(e){i(e)}}_onNextKey(t){const e=this._getFocusableElements(),o=e.at(0),s=e.at(-1);o&&s&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),t.stopPropagation(),L(s)):document.activeElement===s&&(t.preventDefault(),t.stopPropagation(),L(o)))}get _renderedContent(){return N(this._renderContent())}get _renderedActions(){return N(this._renderActions())}get _renderedHelpMessage(){const{sketchOptions:t,visibleElements:e}=this.info;if(!e.helpMessage)return null;const o=t.tooltips.helpMessage??this._defaultHelpMessage;if(!o)return null;const s=t.tooltips.helpMessageIcon??"information";return T("div",{class:A,key:"help-message"},s?T("calcite-icon",{class:k,icon:s,scale:"s"}):null,T("div",{class:j},o))}get _defaultHelpMessage(){const{helpMessage:t,viewType:e}=this.info;if(null==t)return null;const o="3d"===e?"helpMessages3d":"helpMessages2d";return this._messagesTooltip?.sketch?.[o]?.[t]}async _focusField(t){this._focusAbortController?.abort(),this._focusAbortController=new AbortController;const{signal:e}=this._focusAbortController;await this._waitForInputs(),n(e);const o=this._getFocusableInputs(),s=t?o.find((e=>e.getAttribute("data-field-name")===t)):o.at(0);await L(s)}async _transitionTo(t,o){if(this._mode===t&&!this._transitionInfo)return;if(this._transitionInfo?.mode===t)return this._transitionInfo.transition.finished;this._transitionInfo?.transition.skipTransition();const s=async()=>{this.destroyed||(this._mode=t,await l(),this.destroyed||(this.renderNow(),await l(),this.destroyed||o?.()))};if(!this.domNode?.firstChild||!document.startViewTransition||e())return void await s();this.autoRenderingEnabled=!1;const i=this._transitionInfo={transition:document.startViewTransition((async()=>{this.destroyed||i!==this._transitionInfo||(this.autoRenderingEnabled=!0,await s())})),mode:t};try{await i.transition.finished}finally{i===this._transitionInfo&&(this._transitionInfo=null)}}async _waitForInputs(){const t=()=>Array.from(this.domNode?.querySelectorAll("calcite-input")??[]);for(;0===t().length;)await r(O);await a()}_getFocusableInputs(){return Array.from(this.domNode?.querySelectorAll("calcite-input:not([read-only]):not([disabled])")??[])}_getFocusableElements(){const t=this.domNode?.querySelector(`.${C}`);return[...Array.from(t?.querySelectorAll(`.${v} calcite-button:not([disabled])`)??[]),...this._getFocusableInputs()]}};async function L(t){await(t?.setFocus())}function N(t){return(Array.isArray(t)?t:[t]).flat(10).filter((t=>!!t))}t([x("esri/core/t9n/Units"),h()],S.prototype,"_messagesUnits",void 0),t([x("esri/views/interactive/tooltip/t9n/Tooltip"),h()],S.prototype,"_messagesTooltip",void 0),t([h()],S.prototype,"info",void 0),t([h()],S.prototype,"tooltip",void 0),t([h()],S.prototype,"_mode",void 0),t([h()],S.prototype,"mode",null),t([h()],S.prototype,"_displayUnits",null),t([h()],S.prototype,"_inputUnitInfos",null),t([h()],S.prototype,"_formatters",null),t([h()],S.prototype,"fieldContext",null),t([h()],S.prototype,"_renderedContent",null),t([h()],S.prototype,"_renderedActions",null),t([h()],S.prototype,"_renderedHelpMessage",null),t([h()],S.prototype,"_defaultHelpMessage",null),S=t([m("esri.views.interactive.tooltip.content.TooltipContent")],S);const O=20;export{S as TooltipContent};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import LineOfSightLayerView = __esri.LineOfSightLayerView;
4
+ export default LineOfSightLayerView;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{let a=class extends o{constructor(...e){super(...e),this.layer=null}get interactive(){return this.analysisView?.interactive??!1}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new r}async place(e){if(null!=this.analysisView)return await this.analysisView.place(e);throw s()}};return e([t()],a.prototype,"layer",void 0),e([t()],a.prototype,"interactive",null),e([t({readOnly:!0})],a.prototype,"results",null),a=e([i("esri.views.layers.LineOfSightLayerView")],a),a};export{o as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ var e;!function(e){e[e.TextureDescriptor=0]="TextureDescriptor",e[e.Texture=1]="Texture",e[e.Renderbuffer=2]="Renderbuffer"}(e||(e={}));export{e as FBOAttachmentType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as i}from"./BufferObject.js";import{webglDebugEnabled as r}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,TextureType as h,FramebufferTarget as o,UnsizedDepthFormat as c,PixelType as a,Usage as u,BufferType as f,SizedStencilFormat as _,StencilAttachment as l,SizedDepthStencilFormat as d,DepthStencilAttachment as m,SizedDepthFormat as T,DepthAttachment as p}from"./enums.js";import{GLObjectType as x}from"./GLObjectType.js";import{Renderbuffer as E}from"./Renderbuffer.js";import{Texture as b}from"./Texture.js";const g=()=>t.getLogger("esri.views.webgl.FramebufferObject");class R{constructor(t,e,i=null){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const t=F(e)?e:new b(this._context,e);this._colorAttachments.set(n,t),this._validateTextureDescriptor(t.descriptor),this._validateColorAttachmentPoint(n)}if(null!=i)if(S(i))this._depthStencilTexture=F(i)?i:new b(this._context,i),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const t=A(i)?i:new E(this._context,i);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:i}=this;i.temporaryBindFramebufferObject(null,(()=>{this._colorAttachments.forEach(((t,e)=>this.detachColorTexture(e)?.dispose())),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),e&&(i.gl.deleteFramebuffer(e),this._glName=null)})),i.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){return this._colorAttachments.get(n)}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(n);return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(n);return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce(((t,[e,i])=>t+i.usedMemory),this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&F(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=n){if(!t)return;this._validateColorAttachmentPoint(e);const i=t.descriptor;this._validateTextureDescriptor(i),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=n){const e=this._colorAttachments.get(t);if(e)return this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,t)})),this._colorAttachments.delete(t),e}setColorTextureTarget(t,e=n,i=0){const r=this._colorAttachments.get(e);r&&(t===h.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(r.glName,e,o.FRAMEBUFFER,0,i):this._framebufferTexture2D(r.glName,e,t,o.FRAMEBUFFER,0))}attachDepthStencil(t){if(t)switch(t.type){case x.Texture:return this._attachDepthStencilTexture(t);case x.Renderbuffer:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:i,dataType:r}=e;i===c.DEPTH_STENCIL||i===c.DEPTH_COMPONENT?i!==c.DEPTH_STENCIL||r===a.UNSIGNED_INT_24_8?i!==c.DEPTH_COMPONENT||r===a.UNSIGNED_INT||r===a.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,U(i))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,U(t.descriptor.pixelFormat))})),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const i=this._context.gl,r=this._getGLAttachmentPoint(e);i.framebufferRenderbuffer(o.FRAMEBUFFER,r,i.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const e=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this);const i=this._context.gl,r=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(o.FRAMEBUFFER,r,i.RENDERBUFFER,null),this._context.bindFramebuffer(e)}return this._depthStencilBuffer=null,t}invalidateAttachments(t,e=!1){const i=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this,e),this._context.gl.invalidateFramebuffer(o.FRAMEBUFFER,t),this._context.bindFramebuffer(i)}copyToTexture(t,e,i,r,s,n,o){(t<0||e<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const c=o.descriptor;o.descriptor.target!==h.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(null==c?.width||null==c?.height||t+i>this.width||e+r>this.height||s+i>c.width||n+r>c.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const a=this._context,u=a.bindTexture(o,b.TEXTURE_UNIT_FOR_UPDATES);a.setActiveTexture(b.TEXTURE_UNIT_FOR_UPDATES),a.bindFramebuffer(this),a.gl.copyTexSubImage2D(h.TEXTURE_2D,0,s,n,t,e,i,r),a.bindTexture(u,b.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,s,n,h){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,i,r,s,n,h)}async readPixelsAsync(t,e,r,s,n,h,o){const{gl:c}=this._context,a=i.createPixelPack(this._context,u.STREAM_READ,o.byteLength);this._context.bindBuffer(a);const _=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,r,s,n,h,0),this._context.unbindBuffer(f.PIXEL_PACK_BUFFER),this._context.bindFramebuffer(_),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const i={width:t,height:e};N(i,this._context.parameters.maxTextureSize),this._colorAttachments.forEach((t=>t.resize(i.width,i.height))),this._depthStencilTexture?.resize(i.width,i.height),this._initialized&&(N(i,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(i.width,i.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=o.FRAMEBUFFER){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const i=e.createFramebuffer();if(e.bindFramebuffer(t,i),this._colorAttachments.forEach(((e,i)=>{const r=B(e);r===h.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(e.glName,i,t,0,0):this._framebufferTexture2D(e.glName,i,r,t)})),this._depthStencilBuffer){const i=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,i,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=U(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,B(this._depthStencilTexture),t)}if(r()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=i,this._initialized=!0}_framebufferTexture2D(t,e=n,i=h.TEXTURE_2D,r=o.FRAMEBUFFER,s=0){this._context.gl.framebufferTexture2D(r,e,i,t,s)}_framebufferTextureLayer(t,e=n,i=o.FRAMEBUFFER,r=0,s=0){this._context.gl.framebufferTextureLayer(i,e,t,r,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(o.FRAMEBUFFER,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,U(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){t.target!==h.TEXTURE_2D&&t.target!==h.TEXTURE_CUBE_MAP&&t.target!==h.TEXTURE_2D_ARRAY&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),N(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){N(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case T.DEPTH_COMPONENT16:case T.DEPTH_COMPONENT24:case T.DEPTH_COMPONENT32F:return p;case d.DEPTH24_STENCIL8:case d.DEPTH32F_STENCIL8:return m;case _.STENCIL_INDEX8:return l}}_validateColorAttachmentPoint(e){if(-1===R._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;R._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const i=e-n;i+1>R._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${i+1}. Implementation supports up to ${R._MAX_COLOR_ATTACHMENTS} color attachments`)}}function F(t){return null!=t&&"type"in t&&t.type===x.Texture}function A(t){return null!=t&&"type"in t&&t.type===x.Renderbuffer}function S(t){return F(t)||D(t)}function D(t){return null!=t&&"objectType"in t&&t.objectType===x.Texture}function N(t,e){const i=Math.max(t.width,t.height);if(i>e){g().warn(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const r=e/i;return t.width=Math.round(t.width*r),t.height=Math.round(t.height*r),!1}return!0}function B(t){return t.descriptor.target===h.TEXTURE_CUBE_MAP?h.TEXTURE_CUBE_MAP_POSITIVE_X:t.descriptor.target===h.TEXTURE_2D_ARRAY?h.TEXTURE_2D_ARRAY:h.TEXTURE_2D}function U(t){return t===c.DEPTH_COMPONENT?p:m}export{R as FramebufferObject,N as ensureAttachmentMaxSize};
5
+ import"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,TextureType as h,FramebufferTarget as o,UnsizedDepthFormat as c,PixelType as a,Usage as u,BufferType as f,SizedStencilFormat as l,StencilAttachment as _,SizedDepthStencilFormat as d,DepthStencilAttachment as m,SizedDepthFormat as T,DepthAttachment as p}from"./enums.js";import{FBOAttachmentType as E}from"./FBOAttachmentType.js";import{Renderbuffer as x}from"./Renderbuffer.js";import{Texture as b}from"./Texture.js";const g=()=>t.getLogger("esri.views.webgl.FramebufferObject");class R{constructor(t,e,r){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const r=F(e)?e:new b(t,e);this._colorAttachments.set(n,r),this._validateTextureDescriptor(r.descriptor),this._validateColorAttachmentPoint(n)}if(null!=r)if(S(r))this._depthStencilTexture=F(r)?r:new b(t,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=A(r)?r:new x(t,r);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:r}=this;r.temporaryBindFramebufferObject(null,(()=>{this._colorAttachments.forEach(((t,e)=>this.detachColorTexture(e)?.dispose())),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),e&&(r.gl.deleteFramebuffer(e),this._glName=null)})),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){return this._colorAttachments.get(n)}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(n);return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(n);return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce(((t,[e,r])=>t+r.usedMemory),this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&F(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=n){if(!t)return;this._validateColorAttachmentPoint(e);const r=t.descriptor;this._validateTextureDescriptor(r),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=n){const e=this._colorAttachments.get(t);if(e)return this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,t)})),this._colorAttachments.delete(t),e}setColorTextureTarget(t,e=n,r=0){const i=this._colorAttachments.get(e);i&&(t===h.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(i.glName,e,o.FRAMEBUFFER,0,r):this._framebufferTexture2D(i.glName,e,t,o.FRAMEBUFFER,0))}attachDepthStencil(t){if(t)switch(t.type){case E.Texture:return this._attachDepthStencilTexture(t);case E.Renderbuffer:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:r,dataType:i}=e;r===c.DEPTH_STENCIL||r===c.DEPTH_COMPONENT?r!==c.DEPTH_STENCIL||i===a.UNSIGNED_INT_24_8?r!==c.DEPTH_COMPONENT||i===a.UNSIGNED_INT||i===a.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,O(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,(()=>{this._framebufferTexture2D(null,O(t.descriptor.pixelFormat))})),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const r=this._context.gl,i=this._getGLAttachmentPoint(e);r.framebufferRenderbuffer(o.FRAMEBUFFER,i,r.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const{_context:e}=this,r=e.getBoundFramebufferObject();e.bindFramebuffer(this);const{gl:i}=e,s=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(o.FRAMEBUFFER,s,i.RENDERBUFFER,null),e.bindFramebuffer(r)}return this._depthStencilBuffer=null,t}invalidateAttachments(t,e=!1){const r=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this,e),this._context.gl.invalidateFramebuffer(o.FRAMEBUFFER,t),this._context.bindFramebuffer(r)}copyToTexture(t,e,r,i,s,n,o){(t<0||e<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const c=o.descriptor;o.descriptor.target!==h.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(null==c?.width||null==c?.height||t+r>this.width||e+i>this.height||s+r>c.width||n+i>c.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const a=this._context,u=a.bindTexture(o,b.TEXTURE_UNIT_FOR_UPDATES);a.setActiveTexture(b.TEXTURE_UNIT_FOR_UPDATES),a.bindFramebuffer(this),a.gl.copyTexSubImage2D(h.TEXTURE_2D,0,s,n,t,e,r,i),a.bindTexture(u,b.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,r,i,s,n,h){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,r,i,s,n,h)}async readPixelsAsync(t,e,i,s,n,h,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,u.STREAM_READ,o.byteLength);this._context.bindBuffer(a);const l=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,i,s,n,h,0),this._context.unbindBuffer(f.PIXEL_PACK_BUFFER),this._context.bindFramebuffer(l),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const r={width:t,height:e};B(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach((t=>t.resize(r.width,r.height))),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(B(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=o.FRAMEBUFFER){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const r=e.createFramebuffer();if(e.bindFramebuffer(t,r),this._colorAttachments.forEach(((e,r)=>{const i=U(e);i===h.TEXTURE_2D_ARRAY?this._framebufferTextureLayer(e.glName,r,t,0,0):this._framebufferTexture2D(e.glName,r,i,t)})),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,r,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=O(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,U(this._depthStencilTexture),t)}if(i()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(t,e=n,r=h.TEXTURE_2D,i=o.FRAMEBUFFER,s=0){this._context.gl.framebufferTexture2D(i,e,r,t,s)}_framebufferTextureLayer(t,e=n,r=o.FRAMEBUFFER,i=0,s=0){this._context.gl.framebufferTextureLayer(r,e,t,i,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(o.FRAMEBUFFER,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,O(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){t.target!==h.TEXTURE_2D&&t.target!==h.TEXTURE_CUBE_MAP&&t.target!==h.TEXTURE_2D_ARRAY&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),B(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){B(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case T.DEPTH_COMPONENT16:case T.DEPTH_COMPONENT24:case T.DEPTH_COMPONENT32F:return p;case d.DEPTH24_STENCIL8:case d.DEPTH32F_STENCIL8:return m;case l.STENCIL_INDEX8:return _}}_validateColorAttachmentPoint(e){if(-1===R._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;R._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const r=e-n;r+1>R._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${R._MAX_COLOR_ATTACHMENTS} color attachments`)}}function F(t){return N(t)===E.Texture}function A(t){return N(t)===E.Renderbuffer}function S(t){return F(t)||D(t)}function D(t){return N(t)===E.TextureDescriptor}function N(t){return null!=t&&"type"in t?t.type:null}function B(t,e){const r=Math.max(t.width,t.height);if(r>e){g().warn(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const i=e/r;return t.width=Math.round(t.width*i),t.height=Math.round(t.height*i),!1}return!0}function U(t){return t.descriptor.target===h.TEXTURE_CUBE_MAP?h.TEXTURE_CUBE_MAP_POSITIVE_X:t.descriptor.target===h.TEXTURE_2D_ARRAY?h.TEXTURE_2D_ARRAY:h.TEXTURE_2D}function O(t){return t===c.DEPTH_COMPONENT?p:m}export{R as FramebufferObject,B as ensureAttachmentMaxSize};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ResourceType as e}from"./enums.js";import{GLObjectType as t}from"./GLObjectType.js";import{estimateMemory as r}from"./RenderbufferDescriptor.js";class s{constructor(r,s){this._context=r,this._descriptor=s,this.type=t.Renderbuffer,this._context.instanceCounter.increment(e.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:n,height:o,internalFormat:h,multisampled:d}=s;d?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,h,n,o):i.renderbufferStorage(i.RENDERBUFFER,h,n,o),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return r(this._descriptor)}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const s=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?s.renderbufferStorageMultisample(s.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):s.renderbufferStorage(s.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(e.Renderbuffer,this),this._context=null)}}export{s as Renderbuffer};
5
+ import{ResourceType as e}from"./enums.js";import{FBOAttachmentType as t}from"./FBOAttachmentType.js";import{estimateMemory as r}from"./RenderbufferDescriptor.js";class s{constructor(r,s){this._context=r,this._descriptor=s,this.type=t.Renderbuffer,this._context.instanceCounter.increment(e.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:n,height:o,internalFormat:h,multisampled:d}=s;d?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,h,n,o):i.renderbufferStorage(i.RENDERBUFFER,h,n,o),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return r(this._descriptor)}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const s=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?s.renderbufferStorageMultisample(s.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):s.renderbufferStorage(s.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(e.Renderbuffer,this),this._context=null)}}export{s as Renderbuffer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{GLObjectType as t}from"./GLObjectType.js";import{getBytesPerElementFormat as i}from"./Util.js";class e{constructor(i,e,r=e){this.internalFormat=i,this.width=e,this.height=r,this.objectType=t.Renderbuffer,this.multisampled=!1,this.samples=1}}function r(t){return t.width<=0||t.height<=0||null==t.internalFormat?0:t.width*t.height*i(t.internalFormat)}export{e as RenderbufferDescriptor,r as estimateMemory};
5
+ import{getBytesPerElementFormat as t}from"./Util.js";class i{constructor(t,i=0,h=i){this.internalFormat=t,this.width=i,this.height=h,this.multisampled=!1,this.samples=1}}function h(i){return i.width<=0||i.height<=0||null==i.internalFormat?0:i.width*i.height*t(i.internalFormat)}export{i as RenderbufferDescriptor,h as estimateMemory};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../core/Error.js";import"../../core/has.js";import e from"../../core/Logger.js";import{abortMaybe as i}from"../../core/maybe.js";import{isAbortError as r}from"../../core/promiseUtils.js";import{checkWebGLError as s}from"./checkWebGLError.js";import{TextureType as o,ResourceType as a,CompressedTextureFormat as n,TextureSamplingMode as p,TextureConstants as l}from"./enums.js";import{GLObjectType as m}from"./GLObjectType.js";import{estimateMemory as h}from"./TextureDescriptor.js";import{isCompressedData as d,deriveInternalFormat as c,isTexImageSource as _,is3DTarget as u,validateTexture as g,isCompressedFormat as x,getDimensions as T,calcMipmapLevels as E,isSizedPixelFormat as M,isSizedDepthFormat as A,isSizedDepthStencilFormat as f}from"./textureUtils.js";import{ValidatedTextureDescriptor as I}from"./ValidatedTextureDescriptor.js";const b=null,w=()=>e.getLogger("esri/views/webgl/Texture");let D=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,i=null,r=null){if(this.type=m.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=i;else{const r=I.validate(e,i);if(!r)throw new t("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===o.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return h(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(a.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===o.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(t,e){this._descriptor.compressionHandle=t,this._descriptor.compressionCallback=e}disableCompression(){this._descriptor.compressionHandle=null,this._descriptor.compressionCallback=null}setData(t){this.abortCompression(),!d(t)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in n&&(this._descriptor.internalFormat=void 0),this._setData(t),!d(t)&&this._descriptor.compressionHandle&&this._compressOnWorker(t)}updateData(i,r,s,o,a,n,p=0){n||w().error("An attempt to use uninitialized data!"),this._glName||w().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=c(l);const{context:m,pixelFormat:h,dataType:u,target:g,isImmutable:x}=l;if(x&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");const T=m.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+o>l.width||s+a>l.height)&&w().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=m;p&&(o&&a||w().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),E.pixelStorei(E.UNPACK_SKIP_ROWS,p)),_(n)?E.texSubImage2D(g,i,r,s,o,a,h,u,n):d(n)?E.compressedTexSubImage2D(g,i,r,s,o,a,l.internalFormat,n.levels[i]):E.texSubImage2D(g,i,r,s,o,a,h,u,n),p&&E.pixelStorei(E.UNPACK_SKIP_ROWS,0),m.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(i,r,s,o,a,n,p,l){l||w().error("An attempt to use uninitialized data!"),this._glName||w().error("An attempt to update an uninitialized texture!");const m=this._descriptor;m.internalFormat=c(m);const{context:h,pixelFormat:_,dataType:g,isImmutable:x,target:T}=m;if(x&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");u(T)||w().warn("Attempting to set 3D texture data on a non-3D texture");const E=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||o<0||r+a>m.width||s+n>m.height||o+p>m.depth)&&w().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=h;if(d(l))l=l.levels[i],M.compressedTexSubImage3D(T,i,r,s,o,a,n,p,m.internalFormat,l);else{const t=l;M.texSubImage3D(T,i,r,s,o,a,n,p,_,g,t)}h.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const i=this._descriptor;if(0===i.width||0===i.height)return;if(!i.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");i.hasMipmap=!0,this._samplingModeDirty=!0,g(i)}i.samplingMode===p.LINEAR?(this._samplingModeDirty=!0,i.samplingMode=p.LINEAR_MIPMAP_NEAREST):i.samplingMode===p.NEAREST&&(this._samplingModeDirty=!0,i.samplingMode=p.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(i.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,g(e)}e.samplingMode===p.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=p.LINEAR):e.samplingMode===p.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=p.NEAREST)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,g(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController=i(this._compressionAbortController))}_setData(i,r){const o=this._descriptor,n=o.context?.gl;if(!n)return;s(n),this._glName||(this._glName=n.createTexture(),o.context.instanceCounter.increment(a.Texture,this)),g(o);const p=o.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);o.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),s(n);const l=r??o.target,m=u(l);if(_(i))this._setDataFromTexImageSource(i,l);else{const{width:e,height:r,depth:a}=o;if(null==e||null==r)throw new t("texture:missing-size","Width and height must be specified!");if(m&&null==a)throw new t("texture:missing-depth","Depth must be specified!");if(o.internalFormat=c(o),o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,o.internalFormat,o.hasMipmap,e,r,a),d(i)){if(!x(o.internalFormat))throw new t("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(i,o.internalFormat,l)}else this._texImage(l,0,o.internalFormat,e,r,a,i),s(n),o.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),s(n),o.context.bindTexture(p,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(t=null){for(let e=o.TEXTURE_CUBE_MAP_POSITIVE_X;e<=o.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_setDataFromTexImageSource(t,e){const{gl:i}=this._descriptor.context,r=this._descriptor;r.internalFormat=c(r);const o=u(e),{width:a,height:n,depth:p}=T(t);r.width&&r.height,r.width||(r.width=a),r.height||(r.height=n),o&&r.depth,o&&(r.depth=p),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(e,r.internalFormat,r.hasMipmap,a,n,p),this._texImage(e,0,r.internalFormat,a,n,p,t),s(i),r.hasMipmap&&(this.generateMipmap(),s(i))}_setDataFromCompressedSource(t,e,i){const r=this._descriptor,{width:s,height:o,depth:a}=r,n=t.levels,p=E(i,s,o,a),m=Math.min(p,n.length)-1;this._descriptor.context.gl.texParameteri(r.target,l.MAX_LEVEL,m),this._forEachMipmapLevel(((t,r,s,o)=>{const a=n[Math.min(t,n.length-1)];this._compressedTexImage(i,t,e,r,s,o,a)}),m)}_texStorage(e,i,r,s,o,a){const{gl:n}=this._descriptor.context;if(!M(i)&&!A(i)&&!f(i))throw new t("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const p=r?E(e,s,o,a):1;if(u(e)){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");n.texStorage3D(e,p,i,s,o,a)}else n.texStorage2D(e,p,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=u(e),{isImmutable:m,pixelFormat:h,dataType:d}=this._descriptor;if(m){if(null!=n){const r=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texSubImage3D(e,i,0,0,0,s,o,a,h,d,r)}else p.texSubImage2D(e,i,0,0,s,o,h,d,r)}}else{const m=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texImage3D(e,i,r,s,o,a,0,h,d,m)}else p.texImage2D(e,i,r,s,o,0,h,d,m)}}_compressedTexImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=u(e);if(this._descriptor.isImmutable){if(null!=n)if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexSubImage3D(e,i,0,0,0,s,o,a,r,n)}else p.compressedTexSubImage2D(e,i,0,0,s,o,r,n)}else if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexImage3D(e,i,r,s,o,a,0,n)}else p.compressedTexImage2D(e,i,r,s,o,0,n)}async _compressOnWorker(t){if(!e.compressionWorkerHandle||!e.compressionWorkerHandle.isCompressible(t))return;const i=!!this._descriptor.context.capabilities.compressedTextureETC,s=!!this._descriptor.context.capabilities.compressedTextureS3TC;if(i||s){const o=new AbortController;this._compressionAbortController=o;const a=this._descriptor.compressionHandle;a.increment();const n=this._descriptor.compressionCallback,p={data:await createImageBitmap(t,{imageOrientation:this.descriptor.flipped?"flipY":"none"}),width:t.width,height:t.height,premultiplyAlpha:this._descriptor.preMultiplyAlpha,hasMipmap:this._descriptor.hasMipmap,hasETC:!!i,hasS3TC:!!s};e.compressionWorkerHandle.invoke(p,this._compressionAbortController.signal).then((t=>{t&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=t.internalFormat,this._setData(t.compressedTexture),n?.()),o===this._compressionAbortController&&(this._compressionAbortController=null),a.decrement()})).catch((t=>{r(t)||o!==this._compressionAbortController||(this._compressionAbortController=null),a.decrement()}))}}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:a,hasMipmap:n,target:p}=this._descriptor;const l=p===o.TEXTURE_3D;if(null==r||null==s||l&&null==a)throw new t("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,a),n&&(1!==r||1!==s||l&&1!==a)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),l&&(a=Math.max(1,a>>1))}_applySamplingMode(){const t=this._descriptor,e=t.context?.gl;let i=t.samplingMode,r=t.samplingMode;i===p.LINEAR_MIPMAP_NEAREST||i===p.LINEAR_MIPMAP_LINEAR?(i=p.LINEAR,t.hasMipmap||(r=p.LINEAR)):i!==p.NEAREST_MIPMAP_NEAREST&&i!==p.NEAREST_MIPMAP_LINEAR||(i=p.NEAREST,t.hasMipmap||(r=p.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,i),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,r)}_applyWrapMode(){const t=this._descriptor,e=t.context?.gl;"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}_applyAnisotropicFilteringParameters(){const t=this._descriptor,e=t.context.capabilities.textureFilterAnisotropic;if(!e)return;t.context.gl.texParameterf(t.target,e.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}};export{D as Texture,b as tracer};
5
+ import t from"../../core/Error.js";import"../../core/has.js";import e from"../../core/Logger.js";import{abortMaybe as i}from"../../core/maybe.js";import{isAbortError as r}from"../../core/promiseUtils.js";import{checkWebGLError as s}from"./checkWebGLError.js";import{TextureType as o,ResourceType as a,CompressedTextureFormat as n,TextureSamplingMode as p,TextureConstants as l}from"./enums.js";import{FBOAttachmentType as m}from"./FBOAttachmentType.js";import{estimateMemory as h}from"./TextureDescriptor.js";import{isCompressedData as d,deriveInternalFormat as c,isTexImageSource as _,is3DTarget as u,validateTexture as g,isCompressedFormat as x,getDimensions as T,calcMipmapLevels as E,isSizedPixelFormat as M,isSizedDepthFormat as A,isSizedDepthStencilFormat as f}from"./textureUtils.js";import{ValidatedTextureDescriptor as I}from"./ValidatedTextureDescriptor.js";const b=null,w=()=>e.getLogger("esri/views/webgl/Texture");let D=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,i=null,r=null){if(this.type=m.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=i;else{const r=I.validate(e,i);if(!r)throw new t("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===o.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return h(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}get isCompressing(){return null!==this._compressionAbortController}dispose(){this.abortCompression(),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.instanceCounter.decrement(a.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===o.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(t,e){this._descriptor.compressionHandle=t,this._descriptor.compressionCallback=e}disableCompression(){this._descriptor.compressionHandle=null,this._descriptor.compressionCallback=null}setData(t){this.abortCompression(),!d(t)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in n&&(this._descriptor.internalFormat=void 0),this._setData(t),!d(t)&&this._descriptor.compressionHandle&&this._compressOnWorker(t)}updateData(i,r,s,o,a,n,p=0){n||w().error("An attempt to use uninitialized data!"),this._glName||w().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=c(l);const{context:m,pixelFormat:h,dataType:u,target:g,isImmutable:x}=l;if(x&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");const T=m.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+o>l.width||s+a>l.height)&&w().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=m;p&&(o&&a||w().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),E.pixelStorei(E.UNPACK_SKIP_ROWS,p)),_(n)?E.texSubImage2D(g,i,r,s,o,a,h,u,n):d(n)?E.compressedTexSubImage2D(g,i,r,s,o,a,l.internalFormat,n.levels[i]):E.texSubImage2D(g,i,r,s,o,a,h,u,n),p&&E.pixelStorei(E.UNPACK_SKIP_ROWS,0),m.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(i,r,s,o,a,n,p,l){l||w().error("An attempt to use uninitialized data!"),this._glName||w().error("An attempt to update an uninitialized texture!");const m=this._descriptor;m.internalFormat=c(m);const{context:h,pixelFormat:_,dataType:g,isImmutable:x,target:T}=m;if(x&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");u(T)||w().warn("Attempting to set 3D texture data on a non-3D texture");const E=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||o<0||r+a>m.width||s+n>m.height||o+p>m.depth)&&w().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=h;if(d(l))l=l.levels[i],M.compressedTexSubImage3D(T,i,r,s,o,a,n,p,m.internalFormat,l);else{const t=l;M.texSubImage3D(T,i,r,s,o,a,n,p,_,g,t)}h.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const i=this._descriptor;if(0===i.width||0===i.height)return;if(!i.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");i.hasMipmap=!0,this._samplingModeDirty=!0,g(i)}i.samplingMode===p.LINEAR?(this._samplingModeDirty=!0,i.samplingMode=p.LINEAR_MIPMAP_NEAREST):i.samplingMode===p.NEAREST&&(this._samplingModeDirty=!0,i.samplingMode=p.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(i.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,g(e)}e.samplingMode===p.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=p.LINEAR):e.samplingMode===p.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=p.NEAREST)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,g(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1)}abortCompression(){this.isCompressing&&(this._compressionAbortController=i(this._compressionAbortController))}_setData(i,r){const o=this._descriptor,n=o.context?.gl;if(!n)return;s(n),this._glName||(this._glName=n.createTexture(),o.context.instanceCounter.increment(a.Texture,this)),g(o);const p=o.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);o.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),s(n);const l=r??o.target,m=u(l);if(_(i))this._setDataFromTexImageSource(i,l);else{const{width:e,height:r,depth:a}=o;if(null==e||null==r)throw new t("texture:missing-size","Width and height must be specified!");if(m&&null==a)throw new t("texture:missing-depth","Depth must be specified!");if(o.internalFormat=c(o),o.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,o.internalFormat,o.hasMipmap,e,r,a),d(i)){if(!x(o.internalFormat))throw new t("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(i,o.internalFormat,l)}else this._texImage(l,0,o.internalFormat,e,r,a,i),s(n),o.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),s(n),o.context.bindTexture(p,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(t=null){for(let e=o.TEXTURE_CUBE_MAP_POSITIVE_X;e<=o.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_setDataFromTexImageSource(t,e){const{gl:i}=this._descriptor.context,r=this._descriptor;r.internalFormat=c(r);const o=u(e),{width:a,height:n,depth:p}=T(t);r.width&&r.height,r.width||(r.width=a),r.height||(r.height=n),o&&r.depth,o&&(r.depth=p),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(e,r.internalFormat,r.hasMipmap,a,n,p),this._texImage(e,0,r.internalFormat,a,n,p,t),s(i),r.hasMipmap&&(this.generateMipmap(),s(i))}_setDataFromCompressedSource(t,e,i){const r=this._descriptor,{width:s,height:o,depth:a}=r,n=t.levels,p=E(i,s,o,a),m=Math.min(p,n.length)-1;this._descriptor.context.gl.texParameteri(r.target,l.MAX_LEVEL,m),this._forEachMipmapLevel(((t,r,s,o)=>{const a=n[Math.min(t,n.length-1)];this._compressedTexImage(i,t,e,r,s,o,a)}),m)}_texStorage(e,i,r,s,o,a){const{gl:n}=this._descriptor.context;if(!M(i)&&!A(i)&&!f(i))throw new t("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const p=r?E(e,s,o,a):1;if(u(e)){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");n.texStorage3D(e,p,i,s,o,a)}else n.texStorage2D(e,p,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=u(e),{isImmutable:m,pixelFormat:h,dataType:d}=this._descriptor;if(m){if(null!=n){const r=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texSubImage3D(e,i,0,0,0,s,o,a,h,d,r)}else p.texSubImage2D(e,i,0,0,s,o,h,d,r)}}else{const m=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texImage3D(e,i,r,s,o,a,0,h,d,m)}else p.texImage2D(e,i,r,s,o,0,h,d,m)}}_compressedTexImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=u(e);if(this._descriptor.isImmutable){if(null!=n)if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexSubImage3D(e,i,0,0,0,s,o,a,r,n)}else p.compressedTexSubImage2D(e,i,0,0,s,o,r,n)}else if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexImage3D(e,i,r,s,o,a,0,n)}else p.compressedTexImage2D(e,i,r,s,o,0,n)}async _compressOnWorker(t){if(!e.compressionWorkerHandle||!e.compressionWorkerHandle.isCompressible(t))return;const i=!!this._descriptor.context.capabilities.compressedTextureETC,s=!!this._descriptor.context.capabilities.compressedTextureS3TC;if(i||s){const o=new AbortController;this._compressionAbortController=o;const a=this._descriptor.compressionHandle;a.increment();const n=this._descriptor.compressionCallback,p={data:await createImageBitmap(t,{imageOrientation:this.descriptor.flipped?"flipY":"none"}),width:t.width,height:t.height,premultiplyAlpha:this._descriptor.preMultiplyAlpha,hasMipmap:this._descriptor.hasMipmap,hasETC:!!i,hasS3TC:!!s};e.compressionWorkerHandle.invoke(p,this._compressionAbortController.signal).then((t=>{t&&this.isCompressing&&this.glName&&(this._descriptor.internalFormat=t.internalFormat,this._setData(t.compressedTexture),n?.()),o===this._compressionAbortController&&(this._compressionAbortController=null),a.decrement()})).catch((t=>{r(t)||o!==this._compressionAbortController||(this._compressionAbortController=null),a.decrement()}))}}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:a,hasMipmap:n,target:p}=this._descriptor;const l=p===o.TEXTURE_3D;if(null==r||null==s||l&&null==a)throw new t("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,a),n&&(1!==r||1!==s||l&&1!==a)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),l&&(a=Math.max(1,a>>1))}_applySamplingMode(){const t=this._descriptor,e=t.context?.gl;let i=t.samplingMode,r=t.samplingMode;i===p.LINEAR_MIPMAP_NEAREST||i===p.LINEAR_MIPMAP_LINEAR?(i=p.LINEAR,t.hasMipmap||(r=p.LINEAR)):i!==p.NEAREST_MIPMAP_NEAREST&&i!==p.NEAREST_MIPMAP_LINEAR||(i=p.NEAREST,t.hasMipmap||(r=p.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,i),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,r)}_applyWrapMode(){const t=this._descriptor,e=t.context?.gl;"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}_applyAnisotropicFilteringParameters(){const t=this._descriptor,e=t.context.capabilities.textureFilterAnisotropic;if(!e)return;t.context.gl.texParameterf(t.target,e.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}};export{D as Texture,b as tracer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{TextureType as t,PixelFormat as i,PixelType as h,TextureSamplingMode as s,TextureWrapMode as e}from"./enums.js";import{GLObjectType as p}from"./GLObjectType.js";import{getBytesPerElementFormat as r}from"./Util.js";class a{constructor(r=0,a=r){this.width=r,this.height=a,this.objectType=p.Texture,this.target=t.TEXTURE_2D,this.pixelFormat=i.RGBA,this.dataType=h.UNSIGNED_BYTE,this.samplingMode=s.LINEAR,this.wrapMode=e.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function o(i){return i.width<=0||i.height<=0||i.depth<=0?0:Math.round(i.width*i.height*i.depth*(i.hasMipmap?4/3:1)*(null==i.internalFormat?4:r(i.internalFormat))*(i.target===t.TEXTURE_CUBE_MAP?6:1))}export{a as TextureDescriptor,o as estimateMemory};
5
+ import{TextureType as t,PixelFormat as i,PixelType as h,TextureSamplingMode as s,TextureWrapMode as e}from"./enums.js";import{FBOAttachmentType as p}from"./FBOAttachmentType.js";import{getBytesPerElementFormat as r}from"./Util.js";class a{constructor(r=0,a=r){this.width=r,this.height=a,this.type=p.TextureDescriptor,this.target=t.TEXTURE_2D,this.pixelFormat=i.RGBA,this.dataType=h.UNSIGNED_BYTE,this.samplingMode=s.LINEAR,this.wrapMode=e.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function o(i){return i.width<=0||i.height<=0||i.depth<=0?0:Math.round(i.width*i.height*i.depth*(i.hasMipmap?4/3:1)*(null==i.internalFormat?4:r(i.internalFormat))*(i.target===t.TEXTURE_CUBE_MAP?6:1))}export{a as TextureDescriptor,o as estimateMemory};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Viewpoint.js";import o from"../core/JSONSupport.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as r}from"../core/accessorSupport/decorators/subclass.js";import n from"../geometry/SpatialReference.js";import{timeExtent as s}from"../webdoc/support/timeProperties.js";import p from"./Environment.js";var l;let c=l=class extends o{constructor(e){super(e),this.environment=new p,this.spatialReference=null,this.viewpoint=null,this.timeExtent=null}set viewingMode(e){this._set("viewingMode",e)}clone(){return new l({environment:this.environment.clone(),spatialReference:this.spatialReference?.clone()??null,viewingMode:this.viewingMode,viewpoint:this.viewpoint?.clone()??null,timeExtent:this.timeExtent?.clone()??null})}};e([i({type:p,json:{write:{isRequired:!0}}})],c.prototype,"environment",void 0),e([i({type:n})],c.prototype,"spatialReference",void 0),e([i({type:["local","global"]})],c.prototype,"viewingMode",null),e([i({type:t,json:{write:{isRequired:!0}}})],c.prototype,"viewpoint",void 0),e([i(s)],c.prototype,"timeExtent",void 0),c=l=e([r("esri.webscene.InitialViewProperties")],c);const m=c;export{m as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import o from"../Viewpoint.js";import t from"../core/Clonable.js";import r from"../core/JSONSupport.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import p from"../geometry/SpatialReference.js";import{timeExtent as n}from"../webdoc/support/timeProperties.js";import a from"./Environment.js";import{WebSceneAnalysesCollection as l,webSceneAnalysisCollectionProperty as m}from"./support/analysisUtils.js";let c=class extends(t.ClonableMixin(r)){constructor(e){super(e),this.analyses=new l,this.environment=new a,this.spatialReference=null,this.viewpoint=null,this.timeExtent=null}set viewingMode(e){this._set("viewingMode",e)}};e([s(m("analyses"))],c.prototype,"analyses",void 0),e([s({type:a,json:{write:{isRequired:!0}}})],c.prototype,"environment",void 0),e([s({type:p,json:{default:()=>p.WebMercator}})],c.prototype,"spatialReference",void 0),e([s({type:["local","global"],json:{default:"global"}})],c.prototype,"viewingMode",null),e([s({type:o,json:{write:{isRequired:!0}}})],c.prototype,"viewpoint",void 0),e([s(n)],c.prototype,"timeExtent",void 0),c=e([i("esri.webscene.InitialViewProperties")],c);const d=c;export{d as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"../chunks/tslib.es6.js";import o from"../core/Collection.js";import{referenceSetter as e,castForReferenceSetter as r}from"../core/collectionUtils.js";import t from"../core/JSONSupport.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import{cast as c}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import p from"./Slide.js";const n=o.ofType(p);let m=class extends t{constructor(s){super(s),this.slides=new n}destroy(){this.slides.forEach((s=>s.destroy())),this.slides.removeAll()}set slides(s){s&&(s=s.filter((s=>!!s.viewpoint))),this._set("slides",e(s,this._get("slides"),n))}clone(){return new(0,this.constructor)({slides:this.slides.clone()})}};s([i({type:n,nonNullable:!0,json:{write:!0}}),c(r)],m.prototype,"slides",null),m=s([l("esri.webscene.Presentation")],m);const d=m;export{d as default};
5
+ import{_ as o}from"../chunks/tslib.es6.js";import s from"../core/Clonable.js";import r from"../core/Collection.js";import{referenceSetter as e,castForReferenceSetter as t}from"../core/collectionUtils.js";import i from"../core/JSONSupport.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import{cast as l}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import m from"./Slide.js";const n=r.ofType(m);let a=class extends(s.ClonableMixin(i)){constructor(o){super(o),this.slides=new n}destroy(){this.slides.forEach((o=>o.destroy())),this.slides.removeAll()}set slides(o){o&&(o=o.filter((o=>!!o.viewpoint))),this._set("slides",e(o,this._get("slides"),n))}};o([c({type:n,nonNullable:!0,json:{write:!0}}),l(t)],a.prototype,"slides",null),a=o([p("esri.webscene.Presentation")],a);const d=a;export{d as default};
package/webscene/Slide.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Basemap.js";import i from"../Viewpoint.js";import{result as n}from"../core/asyncUtils.js";import r from"../core/Clonable.js";import o from"../core/Collection.js";import{referenceSetter as s}from"../core/collectionUtils.js";import a from"../core/JSONSupport.js";import l from"../core/Logger.js";import{moduloPositive as p}from"../core/mathUtils.js";import{destroyMaybe as m,removeMaybe as c}from"../core/maybe.js";import{onAbortOrThrow as h,createAbortError as d,isAbortError as u}from"../core/promiseUtils.js";import{whenOnce as y,when as g}from"../core/reactiveUtils.js";import{property as v}from"../core/accessorSupport/decorators/property.js";import{cast as b}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as w}from"../core/accessorSupport/ensureType.js";import{s as T}from"../chunks/vec32.js";import{create as j}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import _ from"../layers/Layer.js";import{basemapEnsureType as L,clonePreservingTiledLayers as C}from"../support/basemapEnsureType.js";import{TaskPriority as E}from"../views/support/Scheduler.js";import{SlideThumbnail as S}from"../webdoc/support/SlideThumbnail.js";import{timeExtent as k}from"../webdoc/support/timeProperties.js";import A from"./SunLighting.js";import V from"./VirtualLighting.js";import U from"./support/Description.js";import x from"./support/SlideElements.js";import{SlideEnvironment as I}from"./support/SlideEnvironment.js";import D from"./support/SlideGround.js";import{SlideVisibleLayer as F}from"./support/SlideVisibleLayer.js";import R from"./support/Title.js";let M=0;const P=o.ofType(F),q=["caption","cover","none"];let B=class extends(r.ClonableMixin(a)){constructor(e){super(e),this.id=Date.now().toString(16)+"-slide-"+M++,this.title=new R,this.description=new U,this.hidden=!1,this.thumbnail=new S,this.viewpoint=null,this.basemap=null,this.ground=null,this.layout="caption",this.environment=new I,this.timeExtent=null,this.elements=null,this.visibleLayers=new P}destroy(){this.visibleLayers.removeAll(),this.basemap=null,this.thumbnail=m(this.thumbnail),this.description=null,this.title=null,this.thumbnail=null,this.elements=null}castTitle(e){return"string"==typeof e?new R({text:e}):w(R,e)}castDescription(e){return"string"==typeof e?new U({text:e}):w(U,e)}castThumbnail(e){return"string"==typeof e?new S({url:e}):w(S,e)}castBasemap(e){return L(e)}set visibleLayers(e){this._set("visibleLayers",s(e,this._get("visibleLayers"),P))}castVisibleLayers(e){return e&&"function"==typeof e.map?e.map((e=>{if("string"==typeof e)return{id:e};if(e instanceof _){const t=N(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:"sublayerIds"in e?e.sublayerIds:void 0}:(l.getLogger(this).warn('Invalid visible layer, expected { id }, Layer or "id"'),e)})):null}async _updateVisibleLayersFrom(e){const t=[];await Promise.allSettled(this._getLayers(e.map).map((i=>e.whenLayerView(i).then((e=>{if(e.visible){const n=N(i);t.push(new F({id:e.layer.id,sublayerIds:n}))}})))).toArray()),this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}_updateFocusAreaIDs(e){if(e){this.enabledFocusAreas=[];for(const t of e)t.enabled&&this.enabledFocusAreas.push(t.id)}}updateFrom(e,t){const i={format:"png",quality:80,width:120,height:75,disableDecorations:!0,...t?.screenshot};return e.when((()=>(this.viewpoint=e.viewpoint.clone(),this.environment.lighting="virtual"===e.environment.lighting.type?V.prototype.clone.apply(e.environment.lighting):A.prototype.clone.apply(e.environment.lighting),this.environment.weather=e.environment.weather.clone(),this._updateFocusAreaIDs(e.focusAreas?.areas),this.basemap=e.map.basemap?.clone()||null,this.ground=e.map.ground?D.fromGround(e.map.ground):null,this.timeExtent=e.timeExtent?.clone()??null,this._updateVisibleLayersFrom(e)))).then((()=>e.takeScreenshot(i))).then((e=>(this.thumbnail=new S({url:e.dataUrl}),this)))}async applyTo(e,t){null!=this._applyToController&&this._applyToController.abort();let i=new AbortController;this._applyToController=i;const r=h(t,(()=>i?.abort())),o=()=>{this._applyToController===i&&(this._applyToController=null),i=null,r?.remove()};try{await y((()=>e.ready),i.signal)}catch(c){throw o(),c}if(i.signal.aborted)throw o(),d();const s=e.resourceController.scheduler.registerTask(E.SLIDE);let a=!1;const l={animate:!0,...t,signal:this._applyToController.signal},p=async()=>{await Promise.all([s.schedule((async()=>a=await this._setViewpointOfInterest(e,l))),s.schedule((()=>this._applyBasemap(e,l)),l.signal),s.schedule((()=>this._loadLayersWithSublayerVisibility(e)))]),await Promise.all([s.schedule((()=>this._applyLayerVisibility(e)),l.signal),s.schedule((()=>this._applyGround(e)),l.signal),s.schedule((()=>this._applyViewpoint(e,l)),l.signal),s.schedule((()=>e.timeExtent=this.timeExtent?.clone()??null),l.signal),s.schedule((()=>e.environment.weather=this.environment.weather.clone())),s.schedule((()=>this._applyFocusAreaIDs(e.focusAreas?.areas)))])},m=await n(e.addUpdatingPromise(p()));if(a&&(e.contentCamera=null),s.remove(),o(),!1===m.ok)throw m.error;return this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(i){if(u(i))throw i}e.map.basemap=C(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_applyFocusAreaIDs(e){if(e)for(const t of e)t.enabled=this.enabledFocusAreas?.includes(t.id)??!1}_getLayers(e){const t=new o;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach((e=>{e.persistenceEnabled&&(t.add(e),"layers"in e&&this._collectLayers(e,t))}))}async _loadLayersWithSublayerVisibility(e){this.visibleLayers&&await Promise.allSettled(this._getLayers(e.map).items.map((e=>{const t=this.visibleLayers.find((t=>t.id===e.id))?.sublayerIds;return t?e.load():null})))}_applyLayerVisibility(e){if(!this.visibleLayers)return;this._getLayers(e.map).forEach((e=>{const t=this.visibleLayers.find((t=>t.id===e.id));e.visible=null!=t;const i=t?.sublayerIds,n=G(e);i&&n&&n.forEach((e=>e.visible=i.includes(e.id)))}))}async _setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t?.ignoreViewpoint||!t?.useDestinationCamera)return!1;const{toCameraAsync:i}=await import("../views/3d/support/viewpointUtils.js"),n=await i(e,this.viewpoint);return e.contentCamera=n,null!=n}async _applyViewpoint(e,t){if(this._applyCachedCameraTrackingEnabled(e),this.viewpoint&&!t.ignoreViewpoint){const i=this.environment.lighting;if(t.animate&&"sun"===i.type&&i.date)return this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(i.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let i=null;"virtual"!==e.environment.lighting.type&&"virtual"!==this.environment.lighting.type&&("global"===e.viewingMode&&(i=this._animateLightingWithCamera(e,e.environment.lighting,this.environment.lighting)),e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1),e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,"virtual"===this.environment.lighting.type||"virtual"===e.environment.lighting.type?(e.environment.applyLighting(this.environment.lighting.clone()),"virtual"!==e.environment.lighting.type&&(e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1)):null!=this.environment.lighting.displayUTCOffset&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset);return e.goTo(this.viewpoint,t).then((()=>{this._applyCachedCameraTrackingEnabled(e),e.environment.applyLighting(this.environment.lighting.clone())})).catch((t=>{throw null==e.animation&&this._applyCachedCameraTrackingEnabled(e),t})).finally((()=>{c(i)}))}_applyCachedCameraTrackingEnabled(e){null!=e.environment.cachedCameraTrackingEnabled&&(e.environment.lighting.cameraTrackingEnabled=e.environment.cachedCameraTrackingEnabled,e.environment.cachedCameraTrackingEnabled=null)}_getTime(e){return[e.getTime(),3600*e.getUTCHours()+60*e.getUTCMinutes()+e.getUTCSeconds()]}_setTime(e,t,i){return e.setTime(t),e.setUTCHours(i/3600),e.setUTCMinutes(i%3600/60),e.setUTCSeconds(i%3600%60),e}_animateLightingWithCamera(e,t,i){const n=new Date(t.date.toString()),[r,o]=this._getTime(n),[s,a]=this._getTime(i.date),l=J(o,a),p=e.renderCoordsHelper,m=j();p.toRenderCoords(e.camera.position,m);const c=j(),h=j();null!=this.viewpoint.camera&&p.toRenderCoords(this.viewpoint.camera.position,c);const d=new Date;return g((()=>e.camera),(e=>{p.toRenderCoords(e.position,h);const i=T(m,h),n=T(c,h);let a=0;i+n!==0&&(a=i/(i+n));const u=r+(s-r)*a,y=z(o,l*a);t.date=this._setTime(d,u,y)}))}static createFrom(e,t){return(new this).updateFrom(e,t)}};e([v({type:String,json:{write:{isRequired:!0}}})],B.prototype,"id",void 0),e([v({type:R,json:{default:()=>new R({text:""}),write:{isRequired:!0}}})],B.prototype,"title",void 0),e([b("title")],B.prototype,"castTitle",null),e([v({type:U,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.text)})}}})],B.prototype,"description",void 0),e([b("description")],B.prototype,"castDescription",null),e([v({type:Boolean,nonNullable:!0,json:{write:!0,default:!1}})],B.prototype,"hidden",void 0),e([v({type:S,json:{default:()=>new S({url:""}),write:{isRequired:!0}}})],B.prototype,"thumbnail",void 0),e([b("thumbnail")],B.prototype,"castThumbnail",null),e([v({type:i,nonNullable:!0,json:{write:{isRequired:!0}}})],B.prototype,"viewpoint",void 0),e([v({type:t,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],B.prototype,"basemap",void 0),e([b("basemap")],B.prototype,"castBasemap",null),e([v({type:D,json:{write:!0}})],B.prototype,"ground",void 0),e([v({type:q,json:{write:!0,default:"caption"},nonNullable:!0})],B.prototype,"layout",void 0),e([v({type:P,json:{write:{isRequired:!0}}})],B.prototype,"visibleLayers",null),e([b("visibleLayers")],B.prototype,"castVisibleLayers",null),e([v({type:I,json:{write:!0}})],B.prototype,"environment",void 0),e([v({type:[String],json:{write:!1}})],B.prototype,"enabledFocusAreas",void 0),e([v(k)],B.prototype,"timeExtent",void 0),e([v({type:x,json:{write:!0}})],B.prototype,"elements",void 0),B=e([f("esri.webscene.Slide")],B);const O=B;function G(e){if("building-scene"===e.type||"map-image"===e.type)return e.allSublayers.toArray()}function N(e){const t=G(e);if(t)return t.filter((e=>e.visible)).map((e=>e.id))}const W=86400,H=43200;function J(e,t){let i=t-e;return i>H&&(i-=W),i<-43200&&(i+=W),i}function z(e,t){return p(e+t,W)}export{O as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Basemap.js";import i from"../Viewpoint.js";import{result as n}from"../core/asyncUtils.js";import r from"../core/Clonable.js";import s from"../core/Collection.js";import{referenceSetter as o}from"../core/collectionUtils.js";import a from"../core/JSONSupport.js";import l from"../core/Logger.js";import{moduloPositive as p}from"../core/mathUtils.js";import{destroyMaybe as m,removeMaybe as c}from"../core/maybe.js";import{onAbortOrThrow as h,createAbortError as d,isAbortError as u}from"../core/promiseUtils.js";import{whenOnce as y,when as g}from"../core/reactiveUtils.js";import{property as b}from"../core/accessorSupport/decorators/property.js";import{cast as v}from"../core/accessorSupport/decorators/cast.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as w}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as f}from"../core/accessorSupport/ensureType.js";import{s as T}from"../chunks/vec32.js";import{create as j}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import _ from"../layers/Layer.js";import{basemapEnsureType as L,clonePreservingTiledLayers as C}from"../support/basemapEnsureType.js";import{TaskPriority as E}from"../views/support/Scheduler.js";import{SlideThumbnail as S}from"../webdoc/support/SlideThumbnail.js";import{timeExtent as k}from"../webdoc/support/timeProperties.js";import A from"./SunLighting.js";import V from"./VirtualLighting.js";import U from"./support/Description.js";import x from"./support/SlideElements.js";import{SlideEnvironment as I}from"./support/SlideEnvironment.js";import F from"./support/SlideGround.js";import{SlideVisibleLayer as D}from"./support/SlideVisibleLayer.js";import R from"./support/Title.js";let M=0;const O=s.ofType(D),P=["caption","cover","none"];let q=class extends(r.ClonableMixin(a)){constructor(e){super(e),this.id=Date.now().toString(16)+"-slide-"+M++,this.title=new R,this.description=new U,this.hidden=!1,this.thumbnail=new S,this.viewpoint=null,this.basemap=null,this.ground=null,this.layout="caption",this.environment=new I,this.timeExtent=null,this.elements=new x,this.visibleLayers=new O}destroy(){this.visibleLayers.removeAll(),this.basemap=null,this.thumbnail=m(this.thumbnail),this.description=null,this.title=null,this.thumbnail=null,this.elements=null}castTitle(e){return"string"==typeof e?new R({text:e}):f(R,e)}castDescription(e){return"string"==typeof e?new U({text:e}):f(U,e)}castThumbnail(e){return"string"==typeof e?new S({url:e}):f(S,e)}castBasemap(e){return L(e)}set visibleLayers(e){this._set("visibleLayers",o(e,this._get("visibleLayers"),O))}castVisibleLayers(e){return e&&"function"==typeof e.map?e.map((e=>{if("string"==typeof e)return{id:e};if(e instanceof _){const t=N(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:"sublayerIds"in e?e.sublayerIds:void 0}:(l.getLogger(this).warn('Invalid visible layer, expected { id }, Layer or "id"'),e)})):null}async _updateVisibleLayersFrom(e){const t=[];await Promise.allSettled(this._getLayers(e.map).map((i=>e.whenLayerView(i).then((e=>{if(e.visible){const n=N(i);t.push(new D({id:e.layer.id,sublayerIds:n}))}})))).toArray()),this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}_updateFocusAreaIDs(e){if(e){this.enabledFocusAreas=[];for(const t of e)t.enabled&&this.enabledFocusAreas.push(t.id)}}async updateFrom(e,t){const i={format:"png",quality:80,width:120,height:75,disableDecorations:!0,...t?.screenshot};await e.when(),this.viewpoint=e.viewpoint.clone(),this.environment.lighting="virtual"===e.environment.lighting.type?V.prototype.clone.apply(e.environment.lighting):A.prototype.clone.apply(e.environment.lighting),this.environment.weather=e.environment.weather.clone(),this._updateFocusAreaIDs(e.focusAreas?.areas),this.basemap=e.map.basemap?.clone()||null,this.ground=e.map.ground?F.fromGround(e.map.ground):null,this.timeExtent=e.timeExtent?.clone()??null,this.elements.analyses.updateFrom(e),await this._updateVisibleLayersFrom(e);const n=await e.takeScreenshot(i);return this.thumbnail=new S({url:n.dataUrl}),this}async applyTo(e,t){null!=this._applyToController&&this._applyToController.abort();let i=new AbortController;this._applyToController=i;const r=h(t,(()=>i?.abort())),s=()=>{this._applyToController===i&&(this._applyToController=null),i=null,r?.remove()};try{await y((()=>e.ready),i.signal)}catch(c){throw s(),c}if(i.signal.aborted)throw s(),d();const o=e.resourceController.scheduler.registerTask(E.SLIDE);let a=!1;const l={animate:!0,...t,signal:this._applyToController.signal},p=async()=>{await Promise.all([o.schedule((async()=>a=await this._setViewpointOfInterest(e,l))),o.schedule((()=>this._applyBasemap(e,l)),l.signal),o.schedule((()=>this._loadLayersWithSublayerVisibility(e)))]),await Promise.all([o.schedule((()=>this._applyLayerVisibility(e)),l.signal),o.schedule((()=>this._applyGround(e)),l.signal),o.schedule((()=>this.elements.analyses.applyTo(e)),l.signal),o.schedule((()=>this._applyViewpoint(e,l)),l.signal),o.schedule((()=>e.timeExtent=this.timeExtent?.clone()??null),l.signal),o.schedule((()=>e.environment.weather=this.environment.weather.clone())),o.schedule((()=>this._applyFocusAreaIDs(e.focusAreas?.areas)))])},m=await n(e.addUpdatingPromise(p()));if(a&&(e.contentCamera=null),o.remove(),s(),!1===m.ok)throw m.error;return this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(i){if(u(i))throw i}e.map.basemap=C(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_applyFocusAreaIDs(e){if(e)for(const t of e)t.enabled=this.enabledFocusAreas?.includes(t.id)??!1}_getLayers(e){const t=new s;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach((e=>{e.persistenceEnabled&&(t.add(e),"layers"in e&&this._collectLayers(e,t))}))}async _loadLayersWithSublayerVisibility(e){this.visibleLayers&&await Promise.allSettled(this._getLayers(e.map).items.map((e=>{const t=this.visibleLayers.find((t=>t.id===e.id))?.sublayerIds;return t?e.load():null})))}_applyLayerVisibility(e){if(!this.visibleLayers)return;this._getLayers(e.map).forEach((e=>{const t=this.visibleLayers.find((t=>t.id===e.id));e.visible=null!=t;const i=t?.sublayerIds,n=G(e);i&&n&&n.forEach((e=>e.visible=i.includes(e.id)))}))}async _setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t?.ignoreViewpoint||!t?.useDestinationCamera)return!1;const{toCameraAsync:i}=await import("../views/3d/support/viewpointUtils.js"),n=await i(e,this.viewpoint);return e.contentCamera=n,null!=n}async _applyViewpoint(e,t){if(this._applyCachedCameraTrackingEnabled(e),this.viewpoint&&!t.ignoreViewpoint){const i=this.environment.lighting;if(t.animate&&"sun"===i.type&&i.date)return this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(i.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let i=null;"virtual"!==e.environment.lighting.type&&"virtual"!==this.environment.lighting.type&&("global"===e.viewingMode&&(i=this._animateLightingWithCamera(e,e.environment.lighting,this.environment.lighting)),e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1),e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,"virtual"===this.environment.lighting.type||"virtual"===e.environment.lighting.type?(e.environment.applyLighting(this.environment.lighting.clone()),"virtual"!==e.environment.lighting.type&&(e.environment.cachedCameraTrackingEnabled=e.environment.lighting.cameraTrackingEnabled,e.environment.lighting.cameraTrackingEnabled=!1)):null!=this.environment.lighting.displayUTCOffset&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset);return e.goTo(this.viewpoint,t).then((()=>{this._applyCachedCameraTrackingEnabled(e),e.environment.applyLighting(this.environment.lighting.clone())})).catch((t=>{throw null==e.animation&&this._applyCachedCameraTrackingEnabled(e),t})).finally((()=>{c(i)}))}_applyCachedCameraTrackingEnabled(e){null!=e.environment.cachedCameraTrackingEnabled&&(e.environment.lighting.cameraTrackingEnabled=e.environment.cachedCameraTrackingEnabled,e.environment.cachedCameraTrackingEnabled=null)}_getTime(e){return[e.getTime(),3600*e.getUTCHours()+60*e.getUTCMinutes()+e.getUTCSeconds()]}_setTime(e,t,i){return e.setTime(t),e.setUTCHours(i/3600),e.setUTCMinutes(i%3600/60),e.setUTCSeconds(i%3600%60),e}_animateLightingWithCamera(e,t,i){const n=new Date(t.date.toString()),[r,s]=this._getTime(n),[o,a]=this._getTime(i.date),l=J(s,a),p=e.renderCoordsHelper,m=j();p.toRenderCoords(e.camera.position,m);const c=j(),h=j();null!=this.viewpoint.camera&&p.toRenderCoords(this.viewpoint.camera.position,c);const d=new Date;return g((()=>e.camera),(e=>{p.toRenderCoords(e.position,h);const i=T(m,h),n=T(c,h);let a=0;i+n!==0&&(a=i/(i+n));const u=r+(o-r)*a,y=z(s,l*a);t.date=this._setTime(d,u,y)}))}write(e,t){const i=super.write(e,t);return i?.elements&&0===Object.keys(i.elements).length&&delete i.elements,i}static createFrom(e,t){return(new this).updateFrom(e,t)}};e([b({type:String,json:{write:{isRequired:!0}}})],q.prototype,"id",void 0),e([b({type:R,json:{default:()=>new R({text:""}),write:{isRequired:!0}}})],q.prototype,"title",void 0),e([v("title")],q.prototype,"castTitle",null),e([b({type:U,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.text)})}}})],q.prototype,"description",void 0),e([v("description")],q.prototype,"castDescription",null),e([b({type:Boolean,nonNullable:!0,json:{write:!0,default:!1}})],q.prototype,"hidden",void 0),e([b({type:S,json:{default:()=>new S({url:""}),write:{isRequired:!0}}})],q.prototype,"thumbnail",void 0),e([v("thumbnail")],q.prototype,"castThumbnail",null),e([b({type:i,nonNullable:!0,json:{write:{isRequired:!0}}})],q.prototype,"viewpoint",void 0),e([b({type:t,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],q.prototype,"basemap",void 0),e([v("basemap")],q.prototype,"castBasemap",null),e([b({type:F,json:{write:!0}})],q.prototype,"ground",void 0),e([b({type:P,json:{write:!0,default:"caption"},nonNullable:!0})],q.prototype,"layout",void 0),e([b({type:O,json:{write:{isRequired:!0}}})],q.prototype,"visibleLayers",null),e([v("visibleLayers")],q.prototype,"castVisibleLayers",null),e([b({type:I,json:{write:!0}})],q.prototype,"environment",void 0),e([b({type:[String],json:{write:!1}})],q.prototype,"enabledFocusAreas",void 0),e([b(k)],q.prototype,"timeExtent",void 0),e([b({type:x,nonNullable:!0,json:{write:!0}})],q.prototype,"elements",void 0),q=e([w("esri.webscene.Slide")],q);const B=q;function G(e){if("building-scene"===e.type||"map-image"===e.type)return e.allSublayers.toArray()}function N(e){const t=G(e);if(t)return t.filter((e=>e.visible)).map((e=>e.id))}const W=86400,H=43200;function J(e,t){let i=t-e;return i>H&&(i-=W),i<-43200&&(i+=W),i}function z(e,t){return p(e+t,W)}export{B as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import s from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";var t;let i=t=class extends s{constructor(e){super(e),this.visible=!1}clone(){return new t({visible:this.visible})}cloneConstructProperties(){return{visible:this.visible}}};e([r({type:Boolean,json:{default:!1,write:!0}})],i.prototype,"visible",void 0),i=t=e([o("esri.webscene.SlideLegendInfo")],i);const c=i;export{c as default};
5
+ import{_ as o}from"../chunks/tslib.es6.js";import e from"../core/Clonable.js";import r from"../core/JSONSupport.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{subclass as t}from"../core/accessorSupport/decorators/subclass.js";let p=class extends(e.ClonableMixin(r)){constructor(o){super(o),this.visible=!1}};o([s({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"visible",void 0),p=o([t("esri.webscene.SlideLegendInfo")],p);const c=p;export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import{colorAndTransparencyProperty as c}from"../../symbols/support/materialUtils.js";import p from"./Background.js";var l;let i=l=class extends p{constructor(o){super(o),this.type="color",this.color=new r([0,0,0,1])}clone(){return new l(this.cloneProperties())}cloneProperties(){return{color:this.color.clone()}}};o([s({color:"color"},{readOnly:!0})],i.prototype,"type",void 0),o([e(c({nonNullable:!0}))],i.prototype,"color",void 0),i=l=o([t("esri.webscene.background.ColorBackground")],i);const a=i;export{a as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import{colorAndTransparencyProperty as c}from"../../symbols/support/materialUtils.js";import p from"./Background.js";var i;let l=i=class extends p{constructor(o){super(o),this.type="color",this.color=new r([0,0,0,1])}clone(){return new i(this.cloneProperties())}cloneProperties(){return{color:this.color.clone()}}};o([s({color:"color"},{readOnly:!0}),e({json:{write:{isRequired:!0}}})],l.prototype,"type",void 0),o([e(c({nonNullable:!0,colorRequiredOnWrite:!0}))],l.prototype,"color",void 0),l=i=o([t("esri.webscene.background.ColorBackground")],l);const n=l;export{n as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Basemap.js";import t from"../../Ground.js";import r from"../../WebScene.js";import"../../core/has.js";import{isLongFormType as n,Integer as a,Null as s}from"../../core/accessorSupport/ensureType.js";import{isCollection as y}from"../../core/accessorSupport/extensions/serializableProperty/type.js";import o from"../../layers/GroupLayer.js";import p from"../../layers/KMLLayer.js";import{typeModuleMap as i}from"../../layers/mixins/operationalLayerModuleMap.js";import{supportedTypes as u}from"../../layers/mixins/operationalLayers.js";import l from"../../layers/support/Sublayer.js";import{JoinTableDataSource as c,DataLayerSource as m}from"../../layers/support/source/DataLayerSource.js";import{MapLayerSource as f}from"../../layers/support/source/MapLayerSource.js";import{ScanContext as d}from"./utils.js";async function b(e){return M(null,{typeName:"json",type:e},new d)}async function w(e,t,r){switch(t.typeName){case"array":await g(e,t,r);break;case"union":await q(e,t,r);break;case"json":await M(e,t,r);break;case"native":await N(e,t,r);break;case"enum":await v(e,t,r)}}async function N(e,t,r){r.addProperty({name:e,type:L(t),default:t.default,required:t.isRequired})}function j(e){const t=e.slice();return t.sort(),t}async function v(e,t,r){const n=t.values.slice();t.nullable&&n.push(null),r.currentClass?.typeValue&&"type"===e?r.addProperty({name:e,type:"string",enum:`"${r.currentClass.typeValue}"`,required:t.isRequired}):r.addProperty({name:e,type:L(t),enum:j(n).map((e=>"string"==typeof e?`"${e}"`:`${e}`)).join("|"),default:t.default,required:t.isRequired})}async function g(e,t,r){t.elementType.isRequired=t.isRequired,await w(`${e}[]`,t.elementType,r)}function T(e,t){if("json"===e.typeName){const t=e.type.__accessorMetadata__,r=t?.type,n=r&&D(r),a=n?.type,s=a||r?.type;if(s&&Array.isArray(s)&&1===s.length&&"string"==typeof s[0])return a?s[0]:G(r,s[0])}return t}async function q(e,t,r){const n=[];for(const a of t.types)if("native"!==a.type.typeName&&t.key){const t=`${e}<${T(a.type,a.value)}>`;await w(t,a.type,r)}else n.push(a.type);if(n.length){const a=n.map(L);t.nullable&&a.push("null"),a.sort(),r.addProperty({type:a.join("|"),name:e,default:t.default,required:t.isRequired})}}async function k(n,a){return n.type===r&&"layers"===a?C("web-scene/operational-layers","operational-layers"):n.type===r&&"tables"===a?C("web-scene/tables","tables"):n.type!==e||"baseLayers"!==a&&"baseMapLayers"!==a?n.type===e&&"elevationLayers"===a||n.type===t&&"layers"===a?C("web-scene/ground","ground"):n.type===o&&"layers"===a?C("web-scene/operational-layers","operational-layers",(e=>e!==o)):n.type!==c||"leftTableSource"!==a&&"rightTableSource"!==a?null:x({key:"type",base:null,typeMap:{"data-layer":m,"map-layer":f}}):C("web-scene/basemap","basemap")}async function h(e,t,r){const n=A(r),a=await k(e,t);return a?(a.isRequired=n.isRequired,a):n}function R(e){return e.prototype.declaredClass.replaceAll(".","/")}async function M(e,t,r){const n=t.type.__accessorMetadata__,a=R(t.type);if(!n)return e&&r.addProperty({name:e,type:"unknown"}),null;let s=a,y=null;t.layerContainerType&&(s+=`--${t.layerContainerType}`);const o=e?.match(/<([^>]+)>$/);o&&(s+=`--${o[1]}`,y=o[1]),t.type===l&&(s+=`--${r.currentClass?.name}`,y=r.currentClass?.name);const p=r.seen.get(s);if(p&&e)return r.addProperty({name:e,type:p,required:t.isRequired}),p;const i={type:t.type,name:a,id:s,properties:[]};e&&(r.addProperty({name:e,type:i,required:t.isRequired}),i.typeValue=y),r.push(e,i);for(const u in n){const e=n[u],a=E(e);if(!a?.enabled)continue;if(a.layerContainerTypes&&t.layerContainerType&&!a.layerContainerTypes.includes(t.layerContainerType))continue;if(t.type===l){const e="esri/layers/TileLayer"===r.stack[r.stack.length-2].klass.name;if(e&&l.test.isMapImageLayerOverridePolicy(a.overridePolicy)||!e&&l.test.isTileImageLayerOverridePolicy(a.overridePolicy))continue}const s=a.target;if("string"==typeof s||null==s){const n=await h(t,u,e);if(!n)continue;await w("string"==typeof s?s:u,n,r)}else await S(t,s,r)}return r.pop()}async function S(e,t,r){for(const n in t){let a=await k(e,n);if(!a){const e=t[n];a=e.types?x(e.types):J(e.type),a.default=e.default,a.isRequired=e.isRequired,a=_(a)}await w(n,a,r)}}async function C(e,t,r){const n={typeName:"union",key:"layerType",types:[]};for(const a in u[e]){if("web-scene/operational-layers"===e&&"ArcGISTiledElevationServiceLayer"===a)continue;const s=await i[a]();s&&(r&&!r(s)||s!==p&&n.types.push({type:{typeName:"json",layerContainerType:t,type:s},value:a}))}if(0===n.types.length)return null;return{typeName:"array",elementType:1===n.types.length?n.types[0].type:n}}function L(e){switch(e.typeName){case"array":return`${L(e.elementType)}[]`;case"union":{const t=e.types.map((e=>L(e.type)));return e.nullable&&t.push("null"),t.sort(),`${t.join(" | ")}`}case"native":switch(e.type){case Number:return"number";case a:return"integer";case String:return"string";case Boolean:return"boolean";case Object:return"object";case s:return"null";default:return"unknown"}case"json":return e.type.prototype.declaredClass;case"enum":return"string"}}function P(e){const t=e.prototype.itemType?.Type;if(!t)return{typeName:"array",elementType:{typeName:"native",type:null}};if("function"==typeof t)return{typeName:"array",elementType:J(t)};if(t.typeMap){const e=[];for(const r in t.typeMap){const n=t.typeMap[r];e.push({type:J(n),value:z(n)?null:r})}return{typeName:"array",elementType:{typeName:"union",key:"string"==typeof t.key?t.key:"type",types:e}}}}function $(e){if("json"!==e.typeName)return null;const t=e.type.__accessorMetadata__,r=t?.type,n=r&&D(r),a=n?.type,s=a||r?.type;return s&&Array.isArray(s)&&"string"==typeof s[0]?a||r.type.map((e=>G(r,e))):null}function _(e){if("array"===e.typeName)return e.elementType=_(e.elementType),e;const t=$(e);return t?{typeName:"union",key:"type",nullable:e.nullable,isRequired:e.isRequired,types:t.map((t=>({value:t,type:e})))}:e}function A(e){const t=D(e);return t?.types?x(t.types):!t?.type&&e.types?x(e.types):O(_(I(e)))}function O(e){return e.nullable&&"native"===e.typeName?{typeName:"union",key:null,isRequired:e.isRequired,types:[{value:null,type:e}],nullable:!0}:e}function x(e){if(Array.isArray(e))return{typeName:"array",elementType:x(e[0])};const t=[];for(const r in e.typeMap){const n=e.typeMap[r];t.push({type:J(n),value:z(n)?null:r})}return{typeName:"union",key:"string"==typeof e.key?e.key:"type",types:t}}function B(e){return null!=e&&e.isJSONMapWriter}function G(e,t){const r=E(e);if(r&&B(r.writer)){const e={value:""};return r.writer?.(t,e,"value"),e.value}return t}function I(e){const t=D(e),r=E(e),n=t?.type,a=J(n||e.type);return t&&void 0!==t.default&&"function"!=typeof t.default&&(a.default=G(e,t.default)),r?.allowNull&&(a.nullable=!0),r?.isRequired&&(a.isRequired=!0),a}function J(e){return e?n(e)?V(e):Array.isArray(e)?"string"==typeof e[0]||"number"==typeof e[0]?{typeName:"enum",values:e}:e.length>1?{typeName:"union",key:null,types:e.map((e=>({type:J(e),value:null})))}:{typeName:"array",elementType:J(e[0])}:y(e)?P(e):z(e)?{typeName:"native",type:e}:W(e)?{typeName:"json",type:e}:{typeName:"native",type:null}:{typeName:"native",type:null}}function V(e){switch(e.type){case"native":return{typeName:"native",type:e.value};case"array":return{typeName:"array",elementType:J(e.value)};case"one-of":return{typeName:"union",key:null,types:e.values.map((e=>({type:V(e),value:null})))}}}function W(e){let t=e;for(;t;){if(t.prototype&&("esri.core.JSONSupport"===t.prototype.declaredClass||"esri.core.MultiOriginJSONSupport"===t.prototype.declaredClass))return!0;t=Object.getPrototypeOf(t)}return!1}function z(e){return e===String||e===Boolean||e===Number||e===a||e===Object||e===s}function D(e){if(!e.json)return null;const t=e.json.origins,r=e.json,n=t?.["web-scene"],a=t?.["web-document"];return n||a||r||null}function E(e){if(!e.json)return null;const t=e.json.origins,r=e.json.write,n=t?.["web-scene"]?.write,a=t?.["web-document"]?.write;return n||a||r||null}export{b as scan};
5
+ import{b as e,c as t}from"../../chunks/tslib.es6.js";import r from"../../Basemap.js";import n from"../../Ground.js";import a from"../../WebScene.js";import"../../core/has.js";import{isLongFormType as s,Integer as y,Null as o}from"../../core/accessorSupport/ensureType.js";import{isCollection as i}from"../../core/accessorSupport/extensions/serializableProperty/type.js";import p from"../../layers/GroupLayer.js";import u from"../../layers/KMLLayer.js";import{typeModuleMap as l}from"../../layers/mixins/operationalLayerModuleMap.js";import{supportedTypes as c}from"../../layers/mixins/operationalLayers.js";import m from"../../layers/support/Sublayer.js";import{JoinTableDataSource as f,DataLayerSource as d}from"../../layers/support/source/DataLayerSource.js";import{MapLayerSource as b}from"../../layers/support/source/MapLayerSource.js";import w from"../InitialViewProperties.js";import{ScanContext as j}from"./utils.js";import{webSceneAnalysisRegistry as N}from"../support/analysisUtils.js";import v from"../support/SlideElements.js";async function g(r){const n={stack:[],error:void 0,hasError:!1};try{const t=e(n,new j,!1);return await L(null,{typeName:"json",type:r},t)}catch(a){n.error=a,n.hasError=!0}finally{t(n)}}async function T(e,t,r){switch(t.typeName){case"array":await R(e,t,r);break;case"union":await M(e,t,r);break;case"json":await L(e,t,r);break;case"native":await h(e,t,r);break;case"enum":await q(e,t,r)}}async function h(e,t,r){r.addProperty({name:e,type:O(r,t),default:t.default,required:t.isRequired})}function k(e){const t=e.slice();return t.sort(),t}async function q(e,t,r){const n=t.values.slice();t.nullable&&n.push(null),r.currentClass?.typeValue&&"type"===e?r.addProperty({name:e,type:"string",enum:`"${r.currentClass.typeValue}"`,required:t.isRequired}):r.addProperty({name:e,type:O(r,t),enum:k(n).map((e=>"string"==typeof e?`"${e}"`:`${e}`)).join("|"),default:t.default,required:t.isRequired})}async function R(e,t,r){t.elementType.isRequired=t.isRequired,await T(`${e}[]`,t.elementType,r)}function S(e,t){if("json"===e.typeName){const t=e.type.__accessorMetadata__,r=t?.type,n=r&&F(r),a=n?.type,s=a||r?.type;if(s&&Array.isArray(s)&&1===s.length&&"string"==typeof s[0])return a?s[0]:G(r,s[0])}return t}async function M(e,t,r){const n=[];for(const a of t.types)if("native"!==a.type.typeName&&t.key){const t=`${e}<${S(a.type,a.value)}>`;await T(t,a.type,r)}else n.push(a.type);if(n.length){const a=n.map((e=>O(r,e)));t.nullable&&a.push("null"),a.sort(),r.addProperty({type:a.join("|"),name:e,default:t.default,required:t.isRequired})}}async function C(e,t){return e.type===a&&"layers"===t?_("web-scene/operational-layers","operational-layers"):e.type===a&&"tables"===t?_("web-scene/tables","tables"):e.type!==r||"baseLayers"!==t&&"baseMapLayers"!==t?e.type===r&&"elevationLayers"===t||e.type===n&&"layers"===t?_("web-scene/ground","ground"):e.type===p&&"layers"===t?_("web-scene/operational-layers","operational-layers",(e=>e!==p)):e.type!==v&&e.type!==w||"analyses"!==t?e.type!==f||"leftTableSource"!==t&&"rightTableSource"!==t?null:B({key:"type",base:null,typeMap:{"data-layer":d,"map-layer":b}}):{typeName:"array",elementType:{typeName:"union",key:"type",types:await Promise.all(Object.entries(N).map((async([e,t])=>({type:{typeName:"json",type:await t()},value:e}))))}}:_("web-scene/basemap","basemap")}async function P(e,t,r){const n=I(r),a=await C(e,t);return a?(a.isRequired=n.isRequired,a):n}async function L(e,t,r){const n=t.type.__accessorMetadata__,a=r.getDeclaredClass(t.type);if(!n)return e&&r.addProperty({name:e,type:"unknown"}),null;let s=a,y=null;t.layerContainerType&&(s+=`--${t.layerContainerType}`);const o=e?.match(/<([^>]+)>$/);o&&(s+=`--${o[1]}`,y=o[1]),t.type===m&&(s+=`--${r.currentClass?.name}`,y=r.currentClass?.name);const i=r.seen.get(s);if(i&&e)return r.addProperty({name:e,type:i,required:t.isRequired}),i;const p={type:t.type,name:a,id:s,properties:[]};e&&(r.addProperty({name:e,type:p,required:t.isRequired}),p.typeValue=y),r.push(e,p);for(const u in n){const e=n[u],a=H(e);if(!a?.enabled)continue;if(a.layerContainerTypes&&t.layerContainerType&&!a.layerContainerTypes.includes(t.layerContainerType))continue;if(t.type===m){const e="esri/layers/TileLayer"===r.stack[r.stack.length-2].klass.name;if(e&&m.test.isMapImageLayerOverridePolicy(a.overridePolicy)||!e&&m.test.isTileImageLayerOverridePolicy(a.overridePolicy))continue}const s=a.target;if("string"==typeof s||null==s){const n=await P(t,u,e);if(!n)continue;await T("string"==typeof s?s:u,n,r)}else await $(t,s,r)}return r.pop()}async function $(e,t,r){for(const n in t){let a=await C(e,n);if(!a){const e=t[n];a=e.types?B(e.types):W(e.type),a.default=e.default,a.isRequired=e.isRequired,a=E(a)}await T(n,a,r)}}async function _(e,t,r){const n={typeName:"union",key:"layerType",types:[]};for(const a in c[e]){if("web-scene/operational-layers"===e&&"ArcGISTiledElevationServiceLayer"===a)continue;const s=await l[a]();s&&(r&&!r(s)||s!==u&&n.types.push({type:{typeName:"json",layerContainerType:t,type:s},value:a}))}if(0===n.types.length)return null;return{typeName:"array",elementType:1===n.types.length?n.types[0].type:n}}function O(e,t){switch(t.typeName){case"array":return`${O(e,t.elementType)}[]`;case"union":{const r=t.types.map((t=>O(e,t.type)));return t.nullable&&r.push("null"),r.sort(),`${r.join(" | ")}`}case"native":switch(t.type){case Number:return"number";case y:return"integer";case String:return"string";case Boolean:return"boolean";case Object:return"object";case o:return"null";default:return"unknown"}case"json":return e.getDeclaredClass(t.type);case"enum":return"string"}}function A(e){const t=e.prototype.itemType?.Type;if(!t)return{typeName:"array",elementType:{typeName:"native",type:null}};if("function"==typeof t)return{typeName:"array",elementType:W(t)};if(t.typeMap){const e=[];for(const r in t.typeMap){const n=t.typeMap[r];e.push({type:W(n),value:U(n)?null:r})}return{typeName:"array",elementType:{typeName:"union",key:"string"==typeof t.key?t.key:"type",types:e}}}}function x(e){if("json"!==e.typeName)return null;const t=e.type.__accessorMetadata__,r=t?.type,n=r&&F(r),a=n?.type,s=a||r?.type;return s&&Array.isArray(s)&&"string"==typeof s[0]?a||r.type.map((e=>G(r,e))):null}function E(e){if("array"===e.typeName)return e.elementType=E(e.elementType),e;const t=x(e);return t?{typeName:"union",key:"type",nullable:e.nullable,isRequired:e.isRequired,types:t.map((t=>({value:t,type:e})))}:e}function I(e){const t=F(e);return t?.types?B(t.types):!t?.type&&e.types?B(e.types):V(E(J(e)))}function V(e){return e.nullable&&"native"===e.typeName?{typeName:"union",key:null,isRequired:e.isRequired,types:[{value:null,type:e}],nullable:!0}:e}function B(e){if(Array.isArray(e))return{typeName:"array",elementType:B(e[0])};const t=[];for(const r in e.typeMap){const n=e.typeMap[r];t.push({type:W(n),value:U(n)?null:r})}return{typeName:"union",key:"string"==typeof e.key?e.key:"type",types:t}}function D(e){return null!=e&&e.isJSONMapWriter}function G(e,t){const r=H(e);if(r&&D(r.writer)){const e={value:""};return r.writer?.(t,e,"value"),e.value}return t}function J(e){const t=F(e),r=H(e),n=t?.type,a=W(n||e.type);return t&&void 0!==t.default&&"function"!=typeof t.default&&(a.default=G(e,t.default)),r?.allowNull&&(a.nullable=!0),r?.isRequired&&(a.isRequired=!0),a}function W(e){return e?s(e)?z(e):Array.isArray(e)?"string"==typeof e[0]||"number"==typeof e[0]?{typeName:"enum",values:e}:e.length>1?{typeName:"union",key:null,types:e.map((e=>({type:W(e),value:null})))}:{typeName:"array",elementType:W(e[0])}:i(e)?A(e):U(e)?{typeName:"native",type:e}:K(e)?{typeName:"json",type:e}:{typeName:"native",type:null}:{typeName:"native",type:null}}function z(e){switch(e.type){case"native":return{typeName:"native",type:e.value};case"array":return{typeName:"array",elementType:W(e.value)};case"one-of":return{typeName:"union",key:null,types:e.values.map((e=>({type:z(e),value:null})))}}}function K(e){let t=e;for(;t;){if(t.prototype&&("esri.core.JSONSupport"===t.prototype.declaredClass||"esri.core.MultiOriginJSONSupport"===t.prototype.declaredClass))return!0;t=Object.getPrototypeOf(t)}return!1}function U(e){return e===String||e===Boolean||e===Number||e===y||e===Object||e===o}function F(e){if(!e.json)return null;const t=e.json.origins,r=e.json,n=t?.["web-scene"],a=t?.["web-document"];return n||a||r||null}function H(e){if(!e.json)return null;const t=e.json.origins,r=e.json.write,n=t?.["web-scene"]?.write,a=t?.["web-document"]?.write;return n||a||r||null}export{g as scan};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{collectClassPaths as e}from"./utils.js";function n(e){const n=o(e),t=[],a=p(n),c={};i("api","",e.api,n,a.api,c);const s={};i("spec","",e.spec,n,a.spec,s);const u=r(n);for(const i in c){const e=c[i],n=s[i],p=u[e.container.id],r=`${e.container.name} (${n.container.name})${e.container.typeValue?` <${e.container.typeValue}>`:""}`;t.push({name:r,api:e,spec:n,indent:p})}return t}function t(e,n,p,r,o,c,s,u,f){if(s.has(r))return f;for(const d of r.properties){const l=n?`${n}.${d.name}`:d.name,m=p?`${p}.${d.name}`:d.name,y=o[m];if(y){const n=c[y[e].id];f.push({name:l,type:"ref",ref:y,refName:n,required:d.required}),i(e,m,y[e],o,c,u)}else"string"==typeof d.type?f.push(a(l,d)):(s.add(r),t(e,l,m,d.type,o,c,s,u,f))}return s.delete(r),f}function i(e,n,i,p,r,o){if(i.id in o)return o;const a={container:i,text:null,props:[]};return r[i.id].forEach((e=>o[e]=a)),t(e,"",n,i,p,r,new Set,o,a.props),a.props.sort(c),o}function p(e){const n={api:{},spec:{}};for(const t in e){const i=e[t],p=`${i.api.name} (${i.spec.name})${i.api.typeValue?` <${i.api.typeValue}>`:""}`;let r=n.api[i.api.id];r||(r=new Set,n.api[i.api.id]=r),r.add(p);let o=n.spec[i.spec.id];o||(o=new Set,n.spec[i.spec.id]=o),o.add(p)}return n}function r(e){const n={};for(const t in e){const i=t?t.split(".").length:0,p=e[t].api.id;n[p]=p in n?Math.min(i,n[p]):i}return n}function o(n){const t=e(n.api),i=e(n.spec),p={};p[""]={api:n.api,spec:n.spec};for(const e in t){const n=i[e];if(n){const i=t[e];p[e]={api:i,spec:n}}}return p}function a(e,n){return{name:e,type:n.enum||("string"==typeof n.type?n.type:""),default:JSON.stringify(n.default),required:n.required}}function c(e,n){const t=e.name.localeCompare(n.name);if(0!==t)return t;const i=(e.type||"").localeCompare(n.type||"");return 0!==i?i:(e.default||"").localeCompare(n.default||"")}export{n as collect};
5
+ import{collectClassPaths as e}from"./utils.js";function t(e){const t=s(e),n=[],r=a(t),i=new Map;p("api","",e.api,t,r.api,i);const c=new Map;p("spec","",e.spec,t,r.spec,c);const u=o(t);for(const[p,a]of i){const e=c.get(p),t=u.get(a.container.id),o=`${a.container.name} (${e.container.name})${a.container.typeValue?` <${a.container.typeValue}>`:""}`;n.push({name:o,api:a,spec:e,indent:t})}return n}function n(e,t,a,o,s,i,c,u,f){if(c.has(o))return f;for(const d of o.properties){const l=t?`${t}.${d.name}`:d.name,m=a?`${a}.${d.name}`:d.name,y=s.get(m);if(y){const t=i.get(y[e].id);f.push({name:l,type:"ref",ref:y,refName:t,required:d.required}),p(e,m,y[e],s,i,u)}else"string"==typeof d.type?f.push(r(l,d)):(c.add(o),n(e,l,m,d.type,s,i,c,u,f))}return c.delete(o),f}function p(e,t,p,a,o,s){if(s.has(p.id))return s;const r={container:p,text:null,props:[]};return o.get(p.id).forEach((e=>s.set(e,r))),n(e,"",t,p,a,o,new Set,s,r.props),r.props.sort(i),s}function a(e){const t={api:new Map,spec:new Map};for(const n of e.values()){const e=`${n.api.name} (${n.spec.name})${n.api.typeValue?` <${n.api.typeValue}>`:""}`;let p=t.api.get(n.api.id);p||(p=new Set,t.api.set(n.api.id,p)),p.add(e);let a=t.spec.get(n.spec.id);a||(a=new Set,t.spec.set(n.spec.id,a)),a.add(e)}return t}function o(e){const t=new Map;for(const n of e.keys()){const p=n?n.split(".").length:0,a=e.get(n).api.id;t.has("id")?t.set(a,Math.min(p,t.get(a))):t.set(a,p)}return t}function s(t){const n=e(t.api),p=e(t.spec),a=new Map;a.set("",{api:t.api,spec:t.spec});for(const[e,o]of n){const t=p.get(e);t&&a.set(e,{api:o,spec:t})}return a}function r(e,t){return{name:e,type:t.enum||("string"==typeof t.type?t.type:""),default:JSON.stringify(t.default),required:t.required}}function i(e,t){const n=e.name.localeCompare(t.name);if(0!==n)return n;const p=(e.type||"").localeCompare(t.type||"");return 0!==p?p:(e.default||"").localeCompare(t.default||"")}export{t as collect};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- export{scan as scanSpec}from"./spec.js";export{scan as scanAPI}from"./api.js";export{collectClassPaths,flatten}from"./utils.js";const e={applicationProperties:"esri/webscene/ApplicationProperties",authoringInfo:"esri/renderers/support/AuthoringInfo",authoringInfo_visualVariable:"esri/renderers/support/AuthoringInfoVisualVariable",baseMap:"esri/Basemap",border:"esri/symbols/callouts/LineCallout3DBorder",buildingSceneLayer:"esri/layers/BuildingSceneLayer",buildingSceneLayer_filter:"esri/layers/support/BuildingFilter",buildingSceneLayer_filterAuthoringInfo_filterBlock:"esri/layers/support/BuildingFilterAuthoringInfoBlock",buildingSceneLayer_filterAuthoringInfo_filterType:"esri/layers/support/BuildingFilterAuthoringInfoType",buildingSceneLayer_filterAuthoringInfoCheckbox:"esri/layers/support/BuildingFilterAuthoringInfoCheckbox",buildingSceneLayer_filterBlock:"esri/layers/support/BuildingFilterBlock",buildingSceneLayer_filterModeSolid:"esri/layers/support/BuildingFilterModeSolid",buildingSceneLayer_filterModeWireFrame:"esri/layers/support/BuildingFilterModeWireFrame",buildingSceneLayer_filterModeXray:"esri/layers/support/BuildingFilterModeXRay",buildingSceneLayer_sublayer:"esri/layers/buildingSublayers/BuildingComponentSublayer",callout:"esri/symbols/callouts/LineCallout3D",camera:"esri/Camera",cimSymbolReference:"esri/symbols/CIMSymbol",classBreakInfo:"esri/renderers/support/ClassBreakInfo",classBreakInfo_authoringInfo:"esri/renderer/support/AuthoringInfoClassBreakInfo",classBreaksRenderer:"esri/renderers/ClassBreaksRenderer",codedValue:"esri/layers/support/CodedValue",codedValue_domain:"esri/layers/support/CodedValueDomain",colorClassBreakInfo:"esri/renderers/support/pointCloud/ColorClassBreakInfo",colorInfo_visualVariable:"esri/renderers/visualVariables/ColorVariable",colormapInfo:"esri/renderers/support/ColormapInfo",colorModulationInfo:"esri/renderers/support/pointCloud/ColorModulation",colorRamp_algorithmic:"esri/rest/support/AlgorithmicColorRamp",colorRamp_multipart:"esri/rest/support/MultipartColorRamp",colorStop:"esri/renderers/visualVariables/support/ColorStop",colorUniqueValueInfo:"esri/renderers/support/pointCloud/ColorUniqueValueInfo",csvLayer:"esri/layers/CSVLayer",description:"esri/webscene/support/Description",dynamicDataLayer_source:"esri/layers/support/source/DataLayerSource",dynamicMapLayer_source:"esri/layers/support/source/MapLayerSource",elevationInfo:"esri/symbols/support/ElevationInfo",environment_background_color:"esri/webscene/background/ColorBackground",environment:"esri/webscene/Environment",extent:"esri/geometry/Extent",extrudeSymbol3DLayer:"esri/symbols/ExtrudeSymbol3DLayer",facilityLayerInfo:"esri/layers/support/FacilityLayerInfo",featureExpressionInfo:"esri/layers/support/FeatureExpressionInfo",featureLayer:"esri/layers/FeatureLayer",featureReduction_select:"esri/layers/support/FeatureReductionSelection",field:"esri/layers/support/Field",field_authoringInfo:"esri/renderers/support/AuthoringInfoFieldInfo",fieldInfo:"esri/popup/FieldInfo",fillSymbol3DLayer:"esri/symbols/FillSymbol3DLayer",font:"esri/symbols/Font",format:"esri/popup/support/FieldInfoFormat",ground:"esri/Ground",groupLayer:"esri/layers/GroupLayer",halo:"esri/symbols/support/Symbol3DHalo",heightModelInfo:"esri/geometry/HeightModelInfo",iconSymbol3DLayer:"esri/symbols/IconSymbol3DLayer",iconSymbol3DLayer_resource:"esri/symbols/support/IconSymbol3DLayerResource",imageServiceLayer:"esri/layers/ImageryLayer",inherited_domain:"esri/layers/support/InheritedDomain",initialState:"esri/webscene/InitialViewProperties",integratedMeshLayer:"esri/layers/IntegratedMeshLayer",joinTableDataSource:"esri/layers/support/source/JoinTableDataSource",labelExpressionInfo:"esri/layers/support/LabelExpressionInfo",labelingInfo:"esri/layers/support/LabelClass",labelSymbol3D:"esri/symbols/LabelSymbol3D",layer:"esri/layers/support/Sublayer",layerFloorInfo:"esri/layers/support/LayerFloorInfo",levelLayerInfo:"esri/layers/support/LevelLayerInfo",lighting:"esri/webscene/Lighting",lineSymbol3D:"esri/symbols/LineSymbol3D",lineSymbol3DLayer:"esri/symbols/LineSymbol3DLayer",lineOfSightLayer:"esri/layers/LineOfSightLayer",lineOfSightObserver:"esri/analysis/LineOfSightAnalysisObserver",lineOfSightTarget:"esri/analysis/LineOfSightAnalysisTarget",lod:"esri/layers/support/LOD",mapFloorInfo:"esri/support/MapFloorInfo",mapServiceLayer:"esri/layers/MapImageLayer",material:"esri/symbols/support/Symbol3DMaterial",materialColorMixMode:"esri/symbols/support/Symbol3DFillMaterial",mediaInfo_chart:"esri/popup/content/BarChartMediaInfo",mediaInfo_chart_value:"esri/popup/content/support/ChartMediaInfoValue",mediaInfo_image:"esri/popup/content/ImageMediaInfo",mediaInfo_image_value:"esri/popup/content/support/ImageMediaInfoValue",meshSymbol3D:"esri/symbols/MeshSymbol3D",mosaicRule:"esri/layers/support/MosaicRule",multidimensionalDefinition:"esri/layers/support/DimensionalDefinition",multipoint_geometry:"esri/geometry/Multipoint",navigationConstraint:"esri/ground/NavigationConstraint",objectSymbol3DLayer:"esri/symbols/ObjectSymbol3DLayer",objectSymbol3DLayer_resource:"esri/symbols/support/ObjectSymbol3DLayerResource",ogcFeatureLayer:"esri/layers/OGCFeatureLayer",openStreetMapLayer:"esri/layers/OpenStreetMapLayer",relatedRecordsInfoFieldOrder:"esri/popup/support/RelatedRecordsInfoFieldOrder",attachmentsOrderByInfo:"esri/popup/support/AttachmentsOrderByInfo",outline:"esri/symbols/support/Symbol3DOutline",pathSymbol3DLayer:"esri/symbols/PathSymbol3DLayer",point_geometry:"esri/geometry/Point",pointCloudBitfieldFilter:"esri/layers/pointCloudFilters/PointCloudBitfieldFilter",pointCloudClassBreaksRenderer:"esri/renderers/PointCloudClassBreaksRenderer",pointCloudFixedSizeAlgorithm:"esri/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm",pointCloudLayer:"esri/layers/PointCloudLayer",pointCloudReturnFilter:"esri/layers/pointCloudFilters/PointCloudReturnFilter",pointCloudRGBRenderer:"esri/renderers/PointCloudRGBRenderer",pointCloudSplatAlgorithm:"esri/renderers/support/pointCloud/PointSizeSplatAlgorithm",pointCloudStretchRenderer:"esri/renderers/PointCloudStretchRenderer",pointCloudUniqueValueRenderer:"esri/renderers/PointCloudUniqueValueRenderer",pointCloudValueFilter:"esri/layers/pointCloudFilters/PointCloudValueFilter",pointSymbol3D:"esri/symbols/PointSymbol3D",polygon_geometry:"esri/geometry/Polygon",polygonPattern:"esri/symbols/patterns/StylePattern3D",polygonSymbol3D:"esri/symbols/PolygonSymbol3D",polyline_geometry:"esri/geometry/Polyline",popupElement_attachments:"esri/popup/content/AttachmentsContent",popupElement_fields:"esri/popup/content/FieldsContent",popupElement_media:"esri/popup/content/MediaContent",popupElement_text:"esri/popup/content/TextContent",popupExpressionInfo:"esri/popup/ExpressionInfo",popupInfo:"esri/PopupTemplate",popupLayerOptions:"esri/popup/LayerOptions",presentation:"esri/webscene/Presentation",queryTableDataSource:"esri/layers/support/source/QueryTableDataSource",range_domain:"esri/layers/support/RangeDomain",rangeInfo:"esri/layers/support/RangeInfo",rasterColormapRenderer:"esri/renderers/RasterColormapRenderer",rasterDataSource:"esri/layers/support/source/RasterDataSource",rasterShadedReliefRenderer:"esri/renderers/RasterShadedReliefRenderer",rasterStretchRenderer:"esri/renderers/RasterStretchRenderer",relatedRecordsInfo:"esri/popup/RelatedRecordsInfo",rendererLegendOptions:"esri/renderers/support/RendererLegendOptions",renderingRule:"esri/layers/support/RasterFunction",rotationInfo_visualVariable:"esri/renderers/visualVariables/RotationVariable",sceneLayer:"esri/layers/SceneLayer",search:"esri/webdoc/applicationProperties/Search",search_layer:"esri/webdoc/applicationProperties/SearchLayer",search_layer_field:"esri/webdoc/applicationProperties/SearchLayerField",simpleRenderer:"esri/renderers/SimpleRenderer",siteLayerInfo:"esri/layers/support/SiteLayerInfo",sizeInfo_visualVariable:"esri/renderers/visualVariables/SizeVariable",sizeStop:"esri/renderers/visualVariables/support/SizeStop",sketchEdges:"esri/symbols/edges/SketchEdges3D",slide:"esri/webscene/Slide",slide_ground:"esri/webscene/support/SlideGround",solidEdges:"esri/symbols/support/SolidEdges3D",spatialReference:"esri/geometry/SpatialReference",styleSymbolReference:"esri/symbols/WebStyleSymbol",tableDataSource:"esri/layers/support/source/TableDataSource",textSymbol3DLayer:"esri/symbols/TextSymbol3DLayer",thumbnail:"esri/webdoc/support/Thumbnail",tiledElevationLayer:"esri/layers/ElevationLayer",tiledImageServiceLayer:"esri/layers/ImageryTileLayer",tiledMapServiceLayer:"esri/layers/TileLayer",tileInfo:"esri/layers/support/TileInfo",title:"esri/webscene/support/Title",transparencyInfo_visualVariable:"esri/renderers/visualVariables/OpacityVariable",transparencyStop:"esri/renderers/visualVariables/support/OpacityStop",transportationNetwork:"esri/webscene/TransportationNetwork",uniqueValueInfo:"esri/renderers/support/UniqueValueInfo",uniqueValueRenderer:"esri/renderers/UniqueValueRenderer",vectorTileLayer:"esri/layers/VectorTileLayer",verticalOffset:"esri/symbols/support/Symbol3DVerticalOffset",viewing:"esri/webdoc/applicationProperties/Viewing",viewpoint:"esri/Viewpoint",visibleLayer:"esri/webscene/support/SlideVisibleLayer",visualVariableLegendOptions:"esri/renderers/visualVariables/support/VisualVariableLegendOptions",voxelOpacityStop:"esri/layers/voxel/VoxelOpacityStop",voxelColorStop:"esri/layers/voxel/VoxelColorStop",voxelDynamicSection:"esri/layers/voxel/VoxelDynamicSection",voxelIsosurfaceStyle:"esri/layers/voxel/VoxelIsosurface",voxelLayer:"esri/layers/VoxelLayer",voxelRangeFilter:"esri/layers/voxel/VoxelRangeFilter",voxelSection:"esri/layers/voxel/VoxelSection",voxelShading:"esri/layers/voxel/VoxelSimpleShading",voxelSlice:"esri/layers/voxel/VoxelSlice",voxelStyle:"esri/layers/voxel/VoxelStyle",voxelTransferFunctionStyle:"esri/layers/voxel/VoxelTransferFunctionStyle",voxelUniqueValue:"esri/layers/voxel/VoxelUniqueValue",voxelVariableStyle:"esri/layers/voxel/VoxelVariableStyle",voxelVolumeStyle:"esri/layers/voxel/VoxelVolumeStyle",waterSymbol3DLayer:"esri/symbols/WaterSymbol3DLayer",webTiledLayer:"esri/layers/WebTileLayer",wfsLayer:"esri/layers/WFSLayer",wmsLayer:"esri/layers/WMSLayer",wmsLayer_layer:"esri/layers/support/WMSSublayer",wmtsInfo:"esri/layers/support/WMTSLayerInfo"},r=["baseMapLayer","buildingSceneLayer_filterMode","buildingSceneLayer_sublayer","classBreakInfo_authoringInfo","clippingArea","codedValue_domain","codedValue","color","colorRamp","customParameters","dataSource","definitionEditor","domain","drawingInfo","edges","elevationLayers","environment_background_color","feature","featureSet","field_authoringInfo","fieldInfo","floorFilter","format","geometry","inherited_domain","initialState","input","joinTableDataSource","kmlLayer","layerDefinition","locationInfo","mapRangeInfo","mediaInfo_chart_value","mediaInfo_chart","mediaInfo_image_value","mediaInfo","multidimensionalDefinition","navigationConstraint","operationalLayers","orderByFields","parameter","pointCloudFilter","pointCloudRenderers","pointSizeAlgorithm","popupElement","popupExpressionInfo","queryTableDataSource","range_domain","range","rasterClassBreaksRenderer","rasterDataElevationLayer","rasterDataLayer","rasterDataSource","rasterRenderers","rasterStretchRenderer","rasterUniqueValueRenderer","relatedRecordsInfo","renderer","source","styleOrigin","symbol3D","table","tableDataSource","template","transportationNetwork","type","uniqueValueFromStyleRenderer","value","version","visibleLayer","visualVariable","visualVariableLegendOptions","voxelLayerDefinition","wfsInfo","widgets"];export{r as ignoredSchemaDefinitions,e as schemaToClassModule};
5
+ export{scan as scanSpec}from"./spec.js";export{scan as scanAPI}from"./api.js";export{collectClassPaths,flatten}from"./utils.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{json as t}from"../../portal/schemas/webScene.js";import{ScanContext as r,sorted as n}from"./utils.js";function s(e,t){if(t.properties){if("layerType"in t.properties)return t.properties.layerType.enum[0];if("type"in t.properties&&t.properties.type.enum)return t.properties.type.enum[0]}switch(e){case"multipoint_geometry_schema.json":return"multipoint";case"point_geometry_schema.json":return"point";case"polyline_geometry_schema.json":return"polyline";case"polygon_geometry_schema.json":return"polygon";case"extent_schema.json":return"extent"}}function i(e){return"array"===e.type?`${i(e.items)}[]`:e.type}function a(e){const t={count:e.length,refsCount:0,typesCount:0,distinctTypes:[],type:null},r=new Set;for(const n in e){const s=e[n];s.$ref?t.refsCount++:s.type&&(t.typesCount++,r.add(i(s)))}return r.forEach((e=>t.distinctTypes.push(e))),t.distinctTypes.sort(),t.refsCount===t.count?t.type="refs":2===t.count&&t.refsCount>0&&1===t.distinctTypes.length&&"null"===t.distinctTypes[0]?t.type="refsAndNull":t.typesCount===t.count?(t.type="types",t.distinctTypes=t.distinctTypes):t.type="mix",t}function o(e,t){const r=t.stack[t.stack.length-1],n=t.definitions[r.klass.name];return n?.required&&n.required.includes(e.replace("[]",""))}function c(e){return"array"===e.type||!("properties"in e)}function l(e,t,r){if(!r.hasFilteredProperties)return`${e}--${t}`;return`${e}--${t}--${r.filteredPropertiesArray.join("/")}`}async function u(e,t,r,n,i){i.schemaStack.push(e);const a=s(e,r),u=n?n.replace("<?TYPE?>",a?`<${a}>`:""):"";if(c(r)){const n=i.currentClass?null:{type:e,name:e,id:`${e}--${t}`,typeValue:t,properties:[]};return n&&i.push(null,n),await T(r,u,i),i.schemaStack.pop(),n}const p=l(e,t,i),f="drawingInfo_schema.json"!==e&&"layer_schema.json"!==e&&i.seen.get(p);if(f&&u)return i.addProperty({name:u,type:f,required:o(u,i)}),i.schemaStack.pop(),f;const h={type:e,name:e,id:p,typeValue:t,properties:[]};return u&&i.addProperty({name:u,type:h,required:o(u,i)}),i.push(u,h),await T(r,"",i),i.schemaStack.pop(),i.pop()}async function p(e,t,r){const n=await r.requestSchema(e.$ref),s=L(n.schema);if(s){for(const e of s){const s={...n.schema};s.properties={...s.properties,type:{type:"string",enum:[e]}};const i=t&&!t.includes("<?TYPE?>")?`${t}<?TYPE?>`:t;await u(n.schemaId,e,s,i,r)}return}const i="layer_schema.json"===n.schemaId&&r.schemaStack.length?r.schemaStack[r.schemaStack.length-1].replace(/_schema\.json/,""):null;await u(n.schemaId,i,n.schema,t,r)}function f(e,t){if(!m(e))return!1;const r=e.stack.map((e=>e.klass.type)).join("/");return/.*pointCloudLayer_schema\.json\/layerDefinition_schema\.json\/drawingInfo_schema\.json$/.test(r)&&"renderer"===t}function h(e,t){if(!y(e)&&!d(e))return!1;const r=e.stack.map((e=>e.klass.type)).join("/");return(/.*(imageServiceLayer|tiledImageServiceLayer|wcsLayer)_schema\.json\/(layerDefinition|rasterLayerDefinition)_schema\.json\/rasterDrawingInfo_schema\.json$/.test(r)||/.*rasterPresetRenderer_schema\.json$/.test(r))&&"renderer"===t}function m(e){return!!e.currentClass&&"drawingInfo_schema.json"===e.currentClass.name}function y(e){return!!e.currentClass&&"rasterDrawingInfo_schema.json"===e.currentClass.name}function d(e){return!!e.currentClass&&"rasterPresetRenderer_schema.json"===e.currentClass.name}function _(e){switch(e.schemaStack[e.schemaStack.length-1]){case"operationalLayers_schema.json":case"elevationLayers_schema.json":case"baseMapLayer_schema.json":return!0}return!1}const w=/raster.*Renderer|vectorFieldRenderer/,j=/(uniqueValueRenderer|classBreaksRenderer|raster.*Renderer|vectorFieldRenderer)/,$=/(rasterUniqueValueRenderer|rasterClassBreaksRenderer)/;function g(e,t,r){if(m(r)||y(r)||d(r)){const n=f(r,t),s=h(r,t);return e.filter((e=>{if(/uniqueValueFromStyleRenderer_schema\.json$/.test(e.$ref))return!1;if(s)return j.test(e.$ref)&&!$.test(e.$ref);if(w.test(e.$ref))return!1;const t=/pointCloud.*Renderer/.test(e.$ref);return n===t}))}if(_(r)){const t=["kmlLayer","rasterDataElevationLayer","rasterDataLayer","object3DTilesLayer"];return e.filter((e=>!t.some((t=>e.$ref.replace(/.*\//,"")===`${t}_schema.json`))))}return e}async function P(e,t,r){await T(e.items,`${t}[]`,r)}async function S(e,t,r){for(const n in e.properties)if(!("webscene_schema.json"===r.currentClass?.name&&"mapRangeInfo"===n||"baseMap_schema.json"===r.currentClass?.name&&"elevationLayers"===n)){if(m(r)){const e=r.stack.map((e=>e.klass.type)).join("/");if(/imageServiceLayer|tiledImageServiceLayer/.test(e)&&"transparency"===n)continue}await r.withFilter(n,(async()=>{const s=t?`${t}.${n}`:n;await T(e.properties[n],s,r)}))}}function k(e,t="",r=new Set){for(const n of e)if("properties"in n)for(const e in n.properties){const s=n.properties[e],i=t?`${t}.${e}`:e,a=Object.keys(s);if(0===a.length||1===a.length&&"$ref"===a[0])r.add(i);else{if(1!==a.length||"allOf"!==a[0])throw new Error(`unexpected allOf filter construct: ${JSON.stringify(s)}`);r.add(i),k(s.allOf,i,r)}}return r}async function R(e,t,r){let n=null;for(const i of e.allOf)if("$ref"in i){if(n)throw new Error("Cannot process more than 1 ref in an allOf construct");n=i}else if(!("properties"in i))throw new Error("allOf construct only allows simple top-level property filters");const s=k(e.allOf);await r.addFilter(s,(()=>p(n,t,r)))}async function C(e,t,r){const s=a(e.oneOf);if("refs"!==s.type&&"refsAndNull"!==s.type)if("types"!==s.type)for(const n in e.oneOf){const s=`.oneOf[${n}]`;await T(e.oneOf[n],`${t}${s}`,r)}else r.addProperty({name:t,type:n(s.distinctTypes).join("|"),required:o(t,r)});else{const n=g(e.oneOf,t,r);for(const e of n)if("null"===e.type);else{const s=`${t||""}`+(1!==n.length?"<?TYPE?>":"");await T(e,s,r)}}}function L(e){if("layerDefinition"===e.title)return null;const t=e.properties?.type;return t?.enum?t.enum:null}async function q(e,t,r){await p(e,t,r)}async function O(e,t,r){let s="unknown";e.type&&(s=Array.isArray(e.type)?n(e.type).join("|"):e.type.replaceAll(" ","").split(",").join("|"));const i={name:t,type:s,default:e.default,required:o(t,r)};e.enum&&(i.enum=n(e.enum).map((e=>"string"==typeof e?`"${e}"`:`${e}`)).join("|")),r.addProperty(i)}async function T(e,t,r){return"array"===e.type?P(e,t,r):"properties"in e?S(e,t,r):"allOf"in e?R(e,t,r):"oneOf"in e?C(e,t,r):"$ref"in e?q(e,t,r):O(e,t,r)}const b="#/definitions/";function E(e){return 0===e.indexOf(b)?e.slice(b.length):e}async function I(e,t){const r=await v.create(e,t);return u(`${e||"webscene"}_schema.json`,null,r.schemaRoot,null,r)}class v extends r{constructor(e,t,r){super(),this.definitions=e,this.schemaRoot=t,this.requestSchema=r,this._filteredProperties=null,this.schemaStack=[],this.requestSchema.bind(this)}get hasFilteredProperties(){return!!this._filteredProperties&&this._filteredProperties.size>0}get filteredPropertiesArray(){const e=[];return this._filteredProperties?.forEach((t=>e.push(t))),e}async withFilter(e,t){if(!this.hasFilteredProperties)return t();if(!this._filteredProperties?.has(e))return;const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r.forEach((t=>{const r=t.split(".",2);r.length>1&&r[0]===e&&n(r[1])})),await t(),this._filteredProperties=r}async addFilter(e,t){const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r&&r.forEach(n),e&&e.forEach(n);const s=await t();return this._filteredProperties=r,s}static async create(e,t){return t?.useRemoteSchema?v.createRemote(e,t?.baseUrl):v.createLocal(e)}static createLocal(e){const r=e&&"webscene"!==e?t.definitions[`${e}_schema.json`]:t;return new v(t.definitions,r,v._getLocalSchemaRequest())}static async createRemote(e,t){const r=await v._getRemoteSchemaRequest(t),n=new v({},null,r),s=(await n.requestSchema(`${e||"webscene"}_schema.json`)).schema;return new v(n.definitions,s,r)}static _getLocalSchemaRequest(){return function(t){const r=E(t),n=this.definitions[r];return n?Promise.resolve({schemaId:r,schema:n}):Promise.reject(new e("spec-certification:spec-invalid-local-schema","Schema reference is not a local reference"))}}static async _getRemoteSchemaRequest(t){if(!t)return Promise.reject(new e("spec-certification:spec-missing-base-url","The base url of the remote schema directory must be specified when using a remote schema"));const r=v._getLocalSchemaRequest(),n=(await import("../../request.js")).default;return function(e){return r.call(this,e).catch((()=>n(`${t}/${e}`,{responseType:"json"}).then((t=>(this.definitions[E(e)]=t.data,{schemaId:e,schema:t.data})))))}}}const F=Object.keys(t.definitions).map((e=>e.replace(/_schema\.json$/,"")));export{I as scan,F as schemaDefinitions};
5
+ import e from"../../core/Error.js";import{json as t}from"../../portal/schemas/webScene.js";import{ScanContext as r,sorted as n}from"./utils.js";function s(e,t){if(t.properties){if("layerType"in t.properties)return t.properties.layerType.enum[0];if("type"in t.properties&&t.properties.type.enum)return t.properties.type.enum[0]}switch(e){case"multipoint_geometry_schema.json":return"multipoint";case"point_geometry_schema.json":return"point";case"polyline_geometry_schema.json":return"polyline";case"polygon_geometry_schema.json":return"polygon";case"extent_schema.json":return"extent"}}function i(e){return"array"===e.type?`${i(e.items)}[]`:e.type}function a(e){const t={count:e.length,refsCount:0,typesCount:0,distinctTypes:[],type:null},r=new Set;for(const n in e){const s=e[n];s.$ref?t.refsCount++:s.type&&(t.typesCount++,r.add(i(s)))}return r.forEach((e=>t.distinctTypes.push(e))),t.distinctTypes.sort(),t.refsCount===t.count?t.type="refs":2===t.count&&t.refsCount>0&&1===t.distinctTypes.length&&"null"===t.distinctTypes[0]?t.type="refsAndNull":t.typesCount===t.count?(t.type="types",t.distinctTypes=t.distinctTypes):t.type="mix",t}function o(e,t){const r=t.stack[t.stack.length-1],n=t.definitions[r.klass.name];return n?.required&&n.required.includes(e.replace("[]",""))}function c(e){return"array"===e.type||!("properties"in e)}function l(e,t,r){if(!r.hasFilteredProperties)return`${e}--${t}`;return`${e}--${t}--${r.filteredPropertiesArray.join("/")}`}async function u(e,t,r,n,i){i.schemaStack.push(e);const a=s(e,r),u=n?n.replace("<?TYPE?>",a?`<${a}>`:""):"";if(c(r)){const n=i.currentClass?null:{type:e,name:e,id:`${e}--${t}`,typeValue:t,properties:[]};return n&&i.push(null,n),await T(r,u,i),i.schemaStack.pop(),n}const p=l(e,t,i),f="drawingInfo_schema.json"!==e&&"layer_schema.json"!==e&&i.seen.get(p);if(f&&u)return i.addProperty({name:u,type:f,required:o(u,i)}),i.schemaStack.pop(),f;const h={type:e,name:e,id:p,typeValue:t,properties:[]};return u&&i.addProperty({name:u,type:h,required:o(u,i)}),i.push(u,h),await T(r,"",i),i.schemaStack.pop(),i.pop()}async function p(e,t,r){const n=await r.requestSchema(e.$ref),s=L(n.schema);if(s){for(const e of s){const s={...n.schema};s.properties={...s.properties,type:{type:"string",enum:[e]}};const i=t&&!t.includes("<?TYPE?>")?`${t}<?TYPE?>`:t;await u(n.schemaId,e,s,i,r)}return}const i="layer_schema.json"===n.schemaId&&r.schemaStack.length?r.schemaStack[r.schemaStack.length-1].replace(/_schema\.json/,""):null;await u(n.schemaId,i,n.schema,t,r)}function f(e,t){if(!m(e))return!1;const r=e.stack.map((e=>e.klass.type)).join("/");return/.*pointCloudLayer_schema\.json\/layerDefinition_schema\.json\/drawingInfo_schema\.json$/.test(r)&&"renderer"===t}function h(e,t){if(!y(e)&&!d(e))return!1;const r=e.stack.map((e=>e.klass.type)).join("/");return(/.*(imageServiceLayer|tiledImageServiceLayer|wcsLayer)_schema\.json\/(layerDefinition|rasterLayerDefinition)_schema\.json\/rasterDrawingInfo_schema\.json$/.test(r)||/.*rasterPresetRenderer_schema\.json$/.test(r))&&"renderer"===t}function m(e){return!!e.currentClass&&"drawingInfo_schema.json"===e.currentClass.name}function y(e){return!!e.currentClass&&"rasterDrawingInfo_schema.json"===e.currentClass.name}function d(e){return!!e.currentClass&&"rasterPresetRenderer_schema.json"===e.currentClass.name}function _(e){switch(e.schemaStack[e.schemaStack.length-1]){case"operationalLayers_schema.json":case"elevationLayers_schema.json":case"baseMapLayer_schema.json":return!0}return!1}const w=/raster.*Renderer|vectorFieldRenderer/,j=/(uniqueValueRenderer|classBreaksRenderer|raster.*Renderer|vectorFieldRenderer)/,$=/(rasterUniqueValueRenderer|rasterClassBreaksRenderer)/;function g(e,t,r){if(m(r)||y(r)||d(r)){const n=f(r,t),s=h(r,t);return e.filter((e=>{if(/uniqueValueFromStyleRenderer_schema\.json$/.test(e.$ref))return!1;if(s)return j.test(e.$ref)&&!$.test(e.$ref);if(w.test(e.$ref))return!1;const t=/pointCloud.*Renderer/.test(e.$ref);return n===t}))}if(_(r)){const t=["kmlLayer","rasterDataElevationLayer","rasterDataLayer","object3DTilesLayer"];return e.filter((e=>!t.some((t=>e.$ref.replace(/.*\//,"")===`${t}_schema.json`))))}return e}async function P(e,t,r){await T(e.items,`${t}[]`,r)}async function S(e,t,r){for(const n in e.properties)if(!("webscene_schema.json"===r.currentClass?.name&&"mapRangeInfo"===n||"baseMap_schema.json"===r.currentClass?.name&&"elevationLayers"===n)){if(m(r)){const e=r.stack.map((e=>e.klass.type)).join("/");if(/imageServiceLayer|tiledImageServiceLayer/.test(e)&&"transparency"===n)continue}await r.withFilter(n,(async()=>{const s=t?`${t}.${n}`:n;await T(e.properties[n],s,r)}))}}function k(e,t="",r=new Set){for(const n of e)if("properties"in n)for(const e in n.properties){const s=n.properties[e],i=t?`${t}.${e}`:e,a=Object.keys(s);if(0===a.length||1===a.length&&"$ref"===a[0])r.add(i);else{if(1!==a.length||"allOf"!==a[0])throw new Error(`unexpected allOf filter construct: ${JSON.stringify(s)}`);r.add(i),k(s.allOf,i,r)}}return r}async function R(e,t,r){let n=null;for(const i of e.allOf)if("$ref"in i){if(n)throw new Error("Cannot process more than 1 ref in an allOf construct");n=i}else if(!("properties"in i))throw new Error("allOf construct only allows simple top-level property filters");const s=k(e.allOf);await r.addFilter(s,(()=>p(n,t,r)))}async function C(e,t,r){const s=a(e.oneOf);if("refs"!==s.type&&"refsAndNull"!==s.type)if("types"!==s.type)for(const n in e.oneOf){const s=`.oneOf[${n}]`;await T(e.oneOf[n],`${t}${s}`,r)}else r.addProperty({name:t,type:n(s.distinctTypes).join("|"),required:o(t,r)});else{const n=g(e.oneOf,t,r);for(const e of n)if("null"===e.type);else{const s=`${t||""}`+(1!==n.length?"<?TYPE?>":"");await T(e,s,r)}}}function L(e){if("layerDefinition"===e.title)return null;const t=e.properties?.type;return t?.enum?t.enum:null}async function q(e,t,r){await p(e,t,r)}async function O(e,t,r){let s="unknown";e.type&&(s=Array.isArray(e.type)?n(e.type).join("|"):e.type.replaceAll(" ","").split(",").join("|"));const i={name:t,type:s,default:e.default,required:o(t,r)};e.enum&&(i.enum=n(e.enum).map((e=>"string"==typeof e?`"${e}"`:`${e}`)).join("|")),r.addProperty(i)}async function T(e,t,r){return"array"===e.type?P(e,t,r):"properties"in e?S(e,t,r):"allOf"in e?R(e,t,r):"oneOf"in e?C(e,t,r):"$ref"in e?q(e,t,r):O(e,t,r)}const b="#/definitions/";function E(e){return 0===e.indexOf(b)?e.slice(b.length):e}async function I(e,t){const r=await v.create(e,t);return u(`${e||"webscene"}_schema.json`,null,r.schemaRoot,null,r)}class v extends r{constructor(e,t,r){super(),this.definitions=e,this.schemaRoot=t,this.requestSchema=r,this._filteredProperties=null,this.schemaStack=[],this.requestSchema.bind(this)}get hasFilteredProperties(){return(this._filteredProperties?.size??0)>0}get filteredPropertiesArray(){const e=[];return this._filteredProperties?.forEach((t=>e.push(t))),e}async withFilter(e,t){if(!this.hasFilteredProperties)return t();if(!this._filteredProperties?.has(e))return;const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r.forEach((t=>{const r=t.split(".",2);r.length>1&&r[0]===e&&n(r[1])})),await t(),this._filteredProperties=r}async addFilter(e,t){const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r&&r.forEach(n),e&&e.forEach(n);const s=await t();return this._filteredProperties=r,s}static async create(e,t){return t?.useRemoteSchema?v.createRemote(e,t?.baseUrl):v.createLocal(e)}static createLocal(e){const r=e&&"webscene"!==e?t.definitions[`${e}_schema.json`]:t;return new v(t.definitions,r,v._getLocalSchemaRequest())}static async createRemote(e,t){const r=await v._getRemoteSchemaRequest(t),n=new v({},null,r),s=(await n.requestSchema(`${e||"webscene"}_schema.json`)).schema;return new v(n.definitions,s,r)}static _getLocalSchemaRequest(){return function(t){const r=E(t),n=this.definitions[r];return n?Promise.resolve({schemaId:r,schema:n}):Promise.reject(new e("spec-certification:spec-invalid-local-schema","Schema reference is not a local reference"))}}static async _getRemoteSchemaRequest(t){if(!t)return Promise.reject(new e("spec-certification:spec-missing-base-url","The base url of the remote schema directory must be specified when using a remote schema"));const r=v._getLocalSchemaRequest(),n=(await import("../../request.js")).default;return function(e){return r.call(this,e).catch((()=>n(`${t}/${e}`,{responseType:"json"}).then((t=>(this.definitions[E(e)]=t.data,{schemaId:e,schema:t.data})))))}}}const F=Object.keys(t.definitions).map((e=>e.replace(/_schema\.json$/,"")));export{I as scan,F as schemaDefinitions};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- function t(t){return e(t,"",new Set,{})}function e(t,n,s,r){if(s.has(t))return r;s.add(t),n&&t.id&&(r[n]=t);for(const p of t.properties)if("string"!=typeof p.type){const t=n?`${n}.${p.name}`:p.name;e(p.type,t,s,r)}return s.delete(t),r}function n(t){const e=s(t,"",[]);return e.sort(((t,e)=>(t.name??"").localeCompare(e.name??""))),e}function s(t,e,n){for(const r of t.properties){const t=e?`${e}.${r.name}`:r.name;"string"==typeof r.type?n.push({name:t,type:r.type,default:r.default,enum:r.enum}):0===r.type.properties.length?n.push({name:t,type:"unknown",default:r.default,enum:r.enum}):s(r.type,t,n)}return n}class r{constructor(){this.stack=[],this.seen=new Map}addProperty(t){this.currentClass?.properties.push(t)}push(t,e){this.seen.set(e.id,e),this.stack.push({klass:e,propertyName:t})}pop(){return this.stack.pop()?.klass??null}get currentClass(){return this.stack.length?this.stack[this.stack.length-1].klass:null}get pathString(){return this.stack.map((t=>t.propertyName)).filter((t=>!!t)).join(".")}}function p(t){const e=t.slice();return e.sort(),e}export{r as ScanContext,t as collectClassPaths,n as flatten,p as sorted};
5
+ function e(e){return t(e,"",new Set,new Map)}function t(e,s,n,r){if(n.has(e))return r;n.add(e),s&&e.id&&r.set(s,e);for(const a of e.properties)if("string"!=typeof a.type){const e=s?`${s}.${a.name}`:a.name;t(a.type,e,n,r)}return n.delete(e),r}function s(e){const t=n(e,"",[]);return t.sort(((e,t)=>(e.name??"").localeCompare(t.name??""))),t}function n(e,t,s){for(const r of e.properties){const e=t?`${t}.${r.name}`:r.name;"string"==typeof r.type?s.push({name:e,type:r.type,default:r.default,enum:r.enum}):0===r.type.properties.length?s.push({name:e,type:"unknown",default:r.default,enum:r.enum}):n(r.type,e,s)}return s}class r{constructor(){this.stack=[],this.seen=new Map,this._uniqueDeclaredClasses=new Map}[Symbol.dispose](){this.seen.clear(),this.stack.length=0,this._uniqueDeclaredClasses.clear()}getDeclaredClass(e){const{_uniqueDeclaredClasses:t}=this,s=e.prototype.declaredClass.replaceAll(".","/");let n=0;for(;;){const r=n?`${s}/${n}`:s;n++;const a=t.get(r);if(!a)return t.set(r,e),r;if(a===e)return r}}addProperty(e){this.currentClass?.properties.push(e)}push(e,t){this.seen.set(t.id,t),this.stack.push({klass:t,propertyName:e})}pop(){return this.stack.pop()?.klass??null}get currentClass(){return this.stack.length?this.stack[this.stack.length-1].klass:null}get pathString(){return this.stack.map((e=>e.propertyName)).filter((e=>!!e)).join(".")}}function a(e){const t=e.slice();return t.sort(),t}export{r as ScanContext,e as collectClassPaths,s as flatten,a as sorted};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";var s;let p=s=class extends o{constructor(){super(...arguments),this.text=""}clone(){return new s({text:this.text})}};r([t({type:String,json:{write:{isRequired:!0}}})],p.prototype,"text",void 0),p=s=r([e("esri.webscene.support.Description")],p);const c=p;export{c as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../core/Clonable.js";import s from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";let p=class extends(r.ClonableMixin(s)){constructor(){super(...arguments),this.text=""}};o([e({type:String,json:{write:{isRequired:!0}}})],p.prototype,"text",void 0),p=o([t("esri.webscene.support.Description")],p);const c=p;export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import e from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import p from"../SlideLegendInfo.js";var n;let c=n=class extends e{constructor(){super(...arguments),this.legendInfo=null}clone(){return new n({legendInfo:r(this.legendInfo)})}};o([s({type:p,json:{write:!0}})],c.prototype,"legendInfo",void 0),c=n=o([t("esri.webscene.support.SlideElements")],c);const i=c;export{i as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import s from"../../core/Clonable.js";import r from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import p from"../SlideLegendInfo.js";import{WebSceneAnalysesCollection as i,webSceneAnalysisCollectionProperty as n}from"./analysisUtils.js";let a=class extends(s.ClonableMixin(r)){constructor(o){super(o),this.analyses=new i,this.legendInfo=null}};o([e(n("analyses"))],a.prototype,"analyses",void 0),o([e({type:p,json:{write:!0}})],a.prototype,"legendInfo",void 0),a=o([t("esri.webscene.support.SlideElements")],a);const l=a;export{l as default};