@arcgis/core 5.2.0-next.13 → 5.2.0-next.15

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 (433) hide show
  1. package/arcgisGlobal.d.ts +3 -3
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{34544c79ce568f30a094.js → 011a4d4201696fa10408.js} +1 -1
  4. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +1 -0
  5. package/assets/esri/core/workers/chunks/03354e9256b2f77fd4f2.js +1 -0
  6. package/assets/esri/core/workers/chunks/0436fe89adc78696251c.js +1 -0
  7. package/assets/esri/core/workers/chunks/079b412d07d02504f1db.js +1 -0
  8. package/assets/esri/core/workers/chunks/{81808c3aead7dfac3049.js → 07ca020796c57cefda62.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0826d36dfbfa28442b70.js +1 -0
  10. package/assets/esri/core/workers/chunks/0b45d34938fa7862f746.js +1 -0
  11. package/assets/esri/core/workers/chunks/{7ad09ac5793e8d47b4b2.js → 0b55fc5050e718371e05.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0bf72e9d0a6deceeb406.js +1 -0
  13. package/assets/esri/core/workers/chunks/11c3b1e8ca21ad62fdd1.js +1 -0
  14. package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +1 -0
  15. package/assets/esri/core/workers/chunks/1a0903b1d2d5101977c6.js +1 -0
  16. package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +1 -0
  17. package/assets/esri/core/workers/chunks/1d81e667a580c5cdeda1.js +262 -0
  18. package/assets/esri/core/workers/chunks/1effde6a39ef0d4af525.js +1 -0
  19. package/assets/esri/core/workers/chunks/25c1f5e2561986330b80.js +1 -0
  20. package/assets/esri/core/workers/chunks/2bc4aff77c830061e16e.js +1 -0
  21. package/assets/esri/core/workers/chunks/2c3fc2805f6de0963789.js +1 -0
  22. package/assets/esri/core/workers/chunks/2c4f10eaf02ef090ee8f.js +1 -0
  23. package/assets/esri/core/workers/chunks/314bc1b356d43bfa72a8.js +1 -0
  24. package/assets/esri/core/workers/chunks/3526ab3b1f87c24ae6f8.js +1 -0
  25. package/assets/esri/core/workers/chunks/{8c443c52c846a096a250.js → 36dd3ad3ef2fbfc15cbd.js} +1 -1
  26. package/assets/esri/core/workers/chunks/39a10b2092a98083f4cf.js +1 -0
  27. package/assets/esri/core/workers/chunks/{5075e85e1eafd431a8c0.js → 39c994536ce6c1e5c956.js} +1 -1
  28. package/assets/esri/core/workers/chunks/3b74749db78bcba2bc16.js +1 -0
  29. package/assets/esri/core/workers/chunks/3bd32387af52fa48d747.js +1 -0
  30. package/assets/esri/core/workers/chunks/3d83ac791212b81c9d11.js +1 -0
  31. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +1 -0
  32. package/assets/esri/core/workers/chunks/3ecb906322a6a5c8c93b.js +1 -0
  33. package/assets/esri/core/workers/chunks/3f67162456a1f02190fa.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d63f532dd7d60ee8ef2c.js → 42e5e00610f281ca8ffa.js} +1 -1
  35. package/assets/esri/core/workers/chunks/44d0ca9d4c5f1722688c.js +1 -0
  36. package/assets/esri/core/workers/chunks/{73c355b895fd6a34fcb8.js → 45b560ca01fb566ba560.js} +1 -1
  37. package/assets/esri/core/workers/chunks/47d630561f3fce5c63c4.js +1 -0
  38. package/assets/esri/core/workers/chunks/4cc78493805671708a9b.js +1 -0
  39. package/assets/esri/core/workers/chunks/{e25bcfdd8f20f8a08b19.js → 4d57c771af4137f74bfb.js} +1 -1
  40. package/assets/esri/core/workers/chunks/4e4419282c4bf7ee4678.js +1 -0
  41. package/assets/esri/core/workers/chunks/4e59e5a5d0ff887ff899.js +1 -0
  42. package/assets/esri/core/workers/chunks/4e788fc6cb2ea936f676.js +1 -0
  43. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +1 -0
  44. package/assets/esri/core/workers/chunks/4f51963815b0d53ffbd9.js +1 -0
  45. package/assets/esri/core/workers/chunks/5100b5a6a506c704dfaf.js +1 -0
  46. package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +1 -0
  47. package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +1 -0
  48. package/assets/esri/core/workers/chunks/{2a5176533e78a92d8e5b.js → 57b7e5fde972d3ad7884.js} +1 -1
  49. package/assets/esri/core/workers/chunks/57e04b7ec238f7b24274.js +1 -0
  50. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +1 -0
  51. package/assets/esri/core/workers/chunks/5d8924fdcdb473d261cd.js +1 -0
  52. package/assets/esri/core/workers/chunks/62de9e83331fb10aac6a.js +2 -0
  53. package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js → 641cddee377599916de2.js} +2 -2
  54. package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +1 -0
  55. package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +1 -0
  56. package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +1 -0
  57. package/assets/esri/core/workers/chunks/{d3c760109a70a71448c5.js → 67773a9f031d9f1d672f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{26dca1d387183282276a.js → 6a1b6f8c868f8edce1d7.js} +1 -1
  59. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +1 -0
  60. package/assets/esri/core/workers/chunks/718d2d430c1a5a940b83.js +1 -0
  61. package/assets/esri/core/workers/chunks/71c996e1ae84d9daddf2.js +1 -0
  62. package/assets/esri/core/workers/chunks/73b0edabddbb72fe1104.js +1 -0
  63. package/assets/esri/core/workers/chunks/753e0b21e57c12c742ee.js +1 -0
  64. package/assets/esri/core/workers/chunks/764c8ba14ab74b66b391.js +1 -0
  65. package/assets/esri/core/workers/chunks/{1996f0a930abdd97b855.js → 7a8ed08cd173963b3112.js} +1 -1
  66. package/assets/esri/core/workers/chunks/7ee76504e7fea389a1c9.js +1 -0
  67. package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +1 -0
  68. package/assets/esri/core/workers/chunks/{cc697c4d9cdc116373dc.js → 81726d997a2d34449bb2.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{74e1826ad9e2c4fd3b42.js → 81883bca8a79ee2ddb00.js} +1 -1
  70. package/assets/esri/core/workers/chunks/85505a8b8b0794656d06.js +1 -0
  71. package/assets/esri/core/workers/chunks/859bc873e7af911a518f.js +1 -0
  72. package/assets/esri/core/workers/chunks/{8407c91cce31e087b41b.js → 886ae23a1d8fa21e531f.js} +1 -1
  73. package/assets/esri/core/workers/chunks/8927fb4aa68f7e541a39.js +30 -0
  74. package/assets/esri/core/workers/chunks/{3ff7aa216cd794d951e8.js → 8e99f937fd36cf2cd05f.js} +1 -1
  75. package/assets/esri/core/workers/chunks/8eda85fc01a71aedd9e4.js +1 -0
  76. package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +1 -0
  77. package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +1 -0
  78. package/assets/esri/core/workers/chunks/{c357c0a08b99c1e7f290.js → 9331969046f2b277d620.js} +1 -1
  79. package/assets/esri/core/workers/chunks/93d08d82ceab19e314f8.js +1 -0
  80. package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +1 -0
  81. package/assets/esri/core/workers/chunks/9f93c29af2a18f7cb160.js +1 -0
  82. package/assets/esri/core/workers/chunks/a0208e35b217808777c4.js +1 -0
  83. package/assets/esri/core/workers/chunks/{f25bb204cf6727f6fdef.js → a0876a52a3c2ad849370.js} +1 -1
  84. package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +1 -0
  85. package/assets/esri/core/workers/chunks/a4f3bcfabd4ad127abf2.js +1 -0
  86. package/assets/esri/core/workers/chunks/{5437a1c05c1bd2175981.js → a63bba226de6c5e464b0.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{7dcf804e1918b94fa4e1.js → a98905bf6050ad3b8721.js} +1 -1
  88. package/assets/esri/core/workers/chunks/a9f29ff36a7ae5bae686.js +1 -0
  89. package/assets/esri/core/workers/chunks/aa5f36d7ed59c625ba78.js +1 -0
  90. package/assets/esri/core/workers/chunks/b045bffb4f2eb9203183.js +1 -0
  91. package/assets/esri/core/workers/chunks/{de541ad390a8d258d2e6.js → b102beeeb7a919f68b51.js} +1 -1
  92. package/assets/esri/core/workers/chunks/b590402170ae289290d7.js +1 -0
  93. package/assets/esri/core/workers/chunks/b75a4753cea6544da8bb.js +1 -0
  94. package/assets/esri/core/workers/chunks/{1a527c0740d9f4fa0791.js → bc547cf814d6703cef59.js} +1 -1
  95. package/assets/esri/core/workers/chunks/bcc097271f5cdf0a97a7.js +1 -0
  96. package/assets/esri/core/workers/chunks/bd36c57dd0cd28dee55f.js +30 -0
  97. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
  98. package/assets/esri/core/workers/chunks/bf6ae205fbfbfcd1a0ee.js +1 -0
  99. package/assets/esri/core/workers/chunks/bfd1aef8ac795e1ce227.js +1 -0
  100. package/assets/esri/core/workers/chunks/c148ad0ea9258046ac1f.js +1 -0
  101. package/assets/esri/core/workers/chunks/{0f75c19d8e296a32e329.js → c2cd80b712f29e8cbb8d.js} +1 -1
  102. package/assets/esri/core/workers/chunks/c8460bdf60aca749ed05.js +30 -0
  103. package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +1 -0
  104. package/assets/esri/core/workers/chunks/cc0efa716b8414a44398.js +1 -0
  105. package/assets/esri/core/workers/chunks/{8f6833671c071b522923.js → cd66bd30f654fe571e57.js} +1 -1
  106. package/assets/esri/core/workers/chunks/cf41a66fb97c1076fb34.js +1 -0
  107. package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +1 -0
  108. package/assets/esri/core/workers/chunks/d3be4d914fc99a1d686c.js +1 -0
  109. package/assets/esri/core/workers/chunks/{6675d56f49d07a97dc40.js → dd0c1cf921369e2bc48b.js} +1 -1
  110. package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +1 -0
  111. package/assets/esri/core/workers/chunks/{89e09276086745aa21fa.js → e4e2f479c0c45ae1b2c3.js} +1 -1
  112. package/assets/esri/core/workers/chunks/e656fd5ecf9ac059a87b.js +1 -0
  113. package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +1 -0
  114. package/assets/esri/core/workers/chunks/{7a474ce61cf484df87b4.js → e80376832050a4b6d28a.js} +1 -1
  115. package/assets/esri/core/workers/chunks/e8546ab510fc9515bd23.js +1 -0
  116. package/assets/esri/core/workers/chunks/e9acc05b0cf9e05f31a8.js +1 -0
  117. package/assets/esri/core/workers/chunks/{58a7cdebc3d182c15ec6.js → eb91dc957c328674e119.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{87c2d4d58c2487324fb7.js → ed2a1c371dfc5d4a744e.js} +31 -31
  119. package/assets/esri/core/workers/chunks/f0832b413612c77a62ca.js +1 -0
  120. package/assets/esri/core/workers/chunks/f116331c6eca937aac8e.js +1 -0
  121. package/assets/esri/core/workers/chunks/{3b837b512999e6ab24bc.js → f148666308071bdb185a.js} +1 -1
  122. package/assets/esri/core/workers/chunks/f23e995320674b32e142.js +1 -0
  123. package/assets/esri/core/workers/chunks/f334bf192dff5af10a70.js +1 -0
  124. package/assets/esri/core/workers/chunks/f76b1fc36f5606cac2c8.js +1 -0
  125. package/assets/esri/core/workers/chunks/{893c0d28a5bf3f9f29f1.js → f93facf47aba9b128fcc.js} +1 -1
  126. package/assets/esri/core/workers/chunks/f955b35337a08f9f747d.js +1 -0
  127. package/assets/esri/core/workers/chunks/fa1336b60278017d2525.js +1 -0
  128. package/assets/esri/core/workers/chunks/fccc34b86454c56f27ab.js +1 -0
  129. package/assets/esri/core/workers/chunks/fea3b6bef761ef78630e.js +1 -0
  130. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  131. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  132. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  133. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  134. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -1
  135. package/assets/esri/themes/dark/main.css +1 -1
  136. package/assets/esri/themes/light/main.css +1 -1
  137. package/assets/esri/themes/light/view.css +1 -1
  138. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis.json +1 -1
  139. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_en.json +1 -1
  140. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  141. package/chunks/Component.glsl.js +8 -8
  142. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  143. package/chunks/GlobalIlluminationBlur.glsl.js +12 -12
  144. package/chunks/OITBlend.glsl.js +1 -24
  145. package/chunks/OITBlendEmission.glsl.js +9 -9
  146. package/chunks/OITDimOpaque.glsl.js +3 -9
  147. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  148. package/chunks/arcgis-knowledge-client-core.js +1 -1
  149. package/chunks/bundle2.js +1 -1
  150. package/chunks/lyr3DMain.js +1 -1
  151. package/config.js +1 -1
  152. package/core/promiseUtils.d.ts +1 -1
  153. package/core/promiseUtils.js +1 -1
  154. package/core/reactiveUtils.d.ts +410 -109
  155. package/core/units.js +1 -1
  156. package/form/types.d.ts +1 -1
  157. package/geometry/Mesh.d.ts +220 -95
  158. package/geometry/operators/support/projectionZScaling.js +1 -1
  159. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +35 -13
  160. package/geometry/support/MeshLocalVertexSpace.d.ts +32 -8
  161. package/geometry/support/MeshVertexAttributes.d.ts +6 -2
  162. package/geometry/support/heightModelInfoUtils.js +1 -1
  163. package/geometry/support/zscale.js +1 -1
  164. package/graphic/{AnnotationGraphicOrigin.d.ts → AnnotationFeatureGraphicOrigin.d.ts} +9 -9
  165. package/graphic/{AnnotationGraphicOrigin.js → AnnotationFeatureGraphicOrigin.js} +1 -1
  166. package/interfaces.d.ts +3 -3
  167. package/kernel.js +1 -1
  168. package/layers/{AnnotationLayer.d.ts → AnnotationFeatureLayer.d.ts} +24 -24
  169. package/layers/AnnotationFeatureLayer.js +2 -0
  170. package/layers/GaussianSplatLayer.d.ts +4 -1
  171. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  172. package/layers/graphics/data/QueryEngine.js +1 -1
  173. package/layers/graphics/data/queryUtils.js +1 -1
  174. package/layers/graphics/sources/MemorySource.js +1 -1
  175. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +1 -1
  176. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  177. package/layers/graphics/sources/support/parquetIdUtils.js +1 -1
  178. package/layers/mixins/OperationalLayer.js +1 -1
  179. package/layers/save/featureLayerUtils.js +1 -1
  180. package/layers/support/AnnotationSublayer.d.ts +7 -7
  181. package/layers/support/ExportImageServiceParameters.js +1 -1
  182. package/layers/support/FeatureEffect.d.ts +3 -2
  183. package/layers/support/arcgisLayers.js +1 -1
  184. package/layers/support/fetchService.js +1 -1
  185. package/layers/support/layerUtils.js +1 -1
  186. package/layers/support/layersLoader.js +1 -1
  187. package/layers/support/layersMapping.js +1 -1
  188. package/layers/support/parquetUtils.js +1 -1
  189. package/layers/support/schemaValidator.js +1 -1
  190. package/layers/types.d.ts +1 -1
  191. package/networks/Network.js +1 -1
  192. package/networks/UtilityNetwork.js +1 -1
  193. package/networks/support/networkFieldUtils.js +1 -1
  194. package/package.json +3 -3
  195. package/portal/schemas/definitions.js +1 -1
  196. package/portal/schemas/gaussianSplatLayerItem.js +2 -0
  197. package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
  198. package/portal/support/loadUtils.js +1 -1
  199. package/renderers/support/types.d.ts +1 -1
  200. package/renderers/visualVariables/RotationVariable.d.ts +1 -16
  201. package/renderers/visualVariables/RotationVariable.js +1 -1
  202. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -2
  203. package/rest/knowledgeGraph/ServiceDefinition.d.ts +1 -1
  204. package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
  205. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  206. package/rest/knowledgeGraphService.js +1 -1
  207. package/rest/networks/support/QueryAssociationsParameters.d.ts +2 -2
  208. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +2 -2
  209. package/rest/networks/support/TraceParameters.d.ts +2 -2
  210. package/rest/print.js +1 -1
  211. package/rest/support/AttributeBinsQuery.js +1 -1
  212. package/rest/support/Query.js +1 -1
  213. package/rest/support/TopFeaturesQuery.js +1 -1
  214. package/support/revision.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  216. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  217. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  218. package/views/2d/layerViewModuleImportUtils.js +1 -1
  219. package/views/2d/layers/AnnotationFeatureLayerView2D.js +2 -0
  220. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  221. package/views/2d/layers/TileLayerView2D.js +1 -1
  222. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  223. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  224. package/views/2d/types.d.ts +2 -2
  225. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  226. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  227. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  228. package/views/3d/layerViewModuleImportUtils.js +1 -1
  229. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  230. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  231. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  232. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  233. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  234. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  235. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  236. package/views/3d/terrain/Tile.js +1 -1
  237. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  238. package/views/3d/types.d.ts +1 -1
  239. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +7 -7
  240. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +29 -20
  241. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +2 -2
  242. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  243. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
  244. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  245. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  246. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  247. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  248. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  249. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  250. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  251. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  252. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  253. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
  254. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +1 -1
  255. package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +2 -0
  256. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  257. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  258. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  259. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  260. package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +2 -0
  261. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  262. package/views/3d/webgl-engine/lib/Material.js +1 -1
  263. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  264. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TexelFormatInfo.js +2 -0
  265. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  266. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  267. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  268. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  269. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  270. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  271. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  272. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  273. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  274. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  275. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  276. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  277. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  278. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  279. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  280. package/views/View2D.d.ts +2 -3
  281. package/views/layers/{AnnotationLayerView.d.ts → AnnotationFeatureLayerView.d.ts} +6 -6
  282. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  283. package/views/layers/FeatureLikeLayerView.js +1 -1
  284. package/webdoc/support/writeUtils.js +1 -1
  285. package/webdoc/widgets/FloorFilter.d.ts +14 -1
  286. package/webdoc/widgets/FloorFilter.js +1 -1
  287. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  288. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +12 -4
  289. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  290. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  291. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +2 -0
  292. package/widgets/BatchAttributeForm/VisibleElements.d.ts +8 -1
  293. package/widgets/BatchAttributeForm/VisibleElements.js +1 -1
  294. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  295. package/widgets/BatchAttributeForm/css.js +1 -1
  296. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  297. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  298. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  299. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  300. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  301. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  302. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  303. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  304. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  305. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  306. package/widgets/BatchAttributeForm/stringUtils.js +2 -0
  307. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  308. package/widgets/BatchAttributeForm/types.d.ts +19 -3
  309. package/widgets/BatchAttributeForm.js +1 -1
  310. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  311. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  312. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  313. package/widgets/Editor/EditorViewModel.d.ts +1 -1
  314. package/widgets/Editor/EditorViewModel.js +1 -1
  315. package/widgets/Editor/MergeFeaturesWorkflow.d.ts +3 -3
  316. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  317. package/widgets/Editor/SplitFeatureWorkflow.d.ts +3 -3
  318. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  319. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  320. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  321. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  322. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  323. package/widgets/Editor/UpdateWorkflow.js +1 -1
  324. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  325. package/widgets/Editor/support/SketchController.js +1 -1
  326. package/widgets/Editor/workflowUtils.js +1 -1
  327. package/widgets/Editor.js +1 -1
  328. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +10 -0
  329. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  330. package/widgets/Print/PrintViewModel.d.ts +11 -1
  331. package/widgets/Print/PrintViewModel.js +1 -1
  332. package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +0 -1
  333. package/assets/esri/core/workers/chunks/0bb159ba0226122465cf.js +0 -1
  334. package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +0 -1
  335. package/assets/esri/core/workers/chunks/160e5b99f1097a473e6b.js +0 -1
  336. package/assets/esri/core/workers/chunks/17e68828ca6ff6912d3e.js +0 -1
  337. package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +0 -1
  338. package/assets/esri/core/workers/chunks/1e340536d3c5f94920b5.js +0 -1
  339. package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +0 -1
  340. package/assets/esri/core/workers/chunks/24810c36ae09bb4e83dc.js +0 -1
  341. package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +0 -1
  342. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +0 -1
  343. package/assets/esri/core/workers/chunks/297ae764445e6f73a5ea.js +0 -1
  344. package/assets/esri/core/workers/chunks/29aba121db7f00e0cf81.js +0 -1
  345. package/assets/esri/core/workers/chunks/2a3145a595d19391bb8a.js +0 -1
  346. package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +0 -1
  347. package/assets/esri/core/workers/chunks/2b814bb51704a5b4fdc2.js +0 -30
  348. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +0 -1
  349. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +0 -1
  350. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +0 -1
  351. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +0 -1
  352. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +0 -30
  353. package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +0 -1
  354. package/assets/esri/core/workers/chunks/3c5534c576528c1921d2.js +0 -1
  355. package/assets/esri/core/workers/chunks/40b3cdf81c79bbc44527.js +0 -2
  356. package/assets/esri/core/workers/chunks/41f12eb7c9b7086528d5.js +0 -1
  357. package/assets/esri/core/workers/chunks/426156137f279d979ddd.js +0 -1
  358. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +0 -1
  359. package/assets/esri/core/workers/chunks/4714241189c13d0db897.js +0 -1
  360. package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +0 -1
  361. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +0 -1
  362. package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +0 -1
  363. package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +0 -1
  364. package/assets/esri/core/workers/chunks/537c5dd4cd0a067199d1.js +0 -1
  365. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +0 -1
  366. package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +0 -1
  367. package/assets/esri/core/workers/chunks/59dafa1e1340ea4043e6.js +0 -1
  368. package/assets/esri/core/workers/chunks/5c7aff9604b4576a0e1d.js +0 -1
  369. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +0 -1
  370. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +0 -1
  371. package/assets/esri/core/workers/chunks/603177137eb680afe371.js +0 -1
  372. package/assets/esri/core/workers/chunks/629099f05ca5c9ca1973.js +0 -1
  373. package/assets/esri/core/workers/chunks/62f78fa455d556008f6a.js +0 -1
  374. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +0 -1
  375. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +0 -1
  376. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +0 -1
  377. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
  378. package/assets/esri/core/workers/chunks/6f0341cfa4c68e6e60b3.js +0 -1
  379. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +0 -1
  380. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +0 -1
  381. package/assets/esri/core/workers/chunks/70229007d594536ba6a3.js +0 -1
  382. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +0 -1
  383. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +0 -1
  384. package/assets/esri/core/workers/chunks/851705cf276eae8d4d37.js +0 -1
  385. package/assets/esri/core/workers/chunks/882ee7ed8a3a0215f9b9.js +0 -1
  386. package/assets/esri/core/workers/chunks/890b7a1153b7f65eba9a.js +0 -1
  387. package/assets/esri/core/workers/chunks/9660ae52fb3951a19e9c.js +0 -1
  388. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +0 -1
  389. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +0 -1
  390. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +0 -1
  391. package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +0 -1
  392. package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +0 -1
  393. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +0 -1
  394. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +0 -1
  395. package/assets/esri/core/workers/chunks/c3cf9e6e91f71c9cc5f3.js +0 -1
  396. package/assets/esri/core/workers/chunks/c424a66f1546275e2bcb.js +0 -30
  397. package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
  398. package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +0 -1
  399. package/assets/esri/core/workers/chunks/cc3e895cff019e811c07.js +0 -1
  400. package/assets/esri/core/workers/chunks/d122431f3b0b88dcb488.js +0 -1
  401. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +0 -1
  402. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +0 -1
  403. package/assets/esri/core/workers/chunks/d2f47f21ce0b0ab4da17.js +0 -262
  404. package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
  405. package/assets/esri/core/workers/chunks/d468994822f9bc3d6279.js +0 -1
  406. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +0 -1
  407. package/assets/esri/core/workers/chunks/d64613209a9eb1eafb11.js +0 -1
  408. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +0 -1
  409. package/assets/esri/core/workers/chunks/d8ec0afb2b91ccf32e55.js +0 -1
  410. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +0 -1
  411. package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
  412. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +0 -1
  413. package/assets/esri/core/workers/chunks/e2de13810dce01b98520.js +0 -1
  414. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +0 -1
  415. package/assets/esri/core/workers/chunks/e5837e5ac6ef761f26a2.js +0 -1
  416. package/assets/esri/core/workers/chunks/e82488b9b3bb0c1dedb4.js +0 -1
  417. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +0 -1
  418. package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +0 -1
  419. package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +0 -1
  420. package/assets/esri/core/workers/chunks/f274a8e8c7ca4294e876.js +0 -1
  421. package/assets/esri/core/workers/chunks/f292c2c22a3822343118.js +0 -1
  422. package/assets/esri/core/workers/chunks/f4f642ddd4d5db7cbbb4.js +0 -1
  423. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +0 -1
  424. package/assets/esri/core/workers/chunks/f6d047358d14328f3622.js +0 -1
  425. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +0 -1
  426. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +0 -1
  427. package/layers/AnnotationLayer.js +0 -2
  428. package/views/2d/layers/AnnotationLayerView2D.js +0 -2
  429. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +0 -2
  430. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechniqueConfiguration.js +0 -2
  431. /package/assets/esri/core/workers/chunks/{40b3cdf81c79bbc44527.js.LICENSE.txt → 62de9e83331fb10aac6a.js.LICENSE.txt} +0 -0
  432. /package/assets/esri/core/workers/chunks/{9fee0110dc7fee4c95e2.js.LICENSE.txt → 641cddee377599916de2.js.LICENSE.txt} +0 -0
  433. /package/views/layers/{AnnotationLayerView.js → AnnotationFeatureLayerView.js} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../core/accessorSupport/decorators.js";import{FeatureLikeLayerView2D as o}from"./FeatureLikeLayerView2D.js";import t from"../../layers/FeatureLayerView.js";let s=class extends(o(t)){};s=e([r("esri.views.2d.layers.AnnotationFeatureLayerView2D")],s);const a=s;export{a as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import s from"../../../TrackGraphic.js";import{isSome as i}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{makeHandle as n,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import u from"../../../core/Logger.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{notDeepEqual as c}from"../../../core/object.js";import{createAbortError as p,ignoreAbortErrors as d,throwIfNotAbortError as y,isAbortError as m}from"../../../core/promiseUtils.js";import{watch as g,sync as f}from"../../../core/reactiveUtils.js";import{isScreenRect as w}from"../../../core/screenUtils.js";import{sqlAnd as v}from"../../../core/sql.js";import{getMetersPerUnitForSR as _}from"../../../core/units.js";import{property as b,subclass as S}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as A}from"../../../core/support/UpdatingHandles.js";import F from"../../../geometry/Extent.js";import{fromJSON as j}from"../../../geometry/support/jsonUtils.js";import x from"../../../geometry/support/rotate.js";import{isCurvedGeometry as E}from"../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as I}from"../../../geometry/support/curves/densifyCurvedGeometry.js";import k from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as O}from"../../../layers/graphics/featureConversionUtils.js";import U from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as R}from"../../../layers/support/featureLayerUtils.js";import{packFields as V}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as C}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as Q}from"../../../layers/support/timeSupport.js";import q from"../../../rest/support/AggregateFeatureSet.js";import M from"../../../rest/support/AttributeBinsFeatureSet.js";import H from"../../../rest/support/AttributeBinsQuery.js";import P from"../../../rest/support/FeatureSet.js";import L from"../../../rest/support/Query.js";import{HittestDrawHelper as T}from"../../../symbols/cim/CIMSymbolDrawHelper.js";import{symbolToCIM as W}from"../../../symbols/cim/CIMSymbolHelper.js";import{getDisplayedSymbol as D}from"../../../symbols/support/symbolUtils.js";import{LayerView2D as G}from"./LayerView2D.js";import{FeatureContainer as N}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as J}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as z}from"./features/FeatureSourceEventLog.js";import{AnnotationLayerAdapter as B}from"./features/layerAdapters/AnnotationLayerAdapter.js";import{CatalogFootprintLayerAdapter as Z}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{DimensionLayerAdapter as K}from"./features/layerAdapters/DimensionLayerAdapter.js";import{FeatureLayerAdapter as $}from"./features/layerAdapters/FeatureLayerAdapter.js";import{createFeatureIdInfo as X}from"./features/layerAdapters/featureServiceUtils.js";import{InMemoryLayerAdapter as Y}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as ee}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as te}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as re}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as se}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as ie}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as ae}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as oe}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import{DebouncedFeatureOverride as ne}from"./support/DebouncedFeatureOverride.js";import{FeatureCommandQueue as le}from"./support/FeatureCommandQueue.js";import{handleNoEngineError as ue}from"./support/handleNoEngineError.js";import{toJSONGeometryType as he}from"./support/util.js";import{getMapPointsFromScreen as ce}from"../support/hitTestUtils.js";import{FeatureTileSubscriptionManager as pe}from"../tiling/FeatureTileSubscriptionManager.js";import{RefreshableLayerView as de}from"../../layers/RefreshableLayerView.js";import{getHighlightName as ye}from"../../support/highlightOptionsUtils.js";function me(e,t){const r=new Set;return e&&e.forEach(e=>r.add(e)),t&&t.forEach(e=>r.add(e)),r.has("*")?["*"]:Array.from(r)}const ge=4294967294;function fe(e,t){return l(e.map(e=>g(()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t},t,f)))}function we(e){if(!e.geometry)return e;if(!E(e.geometry))return e;const t=.001/_(e.geometry.spatialReference),r=100;return{geometry:I(e.geometry,{maxSegmentsPerCurve:12e3,maxSegmentLength:r*t,maxDeviation:0}),attributes:e.attributes}}const ve=l=>{const f=de(G(l));let _=class extends f{constructor(){super(...arguments),this._commandsQueue=new le({process:e=>{switch(e.type){case"override-batch":return this._doOverride(e);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this.eventLog=new z,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new A,this._fields=null,this._hittestDrawHelper=null,this._sourceUpdating=!1,this.featureEffectView=new k}destroy(){this._editUpdatingHandles.destroy(),this._workerProxy?.destroy(),this._workerAttached.reject(p()),this._commandsQueue.destroy(),this._hittestDrawHelper?.destroy()}initialize(){this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new o("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===C(e)?.operations.supportsQuery)throw new o("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await J(t)}async _attachProxy(){const e=x(this.view.extent,this.view.rotation,this.view.center),t={tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON(),initialViewExtent:e.toJSON()};try{await this._workerProxy.pipeline.onAttach(t),this._workerAttached.resolve()}catch(r){this._workerAttached.reject(p()),y(r)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get layerAdapter(){switch(this.layer.type){case"annotation":return new B(this.layer);case"dimension-feature":return new K(this.layer);case"feature":return"memory"===this.layer.source.type?new Y(this.layer):new $(this.layer);case"geojson":case"csv":case"wfs":return new Y(this.layer);case"parquet":return new se(this.layer);case"subtype-group":return new ae(this.layer);case"ogc-feature":return new te(this.layer);case"stream":return new ie(this.layer);case"oriented-imagery":return new re(this.layer);case"knowledge-graph-sublayer":return new ee(this.layer);case"catalog-footprint":return new Z(this.layer);default:this.layer}return null}get timeExtent(){return Q(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}get usedMemory(){return this.container.usedMemory+this.eventLog.pipelineStatistics.usedMemory}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}highlight(e,t){let s;e instanceof r?s=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?s=[e]:a.isCollection(e)&&e.length>0?s=e.map(e=>e?.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(s="number"==typeof e[0]||"string"==typeof e[0]?e:e.map(e=>e?.getObjectId()));const o=s?.filter(i);if(!o?.length)return n();const l=ye(t);return this._addHighlights(o,l),n(()=>!this.destroyed&&this._removeHighlights(o,l))}async hitTest(e,i){const a=w(i),{trueHitIds:o,candidateHitIds:n}=await this.featureContainer.hitTest(i),l=await this.getWorker(),[u,h]=await Promise.all([l.pipeline.getDisplayFeatures(n),l.pipeline.getDisplayFeatures(o)]),{features:c,aggregates:p,tracks:d}=u,{features:y,aggregates:g,tracks:f}=h,v=[];if(a&&this.hasRenderer()){const e=new Map,t=new r;for(const r of c){t.attributes=r.attributes,t.geometry=j(r.geometry),t.symbol=null;const s=this.layerAdapter.getRenderer(t);if(!s){v.push(r);continue}const i=await D(t,{renderer:s,scale:this.view.scale,resolution:this.view.resolution,spatialReference:this.view.spatialReference,viewingMode:"2d",timeZone:this.view.timeZone});if(!i)continue;let a=null;const o=W(i);if("web-style"===o.type)try{const e=W(await o.fetchSymbol({acceptedFormats:["cim","web"]}));a="web-style"===e.type?null:e}catch(x){m(x),0;continue}else a=o;const n=a?.symbol;if(!n)continue;const l=this.view.stage.cimAnalyzer.analyzeSymbolReference(a,!1).some(e=>"alignment"in e&&0===e.alignment);e.set(r,{cimSymbol:n,isScreenAligned:l})}e.size>0&&!this._hittestDrawHelper&&(this._hittestDrawHelper=new T(this.view.stage.painter.textureManager.resourceManager));const{resolution:s,rotation:a}=this.view.state,o=ce(this.view,i);for(const[r,{cimSymbol:i,isScreenAligned:n}]of e){if(!r)continue;const e={hittestType:"rect",textInfo:null,mapRotation:a,resolution:s,searchDist:0,isScreenAligned:n};this._hittestDrawHelper.hitTest(o,i,r.geometry,e)&&v.push(r)}}else v.push(...c);const _=[...y,...v],b=[...g,...p],S=[...f,...d],A=this.featureContainer.getSortKeys(_.map(e=>e.displayId)),F=({displayId:e},{displayId:t})=>A.has(e)&&A.has(t)?A.get(e)-A.get(t):e-t;return _.sort(F).reverse(),b.sort(F).reverse(),[...b.map(r=>this._createAggregateGraphicHit(e,t.fromJSON(r))),...S.map(t=>this._createTrackGraphicHit(e,s.fromJSON(t))),..._.map(t=>this._createFeatureGraphicHit(a?null:e,r.fromJSON(t)))]}async queryAggregateSummaryStatistics(e,t,r){const s={...t,scale:this.view.scale},i=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),s,r);return ue(i,{})}async queryUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForUniqueValues(this._cleanUpQuery(e),i,r);return ue(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),i,r);return ue(a,{uniqueValueInfos:[]})}async queryAggregateClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),i,r);return ue(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForHistogram(this._cleanUpQuery(e),i,r);return ue(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return ue(r,0)}async queryAggregateHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),i,r);return ue(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return ue(r,[])}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return ue(r,{features:[]})}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),s=await ue(r,{features:[]});return M.fromJSON(s)}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),s=await ue(r,{features:[]}),i=q.fromJSON(s);return i.features.forEach(e=>this.layerAdapter.setAggregateGraphicOrigin?.(e)),i}async queryClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForClassBreaks(this._cleanUpQuery(e),i,r);return ue(a,{classBreakInfos:[]})}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),s=await ue(r,{count:0,extent:null});return{count:s.count,extent:F.fromJSON(s.extent)}}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return ue(r,0)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(e=>{const t=P.fromJSON(e);return t.features.forEach(e=>this._setOriginForFeature(e)),t})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return ue(r,{features:[]})}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return ue(r,[])}async queryStatistics(){const e=await this.getWorker();return ue(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),i,r);return ue(a,{})}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),s=await ue(r,{features:[]}),i=P.fromJSON(s);return i.features.forEach(e=>this._setOriginForFeature(e)),i}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._subscriptions)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const t=this.featureContainer.getPresenting(),r=this._subscriptions.update(e.targetState,this._lastTargetState,t);r&&(this.featureContainer.updateSubscriptions(r),d(this._updatingHandles.addPromise(this.getWorker().then(e=>e.pipeline.updateSubscriptions(r))))),this._subscriptions.coverage&&this.featureContainer.setCoverage(this._subscriptions.coverage)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),d(this._updatingHandles.addPromise(this._workerAttached.promise)),d(this._attachProxy()),this.featureContainer=new N(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._subscriptions=new pe(this.view.featuresTilingScheme),this.requestUpdate(),this.addAttachHandles([fe([()=>this._displayRefreshVersion,()=>"displayFilterInfo"in this.layer&&this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],()=>this._update()),g(()=>this.updateSuspended,e=>{e||this._subscriptions.resume(this.featureContainer.getPresenting())}),g(()=>this.view.stationary,async e=>{if(e){const e=await this.getWorker(),t=x(this.view.extent,this.view.rotation,this.view.center);e.pipeline.updateStationaryExtent(t.toJSON(),this.featureContainer.requiresRefresh)}})]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",e=>this._editUpdatingHandles.addPromise(this._edit(e))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this._subscriptions=h(this._subscriptions),this._workerProxy.pipeline.onDetach(),this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}addOverrides(e){return this._commandsQueue.push({type:"override",options:{...e,release:[]}})}removeOverrides(e){for(const r of e)if(null==r)throw new o("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:r});const t={added:[],updated:[],removed:[],release:e,isWeak:!1,historicMoment:null};return this._commandsQueue.push({type:"override",options:t})}onProxyClientEvent(e){}hasRenderer(){return"renderer"in this.layer&&null!=this.layer.renderer}isUpdating(){const e=this.hasRenderer(),t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,s=this.featureContainer.updating;return this.updateRequested||e&&(t||r)||s||this._pipelineUpdating||this.dataUpdating}_createClientOptions(){const e=this;return{updateSchemaStart:()=>e.updateSchemaStart(),updateSchemaEnd:t=>e.updateSchemaEnd(t),openMemoryPorts:async()=>{if(this.layerAdapter?.openMessagePorts){const e=await this.layerAdapter.openMessagePorts();return{result:e,transferList:e}}throw new Error("InternalError: Layer adapter does not support opening message ports")},get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.onProxyClientEvent(e)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const s of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(s));return r}return Promise.all(t.map(t=>e.view.stage.painter.textureManager.rasterizeItem(t)))},fetchDictionary:e=>Promise.all(e.map(e=>this._fetchDictionaryRequest(e))),fetchMesh:e=>Promise.all(e.map(e=>this._fetchMeshRequest(e)))}}async _fetchDictionaryRequest(e){try{if(!("renderer"in this.layer)||!this.layer.renderer||"dictionary"!==this.layer.renderer.type)throw new Error("InternalError: Expected renderer to be of type 'dictionary'");const t=this.layer.renderer,r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const s={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression};this._fields||(this._fields=this.layer.fields.map(e=>e.toJSON()));const i=r.visualVariableUniforms,a=he(this.layer.geometryType),o=await t.getSymbolForControlString(e.controlString,a,!1);if(!o||!o.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await oe({...o.data,hasTextStringTemplates:!0},{uniforms:i,path:"renderer",schemaOptions:s})}}catch(t){return{type:"dictionary-response",meshes:[]}}}async _fetchMeshRequest(e){const{layer:t}=this;try{const r={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:null};this._fields||(this._fields=t.fields.map(e=>e.toJSON()));return{type:"mesh-response",meshes:await oe({...e.symbolReference,hasTextStringTemplates:!0},{path:"anno-like",schemaOptions:r,uniforms:{visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null}})}}catch(r){return{type:"mesh-response",meshes:[]}}}_cleanUpQuery(e){const t=L.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),"returnZ"in this.layer&&(t.returnZ??=this.layer.returnZ),"returnM"in this.layer&&(t.returnM??=this.layer.returnM),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=H.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=L.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const s of t.aggregateIds??[])r.push(s);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}_edit(e){return this._commandsQueue.push({type:"edit",event:e})}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ge+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ge+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?u.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const s="globalIdField"in this.layer&&this.layer.globalIdField,i=s&&this.availableFields.includes(s);if(r.length&&!i)return u.getLogger(this).error(new o("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${s} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}_resolveOverrides(e){const t=!1,r=!1,s=he(this.layer.geometryType),i=X(this.layer),a=[];for(const n of e.added){const e=O(we(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.updated){const e=O(we(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.removed)if(null==n)throw new o("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:n});return{type:"override",updates:a,removed:e.removed,release:e.release,isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null}}async _resolveEdit(e){const t=this.layer,r=e.historicMoment?.getTime()??null,s="layerId"in t&&e.editedFeatures?.find(e=>e.layerId===t.layerId);if(s&&this._canEditByFeature(s)){const{adds:e,deletes:t,updates:i}=s.editedFeatures,a=this.layer.objectIdField,o=i.map(e=>e.current),n=t.map(e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e),l=await this._resolveIdenifiers(n);return this._resolveOverrides({added:e,updated:o,removed:l,historicMoment:r,isWeak:!0,release:[]})}const[i,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]);return{type:"override-by-id",updates:[...i,...a],removed:o,historicMoment:r,isWeak:!0}}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every(e=>this.view.spatialReference.equals(e.geometry?.spatialReference))&&r.every(e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference))}async updateSchemaStart(){const e=this.layer;"featureReduction"in e&&e.featureReduction&&e.featureReduction!==this._lastFeatureReduction&&(e.featureReduction=e.featureReduction?.clone(),this._lastFeatureReduction=e.featureReduction);try{if(await Promise.allSettled([this._handleChange(),R(e)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this._subscriptions)return null;const t=this.featureContainer.updateStart("subtype-group"===e.type);this._lastFeatureEffect=this.featureEffect;const r={store:t,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0},s=await this._createViewSchemaConfig(),i={source:await this.layerAdapter.createSourceSchema(s,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(r,s,this._displayRefreshVersion)};return c(this._lastSchema?.source.strategy,i.source.strategy)||c(this._lastSchema?.processor,i.processor)?(this._lastSchema=i,this._fields=null,i):null}catch(t){}return null}async updateSchemaEnd(e){try{this.featureEffectView.featureEffect=this._lastFeatureEffect,e&&this.featureEffectView.endTransition(),await this.featureContainer.updateEnd(this._lastSchema.processor,this.layerAdapter.getLabelingDeconflictionInfo(),e),has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.updateEnd")}catch(t){}}async _doUpdate(){const e=Math.round(performance.now()),t=await this.getWorker();await t.pipeline.updateSchema(e),this.requestUpdate()}async _doOverride(e){const t=await this.getWorker();try{let r=new ne;for(const s of e.messages)switch(s.type){case"edit":r.tryAdd(await this._resolveEdit(s.event))||(await t.pipeline.onOverride(r.toMessage()),r=new ne,r.tryAdd(await this._resolveEdit(s.event)));break;case"override":r.tryAdd(this._resolveOverrides(s.options))||(await t.pipeline.onOverride(r.toMessage()),r=new ne,r.tryAdd(this._resolveOverrides(s.options)));break}await t.pipeline.onOverride(r.toMessage())}catch(r){m(r),0}}_getEffectiveAvailableFields(e){const t=me(this._lastAvailableFields,e);return this._lastAvailableFields=t,V(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[E(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e,spatialReference:this.view.spatialReference,extent:this.view.extent,returnZ:this.hasZ,returnM:this.hasM}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch(e=>{m(e)||u.getLogger(this).error(e)});this._updatingHandles.consumePromise(r)}_setOriginForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin(e)}_createFeatureGraphicHit(e,t){return this._setOriginForFeature(t),this._createGraphicHit(e,t)}_createTrackGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setTrackGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createAggregateGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setAggregateGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createGraphicHit(e,t){return null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function E(e,t,r,s,i,a){i&&(i=i.clone());const o=null!=i?i.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(i??=new U,i.timeExtent=n),i=t.addFilters?.(i,e)??i,a&&(i??=new U,i.where=v(i.where,a));let l=i?.toJSON()??null;return s.size&&(l??=(new U).toJSON(),l.hiddenIds=Array.from(s)),l}return e([b()],_.prototype,"_commandsQueue",void 0),e([b()],_.prototype,"_sourceRefreshVersion",void 0),e([b()],_.prototype,"_displayRefreshVersion",void 0),e([b({readOnly:!0})],_.prototype,"_pipelineUpdating",void 0),e([b()],_.prototype,"_sourceUpdating",void 0),e([b({readOnly:!0})],_.prototype,"dataUpdating",null),e([b({readOnly:!0})],_.prototype,"hasAllFeatures",null),e([b({readOnly:!0})],_.prototype,"hasAllFeaturesInView",null),e([b({readOnly:!0})],_.prototype,"hasFullGeometries",null),e([b()],_.prototype,"featureEffectView",void 0),e([b()],_.prototype,"layerAdapter",null),e([b({readOnly:!0})],_.prototype,"timeExtent",null),_=e([S("esri.views.2d.layers.FeatureLikeLayerView2D")],_),_};export{ve as FeatureLikeLayerView2D};
2
+ import{__decorate as e}from"tslib";import t from"../../../AggregateGraphic.js";import r from"../../../Graphic.js";import s from"../../../TrackGraphic.js";import{isSome as i}from"../../../core/arrayUtils.js";import a from"../../../core/Collection.js";import o from"../../../core/Error.js";import{makeHandle as n,handlesGroup as l}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import u from"../../../core/Logger.js";import{destroyMaybe as h}from"../../../core/maybe.js";import{notDeepEqual as c}from"../../../core/object.js";import{createAbortError as p,ignoreAbortErrors as d,throwIfNotAbortError as y,isAbortError as m}from"../../../core/promiseUtils.js";import{watch as g,sync as f}from"../../../core/reactiveUtils.js";import{isScreenRect as w}from"../../../core/screenUtils.js";import{sqlAnd as v}from"../../../core/sql.js";import{getMetersPerUnitForSR as _}from"../../../core/units.js";import{property as b,subclass as S}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as A}from"../../../core/support/UpdatingHandles.js";import F from"../../../geometry/Extent.js";import{fromJSON as j}from"../../../geometry/support/jsonUtils.js";import x from"../../../geometry/support/rotate.js";import{isCurvedGeometry as E}from"../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as I}from"../../../geometry/support/curves/densifyCurvedGeometry.js";import k from"../../../layers/effects/FeatureEffectView.js";import{convertFromFeature as O}from"../../../layers/graphics/featureConversionUtils.js";import U from"../../../layers/support/FeatureFilter.js";import{checkServiceCurrentUserSupport as R}from"../../../layers/support/featureLayerUtils.js";import{packFields as V}from"../../../layers/support/fieldUtils.js";import{getEffectiveLayerCapabilities as C}from"../../../layers/support/layerUtils.js";import{combineTimeExtent as Q}from"../../../layers/support/timeSupport.js";import q from"../../../rest/support/AggregateFeatureSet.js";import M from"../../../rest/support/AttributeBinsFeatureSet.js";import H from"../../../rest/support/AttributeBinsQuery.js";import P from"../../../rest/support/FeatureSet.js";import L from"../../../rest/support/Query.js";import{HittestDrawHelper as T}from"../../../symbols/cim/CIMSymbolDrawHelper.js";import{symbolToCIM as W}from"../../../symbols/cim/CIMSymbolHelper.js";import{getDisplayedSymbol as D}from"../../../symbols/support/symbolUtils.js";import{LayerView2D as G}from"./LayerView2D.js";import{FeatureContainer as N}from"./features/FeatureContainer.js";import{createFeaturePipelineWorkerProxy as J}from"./features/FeaturePipelineWorkerProxy.js";import{FeatureSourceEventLog as z}from"./features/FeatureSourceEventLog.js";import{AnnotationLayerAdapter as B}from"./features/layerAdapters/AnnotationLayerAdapter.js";import{CatalogFootprintLayerAdapter as Z}from"./features/layerAdapters/CatalogFootprintLayerAdapter.js";import{DimensionLayerAdapter as K}from"./features/layerAdapters/DimensionLayerAdapter.js";import{FeatureLayerAdapter as $}from"./features/layerAdapters/FeatureLayerAdapter.js";import{createFeatureIdInfo as X}from"./features/layerAdapters/featureServiceUtils.js";import{InMemoryLayerAdapter as Y}from"./features/layerAdapters/InMemoryLayerAdapter.js";import{KnowledgeGraphSublayerAdapter as ee}from"./features/layerAdapters/KnowledgeGraphSublayerAdapter.js";import{OGCFeatureLayerAdapter as te}from"./features/layerAdapters/OGCFeatureLayerAdapter.js";import{OrientedImageryLayerAdapter as re}from"./features/layerAdapters/OrientedImageryLayerAdapter.js";import{ParquetLayerAdapter as se}from"./features/layerAdapters/ParquetLayerAdapter.js";import{StreamLayerAdapter as ie}from"./features/layerAdapters/StreamLayerAdapter.js";import{SubtypeGroupLayerAdapter as ae}from"./features/layerAdapters/SubtypeGroupLayerAdapter.js";import{createComplexSymbolInstances as oe}from"./features/schema/processor/symbols/ComplexSymbolSchema.js";import{DebouncedFeatureOverride as ne}from"./support/DebouncedFeatureOverride.js";import{FeatureCommandQueue as le}from"./support/FeatureCommandQueue.js";import{handleNoEngineError as ue}from"./support/handleNoEngineError.js";import{toJSONGeometryType as he}from"./support/util.js";import{getMapPointsFromScreen as ce}from"../support/hitTestUtils.js";import{FeatureTileSubscriptionManager as pe}from"../tiling/FeatureTileSubscriptionManager.js";import{RefreshableLayerView as de}from"../../layers/RefreshableLayerView.js";import{getHighlightName as ye}from"../../support/highlightOptionsUtils.js";function me(e,t){const r=new Set;return e&&e.forEach(e=>r.add(e)),t&&t.forEach(e=>r.add(e)),r.has("*")?["*"]:Array.from(r)}const ge=4294967294;function fe(e,t){return l(e.map(e=>g(()=>{const t=e();return t&&"object"==typeof t?"getTime"in t&&"function"==typeof t.getTime?t.getTime():JSON.stringify(t):t},t,f)))}function we(e){if(!e.geometry)return e;if(!E(e.geometry))return e;const t=.001/_(e.geometry.spatialReference),r=100;return{geometry:I(e.geometry,{maxSegmentsPerCurve:12e3,maxSegmentLength:r*t,maxDeviation:0}),attributes:e.attributes}}const ve=l=>{const f=de(G(l));let _=class extends f{constructor(){super(...arguments),this._commandsQueue=new le({process:e=>{switch(e.type){case"override-batch":return this._doOverride(e);case"update":return this._doUpdate();case"highlight":return this._updateHighlights()}}}),this._visibilityOverrides=new Set,this._lastAvailableFields=[],this._lastTargetState=null,this.eventLog=new z,this._sourceRefreshVersion=1,this._displayRefreshVersion=1,this._pipelineUpdating=!1,this._editUpdatingHandles=new A,this._fields=null,this._hittestDrawHelper=null,this._sourceUpdating=!1,this.featureEffectView=new k}destroy(){this._editUpdatingHandles.destroy(),this._workerProxy?.destroy(),this._workerAttached.reject(p()),this._commandsQueue.destroy(),this._hittestDrawHelper?.destroy()}initialize(){this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this.addResolvingPromise(this._initProxy()),this.featureEffectView.featureEffect=this.featureEffect,this.featureEffectView.endTransition()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new o("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:e});if(("feature"===e.type||"subtype-group"===e.type)&&!1===C(e)?.operations.supportsQuery)throw new o("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._workerProxy&&this._workerProxy.destroy();const t=this._createClientOptions();this._workerProxy=await J(t)}async _attachProxy(){const e=x(this.view.extent,this.view.rotation,this.view.center),t={tileInfoJSON:this.view?.featuresTilingScheme?.tileInfo?.toJSON(),initialViewExtent:e.toJSON()};try{await this._workerProxy.pipeline.onAttach(t),this._workerAttached.resolve()}catch(r){this._workerAttached.reject(p()),y(r)}}async _detachProxy(){return this._workerProxy.pipeline.onDetach()}async getWorker(){return await this._workerAttached.promise,this._workerProxy}get dataUpdating(){return this._sourceUpdating||this._editUpdatingHandles.updating}get hasAllFeatures(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryAllFeatures}get hasAllFeaturesInView(){const e=this.effectiveDisplayFilter?.where||null,t=!this.eventLog.willQueryAllFeatures&&null!=e&&"1=1"!==e;return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&!t}get hasFullGeometries(){return this.layer.visible&&!this.suspended&&this.eventLog.hasAllData&&this.eventLog.willQueryFullResolutionGeometry}get layerAdapter(){switch(this.layer.type){case"annotation-feature":return new B(this.layer);case"dimension-feature":return new K(this.layer);case"feature":return"memory"===this.layer.source.type?new Y(this.layer):new $(this.layer);case"geojson":case"csv":case"wfs":return new Y(this.layer);case"parquet":return new se(this.layer);case"subtype-group":return new ae(this.layer);case"ogc-feature":return new te(this.layer);case"stream":return new ie(this.layer);case"oriented-imagery":return new re(this.layer);case"knowledge-graph-sublayer":return new ee(this.layer);case"catalog-footprint":return new Z(this.layer);default:this.layer}return null}get timeExtent(){return Q(this.layerAdapter.timeOptions,this.view?.timeExtent,this._get("timeExtent"))}get usedMemory(){return this.container.usedMemory+this.eventLog.pipelineStatistics.usedMemory}getDisplayStatistics(e,t){return this.featureContainer?.getDisplayStatistics(e,t)}highlight(e,t){let s;e instanceof r?s=[e.getObjectId()]:"number"==typeof e||"string"==typeof e?s=[e]:a.isCollection(e)&&e.length>0?s=e.map(e=>e?.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(s="number"==typeof e[0]||"string"==typeof e[0]?e:e.map(e=>e?.getObjectId()));const o=s?.filter(i);if(!o?.length)return n();const l=ye(t);return this._addHighlights(o,l),n(()=>!this.destroyed&&this._removeHighlights(o,l))}async hitTest(e,i){const a=w(i),{trueHitIds:o,candidateHitIds:n}=await this.featureContainer.hitTest(i),l=await this.getWorker(),[u,h]=await Promise.all([l.pipeline.getDisplayFeatures(n),l.pipeline.getDisplayFeatures(o)]),{features:c,aggregates:p,tracks:d}=u,{features:y,aggregates:g,tracks:f}=h,v=[];if(a&&this.hasRenderer()){const e=new Map,t=new r;for(const r of c){t.attributes=r.attributes,t.geometry=j(r.geometry),t.symbol=null;const s=this.layerAdapter.getRenderer(t);if(!s){v.push(r);continue}const i=await D(t,{renderer:s,scale:this.view.scale,resolution:this.view.resolution,spatialReference:this.view.spatialReference,viewingMode:"2d",timeZone:this.view.timeZone});if(!i)continue;let a=null;const o=W(i);if("web-style"===o.type)try{const e=W(await o.fetchSymbol({acceptedFormats:["cim","web"]}));a="web-style"===e.type?null:e}catch(x){m(x),0;continue}else a=o;const n=a?.symbol;if(!n)continue;const l=this.view.stage.cimAnalyzer.analyzeSymbolReference(a,!1).some(e=>"alignment"in e&&0===e.alignment);e.set(r,{cimSymbol:n,isScreenAligned:l})}e.size>0&&!this._hittestDrawHelper&&(this._hittestDrawHelper=new T(this.view.stage.painter.textureManager.resourceManager));const{resolution:s,rotation:a}=this.view.state,o=ce(this.view,i);for(const[r,{cimSymbol:i,isScreenAligned:n}]of e){if(!r)continue;const e={hittestType:"rect",textInfo:null,mapRotation:a,resolution:s,searchDist:0,isScreenAligned:n};this._hittestDrawHelper.hitTest(o,i,r.geometry,e)&&v.push(r)}}else v.push(...c);const _=[...y,...v],b=[...g,...p],S=[...f,...d],A=this.featureContainer.getSortKeys(_.map(e=>e.displayId)),F=({displayId:e},{displayId:t})=>A.has(e)&&A.has(t)?A.get(e)-A.get(t):e-t;return _.sort(F).reverse(),b.sort(F).reverse(),[...b.map(r=>this._createAggregateGraphicHit(e,t.fromJSON(r))),...S.map(t=>this._createTrackGraphicHit(e,s.fromJSON(t))),..._.map(t=>this._createFeatureGraphicHit(a?null:e,r.fromJSON(t)))]}async queryAggregateSummaryStatistics(e,t,r){const s={...t,scale:this.view.scale},i=(await this.getWorker()).aggregates.executeQueryForSummaryStatistics(this._cleanUpAggregateQuery(e),s,r);return ue(i,{})}async queryUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForUniqueValues(this._cleanUpQuery(e),i,r);return ue(a,{uniqueValueInfos:[]})}async queryAggregateUniqueValues(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForUniqueValues(this._cleanUpAggregateQuery(e),i,r);return ue(a,{uniqueValueInfos:[]})}async queryAggregateClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForClassBreaks(this._cleanUpAggregateQuery(e),i,r);return ue(a,{classBreakInfos:[]})}async queryHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForHistogram(this._cleanUpQuery(e),i,r);return ue(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateCount(e,t){const r=(await this.getWorker()).aggregates.executeQueryForCount(this._cleanUpAggregateQuery(e),t);return ue(r,0)}async queryAggregateHistogram(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.aggregates.executeQueryForHistogram(this._cleanUpAggregateQuery(e),i,r);return ue(a,{bins:[],maxValue:null,minValue:null,normalizationTotal:null})}async queryAggregateIds(e,t){const r=(await this.getWorker()).aggregates.executeQueryForIds(this._cleanUpAggregateQuery(e),t);return ue(r,[])}async queryAggregateJSON(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t);return ue(r,{features:[]})}async queryAttributeBins(e,t){const r=(await this.getWorker()).features.executeAttributeBinsQuery(this._cleanUpAttributeBinsQuery(e),t),s=await ue(r,{features:[]});return M.fromJSON(s)}async queryAggregates(e,t){const r=(await this.getWorker()).aggregates.executeQuery(this._cleanUpAggregateQuery(e),t),s=await ue(r,{features:[]}),i=q.fromJSON(s);return i.features.forEach(e=>this.layerAdapter.setAggregateGraphicOrigin?.(e)),i}async queryClassBreaks(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForClassBreaks(this._cleanUpQuery(e),i,r);return ue(a,{classBreakInfos:[]})}async queryExtent(e,t){const r=(await this.getWorker()).features.executeQueryForExtent(this._cleanUpQuery(e),t),s=await ue(r,{count:0,extent:null});return{count:s.count,extent:F.fromJSON(s.extent)}}async queryFeatureCount(e,t){const r=(await this.getWorker()).features.executeQueryForCount(this._cleanUpQuery(e),t);return ue(r,0)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(e=>{const t=P.fromJSON(e);return t.features.forEach(e=>this._setOriginForFeature(e)),t})}async queryFeaturesJSON(e,t){const r=(await this.getWorker()).features.executeQuery(this._cleanUpQuery(e),t);return ue(r,{features:[]})}async queryHeatmapStatistics(e){return(await this.getWorker()).pipeline.queryHeatmapStatistics(e)}async queryObjectIds(e,t){const r=(await this.getWorker()).features.executeQueryForIds(this._cleanUpQuery(e),t);return ue(r,[])}async queryStatistics(){const e=await this.getWorker();return ue(e.pipeline.queryStatistics(),{featureCount:0,ringCount:0,vertexCount:0})}async querySummaryStatistics(e,t,r){const s=await this.getWorker(),i={...t,scale:this.view.scale},a=s.features.executeQueryForSummaryStatistics(this._cleanUpQuery(e),i,r);return ue(a,{})}async queryVisibleFeatures(e,t){const r=(await this.getWorker()).pipeline.queryVisibleFeatures(this._cleanUpQuery(e),t),s=await ue(r,{features:[]}),i=P.fromJSON(s);return i.features.forEach(e=>this._setOriginForFeature(e)),i}async getSampleFeatures(e){return(await this.getWorker()).pipeline.getSampleFeatures(e)}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._subscriptions)return;this.view.animation&&!this._lastTargetState&&(this._lastTargetState=e.state.clone()),!this.view.animation&&this._lastTargetState&&(this._lastTargetState=null);const t=this.featureContainer.getPresenting(),r=this._subscriptions.update(e.targetState,this._lastTargetState,t);r&&(this.featureContainer.updateSubscriptions(r),d(this._updatingHandles.addPromise(this.getWorker().then(e=>e.pipeline.updateSubscriptions(r))))),this._subscriptions.coverage&&this.featureContainer.setCoverage(this._subscriptions.coverage)}attach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.attach"),d(this._updatingHandles.addPromise(this._workerAttached.promise)),d(this._attachProxy()),this.featureContainer=new N(this),this.container.addChild(this.featureContainer),this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._subscriptions=new pe(this.view.featuresTilingScheme),this.requestUpdate(),this.addAttachHandles([fe([()=>this._displayRefreshVersion,()=>"displayFilterInfo"in this.layer&&this.layer.displayFilterInfo,()=>this.timeExtent,()=>this.clips,()=>this.filter,()=>this.effectiveDisplayFilterClause,()=>this.featureEffect,()=>this._sourceRefreshVersion,()=>this.view.timeZone,()=>this.view.timeExtent,...this.layerAdapter.getUpdateHashProperties(this.view)],()=>this._update()),g(()=>this.updateSuspended,e=>{e||this._subscriptions.resume(this.featureContainer.getPresenting())}),g(()=>this.view.stationary,async e=>{if(e){const e=await this.getWorker(),t=x(this.view.extent,this.view.rotation,this.view.center);e.pipeline.updateStationaryExtent(t.toJSON(),this.featureContainer.requiresRefresh)}})]),this._update(),"stream"!==this.layer.type&&"parquet"!==this.layer.type&&"catalog-footprint"!==this.layer.type&&this.addAttachHandles(this.layer.on("edits",e=>this._editUpdatingHandles.addPromise(this._edit(e))))}detach(){has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.detach"),this._detachProxy(),this._fields=null,this.featureContainer.destroy(),this.featureContainer=null,this._commandsQueue.clear(),this.container.removeAllChildren(),this._subscriptions=h(this._subscriptions),this._workerProxy.pipeline.onDetach(),this._workerAttached=Promise.withResolvers(),d(this._workerAttached.promise),this._lastAvailableFields=[],this._lastSchema=null}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}addOverrides(e){return this._commandsQueue.push({type:"override",options:{...e,release:[]}})}removeOverrides(e){for(const r of e)if(null==r)throw new o("featurelayerview:bad-override","Tried to remove an override for an invalid objectId",{objectId:r});const t={added:[],updated:[],removed:[],release:e,isWeak:!1,historicMoment:null};return this._commandsQueue.push({type:"override",options:t})}onProxyClientEvent(e){}hasRenderer(){return"renderer"in this.layer&&null!=this.layer.renderer}isUpdating(){const e=this.hasRenderer(),t=this._commandsQueue.updateTracking.updating,r=null!=this._updatingRequiredPromise,s=this.featureContainer.updating;return this.updateRequested||e&&(t||r)||s||this._pipelineUpdating||this.dataUpdating}_createClientOptions(){const e=this;return{updateSchemaStart:()=>e.updateSchemaStart(),updateSchemaEnd:t=>e.updateSchemaEnd(t),openMemoryPorts:async()=>{if(this.layerAdapter?.openMessagePorts){const e=await this.layerAdapter.openMessagePorts();return{result:e,transferList:e}}throw new Error("InternalError: Layer adapter does not support opening message ports")},get container(){return e.featureContainer},setUpdating:e=>{this._set("_pipelineUpdating",e.pipeline),this._set("_sourceUpdating",e.source)},emitEvent:e=>{this.onProxyClientEvent(e)},get eventLog(){return e.eventLog},fetch:async t=>{if(has("esri-2d-stabilize-glyphs")){const r=[];for(const s of t)r.push(await e.view.stage.painter.textureManager.rasterizeItem(s));return r}return Promise.all(t.map(t=>e.view.stage.painter.textureManager.rasterizeItem(t)))},fetchDictionary:e=>Promise.all(e.map(e=>this._fetchDictionaryRequest(e))),fetchMesh:e=>Promise.all(e.map(e=>this._fetchMeshRequest(e)))}}async _fetchDictionaryRequest(e){try{if(!("renderer"in this.layer)||!this.layer.renderer||"dictionary"!==this.layer.renderer.type)throw new Error("InternalError: Expected renderer to be of type 'dictionary'");const t=this.layer.renderer,r=this._lastSchema.processor.mesh.factory.symbology;if("dictionary"!==r.type)throw new Error("InternalError: Expected schema to be of type 'dictionary'");const s={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:r.scaleExpression};this._fields||(this._fields=this.layer.fields.map(e=>e.toJSON()));const i=r.visualVariableUniforms,a=he(this.layer.geometryType),o=await t.getSymbolForControlString(e.controlString,a,!1);if(!o||!o.data)return{type:"dictionary-response",meshes:[]};return{type:"dictionary-response",meshes:await oe({...o.data,hasTextStringTemplates:!0},{uniforms:i,path:"renderer",schemaOptions:s})}}catch(t){return{type:"dictionary-response",meshes:[]}}}async _fetchMeshRequest(e){const{layer:t}=this;try{const r={cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,store:this.featureContainer.instanceStore,scaleExpression:null};this._fields||(this._fields=t.fields.map(e=>e.toJSON()));return{type:"mesh-response",meshes:await oe({...e.symbolReference,hasTextStringTemplates:!0},{path:"anno-like",schemaOptions:r,uniforms:{visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null}})}}catch(r){return{type:"mesh-response",meshes:[]}}}_cleanUpQuery(e){const t=L.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),"returnZ"in this.layer&&(t.returnZ??=this.layer.returnZ),"returnM"in this.layer&&(t.returnM??=this.layer.returnM),t.toJSON()}_cleanUpAttributeBinsQuery(e){const t=H.from(e);return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t.toJSON()}_cleanUpAggregateQuery(e){const t=L.from(e)||this.createAggregateQuery();t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference);const r=t.objectIds??[];for(const s of t.aggregateIds??[])r.push(s);return t.objectIds=r,t.aggregateIds=[],t.toJSON()}async _update(){return this._commandsQueue.push({type:"update"})}_edit(e){return this._commandsQueue.push({type:"edit",event:e})}async doRefresh(e){this.attached&&(this.updateSuspended&&e||(e?this.incrementSourceRefreshVersion():this.incrementDisplayRefreshVersion()))}incrementSourceRefreshVersion(){this._sourceRefreshVersion=(this._sourceRefreshVersion+1)%ge+1}incrementDisplayRefreshVersion(){this._displayRefreshVersion=(this._displayRefreshVersion+1)%ge+1}async _resolveIdenifiers(e){const t=[],r=[];for(const a of e)null==a.objectId||-1===a.objectId?null==a.globalId?u.getLogger(this).warn("mapview-apply-edits","A feature identifier must contain either a GlobalId or ObjectId. Ignoring",{identifier:a}):r.push(a.globalId):t.push(a.objectId);const s="globalIdField"in this.layer&&this.layer.globalIdField,i=s&&this.availableFields.includes(s);if(r.length&&!i)return u.getLogger(this).error(new o("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${s} to be included the layer's outFields for updates to be reflected on the map`)),t;if(r.length){const e=await this._workerProxy.pipeline.getObjectIdsFromGlobalIds(r);for(const r of e)t.push(r)}return t}_resolveOverrides(e){const t=!1,r=!1,s=he(this.layer.geometryType),i=X(this.layer),a=[];for(const n of e.added){const e=O(we(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.updated){const e=O(we(n),s,t,r,i);if(null==e.objectId)throw new o("featurelayerview:bad-override","Feature does not have an objectId",{feature:n});a.push(e)}for(const n of e.removed)if(null==n)throw new o("featurelayerview:bad-override","Tried to remove an invalid objectId",{objectId:n});return{type:"override",updates:a,removed:e.removed,release:e.release,isWeak:e.isWeak??!1,historicMoment:e.historicMoment??null}}async _resolveEdit(e){const t=this.layer,r=e.historicMoment?.getTime()??null,s="layerId"in t&&e.editedFeatures?.find(e=>e.layerId===t.layerId);if(s&&this._canEditByFeature(s)){const{adds:e,deletes:t,updates:i}=s.editedFeatures,a=this.layer.objectIdField,o=i.map(e=>e.current),n=t.map(e=>"attributes"in e?{objectId:a?e.attributes[a]:null}:e),l=await this._resolveIdenifiers(n);return this._resolveOverrides({added:e,updated:o,removed:l,historicMoment:r,isWeak:!0,release:[]})}const[i,a,o]=await Promise.all([this._resolveIdenifiers(e.addedFeatures),this._resolveIdenifiers(e.updatedFeatures),this._resolveIdenifiers(e.deletedFeatures)]);return{type:"override-by-id",updates:[...i,...a],removed:o,historicMoment:r,isWeak:!0}}_canEditByFeature(e){const{adds:t,updates:r}=e.editedFeatures;return t.every(e=>this.view.spatialReference.equals(e.geometry?.spatialReference))&&r.every(e=>this.view.spatialReference.equals(e.current.geometry?.spatialReference))}async updateSchemaStart(){const e=this.layer;"featureReduction"in e&&e.featureReduction&&e.featureReduction!==this._lastFeatureReduction&&(e.featureReduction=e.featureReduction?.clone(),this._lastFeatureReduction=e.featureReduction);try{if(await Promise.allSettled([this._handleChange(),R(e)]),this.destroyed||!this.layerAdapter?.hasRequiredSupport||!this._subscriptions)return null;const t=this.featureContainer.updateStart("subtype-group"===e.type);this._lastFeatureEffect=this.featureEffect;const r={store:t,cimAnalyzer:this.view.stage.cimAnalyzer,cimResourceManager:this.view.stage.painter.textureManager.resourceManager,scaleExpression:void 0},s=await this._createViewSchemaConfig(),i={source:await this.layerAdapter.createSourceSchema(s,this._sourceRefreshVersion),processor:await this.layerAdapter.createProcessorSchema(r,s,this._displayRefreshVersion)};return c(this._lastSchema?.source.strategy,i.source.strategy)||c(this._lastSchema?.processor,i.processor)?(this._lastSchema=i,this._fields=null,i):null}catch(t){}return null}async updateSchemaEnd(e){try{this.featureEffectView.featureEffect=this._lastFeatureEffect,e&&this.featureEffectView.endTransition(),await this.featureContainer.updateEnd(this._lastSchema.processor,this.layerAdapter.getLabelingDeconflictionInfo(),e),has("esri-2d-update-debug")&&console.debug("FeatureLayerView2D.updateEnd")}catch(t){}}async _doUpdate(){const e=Math.round(performance.now()),t=await this.getWorker();await t.pipeline.updateSchema(e),this.requestUpdate()}async _doOverride(e){const t=await this.getWorker();try{let r=new ne;for(const s of e.messages)switch(s.type){case"edit":r.tryAdd(await this._resolveEdit(s.event))||(await t.pipeline.onOverride(r.toMessage()),r=new ne,r.tryAdd(await this._resolveEdit(s.event)));break;case"override":r.tryAdd(this._resolveOverrides(s.options))||(await t.pipeline.onOverride(r.toMessage()),r=new ne,r.tryAdd(this._resolveOverrides(s.options)));break}await t.pipeline.onOverride(r.toMessage())}catch(r){m(r),0}}_getEffectiveAvailableFields(e){const t=me(this._lastAvailableFields,e);return this._lastAvailableFields=t,V(this.layer.fieldsIndex,t)}async _createViewSchemaConfig(){const e=this.requiresCurrentUser?await this.signedInUser:null,t=[E(this.view,this.layerAdapter,this.timeExtent,this._visibilityOverrides,this.filter,this.effectiveDisplayFilterClause),this.featureEffect?.filter?.toJSON()??null];return{availableFields:this._getEffectiveAvailableFields(this.availableFields),displayFilterEnabled:this.displayFilterEnabled,filters:t,scale:this.view.scale,timeZone:this.view.timeZone,timeExtent:this.view.timeExtent,currentUser:e,spatialReference:this.view.spatialReference,extent:this.view.extent,returnZ:this.hasZ,returnM:this.hasM}}_processHighlight(){this._commandsQueue.push({type:"highlight"})}async _updateHighlights(){const e=this._getHighlights(),t=await this.getWorker();if(this.destroyed)return;const r=t.pipeline.updateHighlight({highlights:e}).catch(e=>{m(e)||u.getLogger(this).error(e)});this._updatingHandles.consumePromise(r)}_setOriginForFeature(e){e.layer=e.sourceLayer=this.layer,this.layerAdapter.setGraphicOrigin(e)}_createFeatureGraphicHit(e,t){return this._setOriginForFeature(t),this._createGraphicHit(e,t)}_createTrackGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setTrackGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createAggregateGraphicHit(e,t){return t.layer=t.sourceLayer=this.layer,this.layerAdapter.setAggregateGraphicOrigin?.(t),this._createGraphicHit(e,t)}_createGraphicHit(e,t){return null!=t.geometry&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};function E(e,t,r,s,i,a){i&&(i=i.clone());const o=null!=i?i.timeExtent:null,n=null!=r&&null!=o?r.intersection(o):r||o;n&&(i??=new U,i.timeExtent=n),i=t.addFilters?.(i,e)??i,a&&(i??=new U,i.where=v(i.where,a));let l=i?.toJSON()??null;return s.size&&(l??=(new U).toJSON(),l.hiddenIds=Array.from(s)),l}return e([b()],_.prototype,"_commandsQueue",void 0),e([b()],_.prototype,"_sourceRefreshVersion",void 0),e([b()],_.prototype,"_displayRefreshVersion",void 0),e([b({readOnly:!0})],_.prototype,"_pipelineUpdating",void 0),e([b()],_.prototype,"_sourceUpdating",void 0),e([b({readOnly:!0})],_.prototype,"dataUpdating",null),e([b({readOnly:!0})],_.prototype,"hasAllFeatures",null),e([b({readOnly:!0})],_.prototype,"hasAllFeaturesInView",null),e([b({readOnly:!0})],_.prototype,"hasFullGeometries",null),e([b()],_.prototype,"featureEffectView",void 0),e([b()],_.prototype,"layerAdapter",null),e([b({readOnly:!0})],_.prototype,"timeExtent",null),_=e([S("esri.views.2d.layers.FeatureLikeLayerView2D")],_),_};export{ve as FeatureLikeLayerView2D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as h,subclass as a}from"../../../core/accessorSupport/decorators.js";import{equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as l}from"../../../support/GraphicsCollection.js";import"../engine/Stage.js";import"../../../Color.js";import"../../../core/Accessor.js";import"../../../core/has.js";import"../../../core/mathUtils.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../../geometry/Point.js";import"../../../chunks/pe.js";import"../../../core/RandomLCG.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../engine/transitions/FadeTransition.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/Program.js";import"../../webgl/Renderbuffer.js";import"../../webgl/Texture.js";import"../../webgl/enums.js";import"../../webgl/Util.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../layers/effects/EffectView.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/number.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/GpuMeshState.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../request.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../../../core/urlUtils.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/spatialReferenceEllipsoidUtils.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2D as c}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as m,resampleImage as u}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import f from"../tiling/TileKey.js";import y from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import j from"../../layers/LayerView.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as T}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as b,MapServiceLayerViewHelper as V}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as v}from"../../support/drapedUtils.js";import{getHighlightName as U}from"../../support/highlightOptionsUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";const I=[0,0];let q=class extends(_(n(c(j)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new l,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new y({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:H.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),b(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new V({createFetchPopupFeaturesQueryGeometry:(e,i)=>v(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtTarget(e,i,t){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtTarget(i,t):[]}highlight(e,t){const s=T(e);if(0===s.length)return i();const r=U(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return o(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.size,this._updatingHandles.consumePromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(h){if(s(h))throw h;if(!this.resampling)return m(this._tileInfoView.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new f(t),h=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return u(this._tileInfoView,h,s,e)}}return m(this._tileInfoView.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:h,resamplingLevel:a=0}=i,o=new f(0,0,0,0);let l,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,o,{signal:h}),!this.resampling&&o.level!==e.level)return await r(i),m(this._tileInfoView.size);l=await this._fetchImage(o,h)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&a<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){o.set(t);try{l=await this._fetchTileWithTilemapCache(o,{...i,resamplingLevel:a+1})}catch{}}}}return l?this.resampling?u(this._tileInfoView,l,o,e):l:m(this._tileInfoView.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.size[0],e.bitmap.height=this._tileInfoView.size[1],e.once("attach",()=>this.requestUpdate()),e.once("isReady",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i}).then(({bitmap:e})=>e)}};e([h()],q.prototype,"resampling",null),e([h()],q.prototype,"tilemapCache",null),q=e([a("esri.views.2d.layers.TileLayerView2D")],q);const S=q;export{S as default};
2
+ import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as h,subclass as a}from"../../../core/accessorSupport/decorators.js";import{equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as l}from"../../../support/GraphicsCollection.js";import"../engine/Stage.js";import"../../../Color.js";import"../../../core/Accessor.js";import"../../../core/has.js";import"../../../core/mathUtils.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../../geometry/Point.js";import"../../../chunks/pe.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../../../core/RandomLCG.js";import"../engine/transitions/FadeTransition.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/Program.js";import"../../webgl/Renderbuffer.js";import"../../webgl/Texture.js";import"../../webgl/enums.js";import"../../webgl/Util.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../layers/effects/EffectView.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/number.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/GpuMeshState.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../request.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../../../core/urlUtils.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/spatialReferenceEllipsoidUtils.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2D as c}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as m,resampleImage as u}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import f from"../tiling/TileKey.js";import y from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import j from"../../layers/LayerView.js";import{RefreshableLayerView as _}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as T}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as b,MapServiceLayerViewHelper as V}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as v}from"../../support/drapedUtils.js";import{getHighlightName as U}from"../../support/highlightOptionsUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";const I=[0,0];let q=class extends(_(n(c(j)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new l,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new y({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:H.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),b(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new V({createFetchPopupFeaturesQueryGeometry:(e,i)=>v(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtTarget(e,i,t){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtTarget(i,t):[]}highlight(e,t){const s=T(e);if(0===s.length)return i();const r=U(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return o(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.size,this._updatingHandles.consumePromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(h){if(s(h))throw h;if(!this.resampling)return m(this._tileInfoView.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new f(t),h=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return u(this._tileInfoView,h,s,e)}}return m(this._tileInfoView.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:h,resamplingLevel:a=0}=i,o=new f(0,0,0,0);let l,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,o,{signal:h}),!this.resampling&&o.level!==e.level)return await r(i),m(this._tileInfoView.size);l=await this._fetchImage(o,h)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&a<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){o.set(t);try{l=await this._fetchTileWithTilemapCache(o,{...i,resamplingLevel:a+1})}catch{}}}}return l?this.resampling?u(this._tileInfoView,l,o,e):l:m(this._tileInfoView.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.size[0],e.bitmap.height=this._tileInfoView.size[1],e.once("attach",()=>this.requestUpdate()),e.once("isReady",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i}).then(({bitmap:e})=>e)}};e([h()],q.prototype,"resampling",null),e([h()],q.prototype,"tilemapCache",null),q=e([a("esri.views.2d.layers.TileLayerView2D")],q);const S=q;export{S as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../../../../request.js";import t from"../../../../../../../core/Error.js";import has from"../../../../../../../core/has.js";import a from"../../../../../../../core/workers/Connection.js";import{toQuantizationTransform as r}from"../../../../../../../geometry/support/quantizationUtils.js";import{convertFromFeatureSet as s,quantizeOptimizedFeatureSet as i}from"../../../../../../../layers/graphics/featureConversionUtils.js";import{checkProjectionSupport as o}from"../../../../../../../layers/graphics/data/projectionSupport.js";import{queryOptimizedFeatureSet as n}from"../../../../../../../layers/ogc/ogcFeatureUtils.js";import{executeQueryPBFBuffer as u,getQueryParameters as c,executeQuery as m}from"../../../../../../../rest/query/operations/query.js";import{FeatureSetReaderAnnotationJSON as l}from"../../../support/FeatureSetReaderAnnotationJSON.js";import{FeatureSetReaderDimensionJSON as p}from"../../../support/FeatureSetReaderDimensionJSON.js";import{FeatureSetReaderJSON as d}from"../../../support/FeatureSetReaderJSON.js";import{FeatureSetReaderPBF as f}from"../../../support/FeatureSetReaderPBF.js";import{annotationVirtualFields as h,dimensionVirtualFields as y}from"../../../../support/annodime/fields.js";class _{constructor(e,t){this.service=e,this._metadata=t}destroy(){}}function w(e,t,a){switch(e.type){case"memory":return new z(e,t,a);case"ogc":return new x(e,t);case"feature-service":return e.queryMetadata.supportsFormatPBF&&has("featurelayer-pbf")?new F(e,t):"annotation"===t.layerType?new j(e,t):"dimension-feature"===t.layerType?new P(e,t):new S(e,t)}}async function q(e){const t=new a;return await t.open(e,{}),t}class z extends _{constructor(e,t,a){super(e,t),this._ports=[],this._loaded=this._load(a)}destroy(){this._loaded.finally(()=>{this._client.close(),this._client=null;for(const e of this._ports)e.close()}).catch(()=>{})}async _load(e){this._ports=await e.layerView.openMemoryPorts(),this._client=await q(this._ports)}async executeQuery(e,t){await this._loaded;const a=await this._client.invoke("queryFeatures",e.toJSON(),t);return d.fromFeatureSet(a,this._metadata)}}class F extends _{async executeQuery(a,r){const s=await u(this.service.source,a,r),i=!a.quantizationParameters;try{return f.fromBuffer(s,this._metadata,i)}catch(o){const s=await c(this.service.source,a,"pbf",r??{}),{data:{url:i}}=await e(s.url,{responseType:"native-request-init",...s.options});throw new t("featurelayer:query","Failed to parse response",{url:i,error:o,query:a.toJSON()})}}}class S extends _{async executeQuery(e,t){const{source:a,queryMetadata:o}=this.service,n=null;if(null!=e.quantizationParameters&&!o.supportsQuantization){const o=e.clone(),u=r(o.quantizationParameters);o.quantizationParameters=null;const c=await m(a,o,n,t),l=s(c,this._metadata.featureIdInfo);return i(u,l),d.fromOptimizedFeatureSet(l,this._metadata)}const u=await m(a,e,n,t);return"esriGeometryPoint"===this._metadata.geometryType&&(u.features=u.features?.filter(e=>{if(null!=e.geometry){const t=e.geometry;return Number.isFinite(t.x)&&Number.isFinite(t.y)}return!0})),d.fromFeatureSet(u,this._metadata)}}class j extends _{constructor(e,t){super(e,t),this._loaded=this._load()}async _load(){await o(this._metadata.spatialReference,this._metadata.outSpatialReference)}async executeQuery(e,t){await this._loaded;const{source:a}=this.service,o=e.clone(),n=r(o.quantizationParameters);o.quantizationParameters=null;const u=await m(a,o,this._metadata.spatialReference,t),c=s(u,this._metadata.featureIdInfo);return c.fields.push(...h),i(n,c),l.fromOptimizedFeatureSet(c,this._metadata)}}class P extends _{constructor(e,t){super(e,t),this._loaded=this._load()}async _load(){await o(this._metadata.spatialReference,this._metadata.outSpatialReference)}async executeQuery(e,t){await this._loaded;const{source:a}=this.service,o=e.clone(),n=r(o.quantizationParameters);o.quantizationParameters=null;const u=await m(a,o,this._metadata.spatialReference,t),c=s(u,this._metadata.featureIdInfo);return c.fields.push(...y),i(n,c),p.fromOptimizedFeatureSet(c,this._metadata)}}class x extends _{async executeQuery(e,t){if(e.quantizationParameters&&!this.service.queryMetadata.supportsQuantization){const a=e.clone(),s=r(a.quantizationParameters);a.quantizationParameters=null;const o=await n(this.service.source,e,t);return i(s,o),d.fromOptimizedFeatureSet(o,this._metadata)}const a=await n(this.service.source,e,t);return d.fromOptimizedFeatureSet(a,this._metadata)}}export{_ as SourceAdapter,w as createQueryAdapter};
2
+ import e from"../../../../../../../request.js";import t from"../../../../../../../core/Error.js";import has from"../../../../../../../core/has.js";import a from"../../../../../../../core/workers/Connection.js";import{toQuantizationTransform as r}from"../../../../../../../geometry/support/quantizationUtils.js";import{convertFromFeatureSet as s,quantizeOptimizedFeatureSet as i}from"../../../../../../../layers/graphics/featureConversionUtils.js";import{checkProjectionSupport as o}from"../../../../../../../layers/graphics/data/projectionSupport.js";import{queryOptimizedFeatureSet as n}from"../../../../../../../layers/ogc/ogcFeatureUtils.js";import{executeQueryPBFBuffer as u,getQueryParameters as c,executeQuery as m}from"../../../../../../../rest/query/operations/query.js";import{FeatureSetReaderAnnotationJSON as l}from"../../../support/FeatureSetReaderAnnotationJSON.js";import{FeatureSetReaderDimensionJSON as p}from"../../../support/FeatureSetReaderDimensionJSON.js";import{FeatureSetReaderJSON as d}from"../../../support/FeatureSetReaderJSON.js";import{FeatureSetReaderPBF as f}from"../../../support/FeatureSetReaderPBF.js";import{annotationVirtualFields as h,dimensionVirtualFields as y}from"../../../../support/annodime/fields.js";class _{constructor(e,t){this.service=e,this._metadata=t}destroy(){}}function w(e,t,a){switch(e.type){case"memory":return new z(e,t,a);case"ogc":return new x(e,t);case"feature-service":return e.queryMetadata.supportsFormatPBF&&has("featurelayer-pbf")?new F(e,t):"annotation-feature"===t.layerType?new j(e,t):"dimension-feature"===t.layerType?new P(e,t):new S(e,t)}}async function q(e){const t=new a;return await t.open(e,{}),t}class z extends _{constructor(e,t,a){super(e,t),this._ports=[],this._loaded=this._load(a)}destroy(){this._loaded.finally(()=>{this._client.close(),this._client=null;for(const e of this._ports)e.close()}).catch(()=>{})}async _load(e){this._ports=await e.layerView.openMemoryPorts(),this._client=await q(this._ports)}async executeQuery(e,t){await this._loaded;const a=await this._client.invoke("queryFeatures",e.toJSON(),t);return d.fromFeatureSet(a,this._metadata)}}class F extends _{async executeQuery(a,r){const s=await u(this.service.source,a,r),i=!a.quantizationParameters;try{return f.fromBuffer(s,this._metadata,i)}catch(o){const s=await c(this.service.source,a,"pbf",r??{}),{data:{url:i}}=await e(s.url,{responseType:"native-request-init",...s.options});throw new t("featurelayer:query","Failed to parse response",{url:i,error:o,query:a.toJSON()})}}}class S extends _{async executeQuery(e,t){const{source:a,queryMetadata:o}=this.service,n=null;if(null!=e.quantizationParameters&&!o.supportsQuantization){const o=e.clone(),u=r(o.quantizationParameters);o.quantizationParameters=null;const c=await m(a,o,n,t),l=s(c,this._metadata.featureIdInfo);return i(u,l),d.fromOptimizedFeatureSet(l,this._metadata)}const u=await m(a,e,n,t);return"esriGeometryPoint"===this._metadata.geometryType&&(u.features=u.features?.filter(e=>{if(null!=e.geometry){const t=e.geometry;return Number.isFinite(t.x)&&Number.isFinite(t.y)}return!0})),d.fromFeatureSet(u,this._metadata)}}class j extends _{constructor(e,t){super(e,t),this._loaded=this._load()}async _load(){await o(this._metadata.spatialReference,this._metadata.outSpatialReference)}async executeQuery(e,t){await this._loaded;const{source:a}=this.service,o=e.clone(),n=r(o.quantizationParameters);o.quantizationParameters=null;const u=await m(a,o,this._metadata.spatialReference,t),c=s(u,this._metadata.featureIdInfo);return c.fields.push(...h),i(n,c),l.fromOptimizedFeatureSet(c,this._metadata)}}class P extends _{constructor(e,t){super(e,t),this._loaded=this._load()}async _load(){await o(this._metadata.spatialReference,this._metadata.outSpatialReference)}async executeQuery(e,t){await this._loaded;const{source:a}=this.service,o=e.clone(),n=r(o.quantizationParameters);o.quantizationParameters=null;const u=await m(a,o,this._metadata.spatialReference,t),c=s(u,this._metadata.featureIdInfo);return c.fields.push(...y),i(n,c),p.fromOptimizedFeatureSet(c,this._metadata)}}class x extends _{async executeQuery(e,t){if(e.quantizationParameters&&!this.service.queryMetadata.supportsQuantization){const a=e.clone(),s=r(a.quantizationParameters);a.quantizationParameters=null;const o=await n(this.service.source,e,t);return i(s,o),d.fromOptimizedFeatureSet(o,this._metadata)}const a=await n(this.service.source,e,t);return d.fromOptimizedFeatureSet(a,this._metadata)}}export{_ as SourceAdapter,w as createQueryAdapter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{createComplexSymbolInstances as a}from"../../features/schema/processor/symbols/ComplexSymbolSchema.js";import{getCIMSymbols as i}from"./cimAnnotations.js";import{getSymbolCollection as t}from"./utils.js";async function l(i,t){const l={visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null};return{point:await a({...i.point.data,hasTextStringTemplates:!0},{schemaOptions:t,uniforms:l}),line:await a({...i.line.data,hasTextStringTemplates:!0},{schemaOptions:t,uniforms:l}),multipoint:await a({...i.multipoint.data,hasTextStringTemplates:!0},{schemaOptions:t,uniforms:l})}}async function n(a,n){const s=t(a),e=i(s),o={};for(const i in e){const a=e[i],t=await l(a,n);o[i]=t}return{type:"annotation",meshes:o,symbolCollection:s}}export{n as getAnnotationMatcherSchema};
2
+ import{createComplexSymbolInstances as a}from"../../features/schema/processor/symbols/ComplexSymbolSchema.js";import{getCIMSymbols as i}from"./cimAnnotations.js";import{getSymbolCollection as t}from"./utils.js";async function l(i,t){const l={visualVariableColor:null,visualVariableOpacity:null,visualVariableRotation:null,visualVariableSizeStops:null,visualVariableSizeScaleStops:null,visualVariableSizeOutlineScaleStops:null,visualVariableSizeUnitValue:null,visualVariableSizeMinMaxValue:null};return{point:await a({...i.point.data,hasTextStringTemplates:!0},{schemaOptions:t,uniforms:l}),line:await a({...i.line.data,hasTextStringTemplates:!0},{schemaOptions:t,uniforms:l}),multipoint:await a({...i.multipoint.data,hasTextStringTemplates:!0},{schemaOptions:t,uniforms:l})}}async function e(a,e){const n=t(a),s=i(n),o={};for(const i in s){const a=s[i],t=await l(a,e);o[i]=t}return{type:"annotation-feature",meshes:o,symbolCollection:n}}export{e as getAnnotationMatcherSchema};
@@ -1,5 +1,5 @@
1
1
  import type Layer from "../../layers/Layer.js";
2
- import type AnnotationLayerView from "../layers/AnnotationLayerView.js";
2
+ import type AnnotationFeatureLayerView from "../layers/AnnotationFeatureLayerView.js";
3
3
  import type CatalogFootprintLayerView from "../layers/CatalogFootprintLayerView.js";
4
4
  import type CSVLayerView from "../layers/CSVLayerView.js";
5
5
  import type DimensionFeatureLayerView from "../layers/DimensionFeatureLayerView.js";
@@ -21,7 +21,7 @@ import type WFSLayerView from "../layers/WFSLayerView.js";
21
21
  /** @since 5.0 */
22
22
  export interface LayerView2DMap {
23
23
  /** @since 5.1 */
24
- annotation: AnnotationLayerView;
24
+ "annotation-feature": AnnotationFeatureLayerView;
25
25
  /** @since 5.0 */
26
26
  "base-dynamic": never;
27
27
  /** @since 5.0 */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../analysis/LineOfSightAnalysisObserver.js";import n from"../../../../analysis/LineOfSightAnalysisTarget.js";import i from"../../../../core/Handles.js";import"../../../../core/has.js";import a from"../../../../core/Logger.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{memoize as s}from"../../../../core/memoize.js";import{ignoreAbortErrors as o}from"../../../../core/promiseUtils.js";import{when as l,syncAndInitial as p,initial as u}from"../../../../core/reactiveUtils.js";import{property as c,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{create as g,fromPoints as _}from"../../../../geometry/support/lineSegment.js";import{hydrateGeometry as m,clonePoint as v}from"../../../../layers/graphics/hydratedFeatures.js";import{absoluteHeightElevationInfo as b,getGraphicEffectiveElevationInfo as y,getConvertedElevation as f}from"../../../../support/elevationInfoUtils.js";import M from"../../../../symbols/support/ElevationInfo.js";import{getGaussianSplatOffsetPosition as T}from"./LineOfSightAuthoringUtils.js";import{getLaserLineColors as P,laserLineConfiguration as w}from"./LineOfSightConfiguration.js";import{LineOfSightTargetManipulator as S,LineOfSightObserverManipulator as L,LineOfSightTargetManipulatorState as k}from"./LineOfSightManipulators.js";import{LineOfSightRayIntersector as C}from"./LineOfSightRayIntersector.js";import{SnappingVisualizer3D as O}from"../../interactive/SnappingVisualizer3D.js";import{LaserlineVisualElement as I}from"../../interactive/visualElements/LaserlineVisualElement.js";import{mouseButtons as H}from"../../../input/mouseButtons.js";import{AnalysisToolBase as j}from"../../../interactive/AnalysisToolBase.js";import{createCoordinateHelper as R}from"../../../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as E}from"../../../interactive/dragEventPipeline.js";import{EditGeometry as V}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as D}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as x}from"../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as G}from"../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as A}from"../../../interactive/snapping/SnappingManagerPool.js";import{SnappingOperation as F}from"../../../interactive/snapping/SnappingOperation.js";import{setupSnappingToggleHandles as U}from"../../../interactive/snapping/snappingUtils.js";import{createScreenPointFromEvent as z}from"../../../support/screenUtils.js";let W=class extends j{constructor(e){super(e),this._creationMode=!1,this.removeIncompleteOnCancel=!1,this.analysisViewData=null,this._latestPointerMovePointerType=null,this._laserlineVisualElement=null,this._grabbedManipulator=null,this._trackerIntersection=null,this._trackerMapPoint=null,this._snappingManagerResult=null,this._analysisHandles=new i,this._updatingHandles=new d,this._manipulatorHandles=new i,this._targetTrackerManipulator=null,this._getSnappingContext=s(e=>new x({elevationInfo:b,pointer:e,editGeometryOperations:new D(new V("point",R(!0,!1,this.view.spatialReference)),this.view.state.viewingMode),visualizer:new O}))}initialize(){this._intersector=new C({view:this.view}),this._snappingOperation=new F({view:this.view}),U(this,()=>{const e=this.view.inputManager.latestPointerInfo?.type??"mouse",t=this._getSnappingContext(e);this._updatingHandles.consumePromise(o(this._snappingOperation.snapAgainNearPreviousMapPoint(this._ensureSnappingManager(),t)))}),this.addHandles(l(()=>"created"===this.state,()=>this.finishToolCreation(),p)),this._observerManipulator=this._createObserverManipulator(),this._createLaserLine(),this.addHandles([this._updatingHandles.add(()=>this.analysisViewData?.elevationAlignedObserver,e=>this._onObserverLocationChange(e),u),this._updatingHandles.add(()=>P(this.view.effectiveTheme),({glowColor:e,innerColor:t,globalAlpha:n})=>this._updateLaserLineStyle(e,t,n),u),this._updatingHandles.add(()=>this._laserLineRendererDependencies(),e=>this._updateLaserLineRenderer(e)),this._connectComputations(),this._updatingHandles.addWhen(()=>!this._shouldRenderTracker,()=>this._clearCursorTracker(),u),this._updatingHandles.add(()=>({active:this.active,hasGrabbedManipulators:this.hasGrabbedManipulators}),({active:e,hasGrabbedManipulators:t})=>{this._creationMode=!!e&&(this._creationMode||!t)},u),this._updatingHandles.add(()=>({observerPosition:this.analysis.observer?.position,showTracker:this._showTracker,hasGrabbedManipulators:this.hasGrabbedManipulators,stagedPoint:this._snappingOperation.stagedPoint,trackerIntersection:this._trackerIntersection}),({observerPosition:e,showTracker:t,hasGrabbedManipulators:i,stagedPoint:a,trackerIntersection:r})=>{if(null==e||!t||i||null==r?.mapPoint)return;this.analysisViewData.cursorTarget??=new n;const s=null!=a?m(a):r.mapPoint,o=this._resolveIntersection(r,s);this._updateFromIntersection(this.analysisViewData.cursorTarget,o,s),this._updateLaserLineRenderer()},u)])}destroy(){this._updatingHandles=r(this._updatingHandles),this._manipulatorHandles=r(this._manipulatorHandles),this._analysisHandles=r(this._analysisHandles),this._observerManipulator=null,this._clearCursorTracker(),this._snappingOperation=r(this._snappingOperation),this._removeLaserLine(),this._intersector=null,this._set("analysis",null)}get state(){return this.active?!this.hasGrabbedManipulators||this._creationMode?"creating":"created":null!=this.analysis.observer?.position?"created":"ready"}get cursor(){return this.active&&this._showTracker?"crosshair":null}get updating(){return!!this.analysisViewData?.updating||!!this._snappingManager?.updating}get _showTracker(){return this.active&&"mouse"===this._latestPointerMovePointerType}get _shouldRenderTracker(){return this._showTracker&&null!=this.analysis.observer?.position&&!this.hasGrabbedManipulators}get _snappingManager(){return this._snappingManagerResult?.snappingManager}get snappingOptions(){return this._snappingManager?.options}continue(){this.view.activeTool=this}stop(){this.view.activeTool=null}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickHandler(e)}onShow(){}onHide(){}onDeactivate(){this._clearCursorTracker()}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this.analysisViewData.computations,e=>this._onComputationsCollectionChange(e),{initial:!0,final:!0})}_onComputationsCollectionChange({added:e,removed:t}){for(const n of t)this._disconnectComputation(n);for(const n of e)this._connectComputation(n)}_connectComputation(e){if(this.destroyed)return void a.getLogger(this).warn("Attempting to connect an analysis to a destroyed LineOfSight tool. Ignoring.");const t=this._analysisHandles;if(t.has(e))return;const n=this._createTargetManipulator(e.target);null==this._targetTrackerManipulator&&n.metadata.target===this.analysisViewData.cursorTarget&&(this._targetTrackerManipulator=n,this._targetTrackerManipulator.available=!1,this._targetTrackerManipulator.interactive=!1,this._updateLaserLineRenderer()),t.add([this._updatingHandles.add(()=>N(e),()=>q(n,e),u),this._updatingHandles.add(()=>e.elevationAlignedTargetLocation,e=>this._onTargetLocationChange(e,n),u)],e)}_disconnectComputation(e){if(this.destroyed)return void a.getLogger(this).warn("Attempting to disconnect an analysis from a destroyed LineOfSight tool. Ignoring.");this._analysisHandles.remove(e);const t=this._getTargetManipulator(e.target);null!=t&&(this.manipulators.remove(t),this._manipulatorHandles.remove(t),null!=this._targetTrackerManipulator&&this._targetTrackerManipulator===t&&(this._targetTrackerManipulator=null))}_clearCursorTracker(){this._trackerIntersection=null,this._trackerMapPoint=null,this._resetSnappingState(),this.analysisViewData.cursorTarget=r(this.analysisViewData.cursorTarget)}_ensureSnappingManager(){if(null==this._snappingManagerResult){const e=A(this.view);this._snappingManagerResult=e,this.addHandles(e)}return this._snappingManagerResult.snappingManager}_createTargetManipulator(e){const t={deleting:!1,target:e,type:"target"},n=new S(this.view,t);return this._manipulatorHandles.add([this._createTargetManipulatorDragPipeline(n),n.events.on("grab-changed",e=>this._manipulatorGrabChanged(n,e)),n.events.on("immediate-click",e=>this._manipulatorClick(n,e))],n),this.manipulators.add(n),null!=e.position?n.elevationAlignedLocation=e.position:n.available=!1,n}_getTargetManipulator(e){let t=null;return this.manipulators.forEach(n=>{const i=n.manipulator;null==t&&"target"===i.metadata.type&&i.metadata.target===e&&(t=i)}),t}_createObserverManipulator(){const e=new L(this.view,{deleting:!1,type:"observer",intersection:null});return this._manipulatorHandles.add([this._createObserverManipulatorDragPipeline(e),e.events.on("grab-changed",t=>this._manipulatorGrabChanged(e,t)),e.events.on("immediate-click",t=>this._manipulatorClick(e,t))],e),this.manipulators.add(e),e}_createTargetManipulatorDragPipeline(e){return E(e,(t,n,i,a)=>{const r=this._ensureSnappingManager(),{snappingStep:s,cancelSnapping:o}=G({snappingManager:r,snappingContext:this._getSnappingContext(a),updatingHandles:this._updatingHandles});n.next(this._screenToSnappingDragEvent()).next(...s).next(this._updateIntersectionFromSnappedPoint()).next(this._updateTargetDragStep(e)).next(()=>this._updateLaserLineRenderer()),i.next(B(e.metadata.target)).next(o).next(()=>this._updateLaserLineRenderer())})}_createObserverManipulatorDragPipeline(e){return E(e,(e,t,n,i)=>{const a=this._ensureSnappingManager(),{snappingStep:r,cancelSnapping:s}=G({snappingManager:a,snappingContext:this._getSnappingContext(i),updatingHandles:this._updatingHandles});t.next(this._screenToSnappingDragEvent()).next(...r).next(this._updateIntersectionFromSnappedPoint()).next(this._updateObserverDragStep()).next(()=>this._updateLaserLineRenderer()),n.next(this._cancelObserverDragStep()).next(s).next(()=>this._updateLaserLineRenderer())})}_screenToSnappingDragEvent(){let e=null;return t=>{"start"===t.action&&(e=this._intersector.getScreenPointIntersection(t.screenStart));const n=this._intersector.getScreenPointIntersection(t.screenEnd);return null==e?.mapPoint||null==n?.mapPoint?null:{...t,intersection:n,mapStart:v(e.mapPoint),mapEnd:v(n.mapPoint)}}}_updateIntersectionFromSnappedPoint(){return e=>(e.intersection=this._resolveIntersection(e.intersection,e.mapEnd),e)}_updateObserverDragStep(){return e=>(this.analysis.observer??=new t,this._updateFromIntersection(this.analysis.observer,e.intersection,e.mapEnd),e)}_cancelObserverDragStep(){const e=null!=this.analysis.observer?.position?this.analysis.observer.clone():null;return t=>(this.analysis.observer=e,t)}_updateTargetDragStep(e){return t=>(this._updateFromIntersection(e.metadata.target,t.intersection,t.mapEnd),e.elevationAlignedLocation=t.mapEnd,t)}_manipulatorGrabChanged(e,t){switch(t.action){case"start":this._grabbedManipulator=e;break;case"end":this._grabbedManipulator===e&&(this._grabbedManipulator=null)}}_laserLineRendererDependencies(){return{laserlineVisualElement:this._laserlineVisualElement,grabbedManipulator:this._grabbedManipulator,shouldRenderTracker:this._shouldRenderTracker,observerPosition:null!=this.analysis.observer?this.analysis.observer.position:null,visible:this.visible}}_updateLaserLineRenderer(e=this._laserLineRendererDependencies()){const{laserlineVisualElement:t,grabbedManipulator:n,shouldRenderTracker:i,observerPosition:a,visible:r}=e;if(null==t)return;const s=null!=n?n:i&&null!=a?this._targetTrackerManipulator:null;null!=s&&r?(t.visible=!0,t.heightManifoldTarget=s.renderLocation,s!==this._observerManipulator?t.lineVerticalPlaneSegment=_(this._observerManipulator.renderLocation,s.renderLocation,J):t.lineVerticalPlaneSegment=null):(t.visible=!1,t.heightManifoldTarget=null,t.lineVerticalPlaneSegment=null)}_createLaserLine(){this._removeLaserLine();const{glowWidth:e,innerWidth:t}=w;this._laserlineVisualElement=new I({view:this.view,attached:!0,visible:this.visible,style:{glowWidth:e,innerWidth:t},isDecoration:!0})}_removeLaserLine(){null!=this._laserlineVisualElement&&(this._laserlineVisualElement.destroy(),this._laserlineVisualElement=null)}_updateLaserLineStyle(e,t,n){const i=this._laserlineVisualElement;if(null==i)return;const a=i.style;i.style={...a,glowColor:e.toUnitRGB(),innerColor:t.toUnitRGB(),globalAlpha:n}}_onObserverLocationChange(e){null!=e?(this._observerManipulator.metadata.intersection=null,this._observerManipulator.available=!0,this._observerManipulator.elevationAlignedLocation=e):this._observerManipulator.available=!1}_onTargetLocationChange(e,t){null!=e?(t.elevationAlignedLocation=e,t!==this._targetTrackerManipulator&&(t.available=!0)):t.available=!1}_addPointFromClickEvent(e,i){const a=this._getPlacementLocation(e,i);if(null==a)return;const{intersection:r,point:s}=a;if(null!=this.analysis.observer?.position){this._clearCursorTracker();const e=new n;this._updateFromIntersection(e,r,s),this.analysis.targets.add(e)}else{const e=new t;this._updateFromIntersection(e,r,s),this.analysis.observer=e}}_clickHandler(e){this.active&&e.button!==H.Right&&(this._addPointFromClickEvent(z(e),e.pointerType),e.stopPropagation())}_doubleClickHandler(e){this.active&&e.button!==H.Right&&(this.stop(),e.stopPropagation())}_pointerMoveHandler(e){if(this.hasGrabbedManipulators)return;if(this._latestPointerMovePointerType=e.pointerType,this._updateLaserLineRenderer(),!this._showTracker)return void this._clearCursorTracker();const t=z(e),n=this._intersector.getScreenPointIntersection(t),i=n?.mapPoint;null!=n?.mapPoint&&null!=i?(this._trackerIntersection=n,this._trackerMapPoint=i,this._updateHoverSnapping(i,e.pointerType)):this._clearCursorTracker()}_getPlacementLocation(e,t){const n=this._intersector.getScreenPointIntersection(e);if(null==n?.mapPoint)return null;const i=n.mapPoint;if(!this._shouldUsePlacementSnapping(t))return{intersection:n,point:i};const a=n.mapPoint,r=this._trackerMapPoint?.equals(a)?this._snappingOperation.stagedPoint:null,s=m(r??this._snappingOperation.update({point:a},this._ensureSnappingManager(),this._getSnappingContext(t)));return{intersection:this._resolveIntersection(n,s),point:s}}_shouldUsePlacementSnapping(e){return"touch"!==e}_updateHoverSnapping(e,t){const n=this._getSnappingContext(t);this._updatingHandles.consumePromise(o(this._snappingOperation.snap({point:e},this._ensureSnappingManager(),n)))}_updateFromIntersection(e,t,n=t.mapPoint){if(null==n)return e.position=null,e.elevationInfo=null,void(e.feature=null);const i=!t.mapPoint?.equals(n);switch(t.context?.type){case"graphic":{const n=t.context.graphic,i=y(n);"on-the-ground"===i.mode&&(i.mode="relative-to-ground",i.offset=0),e.elevationInfo=new M(i),e.feature=n}break;case"gaussian-splat":return e.elevationInfo=null,e.feature=null,void(e.position=T(this.view,n,e.elevationInfo,t.normal));case"ground":e.elevationInfo=new M({mode:"on-the-ground"}),e.feature=null;break;default:e.elevationInfo=null,e.feature=null}i&&(e.elevationInfo=null);const a=n.clone();a.z=f(this.view,a,b,e.elevationInfo),e.position=a}_manipulatorClick(e,t){if("observer"===e.metadata.type||e.grabbing||e.dragging||t.button!==H.Right||this.analysis.targets.length<=1)return;const{target:n}=e.metadata;this.analysis.targets.remove(n),t.stopPropagation()}get testInfo(){}_resetSnappingState(){this._snappingManager?.doneSnapping(),this._snappingOperation.abort(),this._snappingOperation.stagedPoint=null}_resolveIntersection(e,t){return e.mapPoint?.equals(t)?e:this._intersector.getMapPointIntersection(t)??e}};function B(e){const t=e.position?.clone();return n=>(e.position=t,n)}function q(e,t){const{isValid:n,isTargetVisible:i}=t.computationResult;e.state=n?i?k.visible:k.occluded:k.undefined}function N(e){const{isValid:t,isTargetVisible:n}=e.computationResult;return{isValid:t,isTargetVisible:n}}e([c({constructOnly:!0})],W.prototype,"view",void 0),e([c({constructOnly:!0})],W.prototype,"analysis",void 0),e([c()],W.prototype,"_creationMode",void 0),e([c({readOnly:!0})],W.prototype,"state",null),e([c({readOnly:!0})],W.prototype,"cursor",null),e([c()],W.prototype,"removeIncompleteOnCancel",void 0),e([c({readOnly:!0})],W.prototype,"updating",null),e([c({constructOnly:!0})],W.prototype,"analysisViewData",void 0),e([c({readOnly:!0})],W.prototype,"_showTracker",null),e([c()],W.prototype,"_latestPointerMovePointerType",void 0),e([c()],W.prototype,"_shouldRenderTracker",null),e([c()],W.prototype,"_laserlineVisualElement",void 0),e([c()],W.prototype,"_grabbedManipulator",void 0),e([c()],W.prototype,"_trackerIntersection",void 0),e([c()],W.prototype,"_trackerMapPoint",void 0),e([c()],W.prototype,"_snappingManagerResult",void 0),W=e([h("esri.views.3d.analysis.LineOfSight.LineOfSightTool")],W);const J=g();export{W as LineOfSightTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/LineOfSightAnalysisObserver.js";import i from"../../../../analysis/LineOfSightAnalysisTarget.js";import a from"../../../../core/Handles.js";import"../../../../core/has.js";import n from"../../../../core/Logger.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{when as s,syncAndInitial as o,initial as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as d}from"../../../../core/support/UpdatingHandles.js";import{create as c,fromPoints as p}from"../../../../geometry/support/lineSegment.js";import{getGraphicEffectiveElevationInfo as g,getConvertedElevation as _}from"../../../../support/elevationInfoUtils.js";import m from"../../../../symbols/support/ElevationInfo.js";import{getGaussianSplatOffsetPosition as v}from"./LineOfSightAuthoringUtils.js";import{getLaserLineColors as b,laserLineConfiguration as y}from"./LineOfSightConfiguration.js";import{LineOfSightTargetManipulator as f,LineOfSightObserverManipulator as T,LineOfSightTargetManipulatorState as L}from"./LineOfSightManipulators.js";import{LineOfSightRayIntersector as M}from"./LineOfSightRayIntersector.js";import{LaserlineVisualElement as w}from"../../interactive/visualElements/LaserlineVisualElement.js";import{mouseButtons as k}from"../../../input/mouseButtons.js";import{AnalysisToolBase as C}from"../../../interactive/AnalysisToolBase.js";import{createManipulatorDragEventPipeline as H}from"../../../interactive/dragEventPipeline.js";import{createScreenPointFromEvent as P}from"../../../support/screenUtils.js";let V=class extends C{constructor(e){super(e),this._creationMode=!1,this.removeIncompleteOnCancel=!1,this.analysisViewData=null,this._latestPointerMovePointerType=null,this._laserlineVisualElement=null,this._grabbedManipulator=null,this._analysisHandles=new a,this._updatingHandles=new d,this._manipulatorHandles=new a,this._targetTrackerManipulator=null}initialize(){this._intersector=new M({view:this.view}),this.addHandles(s(()=>"created"===this.state,()=>this.finishToolCreation(),o)),this._observerManipulator=this._createObserverManipulator(),this._createLaserLine(),this.addHandles([this._updatingHandles.add(()=>this.analysisViewData?.elevationAlignedObserver,e=>this._onObserverLocationChange(e),l),this._updatingHandles.add(()=>b(this.view.effectiveTheme),({glowColor:e,innerColor:t,globalAlpha:i})=>this._updateLaserLineStyle(e,t,i),l),this._updatingHandles.add(()=>this._laserLineRendererDependencies(),e=>this._updateLaserLineRenderer(e)),this._connectComputations(),this._updatingHandles.addWhen(()=>!this._shouldRenderTracker,()=>this._clearCursorTracker(),l),this._updatingHandles.add(()=>({active:this.active,hasGrabbedManipulators:this.hasGrabbedManipulators}),({active:e,hasGrabbedManipulators:t})=>{this._creationMode=!!e&&(this._creationMode||!t)},l)])}destroy(){this._updatingHandles=r(this._updatingHandles),this._manipulatorHandles=r(this._manipulatorHandles),this._analysisHandles=r(this._analysisHandles),this._observerManipulator=null,this._clearCursorTracker(),this._removeLaserLine(),this._intersector=null,this._set("analysis",null)}get state(){return this.active?!this.hasGrabbedManipulators||this._creationMode?"creating":"created":null!=this.analysis.observer?.position?"created":"ready"}get cursor(){return this.active&&this._showTracker?"crosshair":null}get updating(){return null!=this.analysisViewData&&this.analysisViewData.updating||this._updatingHandles.updating}get _showTracker(){return this.active&&"mouse"===this._latestPointerMovePointerType}get _shouldRenderTracker(){return this._showTracker&&null!=this.analysis.observer?.position&&!this.hasGrabbedManipulators}continue(){this.view.activeTool=this}stop(){this.view.activeTool=null}onEditableChange(){this.analysisViewData.editable=this.internallyEditable}onInputEvent(e){switch(e.type){case"immediate-double-click":this._doubleClickHandler(e);break;case"pointer-move":this._pointerMoveHandler(e)}}onInputEventAfter(e){if("immediate-click"===e.type)this._clickHandler(e)}onShow(){}onHide(){}onDeactivate(){this._clearCursorTracker()}_connectComputations(){return this._updatingHandles.addOnCollectionChange(()=>this.analysisViewData.computations,e=>this._onComputationsCollectionChange(e),{initial:!0,final:!0})}_onComputationsCollectionChange({added:e,removed:t}){for(const i of t)this._disconnectComputation(i);for(const i of e)this._connectComputation(i)}_connectComputation(e){if(this.destroyed)return void n.getLogger(this).warn("Attempting to connect an analysis to a destroyed LineOfSight tool. Ignoring.");const t=this._analysisHandles;if(t.has(e))return;const i=this._createTargetManipulator(e.target);null==this._targetTrackerManipulator&&i.metadata.target===this.analysisViewData.cursorTarget&&(this._targetTrackerManipulator=i,this._targetTrackerManipulator.available=!1,this._targetTrackerManipulator.interactive=!1,this._updateLaserLineRenderer()),t.add([this._updatingHandles.add(()=>D(e),()=>I(i,e),l),this._updatingHandles.add(()=>e.elevationAlignedTargetLocation,e=>this._onTargetLocationChange(e,i),l)],e)}_disconnectComputation(e){if(this.destroyed)return void n.getLogger(this).warn("Attempting to disconnect an analysis from a destroyed LineOfSight tool. Ignoring.");this._analysisHandles.remove(e);const t=this._getTargetManipulator(e.target);null!=t&&(this.manipulators.remove(t),this._manipulatorHandles.remove(t),null!=this._targetTrackerManipulator&&this._targetTrackerManipulator===t&&(this._targetTrackerManipulator=null))}_clearCursorTracker(){this.analysisViewData.cursorTarget=r(this.analysisViewData.cursorTarget)}_createTargetManipulator(e){const t={deleting:!1,target:e,type:"target"},i=new f(this.view,t);return this._manipulatorHandles.add([this._createTargetManipulatorDragPipeline(i),i.events.on("grab-changed",e=>this._manipulatorGrabChanged(i,e)),i.events.on("immediate-click",e=>this._manipulatorClick(i,e))],i),this.manipulators.add(i),null!=e.position?i.elevationAlignedLocation=e.position:i.available=!1,i}_getTargetManipulator(e){let t=null;return this.manipulators.forEach(i=>{const a=i.manipulator;null==t&&"target"===a.metadata.type&&a.metadata.target===e&&(t=a)}),t}_createObserverManipulator(){const e=new T(this.view,{deleting:!1,type:"observer",intersection:null});return this._manipulatorHandles.add([this._createObserverManipulatorDragPipeline(e),e.events.on("grab-changed",t=>this._manipulatorGrabChanged(e,t)),e.events.on("immediate-click",t=>this._manipulatorClick(e,t))],e),this.manipulators.add(e),e}_createTargetManipulatorDragPipeline(e){return H(e,(t,i,a)=>{i.next(this._screenToIntersection()).next(this._updateTargetDragStep(e)).next(()=>this._updateLaserLineRenderer()),a.next(O(e.metadata.target)).next(()=>this._updateLaserLineRenderer())})}_createObserverManipulatorDragPipeline(e){return H(e,(e,t,i)=>{t.next(this._screenToIntersection()).next(this._updateObserverDragStep()).next(()=>this._updateLaserLineRenderer()),i.next(this._cancelObserverDragStep()).next(()=>this._updateLaserLineRenderer())})}_screenToIntersection(){return e=>{const t=this._intersector.getScreenPointIntersection(e.screenEnd);return null==t?null:{...e,intersection:t}}}_updateObserverDragStep(){return e=>(null!=e.intersection.mapPoint?(null==this.analysis.observer&&(this.analysis.observer=new t),this._updateFromIntersection(this.analysis.observer,e.intersection)):this.analysis.observer=null,e)}_cancelObserverDragStep(){const e=null!=this.analysis.observer?.position?this.analysis.observer.clone():null;return t=>(this.analysis.observer=e,t)}_updateTargetDragStep(e){return t=>{this._updateFromIntersection(e.metadata.target,t.intersection);const i=t.intersection.mapPoint;return null!=i&&(e.elevationAlignedLocation=i),t}}_manipulatorGrabChanged(e,t){switch(t.action){case"start":this._grabbedManipulator=e;break;case"end":this._grabbedManipulator===e&&(this._grabbedManipulator=null)}}_laserLineRendererDependencies(){return{laserlineVisualElement:this._laserlineVisualElement,grabbedManipulator:this._grabbedManipulator,shouldRenderTracker:this._shouldRenderTracker,observerPosition:null!=this.analysis.observer?this.analysis.observer.position:null,visible:this.visible}}_updateLaserLineRenderer(e=this._laserLineRendererDependencies()){const{laserlineVisualElement:t,grabbedManipulator:i,shouldRenderTracker:a,observerPosition:n,visible:r}=e;if(null==t)return;const s=null!=i?i:a&&null!=n?this._targetTrackerManipulator:null;null!=s&&r?(t.visible=!0,t.heightManifoldTarget=s.renderLocation,s!==this._observerManipulator?t.lineVerticalPlaneSegment=p(this._observerManipulator.renderLocation,s.renderLocation,S):t.lineVerticalPlaneSegment=null):(t.visible=!1,t.heightManifoldTarget=null,t.lineVerticalPlaneSegment=null)}_createLaserLine(){this._removeLaserLine();const{glowWidth:e,innerWidth:t}=y;this._laserlineVisualElement=new w({view:this.view,attached:!0,visible:this.visible,style:{glowWidth:e,innerWidth:t},isDecoration:!0})}_removeLaserLine(){null!=this._laserlineVisualElement&&(this._laserlineVisualElement.destroy(),this._laserlineVisualElement=null)}_updateLaserLineStyle(e,t,i){const a=this._laserlineVisualElement;if(null==a)return;const n=a.style;a.style={...n,glowColor:e.toUnitRGB(),innerColor:t.toUnitRGB(),globalAlpha:i}}_onObserverLocationChange(e){null!=e?(this._observerManipulator.metadata.intersection=null,this._observerManipulator.available=!0,this._observerManipulator.elevationAlignedLocation=e):this._observerManipulator.available=!1}_onTargetLocationChange(e,t){null!=e?(t.elevationAlignedLocation=e,t!==this._targetTrackerManipulator&&(t.available=!0)):t.available=!1}_addPointFromClickEvent(e){const a=this._intersector.getScreenPointIntersection(e);if(null!=a?.mapPoint)if(null!=this.analysis.observer?.position){this._clearCursorTracker();const e=new i;this._updateFromIntersection(e,a),this.analysis.targets.add(e)}else{const e=new t;this._updateFromIntersection(e,a),this.analysis.observer=e}}_clickHandler(e){this.active&&e.button!==k.Right&&(this._addPointFromClickEvent(P(e)),e.stopPropagation())}_doubleClickHandler(e){this.active&&e.button!==k.Right&&(this.stop(),e.stopPropagation())}_pointerMoveHandler(e){if(this.hasGrabbedManipulators)return;if(this._latestPointerMovePointerType=e.pointerType,this._updateLaserLineRenderer(),!this._showTracker||null==this.analysis.observer?.position)return;const t=P(e),a=this._intersector.getScreenPointIntersection(t);null!=a?.mapPoint&&(null==this.analysisViewData.cursorTarget&&(this.analysisViewData.cursorTarget=new i),this._updateFromIntersection(this.analysisViewData.cursorTarget,a),this._updateLaserLineRenderer())}_updateFromIntersection(e,t){if(null==t.mapPoint)return e.position=null,e.elevationInfo=null,void(e.feature=null);switch(t.context?.type){case"graphic":{const i=t.context.graphic,a=g(i);"on-the-ground"===a.mode&&(a.mode="relative-to-ground",a.offset=0),e.elevationInfo=new m(a),e.feature=i}break;case"gaussian-splat":return e.elevationInfo=null,e.feature=null,void(e.position=v(this.view,t.mapPoint,e.elevationInfo,t.normal));case"ground":e.elevationInfo=new m({mode:"on-the-ground"}),e.feature=null;break;default:e.elevationInfo=null,e.feature=null}const i=t.mapPoint.clone();i.z=_(this.view,i,{mode:"absolute-height",offset:0},e.elevationInfo),e.position=i}_manipulatorClick(e,t){if("observer"===e.metadata.type||e.grabbing||e.dragging||t.button!==k.Right||this.analysis.targets.length<=1)return;const{target:i}=e.metadata;this.analysis.targets.remove(i),t.stopPropagation()}get testInfo(){}};function O(e){const t=e.position?.clone();return i=>(e.position=t,i)}function I(e,t){const{isValid:i,isTargetVisible:a}=t.computationResult;e.state=i?a?L.visible:L.occluded:L.undefined}function D(e){const{isValid:t,isTargetVisible:i}=e.computationResult;return{isValid:t,isTargetVisible:i}}e([u({constructOnly:!0})],V.prototype,"view",void 0),e([u({constructOnly:!0})],V.prototype,"analysis",void 0),e([u()],V.prototype,"_creationMode",void 0),e([u({readOnly:!0})],V.prototype,"state",null),e([u({readOnly:!0})],V.prototype,"cursor",null),e([u()],V.prototype,"removeIncompleteOnCancel",void 0),e([u({readOnly:!0})],V.prototype,"updating",null),e([u({constructOnly:!0})],V.prototype,"analysisViewData",void 0),e([u({readOnly:!0})],V.prototype,"_showTracker",null),e([u()],V.prototype,"_latestPointerMovePointerType",void 0),e([u()],V.prototype,"_shouldRenderTracker",null),e([u()],V.prototype,"_laserlineVisualElement",void 0),e([u()],V.prototype,"_grabbedManipulator",void 0),V=e([h("esri.views.3d.analysis.LineOfSight.LineOfSightTool")],V);const S=c();export{V as LineOfSightTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import{makeHandle as e}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{clamp as s,roundToNearest as a,roundUpToNearest as r}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as l}from"../../../../core/maybe.js";import{throwIfAborted as d}from"../../../../core/promiseUtils.js";import{initial as h}from"../../../../core/reactiveUtils.js";import{createScreenPoint as u}from"../../../../core/screenUtils.js";import{throttle as p}from"../../../../core/throttle.js";import{convertTime as c}from"../../../../core/timeUtils.js";import{property as m,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import{formatDuration as w}from"../../../../intl/duration.js";import{onLocaleChange as f,prefersRTL as y}from"../../../../intl/locale.js";import{fetchMessageBundle as v}from"../../../../intl/messages.js";import{substitute as D}from"../../../../intl/substitute.js";let T=class extends o{constructor(t){super(t),this.throttleDelay=P,this._tooltipElement=S(),this._tooltipContentElement=x(),this._updatingHandles=new _,this._messagesTask=null,this._screenPoint=null,this._shadowDurationTask=null,this.shadowDuration=null,this._throttledUpdateShadowDuration=null,this._onPointerMove=({x:t,y:o})=>{const i=u(t,o);this._screenPoint=i,this._throttledUpdateShadowDuration?.(this.view,i)},this._updateShadowDuration=(t,o)=>{this._abortShadowDurationTask(),this._shadowDurationTask=i(async i=>{const{results:e,ground:s}=await t.hitTest(o);if(d(i),0===e.length&&!s.mapPoint)return void(this.shadowDuration=null);const a=await this.getDuration(o,i);d(i),this.shadowDuration=a<0?null:a})}}initialize(){this._tooltipElement.appendChild(this._tooltipContentElement);const t=()=>{this._messagesTask?.abort(),this._messagesTask=i(()=>v("esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis"))};t(),this.addHandles([f(t),this._updatingHandles.add(()=>({enabled:this.isVisible(),surface:this.view.surface}),({enabled:t,surface:o})=>{t&&o?(o.appendChild(this._tooltipElement),this._startTracking(this.view)):(this.removeHandles(z),this._tooltipElement.remove())},h),this._updatingHandles.add(()=>this._styles,t=>{Object.assign(this._tooltipElement.style,t)},h),this._updatingHandles.add(()=>this._formattedText,t=>{this._tooltipContentElement.innerText=t},h),this._updatingHandles.add(()=>this.throttleDelay,t=>{this._throttledUpdateShadowDuration=p(this._updateShadowDuration,t)},h),e(()=>{this._throttledUpdateShadowDuration=n(this._throttledUpdateShadowDuration)})])}destroy(){this._updatingHandles.destroy(),this._tooltipElement.remove()}get updating(){return this._updatingHandles.updating||null!=this._shadowDurationTask&&!this._shadowDurationTask?.finished||null!=this._messagesTask&&!this._messagesTask?.finished||!0===this._throttledUpdateShadowDuration?.hasPendingUpdates()}get _formattedText(){const t=this._messagesTask?.value,o=this.shadowDuration;return null==t||null==o?"":"total-duration"===this.getMode()&&"hourly"===this.getTotalDurationMode()?this._formatHourlyText(t,o):this._formatExactText(t,o)}_formatExactText(t,o){return D(this.getVisualizeSunlight()?t.sunlightDuration:t.shadowDuration,{duration:H(U(o))})}_formatHourlyText(t,o){const i=this.getTotalDuration();if(i<=0)return this._formatExactText(t,0);const e=s(o,0,i);return 0===e&&this.getShowsSeparateZeroBucketInHourlyMode()?D(this.getVisualizeSunlight()?t.sunlightDuration:t.shadowDuration,{duration:H(0)}):this.getVisualizeSunlight()?this._formatHourlySunlightText(t,e,i):this._formatHourlyShadowText(t,e,i)}_formatHourlySunlightText(t,o,i){const e=E(o,i),s=Math.min(i,e+$);return 0===e?D(t.sunlightDurationLessThan,{duration:j(e,s)}):D(t.sunlightDurationAtLeastLessThan,{minDuration:H(e),maxDuration:j(e,s)})}_formatHourlyShadowText(t,o,i){const e=E(o,i),s=Math.min(i,e+$);return D(t.shadowDurationMoreThanUpTo,{minDuration:H(e),maxDuration:j(e,s)})}get _styles(){const t=this._screenPoint;return t&&this._formattedText?{display:"block",transform:`translate(${t.x}px, ${t.y}px)`}:{display:"none"}}get testData(){}_startTracking(t){if(this.hasHandles(z))return;const o=o=>{this.hasHandles(M)||(o&&this._onPointerMove(o),this.addHandles(t.on("pointer-move",this._onPointerMove),M))},i=()=>{this.removeHandles(M),this._abortShadowDurationTask(),this._screenPoint=null,this.shadowDuration=null};this.addHandles([t.on("pointer-enter",o),t.on("pointer-leave",i),t.on("pointer-down",i),t.on("pointer-up",o),t.on("pointer-drag",t=>{"end"===t.action?o(t):i()}),t.on("click",o=>{const i=u(o.x,o.y);this._screenPoint=i,this._updateShadowDuration(t,i)}),e(()=>this._abortShadowDurationTask())],z),o()}_abortShadowDurationTask(){this._shadowDurationTask=l(this._shadowDurationTask)}};function S(){const t=k(document.createElement("div"),{position:"absolute",top:"0",left:"0",pointerEvents:"none"});return t.style.setProperty("--tooltip-arrow-size","6px"),t.style.setProperty("--tooltip-background","var(--calcite-color-foreground-1)"),t.appendChild(b()),t}function x(){return k(document.createElement("div"),{color:"var(--calcite-color-text-1)",fontSize:"var(--calcite-font-size-sm)",position:"absolute",width:"max-content",transform:"translate(0, -100%)",insetInlineStart:"calc(var(--calcite-spacing-lg) * -1)",marginTop:"calc((var(--tooltip-arrow-size) * -1) - var(--calcite-spacing-xxs))",background:"var(--tooltip-background)",paddingInline:"var(--calcite-spacing-md)",paddingBlock:"var(--calcite-spacing-xs)",pointerEvents:"none",borderRadius:"var(--calcite-corner-radius-sm)"})}function b(){return k(document.createElement("div"),{display:"block",position:"absolute",width:"0",height:"0",bottom:"-1px",left:"50%",transform:"translate(-50%, 0)",borderTop:"var(--tooltip-arrow-size) solid var(--tooltip-background)",borderRight:"var(--tooltip-arrow-size) solid transparent",borderBottom:"var(--tooltip-arrow-size) solid transparent",borderLeft:"var(--tooltip-arrow-size) solid transparent",pointerEvents:"none"})}function k(t,o){return Object.assign(t.style,o),t}function H(t){const o=w(t,void 0,{unitDisplay:"narrow"});return y()?`${B}${o}${I}`:o}function j(t,o){return H(t+U(Math.max(0,o-t)))}function E(t,o){if(t<=0)return 0;const i=r(t,$);return s(i-$,0,o)}function U(t){const o=a(t,t<V?C:V);return t>0&&0===o?C:o}t([m()],T.prototype,"view",void 0),t([m()],T.prototype,"isVisible",void 0),t([m()],T.prototype,"getDuration",void 0),t([m()],T.prototype,"getMode",void 0),t([m()],T.prototype,"getShowsSeparateZeroBucketInHourlyMode",void 0),t([m()],T.prototype,"getTotalDurationMode",void 0),t([m()],T.prototype,"getTotalDuration",void 0),t([m()],T.prototype,"throttleDelay",void 0),t([m()],T.prototype,"updating",null),t([m()],T.prototype,"getVisualizeSunlight",void 0),t([m()],T.prototype,"_messagesTask",void 0),t([m()],T.prototype,"_screenPoint",void 0),t([m()],T.prototype,"_shadowDurationTask",void 0),t([m()],T.prototype,"shadowDuration",void 0),t([m()],T.prototype,"_throttledUpdateShadowDuration",void 0),t([m()],T.prototype,"_formattedText",null),t([m()],T.prototype,"_styles",null),T=t([g("esri.views.3d.analysis.ShadowCast.ShadowCastTooltip")],T);const z=Symbol("tracking"),M=Symbol("pointer"),P=300,C=c(1,"minutes","milliseconds"),V=c(15,"minutes","milliseconds"),$=c(1,"hours","milliseconds"),B="⁨",I="⁩";export{T as ShadowCastTooltip};
2
+ import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import{createTask as i}from"../../../../core/asyncUtils.js";import{makeHandle as e}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{clamp as s,roundToNearest as a,roundUpToNearest as r}from"../../../../core/mathUtils.js";import{removeMaybe as n,abortMaybe as l}from"../../../../core/maybe.js";import{throwIfAborted as d}from"../../../../core/promiseUtils.js";import{initial as h}from"../../../../core/reactiveUtils.js";import{createScreenPoint as u}from"../../../../core/screenUtils.js";import{throttle as p}from"../../../../core/throttle.js";import{convertTime as c}from"../../../../core/timeUtils.js";import{property as m,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import{formatDuration as w}from"../../../../intl/duration.js";import{onLocaleChange as f,prefersRTL as v}from"../../../../intl/locale.js";import{fetchMessageBundle as y}from"../../../../intl/messages.js";import{substitute as D}from"../../../../intl/substitute.js";let T=class extends o{constructor(t){super(t),this.throttleDelay=M,this._tooltipElement=b(),this._tooltipContentElement=k(),this._updatingHandles=new _,this._messagesTask=null,this._screenPoint=null,this._shadowDurationTask=null,this.shadowDuration=null,this._throttledUpdateShadowDuration=null,this._onPointerMove=({x:t,y:o})=>{const i=u(t,o);this._screenPoint=i,this._throttledUpdateShadowDuration?.(this.view,i)},this._updateShadowDuration=(t,o)=>{this._abortShadowDurationTask(),this._shadowDurationTask=i(async i=>{const{results:e,ground:s}=await t.hitTest(o);if(d(i),0===e.length&&!s.mapPoint)return void(this.shadowDuration=null);const a=await this.getDuration(o,i);d(i),this.shadowDuration=a<0?null:a})}}initialize(){this._tooltipElement.appendChild(this._tooltipContentElement);const t=()=>{this._messagesTask?.abort(),this._messagesTask=i(()=>y("esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis"))};t(),this.addHandles([f(t),this._updatingHandles.add(()=>({enabled:this.isVisible(),surface:this.view.surface}),({enabled:t,surface:o})=>{t&&o?(o.appendChild(this._tooltipElement),this._startTracking(this.view)):(this.removeHandles(P),this._tooltipElement.remove())},h),this._updatingHandles.add(()=>this._styles,t=>{Object.assign(this._tooltipElement.style,t)},h),this._updatingHandles.add(()=>this._formattedText,t=>{this._tooltipContentElement.innerText=t},h),this._updatingHandles.add(()=>this.throttleDelay,t=>{this._throttledUpdateShadowDuration=p(this._updateShadowDuration,t)},h),e(()=>{this._throttledUpdateShadowDuration=n(this._throttledUpdateShadowDuration)})])}destroy(){this._updatingHandles.destroy(),this._tooltipElement.remove()}get updating(){return this._updatingHandles.updating||null!=this._shadowDurationTask&&!this._shadowDurationTask?.finished||null!=this._messagesTask&&!this._messagesTask?.finished||!0===this._throttledUpdateShadowDuration?.hasPendingUpdates()}get _formattedText(){const t=this._messagesTask?.value,o=this.shadowDuration;return null==t||null==o?"":"total-duration"===this.getMode()&&"hourly"===this.getTotalDurationMode()?this._formatHourlyText(t,o):this._formatExactText(t,o)}_formatExactText(t,o){return D(this.getVisualizeSunlight()?t.sunlightDuration:t.shadowDuration,{duration:j(U(o))})}_formatHourlyText(t,o){const i=this.getTotalDuration();if(i<=0)return this._formatExactText(t,0);const e=this.getVisualizeSunlight(),a=s(o,0,i);if(0===a&&this.getShowsSeparateZeroBucketInHourlyMode())return D(e?t.sunlightDuration:t.shadowDuration,{duration:j(0)});const r=E(a,i),n=H(r,Math.min(i,r+$));if(0===r){const o=e?t.sunlightDurationLessThan:t.shadowDurationLessThan;return D(o,{duration:n})}const l=e?t.sunlightDurationRange:t.shadowDurationRange;return D(l,{minDuration:j(r),maxDuration:n})}get _styles(){const t=this._screenPoint;return t&&this._formattedText?{display:"block",transform:`translate(${t.x}px, ${t.y}px)`}:{display:"none"}}get testData(){}_startTracking(t){if(this.hasHandles(P))return;const o=o=>{this.hasHandles(z)||(o&&this._onPointerMove(o),this.addHandles(t.on("pointer-move",this._onPointerMove),z))},i=()=>{this.removeHandles(z),this._abortShadowDurationTask(),this._screenPoint=null,this.shadowDuration=null};this.addHandles([t.on("pointer-enter",o),t.on("pointer-leave",i),t.on("pointer-down",i),t.on("pointer-up",o),t.on("pointer-drag",t=>{"end"===t.action?o(t):i()}),t.on("click",o=>{const i=u(o.x,o.y);this._screenPoint=i,this._updateShadowDuration(t,i)}),e(()=>this._abortShadowDurationTask())],P),o()}_abortShadowDurationTask(){this._shadowDurationTask=l(this._shadowDurationTask)}};function b(){const t=x(document.createElement("div"),{position:"absolute",top:"0",left:"0",pointerEvents:"none"});return t.style.setProperty("--tooltip-arrow-size","6px"),t.style.setProperty("--tooltip-background","var(--calcite-color-foreground-1)"),t.appendChild(S()),t}function k(){return x(document.createElement("div"),{color:"var(--calcite-color-text-1)",fontSize:"var(--calcite-font-size-sm)",position:"absolute",width:"max-content",transform:"translate(0, -100%)",insetInlineStart:"calc(var(--calcite-spacing-lg) * -1)",marginTop:"calc((var(--tooltip-arrow-size) * -1) - var(--calcite-spacing-xxs))",background:"var(--tooltip-background)",paddingInline:"var(--calcite-spacing-md)",paddingBlock:"var(--calcite-spacing-xs)",pointerEvents:"none",borderRadius:"var(--calcite-corner-radius-sm)"})}function S(){return x(document.createElement("div"),{display:"block",position:"absolute",width:"0",height:"0",bottom:"-1px",left:"50%",transform:"translate(-50%, 0)",borderTop:"var(--tooltip-arrow-size) solid var(--tooltip-background)",borderRight:"var(--tooltip-arrow-size) solid transparent",borderBottom:"var(--tooltip-arrow-size) solid transparent",borderLeft:"var(--tooltip-arrow-size) solid transparent",pointerEvents:"none"})}function x(t,o){return Object.assign(t.style,o),t}function j(t){const o=w(t,void 0,{unitDisplay:"narrow"});return v()?`${B}${o}${I}`:o}function H(t,o){return j(t+U(Math.max(0,o-t)))}function E(t,o){if(t<=0)return 0;const i=r(t,$);return s(i-$,0,o)}function U(t){const o=a(t,t<V?C:V);return t>0&&0===o?C:o}t([m()],T.prototype,"view",void 0),t([m()],T.prototype,"isVisible",void 0),t([m()],T.prototype,"getDuration",void 0),t([m()],T.prototype,"getMode",void 0),t([m()],T.prototype,"getShowsSeparateZeroBucketInHourlyMode",void 0),t([m()],T.prototype,"getTotalDurationMode",void 0),t([m()],T.prototype,"getTotalDuration",void 0),t([m()],T.prototype,"throttleDelay",void 0),t([m()],T.prototype,"updating",null),t([m()],T.prototype,"getVisualizeSunlight",void 0),t([m()],T.prototype,"_messagesTask",void 0),t([m()],T.prototype,"_screenPoint",void 0),t([m()],T.prototype,"_shadowDurationTask",void 0),t([m()],T.prototype,"shadowDuration",void 0),t([m()],T.prototype,"_throttledUpdateShadowDuration",void 0),t([m()],T.prototype,"_formattedText",null),t([m()],T.prototype,"_styles",null),T=t([g("esri.views.3d.analysis.ShadowCast.ShadowCastTooltip")],T);const P=Symbol("tracking"),z=Symbol("pointer"),M=300,C=c(1,"minutes","milliseconds"),V=c(15,"minutes","milliseconds"),$=c(1,"hours","milliseconds"),B="⁨",I="⁩";export{T as ShadowCastTooltip};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import{IdentifiableMixin as s}from"../../../../core/Identifiable.js";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";class i{constructor(e){this._resourceFactory=e,this._resources=null,this._visible=!0,this._attached=!1,this._renderGroup=2}destroy(){this._destroyResources()}get resources(){return this._resources?.external}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this._syncGeometriesToRenderer())}get attached(){return this._attached}set attached(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())}get renderGroup(){return this._renderGroup}set renderGroup(e){this._renderGroup=e;const r=this._resources?.layerView;r&&(r.renderGroup=e)}recreate(){this.attached&&this._createResources()}recreateGeometry(){this._resourceFactory.recreateGeometry?null!=this._resources&&(this._ensureRenderGeometriesRemoved(),this._resourceFactory.recreateGeometry(this._resources.external),this._syncGeometriesToRenderer()):this.recreate()}forEachMaterial(e){this._resources&&this._resourceFactory.forEachMaterial(this._resources.external,e)}_createOrDestroyResources(){this._attached?null==this._resources&&this._createResources():this._destroyResources()}_createResources(){this._destroyResources();const e=this._resourceFactory.createResources(),r=new c({view:this._resourceFactory.view,renderGroup:this._renderGroup}),s=this._resourceFactory.view.overlayManager;this._resources={layerView:r,external:e,geometriesAdded:!1},s&&(this._resources.drapeSourceRenderer=s.registerGeometryDrapeSource(r)),this._syncGeometriesToRenderer()}_destroyResources(){if(null==this._resources)return;this._ensureRenderGeometriesRemoved();const e=this._resourceFactory.view.overlayManager;e&&e.unregisterDrapeSource(this._resources.layerView),this._resourceFactory.destroyResources(this._resources.external),this._resources=null}_syncGeometriesToRenderer(){this._visible?this._ensureRenderGeometriesAdded():this._ensureRenderGeometriesRemoved()}_ensureRenderGeometriesRemoved(){if(null==this._resources?.drapeSourceRenderer)return;if(!this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.removeGeometries(this._resources.external.geometries,1),this._resources.geometriesAdded=!1}_ensureRenderGeometriesAdded(){if(null==this._resources?.drapeSourceRenderer)return;if(this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.addGeometries(this._resources.external.geometries,1),this._resources.geometriesAdded=!0}}let c=class extends(s(r)){constructor(e){super(e),this.drapeSourceType=1,this.updatePolicy=1,this.renderGroup=2}};e([t({constructOnly:!0})],c.prototype,"view",void 0),e([t({readOnly:!0})],c.prototype,"drapeSourceType",void 0),e([t()],c.prototype,"renderGroup",void 0),c=e([o("esri.views.3d.interactive.visualElements.DrapedVisualElementResources")],c);export{i as DrapedVisualElementResources};
2
+ import{__decorate as e}from"tslib";import r from"../../../../core/Accessor.js";import{IdentifiableMixin as s}from"../../../../core/Identifiable.js";import{property as t,subclass as o}from"../../../../core/accessorSupport/decorators.js";class i{constructor(e){this._resourceFactory=e,this._resources=null,this._visible=!0,this._attached=!1,this._renderGroup=2}destroy(){this._destroyResources()}get resources(){return this._resources?.external}get visible(){return this._visible}set visible(e){e!==this._visible&&(this._visible=e,this._syncGeometriesToRenderer())}get attached(){return this._attached}set attached(e){e!==this._attached&&(this._attached=e,this._createOrDestroyResources())}get renderGroup(){return this._renderGroup}set renderGroup(e){this._renderGroup=e;const r=this._resources?.layerView;r&&(r.renderGroup=e)}recreate(){this.attached&&this._createResources()}recreateGeometry(){this._resourceFactory.recreateGeometry?null!=this._resources&&(this._ensureRenderGeometriesRemoved(),this._resourceFactory.recreateGeometry(this._resources.external),this._syncGeometriesToRenderer()):this.recreate()}forEachMaterial(e){this._resources&&this._resourceFactory.forEachMaterial(this._resources.external,e)}_createOrDestroyResources(){this._attached?null==this._resources&&this._createResources():this._destroyResources()}_createResources(){this._destroyResources();const e=this._resourceFactory.createResources(),r=new c({view:this._resourceFactory.view,renderGroup:this._renderGroup}),s=this._resourceFactory.view.overlayManager;this._resources={layerView:r,external:e,geometriesAdded:!1},this._resources.drapeSourceRenderer=s?.registerGeometryDrapeSource(r),this._syncGeometriesToRenderer()}_destroyResources(){if(null==this._resources)return;this._ensureRenderGeometriesRemoved();const e=this._resourceFactory.view.overlayManager;e?.unregisterDrapeSource(this._resources.layerView),this._resourceFactory.destroyResources(this._resources.external),this._resources=null}_syncGeometriesToRenderer(){this._visible?this._ensureRenderGeometriesAdded():this._ensureRenderGeometriesRemoved()}_ensureRenderGeometriesRemoved(){if(null==this._resources?.drapeSourceRenderer)return;if(!this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.removeGeometries(this._resources.external.geometries,1),this._resources.geometriesAdded=!1}_ensureRenderGeometriesAdded(){if(null==this._resources?.drapeSourceRenderer)return;if(this._resources.geometriesAdded)return;this._resources.drapeSourceRenderer.addGeometries(this._resources.external.geometries,1),this._resources.geometriesAdded=!0}}let c=class extends(s(r)){constructor(e){super(e),this.drapeSourceType=1,this.updatePolicy=1,this.renderGroup=2}};e([t({constructOnly:!0})],c.prototype,"view",void 0),e([t({readOnly:!0})],c.prototype,"drapeSourceType",void 0),e([t()],c.prototype,"renderGroup",void 0),c=e([o("esri.views.3d.interactive.visualElements.DrapedVisualElementResources")],c);export{i as DrapedVisualElementResources};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Error.js";const r=()=>import("./layers/TileLayerView3D.js"),a=()=>import("./layers/ElevationLayerView3D.js"),i={"base-dynamic":()=>import("./layers/BaseDynamicLayerView3D.js"),"base-elevation":a,"base-tile":r,"bing-maps":r,"building-scene":()=>import("./layers/BuildingSceneLayerView3D.js"),catalog:()=>import("./layers/CatalogLayerView3D.js"),"catalog-dynamic-group":()=>import("./layers/CatalogDynamicGroupLayerView3D.js"),"catalog-footprint":()=>import("./layers/CatalogFootprintLayerView3D.js"),csv:()=>import("./layers/CSVLayerView3D.js"),dimension:()=>import("./layers/DimensionLayerView3D.js"),elevation:a,feature:()=>import("./layers/FeatureLayerView3D.js"),"gaussian-splat":()=>import("./layers/GaussianSplatLayerView3D.js"),geojson:()=>import("./layers/GeoJSONLayerView3D.js"),graphics:()=>import("./layers/GraphicsLayerView3D.js"),group:()=>import("./layers/GroupLayerView3D.js"),imagery:()=>import("./layers/ImageryLayerView3D.js"),"integrated-mesh":()=>import("./layers/IntegratedMeshLayerView3D.js"),"integrated-mesh-3dtiles":()=>import("./layers/IntegratedMesh3DTilesLayerView3D.js"),"line-of-sight":()=>import("./layers/LineOfSightLayerView3D.js"),"map-image":()=>import("./layers/MapImageLayerView3D.js"),media:()=>import("./layers/MediaLayerView3D.js"),"ogc-feature":()=>import("./layers/OGCFeatureLayerView3D.js"),"open-street-map":r,"oriented-imagery":()=>import("./layers/FeatureLayerView3D.js"),"point-cloud":()=>import("./layers/PointCloudLayerView3D.js"),viewshed:()=>import("./layers/ViewshedLayerView3D.js"),voxel:()=>import("./layers/VoxelLayerView3D.js"),route:()=>import("./layers/RouteLayerView3D.js"),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?import("./layers/SceneLayerView3D.js"):import("./layers/SceneLayerGraphicsView3D.js"),stream:()=>import("./layers/StreamLayerView3D.js"),tile:r,"imagery-tile":()=>import("./layers/ImageryTileLayerView3D.js"),"vector-tile":()=>import("./layers/VectorTileLayerView3D.js"),wcs:()=>import("./layers/ImageryTileLayerView3D.js"),"web-tile":r,wfs:()=>import("./layers/WFSLayerView3D.js"),wms:()=>import("./layers/WMSLayerView3D.js"),wmts:()=>import("./layers/WMTSLayerView3D.js"),annotation:null,"geo-rss":null,kml:null,"knowledge-graph-sublayer":null,"knowledge-graph":null,"link-chart":null,"map-notes":null,parquet:null,"subtype-group":null,unknown:null,unsupported:null,video:null,"dimension-feature":null};function s(r){const a=r.declaredClass?r.declaredClass.slice(r.declaredClass.lastIndexOf(".")+1):"Unknown",i=a.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new e(`${i}:view-not-supported`,`${a} is not supported in 3D`)}const t=new Map,l={hasLayerViewModule:e=>null!=i[e.type],importLayerView:e=>{const r=o(e),a=t.get(r);if(a)return a;const l=i[e.type];if(null==l)throw s(e);const y=l(e);return t.set(r,y),y}};function o(e){return"scene"===e.type?`${e.type}-${e.profile}`:e.type}export{l as layerView3DImporter};
2
+ import e from"../../core/Error.js";const r=()=>import("./layers/TileLayerView3D.js"),a=()=>import("./layers/ElevationLayerView3D.js"),i={"base-dynamic":()=>import("./layers/BaseDynamicLayerView3D.js"),"base-elevation":a,"base-tile":r,"bing-maps":r,"building-scene":()=>import("./layers/BuildingSceneLayerView3D.js"),catalog:()=>import("./layers/CatalogLayerView3D.js"),"catalog-dynamic-group":()=>import("./layers/CatalogDynamicGroupLayerView3D.js"),"catalog-footprint":()=>import("./layers/CatalogFootprintLayerView3D.js"),csv:()=>import("./layers/CSVLayerView3D.js"),dimension:()=>import("./layers/DimensionLayerView3D.js"),elevation:a,feature:()=>import("./layers/FeatureLayerView3D.js"),"gaussian-splat":()=>import("./layers/GaussianSplatLayerView3D.js"),geojson:()=>import("./layers/GeoJSONLayerView3D.js"),graphics:()=>import("./layers/GraphicsLayerView3D.js"),group:()=>import("./layers/GroupLayerView3D.js"),imagery:()=>import("./layers/ImageryLayerView3D.js"),"integrated-mesh":()=>import("./layers/IntegratedMeshLayerView3D.js"),"integrated-mesh-3dtiles":()=>import("./layers/IntegratedMesh3DTilesLayerView3D.js"),"line-of-sight":()=>import("./layers/LineOfSightLayerView3D.js"),"map-image":()=>import("./layers/MapImageLayerView3D.js"),media:()=>import("./layers/MediaLayerView3D.js"),"ogc-feature":()=>import("./layers/OGCFeatureLayerView3D.js"),"open-street-map":r,"oriented-imagery":()=>import("./layers/FeatureLayerView3D.js"),"point-cloud":()=>import("./layers/PointCloudLayerView3D.js"),viewshed:()=>import("./layers/ViewshedLayerView3D.js"),voxel:()=>import("./layers/VoxelLayerView3D.js"),route:()=>import("./layers/RouteLayerView3D.js"),scene:e=>null==e.profile||"mesh-pyramids"===e.profile?import("./layers/SceneLayerView3D.js"):import("./layers/SceneLayerGraphicsView3D.js"),stream:()=>import("./layers/StreamLayerView3D.js"),tile:r,"imagery-tile":()=>import("./layers/ImageryTileLayerView3D.js"),"vector-tile":()=>import("./layers/VectorTileLayerView3D.js"),wcs:()=>import("./layers/ImageryTileLayerView3D.js"),"web-tile":r,wfs:()=>import("./layers/WFSLayerView3D.js"),wms:()=>import("./layers/WMSLayerView3D.js"),wmts:()=>import("./layers/WMTSLayerView3D.js"),"annotation-feature":null,"geo-rss":null,kml:null,"knowledge-graph-sublayer":null,"knowledge-graph":null,"link-chart":null,"map-notes":null,parquet:null,"subtype-group":null,unknown:null,unsupported:null,video:null,"dimension-feature":null};function s(r){const a=r.declaredClass?r.declaredClass.slice(r.declaredClass.lastIndexOf(".")+1):"Unknown",i=a.replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();return new e(`${i}:view-not-supported`,`${a} is not supported in 3D`)}const t=new Map,l={hasLayerViewModule:e=>null!=i[e.type],importLayerView:e=>{const r=o(e),a=t.get(r);if(a)return a;const l=i[e.type];if(null==l)throw s(e);const y=l(e);return t.set(r,y),y}};function o(e){return"scene"===e.type?`${e.type}-${e.profile}`:e.type}export{l as layerView3DImporter};