@arcgis/core 5.2.0-next.27 → 5.2.0-next.29

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 (418) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/WebMap.js +1 -1
  3. package/applications/KnowledgeStudio/generalSharedKgUtils.d.ts +40 -2
  4. package/applications/KnowledgeStudio/generalSharedKgUtils.js +1 -1
  5. package/arcade/Dictionary.js +1 -1
  6. package/arcade/Feature.js +1 -1
  7. package/arcade/Pixel.js +1 -1
  8. package/arcade/deepClone.js +1 -1
  9. package/arcade/featureset/support/FeatureSet.js +1 -1
  10. package/arcade/functions/geometry.js +1 -1
  11. package/arcade/languageUtils.js +1 -1
  12. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  13. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  14. package/assets/esri/core/workers/RemoteClient.js +1 -1
  15. package/assets/esri/core/workers/chunks/0197e459fdb04dfb28ef.js +1 -0
  16. package/assets/esri/core/workers/chunks/{f7344d855f1092383abe.js → 15aa9b85976069acf4f3.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{5ee887fc6e1e0e70e02f.js → 1664434dc7a67c8ce453.js} +1 -1
  18. package/assets/esri/core/workers/chunks/17b98787a0698f584882.js +1 -0
  19. package/assets/esri/core/workers/chunks/1837f97f720d255a1694.js +1 -0
  20. package/assets/esri/core/workers/chunks/1b9c68e8431bb4608209.js +1 -0
  21. package/assets/esri/core/workers/chunks/1bbf5f5da5842b93f638.js +1 -0
  22. package/assets/esri/core/workers/chunks/1bd7b7f4ee7ea6cb7ef9.js +1 -0
  23. package/assets/esri/core/workers/chunks/1e386475937e02b3f523.js +1 -0
  24. package/assets/esri/core/workers/chunks/209460f8aae3f9f8c9b8.js +1 -0
  25. package/assets/esri/core/workers/chunks/{316a3d5c7842b445e29e.js → 20ffeb09bb30400de110.js} +1 -1
  26. package/assets/esri/core/workers/chunks/21122f3f3e19a7fd7d33.js +1 -0
  27. package/assets/esri/core/workers/chunks/{25fd4d5d3af887536b3b.js → 2628136bf9f47d238a24.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{bf9eca7dd107bdb06614.js → 2665337e1b665e7e2b70.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2b044c8fab2055a8818d.js +1 -0
  30. package/assets/esri/core/workers/chunks/2b2b042a6d6949b06127.js +1 -0
  31. package/assets/esri/core/workers/chunks/2c15c227d057292d4fa8.js +1 -0
  32. package/assets/esri/core/workers/chunks/2f02880a7f081eb210cd.js +1 -0
  33. package/assets/esri/core/workers/chunks/2fc3e43b64300014dddc.js +1 -0
  34. package/assets/esri/core/workers/chunks/{31c4128b23968575feca.js → 31d92ba9089617aa59ab.js} +1 -1
  35. package/assets/esri/core/workers/chunks/32740b075d7a890d7888.js +1 -0
  36. package/assets/esri/core/workers/chunks/38b69fba9ae4ccbae6b7.js +1 -0
  37. package/assets/esri/core/workers/chunks/390f2beee8e3f2a302e4.js +1 -0
  38. package/assets/esri/core/workers/chunks/3c342e662c13a05f4caf.js +1 -0
  39. package/assets/esri/core/workers/chunks/{d670e134348954ce465d.js → 3d1e5bfd88771d4a0bf6.js} +1 -1
  40. package/assets/esri/core/workers/chunks/3eee32db0e9a5086b9a8.js +1 -0
  41. package/assets/esri/core/workers/chunks/43847d66726fd0bcbbb7.js +1 -0
  42. package/assets/esri/core/workers/chunks/4545cf12ad0824ce6b41.js +1 -0
  43. package/assets/esri/core/workers/chunks/45e4b9069263adeae394.js +1 -0
  44. package/assets/esri/core/workers/chunks/47290f27375c76bcc9c7.js +1 -0
  45. package/assets/esri/core/workers/chunks/{4e16d7fa2e6f11d082b5.js → 4ba4fd8fa31169760fee.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{268ee59800e64baa9682.js → 4be0c64bbf2449d57ea5.js} +1 -1
  47. package/assets/esri/core/workers/chunks/5115059b012ef84407cf.js +1 -0
  48. package/assets/esri/core/workers/chunks/{e8e7cd26c43f231cdea2.js → 5189413a83faf3480e29.js} +1 -1
  49. package/assets/esri/core/workers/chunks/5c63b38160c7d063b8af.js +1 -0
  50. package/assets/esri/core/workers/chunks/5cccb8b06014ccef30f8.js +1 -0
  51. package/assets/esri/core/workers/chunks/{0098544169e429dd98d2.js → 689673173ca1c0e098fe.js} +1 -1
  52. package/assets/esri/core/workers/chunks/697e0ce10d77b90d4fee.js +1 -0
  53. package/assets/esri/core/workers/chunks/6991ba1b204668e7d4da.js +1 -0
  54. package/assets/esri/core/workers/chunks/{ccffaba50674adba7a0f.js → 6b56971783bf4c31a563.js} +1 -1
  55. package/assets/esri/core/workers/chunks/70c94bcfa20453134037.js +1 -0
  56. package/assets/esri/core/workers/chunks/{8f93e6fc11a158d4f1ee.js → 7335a762412bc8c15a2f.js} +1 -1
  57. package/assets/esri/core/workers/chunks/759686b896f51f0fe6a9.js +1 -0
  58. package/assets/esri/core/workers/chunks/7656900713e55036c3c1.js +1 -0
  59. package/assets/esri/core/workers/chunks/{b2b342b06d502fc61ea5.js → 76789f46b2c65d219cf9.js} +1 -1
  60. package/assets/esri/core/workers/chunks/774615303c1cc9a77e20.js +1 -0
  61. package/assets/esri/core/workers/chunks/7b290ac2e8a567ecae4a.js +1 -0
  62. package/assets/esri/core/workers/chunks/7ff37a4f315f7621462b.js +1 -0
  63. package/assets/esri/core/workers/chunks/8ad5e80e911419c1685a.js +1 -0
  64. package/assets/esri/core/workers/chunks/{a3ecde3794a7db3cf283.js → 8d90bef1091204fba0f1.js} +1 -1
  65. package/assets/esri/core/workers/chunks/8f16a358ed83d2264415.js +1 -0
  66. package/assets/esri/core/workers/chunks/{a454df829a72ab02c860.js → 8fd63cb38036f331a803.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{bbcad2fde838819ffc7b.js → 906f4c0fa8135e6c2f03.js} +1 -1
  68. package/assets/esri/core/workers/chunks/989937c120bdd676ec1e.js +1 -0
  69. package/assets/esri/core/workers/chunks/9ba705a6ddabca0f77b1.js +1 -0
  70. package/assets/esri/core/workers/chunks/{87011d2fe14c54e296af.js → 9fe71d49c888fd871312.js} +1 -1
  71. package/assets/esri/core/workers/chunks/a14e5607c5c091c77e3d.js +1 -0
  72. package/assets/esri/core/workers/chunks/a2be8784f2cfdbb42681.js +1 -0
  73. package/assets/esri/core/workers/chunks/a6379a8df8c08b729b9c.js +1 -0
  74. package/assets/esri/core/workers/chunks/a988fd54912969b812ce.js +1 -0
  75. package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +1 -0
  76. package/assets/esri/core/workers/chunks/acbc14395c31f6da509e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{11d1af758e2140095b10.js → aec82b94787821153d2b.js} +1 -1
  78. package/assets/esri/core/workers/chunks/b18b6bb85e52b03b85e3.js +680 -0
  79. package/assets/esri/core/workers/chunks/b624796ff4a9d4c406bf.js +1 -0
  80. package/assets/esri/core/workers/chunks/b7458bd3a2f590f32111.js +1 -0
  81. package/assets/esri/core/workers/chunks/bb1fad01d9f070e7d795.js +1 -0
  82. package/assets/esri/core/workers/chunks/{a9d477f90e5046400dd5.js → bcb2092c87d8d21c6458.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{3e94ed4d57ee7d870cba.js → c6f5688074ae89c37add.js} +1 -1
  84. package/assets/esri/core/workers/chunks/caf150028aeac91b8d80.js +1 -0
  85. package/assets/esri/core/workers/chunks/cb30e8a66d6dcfebd439.js +1 -0
  86. package/assets/esri/core/workers/chunks/d7c0ab622caf495dbcef.js +1 -0
  87. package/assets/esri/core/workers/chunks/e181d0f5562878b3dc01.js +1 -0
  88. package/assets/esri/core/workers/chunks/{fd629872b5c07853f695.js → e4015870412edd69453c.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{d07068c44d560e4ce02e.js → e5d2fab228d54b18a8a8.js} +1 -1
  90. package/assets/esri/core/workers/chunks/e774303efefee31952d0.js +1 -0
  91. package/assets/esri/core/workers/chunks/e98a8f80023c6023e72c.js +1 -0
  92. package/assets/esri/core/workers/chunks/f10a339b16d84b650012.js +2 -0
  93. package/assets/esri/core/workers/chunks/f1d211904d5a1de93cb3.js +1 -0
  94. package/assets/esri/core/workers/chunks/f847a4846c427f671455.js +1 -0
  95. package/assets/esri/core/workers/chunks/fe42fa2144691b9186fd.js +1 -0
  96. package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
  97. package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
  98. package/assets/esri/images/portal/propresentation16.png +0 -0
  99. package/assets/esri/images/portal/urbanproject16.png +0 -0
  100. package/assets/esri/images/support/loading-throb.gif +0 -0
  101. package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
  102. package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
  103. package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
  104. package/assets/esri/themes/base/icons/style.scss +0 -0
  105. package/assets/esri/themes/base/icons/variables.scss +0 -0
  106. package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
  107. package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
  108. package/assets/esri/themes/base/images/files/code-32.svg +0 -0
  109. package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
  110. package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
  111. package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
  112. package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
  113. package/assets/esri/themes/base/images/files/image-32.svg +0 -0
  114. package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
  115. package/assets/esri/themes/base/images/files/report-32.svg +0 -0
  116. package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
  117. package/assets/esri/themes/base/images/files/text-32.svg +0 -0
  118. package/assets/esri/themes/base/images/files/video-32.svg +0 -0
  119. package/assets/esri/themes/base/images/files/word-32.svg +0 -0
  120. package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
  121. package/assets/esri/themes/base/images/loading-throb.gif +0 -0
  122. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +24 -0
  123. package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
  124. package/assets/esri/themes/dark/main.css +1 -1
  125. package/assets/esri/themes/light/main.css +1 -1
  126. package/assets/esri/themes/light/view.css +1 -1
  127. package/chunks/GlowComposition.glsl.js +5 -5
  128. package/chunks/OITBlend.glsl.js +1 -1
  129. package/chunks/languageUtils.js +1 -1
  130. package/config.js +1 -1
  131. package/core/AsyncUpdate.js +1 -1
  132. package/core/Loadable.js +1 -1
  133. package/core/colorUtils.js +1 -1
  134. package/core/date.js +1 -1
  135. package/core/has.js +1 -1
  136. package/core/workers/WorkerHandle.js +1 -1
  137. package/core/workers/workerFactory.js +1 -1
  138. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  139. package/form/elements/AttachmentElement.d.ts +4 -1
  140. package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -0
  141. package/form/elements/inputs/attachments/AudioInput.d.ts +1 -0
  142. package/form/elements/inputs/attachments/DocumentInput.d.ts +3 -0
  143. package/form/elements/inputs/attachments/ImageInput.d.ts +1 -0
  144. package/form/elements/inputs/attachments/VideoInput.d.ts +1 -0
  145. package/geometry/Mesh.js +1 -1
  146. package/geometry/support/meshUtils/loadExternal.js +1 -1
  147. package/identity/OAuthCredential.js +1 -1
  148. package/kernel.js +1 -1
  149. package/layers/AnnotationFeatureLayer.d.ts +2 -4
  150. package/layers/AnnotationFeatureLayer.js +1 -1
  151. package/layers/DimensionFeatureLayer.d.ts +0 -2
  152. package/layers/DimensionFeatureLayer.js +1 -1
  153. package/layers/LinkChartLayer.js +1 -1
  154. package/layers/ParquetLayer.js +1 -1
  155. package/layers/PointCloudLayer.js +1 -1
  156. package/layers/SceneLayer.js +1 -1
  157. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  158. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  159. package/layers/graphics/editingSupport.js +1 -1
  160. package/layers/graphics/sources/MemorySource.js +1 -1
  161. package/layers/graphics/sources/ParquetSource.js +1 -1
  162. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  163. package/layers/mixins/EditBusLayer.js +1 -1
  164. package/layers/mixins/SceneService.js +1 -1
  165. package/layers/support/KMLSublayer.js +1 -1
  166. package/layers/support/ParquetFilesData.js +1 -1
  167. package/layers/support/TitleCreator.js +1 -1
  168. package/layers/support/featureLayerUtils.js +1 -1
  169. package/layers/support/parquetUtils.js +1 -1
  170. package/linkChart/guards.js +2 -0
  171. package/linkChart/utils.js +1 -1
  172. package/networks/CircuitManager.d.ts +44 -0
  173. package/networks/support/CircuitExportJobInfo.d.ts +1 -1
  174. package/networks/support/CircuitVerifyJobInfo.d.ts +1 -1
  175. package/networks/support/jsonTypes.d.ts +2 -0
  176. package/package.json +5 -5
  177. package/rest/featureService/types.d.ts +4 -7
  178. package/rest/knowledgeGraph/ReplicaDefinition.d.ts +62 -6
  179. package/rest/networks/circuits/support/CircuitVerifyResult.d.ts +1 -1
  180. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +1 -1
  181. package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +17 -3
  182. package/rest/networks/unitIdentifiers/support/UnitQueryResult.d.ts +1 -1
  183. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  184. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  185. package/support/ArcadeExpression.js +1 -1
  186. package/support/basemapUtils.js +1 -1
  187. package/support/revision.js +1 -1
  188. package/symbols/cim/CIMOperators.js +1 -1
  189. package/symbols/cim/utils.js +1 -1
  190. package/symbols/support/cimSymbolUtils.js +1 -1
  191. package/versionManagement/VersionManagementService.js +1 -1
  192. package/versionManagement/VersionManager.js +1 -1
  193. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  194. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  195. package/views/2d/engine/ParentChildStage.js +1 -1
  196. package/views/2d/engine/Stage.js +1 -1
  197. package/views/2d/engine/ThrottledCanvas.js +2 -0
  198. package/views/2d/engine/webgl/Profiler.js +1 -1
  199. package/views/2d/engine/webgl/mesh/factories/FeatureMeshFactory.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  201. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  202. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  203. package/views/2d/engine/webgl/util/DictionaryMatcher.js +1 -1
  204. package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
  205. package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
  206. package/views/2d/engine/webgl/util/LabelMatcher.js +1 -1
  207. package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
  208. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  209. package/views/2d/engine/webgl/util/createMatcher.js +1 -1
  210. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  211. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  212. package/views/2d/layers/LayerView2D.js +1 -1
  213. package/views/2d/layers/MediaLayerView2D.js +1 -1
  214. package/views/2d/layers/TileLayerView2D.js +1 -1
  215. package/views/2d/layers/features/Processor.js +1 -1
  216. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  217. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  218. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  219. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  220. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  221. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  222. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  223. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  224. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  225. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  226. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  227. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  228. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  229. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  230. package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
  231. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  232. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  233. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  234. package/views/2d/layers/support/annodime/DimensionInfo.js +1 -1
  235. package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +2 -0
  236. package/views/2d/layers/support/annodime/PrivateDimensionEffect.js +1 -1
  237. package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +2 -0
  238. package/views/2d/layers/support/annodime/TileObjectId.js +2 -0
  239. package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
  240. package/views/2d/layers/support/annodime/debugUtils.js +2 -0
  241. package/views/2d/layers/support/annodime/dimensionStyleDefaults.js +2 -0
  242. package/views/2d/layers/support/annodime/dimensionSymbols.js +1 -1
  243. package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
  244. package/views/2d/layers/support/annodime/utils.js +1 -1
  245. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  246. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  247. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  248. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  249. package/views/3d/camera/constraintUtils.js +1 -1
  250. package/views/3d/glTF/internal/Resource.js +1 -1
  251. package/views/3d/glTF/loader.js +1 -1
  252. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  253. package/views/3d/layers/I3SMeshView3D.js +1 -1
  254. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  255. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  256. package/views/3d/layers/SceneLayerWorkerHandle.js +1 -1
  257. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  258. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  259. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  260. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  261. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  262. package/views/3d/state/GoToOperation.js +1 -1
  263. package/views/3d/state/SurfaceCollisionConstraint.js +1 -1
  264. package/views/3d/state/ViewState.js +1 -1
  265. package/views/3d/state/ViewStateManager.js +1 -1
  266. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  267. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  268. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  269. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  270. package/views/3d/webgl/ManagedFBO.js +1 -1
  271. package/views/3d/webgl/RenderCamera.js +1 -1
  272. package/views/3d/webgl/RenderNode.js +1 -1
  273. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  274. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  275. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  276. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  277. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  278. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  279. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  280. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  281. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  282. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  283. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  284. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  285. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  286. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  287. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  288. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  289. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  290. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  291. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  292. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  293. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  294. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  295. package/views/3d/webgl.js +1 -1
  296. package/views/VideoView.js +1 -1
  297. package/views/View2D.js +1 -1
  298. package/views/Viewport2DBaseMixin.js +1 -1
  299. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  300. package/views/draw/DrawTool.js +1 -1
  301. package/views/draw/support/editingSessionUtils.js +1 -1
  302. package/views/interactive/sketch/SketchLabelOptions.d.ts +0 -6
  303. package/views/layers/AnnotationFeatureLayerView.d.ts +0 -7
  304. package/views/layers/DimensionFeatureLayerView.d.ts +0 -7
  305. package/views/popupAdapter.js +1 -1
  306. package/views/support/LayerViewManager.js +1 -1
  307. package/views/webgl/BufferObject.js +1 -1
  308. package/webdoc/support/webdocSaveUtils.js +1 -1
  309. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  310. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  311. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  312. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  313. package/widgets/BatchAttributeForm/css.js +1 -1
  314. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  315. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  316. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  317. package/widgets/BatchAttributeForm.js +1 -1
  318. package/widgets/Directions/DirectionsViewModel.js +1 -1
  319. package/widgets/Directions.js +1 -1
  320. package/widgets/Editor/EditorViewModel.d.ts +1 -13
  321. package/widgets/Editor.d.ts +11 -13
  322. package/widgets/Editor.js +1 -1
  323. package/widgets/Feature/FeatureViewModel.js +1 -1
  324. package/widgets/Feature.js +1 -1
  325. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  326. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  327. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  328. package/widgets/FeatureTable.js +1 -1
  329. package/widgets/Features/FeaturesViewModel.js +1 -1
  330. package/widgets/Features.js +1 -1
  331. package/widgets/LayerList/LayerListViewModel.js +1 -1
  332. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
  333. package/widgets/Locate/LocateViewModel.js +1 -1
  334. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  335. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  336. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  337. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  338. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  339. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
  340. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  341. package/widgets/Popup/PopupViewModel.d.ts +0 -1
  342. package/widgets/Popup/PopupViewModel.js +1 -1
  343. package/widgets/Popup.js +1 -1
  344. package/widgets/Print/PrintViewModel.js +1 -1
  345. package/widgets/Print.js +1 -1
  346. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  347. package/widgets/Sketch/SketchViewModel.d.ts +0 -12
  348. package/widgets/Sketch.d.ts +0 -12
  349. package/widgets/TableList/ListItem.js +1 -1
  350. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  351. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  352. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  353. package/widgets/Widget.js +1 -1
  354. package/widgets/support/geolocationUtils.js +1 -1
  355. package/widgets/support/tests.js +1 -1
  356. package/assets/esri/core/workers/chunks/04070767356c12026369.js +0 -1
  357. package/assets/esri/core/workers/chunks/045f178fecc23839bfa8.js +0 -680
  358. package/assets/esri/core/workers/chunks/073ee52705ea326fecfb.js +0 -1
  359. package/assets/esri/core/workers/chunks/0e81b6aa64d5491870b2.js +0 -1
  360. package/assets/esri/core/workers/chunks/126a8c26618425790804.js +0 -1
  361. package/assets/esri/core/workers/chunks/1a7c0a1dc6ecc93ea03a.js +0 -1
  362. package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +0 -1
  363. package/assets/esri/core/workers/chunks/1f03e34520746e432719.js +0 -1
  364. package/assets/esri/core/workers/chunks/292498a9c7d462d215c6.js +0 -1
  365. package/assets/esri/core/workers/chunks/2ed81f1e490cb7e73405.js +0 -1
  366. package/assets/esri/core/workers/chunks/32f26757e36704923286.js +0 -1
  367. package/assets/esri/core/workers/chunks/33e86dd1a54e447fa0e3.js +0 -1
  368. package/assets/esri/core/workers/chunks/35c87b0a4d4ee7ce302d.js +0 -1
  369. package/assets/esri/core/workers/chunks/36b904912cea1744d1c6.js +0 -1
  370. package/assets/esri/core/workers/chunks/3a35779cae6a11cde51b.js +0 -1
  371. package/assets/esri/core/workers/chunks/3b7060d264888bf298b1.js +0 -1
  372. package/assets/esri/core/workers/chunks/3df5394b17e9659ecb8f.js +0 -1
  373. package/assets/esri/core/workers/chunks/4adfe7f8a8efe2cd8e80.js +0 -1
  374. package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +0 -1
  375. package/assets/esri/core/workers/chunks/5396a894e6f8030ca088.js +0 -1
  376. package/assets/esri/core/workers/chunks/5728d8440aca205e4f53.js +0 -1
  377. package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +0 -1
  378. package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +0 -1
  379. package/assets/esri/core/workers/chunks/6849282c4a5cd733779d.js +0 -1
  380. package/assets/esri/core/workers/chunks/6adc17e6e287a365ad8d.js +0 -1
  381. package/assets/esri/core/workers/chunks/6db5ee9c589265b23b60.js +0 -1
  382. package/assets/esri/core/workers/chunks/76ed8e455f6bd79e561c.js +0 -1
  383. package/assets/esri/core/workers/chunks/7c34eb94e2c74602aeab.js +0 -1
  384. package/assets/esri/core/workers/chunks/831455798b177678720c.js +0 -1
  385. package/assets/esri/core/workers/chunks/88b08b386926ec889573.js +0 -1
  386. package/assets/esri/core/workers/chunks/8bd4c43c34aacf3b07da.js +0 -1
  387. package/assets/esri/core/workers/chunks/8ca88cfc0b9f84dc5832.js +0 -1
  388. package/assets/esri/core/workers/chunks/928b18e13e015330d44b.js +0 -1
  389. package/assets/esri/core/workers/chunks/937e347d130d469518ce.js +0 -1
  390. package/assets/esri/core/workers/chunks/93b40245378ced43ca08.js +0 -1
  391. package/assets/esri/core/workers/chunks/98dfe31e8ed9b522eaff.js +0 -1
  392. package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +0 -1
  393. package/assets/esri/core/workers/chunks/a195f569eada3a8736be.js +0 -1
  394. package/assets/esri/core/workers/chunks/a40ede4d3375184f21fe.js +0 -1
  395. package/assets/esri/core/workers/chunks/a8167ab9fd846d699be5.js +0 -1
  396. package/assets/esri/core/workers/chunks/af96cbc4fb7bef726635.js +0 -1
  397. package/assets/esri/core/workers/chunks/b87aca8ad281870ae970.js +0 -1
  398. package/assets/esri/core/workers/chunks/ceb5bd9f2afaa2ea0808.js +0 -1
  399. package/assets/esri/core/workers/chunks/d25c37f169577a33db46.js +0 -1
  400. package/assets/esri/core/workers/chunks/d374cb2d17a2d11c500f.js +0 -1
  401. package/assets/esri/core/workers/chunks/dadf85890961bcc205eb.js +0 -1
  402. package/assets/esri/core/workers/chunks/db279d5d9c7deec554bb.js +0 -1
  403. package/assets/esri/core/workers/chunks/de0c94defb90e1805081.js +0 -1
  404. package/assets/esri/core/workers/chunks/e1340232962cf576d37e.js +0 -1
  405. package/assets/esri/core/workers/chunks/e38d1ba15babc238b151.js +0 -1
  406. package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +0 -1
  407. package/assets/esri/core/workers/chunks/f23351a04643c464be84.js +0 -1
  408. package/assets/esri/core/workers/chunks/f3d331da3c61af5c5a2f.js +0 -1
  409. package/assets/esri/core/workers/chunks/f5125925f83c979edde7.js +0 -2
  410. package/assets/esri/core/workers/chunks/f912c173c58ae4299cbe.js +0 -1
  411. package/assets/esri/core/workers/chunks/f93facf47aba9b128fcc.js +0 -1
  412. package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +0 -1
  413. package/views/2d/engine/ManagedCanvas.js +0 -2
  414. package/views/2d/layers/features/support/FeatureSetReaderAnnotationJSON.js +0 -2
  415. package/views/2d/layers/features/support/FeatureSetReaderDimensionJSON.js +0 -2
  416. package/views/2d/layers/support/annodime/annotationUtils.js +0 -2
  417. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +0 -2
  418. /package/assets/esri/core/workers/chunks/{f5125925f83c979edde7.js.LICENSE.txt → f10a339b16d84b650012.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{isSome as s}from"../../core/arrayUtils.js";import{createTask as i}from"../../core/asyncUtils.js";import r from"../../core/Collection.js";import{stripHTMLSanitizer as a}from"../../core/sanitizerUtils.js";import{property as o,subclass as l}from"../../core/accessorSupport/decorators.js";import{featureHasFields as n,extractSubstitutionTemplatesFromString as c}from"./fieldUtils.js";import{loadArcade as d}from"../../support/loadArcade.js";const p="relationships/",u="expression/",f=/<br\s*\/*>/gi;let h=class extends t{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){if(this.expressionsUsedInTitle.length>0){return this._get("_arcadeTask")||i(()=>d())}return null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??import("../../popup/support/featureUtils.js").then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new r;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const s=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(s.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:s,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(s,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const s of this.calculatedExpressions?.toArray()??[])try{const t=this._arcadeTask.value.arcade.extractFieldLiterals(s.syntax);for(const s of t){const t=s.split("."),i=this.fieldsIndex.get(t.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const s of t){const t=this.fieldsIndex.get(s);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,s){const i=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],s)).get(i)??""}async getTitles(e,t,s){const i=new Map,r=s?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);s?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:l,workingTitle:n}=this,c=n&&l;t.forEach(t=>{const d=t.getObjectId()??t.attributes[e.objectIdField];let p=c?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:l,globalAttributes:this._createFormattedAttributes(e,t,r).global,layer:e,text:n}):"";s?.removeHTML&&(p=a.sanitize(p).replaceAll(f," ")),i.set(d,p)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const i=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s);if(i.length!==t.length)return t;if(t.some(e=>!n(e,this.requiredFields))){const s=e.createQuery();s.where="1=1",s.outFields=[...this.requiredFields],s.objectIds=i;const r=await e.queryFeatures(s);if(r?.features.length===t.length)return r.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const s of e){if(!s.fieldName)continue;const e=this.fieldsIndex.get(s.fieldName),i=e?.name??s.fieldName;s.fieldName=i,t.set(i.toLowerCase(),s)}return t}_createFormattedAttributes(e,t,s="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const s=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:s}})}catch{}}const a={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:a,graphic:t,timeZone:s,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return c(e).filter(e=>!(e.startsWith(p)||e.startsWith(u)))}};e([o({readOnly:!0})],h.prototype,"_arcadeTask",null),e([o()],h.prototype,"_featureUtils",void 0),e([o({readOnly:!0})],h.prototype,"featureUtilsPromise",null),e([o({readOnly:!0})],h.prototype,"calculatedExpressions",null),e([o()],h.prototype,"displayField",void 0),e([o()],h.prototype,"effectivePopupTemplate",void 0),e([o()],h.prototype,"expressionsUsedInTitle",null),e([o()],h.prototype,"fieldsIndex",void 0),e([o()],h.prototype,"fieldInfoMap",null),e([o()],h.prototype,"fields",void 0),e([o()],h.prototype,"objectIdField",void 0),e([o()],h.prototype,"requiredFields",null),h=e([l("esri.layers.support.TitleCreator")],h);export{h as default};
2
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{isSome as s}from"../../core/arrayUtils.js";import{createTask as i}from"../../core/asyncUtils.js";import r from"../../core/Collection.js";import{stripHTMLSanitizer as a}from"../../core/sanitizerUtils.js";import{property as o,subclass as l}from"../../core/accessorSupport/decorators.js";import{featureHasFields as n,extractSubstitutionTemplatesFromString as c}from"./fieldUtils.js";import{loadArcade as d}from"../../support/loadArcade.js";const p="relationships/",u="expression/",f=/<br\s*\/*>/gi;let h=class extends t{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){if(this.expressionsUsedInTitle.length>0){return this._get("_arcadeTask")||i(()=>d())}return null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??import("../../popup/support/featureUtils.js").then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new r;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const s=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(s.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:s,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(s,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const s of this.calculatedExpressions?.toArray()??[])try{const t=this._arcadeTask.value.arcade.extractFieldLiterals(s.syntax);for(const s of t){const t=s.split("."),i=this.fieldsIndex.get(t.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const s of t){const t=this.fieldsIndex.get(s);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,s){const i=t.getObjectId()??t.attributes?.[e.objectIdField];return(await this.getTitles(e,[t],s)).get(i)??""}async getTitles(e,t,s){const i=new Map,r=s?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);s?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:l,workingTitle:n}=this,c=n&&l;t.forEach(t=>{const d=t.getObjectId()??t.attributes[e.objectIdField];let p=c?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:l,globalAttributes:this._createFormattedAttributes(e,t,r).global,layer:e,text:n}):"";s?.removeHTML&&(p=a.sanitize(p).replaceAll(f," ")),i.set(d,p)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const i=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(s);if(i.length!==t.length)return t;if(t.some(e=>!n(e,this.requiredFields))){const s=e.createQuery();s.where="1=1",s.outFields=[...this.requiredFields],s.objectIds=i;const r=await e.queryFeatures(s);if(r?.features.length===t.length)return r.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const s of e){if(!s.fieldName)continue;const e=this.fieldsIndex.get(s.fieldName),i=e?.name??s.fieldName;s.fieldName=i,t.set(i.toLowerCase(),s)}return t}_createFormattedAttributes(e,t,s="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const s=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:s}})}catch{}}const a={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:a,graphic:t,timeZone:s,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return c(e).filter(e=>!(e.startsWith(p)||e.startsWith(u)))}};e([o({readOnly:!0})],h.prototype,"_arcadeTask",null),e([o()],h.prototype,"_featureUtils",void 0),e([o({readOnly:!0})],h.prototype,"featureUtilsPromise",null),e([o({readOnly:!0})],h.prototype,"calculatedExpressions",null),e([o()],h.prototype,"displayField",void 0),e([o()],h.prototype,"effectivePopupTemplate",void 0),e([o()],h.prototype,"expressionsUsedInTitle",null),e([o()],h.prototype,"fieldsIndex",void 0),e([o()],h.prototype,"fieldInfoMap",null),e([o()],h.prototype,"fields",void 0),e([o()],h.prototype,"objectIdField",void 0),e([o()],h.prototype,"requiredFields",null),h=e([l("esri.layers.support.TitleCreator")],h);export{h as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{id as e}from"../../kernel.js";import{isPopupTemplate as t}from"../../popupTemplateUtils.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as a}from"../../core/uuid.js";import{createTypeReader as u}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as l}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import p from"./CodedValueDomain.js";import{queryAllJSON as d}from"./featureQueryAll.js";import{isStringField as f,isIntegerField as y}from"./fieldUtils.js";import{isLabelClass as m}from"./labelUtils.js";import{isLayerWithFeatureCapabilities as b,getOwningPortalUrl as h}from"./layerUtils.js";import w from"../../renderers/SimpleRenderer.js";import g from"../../renderers/UniqueValueRenderer.js";import{isSizeVariable as I}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import j from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as x}from"../../rest/support/NormalizationBinParametersMixin.js";import v from"../../rest/support/Query.js";import F from"../../rest/support/RelationshipQuery.js";import{loadArcade as S}from"../../support/loadArcade.js";import{symbolTypesRenderer as P}from"../../symbols/support/typeUtils.js";const L=()=>i.getLogger("esri.layers.support.featureLayerUtils"),q=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,o,i){const s=await Y(e);if(await E(e,t,o),!s.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return s.addAttachment(t,r,i)}function E(e,t,r){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&null!=o[i]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function M(e,t,r,o,i,s){const a=await Y(e);if(await E(e,t,i),!a.updateAttachment)throw new n(i,"Layer source does not support updateAttachment capability");return a.updateAttachment(t,r,o,s)}async function O(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:u}=o;return"feature"===a&&l(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=u&&(i={...i,globalIdToObjectId:await pe(o,t.deleteFeatures,u)}),n(o,o.source,t,i)}async function C(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function D(e,t,r,o,i){const s=await Y(e);if(await E(e,t,o),!s.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r,i)}async function T(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function z(e,t,r,o){let i=j.from(t);const s=await e.load(),a=s.source,u=s.capabilities;if(!u?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:l,objectIds:c,globalIds:p,num:d,size:f,start:y,where:m}=i;if(!u?.operations?.supportsQueryAttachments){if(l?.length>0||p?.length>0||f?.length>0||d||y||m)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||p?.length||m))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!a.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",i);return!u?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),a.queryAttachments(i)}async function U(e,t,r,o){const i=await Y(e);if(!i.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(v.from(t)??e.createQuery(),r)}async function k(e,t,r,o){const i=await Y(e);if(!i.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(v.from(t)??e.createQuery(),r)}async function B(e,t,r,o){const i=await Y(e);if(!i.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return i.queryExtent(v.from(t)??e.createQuery(),r)}async function V(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(F.from(t),r)}async function R(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(F.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function G(e){const t=new v;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function Q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function $(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function J(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=W(e,t);if(r)return r}const s=i&&H(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=de(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=_(e,t);if(r)return r}return null}function H(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function W(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:X(e.code,i),name:e.name}));if(t?.length)return new p({codedValues:t})}return null}function _(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&K(e.types)){const t=e.types?.map(e=>new c({code:X(e.id,o),name:e.name}));return new p({codedValues:t})}return null}function K(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function X(e,t){return t?f({type:t})&&"number"==typeof e?`${e}`:y({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function Y(e){return(await e.load()).source}async function ee(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await h(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function te(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await h(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function re(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await te(n,r)}async function ne(e){const t=e.parsedUrl?.path;t&&oe(e)&&await te(t)}function oe(e){return ie(e)&&("serviceDefinitionExpression"in e&&se(e.serviceDefinitionExpression)||"definitionExpression"in e&&se(e.definitionExpression))}function ie(e){return!(!b(e)||!e.capabilities?.query.supportsCurrentUser)}function se(e){return!!e?.toLowerCase().includes("current_user")}function ae(e){return!fe(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const ue=u({types:P});function le(e,t){if(e.defaultSymbol)return e.types?.length?new g({defaultSymbol:ue(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:ue(e.symbol,e,t)}))}):new w({symbol:ue(e.defaultSymbol,e,t)})}function ce(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function pe(e,t,n){if(null==t)return null;const o=[],{objectIdField:i}=e;if(t.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const s=e.createQuery();s.where=o.map(e=>`${n}='${e}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,n],s.cacheHint=!1;const u=await r(d(e,s));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const e=r.attributes[n],t=r.attributes[i];null!=e&&null!=t&&-1!==t&&l.set(a(e),t)}return l}function de(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&L().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function fe(e){return e.sourceJSON?.isMultiServicesView||ye(e)}function ye(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function me(e,t,r){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new n(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new n(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new n(r,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new n(r,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new n(r,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}function be(e,t){return null!=e&&!!t?.[x.toJSON(e)]}function he(e){return m(e)?Boolean(e.labelExpressionInfo?.expression):t(e)?!!e.expressionInfos?.some(e=>e.expression)||!!Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type&&e.expressionInfo?.expression):!("dot-density"!==e.type||!e.attributes?.some(e=>e.valueExpression))||(!(!("valueExpression"in e)||!e.valueExpression)||"visualVariables"in e&&null!=e.visualVariables&&e.visualVariables.some(e=>!!e.valueExpression||"size"===e.type&&(I(e.minSize)&&e.minSize.valueExpression||I(e.maxSize)&&e.maxSize.valueExpression)))}function we(e){if("renderer"in e&&e.renderer&&he(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const t of e.labelingInfo)if(m(t)&&he(t))return!0;return!1}async function ge(e){let t="returnZ"in e?e.returnZ:void 0,r="returnM"in e?e.returnM:void 0;if(null!=t&&null!=r)return{returnZ:t,returnM:r};if(we(e)){const{arcadeUtils:n}=await S();n.layerHasGeometryFunctions(e)&&(t??=!0,r??=!0)}if("renderer"in e&&e.renderer?.symbols)for(const n of e.renderer.symbols)"cim"===n.type&&(Ie??=(await import("../../symbols/cim/CIMSymbolHelper.js")).forEachSymbolLayer,Ie(n.data.symbol,e=>{switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":if("CIMMarkerPlacementAtMeasuredUnits"===e.markerPlacement?.type)r??=!0}}));return{returnZ:t,returnM:r}}let Ie;export{A as addAttachment,O as applyEdits,ne as checkServiceCurrentUserSupport,W as computeDomainFromSubtypes,_ as computeDomainFromTypes,ae as computeEffectiveEditingEnabled,le as createDefaultRenderer,G as createQuery,D as deleteAttachments,te as ensureCredentialIfSignedIn,re as ensureLayerCredential,T as fetchRecomputedExtents,q as geometryTypeKebabDict,H as getFeatureSubtype,de as getFeatureType,J as getFieldDomain,pe as getGlobalIdToObjectIdMap,ee as getSignedInUser,se as hasCurrentUser,N as hasDataChanged,ce as isLayerCacheStale,ge as layerRequiresGeometryZM,z as queryAttachments,B as queryExtent,k as queryFeatureCount,U as queryObjectIds,V as queryRelatedFeatures,R as queryRelatedFeaturesCount,Q as readGlobalIdField,Z as readObjectIdField,$ as readVersion,fe as supportsQueryOnly,K as typesHaveUniqueIdsAndNames,M as updateAttachment,C as uploadAssets,me as validateBinsQuery};
2
+ import{id as e}from"../../kernel.js";import{isPopupTemplate as t}from"../../popupTemplateUtils.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as a}from"../../core/uuid.js";import{createTypeReader as u}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as l}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import p from"./CodedValueDomain.js";import{queryAllJSON as d}from"./featureQueryAll.js";import{isStringField as f,isIntegerField as y}from"./fieldUtils.js";import{isLabelClass as m}from"./labelUtils.js";import{isLayerWithFeatureCapabilities as b,getOwningPortalUrl as h}from"./layerUtils.js";import w from"../../renderers/SimpleRenderer.js";import g from"../../renderers/UniqueValueRenderer.js";import{isSizeVariable as I}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import j from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as x}from"../../rest/support/NormalizationBinParametersMixin.js";import v from"../../rest/support/Query.js";import F from"../../rest/support/RelationshipQuery.js";import{loadArcade as S}from"../../support/loadArcade.js";import{symbolTypesRenderer as P}from"../../symbols/support/typeUtils.js";const L=()=>i.getLogger("esri.layers.support.featureLayerUtils"),q=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,o,i){const s=await Y(e);if(await E(e,t,o),!s.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return s.addAttachment(t,r,i)}function E(e,t,r){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&null!=o[i]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function O(e,t,r,o,i,s){const a=await Y(e);if(await E(e,t,i),!a.updateAttachment)throw new n(i,"Layer source does not support updateAttachment capability");return a.updateAttachment(t,r,o,s)}async function M(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:u}=o;return"feature"===a&&l(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=u&&(i={...i,globalIdToObjectId:await pe(o,t.deleteFeatures,u)}),n(o,o.source,t,i)}async function C(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function D(e,t,r,o,i){const s=await Y(e);if(await E(e,t,o),!s.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r,i)}async function T(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function z(e,t,r,o){let i=j.from(t);const s=await e.load(),a=s.source,u=s.capabilities;if(!u?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:l,objectIds:c,globalIds:p,num:d,size:f,start:y,where:m}=i;if(!u?.operations?.supportsQueryAttachments){if(l?.length>0||p?.length>0||f?.length>0||d||y||m)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||p?.length||m))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!a.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",i);return!u?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),a.queryAttachments(i)}async function U(e,t,r,o){const i=await Y(e);if(!i.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(v.from(t)??e.createQuery(),r)}async function k(e,t,r,o){const i=await Y(e);if(!i.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(v.from(t)??e.createQuery(),r)}async function B(e,t,r,o){const i=await Y(e);if(!i.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return i.queryExtent(v.from(t)??e.createQuery(),r)}async function V(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(F.from(t),r)}async function R(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(F.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function G(e){const t=new v;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function Q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function $(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function J(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=W(e,t);if(r)return r}const s=i&&H(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=de(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=_(e,t);if(r)return r}return null}function H(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function W(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:X(e.code,i),name:e.name}));if(t?.length)return new p({codedValues:t})}return null}function _(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&K(e.types)){const t=e.types?.map(e=>new c({code:X(e.id,o),name:e.name}));return new p({codedValues:t})}return null}function K(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function X(e,t){return t?f({type:t})&&"number"==typeof e?`${e}`:y({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function Y(e){return(await e.load()).source}async function ee(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await h(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function te(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await h(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function re(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await te(n,r)}async function ne(e){const t=e.parsedUrl?.path;t&&oe(e)&&await te(t)}function oe(e){return ie(e)&&("serviceDefinitionExpression"in e&&se(e.serviceDefinitionExpression)||"definitionExpression"in e&&se(e.definitionExpression))}function ie(e){return!(!b(e)||!e.capabilities?.query.supportsCurrentUser)}function se(e){return!!e?.toLowerCase().includes("current_user")}function ae(e){return!fe(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const ue=u({types:P});function le(e,t){if(e.defaultSymbol)return e.types?.length?new g({defaultSymbol:ue(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:ue(e.symbol,e,t)}))}):new w({symbol:ue(e.defaultSymbol,e,t)})}function ce(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function pe(e,t,n){if(null==t)return null;const o=[],{objectIdField:i}=e;if(t.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const s=e.createQuery();s.where=o.map(e=>`${n}='${e}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,n],s.cacheHint=!1;const u=await r(d(e,s));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const e=r.attributes[n],t=r.attributes[i];null!=e&&null!=t&&-1!==t&&l.set(a(e),t)}return l}function de(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&L().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function fe(e){const t=e.sourceJSON;return t?.isMultiServicesView||t?.isReadOnly||ye(e)}function ye(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function me(e,t,r){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new n(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new n(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new n(r,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new n(r,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new n(r,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}function be(e,t){return null!=e&&!!t?.[x.toJSON(e)]}function he(e){return m(e)?Boolean(e.labelExpressionInfo?.expression):t(e)?!!e.expressionInfos?.some(e=>e.expression)||!!Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type&&e.expressionInfo?.expression):!("dot-density"!==e.type||!e.attributes?.some(e=>e.valueExpression))||(!(!("valueExpression"in e)||!e.valueExpression)||"visualVariables"in e&&null!=e.visualVariables&&e.visualVariables.some(e=>!!e.valueExpression||"size"===e.type&&(I(e.minSize)&&e.minSize.valueExpression||I(e.maxSize)&&e.maxSize.valueExpression)))}function we(e){if("renderer"in e&&e.renderer&&he(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const t of e.labelingInfo)if(m(t)&&he(t))return!0;return!1}async function ge(e){let t="returnZ"in e?e.returnZ:void 0,r="returnM"in e?e.returnM:void 0;if(null!=t&&null!=r)return{returnZ:t,returnM:r};if(we(e)){const{arcadeUtils:n}=await S();n.layerHasGeometryFunctions(e)&&(t??=!0,r??=!0)}if("renderer"in e&&e.renderer?.symbols)for(const n of e.renderer.symbols)"cim"===n.type&&(Ie??=(await import("../../symbols/cim/CIMSymbolHelper.js")).forEachSymbolLayer,Ie(n.data.symbol,e=>{switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":if("CIMMarkerPlacementAtMeasuredUnits"===e.markerPlacement?.type)r??=!0}}));return{returnZ:t,returnM:r}}let Ie;export{A as addAttachment,M as applyEdits,ne as checkServiceCurrentUserSupport,W as computeDomainFromSubtypes,_ as computeDomainFromTypes,ae as computeEffectiveEditingEnabled,le as createDefaultRenderer,G as createQuery,D as deleteAttachments,te as ensureCredentialIfSignedIn,re as ensureLayerCredential,T as fetchRecomputedExtents,q as geometryTypeKebabDict,H as getFeatureSubtype,de as getFeatureType,J as getFieldDomain,pe as getGlobalIdToObjectIdMap,ee as getSignedInUser,se as hasCurrentUser,N as hasDataChanged,ce as isLayerCacheStale,ge as layerRequiresGeometryZM,z as queryAttachments,B as queryExtent,k as queryFeatureCount,U as queryObjectIds,V as queryRelatedFeatures,R as queryRelatedFeaturesCount,Q as readGlobalIdField,Z as readObjectIdField,$ as readVersion,fe as supportsQueryOnly,K as typesHaveUniqueIdsAndNames,O as updateAttachment,C as uploadAssets,me as validateBinsQuery};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as r}from"../../core/jsonMap.js";import i from"../../geometry/SpatialReference.js";import{createFileProvider as o}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as a}from"./fieldUtils.js";import{fromParquetGeometryEncodingJSON as l}from"./parquetEncodingUtils.js";import s from"./ParquetFilesData.js";const p=new r({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function m(e){return p.toJSON(e)}function d(e){return p.fromJSON(e)}async function u(t,r={}){const i=Array.isArray(t)?new s({urls:new e(t)}):t,n=await y(i,r),a=o(n,null,()=>r.customParameters);return f(await a.getMetadata(),{data:i})}async function f(e,r){if(r.geometryType&&r.spatialReference&&r.geometryEncoding&&r.fields)return r;if(!e)throw new t("parquet:bad-input","No metadata found");const o={...r};if(null==o.fields&&(o.fields=e.fields.map(e=>n.fromJSON(e))),null!=o.geometryEncoding){const e=o.geometryEncoding;switch(e.type){case"wkb":{const r=o.fields.find(t=>t.name===e.field);if(!r)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==r.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${r.type} but expected 'blob'`);break}case"location":for(const r of[e.xField,e.yField])if(null!=r){const e=o.fields.find(e=>e.name===r);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${r} which does not exist`);if(!a(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==o.geometryEncoding&&(o.geometryEncoding=e.geometryEncoding?l(e.geometryEncoding):null),o.fields=c(o.fields,e),!o.displayOptimization&&e.displayOptimization&&(o.displayOptimization=e.displayOptimization),!o.geometryType&&e.geometryType&&(o.geometryType=d(e.geometryType)),!o.spatialReference&&e.spatialReference&&(o.spatialReference=i.fromJSON(e.spatialReference)),o}function c(e,t){const r=t.geoMetadata;if(null==r)return e;const i=new Set(Object.keys(r.columns));return e.filter(e=>!i.has(e.name))}async function y(e,r){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const i=await e.portalItem.load(r);switch(i.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:i.itemUrl,itemCdnUrl:i.itemCdnUrl,modified:i.modified,size:i.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!i.url)throw new t("parquet:bad-item",`Item of type ${i.type} must have a url defined`,i);return{type:"portal-parquet-layer",itemUrl:i.itemUrl,itemCdnUrl:i.itemCdnUrl,itemMetadata:{modified:i.modified,url:i.url}};default:throw new t("parquet:bad-item",`Item of type ${i.type} is not supported`,i)}}}}export{f as completeParquetLayerInfo,y as createFileProviderSchema,d as fromParquetJSONGeometryType,u as getParquetLayerInfo,p as parquetGeometryTypeKebabDict,m as toParquetJSONGeometryType};
2
+ import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as r}from"../../core/jsonMap.js";import i from"../../geometry/SpatialReference.js";import{createFileProvider as o}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as a}from"./fieldUtils.js";import{fromParquetGeometryEncodingJSON as s}from"./parquetEncodingUtils.js";import l from"./ParquetFilesData.js";const p=new r({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function m(e){return p.toJSON(e)}function d(e){return p.fromJSON(e)}async function f(t,r={}){const i=Array.isArray(t)?new l({urls:new e(t)}):t,n=await y(i,r),a=o(n,null,()=>r.customParameters);return u(await a.getMetadata(),{data:i})}async function u(e,r){if(r.geometryType&&r.spatialReference&&r.geometryEncoding&&r.fields&&r.displayOptimization)return r;if(!e)throw new t("parquet:bad-input","No metadata found");const o={...r};if(null==o.fields)o.fields=e.fields.map(e=>n.fromJSON(e));else{const t=new Set(o.fields.map(e=>e.name)),r=e.fields.map(e=>n.fromJSON(e));for(const e of r)t.has(e.name)||o.fields.push(e)}if(null!=o.geometryEncoding){const e=o.geometryEncoding;switch(e.type){case"wkb":{const r=o.fields.find(t=>t.name===e.field);if(!r)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==r.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${r.type} but expected 'blob'`);break}case"location":for(const r of[e.xField,e.yField])if(null!=r){const e=o.fields.find(e=>e.name===r);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${r} which does not exist`);if(!a(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==o.geometryEncoding&&(o.geometryEncoding=e.geometryEncoding?s(e.geometryEncoding):null),o.fields=c(o.fields,e),!o.displayOptimization&&e.displayOptimization&&(o.displayOptimization=e.displayOptimization),!o.geometryType&&e.geometryType&&(o.geometryType=d(e.geometryType)),!o.spatialReference&&e.spatialReference&&(o.spatialReference=i.fromJSON(e.spatialReference)),o}function c(e,t){const r=t.geoMetadata;if(null==r)return e;const i=new Set(Object.keys(r.columns));return e.filter(e=>!i.has(e.name))}async function y(e,r){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const i=await e.portalItem.load(r);switch(i.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:i.itemUrl,itemCdnUrl:i.itemCdnUrl,modified:i.modified,size:i.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!i.url)throw new t("parquet:bad-item",`Item of type ${i.type} must have a url defined`,i);return{type:"portal-parquet-layer",itemUrl:i.itemUrl,itemCdnUrl:i.itemCdnUrl,itemMetadata:{modified:i.modified,url:i.url}};default:throw new t("parquet:bad-item",`Item of type ${i.type} is not supported`,i)}}}}export{u as completeParquetLayerInfo,y as createFileProviderSchema,d as fromParquetJSONGeometryType,f as getParquetLayerInfo,p as parquetGeometryTypeKebabDict,m as toParquetJSONGeometryType};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ function e(e){return null!=e&&"object"==typeof e&&"2d"===e.type&&"linkchart"===e.view2dType}export{e as isLinkChartView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../request.js";function t(e){return null!=e&&"object"==typeof e&&"2d"===e.type&&"linkchart"===e.view2dType}async function r(t,r,n){if(!t||!r||!t.includes("/resources"))return!1;const s=r+"/resources",o=t.includes("/resources/")?t.split("/resources/")[1]:t;if(!o)return!1;const c=100;let u=1;for(;-1!==u;){const t=(await e(s,{query:{f:"json",start:u,num:c}})).data,r=t?.resources??[];for(const e of r)if(e.resource===o)return"number"==typeof n&&e.created===n;if(null==t.nextStart||!r.length)break;u=t.nextStart}return!1}async function n(t,r){if(!t.length||!r)return new Map;const n=r+"/resources",s=100;let o=1;const c=new Map;for(;-1!==o;){const t=(await e(n,{query:{f:"json",start:o,num:s}})).data,r=t?.resources??[];for(const e of r)"number"==typeof e.created&&c.set(e.resource,e.created);if(null==t.nextStart||!r.length)break;o=t.nextStart}const u=new Map;for(const e of t){const t=e.includes("/resources/")?e.split("/resources/")[1]:e,r=c.get(t);null!=r&&u.set(e,r)}return u}export{r as areResourcesSafe,n as getCreationDatesForResources,t as isLinkChartView};
2
+ import e from"../request.js";import t from"../core/Error.js";import a from"../core/Logger.js";import{throwIfAborted as i,createAbortError as n}from"../core/promiseUtils.js";import r from"../geometry/Point.js";import{IdealEdgeLengthTypeOptions as o}from"../layers/knowledgeGraph/IdealEdgeLengthTypeOptions.js";import{load as l,LCChronologicalLayout as s,LCForceDirectedLayout as u,LCCommunityLayout as g,LCHierarchicalLayout as d,LCRadialTreeLayout as c,LCSmartTreeLayout as m,LCSimpleLayout as p}from"../libs/linkchartlayout/LinkChartLayout.js";async function y(t,a,i){if(!t||!a||!t.includes("/resources"))return!1;const n=a+"/resources",r=t.includes("/resources/")?t.split("/resources/")[1]:t;if(!r)return!1;const o=100;let l=1;for(;-1!==l;){const t=(await e(n,{query:{f:"json",start:l,num:o}})).data,a=t?.resources??[];for(const e of a)if(e.resource===r)return"number"==typeof i&&e.created===i;if(null==t.nextStart||!a.length)break;l=t.nextStart}return!1}async function h(t,a){if(!t.length||!a)return new Map;const i=a+"/resources",n=100;let r=1;const o=new Map;for(;-1!==r;){const t=(await e(i,{query:{f:"json",start:r,num:n}})).data,a=t?.resources??[];for(const e of a)"number"==typeof e.created&&o.set(e.resource,e.created);if(null==t.nextStart||!a.length)break;r=t.nextStart}const l=new Map;for(const e of t){const t=e.includes("/resources/")?e.split("/resources/")[1]:e,a=o.get(t);null!=a&&l.set(e,a)}return l}const f=1e-7,L=()=>a.getLogger("esri.linkChart.utils");function w(e){return"chronological-mono-timeline"===e||"chronological-multi-timeline"===e}function b(e,t){if("organic-standard"!==e&&"organic-community"!==e&&"geographic-organic-standard"!==e)return{};const a=t?.organicLayoutSettings;if(!a)return{};let i,n,r,l,s,u=a.autoRepulsionRadius;null!=a.computationBudgetTime&&a.computationBudgetTime>=1?i=a.computationBudgetTime:a.computationBudgetTime&&L().warn("Invalid layout computationBudgetTime setting, will revert to default setting"),!u&&null!=a.repulsionRadiusMultiplier&&a.repulsionRadiusMultiplier>=1?n=a.repulsionRadiusMultiplier:u||(u=!0,L().warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&(a.idealEdgeLengthType===o.ABSOLUTE||a.idealEdgeLengthType===o.MULTIPLIER?r=a.idealEdgeLengthType:void 0!==a.idealEdgeLengthType&&L().warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),r===o.ABSOLUTE?null!=a.absoluteIdealEdgeLength&&a.absoluteIdealEdgeLength>=0?l=a.absoluteIdealEdgeLength:void 0!==a.absoluteIdealEdgeLength&&L().warn("Invalid layout idealEdgeLength setting, will revert to default setting"):r===o.MULTIPLIER&&(null!=a.multiplicativeIdealEdgeLength&&a.multiplicativeIdealEdgeLength>=0?s=a.multiplicativeIdealEdgeLength:void 0!==a.multiplicativeIdealEdgeLength&&L().warn("Invalid layout idealEdgeLength setting, will revert to default setting")));let g=r===o.ABSOLUTE?l:s;return r===o.ABSOLUTE&&(void 0===g?g=-1:g*=-1),{computationBudgetTime:i,repulsionRadiusMultiplier:null==n||u?void 0:n,idealEdgeLengthMultiplier:g}}const T=async(e="organic-standard",a,o,y)=>{i(y?.signal);const h=new Map,T={xmin:-f,ymin:-f,xmax:f,ymax:f},x=new Set(y?.layoutSettings?.rootedLayoutSettings?.rootEntities?.map(({id:e})=>e)),E=new Map,M=new Uint8Array(a.length),I=new Float64Array(a.length),v=new Float64Array(a.length),S=new Float64Array(a.length),k=new Float64Array(a.length),A=new Uint32Array(o.length),B=new Uint32Array(o.length),R=new Float64Array(o.length),N=new Float64Array(o.length);let U=!1,j=0,F=!1;for(let i=0;i<a.length;i++){const n=a[i];if(E.has(n.id))throw new t("knowledge-graph:duplicate-node-id",`Duplicate node id '${n.id}' detected. Node ids must be unique across all type names.`);E.set(n.id,i);const r=!!n.geographicLocation;!w(e)&&n.lockedLocation?(M[i]="geographic-organic-standard"===e&&r?2:0,I[i]=n.lockedLocation.x,v[i]=n.lockedLocation.y):"geographic-organic-standard"===e&&r?(M[i]=2,I[i]=n.geographicLocation.x,v[i]=n.geographicLocation.y):(M[i]=1,I[i]=0,v[i]=0,w(e)&&n.lockedLocation&&(U=!0)),w(e)&&(S[i]=n.startTime?n.startTime.getTime():NaN,k[i]=n.endTime?n.endTime.getTime():NaN),x.has(n.id)&&(M[i]|=4)}U&&L().warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");for(const t of o){const a=E.get(t.originId),i=E.get(t.destinationId);null!=a&&null!=i?(A[j]=a,B[j]=i,w(e)&&(R[j]=t.startTime?t.startTime.getTime():NaN,N[j]=t.endTime?t.endTime.getTime():NaN),j++):L().warn(`Link '${t.id}' was ignored because it references missing origin or destination node(s).`)}await l();const q=b(e,y?.layoutSettings);let O=1;if(({status:O}="chronological-mono-timeline"===e||"chronological-multi-timeline"===e?s.apply(()=>y?.signal?.aborted??!1,M,I,v,S,k,A.subarray(0,j),B.subarray(0,j),R.subarray(0,j),N.subarray(0,j),"chronological-multi-timeline"===e,y?.layoutSettings?.chronologicalLayoutSettings):"organic-standard"===e||"geographic-organic-standard"===e?u.apply(()=>y?.signal?.aborted??!1,M,I,v,A.subarray(0,j),B.subarray(0,j),q.computationBudgetTime,q.idealEdgeLengthMultiplier,q.repulsionRadiusMultiplier):"organic-community"===e?g.apply(()=>y?.signal?.aborted??!1,M,I,v,A.subarray(0,j),B.subarray(0,j),q.computationBudgetTime,q.idealEdgeLengthMultiplier,q.repulsionRadiusMultiplier):"hierarchical-bottom-to-top"===e?d.apply(()=>y?.signal?.aborted??!1,M,I,v,A.subarray(0,j),B.subarray(0,j)):"radial-root-centric"===e?c.apply(()=>y?.signal?.aborted??!1,M,I,v,A.subarray(0,j),B.subarray(0,j)):"tree-left-to-right"===e?m.apply(()=>y?.signal?.aborted??!1,M,I,v,A.subarray(0,j),B.subarray(0,j)):p.apply(()=>y?.signal?.aborted??!1,M,I,v,A.subarray(0,j),B.subarray(0,j))),i(y?.signal),1===O)throw new t("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(2===O)throw n();for(let t=0;t<a.length;t++){const e=a[t],i=new r({x:I[t],y:v[t]});let n=h.get(e.typeName);n||(n=new Map,h.set(e.typeName,n)),n.set(e.id,i),F?(T.xmin=Math.min(T.xmin,i.x),T.xmax=Math.max(T.xmax,i.x),T.ymin=Math.min(T.ymin,i.y),T.ymax=Math.max(T.ymax,i.y)):(T.xmin=i.x-f,T.xmax=i.x+f,T.ymin=i.y-f,T.ymax=i.y+f,F=!0)}return{extent:T,locations:h}};export{y as areResourcesSafe,T as calculateGraphLayout,h as getCreationDatesForResources};
@@ -24,33 +24,77 @@ export interface CircuitManagerProperties {
24
24
  }
25
25
 
26
26
  export interface CommonCircuitQueryProperties {
27
+ /**
28
+ * Specifies whether to return the associated consumer and provider circuits with the queried circuit.
29
+ * The default is `none`.
30
+ */
27
31
  hierarchy?: CircuitHierarchy;
32
+ /**
33
+ * Specifies whether to filter the result of the query to return only circuits of a certain status.
34
+ * This filter also applies to any circuits returned using the `hierarchy` parameter.
35
+ * `status` is empty by default with no filter applied.
36
+ */
28
37
  status?: CircuitStatus;
29
38
  }
30
39
 
40
+ /** Parameters for querying circuits by name. */
31
41
  export interface QueryCircuitByNamesProperties extends CommonCircuitQueryProperties {
42
+ /** The names of the circuit or circuits to be returned. */
32
43
  names: string[];
44
+ /** The global ID of the circuit or circuits to be returned. */
33
45
  globalIds?: null;
46
+ /**
47
+ * Specifies the location information for the feature associated with a circuit's starting or stopping point.
48
+ * The results can be filtered further when used with the `locationType` parameter.
49
+ */
34
50
  locations?: null;
51
+ /**
52
+ * The type of trace location in the circuit to query (start location, stop location, or both).
53
+ * The default is `all`. This can be used to filter the results when using `locations` to return circuit information.
54
+ */
35
55
  locationType?: null;
36
56
  }
37
57
 
58
+ /** Parameters for querying circuits by global IDs. */
38
59
  export interface QueryCircuitByIdsProperties extends CommonCircuitQueryProperties {
60
+ /** The names of the circuit or circuits to be returned. */
39
61
  names?: null;
62
+ /** The global ID of the circuit or circuits to be returned. */
40
63
  globalIds: string[];
64
+ /**
65
+ * Specifies the location information for the feature associated with a circuit's starting or stopping point.
66
+ * The results can be filtered further when used with the `locationType` parameter.
67
+ */
41
68
  locations?: null;
69
+ /**
70
+ * The type of trace location in the circuit to query (start location, stop location, or both).
71
+ * The default is `all`. This can be used to filter the results when using `locations` to return circuit information.
72
+ */
42
73
  locationType?: null;
43
74
  }
44
75
 
76
+ /** Parameters for querying circuits by circuit start or stop locations. */
45
77
  export interface QueryCircuitByLocationsProperties extends CommonCircuitQueryProperties {
78
+ /** The names of the circuit or circuits to be returned. */
46
79
  names?: null;
80
+ /** The global ID of the circuit or circuits to be returned. */
47
81
  globalIds?: null;
82
+ /**
83
+ * Specifies the location information for the feature associated with a circuit's starting or stopping point.
84
+ * The results can be filtered further when used with the `locationType` parameter.
85
+ */
48
86
  locations: CircuitLocation[];
87
+ /**
88
+ * The type of trace location in the circuit to query (start location, stop location, or both).
89
+ * The default is `all`. This can be used to filter the results when using `locations` to return circuit information.
90
+ */
49
91
  locationType?: "start" | "stop" | "all" | null;
50
92
  }
51
93
 
94
+ /** Parameters for exporting circuits with [export()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#export) or [submitExportJob()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#submitExportJob). */
52
95
  export type CircuitExportProperties = Pick<ExportCircuitsParametersProperties, "circuitNames" | "exportAcknowledgement" | "resultTypes" | "outSpatialReference">;
53
96
 
97
+ /** Parameters for verifying circuits with [verify()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#verify) or [submitVerifyJob()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#submitVerifyJob). */
54
98
  export type CircuitVerifyProperties = Pick<VerifyCircuitsParametersProperties, "circuitNames" | "forceVerify" | "synthesizeGeometries" | "outSpatialReference">;
55
99
 
56
100
  /**
@@ -18,7 +18,7 @@ export interface WaitForExportOptions extends WaitOptions<CircuitExportJobInfo>
18
18
  *
19
19
  * @since 5.1
20
20
  * @see [ExportCircuitsParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/circuits/support/ExportCircuitsParameters/)
21
- * @see [CircuitManager](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/)
21
+ * @see [CircuitManager.submitExportJob()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#submitExportJob)
22
22
  */
23
23
  export default class CircuitExportJobInfo extends ExportCircuitsResult {
24
24
  constructor(properties?: CircuitExportJobInfoProperties);
@@ -18,7 +18,7 @@ export interface WaitForVerifyOptions extends WaitOptions<CircuitVerifyJobInfo>
18
18
  *
19
19
  * @since 5.1
20
20
  * @see [VerifyCircuitsParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/networks/circuits/support/VerifyCircuitsParameters/)
21
- * @see [CircuitManager](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/)
21
+ * @see [CircuitManager.submitVerifyJob()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#submitVerifyJob)
22
22
  */
23
23
  export default class CircuitVerifyJobInfo extends VerifyCircuitsResult {
24
24
  constructor(properties?: CircuitVerifyJobInfoProperties);
@@ -66,6 +66,8 @@ export interface UnitRange {
66
66
  * Results returned from the [CircuitManager.export()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#export) method.
67
67
  *
68
68
  * @since 4.34
69
+ * @see [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/)
70
+ * @see [CircuitManager.export()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#export)
69
71
  */
70
72
  export interface CircuitExportResult {
71
73
  /**
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.27",
3
+ "version": "5.2.0-next.29",
4
+ "type": "module",
4
5
  "homepage": "https://js.arcgis.com",
5
6
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
7
  "keywords": [
@@ -19,14 +20,13 @@
19
20
  "license": "SEE LICENSE IN LICENSE.md",
20
21
  "dependencies": {
21
22
  "@amcharts/amcharts5": "~5.19.1",
22
- "@arcgis/toolkit": "^5.2.0-next.22",
23
+ "@arcgis/toolkit": "^5.2.0-next.24",
23
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
25
  "@esri/calcite-components": "^5.1.1",
25
- "@vaadin/grid": "~25.1.4",
26
+ "@vaadin/grid": "~25.2.0",
26
27
  "@zip.js/zip.js": "~2.8.26",
27
28
  "luxon": "~3.7.2",
28
29
  "marked": "~18.0.5",
29
30
  "tslib": "^2.8.1"
30
- },
31
- "type": "module"
31
+ }
32
32
  }
@@ -493,8 +493,7 @@ export type DeleteAssociationEditOmitGlobalId = Omit<DeleteAssociationEditAllFie
493
493
  export interface CombineGroupedObjectsEdit {
494
494
  /**
495
495
  * The global IDs of the grouped features to combine.
496
- * The objects being combined must have consecutive unit IDs, exist in the same table and unit container,
497
- * and have the same attribute values.
496
+ * The objects being combined must have consecutive unit IDs, exist in the same table and unit container, and have the same attribute values.
498
497
  *
499
498
  * @since 5.0
500
499
  */
@@ -548,16 +547,14 @@ export interface ServiceEdits extends Edits {
548
547
  */
549
548
  deleteAssociations?: DeleteAssociationEdit[];
550
549
  /**
551
- * An array of objects specifying
552
- * grouped objects to combine in a telecom domain network. The objects being combined must have consecutive unit IDs, exist in the same table and unit container,
553
- * and have the same attribute values.
550
+ * An array of objects specifying grouped objects to combine in a telecom domain network.
551
+ * The objects being combined must have consecutive unit IDs, exist in the same table and unit container, and have the same attribute values.
554
552
  *
555
553
  * @since 5.0
556
554
  */
557
555
  combineGroupedObjects?: CombineGroupedObjectsEdit[];
558
556
  /**
559
- * An array of objects specifying
560
- * a grouped objects to divide, and the units to divide the objects into, in a telecom domain network.
557
+ * An array of objects specifying a grouped objects to divide, and the units to divide the objects into, in a telecom domain network.
561
558
  *
562
559
  * @since 5.0
563
560
  */
@@ -1,4 +1,7 @@
1
1
  import type Accessor from "../../core/Accessor.js";
2
+ import type SpatialReference from "../../geometry/SpatialReference.js";
3
+ import type InputQuantizationParameters from "./InputQuantizationParameters.js";
4
+ import type { ValidBindParameterType } from "./types.js";
2
5
 
3
6
  export interface ReplicaDefinitionProperties extends Partial<Pick<ReplicaDefinition, "creationDate" | "lastSyncDate" | "replicaFilters" | "replicaId" | "replicaName" | "replicaOwner" | "syncDirection">> {}
4
7
 
@@ -41,15 +44,68 @@ export type ReplicaDocumentOptions = {
41
44
  includeDocumentProvenance?: false;
42
45
  } | { includeConnectedDocuments: false; };
43
46
 
44
- export interface ReplicaNamedTypeDefinition {}
47
+ /**
48
+ * Entity type and relationship type definitions included in the replica definition.
49
+ *
50
+ * At least one of [entityTypeReplicaDefinitions](#entityTypeReplicaDefinitions) or [relationshipTypeReplicaDefinitions](#relationshipTypeReplicaDefinitions)
51
+ * must be provided with at least one definition.
52
+ */
53
+ export interface ReplicaNamedTypeDefinition {
54
+ /** The entity type or relationship type name. */
55
+ typeName: string;
56
+ /** An openCypher where clause to filter the specific entities or relationships included in the replica. */
57
+ openCypherWhereClause?: string;
58
+ /** Options for specifying how provenance is included in the replica. */
59
+ provenanceOptions?: ReplicaProvenanceOptions | null;
60
+ /** Bind parameters to send with the openCypher query to define the replica. */
61
+ parameters?: Record<string, ValidBindParameterType> | null;
62
+ }
45
63
 
64
+ /**
65
+ * Entity type definitions included in the replica static definition.
66
+ *
67
+ * At least one of `entityTypeReplicaDefinitions` or `relationshipTypeReplicaDefinitions`
68
+ * must be provided with at least one definition.
69
+ */
46
70
  export interface ReplicaEntityTypeDefinition extends ReplicaNamedTypeDefinition {}
47
71
 
72
+ /**
73
+ * Relationship type definitions included in the replica static definition.
74
+ *
75
+ * At least one of `entityTypeReplicaDefinitions` or `relationshipTypeReplicaDefinitions`
76
+ * must be provided with at least one definition.
77
+ */
48
78
  export interface ReplicaRelationshipTypeDefinition extends ReplicaNamedTypeDefinition {}
49
79
 
50
- export interface ReplicaStaticDefinition {}
80
+ /** The definition of a replica including the entity types and relationship types to be included. Additional filters can be applied to each type to get a subset of data. */
81
+ export interface ReplicaStaticDefinition {
82
+ /**
83
+ * Entity type definitions included in the replica static definition.
84
+ *
85
+ * At least one of `entityTypeReplicaDefinitions` or `relationshipTypeReplicaDefinitions`
86
+ * must be provided with at least one definition.
87
+ */
88
+ entityTypeReplicaDefinitions?: ReplicaEntityTypeDefinition[] | null;
89
+ /**
90
+ * Relationship type definitions included in the replica static definition.
91
+ *
92
+ * At least one of `entityTypeReplicaDefinitions` or `relationshipTypeReplicaDefinitions`
93
+ * must be provided with at least one definition.
94
+ */
95
+ relationshipTypeReplicaDefinitions?: ReplicaRelationshipTypeDefinition[] | null;
96
+ }
51
97
 
52
- export interface ReplicaFilters {}
98
+ export interface ReplicaFilters {
99
+ /**
100
+ * Custom quantization parameters for input geometry that compresses geometry for transfer to the server.
101
+ * Overrides the default lossless WGS84 quantization.
102
+ */
103
+ inputQuantizationParameters?: InputQuantizationParameters | null;
104
+ /** Custom spatial reference for input geometry. */
105
+ inputSpatialReference?: SpatialReference | null;
106
+ /** The definition of a replica including the entity types and relationship types to be included. Additional filters can be applied to each type to get a subset of data. */
107
+ staticDefinition: ReplicaStaticDefinition;
108
+ }
53
109
 
54
110
  export type ReplicaSyncDirection = "bidirectional" | "upload" | "download";
55
111
 
@@ -65,7 +121,7 @@ export interface BaseReplicaOptions {
65
121
  syncDirection: ReplicaSyncDirection;
66
122
  /** Data format to use for replica synchronization payloads. */
67
123
  syncDataFormat: ReplicaSyncDataFormat;
68
- /** The type of the replica creation options */
124
+ /** The type of the replica creation options. */
69
125
  type: "reference" | "filter";
70
126
  }
71
127
 
@@ -73,7 +129,7 @@ export interface BaseReplicaOptions {
73
129
  export interface ReferenceReplicaOptions extends BaseReplicaOptions {
74
130
  /** Reference replica used as a create baseline. */
75
131
  referenceReplica: ReplicaReference;
76
- /** The type of the replica creation options */
132
+ /** The type of the replica creation options. */
77
133
  type: "reference";
78
134
  }
79
135
 
@@ -81,6 +137,6 @@ export interface ReferenceReplicaOptions extends BaseReplicaOptions {
81
137
  export interface FilterReplicaOptions extends BaseReplicaOptions {
82
138
  /** filters to define the replica scope. */
83
139
  replicaFilters: ReplicaFilters;
84
- /** The type of the replica creation options */
140
+ /** The type of the replica creation options. */
85
141
  type: "filter";
86
142
  }
@@ -14,7 +14,7 @@ export interface CircuitVerifyResultProperties extends Partial<Pick<CircuitVerif
14
14
  *
15
15
  * @since 4.34
16
16
  * @see [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/)
17
- * @see [CircuitManager](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/)
17
+ * @see [CircuitManager.verify()](https://developers.arcgis.com/javascript/latest/references/core/networks/CircuitManager/#verify)
18
18
  */
19
19
  export default class CircuitVerifyResult extends JSONSupport {
20
20
  constructor(properties?: CircuitVerifyResultProperties);
@@ -25,7 +25,7 @@ export default class ExportCircuitsParameters extends JSONSupport {
25
25
  accessor circuitNames: string[];
26
26
  /**
27
27
  * Specifies whether the export is acknowledged.
28
- * If true, the default version is required for the utility network's `gdbVersion`.
28
+ * If true, the default version is required for the utility network's `gdbVersion`.
29
29
  *
30
30
  * @default false
31
31
  * @since 5.0
@@ -5,7 +5,8 @@ import type { SpatialReferenceProperties } from "../../../../geometry/SpatialRef
5
5
  /** @since 5.0 */
6
6
  export interface VerifyCircuitsParametersProperties extends Partial<Pick<VerifyCircuitsParameters, "circuitNames" | "forceVerify" | "synthesizeGeometries">> {
7
7
  /**
8
- * The spatial reference of the returned geometry. If not specified, the geometry is returned in the spatial reference of the feature service.
8
+ * The spatial reference of the returned geometry.
9
+ * If not specified, the geometry is returned in the spatial reference of the feature service.
9
10
  *
10
11
  * @since 5.1
11
12
  * @autocast
@@ -16,15 +17,25 @@ export interface VerifyCircuitsParametersProperties extends Partial<Pick<VerifyC
16
17
  /** @since 5.0 */
17
18
  export default class VerifyCircuitsParameters extends JSONSupport {
18
19
  constructor(properties?: VerifyCircuitsParametersProperties);
19
- /** @since 5.0 */
20
+ /**
21
+ * The names of the circuit or circuits to be verified.
22
+ *
23
+ * @since 5.0
24
+ */
20
25
  accessor circuitNames: string[];
21
26
  /**
27
+ * Enables circuits to be verified regardless of their status.
28
+ * When `false`, the verify operation returns an error ​if the circuit status is clean​.
29
+ * When `true`, the verify operation will run against clean, dirty, and invalid circuits​.
30
+ * The default is `false`.
31
+ *
22
32
  * @default false
23
33
  * @since 5.0
24
34
  */
25
35
  accessor forceVerify: boolean;
26
36
  /**
27
- * The spatial reference of the returned geometry. If not specified, the geometry is returned in the spatial reference of the feature service.
37
+ * The spatial reference of the returned geometry.
38
+ * If not specified, the geometry is returned in the spatial reference of the feature service.
28
39
  *
29
40
  * @since 5.1
30
41
  * @autocast
@@ -32,6 +43,9 @@ export default class VerifyCircuitsParameters extends JSONSupport {
32
43
  get outSpatialReference(): SpatialReference | null | undefined;
33
44
  set outSpatialReference(value: SpatialReferenceProperties | null | undefined);
34
45
  /**
46
+ * Specifies whether geometries will be inferred and created (synthesized) for the circuits.
47
+ * The default is `false`.
48
+ *
35
49
  * @default false
36
50
  * @since 5.0
37
51
  */
@@ -9,7 +9,7 @@ export interface UnitQueryResultProperties extends Partial<Pick<UnitQueryResult,
9
9
  *
10
10
  * @since 4.34
11
11
  * @see [UtilityNetwork](https://developers.arcgis.com/javascript/latest/references/core/networks/UtilityNetwork/)
12
- * @see [UnitIdentifierManager](https://developers.arcgis.com/javascript/latest/references/core/networks/UnitIdentifierManager/)
12
+ * @see [UnitIdentifierManager.query()](https://developers.arcgis.com/javascript/latest/references/core/networks/UnitIdentifierManager/#query)
13
13
  */
14
14
  export default class UnitQueryResult extends JSONSupport {
15
15
  constructor(properties?: UnitQueryResultProperties);
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{pickRandom as i}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{property as a,subclass as n}from"../../../core/accessorSupport/decorators.js";import{isHostedAgolService as o}from"../../../layers/support/arcgisLayerUrl.js";import{isTimeOnlyField as l,isNumericField as u}from"../../../layers/support/fieldUtils.js";import{generateRenderer as c}from"../../../rest/generateRenderer.js";import m from"../../../rest/support/GenerateRendererParameters.js";import h from"../../../rest/support/PivotQuery.js";import p from"../../../rest/support/StatisticDefinition.js";import d from"../../../rest/support/UniqueValueDefinition.js";import y from"../../../rest/support/UnPivotDefinition.js";import{getArcadeForPredominantCategory as f,getSQLForPredominantCategoryName as F}from"../../statistics/support/predominanceUtils.js";import{mergeWhereClauses as S,getRangeExpr as g,getSQLFilterForNormalization as w}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{isAnyDateField as _,isIntegerField as x,castIntegerFieldToFloat as q,fieldDelimiter as V}from"../utils.js";import E from"./InMemoryLayerAdapter.js";import{getQueryParamsForExpr as b,getDataRange as z,getAttributeBinsQuery as L,processQueryAttributeBinsResult as Q,binParamsFromGenRend as T}from"./support/histogramUtils.js";import{ensureFeaturesJSON as N,getSummaryStatsQuery as j,getSummaryStatisticsFromFeatureSet as B,getSummaryStatsQueryForFields as M,getSummaryStatsPivotQuery as $,getUVQuery as O,getUniqueValuesFromFeatureSet as C,defaultNumBins as A,updateQueryWithFeatureFilter as I,getHistogramFromFeatureSet as P,getFieldExpr as R,getDomainsForFields as k,getBins as U,getPredominantCategoriesFromUVInfos as D,getMissingFields as G}from"./support/utils.js";import{processSummaryStatisticsResult as W,createUVResult as J,getEqualIntervalBins as H,createClassBreaksDefinition as Z,resolveCBResult as K}from"../../../statistics/utils.js";import{getScaleToResolutionFactor as X}from"../../../views/2d/viewpointUtils.js";const Y=5,ee=2e4,te=4e5;let ie=class extends E{constructor(){super(...arguments),this.adapterName="feature-layer-adapter"}_isStatsSupportedOnService(){const e=this.layer;if(!e.capabilities?.query?.supportsStatistics||"multipatch"===this.geometryType&&!o(e.url)&&e.version<10.5)throw new r(`${this.adapterName}:not-supported`,"Layer does not support statistics query");return Promise.resolve()}_fetchFeaturesFromService(e,t){return this.layer.queryFeatures(e,{signal:t}).then(e=>e.features)}_fetchFeaturesJSONFromService(e,t){return this._fetchFeaturesFromService(e,t).then(N)}_summaryStatsFromGenRend(e){const t=e.normalizationType,i=e.normalizationField;return this.classBreaks({field:e.field,numClasses:Y,classificationMethod:"standard-deviation",standardDeviationInterval:.25,normalizationType:t,normalizationField:"field"===t?i:void 0,minValue:e.minValue,maxValue:e.maxValue,filter:e.filter,signal:e.signal}).then(t=>{let i,r,s;if(t.classBreakInfos?.some(e=>(e.hasAvg&&(i=e),!!i)),i){const e=i.maxValue-i.minValue;r=i.minValue+e/2,s=4*e}const a={min:t.minValue,max:t.maxValue,avg:r,stddev:s};return W(a,e.outStatisticTypes)})}async _summaryStatsFromServiceQuery(e,t){await this._isStatsSupportedOnService(),"percent-of-total"===e.normalizationType&&(e.normalizationTotal=await this._getNormalizationTotal(e.field,e.normalizationType,e.filter));const i=_(t)||l(t),r="capabilities"in this.layer?this.layer.capabilities:null,s=j(this,e,t,r?.query?.supportsPercentileStatistics??!1),a=await this.layer.queryFeatures(s,{signal:e.signal}),n=B(a,i);return W(n,e.outStatisticTypes)}async _summaryStatsForFieldsBasic(e){const{outStatisticTypes:t,fields:i}=e,r=50,s=[];for(let o=0;o<i.length;o+=r){const t=i.slice(o,o+r),a=M(this,e,t);s.push(this.layer.queryFeatures(a,{signal:e.signal}))}const a=(await Promise.all(s)).flatMap(e=>e.features).map(e=>e.attributes).reduce((e,t)=>Object.assign(e,t),{}),n={};for(const o in a){const e=o.match(/^(\w+)_value_/);if(null==a[o]||!e)continue;switch(e[1]){case"min":n.min=null==n.min?a[o]:Math.min(n.min,a[o]);break;case"max":n.max=null==n.max?a[o]:Math.max(n.max,a[o]);break;case"sum":n.sum=(n.sum||0)+a[o];break;case"count":n.count=(n.count||0)+a[o]}}return W(n,t)}async _summaryStatsForFieldsAdvanced(e,t){const{outStatisticTypes:i,fields:r}=e,s=i?.exclude?.includes("variance")||i?.include&&!i.include.includes("variance"),a=i?.exclude?.includes("stddev")||i?.include&&!i.include.includes("stddev");if(null==t.sum||!t.count||s&&a)return t;t.avg=t.sum/t.count;const n=50,o=[];for(let u=0;u<r.length;u+=n){const i=r.slice(u,u+n),s=M(this,e,i);s.outStatistics=[];for(const e of i){const i=`sumOfSquares_${e}`,r=`(power(${x(this.layer,e)?q(e):e} - ${t.avg}, 2))`,a=new p({statisticType:"sum",onStatisticField:r,outStatisticFieldName:i});s.outStatistics.push(a)}o.push(this.layer.queryFeatures(s,{signal:e.signal}))}const l=(await Promise.all(o)).reduce((e,t)=>e+Object.values(t.features[0].attributes).reduce((e,t)=>e+t,0),0);return t.variance=l/(t.count-1),t.stddev=Math.sqrt(t.variance),W(t,i)}async _summaryStatsForFields(e){const t=await this._summaryStatsForFieldsBasic(e);return this._summaryStatsForFieldsAdvanced(e,t)}async _summaryStatsUsingQueryPivot(e){await this._isStatsSupportedOnService();const t="capabilities"in this.layer?this.layer.capabilities:null,i=$(this,e,t?.query?.supportsPercentileStatistics??!1),r=await this.layer.queryPivot(i,{signal:e.signal}),s=B(r,!1);return W(s,e.outStatisticTypes)}_uvFromGenRenderer(e,t){const i=e.field??void 0,r=new d({attributeField:i}),s=new m({classificationDefinition:r});return this.generateRenderer(s,e.signal).then(e=>{const t={},r=this.getField(i);return e.uniqueValues.forEach(e=>{let i=e.value;null!=i&&""!==i&&("string"!=typeof i||""!==i.trim()&&"<null>"!==i.toLowerCase())||(i=null),null==t[i]?t[i]={count:e.count,data:u(r)&&i?Number(i):i}:t[i].count=t[i].count+e.count}),{count:t}}).then(i=>J(i,[t],e.returnAllCodedValues))}async _uvFromServiceQuery(e,t){return this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(O(this,e),{signal:e.signal})).then(t=>C(t,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:V,view:e.view,signal:e.signal})).then(i=>J(i,t,e.returnAllCodedValues,V))}_getNormalizationTotal(e,t,i,r){return e&&"percent-of-total"===t?this.summaryStatistics({field:e,outStatisticTypes:{include:["sum"]},filter:i,signal:r}).then(e=>e.sum):Promise.resolve(null)}_histogramForExpr(e){return this._getNormalizationTotal(e.field,e.normalizationType,e.filter,e.signal).then(t=>{const i=b(e,this,t);return z(i,this,e.minValue,e.maxValue).then(r=>{const s=r.min,a=r.max;if(null==s||null==a)return{bins:[],minValue:s,maxValue:a,normalizationTotal:t};const n=e.numBins||A,o=H(s,a,n),l=re(i.sqlExpression,o,null!=e.minValue&&null!=e.maxValue),u=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:"1"}),c=this.layer.createQuery();return c.where=S(c.where,i.sqlWhere),c.sqlFormat="standard",c.outStatistics=[u],c.groupByFieldsForStatistics=[l],c.orderByFields=[l],I(c,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(c,{signal:i.signal})).then(e=>P(e,s,a,n,t))})})}async _histogramForFields(e){const{min:t,max:i}=await z({fields:e.fields,sqlWhere:e.sqlWhere,filter:e.filter,signal:e.signal},this,e.minValue,e.maxValue);if(null==t||null==i)return{bins:[],minValue:t,maxValue:i};const r="newField",s=e.numBins||A,a=re(r,H(t,i,s),null!=e.minValue&&null!=e.maxValue),n=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:r}),o=new h,{where:l,timeExtent:u}=this.createQuery();return o.where=S(l,e.sqlWhere),o.outPivots=[new y({sourceFields:e.fields,valueFieldName:r})],o.outStatistics=[n],o.groupByFieldsForStatistics=[a],o.orderByFields=[a],o.timeExtent=u,I(o,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryPivot(o,{signal:e.signal})).then(e=>P(e,t,i,s))}async _histogramFromQueryAttributeBins(e){const{field:t,normalizationType:i,filter:r,signal:s}=e,a=await this._getNormalizationTotal(t,i,r,s),{query:n,min:o,max:l}=await L(e,this,a,this.createQuery());if(!n)return{bins:[],minValue:o,maxValue:l,normalizationTotal:a};const u=await this.layer.queryAttributeBins(n,{signal:s});return Q(u,t?this.getField(t):null,{minValue:o,maxValue:l,normalizationTotal:a})}_classBreaksFromGenRend(e){const{field:t,normalizationType:i,normalizationField:r,normalizationTotal:s,signal:a}=e,n=w({field:t,normalizationType:i,normalizationField:r}),o=R({field:t,normalizationType:i,normalizationField:r,normalizationTotal:s,layer:this}),l=g(o,e.minValue,e.maxValue),u=Z({field:t,normalizationType:i,normalizationField:r,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,breakCount:e.numClasses||Y}),c=new m({classificationDefinition:u});return c.where=S(n,l),this.generateRenderer(c,a).then(t=>K(t,e.classificationMethod))}async summaryStatistics(e){const{field:t,fields:i,normalizationType:a,valueExpression:n,sqlExpression:o,view:u,features:c,useFeaturesInView:m}=e,h=t?this.getField(t):null,p=_(h)||l(h),d=n&&!(o&&this.supportsSQLExpression),y=this._hasLocalSource||c||m,f="3d"===u?.type;if(i?.length){const t={...e,fields:i};if(!this.layer.capabilities?.operations?.supportsQueryPivot)return await this._summaryStatsForFields(t);try{return await this._summaryStatsUsingQueryPivot(t)}catch{return await this._summaryStatsForFields(t)}}if(y||d)return d||c||m||f||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._summaryStatsFromMemory(e,h):this._summaryStatsFromClientQuery(e,h);if(!this.supportsSQLExpression&&(p||o||"natural-log"===a||"square-root"===a))throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return(a&&!this.supportsSQLExpression?this._summaryStatsFromGenRend(e):this._summaryStatsFromServiceQuery(e,h)).catch(()=>(s(e.signal),this._summaryStatsFromMemory(e,h)))}async uniqueValues(e){const{valueExpression:t,sqlExpression:i,features:r,useFeaturesInView:a,signal:n}=e,o=t&&!(i&&this.supportsSQLExpression),l=this._hasLocalSource||r||a||o,u=e.view,c="3d"===u?.type,m=await k(e,this);return l?o||r||a||c||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m):this._uvFromServiceQuery(e,m).catch(t=>(s(n),!e.field||e.field2||e.field3||e.filter?t:this._uvFromGenRenderer(e,m[0]))).catch(()=>(s(n),c?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m)))}async histogram(e){const{field:t,normalizationType:i,normalizationField:a,classificationMethod:n,view:o,filter:u,signal:c}=e,m=t?this.getField(t):null,h=_(m)||l(m),p=e.valueExpression||e.sqlExpression,d=e.valueExpression&&!(e.sqlExpression&&this.supportsSQLExpression),y=this._hasLocalSource||e.features||e.useFeaturesInView||d,f=this.supportsSQLExpression,F=!n||"equal-interval"===n,S=e.minValue,w=e.maxValue,v=null!=S&&null!=w,x=e.numBins||A;if(e.fields?.length){if(!f)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");if(!this.layer.capabilities?.operations?.supportsQueryPivot)throw new r(`${this.adapterName}:not-supported`,"Layer does not support pivot queries");return this._histogramForFields(e)}if(this.layer.capabilities?.operations?.supportsQueryBins&&e.useQueryAttributeBins&&!d){if(y)return this._histogramFromQueryAttributeBinsFromMemory(e);try{return await this._histogramFromQueryAttributeBins(e)}catch{return s(c),this._histogramFromQueryAttributeBinsFromMemory(e)}}if(e.returnAggregateIds)throw new r(`${this.adapterName}:not-supported`,"returnAggregateIds option is only supported with queryAttributeBins");if(y)return this._histogramFromMemory(e);if((p||f)&&F){if(!f&&(p||"natural-log"===i||"square-root"===i))throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return this._histogramForExpr(e)}if(h&&F)throw new r(`${this.adapterName}:not-supported`,"Normalization and date field are not allowed when layer does not support standardized SQL expression for queries");return i||!F?T(e,this).then(s=>{if(!v)return U(this,s,t,x,o,u,c);if(S>s.max||w<s.min)throw new r(`${this.adapterName}:insufficient-data`,"Range defined by 'minValue' and 'maxValue' does not intersect available data range of the field");if(F)return U(this,{min:S,max:w,sqlExpr:s.sqlExpr,excludeZerosExpr:s.excludeZerosExpr},t,x,o,u,c);{const r={field:t,normalizationType:i,normalizationField:a,normalizationTotal:s.normTotal,layer:this},n=R(r),l=g(n,S,w);return T(e,this,l).then(e=>U(this,e,t,x,o,u,c))}}):this._histogramForField(e)}async classBreaks(e){const t=!1!==e.analyzeData,i=this._hasLocalSource||e.features||e.useFeaturesInView||e.valueExpression||e.filter;if(t&&i)return this._classBreaksFromMemory(e);return(t?this._classBreaksFromGenRend(e):this._classBreaksFromInterpolation(e)).catch(()=>(s(e.signal),this._classBreaksFromMemory(e)))}async queryFeatureCount(e){if(this._hasLocalSource)throw new r(`${this.adapterName}:not-supported`,"Layer does not support count query");const t=this.layer,i=t.createQuery();return i.where=S(i.where,e.whereClause),I(i,e.filter),t.queryFeatureCount(i,{signal:e.signal})}async generateRenderer(e,t){const i=this.layer;if(this._hasLocalSource||i.version<10.1)throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation (requires ArcGIS Server version 10.1+)");const s=i.createQuery();return e.where=S(e.where,s.where),c(i.parsedUrl?.path??"",{source:i.dynamicDataSource??void 0,gdbVersion:i.gdbVersion??void 0},e,{signal:t})}async predominantCategories(e){if(!this._hasLocalSource&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support advanced SQL expressions and standardized queries");const{fields:t,view:i,signal:s,filter:a}=e,n=f(t),o=F(t),l=i&&this._hasLocalSource?await this._uvFromMemory({valueExpression:n,view:i,signal:s,filter:a}):await this._uvFromServiceQuery({sqlExpression:o.expression,valueExpression:n,signal:s,filter:a});return D(l.uniqueValueInfos,t)}async getSampleFeatures(e,r){const{view:a,requiredFields:n,returnGeometry:o,sqlWhere:l,filter:u,signal:c}=e,m=e.sampleSize;if(null==m||0===m)return[];const h=this.layer.createQuery(),p=1,d="json"===r;h.outSpatialReference=a?.spatialReference,h.returnGeometry=!!o,h.outFields=n,h.where=S(h.where,l),I(h,u);let y=[],f=!1;if(a)try{const s=await a.whenLayerView(this.layer);if(f=!G(this,n,s).length,f){if(m>=1&&!e.filter&&"getSampleFeatures"in s){await this._waitForLayerViewUpdate(s);const e=await s.getSampleFeatures({minFeatureCount:m,sampleSize:m});if(null!=e)return d?e:e.map(e=>t.fromJSON(e))}if(y=await this._fetchFeaturesFromMemory(s,h,c,r),y.length>=m&&m>0)return i(y,m,p)}}catch(F){s(c)}try{if(this._hasLocalSource)return f?y:d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c);const t=await this.queryFeatureCount({view:a,filter:u,signal:c}),r=this.layer.capabilities.query.maxRecordCount;let s=-1===m?t:m;if(s=r&&s>r?r:s,t<=y.length||y.length>=r)return y;if(h.maxAllowableOffset=e.resolution||(a?a.extent.width/a.width/a.scale:X(this.layer.spatialReference))*te,t<=s)return d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c);if(t<=ee){const e=this.layer.createQuery();I(e,u);const t=await this.layer.queryObjectIds();return h.objectIds=i(t,s,p),d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c)}return this.layer.capabilities?.query?.supportsPagination&&(h.num=Math.min(s,ee)),d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c)}catch(F){return s(c),y}}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression=t.capabilities?.query?.supportsSqlExpression,this._hasLocalSource="parquet"!==t.type&&!t.url&&!!t.source,this.hasQueryEngine=this._hasLocalSource,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent=t.fullExtent,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};function re(e,t,i){const r=[],s=t.length;return t.forEach((t,a)=>{const[n,o]=t;let l=null;l=0!==a||i?a!==s-1||i?S(`${e} >= ${n}`,`${e} ${a===s-1?" <= ":" < "} ${o}`):`${e} >= ${n}`:`${e} < ${o}`,r.push("WHEN ("+l+") THEN "+(a+1))}),["CASE",r.join(" "),"ELSE 0","END"].join(" ")}e([a({readOnly:!0})],ie.prototype,"adapterName",void 0),e([a({constructOnly:!0})],ie.prototype,"layer",void 0),ie=e([n("esri.smartMapping.support.adapters.FeatureLayerAdapter")],ie);export{ie as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{pickRandom as i}from"../../../core/arrayUtils.js";import r from"../../../core/Error.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{property as a,subclass as n}from"../../../core/accessorSupport/decorators.js";import{isHostedAgolService as o}from"../../../layers/support/arcgisLayerUrl.js";import{isTimeOnlyField as l,isNumericField as u}from"../../../layers/support/fieldUtils.js";import{generateRenderer as c}from"../../../rest/generateRenderer.js";import m from"../../../rest/support/GenerateRendererParameters.js";import h from"../../../rest/support/PivotQuery.js";import p from"../../../rest/support/StatisticDefinition.js";import d from"../../../rest/support/UniqueValueDefinition.js";import y from"../../../rest/support/UnPivotDefinition.js";import{getArcadeForPredominantCategory as f,getSQLForPredominantCategoryName as F}from"../../statistics/support/predominanceUtils.js";import{mergeWhereClauses as S,getRangeExpr as g,getSQLFilterForNormalization as w}from"../../statistics/support/utils.js";import{WorkerClient as v}from"../../statistics/support/WorkerClient.js";import{isAnyDateField as _,isIntegerField as x,castIntegerFieldToFloat as q,fieldDelimiter as V}from"../utils.js";import b from"./InMemoryLayerAdapter.js";import{getQueryParamsForExpr as E,getDataRange as z,getAttributeBinsQuery as L,processQueryAttributeBinsResult as Q,binParamsFromGenRend as T}from"./support/histogramUtils.js";import{ensureFeaturesJSON as N,getSummaryStatsQuery as j,getSummaryStatisticsFromFeatureSet as B,getSummaryStatsQueryForFields as M,getSummaryStatsPivotQuery as $,getUVQuery as O,getUniqueValuesFromFeatureSet as C,defaultNumBins as A,updateQueryWithFeatureFilter as I,getHistogramFromFeatureSet as P,getFieldExpr as R,getDomainsForFields as k,getBins as U,getPredominantCategoriesFromUVInfos as D,getMissingFields as G}from"./support/utils.js";import{processSummaryStatisticsResult as W,createUVResult as J,getEqualIntervalBins as H,createClassBreaksDefinition as Z,resolveCBResult as K}from"../../../statistics/utils.js";import{getScaleToResolutionFactor as X}from"../../../views/2d/viewpointUtils.js";const Y=5,ee=2e4,te=4e5;let ie=class extends b{constructor(){super(...arguments),this.adapterName="feature-layer-adapter"}_isStatsSupportedOnService(){const e=this.layer;if(!e.capabilities?.query?.supportsStatistics||"multipatch"===this.geometryType&&!o(e.url)&&e.version<10.5)throw new r(`${this.adapterName}:not-supported`,"Layer does not support statistics query");return Promise.resolve()}_fetchFeaturesFromService(e,t){return this.layer.queryFeatures(e,{signal:t}).then(e=>e.features)}_fetchFeaturesJSONFromService(e,t){return this._fetchFeaturesFromService(e,t).then(N)}_summaryStatsFromGenRend(e){const t=e.normalizationType,i=e.normalizationField;return this.classBreaks({field:e.field,numClasses:Y,classificationMethod:"standard-deviation",standardDeviationInterval:.25,normalizationType:t,normalizationField:"field"===t?i:void 0,minValue:e.minValue,maxValue:e.maxValue,filter:e.filter,signal:e.signal}).then(t=>{let i,r,s;if(t.classBreakInfos?.some(e=>(e.hasAvg&&(i=e),!!i)),i){const e=i.maxValue-i.minValue;r=i.minValue+e/2,s=4*e}const a={min:t.minValue,max:t.maxValue,avg:r,stddev:s};return W(a,e.outStatisticTypes)})}async _summaryStatsFromServiceQuery(e,t){await this._isStatsSupportedOnService(),"percent-of-total"===e.normalizationType&&(e.normalizationTotal=await this._getNormalizationTotal(e.field,e.normalizationType,e.filter));const i=_(t)||l(t),r="capabilities"in this.layer?this.layer.capabilities:null,s=j(this,e,t,r?.query?.supportsPercentileStatistics??!1),a=await this.layer.queryFeatures(s,{signal:e.signal}),n=B(a,i);return W(n,e.outStatisticTypes)}async _summaryStatsForFieldsBasic(e){const{outStatisticTypes:t,fields:i}=e,r=50,s=[];for(let o=0;o<i.length;o+=r){const t=i.slice(o,o+r),a=M(this,e,t);s.push(this.layer.queryFeatures(a,{signal:e.signal}))}const a=(await Promise.all(s)).flatMap(e=>e.features).map(e=>e.attributes).reduce((e,t)=>Object.assign(e,t),{}),n={};for(const o in a){const e=o.match(/^(\w+)_value_/);if(null==a[o]||!e)continue;switch(e[1]){case"min":n.min=null==n.min?a[o]:Math.min(n.min,a[o]);break;case"max":n.max=null==n.max?a[o]:Math.max(n.max,a[o]);break;case"sum":n.sum=(n.sum||0)+a[o];break;case"count":n.count=(n.count||0)+a[o]}}return W(n,t)}async _summaryStatsForFieldsAdvanced(e,t){const{outStatisticTypes:i,fields:r}=e,s=i?.exclude?.includes("variance")||i?.include&&!i.include.includes("variance"),a=i?.exclude?.includes("stddev")||i?.include&&!i.include.includes("stddev");if(null==t.sum||!t.count||s&&a)return t;t.avg=t.sum/t.count;const n=50,o=[];for(let u=0;u<r.length;u+=n){const i=r.slice(u,u+n),s=M(this,e,i);s.outStatistics=[];for(const e of i){const i=`sumOfSquares_${e}`,r=`(power(${x(this.layer,e)?q(e):e} - ${t.avg}, 2))`,a=new p({statisticType:"sum",onStatisticField:r,outStatisticFieldName:i});s.outStatistics.push(a)}o.push(this.layer.queryFeatures(s,{signal:e.signal}))}const l=(await Promise.all(o)).reduce((e,t)=>e+Object.values(t.features[0].attributes).reduce((e,t)=>e+t,0),0);return t.variance=l/(t.count-1),t.stddev=Math.sqrt(t.variance),W(t,i)}async _summaryStatsForFields(e){const t=await this._summaryStatsForFieldsBasic(e);return this._summaryStatsForFieldsAdvanced(e,t)}async _summaryStatsUsingQueryPivot(e){await this._isStatsSupportedOnService();const t="capabilities"in this.layer?this.layer.capabilities:null,i=$(this,e,t?.query?.supportsPercentileStatistics??!1),r=await this.layer.queryPivot(i,{signal:e.signal}),s=B(r,!1);return W(s,e.outStatisticTypes)}_uvFromGenRenderer(e,t){const i=e.field??void 0,r=new d({attributeField:i}),s=new m({classificationDefinition:r});return this.generateRenderer(s,e.signal).then(e=>{const t={},r=this.getField(i);return e.uniqueValues.forEach(e=>{let i=e.value;null!=i&&""!==i&&("string"!=typeof i||""!==i.trim()&&"<null>"!==i.toLowerCase())||(i=null),null==t[i]?t[i]={count:e.count,data:u(r)&&i?Number(i):i}:t[i].count=t[i].count+e.count}),{count:t}}).then(i=>J(i,[t],e.returnAllCodedValues))}async _uvFromServiceQuery(e,t){return this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(O(this,e),{signal:e.signal})).then(t=>C(t,{layer:this,field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:V,view:e.view,signal:e.signal})).then(i=>J(i,t,e.returnAllCodedValues,V))}_getNormalizationTotal(e,t,i,r){return e&&"percent-of-total"===t?this.summaryStatistics({field:e,outStatisticTypes:{include:["sum"]},filter:i,signal:r}).then(e=>e.sum):Promise.resolve(null)}_histogramForExpr(e){return this._getNormalizationTotal(e.field,e.normalizationType,e.filter,e.signal).then(t=>{const i=E(e,this,t);return z(i,this,e.minValue,e.maxValue).then(r=>{const s=r.min,a=r.max;if(null==s||null==a)return{bins:[],minValue:s,maxValue:a,normalizationTotal:t};const n=e.numBins||A,o=H(s,a,n),l=re(i.sqlExpression,o,null!=e.minValue&&null!=e.maxValue),u=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:"1"}),c=this.layer.createQuery();return c.where=S(c.where,i.sqlWhere),c.sqlFormat="standard",c.outStatistics=[u],c.groupByFieldsForStatistics=[l],c.orderByFields=[l],I(c,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryFeatures(c,{signal:i.signal})).then(e=>P(e,s,a,n,t))})})}async _histogramForFields(e){const{min:t,max:i}=await z({fields:e.fields,sqlWhere:e.sqlWhere,filter:e.filter,signal:e.signal},this,e.minValue,e.maxValue);if(null==t||null==i)return{bins:[],minValue:t,maxValue:i};const r="newField",s=e.numBins||A,a=re(r,H(t,i,s),null!=e.minValue&&null!=e.maxValue),n=new p({statisticType:"count",outStatisticFieldName:"countOFExpr",onStatisticField:r}),o=new h,{where:l,timeExtent:u}=this.createQuery();return o.where=S(l,e.sqlWhere),o.outPivots=[new y({sourceFields:e.fields,valueFieldName:r})],o.outStatistics=[n],o.groupByFieldsForStatistics=[a],o.orderByFields=[a],o.timeExtent=u,I(o,e.filter),this._isStatsSupportedOnService().then(()=>this.layer.queryPivot(o,{signal:e.signal})).then(e=>P(e,t,i,s))}async _histogramFromQueryAttributeBins(e){const{field:t,normalizationType:i,filter:r,signal:s}=e,a=await this._getNormalizationTotal(t,i,r,s),{query:n,min:o,max:l}=await L(e,this,a,this.createQuery());if(!n)return{bins:[],minValue:o,maxValue:l,normalizationTotal:a};const u=await this.layer.queryAttributeBins(n,{signal:s});return Q(u,t?this.getField(t):null,{minValue:o,maxValue:l,normalizationTotal:a})}_classBreaksFromGenRend(e){const{field:t,normalizationType:i,normalizationField:r,normalizationTotal:s,signal:a}=e,n=w({field:t,normalizationType:i,normalizationField:r}),o=R({field:t,normalizationType:i,normalizationField:r,normalizationTotal:s,layer:this}),l=g(o,e.minValue,e.maxValue),u=Z({field:t,normalizationType:i,normalizationField:r,classificationMethod:e.classificationMethod,standardDeviationInterval:e.standardDeviationInterval,breakCount:e.numClasses||Y}),c=new m({classificationDefinition:u});return c.where=S(n,l),this.generateRenderer(c,a).then(t=>K(t,e.classificationMethod))}async summaryStatistics(e){const{field:t,fields:i,normalizationType:a,valueExpression:n,sqlExpression:o,view:u,features:c,useFeaturesInView:m}=e,h=t?this.getField(t):null,p=_(h)||l(h),d=n&&!(o&&this.supportsSQLExpression),y=this._hasLocalSource||c||m,f="3d"===u?.type;if(i?.length){const t={...e,fields:i};if(!this.layer.capabilities?.operations?.supportsQueryPivot)return await this._summaryStatsForFields(t);try{return await this._summaryStatsUsingQueryPivot(t)}catch{return await this._summaryStatsForFields(t)}}if(y||d)return d||c||m||f||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._summaryStatsFromMemory(e,h):this._summaryStatsFromClientQuery(e,h);if(!this.supportsSQLExpression&&(p||o||"natural-log"===a||"square-root"===a))throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");return(a&&!this.supportsSQLExpression?this._summaryStatsFromGenRend(e):this._summaryStatsFromServiceQuery(e,h)).catch(()=>(s(e.signal),this._summaryStatsFromMemory(e,h)))}async uniqueValues(e){const{valueExpression:t,sqlExpression:i,features:r,useFeaturesInView:a,signal:n}=e,o=t&&!(i&&this.supportsSQLExpression),l=this._hasLocalSource||r||a||o,u=e.view,c="3d"===u?.type,m=await k(e,this);return l?o||r||a||c||this._hasLocalSource&&!this.layer.capabilities.query.supportsStatistics?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m):this._uvFromServiceQuery(e,m).catch(t=>(s(n),!e.field||e.field2||e.field3||e.filter?t:this._uvFromGenRenderer(e,m[0]))).catch(()=>(s(n),c?this._uvFromMemory(e,m):this._uvFromClientQuery(e,m)))}async histogram(e){const{field:t,normalizationType:i,normalizationField:a,classificationMethod:n,view:o,filter:u,signal:c}=e,m=t?this.getField(t):null,h=_(m)||l(m),p=e.valueExpression||e.sqlExpression,d=e.valueExpression&&!(e.sqlExpression&&this.supportsSQLExpression),y=this._hasLocalSource||e.features||e.useFeaturesInView||d,f=this.supportsSQLExpression,F=!n||"equal-interval"===n,S=e.minValue,w=e.maxValue,v=null!=S&&null!=w,x=e.numBins||A;if(e.fields?.length){if(!f)throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");if(!this.layer.capabilities?.operations?.supportsQueryPivot)throw new r(`${this.adapterName}:not-supported`,"Layer does not support pivot queries");return this._histogramForFields(e)}if(this.layer.capabilities?.operations?.supportsQueryBins&&e.useQueryAttributeBins&&!d){if(y)return this._histogramFromQueryAttributeBinsFromMemory(e);try{return await this._histogramFromQueryAttributeBins(e)}catch{return s(c),this._histogramFromQueryAttributeBinsFromMemory(e)}}if(e.returnAggregateIds)throw new r(`${this.adapterName}:not-supported`,"returnAggregateIds option is only supported with queryAttributeBins");if(y)return this._histogramFromMemory(e);if((p||f)&&F){if(!f&&(p||"natural-log"===i||"square-root"===i))throw new r(`${this.adapterName}:not-supported`,"Layer does not support standardized SQL expression for queries");if(this.layer.capabilities.query.supportsOrderBy)return this._histogramForExpr(e)}if(h&&F)throw new r(`${this.adapterName}:not-supported`,"Normalization and date field are not allowed when layer does not support standardized SQL expression for queries");return i||!F?T(e,this).then(s=>{if(!v)return U(this,s,t,x,o,u,c);if(S>s.max||w<s.min)throw new r(`${this.adapterName}:insufficient-data`,"Range defined by 'minValue' and 'maxValue' does not intersect available data range of the field");if(F)return U(this,{min:S,max:w,sqlExpr:s.sqlExpr,excludeZerosExpr:s.excludeZerosExpr},t,x,o,u,c);{const r={field:t,normalizationType:i,normalizationField:a,normalizationTotal:s.normTotal,layer:this},n=R(r),l=g(n,S,w);return T(e,this,l).then(e=>U(this,e,t,x,o,u,c))}}):this._histogramForField(e)}async classBreaks(e){const t=!1!==e.analyzeData,i=this._hasLocalSource||e.features||e.useFeaturesInView||e.valueExpression||e.filter;if(t&&i)return this._classBreaksFromMemory(e);return(t?this._classBreaksFromGenRend(e):this._classBreaksFromInterpolation(e)).catch(()=>(s(e.signal),this._classBreaksFromMemory(e)))}async queryFeatureCount(e){if(this._hasLocalSource)throw new r(`${this.adapterName}:not-supported`,"Layer does not support count query");const t=this.layer,i=t.createQuery();return i.where=S(i.where,e.whereClause),I(i,e.filter),t.queryFeatureCount(i,{signal:e.signal})}async generateRenderer(e,t){const i=this.layer;if(this._hasLocalSource||i.version<10.1)throw new r(`${this.adapterName}:not-supported`,"Layer does not support generateRenderer operation (requires ArcGIS Server version 10.1+)");const s=i.createQuery();return e.where=S(e.where,s.where),c(i.parsedUrl?.path??"",{source:i.dynamicDataSource??void 0,gdbVersion:i.gdbVersion??void 0},e,{signal:t})}async predominantCategories(e){if(!this._hasLocalSource&&!this.supportsSQLExpression)throw new r(`${this.adapterName}:not-supported`,"Layer does not support advanced SQL expressions and standardized queries");const{fields:t,view:i,signal:s,filter:a}=e,n=f(t),o=F(t),l=i&&this._hasLocalSource?await this._uvFromMemory({valueExpression:n,view:i,signal:s,filter:a}):await this._uvFromServiceQuery({sqlExpression:o.expression,valueExpression:n,signal:s,filter:a});return D(l.uniqueValueInfos,t)}async getSampleFeatures(e,r){const{view:a,requiredFields:n,returnGeometry:o,sqlWhere:l,filter:u,signal:c}=e,m=e.sampleSize;if(null==m||0===m)return[];const h=this.layer.createQuery(),p=1,d="json"===r;h.outSpatialReference=a?.spatialReference,h.returnGeometry=!!o,h.outFields=n,h.where=S(h.where,l),I(h,u);let y=[],f=!1;if(a)try{const s=await a.whenLayerView(this.layer);if(f=!G(this,n,s).length,f){if(m>=1&&!e.filter&&"getSampleFeatures"in s){await this._waitForLayerViewUpdate(s);const e=await s.getSampleFeatures({minFeatureCount:m,sampleSize:m});if(null!=e)return d?e:e.map(e=>t.fromJSON(e))}if(y=await this._fetchFeaturesFromMemory(s,h,c,r),y.length>=m&&m>0)return i(y,m,p)}}catch(F){s(c)}try{if(this._hasLocalSource)return f?y:d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c);const t=await this.queryFeatureCount({view:a,filter:u,signal:c}),r=this.layer.capabilities.query.maxRecordCount;let s=-1===m?t:m;if(s=r&&s>r?r:s,t<=y.length||y.length>=r)return y;if(h.maxAllowableOffset=e.resolution||(a?a.extent.width/a.width/a.scale:X(this.layer.spatialReference))*te,t<=s)return d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c);if(t<=ee){const e=this.layer.createQuery();I(e,u);const t=await this.layer.queryObjectIds();return h.objectIds=i(t,s,p),d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c)}return this.layer.capabilities?.query?.supportsPagination&&(h.num=Math.min(s,ee)),d?await this._fetchFeaturesJSONFromService(h,c):await this._fetchFeaturesFromService(h,c)}catch(F){return s(c),y}}load(e){const t=this.layer.load(e).then(async t=>{this.geometryType=t.geometryType,this.objectIdField=t.objectIdField,this.supportsSQLExpression=t.capabilities?.query?.supportsSqlExpression,this._hasLocalSource="parquet"!==t.type&&!t.url&&!!t.source,this.hasQueryEngine=this._hasLocalSource,this.minScale=t.minScale,this.maxScale=t.maxScale,this.fullExtent=t.fullExtent,this.workerClient=v.getInstance(),await this.workerClient.open(e.signal)});return this.addResolvingPromise(t),Promise.resolve(this)}};function re(e,t,i){const r=[],s=t.length;return t.forEach((t,a)=>{const[n,o]=t;let l=null;l=0!==a||i?a!==s-1||i?S(`${e} >= ${n}`,`${e} ${a===s-1?" <= ":" < "} ${o}`):`${e} >= ${n}`:`${e} < ${o}`,r.push("WHEN ("+l+") THEN "+(a+1))}),["CASE",r.join(" "),"ELSE 0","END"].join(" ")}e([a({readOnly:!0})],ie.prototype,"adapterName",void 0),e([a({constructOnly:!0})],ie.prototype,"layer",void 0),ie=e([n("esri.smartMapping.support.adapters.FeatureLayerAdapter")],ie);export{ie as default};