@arcgis/core 5.1.0-next.113 → 5.1.0-next.115

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 (428) hide show
  1. package/Graphic.d.ts +1 -0
  2. package/Map.js +1 -1
  3. package/analysis/ShadowCast/MinDurationOptions.d.ts +3 -5
  4. package/analysis/ShadowCastAnalysis.d.ts +1 -1
  5. package/arcgisGlobal.d.ts +4 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{31a8bc25aa1441c70caa.js → 009250a7bded12099dd1.js} +1 -1
  8. package/assets/esri/core/workers/chunks/05c47ca3a266a271974b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{29bbc0d6d847b065d10e.js → 062aadf426fe97a76bbb.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0954e82f739d25001bcb.js +1 -0
  11. package/assets/esri/core/workers/chunks/0a530fbbb4486c670ea2.js +1 -0
  12. package/assets/esri/core/workers/chunks/0aaee272520c6e5bb617.js +1 -0
  13. package/assets/esri/core/workers/chunks/{12053c1213465d07d2f6.js → 0b445c1cf281f158c1f1.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{14b7b55c42af65ffa024.js → 0bd2b035c6ee89c725f9.js} +1 -1
  15. package/assets/esri/core/workers/chunks/0ded5c114cbb7574f2f4.js +1 -0
  16. package/assets/esri/core/workers/chunks/102ff3710db4ba5f083d.js +1 -0
  17. package/assets/esri/core/workers/chunks/{7dafe608c224b9d48ffa.js → 115664cb7d7b22a315bb.js} +1 -1
  18. package/assets/esri/core/workers/chunks/123a67e84ed68b96ac59.js +1 -0
  19. package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +1 -0
  20. package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +1 -0
  21. package/assets/esri/core/workers/chunks/{054ae729e7cefa2c7778.js → 170f8dc97614e9609443.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{9bd713d96502ddc2ce25.js → 1765042635084f75d2b3.js} +1 -1
  23. package/assets/esri/core/workers/chunks/185c670eb99474906836.js +1 -0
  24. package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +1 -0
  25. package/assets/esri/core/workers/chunks/{4a65bc9091d7ea7e80df.js → 19f07c8d0f32ec889861.js} +1 -1
  26. package/assets/esri/core/workers/chunks/1da2c34743897d1b6a24.js +1 -0
  27. package/assets/esri/core/workers/chunks/{ca92176d5348e2c533d7.js → 224a9f39876aa426a9bc.js} +1 -1
  28. package/assets/esri/core/workers/chunks/22d4521637806a8b828f.js +1 -0
  29. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +1 -0
  30. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +1 -0
  31. package/assets/esri/core/workers/chunks/2562d8905bd05ef6fd07.js +1 -0
  32. package/assets/esri/core/workers/chunks/{8aac1155b8ac071cd2ad.js → 2855357a2c1f2ab03fb7.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{e5d969214d9eda5c0b4c.js → 2a5dbed88bbd96cfac9f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{33329f5d88e60b4ec568.js → 2a8f198f6c272f92bad5.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{cb3004998eff7c60930e.js → 2b2a09ce14d00b4b1187.js} +1 -1
  36. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bd17ac2e6f1eb8cf7abf.js → 2fa080539d039c92ce08.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{ee635172be7fdea69367.js → 3109b05fe4fc40d4f25b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{92db9a6d273ae2862883.js → 315bf08dff4757ffbed3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/3192586ec7fc73ed1165.js +1 -0
  41. package/assets/esri/core/workers/chunks/{593772bd8b19ac664b29.js → 35527a01d61cabbfd33e.js} +1 -1
  42. package/assets/esri/core/workers/chunks/38ca59db0e8f45bd7811.js +1 -0
  43. package/assets/esri/core/workers/chunks/3b10a962e4ff2f3da5bc.js +1 -0
  44. package/assets/esri/core/workers/chunks/3e9709e61015993b1c7d.js +1 -0
  45. package/assets/esri/core/workers/chunks/41074d383af3662673ca.js +1 -0
  46. package/assets/esri/core/workers/chunks/425c04b26a6ec6d04b08.js +1 -0
  47. package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +1 -0
  48. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +1 -0
  49. package/assets/esri/core/workers/chunks/49675e77a351abda2728.js +1 -0
  50. package/assets/esri/core/workers/chunks/4cecc582513b8a83f194.js +1 -0
  51. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8ade869fa9bae446266a.js → 51816d79c6be15e4bfcf.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{cf9b0ba30a75c030ca92.js → 5524a71d1abc9568ce26.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{ba31616de9d73d83d867.js → 557e39e5156b313597f9.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{5ef37f37e405b3bb5450.js → 59dafa1e1340ea4043e6.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{77ac243d4dcd901c2eec.js → 621d71d26bd20e296138.js} +1 -1
  57. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +1 -0
  58. package/assets/esri/core/workers/chunks/{52a91c314afec70199bc.js → 62b5972d0ef9bf173308.js} +1 -1
  59. package/assets/esri/core/workers/chunks/641b8622fbb93c84671d.js +1 -0
  60. package/assets/esri/core/workers/chunks/643c7506f8fe8e06acd2.js +1 -0
  61. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +1 -0
  62. package/assets/esri/core/workers/chunks/{7e203e947846d40f897e.js → 67dffb896b6ef4b2038b.js} +1 -1
  63. package/assets/esri/core/workers/chunks/696967c8c6f53b94f851.js +1 -0
  64. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +1 -0
  65. package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +1 -0
  66. package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
  67. package/assets/esri/core/workers/chunks/76a9b64fd573775bf6cd.js +1 -0
  68. package/assets/esri/core/workers/chunks/{0d2bc1be5802681666a4.js → 77859a61d059738d057f.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{03a4543b94f9adeb1852.js → 7a3b05e25de2ff150f38.js} +1 -1
  70. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +1 -0
  71. package/assets/esri/core/workers/chunks/7c292f7b181f3b93352b.js +1 -0
  72. package/assets/esri/core/workers/chunks/7c2d7df4ef4d775cd648.js +1 -0
  73. package/assets/esri/core/workers/chunks/{6d20d741b8ae1a45b422.js → 7dc2c21d61ba66a3f461.js} +1 -1
  74. package/assets/esri/core/workers/chunks/7df05c3c82cd27b77300.js +1 -0
  75. package/assets/esri/core/workers/chunks/{6c79e8e840c1d027fbb2.js → 7e0daf0864005cdd63c5.js} +1 -1
  76. package/assets/esri/core/workers/chunks/7eb94fc75926bc739233.js +1 -0
  77. package/assets/esri/core/workers/chunks/8461f50e9875db4ccfec.js +1 -0
  78. package/assets/esri/core/workers/chunks/{71e12db99589c98a4357.js → 8477b5fdd99c6ac5c27b.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{be1e4c3ec53fc92a26f1.js → 8598997340682113a2a5.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{2dc2487d05381de07e3f.js → 86229634bf008f53dad4.js} +1 -1
  81. package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +1 -0
  82. package/assets/esri/core/workers/chunks/8795c4895df229cb471c.js +1 -0
  83. package/assets/esri/core/workers/chunks/87a40e7f79f97ca637a9.js +1 -0
  84. package/assets/esri/core/workers/chunks/{7bc746ea17f4e336e0b0.js → 8b5ee6be52e892fbd325.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{27d6ad4ca5ab8c9d62cd.js → 8c443c52c846a096a250.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{86161025b53b916328ff.js → 8ca88cfc0b9f84dc5832.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{340f2c996f62f7f5ceae.js → 8e7ce4835b3106349684.js} +1 -1
  88. package/assets/esri/core/workers/chunks/90b0fe5584fb6fc99766.js +1 -0
  89. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +1 -0
  90. package/assets/esri/core/workers/chunks/{d4749eb8a47869477037.js → 9250615c78f8570a9cda.js} +1 -1
  91. package/assets/esri/core/workers/chunks/927c8ca7fd385b28a1b7.js +640 -0
  92. package/assets/esri/core/workers/chunks/92a7735973b2f82a66ce.js +1 -0
  93. package/assets/esri/core/workers/chunks/942e527b9b92999886c7.js +1 -0
  94. package/assets/esri/core/workers/chunks/94a5a834e32fc6cc6ed4.js +1 -0
  95. package/assets/esri/core/workers/chunks/986d8c3907aeeb18c4f6.js +1 -0
  96. package/assets/esri/core/workers/chunks/98e489c2b85feded7776.js +1 -0
  97. package/assets/esri/core/workers/chunks/{eb1d6614eeac6d26bb9c.js → 9a3344f1dd22c425b8cc.js} +1 -1
  98. package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +1 -0
  99. package/assets/esri/core/workers/chunks/{271e42b7cd3c3441839e.js → 9eab1e1535494ff2050d.js} +10 -22
  100. package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → a01f0ffbe555f690bdca.js} +1 -1
  101. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +1 -0
  102. package/assets/esri/core/workers/chunks/a0b6eef4890cc61609dc.js +1 -0
  103. package/assets/esri/core/workers/chunks/{f37be7e517f0892014e3.js → a320c69bc7528ff0d0cf.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{660713adb5a845dfa2ef.js → a40003dfe3c081d1a1d2.js} +1 -1
  105. package/assets/esri/core/workers/chunks/a814069325125466506b.js +1 -0
  106. package/assets/esri/core/workers/chunks/{e4b2120d7ee1c998b1fc.js → aa03f770178693167aa0.js} +1 -1
  107. package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +1 -0
  108. package/assets/esri/core/workers/chunks/{7995e6983456c779adf9.js → b002304a45856b024b46.js} +1 -1
  109. package/assets/esri/core/workers/chunks/b0c242c4f5412e4cce73.js +1 -0
  110. package/assets/esri/core/workers/chunks/b44f1d08784f2e50c853.js +1 -0
  111. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +1 -0
  112. package/assets/esri/core/workers/chunks/b7a0a5b895ddd2d3d038.js +1 -0
  113. package/assets/esri/core/workers/chunks/{f3161c47a572194f6017.js → c06ae3a6ecc4a4fc67b2.js} +1 -1
  114. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +1 -0
  115. package/assets/esri/core/workers/chunks/{970e91de5dfbbc247afb.js → c5b7ff8650235c464dbf.js} +1 -1
  116. package/assets/esri/core/workers/chunks/c8dedc010fcc2382af24.js +1 -0
  117. package/assets/esri/core/workers/chunks/{f8b884b529064df4a30a.js → caf80facb0322be054ab.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{5a6523c903b11dea77d4.js → cdef9c3f80588ae45a04.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{25d795a1697803d77e56.js → ce0e627a5e1cb78adce8.js} +1 -1
  120. package/assets/esri/core/workers/chunks/{e973cab79ec2541cb81b.js → d19600336cb6023d3e34.js} +1 -1
  121. package/assets/esri/core/workers/chunks/{10491b5b106bc5ad0b2b.js → d66f68a811c90739951a.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{63378b0b4265a547656b.js → d8ec0afb2b91ccf32e55.js} +1 -1
  123. package/assets/esri/core/workers/chunks/d97c0c18202b8c578f8c.js +1 -0
  124. package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +1 -0
  125. package/assets/esri/core/workers/chunks/db012650fb34c10cecd0.js +1 -0
  126. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +1 -0
  127. package/assets/esri/core/workers/chunks/dce37324a2382d2eef0d.js +1 -0
  128. package/assets/esri/core/workers/chunks/e0bd550b10dd402c48f1.js +1 -0
  129. package/assets/esri/core/workers/chunks/{63513e706fe55a1def15.js → e227ae2c1a63e30e62d9.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{e4c350dc65aae121171d.js → e29d182460564c2a52ad.js} +1 -1
  131. package/assets/esri/core/workers/chunks/e2ba57f7119b7182ba02.js +279 -0
  132. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +1 -0
  133. package/assets/esri/core/workers/chunks/ea4057090cf15d602585.js +1 -0
  134. package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +1 -0
  135. package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +1 -0
  136. package/assets/esri/core/workers/chunks/eb16976b4eb7f1300f4a.js +1 -0
  137. package/assets/esri/core/workers/chunks/efae58f746b108163a50.js +1 -0
  138. package/assets/esri/core/workers/chunks/f0b5c140a5ba174572b6.js +1 -0
  139. package/assets/esri/core/workers/chunks/f231548c8ac7ecb59927.js +1 -0
  140. package/assets/esri/core/workers/chunks/{ce3b5b83237cf37ff523.js → f286680e363eefdf27df.js} +1 -1
  141. package/assets/esri/core/workers/chunks/f7698c855800e0af3038.js +1 -0
  142. package/assets/esri/core/workers/chunks/f931d560f3f14598f454.js +1 -0
  143. package/assets/esri/core/workers/chunks/fe2325efd0d8ad8369ed.js +1 -0
  144. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  145. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  146. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +26 -3
  147. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -13
  148. package/assets/esri/themes/dark/main.css +1 -1
  149. package/assets/esri/themes/light/main.css +1 -1
  150. package/assets/esri/themes/light/view.css +1 -1
  151. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  152. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  153. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  154. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  155. package/chunks/GlobalIllumination.glsl.js +22 -34
  156. package/chunks/Path.glsl.js +22 -17
  157. package/config.js +1 -1
  158. package/core/screenUtils.js +1 -1
  159. package/core/typedArrayUtil.js +1 -1
  160. package/editing/templates/TemplateListing.d.ts +32 -0
  161. package/editing/templates/TemplateListing.js +2 -0
  162. package/geometry/support/DoubleArray.js +1 -1
  163. package/geometry/support/Indices.js +1 -1
  164. package/geometry/support/buffer/BufferView.js +1 -1
  165. package/geometry/support/heightModelInfoUtils.js +1 -1
  166. package/interfaces.d.ts +14 -0
  167. package/kernel.js +1 -1
  168. package/layers/AnnotationLayer.d.ts +42 -0
  169. package/layers/AnnotationLayer.js +2 -0
  170. package/layers/DimensionFeatureLayer.d.ts +36 -1
  171. package/layers/DimensionFeatureLayer.js +1 -1
  172. package/layers/DimensionLayer.d.ts +22 -0
  173. package/layers/FeatureLayer.d.ts +15 -12
  174. package/layers/FeatureLayer.js +1 -1
  175. package/layers/GaussianSplatLayer.d.ts +22 -0
  176. package/layers/LineOfSightLayer.d.ts +22 -0
  177. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  178. package/layers/PointCloudLayer.d.ts +22 -0
  179. package/layers/ViewshedLayer.d.ts +22 -0
  180. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  181. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  182. package/layers/support/Field.d.ts +1 -0
  183. package/layers/support/Field.js +1 -1
  184. package/layers/support/SceneModification.js +1 -1
  185. package/layers/support/types.d.ts +1 -1
  186. package/layers/types.d.ts +2 -1
  187. package/networks/support/networkFieldUtils.js +1 -1
  188. package/package.json +1 -1
  189. package/rest/support/OutDistance.js +1 -1
  190. package/rest/support/Query.d.ts +1 -0
  191. package/rest/support/Query.js +1 -1
  192. package/support/basemapEnsureType.js +1 -1
  193. package/support/revision.js +1 -1
  194. package/symbols/cim/CIMOperators.js +1 -1
  195. package/symbols/cim/CIMSymbolHelper.js +1 -1
  196. package/symbols/cim/animationUtils.js +1 -1
  197. package/symbols/cim/defaultCIMValues.js +1 -1
  198. package/symbols/cim/utils.js +1 -1
  199. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  200. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  201. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  202. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  203. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ViewInfo.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  212. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  213. package/views/2d/engine/webgl/util/AnnotationMatcher.js +2 -0
  214. package/views/2d/engine/webgl/util/DimensionMatcher.js +2 -0
  215. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  216. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  217. package/views/2d/layerViewModuleImportUtils.js +1 -1
  218. package/views/2d/layers/AnnotationLayerView2D.js +2 -0
  219. package/views/2d/layers/{DimensionLayerView2D.js → DimensionFeatureLayerView2D.js} +1 -1
  220. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  221. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  222. package/views/2d/layers/RouteLayerView2D.js +1 -1
  223. package/views/2d/layers/TileLayerView2D.js +1 -1
  224. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  225. package/views/2d/layers/features/FeatureContainer.js +1 -1
  226. package/views/2d/layers/features/Processor.js +1 -1
  227. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +2 -0
  228. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  229. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  230. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  231. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  232. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  233. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  234. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  235. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  236. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  237. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  238. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  239. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  240. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  241. package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +2 -0
  242. package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +2 -0
  243. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  244. package/views/2d/layers/support/annodime/DimensionInfo.js +2 -0
  245. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +2 -0
  246. package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +2 -0
  247. package/views/2d/layers/support/annodime/PrivatePlacementMultipoint.js +2 -0
  248. package/views/2d/layers/support/annodime/annotationGraphic.js +2 -0
  249. package/views/2d/layers/support/annodime/annotationSchema.js +2 -0
  250. package/views/2d/layers/support/annodime/annotationUtils.js +2 -0
  251. package/views/2d/layers/support/annodime/cimAnnotations.js +2 -0
  252. package/views/2d/layers/support/annodime/dimensionSchema.js +2 -0
  253. package/views/2d/layers/support/annodime/dimensionSymbols.js +2 -0
  254. package/views/2d/layers/support/annodime/dimensionUtils.js +2 -0
  255. package/views/2d/layers/support/annodime/fields.js +2 -0
  256. package/views/2d/layers/support/annodime/unsupported.js +2 -0
  257. package/views/2d/layers/support/annodime/utils.js +2 -0
  258. package/views/2d/layers/support/annodime/virtualFields.js +2 -0
  259. package/views/2d/support/clippingUtils.js +1 -1
  260. package/views/2d/support/hitTestUtils.js +1 -1
  261. package/views/2d/types.d.ts +5 -1
  262. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  263. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  264. package/views/3d/input/SceneInputManager.js +1 -1
  265. package/views/3d/layerViewModuleImportUtils.js +1 -1
  266. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  267. package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
  268. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  269. package/views/3d/layers/TileLayerView3D.js +1 -1
  270. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  271. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  272. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  273. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  274. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  275. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  276. package/views/3d/support/engineContent/line.js +1 -1
  277. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  278. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  279. package/views/3d/types.d.ts +2 -0
  280. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  281. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  282. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +8 -8
  283. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +225 -0
  284. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +19 -0
  285. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +55 -40
  286. package/views/3d/webgl-engine/core/shaderModules/Float2sPassUniform.js +2 -0
  287. package/views/3d/webgl-engine/core/shaderModules/IntegersPassUniform.js +2 -0
  288. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  289. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  290. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  291. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  292. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  293. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  294. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  295. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  296. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  297. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  298. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  299. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  300. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  301. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  302. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  303. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +18 -1
  304. package/views/PopupView.d.ts +3 -3
  305. package/views/PopupView.js +1 -1
  306. package/views/SceneView.js +1 -1
  307. package/views/View2D.d.ts +1 -1
  308. package/views/View2D.js +1 -1
  309. package/views/draw/DrawTool.d.ts +34 -1
  310. package/views/input/EventMatch.js +1 -1
  311. package/views/layers/AnnotationLayerView.d.ts +18 -0
  312. package/views/layers/AnnotationLayerView.js +2 -0
  313. package/views/layers/DimensionFeatureLayerView.d.ts +18 -0
  314. package/views/layers/DimensionFeatureLayerView.js +2 -0
  315. package/views/layers/FeatureLikeLayerView.d.ts +2 -1
  316. package/views/layers/FeatureLikeLayerView.js +1 -1
  317. package/views/layers/ImageryLayerView.js +1 -1
  318. package/views/layers/ImageryTileLayerView.js +1 -1
  319. package/views/layers/WMSLayerView.js +1 -1
  320. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  321. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  322. package/widgets/BatchAttributeForm/css.js +1 -1
  323. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +2 -0
  324. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  325. package/widgets/BatchAttributeForm.js +1 -1
  326. package/widgets/Directions/DirectionsViewModel.js +1 -1
  327. package/widgets/Directions.js +1 -1
  328. package/widgets/FeatureForm.js +1 -1
  329. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +7 -1
  330. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  331. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  332. package/widgets/FeatureTable/support/types.d.ts +11 -1
  333. package/widgets/FeatureTable.d.ts +7 -1
  334. package/widgets/FeatureTable.js +1 -1
  335. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  336. package/widgets/OrientedImageryViewer/css.js +1 -1
  337. package/widgets/OrientedImageryViewer.js +1 -1
  338. package/widgets/support/iconUtils.js +1 -1
  339. package/assets/esri/core/workers/chunks/0175098da590a7109539.js +0 -1
  340. package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +0 -262
  341. package/assets/esri/core/workers/chunks/02c0640005b09007bb70.js +0 -1
  342. package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +0 -1
  343. package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +0 -1
  344. package/assets/esri/core/workers/chunks/0550dc63b6b1274242b8.js +0 -1
  345. package/assets/esri/core/workers/chunks/0c8e6ccb5a8174718d62.js +0 -640
  346. package/assets/esri/core/workers/chunks/13a8346abe5509167578.js +0 -1
  347. package/assets/esri/core/workers/chunks/13d43a0683c42b94feb6.js +0 -1
  348. package/assets/esri/core/workers/chunks/13f0e08de2dfab07d212.js +0 -1
  349. package/assets/esri/core/workers/chunks/1c0e8808d14d8e6dde2c.js +0 -1
  350. package/assets/esri/core/workers/chunks/1c8c8050d60205cf2156.js +0 -1
  351. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +0 -1
  352. package/assets/esri/core/workers/chunks/23119a1b1310b7dab2aa.js +0 -1
  353. package/assets/esri/core/workers/chunks/282f3d364411efac7b80.js +0 -1
  354. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +0 -1
  355. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +0 -1
  356. package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +0 -1
  357. package/assets/esri/core/workers/chunks/313a89b334e3518d30a4.js +0 -1
  358. package/assets/esri/core/workers/chunks/34c11e7c8762fe0c19fb.js +0 -1
  359. package/assets/esri/core/workers/chunks/3835097520296b0517af.js +0 -1
  360. package/assets/esri/core/workers/chunks/389e57aab12d52d72695.js +0 -1
  361. package/assets/esri/core/workers/chunks/3fed503185ea1913fb84.js +0 -1
  362. package/assets/esri/core/workers/chunks/4020f95d8131493f799e.js +0 -1
  363. package/assets/esri/core/workers/chunks/4255ad7601c7a7621b71.js +0 -1
  364. package/assets/esri/core/workers/chunks/453c3b265481c80fc625.js +0 -1
  365. package/assets/esri/core/workers/chunks/4605a68e40c5c3ac6e3e.js +0 -1
  366. package/assets/esri/core/workers/chunks/4a41f98210f1da3b5041.js +0 -1
  367. package/assets/esri/core/workers/chunks/4afe76de6e82e86fe697.js +0 -1
  368. package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +0 -1
  369. package/assets/esri/core/workers/chunks/4c5cdd2712c938fafc5d.js +0 -1
  370. package/assets/esri/core/workers/chunks/4fa3840672c33adb9171.js +0 -1
  371. package/assets/esri/core/workers/chunks/5a85cbc04c64091d7f46.js +0 -1
  372. package/assets/esri/core/workers/chunks/5d60253ea3d247cdb3d1.js +0 -1
  373. package/assets/esri/core/workers/chunks/5e5c7cc74ff1c9603aff.js +0 -1
  374. package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +0 -1
  375. package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +0 -1
  376. package/assets/esri/core/workers/chunks/63ea9035dcf9ce45560c.js +0 -1
  377. package/assets/esri/core/workers/chunks/66fe1634c6e8f72fc653.js +0 -1
  378. package/assets/esri/core/workers/chunks/6b66a6f69aa03338c346.js +0 -1
  379. package/assets/esri/core/workers/chunks/6d59a9cf533ebc590f70.js +0 -1
  380. package/assets/esri/core/workers/chunks/6f02681bcaa9bef501fc.js +0 -1
  381. package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +0 -1
  382. package/assets/esri/core/workers/chunks/7c077e1a63ab97bf3e87.js +0 -1
  383. package/assets/esri/core/workers/chunks/7dc9ff66e1eceadbae24.js +0 -1
  384. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +0 -1
  385. package/assets/esri/core/workers/chunks/85a200aecc7a844c9566.js +0 -1
  386. package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +0 -1
  387. package/assets/esri/core/workers/chunks/8c8fed53c12fb80ef2ed.js +0 -1
  388. package/assets/esri/core/workers/chunks/8ff83c59462dea6e3427.js +0 -1
  389. package/assets/esri/core/workers/chunks/958617c3a9854ea04e06.js +0 -1
  390. package/assets/esri/core/workers/chunks/9890c85a238879490926.js +0 -1
  391. package/assets/esri/core/workers/chunks/a001e7e8a39f27284d87.js +0 -1
  392. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +0 -1
  393. package/assets/esri/core/workers/chunks/a93a058678c8c8996d54.js +0 -1
  394. package/assets/esri/core/workers/chunks/a9c9c00432ee41ec91ba.js +0 -1
  395. package/assets/esri/core/workers/chunks/acb8cff06142f828fb78.js +0 -1
  396. package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +0 -1
  397. package/assets/esri/core/workers/chunks/b041c22885193bdd3004.js +0 -1
  398. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +0 -1
  399. package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +0 -1
  400. package/assets/esri/core/workers/chunks/b4badbcf1bdb7823d825.js +0 -1
  401. package/assets/esri/core/workers/chunks/b891d95b7858665cd6c1.js +0 -1
  402. package/assets/esri/core/workers/chunks/bb2f6b0fcdfb8b158e26.js +0 -1
  403. package/assets/esri/core/workers/chunks/c0c693c2e0043ecba4a5.js +0 -1
  404. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +0 -1
  405. package/assets/esri/core/workers/chunks/c91d4f1b42cfe474df52.js +0 -1
  406. package/assets/esri/core/workers/chunks/cedf3e316d6f89cf7005.js +0 -1
  407. package/assets/esri/core/workers/chunks/d33a08e5f589355c57a3.js +0 -1
  408. package/assets/esri/core/workers/chunks/d52172439db02a349542.js +0 -1
  409. package/assets/esri/core/workers/chunks/dd29fd1b3da90d3ca6b1.js +0 -1
  410. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +0 -1
  411. package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +0 -1
  412. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +0 -1
  413. package/assets/esri/core/workers/chunks/eda51e512eff551ad858.js +0 -1
  414. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +0 -1
  415. package/assets/esri/core/workers/chunks/f14e3693cd644265f909.js +0 -1
  416. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +0 -1
  417. package/assets/esri/core/workers/chunks/f635a8e3b0bfeda99ed5.js +0 -1
  418. package/assets/esri/core/workers/chunks/f91a2c69a93295cf4de6.js +0 -1
  419. package/assets/esri/core/workers/chunks/fec3fffcf854a6226df4.js +0 -1
  420. package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +0 -2
  421. package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +0 -2
  422. package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +0 -2
  423. package/symbols/dimensions/effects/LinearDimensionLineEffect.js +0 -2
  424. package/symbols/dimensions/effects/LinearDimensionPointEffect.js +0 -2
  425. package/symbols/dimensions/effects/LinearDimensionTextEffect.js +0 -2
  426. package/views/2d/layers/features/support/FeatureSetReaderDimension.js +0 -2
  427. package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +0 -2
  428. package/views/layers/support/dimensionUtils.js +0 -2
package/views/View2D.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as p,cast as h,subclass as g}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import{initialize as u}from"../core/workers/workers.js";import c from"../geometry/Point.js";import m from"../geometry/Polygon.js";import{isLoadedOrLoadFor as y}from"../geometry/projectionUtils.js";import f from"../layers/support/TileInfo.js";import{BreakpointsOwner as w}from"./BreakpointsOwner.js";import{DOMContainer as V}from"./DOMContainer.js";import{PopupView as v}from"./PopupView.js";import M from"./View.js";import{Viewport2DBaseMixin as _}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as b}from"./Viewport2DMixin.js";import S from"./2d/AnimationManager.js";import{layerView2DImporter as R}from"./2d/layerViewModuleImportUtils.js";import j from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as T}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as O}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as k}from"./2d/engine/ManagedCanvas.js";import L from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as C}from"./2d/layers/support/util.js";import{clipContainsPoint as x}from"./2d/support/clippingUtils.js";import{hitTest as D}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as P,takeScreenshot as z}from"./2d/support/screenshotUtils.js";import{Timeline as A}from"./2d/support/Timeline.js";import E from"./navigation/Navigation.js";import I from"./navigation/NavigationActionMap.js";import U from"./support/AnalysisViewManager.js";import G from"./ui/DefaultUI.js";import F from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as q}from"./webgl/RenderingContextOptions.js";import{isWebMap as W}from"../webmap/utils.js";import N from"../webmap/background/ColorBackground.js";let B,H,Z,K,Q,J;async function X(){const[,{GraphicsView2D:e,GraphicContainer:t,MapViewNavigation:i,MagnifierView2D:r,GridView2D:s,Stage:a}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);H=e,Z=t,K=i,Q=r,J=s,B=a}let Y=class extends(b(_(w(v(V(M)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.navigation=new E({actionMap:new I({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new U({importAnalysisViewModule:e=>O(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new A,this.type="2d",this.view2dType=null,this.ui=new F,this.test={takeScreenshot:async e=>P(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},u()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new L(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return y(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return W(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){if(this.destroying||this.destroyed)return!1;const{analysisViewManager:e,allLayerViews:t,frameTask:i,graphicsView:r,inputManager:s,layerViewManager:a,magnifier:n,map:o,ready:l,rendering:p,selectionManager:h,stationary:g,toolViewManager:d,updatingHandles:u,stage:c}=this,m=o?.basemap,y=o?.ground,f="loading"===m?.loadStatus||"loading"===y?.loadStatus||!!o?.allLayers?.some(e=>e.parent!==y&&!e.isFulfilled()),w=!c||c.updating,V=!u||u.updating,v=!e||e.updating,M=!d||d.updating,_=!s||s.updating,b=!r||r.updating,S=!i||i.updating,R=!a||a.updating,j=!h||h.updating,T=!(!n.visible||null===n.position||!this._magnifierView?.updatingHandles.updating),O=t.some(e=>e.updating&&!e.destroyed&&!("layerViews"in e));return!l||!g||p||f||O||T||V||v||S||M||_||R||b||j||w}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new m({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return D(this,e,t)}async takeScreenshot(e){return z(this._getScreenshotView(e),e)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}zoomIn(){return super.zoomIn()}zoomOut(){return super.zoomOut()}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return W(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return W(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return R.hasLayerViewModule(e)}importLayerView(e){return R.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=this.toMap(e),i=await this.hitTest(e),r=this.allLayerViews.toArray().filter(i=>i.clips.every(i=>x(this,i,e,t))).reverse(),s=new globalThis.Map(r.map(e=>[e.layer.uid,e])),a=[];let n=0,o=0;for(;n<i.results.length||o<r.length;){const e=i.results.at(n);if(e&&"graphic"!==e.type){++n;continue}const l=s.get((e?.layer??e?.graphic.layer)?.uid);if((!e||l)&&o<r.length&&r.at(o)!==l){const e=r.at(o);"fetchPopupFeaturesAtTarget"in e&&a.push({geometry:t,layerView:e}),++o}else e&&(a.push({graphic:e.graphic,layerView:l}),++n)}return{hits:a,location:t}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return X()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&T(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=this._createFeaturesTilingScheme(),i=new k(this.surface),r=new B(this.surface,{canvas:this.renderCanvas,contextOptions:new q(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),featuresTilingScheme:t,renderingOptions:this.renderingOptions,timeline:this.timeline},i);this.stage=r,this._magnifierView=new Q,this._magnifierView.magnifier=this.magnifier,this._gridView=new J;const s=new S({view:this});this._set("animationManager",s);const a=new K({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(t),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),r.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>r.stationary=e,l),o(()=>this.background,e=>{r.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>r.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{r.highlightGradient=C(r.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>r.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(e=this._createFeaturesTilingScheme()){this._set("featuresTilingScheme",e),this.stage.labelManager.featuresTilingScheme=e;const t=new H({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new Z(e,!0)});this._set("graphicsView",t)}_createFeaturesTilingScheme(){return new j(f.create({spatialReference:this.spatialReference,size:512,numLODs:36}))}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([p()],Y.prototype,"_magnifierView",void 0),e([p()],Y.prototype,"_gridView",void 0),e([p({constructOnly:!0})],Y.prototype,"deactivatedWebGLExtensions",void 0),e([p({constructOnly:!0})],Y.prototype,"debugWebGLExtensions",void 0),e([p({readOnly:!0})],Y.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],Y.prototype,"graphicsTileStore",null),e([p()],Y.prototype,"graphicsView",void 0),e([p()],Y.prototype,"constraintsInfo",null),e([p()],Y.prototype,"initialExtentRequired",null),e([p({type:E,nonNullable:!0})],Y.prototype,"navigation",void 0),e([p({constructOnly:!0})],Y.prototype,"renderCanvas",void 0),e([p()],Y.prototype,"renderingOptions",void 0),e([p({constructOnly:!0})],Y.prototype,"supersampleScreenshotsEnabled",void 0),e([p()],Y.prototype,"defaultsFromMapSettings",null),e([p({readOnly:!0})],Y.prototype,"typeSpecificPreconditionsReady",null),e([p()],Y.prototype,"analysisViewManager",void 0),e([p({type:N})],Y.prototype,"background",null),e([p({type:c})],Y.prototype,"center",null),e([p({type:i})],Y.prototype,"floors",void 0),e([p()],Y.prototype,"grid",void 0),e([p()],Y.prototype,"map",void 0),e([p()],Y.prototype,"padding",null),e([p({readOnly:!0})],Y.prototype,"rendering",null),e([p({readOnly:!0})],Y.prototype,"resolution",null),e([p()],Y.prototype,"scale",null),e([p({type:Boolean,value:!1})],Y.prototype,"spatialReferenceLocked",null),e([p({readOnly:!0})],Y.prototype,"tileInfo",null),e([p({type:A,readOnly:!0})],Y.prototype,"timeline",void 0),e([p({readOnly:!0})],Y.prototype,"type",void 0),e([p({type:Boolean,readOnly:!0})],Y.prototype,"updating",null),e([p({readOnly:!0})],Y.prototype,"view2dType",void 0),e([p({readOnly:!0})],Y.prototype,"visibleArea",null),e([p()],Y.prototype,"zoom",null),e([p({readOnly:!0})],Y.prototype,"navigating",null),e([p(),h(e=>e instanceof G?e:d(F,e))],Y.prototype,"ui",void 0),Y=e([g("esri.views.View2D")],Y);const $=Y;export{$ as default};
2
+ import{__decorate as e}from"tslib";import t from"../Viewpoint.js";import i from"../core/Collection.js";import r from"../core/CollectionFlattener.js";import s from"../core/Error.js";import"../core/has.js";import a from"../core/Logger.js";import{destroyMaybe as n}from"../core/maybe.js";import{watch as o,syncAndInitial as l}from"../core/reactiveUtils.js";import{isScreenPoint as p,screenRectToPolygon as h,createScreenPoint as g}from"../core/screenUtils.js";import{property as d,cast as u,subclass as c}from"../core/accessorSupport/decorators.js";import{ensureClass as m}from"../core/accessorSupport/ensureType.js";import{initialize as y}from"../core/workers/workers.js";import f from"../geometry/Point.js";import w from"../geometry/Polygon.js";import{isLoadedOrLoadFor as V}from"../geometry/projectionUtils.js";import v from"../layers/support/TileInfo.js";import{BreakpointsOwner as M}from"./BreakpointsOwner.js";import{DOMContainer as _}from"./DOMContainer.js";import{PopupView as b}from"./PopupView.js";import S from"./View.js";import{Viewport2DBaseMixin as R}from"./Viewport2DBaseMixin.js";import{Viewport2DMixin as j}from"./Viewport2DMixin.js";import T from"./2d/AnimationManager.js";import{layerView2DImporter as O}from"./2d/layerViewModuleImportUtils.js";import k from"./2d/tiling/TileInfoView.js";import"./2d/tiling/TileKey.js";import"./2d/tiling/TileQueue.js";import"./2d/tiling/TileStrategy.js";import{extentToScale as L}from"./2d/viewpointUtils.js";import{importAnalysisViewModule as C}from"./2d/analysis/analysisViewModuleImportUtils.js";import{ManagedCanvas as x}from"./2d/engine/ManagedCanvas.js";import D from"./2d/layers/features/support/TileStore.js";import{createOrReuseHighlightGradient as P}from"./2d/layers/support/util.js";import{hitTest as z,getHitTestLayerViews as A}from"./2d/support/hitTestUtils.js";import{takeRawScreenshot as E,takeScreenshot as I}from"./2d/support/screenshotUtils.js";import{Timeline as U}from"./2d/support/Timeline.js";import G from"./navigation/Navigation.js";import F from"./navigation/NavigationActionMap.js";import q from"./support/AnalysisViewManager.js";import W from"./ui/DefaultUI.js";import N from"./ui/2d/DefaultUI2D.js";import{RenderingContextOptions as B}from"./webgl/RenderingContextOptions.js";import{isWebMap as H}from"../webmap/utils.js";import Z from"../webmap/background/ColorBackground.js";let K,Q,J,X,Y,$;async function ee(){const[,{GraphicsView2D:e,GraphicContainer:t,MapViewNavigation:i,MagnifierView2D:r,GridView2D:s,Stage:a}]=await Promise.all([import("./2d/webglDeps.js"),import("./2d/mapViewDeps.js")]);Q=e,J=t,X=i,Y=r,$=s,K=a}let te=class extends(j(R(M(b(_(S)))))){get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this._magnifierView=null,this._gridView=null,this.stage=null,this._resolveWhenReady=[],this.rootLayerViews=new r({getCollections:()=>[this.basemapView?.baseLayerViews,this.layerViews,this.basemapView?.referenceLayerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.navigation=new G({actionMap:new F({dragTertiary:"none"})}),this.renderingOptions={samplingMode:"dynamic",edgeLabelsVisible:!0,labelsAnimationTime:125,labelCollisionsEnabled:!0},this.supersampleScreenshotsEnabled=!0,this.analysisViewManager=new q({importAnalysisViewModule:e=>C(e),view:this}),this.floors=new i,this.grid=null,this.map=null,this.timeline=new U,this.type="2d",this.view2dType=null,this.ui=new N,this.test={takeScreenshot:async e=>E(this._getScreenshotView(e),e)},this.padding={top:0,right:0,bottom:0,left:0},y()}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=n(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy(),this.inputManager.destroy(),this._set("inputManager",null)}get graphicsTileStore(){return new D(this.featuresTilingScheme)}get constraintsInfo(){const e=this.defaultsFromMap?.tileInfo,t=this.spatialReference;return{lods:e?.spatialReference?.equals(t)?e.lods:null,spatialReference:t}}get initialExtentRequired(){if(!this.stateManager)return!1;const{scale:e,constraints:t,center:i,viewpoint:r,extent:s}=this;let a=this.zoom;return!(this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties?.viewpoint)&&(!s&&(t?.effectiveLODs||(a=-1),(!i||0===e&&-1===a)&&(null==r?.targetGeometry||"extent"!==r.targetGeometry.type&&!r.scale)))}get defaultsFromMapSettings(){return{required:{extent:!1,heightModelInfo:!1,tileInfo:!0},requiresExtentInSpatialReference:this.spatialReferenceLocked}}get scheduler(){return this.frameTask.scheduler}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return V(t.spatialReference,i)}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get background(){return H(this.map)?this.map.initialViewProperties.background:null}set background(e){this._override("background",e)}get center(){return this.stateManager?.center??null}set center(e){this.stateManager.center=e}get constraints(){return super.constraints}set constraints(e){super.constraints=e}get extent(){return super.extent}set extent(e){super.extent=e}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get rendering(){return this.stage?.renderRequested??!1}get resizeAlign(){return super.resizeAlign}set resizeAlign(e){super.resizeAlign=e}get resolution(){return this.stateManager.resolution??0}get rotation(){return super.rotation}set rotation(e){super.rotation=e}get scale(){return this.stateManager?.scale??0}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get spatialReference(){return super.spatialReference}set spatialReference(e){super.spatialReference=e}get spatialReferenceLocked(){return this._get("spatialReferenceLocked")}set spatialReferenceLocked(e){this.stage&&a.getLogger(this).warn("spatialReferenceLocked cannot be changed after the view has become ready"),this._set("spatialReferenceLocked",e)}get tileInfo(){return this.featuresTilingScheme?.tileInfo}get updating(){if(this.destroying||this.destroyed)return!1;const{analysisViewManager:e,allLayerViews:t,frameTask:i,graphicsView:r,inputManager:s,layerViewManager:a,magnifier:n,map:o,ready:l,rendering:p,selectionManager:h,stationary:g,toolViewManager:d,updatingHandles:u,stage:c}=this,m=o?.basemap,y=o?.ground,f="loading"===m?.loadStatus||"loading"===y?.loadStatus||!!o?.allLayers?.some(e=>e.parent!==y&&!e.isFulfilled()),w=!c||c.updating,V=!u||u.updating,v=!e||e.updating,M=!d||d.updating,_=!s||s.updating,b=!r||r.updating,S=!i||i.updating,R=!a||a.updating,j=!h||h.updating,T=!(!n.visible||null===n.position||!this._magnifierView?.updatingHandles.updating),O=t.some(e=>e.updating&&!e.destroyed&&!("layerViews"in e));return!l||!g||p||f||O||T||V||v||S||M||_||R||b||j||w}get viewpoint(){return super.viewpoint}set viewpoint(e){super.viewpoint=e}get visibleArea(){const e=this.stateManager.visibleArea;return e?new w({rings:[e.map(e=>[e[0],e[1]])],spatialReference:this.spatialReference}):e}get zoom(){return this.stateManager.zoom??-1}set zoom(e){this.stateManager.zoom=e}get navigating(){return this.mapViewNavigation?.interacting??!1}async hitTest(e,t){return z(this,e,t)}async takeScreenshot(e){return I(this._getScreenshotView(e),e)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}toScreen(e,t){return this.stateManager.toScreen(e,t)}async whenAnalysisView(e){if(null==e.parent)throw new s("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}graphicChanged(e){if(this.graphicsView){this.graphicsView.graphicUpdateHandler(e)}}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}zoomIn(){return super.zoomIn()}zoomOut(){return super.zoomOut()}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map.initialViewProperties.spatialReference||this.defaultsFromMap?.spatialReference||null}getDefaultTimeZone(){return H(this.map)?this.map.initialViewProperties.timeZone:null}getDefaultTimeExtent(){return H(this.map)?this.map.initialViewProperties.timeExtent:null}getSurface(){return this.surface}hasLayerViewModule(e){return O.hasLayerViewModule(e)}importLayerView(e){return O.importLayerView(e)}pixelSizeAt(){return this.ready?this.resolution:(a.getLogger(this).error("#pixelSizeAt()","Map view cannot be used before it is ready"),null)}async popupHitTest(e){const t=p(e)?this.toMap(e):h(this,e),i=p(e)?e:g(e.x+e.width/2,e.y+e.height/2),r=this.toMap(i),s=await this.hitTest(e),a=A(this,e,r),n=new globalThis.Map(a.map(e=>[e.layer.uid,e])),o=[];let l=0,d=0;for(;l<s.results.length||d<a.length;){const e=s.results.at(l);if(e&&"graphic"!==e.type){++l;continue}const i=n.get((e?.layer??e?.graphic.layer)?.uid);if((!e||i)&&d<a.length&&a.at(d)!==i){const e=a.at(d);"fetchPopupFeaturesAtTarget"in e&&o.push({geometry:t,layerView:e}),++d}else e&&(o.push({graphic:e.graphic,layerView:i}),++l)}return{hits:o,location:r}}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return ee()}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:r,padding:s,size:a}=this;if(!e)return null;const n=r&&"initialViewProperties"in r?r.initialViewProperties:void 0,o=this.stateManager.getUserStartupOptions(this.size),l=n?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,g=l?.rotation??0,d=l?.scale||p&&L(p,[a[0]-s.left-s.right,a[1]-s.top-s.bottom]),u=o.center??h,c=o.rotation??g,m=o.scale??d;return u&&m?new t({targetGeometry:u,scale:m,rotation:c}):null}_startup(){this.timeline.begin("MapView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=this._createFeaturesTilingScheme(),i=new x(this.surface),r=new K(this.surface,{canvas:this.renderCanvas,contextOptions:new B(this.deactivatedWebGLExtensions,this.debugWebGLExtensions),featuresTilingScheme:t,renderingOptions:this.renderingOptions,timeline:this.timeline},i);this.stage=r,this._magnifierView=new Y,this._magnifierView.magnifier=this.magnifier,this._gridView=new $;const s=new T({view:this});this._set("animationManager",s);const a=new X({view:this,animationManager:s});this._set("mapViewNavigation",a),this._setupSpatialReferenceDependentProperties(t),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),r.on("webgl-error",e=>this.fatalError=e.error),o(()=>this.stationary,e=>r.stationary=e,l),o(()=>this.background,e=>{r.backgroundColor=e?.color,this._magnifierView.backgroundColor=e?.color},l),o(()=>this.magnifier,e=>this._magnifierView.magnifier=e,l),o(()=>this.grid,e=>this._gridView.grid=e,l),o(()=>this.renderingOptions,e=>r.renderingOptions=e,l),o(()=>this.highlights.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{r.highlightGradient=P(r.highlightGradient,this.highlights.items)},l),o(()=>this.state.id,()=>r.state=this.state,l),o(()=>this.animationsEnabled,e=>this.stage.animationsEnabled=e,l)],"map-view"),this._updateStageChildren();const n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this)),this.timeline.end("MapView Startup"),this.frameTask.start(),this._set("ready",!0)}_teardown(){this._destroySpatialReferenceDependentProperties(),this.removeHandles("map-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this._magnifierView.destroy(),this._gridView.destroy(),this.stage.destroy(),this.stage=null,this._set("graphicsView",null),this._magnifierView=null,this._gridView=null,this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container),this.stage.addChild(this._magnifierView),this.stage.addChild(this._gridView)}_setupSpatialReferenceDependentProperties(e=this._createFeaturesTilingScheme()){this._set("featuresTilingScheme",e),this.stage.labelManager.featuresTilingScheme=e;const t=new Q({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new J(e,!0)});this._set("graphicsView",t)}_createFeaturesTilingScheme(){return new k(v.create({spatialReference:this.spatialReference,size:512,numLODs:36}))}_destroySpatialReferenceDependentProperties(){const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null)}_getScreenshotView(e){const{allLayerViews:t,padding:i,size:r,stage:s}=this;return{allLayerViews:t,backgroundColor:e?.ignoreBackground?null:this.background?.color,padding:i,size:r,stage:s}}_spatialReferenceChanged(e){if(this.ready){this.frameTask.stop();for(const e of this.allLayerViews)e.processDetach();this._destroySpatialReferenceDependentProperties(),this.stateManager.changeSpatialReference(e),this.stage.state=this.state,this._setupSpatialReferenceDependentProperties();for(const e of this.allLayerViews)e.processAttach();this.frameTask.requestFrame(),this.frameTask.start(),this._updateStageChildren()}}static{this.type="2d"}};e([d()],te.prototype,"_magnifierView",void 0),e([d()],te.prototype,"_gridView",void 0),e([d({constructOnly:!0})],te.prototype,"deactivatedWebGLExtensions",void 0),e([d({constructOnly:!0})],te.prototype,"debugWebGLExtensions",void 0),e([d({readOnly:!0})],te.prototype,"featuresTilingScheme",void 0),e([d({readOnly:!0})],te.prototype,"graphicsTileStore",null),e([d()],te.prototype,"graphicsView",void 0),e([d()],te.prototype,"constraintsInfo",null),e([d()],te.prototype,"initialExtentRequired",null),e([d({type:G,nonNullable:!0})],te.prototype,"navigation",void 0),e([d({constructOnly:!0})],te.prototype,"renderCanvas",void 0),e([d()],te.prototype,"renderingOptions",void 0),e([d({constructOnly:!0})],te.prototype,"supersampleScreenshotsEnabled",void 0),e([d()],te.prototype,"defaultsFromMapSettings",null),e([d({readOnly:!0})],te.prototype,"typeSpecificPreconditionsReady",null),e([d()],te.prototype,"analysisViewManager",void 0),e([d({type:Z})],te.prototype,"background",null),e([d({type:f})],te.prototype,"center",null),e([d({type:i})],te.prototype,"floors",void 0),e([d()],te.prototype,"grid",void 0),e([d()],te.prototype,"map",void 0),e([d()],te.prototype,"padding",null),e([d({readOnly:!0})],te.prototype,"rendering",null),e([d({readOnly:!0})],te.prototype,"resolution",null),e([d()],te.prototype,"scale",null),e([d({type:Boolean,value:!1})],te.prototype,"spatialReferenceLocked",null),e([d({readOnly:!0})],te.prototype,"tileInfo",null),e([d({type:U,readOnly:!0})],te.prototype,"timeline",void 0),e([d({readOnly:!0})],te.prototype,"type",void 0),e([d({type:Boolean,readOnly:!0})],te.prototype,"updating",null),e([d({readOnly:!0})],te.prototype,"view2dType",void 0),e([d({readOnly:!0})],te.prototype,"visibleArea",null),e([d()],te.prototype,"zoom",null),e([d({readOnly:!0})],te.prototype,"navigating",null),e([d(),u(e=>e instanceof W?e:m(N,e))],te.prototype,"ui",void 0),te=e([c("esri.views.View2D")],te);const ie=te;export{ie as default};
@@ -1,8 +1,13 @@
1
1
  import type Collection from "../../core/Collection.js";
2
+ import type Point from "../../geometry/Point.js";
3
+ import type { ScreenPoint } from "../../core/types.js";
2
4
  import type { Plugin, PluginConfiguration } from "./support/types.js";
3
5
  import type { InteractiveToolBase } from "../interactive/InteractiveToolBase.js";
4
6
  import type { SupportedEditGeometry } from "../interactive/editGeometry/interfaces.js";
5
7
 
8
+ /** @internal */
9
+ export interface DrawToolProperties extends Partial<Pick<DrawTool, "defaultZ" | "hasZ" | "lastScreenPosition">> {}
10
+
6
11
  /**
7
12
  * `DrawTool` implements geometry creation workflows by orchestrating one or more
8
13
  * plugins, which may be built-in or user provided. `DrawTool` provides common
@@ -44,7 +49,25 @@ import type { SupportedEditGeometry } from "../interactive/editGeometry/interfac
44
49
  *
45
50
  * @internal
46
51
  */
47
- export abstract class DrawTool extends InteractiveToolBase {
52
+ export class DrawTool extends InteractiveToolBase {
53
+ /** @internal */
54
+ constructor(properties: DrawToolProperties);
55
+ /** @internal */
56
+ get canRedo(): boolean;
57
+ /** @internal */
58
+ get canUndo(): boolean;
59
+ /**
60
+ * @default 0
61
+ * @internal
62
+ */
63
+ accessor defaultZ: number;
64
+ /**
65
+ * @default false
66
+ * @internal
67
+ */
68
+ accessor hasZ: boolean;
69
+ /** @internal */
70
+ accessor lastScreenPosition: ScreenPoint | null | undefined;
48
71
  /**
49
72
  * The last plugin in the stack, including hidden plugins. This is the one that is
50
73
  * accepting primary input.
@@ -52,9 +75,19 @@ export abstract class DrawTool extends InteractiveToolBase {
52
75
  * @internal
53
76
  */
54
77
  get mostDownstreamPlugin(): Plugin | null | undefined;
78
+ /**
79
+ * The "root" plugin. This plugin is the first in the plugin stack and the one
80
+ * that consumes the result of all downstream plugins and defines the final
81
+ * shape of the geometry.
82
+ *
83
+ * @internal
84
+ */
85
+ get mostUpstreamPlugin(): Plugin | null | undefined;
55
86
  /** @internal */
56
87
  get pluginStack(): Collection<Plugin>;
57
88
  /** @internal */
89
+ get positionOfLastUserInput(): Point | null | undefined;
90
+ /** @internal */
58
91
  get updating(): boolean;
59
92
  /**
60
93
  * Gets the geometry that would be produced if the drawing was
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- class e{constructor(e,t=[]){this.eventType=e,this.keyModifiers=t}matches(e){if(e.type!==this.eventType)return!1;if(0===this.keyModifiers.length)return!0;const t=e.modifiers;for(const i of this.keyModifiers)if(!t.has(i))return!1;return!0}}export{e as EventMatch};
2
+ class e{constructor(e,t=[]){this.eventType=e,this.keyModifiers=t}matches(e){if(e.type!==this.eventType)return!1;if(0===this.keyModifiers.length)return!0;const t=e.modifiers;for(const s of this.keyModifiers)if(!t.has(s)&&!t.has(s.toLowerCase())&&!t.has(s.toUpperCase()))return!1;return!0}}export{e as EventMatch};
@@ -0,0 +1,18 @@
1
+ import type AnnotationLayer from "../../layers/AnnotationLayer.js";
2
+ import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
3
+
4
+ /**
5
+ * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [AnnotationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
6
+ * after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in either a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or
7
+ * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
8
+ *
9
+ * The AnnotationLayerView is responsible for rendering a [AnnotationLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
10
+ * features as [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
11
+ *
12
+ * @since 5.1
13
+ * @see [AnnotationLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationLayer/)
14
+ */
15
+ export default abstract class AnnotationLayerView extends FeatureLikeLayerView {
16
+ /** The layer being viewed. */
17
+ get layer(): AnnotationLayer;
18
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import e from"./FeatureLikeLayerView.js";class r extends e{constructor(){super(...arguments),this.layer=null}}export{r as default};
@@ -0,0 +1,18 @@
1
+ import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
2
+ import type FeatureLikeLayerView from "./FeatureLikeLayerView.js";
3
+
4
+ /**
5
+ * Represents the [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) of a [DimensionFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/)
6
+ * after it has been added to a [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) in either a [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/) or
7
+ * [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
8
+ *
9
+ * The DimensionFeatureLayerView is responsible for rendering a [DimensionFeatureLayer's](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/)
10
+ * features as [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
11
+ *
12
+ * @since 5.1
13
+ * @see [DimensionFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/DimensionFeatureLayer/)
14
+ */
15
+ export default abstract class DimensionFeatureLayerView extends FeatureLikeLayerView {
16
+ /** The layer being viewed. */
17
+ get layer(): DimensionFeatureLayer;
18
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import e from"./FeatureLikeLayerView.js";class r extends e{constructor(){super(...arguments),this.layer=null}}export{r as default};
@@ -1,4 +1,5 @@
1
1
  import type Graphic from "../../Graphic.js";
2
+ import type AnnotationLayer from "../../layers/AnnotationLayer.js";
2
3
  import type CSVLayer from "../../layers/CSVLayer.js";
3
4
  import type DimensionFeatureLayer from "../../layers/DimensionFeatureLayer.js";
4
5
  import type FeatureLayer from "../../layers/FeatureLayer.js";
@@ -43,7 +44,7 @@ import type { FeatureFilterProperties } from "../../layers/support/FeatureFilter
43
44
  * @see [WFSLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/WFSLayerView/)
44
45
  * @see [KnowledgeGraphSublayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/KnowledgeGraphSublayerView/)
45
46
  */
46
- export type FeatureLikeLayerViewLayer = CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
47
+ export type FeatureLikeLayerViewLayer = AnnotationLayer | CatalogFootprintLayer | CSVLayer | FeatureLayer | GeoJSONLayer | OGCFeatureLayer | OrientedImageryLayer | ParquetLayer | StreamLayer | SubtypeGroupLayer | WFSLayer | KnowledgeGraphSublayer | DimensionFeatureLayer;
47
48
 
48
49
  /** @since 5.0 */
49
50
  export default abstract class FeatureLikeLayerView extends LayerView {
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as s,on as l,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as u}from"../../core/sql.js";import{property as d,subclass as p}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as h}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as m}from"../../layers/support/displayFilterUtils.js";import c from"../../layers/support/FeatureEffect.js";import F from"../../layers/support/FeatureFilter.js";import{getSignedInUser as g,layerRequiresGeometryZM as I}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as b,loadFeaturePopupArcadeModules as v}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as x,collectLabelingFields as E,collectElevationFields as R,collectFilterFields as q,collectFeatureReductionFields as _,collectOrderByInfos as j,collectFields as O,collectTrackInfoFields as C,collectDisplayFilterFields as k,collectField as P,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as T}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as L}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as Z}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as M}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as N,getRequiredFields as Q}from"./support/popupUtils.js";import{WhereClauseVisitor as H}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&Z(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),s),l(()=>this.view?.floors,"change",()=>this._handleChange()),l(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),l(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...x(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?m(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?g(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=u(t.where,T(this))),this.displayFilterEnabled&&(t.where=u(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const i=[],r=new Set;for(const l of e){const e=f(l.origin),s=N(e,{...t,checkPopupEnabled:!0});s&&(i.push(l),r.add(s))}if(0===i.length||0===r.size)return[];const s=await this._createPopupQuery(r,t);return await b(this.layer,i,s,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new H(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,a="featureReduction"in i?i.featureReduction:null,n=new Set,o=[s?s.collectRequiredFields(n,r):null,E(n,i),e&&"elevationInfo"in i?R(n,i):null,null!=this.filter?q(n,i,this.filter):null,e||null==this.featureEffect?null:q(n,i,this.featureEffect.filter),!e&&a?_(n,i,a):null,!e&&l?j(n,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?L(n,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&O(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;O(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||O(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&O(n,i.fieldsIndex,[i.timeInfo.endField]),await C(n,i)}if("floorInfo"in i&&i.floorInfo&&O(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&O(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&O(n,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||O(n,i.fieldsIndex,Z(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(k(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),O(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){P(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),E(n,e)]));o.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;O(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&P(n,r,y);const u=await Promise.allSettled(o);if(e)P(n,r,i.objectIdField);else for(const t of h(M(i)))P(n,r,t);e&&"displayField"in i&&i.displayField&&P(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await I(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const a of e){if(!l){const e=await v(a);i(t),l=(e&&e.arcadeUtils.hasGeometryOperations(a))??!1}const e=await Q(this.layer,a);i(t);for(const t of e)s.add(t)}return r.where="1=1",r.returnGeometry=l,r.returnZ=l,r.returnM=l,r.outFields=Array.from(s),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=u(r.where,T(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([d()],B.prototype,"_updatingRequiredPromise",void 0),e([d()],B.prototype,"_defaultReturnZ",void 0),e([d({readOnly:!0})],B.prototype,"availableFields",null),e([d({readOnly:!0})],B.prototype,"hasZ",void 0),e([d({readOnly:!0})],B.prototype,"hasM",void 0),e([d({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([d({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([d({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([d({type:c})],B.prototype,"featureEffect",null),e([d({type:F})],B.prototype,"filter",void 0),e([d()],B.prototype,"layer",void 0),e([d({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],B.prototype,"requiresCurrentUser",void 0),e([d({readOnly:!0})],B.prototype,"requiredFields",void 0),e([d({readOnly:!0})],B.prototype,"signedInUser",null),e([d()],B.prototype,"view",void 0),B=e([p("esri.views.layers.FeatureLikeLayerView")],B);export{B as default};
2
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as a,whenOnce as n}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as U,collectField as P,featureHasFields as T}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as L}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as Z}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as M}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&M(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),a(()=>this.view?.floors,"change",()=>this._handleChange()),a(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),a(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,L(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const n of e){const e=i(l,n.origin,()=>{const e=h(n.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(n),s.add(e))}if(0===r.length||0===s.size)return[];const a=await this._createPopupQuery(s,t);return await v(this.layer,r,a,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([n(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,a="featureReduction"in i?i.featureReduction:null,n=new Set,o=[s?s.collectRequiredFields(n,r):null,R(n,i),e&&"elevationInfo"in i?q(n,i):null,null!=this.filter?_(n,i,this.filter):null,e||null==this.featureEffect?null:_(n,i,this.featureEffect.filter),!e&&a?j(n,i,a):null,!e&&l?O(n,i,l):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?Z(n,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(n,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(n,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(n,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(n,i.fieldsIndex,[i.timeInfo.endField]),await k(n,i)}if("floorInfo"in i&&i.floorInfo&&C(n,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(n,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(n,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(n,i.fieldsIndex,M(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(U(n,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(n,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){P(n,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(n,r),R(n,e)]));o.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;C(n,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&P(n,r,m);const u=await Promise.allSettled(o);if(e)P(n,r,i.objectIdField);else for(const t of y(D(i)))P(n,r,t);e&&"displayField"in i&&i.displayField&&P(n,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(n).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return T(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const a of e){if(!l){const e=await w(a);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(a))??!1}const e=await H(this.layer,a);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,L(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);export{G as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators.js";import o from"../../geometry/Point.js";import{load as i,getSourceScale as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import p from"../../layers/support/FieldsIndex.js";import{rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import m from"../../rest/support/Query.js";import u from"./LayerView.js";import{getFetchPopupTemplate as c}from"./support/popupUtils.js";class y extends u{constructor(...e){super(...e),this.view=null}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,s){const{layer:i}=this;if(!e)throw new t("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:i});const{popupEnabled:a}=i,l=c(i,s);if(!a||null==l)return[];const u=await l.getRequiredFields(null,{index:new p(i.rasterFields),partitions:new Map([["$pixel",i.rasterFields.filter(e=>e.name.startsWith(n)).map(e=>e.name)],["$imageCollectionItem",i.fields.map(e=>e.name)]])});r(s);const y=new m;y.timeExtent=this.timeExtent,y.geometry=e,y.outFields=u,y.outSpatialReference=e.spatialReference;const{resolution:f,spatialReference:d}=this.view,h="2d"===this.view.type?new o(f,f,d):new o(.5*f,.5*f,d),{returnTopmostRaster:w,showNoDataRecords:R}=l.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},x={returnDomainValues:!0,returnTopmostRaster:w,pixelSize:h,showNoDataRecords:R,signal:s?.signal};return i.queryVisibleRasters(y,x)}async getSourceScale(){return await i(),await this.layer.load(),a(this.layer.serviceRasterInfo,this.view.spatialReference)}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}}e([s()],y.prototype,"layer",void 0),e([s()],y.prototype,"suspended",void 0),e([s({readOnly:!0})],y.prototype,"timeExtent",null),e([s()],y.prototype,"view",void 0);export{y as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators.js";import o from"../../geometry/Point.js";import{load as i,getSourceScale as a}from"../../layers/raster/functions/rasterProjectionHelper.js";import p from"../../layers/support/FieldsIndex.js";import{rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import m from"../../rest/support/Query.js";import u from"./LayerView.js";import{getFetchPopupTemplate as c}from"./support/popupUtils.js";class y extends u{constructor(...e){super(...e),this.view=null}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,s,i){const{layer:a}=this;if(!s)throw new t("imagerylayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:a});const{popupEnabled:l}=a,u=c(a,i);if(!l||null==u)return[];const y=await u.getRequiredFields(null,{index:new p(a.rasterFields),partitions:new Map([["$pixel",a.rasterFields.filter(e=>e.name.startsWith(n)).map(e=>e.name)],["$imageCollectionItem",a.fields.map(e=>e.name)]])});r(i);const f=new m;f.timeExtent=this.timeExtent,f.geometry=s,f.outFields=y,f.outSpatialReference=s.spatialReference;const{resolution:d,spatialReference:h}=this.view,w="2d"===this.view.type?new o(d,d,h):new o(.5*d,.5*d,h),{returnTopmostRaster:R,showNoDataRecords:x}=u.layerOptions||{returnTopmostRaster:!0,showNoDataRecords:!1},g={returnDomainValues:!0,returnTopmostRaster:R,pixelSize:w,showNoDataRecords:x,signal:i?.signal};return a.queryVisibleRasters(f,g)}async getSourceScale(){return await i(),await this.layer.load(),a(this.layer.serviceRasterInfo,this.view.spatialReference)}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}}e([s()],y.prototype,"layer",void 0),e([s()],y.prototype,"suspended",void 0),e([s({readOnly:!0})],y.prototype,"timeExtent",null),e([s()],y.prototype,"view",void 0);export{y as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import f from"./LayerView.js";import{getFetchPopupTemplate as y}from"./support/popupUtils.js";class h extends f{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async fetchPopupFeaturesAtTarget(t,i){const{layer:a}=this;if(!t)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:a});const{popupEnabled:n}=a,l=y(a,i);if(!n||null==l)return[];const o=[],{value:m,magdirValue:f,processedValue:h}=await a.identify(t,{timeExtent:this.timeExtent,signal:i?.signal});let d="";if(m?.length){d="imagery-tile"===a.type&&a.hasStandardTime()&&null!=m[0]?m.map(t=>a.getStandardTimeValue(t)).join(", "):m.join(", ");const t={ObjectId:0};t[p.servicePixelValue]="imagery-tile"===a.type&&s(a.raster)?h?.join(", "):d,t[p.rawServicePixelValue]=d;const r=a.raster?.rasterInfo??a.serviceRasterInfo,i=r?.attributeTable;if(null!=i){const{fields:e,features:r}=i,a=e.find(({name:t})=>"value"===t.toLowerCase()),s=t[p.servicePixelValue],n=a?r.find(t=>String(t.attributes[a.name])===s):null;if(n)for(const i in n.attributes)if(n.attributes.hasOwnProperty(i)){t[c+i]=n.attributes[i]}}const n=r?.dataType;"vector-magdir"!==n&&"vector-uv"!==n||(t[p.magnitude]=f?.[0],t[p.direction]=f?.[1]);const{multidimensionalDefinition:l}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});u(a.rasterFields,t,l);const{graphicOrigin:y}=a,g=new e({geometry:this.fullExtent?.clone(),attributes:t,layer:a,origin:y,sourceLayer:a});o.push(g)}return o}highlight(t,e){return i()}async getSourceScale(){return await this.layer.load(),o(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return l(this.layer.serviceRasterInfo,this.view.spatialReference)}}t([a()],h.prototype,"fullExtent",null),t([a()],h.prototype,"layer",void 0),t([a({readOnly:!0})],h.prototype,"timeExtent",null),t([a()],h.prototype,"tileInfo",void 0),t([a({readOnly:!0})],h.prototype,"hasTilingEffects",null),t([a()],h.prototype,"datumTransformation",null);export{h as default};
2
+ import{__decorate as t}from"tslib";import e from"../../Graphic.js";import r from"../../core/Error.js";import{makeHandle as i}from"../../core/handleUtils.js";import{property as a}from"../../core/accessorSupport/decorators.js";import{isFunctionRaster as s}from"../../layers/raster/datasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as n,projectDatasetExtent as l,getSourceScale as o}from"../../layers/raster/functions/rasterProjectionHelper.js";import{addMultidimensionalFieldValues as u,commonRasterFieldNames as p,rasterFieldPrefix as c}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as m}from"../../layers/support/timeSupport.js";import y from"./LayerView.js";import{getFetchPopupTemplate as f}from"./support/popupUtils.js";class h extends y{constructor(...t){super(...t),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return m(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){const{renderer:t}=this.layer;return!!("raster-stretch"===t?.type&&t.dynamicRangeAdjustment&&!("min-max"===t.stretchType||"standard-deviation"===t.stretchType))}get datumTransformation(){try{return this.layer.loaded?n(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(t){try{return!this.layer.loaded||!!l(this.layer.serviceRasterInfo,t)}catch{return!1}}async fetchPopupFeaturesAtTarget(t,i,a){const{layer:n}=this;if(!i)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:n});const{popupEnabled:l}=n,o=f(n,a);if(!l||null==o)return[];"polygon"===i.type&&(i=i.extent?.center);const m=[],{value:y,magdirValue:h,processedValue:d}=await n.identify(i,{timeExtent:this.timeExtent,signal:a?.signal});let g="";if(y?.length){g="imagery-tile"===n.type&&n.hasStandardTime()&&null!=y[0]?y.map(t=>n.getStandardTimeValue(t)).join(", "):y.join(", ");const t={ObjectId:0};t[p.servicePixelValue]="imagery-tile"===n.type&&s(n.raster)?d?.join(", "):g,t[p.rawServicePixelValue]=g;const r=n.raster?.rasterInfo??n.serviceRasterInfo,i=r?.attributeTable;if(null!=i){const{fields:e,features:r}=i,a=e.find(({name:t})=>"value"===t.toLowerCase()),s=t[p.servicePixelValue],n=a?r.find(t=>String(t.attributes[a.name])===s):null;if(n)for(const i in n.attributes)if(n.attributes.hasOwnProperty(i)){t[c+i]=n.attributes[i]}}const a=r?.dataType;"vector-magdir"!==a&&"vector-uv"!==a||(t[p.magnitude]=h?.[0],t[p.direction]=h?.[1]);const{multidimensionalDefinition:l}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});u(n.rasterFields,t,l);const{graphicOrigin:o}=n,f=new e({geometry:this.fullExtent?.clone(),attributes:t,layer:n,origin:o,sourceLayer:n});m.push(f)}return m}highlight(t,e){return i()}async getSourceScale(){return await this.layer.load(),o(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return l(this.layer.serviceRasterInfo,this.view.spatialReference)}}t([a()],h.prototype,"fullExtent",null),t([a()],h.prototype,"layer",void 0),t([a({readOnly:!0})],h.prototype,"timeExtent",null),t([a()],h.prototype,"tileInfo",void 0),t([a({readOnly:!0})],h.prototype,"hasTilingEffects",null),t([a()],h.prototype,"datumTransformation",null);export{h as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{ExportWMSImageParameters as a}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as p}from"../../layers/support/timeSupport.js";const m=m=>{const n=m;let h=class extends n{initialize(){this.exportImageParameters=new a({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return p(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,r){const{layer:s}=this;if(!e)throw new t("wmslayerview:fetchPopupFeatures","Nothing to fetch without geometry",{layer:s});const{popupEnabled:i}=s;if(!i)throw new t("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:i});const a=this.createFetchPopupFeaturesQuery(e);if(!a)return[];const{extent:p,width:m,height:n,x:h,y:u}=a;if(!(p&&m&&n))throw new t("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:p,width:m,height:n});const y=await s.fetchFeatureInfo(p,m,n,h,u);return o(r),y}};return e([s()],h.prototype,"exportImageParameters",void 0),e([s({readOnly:!0})],h.prototype,"exportImageVersion",null),e([s()],h.prototype,"layer",void 0),e([s({readOnly:!0})],h.prototype,"timeExtent",null),h=e([i("esri.views.layers.WMSLayerView")],h),h};export{m as WMSLayerView};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import{ExportWMSImageParameters as p}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as a}from"../../layers/support/timeSupport.js";const m=m=>{const n=m;let h=class extends n{initialize(){this.exportImageParameters=new p({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return a(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtTarget(e,r,s){const{layer:i}=this;if(!r)throw new t("wmslayerview:fetchPopupFeatures","Nothing to fetch without geometry",{layer:i});const{popupEnabled:p}=i;if(!p)throw new t("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:p});const a=this.createFetchPopupFeaturesQuery("point"===r.type?r:r.extent?.center);if(!a)return[];const{extent:m,width:n,height:h,x:u,y}=a;if(!(m&&n&&h))throw new t("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:m,width:n,height:h});const c=await i.fetchFeatureInfo(m,n,h,u,y);return o(s),c}};return e([s()],h.prototype,"exportImageParameters",void 0),e([s({readOnly:!0})],h.prototype,"exportImageVersion",null),e([s()],h.prototype,"layer",void 0),e([s({readOnly:!0})],h.prototype,"timeExtent",null),h=e([i("esri.views.layers.WMSLayerView")],h),h};export{m as WMSLayerView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{debounce as a,throwIfAborted as l,ignoreAbortErrors as n}from"../../../core/promiseUtils.js";import{on as p}from"../../../core/reactiveUtils.js";import{sqlAnd as u}from"../../../core/sql.js";import{getMetersPerUnitForSR as c}from"../../../core/units.js";import{property as h,subclass as y}from"../../../core/accessorSupport/decorators.js";import d from"../../../geometry/Extent.js";import{getResolutionForScale as m}from"../../../geometry/support/scaleUtils.js";import{collectFields as f}from"../../../layers/support/fieldUtils.js";import{getLayerFloorFilterClause as g}from"../../../layers/support/floorFilterUtils.js";import{calculateTolerance as b}from"../../../renderers/support/clickToleranceUtils.js";import{identify as w}from"../../../rest/identify.js";import v from"../../../rest/support/IdentifyParameters.js";import{loadArcade as x}from"../../../support/loadArcade.js";import _ from"../../../symbols/SimpleMarkerSymbol.js";import{getRequiredFields as F,getFetchPopupTemplate as G}from"./popupUtils.js";let S=null;function j(e,t){return"tile"===t.type||"map-image"===t.type}let P=class extends r{constructor(e){super(e),this._featuresResolutions=new WeakMap,this.highlightGraphics=null,this.highlightGraphicUpdated=null,this.updateHighlightedFeatures=a(async e=>{this.destroyed||await this.updatingHandles.consumePromise(this._updateHighlightedFeaturesGeometries(e))})}initialize(){const e=e=>{for(const t of e){const{sourceLayer:e}=t;null!=e&&"geometryType"in e&&"point"===e.geometryType&&t.visible&&(t.visible=!1,this.highlightGraphicUpdated?.({graphic:t,property:"visible",oldValue:!0,newValue:!1}))}this.updatingHandles.consumePromise(this._updateHighlightedFeaturesSymbols(e)),n(this.updateHighlightedFeatures(this._highlightGeometriesResolution))};this.addHandles([p(()=>this.highlightGraphics,"change",t=>e(t.added),{onListenerAdd:t=>e(t)})])}async fetchPopupFeaturesAtTarget(e,t){const{layerView:{layer:r,view:{scale:i}}}=this;if(!e)throw new s("fetchPopupFeatures:invalid-geometry","Nothing to fetch without geometry",{layer:r});const o=V(r.sublayers,i,t);if(!o.length)return[];const a=await R(r,o);if(!((r.capabilities?.operations?.supportsIdentify??!0)&&r.version>=10.5)&&!a)throw new s("fetchPopupFeatures:not-supported","query operation is disabled for this service",{layer:r});return a?this._fetchPopupFeaturesUsingQueries(e,o,t):this._fetchPopupFeaturesUsingIdentify(e,o,t)}clearHighlights(){this.highlightGraphics?.removeAll()}async _updateHighlightedFeaturesSymbols(e){for(const t of e)this._updateSymbology(t)}_updateSymbology(e){if("point"===e.geometry?.type)return this._updatePointSymbology(e)}_setGraphicSymbol(e,t){if(!t)return;const r=e.symbol;e.symbol=t,this.highlightGraphicUpdated?.({graphic:e,property:"symbol",oldValue:r,newValue:t})}_updatePointSymbology(e){const r=e.sourceLayer&&"renderer"in e.sourceLayer&&e.sourceLayer.renderer,{highlightGraphicUpdated:i,highlightGraphics:s,layerView:{view:o}}=this,a=e=>{e.visible||(e.visible=!0,i?.({graphic:e,property:"visible",oldValue:!1,newValue:!0}))};r&&"getSymbolAsync"in r?r.getSymbolAsync(e).then(async i=>{i||=new _;let l=null;const n="visualVariables"in r?r.visualVariables?.find(e=>"size"===e.type):void 0;n&&(S||(S=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSize),l=S(n,e,{view:o.type,scale:o.scale,shape:"simple-marker"===i.type?i.style:null})),l||="width"in i&&"height"in i&&null!=i.width&&null!=i.height?Math.max(i.width,i.height):"size"in i?i.size:16,s?.includes(e)&&(this._setGraphicSymbol(e,new _({style:"square",size:l,color:new t([255,255,255,1/255]),xoffset:"xoffset"in i?i.xoffset:0,yoffset:"yoffset"in i?i.yoffset:0})),a(e))}):a(e)}get _updateContext(){const{layerView:{layer:e},highlightGraphics:t,highlightGraphicUpdated:r}=this;return r&&t?.length&&e.capabilities.operations.supportsQuery?{highlightGraphicUpdated:r,highlightGraphics:t}:null}get highlightFeaturesActive(){return!!this._updateContext}async _updateHighlightedFeaturesGeometries(e){this._highlightGeometriesResolution=e;const t=this._updateContext;if(!t)return;const r=this._getTargetResolution(e),i=new Map,{highlightGraphics:s,highlightGraphicUpdated:a}=t;for(const u of s)if(!this._featuresResolutions.has(u)||this._featuresResolutions.get(u)>r){const e=u.sourceLayer;o(i,e,()=>new Map).set(u.getObjectId(),u)}const{layerView:{view:l}}=this,n=Array.from(i,([e,t])=>{const i=e.createQuery();return i.objectIds=[...t.keys()],i.outFields=[e.objectIdField],i.returnGeometry=!0,i.maxAllowableOffset=r,i.outSpatialReference=l.spatialReference,e.queryFeatures(i)}),p=await Promise.all(n);if(!this.destroyed)for(const{features:o}of p)for(const e of o){const t=e.sourceLayer,o=i.get(t).get(e.getObjectId());if(o&&s.includes(o)){const t=o.geometry;o.geometry=e.geometry,a({graphic:o,property:"geometry",oldValue:t,newValue:o.geometry}),this._featuresResolutions.set(o,r)}}}_getTargetResolution(e){const t=e*c(this.layerView.view.spatialReference),r=t/16;return r<=10?0:e/t*r}async _fetchPopupFeaturesUsingIdentify(e,t,r){const i=await this._createIdentifyParameters(e,t,r);if(null==i)return[];const{results:s}=await w(this.layerView.layer.parsedUrl,i,r);return s.map(e=>e.feature)}async _createIdentifyParameters(e,t,r){const{floors:i,layer:s,timeExtent:o,view:{spatialReference:a,scale:l}}=this.layerView;if(!t.length)return null;await Promise.all(t.map(({sublayer:e})=>e.load(r).catch(()=>{})));const n=Math.min(has("mapservice-popup-identify-max-tolerance"),s.allSublayers.reduce((e,t)=>t.renderer?b({renderer:t.renderer,pointerType:r?.pointerType}):e,2)),p=this.createFetchPopupFeaturesQueryGeometry(e,n),u=m(l,a),c=Math.round(p.width/u),h=new d({xmin:p.center.x-u*c,ymin:p.center.y-u*c,xmax:p.center.x+u*c,ymax:p.center.y+u*c,spatialReference:p.spatialReference});return new v({floors:i,gdbVersion:"gdbVersion"in s?s.gdbVersion:void 0,geometry:e,height:c,layerOption:"popup",mapExtent:h,returnGeometry:!0,spatialReference:a,sublayers:s.sublayers,timeExtent:o,tolerance:n,width:c})}async _fetchPopupFeaturesUsingQueries(e,t,r){const{layerView:{floors:s,timeExtent:o}}=this,a=t.map(async({sublayer:t,popupTemplate:i})=>{if(await t.load(r).catch(()=>{}),t.capabilities&&!t.capabilities.operations.supportsQuery)return[];const a=t.createQuery(),n=b({renderer:t.renderer,pointerType:r?.pointerType}),p=this.createFetchPopupFeaturesQueryGeometry(e,n),c=new Set,[h]=await Promise.all([F(t,i),t.renderer?.collectRequiredFields(c,t.fieldsIndex)]);l(r),f(c,t.fieldsIndex,h);const y=Array.from(c).sort();a.geometry=p,a.outFields=y,a.timeExtent=o;const d=g(s,t);if(a.where=u(a.where,d),t.capabilities?.query.supportsOrderBy&&t.orderBy?.[0]){const e=t.orderBy[0],r=!e.valueExpression&&e.field,i="ascending"===e.order?"asc":"desc";r&&(a.orderByFields=[`${r} ${i}`])}const m=this._getTargetResolution(p.width/n),w=await U(i);l(r);const v="point"===t.geometryType||w&&w.arcadeUtils.hasGeometryOperations(i);v||(a.maxAllowableOffset=m);let{features:x}=await t.queryFeatures(a,r);const _=v?0:m;x=await A(t,x,r);for(const e of x)this._featuresResolutions.set(e,_);return x});return(await Promise.allSettled(a)).reduce((e,t)=>"fulfilled"===t.status?[...e,...t.value]:e,[]).filter(i)}};function V(e,t,r){const i=[];if(!e)return i;const s=e=>{const o=0===e.minScale||t<=e.minScale,a=0===e.maxScale||t>=e.maxScale;if(e.visible&&o&&a)if(e.sublayers)e.sublayers.forEach(s);else if(e.popupEnabled){const t=G(e,{...r,defaultPopupTemplateEnabled:!1});null!=t&&i.unshift({sublayer:e,popupTemplate:t})}};return e.map(s),i}function U(e){return e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type)?x():Promise.resolve()}async function R(e,t){if(e.capabilities?.operations?.supportsQuery)return!0;try{return await Promise.any(t.map(({sublayer:e})=>e.load().then(()=>e.capabilities.operations.supportsQuery)))}catch{return!1}}async function A(e,t,r){const i=e.renderer;return i&&"defaultSymbol"in i&&!i.defaultSymbol&&(t=i.valueExpression?await Promise.all(t.map(e=>i.getSymbolAsync(e,r).then(t=>t?e:null))).then(e=>e.filter(e=>null!=e)):t.filter(e=>null!=i.getSymbol(e))),t}e([h({constructOnly:!0})],P.prototype,"createFetchPopupFeaturesQueryGeometry",void 0),e([h({constructOnly:!0})],P.prototype,"layerView",void 0),e([h({constructOnly:!0})],P.prototype,"highlightGraphics",void 0),e([h({constructOnly:!0})],P.prototype,"highlightGraphicUpdated",void 0),e([h({constructOnly:!0})],P.prototype,"updatingHandles",void 0),e([h()],P.prototype,"_updateContext",null),P=e([y("esri.views.layers.support.MapServiceLayerViewHelper")],P);export{P as MapServiceLayerViewHelper,V as collectPopupProviders,j as isMapServiceLayerView};
2
+ import{__decorate as e}from"tslib";import t from"../../../Color.js";import r from"../../../core/Accessor.js";import{isSome as i}from"../../../core/arrayUtils.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{debounce as a,throwIfAborted as l,ignoreAbortErrors as n}from"../../../core/promiseUtils.js";import{on as p}from"../../../core/reactiveUtils.js";import{sqlAnd as u}from"../../../core/sql.js";import{getMetersPerUnitForSR as c}from"../../../core/units.js";import{property as h,subclass as y}from"../../../core/accessorSupport/decorators.js";import d from"../../../geometry/Extent.js";import{getResolutionForScale as m}from"../../../geometry/support/scaleUtils.js";import{collectFields as f}from"../../../layers/support/fieldUtils.js";import{getLayerFloorFilterClause as g}from"../../../layers/support/floorFilterUtils.js";import{calculateTolerance as b}from"../../../renderers/support/clickToleranceUtils.js";import{identify as w}from"../../../rest/identify.js";import v from"../../../rest/support/IdentifyParameters.js";import{loadArcade as x}from"../../../support/loadArcade.js";import _ from"../../../symbols/SimpleMarkerSymbol.js";import{getRequiredFields as G,getFetchPopupTemplate as S}from"./popupUtils.js";let F=null;function j(e,t){return"tile"===t.type||"map-image"===t.type}let V=class extends r{constructor(e){super(e),this._featuresResolutions=new WeakMap,this.highlightGraphics=null,this.highlightGraphicUpdated=null,this.updateHighlightedFeatures=a(async e=>{this.destroyed||await this.updatingHandles.consumePromise(this._updateHighlightedFeaturesGeometries(e))})}initialize(){const e=e=>{for(const t of e){const{sourceLayer:e}=t;null!=e&&"geometryType"in e&&"point"===e.geometryType&&t.visible&&(t.visible=!1,this.highlightGraphicUpdated?.({graphic:t,property:"visible",oldValue:!0,newValue:!1}))}this.updatingHandles.consumePromise(this._updateHighlightedFeaturesSymbols(e)),n(this.updateHighlightedFeatures(this._highlightGeometriesResolution))};this.addHandles([p(()=>this.highlightGraphics,"change",t=>e(t.added),{onListenerAdd:t=>e(t)})])}async fetchPopupFeaturesAtTarget(e,t){const{layerView:{layer:r,view:{scale:i}}}=this,o=P(r.sublayers,i,t);if(!o.length)return[];if(await R(o))return this._fetchPopupFeaturesUsingQueries(e,o,t);if((r.capabilities?.operations?.supportsIdentify&&r.version>=10.5)??!0)return this._fetchPopupFeaturesUsingIdentify(e,o,t);throw new s("fetchPopupFeatures:not-supported","query operation is disabled for this service",{layer:r})}clearHighlights(){this.highlightGraphics?.removeAll()}async _updateHighlightedFeaturesSymbols(e){for(const t of e)this._updateSymbology(t)}_updateSymbology(e){if("point"===e.geometry?.type)return this._updatePointSymbology(e)}_setGraphicSymbol(e,t){if(!t)return;const r=e.symbol;e.symbol=t,this.highlightGraphicUpdated?.({graphic:e,property:"symbol",oldValue:r,newValue:t})}_updatePointSymbology(e){const r=e.sourceLayer&&"renderer"in e.sourceLayer&&e.sourceLayer.renderer,{highlightGraphicUpdated:i,highlightGraphics:s,layerView:{view:o}}=this,a=e=>{e.visible||(e.visible=!0,i?.({graphic:e,property:"visible",oldValue:!1,newValue:!0}))};r&&"getSymbolAsync"in r?r.getSymbolAsync(e).then(async i=>{i||=new _;let l=null;const n="visualVariables"in r?r.visualVariables?.find(e=>"size"===e.type):void 0;n&&(F||(F=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSize),l=F(n,e,{view:o.type,scale:o.scale,shape:"simple-marker"===i.type?i.style:null})),l||="width"in i&&"height"in i&&null!=i.width&&null!=i.height?Math.max(i.width,i.height):"size"in i?i.size:16,s?.includes(e)&&(this._setGraphicSymbol(e,new _({style:"square",size:l,color:new t([255,255,255,1/255]),xoffset:"xoffset"in i?i.xoffset:0,yoffset:"yoffset"in i?i.yoffset:0})),a(e))}):a(e)}get _updateContext(){const{layerView:{layer:e},highlightGraphics:t,highlightGraphicUpdated:r}=this;return r&&t?.length&&e.capabilities.operations.supportsQuery?{highlightGraphicUpdated:r,highlightGraphics:t}:null}get highlightFeaturesActive(){return!!this._updateContext}async _updateHighlightedFeaturesGeometries(e){this._highlightGeometriesResolution=e;const t=this._updateContext;if(!t)return;const r=this._getTargetResolution(e),i=new Map,{highlightGraphics:s,highlightGraphicUpdated:a}=t;for(const u of s)if(!this._featuresResolutions.has(u)||this._featuresResolutions.get(u)>r){const e=u.sourceLayer;o(i,e,()=>new Map).set(u.getObjectId(),u)}const{layerView:{view:l}}=this,n=Array.from(i,([e,t])=>{const i=e.createQuery();return i.objectIds=[...t.keys()],i.outFields=[e.objectIdField],i.returnGeometry=!0,i.maxAllowableOffset=r,i.outSpatialReference=l.spatialReference,e.queryFeatures(i)}),p=await Promise.all(n);if(!this.destroyed)for(const{features:o}of p)for(const e of o){const t=e.sourceLayer,o=i.get(t).get(e.getObjectId());if(o&&s.includes(o)){const t=o.geometry;o.geometry=e.geometry,a({graphic:o,property:"geometry",oldValue:t,newValue:o.geometry}),this._featuresResolutions.set(o,r)}}}_getTargetResolution(e){const t=e*c(this.layerView.view.spatialReference),r=t/16;return r<=10?0:e/t*r}async _fetchPopupFeaturesUsingIdentify(e,t,r){const i=await this._createIdentifyParameters(e,t,r);if(null==i)return[];const{results:s}=await w(this.layerView.layer.parsedUrl,i,r);return s.map(e=>e.feature)}async _createIdentifyParameters(e,t,r){const{floors:i,layer:s,timeExtent:o,view:{spatialReference:a,scale:l}}=this.layerView;if(!t.length)return null;let n,p;await Promise.all(t.map(({sublayer:e})=>e.load(r).catch(()=>{}))),"point"===e.type?(n=Math.min(has("mapservice-popup-identify-max-tolerance"),s.allSublayers.reduce((e,t)=>t.renderer?b({renderer:t.renderer,pointerType:r?.pointerType}):e,2)),p=this.createFetchPopupFeaturesQueryGeometry(e,n)):(n=2,p=e.extent);const u=m(l,a),c=Math.ceil(p.width/u),h=new d({xmin:p.center.x-u*c,ymin:p.center.y-u*c,xmax:p.center.x+u*c,ymax:p.center.y+u*c,spatialReference:p.spatialReference});return new v({floors:i,gdbVersion:"gdbVersion"in s?s.gdbVersion:void 0,geometry:e,height:c,layerOption:"popup",mapExtent:h,returnGeometry:!0,spatialReference:a,sublayers:s.sublayers,timeExtent:o,tolerance:n,width:c})}async _fetchPopupFeaturesUsingQueries(e,t,r){const{layerView:{floors:s,timeExtent:o,view:{scale:a,spatialReference:n}}}=this,p=t.map(async({sublayer:t,popupTemplate:i})=>{if(await t.load(r).catch(()=>{}),t.capabilities&&!t.capabilities.operations.supportsQuery)return[];const p=t.createQuery();let c;if("point"===e.type){const i=b({renderer:t.renderer,pointerType:r?.pointerType});c=this.createFetchPopupFeaturesQueryGeometry(e,i)}else c=e;const h=new Set,[y]=await Promise.all([G(t,i),t.renderer?.collectRequiredFields(h,t.fieldsIndex)]);l(r),f(h,t.fieldsIndex,y);const d=Array.from(h).sort();p.geometry=c,p.outFields=d,p.timeExtent=o;const w=g(s,t);if(p.where=u(p.where,w),t.capabilities?.query.supportsOrderBy&&t.orderBy?.[0]){const e=t.orderBy[0],r=!e.valueExpression&&e.field,i="ascending"===e.order?"asc":"desc";r&&(p.orderByFields=[`${r} ${i}`])}const v=await U(i);l(r);const x="point"===t.geometryType||v?.arcadeUtils.hasGeometryOperations(i)?0:this._getTargetResolution(m(a,n));x&&(p.maxAllowableOffset=x);let{features:_}=await t.queryFeatures(p,r);_=await A(t,_,r);for(const e of _)this._featuresResolutions.set(e,x);return _});return(await Promise.allSettled(p)).reduce((e,t)=>"fulfilled"===t.status?[...e,...t.value]:e,[]).filter(i)}};function P(e,t,r){const i=[];if(!e)return i;const s=e=>{const o=0===e.minScale||t<=e.minScale,a=0===e.maxScale||t>=e.maxScale;if(e.visible&&o&&a)if(e.sublayers)e.sublayers.forEach(s);else if(e.popupEnabled){const t=S(e,{...r,defaultPopupTemplateEnabled:!1});null!=t&&i.unshift({sublayer:e,popupTemplate:t})}};return e.map(s),i}function U(e){return e.expressionInfos?.length||Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type)?x():Promise.resolve()}async function R(e){return(await Promise.allSettled(e.map(({sublayer:e})=>e.load().catch(()=>{}).then(()=>e.capabilities?.operations?.supportsQuery??!1)))).every(e=>"fulfilled"===e.status&&e.value)}async function A(e,t,r){const i=e.renderer;return i&&"defaultSymbol"in i&&!i.defaultSymbol&&(t=i.valueExpression?await Promise.all(t.map(e=>i.getSymbolAsync(e,r).then(t=>t?e:null))).then(e=>e.filter(e=>null!=e)):t.filter(e=>null!=i.getSymbol(e))),t}e([h({constructOnly:!0})],V.prototype,"createFetchPopupFeaturesQueryGeometry",void 0),e([h({constructOnly:!0})],V.prototype,"layerView",void 0),e([h({constructOnly:!0})],V.prototype,"highlightGraphics",void 0),e([h({constructOnly:!0})],V.prototype,"highlightGraphicUpdated",void 0),e([h({constructOnly:!0})],V.prototype,"updatingHandles",void 0),e([h()],V.prototype,"_updateContext",null),V=e([y("esri.views.layers.support.MapServiceLayerViewHelper")],V);export{V as MapServiceLayerViewHelper,P as collectPopupProviders,j as isMapServiceLayerView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import a from"../../core/Accessor.js";import{watch as t,initial as s,whenOnce as i}from"../../core/reactiveUtils.js";import{property as n,subclass as p}from"../../core/accessorSupport/decorators.js";import{isLoaded as r,canProjectWithoutEngine as o,load as l}from"../../geometry/projectionUtils.js";import{equals as c}from"../../geometry/support/spatialReferenceUtils.js";import{basemapEnsureType as m,destroyCache as h}from"../../support/basemapEnsureType.js";import{findSpatialReference as f,getBasemapThumbnailUrl as d}from"../../support/basemapUtils.js";let u=class extends a{constructor(e){super(e),this._basemapCache={},this._loadingProjectionEngine=!1,this.view=null,this.nextBasemap=m("hybrid",this._basemapCache)}initialize(){t(()=>this.nextBasemap,e=>{e&&!e.loaded&&e.load().catch(()=>{})},s)}destroy(){this.view=null,h(this._basemapCache),this._basemapCache=null}get _nextBasemapSpatialReferenceTask(){return f(this.view,this.nextBasemap)}get _viewSpatialReferenceLocked(){const{view:e}=this;return!e||!("spatialReferenceLocked"in e)||e.spatialReferenceLocked}get activeBasemap(){return m(this.view?.map?.basemap??"topo-vector",this._basemapCache)}get nextBasemap(){return this._get("nextBasemap")}set nextBasemap(e){this._set("nextBasemap",m(e,this._basemapCache))}get state(){const{view:e}=this;if(!e?.ready)return"disabled";if(this._nextBasemapSpatialReferenceTask.updating)return"disabled";const{spatialReference:a}=this._nextBasemapSpatialReferenceTask;return this._viewSpatialReferenceLocked&&null!=a&&!e.spatialReference.equals(a)?"incompatible-next-basemap":this._loadingProjectionEngine?"loading":"ready"}async toggle(){const{activeBasemap:e,nextBasemap:a,state:t,view:s}=this;if(!s||"disabled"===t||"incompatible-next-basemap"===t)return;const n=this._viewSpatialReferenceLocked;if(!n){if(await i(()=>!this._nextBasemapSpatialReferenceTask.updating),a!==this.nextBasemap||e!==this.activeBasemap)return;const{spatialReference:t}=this._nextBasemapSpatialReferenceTask;if(null==t||c(s.spatialReference,t)||r()||o(s.spatialReference,t)||(this._loadingProjectionEngine=!0,await l(),this._loadingProjectionEngine=!1),a!==this.nextBasemap||e!==this.activeBasemap)return}s.map.basemap=a,n||null==this._nextBasemapSpatialReferenceTask.spatialReference||c(s.spatialReference,this._nextBasemapSpatialReferenceTask.spatialReference)||(s.spatialReference=this._nextBasemapSpatialReferenceTask.spatialReference),this.nextBasemap=e}static getThumbnailUrl(e){return d(e)}};e([n()],u.prototype,"_loadingProjectionEngine",void 0),e([n({readOnly:!0})],u.prototype,"_nextBasemapSpatialReferenceTask",null),e([n({readOnly:!0})],u.prototype,"_viewSpatialReferenceLocked",null),e([n({readOnly:!0})],u.prototype,"activeBasemap",null),e([n()],u.prototype,"nextBasemap",null),e([n({readOnly:!0})],u.prototype,"state",null),e([n()],u.prototype,"view",void 0),e([n()],u.prototype,"toggle",null),u=e([p("esri.widgets.BasemapToggle.BasemapToggleViewModel")],u);const g=u;export{g as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{watch as a,initial as i,whenOnce as s}from"../../core/reactiveUtils.js";import{property as n,subclass as r}from"../../core/accessorSupport/decorators.js";import{isLoaded as p,canProjectWithoutEngine as o,load as l}from"../../geometry/projectionUtils.js";import{equals as c}from"../../geometry/support/spatialReferenceUtils.js";import{basemapEnsureType as m}from"../../support/basemapEnsureType.js";import{findSpatialReference as f,getBasemapThumbnailUrl as d}from"../../support/basemapUtils.js";let u=class extends t{constructor(e){super(e),this._loadingProjectionEngine=!1,this.view=null,this.nextBasemap=m("hybrid")}initialize(){a(()=>this.nextBasemap,e=>{e&&!e.loaded&&e.load().catch(()=>{})},i)}destroy(){this.view=null}get _nextBasemapSpatialReferenceTask(){return f(this.view,this.nextBasemap)}get _viewSpatialReferenceLocked(){const{view:e}=this;return!e||!("spatialReferenceLocked"in e)||e.spatialReferenceLocked}get activeBasemap(){return m(this.view?.map?.basemap??"topo-vector")}get nextBasemap(){return this._get("nextBasemap")}set nextBasemap(e){this._set("nextBasemap",m(e))}get state(){const{view:e}=this;if(!e?.ready)return"disabled";if(this._nextBasemapSpatialReferenceTask.updating)return"disabled";const{spatialReference:t}=this._nextBasemapSpatialReferenceTask;return this._viewSpatialReferenceLocked&&null!=t&&!e.spatialReference.equals(t)?"incompatible-next-basemap":this._loadingProjectionEngine?"loading":"ready"}async toggle(){const{activeBasemap:e,nextBasemap:t,state:a,view:i}=this;if(!i||"disabled"===a||"incompatible-next-basemap"===a)return;const n=this._viewSpatialReferenceLocked;if(!n){if(await s(()=>!this._nextBasemapSpatialReferenceTask.updating),t!==this.nextBasemap||e!==this.activeBasemap)return;const{spatialReference:a}=this._nextBasemapSpatialReferenceTask;if(null==a||c(i.spatialReference,a)||p()||o(i.spatialReference,a)||(this._loadingProjectionEngine=!0,await l(),this._loadingProjectionEngine=!1),t!==this.nextBasemap||e!==this.activeBasemap)return}i.map.basemap=t,n||null==this._nextBasemapSpatialReferenceTask.spatialReference||c(i.spatialReference,this._nextBasemapSpatialReferenceTask.spatialReference)||(i.spatialReference=this._nextBasemapSpatialReferenceTask.spatialReference),this.nextBasemap=e}static getThumbnailUrl(e){return d(e)}};e([n()],u.prototype,"_loadingProjectionEngine",void 0),e([n({readOnly:!0})],u.prototype,"_nextBasemapSpatialReferenceTask",null),e([n({readOnly:!0})],u.prototype,"_viewSpatialReferenceLocked",null),e([n({readOnly:!0})],u.prototype,"activeBasemap",null),e([n()],u.prototype,"nextBasemap",null),e([n({readOnly:!0})],u.prototype,"state",null),e([n()],u.prototype,"view",void 0),e([n()],u.prototype,"toggle",null),u=e([r("esri.widgets.BasemapToggle.BasemapToggleViewModel")],u);const h=u;export{h as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,n=`${t}__attachment-element`,i=`${t}__multiple-choice-input`,l={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${n}-input`,attachmentElementLabel:`${n}-label`,attachmentElementList:`${n}-list`,attachmentElementListItem:`${n}-list-item`,attachmentElementListItemStart:`${n}-list-item-start`,attachmentElementListItemStagedIndicator:`${n}-list-item-staged-indicator`,attachmentElementListItemThumb:`${n}-list-item-thumb`,attachmentElementListItemIcon:`${n}-list-item-icon`,attachmentElementEmptyState:`${n}-empty-state`,attachmentElementEmptyAction:`${n}-empty-action`,attachmentElementAllPanel:`${n}-all-panel`,attachmentElementAddPanel:`${n}-add-panel`,attachmentElementFileInput:`${n}-file-input`,attachmentElementAddDropzone:`${n}-add-dropzone`,attachmentElementAddDropzoneIcon:`${n}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${n}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${n}-add-dropzone-detail`,attachmentElementDetail:`${n}-detail`,attachmentElementDetailPreview:`${n}-detail-preview`,attachmentElementDetailPreviewImage:`${n}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${n}-detail-preview-icon`,attachmentElementDetailActions:`${n}-detail-actions`,attachmentElementDetailMetadata:`${n}-detail-metadata`,attachmentElementDetailMetadataGroup:`${n}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${n}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${n}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${n}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${n}-detail-metadata-value`,relationshipElementInput:`${t}__relationship-element-input`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,block:`${t}__block`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${i}`,multipleChoiceSelectAll:`${i}__select-all`,multipleChoiceOtherChoice:`${i}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${i}__other-choice--with-select-all`};export{l as css};
2
+ const t="esri-batch-attribute-form",e=`${t}__group`,a=`${t}__input`,l=`${t}__attachment-element`,i=`${t}__relationship-element-input`,n=`${t}__multiple-choice-input`,m={base:t,form:`${t}__form`,formHeader:`${t}__form-header`,noticeError:`${t}__notice-error`,label:`${t}__label`,labelTextContent:`${t}__label-text-content`,fieldInput:`${a}`,inputRadio:`${a}--radio`,placeholderRadio:`${a}--radio-placeholder`,inputRadioGroup:`${a}--radio-group`,inputRadioLabel:`${a}--radio-label`,inputDisabled:`${a}--disabled`,inputSwitch:`${a}--switch`,dateInputContainer:`${`${t}__date`}-input-container`,textElementInput:`${t}__text-element-input`,attachmentElementInput:`${l}-input`,attachmentElementLabel:`${l}-label`,attachmentElementList:`${l}-list`,attachmentElementListItem:`${l}-list-item`,attachmentElementListItemStart:`${l}-list-item-start`,attachmentElementListItemStagedIndicator:`${l}-list-item-staged-indicator`,attachmentElementListItemThumb:`${l}-list-item-thumb`,attachmentElementListItemIcon:`${l}-list-item-icon`,attachmentElementEmptyState:`${l}-empty-state`,attachmentElementEmptyAction:`${l}-empty-action`,attachmentElementAllPanel:`${l}-all-panel`,attachmentElementAddPanel:`${l}-add-panel`,attachmentElementFileInput:`${l}-file-input`,attachmentElementAddDropzone:`${l}-add-dropzone`,attachmentElementAddDropzoneIcon:`${l}-add-dropzone-icon`,attachmentElementAddDropzoneHeading:`${l}-add-dropzone-heading`,attachmentElementAddDropzoneDetail:`${l}-add-dropzone-detail`,attachmentElementDetail:`${l}-detail`,attachmentElementDetailPreview:`${l}-detail-preview`,attachmentElementDetailPreviewImage:`${l}-detail-preview-image`,attachmentElementDetailPreviewIcon:`${l}-detail-preview-icon`,attachmentElementDetailActions:`${l}-detail-actions`,attachmentElementDetailMetadata:`${l}-detail-metadata`,attachmentElementDetailMetadataGroup:`${l}-detail-metadata-group`,attachmentElementDetailFileNameRow:`${l}-detail-file-name-row`,attachmentElementDetailFileNameInput:`${l}-detail-file-name-input`,attachmentElementDetailMetadataLabel:`${l}-detail-metadata-label`,attachmentElementDetailMetadataValue:`${l}-detail-metadata-value`,relationshipElementInput:`${i}`,relatedRecordsHeader:`${i}_header`,relatedRecordsDescription:`${i}_description`,relatedRecordsLabel:`${i}_label`,relatedRecordsList:`${i}_list`,utilityNetworkAssociationsElementInput:`${t}__utility-network-associations-element-input`,centeredButton:`${t}__centered-button`,description:`${t}__description-text`,block:`${t}__block`,group:e,groupSequential:`${e}--sequential`,individualElement:`${e}__individual-element`,multipleChoiceInput:`${n}`,multipleChoiceSelectAll:`${n}__select-all`,multipleChoiceOtherChoice:`${n}__other-choice`,multipleChoiceOtherChoiceWithSelectAll:`${n}__other-choice--with-select-all`};export{m as css};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{formatNumber as e}from"../../../intl/number.js";import{substitute as t}from"../../../intl/substitute.js";import{css as i}from"../css.js";import{loadCalciteComponents as n}from"../../support/componentsUtils.js";import{getIconForFeature as o}from"../../support/iconUtils.js";import{tsx as l,classes as s}from"../../support/widget.js";const c=()=>n({chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")});function a(e){const{input:t}=e,{template:n}=t;return l("div",{class:i.relationshipElementInput,"data-testid":`relationship-element-${n.elementId}`,key:`relationship-${t.relationshipId}-container`},r(t,e.messagesCommon),d(t),p(e))}function r(e,t){const n=e.updating||!e.loaded;return l("div",{class:i.relatedRecordsHeader,key:`relationship-${e.relationshipId}-header`},l("span",null,e.label),n?l("calcite-loader",{inline:!0,key:"loader",label:t?.loading,scale:"s",type:"indeterminate"}):void 0)}function d(e){const{activeCategory:t,description:n}=e;if(!t&&n)return l("calcite-input-message",{class:s(i.description,i.relatedRecordsDescription)},n)}function p(e){const{input:t,messages:i}=e,{activeCategory:n,relatedFeatureCount:o}=t;return o>0?u(e):n&&!o?R(e.messages):t.allCategories?.length?f(e):t.loaded?t.originHasValidKey?R(i):v(e):void 0}function u(e){const{viewModel:t,input:n,messages:o}=e,s=!n.editable||t.readOnly;return l("calcite-list",{class:i.relatedRecordsList,label:o.relatedRecords.relatedRecordsTitle},n.relatedFeatureInfos.map(t=>m(t,s,e)),g(e))}function m(e,t,i){const{feature:n,description:s,title:c}=e,{viewModel:a,input:r}=i,{relationshipId:d,single:p}=r,{feature:u}=p,m=()=>{u&&a.callbacks?.editRelatedRecord?.({parentFeature:u,readOnly:t,relatedFeature:n,relationshipId:d})};return l("calcite-list-item",{description:s,key:`${d}-${n.uid}`,label:c,value:c,onCalciteListItemSelect:m},l("calcite-icon",{icon:o(n),slot:"content-start"}),l("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}function g(e){const{input:i,messages:n}=e;if(i.showAllActionVisible)return l("calcite-list-item",{description:t(n.totalCount,{count:i.relatedFeatureCount}),key:"show-all-related-features",label:n.showAll,value:!0,onCalciteListItemSelect:()=>{console.debug("should show all here")}},l("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}function f(e){const{input:t,messages:i}=e;return l("calcite-list",{displayMode:"flat",label:i.relatedRecords.relatedRecordsTitle,loading:t.updating},t.categories?.map(e=>h(t,e)),b(e))}function h(t,i){const{count:n,name:o,value:s}=i,c=e(n);return l("calcite-list-item",{key:`${o}-${s}`,label:o,onCalciteListItemSelect:()=>y(t,i)},l("calcite-chip",{label:c,scale:"s",slot:"content-end"},c),l("calcite-icon",{flipRtl:!0,icon:"chevron-right",scale:"s",slot:"content-end"}))}function y(e,t){e.setActiveCategory(t)}function b(e){const{input:i,messages:n}=e;if(i.showAllCategoriesVisible)return l("calcite-list-item",{description:t(n.totalCount,{count:i.allCategories?.length??0}),key:"show-all-categories",label:n.showAll,value:!0,onCalciteListItemSelect:()=>i.setShowAllEnabled(!0)},l("calcite-icon",{icon:"list",scale:"s",slot:"content-end"}))}function v(e){const{viewModel:i,input:n,messages:o}=e,l=n.relatedLayerIsTable?o.relatedRecords.noOriginKeyRecord:o.relatedRecords.noOriginKeyFeature,s=n.relationship?.keyField,c=i.findFieldInput(s),a=n.layer?.fieldsIndex.get(s),r=c?.label||a?.alias||s;return C(t(l,{relatedLayerName:n.relatedLayer?.title??o.relatedRecords.untitledLayer,originKeyField:r}))}function R(e){return C(e.relatedRecords.noRecordsFound)}function C(e){return l("calcite-notice",{icon:"information",kind:"brand",open:!0,scale:"s",width:"full"},l("div",{slot:"message"},e))}export{a as RelationshipDetails,c as loadRelationshipDetailsComponents};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{createArcadeProfile as e,createArcadeExecutor as t}from"../../../../arcade.js";import r from"../../../../core/Error.js";import n from"../../../../core/Logger.js";import{getEffectiveFieldAlias as o}from"../../../../editing/fieldUtils.js";import i from"../../../../form/ExpressionInfo.js";import{isMultipleChoiceInput as s}from"../../../../form/elements/inputs/inputUtils.js";import{isAttachmentElement as a,isFieldElement as l,isGroupElement as m,isRelationshipElement as d,isTextElement as p,isUtilityNetworkAssociationsElement as c}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as f,isFieldVisibleByDefault as u}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as x,isSubtypeGroupLayer as y}from"../../../../layers/support/layerUtils.js";import{isNumber as w}from"../../../../support/guards.js";import{unknown as h}from"../../../../time/constants.js";import{makeExpressionInfosMap as E,makeExecutorSetForFormElement as b}from"../../expressions/expressionUtils.js";import{AttachmentElementTemplate as T}from"../AttachmentElementTemplate.js";import I from"../BatchFormTemplate.js";import{FieldElementTemplate as v}from"../FieldElementTemplate.js";import{GroupElementTemplate as g}from"../GroupElementTemplate.js";import{RelationshipElementTemplate as j}from"../RelationshipElementTemplate.js";import{TextElementTemplate as F}from"../TextElementTemplate.js";import{UtilityNetworkAssociationsElementTemplate as C}from"../UtilityNetworkAssociationsElementTemplate.js";import{compileTextElementMarkdownToHTML as P}from"./textElementTemplateUtils.js";const L="expression/dea57012-47ca4b55a000-8df62742ed0c",A=e("form-attachment-filename-calculation"),U=()=>n.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function Z(e,t,r=e.formTemplate){return await e.load(),r?.elements&&r.elements.length>0?B(r,e,t):N(e,t)}async function N(e,{arcadeExecutorProvider:t,formTimeZone:r}){const n=new Set(f(e)),o={arcadeExecutorProvider:t,formTimeZone:r,layer:e},i=[];for(const a of e.fields)G(a,e,n)&&i.push(O(a,o));const s=await Promise.all(i);return new I({elements:s,preserveFieldValuesWhenHidden:!0})}function k(e,t){for(const r of e??[])if("group"!==r.type){if("field"===r.type){if(!1===r.editable&&!r.editableExpression)return!0;if(t.subtypeField&&(x(t)||y(t))&&r.fieldName?.toLowerCase()===t.subtypeField.toLowerCase())return!0}}else if(k(r.elements??[],t))return!0;return!1}async function B(e,t,r){let n=null;k(e.elements??[],t)&&(n=new i({title:"",name:L,expression:"false"}));const o=E(n?[...e.expressionInfos??[],n]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new I(s);const{arcadeExecutorProvider:l,formTimeZone:m}=r;for(const i of a){const e=await R(i,{arcadeExecutorProvider:l,expressionInfos:o,layer:t,formTimeZone:m});e&&s.elements.push(e)}return e.supportsAttachmentElements,new I(s)}async function H(e,{arcadeExecutorProvider:r,expressionInfos:n,layer:o}){const i=n.get(e.filenameExpression),s=i?await t(i.expression,A):null,a=new T({allowUserRename:e.allowUserRename,attachmentKeyword:e.attachmentKeyword,description:e.description,displayFilename:e.displayFilename,filenameExpressionExecutor:s,input:e.input,label:e.label,maxAttachmentCount:e.maxAttachmentCount,minAttachmentCount:e.minAttachmentCount,useOriginalFilename:e.useOriginalFilename}),l=await b({element:e,expressionInfos:n,provider:r});return a.addLayer(o,l),a}async function R(e,t){return a(e)?H(e,{arcadeExecutorProvider:t.arcadeExecutorProvider,expressionInfos:t.expressionInfos,layer:t.layer}):l(e)?S(e,t):m(e)?V(e,t):d(e)?W(e,t):p(e)?z(e,t):c(e)?K(e,t):null}async function S(e,{arcadeExecutorProvider:t,expressionInfos:n,layer:o,formTimeZone:i}){const{fieldsIndex:a}=o,{description:l,domain:m,fieldName:d,hint:p,input:c,label:f}=e;if(null==d||!a.has(d))return U().warn(new r("batch-attribute-form:invalid-form-element-field",`Field element with label '${f}' does not refer to a valid field`)),null;if(!1!==e.editable||e.editableExpression||((e=e.clone()).editableExpression=L),o.subtypeField&&(x(o)||y(o))&&e.fieldName?.toLowerCase()===o.subtypeField.toLowerCase()&&((e=e.clone()).editableExpression=L),c&&s(c)&&c.otherChoice){const e=c.otherChoice.fieldName,t=a.get(e);t&&t.name!==e&&(c.otherChoice=c.otherChoice.clone(),c.otherChoice.fieldName=t.name)}const u=new v({description:l,domain:m,field:a.get(d),hint:p,input:c,formTimeZone:i,layerTimeZone:$(o),label:f}),w=await b({element:e,expressionInfos:n,provider:t});return u.addLayer(o,w),u}async function V(e,t){const{arcadeExecutorProvider:r,expressionInfos:n,layer:o}=t,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await R(p,t);e&&l.push(e)}const m=new g({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await b({element:e,expressionInfos:n,provider:r});return m.addLayer(o,d),m}async function W(e,t){const{description:r,label:n,displayCount:o,displayType:i,orderByFields:s,relationshipId:a}=e,{arcadeExecutorProvider:l,expressionInfos:m,layer:d}=t,p=new j({description:r,...w(o)&&{displayCount:o},displayType:i,label:n,orderByFields:s,relationshipId:a}),c=await b({element:e,expressionInfos:m,provider:l});return p.addLayer(d,c),p}async function z(e,{arcadeExecutorProvider:t,expressionInfos:r,layer:n}){const{description:o,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=n,m=s&&"markdown"===a?await P(s):s,d=new F({compiledText:m,description:o,fieldsIndex:l,label:i}),p=await b({element:e,expressionInfos:r,provider:t}),{expressionParts:c}=d;if(c.length){const e=await Promise.all(c.map(e=>{const n=r.get(e)?.expression??e;return t.getArcadeExecutor(n)}));p.textExpressions=e}return d.addLayer(n,p),d}async function K(e,t){const{associationTypes:r,description:n,label:o}=e,{arcadeExecutorProvider:i,expressionInfos:s,layer:a}=t,l=new C({associationTypes:r,description:n,label:o}),m=await b({element:e,expressionInfos:s,provider:i});return l.addLayer(a,m),l}async function O(e,{arcadeExecutorProvider:t,layer:r,formTimeZone:n}){const i=o(e,r)||e.name,s=new v({field:e,label:i,formTimeZone:n,layerTimeZone:$(r)}),a={},l=(y(r)||x(r))&&r.subtypeField&&r.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&r.userHasUpdateItemPrivileges&&(a.editableExpression=await t.getArcadeExecutor("true")),l&&(a.editableExpression=await t.getArcadeExecutor("false")),s.addLayer(r,a),s}function G(e,t,r){return!r.has(e.name.toLowerCase())&&u(e,t)}function $(e){return x(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?h:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{Z as createBatchFormTemplate,N as createBatchFormTemplateFromFields};
2
+ import{createArcadeProfile as e,createArcadeExecutor as r}from"../../../../arcade.js";import t from"../../../../core/Error.js";import o from"../../../../core/Logger.js";import{getEffectiveFieldAlias as n}from"../../../../editing/fieldUtils.js";import i from"../../../../form/ExpressionInfo.js";import s from"../../../../form/elements/AttachmentElement.js";import{isMultipleChoiceInput as a}from"../../../../form/elements/inputs/inputUtils.js";import{isAttachmentElement as l,isFieldElement as m,isGroupElement as d,isRelationshipElement as p,isTextElement as c,isUtilityNetworkAssociationsElement as f}from"../../../../form/support/formUtils.js";import{getLowerCaseEditTrackingFields as u,isFieldVisibleByDefault as x}from"../../../../layers/support/fieldUtils.js";import{isSubtypeSublayer as y,isSubtypeGroupLayer as w}from"../../../../layers/support/layerUtils.js";import{isNumber as h}from"../../../../support/guards.js";import{unknown as E}from"../../../../time/constants.js";import{layerSupportsQueryAttachments as b}from"../../batchAttributeFormUtils.js";import{makeExpressionInfosMap as v,makeExecutorSetForFormElement as I}from"../../expressions/expressionUtils.js";import{AttachmentElementTemplate as T}from"../AttachmentElementTemplate.js";import j from"../BatchFormTemplate.js";import{FieldElementTemplate as F}from"../FieldElementTemplate.js";import{GroupElementTemplate as g}from"../GroupElementTemplate.js";import{RelationshipElementTemplate as P}from"../RelationshipElementTemplate.js";import{TextElementTemplate as C}from"../TextElementTemplate.js";import{UtilityNetworkAssociationsElementTemplate as A}from"../UtilityNetworkAssociationsElementTemplate.js";import{compileTextElementMarkdownToHTML as L}from"./textElementTemplateUtils.js";const U="expression/dea57012-47ca4b55a000-8df62742ed0c",Z=e("form-attachment-filename-calculation"),N=()=>o.getLogger("esri.widgets.BatchAttributeForm.templates.templateUtils");async function k(e,r,t=e.formTemplate){return await e.load(),t?.elements&&t.elements.length>0?S(t,e,r):B(e,r)}async function B(e,{arcadeExecutorProvider:r,formTimeZone:t}){const o=new Set(u(e)),n={arcadeExecutorProvider:r,formTimeZone:t,layer:e},i=[];for(const a of e.fields)D(a,e,o)&&i.push(q(a,n));const s=await Promise.all(i);return await R(s,{arcadeExecutorProvider:r,expressionInfos:v(void 0),layer:e}),new j({elements:s,preserveFieldValuesWhenHidden:!0})}function H(e,r){for(const t of e??[])if("group"!==t.type){if("field"===t.type){if(!1===t.editable&&!t.editableExpression)return!0;if(r.subtypeField&&(y(r)||w(r))&&t.fieldName?.toLowerCase()===r.subtypeField.toLowerCase())return!0}}else if(H(t.elements??[],r))return!0;return!1}async function R(e,{arcadeExecutorProvider:r,expressionInfos:t,layer:o}){if(!b(o))return;const n=await V(new s({displayFilename:!0}),{arcadeExecutorProvider:r,expressionInfos:t,layer:o});e.push(n)}async function S(e,r,t){let o=null;H(e.elements??[],r)&&(o=new i({title:"",name:U,expression:"false"}));const n=v(o?[...e.expressionInfos??[],o]:e.expressionInfos),s={description:e.description,elements:new Array,title:e.title,preserveFieldValuesWhenHidden:e.preserveFieldValuesWhenHidden,supportsAttachmentElements:e.supportsAttachmentElements},{elements:a}=e;if(!a)return new j(s);const{arcadeExecutorProvider:l,formTimeZone:m}=t;for(const i of a){const e=await W(i,{arcadeExecutorProvider:l,expressionInfos:n,layer:r,formTimeZone:m});e&&s.elements.push(e)}return e.supportsAttachmentElements||await R(s.elements,{arcadeExecutorProvider:l,expressionInfos:n,layer:r}),new j(s)}async function V(e,{arcadeExecutorProvider:t,expressionInfos:o,layer:n}){const i=o.get(e.filenameExpression),s=i?await r(i.expression,Z):null,a=new T({allowUserRename:e.allowUserRename,attachmentKeyword:e.attachmentKeyword,description:e.description,displayFilename:e.displayFilename,filenameExpressionExecutor:s,input:e.input,label:e.label,maxAttachmentCount:e.maxAttachmentCount,minAttachmentCount:e.minAttachmentCount,useOriginalFilename:e.useOriginalFilename}),l=await I({element:e,expressionInfos:o,provider:t});return a.addLayer(n,l),a}async function W(e,r){return l(e)?V(e,{arcadeExecutorProvider:r.arcadeExecutorProvider,expressionInfos:r.expressionInfos,layer:r.layer}):m(e)?z(e,r):d(e)?K(e,r):p(e)?O(e,r):c(e)?G(e,r):f(e)?$(e,r):null}async function z(e,{arcadeExecutorProvider:r,expressionInfos:o,layer:n,formTimeZone:i}){const{fieldsIndex:s}=n,{description:l,domain:m,fieldName:d,hint:p,input:c,label:f}=e;if(null==d||!s.has(d))return N().warn(new t("batch-attribute-form:invalid-form-element-field",`Field element with label '${f}' does not refer to a valid field`)),null;if(!1!==e.editable||e.editableExpression||((e=e.clone()).editableExpression=U),n.subtypeField&&(y(n)||w(n))&&e.fieldName?.toLowerCase()===n.subtypeField.toLowerCase()&&((e=e.clone()).editableExpression=U),c&&a(c)&&c.otherChoice){const e=c.otherChoice.fieldName,r=s.get(e);r&&r.name!==e&&(c.otherChoice=c.otherChoice.clone(),c.otherChoice.fieldName=r.name)}const u=new F({description:l,domain:m,field:s.get(d),hint:p,input:c,formTimeZone:i,layerTimeZone:J(n),label:f}),x=await I({element:e,expressionInfos:o,provider:r});return u.addLayer(n,x),u}async function K(e,r){const{arcadeExecutorProvider:t,expressionInfos:o,layer:n}=r,{description:i,label:s,initialState:a}=e,l=[];for(const p of e.elements){const e=await W(p,r);e&&l.push(e)}const m=new g({description:i,elements:l,label:s,initialState:a??"expanded"}),d=await I({element:e,expressionInfos:o,provider:t});return m.addLayer(n,d),m}async function O(e,r){const{description:t,label:o,displayCount:n,displayType:i,orderByFields:s,relationshipId:a}=e,{arcadeExecutorProvider:l,expressionInfos:m,layer:d}=r,p=new P({description:t,...h(n)&&{displayCount:n},displayType:i,label:o,orderByFields:s,relationshipId:a}),c=await I({element:e,expressionInfos:m,provider:l});return p.addLayer(d,c),p}async function G(e,{arcadeExecutorProvider:r,expressionInfos:t,layer:o}){const{description:n,label:i,text:s,textFormat:a}=e,{fieldsIndex:l}=o,m=s&&"markdown"===a?await L(s):s,d=new C({compiledText:m,description:n,fieldsIndex:l,label:i}),p=await I({element:e,expressionInfos:t,provider:r}),{expressionParts:c}=d;if(c.length){const e=await Promise.all(c.map(e=>{const o=t.get(e)?.expression??e;return r.getArcadeExecutor(o)}));p.textExpressions=e}return d.addLayer(o,p),d}async function $(e,r){const{associationTypes:t,description:o,label:n}=e,{arcadeExecutorProvider:i,expressionInfos:s,layer:a}=r,l=new A({associationTypes:t,description:o,label:n}),m=await I({element:e,expressionInfos:s,provider:i});return l.addLayer(a,m),l}async function q(e,{arcadeExecutorProvider:r,layer:t,formTimeZone:o}){const i=n(e,t)||e.name,s=new F({field:e,label:i,formTimeZone:o,layerTimeZone:J(t)}),a={},l=(w(t)||y(t))&&t.subtypeField&&t.subtypeField.toLowerCase()===e.name.toLowerCase();return!l&&e.editable&&t.userHasUpdateItemPrivileges&&(a.editableExpression=await r.getArcadeExecutor("true")),l&&(a.editableExpression=await r.getArcadeExecutor("false")),s.addLayer(t,a),s}function D(e,r,t){return!t.has(e.name.toLowerCase())&&x(e,r)}function J(e){return y(e)&&e.parent&&(e=e.parent),e&&"datesInUnknownTimezone"in e&&e.datesInUnknownTimezone?E:e&&"preferredTimeZone"in e&&e.preferredTimeZone?e.preferredTimeZone:null}export{k as createBatchFormTemplate,B as createBatchFormTemplateFromFields};