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

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 (701) 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/066550852483ab8f77bc.js +1 -0
  14. package/assets/esri/core/workers/chunks/{1ede8666d804c553803e.js → 0b6941781e35ce0f7274.js} +1 -1
  15. package/assets/esri/core/workers/chunks/0ccab50877b24f862d6e.js +1 -0
  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/3ffda5bf0b91700dc308.js +1 -0
  38. package/assets/esri/core/workers/chunks/40a584cb952e94326e9e.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1317ecdfd0cfa683a493.js → 42323093827adffe56d3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{1ba0dfbe0958cdbd7c9f.js → 42fd2a7b22b03dacc6a7.js} +1 -1
  41. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +1 -0
  42. package/assets/esri/core/workers/chunks/{d201fbf3ceff946d2bd6.js → 44d5508042cacdfcac47.js} +1 -1
  43. package/assets/esri/core/workers/chunks/4503b20ca6a80fb63d72.js +1 -0
  44. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +1 -0
  45. package/assets/esri/core/workers/chunks/45800373650fbc8262e6.js +1 -0
  46. package/assets/esri/core/workers/chunks/{6a7ab1ef9a37e87db5ae.js → 46a7da93a63663878583.js} +1 -1
  47. package/assets/esri/core/workers/chunks/46b4fb6a7fe4877b0efc.js +1120 -0
  48. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +1 -0
  49. package/assets/esri/core/workers/chunks/4911ce62421a6c3320b0.js +1 -0
  50. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +1 -0
  51. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
  52. package/assets/esri/core/workers/chunks/4debf2d9c3465250ef7a.js +1 -0
  53. package/assets/esri/core/workers/chunks/4e544de61f07ca660236.js +1 -0
  54. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +1 -0
  55. package/assets/esri/core/workers/chunks/505227797bcf2a1d908d.js +1 -0
  56. package/assets/esri/core/workers/chunks/{67ac6b326bf80fc3d33d.js → 53be85d04cd2da4f391d.js} +1 -1
  57. package/assets/esri/core/workers/chunks/54778dec1598818d93cb.js +1 -0
  58. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +1 -0
  59. package/assets/esri/core/workers/chunks/557671c897ca5563be6c.js +1 -0
  60. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +1 -0
  61. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +1 -0
  62. package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
  63. package/assets/esri/core/workers/chunks/{ceb680688fe7e570a774.js → 608be1172a908e92b9f1.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{e521bb9ee2030245c3ce.js → 612104dff305ff062dfa.js} +2 -2
  65. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +1 -0
  66. package/assets/esri/core/workers/chunks/{3ac9dcbb0571a2580236.js → 62c8c9ad09e0166207fd.js} +1 -1
  67. package/assets/esri/core/workers/chunks/6400446b7615b97c3521.js +1 -0
  68. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +1 -0
  69. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +1 -0
  70. package/assets/esri/core/workers/chunks/665e31c494d2af505acc.js +1 -0
  71. package/assets/esri/core/workers/chunks/{9232f57623e1fa3ccabc.js → 67e4b5651fd7ff7d8cf0.js} +1 -1
  72. package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
  73. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
  74. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +1 -0
  75. package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +1 -0
  76. package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
  77. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +1 -0
  78. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +1 -0
  79. package/assets/esri/core/workers/chunks/745a153d0cd34faa124e.js +1 -0
  80. package/assets/esri/core/workers/chunks/7572c2bc5062e66f6330.js +1 -0
  81. package/assets/esri/core/workers/chunks/76196c414e48834f7b92.js +1 -0
  82. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +1 -0
  83. package/assets/esri/core/workers/chunks/7ef182e24cad50815b4e.js +1 -0
  84. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +1 -0
  85. package/assets/esri/core/workers/chunks/814751e705c05099f864.js +1 -0
  86. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +1 -0
  87. package/assets/esri/core/workers/chunks/8487727f1197cf7dbf50.js +1 -0
  88. package/assets/esri/core/workers/chunks/88e54449261ef94e390d.js +1 -0
  89. package/assets/esri/core/workers/chunks/8b0d5551978ab0aac0d1.js +1 -0
  90. package/assets/esri/core/workers/chunks/8d0c2de92770a1567536.js +1 -0
  91. package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
  92. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
  93. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +1 -0
  94. package/assets/esri/core/workers/chunks/96c3900685cfb2a8ca12.js +1 -0
  95. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +1 -0
  96. package/assets/esri/core/workers/chunks/{c76c42c74eedd43263d3.js → 9dd1fc56eb1ea6eb705e.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{86a051e9fe71aa356108.js → 9e3e442a9874ed23a043.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{aa1054834738aef48bda.js → a0356702f2d3f787aeac.js} +1 -1
  99. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +1 -0
  100. package/assets/esri/core/workers/chunks/{1ba1f705b6ce5c8ea702.js → a655ebdb4bf0660615a2.js} +1 -1
  101. package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +1 -0
  102. package/assets/esri/core/workers/chunks/aaba33611753c6aada68.js +1 -0
  103. package/assets/esri/core/workers/chunks/aba42885c5d6b2b5fe7f.js +1 -0
  104. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +1 -0
  105. package/assets/esri/core/workers/chunks/ae40eac1eadd1a537bf4.js +1 -0
  106. package/assets/esri/core/workers/chunks/aeaaff7a4b1a99540f52.js +1 -0
  107. package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
  108. package/assets/esri/core/workers/chunks/af75747b06d79446a855.js +1 -0
  109. package/assets/esri/core/workers/chunks/b564ec4e03478f5659db.js +1 -0
  110. package/assets/esri/core/workers/chunks/bbf993dba74850bbf9d7.js +1 -0
  111. package/assets/esri/core/workers/chunks/bc0f54a2c15502b630ec.js +1 -0
  112. package/assets/esri/core/workers/chunks/{ff3a53c3f00335552317.js → c29c474c4b1049352d3e.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{9ab25ee06041f907b9a2.js → c2c1f51a4668055c2838.js} +1 -1
  114. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +1 -0
  115. package/assets/esri/core/workers/chunks/{a7985d20fa6e8d4878e7.js → d0f5bee9db1ad51ae687.js} +1 -1
  116. package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +1 -0
  117. package/assets/esri/core/workers/chunks/d7f6021fd41b9571a02c.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/sources/FeatureSource.js +1 -1
  343. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  344. package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
  345. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  346. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  347. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  348. package/views/2d/layers/features/support/FeatureSetReaderIndirect.js +1 -1
  349. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  350. package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
  351. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  352. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  353. package/views/3d/analysis/LineOfSight/LineOfSightInteractionVisuals.js +1 -1
  354. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  355. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  356. package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
  357. package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
  358. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  359. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  360. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  361. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  362. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  363. package/views/3d/analysis/Viewshed/types.d.ts +3 -1
  364. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +3 -0
  365. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +2 -1
  366. package/views/3d/environment/Environment.d.ts +2 -2
  367. package/views/3d/environment/Environment.js +1 -1
  368. package/views/3d/environment/EnvironmentView.js +2 -0
  369. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  370. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  371. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  372. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  373. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  374. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  375. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  376. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  377. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  378. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  379. package/views/3d/layers/FlowSubView3D.js +1 -1
  380. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  381. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  382. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  383. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  384. package/views/3d/layers/MediaLayerView3D.js +1 -1
  385. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  386. package/views/3d/layers/RouteLayerView3D.js +1 -1
  387. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  388. package/views/3d/layers/SceneLayerView3D.js +1 -1
  389. package/views/3d/layers/TiledLayerView3D.js +1 -1
  390. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  391. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  392. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  393. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +2 -0
  394. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  395. package/views/3d/layers/graphics/Graphics3DDrapedBufferGraphicLayer.js +2 -0
  396. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  397. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +2 -0
  398. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  399. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  400. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  401. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  402. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  403. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +2 -0
  404. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  405. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  406. package/views/3d/layers/graphics/Labeler.js +1 -1
  407. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  408. package/views/3d/layers/graphics/pointUtils.js +1 -1
  409. package/views/3d/layers/support/FeatureMemory.js +1 -1
  410. package/views/3d/layers/support/FeatureTile.js +1 -1
  411. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  412. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  413. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  414. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +1 -1
  415. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  416. package/views/3d/support/PBFDecoder.js +1 -1
  417. package/views/3d/support/elevationUpdateUtils.js +1 -1
  418. package/views/3d/support/popupHitTest.js +1 -1
  419. package/views/3d/terrain/OverlayManager.js +1 -1
  420. package/views/3d/terrain/OverlayRenderer.js +1 -1
  421. package/views/3d/terrain/TerrainRenderer.js +1 -1
  422. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  423. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +5 -5
  424. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +13 -13
  425. package/views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js +2 -0
  426. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  427. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +2 -0
  428. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +7 -7
  429. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +31 -29
  430. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +26 -12
  431. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  432. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +14 -14
  433. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  434. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +16 -11
  435. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +5 -5
  436. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +8 -8
  437. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +1 -1
  438. package/views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js +2 -0
  439. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +1 -1
  440. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +6 -6
  441. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  442. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  443. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  444. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  445. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  446. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  447. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  448. package/views/3d/webgl-engine/effects/atmosphere/ChapmanRaymarching.glsl.js +1 -1
  449. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  450. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  451. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  452. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  453. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  454. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  455. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  456. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +2 -2
  457. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +5 -5
  458. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  459. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  460. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
  461. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
  462. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  463. package/views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js +1 -1
  464. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
  465. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  466. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  467. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  468. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  469. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  470. package/views/3d/webgl-engine/lib/affectsGeometry.js +1 -1
  471. package/views/3d/webgl-engine/lib/bufferGeometryUtils.js +2 -0
  472. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +5 -5
  473. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  474. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +11 -11
  475. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  476. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  477. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  478. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  479. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  480. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  481. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  482. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  483. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  484. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  485. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  486. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  487. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  488. package/views/3d/webgl-engine/shaders/lineUniforms.js +2 -0
  489. package/views/DOMContainer.d.ts +28 -9
  490. package/views/DOMContainer.js +1 -1
  491. package/views/PopupView.d.ts +6 -0
  492. package/views/SceneView.d.ts +4 -10
  493. package/views/SceneView.js +1 -1
  494. package/views/VideoView.d.ts +27 -9
  495. package/views/View.d.ts +20 -19
  496. package/views/View.js +1 -1
  497. package/views/View2D.d.ts +13 -13
  498. package/views/draw/Draw.d.ts +1 -1
  499. package/views/draw/support/InteractiveHandle.js +1 -1
  500. package/views/draw/support/PluginContext.js +1 -1
  501. package/views/draw/support/managers/TooltipManager.js +1 -1
  502. package/views/interactive/options/SnappingOptions.d.ts +29 -12
  503. package/views/interactive/options/TooltipOptions.d.ts +9 -1
  504. package/views/interactive/options/ValueOptions.d.ts +9 -2
  505. package/views/interactive/options/ViewOptions.d.ts +82 -6
  506. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
  507. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  508. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  509. package/views/interactive/snapping/SnappingVisualizer.js +1 -1
  510. package/views/interactive/support/Units.d.ts +1 -0
  511. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  512. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  513. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  514. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  515. package/views/layers/FeatureLikeLayerView.d.ts +2 -2
  516. package/views/layers/GraphicsLayerView.d.ts +1 -0
  517. package/views/layers/ImageryLayerView.d.ts +1 -0
  518. package/views/layers/LayerView.js +1 -1
  519. package/views/layers/LineOfSightLayerView.d.ts +3 -4
  520. package/views/layers/ParquetLayerView.d.ts +15 -0
  521. package/views/layers/ParquetLayerView.js +1 -1
  522. package/views/layers/ViewshedLayerView.d.ts +5 -6
  523. package/views/support/layerViewUtils.js +1 -1
  524. package/views/support/projectionUtils.js +1 -1
  525. package/views/types.d.ts +3 -1
  526. package/webdoc/support/saveUtils.js +1 -1
  527. package/webdoc/support/unsupportedErrors.js +1 -1
  528. package/widgets/BasemapGallery/BasemapGalleryViewModel.d.ts +2 -2
  529. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  530. package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +3 -3
  531. package/widgets/BasemapGallery/support/LocalBasemapsSource.d.ts +2 -2
  532. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -2
  533. package/widgets/BasemapGallery/types.d.ts +3 -3
  534. package/widgets/BasemapLayerList.js +1 -1
  535. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  536. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  537. package/widgets/BatchAttributeForm/expressions/expressionUtils.js +1 -1
  538. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +6 -0
  539. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  540. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  541. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  542. package/widgets/BatchAttributeForm.js +1 -1
  543. package/widgets/DirectionalPad.js +1 -1
  544. package/widgets/Editor/EditorViewModel.d.ts +13 -8
  545. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  546. package/widgets/Editor/workflowUtils.js +1 -1
  547. package/widgets/Editor.d.ts +19 -9
  548. package/widgets/Expand.js +1 -1
  549. package/widgets/FeatureForm.d.ts +2 -2
  550. package/widgets/FeatureForm.js +1 -1
  551. package/widgets/FeatureTable/FieldColumn.js +1 -1
  552. package/widgets/FeatureTable.js +1 -1
  553. package/widgets/Features/FeaturesDrillIn.js +1 -1
  554. package/widgets/Features.js +1 -1
  555. package/widgets/Legend.d.ts +1 -0
  556. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  557. package/widgets/OrientedImageryViewer/adapters/draw/HeightMeasurementAdapter.js +1 -1
  558. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  559. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  560. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  561. package/widgets/OrientedImageryViewer/components/ImageLocationViewModel.js +1 -1
  562. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  563. package/widgets/OrientedImageryViewer/components/SketchTools.js +1 -1
  564. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  565. package/widgets/OrientedImageryViewer/types.d.ts +20 -0
  566. package/widgets/OrientedImageryViewer.d.ts +9 -1
  567. package/widgets/PanoramicVideoViewer.js +1 -1
  568. package/widgets/Print/PrintViewModel.d.ts +3 -2
  569. package/widgets/Print/PrintViewModel.js +1 -1
  570. package/widgets/Print.js +1 -1
  571. package/widgets/ScaleRangeSlider.js +1 -1
  572. package/widgets/Search/SearchResultRenderer.js +1 -1
  573. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  574. package/widgets/Sketch/SketchViewModel.d.ts +14 -9
  575. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  576. package/widgets/Sketch.d.ts +10 -10
  577. package/widgets/Track/TrackViewModel.d.ts +1 -1
  578. package/widgets/UtilityNetworkAssociations.js +1 -1
  579. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  580. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  581. package/widgets/UtilityNetworkTrace/types.d.ts +2 -2
  582. package/widgets/UtilityNetworkTrace.js +1 -1
  583. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  584. package/widgets/ValuePicker.js +1 -1
  585. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +1 -1
  586. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  587. package/widgets/support/GridControls.js +1 -1
  588. package/widgets/support/PluginSettingsControls.js +1 -1
  589. package/widgets/support/SelectionList/FeatureItem.d.ts +9 -2
  590. package/widgets/support/SelectionToolbar.js +1 -1
  591. package/widgets/support/SnappingControls.d.ts +1 -1
  592. package/widgets/support/SnappingControls.js +1 -1
  593. package/widgets/support/componentsUtils.js +1 -1
  594. package/arcade/geometry/wkt.js +0 -2
  595. package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
  596. package/assets/esri/core/workers/chunks/00d24415bdeb0adae3df.js +0 -1
  597. package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
  598. package/assets/esri/core/workers/chunks/01b00fbf6a6a22d573ee.js +0 -1
  599. package/assets/esri/core/workers/chunks/02d4f91652a79d2b637e.js +0 -1
  600. package/assets/esri/core/workers/chunks/050c4b212f2b5691db34.js +0 -1
  601. package/assets/esri/core/workers/chunks/05963f57cbe5a5249496.js +0 -1
  602. package/assets/esri/core/workers/chunks/05d865b2736f452ad2aa.js +0 -1
  603. package/assets/esri/core/workers/chunks/06e7400f5ebe0719b81c.js +0 -1
  604. package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
  605. package/assets/esri/core/workers/chunks/084222c00d263a534952.js +0 -1
  606. package/assets/esri/core/workers/chunks/0b36abcbf03037b4073d.js +0 -1
  607. package/assets/esri/core/workers/chunks/107b025dc5b09465a78f.js +0 -1
  608. package/assets/esri/core/workers/chunks/1b551ef3d84d9c1e93f9.js +0 -1
  609. package/assets/esri/core/workers/chunks/1ef39aef6b33c530cbe4.js +0 -1
  610. package/assets/esri/core/workers/chunks/1f3148cebee1961249a4.js +0 -1
  611. package/assets/esri/core/workers/chunks/1f43e06dcfe56229bb0f.js +0 -1
  612. package/assets/esri/core/workers/chunks/2164fcaced72b0fda31f.js +0 -1
  613. package/assets/esri/core/workers/chunks/25b0885d3bc190b28c04.js +0 -1
  614. package/assets/esri/core/workers/chunks/25d6c674b1c4829f040f.js +0 -1
  615. package/assets/esri/core/workers/chunks/260dcb79dfd0f981949f.js +0 -1
  616. package/assets/esri/core/workers/chunks/2a570ce6b99dac6ee996.js +0 -1
  617. package/assets/esri/core/workers/chunks/2e6a2f4d686b71249c0e.js +0 -1
  618. package/assets/esri/core/workers/chunks/2f9033890c465acff698.js +0 -1
  619. package/assets/esri/core/workers/chunks/303676d1b10676c9cab4.js +0 -1
  620. package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
  621. package/assets/esri/core/workers/chunks/32d08b571bbd996d4e6d.js +0 -1
  622. package/assets/esri/core/workers/chunks/33956f12505e72e60293.js +0 -1
  623. package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
  624. package/assets/esri/core/workers/chunks/37a636f61cfe89c6bfd1.js +0 -1
  625. package/assets/esri/core/workers/chunks/380cc538c1ab453870fa.js +0 -1
  626. package/assets/esri/core/workers/chunks/3880d2c7fb14955d7f93.js +0 -1
  627. package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
  628. package/assets/esri/core/workers/chunks/40fb1910f780e78c128c.js +0 -1
  629. package/assets/esri/core/workers/chunks/4310c8d2b40ae69c3681.js +0 -1
  630. package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +0 -1
  631. package/assets/esri/core/workers/chunks/4848f195eb93cc93dd15.js +0 -1
  632. package/assets/esri/core/workers/chunks/4cddd217383b9333f32e.js +0 -1
  633. package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
  634. package/assets/esri/core/workers/chunks/4fa59f8ed3b7b6239548.js +0 -1
  635. package/assets/esri/core/workers/chunks/57970d43cdcc5cf57a30.js +0 -1
  636. package/assets/esri/core/workers/chunks/5e184fd47e76eb976fa9.js +0 -1
  637. package/assets/esri/core/workers/chunks/5ea8809b6519c05ad9f6.js +0 -1
  638. package/assets/esri/core/workers/chunks/5f3ab77a79c408423fde.js +0 -1
  639. package/assets/esri/core/workers/chunks/5fd099ca1024707387b2.js +0 -1
  640. package/assets/esri/core/workers/chunks/604344e45c0f27497188.js +0 -1
  641. package/assets/esri/core/workers/chunks/61ad8306ab79aca79505.js +0 -1
  642. package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
  643. package/assets/esri/core/workers/chunks/6469c0d18d3663e7da4b.js +0 -1
  644. package/assets/esri/core/workers/chunks/65654e481cce9ae40e54.js +0 -1
  645. package/assets/esri/core/workers/chunks/669e39c3437d7273f0c7.js +0 -1
  646. package/assets/esri/core/workers/chunks/68e24fa3f564c2a5c9fd.js +0 -1
  647. package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +0 -1
  648. package/assets/esri/core/workers/chunks/71f739bb3f7350704af6.js +0 -1
  649. package/assets/esri/core/workers/chunks/750a9f3cdb96b966274a.js +0 -1
  650. package/assets/esri/core/workers/chunks/776565dd9741ba2ba151.js +0 -1
  651. package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
  652. package/assets/esri/core/workers/chunks/841f67baf6a1634ada48.js +0 -1
  653. package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
  654. package/assets/esri/core/workers/chunks/897fc8e78a0d54a5ff5a.js +0 -1
  655. package/assets/esri/core/workers/chunks/8af92bcc075e03e3e902.js +0 -1742
  656. package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
  657. package/assets/esri/core/workers/chunks/8e7a33cc1f83063043f2.js +0 -1
  658. package/assets/esri/core/workers/chunks/8fcfd515ee1b18c902e5.js +0 -1
  659. package/assets/esri/core/workers/chunks/9001e9a1e81bce175ddd.js +0 -1
  660. package/assets/esri/core/workers/chunks/9432feca48ca3e5849bd.js +0 -1
  661. package/assets/esri/core/workers/chunks/956a40f40bde416efe93.js +0 -1
  662. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
  663. package/assets/esri/core/workers/chunks/9673a9efec86040b8c13.js +0 -1
  664. package/assets/esri/core/workers/chunks/97dbbedea9fe03bd1306.js +0 -1
  665. package/assets/esri/core/workers/chunks/985b3f18cee87c3fe022.js +0 -1
  666. package/assets/esri/core/workers/chunks/9a7fc93cc693fd12b5d8.js +0 -1
  667. package/assets/esri/core/workers/chunks/9c0fd8baa00ee9733ba4.js +0 -1
  668. package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
  669. package/assets/esri/core/workers/chunks/a20526996d01386ec3b7.js +0 -1
  670. package/assets/esri/core/workers/chunks/a23272a7a47a95f6ddea.js +0 -1
  671. package/assets/esri/core/workers/chunks/a7edf7541569fef77cb3.js +0 -1
  672. package/assets/esri/core/workers/chunks/aa5b42e44d2959fdacd3.js +0 -1
  673. package/assets/esri/core/workers/chunks/ae2181805d8ba130babc.js +0 -1
  674. package/assets/esri/core/workers/chunks/b05a41a60e30935644be.js +0 -1
  675. package/assets/esri/core/workers/chunks/b0cfec11c758eed8095f.js +0 -1
  676. package/assets/esri/core/workers/chunks/bff767ec5bb4c0d6b324.js +0 -1
  677. package/assets/esri/core/workers/chunks/c906f984b2b6e7578c06.js +0 -1
  678. package/assets/esri/core/workers/chunks/ca7fb75e2c62e7d37122.js +0 -1
  679. package/assets/esri/core/workers/chunks/cbdebdfa5f2cded29d0d.js +0 -1
  680. package/assets/esri/core/workers/chunks/cbe6c0f32608cb504695.js +0 -1
  681. package/assets/esri/core/workers/chunks/cfae60b9d2f2939e9c16.js +0 -1
  682. package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
  683. package/assets/esri/core/workers/chunks/d56780290e0218d3e9de.js +0 -1
  684. package/assets/esri/core/workers/chunks/d6d5a9e73ee43d6066d3.js +0 -1
  685. package/assets/esri/core/workers/chunks/d89fe41c71c9621c41ae.js +0 -1
  686. package/assets/esri/core/workers/chunks/da18d96b35af20e73b3b.js +0 -1
  687. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +0 -1
  688. package/assets/esri/core/workers/chunks/df0481bcc1613ee4b7af.js +0 -1
  689. package/assets/esri/core/workers/chunks/e22d45aeef293a5ffb78.js +0 -1
  690. package/assets/esri/core/workers/chunks/e5943f3a4bbc12c06c4d.js +0 -1
  691. package/assets/esri/core/workers/chunks/e7c60bd85abbd36cdc64.js +0 -1
  692. package/assets/esri/core/workers/chunks/ec9a2425b4a498054a19.js +0 -1
  693. package/assets/esri/core/workers/chunks/edf3be87a997f4f05b96.js +0 -1
  694. package/assets/esri/core/workers/chunks/f05de08e194a3f9b96f2.js +0 -1
  695. package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
  696. package/assets/esri/core/workers/chunks/f0aaa646b17ffdbdcefa.js +0 -1
  697. package/assets/esri/core/workers/chunks/f0c0c02730fe0d948fc1.js +0 -1
  698. package/assets/esri/core/workers/chunks/fd0254c6fc6c03ec11ba.js +0 -1
  699. package/assets/esri/core/workers/chunks/ffb3728e6ac428f62af1.js +0 -1
  700. package/views/3d/environment/EnvironmentManager.js +0 -2
  701. /package/{basemaps → basemapGallery}/support/basemapCompatibilityUtils.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,1780],{67482(e,t,r){function i(e){return null!==n(e)}function n(e){return function(e){let t=o.exec(e);if(!t?.groups)return null;let r=t.groups,i=+r.year,n=r.month-1,s=+r.day,l=+(r.hours??"0"),a=+(r.minutes??"0"),u=+(r.seconds??"0");if(l>23||a>59||u>59)return null;let p,d=r.ms??"0",c=d?+d.padEnd(3,"0").slice(0,3):0;if(r.isUTC||!r.offsetSign)p=Date.UTC(i,n,s,l,a,u,c);else{let e=+r.offsetHours,t=+r.offsetMinutes;p=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,s,l,a,u,c)}return Number.isNaN(p)?null:p}(e)??function(e){let t=new Date(e),r=t.getTime();return Number.isNaN(r)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?r:null}(e)??function(e){if(!s.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}r.d(t,{C:()=>i,_:()=>n});const o=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,s=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new i(e)}},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>o,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return a(e,8);let r=p;for(let i=0;i<t;i++)r+=s(e[i]);return r}(e);let t=u;for(let r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?o(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?a(t,16):0:0),0)}function a(e,t){return p+e.length*t}const u=32,p=16,d=145},13069(e,t,r){r.d(t,{AG:()=>l,lk:()=>n,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}function l(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},65977(e,t,r){r.r(t),r.d(t,{default:()=>V});var i=r(32198),n=r(37838),o=r(49186),s=r(25728),l=r(91429),a=r(5443),u=r(16930),p=r(50498),d=r(41910),c=r(55156),f=r(60950),y=r(89808),h=r(99959);const g=Symbol("isOGCFeatureGraphicOrigin");var m;class v extends h.A{get[(m=g,f.ym)](){return this.layer}get[c.e](){return this.layer}get[y.Q](){return this.layer}get[d.e7](){return this.layer}constructor(e){super(),this[m]=!0,this.type="ogc-feature",this.layer=e}get id(){return this.layer.id}}var w=r(4146),C=r(92474),b=r(799),M=r(75321),I=r(4071),T=r(22671);let A=class extends C.x_{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){let{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>T.A.fromJSON(e))}queryFeaturesJSON(e,t={}){let r=this.getSource();return this.load(t).then(()=>(0,M.bW)(r,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){let{isWebMercator:t,isWGS84:r,latestWkid:i,wkid:n}=e,{supportedCrs:o}=this.featureDefinition;return r||t||!!n&&!!o[n]||!!i&&!!o[i]}_conformsToType(e,t){let r=RegExp(`^${(0,b.Cj)(t)}$`,"i");return e.conformsTo.some(e=>r.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:I.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){let t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){let t=e.storageCrs??M.QE,r=(0,M.J0)(t);return null==r?u.A.WGS84:new u.A({wkid:r})}_getSupportedSpatialReferences(e,t){let r="#/crs",i=e.crs??[M.QE],n=i.includes(r)?i.filter(e=>e!==r).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter(e=>!o.test(e))}async _loadOGCServices(e,t){let r=null==t?null:t.signal,{apiKey:i,collectionId:n,customParameters:s,fields:l,geometryType:a,hasZ:u,objectIdField:d,timeInfo:c,url:f}=e,y={fields:l?.map(e=>e.toJSON()),geometryType:p.Ye.toJSON(a),hasZ:u,objectIdField:d,timeInfo:c?.toJSON()},h={apiKey:i,customParameters:s,signal:r},g=await(0,M.Ki)(f,h),[m,v]=await Promise.all([(0,M.Px)(g,h),(0,M.CJ)(g,h)]);if(!this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new o.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");let w=v.collections.find(({id:e})=>e===n);if(!w)throw new o.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");let C=this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,M.GA)(g,h):null,I=await(0,M.GL)(w,y,h),T=this._getMaxRecordCount(C),A=this._getCapabilities(I.hasZ,T),F=this._getStorageSpatialReference(w).toJSON(),P=this._getSupportedSpatialReferences(w,v),x=RegExp(`^${(0,b.Cj)(M.vJ)}`,"i"),S={};for(let e of P){let t=(0,M.J0)(e);null!=t&&(S[t]||(S[t]=e.replace(x,"")))}this.featureDefinition={capabilities:A,collection:w,layerDefinition:I,spatialReference:F,supportedCrs:S}}};(0,i.Cg)([(0,l.MZ)()],A.prototype,"featureDefinition",void 0),(0,i.Cg)([(0,l.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,i.Cg)([(0,l.MZ)()],A.prototype,"type",void 0),A=(0,i.Cg)([(0,l.$K)("esri.layers.graphics.sources.OGCFeatureSource")],A);var F=r(52136),P=r(63074),x=r(69208),S=r(6455),O=r(87718),Z=r(56658),R=r(34287),j=r(32756),G=r(8303),D=r(54310),E=r(25036),k=r(82935),N=r(63396),U=r(10873),q=r(33143),$=r(20437),L=r(17036),B=r(30524),_=r(46499),Q=r(39383),z=r(41214),J=r(97552),W=r(30291);const K=(0,L.p)();let H=class extends((0,S.FJ)((0,F.p)((0,x.d)((0,Z.J)((0,O.F)((0,P.dM)((0,j.fY)((0,k.e)((0,N.d)((0,E.j)((0,R.q)((0,G.A)((0,D.J)((0,s.M)(w.A))))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new A({layer:this}),this.spatialReference=null,this.timeInfo=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,B.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){return new J.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1,n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some(t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0))),!i&&!r&&(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(J.A.from(e)||this.createQuery(),t)).then(e=>(e?.features?.forEach(e=>{e.layer=e.sourceLayer=this,e.origin=this.graphicOrigin}),e))}async queryAttributeBins(e,t){throw new o.A("OGCFeatureLayer","Layer source does not support queryAttributeBins capability")}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,B.yp)(this.renderer,this.fieldsIndex),(0,B.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(let t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],H.prototype,"capabilities",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],H.prototype,"collectionId",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],H.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],H.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],H.prototype,"displayField",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],H.prototype,"effectiveMaxRecordCount",null),(0,i.Cg)([(0,l.MZ)(U.Yj)],H.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:[$.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],H.prototype,"fields",void 0),(0,i.Cg)([(0,l.MZ)(K.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:a.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],H.prototype,"fullExtent",void 0),(0,i.Cg)([(0,l.MZ)({type:p.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.gy.read}}}}})],H.prototype,"geometryType",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],H.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],H.prototype,"hasZ",void 0),(0,i.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,i.Cg)([(0,l.MZ)({type:[_.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.w},write:!0}}}})],H.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,l.MZ)(U.kF)],H.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,l.MZ)(U.fV)],H.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:Number})],H.prototype,"maxRecordCount",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:["OGCFeatureLayer"]})],H.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,l.MZ)(U.M6)],H.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,l.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,l.MZ)({types:z.Hg,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:z.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],H.prototype,"renderer",null),(0,i.Cg)([(0,l.MZ)(U.PY)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"source",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{origins:{service:{read:!0}}}})],H.prototype,"spatialReference",void 0),(0,i.Cg)([(0,l.MZ)((0,U.U$)({name:"layerDefinition.timeInfo"}))],H.prototype,"timeInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],H.prototype,"title",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],H.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,i.Cg)([(0,l.MZ)({type:[q.A]})],H.prototype,"types",void 0),(0,i.Cg)([(0,l.MZ)(U.OZ)],H.prototype,"url",void 0),H=(0,i.Cg)([(0,l.$K)("esri.layers.OGCFeatureLayer")],H);const V=H},43334(e,t,r){r.d(t,{N3:()=>l,Om:()=>s});var i=r(69397),n=r(27647),o=r(92722);class s{constructor(e,t,r,i,n=0,o=null,s=null){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=n,this.distance=o,this.vertexCount=s}static fromJSON(e){let t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,i=e.objectId;return new s(t,e.attributes,r,i,void 0,e.distance,e.vertexCount)}weakClone(){return new s(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new s(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,n.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,i.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,r){r.d(t,{A:()=>i});class i{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new i;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,r){r.d(t,{A:()=>n});var i=r(69397);class n{constructor(e=[],t=[],r=!1,i=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=i}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:i}){return new n(e,t,r||!1,i||!1)}static fromRect([e,t,r,i]){let o=r-e,s=i-t;return new n([5],[e,t,o,0,0,s,-o,0,0,-s])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,i.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:i}=this,n=this.coords[i*t],o=this.coords[i*t+1];for(let s=1;s<r;s+=1){let r=i*(t+s),l=this.coords[r],a=this.coords[r+1];e+=-.5*(l-n)*(a+o),n=l,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let i of this.lengths){for(let n=0;n<i;n++){let i=r*(t+n);e(this.coords[i],this.coords[i+1])}t+=i}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,i=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(i+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}i+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:i}=this,o=this.coords.slice(0,i*r);return e?(e.set(o),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(o),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,i=0;t<r.length;t+=e)r[i++]=this.coords[t],r[i++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}},27647(e,t,r){r.d(t,{Q:()=>o});var i=r(92722);function n(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:r,stride:n,hasZ:o,hasM:a}=e,u=new i.A([],[],o,!1),p=u.coords,d=[],c=o?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],f=0;for(let e of t){let t=s(c,r,f,e,o,a);t&&d.push(t),f+=e*n}if(d.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),d.length){let e=6*d[0][2];p[0]=d[0][0]/e,p[1]=d[0][1]/e,o&&(e=6*d[0][4],p[2]=0===e?0:d[0][3]/e),(p[0]<c[0]||p[0]>c[1]||p[1]<c[2]||p[1]>c[3]||o&&(p[2]<c[4]||p[2]>c[5]))&&(p.length=0)}if(!p.length){let i=e.lengths[0]?l(r,0,t[0],o,a):null;if(!i)return null;p[0]=i[0],p[1]=i[1],o&&(p[2]=i[2]??0)}return u}function s(e,t,r,i,o,s){let l=n(o,s),a=r,u=r+l,p=0,d=0,c=0,f=0,y=0;for(let r=0,n=i-1;r<n;r++,a+=l,u+=l){let r=t[a],i=t[a+1],n=t[a+2],s=t[u],l=t[u+1],h=t[u+2],g=r*l-s*i;f+=g,p+=(r+s)*g,d+=(i+l)*g,o&&(g=r*h-s*n,c+=(n+h)*g,y+=g),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),o&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),y>0&&(y*=-1),!f)return null;let h=[p,d,.5*f];return o&&(h[3]=c,h[4]=.5*y),h}function l(e,t,r,i,o){let s=n(i,o),l=t,c=t+s,f=0,y=0,h=0,g=0;for(let t=0,n=r-1;t<n;t++,l+=s,c+=s){let t=e[l],r=e[l+1],n=e[l+2],o=e[c],s=e[c+1],m=e[c+2],v=i?u(t,r,n,o,s,m):a(t,r,o,s);if(v)if(f+=v,i){let e=d(t,r,n,o,s,m);y+=v*e[0],h+=v*e[1],g+=v*e[2]}else{let e=p(t,r,o,s);y+=v*e[0],h+=v*e[1]}}return f>0?i?[y/f,h/f,g/f]:[y/f,h/f]:r>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,i){let n=r-e,o=i-t;return Math.sqrt(n*n+o*o)}function u(e,t,r,i,n,o){let s=i-e,l=n-t,a=o-r;return Math.sqrt(s*s+l*l+a*a)}function p(e,t,r,i){return[e+.5*(r-e),t+.5*(i-t)]}function d(e,t,r,i,n,o){return[e+.5*(i-e),t+.5*(n-t),r+.5*(o-r)]}},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},90708(e,t,r){r.d(t,{Ap:()=>P,B2:()=>g,DF:()=>M,Di:()=>j,E2:()=>R,IE:()=>h,Nl:()=>$,PR:()=>A,Rk:()=>W,Ux:()=>D,Ye:()=>S,ZF:()=>N,aQ:()=>z,jH:()=>q,jQ:()=>Q,kz:()=>L,oN:()=>G,q3:()=>U,qN:()=>I,zv:()=>E});var i=r(49186),n=r(53966),o=r(97768),s=r(70328),l=r(19419),a=r(60408),u=r(43334),p=r(58512),d=r(92722),c=r(54339);const f=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),y={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function h({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function g({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function m({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function v({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function w({scale:e,translate:t},r,i){return r*e[i]+t[i]}function C(e,t,r){return t&&(e.hasZ=!0),r&&(e.hasM=!0),e}function b(e,t,r,i){if(t&&i&&e!==r)return(t,r,i,n)=>{i[n++]=t[r++],i[n++]=t[r++],e?r++:i[n++]=0,i[n++]=t[r++]??0};let n=+!!r+2+ +!!i,o=n-((!e&&r?1:0)+(!t&&i?1:0));return(e,t,r,i)=>{for(let s=0;s<n;++s)r[i++]=s<o?e[t++]??0:0}}function M(e,t,r){if(!e)return null;let{coords:i,hasZ:n,hasM:o}=e,[s,l]=i,a=n?i[2]:0,u=o?i[+!!n+2]:0;return{x:s,y:l,z:t?a:void 0,m:r?u:void 0}}function I(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{x:i,y:n,z:o,m:s}=e,l=[i,n];return t&&l.push(o??0),r&&l.push(s??0),new d.A([],l,t,r)}function T(e,t,r){if(null==e)return null;let{coords:i,stride:n,hasZ:o,hasM:s}=e,l=b(o,s,t,r),a=[];for(let e=0;e<i.length;e+=n){let t=[];l(i,e,t,0),a.push(t)}return C({points:a},t,r)}function A(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{points:i,hasZ:n,hasM:o}=e,s=new d.A([i.length],[],t,r),{coords:l,stride:u}=s,p=0,c=b(n??!1,o??!1,t,r);for(let e of i)c(e,0,l,p),p+=u;return s}function F(e,t,r){if(!e)return null;let{coords:i,lengths:n,stride:o,hasZ:s,hasM:l}=e,a=0,u=b(s,l,t,r),p=[];for(let e of n){let t=[];for(let r=0;r<e;r++){let e=[];u(i,a,e,0),a+=o,t.push(e)}p.push(t)}return C({paths:p},t,r)}function P(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{paths:i,hasZ:n,hasM:o}=e,s=b(n??!1,o??!1,t,r),l=new d.A([],[],t,r),{lengths:u,coords:p,stride:c}=l,f=0;for(let e of i){for(let t of e)s(t,0,p,f),f+=c;u.push(e.length)}return l}function x(e,t,r){if(!e)return null;let{coords:i,lengths:n,stride:o,hasZ:s,hasM:l}=e,a=0,u=b(s,l,t,r),p=[];for(let e of n){let t=[];for(let r=0;r<e;r++){let e=[];u(i,a,e,0),a+=o,t.push(e)}p.push(t)}return C({rings:p},t,r)}function S(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{rings:i,hasZ:n,hasM:o}=e,s=new d.A([],[],t,r),{lengths:l,coords:u,stride:p}=s,c=0,f=b(n??!1,o??!1,t,r);for(let e of i){for(let t of e)f(t,0,u,c),c+=p;l.push(e.length)}return s}const O=[],Z=[];function R(e,t,r,i,n){O[0]=e;let[o]=j(Z,O,t,r,i,n);return K(O),K(Z),o}function j(e,t,r,n,o,s){if(K(e),!r){for(let r of t){let t=(0,c.W)(r,s);e.push(new u.Om(null,r.attributes,null,t,void 0,r.distance,r.vertexCount))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?I(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);case"esriGeometryMultipoint":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s}=o,l=(0,a.Pv)(t),p=(0,a.W0)(t);e.push(new u.Om(t?A(t,r&&l,i&&p):null,s,null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);case"esriGeometryPolyline":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?P(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,i,n){for(let o of t){let{geometry:t,attributes:s,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?S(t,r&&p,i&&d):null,s,l?I(l,!1,!1):null,(0,c.W)(o,n),o.displayId,o.distance,o.vertexCount))}return e}(e,t,n,o,s);default:f().error("convertToFeatureSet:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),K(e)}return e}function G(e,t,r,i){Z[0]=e,k(O,Z,t,r,i);let n=O[0];return K(O),K(Z),n}function D(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){return null==e?null:(0,a.fT)(e)?I(e,t,r):(0,a.Bi)(e)?S(e,t,r):(0,a.Rg)(e)?P(e,t,r):(0,a.U9)(e)?A(e,t,r):void f().error("convertFromGeometry:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function E(e,t,r,n){if(null==e)return null;let o="coords"in e?e:e.geometry;if(null==o)return null;switch(t){case"esriGeometryPoint":return M(o,r,n);case"esriGeometryMultipoint":return T(o,r,n);case"esriGeometryPolyline":return F(o,r,n);case"esriGeometryPolygon":return x(o,r,n);default:return f().error("convertToGeometry:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,n,o){if(K(e),null==r)return function(e,t){for(let r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){for(let{geometry:n,attributes:o}of t)e.push({attributes:o,geometry:M(n,r,i)});return e}(e,t,n,o);case"esriGeometryMultipoint":return function(e,t,r,i){for(let{geometry:n,attributes:o}of t)e.push({geometry:n&&T(n,r,i),attributes:o});return e}(e,t,n,o);case"esriGeometryPolyline":return function(e,t,r,i){for(let{geometry:n,attributes:o}of t)e.push({geometry:n&&F(n,r,i),attributes:o});return e}(e,t,n,o);case"esriGeometryPolygon":return function(e,t,r,i){for(let{geometry:n,attributes:o,centroid:s}of t){let t=x(n,r,i),l=M(s,!1,!1);e.push(s?{geometry:t,attributes:o,centroid:l}:{geometry:t,attributes:o})}return e}(e,t,n,o);default:f().error("convertToFeatureSet:unknown-geometry",new i.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function N(e){let{spatialReference:t,transform:r,fields:i,hasM:n,hasZ:o,features:s,geometryType:l,exceededTransferLimit:a,queryGeometry:u,queryGeometryType:p}=e,d={features:k([],s,l,o,n),fields:i,geometryType:l,spatialReference:t,queryGeometry:E(u,p,o,n)};return r&&(d.transform=r),a&&(d.exceededTransferLimit=a),n&&(d.hasM=n),o&&(d.hasZ=o),d}function U(e,t){let r=new p.A,{hasM:i,hasZ:n,features:o,spatialReference:s,geometryType:l,exceededTransferLimit:a,transform:u,fields:d,globalIdFieldName:c}=e;return d&&(r.fields=d),r.geometryType=l??null,r.spatialReference=s??null,o&&j(r.features,o,l,n,i,t),a&&(r.exceededTransferLimit=a),i&&(r.hasM=i),n&&(r.hasZ=n),u&&(r.transform=u),c&&(r.globalIdFieldName=c),r}function q(e,t){let{geometryType:r,features:i}=t;if(!e)return t;for(let t=0;t<i.length;t++){let n=i[t],o=n.weakClone();o.geometry=$(n.geometry,r,e),o.centroid=$(n.centroid,"esriGeometryPoint",e),i[t]=o}return t.transform=e,t}function $(e,t,r,i,n,o=!1){if(null==e||!e?.coords.length)return null;let s=y[t],{coords:l,lengths:a,stride:u,hasZ:p,hasM:c}=e;i??=p,n??=c;let f=new d.A([],[],i,n),w=f.stride,C=b(p,c,i,n),M=0,I=[0,0,0,0].slice(w),T=o?m:h,A=o?v:g;function F(){C(l,M,I,0),M+=u,I[0]=T(r,I[0]),I[1]=A(r,I[1])}if(e.isPoint)return F(),f.coords.push(...I),f;let P=0;for(let e of a){if(e<s)continue;let t=1;F(),f.coords.push(...I);let[r,i]=I;for(let n=1;n<e;n++){F();let[e,n]=I;(r!==e||i!==n)&&(o||(I[0]-=r,I[1]-=i),f.coords.push(...I),r=e,i=n,t++)}t>=s?(f.lengths.push(t),P=f.coords.length):K(f.coords,P)}return K(f.coords,P),f.coords.length?f:null}function L(e,t,r,i=e.hasZ,n=e.hasM){if(!e.coords.length)return null;let o=y[t],{coords:s,lengths:l,stride:a,hasZ:u,hasM:p}=e,c=new d.A([],[],i,n),f=c.stride,h=b(u,p,i,n);if(e.isPoint)return h(s,0,c.coords,0),c;let g=0,m=r*r;for(let e of l){if(e<o){g+=e*a;continue}let t=c.coords.length/f,r=g,i=g+(e-1)*a;h(s,r,c.coords,c.coords.length),_(c.coords,s,a,m,h,r,i),h(s,i,c.coords,c.coords.length);let n=c.coords.length/f-t;n>=o?c.lengths.push(n):K(c.coords,t*f),g+=e*a}return c.coords.length?c:null}function B(e,t,r,i){let n=e[t],o=e[t+1],s=e[r],l=e[r+1],a=e[i],u=e[i+1],p=s,d=l,c=a-p,f=u-d;if(0!==c||0!==f){let e=((n-p)*c+(o-d)*f)/(c*c+f*f);e>1?(p=a,d=u):e>0&&(p+=c*e,d+=f*e)}return c=n-p,f=o-d,c*c+f*f}function _(e,t,r,i,n,o,s){let l,a=i,u=0;for(let e=o+r;e<s;e+=r)l=B(t,e,o,s),l>a&&(u=e,a=l);a>i&&(u-o>r&&_(e,t,r,i,n,o,u),n(t,u,e,e.length),s-u>r&&_(e,t,r,i,n,u,s))}function Q(e,t){if(!t?.coords?.length)return null;let r=1/0,i=1/0,n=-1/0,o=-1/0,{coords:a,stride:u}=t;for(let e=0;e<a.length;e+=u){let t=a[e],s=a[e+1];r=Math.min(r,t),n=Math.max(n,t),i=Math.min(i,s),o=Math.max(o,s)}return(0,s.is)(e)?(0,s.BI)(e,r,i,n,o):(0,l.fA)(r,i,n,o,e),e}function z(e,t){let{coords:r,lengths:i,stride:n,hasZ:s,hasM:l}=e;if(!r.length)return void(i.length=0);(0,o.Lw)(t);let{originPosition:a,scale:u,translate:p}=t,d=H;d.originPosition=a;let c=d.scale;c[0]=u[0]??1,c[1]=-(u[1]??1),c[2]=u[2]??1,c[3]=u[3]??1;let f=d.translate;if(f[0]=p[0]??0,f[1]=p[1]??0,f[2]=p[2]??0,f[3]=p[3]??0,l&&!s&&(c[2]=c[3],f[2]=f[3]),!i.length){for(let e=0;e<n;++e)r[e]=w(d,r[e],e);return void(i.length=0)}let y=0;for(let e=0;e<i.length;e++){let t=i[e];i[e]=t;for(let e=0;e<n;++e)r[y+e]=w(d,r[y+e],e);let o=r[y],s=r[y+1];y+=n;for(let e=1;e<t;e++,y+=n){o+=r[y]*c[0],s+=r[y+1]*c[1],r[y]=o,r[y+1]=s;for(let e=2;e<n;++e)r[y+e]=w(d,r[y+e],e)}}}function J(e,t,r,i){let n=0,o=e[i*t],s=e[i*(t+1)];for(let l=1;l<r;l++){let r=o+e[i*(t+l)],a=s+e[i*(t+l)+1],u=(r-o)*(a+s);o=r,s=a,n+=u}return.5*n}function W(e,t){let{coords:r,lengths:i}=e,n=0,o=0;for(let e=0;e<i.length;e++){let s=i[e];o+=J(r,n,s,t),n+=s}return Math.abs(o)}function K(e,t=0){e.length!==t&&(e.length=t)}const H={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},85113(e,t,r){r.d(t,{BM:()=>A,bd:()=>F,sO:()=>T,xD:()=>d});var i=r(67482),n=r(49186),o=r(21325),s=r(90708),l=r(43334),a=r(92722),u=r(30524);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function d(e){return p[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function y(e){for(let t of e)if(t.length>2)return!0;return!1}function h(e){let t=0;for(let r=0;r<e.length;r++){let i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function g(e){let t=e[0],r=e[e.length-1];(t[0]!==r[0]||t[1]!==r[1]||t[2]!==r[2])&&e.push(t)}function m(e,t){let{coordinates:r,type:i}=e,n=t.hasZ??!1;switch(i){case"Point":return new a.A([],[...r],n,!1);case"LineString":return(0,s.Ap)({paths:[r],hasZ:!0},n,!1);case"MultiLineString":return(0,s.Ap)({paths:r,hasZ:!0},n,!1);case"MultiPoint":return(0,s.PR)({points:r,hasZ:!0},n,!1);case"Polygon":case"MultiPolygon":{let e=new a.A([],[],n,!1);for(let t of"Polygon"===i?[r]:r){v(e,t[0],n);for(let r=1;r<t.length;r++)w(e,t[r],n)}return e}}}function v(e,t,r){g(t),function(e){return!h(e)}(t)?b(e,t,r):C(e,t,r)}function w(e,t,r){g(t),function(e){return h(e)}(t)?b(e,t,r):C(e,t,r)}function C(e,t,r){for(let i of t)M(e,i,r);e.lengths.push(t.length)}function b(e,t,r){for(let i=t.length-1;i>=0;i--)M(e,t[i],r);e.lengths.push(t.length)}function M(e,[t,r,i],n){e.coords.push(t,r),n&&e.coords.push(i||0)}function I(e){switch(typeof e){case"string":return(0,i.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function T(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:r}=e;if(!r)return;let i="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=(0,o.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!i||!s.test(i))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function A(e,t={}){let r,i=[],n=new Set,o=new Set,s=!1,l=null,a=!1,{geometryType:p=null}=t;for(let t of c(e)){let{geometry:e,properties:c,id:h}=t;if((!e||(p||=d(e.type),d(e.type)===p))&&(s||=y(f(e)),a||(a=null!=h,a&&(r=typeof h,c&&(l=Object.keys(c).filter(e=>c[e]===h)))),c&&l&&a&&null!=h&&(l.length>1?l=l.filter(e=>c[e]===h):1===l.length&&(l=c[l[0]]===h?l:[])),c))for(let e in c){if(n.has(e))continue;let t=I(c[e]);if("unknown"===t){o.add(e);continue}o.delete(e),n.add(e);let r=(0,u.rS)(e);r&&i.push({name:r,alias:e,type:t})}}let h=(0,u.rS)(1===l?.length&&l[0]||null)??void 0;if(h)for(let e of i)if(e.name===h&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:i,geometryType:p,hasZ:s,objectIdFieldName:h,objectIdFieldType:r,unknownFields:Array.from(o)}}function F(e,t){return Array.from(function*(e,t={}){let{geometryType:r,objectIdField:i}=t;for(let n of e){let{geometry:e,properties:o,id:s}=n;if(e&&d(e.type)!==r)continue;let a,u=o||{};i&&(a=u[i],null!=s&&!a&&(u[i]=a=s)),yield new l.Om(e&&m(e,t),u,null,a)}}(c(e),t))}},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>f});var i=r(44208),n=r(4718),o=r(99352),s=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let i=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,r){r.d(t,{$1:()=>v,CR:()=>m,MB:()=>y,Yx:()=>p,bP:()=>c});var i=r(67482),n=r(18370),o=r(60408),s=r(21325),l=r(30524);class a{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new a(e)}}function p(e){return new u(e)}class d{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new d(e)}const f=new Set;function y(e,t,r,i=!1){f.clear();for(let n in r){let o=e.get(n);if(!o)continue;let s=h(o,r[n]);if(f.add(o.name),o&&(i||o.editable)){let e=(0,l.CJ)(o,s);if(e)return p((0,l.uo)(e,o,s));t[o.name]=s}}for(let t of e.requiredFields??[])if(!f.has(t.name))return p(`missing required field "${t.name}"`);return null}function h(e,t){let r=t;return(0,l.WA)(e)&&"string"==typeof t?r=(0,l.XT)(t):(0,l.yM)(e)&&null!=t&&"string"!=typeof t?r=String(t):(0,l.vE)(e)&&"string"==typeof t&&(r=(0,i._)(t)),(0,l.WX)(r)}const g=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(3456)]).then(()=>r(3637)));function m(e,t){if(!(0,o.Bi)(e)&&!(0,o.Rg)(e)||!(0,s.fn)(t))return e;let r=g.module;if(null==r)throw TypeError("simplify operator not loaded");return r.simplifyExecute({...e,spatialReference:t})??e}async function v(e,t){(0,s.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await g.getImportPromise()}r.d(t,["PC",0,{supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}])},52136(e,t,r){var i=r(32198),n=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},69208(e,t,r){var i=r(32198),n=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),n=r(93637),o=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let n=new s.A;return n.read(i,r),[n]}const a={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let o=e.find(e=>!!e.field);o&&(0,n.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},8303(e,t,r){var i=r(32198),n=r(92602),o=r(70333),s=r(56507),l=r(60999),a=r(49186),u=r(36563),p=r(53966),d=r(97768),c=r(17676),f=r(84952),y=r(91429),h=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),C=r(26121),b=r(36005),M=r(43937);const I={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,T=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:n}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,n,s=!o.id?.findCredential(this.url),l=e===r.id;if(l&&r.portal.user)return this._getUserPrivileges(r,s);if(l)i=r.portal.url;else try{i=await(0,h.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,f.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;n=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,n=g.A.getDefault();if(n&&n.loaded&&(0,f.S8)(n.restUrl)===(0,f.S8)(i))return n.user;let a=`${i}/community/self`,u=null==e?null:e.signal,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,C.wN)(this.portalItem,t)?(t?.messages?.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:m.default})],T.prototype,"portalItem",null),(0,i.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],T.prototype,"readPortalItem",null),(0,i.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],T.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],T.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasUpdateItemPrivileges",void 0),T=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],T),T}])},82935(e,t,r){var i=r(32198),n=r(91429),o=r(30524),s=r(96184),l=r(73133),a=r(79677),u=r(10184),p=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,n=l.j.fromJSON(r.timeOffsetUnits);return i&&n?new u.A({value:i,unit:n}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:a.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:s.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},63396(e,t,r){r.d(t,{d:()=>I});var i=r(32198),n=r(91429),o=r(41910),s=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[s.ym](){return this.trackInfoProvider.trackInfo}get[o.e7](){return this.trackInfoProvider}}var u=r(37838),p=r(69540),d=r(25482),c=r(93637),f=r(50820),y=r(10873),h=r(46499),g=r(41214);let m=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,n.MZ)({type:[h.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,n.MZ)(y.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,n.MZ)({types:g.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,n.$K)("esri.layers.support.TrackPartInfo")],m);var v=r(96576),w=r(59868),C=r(10184),b=r(43937);let M=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new v.A({symbol:w.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new v.A({symbol:w.UK.clone()})}),this.trackLines=new m({renderer:new v.A({symbol:w.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){let i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,i,t)}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"enabled",void 0),(0,i.Cg)([(0,n.MZ)({type:[f.A],json:{write:!0}})],M.prototype,"fields",void 0),(0,i.Cg)([(0,b.K)("fields")],M.prototype,"writeFields",null),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],M.prototype,"latestObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:C.A,json:{write:!0}})],M.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],M.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,n.MZ)(y.M6)],M.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],M.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],M.prototype,"previousObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],M.prototype,"trackLines",void 0),(0,i.Cg)([(0,n.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],M.prototype,"timeField",void 0),M=(0,i.Cg)([(0,n.$K)("esri.layers.support.TrackInfo")],M);const I=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,i.Cg)([(0,n.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,i.Cg)([(0,n.MZ)({type:M})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.TrackableLayer")],r),r}},75321(e,t,r){r.d(t,{CJ:()=>I,GA:()=>F,GL:()=>M,I:()=>S,J0:()=>P,Ki:()=>A,Px:()=>T,bW:()=>x});var i=r(56507),n=r(49186),o=r(53966),s=r(84952),l=r(16930),a=r(21325),u=r(28735),p=r(90708),d=r(58512),c=r(85113),f=r(64714),y=r(82832),h=r(95466),g=r(98453);r(98623);const m=()=>o.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),v="startindex",w=new Set([v,"offset"]),C="http://www.opengis.net/def/crs/",b=`${C}OGC/1.3/CRS84`;async function M(e,t,r={},o=5){let{links:l}=e,a=G(l);if(!a)throw new n.A("ogc-feature-layer:missing-items-page","Missing items url");let{apiKey:u,customParameters:p,signal:d}=r,y=(0,s.s2)(a.href,e.landingPage.url),w={limit:o,...p,token:u},C=(0,s.a6)(y,w),{data:b}=await(0,i.A)(C,{signal:d,headers:{accept:"application/geo+json"}}),M=k(C,o,b.links)??v;(0,c.sO)(b);let I=b.numberMatched,T=(0,c.BM)(b,{geometryType:t.geometryType}),A=t.fields||T.fields||[],F=null==t.hasZ?T.hasZ:t.hasZ,P=T.geometryType,x=t.objectIdField||T.objectIdFieldName||"OBJECTID",S=t.timeInfo,O=A.find(({name:e})=>e===x);if(O)O.editable=!1,O.nullable=!1;else{if(!T.objectIdFieldType)throw new n.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");A.unshift({name:x,alias:x,type:"number"===T.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(x!==T.objectIdFieldName){let e=A.find(({name:e})=>e===T.objectIdFieldName);e&&(e.type="esriFieldTypeInteger")}A===T.fields&&T.unknownFields.length>0&&m().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:T.unknownFields}});for(let e of A){if(e.name??=e.alias,e.alias??=e.name,"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable??=!0,e.nullable??=!0),!e.name)throw new n.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!g.m.jsonValues.includes(e.type))throw new n.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(S){let e=new h.A(A);if(S.startTimeField){let t=e.get(S.startTimeField);t?(S.startTimeField=t.name,t.type="esriFieldTypeDate"):S.startTimeField=null}if(S.endTimeField){let t=e.get(S.endTimeField);t?(S.endTimeField=t.name,t.type="esriFieldTypeDate"):S.endTimeField=null}if(S.trackIdField){let t=e.get(S.trackIdField);t?S.trackIdField=t.name:(S.trackIdField=null,m().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:S}}))}S.timeReference||={timeZoneIANA:"UTC"},!S.startTimeField&&!S.endTimeField&&(m().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:S}}),S=void 0)}return{drawingInfo:P?(0,f.F0)(P):null,extent:j(e),geometryType:P,fields:A,hasZ:!!F,objectIdField:x,paginationParameter:M,timeInfo:S,featureCount:I}}async function I(e,t={}){let{links:r,url:o}=e,l=D(a=r,"data","application/json")??D(a,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");var a;if(!l)throw new n.A("ogc-feature-layer:missing-collections-page","Missing collections url");let{apiKey:u,customParameters:p,signal:d}=t,c=(0,s.s2)(l.href,o),{data:f}=await(0,i.A)(c,{signal:d,headers:{accept:"application/json"},query:{...p,token:u}});for(let t of f.collections)t.landingPage=e;return f}async function T(e,t={}){let{links:r,url:o}=e,l=D(a=r,"conformance","application/json")??D(a,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");var a;if(!l)throw new n.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");let{apiKey:u,customParameters:p,signal:d}=t,c=(0,s.s2)(l.href,o),{data:f}=await(0,i.A)(c,{signal:d,headers:{accept:"application/json"},query:{...p,token:u}});return f}async function A(e,t={}){let{apiKey:r,customParameters:n,signal:o}=t,{data:s}=await(0,i.A)(e,{signal:o,headers:{accept:"application/json"},query:{...n,token:r}});return s.url=e,s}async function F(e,t={}){let{links:r,url:n}=e,o=D(r,"service-desc","application/vnd.oai.openapi+json;version=3.0");if(!o)return m().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;let{apiKey:l,customParameters:a,signal:u}=t,p=(0,s.s2)(o.href,n),{data:d}=await(0,i.A)(p,{signal:u,headers:{accept:"application/vnd.oai.openapi+json;version=3.0"},query:{...a,token:l}});return d}function P(e){let t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e)?.groups;if(!t)return null;let{authority:r,code:i}=t;switch(r.toLowerCase()){case"ogc":switch(i.toLowerCase()){case"crs27":return l.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return l.A.WGS84.wkid;default:return null}case"esri":case"epsg":{let e=Number.parseInt(i,10);return Number.isNaN(e)?null:e}default:return null}}async function x(e,t,r){let i=await S(e,t,r);return(0,p.ZF)(i)}async function S(e,t,r){let{collection:{links:o,landingPage:{url:f}},layerDefinition:g,maxRecordCount:m,queryParameters:{apiKey:v,customParameters:w},spatialReference:C,supportedCrs:b}=e,M=G(o);if(!M)throw new n.A("ogc-feature-layer:missing-items-page","Missing items url");let{geometry:I,num:T,start:A,timeExtent:F,where:P}=t;if(t.objectIds)throw new n.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");let x=l.A.fromJSON(C),S=t.outSpatialReference??x,Z=S.isWGS84?null:O(S,b),j=R(I,b),D=function(e){if(!e)return null;let{start:t,end:r}=e;return`${null==t?"..":t.toISOString()}/${null==r?"..":r.toISOString()}`}(F),k=(H=P)&&"1=1"!==H?H:null,N=T??(null==A?m:10),U=0===A?void 0:A,{fields:q,geometryType:$,hasZ:L,objectIdField:B,paginationParameter:_}=g,Q=(0,s.s2)(M.href,f),{data:z}=await(0,i.A)(Q,{...r,query:{...w,...j,crs:Z,datetime:D,query:k,limit:N,[_]:U,token:v},headers:{accept:"application/geo+json"}}),J=(0,c.bd)(z,{geometryType:$,hasZ:L,objectIdField:B}),W=J.length===N&&!!E(z.links??[]),K=new h.A(q);var H;for(let e of J){let t={};(0,y.MB)(K,t,e.attributes,!0);for(let e of K.fields)e.nullable&&!(e.name in t)&&(t[e.name]=null);t[B]=e.attributes[B],e.attributes=t}if(!Z&&S.isWebMercator)for(let e of J)if(null!=e.geometry&&null!=$){let t=(0,p.zv)(e.geometry,$,L,!1);t.spatialReference=l.A.WGS84,e.geometry=(0,p.Ux)((0,u.Cv)(t,S))}for(let e of J)e.objectId=e.attributes[B];let V=Z||!Z&&S.isWebMercator?S.toJSON():a.KK,Y=new d.A;return Y.exceededTransferLimit=W,Y.features=J,Y.fields=q,Y.geometryType=$,Y.hasZ=L,Y.spatialReference=V,Y}function O(e,t){let{isWebMercator:r,wkid:i,latestWkid:n}=e;if(!i&&!n)return null;let o=r?t[3857]??t[102100]??t[102113]??t[900913]:i&&t[i]||n&&t[n];return o?`${C}${o}`:null}function Z(e){if(!e)return"";let{xmin:t,ymin:r,xmax:i,ymax:n}=e;return`${t},${r},${i},${n}`}function R(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;let{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:Z(e)};let i=O(r,t);return null==i?r.isWebMercator?{bbox:Z((0,u.Cv)(e,l.A.WGS84))}:null:{bbox:Z(e),"bbox-crs":i}}function j(e){let t=e.extent?.spatial;if(!t)return null;let r=t.bbox[0],i=4===r.length,[n,o]=r,s=i?void 0:r[2];return{xmin:n,ymin:o,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:l.A.WGS84.toJSON()}}function G(e){return D(e,"items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")??D(e,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")}function D(e,t,r,i){return i?e.find(({rel:e,type:n,profile:o})=>e===t&&n===r&&o?.includes(i))??e.find(({rel:e,type:i,profile:n})=>e===t&&i===r&&!n):e.find(({rel:e,type:i})=>e===t&&i===r)??e.find(({rel:e,type:r})=>e===t&&!r)}function E(e){return D(e,"next","application/geo+json")}function k(e,t,r){if(!r)return;let i=E(r),n=(0,s.An)(i?.href)?.query;if(!n)return;let o=(0,s.An)(e).query,l=Object.keys(o??{});return Object.entries(n).filter(([e])=>!l.includes(e)).find(([e,r])=>w.has(e.toLowerCase())&&Number.parseInt(r,10)===t)?.[0]}r.d(t,["QE",0,b,"vJ",0,C])},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),o=r(66552),s=r(25482),l=r(91429);const a=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(69540),o=r(25482),s=r(91429),l=r(8631),a=r(29005),u=r(36005),p=r(43937);let d=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],d)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(32198),o=r(66552),s=r(25482),l=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>o});var i=r(34727),n=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){let o=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(o&&((0,i.gg)(t,o[0])||(0,i.ZH)(r,o[1])))return"";let s=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let n=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],n=e[t+1];if((0,i.ZH)(p(n.minScale),d(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,n){return e=p(e),r=p(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||1/0}function d(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>a});var i=r(44208),n=r(53966),o=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,l.DB)(this.fieldsIndex,e)}}}}},22671(e,t,r){r.d(t,{A:()=>v});var i,n=r(32198),o=r(52106),s=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),d=r(60408),c=r(65864),f=r(50498),y=r(20437),h=r(36005),g=r(43937);const m=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,i){if(e)return void m.write(e,t,r,i);let{features:n}=this;if(n)for(let e of n)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,n],scale:[o,s]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*o+i,e=>n-e*s,l,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=p.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){let o=e[t],s=r.fromJSON(o),l=o.geometry?.spatialReference;null!=s.geometry&&!l&&(s.geometry.spatialReference=i);let a=o.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}n.push(s)}return n}_quantizePoints(e,t,r){let i,n,o=[];for(let s=0,l=e.length;s<l;s++){let l=e[s];if(s>0){let e=t(l[0]),s=r(l[1]);(e!==i||s!==n)&&(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){let o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,d.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let o,s,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=l.length;e<i;e++){let i=l[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];e>0?(o+=n[0],s+=n[1]):(o=n[0],s=n[1]),n[0]=t(o),n[1]=r(s)}}if(i&&n)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{let o,s,l=e.points;for(let e=0,i=l.length;e<i;e++){let i=l[e];e>0?(o+=i[0],s+=i[1]):(o=i[0],s=i[1]),i[0]=t(o),i[1]=r(s)}if(i&&n)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}else if(n)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,h.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,g.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,h.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,g.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},26121(e,t,r){r.d(t,{I6:()=>p,ci:()=>u,dL:()=>a,wN:()=>d});var i=r(49186),n=r(84952),o=r(77548),s=r(20655),l=r(59923);async function a(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let n=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map(e=>(0,l.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(n=n.filter(({name:e})=>!(l.MG.has(e)||t.includes(e)))),i&&(n=n.filter(e=>"web-document-write:property-required"!==e.name))}if(n.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}function p(e){return(0,o.qd)(e).some(e=>!!e.charts?.length)}function d(e,t){let r=t?.portal,i=e?.id&&(e.portal||s.A.getDefault());return!!r&&!!i&&!(0,n.ut)(i.restUrl,r.restUrl)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8245],{11006(e,t,i){function r(e,t,i,r,s){n(e,t,i||0,r||e.length-1,s||a)}function n(e,t,i,r,a){for(;r>i;){if(r-i>600){var l=r-i+1,o=t-i+1,u=Math.log(l),d=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*d*(l-d)/l)*(o-l/2<0?-1:1);n(e,t,Math.max(i,Math.floor(t-o*d/l+c)),Math.min(r,Math.floor(t+(l-o)*d/l+c)),a)}var h=e[t],f=i,p=r;for(s(e,i,t),a(e[r],h)>0&&s(e,i,r);f<p;){for(s(e,f,p),f++,p--;a(e[f],h)<0;)f++;for(;a(e[p],h)>0;)p--}0===a(e[i],h)?s(e,i,p):s(e,++p,r),p<=t&&(i=p+1),t<=p&&(r=p-1)}}function s(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function a(e,t){return e<t?-1:+(e>t)}i.d(t,{q:()=>r})},69052(e,t,i){i.d(t,{hr:()=>n});var r=i(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return s(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+a(this.range,e-t,i)}minimalMonotonic(e,t,i){return s(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);let i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function s(e,t,i,r,n=0,s=!1){return(r-=n)<t?r+=a(e,t-r):r>i&&(r-=a(e,r-i)),s&&r===i&&(r=t),r+n}function a(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const l=new n(0,2*Math.PI),o=(new n(-Math.PI,Math.PI),new n(0,360));i.d(t,["ie",0,o,"uC",0,l])},18370(e,t,i){i.d(t,{z:()=>n});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function n(e){return new r(e)}},44123(e,t,i){i.d(t,{WhereClauseCache:()=>s});var r=i(66344),n=i(89696);class s{constructor(e,t){this._cache=new r.q(e),this._invalidCache=new r.q(t)}get(e,t){let i=`${t?.uid}:${e}`,r=this._cache.get(i);if(r)return r;if(null!=this._invalidCache.get(i))return null;try{let r=n.A.create(e,{fieldsIndex:t});return this._cache.put(i,r),r}catch(e){return this._invalidCache.put(i,e),null}}getError(e,t){let i=`${t?.uid}:${e}`;return this._invalidCache.get(i)??null}}},46329(e,t,i){i.d(t,{y:()=>c});var r=i(49186),n=i(4305),s=i(513),a=i(50954),l=i(52006),o=i(49663),u=i(46068),d=i(59803);function c(e,t,i){if((0,l.Xq)(t))return(0,d.T)(e,t,i);if((0,l.n1)(t)){let s=(0,n.m_)(e,t,i)[0];if(null==s)throw new r.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return s}if((0,l.aO)(t)){let r=(0,a.pM)(e,t);return(0,s.fM)(r,i)}if((0,l.DA)(t)){let r=(0,o.io)(e,t);return(0,s.fM)(r,i)}let c=(0,u.SW)(e,t);return(0,u.pb)(c,i)}},52039(e,t,i){i.d(t,{O7:()=>h,el:()=>u});var r=i(69052),n=(i(49186),i(18370)),s=i(17676),a=(i(5443),i(39829)),l=(i(82799),i(16930)),o=(i(80754),i(21325));async function u(e,t,i){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(i=t);let r=null;for(let t of e)r??=t?.spatialReference;if(!r)return e;let n=(0,o.Vp)(r);if(!n)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(n);return["xmin"in t?t:new a.A(t)]}let[l,u]=n.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=u,h||=t.x<=l;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=u,h||=e.xmin<=l,h||=e.xmax>=u,h||=e.xmax<=l}if(!h)return e;let[{foldInto360Range:f},p]=await(0,s.qr)(Promise.all([d.getImportPromise(),c.getImportPromise()]),i),m=p.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=p.fromGeometry(e),i=p.toGeometry(f(t,m),r);return"extent"===e.type&&1===i?.rings.length?i.extent:i})}const d=(0,n.z)(()=>i.e(4144).then(()=>i(4144)).then(e=>e.load().then(()=>e))),c=(0,n.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(1550)]).then(()=>i(78125)));function h(e,t,i){let r=(0,o.Vp)(i);if(null==r)return e;let[n,s]=r.valid,a=2*s,l=0,u=0;t>s?l=Math.ceil(Math.abs(t-s)/a):t<n&&(l=-Math.ceil(Math.abs(t-n)/a)),e>s?u=Math.ceil(Math.abs(e-s)/a):e<n&&(u=-Math.ceil(Math.abs(e-n)/a));let d=e+(l-u)*a,c=d-t;return c>s?d-=a:c<n&&(d+=a),d}function f(e){let t=(0,o.Vp)(e);if(null==t)return null;let[i,n]=t.valid;return new r.hr(i,n)}const p=f(l.A.WGS84);f(l.A.WebMercator),i.d(t,["Y_",0,p])},80754(e,t,i){i.d(t,{kS:()=>u,kd:()=>o});var r=i(82799),n=i(16930),s=i(60408),a=i(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,a.Ed)(e))for(let i of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of i)if((0,a.aO)(e)){let[i,r]=e.c;i[0]+=t,r[0]+=t}else if((0,a.FG)(e)){let[i,r]=e.a;i[0]+=t,r[0]+=t}else if((0,a.n1)(e)){let[i,r,n]=e.b;i[0]+=t,r[0]+=t,n[0]+=t}else e[0]+=t;for(let i of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of i)e[0]+=t;return e}i.d(t,["j7",0,l])},62577(e,t,i){function r(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null==e.extent?[0,0,0,0]:[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]}:null}function n(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;let{originPosition:t,scale:i,translate:r}=e,n=i[0]??1,s=i[1]??1;return{originPosition:"lowerLeft",scale:[n,"lowerLeft"===t?s:-s,i[2]??1,i[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function s({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function a({scale:e,translate:t},i){return Math.round((i-t[1])/e[1])}function l({scale:e,translate:t},i){return i*e[0]+t[0]}function o({scale:e,translate:t},i){return i*e[1]+t[1]}function u({scale:e,translate:t},i){return(i??0)*e[2]+t[2]}function d({scale:e,translate:t},i){return i?i*e[3]+t[3]:0}function c(e,t){return e&&t?m:e&&!t?f:!e&&t?p:h}i.d(t,{$X:()=>_,B2:()=>a,Gy:()=>g,IE:()=>s,P5:()=>T,Q1:()=>n,SW:()=>x,Tr:()=>v,VV:()=>r});const h=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s];let{scale:a,originPosition:u}=e,d=a[0],c="lowerLeft"===u?a[1]:-a[1];for(let e=1;e<t.length;e++){let[r,a]=t[e];n+=d*r,s+=c*a,i[e]=[n,s]}return i},f=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s,u(e,r[2])];let{scale:a,originPosition:d}=e,c=a[0],h="lowerLeft"===d?a[1]:-a[1];for(let r=1;r<t.length;r++){let[a,l,o]=t[r];n+=c*a,s+=h*l,i[r]=[n,s,u(e,o)]}return i},p=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s,d(e,r[2])];let{scale:a,originPosition:u}=e,c=a[0],h="lowerLeft"===u?a[1]:-a[1];for(let r=1;r<t.length;r++){let[a,l,o]=t[r];n+=c*a,s+=h*l,i[r]=[n,s,d(e,o)]}return i},m=(e,t)=>{let i=Array(t.length);if(!t.length)return i;let r=t[0],n=l(e,r[0]),s=o(e,r[1]);i[0]=[n,s,u(e,r[2]),d(e,r[3])];let{scale:a,originPosition:c}=e,h=a[0],f="lowerLeft"===c?a[1]:-a[1];for(let r=1;r<t.length;r++){let[a,l,o,c]=t[r];n+=h*a,s+=f*l,i[r]=[n,s,u(e,o),d(e,c)]}return i};function y(e,t,i){let r=Array(i.length);for(let n=0;n<i.length;n++)r[n]=t(e,i[n]);return r}function g(e,t,i){let r=n(e);return t.x=s(r,i.x),t.y=a(r,i.y),null!=i.z&&(t.z=function({scale:e,translate:t},i){return Math.round(((i??0)-t[2])/e[2])}(r,i.z)),null!=i.m&&(t.m=function({scale:e,translate:t},i){return i?Math.round((i-t[3])/e[3]):0}(r,i.m)),t}function x(e,t,i,r=i?.hasZ??!1,s=i?.hasM??!1){if(null!=i){let a=n(e);t.points=c(r,s)(a,i.points),t.hasZ=r,t.hasM=s}return t}function v(e,t,i,r=null!=i?.z,s=null!=i?.m){if(null==i)return t;let a=n(e);return t.x=l(a,i.x),t.y=o(a,i.y),r&&(t.z=u(a,i.z)),s&&(t.m=d(a,i.m)),t}function _(e,t,i,r=i?.hasZ??!1,s=i?.hasM??!1){return null!=i&&(t.rings=y(n(e),c(r,s),i.rings),t.hasZ=r,t.hasM=s),t}function T(e,t,i,r=i?.hasZ??!1,s=i?.hasM??!1){return null!=i&&(t.paths=y(n(e),c(r,s),i.paths),t.hasZ=r,t.hasM=s),t}},43334(e,t,i){i.d(t,{N3:()=>l,Om:()=>a});var r=i(69397),n=i(27647),s=i(92722);class a{constructor(e,t,i,r,n=0,s=null,a=null){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=n,this.distance=s,this.vertexCount=a}static fromJSON(e){let t=e.geometry?s.A.fromJSON(e.geometry):null,i=e.centroid?s.A.fromJSON(e.centroid):null,r=e.objectId;return new a(t,e.attributes,i,r,void 0,e.distance,e.vertexCount)}weakClone(){return new a(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new a(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,n.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,r.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,i){i.d(t,{A:()=>r});class r{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new r;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,i){i.d(t,{A:()=>n});var r=i(69397);class n{constructor(e=[],t=[],i=!1,r=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=r}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:r}){return new n(e,t,i||!1,r||!1)}static fromRect([e,t,i,r]){let s=i-e,a=r-t;return new n([5],[e,t,s,0,0,a,-s,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let i of this.lengths){if(i<3)continue;let{stride:r}=this,n=this.coords[r*t],s=this.coords[r*t+1];for(let a=1;a<i;a+=1){let i=r*(t+a),l=this.coords[i],o=this.coords[i+1];e+=-.5*(l-n)*(o+s),n=l,s=o}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:i}=this;for(let r of this.lengths){for(let n=0;n<r;n++){let r=i*(t+n);e(this.coords[r],this.coords[r+1])}t+=r}}deltaDecode(){let e=this.clone(),{coords:t,lengths:i}=e,r=0,{stride:n}=this;for(let e of i){for(let i=1;i<e;i++){let e=n*(r+i);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}r+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:i,size:r}=this,s=this.coords.slice(0,r*i);return e?(e.set(s),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(s),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let i=Array(t*e);for(let t=0,r=0;t<i.length;t+=e)i[r++]=this.coords[t],i[r++]=this.coords[t+1];return new n(this.lengths,i,!1,!1)}}},27647(e,t,i){i.d(t,{Q:()=>s});var r=i(92722);function n(e,t){return e?t?4:3:t?3:2}function s(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:i,stride:n,hasZ:s,hasM:o}=e,u=new r.A([],[],s,!1),d=u.coords,c=[],h=s?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],f=0;for(let e of t){let t=a(h,i,f,e,s,o);t&&c.push(t),f+=e*n}if(c.sort((e,t)=>{let i=e[2]-t[2];return 0===i&&s&&(i=e[4]-t[4]),i}),c.length){let e=6*c[0][2];d[0]=c[0][0]/e,d[1]=c[0][1]/e,s&&(e=6*c[0][4],d[2]=0===e?0:c[0][3]/e),(d[0]<h[0]||d[0]>h[1]||d[1]<h[2]||d[1]>h[3]||s&&(d[2]<h[4]||d[2]>h[5]))&&(d.length=0)}if(!d.length){let r=e.lengths[0]?l(i,0,t[0],s,o):null;if(!r)return null;d[0]=r[0],d[1]=r[1],s&&(d[2]=r[2]??0)}return u}function a(e,t,i,r,s,a){let l=n(s,a),o=i,u=i+l,d=0,c=0,h=0,f=0,p=0;for(let i=0,n=r-1;i<n;i++,o+=l,u+=l){let i=t[o],r=t[o+1],n=t[o+2],a=t[u],l=t[u+1],m=t[u+2],y=i*l-a*r;f+=y,d+=(i+a)*y,c+=(r+l)*y,s&&(y=i*m-a*n,h+=(n+m)*y,p+=y),i<e[0]&&(e[0]=i),i>e[1]&&(e[1]=i),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),s&&(n<e[4]&&(e[4]=n),n>e[5]&&(e[5]=n))}if(f>0&&(f*=-1),p>0&&(p*=-1),!f)return null;let m=[d,c,.5*f];return s&&(m[3]=h,m[4]=.5*p),m}function l(e,t,i,r,s){let a=n(r,s),l=t,h=t+a,f=0,p=0,m=0,y=0;for(let t=0,n=i-1;t<n;t++,l+=a,h+=a){let t=e[l],i=e[l+1],n=e[l+2],s=e[h],a=e[h+1],g=e[h+2],x=r?u(t,i,n,s,a,g):o(t,i,s,a);if(x)if(f+=x,r){let e=c(t,i,n,s,a,g);p+=x*e[0],m+=x*e[1],y+=x*e[2]}else{let e=d(t,i,s,a);p+=x*e[0],m+=x*e[1]}}return f>0?r?[p/f,m/f,y/f]:[p/f,m/f]:i>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,i,r){let n=i-e,s=r-t;return Math.sqrt(n*n+s*s)}function u(e,t,i,r,n,s){let a=r-e,l=n-t,o=s-i;return Math.sqrt(a*a+l*l+o*o)}function d(e,t,i,r){return[e+.5*(i-e),t+.5*(r-t)]}function c(e,t,i,r,n,s){return[e+.5*(r-e),t+.5*(n-t),i+.5*(s-i)]}},75752(e,t,i){i.d(t,{do:()=>B,qo:()=>L,Wc:()=>q});var r=i(4576),n=i(21818),s=i(49186),a=(i(44208),i(4718)),l=i(97768),o=i(17676),u=i(86211),d=i(12195),c=i(99917),h=i(70328),f=i(19419),p=i(537),m=i(60408),y=i(65864),g=i(52039),x=i(21325),v=i(90708),_=i(29441),T=i(51441),S=i(31464);class F{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;let e=1e3*this._purgeInterval,t=performance.now()-e;for(let[i,r]of this._storage){if(!(r.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(i)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new w(t)),this._scheduleSweep()}get(e){let t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let I=0;class w{constructor(e){this.items=e,this.time=performance.now(),this.id=I++}}var R=i(99352),E=i(8384),A=i(58727),M=i(62660),b=i(43668);const C="unsupported-query";async function O(e,{fieldsIndex:t,geometryType:i,spatialReference:r,availableFields:n}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new s.A(C,"Unsupported query options",{query:e});return N(t,n,e),function(e,t,i){let{outStatistics:r,groupByFieldsForStatistics:n,having:a}=i,l=n?.length,o=r?.length;if(a){if(!l||!o)throw new s.A(C,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:i});(0,_.eD)(e,t,a,r,i)}if(o){if(!(0,_._d)(r))return;let a=(0,_.g9)(e,r,n);(0,_.MG)(e,t,a,{expressionName:"statistics",query:i});for(let n of r){let{onStatisticField:r,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(r)&&"count"!==a&&"min"!==a&&"max"!==a&&(0,_.MG)(e,t,[r],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:z,query:i});else{let{statisticParameters:e}=n;if(!e)throw new s.A(C,"statisticParameters should be set for percentile type",{definition:n,query:i})}}}}(t,n,e),Promise.all([(0,M.c0)(e,i,r),(0,S.Nk)(r,e.outSR)]).then(()=>e)}function N(e,t,i){let{returnDistinctValues:r,outStatistics:n}=i,a=n?n.map(e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase()).filter(Boolean):[];if("orderByFields"in i&&i.orderByFields&&i.orderByFields.length>0){let r=" asc",n=" desc",s=i.orderByFields.map(e=>{let t=e.toLowerCase();return t.includes(r)?t.split(r)[0]:t.includes(n)?t.split(n)[0]:e}).filter(e=>!a.includes(e));(0,_.MG)(e,t,s,{expressionName:"orderByFields",query:i})}if("outFields"in i)if(i.outFields?.length)(0,_.MG)(e,t,i.outFields,{expressionName:"outFields",query:i,allowedFieldTypes:"all"});else if(r)throw new s.A(C,"outFields should be specified for returnDistinctValues",{query:i});(0,_.SN)(e,t,i.where,i)}const z=new Set([..._.vl,..._.VW]);async function V(e,t,i,r){let n=[];if(i.valueExpression){let{arcadeUtils:e}=await(0,b.l)();n=e.extractFieldNames(i.valueExpression)}if(i.field&&n.push(i.field),i.field2&&n.push(i.field2),i.field3&&n.push(i.field3),i.normalizationField&&n.push(i.normalizationField),!n.length&&!i.valueExpression)throw new s.A(C,"field or valueExpression is required",{params:i});(0,_.MG)(e,t,n,{expressionName:"statistics",query:r})}var P=i(86420),G=i(95466),D=i(92359);class B{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new F,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=(0,d.W)(e.fieldsIndex)?e.fieldsIndex:G.A.fromJSON(e.fieldsIndex),this.availableFields=!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?new Set(this.fieldsIndex.fields.map(e=>e.name)):new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),this._frameTask=e.scheduler&&e.priority?e.scheduler.registerTask(e.priority):D.nu}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){let i=(0,o.Mq)(t);if(!this.timeInfo?.trackIdField)throw new s.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){let i=(0,o.Mq)(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){let i=(0,o.Mq)(t);return e=(0,a.o8)(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){let r=(0,o.Mq)(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){let i=(0,o.Mq)(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){let t=(0,o.Mq)(e);this._timeExtentPromise||=(0,P.W)(this.timeInfo,this.featureStore);let[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,o.Te)(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{let t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new E.G([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{let t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(e){if(e!==A.v8)throw e;return 0}}async*_executeQueryForExtent(e){let t=e.outSR;try{let i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;let r=i.size;if(!r)return{count:0,extent:null};let n=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:n}}catch(e){if(e===A.v8)return{count:0,extent:null};throw e}}async*_executeQueryForIdSet(e){try{let t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;let i=t.items,r=new Set;for(let e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(e){if(e===A.v8)return new Set;throw e}}async*_executeQueryForLatestObservations(e){try{let t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==A.v8)throw t;return await new E.G([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await(0,A.iJ)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t){let i=e.bin;if(!i.onField&&!i.onExpression?.value||"autoIntervalBin"===i.type&&null==i.parameters.numberOfBins||"dateBin"===i.type&&(null==i.parameters.number||null==i.parameters.unit)||"fixedBoundariesBin"===i.type&&null==i.parameters.boundaries||"fixedIntervalBin"===i.type&&null==i.parameters.interval)throw new s.A(C,"Unsupported query options",{query:e});return O(e,t)}(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==A.v8)throw i;t=new E.G([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){let{field:i,normalizationField:r,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n});return yield,await s.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){let{field:i,field2:r,field3:n,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:n,valueExpression:s});return yield,await a.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){let{field:i,normalizationField:r,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n});return yield,await s.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){let{field:i,normalizationField:r,valueExpression:n}=t,s=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n});return yield,await s.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){let{point:i,distance:r,returnEdge:n,vertexMode:s}=e;if(!n&&"none"===s)return{candidates:[]};let l=(0,a.o8)(e.query);l=await(0,A.T2)(l,this.definitionExpression,this.spatialReference),yield,l=await O(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let o=!(0,x.aI)(i.spatialReference,this.spatialReference);o&&(await(0,S.Nk)(i.spatialReference,this.spatialReference),yield);let u="number"==typeof r?r:r.x,d="number"==typeof r?r:r.y,c={xmin:i.x-u,xmax:i.x+u,ymin:i.y-d,ymax:i.y+d,spatialReference:i.spatialReference},h=o?(0,S.Cv)(c,this.spatialReference):c;if(!h)return{candidates:[]};let[f]=await(0,g.el)((0,y.rS)(i),{signal:t});yield;let[p]=await(0,g.el)((0,y.rS)(h),{signal:t});if(yield,null==f||null==p)return{candidates:[]};let m=await this._searchFeatures(L(p.toJSON()));yield;let v=new E.G(m,l,this);this._executeObjectIdsQuery(v),yield,this._executeTimeQuery(v),yield,this._executeAttributesQuery(v),yield,yield*this._executeGeometryQueryForSnapping(v),yield;let _=f.toJSON(),T=o?(0,S.Cv)(_,this.spatialReference):_,F=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return v.createSnappingResponse({...e,point:T,distance:F},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){let r=(0,h.hZ)((0,h.vt)(),h.qv);return await this.featureStore.forEachBounds(e,e=>(0,h.RF)(r,e)),q(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new E.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){let e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>(0,n.z)(e))}let e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=(0,a.o8)(e),e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await O(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};let i=yield*this._executeSceneFilterQuery(e);yield;let r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;let{outSR:t,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,s=e.sceneFilter.geometry,a=null==n||(0,x.aI)(n,s.spatialReference)?s:(0,S.Cv)(s,n);if(!a)return null;let l=i||r,o=(0,x.fn)(t)&&!(0,x.aI)(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;let u=this.featureAdapter,d=await this._searchFeatures(L(a));if(yield,"disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;let t=new Set;for(let e of d)t.add(u.getObjectId(e));let i=await this._getAllFeatures();yield;let r=await(0,M.xt)("esriSpatialRelDisjoint",a,this.geometryType);yield;let n=yield*this._runSpatialFilter(i,e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)));return yield,await o(new E.G(n,e,this))}if(!d.length)return new E.G([],e,this);if(this._canExecuteSinglePass(a,e))return await o(new E.G(d,e,this));let c=await(0,M.xt)("esriSpatialRelContains",a,this.geometryType);yield;let h=yield*this._runSpatialFilter(d,e=>c(u.getGeometry(e)));return yield,await o(new E.G(h,e,this))}async*_executeGeometryQuery(e,t){if(null!=t&&0===t.items.length)return t;let{geometry:i,outSR:n,returnGeometry:s,returnCentroid:a}=e,l=t?null:this._getCacheKey(e),o=l?this._cache.get(l):null;if(o)return new E.G(o,e,this);let u=(0,x.fn)(n)&&!(0,x.aI)(this.spatialReference,n),d=s||a,c=async e=>(u&&d&&await this._project(e,n),l&&this._cache.put(l,e.items),e),h=this.featureStore.featureSpatialReference,f=!i||null==h||(0,x.aI)(h,i.spatialReference)?i:(0,S.Cv)(i,h);if(!f)return await c(t??await this._getAllFeaturesQueryEngineResult(e));yield;let p=this.featureAdapter,m=await this._searchFeatures(L(i));yield;let y=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===y){if(!m.length)return await c(t??await this._getAllFeaturesQueryEngineResult(e));let i,r=new Set;for(let e of m)r.add(p.getObjectId(e));null==t?(yield,i=await this._getAllFeatures(),yield):i=t.items;let n=await(0,M.xt)(y,f,this.geometryType);yield;let s=yield*this._runSpatialFilter(i,e=>!r.has(p.getObjectId(e))||n(p.getGeometry(e)));return yield,await c(new E.G(s,e,this))}if(null!=t){let e=new r.vW;m=m.filter(i=>(0,r.qh)(t.items,i,t.items.length,e)>=0)}if(!m.length){let t=new E.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(f,e))return await c(new E.G(m,e,this));let g=await(0,M.xt)(y,f,this.geometryType);yield;let v=yield*this._runSpatialFilter(m,e=>g(p.getGeometry(e)));return yield,await c(new E.G(v,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;let t=new Set;for(let i of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(i).forEach(e=>t.add(e));let i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;let t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;let t=(0,P.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;let t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){let{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;let r=await(0,M.xt)(i,t.geometry,this.geometryType);yield;let n=this.featureAdapter;e.items=yield*this._runSpatialFilter(e.items,e=>r(n.getGeometry(e)))}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield,r=[];for(let n of e)t(n)&&r.push(n),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){let{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,n=r||i,s=new Map,a=this.featureAdapter.getAttribute;for(let i of e.items){let e=a(i,t),r=a(i,n),l=s.get(e);(!l||r>a(l,n))&&s.set(e,i)}e.items=Array.from(s.values())}_getCacheKey(e){let{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:n,outSR:s,resultType:a,cacheHint:l}=e;if("tile"!==a&&!l)return null;let o=r||n,u=(0,x.fn)(s)&&!(0,x.aI)(this.spatialReference,s);return JSON.stringify(u&&o?[t,i,s]:[t,i])}_canExecuteSinglePass(e,t){let{spatialRel:i}=t;return(0,M.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||(0,x.aI)(this.spatialReference,t))return e;let i=this.featureAdapter,r=(0,c.isLoaded)()?await this._getFullExtent():void 0,s=await(0,S.lK)(e.items.map(e=>(0,T.p)(this.geometryType,i.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:r});return e.items=(0,n.z)(s.map((t,r)=>i.cloneWithGeometry(e.items[r],(0,v.Ux)(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){let t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));let i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=(0,a.o8)(e);try{e=await(0,A.GC)(e,this.definitionExpression,this.spatialReference),yield,e=await async function(e,t,{fieldsIndex:i,geometryType:r,spatialReference:n,availableFields:a}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new s.A(C,"Unsupported query options",{query:e});return N(i,a,e),Promise.all([V(i,a,t,e),(0,M.c0)(e,r,n),(0,S.Nk)(n,e.outSR)]).then(()=>e)}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;let i=yield*this._executeSceneFilterQuery(e);yield;let r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(t){if(t!==A.v8)throw t;return new E.G([],e,this)}}get test(){}}function L(e){if((0,M.tC)(e)){if((0,m.ZC)(e))return[(0,f.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,m.Bi)(e))return e.rings.map(e=>(0,f.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[(0,p.Rg)((0,f.vt)(),e)]}function q(e,t,i,r,n){let s={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:r};n&&isFinite(e[2])&&isFinite(e[5])&&(s.zmin=e[2],s.zmax=e[5],s.hasZ=!0);let a=(0,S.Cv)(s,t,i);if(a.spatialReference=i,a.xmax-a.xmin===0){let e=(0,u.GA)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){let e=(0,u.GA)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(n&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){let e=(0,u.GA)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}},99352(e,t,i){i.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},8384(e,t,i){i.d(t,{G:()=>O});var r=i(4576),n=i(18370),s=i(4718),a=i(16930),l=i(12359),o=i(90634),u=i(62577),d=i(21325),c=i(46329),h=i(52006),f=i(88930),p=i(29441),m=i(51441),y=i(30524),g=i(1873),x=i(43668);class v{constructor(e,t,i){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=i,this.featureAdapter=t;let r=e.outFields;if(r&&!r.includes("*")){this.outFields=r;let e=0;for(let t of r){let r=(0,p.Wq)(t),n=this.fieldsIndex.get(r),s=n?null:(0,p.j4)(r,i),a=n?n.name:(0,p.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:s})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach(e=>this.getAttributes(e)),this._returnDistinctMap.size):e.length}getAttributes(e){let t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,i){if(i)return this.featureAdapter.getAttribute(e,i.name);let r=t,n=null;return this._fieldDataCache.has(r)?n=this._fieldDataCache.get(r)?.clause:i||(n=(0,p.j4)(t,this.fieldsIndex),this._fieldDataCache.set(r,{alias:r,clause:n})),n?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,i=!0){let r=t.normalizationType,n=t.normalizationTotal,s=this.fieldsIndex.get(t.field),a=(0,y.zD)(s)||(0,y.Ah)(s),l=(0,y.OH)(s);return e.map(e=>{let s=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(s=`${(0,g.gJ)(s)}${t.fieldDelimiter}${(0,g.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(s=`${s}${t.fieldDelimiter}${(0,g.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof s&&i&&(a?s=s?new Date(s).getTime():null:l&&(s=s?(0,f.rb)(s):null)),r&&Number.isFinite(s)){let i="field"===r&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;s=(0,g.zS)(s,r,i,n)}return s})}async getExpressionValues(e,t,i,r,n){let{arcadeUtils:s}=await(0,x.l)(),a=s.hasGeometryOperations(t);a&&await s.enableGeometryOperations();let l=s.createFunction(t),o=s.getViewInfo(i),u={fields:this.fieldsIndex.fields};return e.map(e=>{let t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,m.p)(r.geometryType,this.featureAdapter.getGeometry(e)),spatialReference:i.spatialReference}:null},d=s.createExecContext(t,o,n);return s.executeFunction(l,d)})}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,p.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,p.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){let t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);let i={};for(let r of t){let{alias:t,clause:n}=this._fieldDataCache.get(r);i[t]=n?n.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return i}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;let t=this.outFields,i=[];if(t)for(let r of t){let{alias:t}=this._fieldDataCache.get(r);i.push(e[t])}else for(let t in e)i.push(e[t]);let r=`${(t||["*"]).join(",")}=${i.join(",")}`,n=this._returnDistinctMap.get(r)||0;return this._returnDistinctMap.set(r,++n),n>1?null:e}}var _=i(31464),T=i(58727);class S{constructor(e,t,i){this.objectId=e,this.target=t,this.distance=i}}class F extends S{constructor(e,t,i){super(e,t,i),this.type="vertex"}}class I extends S{constructor(e,t,i,r,n,s=!1,a=null){super(e,t,i),this.start=r,this.end=n,this.draped=s,this.curve=a,this.type="edge"}}var w=i(5834),R=i(59977),E=i(57231),A=i(11440),M=i(60909),b=(i(98623),i(34747));const C=(0,n.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(6491)]).then(()=>i(55666)));class O{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasZ=!!t.returnZ&&i.hasZ,this.hasM=!!t.returnM&&i.hasM,this.fieldsIndex=i.fieldsIndex,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter,this.featureIdInfo=i.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){let e=new v(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);let{groupByFieldsForStatistics:t,having:i,outStatistics:r}=this.query;if(!t?.length)return 1;let n=new Map,s=new Map,a=new Set;for(let l of r){let{statisticType:r}=l,o="exceedslimit"===r?void 0:l.onStatisticField;if(!s.has(o)){let i=[];for(let r of t){let t=this._getAttributeValues(e,r,this.items,n);i.push(t)}s.set(o,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}let u=s.get(o);for(let t in u){let{data:r,items:n}=u[t],s=r.join(",");(!i||e.validateItems(n,i))&&a.add(s)}}return a.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?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,...(0,d.fn)(this.query.outSR)&&!(0,d.aI)(t.spatialReference,this.query.outSR)?(0,_.Cv)(t,t.spatialReference,this.query.outSR):t}}return e}createSnappingResponse(e,t,i){let r=this.featureAdapter,{point:n}=e,s="number"==typeof e.distance?e.distance:e.distance.x,a="number"==typeof e.distance?e.distance:e.distance.y;function l(e,t){let i=(e-n.x)/s,r=(t-n.y)/a;return i*i+r*r}let o={candidates:[]},u="esriGeometryPolygon"===this.geometryType,d="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,f=this._getPointCreator(t,this.spatialReference,i),p=new V(null,0),m=new V(null,0),y={x:0,y:0,z:0};for(let e of this.items){let t=r.getObjectId(e),i=r.getGeometryWithCurves?.(e);if(null!=i){x(i,t);continue}let n=r.getGeometry(e);null!=n&&g(n,t)}return o.candidates.sort((e,t)=>e.distance-t.distance),o;function g(t,i){let{coords:r,stride:s}=t,a=t.isPoint?P:t.lengths;if(p.coords=r,m.coords=r,e.returnEdge){let e=0;for(let t=0;t<a.length;t++){let r=a[t],d=e;for(let t=0;t<r;t++,e+=s){if(!u&&t===r-1||(p.coordsIndex=e,m.coordsIndex=t===r-1?d:e+s,!z(y,n,p,m)))continue;let a=l(y.x,y.y);a<=1&&o.candidates.push(new I(i,f(y),Math.sqrt(a),f(p),f(m)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<a.length;t++){let r=a[t],n=e,d=m;d.coordsIndex=n;for(let t=0;t<r;t++,e+=s){if(p.coordsIndex=e,u&&t===r-1&&p.x===d.x&&p.y===d.y)continue;let n=l(p.x,p.y);n<=1&&o.candidates.push(new F(i,f(p),Math.sqrt(n)))}}}else if(d&&"ends"===e.vertexMode){let e=0,t=[];for(let i=0;i<a.length;i++){t.push(e);let r=a[i];e+=r*s,r>1&&t.push(e-s)}for(let e of t){p.coordsIndex=e;let t=l(p.x,p.y);t<=1&&o.candidates.push(new F(i,f(p),Math.sqrt(t)))}}}function x(t,i){let{candidates:r}=o,s={x:0,y:0,z:0};if(e.returnEdge){let e=[n.x,n.y],a=new V(e,0),o=new V(e,0);for(let{segments:n}of t.parts)for(let{start:t,curve:u}of n){let{curvePoint:n}=(0,c.y)(t,u,e),d=l(...n);if(d>1)continue;[s.x,s.y]=n,a.coords=t,o.coords=(0,h.yP)(u);let p=(0,h.Xq)(u)?null:(0,h.tk)(u);r.push(new I(i,f(s),Math.sqrt(d),f(a),f(o),!1,p))}}function a(e){s.x=t.vertexXY[2*e],s.y=t.vertexXY[2*e+1];let n=l(s.x,s.y);n>1||(s.z=t.vertexZ?.[e]??0,r.push(new F(i,f(s),Math.sqrt(n))))}if("all"===e.vertexMode){let{vertexCount:e}=t;for(let t=0;t<e;++t)a(t)}else if("ends"===e.vertexMode)switch(t.type){case"point":a(0);break;case"polyline":for(let e=0;e<t.partCount;++e){let i=t.partOffsets[e],r=t.partOffsets[e+1]-1;a(i),r!==i&&a(r)}}}}_getPointCreator(e,t,i){let r=null==i||(0,d.aI)(t,i)?e=>e:e=>(0,_.Cv)(e,t,i),{hasZ:n}=this;return n&&e?({x:e,y:t,z:i})=>r({x:e,y:t,z:i}):({x:e,y:t})=>r({x:e,y:t,z:0})}async createSummaryStatisticsResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,minValue:a,maxValue:l,scale:o,timeZone:u,outStatisticTypes:d}=e,c=this.fieldsIndex.get(t),h=(0,y.vE)(c)||(0,y.zD)(c)||(0,y.Ah)(c),f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,scale:o,timeZone:u},this.items),p=(0,g.Vb)({normalizationType:n,normalizationField:r,minValue:a,maxValue:l}),m={value:.5,fieldType:c?.type},x=(0,y.yM)(c)?(0,g.z9)({values:f,supportsNullCount:p,percentileParams:m,outStatisticTypes:d}):(0,g.G_)({values:f,minValue:a,maxValue:l,useSampleStdDev:!n,supportsNullCount:p,percentileParams:m,outStatisticTypes:d});return(0,g.oZ)(x,d,h)}async createUniqueValuesResponse(e){let{field:t,valueExpression:i,domains:r,returnAllCodedValues:n,scale:s,timeZone:a}=e,l=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:s,timeZone:a},this.items,!1),o=(0,g.b3)(l);return(0,g.lv)(o,r,n,e.fieldDelimiter)}async createClassBreaksResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:d,scale:c,timeZone:h}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,scale:c,timeZone:h},this.items),p=(0,g.Rw)(f,{field:t,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numClasses:d});return(0,g.jM)(p,a)}async createHistogramResponse(e){let{field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:d,scale:c,timeZone:h}=e,f=await this._getDataValues({field:t,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:s,scale:c,timeZone:h},this.items);return(0,g.$y)(f,{field:t,normalizationField:r,normalizationType:n,normalizationTotal:s,classificationMethod:a,standardDeviationInterval:l,minValue:o,maxValue:u,numBins:d})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(let r of t.slice().reverse()){let{compare:t,fieldOrExpression:n,fieldInfo:s}=G(r,this.fieldsIndex);e.sort((e,r)=>t(i(e,n,s),i(r,n,s)))}}_topNFeatures(e,t,i,n){if(e.length>1&&t?.length){let s=t.map(e=>{let{compare:t,fieldOrExpression:i,fieldInfo:r}=G(e,this.fieldsIndex);return(e,s)=>t(n(e,i,r),n(s,i,r))}).reduceRight((e,t)=>(i,r)=>{let n=t(i,r);return 0===n||Number.isNaN(n)?e(i,r):n}),a=[];for(let t of e)(0,r.HX)(a,t,i,s);return a}return e.slice(0,i)}_createFeatureQueryResponse(e){let{items:t,geometryType:i,hasM:r,hasZ:n,featureIdInfo:s,spatialReference:a}=this,{outFields:l,outSR:o,quantizationParameters:d,resultRecordCount:c,resultOffset:h,returnZ:f,returnM:p}=e,m=null!=c&&t.length>(h||0)+c,y=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:y,geometryType:i,hasM:r&&p,hasZ:n&&f,objectIdFieldName:"object-id"===s.type?s.fieldName:null,spatialReference:o||a,transform:d&&(0,u.VV)(d)||null}}_createFeatures(e,t){let i,r=new v(e,this.featureAdapter,this.fieldsIndex),{hasM:n,hasZ:s}=this,{orderByFields:a,quantizationParameters:l,returnGeometry:o,returnCentroid:d,maxAllowableOffset:c,resultOffset:h,resultRecordCount:f,returnZ:p=!1,returnM:y=!1}=e,g=s&&p,x=n&&y,_=h||0,T=null==f?null:_+f;null!=T&&T<=5e3&&T<t.length?i=this._topNFeatures(t,a,T,(e,t,i)=>r.getFieldValue(e,t,i)):(i=[...t],this._sortFeatures(i,a,(e,t,i)=>r.getFieldValue(e,t,i))),(_>0||null!=T)&&(i=i.slice(_,T??void 0));let S=[],F=0;if(this.geometryType&&(o||d)){let e=(0,u.VV)(l)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!d)for(let n of i){let i=this.featureAdapter.getGeometry(n),s=this._addFeatureJSONMetadata(n,{attributes:r.getAttributes(n),geometry:(0,m.p)(this.geometryType,i,c,e,g,x)});t&&i&&!s.geometry&&(s.centroid=(0,m.L)(this,this.featureAdapter.getCentroid(n,this),e)),S[F++]=s}else if(!o&&d)for(let t of i)S[F++]=this._addFeatureJSONMetadata(t,{attributes:r.getAttributes(t),centroid:(0,m.L)(this,this.featureAdapter.getCentroid(t,this),e)});else for(let t of i)S[F++]=this._addFeatureJSONMetadata(t,{attributes:r.getAttributes(t),centroid:(0,m.L)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,m.p)(this.geometryType,this.featureAdapter.getGeometry(t),c,e,g,x)})}else for(let e of i){let t=r.getAttributes(e);t&&(S[F++]=this._addFeatureJSONMetadata(e,{attributes:t}))}return S}_addFeatureJSONMetadata(e,t){let i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=1/0,i=1/0,r=1/0;for(let e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null==e.maxPointCount?1/0:e.maxPointCount,i=null==e.maxRecordCount?1/0:e.maxRecordCount,r=null==e.maxVertexCount?1/0:e.maxVertexCount;break}return e="esriGeometryPoint"===this.geometryType?this.items.length>t:this.items.length>i||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,i={attributes:{}}){let r=[],n=new Map,s=new Map,a=new Map,l=new Map,o=new v(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:d,having:c,orderByFields:h,resultRecordCount:f}=e,p=d?.length,m=!!p,g=m?d[0]:null,x=m&&!this.fieldsIndex.get(g);for(let h of u??[]){let{outStatisticFieldName:u,statisticType:f}=h,v=h,_="exceedslimit"===f?void 0:h.onStatisticField,T="percentile_disc"===f||"percentile_cont"===f,S="EnvelopeAggregate"===f||"CentroidAggregate"===f||"ConvexHullAggregate"===f,F=m&&1===p&&(_===g||x)&&"count"===f;if(m){if(!a.has(_)){let e=[];for(let i of d){let r=this._getAttributeValues(o,i,t,n);e.push(r)}a.set(_,this._calculateUniqueValues(e,t,!S&&o.returnDistinctValues))}let i=a.get(_);if(!i)continue;let r=Object.keys(i);for(let s of r){let{count:r,data:a,items:h,itemPositions:f}=i[s],p=a.join(",");if(!c||o.validateItems(h,c)){let i=l.get(p)||{attributes:{}};if(e.returnAggIds&&(i.aggregateIds=h.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),S){i.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(v,h);i.aggregateGeometries[t]=e}else{let e=null;if(F)e=r;else{let i=this._getAttributeValues(o,_,t,n),r=f.map(e=>i[e]);e=T&&"statisticParameters"in v?this._getPercentileValue(v,r):this._getStatisticValue(v,r,null,o.returnDistinctValues)}i.attributes[u]=e}let s=0;d.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++s]=a[t]),l.set(p,i)}}}else if(S){i.aggregateGeometries||={};let{aggregateGeometries:e,outStatisticFieldName:r}=await this._getAggregateGeometry(v,t);i.aggregateGeometries[r]=e}else{let e=this._getAttributeValues(o,_,t,n);i.attributes[u]=T&&"statisticParameters"in v?this._getPercentileValue(v,e):this._getStatisticValue(v,e,s,o.returnDistinctValues)}let I="min"!==f&&"max"!==f||!(0,y.yM)(this.fieldsIndex.get(_))&&!this._isAnyDateField(_)?null:this.fieldsIndex.get(_)?.type;r.push({name:u,alias:u,type:I||"esriFieldTypeDouble"})}let _=m?Array.from(l.values()):[i];return this._sortFeatures(_,h,(e,t)=>e.attributes[t]),f&&(_.length=Math.min(f,_.length)),{fields:r,features:_}}_isAnyDateField(e){let t=this.fieldsIndex.get(e);return(0,y.vE)(t)||(0,y.zD)(t)||(0,y.Ah)(t)||(0,y.OH)(t)}async _getAggregateGeometry(e,t){let{statisticType:i,outStatisticFieldName:r}=e,{featureAdapter:n,spatialReference:s,geometryType:a}=this,u=t.map(e=>(0,m.p)(a,n.getGeometry(e))),d={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:c}=await C.getImportPromise(),[h]=c(u,{merge:!0});if(h&&h.rings[0].length<=3&&(h=null),"EnvelopeAggregate"===i)d.aggregateGeometries={...h?(0,o.v)(h):N(u),spatialReference:s},d.outStatisticFieldName=r||"extent";else if("CentroidAggregate"===i){let[e,t]=h?(0,l.l8)(h):(0,l.Z4)(N(u));d.aggregateGeometries={x:e,y:t,spatialReference:s},d.outStatisticFieldName=r||"centroid"}else"ConvexHullAggregate"===i&&(d.aggregateGeometries=h&&{...h,spatialReference:s},d.outStatisticFieldName=r||"convexHull");return d}_getStatisticValue(e,t,i,r){let{onStatisticField:n,statisticType:s}=e,a=null;return a=i?.has(n)?i.get(n):(0,y.yM)(this.fieldsIndex.get(n))||this._isAnyDateField(n)?(0,g.z9)({values:t,returnDistinct:r}):(0,g.G_)({values:r?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(n,a),a["var"===s?"variance":s]}_getPercentileValue(e,t){let{onStatisticField:i,statisticParameters:r,statisticType:n}=e,{value:s,orderBy:a}=r,l={value:s,orderBy:a,fieldType:this.fieldsIndex.get(i)?.type,isDiscrete:"percentile_disc"===n};return(0,g.qg)(t,l)}_getAttributeValues(e,t,i,r){if(r.has(t))return r.get(t);let n=this.fieldsIndex.get(t),s=i.map(i=>e.getFieldValue(i,t,n));return r.set(t,s),s}_calculateUniqueValues(e,t,i){let r={},n=t.length;for(let s=0;s<n;s++){let n=t[s],a=[];for(let t of e)a.push(t[s]);let l=a.join(",");null==r[l]?r[l]={count:1,data:a,items:[n],itemPositions:[s]}:(i||r[l].count++,r[l].items.push(n),r[l].itemPositions.push(s))}return r}async _getDataValues(e,t,i=!0){let r=new v(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:l,timeZone:o}=e,u=a.A.fromJSON(this.query.outSR||this.spatialReference);return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:l,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,s.o8)(e),i)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];let r=t.intervals,n=t.min??0,s=t.max??0,a=r.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let t=0;t<e.length;t++){let l=e[t],o=i[t];if(null!=l&&l>=n&&l<=s){let e=(0,g.Ak)(r,l);e>-1&&(a[e].count++,a[e].items.push(o))}}return a}async createQueryBinsResponse(e){let t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);let{value:i,outAlias:r,valueType:n}=t,s=[],a=[{name:r??i,alias:r??i,type:n??"esriFieldTypeString"},{name:"bin",alias:"bin",type:"esriFieldTypeInteger"}],l=new v(e,this.featureAdapter,this.fieldsIndex),o=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>l.getFieldValue(e,t,i));let d=this._getAttributeValues(l,i,u,o),c=this._calculateUniqueValues([d],u,l.returnDistinctValues);for(let t in c){let{items:n}=c[t],l=await this._createBinsResponse(e,n);if(s.push(...l.features.map(e=>({...e,attributes:{...e.attributes,[r??i]:t}}))),l.fields)for(let e of l.fields)a.some(t=>t.name===e.name)||a.push(e)}return{fields:a,features:s}}async _createBinsResponse(e,t){let i=e.bin;switch(t??=this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(w.A.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(R.A.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(A.A.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(M.A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){let{field:r,normalizationField:n,numBins:s,normalizationType:a,normalizationTotal:l,start:o,end:u}=e,d=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),c=(0,g.sU)(d,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:l,numBins:s,minValue:(0,T.dO)(a?e.normalizationMinValue:o,!1),maxValue:(0,T.dO)(a?e.normalizationMaxValue:u,!1)}),h=this._calculateHistogramBins(d,c,i);return this._createFeaturesFromHistogramBins(h,t)}async _createDateBinsResponse(e,t,i){let{field:r,interval:n,start:s,end:a,snapToData:l,returnFullIntervalBin:o,offset:u,firstDayOfWeek:d}=e,c=n.unit,h=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),f=(0,y.OH)(this.fieldsIndex.get(r)),p=E.g.toJSON(c),m=h.filter(Boolean).sort((e,t)=>e-t),g=null==s?m[0]:(0,T.dO)(s,f),x=null==a?m[m.length-1]:(0,T.dO)(a,f),v=[];if(null!=g&&null!=x){let e={zone:t.outTimeReference?.ianaTimeZone??"UTC"},i={[u?.unit?E.g.toJSON(u.unit):"milliseconds"]:u?.value||0},r=b.c9.fromMillis(g,e).minus(i),s=b.c9.fromMillis(x,e).minus(i),a="number"==typeof d&&d>=1&&d<=7?d:7,c=(e,t)=>{let i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")},h=(e,t)=>c(e,t).plus({days:7});if("last"===l){let e="week"===p?h(s,a):s;for(;e>r;){let t=e.minus({[p]:n.value});if(t<r){v.unshift([o?t.plus(i).toMillis():r.plus(i).toMillis(),e.plus(i).toMillis()]);break}v.unshift([t.plus(i).toMillis(),e.plus(i).toMillis()]),e=t}}else{let e="first"===l?r:"week"===p?c(r,a):r.startOf(p);for(;e<=s;){let t=e.plus({[p]:n.value});if(t>s){v.push([e.plus(i).toMillis(),o?t.plus(i).toMillis():s.plus(i).toMillis()]);break}v.push([e.plus(i).toMillis(),t.plus(i).toMillis()]),e=t}}}let _=this._calculateHistogramBins(h,{intervals:v,min:g,max:x},i);return this._createFeaturesFromHistogramBins(_,t)}async _createFixedBoundariesBinsResponse(e,t,i){let{field:r}=e,n=await this._getDataValues({field:r||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),s=(0,y.OH)(this.fieldsIndex.get(r)),a=e.boundaries.map(e=>(0,T.dO)(e,s)).sort((e,t)=>e-t),l=[];for(let e=0;e<a.length-1;e++)l.push([a[e],a[e+1]]);let o={intervals:l,min:a.at(0),max:a.at(-1)},u=this._calculateHistogramBins(n,o,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){let{field:r,interval:n,normalizationType:s,start:a,end:l}=e,o=await this._getDataValues({field:r||e.expression,normalizationField:e.normalizationField,normalizationType:s,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=(0,y.OH)(this.fieldsIndex.get(r)),d=(0,g.sU)(o,{field:r,classificationMethod:"defined-interval",definedInterval:n,minValue:(0,T.dO)(s?e.normalizationMinValue:a,u),maxValue:(0,T.dO)(s?e.normalizationMaxValue:l,u)},!0),c=this._calculateHistogramBins(o,d,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){let{upperBoundaryAlias:i,lowerBoundaryAlias:r}=t,n=r||"lowerBoundary",s=i||"upperBoundary",a=[],l=[{name:n,alias:n,type:"esriFieldTypeDouble"},{name:s,alias:s,type:"esriFieldTypeDouble"}],o=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;o&&l.push({name:"bin",alias:"bin",type:"esriFieldTypeInteger"},{name:u??o,alias:u??o,type:"esriFieldTypeString"});let d=0,c="dateBin"===t.bin.type,h=t.outTimeReference?.ianaTimeZone;for(let i of e){let e,{minValue:r,maxValue:f,items:p}=i,m={attributes:{}};if(m.attributes[n]=c&&h&&null!=r?b.c9.fromMillis(r,{zone:h}).toISO():r,t.bin.hideUpperBound||(m.attributes[s]=c&&h&&null!=f?b.c9.fromMillis(f,{zone:h}).toISO():f),t.returnAggIds&&(m.aggregateIds=p.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),o?(e=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[o],orderByFields:[o]},p),m.attributes.bin=++d,"flat"===t.bin.jsonStyle?a.push(...e.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...m.attributes}:{...t,...m.attributes}}))):(m.stackedAttributes=e.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),a.push(m))):(t.bin?.splitBy&&(m.attributes.bin=++d),e=await this._createStatisticsQueryResponse(t,p,m),a.push(m)),e.fields)for(let t of e.fields)l.some(e=>e.name===t.name)||l.push(t)}return"desc"===t.binOrder&&a.reverse(),{fields:l,features:a}}}function N(e){let t=(0,o.HA)(e[0]);for(let i of e.slice(1))(0,o.JM)(t,(0,o.HA)(i));return t}function z(e,t,i,r){let n=r.x-i.x,s=r.y-i.y,a=t.x-i.x,l=t.y-i.y,o=n*n+s*s;if(0===o)return!1;let u=a*n+l*s,d=Math.min(1,Math.max(0,u/o));return e.x=i.x+n*d,e.y=i.y+s*d,!0}class V{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 P=[1];function G(e,t){let i=e.split(" "),r=i[0],n=t.get(r),s=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:(0,g.FM)(n?.type,s,"case-insensitive"),fieldOrExpression:r,fieldInfo:n}}},29441(e,t,i){i.d(t,{MG:()=>v,SN:()=>f,SY:()=>g,Wq:()=>y,_d:()=>S,eD:()=>p,g9:()=>x,j4:()=>m});var r=i(49186),n=i(44123),s=i(98453);const a=new n.WhereClauseCache(50,500),l="unsupported-query",o=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),d=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),c=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...d]);function h(e,t,i={}){let n=m(t,e);if(!n){let i=a.getError(t,e);throw new r.A(l,"invalid SQL expression",{expression:t,error:i})}let s=i.expressionName||"expression";if(i.validateStandardized&&!n.isStandardized)throw new r.A(l,`${s} is not standard`,{expression:t});if(i.validateAggregate&&!n.isAggregate)throw new r.A(l,`${s} does not contain a valid aggregate function`,{expression:t});return n.fieldNames}function f(e,t,i,r){if(!i)return!0;let n="where clause";return v(e,t,h(e,i,{validateStandardized:!0,expressionName:n}),{expressionName:n,query:r}),!0}function p(e,t,i,n,s){if(!i)return!0;let a="having clause";if(v(e,t,h(e,i,{validateAggregate:!0,expressionName:a}),{expressionName:a,query:s}),!m(i,e)?.getExpressions().every(t=>{let{aggregateType:i,field:r}=t,s=e.get(r)?.name;return n.some(t=>{let{onStatisticField:r,statisticType:n}=t;return e.get(r)?.name===s&&n.toLowerCase().trim()===i})}))throw new r.A(l,"expressions in having clause should also exist in outStatistics",{having:i});return!0}function m(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(o)[0]}function g(e){return e.split(o)[1]}function x(e,t,i){if(!S(t))return[];let r=new Set,n=t=>{if(t&&"*"!==t)for(let i of _(e,t))r.add(i)};for(let e of t)n(e.onStatisticField);for(let e of i??[])n(e);return Array.from(r)}function v(e,t,i,n={}){let s=new Map;if(function(e,t,i,r,n){let s=n.includes("*")?[...i,...n.filter(e=>"*"!==e)]:n;for(let n of s)if(t.get(n))T(e,t,i,r,n);else try{for(let s of _(t,n))T(e,t,i,r,s)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(s,e,t,n.allowedFieldTypes??c,i),s.size){let e=`${n.expressionName??"expression"} contains invalid or missing fields`;throw new r.A(l,e,{errors:Array.from(s.values()),query:n.query})}}function _(e,t){let i=e.get(t);return i?[i.name]:h(e,y(t),{validateStandardized:!0})}function T(e,t,i,r,n){let a=t.get(n);a?i.has(a.name)?"all"!==r&&!1===r?.has(a.type)&&e.set(n,{type:"invalid-type",fieldName:a.name,fieldType:s.m.fromJSON(a.type),allowedFieldTypes:Array.from(r,e=>s.m.fromJSON(e))}):e.set(n,{type:"missing-field",fieldName:a.name}):e.set(n,{type:"invalid-field",fieldName:n})}function S(e){return null!=e&&e.every(e=>"exceedslimit"!==e.statisticType)}i.d(t,["VW",0,d,"vl",0,u])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>n})},51441(e,t,i){i.d(t,{L:()=>n,p:()=>s});var r=i(90708);function n(e,t,i,n=e.hasZ,s=e.hasM){if(null==t)return null;let a=e.hasZ&&n,l=e.hasM&&s;if(i){let e=(0,r.Nl)(t,"esriGeometryPoint",i,n,s);return(0,r.DF)(e,a,l)}return(0,r.DF)(t,a,l)}function s(e,t,i,n,s,a){if(null==t)return null;let l="coords"in t?t:t.geometry;if(null==l)return null;let{hasZ:o,hasM:u}=l,d=o&&(s??=o),c=u&&(a??=u);if(i){let t=(0,r.kz)(l,e,i,s,a);return n&&(t=(0,r.Nl)(t,e,n)),(0,r.zv)(t,e,d,c)}if(n){let t=(0,r.Nl)(l,e,n,s,a);return(0,r.zv)(t,e,d,c)}return(0,r.zv)(l,e,d,c)}},31464(e,t,i){i.d(t,{Cv:()=>f,Nk:()=>h,lK:()=>m});var r=i(4576),n=i(99917),s=i(60408),a=i(21325),l=i(28735);const o=[0,0];function u(e,t){let i=(0,a.K8)(e)?l.je:l.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=i(t.x,t.y,o),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=i(t.xmin,t.ymin,o),[e.xmax,e.ymax]=i(t.xmax,t.ymax,o),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((0,s.Bi)(t))return{rings:d(t.rings,i),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:d(t.paths,i),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:c(t.points,i),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function d(e,t){let i=[];for(let r of e)i.push(c(r,t));return i}function c(e,t){let i=[];for(let r of e){let e=t(r[0],r[1],[0,0]);i.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return i}async function h(e,t){if(!e||!t)return;let i=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(r.Ru):[e];await(0,n.initializeProjection)(i.map(e=>({source:e,dest:t})))}function f(e,t,i,r){if(!e)return null;if(i||(i=t,t=e.spatialReference),!(0,a.fn)(t)||!(0,a.fn)(i)||(0,a.aI)(t,i))return e;if((0,l.y7)(t,i)){let t=u(i,e);return t.spatialReference=i,t}let[s]=(0,n.projectMany)([e],t,i,r);return s}const p=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,i,r){if(!e?.length||!t||!i||(0,a.aI)(t,i))return e;let n={geometries:e,inSpatialReference:t,outSpatialReference:i,options:r,resolve:Promise.withResolvers()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;let e=this._jobs.shift();if(!e)return;let t,{geometries:i,inSpatialReference:r,outSpatialReference:s,resolve:a,options:o}=e,d=i.filter(e=>null!=e);t=(0,l.y7)(r,s)&&null==o?.extendedParams?d.map(e=>u(s,e)):(0,n.projectMany)(d,r,s,o);let c=0,h=i.map(e=>null==e?null:t[c++]);a.resolve(h),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,i,r){return p.push(e,t,i,r)}},58727(e,t,i){i.d(t,{GC:()=>g,T2:()=>x,dO:()=>_,iJ:()=>y});var r=i(49186),n=i(66552),s=i(86211),a=i(39829),l=i(99917),o=i(90634),u=i(60408),d=i(65864),c=i(52039),h=i(21325),f=i(31464);const p=new n.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({});async function y(e,t,i){let r=e.bin;return r.onField&&=r.onField.trim(),r.onExpression?.value&&(r.onExpression.value=r.onExpression.value.trim()),r.splitBy&&(r.splitBy.value&&(r.splitBy.value=r.splitBy.value.trim()),r.splitBy.outAlias&&(r.splitBy.outAlias=r.splitBy.outAlias.trim())),r.stackBy&&(r.stackBy.value&&(r.stackBy.value=r.stackBy.value.trim()),r.stackBy.outAlias&&(r.stackBy.outAlias=r.stackBy.outAlias.trim())),"normalizationField"in r.parameters&&r.parameters.normalizationField&&(r.parameters.normalizationField=r.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:"frequency"}]),g(e,t,i)}async function g(e,t,i){let{outFields:r,orderByFields:n,groupByFieldsForStatistics:s,outStatistics:a}=e;if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(s)for(let e=0;e<s.length;e++)s[e]=s[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),x(e,t,i)}async function x(e,t,i){if(!e)return null;let{where:r}=e;if(e.where=r=r?.trim(),(!r||/^1 *= *1$/.test(r)||t&&t===r)&&(e.where=null),!e.geometry)return e;let n=await v(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){let{spatialReference:t}=e.geometry;n=(0,o.HA)(n),n.spatialReference=t}if(!n)return e;await(0,f.Nk)(n.spatialReference,i);let[s]=await(0,c.el)((0,d.rS)(n));if(null==s)throw m;let p=!1;((0,u.ZC)(s)||(0,u.Bi)(s)||(0,u.Rg)(s))&&(p=!(0,h.aI)(s.spatialReference,i)&&!(0,l.canProjectWithoutEngine)(s.spatialReference,i)),p&&(0,u.ZC)(s)&&(s=a.A.fromExtent(s));let y="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,g=p&&y?{extendedParams:{densificationStep:8*y}}:void 0,x=s.toJSON(),_=(0,f.Cv)(x,x.spatialReference,i,g);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}async function v(e){let{distance:t,units:n}=e,a=e.geometry;if(!t||"vertexAttributes"in a)return a;let l=a.spatialReference,o=n?p.fromJSON(n):(0,s.Ij)(l),d=l&&((0,h.EA)(l)||(0,h.K8)(l))?a:await(0,f.Nk)(l,h.KK).then(()=>(0,f.Cv)(a,h.KK)),{geodesicBufferExecute:c,geodesicBufferLoad:m}=await i.e(9159).then(()=>i(49159));await m();let y=c(d,t||1,{unit:o})??void 0;if(!y||!(0,u.Bi)(y)||0===y.rings.length)throw new r.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return y}function _(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}i.d(t,["VY",0,p,"v8",0,m])},62660(e,t,i){i.d(t,{tC:()=>_,c0:()=>v,xt:()=>x});var r=i(49186),n=i(94078),s=i(12176),a=i(60408),l=i(21325);function o(e,t,i){if(!e)return!1;let{coords:r,lengths:n,stride:s}=e,a=!1,l=0;for(let e of n)a=u(a,r,s,l,e,t,i),l+=e*s;return a}function u(e,t,i,r,n,s,a){let l=e,o=r;for(let e=r,u=r+n*i;e<u;e+=i){o=e+i,o===u&&(o=r);let n=t[e],d=t[e+1],c=t[o],h=t[o+1];(d<a&&h>=a||h<a&&d>=a)&&n+(a-d)/(h-d)*(c-n)<s&&(l=!l)}return l}var d=i(90708),c=i(51441),h=i(31464);const f="unsupported-query",p={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},m={esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},y={esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1},g={esriSpatialRelIntersects:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(6033)]).then(()=>i(55284)).then(e=>e.intersectsExecute),esriSpatialRelContains:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(2990)]).then(()=>i(51508)).then(e=>e.containsExecute),esriSpatialRelCrosses:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(919)]).then(()=>i(87778)).then(e=>e.crossesExecute),esriSpatialRelDisjoint:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(9722)]).then(()=>i(3157)).then(e=>e.disjointExecute),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(8740)]).then(()=>i(83371)).then(e=>e.overlapsExecute),esriSpatialRelTouches:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(8307)]).then(()=>i(67658)).then(e=>e.touchesExecute),esriSpatialRelWithin:()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(100)]).then(()=>i(65487)).then(e=>e.withinExecute),esriSpatialRelRelation:null};async function x(e,t,i){if((0,a.Bi)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){let e=(0,d.Ye)(t,!1,!1);return t=>function(e,t){return o(e,t.coords[0],t.coords[1])}(e,t)}if("esriGeometryMultipoint"===i){let i=(0,d.Ye)(t,!1,!1);if("esriSpatialRelContains"===e)return e=>function(e,t){let{coords:i,lengths:r,stride:n}=t;if(!r)return!1;for(let t=0,s=0;t<r.length;t++,s+=n)if(!o(e,i[s],i[s+1]))return!1;return!0}(i,e)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,n.qz)(t,(0,c.p)(i,e));if("esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return e=>(0,n.rL)(t,(0,c.p)(i,e));if("esriSpatialRelIntersects"===e){let e="mesh"===(r=i)?s.xB:(0,s.xK)(r);return r=>e(t,(0,c.p)(i,r))}}var r;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");let l=await function(e){let t=g[e];if(null==t)throw Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>l(t,(0,c.p)(i,e))}async function v(e,t,i){let{spatialRel:n,geometry:s}=e;if(s){if(null==(o=n)||!0!==p[o])throw new r.A(f,"Unsupported query spatial relationship",{query:e});if((0,l.fn)(s.spatialReference)&&(0,l.fn)(i)){if(!function(e){return null!=e&&!0===m[(0,a.$B)(e)]}(s))throw new r.A(f,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y[e]}(t))throw new r.A(f,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,h.Nk)(e.geometry?.spatialReference,e.outSR)}}var o}function _(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(let t of e.rings)if(5!==t.length||t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1;return!0}return!1}},86420(e,t,i){i.d(t,{I:()=>s,W:()=>n});var r=i(21818);async function n(e,t){if(!e)return null;let i=t.featureAdapter,{startTimeField:n,endTimeField:s}=e,a=1/0,l=-1/0;if(n&&s)await t.forEach(e=>{let t=i.getAttribute((0,r.z)(e),n),o=i.getAttribute((0,r.z)(e),s);null!=t&&!isNaN(t)&&(a=Math.min(a,t)),null!=o&&!isNaN(o)&&(l=Math.max(l,o))});else{let e=n||s;await t.forEach(t=>{let n=i.getAttribute((0,r.z)(t),e);null!=n&&!isNaN(n)&&(a=Math.min(a,n),l=Math.max(l,n))})}return{start:a,end:l}}function s(e,t,i){if(!t||!e)return null;let{startTimeField:r,endTimeField:n}=e;if(!r&&!n)return null;let{start:s,end:a}=t;if(null===s&&null===a)return null;if(void 0===s&&void 0===a)return()=>!1;let l=i.getAttributeAsTimestamp?.bind(i)??i.getAttribute.bind(i);return r&&n?function(e,t,i,r,n){return null!=r&&null!=n?s=>{let a=e(s,t),l=e(s,i);return(null==a||a<=n)&&(null==l||l>=r)}:null!=r?t=>{let n=e(t,i);return null==n||n>=r}:null!=n?i=>{let r=e(i,t);return null==r||r<=n}:void 0}(l,r,n,s,a):function(e,t,i,r){return null!=i&&null!=r&&i===r?r=>e(r,t)===i:null!=i&&null!=r?n=>{let s=e(n,t);return null!=s&&s>=i&&s<=r}:null!=i?r=>{let n=e(r,t);return null!=n&&n>=i}:null!=r?i=>{let n=e(i,t);return null!=n&&n<=r}:void 0}(l,r||n,s,a)}},90708(e,t,i){i.d(t,{Ap:()=>E,B2:()=>y,DF:()=>S,Di:()=>N,E2:()=>O,IE:()=>m,Nl:()=>q,PR:()=>w,Rk:()=>H,Ux:()=>V,Ye:()=>M,ZF:()=>D,aQ:()=>j,jH:()=>L,jQ:()=>k,kz:()=>Q,oN:()=>z,q3:()=>B,qN:()=>F,zv:()=>P});var r=i(49186),n=i(53966),s=i(97768),a=i(70328),l=i(19419),o=i(60408),u=i(43334),d=i(58512),c=i(92722),h=i(54339);const f=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),p={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function m({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function y({scale:e,translate:t},i){return Math.round((t[1]-i)/e[1])}function g({scale:e,translate:t},i){return Math.round((i-t[0])/e[0])}function x({scale:e,translate:t},i){return Math.round((i-t[1])/e[1])}function v({scale:e,translate:t},i,r){return i*e[r]+t[r]}function _(e,t,i){return t&&(e.hasZ=!0),i&&(e.hasM=!0),e}function T(e,t,i,r){if(t&&r&&e!==i)return(t,i,r,n)=>{r[n++]=t[i++],r[n++]=t[i++],e?i++:r[n++]=0,r[n++]=t[i++]??0};let n=+!!i+2+ +!!r,s=n-((!e&&i?1:0)+(!t&&r?1:0));return(e,t,i,r)=>{for(let a=0;a<n;++a)i[r++]=a<s?e[t++]??0:0}}function S(e,t,i){if(!e)return null;let{coords:r,hasZ:n,hasM:s}=e,[a,l]=r,o=n?r[2]:0,u=s?r[+!!n+2]:0;return{x:a,y:l,z:t?o:void 0,m:i?u:void 0}}function F(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{x:r,y:n,z:s,m:a}=e,l=[r,n];return t&&l.push(s??0),i&&l.push(a??0),new c.A([],l,t,i)}function I(e,t,i){if(null==e)return null;let{coords:r,stride:n,hasZ:s,hasM:a}=e,l=T(s,a,t,i),o=[];for(let e=0;e<r.length;e+=n){let t=[];l(r,e,t,0),o.push(t)}return _({points:o},t,i)}function w(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{points:r,hasZ:n,hasM:s}=e,a=new c.A([r.length],[],t,i),{coords:l,stride:u}=a,d=0,h=T(n??!1,s??!1,t,i);for(let e of r)h(e,0,l,d),d+=u;return a}function R(e,t,i){if(!e)return null;let{coords:r,lengths:n,stride:s,hasZ:a,hasM:l}=e,o=0,u=T(a,l,t,i),d=[];for(let e of n){let t=[];for(let i=0;i<e;i++){let e=[];u(r,o,e,0),o+=s,t.push(e)}d.push(t)}return _({paths:d},t,i)}function E(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{paths:r,hasZ:n,hasM:s}=e,a=T(n??!1,s??!1,t,i),l=new c.A([],[],t,i),{lengths:u,coords:d,stride:h}=l,f=0;for(let e of r){for(let t of e)a(t,0,d,f),f+=h;u.push(e.length)}return l}function A(e,t,i){if(!e)return null;let{coords:r,lengths:n,stride:s,hasZ:a,hasM:l}=e,o=0,u=T(a,l,t,i),d=[];for(let e of n){let t=[];for(let i=0;i<e;i++){let e=[];u(r,o,e,0),o+=s,t.push(e)}d.push(t)}return _({rings:d},t,i)}function M(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){let{rings:r,hasZ:n,hasM:s}=e,a=new c.A([],[],t,i),{lengths:l,coords:u,stride:d}=a,h=0,f=T(n??!1,s??!1,t,i);for(let e of r){for(let t of e)f(t,0,u,h),h+=d;l.push(e.length)}return a}const b=[],C=[];function O(e,t,i,r,n){b[0]=e;let[s]=N(C,b,t,i,r,n);return $(b),$(C),s}function N(e,t,i,n,s,a){if($(e),!i){for(let i of t){let t=(0,h.W)(i,a);e.push(new u.Om(null,i.attributes,null,t,void 0,i.distance,i.vertexCount))}return e}switch(i){case"esriGeometryPoint":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a,centroid:l}=s,d=(0,o.Pv)(t),c=(0,o.W0)(t);e.push(new u.Om(t?F(t,i&&d,r&&c):null,a,l?F(l,!1,!1):null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);case"esriGeometryMultipoint":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a}=s,l=(0,o.Pv)(t),d=(0,o.W0)(t);e.push(new u.Om(t?w(t,i&&l,r&&d):null,a,null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);case"esriGeometryPolyline":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a,centroid:l}=s,d=(0,o.Pv)(t),c=(0,o.W0)(t);e.push(new u.Om(t?E(t,i&&d,r&&c):null,a,l?F(l,!1,!1):null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,i,r,n){for(let s of t){let{geometry:t,attributes:a,centroid:l}=s,d=(0,o.Pv)(t),c=(0,o.W0)(t);e.push(new u.Om(t?M(t,i&&d,r&&c):null,a,l?F(l,!1,!1):null,(0,h.W)(s,n),s.displayId,s.distance,s.vertexCount))}return e}(e,t,n,s,a);default:f().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`)),$(e)}return e}function z(e,t,i,r){C[0]=e,G(b,C,t,i,r);let n=b[0];return $(b),$(C),n}function V(e,t=(0,o.Pv)(e),i=(0,o.W0)(e)){return null==e?null:(0,o.fT)(e)?F(e,t,i):(0,o.Bi)(e)?M(e,t,i):(0,o.Rg)(e)?E(e,t,i):(0,o.U9)(e)?w(e,t,i):void f().error("convertFromGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function P(e,t,i,n){if(null==e)return null;let s="coords"in e?e:e.geometry;if(null==s)return null;switch(t){case"esriGeometryPoint":return S(s,i,n);case"esriGeometryMultipoint":return I(s,i,n);case"esriGeometryPolyline":return R(s,i,n);case"esriGeometryPolygon":return A(s,i,n);default:return f().error("convertToGeometry:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function G(e,t,i,n,s){if($(e),null==i)return function(e,t){for(let i of t)e.push({attributes:i.attributes});return e}(e,t);switch(i){case"esriGeometryPoint":return function(e,t,i,r){for(let{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:S(n,i,r)});return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,i,r){for(let{geometry:n,attributes:s}of t)e.push({geometry:n&&I(n,i,r),attributes:s});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,i,r){for(let{geometry:n,attributes:s}of t)e.push({geometry:n&&R(n,i,r),attributes:s});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,i,r){for(let{geometry:n,attributes:s,centroid:a}of t){let t=A(n,i,r),l=S(a,!1,!1);e.push(a?{geometry:t,attributes:s,centroid:l}:{geometry:t,attributes:s})}return e}(e,t,n,s);default:f().error("convertToFeatureSet:unknown-geometry",new r.A("internal:geometry",`Unable to parse unknown geometry type '${i}'`))}return e}function D(e){let{spatialReference:t,transform:i,fields:r,hasM:n,hasZ:s,features:a,geometryType:l,exceededTransferLimit:o,queryGeometry:u,queryGeometryType:d}=e,c={features:G([],a,l,s,n),fields:r,geometryType:l,spatialReference:t,queryGeometry:P(u,d,s,n)};return i&&(c.transform=i),o&&(c.exceededTransferLimit=o),n&&(c.hasM=n),s&&(c.hasZ=s),c}function B(e,t){let i=new d.A,{hasM:r,hasZ:n,features:s,spatialReference:a,geometryType:l,exceededTransferLimit:o,transform:u,fields:c,globalIdFieldName:h}=e;return c&&(i.fields=c),i.geometryType=l??null,i.spatialReference=a??null,s&&N(i.features,s,l,n,r,t),o&&(i.exceededTransferLimit=o),r&&(i.hasM=r),n&&(i.hasZ=n),u&&(i.transform=u),h&&(i.globalIdFieldName=h),i}function L(e,t){let{geometryType:i,features:r}=t;if(!e)return t;for(let t=0;t<r.length;t++){let n=r[t],s=n.weakClone();s.geometry=q(n.geometry,i,e),s.centroid=q(n.centroid,"esriGeometryPoint",e),r[t]=s}return t.transform=e,t}function q(e,t,i,r,n,s=!1){if(null==e||!e?.coords.length)return null;let a=p[t],{coords:l,lengths:o,stride:u,hasZ:d,hasM:h}=e;r??=d,n??=h;let f=new c.A([],[],r,n),v=f.stride,_=T(d,h,r,n),S=0,F=[0,0,0,0].slice(v),I=s?g:m,w=s?x:y;function R(){_(l,S,F,0),S+=u,F[0]=I(i,F[0]),F[1]=w(i,F[1])}if(e.isPoint)return R(),f.coords.push(...F),f;let E=0;for(let e of o){if(e<a)continue;let t=1;R(),f.coords.push(...F);let[i,r]=F;for(let n=1;n<e;n++){R();let[e,n]=F;(i!==e||r!==n)&&(s||(F[0]-=i,F[1]-=r),f.coords.push(...F),i=e,r=n,t++)}t>=a?(f.lengths.push(t),E=f.coords.length):$(f.coords,E)}return $(f.coords,E),f.coords.length?f:null}function Q(e,t,i,r=e.hasZ,n=e.hasM){if(!e.coords.length)return null;let s=p[t],{coords:a,lengths:l,stride:o,hasZ:u,hasM:d}=e,h=new c.A([],[],r,n),f=h.stride,m=T(u,d,r,n);if(e.isPoint)return m(a,0,h.coords,0),h;let y=0,g=i*i;for(let e of l){if(e<s){y+=e*o;continue}let t=h.coords.length/f,i=y,r=y+(e-1)*o;m(a,i,h.coords,h.coords.length),U(h.coords,a,o,g,m,i,r),m(a,r,h.coords,h.coords.length);let n=h.coords.length/f-t;n>=s?h.lengths.push(n):$(h.coords,t*f),y+=e*o}return h.coords.length?h:null}function Z(e,t,i,r){let n=e[t],s=e[t+1],a=e[i],l=e[i+1],o=e[r],u=e[r+1],d=a,c=l,h=o-d,f=u-c;if(0!==h||0!==f){let e=((n-d)*h+(s-c)*f)/(h*h+f*f);e>1?(d=o,c=u):e>0&&(d+=h*e,c+=f*e)}return h=n-d,f=s-c,h*h+f*f}function U(e,t,i,r,n,s,a){let l,o=r,u=0;for(let e=s+i;e<a;e+=i)l=Z(t,e,s,a),l>o&&(u=e,o=l);o>r&&(u-s>i&&U(e,t,i,r,n,s,u),n(t,u,e,e.length),a-u>i&&U(e,t,i,r,n,u,a))}function k(e,t){if(!t?.coords?.length)return null;let i=1/0,r=1/0,n=-1/0,s=-1/0,{coords:o,stride:u}=t;for(let e=0;e<o.length;e+=u){let t=o[e],a=o[e+1];i=Math.min(i,t),n=Math.max(n,t),r=Math.min(r,a),s=Math.max(s,a)}return(0,a.is)(e)?(0,a.BI)(e,i,r,n,s):(0,l.fA)(i,r,n,s,e),e}function j(e,t){let{coords:i,lengths:r,stride:n,hasZ:a,hasM:l}=e;if(!i.length)return void(r.length=0);(0,s.Lw)(t);let{originPosition:o,scale:u,translate:d}=t,c=J;c.originPosition=o;let h=c.scale;h[0]=u[0]??1,h[1]=-(u[1]??1),h[2]=u[2]??1,h[3]=u[3]??1;let f=c.translate;if(f[0]=d[0]??0,f[1]=d[1]??0,f[2]=d[2]??0,f[3]=d[3]??0,l&&!a&&(h[2]=h[3],f[2]=f[3]),!r.length){for(let e=0;e<n;++e)i[e]=v(c,i[e],e);return void(r.length=0)}let p=0;for(let e=0;e<r.length;e++){let t=r[e];r[e]=t;for(let e=0;e<n;++e)i[p+e]=v(c,i[p+e],e);let s=i[p],a=i[p+1];p+=n;for(let e=1;e<t;e++,p+=n){s+=i[p]*h[0],a+=i[p+1]*h[1],i[p]=s,i[p+1]=a;for(let e=2;e<n;++e)i[p+e]=v(c,i[p+e],e)}}}function W(e,t,i,r){let n=0,s=e[r*t],a=e[r*(t+1)];for(let l=1;l<i;l++){let i=s+e[r*(t+l)],o=a+e[r*(t+l)+1],u=(i-s)*(o+a);s=i,a=o,n+=u}return.5*n}function H(e,t){let{coords:i,lengths:r}=e,n=0,s=0;for(let e=0;e<r.length;e++){let a=r[e];s+=W(i,n,a,t),n+=a}return Math.abs(s)}function $(e,t=0){e.length!==t&&(e.length=t)}const J={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},5834(e,t,i){i.d(t,{A:()=>c});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(41366),u=i(93223);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,o.K)(l.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],c.prototype,"numBins",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:d}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:d}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,s.$K)("esri.rest.support.AutoIntervalBinParameters")],c),c.from=(0,a.dp)(c)},41266(e,t,i){i.d(t,{A:()=>m});var r=i(32198),n=i(69540),s=i(66552),a=i(25482),l=i(91429),o=i(78888),u=i(93223);const d=new s.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"outAlias",write:!0}})],c.prototype,"alias",void 0),(0,r.Cg)([(0,l.MZ)({type:String})],c.prototype,"responseType",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"value",void 0),(0,r.Cg)([(0,u.e)(d)],c.prototype,"valueType",void 0),c=(0,r.Cg)([(0,l.$K)("esri.rest.support.AttributeBinsGrouping")],c);const h=c;c.from=(0,o.dp)(c);const f=new s.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),p=new s.J({naturalLog:"natural-log",squareRoot:"square-root"});let m=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],m.prototype,"expression",void 0),(0,r.Cg)([(0,u.e)(f,{name:"onExpression.valueType"})],m.prototype,"expressionValueType",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{name:"onField",write:!0}})],m.prototype,"field",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"firstDayOfWeek",void 0),(0,r.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hideUpperBound",void 0),(0,r.Cg)([(0,l.MZ)({type:h,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],m.prototype,"splitBy",void 0),(0,r.Cg)([(0,l.MZ)({type:h,json:{write:{target:{stackBy:{type:h},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>h.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],m.prototype,"stackBy",void 0),(0,r.Cg)([(0,u.e)(p)],m.prototype,"transformation",void 0),m=(0,r.Cg)([(0,l.$K)("esri.rest.support.BinParametersBase")],m)},9760(e,t,i){i.d(t,{A:()=>d});var r=i(32198),n=i(66552),s=i(25482),a=i(91429),l=i(93223);const o=new n.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new n.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let d=class extends s.o{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,r.Cg)([(0,l.e)({classBreaksDef:"class-breaks-definition"})],d.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"breakCount",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"classificationField",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{read:o.read,write:o.write}})],d.prototype,"classificationMethod",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"normalizationType",void 0),(0,r.Cg)([(0,a.MZ)({value:null,json:{write:!0}})],d.prototype,"standardDeviationInterval",null),(0,r.Cg)([(0,a.MZ)({value:null,json:{write:!0}})],d.prototype,"definedInterval",null),d=(0,r.Cg)([(0,a.$K)("esri.rest.support.ClassBreaksDefinition")],d)},59977(e,t,i){i.d(t,{A:()=>y});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(69540),u=i(25482),d=i(57231),c=i(93223);let h=class extends((0,o.OU)(u.o)){constructor(e){super(e),this.value=null,this.unit=null}};(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"number",write:!0}})],h.prototype,"value",void 0),(0,r.Cg)([(0,c.e)(d.g)],h.prototype,"unit",void 0),h=(0,r.Cg)([(0,s.$K)("esri.rest.support.DateBinTimeInterval")],h);const f=h;function p(e,t,i){(0,n.sM)(i,"string"==typeof e?e:e?.getTime(),t)}function m(e,t){let i=e.parameters[t];return i?"string"==typeof i?i:new Date(i):null}h.from=(0,a.dp)(h);let y=class extends l.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=!1,this.start=null,this.snapToData=null,this.type="date"}};(0,r.Cg)([(0,s.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.end",read:{reader:(e,t)=>m(t,"end")},write:{writer:p}}})],y.prototype,"end",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{name:"parameters",write:!0}})],y.prototype,"interval",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],y.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],y.prototype,"returnFullIntervalBin",void 0),(0,r.Cg)([(0,s.MZ)({cast:e=>null==e?null:"string"==typeof e?e:new Date(e),json:{name:"parameters.start",read:{reader:(e,t)=>m(t,"start")},write:{writer:p}}})],y.prototype,"start",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],y.prototype,"snapToData",void 0),(0,r.Cg)([(0,c.e)({dateBin:"date"},{readOnly:!0})],y.prototype,"type",void 0),y=(0,r.Cg)([(0,s.$K)("esri.rest.support.DateBinParameters")],y),y.from=(0,a.dp)(y)},57231(e,t,i){const r=(0,i(66552).O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});i.d(t,["g",0,r])},11440(e,t,i){i.d(t,{A:()=>u});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(93223);let u=class extends l.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,i){(0,n.sM)(i,e&&function(e){return e[0]instanceof Date}(e)?e.map(e=>e.getTime()):e,t)}}}})],u.prototype,"boundaries",void 0),(0,r.Cg)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,s.$K)("esri.rest.support.FixedBoundariesBinParameters")],u),u.from=(0,a.dp)(u)},60909(e,t,i){i.d(t,{A:()=>c});var r=i(32198),n=i(93637),s=i(91429),a=i(78888),l=i(41266),o=i(41366),u=i(93223);function d(e,t,i){(0,n.sM)(i,e instanceof Date?e.getTime():e,t)}let c=class extends((0,o.K)(l.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.end",write:{writer:d}}})],c.prototype,"end",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],c.prototype,"interval",void 0),(0,r.Cg)([(0,s.MZ)({json:{name:"parameters.start",write:{writer:d}}})],c.prototype,"start",void 0),(0,r.Cg)([(0,u.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,s.$K)("esri.rest.support.FixedIntervalBinParameters")],c),c.from=(0,a.dp)(c)},41366(e,t,i){var r=i(32198),n=i(66552),s=i(53966),a=i(91429),l=i(93223);const o=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",d="field";i.d(t,["K",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&d||i&&u||null,t&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===d||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,l.e)(o,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,o])},84892(e,t,i){i.d(t,{t:()=>s});var r=i(53966);function n(e,t){return Number(e.toFixed(t))}function s(e,t){let{normalizationTotal:i}=e;return{classBreaks:a(e,t),normalizationTotal:i}}function a(e,t){let i=e.definition,{classificationMethod:r,normalizationType:s,definedInterval:a}=i,u=i.breakCount??1,d=[],c=e.values;if(0===c.length)return[];c=c.sort((e,t)=>e-t);let[h,f]=t??[c.at(0),c.at(-1)];if("equal-interval"===r)if(c.length>=u){let e=(f-h)/u,t=h;for(let i=1;i<u;i++){let r=n(h+i*e,6);d.push({minValue:t,maxValue:r,label:l(t,r,s)}),t=r}d.push({minValue:t,maxValue:f,label:l(t,f,s)})}else c.forEach(e=>{d.push({minValue:e,maxValue:e,label:l(e,e,s)})});else if("natural-breaks"===r){let t=function(e){let t=[],i=[],r=Number.MIN_VALUE,n=1,s=-1;for(let a=0;a<e.length;a++){let l=e[a];l===r?(n++,i[s]=n):null!==l&&(t.push(l),r=l,n=1,i.push(n),s++)}return{uniqueValues:t,valueFrequency:i}}(c),i=e.valueFrequency||t.valueFrequency,r=o(t.uniqueValues,i,u),a=h;for(let e=1;e<u;e++)if(t.uniqueValues.length>e){let i=n(t.uniqueValues[r[e]],6);d.push({minValue:a,maxValue:i,label:l(a,i,s)}),a=i}d.push({minValue:a,maxValue:f,label:l(a,f,s)})}else if("quantile"===r)if(c.length>=u&&h!==f){let e=h,t=Math.ceil(c.length/u),i=0;for(let r=1;r<u;r++){let n=t+i-1;n>c.length&&(n=c.length-1),n<0&&(n=0),d.push({minValue:e,maxValue:c[n],label:l(e,c[n],s)}),e=c[n],i+=t,t=Math.ceil((c.length-i)/(u-r))}d.push({minValue:e,maxValue:f,label:l(e,f,s)})}else{let e=-1;for(let t=0;t<c.length;t++){let i=c[t];i!==e&&(e=i,d.push({minValue:e,maxValue:i,label:l(e,i,s)}),e=i)}}else if("standard-deviation"===r){let e=function(e){let t=0;for(let i=0;i<e.length;i++)t+=e[i];return t/=e.length,t}(c),t=function(e,t){let i=0;for(let r=0;r<e.length;r++){let n=e[r];i+=(n-t)*(n-t)}return i/=e.length,Math.sqrt(i)}(c,e);if(0===t)d.push({minValue:c[0],maxValue:c[0],label:l(c[0],c[0],s)});else{let i=function(e,t,i,r,n){let s=Math.max(r-e,t-r)/n/i;return s=s>=1?1:s>=.5?.5:.25,s}(h,f,u,e,t)*t,r=0,a=h;for(let t=u;t>=1;t--){let o=n(e-(t-.5)*i,6);d.push({minValue:a,maxValue:o,label:l(a,o,s)}),a=o,r++}let o=n(e+.5*i,6);d.push({minValue:a,maxValue:o,label:l(a,o,s)}),a=o,r++;for(let t=1;t<=u;t++)o=r===2*u?f:n(e+(t+.5)*i,6),d.push({minValue:a,maxValue:o,label:l(a,o,s)}),a=o,r++}}else if("defined-interval"===r){if(!a)return d;let[e,i]=t??[c.at(0),c.at(-1)],r=Math.ceil((i-e)/a),o=e;for(let t=1;t<r;t++){let i=n(e+t*a,6);d.push({minValue:o,maxValue:i,label:l(o,i,s)}),o=i}d.push({minValue:o,maxValue:i,label:l(o,i,s)})}return d}function l(e,t,i){let r=null;return r=e===t?i&&"percent-of-total"===i?e+"%":e.toString():i&&"percent-of-total"===i?e+"% - "+t+"%":e+" - "+t,r}function o(e,t,i){let r=e.length,n=[];i>r&&(i=r);for(let e=0;e<i;e++)n.push(Math.round(e*r/i-1));n.push(r-1);let s=u(n,e,t,i);return function(e,t,i,r,n,s){let a=0,l=0,o=0,u=0,c=!0;for(let h=0;h<2&&c;h++){0===h&&(c=!1);for(let h=0;h<s-1;h++)for(;i[h+1]+1!==i[h+2];){i[h+1]=i[h+1]+1;let s=d(h,i,r,n);o=s.sbMean,a=s.sbSdcm;let f=d(h+1,i,r,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[h]+t[h+1])){i[h+1]=i[h+1]-1;break}t[h]=a,t[h+1]=l,e[h]=o,e[h+1]=u,c=!0}for(let h=s-1;h>0;h--)for(;i[h]!==i[h-1]+1;){i[h]=i[h]-1;let s=d(h-1,i,r,n);o=s.sbMean,a=s.sbSdcm;let f=d(h,i,r,n);if(u=f.sbMean,l=f.sbSdcm,!(a+l<t[h-1]+t[h])){i[h]=i[h]+1;break}t[h-1]=a,t[h]=l,e[h-1]=o,e[h]=u,c=!0}}return c}(s.mean,s.sdcm,n,e,t,i)&&(s=u(n,e,t,i)),n}function u(e,t,i,r){let n=[],s=[],a=[],l=0,o=[],u=[];for(let n=0;n<r;n++){let r=d(n,e,t,i);o.push(r.sbMean),u.push(r.sbSdcm),l+=u[n]}let c,h=l,f=!0;for(;f||l<h;){f=!1,n=[];for(let t=0;t<r;t++)n.push(e[t]);for(let i=0;i<r;i++)for(let n=e[i]+1;n<=e[i+1];n++)if(c=t[n],i>0&&n!==e[i+1]&&Math.abs(c-o[i])>Math.abs(c-o[i-1]))e[i]=n;else if(i<r-1&&e[i]!==n-1&&Math.abs(c-o[i])>Math.abs(c-o[i+1])){e[i+1]=n-1;break}h=l,l=0,s=[],a=[];for(let n=0;n<r;n++){s.push(o[n]),a.push(u[n]);let r=d(n,e,t,i);o[n]=r.sbMean,u[n]=r.sbSdcm,l+=u[n]}}if(l>h){for(let t=0;t<r;t++)e[t]=n[t],o[t]=s[t],u[t]=a[t];l=h}return{mean:o,sdcm:u}}function d(e,t,i,n){let s=0,a=0;for(let r=t[e]+1;r<=t[e+1];r++){let e=n[r];s+=i[r]*e,a+=e}a<=0&&r.A.getLogger("esri.rest.support.generateRendererUtils").warn("Exception in Natural Breaks calculation");let l=s/a,o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=n[r]*(i[r]-l)**2;return{sbMean:l,sbSdcm:o}}},1873(e,t,i){i.d(t,{$y:()=>z,Ak:()=>P,FM:()=>p,G_:()=>h,Rw:()=>O,Vb:()=>d,b3:()=>A,gJ:()=>u,jM:()=>N,lv:()=>b,oZ:()=>E,qg:()=>f,sU:()=>V,z9:()=>c,zS:()=>C});var r=i(9760),n=i(84892);const s=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,a=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),l=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),o=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function d(e){let t=null!=e.normalizationField||null!=e.normalizationType,i=null!=e.minValue||null!=e.maxValue,r=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!i&&!r}function c(e){let{outStatisticTypes:t}=e,i=e.returnDistinct?[...new Set(e.values)]:e.values,r=i.filter(e=>null!=e).sort(),n=r.length,s={count:n,min:r[0],max:r[n-1]};return e.supportsNullCount&&(s.nullcount=i.length-n),e.percentileParams&&(!t?.include?.length||t.include.includes("median"))&&(!t?.exclude?.length||!t.exclude.includes("median"))&&(s.median=f(i,e.percentileParams)),s}function h(e){let{values:t,useSampleStdDev:i,supportsNullCount:r,outStatisticTypes:n}=e,s=1/0,a=-1/0,l=null,o=null,u=null,d=null,c=0,h=null==e.minValue?-1/0:e.minValue,p=null==e.maxValue?1/0:e.maxValue;for(let e of t)Number.isFinite(e)?e>=h&&e<=p&&(l=null===l?e:l+e,s=Math.min(s,e),a=Math.max(a,e),c++):"string"==typeof e&&c++;if(c&&null!=l){o=l/c;let e=0;for(let i of t)Number.isFinite(i)&&i>=h&&i<=p&&(e+=(i-o)**2);d=i?c>1?e/(c-1):0:c>0?e/c:0,u=Math.sqrt(d)}else s=null,a=null;let m={avg:o,count:c,max:a,min:s,stddev:u,sum:l,variance:d};return r&&(m.nullcount=t.length-c),e.percentileParams&&(!n?.include?.length||n.include.includes("median"))&&(!n?.exclude?.length||!n.exclude.includes("median"))&&(m.median=f(t,e.percentileParams)),m}function f(e,t){let{fieldType:i,value:r,orderBy:n,isDiscrete:s}=t,a=p(i,"desc"===n,"case-insensitive");if(e=[...e].filter(e=>null!=e).sort((e,t)=>a(e,t)),0===e.length)return null;if(r<=0)return e[0];if(r>=1)return e[e.length-1];let l=(e.length-1)*r,o=Math.floor(l),u=o+1,d=l%1,c=e[o],h=e[u];return u>=e.length||s||"string"==typeof c||"string"==typeof h?c:c*(1-d)+h*d}function p(e,t,i="case-sensitive"){if(e){if(a.has(e))return w(t);if(l.has(e))return S(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?v:x}(t);let r=S(t,"case-sensitive"===i);if("esriFieldTypeString"===e)return r;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>r(R(e),R(t))}let r=t?1:-1,n=w(t),s=S(t,"case-sensitive"===i),o=g(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?n(e,t):"string"==typeof e&&"string"==typeof t?s(e,t):o(e,t)??r}const m=(e,t)=>null==e?null==t?0:1:null==t?-1:null,y=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function g(e){return e?m:y}const x=(e,t)=>y(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),v=(e,t)=>m(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),_=(e,t)=>y(e,t)??(e===t?0:e<t?-1:1),T=(e,t)=>m(e,t)??(e===t?0:e<t?1:-1);function S(e,t){if(t)return e?T:_;let i=g(e);return e?(e,t)=>i(e,t)??((e=e.toUpperCase())>(t=t.toUpperCase())?-1:+(e<t)):(e,t)=>i(e,t)??((e=e.toUpperCase())<(t=t.toUpperCase())?-1:+(e>t))}const F=(e,t)=>m(e,t)??t-e,I=(e,t)=>y(e,t)??e-t;function w(e){return e?F:I}function R(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function E(e,t,i){let r;for(r in e)t?.include?.length&&!t.include.includes(r)||t?.exclude?.length&&t.exclude.includes(r)?delete e[r]:o.includes(r)&&(Number.isFinite(e[r])||(e[r]=null));return i&&["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e}function A(e){let t={};for(let i of e)(null==i||"string"==typeof i&&""===i.trim())&&(i=null),null==t[i]?t[i]={count:1,data:i}:t[i].count++;return{count:t}}function M(e){return"coded-value"===e?.type?e.codedValues.map(e=>e.code):[]}function b(e,t,i,r){let n=e.count,s=[];if(i&&t){let e=[],i=M(t[0]);for(let n of i)if(t[1]){let i=M(t[1]);for(let s of i)if(t[2]){let i=M(t[2]);for(let t of i)e.push(`${u(n)}${r}${u(s)}${r}${u(t)}`)}else e.push(`${u(n)}${r}${u(s)}`)}else e.push(n);for(let t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(let e in n){let t=n[e];s.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:s}}function C(e,t,i,r){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(r)&&0!==r&&(n=e/r*100);break;case"field":Number.isFinite(i)&&0!==i&&(n=e/i);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function O(e,t,i){let s=function(e){let{breakCount:t,field:i,normalizationField:n,normalizationType:s}=e,a=e.classificationMethod||"equal-interval",l="standard-deviation"===a?e.standardDeviationInterval||1:void 0,o="defined-interval"===a?e.definedInterval:void 0;return new r.A({breakCount:t,classificationField:i,classificationMethod:a,normalizationField:"field"===s?n:void 0,normalizationType:s,standardDeviationInterval:l,definedInterval:o})}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||5});return e=function(e,t,i){let r=t??-1/0,n=i??1/0;return e.filter(e=>Number.isFinite(e)&&e>=r&&e<=n)}(e,t.minValue,t.maxValue),(0,n.t)({definition:s,values:e,normalizationTotal:t.normalizationTotal},i)}function N(e,t){let i=e.classBreaks,r=i.length,n=i[0]?.minValue,a=i[r-1]?.maxValue,l="standard-deviation"===t,o=s;return i=i.map(e=>{let t=e.label,i={minValue:e.minValue,maxValue:e.maxValue,label:t};if(l&&t){let e=t.match(o)?.map(e=>+e.trim())??[];2===e.length?(i.minStdDev=e[0],i.maxStdDev=e[1],e[0]<0&&e[1]>0&&(i.hasAvg=!0)):1===e.length&&(t.includes("<")?(i.minStdDev=null,i.maxStdDev=e[0]):t.includes(">")&&(i.minStdDev=e[0],i.maxStdDev=null))}return i}),{minValue:n,maxValue:a,classBreakInfos:i,normalizationTotal:e.normalizationTotal}}function z(e,t){let i=V(e,t);if(null==i.min&&null==i.max)return{bins:[],minValue:i.min,maxValue:i.max,normalizationTotal:t.normalizationTotal};let r=i.intervals,n=i.min??0,s=i.max??0,a=r.map((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0}));for(let t of e)if(null!=t&&t>=n&&t<=s){let e=P(r,t);e>-1&&a[e].count++}return{bins:a,minValue:n,maxValue:s,normalizationTotal:t.normalizationTotal}}function V(e,t,i=!1){let{field:r,classificationMethod:n,standardDeviationInterval:s,definedInterval:a,normalizationType:l,normalizationField:o,normalizationTotal:u,minValue:c,maxValue:f}=t,p=t.numBins||10,m=null,y=null,g=null;if(n&&"equal-interval"!==n||l){let{classBreaks:t}=O(e,{field:r,normalizationType:l,normalizationField:o,normalizationTotal:u,classificationMethod:n,standardDeviationInterval:s,definedInterval:a,minValue:c,maxValue:f,numClasses:p},null!=c&&null!=f?[c,f]:void 0);m=t[0]?.minValue,y=t[t.length-1]?.maxValue,g=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=c&&null!=f)m=c,y=f;else{let t=h({values:e,minValue:c,maxValue:f,useSampleStdDev:!l,supportsNullCount:d({normalizationType:l,normalizationField:o,minValue:c,maxValue:f})});m=t.min??null,y=t.max??null}g=function(e,t,i){let r,n=(t-e)/i,s=[],a=e;for(let e=1;e<=i;e++)r=a+n,r=Number(r.toFixed(16)),s.push([a,e===i?t:r]),a=r;return s}(m??0,y??0,p)}if(i&&g.length){let e=g.at(-1)[1];g.push([e,e])}return{min:m,max:y,intervals:g}}function P(e,t){let i=-1;for(let r=e.length-1;r>=0;r--)if(t>=e[r][0]){i=r;break}return i}},92359(e,t,i){i.d(t,{nu:()=>h,W6:()=>u}),i(4576),i(71511),i(44208),i(53966);var r=i(17676),n=(i(36708),i(44794),i(78659)),s=i(32198),a=i(69622),l=i(91429);let o=class extends a.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,s.Cg)([(0,l.MZ)()],o.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,s.Cg)([(0,l.MZ)()],o.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),o=(0,s.Cg)([(0,l.$K)("esri.views.support.debugFlags")],o),new o,i(49186),Symbol("Yield");const u={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",SCREEN_POLYGON_INTERSECTION:"screen polygon intersection",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1};new Map([[u.RESOURCE_CONTROLLER_IMMEDIATE,0],[u.RESOURCE_CONTROLLER,4],[u.SLIDE,0],[u.STREAM_DATA_LOADER,0],[u.ELEVATION_QUERY,0],[u.TERRAIN_SURFACE,1],[u.SURFACE_GEOMETRY_UPDATES,1],[u.LOD_RENDERER,2],[u.GRAPHICS_CORE,2],[u.I3S,2],[u.LYR3D,2],[u.TILES3D,3],[u.POINT_CLOUD_LAYER,2],[u.FEATURE_TILE_FETCHER,2],[u.STREAM_CONTROLLER,2],[u.SCREEN_POLYGON_INTERSECTION,0],[u.CLOUDS_GENERATOR,2],[u.OCCLUSION_QUERY,2],[u.OVERLAY,4],[u.OVERLAY_RENDERER,4],[u.STAGE,4],[u.GRAPHICS_DECONFLICTOR,4],[u.FILTER_VISIBILITY,4],[u.SCALE_VISIBILITY,4],[u.FRUSTUM_VISIBILITY,4],[u.POINT_OF_INTEREST_FREQUENT,6],[u.POINT_OF_INTEREST_INFREQUENT,30],[u.LABELER,8],[u.FEATURE_QUERY_ENGINE,8],[u.FEATURE_TILE_TREE,16],[u.FEATURE_TILE_TREE_ACTIVE,0],[u.ELEVATION_ALIGNMENT,12],[u.ELEVATION_ALIGNMENT_SCENE,14],[u.TEXT_TEXTURE_ATLAS,12],[u.TEXTURE_UNLOAD,12],[u.LINE_OF_SIGHT_TOOL,16],[u.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[u.VOLUME_MEASUREMENT,4],[u.SNAPPING,0],[u.SHADOW_ACCUMULATOR,30],[u.FLOW_GENERATOR,12],[u.GAUSSIAN_SPLAT_SORTING,2],[u.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[u.MAPVIEW_FETCH_QUEUE,0],[u.MAPVIEW_LAYERVIEW_UPDATE,2],[u.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]),(0,n.l5)(6.5),(0,n.l5)(1),(0,n.l5)(30),(0,n.l5)(1e3/30),(0,n.l5)(100),Symbol.dispose;const d=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};d.enabled=!1;class c{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,i){try{if((0,r.G4)(t)){let e=(0,r.NK)();return i?Promise.resolve(i(e)):Promise.reject(e)}return(0,r.z7)(e(d))}catch(e){return Promise.reject(e)}}reschedule(e,t,i){return this.schedule(e,t,i)}async scheduleGenerator(e,t,i){if((0,r.G4)(t)){let e=(0,r.NK)();if(i)return i(e);throw e}let n=e(d);for(;;){let e=n.next(d),s=(0,r.$X)(e)?await e:e;if((0,r.G4)(t)){let e=(0,r.NK)();if(i){let t=i(e),s=n.return(null);return(0,r.$X)(s)&&await(0,r.QZ)(s),t}let t=n.throw(e);throw(0,r.$X)(t)&&await(0,r.QZ)(t),e}if(s.done)return s.value}}}const h=new c}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4708],{69052(e,t,r){r.d(t,{hr:()=>i});var n=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,n.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+o(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,n=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(n)?r:n}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function s(e,t,r,n,i=0,s=!1){return(n-=i)<t?n+=o(e,t-n):n>r&&(n-=o(e,n-r)),s&&n===r&&(n=t),n+i}function o(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new i(0,2*Math.PI),l=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,l,"uC",0,a])},18370(e,t,r){r.d(t,{z:()=>i});class n{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new n(e)}},52039(e,t,r){r.d(t,{O7:()=>f,el:()=>c});var n=r(69052),i=(r(49186),r(18370)),s=r(17676),o=(r(5443),r(39829)),a=(r(82799),r(16930)),l=(r(80754),r(21325));async function c(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let n=null;for(let t of e)n??=t?.spatialReference;if(!n)return e;let i=(0,l.Vp)(n);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new o.A(t)]}let[a,c]=i.valid,f=!1;for(let t of e){if(!t)continue;if("point"===t.type){f||=t.x>=c,f||=t.x<=a;continue}let{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=c,f||=e.xmin<=a,f||=e.xmax>=c,f||=e.xmax<=a}if(!f)return e;let[{foldInto360Range:d},g]=await(0,s.qr)(Promise.all([u.getImportPromise(),h.getImportPromise()]),r),m=g.fromSpatialReference(n);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=g.fromGeometry(e),r=g.toGeometry(d(t,m),n);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const u=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),h=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function f(e,t,r){let n=(0,l.Vp)(r);if(null==n)return e;let[i,s]=n.valid,o=2*s,a=0,c=0;t>s?a=Math.ceil(Math.abs(t-s)/o):t<i&&(a=-Math.ceil(Math.abs(t-i)/o)),e>s?c=Math.ceil(Math.abs(e-s)/o):e<i&&(c=-Math.ceil(Math.abs(e-i)/o));let u=e+(a-c)*o,h=u-t;return h>s?u-=o:h<i&&(u+=o),u}function d(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new n.hr(r,i)}const g=d(a.A.WGS84);d(a.A.WebMercator),r.d(t,["Y_",0,g])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var n=r(82799),i=r(16930),s=r(60408),o=r(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,o.Ed)(e))for(let r of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,o.aO)(e)){let[r,n]=e.c;r[0]+=t,n[0]+=t}else if((0,o.FG)(e)){let[r,n]=e.a;r[0]+=t,n[0]+=t}else if((0,o.n1)(e)){let[r,n,i]=e.b;r[0]+=t,n[0]+=t,i[0]+=t}else e[0]+=t;for(let r of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,a])},31464(e,t,r){r.d(t,{Cv:()=>d,Nk:()=>f,lK:()=>m});var n=r(4576),i=r(99917),s=r(60408),o=r(21325),a=r(28735);const l=[0,0];function c(e,t){let r=(0,o.K8)(e)?a.je:a.tD;if((0,s.fT)(t)){let e={x:0,y:0};return[e.x,e.y]=r(t.x,t.y,l),null!=t.z&&(e.z=t.z),null!=t.m&&(e.m=t.m),e}if((0,s.ZC)(t)){let e={xmin:0,ymin:0,xmax:0,ymax:0};return[e.xmin,e.ymin]=r(t.xmin,t.ymin,l),[e.xmax,e.ymax]=r(t.xmax,t.ymax,l),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((0,s.Bi)(t))return{rings:u(t.rings,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.Rg)(t))return{paths:u(t.paths,r),hasM:t.hasM,hasZ:t.hasZ};if((0,s.U9)(t))return{points:h(t.points,r),hasM:t.hasM,hasZ:t.hasZ};throw Error()}function u(e,t){let r=[];for(let n of e)r.push(h(n,t));return r}function h(e,t){let r=[];for(let n of e){let e=t(n[0],n[1],[0,0]);r.push(e),n.length>2&&e.push(n[2]),n.length>3&&e.push(n[3])}return r}async function f(e,t){if(!e||!t)return;let r=Array.isArray(e)?e.map(e=>null==e.geometry?null:e.geometry.spatialReference).filter(n.Ru):[e];await(0,i.initializeProjection)(r.map(e=>({source:e,dest:t})))}function d(e,t,r,n){if(!e)return null;if(r||(r=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(r)||(0,o.aI)(t,r))return e;if((0,a.y7)(t,r)){let t=c(r,e);return t.spatialReference=r,t}let[s]=(0,i.projectMany)([e],t,r,n);return s}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,r,n){if(!e?.length||!t||!r||(0,o.aI)(t,r))return e;let i={geometries:e,inSpatialReference:t,outSpatialReference:r,options:n,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 t,{geometries:r,inSpatialReference:n,outSpatialReference:s,resolve:o,options:l}=e,u=r.filter(e=>null!=e);t=(0,a.y7)(n,s)&&null==l?.extendedParams?u.map(e=>c(s,e)):(0,i.projectMany)(u,n,s,l);let h=0,f=r.map(e=>null==e?null:t[h++]);o.resolve(f),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function m(e,t,r,n){return g.push(e,t,r,n)}},60986(e,t,r){r.r(t),r.d(t,{createConnection:()=>C});var n=r(56507),i=r(49186),s=r(31464),o=r(9916),a=r(32198),l=r(65529),c=r(91429);let u=class extends l.nJ{destroy(){this.emit("destroy")}get connectionError(){return this.errorString?new i.A("stream-connection",this.errorString):null}onFeature(e){this.emit("data-received",e)}onMessage(e){this.emit("message-received",e)}};(0,a.Cg)([(0,c.MZ)({readOnly:!0})],u.prototype,"connectionError",null),u=(0,a.Cg)([(0,c.$K)("esri.layers.support.StreamConnection")],u);class h extends u{constructor(e,t){super(),this._config=e,this._outSpatialReference=t,this.connectionStatus="connected",this.errorString=null,this._isPolling=!1,this._lastIngestedAt=null,this._pollTimer=null,this._pollRecentData=async()=>{if(!this.destroyed&&!this._isPolling){this._isPolling=!0;try{let e=await this._queryChanges(this._lastIngestedAt);if(this.destroyed)return;this._handleResult(e)}catch(e){this.errorString=e instanceof Error?e.message:"Failed to fetch"}finally{this._isPolling=!1}}},this._initialize()}destroy(){super.destroy(),this._pollTimer&&=(clearInterval(this._pollTimer),null)}sendMessageToSocket(e){throw new i.A("kusto:unsupported","sendMessageToSocket not supported for Kusto connections")}sendMessageToClient(e){throw new i.A("kusto:unsupported","sendMessageToClient not supported for Kusto connections")}updateCustomParameters(e){throw new i.A("kusto:unsupported","updateCustomParameters not supported for Kusto connections")}async _initialize(){await(0,s.Nk)(this._config.sourceSpatialReference,this._outSpatialReference);try{let e=await this._queryInitial();this._handleResult(e),this._pollTimer=setInterval(this._pollRecentData,6e4*this._config.refreshInterval)}catch{throw new i.A("kusto:connection","Failed to query KQL database")}}async _queryInitial(){let{trackIdField:e}=this._config,t=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | summarize arg_max(IngestedAt, *) by ${(0,o.xw)(e)}`));if(!t)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(t),table:t}}async _queryChanges(e=null){let t=e??"1970-01-01T00:00:00Z",r=f(await this._executeQuery(`${(0,o.xw)(this._config.table)} | extend IngestedAt = ingestion_time() | where IngestedAt > todatetime('${(0,o.iD)(t)}') | order by IngestedAt asc`));if(!r)throw new i.A("kusto:connection","Unable to find primaryTable");return{ingestedAt:d(r),table:r}}async _executeQuery(e){let t=this._config.database,r=t.properties.queryServiceUri,{data:i}=await(0,n.A)(`${r}/v2/rest/query`,{responseType:"json",method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({db:t.displayName,csl:e})});return i}_handleResult(e){this._lastIngestedAt=e.ingestedAt;let t=this._createFeatures(e.table);if(null!=t){this.onMessage(t);for(let e of t)this.onFeature(e)}}_createFeatures(e){if(null==e||0===e.Rows.length)return null;let{xField:t,yField:r}=this._config.geometryEncoding,n=e.Columns.findIndex(e=>e.ColumnName===t),i=e.Columns.findIndex(e=>e.ColumnName===r);return e.Rows.map(t=>this._createFeature(e.Columns,n,i,t))}_createFeature(e,t,r,n){let{xField:i,yField:o}=this._config.geometryEncoding,a={};for(let t=0;t<e.length;t++){let r=e[t],s=n[t]??null;r.ColumnName!==o&&r.ColumnName!==i&&(a[r.ColumnName]=s)}let l=null,c=n[t],u=n[r];return null!=u&&null!=c&&(l=(0,s.Cv)({x:c,y:u},this._config.sourceSpatialReference,this._outSpatialReference)),{attributes:a,geometry:l}}}function f(e){return e.find(e=>"DataTable"===e.FrameType&&"PrimaryResult"===e.TableKind)??null}function d(e){let t=e.Columns.findIndex(e=>"IngestedAt"===e.ColumnName);if(t<0)return null;let r=null;for(let n of e.Rows){let e=n[t];"string"==typeof e&&(null==r||e>r)&&(r=e)}return r}var g=r(53966),m=r(84952),p=r(16930),y=r(65864),_=r(17676),w=r(62815);function b(e,t){if(null==e&&null==t)return null;let r={};return null!=t&&(r.geometry=t),null!=e&&(r.where=e),r}let S=class extends u{constructor(e,t){super({}),this._outSpatialReference=t,this._outstandingMessages=[],this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._config=e,this._featureZScaler=(0,w.N)(r,n,this._outSpatialReference),this._open()}normalizeCtorArgs(){return{}}async _open(){await this._tryCreateWebSocket(),this.destroyed||await this._handshake()}destroy(){super.destroy(),null!=this._websocket&&(this._websocket.onopen=null,this._websocket.onclose=null,this._websocket.onerror=null,this._websocket.onmessage=null,this._websocket.close()),this._websocket=null}get connectionStatus(){if(null==this._websocket)return"disconnected";switch(this._websocket.readyState){case 0:case 1:return"connected";case 2:case 3:return"disconnected"}}sendMessageToSocket(e){null==this._websocket?this._outstandingMessages.push(e):this._websocket.send(JSON.stringify(e))}sendMessageToClient(e){this._onMessage(e)}updateCustomParameters(e){this._config.customParameters=e,null!=this._websocket&&this._websocket.close()}async _tryCreateWebSocket(e=this._config.url.path,t=1e3,r=0){try{if(this.destroyed)return;let t=(0,m.a6)(e,this._config.customParameters??{});this._websocket=await this._createWebSocket(t),this.notifyChange("connectionStatus")}catch(n){let s=t/1e3;return this._config.maxReconnectionAttempts&&r>=this._config.maxReconnectionAttempts?(g.A.getLogger(this).error(new i.A("websocket-connection","Exceeded maxReconnectionAttempts attempts. No further attempts will be made")),void this.destroy()):(g.A.getLogger(this).error(new i.A("websocket-connection",`Failed to connect. Attempting to reconnect in ${s}s`,n)),await(0,_.Pl)(t),this._tryCreateWebSocket(e,Math.min(1.5*t,1e3*this._config.maxReconnectionInterval),r+1))}}_setWebSocketJSONParseHandler(e){e.onmessage=e=>{try{let t=JSON.parse(e.data);this._onMessage(t)}catch(e){return void g.A.getLogger(this).error(new i.A("websocket-connection","Failed to parse message, invalid JSON",{error:e}))}}}_createWebSocket(e){return new Promise((t,r)=>{let n=new WebSocket(e);n.onopen=()=>{n.onopen=null,this.destroyed?(n.onclose=null,n.close()):(n.onclose=e=>this._onClose(e),n.onerror=e=>this._onError(e),this._setWebSocketJSONParseHandler(n),t(n))},n.onclose=e=>{n.onopen=n.onclose=null,r(e)}})}async _handshake(e=1e4){let t=this._websocket;if(null==t)return;let r=Promise.withResolvers(),n=t.onmessage,s=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:o}=this._config,a=setTimeout(()=>r.reject(),e),l=()=>{clearTimeout(a),r.reject()};return t.onmessage=e=>{let c=null;try{c=JSON.parse(e.data)}catch{}(!c||"object"!=typeof c)&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - malformed message",e.data)),l(),this.destroy()),c.spatialReference?.wkid!==this._outSpatialReference?.wkid&&(g.A.getLogger(this).error(new i.A("websocket-connection",`Protocol violation. Handshake failed - expected wkid of ${this._outSpatialReference.wkid}`,e.data)),l(),this.destroy()),"json"!==c.format&&(g.A.getLogger(this).error(new i.A("websocket-connection","Protocol violation. Handshake failed - format is not set",e.data)),l(),this.destroy()),s&&c.filter!==s&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set filter, but server doesn't support it")),o&&c.outFields!==o&&g.A.getLogger(this).error(new i.A("websocket-connection","Tried to set outFields, but server doesn't support it")),t.onmessage=n;for(let e of this._outstandingMessages)t.send(JSON.stringify(e));this._outstandingMessages=[],clearTimeout(a),r.resolve()},t.send(JSON.stringify({filter:s,outFields:o,format:"json",spatialReference:{wkid:this._outSpatialReference.wkid}})),r.promise}_onMessage(e){if(this.onMessage(e),"type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}}_onError(e){let t="Encountered an error over WebSocket connection";this._set("errorString",t),g.A.getLogger(this).error("websocket-connection",t)}_onClose(e){this._websocket=null,this.notifyChange("connectionStatus"),1e3!==e.code&&g.A.getLogger(this).error("websocket-connection",`WebSocket closed unexpectedly with error code ${e.code}`),this.destroyed||this._open()}};(0,a.Cg)([(0,c.MZ)()],S.prototype,"connectionStatus",null),(0,a.Cg)([(0,c.MZ)()],S.prototype,"errorString",void 0),S=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.WebSocketConnection")],S);var k=r(80893),A=r(97552);const x={maxQueryDepth:5,maxRecordCountFactor:3};let v=class extends S{constructor(e,t){super({...x,...e},t),this._buddyServicesQuery=null,this._relatedFeatures=null}async _open(){let e=await this._fetchServiceDefinition(this._config.url);e.timeInfo.trackIdField||g.A.getLogger(this).warn("GeoEvent service was configured without a TrackIdField. This may result in certain functionality being disabled. The purgeOptions.maxObservations property will have no effect.");let t=this._fetchWebSocketUrl(e.streamUrls,this._outSpatialReference);this._buddyServicesQuery||=this._queryBuddyServices(),await this._buddyServicesQuery,await this._tryCreateWebSocket(t);let r=b(this._config.definitionExpression,this._config.geometryDefinition),{outFields:n}=this._config;this.destroyed||this._setFilter(r,n)}_onMessage(e){if("attributes"in e){let t;try{t=this._enrich(e),null!=this._featureZScaler&&this._featureZScaler(t.geometry)}catch(e){return void g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to parse message",e))}this.onFeature(t)}else this.onMessage(e)}async _fetchServiceDefinition(e){let t={f:"json",...this._config.customParameters},r=(await(0,n.A)(e.path,{query:t,responseType:"json"})).data;return this._serviceDefinition=r,r}_fetchWebSocketUrl(e,t){let{urls:r,token:n}=e[0],i=this._inferWebSocketBaseUrl(r);return(0,m.a6)(`${i}/subscribe`,{outSR:""+t.wkid,token:n})}_inferWebSocketBaseUrl(e){if(1===e.length)return e[0];for(let t of e)if(t.includes("wss"))return t;return g.A.getLogger(this).error(new i.A("geoevent-connection","Unable to infer WebSocket url",e)),null}async _setFilter(e,t){let r=this._websocket;if(null==r||null==e&&null==t)return;let n=JSON.stringify({filter:this._serializeFilter(e,t)}),s=!1,o=Promise.withResolvers();return r.onmessage=e=>{let t=JSON.parse(e.data);t.filter&&(t.error&&(g.A.getLogger(this).error(new i.A("geoevent-connection","Failed to set service filter",t.error)),this._set("errorString",`Could not set service filter - ${t.error}`),o.reject(t.error)),this._setWebSocketJSONParseHandler(r),s=!0,o.resolve())},r.send(n),setTimeout(()=>{s||(!this.destroyed&&this._websocket===r&&g.A.getLogger(this).error(new i.A("geoevent-connection","Server timed out when setting filter")),o.reject())},1e4),o.promise}_serializeFilter(e,t){let r={};if(null==e&&null==t)return r;if(e?.geometry)try{let t=(0,y.rS)(e.geometry);if("extent"!==t.type)throw new i.A("geoevent-connection",`Expected extent but found type ${t.type}`);r.geometry=JSON.stringify(t.shiftCentralMeridian())}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when setting connection geometryDefinition",e))}return e?.where&&"1 = 1"!==e.where&&"1=1"!==e.where&&(r.where=e.where),null!=t&&(r.outFields=t.join(",")),r}_enrich(e){if(!this._relatedFeatures)return e;let t=this._serviceDefinition.relatedFeatures.joinField,r=e.attributes[t],n=this._relatedFeatures.get(r);if(!n)return g.A.getLogger(this).warn("geoevent-connection","Feature join failed. Is the join field configured correctly?",e),e;let{attributes:s,geometry:o}=n;for(let t in s)e.attributes[t]=s[t];return o&&(e.geometry=o),!e.geometry&&!e.centroid&&g.A.getLogger(this).error(new i.A("geoevent-connection","Found malformed feature - no geometry found",e)),e}async _queryBuddyServices(){try{let{relatedFeatures:e,keepLatestArchive:t}=this._serviceDefinition,r=this._queryRelatedFeatures(e),n=this._queryArchive(t);await r;let i=await n;if(!i)return;for(let e of i.features)this.onFeature(this._enrich(e))}catch(e){g.A.getLogger(this).error(new i.A("geoevent-connection","Encountered an error when querying buddy services",{error:e}))}}async _queryRelatedFeatures(e){if(!e)return;let t=await this._queryBuddy(e.featuresUrl);this._addRelatedFeatures(t)}async _queryArchive(e){if(e)return this._queryBuddy(e.featuresUrl)}async _queryBuddy(e){let t=new((await Promise.all([r.e(6361),r.e(8278),r.e(7865),r.e(6554),r.e(2869),r.e(9953),r.e(3910),r.e(5566),r.e(1214),r.e(2889),r.e(6263),r.e(8247),r.e(4674),r.e(7283),r.e(8589),r.e(812),r.e(5879),r.e(9279)]).then(()=>r(18589))).default)({url:e}),{capabilities:n}=await t.load(),i=n.query.supportsMaxRecordCountFactor,s=n.query.supportsPagination,o=n.query.supportsCentroid,a=this._config.maxRecordCountFactor,l=t.capabilities.query.maxRecordCount,c=i?l*a:l,u=new A.A;if(u.outFields=this._config.outFields??["*"],u.where=this._config.definitionExpression??"1=1",u.returnGeometry=!0,u.returnExceededLimitFeatures=!0,u.outSpatialReference=p.A.fromJSON(this._outSpatialReference),o&&(u.returnCentroid=!0),i&&(u.maxRecordCountFactor=a),s)return u.num=c,t.destroy(),this._queryPages(e,u);let h=await(0,k.eW)(e,u,this._config.sourceSpatialReference);return t.destroy(),h}async _queryPages(e,t,r=[],n=0){t.start=null==t.num?null:n*t.num;let i=await(0,k.eW)(e,t,this._config.sourceSpatialReference);return i.exceededTransferLimit&&n<(this._config.maxQueryDepth??0)?(i.features.forEach(e=>r.push(e)),this._queryPages(e,t,r,n+1)):(r.forEach(e=>i.features.push(e)),i)}_addRelatedFeatures(e){let t=new Map,r=e.features,n=this._serviceDefinition.relatedFeatures.joinField;for(let e of r){let r=e.attributes[n];t.set(r,e)}this._relatedFeatures=t}};v=(0,a.Cg)([(0,c.$K)("esri.layers.graphics.sources.connections.GeoEventConnection")],v);var R=r(64108);let M=class extends u{constructor(e,t){super({}),this.connectionStatus="connected",this.errorString=null;let{geometryType:r,sourceSpatialReference:n}=e;this._featureZScaler=(0,w.N)(r,n,t)}normalizeCtorArgs(){return{}}updateCustomParameters(e){}sendMessageToSocket(e){}sendMessageToClient(e){if("type"in e)switch(e.type){case"features":case"featureResult":for(let t of e.features)null!=this._featureZScaler&&this._featureZScaler(t.geometry),this.onFeature(t)}this.onMessage(e)}};function C(e,t){let r=t.toJSON();switch(e.type){case"client":return new M(e,r);case"custom":return new S(e,r);case"geoevent":return new v(e,r);case"kusto":return new h(e,r)}}(0,a.Cg)([(0,c.MZ)()],M.prototype,"connectionStatus",void 0),(0,a.Cg)([(0,c.MZ)()],M.prototype,"errorString",void 0),M=(0,a.Cg)([(0,R.$)("esri.layers.support.ClientSideConnection")],M)}}]);