@arcgis/core 6.0.0-next.1 → 6.0.0-next.11

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 (703) hide show
  1. package/analysis/AreaMeasurementAnalysis.d.ts +11 -1
  2. package/analysis/DimensionSimpleStyle.js +1 -1
  3. package/analysis/DirectLineMeasurementAnalysis.d.ts +11 -1
  4. package/analysis/DistanceMeasurementAnalysis.d.ts +8 -0
  5. package/arcade/featureSetUtils.js +1 -1
  6. package/arcade/functions/knowledgegraph.js +1 -1
  7. package/arcade/geometry/unitConversion.js +1 -1
  8. package/arcgisGlobal.d.ts +5 -5
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/01803f76bc0d9f2cd566.js +1 -0
  11. package/assets/esri/core/workers/chunks/{f09c9d9a554c33a753b4.js → 02253bdffbd580af22d8.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{5078b66ba31b770b689f.js → 037a8cc19debbaaa4e10.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{1ede8666d804c553803e.js → 0b6941781e35ce0f7274.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0ccab50877b24f862d6e.js +1 -0
  15. package/assets/esri/core/workers/chunks/{ff3a53c3f00335552317.js → 0dc66b03ff55d0ea5a09.js} +1 -1
  16. package/assets/esri/core/workers/chunks/0f725cf79ce00e790a7d.js +1 -0
  17. package/assets/esri/core/workers/chunks/{a0d459bdb91ee892d4b6.js → 116293b1ee788a89ce1e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/12a7997a40c77f5c9160.js +1 -0
  19. package/assets/esri/core/workers/chunks/{a7325ebb7edf3273bb34.js → 12b84262dedc6b393136.js} +1 -1
  20. package/assets/esri/core/workers/chunks/1b077c92345ffb5916c2.js +1 -0
  21. package/assets/esri/core/workers/chunks/{6dd0b79fa3a629ab4f27.js → 1bca39e0e651426bdbb5.js} +1 -1
  22. package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +1 -0
  23. package/assets/esri/core/workers/chunks/{8959a825f5e1ce6f38ac.js → 1c65ab9ed611c322ce27.js} +1 -1
  24. package/assets/esri/core/workers/chunks/1e0d2715d603f48a7e0b.js +1 -0
  25. package/assets/esri/core/workers/chunks/261fea092ee7d27608a0.js +1 -0
  26. package/assets/esri/core/workers/chunks/2686fe5b62dd0be699c0.js +1 -0
  27. package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +1 -0
  28. package/assets/esri/core/workers/chunks/{83589144eeeb08f45557.js → 2aeb5cc32284dd3e4d22.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2d9a1f23ec6ce90723ac.js +1 -0
  30. package/assets/esri/core/workers/chunks/2e096537a3a5555a4a93.js +1 -0
  31. package/assets/esri/core/workers/chunks/{7a05b18f655c1167ce0a.js → 2ef5237e4c876d6a4ee0.js} +1 -1
  32. package/assets/esri/core/workers/chunks/37d6a264a3f1d8072aa0.js +1 -0
  33. package/assets/esri/core/workers/chunks/3b3e519f15ed52c83f0c.js +1 -0
  34. package/assets/esri/core/workers/chunks/3c0ed15b544df6fb0903.js +1 -0
  35. package/assets/esri/core/workers/chunks/{b612de42ee86c0d95247.js → 3d9d7d3a40b51eb7ee3d.js} +1 -1
  36. package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +1 -0
  37. package/assets/esri/core/workers/chunks/3f7d583b676b23b3fadb.js +1 -0
  38. package/assets/esri/core/workers/chunks/3ffda5bf0b91700dc308.js +1 -0
  39. package/assets/esri/core/workers/chunks/40a584cb952e94326e9e.js +1 -0
  40. package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{1ba0dfbe0958cdbd7c9f.js → 42fd2a7b22b03dacc6a7.js} +1 -1
  42. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +1 -0
  43. package/assets/esri/core/workers/chunks/{d201fbf3ceff946d2bd6.js → 44d5508042cacdfcac47.js} +1 -1
  44. package/assets/esri/core/workers/chunks/4503b20ca6a80fb63d72.js +1 -0
  45. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +1 -0
  46. package/assets/esri/core/workers/chunks/45800373650fbc8262e6.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6a7ab1ef9a37e87db5ae.js → 46a7da93a63663878583.js} +1 -1
  48. package/assets/esri/core/workers/chunks/46b4fb6a7fe4877b0efc.js +1120 -0
  49. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +1 -0
  50. package/assets/esri/core/workers/chunks/4911ce62421a6c3320b0.js +1 -0
  51. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +1 -0
  52. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
  53. package/assets/esri/core/workers/chunks/4debf2d9c3465250ef7a.js +1 -0
  54. package/assets/esri/core/workers/chunks/4e544de61f07ca660236.js +1 -0
  55. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +1 -0
  56. package/assets/esri/core/workers/chunks/505227797bcf2a1d908d.js +1 -0
  57. package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
  59. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +1 -0
  60. package/assets/esri/core/workers/chunks/557671c897ca5563be6c.js +1 -0
  61. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +1 -0
  62. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +1 -0
  63. package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
  64. package/assets/esri/core/workers/chunks/{ceb680688fe7e570a774.js → 608be1172a908e92b9f1.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{e521bb9ee2030245c3ce.js → 612104dff305ff062dfa.js} +2 -2
  66. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +1 -0
  67. package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
  68. package/assets/esri/core/workers/chunks/6400446b7615b97c3521.js +1 -0
  69. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +1 -0
  70. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
  71. package/assets/esri/core/workers/chunks/665e31c494d2af505acc.js +1 -0
  72. package/assets/esri/core/workers/chunks/{9232f57623e1fa3ccabc.js → 67e4b5651fd7ff7d8cf0.js} +1 -1
  73. package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
  74. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
  75. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +1 -0
  76. package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
  77. package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
  78. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
  79. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +1 -0
  80. package/assets/esri/core/workers/chunks/745a153d0cd34faa124e.js +1 -0
  81. package/assets/esri/core/workers/chunks/7572c2bc5062e66f6330.js +1 -0
  82. package/assets/esri/core/workers/chunks/76196c414e48834f7b92.js +1 -0
  83. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +1 -0
  84. package/assets/esri/core/workers/chunks/7ef182e24cad50815b4e.js +1 -0
  85. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +1 -0
  86. package/assets/esri/core/workers/chunks/814751e705c05099f864.js +1 -0
  87. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +1 -0
  88. package/assets/esri/core/workers/chunks/8487727f1197cf7dbf50.js +1 -0
  89. package/assets/esri/core/workers/chunks/88e54449261ef94e390d.js +1 -0
  90. package/assets/esri/core/workers/chunks/8b0d5551978ab0aac0d1.js +1 -0
  91. package/assets/esri/core/workers/chunks/8d0c2de92770a1567536.js +1 -0
  92. package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
  93. package/assets/esri/core/workers/chunks/917f53833b853898facc.js +1 -0
  94. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
  95. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +1 -0
  96. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
  97. package/assets/esri/core/workers/chunks/{c76c42c74eedd43263d3.js → 9dd1fc56eb1ea6eb705e.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{86a051e9fe71aa356108.js → 9e3e442a9874ed23a043.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{aa1054834738aef48bda.js → a0356702f2d3f787aeac.js} +1 -1
  100. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +1 -0
  101. package/assets/esri/core/workers/chunks/{1ba1f705b6ce5c8ea702.js → a655ebdb4bf0660615a2.js} +1 -1
  102. package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +1 -0
  103. package/assets/esri/core/workers/chunks/aaba33611753c6aada68.js +1 -0
  104. package/assets/esri/core/workers/chunks/aba42885c5d6b2b5fe7f.js +1 -0
  105. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
  106. package/assets/esri/core/workers/chunks/ae40eac1eadd1a537bf4.js +1 -0
  107. package/assets/esri/core/workers/chunks/aeaaff7a4b1a99540f52.js +1 -0
  108. package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
  109. package/assets/esri/core/workers/chunks/af75747b06d79446a855.js +1 -0
  110. package/assets/esri/core/workers/chunks/b564ec4e03478f5659db.js +1 -0
  111. package/assets/esri/core/workers/chunks/b5fdcc80d5973b6e26d1.js +1 -0
  112. package/assets/esri/core/workers/chunks/bbf993dba74850bbf9d7.js +1 -0
  113. package/assets/esri/core/workers/chunks/bc0f54a2c15502b630ec.js +1 -0
  114. package/assets/esri/core/workers/chunks/{9ab25ee06041f907b9a2.js → c2c1f51a4668055c2838.js} +1 -1
  115. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +1 -0
  116. package/assets/esri/core/workers/chunks/{a7985d20fa6e8d4878e7.js → d0f5bee9db1ad51ae687.js} +1 -1
  117. package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +1 -0
  118. package/assets/esri/core/workers/chunks/d90a3bfd45b5ed4092e0.js +1 -0
  119. package/assets/esri/core/workers/chunks/dba280c370df13196711.js +1 -0
  120. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +1 -0
  121. package/assets/esri/core/workers/chunks/{c18189710d6198516175.js → de5ecb567bd69c613e9d.js} +1 -1
  122. package/assets/esri/core/workers/chunks/e10b57aefcc89671116e.js +1 -0
  123. package/assets/esri/core/workers/chunks/{534186fc921a0ccf58dc.js → e1f5d00878f27e1d413e.js} +1 -1
  124. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +1 -0
  125. package/assets/esri/core/workers/chunks/e932951598499befabf5.js +1 -0
  126. package/assets/esri/core/workers/chunks/{e1ba915dae7747932c0f.js → eb04e1717a1002cda3ab.js} +1 -1
  127. package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +1 -0
  128. package/assets/esri/core/workers/chunks/f1df76f098a3cc924832.js +1 -0
  129. package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +1 -0
  130. package/assets/esri/core/workers/chunks/f46d9a19f79d4a4bd354.js +1 -0
  131. package/assets/esri/core/workers/chunks/f4f9d08b2df856e3b694.js +1 -0
  132. package/assets/esri/core/workers/chunks/{711cfb84659cb4437679.js → f528ac5c648ca6a98582.js} +1 -1
  133. package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +1 -0
  134. package/assets/esri/core/workers/chunks/fb444954be74c1962ced.js +1 -0
  135. package/assets/esri/core/workers/chunks/fc44227c1756f65b95df.js +1 -0
  136. package/assets/esri/core/workers/chunks/{72019baeba520edb6bb0.js → fc44d45598a7476bc606.js} +1 -1
  137. package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +1 -0
  138. package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
  139. package/assets/esri/themes/base/_mixins.scss +2 -2
  140. package/assets/esri/themes/base/widgets/_Attribution.scss +1 -1
  141. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +2 -2
  142. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -5
  143. package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -1
  144. package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +2 -2
  145. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +5 -5
  146. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +1 -1
  147. package/assets/esri/themes/base/widgets/_Compass.scss +0 -2
  148. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +4 -10
  149. package/assets/esri/themes/base/widgets/_Directions.scss +40 -40
  150. package/assets/esri/themes/base/widgets/_Editor.scss +7 -7
  151. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  152. package/assets/esri/themes/base/widgets/_Feature.scss +1 -1
  153. package/assets/esri/themes/base/widgets/_FeatureForm.scss +6 -6
  154. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  155. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +1 -1
  156. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +4 -4
  157. package/assets/esri/themes/base/widgets/_FeatureTable.scss +27 -27
  158. package/assets/esri/themes/base/widgets/_FeatureTemplates.scss +1 -1
  159. package/assets/esri/themes/base/widgets/_Features.scss +6 -6
  160. package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -1
  161. package/assets/esri/themes/base/widgets/_FilterCondition.scss +1 -1
  162. package/assets/esri/themes/base/widgets/_Grid.scss +18 -18
  163. package/assets/esri/themes/base/widgets/_GridControls.scss +11 -11
  164. package/assets/esri/themes/base/widgets/_LayerList.scss +1 -1
  165. package/assets/esri/themes/base/widgets/_Legend.scss +5 -5
  166. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +4 -1
  167. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +23 -28
  168. package/assets/esri/themes/base/widgets/_ResponsiveToolbar.scss +0 -2
  169. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +1 -1
  170. package/assets/esri/themes/base/widgets/_SelectionList.scss +15 -15
  171. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +3 -5
  172. package/assets/esri/themes/base/widgets/_ShadowCast.scss +11 -11
  173. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
  174. package/assets/esri/themes/base/widgets/_Slice.scss +3 -3
  175. package/assets/esri/themes/base/widgets/_SnappingControls.scss +1 -1
  176. package/assets/esri/themes/base/widgets/_TimeSlider.scss +5 -5
  177. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +5 -4
  178. package/assets/esri/themes/base/widgets/_Tooltip.scss +14 -17
  179. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +2 -2
  180. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +1 -1
  181. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +2 -2
  182. package/assets/esri/themes/base/widgets/_ValuePicker.scss +2 -2
  183. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +5 -5
  184. package/assets/esri/themes/base/widgets/_Widget.scss +5 -1
  185. package/assets/esri/themes/dark/main.css +1 -1
  186. package/assets/esri/themes/light/main.css +1 -1
  187. package/assets/esri/themes/light/view.css +1 -1
  188. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  189. package/{basemaps/BasemapCollection.d.ts → basemapGallery/BasemapGalleryModel.d.ts} +8 -8
  190. package/{basemaps/BasemapCollection.js → basemapGallery/BasemapGalleryModel.js} +1 -1
  191. package/{basemaps → basemapGallery}/BasemapsSource.d.ts +1 -1
  192. package/{basemaps → basemapGallery}/BasemapsSource.js +1 -1
  193. package/{basemaps → basemapGallery}/LocalBasemapsSource.d.ts +2 -2
  194. package/{basemaps → basemapGallery}/LocalBasemapsSource.js +1 -1
  195. package/{basemaps → basemapGallery}/PortalBasemapsSource.d.ts +2 -2
  196. package/{basemaps → basemapGallery}/PortalBasemapsSource.js +1 -1
  197. package/{basemaps → basemapGallery}/support/BasemapItem.d.ts +2 -2
  198. package/{basemaps → basemapGallery}/support/BasemapItem.js +1 -1
  199. package/{basemaps → basemapGallery}/types.d.ts +2 -2
  200. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  201. package/chunks/ChapmanAtmosphere.glsl.js +3 -3
  202. package/chunks/CloudsComposition.glsl.js +1 -1
  203. package/chunks/Component.glsl.js +41 -41
  204. package/chunks/DefaultMaterial.glsl.js +2 -2
  205. package/chunks/EdgeShader.glsl.js +9 -9
  206. package/chunks/Fog.glsl.js +5 -5
  207. package/chunks/GaussianSplat.glsl.js +2 -2
  208. package/chunks/GlobalIllumination.glsl.js +13 -11
  209. package/chunks/GlobalIlluminationBlur.glsl.js +3 -5
  210. package/chunks/GlobalIlluminationUpscale.glsl.js +1 -1
  211. package/chunks/HUDMaterial.glsl.js +13 -13
  212. package/chunks/Haze.glsl.js +6 -6
  213. package/chunks/HazeCompositing.glsl.js +1 -1
  214. package/chunks/LaserlinePath.glsl.js +6 -6
  215. package/chunks/LineCallout.glsl.js +1 -1
  216. package/chunks/LineMarker.glsl.js +5 -5
  217. package/chunks/NavigationDepth.glsl.js +2 -2
  218. package/chunks/Path.glsl.js +1 -1
  219. package/chunks/Pattern.glsl.js +26 -26
  220. package/chunks/Precipitation.glsl.js +7 -7
  221. package/chunks/RealisticTree.glsl.js +2 -2
  222. package/chunks/RibbonLine.glsl.js +80 -73
  223. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  224. package/chunks/ShadowHighlight.glsl.js +5 -5
  225. package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
  226. package/chunks/SimpleAtmosphere.glsl.js +4 -4
  227. package/chunks/Terrain.glsl.js +29 -32
  228. package/chunks/Viewshed.glsl.js +2 -2
  229. package/chunks/Water.glsl.js +2 -2
  230. package/config.js +1 -1
  231. package/core/Loadable.js +1 -1
  232. package/core/arrayUtils.js +1 -1
  233. package/core/colorUtils.js +1 -1
  234. package/core/has.js +1 -1
  235. package/core/screenUtils.js +1 -1
  236. package/core/units.js +1 -1
  237. package/core/workers/workerFactory.js +1 -1
  238. package/form/elements/inputs/DynamicChoiceInput.d.ts +35 -5
  239. package/geometry/HeightModelInfo.js +1 -1
  240. package/geometry/operators/proximityOperator.js +1 -1
  241. package/geometry/projectionUtils.js +1 -1
  242. package/geometry/support/meshUtils.d.ts +1 -1
  243. package/geometry/support/scaleUtils.js +1 -1
  244. package/geometry/support/wkt.js +2 -0
  245. package/kernel.js +1 -1
  246. package/layers/BaseDynamicLayer.d.ts +1 -0
  247. package/layers/BaseElevationLayer.d.ts +2 -0
  248. package/layers/BaseTileLayer.d.ts +12 -9
  249. package/layers/CSVLayer.d.ts +0 -15
  250. package/layers/FeatureLayer.d.ts +2 -15
  251. package/layers/GeoJSONLayer.d.ts +0 -52
  252. package/layers/GeoRSSLayer.d.ts +0 -44
  253. package/layers/GeospatialPDFLayer.d.ts +2 -5
  254. package/layers/GeospatialPDFLayer.js +1 -1
  255. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  256. package/layers/OrientedImageryLayer.js +1 -1
  257. package/layers/ParquetLayer.d.ts +100 -12
  258. package/layers/ParquetLayer.js +1 -1
  259. package/layers/SketchLayer.d.ts +0 -1
  260. package/layers/VectorTileLayer.d.ts +2 -12
  261. package/layers/geospatialPDF/renderExtentUtils.js +1 -1
  262. package/layers/graphics/data/FeatureStore.js +1 -1
  263. package/layers/graphics/data/QueryEngineResult.js +1 -1
  264. package/layers/graphics/data/geometryUtils.js +1 -1
  265. package/layers/graphics/data/projectionSupport.js +1 -1
  266. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  267. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  268. package/layers/graphics/transferFeatures.js +1 -1
  269. package/layers/knowledgeGraph/layerUtils.js +1 -1
  270. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  271. package/layers/mixins/PortalLayer.js +1 -1
  272. package/layers/mixins/RefreshableLayer.d.ts +1 -3
  273. package/layers/mixins/ScaleRangeLayer.js +1 -1
  274. package/layers/mixins/SublayersOwner.js +1 -1
  275. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  276. package/layers/orientedImagery/core/utils.js +1 -1
  277. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  278. package/layers/raster/datasets/TIFFRaster.js +1 -1
  279. package/layers/raster/datasets/byteStreamUtils.js +1 -1
  280. package/layers/raster/formats/tiffParser.js +1 -1
  281. package/layers/support/ParquetPortalItemData.d.ts +2 -0
  282. package/layers/support/ParquetPortalItemData.js +1 -1
  283. package/layers/support/PortalItemData.d.ts +21 -0
  284. package/layers/support/PortalItemData.js +1 -1
  285. package/layers/support/Sublayer.js +1 -1
  286. package/layers/support/SubtypeSublayer.js +1 -1
  287. package/layers/support/layersLoader.js +1 -1
  288. package/layers/support/parquetUtils.d.ts +1 -1
  289. package/layers/support/types.d.ts +1 -1
  290. package/package.json +3 -3
  291. package/popup/FeaturesModel.d.ts +27 -6
  292. package/popup/FeaturesModel.js +1 -1
  293. package/portal/support/layersLoader.js +1 -1
  294. package/portal/support/portalLayers.js +1 -1
  295. package/renderers/VectorFieldRenderer.d.ts +4 -4
  296. package/rest/print.d.ts +49 -3
  297. package/rest/print.js +1 -1
  298. package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
  299. package/rest/support/printTaskUtils.js +1 -1
  300. package/smartMapping/renderers/color.js +1 -1
  301. package/smartMapping/renderers/dotDensity.js +1 -1
  302. package/smartMapping/renderers/heatmap.js +1 -1
  303. package/smartMapping/renderers/pieChart.js +1 -1
  304. package/smartMapping/renderers/support/spikeUtils.js +3 -3
  305. package/smartMapping/renderers/type.js +1 -1
  306. package/smartMapping/statistics/heatmapStatistics.js +1 -1
  307. package/smartMapping/statistics/histogram.js +1 -1
  308. package/smartMapping/statistics/summaryStatistics.js +1 -1
  309. package/smartMapping/statistics/summaryStatisticsForAttributes.js +1 -1
  310. package/smartMapping/statistics/uniqueValues.js +1 -1
  311. package/smartMapping/support/adapters/support/layerUtils.js +1 -1
  312. package/smartMapping/types.d.ts +3 -1
  313. package/symbols/LineSymbol3DLayer.js +1 -1
  314. package/symbols/callouts/LineCallout3D.js +1 -1
  315. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  316. package/symbols/cim/CIMSymbolHelper.js +1 -1
  317. package/symbols/cim/cimAnalyzer.js +1 -1
  318. package/symbols/edges/Edges3D.js +1 -1
  319. package/symbols/support/Symbol3DIconOutline.js +1 -1
  320. package/symbols/support/Symbol3DOutline.js +1 -1
  321. package/symbols/support/Symbol3DTextBorder.js +1 -1
  322. package/symbols/support/defaults3D.js +1 -1
  323. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  324. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -4
  325. package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
  326. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  327. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +6 -4
  328. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
  329. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  330. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  331. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  332. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  333. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  334. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  335. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  336. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  337. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  338. package/views/2d/layers/LayerView2D.js +1 -1
  339. package/views/2d/layers/features/FeatureContainer.js +1 -1
  340. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  341. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  342. package/views/2d/layers/features/processor/tracks/TrackAdapter.js +1 -1
  343. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  344. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  345. package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
  346. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  347. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  348. package/views/2d/layers/features/support/FeatureMetadata.js +1 -1
  349. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  350. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  351. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  352. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  353. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  354. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  355. package/views/3d/analysis/LineOfSight/LineOfSightInteractionVisuals.js +1 -1
  356. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  357. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  358. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  359. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  360. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  361. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  362. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  363. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  364. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  365. package/views/3d/analysis/Viewshed/types.d.ts +3 -1
  366. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +3 -0
  367. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +2 -1
  368. package/views/3d/environment/Environment.d.ts +2 -2
  369. package/views/3d/environment/Environment.js +1 -1
  370. package/views/3d/environment/EnvironmentView.js +2 -0
  371. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  372. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  373. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  374. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  375. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  376. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  377. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  378. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  379. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  380. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  381. package/views/3d/layers/FlowSubView3D.js +1 -1
  382. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  383. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  384. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  385. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  386. package/views/3d/layers/MediaLayerView3D.js +1 -1
  387. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  388. package/views/3d/layers/RouteLayerView3D.js +1 -1
  389. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  390. package/views/3d/layers/SceneLayerView3D.js +1 -1
  391. package/views/3d/layers/TiledLayerView3D.js +1 -1
  392. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  393. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  394. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  395. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +2 -0
  396. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  397. package/views/3d/layers/graphics/Graphics3DDrapedBufferGraphicLayer.js +2 -0
  398. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  399. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +2 -0
  400. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  401. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  402. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  403. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  404. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  405. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +2 -0
  406. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  407. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  408. package/views/3d/layers/graphics/Labeler.js +1 -1
  409. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  410. package/views/3d/layers/graphics/pointUtils.js +1 -1
  411. package/views/3d/layers/support/FeatureMemory.js +1 -1
  412. package/views/3d/layers/support/FeatureTile.js +1 -1
  413. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  414. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  415. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  416. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +1 -1
  417. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  418. package/views/3d/support/PBFDecoder.js +1 -1
  419. package/views/3d/support/elevationUpdateUtils.js +1 -1
  420. package/views/3d/support/popupHitTest.js +1 -1
  421. package/views/3d/terrain/OverlayManager.js +1 -1
  422. package/views/3d/terrain/OverlayRenderer.js +1 -1
  423. package/views/3d/terrain/TerrainRenderer.js +1 -1
  424. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  425. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +5 -5
  426. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +13 -13
  427. package/views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js +2 -0
  428. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  429. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +2 -0
  430. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +7 -7
  431. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +31 -29
  432. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +26 -12
  433. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  434. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +14 -14
  435. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  436. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +16 -11
  437. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +5 -5
  438. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +8 -8
  439. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +1 -1
  440. package/views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js +2 -0
  441. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +1 -1
  442. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +6 -6
  443. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  444. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  445. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  446. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  447. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  448. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  449. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  450. package/views/3d/webgl-engine/effects/atmosphere/ChapmanRaymarching.glsl.js +1 -1
  451. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  452. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  453. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  454. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  455. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  456. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  457. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  458. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
  459. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +5 -5
  460. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  461. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  462. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
  463. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
  464. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  465. package/views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js +1 -1
  466. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
  467. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  468. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  469. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  470. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  471. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  472. package/views/3d/webgl-engine/lib/affectsGeometry.js +1 -1
  473. package/views/3d/webgl-engine/lib/bufferGeometryUtils.js +2 -0
  474. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +5 -5
  475. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  476. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +11 -11
  477. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  478. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  479. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  480. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  481. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  482. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  483. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  484. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  485. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  486. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  487. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  488. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  489. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  490. package/views/3d/webgl-engine/shaders/lineUniforms.js +2 -0
  491. package/views/DOMContainer.d.ts +28 -9
  492. package/views/DOMContainer.js +1 -1
  493. package/views/PopupView.d.ts +6 -0
  494. package/views/SceneView.d.ts +4 -10
  495. package/views/SceneView.js +1 -1
  496. package/views/VideoView.d.ts +27 -9
  497. package/views/View.d.ts +20 -19
  498. package/views/View.js +1 -1
  499. package/views/View2D.d.ts +13 -13
  500. package/views/draw/Draw.d.ts +1 -1
  501. package/views/draw/support/InteractiveHandle.js +1 -1
  502. package/views/draw/support/PluginContext.js +1 -1
  503. package/views/draw/support/managers/TooltipManager.js +1 -1
  504. package/views/interactive/options/SnappingOptions.d.ts +29 -12
  505. package/views/interactive/options/TooltipOptions.d.ts +9 -1
  506. package/views/interactive/options/ValueOptions.d.ts +9 -2
  507. package/views/interactive/options/ViewOptions.d.ts +82 -6
  508. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
  509. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  510. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  511. package/views/interactive/snapping/SnappingVisualizer.js +1 -1
  512. package/views/interactive/support/Units.d.ts +1 -0
  513. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  514. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  515. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  516. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  517. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  518. package/views/layers/GraphicsLayerView.d.ts +1 -0
  519. package/views/layers/ImageryLayerView.d.ts +1 -0
  520. package/views/layers/LayerView.js +1 -1
  521. package/views/layers/LineOfSightLayerView.d.ts +3 -4
  522. package/views/layers/ParquetLayerView.d.ts +15 -0
  523. package/views/layers/ParquetLayerView.js +1 -1
  524. package/views/layers/ViewshedLayerView.d.ts +5 -6
  525. package/views/support/layerViewUtils.js +1 -1
  526. package/views/support/projectionUtils.js +1 -1
  527. package/views/types.d.ts +3 -1
  528. package/webdoc/support/saveUtils.js +1 -1
  529. package/webdoc/support/unsupportedErrors.js +1 -1
  530. package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +2 -2
  531. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  532. package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +3 -3
  533. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +2 -2
  534. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -2
  535. package/widgets/BasemapGallery/types.d.ts +3 -3
  536. package/widgets/BasemapLayerList.js +1 -1
  537. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  538. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  539. package/widgets/BatchAttributeForm/expressions/expressionUtils.js +1 -1
  540. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +6 -0
  541. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  542. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  543. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  544. package/widgets/BatchAttributeForm.js +1 -1
  545. package/widgets/DirectionalPad.js +1 -1
  546. package/widgets/Editor/EditorViewModel.d.ts +13 -8
  547. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  548. package/widgets/Editor/workflowUtils.js +1 -1
  549. package/widgets/Editor.d.ts +19 -9
  550. package/widgets/Expand.js +1 -1
  551. package/widgets/FeatureForm.d.ts +2 -2
  552. package/widgets/FeatureForm.js +1 -1
  553. package/widgets/FeatureTable/FieldColumn.js +1 -1
  554. package/widgets/FeatureTable.js +1 -1
  555. package/widgets/Features/FeaturesDrillIn.js +1 -1
  556. package/widgets/Features.js +1 -1
  557. package/widgets/Legend.d.ts +1 -0
  558. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  559. package/widgets/OrientedImageryViewer/adapters/draw/HeightMeasurementAdapter.js +1 -1
  560. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  561. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  562. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  563. package/widgets/OrientedImageryViewer/components/ImageLocationViewModel.js +1 -1
  564. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  565. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  566. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  567. package/widgets/OrientedImageryViewer/types.d.ts +20 -0
  568. package/widgets/OrientedImageryViewer.d.ts +9 -1
  569. package/widgets/PanoramicVideoViewer.js +1 -1
  570. package/widgets/Print/PrintViewModel.d.ts +3 -2
  571. package/widgets/Print/PrintViewModel.js +1 -1
  572. package/widgets/Print.js +1 -1
  573. package/widgets/ScaleRangeSlider.js +1 -1
  574. package/widgets/Search/SearchResultRenderer.js +1 -1
  575. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  576. package/widgets/Sketch/SketchViewModel.d.ts +14 -9
  577. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  578. package/widgets/Sketch.d.ts +10 -10
  579. package/widgets/Track/TrackViewModel.d.ts +1 -1
  580. package/widgets/UtilityNetworkAssociations.js +1 -1
  581. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  582. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  583. package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
  584. package/widgets/UtilityNetworkTrace.js +1 -1
  585. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  586. package/widgets/ValuePicker.js +1 -1
  587. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  588. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  589. package/widgets/support/GridControls.js +1 -1
  590. package/widgets/support/PluginSettingsControls.js +1 -1
  591. package/widgets/support/SelectionList/FeatureItem.d.ts +9 -2
  592. package/widgets/support/SelectionToolbar.js +1 -1
  593. package/widgets/support/SnappingControls.d.ts +1 -1
  594. package/widgets/support/SnappingControls.js +1 -1
  595. package/widgets/support/componentsUtils.js +1 -1
  596. package/arcade/geometry/wkt.js +0 -2
  597. package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
  598. package/assets/esri/core/workers/chunks/00d24415bdeb0adae3df.js +0 -1
  599. package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
  600. package/assets/esri/core/workers/chunks/01b00fbf6a6a22d573ee.js +0 -1
  601. package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
  602. package/assets/esri/core/workers/chunks/050c4b212f2b5691db34.js +0 -1
  603. package/assets/esri/core/workers/chunks/05963f57cbe5a5249496.js +0 -1
  604. package/assets/esri/core/workers/chunks/05d865b2736f452ad2aa.js +0 -1
  605. package/assets/esri/core/workers/chunks/06e7400f5ebe0719b81c.js +0 -1
  606. package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
  607. package/assets/esri/core/workers/chunks/084222c00d263a534952.js +0 -1
  608. package/assets/esri/core/workers/chunks/0b36abcbf03037b4073d.js +0 -1
  609. package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
  610. package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +0 -1
  611. package/assets/esri/core/workers/chunks/1ef39aef6b33c530cbe4.js +0 -1
  612. package/assets/esri/core/workers/chunks/1f3148cebee1961249a4.js +0 -1
  613. package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
  614. package/assets/esri/core/workers/chunks/2164fcaced72b0fda31f.js +0 -1
  615. package/assets/esri/core/workers/chunks/25b0885d3bc190b28c04.js +0 -1
  616. package/assets/esri/core/workers/chunks/25d6c674b1c4829f040f.js +0 -1
  617. package/assets/esri/core/workers/chunks/260dcb79dfd0f981949f.js +0 -1
  618. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  619. package/assets/esri/core/workers/chunks/2e6a2f4d686b71249c0e.js +0 -1
  620. package/assets/esri/core/workers/chunks/2f9033890c465acff698.js +0 -1
  621. package/assets/esri/core/workers/chunks/303676d1b10676c9cab4.js +0 -1
  622. package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
  623. package/assets/esri/core/workers/chunks/32d08b571bbd996d4e6d.js +0 -1
  624. package/assets/esri/core/workers/chunks/33956f12505e72e60293.js +0 -1
  625. package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
  626. package/assets/esri/core/workers/chunks/37a636f61cfe89c6bfd1.js +0 -1
  627. package/assets/esri/core/workers/chunks/380cc538c1ab453870fa.js +0 -1
  628. package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
  629. package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
  630. package/assets/esri/core/workers/chunks/40fb1910f780e78c128c.js +0 -1
  631. package/assets/esri/core/workers/chunks/4310c8d2b40ae69c3681.js +0 -1
  632. package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +0 -1
  633. package/assets/esri/core/workers/chunks/4848f195eb93cc93dd15.js +0 -1
  634. package/assets/esri/core/workers/chunks/4cddd217383b9333f32e.js +0 -1
  635. package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
  636. package/assets/esri/core/workers/chunks/4fa59f8ed3b7b6239548.js +0 -1
  637. package/assets/esri/core/workers/chunks/57970d43cdcc5cf57a30.js +0 -1
  638. package/assets/esri/core/workers/chunks/5e184fd47e76eb976fa9.js +0 -1
  639. package/assets/esri/core/workers/chunks/5ea8809b6519c05ad9f6.js +0 -1
  640. package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
  641. package/assets/esri/core/workers/chunks/5fd099ca1024707387b2.js +0 -1
  642. package/assets/esri/core/workers/chunks/604344e45c0f27497188.js +0 -1
  643. package/assets/esri/core/workers/chunks/61ad8306ab79aca79505.js +0 -1
  644. package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
  645. package/assets/esri/core/workers/chunks/6469c0d18d3663e7da4b.js +0 -1
  646. package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
  647. package/assets/esri/core/workers/chunks/669e39c3437d7273f0c7.js +0 -1
  648. package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +0 -1
  649. package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +0 -1
  650. package/assets/esri/core/workers/chunks/71f739bb3f7350704af6.js +0 -1
  651. package/assets/esri/core/workers/chunks/750a9f3cdb96b966274a.js +0 -1
  652. package/assets/esri/core/workers/chunks/776565dd9741ba2ba151.js +0 -1
  653. package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
  654. package/assets/esri/core/workers/chunks/841f67baf6a1634ada48.js +0 -1
  655. package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
  656. package/assets/esri/core/workers/chunks/897fc8e78a0d54a5ff5a.js +0 -1
  657. package/assets/esri/core/workers/chunks/8af92bcc075e03e3e902.js +0 -1742
  658. package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
  659. package/assets/esri/core/workers/chunks/8e7a33cc1f83063043f2.js +0 -1
  660. package/assets/esri/core/workers/chunks/8fcfd515ee1b18c902e5.js +0 -1
  661. package/assets/esri/core/workers/chunks/9001e9a1e81bce175ddd.js +0 -1
  662. package/assets/esri/core/workers/chunks/9432feca48ca3e5849bd.js +0 -1
  663. package/assets/esri/core/workers/chunks/956a40f40bde416efe93.js +0 -1
  664. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
  665. package/assets/esri/core/workers/chunks/9673a9efec86040b8c13.js +0 -1
  666. package/assets/esri/core/workers/chunks/97dbbedea9fe03bd1306.js +0 -1
  667. package/assets/esri/core/workers/chunks/985b3f18cee87c3fe022.js +0 -1
  668. package/assets/esri/core/workers/chunks/9a7fc93cc693fd12b5d8.js +0 -1
  669. package/assets/esri/core/workers/chunks/9c0fd8baa00ee9733ba4.js +0 -1
  670. package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
  671. package/assets/esri/core/workers/chunks/a20526996d01386ec3b7.js +0 -1
  672. package/assets/esri/core/workers/chunks/a23272a7a47a95f6ddea.js +0 -1
  673. package/assets/esri/core/workers/chunks/a7edf7541569fef77cb3.js +0 -1
  674. package/assets/esri/core/workers/chunks/aa5b42e44d2959fdacd3.js +0 -1
  675. package/assets/esri/core/workers/chunks/ae2181805d8ba130babc.js +0 -1
  676. package/assets/esri/core/workers/chunks/b05a41a60e30935644be.js +0 -1
  677. package/assets/esri/core/workers/chunks/b0cfec11c758eed8095f.js +0 -1
  678. package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
  679. package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
  680. package/assets/esri/core/workers/chunks/ca7fb75e2c62e7d37122.js +0 -1
  681. package/assets/esri/core/workers/chunks/cbdebdfa5f2cded29d0d.js +0 -1
  682. package/assets/esri/core/workers/chunks/cbe6c0f32608cb504695.js +0 -1
  683. package/assets/esri/core/workers/chunks/cfae60b9d2f2939e9c16.js +0 -1
  684. package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
  685. package/assets/esri/core/workers/chunks/d56780290e0218d3e9de.js +0 -1
  686. package/assets/esri/core/workers/chunks/d6d5a9e73ee43d6066d3.js +0 -1
  687. package/assets/esri/core/workers/chunks/d89fe41c71c9621c41ae.js +0 -1
  688. package/assets/esri/core/workers/chunks/da18d96b35af20e73b3b.js +0 -1
  689. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
  690. package/assets/esri/core/workers/chunks/df0481bcc1613ee4b7af.js +0 -1
  691. package/assets/esri/core/workers/chunks/e22d45aeef293a5ffb78.js +0 -1
  692. package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
  693. package/assets/esri/core/workers/chunks/e7c60bd85abbd36cdc64.js +0 -1
  694. package/assets/esri/core/workers/chunks/ec9a2425b4a498054a19.js +0 -1
  695. package/assets/esri/core/workers/chunks/edf3be87a997f4f05b96.js +0 -1
  696. package/assets/esri/core/workers/chunks/f05de08e194a3f9b96f2.js +0 -1
  697. package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
  698. package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
  699. package/assets/esri/core/workers/chunks/f0c0c02730fe0d948fc1.js +0 -1
  700. package/assets/esri/core/workers/chunks/fd0254c6fc6c03ec11ba.js +0 -1
  701. package/assets/esri/core/workers/chunks/ffb3728e6ac428f62af1.js +0 -1
  702. package/views/3d/environment/EnvironmentManager.js +0 -2
  703. /package/{basemaps → basemapGallery}/support/basemapCompatibilityUtils.js +0 -0
@@ -11,15 +11,18 @@ import type Query from "../rest/support/Query.js";
11
11
  import type { ClonableMixin } from "../core/Clonable.js";
12
12
  import type { MultiOriginJSONSupportMixin } from "../core/MultiOriginJSONSupport.js";
13
13
  import type { AbortOptions } from "../core/promiseUtils.js";
14
+ import type { LayerEvents, LayerProperties } from "./Layer.js";
14
15
  import type { FeatureLayerCapabilities, FieldDomainOptions } from "./types.js";
15
16
  import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
16
17
  import type { CustomParametersMixin, CustomParametersMixinProperties } from "./mixins/CustomParametersMixin.js";
17
18
  import type { DataSeriesLayer, DataSeriesLayerProperties } from "./mixins/DataSeriesLayer.js";
19
+ import type { DisplayFilteredLayer, DisplayFilteredLayerProperties } from "./mixins/DisplayFilteredLayer.js";
18
20
  import type { FeatureEffectLayer, FeatureEffectLayerProperties } from "./mixins/FeatureEffectLayer.js";
19
21
  import type { FeatureReductionLayer, FeatureReductionLayerProperties } from "./mixins/FeatureReductionLayer.js";
20
22
  import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js";
21
23
  import type { OrderedLayer, OrderedLayerProperties } from "./mixins/OrderedLayer.js";
22
- import type { RefreshableLayer, RefreshableLayerProperties } from "./mixins/RefreshableLayer.js";
24
+ import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
25
+ import type { RefreshableLayer, RefreshableLayerEvents, RefreshEvent, RefreshableLayerProperties } from "./mixins/RefreshableLayer.js";
23
26
  import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
24
27
  import type { ParquetGeometryType } from "./support/parquetUtils.js";
25
28
  import type { DomainUnion, ParquetDataUnion, ParquetGeometryEncodingUnion } from "./support/types.js";
@@ -41,15 +44,15 @@ import type { UniqueValueRendererProperties } from "../renderers/UniqueValueRend
41
44
  import type { ClassBreaksRendererProperties } from "../renderers/ClassBreaksRenderer.js";
42
45
  import type { SimpleRendererProperties } from "../renderers/SimpleRenderer.js";
43
46
  import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
47
+ import type { PortalItemDataProperties } from "./support/PortalItemData.js";
44
48
  import type { ParquetPortalItemDataProperties } from "./support/ParquetPortalItemData.js";
45
49
  import type { ParquetFilesDataProperties } from "./support/ParquetFilesData.js";
46
50
  import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
47
- import type { LayerProperties } from "./Layer.js";
48
51
 
49
- export interface ParquetLayerProperties extends LayerProperties, CustomParametersMixinProperties, OperationalLayerProperties, RefreshableLayerProperties, ScaleRangeLayerProperties, DataSeriesLayerProperties, OrderedLayerProperties, BlendLayerProperties, FeatureEffectLayerProperties, FeatureReductionLayerProperties, Partial<Pick<ParquetLayer, "copyright" | "definitionExpression" | "geometryType" | "labelsVisible" | "legendEnabled" | "outFields" | "popupEnabled">> {
52
+ export interface ParquetLayerProperties extends LayerProperties, CustomParametersMixinProperties, PortalLayerProperties, OperationalLayerProperties, RefreshableLayerProperties, ScaleRangeLayerProperties, DataSeriesLayerProperties, DisplayFilteredLayerProperties, OrderedLayerProperties, BlendLayerProperties, FeatureEffectLayerProperties, FeatureReductionLayerProperties, Partial<Pick<ParquetLayer, "charts" | "copyright" | "definitionExpression" | "geometryType" | "hasM" | "hasZ" | "labelsVisible" | "legendEnabled" | "outFields" | "popupEnabled">> {
50
53
  /**
51
54
  * The data source for the ParquetLayer. Set this property to [parquet files](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ParquetFilesData/)
52
- * or a [portal item](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ParquetPortalItemData/) to define which Parquet content the layer loads.
55
+ * or a [portal item](https://developers.arcgis.com/javascript/latest/references/core/layers/support/PortalItemData/) to define which Parquet content the layer loads.
53
56
  *
54
57
  * @since 5.1
55
58
  * @example
@@ -65,14 +68,14 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
65
68
  * @example
66
69
  * // Create a parquet layer from arcgis online portal item
67
70
  * const layer = new ParquetLayer({
68
- * data: new ParquetPortalItemData({
71
+ * data: new PortalItemData({
69
72
  * portalItem: {
70
73
  * id: "6ab6f959c1684eb5a54db91644a89747",
71
74
  * },
72
75
  * }),
73
76
  * });
74
77
  */
75
- data?: (ParquetFilesDataProperties | (ParquetPortalItemDataProperties & { type: "portal-item" })) | null;
78
+ data?: (ParquetFilesDataProperties | (ParquetPortalItemDataProperties & { type: "portal-item" }) | (PortalItemDataProperties & { type: "portal-item" })) | null;
76
79
  /**
77
80
  * An array of fields in the layer.
78
81
  *
@@ -186,6 +189,18 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
186
189
  * @see [View2D.popup](https://developers.arcgis.com/javascript/latest/references/core/views/View2D/#popup)
187
190
  */
188
191
  popupTemplate?: PopupTemplateProperties | null;
192
+ /**
193
+ * Refresh interval of the layer in minutes. Value of `0` indicates no refresh.
194
+ *
195
+ * @since 5.2
196
+ * @see [Sample - GeoJSONLayer with dynamic URL](https://developers.arcgis.com/javascript/latest/sample-code/layers-geojson-refresh/)
197
+ * @see [RefreshableLayer.refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#refresh)
198
+ * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
199
+ * @example
200
+ * // the layer will be refreshed every minute.
201
+ * layer.refreshInterval = 1;
202
+ */
203
+ refreshInterval?: number;
189
204
  /**
190
205
  * The renderer assigned to the layer. The renderer defines how to
191
206
  * visualize each feature in the layer. Depending on the renderer type,
@@ -225,6 +240,16 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
225
240
  urls?: ReadonlyArrayOrCollection<string> | string[] | null;
226
241
  }
227
242
 
243
+ export interface ParquetLayerEvents extends RefreshableLayerEvents, LayerEvents {
244
+ /**
245
+ * Fires when the layer is refreshed using [refreshInterval](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#refreshInterval) or
246
+ * [refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/#refresh). The event payload indicates whether the layer's data has changed.
247
+ *
248
+ * @since 5.2
249
+ */
250
+ refresh: RefreshEvent;
251
+ }
252
+
228
253
  /**
229
254
  * The ParquetLayer enables visualization of [Parquet files](https://parquet.apache.org/docs/) on a map.
230
255
  * Parquet is a columnar storage format optimized for efficiently handling big data and distributed environments.
@@ -261,7 +286,7 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
261
286
  *
262
287
  * // Create a parquet layer from arcgis online portal item
263
288
  * const layer = new ParquetLayer({
264
- * data: new ParquetPortalItemData({
289
+ * data: new PortalItemData({
265
290
  * portalItem: {
266
291
  * id: "6ab6f959c1684eb5a54db91644a89747",
267
292
  * },
@@ -318,10 +343,16 @@ export interface ParquetLayerProperties extends LayerProperties, CustomParameter
318
343
  * @see [Geoparquet documentation](https://geoparquet.org/)
319
344
  */
320
345
  export default class ParquetLayer extends ParquetLayerSuperclass {
346
+ /**
347
+ * @deprecated
348
+ * Do not directly reference this property.
349
+ * Use EventNames and EventTypes helpers from \@arcgis/core/Evented
350
+ */
351
+ "@eventTypes": ParquetLayerEvents;
321
352
  /**
322
353
  * @example
323
354
  * const layer = new ParquetLayer({
324
- * data: new ParquetPortalItemData({
355
+ * data: new PortalItemData({
325
356
  * portalItem: {
326
357
  * id: "6ab6f959c1684eb5a54db91644a89747",
327
358
  * },
@@ -332,11 +363,17 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
332
363
  constructor(properties?: ParquetLayerProperties);
333
364
  /** Describes the layer's supported capabilities. */
334
365
  get capabilities(): FeatureLayerCapabilities | null | undefined;
366
+ /**
367
+ * Array of Chart Items of type WebMapWebChart available on the parquet layer.
368
+ *
369
+ * @since 5.2
370
+ */
371
+ accessor charts: object[] | null | undefined;
335
372
  /** Copyright information for the layer. */
336
373
  accessor copyright: string | null | undefined;
337
374
  /**
338
375
  * The data source for the ParquetLayer. Set this property to [parquet files](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ParquetFilesData/)
339
- * or a [portal item](https://developers.arcgis.com/javascript/latest/references/core/layers/support/ParquetPortalItemData/) to define which Parquet content the layer loads.
376
+ * or a [portal item](https://developers.arcgis.com/javascript/latest/references/core/layers/support/PortalItemData/) to define which Parquet content the layer loads.
340
377
  *
341
378
  * @since 5.1
342
379
  * @example
@@ -352,7 +389,7 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
352
389
  * @example
353
390
  * // Create a parquet layer from arcgis online portal item
354
391
  * const layer = new ParquetLayer({
355
- * data: new ParquetPortalItemData({
392
+ * data: new PortalItemData({
356
393
  * portalItem: {
357
394
  * id: "6ab6f959c1684eb5a54db91644a89747",
358
395
  * },
@@ -360,7 +397,7 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
360
397
  * });
361
398
  */
362
399
  get data(): ParquetDataUnion | null | undefined;
363
- set data(value: (ParquetFilesDataProperties | (ParquetPortalItemDataProperties & { type: "portal-item" })) | null | undefined);
400
+ set data(value: (ParquetFilesDataProperties | (ParquetPortalItemDataProperties & { type: "portal-item" }) | (PortalItemDataProperties & { type: "portal-item" })) | null | undefined);
364
401
  /**
365
402
  * The SQL where clause used to filter features on the client. Only the features that satisfy the definition
366
403
  * expression are displayed in the map. Setting a definition expression is useful
@@ -473,6 +510,36 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
473
510
  set geometryEncoding(value: ((GeometryEncodingWkbProperties & { type: "wkb" }) | (GeometryEncodingLocationProperties & { type: "location" })) | null | undefined);
474
511
  /** The geometry type of features in the layer. All features must be of the same type. */
475
512
  accessor geometryType: ParquetGeometryType | null | undefined;
513
+ /**
514
+ * Indicates whether the layer has m aware geometries.
515
+ * Use the `supportsM` property in the layer's [DataCapabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/types/#DataCapabilities)
516
+ * to verify if m-values are supported by the layer.
517
+ *
518
+ * - When `true`: The layer has m aware features. M-values are part of the geometry.
519
+ * - When `false`: The layer does not have m aware features. M-values are not part of the geometry.
520
+ *
521
+ * @default false
522
+ * @since 5.2
523
+ * @see [returnM](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/FeatureLayerBase/#returnM) for details regarding fetching m-values with features from a layer
524
+ * @see [Linear referencing](https://pro.arcgis.com/en/pro-app/latest/help/data/linear-referencing/introduction-to-linear-referencing.htm)
525
+ */
526
+ accessor hasM: boolean;
527
+ /**
528
+ * Indicates whether the layer has z aware geometries. Use the `supportsZ` property in the layer's [DataCapabilities](https://developers.arcgis.com/javascript/latest/references/core/layers/types/#DataCapabilities)
529
+ * to verify if z-values are supported by the layer.
530
+ *
531
+ * - When `true`: The layer has z aware features. Z-values are part of the geometry.
532
+ * - When `false`: The layer does not have z aware features. Z-values are not part of the geometry.
533
+ * > [!NOTE]
534
+ * > - Refer to [FeatureLayerBase.elevationInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/FeatureLayerBase/#elevationInfo) for details regarding placement and rendering
535
+ * > of features with z-values in 3D [SceneViews](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
536
+ *
537
+ * @default false
538
+ * @since 5.2
539
+ * @see [returnZ](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/FeatureLayerBase/#returnZ) for details regarding fetching z-values with features from a layer
540
+ * @see [Point.z](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/#z) for more information on how z-values are represented in geometries
541
+ */
542
+ accessor hasZ: boolean;
476
543
  /**
477
544
  * Returns `true` if the layer is loaded from a Parquet file without spatial data.
478
545
  * Non-spatial Parquet files do not have geometry object that represent geographic features.
@@ -581,6 +648,18 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
581
648
  */
582
649
  get popupTemplate(): PopupTemplate | null | undefined;
583
650
  set popupTemplate(value: PopupTemplateProperties | null | undefined);
651
+ /**
652
+ * Refresh interval of the layer in minutes. Value of `0` indicates no refresh.
653
+ *
654
+ * @since 5.2
655
+ * @see [Sample - GeoJSONLayer with dynamic URL](https://developers.arcgis.com/javascript/latest/sample-code/layers-geojson-refresh/)
656
+ * @see [RefreshableLayer.refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#refresh)
657
+ * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
658
+ * @example
659
+ * // the layer will be refreshed every minute.
660
+ * layer.refreshInterval = 1;
661
+ */
662
+ accessor refreshInterval: number;
584
663
  /**
585
664
  * The renderer assigned to the layer. The renderer defines how to
586
665
  * visualize each feature in the layer. Depending on the renderer type,
@@ -622,6 +701,7 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
622
701
  * });
623
702
  */
624
703
  get urls(): Collection<string>;
704
+ /** @deprecated */
625
705
  set urls(value: ReadonlyArrayOrCollection<string> | string[] | null | undefined);
626
706
  /**
627
707
  * Creates a popup template for the layer, populated with all the fields of the layer.
@@ -917,5 +997,13 @@ export default class ParquetLayer extends ParquetLayerSuperclass {
917
997
  * ```
918
998
  */
919
999
  queryObjectIds(query?: QueryProperties | null | undefined, options?: AbortOptions): Promise<ObjectId[]>;
1000
+ /**
1001
+ * Fetches all the data for the layer.
1002
+ *
1003
+ * @since 5.2
1004
+ * @see [RefreshableLayer.refreshInterval](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#refreshInterval)
1005
+ * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
1006
+ */
1007
+ refresh(): void;
920
1008
  }
921
- declare const ParquetLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof DataSeriesLayer & typeof OrderedLayer & typeof BlendLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer
1009
+ declare const ParquetLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof DataSeriesLayer & typeof DisplayFilteredLayer & typeof OrderedLayer & typeof BlendLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import a from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as c}from"../core/object.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../core/accessorSupport/decorators/writer.js";import m from"../geometry/Extent.js";import h from"../geometry/SpatialReference.js";import g from"../graphic/ParquetGraphicOrigin.js";import _ from"./Layer.js";import{ParquetSource as v}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as x}from"./mixins/DataSeriesLayer.js";import{FeatureEffectLayer as S}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as C}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{OrderedLayer as T}from"./mixins/OrderedLayer.js";import{RefreshableLayer as E}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as D}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as O,legendEnabled as k,popupEnabled as A}from"./support/commonProperties.js";import j from"./support/FeatureTemplate.js";import M from"./support/Field.js";import{defineFieldProperties as N}from"./support/fieldProperties.js";import{fixRendererFields as P}from"./support/fieldUtils.js";import F from"./support/GeometryEncodingLocation.js";import I from"./support/GeometryEncodingWkb.js";import L from"./support/LabelClass.js";import{reader as R}from"./support/labelingInfo.js";import z from"./support/ParquetFilesData.js";import B from"./support/ParquetPortalItemData.js";import{parquetGeometryTypeKebabDict as V}from"./support/parquetUtils.js";import{rendererTypes as H}from"../renderers/support/typeUtils.js";import U from"../rest/support/Query.js";import{createPopupTemplate as W}from"../support/popupUtils.js";import{utc as G}from"../time/constants.js";const K=N(),q=`__OBJECTID`,J={types:{key:`type`,base:null,typeMap:{wkb:I,location:F}},json:{name:`layerDefinition.geometryEncoding`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryEncoding`}}}}};let Y=class extends C(S(y(T(x(D(E(w(s(b(n(_))))))))))){constructor(e){super(e),this._emptyUrls=new r,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new g(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=q,this.operationalLayerType=`ParquetLayer`,this.outFields=null,this.persistenceEnabled=!!has(`parquetlayer-persistence-enabled`),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type=`parquet`,this.data=null}initialize(){this.addHandles(l(()=>this.source,`source-changed`,()=>{this.emit(`refresh`,{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){return this.addResolvingPromise(this._load(e)),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return G}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,n,r){let i=e.filter(e=>e.name!==q||e.type!==`oid`).map(e=>e.toJSON(r));c(n,i,t)}get isTable(){return this.geometryEncoding==null&&this.displayOptimization==null}set renderer(e){P(e,this.fieldsIndex),this._set(`renderer`,e)}get title(){let e=this._get(`title`);if(e&&this.originOf(`title`)!==`defaults`)return e;switch(this.data?.type){case`files`:{let t=this.data.urls?.at(0);e=t?u(t,[`parquet`]):null;break}case`portal-item`:e=this.data.portalItem?.title}return e||`Parquet`}set title(e){this._set(`title`,e)}writeData(e,t,n,r){if(!e)return;if(e.type===`portal-item`&&e.portalItem?.type!==`Parquet Feature Layer`){r.messages?.push(new a(`parquet-layer:unsupported-data`,`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));return}let i=e.write({},r);i&&(t.source=i)}get urls(){return this.data?.type===`files`?this.data.urls:this._emptyUrls}set urls(e){i(o.getLogger(this),`urls`,{replacement:`data`,version:`5.1`,warnOnce:!0}),this.data=new z({urls:this._normalizeUrls(e)})}createPopupTemplate(e){return W(this,e)}createQuery(){let e=new U;return e.returnGeometry=!0,e.outFields=[`*`],e.where=this.definitionExpression||`1=1`,e}async createSource(e){let t=new v({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let n=await this.source.queryFeatures(this._normalizeQuery(e),t),r=this.graphicOrigin;if(n?.features)for(let e of n.features)e.layer=e.sourceLayer=this,e.origin=r;return n}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if(this.data?.type===`portal-item`){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return U.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new r(e):e??new r}async _load(e){this.data?.type===`portal-item`&&await this.data.portalItem.load();let t=await this.createSource(e);this._set(`source`,t),this.read(t.sourceJSON,{origin:`service`}),[`fields`].forEach(e=>this.revertToOrigin(e,`service`)),P(this.renderer,this.fieldsIndex),this.spatialReference??=h.WGS84}};e([d({readOnly:!0,json:{read:!1,write:!1}})],Y.prototype,`capabilities`,null),e([d({type:String})],Y.prototype,`copyright`,void 0),e([d({readOnly:!0})],Y.prototype,`dateFieldsTimeZone`,null),e([d({readOnly:!0})],Y.prototype,`defaultPopupTemplate`,null),e([d({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Y.prototype,`definitionExpression`,void 0),e([d({type:Boolean})],Y.prototype,`returnM`,void 0),e([d({type:Boolean})],Y.prototype,`returnZ`,void 0),e([d()],Y.prototype,`displayOptimization`,void 0),e([d({type:[M],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:`fields`}}}})],Y.prototype,`fields`,void 0),e([p(`fields`)],Y.prototype,`writeFields`,null),e([d(K.fieldsIndex)],Y.prototype,`fieldsIndex`,void 0),e([d(J)],Y.prototype,`geometryEncoding`,void 0),e([d({type:m,json:{name:`extent`}})],Y.prototype,`fullExtent`,void 0),e([d({type:V.apiValues,json:{name:`layerDefinition.geometryType`,read:{reader:V.read},write:{writer:V.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryType`,reader:V.read}}}}})],Y.prototype,`geometryType`,void 0),e([d({readOnly:!0,clonable:!1})],Y.prototype,`graphicOrigin`,void 0),e([d(O)],Y.prototype,`labelsVisible`,void 0),e([d({type:[L],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:R},write:!0}})],Y.prototype,`labelingInfo`,void 0),e([d(k)],Y.prototype,`legendEnabled`,void 0),e([d()],Y.prototype,`file`,void 0),e([d({type:String,readOnly:!0})],Y.prototype,`objectIdField`,void 0),e([d({type:[`ParquetLayer`]})],Y.prototype,`operationalLayerType`,void 0),e([d(K.outFields)],Y.prototype,`outFields`,void 0),e([d(A)],Y.prototype,`popupEnabled`,void 0),e([d({type:t,json:{name:`popupInfo`,write:!0}})],Y.prototype,`popupTemplate`,void 0),e([d({types:H,json:{name:`layerDefinition.drawingInfo.renderer`,write:!0,origins:{service:{read:{source:`drawingInfo.renderer`}}}}})],Y.prototype,`renderer`,null),e([d({type:v,readOnly:!0,cast:null,json:{read:!1}})],Y.prototype,`source`,void 0),e([d({type:h,json:{name:`layerDefinition.spatialReference`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`extent.spatialReference`}}}}})],Y.prototype,`spatialReference`,void 0),e([d({type:[j]})],Y.prototype,`templates`,void 0),e([d()],Y.prototype,`title`,null),e([d({json:{read:!1},readOnly:!0})],Y.prototype,`type`,void 0),e([d({types:{key:`type`,base:null,typeMap:{files:z,"portal-item":B}},json:{name:`source`,origins:{"web-map":{write:{target:`source`,ignoreOrigin:!0}}}}})],Y.prototype,`data`,void 0),e([p(`web-map`,`data`)],Y.prototype,`writeData`,null),e([d({type:r.ofType(String),json:{read:!1,write:!1}})],Y.prototype,`urls`,null),Y=e([f(`esri.layers.ParquetLayer`)],Y);export{Y as default};
2
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import a from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as ee}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as s}from"../core/object.js";import{throwIfAbortError as c}from"../core/promiseUtils.js";import{on as l}from"../core/reactiveUtils.js";import{getFilename as u}from"../core/urlUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{reader as f}from"../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as m}from"../core/accessorSupport/decorators/writer.js";import{createTypeReader as h}from"../core/accessorSupport/extensions/serializableProperty/reader.js";import g from"../geometry/Extent.js";import _ from"../geometry/SpatialReference.js";import v from"../graphic/ParquetGraphicOrigin.js";import y from"./Layer.js";import{ParquetSource as b}from"./graphics/sources/ParquetSource.js";import{BlendLayer as x}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as C}from"./mixins/DataSeriesLayer.js";import{DisplayFilteredLayer as w}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as T}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as E}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as D}from"./mixins/OperationalLayer.js";import{OrderedLayer as O}from"./mixins/OrderedLayer.js";import{PortalLayer as k}from"./mixins/PortalLayer.js";import{RefreshableLayer as A}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{labelsVisible as M,legendEnabled as N,popupEnabled as te}from"./support/commonProperties.js";import P from"./support/FeatureTemplate.js";import F from"./support/Field.js";import{defineFieldProperties as I}from"./support/fieldProperties.js";import{fixRendererFields as L}from"./support/fieldUtils.js";import R from"./support/GeometryEncodingLocation.js";import z from"./support/GeometryEncodingWkb.js";import B from"./support/LabelClass.js";import{reader as V}from"./support/labelingInfo.js";import H from"./support/ParquetFilesData.js";import{parquetGeometryTypeKebabDict as U}from"./support/parquetUtils.js";import W from"./support/PortalItemData.js";import{rendererTypes as G}from"../renderers/support/typeUtils.js";import K from"../rest/support/Query.js";import{createPopupTemplate as q}from"../support/popupUtils.js";import{utc as J}from"../time/constants.js";const Y=I(),X=`__OBJECTID`,Z={key:`type`,base:null,typeMap:{files:H,"portal-item":W},errorContext:`parquet-data`},Q=h({types:Z}),ne={types:{key:`type`,base:null,typeMap:{wkb:z,location:R}},json:{name:`layerDefinition.geometryEncoding`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryEncoding`}}}}};let $=class extends E(T(x(O(w(C(j(A(D(k(ee(S(n(y))))))))))))){constructor(e){super(e),this._emptyUrls=new r,this.charts=null,this.copyright=null,this.definitionExpression=null,this.returnM=void 0,this.returnZ=void 0,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.geometryEncoding=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasM=!1,this.hasZ=!1,this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=X,this.operationalLayerType=`ParquetLayer`,this.outFields=null,this.persistenceEnabled=!!has(`parquetlayer-persistence-enabled`),this.popupTemplate=null,this.source=null,this.spatialReference=null,this.templates=null,this.type=`parquet`,this.data=null}initialize(){this.addHandles(l(()=>this.source,`source-changed`,()=>{this.emit(`refresh`,{dataChanged:!0})}))}destroy(){this.source?.destroy()}async load(e){let t=this.loadFromPortal({supportedTypes:[`Parquet Feature Layer`],supportsData:!0},e).catch(c).then(()=>this._load(e));return this.addResolvingPromise(t),this}get capabilities(){return this.source?.capabilities}get dateFieldsTimeZone(){return J}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,n,r){let i=e.filter(e=>e.name!==X||e.type!==`oid`).map(e=>e.toJSON(r));s(n,i,t)}get isTable(){return this.geometryEncoding==null&&this.displayOptimization==null}set renderer(e){L(e,this.fieldsIndex),this._set(`renderer`,e)}get title(){let e=this._get(`title`);if(e&&this.originOf(`title`)!==`defaults`)return e;switch(this.data?.type){case`files`:{let t=this.data.urls?.at(0);e=t?u(t,[`parquet`]):null;break}case`portal-item`:e=this.data.portalItem?.title}return e||`Parquet`}set title(e){this._set(`title`,e)}readData(e,t,n){if(!(`itemId`in t&&t.itemId))return Q(e,t,n)}writeData(e,t,n,r){if(!e)return;if(e.type===`portal-item`&&e.portalItem?.type!==`Parquet Feature Layer`){r.messages?.push(new a(`parquet-layer:unsupported-data`,`Portal item with type '${e.portalItem?.type}' is not supported in web maps`,{layer:this,itemId:e.portalItem?.id}));return}let i=e.write({},r);i&&(t.source=i)}get urls(){return this.data?.type===`files`?this.data.urls:this._emptyUrls}set urls(e){i(o.getLogger(this),`urls`,{replacement:`data`,version:`5.1`,warnOnce:!0}),this.data=new H({urls:this._normalizeUrls(e)})}refresh(e){super.refresh(e)}createPopupTemplate(e){return q(this,e)}createQuery(){let e=new K;return e.returnGeometry=!0,e.outFields=[`*`],e.where=this.definitionExpression||`1=1`,e}async createSource(e){let t=new b({layer:this});return await t.load(e),t}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();let n=await this.source.queryFeatures(this._normalizeQuery(e),t),r=this.graphicOrigin;if(n?.features)for(let e of n.features)e.layer=e.sourceLayer=this,e.origin=r;return n}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}async hasDataChanged(){if(this.data?.type===`portal-item`){let e=this.data.portalItem,t=e.modified?.getTime();if(await e.reload(),t===e.modified?.getTime())return!1}return await this.source.reload(null),!0}_normalizeQuery(e){return K.from(e)??this.createQuery()}_normalizeUrls(e){return Array.isArray(e)?new r(e):e??new r}async _load(e){this.portalItem?.url&&(this.data=new W({portalItem:this.portalItem.clone()})),this.data?.type===`portal-item`&&await this.data.portalItem.load();let t=await this.createSource(e);this._set(`source`,t),this.read(t.sourceJSON,{origin:`service`}),[`fields`].forEach(e=>this.revertToOrigin(e,`service`)),L(this.renderer,this.fieldsIndex),this.spatialReference??=_.WGS84}};e([d({readOnly:!0,json:{read:!1,write:!1}})],$.prototype,`capabilities`,null),e([d({json:{origins:{"web-scene":{write:!1}},write:!0}})],$.prototype,`charts`,void 0),e([d({type:String})],$.prototype,`copyright`,void 0),e([d({readOnly:!0})],$.prototype,`dateFieldsTimeZone`,null),e([d({readOnly:!0})],$.prototype,`defaultPopupTemplate`,null),e([d({type:String,json:{name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],$.prototype,`definitionExpression`,void 0),e([d({type:Boolean})],$.prototype,`returnM`,void 0),e([d({type:Boolean})],$.prototype,`returnZ`,void 0),e([d()],$.prototype,`displayOptimization`,void 0),e([d({type:[F],json:{name:`layerDefinition.fields`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:`fields`}}}})],$.prototype,`fields`,void 0),e([m(`fields`)],$.prototype,`writeFields`,null),e([d(Y.fieldsIndex)],$.prototype,`fieldsIndex`,void 0),e([d(ne)],$.prototype,`geometryEncoding`,void 0),e([d({type:g,json:{name:`extent`}})],$.prototype,`fullExtent`,void 0),e([d({type:U.apiValues,json:{name:`layerDefinition.geometryType`,read:{reader:U.read},write:{writer:U.write,ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`geometryType`,reader:U.read}}}}})],$.prototype,`geometryType`,void 0),e([d({readOnly:!0,clonable:!1})],$.prototype,`graphicOrigin`,void 0),e([d({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],$.prototype,`hasM`,void 0),e([d({type:Boolean,json:{read:!1,write:!1,origins:{service:{read:!0}}}})],$.prototype,`hasZ`,void 0),e([d(M)],$.prototype,`labelsVisible`,void 0),e([d({type:[B],json:{name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:V},write:!0}})],$.prototype,`labelingInfo`,void 0),e([d(N)],$.prototype,`legendEnabled`,void 0),e([d()],$.prototype,`file`,void 0),e([d({type:String,readOnly:!0})],$.prototype,`objectIdField`,void 0),e([d({type:[`ParquetLayer`]})],$.prototype,`operationalLayerType`,void 0),e([d(Y.outFields)],$.prototype,`outFields`,void 0),e([d(te)],$.prototype,`popupEnabled`,void 0),e([d({type:t,json:{name:`popupInfo`,write:!0}})],$.prototype,`popupTemplate`,void 0),e([d({types:G,json:{name:`layerDefinition.drawingInfo.renderer`,write:!0,origins:{service:{read:{source:`drawingInfo.renderer`}}}}})],$.prototype,`renderer`,null),e([d({type:b,readOnly:!0,cast:null,json:{read:!1}})],$.prototype,`source`,void 0),e([d({type:_,json:{name:`layerDefinition.spatialReference`,write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{read:{source:`extent.spatialReference`}}}}})],$.prototype,`spatialReference`,void 0),e([d({type:[P]})],$.prototype,`templates`,void 0),e([d()],$.prototype,`title`,null),e([d({json:{read:!1},readOnly:!0})],$.prototype,`type`,void 0),e([d({types:Z,json:{name:`source`,origins:{"web-map":{read:{source:`source`},write:{target:`source`,ignoreOrigin:!0}}}}})],$.prototype,`data`,void 0),e([f(`web-map`,`data`)],$.prototype,`readData`,null),e([m(`web-map`,`data`)],$.prototype,`writeData`,null),e([d({type:r.ofType(String),json:{read:!1,write:!1}})],$.prototype,`urls`,null),$=e([p(`esri.layers.ParquetLayer`)],$);export{$ as default};
@@ -107,7 +107,6 @@ export interface SketchLayerProperties extends LayerProperties, PortalLayerPrope
107
107
  * @see [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/)
108
108
  * @see [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/)
109
109
  * @see [SketchViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/)
110
- * @see [Sample - MapNotesLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-mapnoteslayer/)
111
110
  */
112
111
  export default class SketchLayer extends SketchLayerSuperclass {
113
112
  constructor(properties?: SketchLayerProperties);
@@ -119,11 +119,7 @@ export interface VectorTileLayerProperties extends LayerProperties, APIKeyMixinP
119
119
  *
120
120
  * @default 0
121
121
  * @since 4.31
122
- * @see [refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#refresh)
123
- * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#event-refresh)
124
- * @example
125
- * // the layer will be refreshed every 15 minutes.
126
- * layer.refreshInterval = 15;
122
+ * @see [Sample - GeoJSONLayer with dynamic URL](https://developers.arcgis.com/javascript/latest/sample-code/layers-geojson-refresh/)
127
123
  * @see [RefreshableLayer.refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#refresh)
128
124
  * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
129
125
  * @example
@@ -541,11 +537,7 @@ export default class VectorTileLayer extends VectorTileLayerSuperclass {
541
537
  *
542
538
  * @default 0
543
539
  * @since 4.31
544
- * @see [refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#refresh)
545
- * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#event-refresh)
546
- * @example
547
- * // the layer will be refreshed every 15 minutes.
548
- * layer.refreshInterval = 15;
540
+ * @see [Sample - GeoJSONLayer with dynamic URL](https://developers.arcgis.com/javascript/latest/sample-code/layers-geojson-refresh/)
549
541
  * @see [RefreshableLayer.refresh()](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#refresh)
550
542
  * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
551
543
  * @example
@@ -748,8 +740,6 @@ export default class VectorTileLayer extends VectorTileLayerSuperclass {
748
740
  * Fetches all the data for the layer. This method does not fetch the layer's style. User must call [loadStyle()](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#loadStyle) to fetch the style.
749
741
  *
750
742
  * @since 4.31
751
- * @see [refreshInterval](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#refreshInterval)
752
- * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/#event-refresh)
753
743
  * @see [RefreshableLayer.refreshInterval](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#refreshInterval)
754
744
  * @see [refresh event](https://developers.arcgis.com/javascript/latest/references/core/layers/mixins/RefreshableLayer/#event-refresh)
755
745
  */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../core/Error.js";import"../../core/has.js";import{onAbort as t,throwIfAborted as n}from"../../core/promiseUtils.js";import{fromValues as r,create as i}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{multiply as a}from"../../core/libs/gl-matrix-2/math/mat2d.js";async function o(r,o,l,u,d,f,p,m,h){let g=s(r,o,l),_=i();a(_,g,u);let v=i();a(v,_,p);let y=new OffscreenCanvas(o,l),b=y.getContext(`2d`);if(!b)throw new e(`geospatial-pdf-layer:invalid-canvas`,`Failed to create bitmap canvas context.`);if(m.length){let e=c(m,r,o,l);b.save(),b.fillStyle=`white`,b.fill(e),b.restore()}let x=d.render({canvas:null,canvasContext:b,viewport:f,transform:v,annotationMode:0,background:`rgba(0,0,0,0)`}),S=t(h?.signal,()=>{x.cancel()});try{await x.promise}catch(e){throw n(h),e}finally{S?.remove()}return y}function s(e,t,n){let i=(e.xmax-e.xmin)/t,a=(e.ymax-e.ymin)/n;return r(1/i,0,0,-1/a,-e.xmin/i,e.ymax/a)}function c(e,t,n,r){let i=new Path2D,a=s(t,n,r);for(let t=0;t<e.length;t++){let[n,r]=e[t],o=a[0]*n+a[2]*r+a[4],s=a[1]*n+a[3]*r+a[5];t===0?i.moveTo(o,s):i.lineTo(o,s)}return i.closePath(),i}export{o as renderBitmap};
2
+ import e from"../../core/Error.js";import"../../core/has.js";import{onAbort as t,throwIfAborted as n}from"../../core/promiseUtils.js";import{fromValues as r,create as i}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{multiply as a}from"../../core/libs/gl-matrix-2/math/mat2d.js";async function o(r,o,l,u,d,f,p,m,h){let g=s(r,o,l),_=i();a(_,g,u);let v=i();a(v,_,p);let y=new OffscreenCanvas(o,l),b=y.getContext(`2d`);if(!b)throw new e(`geospatial-pdf-layer:invalid-canvas`,`Failed to create bitmap canvas context.`);if(m.length){let e=c(m,r,o,l);b.save(),b.fillStyle=`white`,b.fill(e),b.restore()}let x=d.render({canvas:null,canvasContext:b,viewport:f,transform:v,annotationMode:2,background:`rgba(0,0,0,0)`}),S=t(h?.signal,()=>{x.cancel()});try{await x.promise}catch(e){throw n(h),e}finally{S?.remove()}return y}function s(e,t,n){let i=(e.xmax-e.xmin)/t,a=(e.ymax-e.ymin)/n;return r(1/i,0,0,-1/a,-e.xmin/i,e.ymax/a)}function c(e,t,n,r){let i=new Path2D,a=s(t,n,r);for(let t=0;t<e.length;t++){let[n,r]=e[t],o=a[0]*n+a[2]*r+a[4],s=a[1]*n+a[3]*r+a[5];t===0?i.moveTo(o,s):i.lineTo(o,s)}return i.closePath(),i}export{o as renderBitmap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{EventEmitter as n}from"../../../core/Evented.js";import r from"../../../core/Logger.js";import{fromRect as i,create as a}from"../../../geometry/support/aaBoundingBox.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as s}from"../featureConversionUtils.js";import{BoundsStore as c}from"./BoundsStore.js";import{cleanFromGeometryEngine as l}from"./geometryUtils.js";import{optimizedFeatureQueryEngineAdapter as u}from"./optimizedFeatureQueryEngineAdapter.js";const d=a();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new c,this._featuresById=new Map,this._usedMemory=0,this.events=new n,this.featureAdapter=u}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{t.geometry!=null&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(this.fullBounds==null)return null;let[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:l(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(t){let n=t.map(e=>this._upsert(e));return this._emitChanged(),n.filter(e)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let n of e){let e=this._boundsStore.get(n.objectId);e&&t(i(d,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit(`changed`,void 0)}_add(e){if(!e)return;let n=e.objectId;if(n==null){r.getLogger(`esri.layers.graphics.data.FeatureStore`).error(new t(`featurestore:invalid-feature`,`feature id is missing`,{feature:e}));return}let i=this._featuresById.get(n),a;i?(e.displayId=i.displayId,a=this._boundsStore.get(n),this._boundsStore.delete(n),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):this.onFeatureAdd!=null&&this.onFeatureAdd(e),e.geometry?.coords?.length?(a=s(a??o(),e.geometry),a!=null&&this._boundsStore.set(n,a),this._featuresById.set(n,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(n,null),this._featuresById.set(n,e))}_upsert(e){let n=e?.objectId;if(n==null)return r.getLogger(`esri.layers.graphics.data.FeatureStore`).error(new t(`featurestore:invalid-feature`,`feature id is missing`,{feature:e})),null;let i=this._featuresById.get(n);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:a,attributes:c}=e;for(let e in c)i.attributes[e]=c[e];return a&&(i.geometry=a,this._boundsStore.set(n,s(o(),a)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){this.onFeatureRemove!=null&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}export{f as default};
2
+ import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{EventEmitter as n}from"../../../core/Evented.js";import r from"../../../core/Logger.js";import{fromRect as i,create as a}from"../../../geometry/support/aaBoundingBox.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as s}from"../featureConversionUtils.js";import{BoundsStore as c}from"./BoundsStore.js";import{optimizedFeatureQueryEngineAdapter as l}from"./optimizedFeatureQueryEngineAdapter.js";const u=a();class d{constructor(e){this.geometryInfo=e,this._boundsStore=new c,this._featuresById=new Map,this._usedMemory=0,this.events=new n,this.featureAdapter=l}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{t.geometry!=null&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(this.fullBounds==null)return null;let[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(t){let n=t.map(e=>this._upsert(e));return this._emitChanged(),n.filter(e)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let n of e){let e=this._boundsStore.get(n.objectId);e&&t(i(u,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit(`changed`,void 0)}_add(e){if(!e)return;let n=e.objectId;if(n==null){r.getLogger(`esri.layers.graphics.data.FeatureStore`).error(new t(`featurestore:invalid-feature`,`feature id is missing`,{feature:e}));return}let i=this._featuresById.get(n),a;i?(e.displayId=i.displayId,a=this._boundsStore.get(n),this._boundsStore.delete(n),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):this.onFeatureAdd!=null&&this.onFeatureAdd(e),e.geometry?.coords?.length?(a=s(a??o(),e.geometry),a!=null&&this._boundsStore.set(n,a),this._featuresById.set(n,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(n,null),this._featuresById.set(n,e))}_upsert(e){let n=e?.objectId;if(n==null)return r.getLogger(`esri.layers.graphics.data.FeatureStore`).error(new t(`featurestore:invalid-feature`,`feature id is missing`,{feature:e})),null;let i=this._featuresById.get(n);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:a,attributes:c}=e;for(let e in c)i.attributes[e]=c[e];return a&&(i.geometry=a,this._boundsStore.set(n,s(o(),a)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){this.onFeatureRemove!=null&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}export{d as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as n}from"../../../core/lang.js";import r from"../../../geometry/SpatialReference.js";import{polygonCentroid as i,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as o,getGeometryExtent as s,expandExtent as c}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as l}from"../../../geometry/support/quantizationUtils.js";import{isValid as u,equals as d}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as f}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as p,isCoordinate as m,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{cleanFromGeometryEngine as _,getGeometry as v,transformCentroid as y}from"./geometryUtils.js";import{project as b}from"./projectionSupport.js";import{getDateInNumber as x}from"./queryUtils.js";import{SnappingCandidateEdge as S,SnappingCandidateVertex as C}from"./SnappingCandidate.js";import{isDateField as w,isDateOnlyField as T,isTimestampOffsetField as E,isStringField as D,isTimeOnlyField as O}from"../../support/fieldUtils.js";import k from"../../../rest/support/AutoIntervalBinParameters.js";import A from"../../../rest/support/DateBinParameters.js";import{unitsDict as j}from"../../../rest/support/DateBinUtils.js";import M from"../../../rest/support/FixedBoundariesBinParameters.js";import N from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as P,calculateStatistics as F,processSummaryStatisticsResult as I,calculateUniqueValuesCount as L,createUVResult as R,calculateClassBreaks as z,resolveCBResult as B,calculateHistogram as V,calculatePercentile as H,binIndex as U,getBinParams as W,isNullCountSupported as G,getAttributeComparator as K}from"../../../statistics/utils.js";import{utc as q}from"../../../time/constants.js";import{DateTime as J}from"luxon";const Y=t(()=>import(`../../../geometry/operators/json/convexHullOperator.js`));class X{constructor(e,t,n){this.items=e,this.query=t,this.geometryType=n.geometryType,this.hasZ=!!t.returnZ&&n.hasZ,this.hasM=!!t.returnM&&n.hasM,this.fieldsIndex=n.fieldsIndex,this.spatialReference=n.spatialReference,this.featureAdapter=n.featureAdapter,this.featureIdInfo=n.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:n,outStatistics:r}=this.query;if(!t?.length)return 1;let i=new Map,a=new Map,o=new Set;for(let s of r){let{statisticType:r}=s,c=r===`exceedslimit`?void 0:s.onStatisticField;if(!a.has(c)){let n=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,i);n.push(t)}a.set(c,this._calculateUniqueValues(n,this.items,e.returnDistinctValues))}let l=a.get(c);for(let t in l){let{data:r,items:i}=l[t],a=r.join(`,`);(!n||e.validateItems(i,n))&&o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>e.statisticType===`exceedslimit`)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;u(this.query.outSR)&&!d(t.spatialReference,this.query.outSR)?e.queryGeometry=_({spatialReference:this.query.outSR,...b(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=_({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,n){let r=this.featureAdapter,{point:i}=e,a=typeof e.distance==`number`?e.distance:e.distance.x,o=typeof e.distance==`number`?e.distance:e.distance.y;function s(e,t){let n=(e-i.x)/a,r=(t-i.y)/o;return n*n+r*r}let c={candidates:[]},l=this.geometryType===`esriGeometryPolygon`,u=this.geometryType===`esriGeometryPolyline`||this.geometryType===`esriGeometryPoint`,d=this._getPointCreator(t,this.spatialReference,n),g=new Q(null,0),_=new Q(null,0),v={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),n=r.getGeometryWithCurves?.(e);if(n!=null){b(n,t);continue}let i=r.getGeometry(e);i!=null&&y(i,t)}return c.candidates.sort((e,t)=>e.distance-t.distance),c;function y(t,n){let{coords:r,stride:a}=t,o=t.isPoint?te:t.lengths;if(g.coords=r,_.coords=r,e.returnEdge){let e=0;for(let t=0;t<o.length;t++){let r=o[t],u=e;for(let t=0;t<r;t++,e+=a){if(!l&&t===r-1||(g.coordsIndex=e,_.coordsIndex=t===r-1?u:e+a,!ee(v,i,g,_)))continue;let o=s(v.x,v.y);o<=1&&c.candidates.push(new S(n,d(v),Math.sqrt(o),d(g),d(_)))}}}if(e.vertexMode===`all`){let e=0;for(let t=0;t<o.length;t++){let r=o[t],i=e,u=_;u.coordsIndex=i;for(let t=0;t<r;t++,e+=a){if(g.coordsIndex=e,l&&t===r-1&&g.x===u.x&&g.y===u.y)continue;let i=s(g.x,g.y);i<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(i)))}}}else if(u&&e.vertexMode===`ends`){let e=0,t=[];for(let n=0;n<o.length;n++){t.push(e);let r=o[n];e+=r*a,r>1&&t.push(e-a)}for(let e of t){g.coordsIndex=e;let t=s(g.x,g.y);t<=1&&c.candidates.push(new C(n,d(g),Math.sqrt(t)))}}}function b(t,n){let{candidates:r}=c,a={x:0,y:0,z:0};if(e.returnEdge){let e=[i.x,i.y],o=new Q(e,0),c=new Q(e,0);for(let{segments:i}of t.parts)for(let{start:t,curve:l}of i){let{curvePoint:i}=f(t,l,e),u=s(...i);if(u>1)continue;[a.x,a.y]=i,o.coords=t,c.coords=p(l);let g=m(l)?null:h(l);r.push(new S(n,d(a),Math.sqrt(u),d(o),d(c),!1,g))}}function o(e){a.x=t.vertexXY[e*2],a.y=t.vertexXY[e*2+1];let i=s(a.x,a.y);i>1||(a.z=t.vertexZ?.[e]??0,r.push(new C(n,d(a),Math.sqrt(i))))}if(e.vertexMode===`all`){let{vertexCount:e}=t;for(let t=0;t<e;++t)o(t)}else if(e.vertexMode===`ends`)switch(t.type){case`point`:o(0);break;case`polyline`:for(let e=0;e<t.partCount;++e){let n=t.partOffsets[e],r=t.partOffsets[e+1]-1;o(n),r!==n&&o(r)}}}}_getPointCreator(e,t,n){let r=n!=null&&!d(t,n)?e=>b(e,t,n):e=>e,{hasZ:i}=this;return i&&e?({x:e,y:t,z:n})=>r({x:e,y:t,z:n}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,minValue:o,maxValue:s,scale:c,timeZone:l,outStatisticTypes:u}=e,d=this.fieldsIndex.get(t),f=w(d)||T(d)||E(d),p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:c,timeZone:l},this.items),m=G({normalizationType:i,normalizationField:r,minValue:o,maxValue:s}),h={value:.5,fieldType:d?.type},g=D(d)?P({values:p,supportsNullCount:m,percentileParams:h,outStatisticTypes:u}):F({values:p,minValue:o,maxValue:s,useSampleStdDev:!i,supportsNullCount:m,percentileParams:h,outStatisticTypes:u});return I(g,u,f)}async createUniqueValuesResponse(e){let{field:t,valueExpression:n,domains:r,returnAllCodedValues:i,scale:a,timeZone:o}=e,s=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:n,scale:a,timeZone:o},this.items,!1),c=L(s);return R(c,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items),m=z(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u});return B(m,o)}async createHistogramResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items);return V(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u})}_sortFeatures(e,t,n){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:i,fieldInfo:a}=$(r,this.fieldsIndex);e.sort((e,r)=>t(n(e,i,a),n(r,i,a)))}}_topNFeatures(t,n,r,i){if(t.length>1&&n?.length){let a=n.map(e=>{let{compare:t,fieldOrExpression:n,fieldInfo:r}=$(e,this.fieldsIndex);return(e,a)=>t(i(e,n,r),i(a,n,r))}).reduceRight((e,t)=>(n,r)=>{let i=t(n,r);return i!==0&&!Number.isNaN(i)?i:e(n,r)}),o=[];for(let n of t)e(o,n,r,a);return o}return t.slice(0,r)}_createFeatureQueryResponse(e){let{items:t,geometryType:n,hasM:r,hasZ:i,featureIdInfo:a,spatialReference:o}=this,{outFields:s,outSR:c,quantizationParameters:u,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:m}=e,h=d!=null&&t.length>(f||0)+d,g=s&&(s.includes(`*`)?[...this.fieldsIndex.fields]:s.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:n,hasM:r&&m,hasZ:i&&p,objectIdFieldName:a.type===`object-id`?a.fieldName:null,spatialReference:_(c||o),transform:u&&l(u)||null}}_createFeatures(e,t){let n=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:s,returnCentroid:c,maxAllowableOffset:u,resultOffset:d,resultRecordCount:f,returnZ:p=!1,returnM:m=!1}=e,h=i&&p,_=r&&m,b,x=d||0,S=f==null?null:x+f;S!=null&&S<=5e3&&S<t.length?b=this._topNFeatures(t,a,S,(e,t,r)=>n.getFieldValue(e,t,r)):(b=[...t],this._sortFeatures(b,a,(e,t,r)=>n.getFieldValue(e,t,r))),(x>0||S!=null)&&(b=b.slice(x,S??void 0));let C=[],w=0;if(!this.geometryType||!s&&!c)for(let e of b){let t=n.getAttributes(e);t&&(C[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}else{let e=l(o)??void 0,t=this.geometryType===`esriGeometryPolygon`||this.geometryType===`esriGeometryPolyline`;if(s&&!c)for(let r of b){let i=this.featureAdapter.getGeometry(r),a=this._addFeatureJSONMetadata(r,{attributes:n.getAttributes(r),geometry:v(this.geometryType,i,u,e,h,_)});t&&i&&!a.geometry&&(a.centroid=y(this,this.featureAdapter.getCentroid(r,this),e)),C[w++]=a}else if(!s&&c)for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:y(this,this.featureAdapter.getCentroid(t,this),e),geometry:v(this.geometryType,this.featureAdapter.getGeometry(t),u,e,h,_)})}return C}_addFeatureJSONMetadata(e,t){let n=this.featureAdapter.getMetadata?.(e);return n!==void 0&&(t.metadata=n),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,n=1/0,r=1/0;for(let e of this.query.outStatistics??[])if(e.statisticType===`exceedslimit`){t=e.maxPointCount==null?1/0:e.maxPointCount,n=e.maxRecordCount==null?1/0:e.maxRecordCount,r=e.maxVertexCount==null?1/0:e.maxVertexCount;break}return e=this.geometryType===`esriGeometryPoint`?this.items.length>t:this.items.length>n||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:`exceedslimit`,type:`esriFieldTypeInteger`,alias:`exceedslimit`,sqlType:`sqlTypeInteger`,domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,n={attributes:{}}){let r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=new g(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:f,resultRecordCount:p}=e,m=u?.length,h=!!m,_=h?u[0]:null,v=h&&!this.fieldsIndex.get(_);for(let f of l??[]){let{outStatisticFieldName:l,statisticType:p}=f,g=f,y=p===`exceedslimit`?void 0:f.onStatisticField,b=p===`percentile_disc`||p===`percentile_cont`,x=p===`EnvelopeAggregate`||p===`CentroidAggregate`||p===`ConvexHullAggregate`,S=h&&m===1&&(y===_||v)&&p===`count`;if(h){if(!o.has(y)){let e=[];for(let n of u){let r=this._getAttributeValues(c,n,t,i);e.push(r)}o.set(y,this._calculateUniqueValues(e,t,!x&&c.returnDistinctValues))}let n=o.get(y);if(!n)continue;let r=Object.keys(n);for(let a of r){let{count:r,data:o,items:f,itemPositions:p}=n[a],m=o.join(`,`);if(!d||c.validateItems(f,d)){let n=s.get(m)||{attributes:{}};if(e.returnAggIds&&(n.aggregateIds=f.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null)),x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(g,f);n.aggregateGeometries[t]=e}else{let e=null;if(S)e=r;else{let n=this._getAttributeValues(c,y,t,i),r=p.map(e=>n[e]);e=b&&`statisticParameters`in g?this._getPercentileValue(g,r):this._getStatisticValue(g,r,null,c.returnDistinctValues)}n.attributes[l]=e}let a=0;u.forEach((e,t)=>n.attributes[this.fieldsIndex.get(e)?e:`EXPR_${++a}`]=o[t]),s.set(m,n)}}}else if(x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(g,t);n.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(c,y,t,i);n.attributes[l]=b&&`statisticParameters`in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,a,c.returnDistinctValues)}let C=(p===`min`||p===`max`)&&(D(this.fieldsIndex.get(y))||this._isAnyDateField(y))?this.fieldsIndex.get(y)?.type:null;r.push({name:l,alias:l,type:C||`esriFieldTypeDouble`})}let y=h?Array.from(s.values()):[n];return this._sortFeatures(y,f,(e,t)=>e.attributes[t]),p&&(y.length=Math.min(p,y.length)),{fields:r,features:y}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return w(t)||T(t)||E(t)||O(t)}async _getAggregateGeometry(e,t){let{statisticType:n,outStatisticFieldName:r}=e,{featureAdapter:s,spatialReference:c,geometryType:l}=this,u=t.map(e=>v(l,s.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:f}=await Y.getImportPromise(),[p]=f(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),n===`EnvelopeAggregate`)d.aggregateGeometries={...p?o(p):Z(u),spatialReference:c},d.outStatisticFieldName=r||`extent`;else if(n===`CentroidAggregate`){let[e,t]=p?i(p):a(Z(u));d.aggregateGeometries={x:e,y:t,spatialReference:c},d.outStatisticFieldName=r||`centroid`}else n===`ConvexHullAggregate`&&(d.aggregateGeometries=p&&{...p,spatialReference:c},d.outStatisticFieldName=r||`convexHull`);return d}_getStatisticValue(e,t,n,r){let{onStatisticField:i,statisticType:a}=e,o=null;return o=n?.has(i)?n.get(i):D(this.fieldsIndex.get(i))||this._isAnyDateField(i)?P({values:t,returnDistinct:r}):F({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),n&&n.set(i,o),o[a===`var`?`variance`:a]}_getPercentileValue(e,t){let{onStatisticField:n,statisticParameters:r,statisticType:i}=e,{value:a,orderBy:o}=r,s={value:a,orderBy:o,fieldType:this.fieldsIndex.get(n)?.type,isDiscrete:i===`percentile_disc`};return H(t,s)}_getAttributeValues(e,t,n,r){if(r.has(t))return r.get(t);let i=this.fieldsIndex.get(t),a=n.map(n=>e.getFieldValue(n,t,i));return r.set(t,a),a}_calculateUniqueValues(e,t,n){let r={},i=t.length;for(let a=0;a<i;a++){let i=t[a],o=[];for(let t of e)o.push(t[a]);let s=o.join(`,`);r[s]==null?r[s]={count:1,data:o,items:[i],itemPositions:[a]}:(n||r[s].count++,r[s].items.push(i),r[s].itemPositions.push(a))}return r}async _getDataValues(e,t,i=!0){let a=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:o,scale:s,timeZone:c}=e,l=r.fromJSON(this.query.outSR||this.spatialReference);return o?a.getExpressionValues(t,o,{viewingMode:`map`,scale:s,spatialReference:l},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},c):a.getDataValues(t,n(e),i)}_calculateHistogramBins(e,t,n){if(t.min==null&&t.max==null)return[];let r=t.intervals,i=t.min??0,a=t.max??0,o=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let s=e[t],c=n[t];if(s!=null&&s>=i&&s<=a){let e=U(r,s);e>-1&&(o[e].count++,o[e].items.push(c))}}return o}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:n,outAlias:r,valueType:i}=t,a=[],o=[{name:r??n,alias:r??n,type:i??`esriFieldTypeString`},{name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`}],s=new g(e,this.featureAdapter,this.fieldsIndex),c=new Map,l=[...this.items];this._sortFeatures(l,[n],(e,t,n)=>s.getFieldValue(e,t,n));let u=this._getAttributeValues(s,n,l,c),d=this._calculateUniqueValues([u],l,s.returnDistinctValues);for(let t in d){let{items:i}=d[t],s=await this._createBinsResponse(e,i);if(a.push(...s.features.map(e=>({...e,attributes:{...e.attributes,[r??n]:t}}))),s.fields)for(let e of s.fields)o.some(t=>t.name===e.name)||o.push(e)}return{fields:o,features:a}}async _createBinsResponse(e,t){let n=e.bin;switch(t??=this.items,n.type){case`autoIntervalBin`:return this._createAutoIntervalBinsResponse(k.fromJSON(n),e,t);case`dateBin`:return this._createDateBinsResponse(A.fromJSON(n),e,t);case`fixedBoundariesBin`:return this._createFixedBoundariesBinsResponse(M.fromJSON(n),e,t);case`fixedIntervalBin`:return this._createFixedIntervalBinsResponse(N.fromJSON(n),e,t)}}async _createAutoIntervalBinsResponse(e,t,n){let{field:r,normalizationField:i,numBins:a,normalizationType:o,normalizationTotal:s,start:c,end:l}=e,u=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),d=W(u,{field:r,normalizationField:i,normalizationType:o,normalizationTotal:s,numBins:a,minValue:x(o?e.normalizationMinValue:c,!1),maxValue:x(o?e.normalizationMaxValue:l,!1)}),f=this._calculateHistogramBins(u,d,n);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,n){let{field:r,interval:i,start:a,end:o,snapToData:s,returnFullIntervalBin:c,offset:l,firstDayOfWeek:u}=e,d=i.unit,f=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),p=O(this.fieldsIndex.get(r)),m=j.toJSON(d),h=f.filter(Boolean).sort((e,t)=>e-t),g=a==null?h[0]:x(a,p),_=o==null?h[h.length-1]:x(o,p),v=[];if(g!=null&&_!=null){let e={zone:t.outTimeReference?.ianaTimeZone??q},n={[l?.unit?j.toJSON(l.unit):`milliseconds`]:l?.value||0},r=J.fromMillis(g,e).minus(n),a=J.fromMillis(_,e).minus(n),o=typeof u==`number`&&u>=1&&u<=7?u:7,d=(e,t)=>{let n=(e.weekday-t+7)%7;return e.minus({days:n}).startOf(`day`)},f=(e,t)=>d(e,t).plus({days:7});if(s===`last`){let e=m===`week`?f(a,o):a;for(;e>r;){let t=e.minus({[m]:i.value});if(t<r){v.unshift([c?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}v.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e=s===`first`?r:m===`week`?d(r,o):r.startOf(m);for(;e<=a;){let t=e.plus({[m]:i.value});if(t>a){v.push([e.plus(n).toMillis(),c?t.plus(n).toMillis():a.plus(n).toMillis()]);break}v.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}let y=this._calculateHistogramBins(f,{intervals:v,min:g,max:_},n);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,n){let{field:r}=e,i=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),a=O(this.fieldsIndex.get(r)),o=e.boundaries.map(e=>x(e,a)).sort((e,t)=>e-t),s=[];for(let e=0;e<o.length-1;e++)s.push([o[e],o[e+1]]);let c={intervals:s,min:o.at(0),max:o.at(-1)},l=this._calculateHistogramBins(i,c,n);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t,n){let{field:r,interval:i,normalizationType:a,start:o,end:s}=e,c=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:a,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),l=O(this.fieldsIndex.get(r)),u=W(c,{field:r,classificationMethod:`defined-interval`,definedInterval:i,minValue:x(a?e.normalizationMinValue:o,l),maxValue:x(a?e.normalizationMaxValue:s,l)},!0),d=this._calculateHistogramBins(c,u,n);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:n,lowerBoundaryAlias:r}=t,i=r||`lowerBoundary`,a=n||`upperBoundary`,o=[],s=[{name:i,alias:i,type:`esriFieldTypeDouble`},{name:a,alias:a,type:`esriFieldTypeDouble`}],c=t.bin?.stackBy?.value,l=t.bin?.stackBy?.outAlias;c&&s.push({name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`},{name:l??c,alias:l??c,type:`esriFieldTypeString`});let u=0,d=t.bin.type===`dateBin`,f=t.outTimeReference?.ianaTimeZone;for(let n of e){let{minValue:e,maxValue:r,items:p}=n,m={attributes:{}};m.attributes[i]=d&&f&&e!=null?J.fromMillis(e,{zone:f}).toISO():e,t.bin.hideUpperBound||(m.attributes[a]=d&&f&&r!=null?J.fromMillis(r,{zone:f}).toISO():r),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null));let h;if(c?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[c],orderByFields:[c]},p),m.attributes.bin=++u,t.bin.jsonStyle===`flat`?o.push(...h.features.map(({attributes:{EXPR_1:e,...t},...n})=>({...n,attributes:l??e?{...t,[l??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>l??e?{...t,[l??e]:e}:t),o.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++u),h=await this._createStatisticsQueryResponse(t,p,m),o.push(m)),h.fields)for(let e of h.fields)s.some(t=>t.name===e.name)||s.push(e)}return t.binOrder===`desc`&&o.reverse(),{fields:s,features:o}}}function Z(e){let t=s(e[0]);for(let n of e.slice(1))c(t,s(n));return t}function ee(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=t.x-n.x,s=t.y-n.y,c=i*i+a*a;if(c===0)return!1;let l=o*i+s*a,u=Math.min(1,Math.max(0,l/c));return e.x=n.x+i*u,e.y=n.y+a*u,!0}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const te=[1];function $(e,t){let n=e.split(` `),r=n[0],i=t.get(r),a=n[1]?n[1].toLowerCase()===`desc`:!1;return{compare:K(i?.type,a,`case-insensitive`),fieldOrExpression:r,fieldInfo:i}}export{X as QueryEngineResult};
2
+ import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as n}from"../../../core/lang.js";import r from"../../../geometry/SpatialReference.js";import{polygonCentroid as i,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as o,getGeometryExtent as s,expandExtent as c}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as l}from"../../../geometry/support/quantizationUtils.js";import{isValid as u,equals as d}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as f}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as p,isCoordinate as m,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{getGeometry as _,transformCentroid as v}from"./geometryUtils.js";import{project as y}from"./projectionSupport.js";import{getDateInNumber as b}from"./queryUtils.js";import{SnappingCandidateEdge as x,SnappingCandidateVertex as S}from"./SnappingCandidate.js";import{isDateField as C,isDateOnlyField as w,isTimestampOffsetField as T,isStringField as E,isTimeOnlyField as D}from"../../support/fieldUtils.js";import O from"../../../rest/support/AutoIntervalBinParameters.js";import k from"../../../rest/support/DateBinParameters.js";import{unitsDict as A}from"../../../rest/support/DateBinUtils.js";import j from"../../../rest/support/FixedBoundariesBinParameters.js";import M from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as N,calculateStatistics as P,processSummaryStatisticsResult as F,calculateUniqueValuesCount as I,createUVResult as L,calculateClassBreaks as R,resolveCBResult as z,calculateHistogram as B,calculatePercentile as V,binIndex as H,getBinParams as U,isNullCountSupported as W,getAttributeComparator as G}from"../../../statistics/utils.js";import{utc as K}from"../../../time/constants.js";import{DateTime as q}from"luxon";const J=t(()=>import(`../../../geometry/operators/json/convexHullOperator.js`));class Y{constructor(e,t,n){this.items=e,this.query=t,this.geometryType=n.geometryType,this.hasZ=!!t.returnZ&&n.hasZ,this.hasM=!!t.returnM&&n.hasM,this.fieldsIndex=n.fieldsIndex,this.spatialReference=n.spatialReference,this.featureAdapter=n.featureAdapter,this.featureIdInfo=n.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:n,outStatistics:r}=this.query;if(!t?.length)return 1;let i=new Map,a=new Map,o=new Set;for(let s of r){let{statisticType:r}=s,c=r===`exceedslimit`?void 0:s.onStatisticField;if(!a.has(c)){let n=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,i);n.push(t)}a.set(c,this._calculateUniqueValues(n,this.items,e.returnDistinctValues))}let l=a.get(c);for(let t in l){let{data:r,items:i}=l[t],a=r.join(`,`);(!n||e.validateItems(i,n))&&o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>e.statisticType===`exceedslimit`)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){let t=this.query.geometry;e.queryGeometry={spatialReference:this.query.outSR,...u(this.query.outSR)&&!d(t.spatialReference,this.query.outSR)?y(t,t.spatialReference,this.query.outSR):t}}return e}createSnappingResponse(e,t,n){let r=this.featureAdapter,{point:i}=e,a=typeof e.distance==`number`?e.distance:e.distance.x,o=typeof e.distance==`number`?e.distance:e.distance.y;function s(e,t){let n=(e-i.x)/a,r=(t-i.y)/o;return n*n+r*r}let c={candidates:[]},l=this.geometryType===`esriGeometryPolygon`,u=this.geometryType===`esriGeometryPolyline`||this.geometryType===`esriGeometryPoint`,d=this._getPointCreator(t,this.spatialReference,n),g=new Q(null,0),_=new Q(null,0),v={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),n=r.getGeometryWithCurves?.(e);if(n!=null){b(n,t);continue}let i=r.getGeometry(e);i!=null&&y(i,t)}return c.candidates.sort((e,t)=>e.distance-t.distance),c;function y(t,n){let{coords:r,stride:a}=t,o=t.isPoint?ee:t.lengths;if(g.coords=r,_.coords=r,e.returnEdge){let e=0;for(let t=0;t<o.length;t++){let r=o[t],u=e;for(let t=0;t<r;t++,e+=a){if(!l&&t===r-1||(g.coordsIndex=e,_.coordsIndex=t===r-1?u:e+a,!Z(v,i,g,_)))continue;let o=s(v.x,v.y);o<=1&&c.candidates.push(new x(n,d(v),Math.sqrt(o),d(g),d(_)))}}}if(e.vertexMode===`all`){let e=0;for(let t=0;t<o.length;t++){let r=o[t],i=e,u=_;u.coordsIndex=i;for(let t=0;t<r;t++,e+=a){if(g.coordsIndex=e,l&&t===r-1&&g.x===u.x&&g.y===u.y)continue;let i=s(g.x,g.y);i<=1&&c.candidates.push(new S(n,d(g),Math.sqrt(i)))}}}else if(u&&e.vertexMode===`ends`){let e=0,t=[];for(let n=0;n<o.length;n++){t.push(e);let r=o[n];e+=r*a,r>1&&t.push(e-a)}for(let e of t){g.coordsIndex=e;let t=s(g.x,g.y);t<=1&&c.candidates.push(new S(n,d(g),Math.sqrt(t)))}}}function b(t,n){let{candidates:r}=c,a={x:0,y:0,z:0};if(e.returnEdge){let e=[i.x,i.y],o=new Q(e,0),c=new Q(e,0);for(let{segments:i}of t.parts)for(let{start:t,curve:l}of i){let{curvePoint:i}=f(t,l,e),u=s(...i);if(u>1)continue;[a.x,a.y]=i,o.coords=t,c.coords=p(l);let g=m(l)?null:h(l);r.push(new x(n,d(a),Math.sqrt(u),d(o),d(c),!1,g))}}function o(e){a.x=t.vertexXY[e*2],a.y=t.vertexXY[e*2+1];let i=s(a.x,a.y);i>1||(a.z=t.vertexZ?.[e]??0,r.push(new S(n,d(a),Math.sqrt(i))))}if(e.vertexMode===`all`){let{vertexCount:e}=t;for(let t=0;t<e;++t)o(t)}else if(e.vertexMode===`ends`)switch(t.type){case`point`:o(0);break;case`polyline`:for(let e=0;e<t.partCount;++e){let n=t.partOffsets[e],r=t.partOffsets[e+1]-1;o(n),r!==n&&o(r)}}}}_getPointCreator(e,t,n){let r=n!=null&&!d(t,n)?e=>y(e,t,n):e=>e,{hasZ:i}=this;return i&&e?({x:e,y:t,z:n})=>r({x:e,y:t,z:n}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,minValue:o,maxValue:s,scale:c,timeZone:l,outStatisticTypes:u}=e,d=this.fieldsIndex.get(t),f=C(d)||w(d)||T(d),p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:c,timeZone:l},this.items),m=W({normalizationType:i,normalizationField:r,minValue:o,maxValue:s}),h={value:.5,fieldType:d?.type},g=E(d)?N({values:p,supportsNullCount:m,percentileParams:h,outStatisticTypes:u}):P({values:p,minValue:o,maxValue:s,useSampleStdDev:!i,supportsNullCount:m,percentileParams:h,outStatisticTypes:u});return F(g,u,f)}async createUniqueValuesResponse(e){let{field:t,valueExpression:n,domains:r,returnAllCodedValues:i,scale:a,timeZone:o}=e,s=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:n,scale:a,timeZone:o},this.items,!1),c=I(s);return L(c,r,i,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items),m=R(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numClasses:u});return z(m,o)}async createHistogramResponse(e){let{field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u,scale:d,timeZone:f}=e,p=await this._getDataValues({field:t,valueExpression:n,normalizationField:r,normalizationType:i,normalizationTotal:a,scale:d,timeZone:f},this.items);return B(p,{field:t,normalizationField:r,normalizationType:i,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:s,minValue:c,maxValue:l,numBins:u})}_sortFeatures(e,t,n){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:i,fieldInfo:a}=$(r,this.fieldsIndex);e.sort((e,r)=>t(n(e,i,a),n(r,i,a)))}}_topNFeatures(t,n,r,i){if(t.length>1&&n?.length){let a=n.map(e=>{let{compare:t,fieldOrExpression:n,fieldInfo:r}=$(e,this.fieldsIndex);return(e,a)=>t(i(e,n,r),i(a,n,r))}).reduceRight((e,t)=>(n,r)=>{let i=t(n,r);return i!==0&&!Number.isNaN(i)?i:e(n,r)}),o=[];for(let n of t)e(o,n,r,a);return o}return t.slice(0,r)}_createFeatureQueryResponse(e){let{items:t,geometryType:n,hasM:r,hasZ:i,featureIdInfo:a,spatialReference:o}=this,{outFields:s,outSR:c,quantizationParameters:u,resultRecordCount:d,resultOffset:f,returnZ:p,returnM:m}=e,h=d!=null&&t.length>(f||0)+d,g=s&&(s.includes(`*`)?[...this.fieldsIndex.fields]:s.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:n,hasM:r&&m,hasZ:i&&p,objectIdFieldName:a.type===`object-id`?a.fieldName:null,spatialReference:c||o,transform:u&&l(u)||null}}_createFeatures(e,t){let n=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:r,hasZ:i}=this,{orderByFields:a,quantizationParameters:o,returnGeometry:s,returnCentroid:c,maxAllowableOffset:u,resultOffset:d,resultRecordCount:f,returnZ:p=!1,returnM:m=!1}=e,h=i&&p,y=r&&m,b,x=d||0,S=f==null?null:x+f;S!=null&&S<=5e3&&S<t.length?b=this._topNFeatures(t,a,S,(e,t,r)=>n.getFieldValue(e,t,r)):(b=[...t],this._sortFeatures(b,a,(e,t,r)=>n.getFieldValue(e,t,r))),(x>0||S!=null)&&(b=b.slice(x,S??void 0));let C=[],w=0;if(!this.geometryType||!s&&!c)for(let e of b){let t=n.getAttributes(e);t&&(C[w++]=this._addFeatureJSONMetadata(e,{attributes:t}))}else{let e=l(o)??void 0,t=this.geometryType===`esriGeometryPolygon`||this.geometryType===`esriGeometryPolyline`;if(s&&!c)for(let r of b){let i=this.featureAdapter.getGeometry(r),a=this._addFeatureJSONMetadata(r,{attributes:n.getAttributes(r),geometry:_(this.geometryType,i,u,e,h,y)});t&&i&&!a.geometry&&(a.centroid=v(this,this.featureAdapter.getCentroid(r,this),e)),C[w++]=a}else if(!s&&c)for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:v(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of b)C[w++]=this._addFeatureJSONMetadata(t,{attributes:n.getAttributes(t),centroid:v(this,this.featureAdapter.getCentroid(t,this),e),geometry:_(this.geometryType,this.featureAdapter.getGeometry(t),u,e,h,y)})}return C}_addFeatureJSONMetadata(e,t){let n=this.featureAdapter.getMetadata?.(e);return n!==void 0&&(t.metadata=n),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,n=1/0,r=1/0;for(let e of this.query.outStatistics??[])if(e.statisticType===`exceedslimit`){t=e.maxPointCount==null?1/0:e.maxPointCount,n=e.maxRecordCount==null?1/0:e.maxRecordCount,r=e.maxVertexCount==null?1/0:e.maxVertexCount;break}return e=this.geometryType===`esriGeometryPoint`?this.items.length>t:this.items.length>n||this.items.reduce((e,t)=>e+(this.featureAdapter.getGeometry(t)?.size??0),0)>r,{fields:[{name:`exceedslimit`,type:`esriFieldTypeInteger`,alias:`exceedslimit`,sqlType:`sqlTypeInteger`,domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,n={attributes:{}}){let r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=new g(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:d,orderByFields:f,resultRecordCount:p}=e,m=u?.length,h=!!m,_=h?u[0]:null,v=h&&!this.fieldsIndex.get(_);for(let f of l??[]){let{outStatisticFieldName:l,statisticType:p}=f,g=f,y=p===`exceedslimit`?void 0:f.onStatisticField,b=p===`percentile_disc`||p===`percentile_cont`,x=p===`EnvelopeAggregate`||p===`CentroidAggregate`||p===`ConvexHullAggregate`,S=h&&m===1&&(y===_||v)&&p===`count`;if(h){if(!o.has(y)){let e=[];for(let n of u){let r=this._getAttributeValues(c,n,t,i);e.push(r)}o.set(y,this._calculateUniqueValues(e,t,!x&&c.returnDistinctValues))}let n=o.get(y);if(!n)continue;let r=Object.keys(n);for(let a of r){let{count:r,data:o,items:f,itemPositions:p}=n[a],m=o.join(`,`);if(!d||c.validateItems(f,d)){let n=s.get(m)||{attributes:{}};if(e.returnAggIds&&(n.aggregateIds=f.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null)),x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(g,f);n.aggregateGeometries[t]=e}else{let e=null;if(S)e=r;else{let n=this._getAttributeValues(c,y,t,i),r=p.map(e=>n[e]);e=b&&`statisticParameters`in g?this._getPercentileValue(g,r):this._getStatisticValue(g,r,null,c.returnDistinctValues)}n.attributes[l]=e}let a=0;u.forEach((e,t)=>n.attributes[this.fieldsIndex.get(e)?e:`EXPR_${++a}`]=o[t]),s.set(m,n)}}}else if(x){n.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(g,t);n.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(c,y,t,i);n.attributes[l]=b&&`statisticParameters`in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,a,c.returnDistinctValues)}let C=(p===`min`||p===`max`)&&(E(this.fieldsIndex.get(y))||this._isAnyDateField(y))?this.fieldsIndex.get(y)?.type:null;r.push({name:l,alias:l,type:C||`esriFieldTypeDouble`})}let y=h?Array.from(s.values()):[n];return this._sortFeatures(y,f,(e,t)=>e.attributes[t]),p&&(y.length=Math.min(p,y.length)),{fields:r,features:y}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return C(t)||w(t)||T(t)||D(t)}async _getAggregateGeometry(e,t){let{statisticType:n,outStatisticFieldName:r}=e,{featureAdapter:s,spatialReference:c,geometryType:l}=this,u=t.map(e=>_(l,s.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:f}=await J.getImportPromise(),[p]=f(u,{merge:!0});if(p&&p.rings[0].length<=3&&(p=null),n===`EnvelopeAggregate`)d.aggregateGeometries={...p?o(p):X(u),spatialReference:c},d.outStatisticFieldName=r||`extent`;else if(n===`CentroidAggregate`){let[e,t]=p?i(p):a(X(u));d.aggregateGeometries={x:e,y:t,spatialReference:c},d.outStatisticFieldName=r||`centroid`}else n===`ConvexHullAggregate`&&(d.aggregateGeometries=p&&{...p,spatialReference:c},d.outStatisticFieldName=r||`convexHull`);return d}_getStatisticValue(e,t,n,r){let{onStatisticField:i,statisticType:a}=e,o=null;return o=n?.has(i)?n.get(i):E(this.fieldsIndex.get(i))||this._isAnyDateField(i)?N({values:t,returnDistinct:r}):P({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),n&&n.set(i,o),o[a===`var`?`variance`:a]}_getPercentileValue(e,t){let{onStatisticField:n,statisticParameters:r,statisticType:i}=e,{value:a,orderBy:o}=r,s={value:a,orderBy:o,fieldType:this.fieldsIndex.get(n)?.type,isDiscrete:i===`percentile_disc`};return V(t,s)}_getAttributeValues(e,t,n,r){if(r.has(t))return r.get(t);let i=this.fieldsIndex.get(t),a=n.map(n=>e.getFieldValue(n,t,i));return r.set(t,a),a}_calculateUniqueValues(e,t,n){let r={},i=t.length;for(let a=0;a<i;a++){let i=t[a],o=[];for(let t of e)o.push(t[a]);let s=o.join(`,`);r[s]==null?r[s]={count:1,data:o,items:[i],itemPositions:[a]}:(n||r[s].count++,r[s].items.push(i),r[s].itemPositions.push(a))}return r}async _getDataValues(e,t,i=!0){let a=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:o,scale:s,timeZone:c}=e,l=r.fromJSON(this.query.outSR||this.spatialReference);return o?a.getExpressionValues(t,o,{viewingMode:`map`,scale:s,spatialReference:l},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},c):a.getDataValues(t,n(e),i)}_calculateHistogramBins(e,t,n){if(t.min==null&&t.max==null)return[];let r=t.intervals,i=t.min??0,a=t.max??0,o=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let s=e[t],c=n[t];if(s!=null&&s>=i&&s<=a){let e=H(r,s);e>-1&&(o[e].count++,o[e].items.push(c))}}return o}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:n,outAlias:r,valueType:i}=t,a=[],o=[{name:r??n,alias:r??n,type:i??`esriFieldTypeString`},{name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`}],s=new g(e,this.featureAdapter,this.fieldsIndex),c=new Map,l=[...this.items];this._sortFeatures(l,[n],(e,t,n)=>s.getFieldValue(e,t,n));let u=this._getAttributeValues(s,n,l,c),d=this._calculateUniqueValues([u],l,s.returnDistinctValues);for(let t in d){let{items:i}=d[t],s=await this._createBinsResponse(e,i);if(a.push(...s.features.map(e=>({...e,attributes:{...e.attributes,[r??n]:t}}))),s.fields)for(let e of s.fields)o.some(t=>t.name===e.name)||o.push(e)}return{fields:o,features:a}}async _createBinsResponse(e,t){let n=e.bin;switch(t??=this.items,n.type){case`autoIntervalBin`:return this._createAutoIntervalBinsResponse(O.fromJSON(n),e,t);case`dateBin`:return this._createDateBinsResponse(k.fromJSON(n),e,t);case`fixedBoundariesBin`:return this._createFixedBoundariesBinsResponse(j.fromJSON(n),e,t);case`fixedIntervalBin`:return this._createFixedIntervalBinsResponse(M.fromJSON(n),e,t)}}async _createAutoIntervalBinsResponse(e,t,n){let{field:r,normalizationField:i,numBins:a,normalizationType:o,normalizationTotal:s,start:c,end:l}=e,u=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),d=U(u,{field:r,normalizationField:i,normalizationType:o,normalizationTotal:s,numBins:a,minValue:b(o?e.normalizationMinValue:c,!1),maxValue:b(o?e.normalizationMaxValue:l,!1)}),f=this._calculateHistogramBins(u,d,n);return this._createFeaturesFromHistogramBins(f,t)}async _createDateBinsResponse(e,t,n){let{field:r,interval:i,start:a,end:o,snapToData:s,returnFullIntervalBin:c,offset:l,firstDayOfWeek:u}=e,d=i.unit,f=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),p=D(this.fieldsIndex.get(r)),m=A.toJSON(d),h=f.filter(Boolean).sort((e,t)=>e-t),g=a==null?h[0]:b(a,p),_=o==null?h[h.length-1]:b(o,p),v=[];if(g!=null&&_!=null){let e={zone:t.outTimeReference?.ianaTimeZone??K},n={[l?.unit?A.toJSON(l.unit):`milliseconds`]:l?.value||0},r=q.fromMillis(g,e).minus(n),a=q.fromMillis(_,e).minus(n),o=typeof u==`number`&&u>=1&&u<=7?u:7,d=(e,t)=>{let n=(e.weekday-t+7)%7;return e.minus({days:n}).startOf(`day`)},f=(e,t)=>d(e,t).plus({days:7});if(s===`last`){let e=m===`week`?f(a,o):a;for(;e>r;){let t=e.minus({[m]:i.value});if(t<r){v.unshift([c?t.plus(n).toMillis():r.plus(n).toMillis(),e.plus(n).toMillis()]);break}v.unshift([t.plus(n).toMillis(),e.plus(n).toMillis()]),e=t}}else{let e=s===`first`?r:m===`week`?d(r,o):r.startOf(m);for(;e<=a;){let t=e.plus({[m]:i.value});if(t>a){v.push([e.plus(n).toMillis(),c?t.plus(n).toMillis():a.plus(n).toMillis()]);break}v.push([e.plus(n).toMillis(),t.plus(n).toMillis()]),e=t}}}let y=this._calculateHistogramBins(f,{intervals:v,min:g,max:_},n);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,n){let{field:r}=e,i=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},n),a=D(this.fieldsIndex.get(r)),o=e.boundaries.map(e=>b(e,a)).sort((e,t)=>e-t),s=[];for(let e=0;e<o.length-1;e++)s.push([o[e],o[e+1]]);let c={intervals:s,min:o.at(0),max:o.at(-1)},l=this._calculateHistogramBins(i,c,n);return this._createFeaturesFromHistogramBins(l,t)}async _createFixedIntervalBinsResponse(e,t,n){let{field:r,interval:i,normalizationType:a,start:o,end:s}=e,c=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:a,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},n),l=D(this.fieldsIndex.get(r)),u=U(c,{field:r,classificationMethod:`defined-interval`,definedInterval:i,minValue:b(a?e.normalizationMinValue:o,l),maxValue:b(a?e.normalizationMaxValue:s,l)},!0),d=this._calculateHistogramBins(c,u,n);return this._createFeaturesFromHistogramBins(d,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:n,lowerBoundaryAlias:r}=t,i=r||`lowerBoundary`,a=n||`upperBoundary`,o=[],s=[{name:i,alias:i,type:`esriFieldTypeDouble`},{name:a,alias:a,type:`esriFieldTypeDouble`}],c=t.bin?.stackBy?.value,l=t.bin?.stackBy?.outAlias;c&&s.push({name:`bin`,alias:`bin`,type:`esriFieldTypeInteger`},{name:l??c,alias:l??c,type:`esriFieldTypeString`});let u=0,d=t.bin.type===`dateBin`,f=t.outTimeReference?.ianaTimeZone;for(let n of e){let{minValue:e,maxValue:r,items:p}=n,m={attributes:{}};m.attributes[i]=d&&f&&e!=null?q.fromMillis(e,{zone:f}).toISO():e,t.bin.hideUpperBound||(m.attributes[a]=d&&f&&r!=null?q.fromMillis(r,{zone:f}).toISO():r),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>e!=null));let h;if(c?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[c],orderByFields:[c]},p),m.attributes.bin=++u,t.bin.jsonStyle===`flat`?o.push(...h.features.map(({attributes:{EXPR_1:e,...t},...n})=>({...n,attributes:l??e?{...t,[l??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>l??e?{...t,[l??e]:e}:t),o.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++u),h=await this._createStatisticsQueryResponse(t,p,m),o.push(m)),h.fields)for(let e of h.fields)s.some(t=>t.name===e.name)||s.push(e)}return t.binOrder===`desc`&&o.reverse(),{fields:s,features:o}}}function X(e){let t=s(e[0]);for(let n of e.slice(1))c(t,s(n));return t}function Z(e,t,n,r){let i=r.x-n.x,a=r.y-n.y,o=t.x-n.x,s=t.y-n.y,c=i*i+a*a;if(c===0)return!1;let l=o*i+s*a,u=Math.min(1,Math.max(0,l/c));return e.x=n.x+i*u,e.y=n.y+a*u,!0}class Q{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const ee=[1];function $(e,t){let n=e.split(` `),r=n[0],i=t.get(r),a=n[1]?n[1].toLowerCase()===`desc`:!1;return{compare:G(i?.type,a,`case-insensitive`),fieldOrExpression:r,fieldInfo:i}}export{Y as QueryEngineResult};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{generalizeOptimizedGeometry as e,quantizeOptimizedGeometry as t,convertToGeometry as n,convertToPoint as r}from"../featureConversionUtils.js";function i(e,n,i,a=e.hasZ,o=e.hasM){if(n==null)return null;let s=e.hasZ&&a,c=e.hasM&&o;if(i){let e=t(n,`esriGeometryPoint`,i,a,o);return r(e,s,c)}return r(n,s,c)}function a(r,i,a,o,s,c){if(i==null)return null;let l=`coords`in i?i:i.geometry;if(l==null)return null;let{hasZ:u,hasM:d}=l,f=u&&(s??=u),p=d&&(c??=d);if(a){let i=e(l,r,a,s,c);return o&&(i=t(i,r,o)),n(i,r,f,p)}if(o){let e=t(l,r,o,s,c);return n(e,r,f,p)}return n(l,r,f,p)}function o(e){return!e||!(s in e)?e:JSON.parse(JSON.stringify(e,c))}const s=`_geVersion`,c=(e,t)=>e===s?void 0:t;export{o as cleanFromGeometryEngine,a as getGeometry,i as transformCentroid};
2
+ import{generalizeOptimizedGeometry as e,quantizeOptimizedGeometry as t,convertToGeometry as n,convertToPoint as r}from"../featureConversionUtils.js";function i(e,n,i,a=e.hasZ,o=e.hasM){if(n==null)return null;let s=e.hasZ&&a,c=e.hasM&&o;if(i){let e=t(n,`esriGeometryPoint`,i,a,o);return r(e,s,c)}return r(n,s,c)}function a(r,i,a,o,s,c){if(i==null)return null;let l=`coords`in i?i:i.geometry;if(l==null)return null;let{hasZ:u,hasM:d}=l,f=u&&(s??=u),p=d&&(c??=d);if(a){let i=e(l,r,a,s,c);return o&&(i=t(i,r,o)),n(i,r,f,p)}if(o){let e=t(l,r,o,s,c);return n(e,r,f,p)}return n(l,r,f,p)}export{a as getGeometry,i as transformCentroid};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isSome as e}from"../../../core/arrayUtils.js";import{initializeProjection as t,projectMany as n}from"../../../geometry/projectionUtils.js";import{isPoint as r,isExtent as i,isPolygon as a,isPolyline as o,isMultipoint as s}from"../../../geometry/support/jsonTypeUtils.js";import{isValid as c,equals as l,isWebMercator as u}from"../../../geometry/support/spatialReferenceUtils.js";import{canProject as d,lngLatToXY as f,xyToLngLat as p}from"../../../geometry/support/webMercatorUtils.js";const m=[0,0];function h(e,t){let n=u(e)?f:p;if(r(t)){let e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,m),t.z!=null&&(e.z=t.z),t.m!=null&&(e.m=t.m),e}if(i(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,m),[e.xmax,e.ymax]=n(t.xmax,t.ymax,m),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if(a(t))return{rings:g(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if(o(t))return{paths:g(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if(s(t))return{points:_(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function g(e,t){let n=[];for(let r of e)n.push(_(r,t));return n}function _(e,t){let n=[];for(let r of e){let e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function v(n,r){if(!n||!r)return;let i=Array.isArray(n)?n.map(e=>e.geometry==null?null:e.geometry.spatialReference).filter(e):[n];await t(i.map(e=>({source:e,dest:r})))}function y(e,t,r,i){if(!e)return null;if(r||(r=t,t=e.spatialReference),!c(t)||!c(r)||l(t,r))return e;if(d(t,r)){let t=h(r,e);return t.spatialReference=r,t}return n([e],t,r,i)[0]}class b{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e?.length||!t||!n||l(t,n))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:n,options:r,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let{geometries:t,inSpatialReference:r,outSpatialReference:i,resolve:a,options:o}=e,s=t.filter(e=>e!=null),c;c=d(r,i)&&o?.extendedParams==null?s.map(e=>h(i,e)):n(s,r,i,o);let l=0,u=t.map(e=>e==null?null:c[l++]);a.resolve(u),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}}const x=new b;function S(e,t,n,r){return x.push(e,t,n,r)}export{v as checkProjectionSupport,y as project,S as projectMany};
2
+ import{isSome as e}from"../../../core/arrayUtils.js";import{initializeProjection as t,projectMany as n}from"../../../geometry/projectionUtils.js";import{isPoint as r,isExtent as i,isPolygon as a,isPolyline as o,isMultipoint as s}from"../../../geometry/support/jsonTypeUtils.js";import{isValid as c,equals as l,isWebMercator as u}from"../../../geometry/support/spatialReferenceUtils.js";import{canProject as d,lngLatToXY as f,xyToLngLat as p}from"../../../geometry/support/webMercatorUtils.js";const m=[0,0];function h(e,t){let n=u(e)?f:p;if(r(t)){let e={x:0,y:0};return[e.x,e.y]=n(t.x,t.y,m),t.z!=null&&(e.z=t.z),t.m!=null&&(e.m=t.m),e}if(i(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=n(t.xmin,t.ymin,m),[e.xmax,e.ymax]=n(t.xmax,t.ymax,m),t.hasZ&&(e.zmin=t.zmin,e.zmax=t.zmax,e.hasZ=!0),t.hasM&&(e.mmin=t.mmin,e.mmax=t.mmax,e.hasM=!0),e}if(a(t))return{rings:g(t.rings,n),hasM:t.hasM,hasZ:t.hasZ};if(o(t))return{paths:g(t.paths,n),hasM:t.hasM,hasZ:t.hasZ};if(s(t))return{points:_(t.points,n),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function g(e,t){let n=[];for(let r of e)n.push(_(r,t));return n}function _(e,t){let n=[];for(let r of e){let e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function v(n,r){if(!n||!r)return;let i=Array.isArray(n)?n.map(e=>e.geometry==null?null:e.geometry.spatialReference).filter(e):[n];await t(i.map(e=>({source:e,dest:r})))}function y(e,t,r,i){if(!e)return null;if(r||(r=t,t=e.spatialReference),!c(t)||!c(r)||l(t,r))return e;if(d(t,r)){let t=h(r,e);return t.spatialReference=r,t}let[a]=n([e],t,r,i);return a}class b{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e?.length||!t||!n||l(t,n))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:n,options:r,resolve:Promise.withResolvers()};return this._jobs.push(i),this._timer??=setTimeout(this._process,10),i.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let{geometries:t,inSpatialReference:r,outSpatialReference:i,resolve:a,options:o}=e,s=t.filter(e=>e!=null),c;c=d(r,i)&&o?.extendedParams==null?s.map(e=>h(i,e)):n(s,r,i,o);let l=0,u=t.map(e=>e==null?null:c[l++]);a.resolve(u),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}}const x=new b;function S(e,t,n,r){return x.push(e,t,n,r)}export{v as checkProjectionSupport,y as project,S as projectMany};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../config.js";import n from"../../../request.js";import{isSome as r,remove as i}from"../../../core/arrayUtils.js";import a from"../../../core/Error.js";import has from"../../../core/has.js";import{JSONMap as o}from"../../../core/jsonMap.js";import{Loadable as s}from"../../../core/Loadable.js";import c from"../../../core/Logger.js";import{setDeepValue as l}from"../../../core/object.js";import{debounce as u,after as d,throwIfAbortError as f}from"../../../core/promiseUtils.js";import{watch as p}from"../../../core/reactiveUtils.js";import{join as m}from"../../../core/urlUtils.js";import{generateBracedUUID as h}from"../../../core/uuid.js";import{property as g,subclass as _}from"../../../core/accessorSupport/decorators.js";import v from"../../../geometry/Extent.js";import y from"../../../geometry/SpatialReference.js";import b from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import{isRelativeVertexSpace as x}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isOriginalExternal as S}from"../../../geometry/support/meshUtils/External.js";import{createFeatureEditResult as C,getFeatureJSON as w,getFeatureIds as T,getAttachmentEditsJSON as E,isProtectedOrPrivateVersionError as D,unpackEditResultData as O,createEditedFeatures as k}from"../applyEditsUtils.js";import{createDrawingInfo as A}from"./support/clientSideDefaults.js";import j from"./support/QueryTask.js";import{isHostedAgolService as M}from"../../support/arcgisLayerUrl.js";import{ensureLayerCredential as N}from"../../support/featureLayerUtils.js";import{getAssetMapTable as P}from"../../support/infoFor3D.js";import{executeQueryJSON as F}from"../../../rest/query/executeQueryJSON.js";import{unapplyEditsZUnitScaling as I}from"../../../rest/query/operations/editsZScale.js";import L from"../../../rest/support/Query.js";import R from"../../../time/TimeExtent.js";import{isSafeToEditVersion as z,isVersionInEditSession as B,isHistoricVersion as V,currentSessionId as H}from"../../../versionManagement/support/versionManagementUtils.js";const U=new o({originalAndCurrentFeatures:`original-and-current-features`,none:`none`}),W=new o({Started:`published`,Publishing:`publishing`,Stopped:`unavailable`});let G=class extends s{constructor(e){super(e),this.type=`feature-layer`,this.supportedSourceTypes=new Set([`Feature Layer`,`Oriented Imagery Layer`,`Table`,`Catalog Layer`,`Annotation Layer`,`Dimension Layer`]),this.refresh=u(async()=>{await this.load();let e=this.sourceJSON.editingInfo?.lastEditDate;if(e==null)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}let t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){let t=this.layer.sourceJSON,n=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(n),Promise.resolve(this)}async reload(e){let t=this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0;await this._fetchService(null,{...e,cacheBust:t})}initialize(){this.addHandles([p(()=>{let e=this.layer;return e&&`lastEditsEventDate`in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){let{capabilities:e,parsedUrl:t,gdbVersion:n,spatialReference:r,fieldsIndex:i,uniqueIdFields:a}=this.layer,o=`infoFor3D`in this.layer?this.layer.infoFor3D:null,s=`dynamicDataSource`in this.layer?this.layer.dynamicDataSource:null,c=has(`featurelayer-pbf`)&&e?.query.supportsFormatPBF&&o==null,l=c&&e?.query.supportsFormatPBFWithCurves,u=e?.operations?.supportsQueryAttachments??!1,d=e?.query?.relativeTimeBinWindow??0,f=t.path;return new j({dynamicDataSource:s,fieldsIndex:i,gdbVersion:n,infoFor3D:o,pbfSupported:c,pbfSupportedWithCurves:l,queryAttachmentsSupported:u,relativeTimeBinWindow:d,sourceSpatialReference:r,uniqueIdFields:a,url:f})}async addAttachment(e,t,r){await this.load();let{layer:i}=this;await N(i,`editing`);let a=e.attributes[i.objectIdField],o=i.parsedUrl.path+`/`+a+`/addAttachment`,s=this._getLayerRequestOptions({query:r}),c=this._getFormDataForAttachment(t,s.query);try{let e=await n(o,{body:c});return C(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r,i){await this.load();let{layer:a}=this;await N(a,`editing`);let o=e.attributes[a.objectIdField],s=a.parsedUrl.path+`/`+o+`/updateAttachment`,c=this._getLayerRequestOptions({query:{attachmentId:t,...i}}),l=this._getFormDataForAttachment(r,c.query);try{let e=await n(s,{body:l});return C(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(o,e)}}async applyEdits(e,t){await this.load();let{layer:i}=this;await N(i,`editing`);let o=`infoFor3D`in i?i.infoFor3D:null,s=o!=null,c=s||(t?.globalIdUsed??!1),l=s?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,u=e.addFeatures?.map(e=>w(this.layer,e,o))??[],d=(await Promise.all(u)).filter(r),f=e.updateFeatures?.map(e=>w(this.layer,e,o))??[],p=(await Promise.all(f)).filter(r),m=T(this.layer,e.deleteFeatures,c);I(d,p,i.spatialReference);let h=await E(this.layer,e),g=i.capabilities.editing.supportsAsyncApplyEdits&&s,_=t?.gdbVersion||i.gdbVersion,v={gdbVersion:_,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:c,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:g};await z(this.layer.url,_,!0);let y=B(this.layer.url,_||null);if(await V(i.url,_,i.historicMoment))throw new a(`feature-layer-source:historic-version`,`Editing a historic version is not allowed`);t?.returnServiceEditsOption?(v.edits=JSON.stringify([{id:i.layerId,adds:d.length?d:null,updates:p.length?p:null,deletes:m.length?m:null,attachments:h,assetMaps:l}]),v.returnServiceEditsOption=U.toJSON(t?.returnServiceEditsOption),v.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(v.adds=d.length?JSON.stringify(d):null,v.updates=p.length?JSON.stringify(p):null,v.deletes=m.length?c?JSON.stringify(m):m.join(`,`):null,v.attachments=h&&JSON.stringify(h),v.assetMaps=l==null?void 0:JSON.stringify(l));let b=this._getLayerRequestOptions({method:`post`,query:v});y&&(b.authMode=`immediate`,b.query.returnEditMoment=!0,b.query.sessionId=H);let x=t?.returnServiceEditsOption?i.url:i.parsedUrl.path,S;try{S=g?await this._asyncApplyEdits(x+`/applyEdits`,b):await n(x+`/applyEdits`,b)}catch(e){if(D(e))b.authMode=`immediate`,S=g?await this._asyncApplyEdits(x+`/applyEdits`,b):await n(x+`/applyEdits`,b);else throw e}return this._createEditsResult(S)}async deleteAttachments(e,t,r){await this.load();let{layer:i}=this;await N(i,`editing`);let a=e.attributes[i.objectIdField],o=i.parsedUrl.path+`/`+a+`/deleteAttachments`;try{return(await n(o,this._getLayerRequestOptions({query:{attachmentIds:t.join(`,`),...r},method:`post`}))).data.deleteAttachmentResults.map(C)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){let t=e.signal;return this.load({signal:t}).then(async()=>{let t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:i}=this.layer,{data:a}=await n(`${i}/${r}`,t),{id:o,extent:s,fullExtent:c,timeExtent:l}=a,u=s||c;return{id:o,fullExtent:u&&v.fromJSON(u),timeExtent:l&&R.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();let n=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,n)}async queryFeatures(e,t){await this.load();let n=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&n.features.length){let t=new Map;if(n.features.forEach(n=>{let r=n.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){let n=e.toLowerCase();n&&n in r&&e!==n&&(r[e]=r[n],delete r[n],t.set(n,e))}})}),n.fields!=null)for(let e of n.fields){let n=t.get(e.name.toLowerCase());n!=null&&(e.name=n)}}return n}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!M(this.layer.url))return`unavailable`;let e=m(this.layer.url,`status`),t=await n(e,{query:{f:`json`}});return W.fromJSON(t.data.status)}async uploadAssets(e,t){let{uploadAssets:n}=await import(`./support/uploadAssets.js`);return n(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){let t=this.layer;if(e==null||!(`capabilities`in t)||!(`effectiveCapabilities`in t)||t.capabilities?.operations?.supportsEditing||!t.effectiveCapabilities?.operations?.supportsEditing)return;let n=t.url;if(n==null)return;`layerId`in t&&(n=m(n,t.layerId.toString()));let r=this._getOrCreateEditInterceptor(n);r.before=t=>{let n=t.requestOptions.method??`auto`;if(n===`auto`||n===`head`){let n=t.requestOptions.query??{};n._ts=e.getTime(),t.requestOptions.query=n}}}_getOrCreateEditInterceptor(e){return this._editInterceptor??(this._editInterceptor={urls:e},t.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){this._editInterceptor!=null&&(i(t.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){let r=(await n(e,t)).data.statusUrl;for(;;){let e=(await n(r,{query:{f:`json`},responseType:`json`})).data;switch(e.status){case`Completed`:return n(e.resultUrl,{query:{f:`json`},responseType:`json`});case`CompletedWithErrors`:throw new a(`async-applyEdits-failed`,`asynchronous applyEdits call failed.`);case`Failed ImportChanges`:case`InProgress`:case`Pending`:case`ExportAttachments`:case`ExportChanges`:case`ExportingData`:case`ExportingSnapshot`:case`ImportAttachments`:case`ProvisioningReplica`:case`UnRegisteringReplica`:break;default:throw new a(`async-applyEdits-failed`,`asynchronous applyEdits call failed (undefined response status)`)}await d(K)}}_createRequestQueryOptions(e){let t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){let r={};has(`featurelayer-advanced-symbols`)&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());let{data:i}=await n(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=i}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);let r=e.type;if(!this.supportedSourceTypes.has(r))throw new a(`feature-layer-source:unsupported-type`,`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if(e.type!==`Table`&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){let t=A(e.geometryType).renderer;l(`drawingInfo.renderer`,t,e)}if(e.geometryType===`esriGeometryMultiPatch`&&e.infoFor3D&&(e.geometryType=`mesh`),e.extent==null)try{let{data:r}=await n(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){f(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){let{addAssetFeatures:t}=e;if(!t?.length||await this._areAllAssetsAlreadyMapped(t))return null;let n=e.addFeatures.filter(e=>e.geometry);if(t.length!==n.length+e.updateFeatures.length)throw new a(`feature-layer-source:unsupported-mesh-edits`,`Mixing attribute only edits with mesh geometry edits is not currently supported`);let r=[],i=new Map;for(let e of t){let{geometry:t}=e,{vertexSpace:n}=t;if(x(n))r.push(t);else{let n=t.origin,{convertMeshVertexSpace:a}=await import(`../../../geometry/support/meshUtils/convertMeshVertexSpace.js`),o=await a(t,new b({origin:[n.x,n.y,n.z??0]}));i.set(o,t),e.geometry=o,r.push(o)}}await this.uploadAssets(r);for(let[e,t]of i)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){let t=[],n=this.layer.globalIdField,r=this.layer.parsedUrl;for(let i of e){let{metadata:e}=i.geometry,a=e.getExternalSourcesOnService(r),o=i.getAttribute(n);if(a.length===0){c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}let{source:s}=a.find(S)??a[0];for(let e of s.assets)e.parts.length===1?t.push({globalId:h(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:[]}):c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){let t=e.data,{layerId:n}=this.layer,r=[],i=null;if(Array.isArray(t))for(let e of t)r.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===n&&(i={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else i=t;let a=O(i);if(r.length>0){a.editedFeatureResults=[];for(let e of r){let{editedFeatures:t}=e,n=t?.spatialReference?new y(t.spatialReference):null;a.editedFeatureResults.push({layerId:e.id,editedFeatures:k(t,n)})}}return a}_createAttachmentErrorResult(e,t){let n=t.details.messages?.[0]||t.message,r=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new a(`feature-layer-source:attachment-failure`,n,{code:r})}}_getFormDataForAttachment(e,t){let n=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(n)for(let e in t){let r=t[e];r!=null&&(n.set?n.set(e,r):n.append(e,r))}return n}_getLayerRequestOptions(e={}){let{layer:t,layer:{parsedUrl:n,gdbVersion:r}}=this;return{...e,query:{gdbVersion:r,layer:`dynamicDataSource`in t&&t.dynamicDataSource?JSON.stringify({source:t.dynamicDataSource}):void 0,...n.query,f:`json`,...this._createRequestQueryOptions(e)},responseType:`json`}}async _areAllAssetsAlreadyMapped(e){let{layer:t}=this,{globalIdField:n,parsedUrl:i}=t,a=`infoFor3D`in t?t.infoFor3D:null;if(a==null||n==null)return!1;let o=P(a);if(o==null)return!1;let s=m(i.path,`../${o.id}`),c=[];for(let t of e)if(t.geometry.metadata.getExternalSourcesOnService(i).length>0)c.push(t);else return!1;let l=c.map(e=>e.getAttribute(n)).filter(r);if(l.length===0)return!1;let{assetMapFieldRoles:{parentGlobalId:u,assetHash:d}}=a,f=new L({where:`${u} IN (${l.map(e=>`'${e}'`)})`,outFields:[d,u],returnGeometry:!1}),{features:p}=await F(s,f);return p.length!==0&&!c.some(e=>{let t=e.getAttribute(n);if(!t)return!0;let{metadata:r}=e.geometry,a=p.filter(e=>e.getAttribute(u)===t);if(a.length===0)return!0;let o=a.map(e=>e.getAttribute(d));return r.getExternalSourcesOnService(i).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>o.every(t=>e!==t))})}};e([g()],G.prototype,`type`,void 0),e([g({constructOnly:!0})],G.prototype,`layer`,void 0),e([g({constructOnly:!0})],G.prototype,`supportedSourceTypes`,void 0),e([g({readOnly:!0})],G.prototype,`queryTask`,null),G=e([_(`esri.layers.graphics.sources.FeatureLayerSource`)],G);const K=1e3;export{G as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../config.js";import n from"../../../request.js";import{isSome as r,remove as i}from"../../../core/arrayUtils.js";import a from"../../../core/Error.js";import has from"../../../core/has.js";import{JSONMap as o}from"../../../core/jsonMap.js";import{Loadable as s}from"../../../core/Loadable.js";import c from"../../../core/Logger.js";import{setDeepValue as l}from"../../../core/object.js";import{debounce as u,after as d,throwIfAbortError as f}from"../../../core/promiseUtils.js";import{watch as p}from"../../../core/reactiveUtils.js";import{join as m}from"../../../core/urlUtils.js";import{generateBracedUUID as h}from"../../../core/uuid.js";import{property as g,subclass as _}from"../../../core/accessorSupport/decorators.js";import v from"../../../geometry/Extent.js";import y from"../../../geometry/SpatialReference.js";import b from"../../../geometry/support/MeshGeoreferencedVertexSpace.js";import{isRelativeVertexSpace as x}from"../../../geometry/support/meshVertexSpaceUtils.js";import{isOriginalExternal as S}from"../../../geometry/support/meshUtils/External.js";import{createFeatureEditResult as C,getFeatureJSON as w,getFeatureIds as T,getAttachmentEditsJSON as E,isProtectedOrPrivateVersionError as D,unpackEditResultData as O,createEditedFeatures as k}from"../applyEditsUtils.js";import{createDrawingInfo as A}from"./support/clientSideDefaults.js";import j from"./support/QueryTask.js";import{isHostedAgolService as M}from"../../support/arcgisLayerUrl.js";import{ensureLayerCredential as N}from"../../support/featureLayerUtils.js";import{getAssetMapTable as P}from"../../support/infoFor3D.js";import{executeQueryJSON as F}from"../../../rest/query/executeQueryJSON.js";import{unapplyEditsZUnitScaling as I}from"../../../rest/query/operations/editsZScale.js";import L from"../../../rest/support/Query.js";import R from"../../../time/TimeExtent.js";import{isSafeToEditVersion as z,isVersionInEditSession as B,isHistoricVersion as V,currentSessionId as H}from"../../../versionManagement/support/versionManagementUtils.js";const U=new o({originalAndCurrentFeatures:`original-and-current-features`,none:`none`}),W=new o({Started:`published`,Publishing:`publishing`,Stopped:`unavailable`});let G=class extends s{constructor(e){super(e),this.type=`feature-layer`,this.supportedSourceTypes=new Set([`Feature Layer`,`Oriented Imagery Layer`,`Table`,`Catalog Layer`,`Annotation Layer`,`Dimension Layer`]),this.refresh=u(async()=>{await this.load();let e=this.sourceJSON.editingInfo?.lastEditDate;if(e==null)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}let t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){let t=this.layer.sourceJSON,n=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(n),Promise.resolve(this)}async reload(e){let t=this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0;await this._fetchService(null,{...e,cacheBust:t})}initialize(){this.addHandles([p(()=>{let e=this.layer;return e&&`lastEditsEventDate`in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){let{capabilities:e,parsedUrl:t,gdbVersion:n,spatialReference:r,fieldsIndex:i,uniqueIdFields:a}=this.layer,o=`infoFor3D`in this.layer?this.layer.infoFor3D:null,s=`dynamicDataSource`in this.layer?this.layer.dynamicDataSource:null,c=has(`featurelayer-pbf`)&&e?.query.supportsFormatPBF&&o==null,l=c&&e?.query.supportsFormatPBFWithCurves,u=e?.operations?.supportsQueryAttachments??!1,d=e?.query?.relativeTimeBinWindow??0,f=t.path;return new j({dynamicDataSource:s,fieldsIndex:i,gdbVersion:n,infoFor3D:o,pbfSupported:c,pbfSupportedWithCurves:l,queryAttachmentsSupported:u,relativeTimeBinWindow:d,sourceSpatialReference:r,uniqueIdFields:a,url:f})}async addAttachment(e,t,r){await this.load();let{layer:i}=this;await N(i,`editing`);let a=e.attributes[i.objectIdField],o=i.parsedUrl.path+`/`+a+`/addAttachment`,s=this._getLayerRequestOptions({query:r}),c=this._getFormDataForAttachment(t,s.query);try{let e=await n(o,{body:c});return C(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r,i){await this.load();let{layer:a}=this;await N(a,`editing`);let o=e.attributes[a.objectIdField],s=a.parsedUrl.path+`/`+o+`/updateAttachment`,c=this._getLayerRequestOptions({query:{attachmentId:t,...i}}),l=this._getFormDataForAttachment(r,c.query);try{let e=await n(s,{body:l});return C(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(o,e)}}async applyEdits(e,t){await this.load();let{layer:i}=this;await N(i,`editing`);let o=`infoFor3D`in i?i.infoFor3D:null,s=o!=null,c=s||(t?.globalIdUsed??!1),l=s?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,u=e.addFeatures?.map(e=>w(this.layer,e,o))??[],d=(await Promise.all(u)).filter(r),f=e.updateFeatures?.map(e=>w(this.layer,e,o))??[],p=(await Promise.all(f)).filter(r),m=T(this.layer,e.deleteFeatures,c);I(d,p,i.spatialReference);let h=await E(this.layer,e),g=i.capabilities.editing.supportsAsyncApplyEdits&&s,_=t?.gdbVersion||i.gdbVersion,v={gdbVersion:_,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:c,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:g};await z(this.layer.url,_,!0);let y=B(this.layer.url,_||null);if(await V(i.url,_,i.historicMoment))throw new a(`feature-layer-source:historic-version`,`Editing a historic version is not allowed`);t?.returnServiceEditsOption?(v.edits=JSON.stringify([{id:i.layerId,adds:d.length?d:null,updates:p.length?p:null,deletes:m.length?m:null,attachments:h,assetMaps:l}]),v.returnServiceEditsOption=U.toJSON(t?.returnServiceEditsOption),v.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(v.adds=d.length?JSON.stringify(d):null,v.updates=p.length?JSON.stringify(p):null,v.deletes=m.length?c?JSON.stringify(m):m.join(`,`):null,v.attachments=h&&JSON.stringify(h),v.assetMaps=l==null?void 0:JSON.stringify(l));let b=this._getLayerRequestOptions({method:`post`,query:v});y&&(b.authMode=`immediate`,b.query.returnEditMoment=!0,b.query.sessionId=H);let x=t?.returnServiceEditsOption?i.url:i.parsedUrl.path,S;try{S=g?await this._asyncApplyEdits(x+`/applyEdits`,b):await n(x+`/applyEdits`,b)}catch(e){if(D(e))b.authMode=`immediate`,S=g?await this._asyncApplyEdits(x+`/applyEdits`,b):await n(x+`/applyEdits`,b);else throw e}return this._createEditsResult(S)}async deleteAttachments(e,t,r){await this.load();let{layer:i}=this;await N(i,`editing`);let a=e.attributes[i.objectIdField],o=i.parsedUrl.path+`/`+a+`/deleteAttachments`;try{return(await n(o,this._getLayerRequestOptions({query:{attachmentIds:t.join(`,`),...r},method:`post`}))).data.deleteAttachmentResults.map(C)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){let t=e.signal;return this.load({signal:t}).then(async()=>{let t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:i}=this.layer,{data:a}=await n(`${i}/${r}`,t),{id:o,extent:s,fullExtent:c,timeExtent:l}=a,u=s||c;return{id:o,fullExtent:u&&v.fromJSON(u),timeExtent:l&&R.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();let n=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,n)}async queryFeatures(e,t){await this.load();let n=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&n.features.length){let t=new Map;if(n.features.forEach(n=>{let r=n.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){let n=e.toLowerCase();n&&n in r&&e!==n&&(r[e]=r[n],delete r[n],t.set(n,e))}})}),n.fields!=null)for(let e of n.fields){let n=t.get(e.name.toLowerCase());n!=null&&(e.name=n)}}return n}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!M(this.layer.url))return`unavailable`;let e=m(this.layer.url,`status`),t=await n(e,{query:{f:`json`}});return W.fromJSON(t.data.status)}async uploadAssets(e,t){let{uploadAssets:n}=await import(`./support/uploadAssets.js`);return n(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){let t=this.layer;if(e==null||!(`capabilities`in t)||!(`effectiveCapabilities`in t)||t.capabilities?.operations?.supportsEditing||!t.effectiveCapabilities?.operations?.supportsEditing)return;let n=t.url;if(n==null)return;`layerId`in t&&(n=m(n,t.layerId.toString()));let r=this._getOrCreateEditInterceptor(n);r.before=t=>{let n=t.requestOptions.method??`auto`;if(n===`auto`||n===`head`){let n=t.requestOptions.query??{};n._ts=e.getTime(),t.requestOptions.query=n}}}_getOrCreateEditInterceptor(e){return this._editInterceptor??(this._editInterceptor={urls:e},t.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){this._editInterceptor!=null&&(i(t.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){let r=(await n(e,t)).data.statusUrl;for(;;){let e=(await n(r,{query:{f:`json`},responseType:`json`})).data;switch(e.status){case`Completed`:return n(e.resultUrl,{query:{f:`json`},responseType:`json`});case`CompletedWithErrors`:throw new a(`async-applyEdits-failed`,`asynchronous applyEdits call failed.`);case`Failed ImportChanges`:case`InProgress`:case`Pending`:case`ExportAttachments`:case`ExportChanges`:case`ExportingData`:case`ExportingSnapshot`:case`ImportAttachments`:case`ProvisioningReplica`:case`UnRegisteringReplica`:break;default:throw new a(`async-applyEdits-failed`,`asynchronous applyEdits call failed (undefined response status)`)}await d(K)}}_createRequestQueryOptions(e){let t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){let r={};has(`featurelayer-advanced-symbols`)&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());let{data:i}=await n(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=i}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);let r=e.type;if(!this.supportedSourceTypes.has(r))throw new a(`feature-layer-source:unsupported-type`,`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if(e.type!==`Table`&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){let t=A(e.geometryType).renderer;l(`drawingInfo.renderer`,t,e)}if(e.geometryType===`esriGeometryMultiPatch`&&e.infoFor3D&&(e.geometryType=`mesh`),e.extent==null)try{let{data:r}=await n(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){f(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){let{addAssetFeatures:t}=e;if(!t?.length||await this._areAllAssetsAlreadyMapped(t))return null;let n=e.addFeatures.filter(e=>e.geometry);if(t.length!==n.length+e.updateFeatures.length)throw new a(`feature-layer-source:unsupported-mesh-edits`,`Mixing attribute only edits with mesh geometry edits is not currently supported`);let r=[],i=new Map;for(let e of t){let{geometry:t}=e,{vertexSpace:n}=t;if(x(n))r.push(t);else{let n=t.origin,{convertMeshVertexSpace:a}=await import(`../../../geometry/support/meshUtils/convertMeshVertexSpace.js`),o=await a(t,new b({origin:[n.x,n.y,n.z??0]}));i.set(o,t),e.geometry=o,r.push(o)}}await this.uploadAssets(r);for(let[e,t]of i)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){let t=[],n=this.layer.globalIdField,r=this.layer.parsedUrl;for(let i of e){let{metadata:e}=i.geometry,a=e.getExternalSourcesOnService(r),o=i.getAttribute(n);if(a.length===0){c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}let{source:s}=a.find(S)??a[0];for(let e of s.assets)e.parts.length===1?t.push({globalId:h(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:[]}):c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){let t=e.data,{layerId:n}=this.layer,r=[],i=null;if(Array.isArray(t))for(let e of t)e.editedFeatures!=null&&r.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===n&&(i={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else i=t;let a=O(i);if(r.length>0){a.editedFeatureResults=[];for(let e of r){let{editedFeatures:t}=e,n=t?.spatialReference?new y(t.spatialReference):null;a.editedFeatureResults.push({layerId:e.id,editedFeatures:k(t,n)})}}return a}_createAttachmentErrorResult(e,t){let n=t.details.messages?.[0]||t.message,r=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new a(`feature-layer-source:attachment-failure`,n,{code:r})}}_getFormDataForAttachment(e,t){let n=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(n)for(let e in t){let r=t[e];r!=null&&(n.set?n.set(e,r):n.append(e,r))}return n}_getLayerRequestOptions(e={}){let{layer:t,layer:{parsedUrl:n,gdbVersion:r}}=this;return{...e,query:{gdbVersion:r,layer:`dynamicDataSource`in t&&t.dynamicDataSource?JSON.stringify({source:t.dynamicDataSource}):void 0,...n.query,f:`json`,...this._createRequestQueryOptions(e)},responseType:`json`}}async _areAllAssetsAlreadyMapped(e){let{layer:t}=this,{globalIdField:n,parsedUrl:i}=t,a=`infoFor3D`in t?t.infoFor3D:null;if(a==null||n==null)return!1;let o=P(a);if(o==null)return!1;let s=m(i.path,`../${o.id}`),c=[];for(let t of e)if(t.geometry.metadata.getExternalSourcesOnService(i).length>0)c.push(t);else return!1;let l=c.map(e=>e.getAttribute(n)).filter(r);if(l.length===0)return!1;let{assetMapFieldRoles:{parentGlobalId:u,assetHash:d}}=a,f=new L({where:`${u} IN (${l.map(e=>`'${e}'`)})`,outFields:[d,u],returnGeometry:!1}),{features:p}=await F(s,f);return p.length!==0&&!c.some(e=>{let t=e.getAttribute(n);if(!t)return!0;let{metadata:r}=e.geometry,a=p.filter(e=>e.getAttribute(u)===t);if(a.length===0)return!0;let o=a.map(e=>e.getAttribute(d));return r.getExternalSourcesOnService(i).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>o.every(t=>e!==t))})}};e([g()],G.prototype,`type`,void 0),e([g({constructOnly:!0})],G.prototype,`layer`,void 0),e([g({constructOnly:!0})],G.prototype,`supportedSourceTypes`,void 0),e([g({readOnly:!0})],G.prototype,`queryTask`,null),G=e([_(`esri.layers.graphics.sources.FeatureLayerSource`)],G);const K=1e3;export{G as default};