@arcgis/core 4.23.0-next.20220118 → 4.23.0-next.20220126

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 (359) hide show
  1. package/Graphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
  4. package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
  5. package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
  6. package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
  7. package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
  8. package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
  9. package/assets/esri/core/workers/chunks/{7c9d2638693d5f798b23.js → 23b15e7c2f96d260e16c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
  13. package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
  14. package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
  15. package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
  16. package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
  17. package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
  18. package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
  19. package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
  20. package/assets/esri/core/workers/chunks/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
  21. package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
  22. package/assets/esri/core/workers/chunks/{ba6fdaed6c315dc13981.js → 434b16731c6a81f868ef.js} +1 -1
  23. package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
  24. package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
  26. package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
  27. package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +1 -0
  28. package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
  29. package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
  30. package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
  31. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
  32. package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
  33. package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{47395d225229d237f0ac.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
  37. package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
  39. package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
  40. package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
  41. package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
  42. package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
  43. package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
  44. package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
  45. package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
  46. package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
  47. package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
  48. package/assets/esri/core/workers/chunks/{b10fcbe1393c812fc219.js → aa861b8eae6c85f3dad4.js} +1 -1
  49. package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
  50. package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → af5694b4d278cf1db2d9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
  52. package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
  53. package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
  54. package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
  55. package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
  56. package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
  57. package/assets/esri/core/workers/chunks/{4b69129c0557852d9b3d.js → ba5eb394f098968c22d2.js} +1 -1
  58. package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
  59. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
  60. package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
  61. package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
  62. package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
  63. package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{7e596478507466953e65.js → cef4af64860ebbfc1c47.js} +1 -1
  67. package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
  68. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
  69. package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
  70. package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
  71. package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
  72. package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
  73. package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
  74. package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
  75. package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
  76. package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
  77. package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
  78. package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
  79. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  80. package/assets/esri/themes/base/_mixins.scss +4 -1
  81. package/assets/esri/themes/base/icons/style.scss +11 -2
  82. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
  83. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
  84. package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
  85. package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
  86. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
  87. package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
  88. package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
  89. package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
  90. package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
  91. package/assets/esri/themes/base/widgets/_Print.scss +24 -11
  92. package/assets/esri/themes/base/widgets/_Search.scss +4 -2
  93. package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
  94. package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
  95. package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
  96. package/assets/esri/themes/dark/main.css +1 -1
  97. package/assets/esri/themes/dark-blue/main.css +1 -1
  98. package/assets/esri/themes/dark-green/main.css +1 -1
  99. package/assets/esri/themes/dark-purple/main.css +1 -1
  100. package/assets/esri/themes/dark-red/main.css +1 -1
  101. package/assets/esri/themes/light/main.css +1 -1
  102. package/assets/esri/themes/light/view.css +1 -1
  103. package/assets/esri/themes/light-blue/main.css +1 -1
  104. package/assets/esri/themes/light-green/main.css +1 -1
  105. package/assets/esri/themes/light-purple/main.css +1 -1
  106. package/assets/esri/themes/light-red/main.css +1 -1
  107. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  108. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  109. package/chunks/CloudsComposition.glsl.js +4 -4
  110. package/chunks/ComponentShader.glsl.js +19 -19
  111. package/chunks/DefaultMaterial.glsl.js +2 -2
  112. package/chunks/Terrain.glsl.js +11 -11
  113. package/chunks/WaterSurface.glsl.js +21 -21
  114. package/chunks/pe.js +1 -1
  115. package/chunks/vec3.js +1 -1
  116. package/chunks/vxlLayer.js +1 -1
  117. package/core/accessorSupport/ensureType.js +1 -1
  118. package/core/accessorSupport/get.js +1 -1
  119. package/core/accessorSupport/read.js +1 -1
  120. package/core/accessorSupport/set.js +1 -1
  121. package/core/accessorSupport/write.js +1 -1
  122. package/core/has.js +1 -1
  123. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  124. package/core/typedArrayUtil.js +1 -1
  125. package/core/workers/workerFactory.js +1 -1
  126. package/geometry/pe.js +1 -1
  127. package/geometry/support/axisAngleDegrees.js +1 -1
  128. package/geometry/support/heightModelInfoUtils.js +1 -1
  129. package/interfaces.d.ts +315 -78
  130. package/layers/RouteLayer.js +1 -1
  131. package/layers/VoxelLayer.js +1 -1
  132. package/layers/VoxelWasmPerScene.js +1 -1
  133. package/layers/mixins/OperationalLayer.js +1 -1
  134. package/layers/support/RasterWorker.js +1 -1
  135. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  136. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  137. package/libs/vxl/enums.js +1 -1
  138. package/package.json +2 -2
  139. package/popup/content/AttachmentsContent.js +1 -1
  140. package/popup/content/support/mediaInfoTypes.js +1 -1
  141. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  142. package/portal/schemas/definitions.js +1 -1
  143. package/portal/schemas/integratedMeshLayerItem.js +1 -1
  144. package/portal/schemas/pointCloudLayerItem.js +1 -1
  145. package/portal/schemas/sceneLayerItem.js +1 -1
  146. package/portal/schemas/webScene.js +1 -1
  147. package/rasterRenderers.js +1 -1
  148. package/rest/find.js +1 -1
  149. package/rest/geometryService/generalize.js +1 -1
  150. package/rest/geometryService/lengths.js +1 -1
  151. package/rest/geometryService/offset.js +1 -1
  152. package/rest/geometryService/relation.js +1 -1
  153. package/rest/geometryService/trimExtend.js +1 -1
  154. package/rest/identify.js +1 -1
  155. package/{tasks → rest}/operations/find.js +0 -0
  156. package/{tasks → rest}/operations/generalize.js +0 -0
  157. package/rest/operations/identify.js +5 -0
  158. package/{tasks → rest}/operations/lengths.js +0 -0
  159. package/{tasks → rest}/operations/offset.js +0 -0
  160. package/{tasks → rest}/operations/relation.js +0 -0
  161. package/{tasks → rest}/operations/trimExtend.js +0 -0
  162. package/{tasks → rest}/operations/urlUtils.js +0 -0
  163. package/rest/print.js +1 -1
  164. package/rest/query/operations/query.js +1 -1
  165. package/rest/query/operations/queryAttachments.js +1 -1
  166. package/rest/query/operations/queryRelatedRecords.js +1 -1
  167. package/rest/query/operations/queryTopFeatures.js +1 -1
  168. package/rest/route/utils.js +1 -1
  169. package/rest/support/NetworkServiceDescription.js +1 -1
  170. package/rest/support/RouteInfo.js +1 -1
  171. package/rest/support/RouteParameters.js +1 -1
  172. package/rest/support/RouteSettings.js +5 -0
  173. package/rest/support/Stop.js +1 -1
  174. package/rest/support/networkEnums.js +1 -1
  175. package/support/revision.js +1 -1
  176. package/symbols/Font.js +1 -1
  177. package/symbols/LabelSymbol3D.js +1 -1
  178. package/symbols/PointSymbol3D.js +1 -1
  179. package/symbols/TextSymbol.js +1 -1
  180. package/symbols/TextSymbol3DLayer.js +1 -1
  181. package/symbols/cim/CIMSymbolHelper.js +1 -1
  182. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  183. package/symbols/cim/cimAnalyzer.js +1 -1
  184. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  185. package/symbols/support/Symbol3DVerticalOffset.js +1 -1
  186. package/symbols/support/cimSymbolUtils.js +1 -1
  187. package/symbols/support/previewCIMSymbol.js +1 -1
  188. package/symbols/support/previewSymbol2D.js +1 -1
  189. package/symbols/support/previewSymbol3D.js +1 -1
  190. package/symbols/support/previewWebStyleSymbol.js +1 -1
  191. package/symbols/support/svgUtils.js +1 -1
  192. package/symbols/support/textUtils.js +5 -0
  193. package/symbols.js +1 -1
  194. package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +1 -1
  195. package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
  196. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  197. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  198. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  199. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  200. package/views/2d/support/engineHelpers.js +1 -1
  201. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  202. package/views/3d/environment/CloudsComposition.js +1 -1
  203. package/views/3d/environment/CloudsGenerator.js +1 -1
  204. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  205. package/views/3d/environment/Fog.js +1 -1
  206. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  207. package/views/3d/environment/weather.js +1 -1
  208. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  209. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  210. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  211. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  212. package/views/3d/layers/GraphicsView3D.js +1 -1
  213. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  214. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  215. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  216. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  217. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  218. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
  219. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  220. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  221. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  225. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  226. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  227. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  228. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  229. package/views/3d/layers/graphics/{Graphics3DGraphicLikeLayerView.js → GraphicsProcessor.js} +1 -1
  230. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  231. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  232. package/views/3d/terrain/OverlayRenderer.js +1 -1
  233. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +7 -1
  234. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
  235. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
  236. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
  237. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
  238. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  239. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  240. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  241. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  242. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  243. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  244. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  245. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  246. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  247. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  248. package/views/3d/webgl-engine/parts/Model.js +1 -1
  249. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  250. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  251. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  252. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  253. package/views/SceneView.js +1 -1
  254. package/views/interactive/dragEventPipeline.js +1 -1
  255. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  256. package/views/support/DefaultsFromMap.js +1 -1
  257. package/views/webgl/ContextState.js +1 -1
  258. package/views/webgl/FramebufferObject.js +1 -1
  259. package/views/webgl/Renderbuffer.js +1 -1
  260. package/views/webgl/RenderingContext.js +1 -1
  261. package/views/webgl/Texture.js +1 -1
  262. package/views/webgl/Util.js +1 -1
  263. package/views/webgl/enums.js +1 -1
  264. package/views/webgl/rasterUtils.js +1 -1
  265. package/views/webgl/testFloatBufferBlend.js +1 -1
  266. package/widgets/Attachments.js +1 -1
  267. package/widgets/Editor/workflowUtils.js +1 -1
  268. package/widgets/Feature/FeatureExpression.js +1 -1
  269. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  270. package/widgets/Feature/FeatureMedia.js +1 -1
  271. package/widgets/Feature/FeatureViewModel.js +1 -1
  272. package/widgets/FeatureForm/InputField.js +1 -1
  273. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  274. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  275. package/widgets/FeatureTable.js +1 -1
  276. package/widgets/LayerList/LayerListViewModel.js +1 -1
  277. package/widgets/Popup/PopupViewModel.js +1 -1
  278. package/widgets/Popup/actionUtils.js +1 -1
  279. package/widgets/Slice/SliceViewModel.js +1 -1
  280. package/widgets/Slider/SliderViewModel.js +1 -1
  281. package/widgets/Slider.js +1 -1
  282. package/widgets/Weather/WeatherViewModel.js +1 -1
  283. package/widgets/Weather/css.js +1 -1
  284. package/widgets/Weather.js +1 -1
  285. package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
  286. package/widgets/support/InteractiveToolViewModel.js +1 -1
  287. package/widgets/support/geolocationUtils.js +1 -1
  288. package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
  289. package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
  290. package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
  291. package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
  292. package/assets/components/assets/calcite-icon/squareF16.json +0 -1
  293. package/assets/components/assets/calcite-icon/squareF24.json +0 -1
  294. package/assets/components/assets/calcite-icon/squareF32.json +0 -1
  295. package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
  296. package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
  297. package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
  298. package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
  299. package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
  300. package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
  301. package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
  302. package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
  303. package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
  304. package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +0 -1
  305. package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
  306. package/assets/esri/core/workers/chunks/0f254c3e91e8fee55f28.js +0 -1
  307. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
  308. package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +0 -1
  309. package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
  310. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
  311. package/assets/esri/core/workers/chunks/2d947080a27db6ce0d75.js +0 -1
  312. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
  313. package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
  314. package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +0 -1
  315. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
  316. package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
  317. package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +0 -1
  318. package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +0 -1
  319. package/assets/esri/core/workers/chunks/4c301ca9c493b96df746.js +0 -1
  320. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
  321. package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
  322. package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +0 -1
  323. package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +0 -1
  324. package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
  325. package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +0 -1
  326. package/assets/esri/core/workers/chunks/85b34d91cf07567d6873.js +0 -1
  327. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
  328. package/assets/esri/core/workers/chunks/89de05207744149fb58b.js +0 -1
  329. package/assets/esri/core/workers/chunks/8fdd5bca3716816d359b.js +0 -1
  330. package/assets/esri/core/workers/chunks/987182b3a578fc7de251.js +0 -1
  331. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
  332. package/assets/esri/core/workers/chunks/9d9dffc8884d66a258e4.js +0 -1
  333. package/assets/esri/core/workers/chunks/a28b53c61bddefb6616e.js +0 -1
  334. package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
  335. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
  336. package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +0 -1
  337. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
  338. package/assets/esri/core/workers/chunks/b99e69302ea701fff0ea.js +0 -971
  339. package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +0 -1
  340. package/assets/esri/core/workers/chunks/bc790b2f964144d10abe.js +0 -1
  341. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
  342. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
  343. package/assets/esri/core/workers/chunks/c3eca92d02958732e141.js +0 -1
  344. package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
  345. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
  346. package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
  347. package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
  348. package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
  349. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
  350. package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
  351. package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +0 -1
  352. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
  353. package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +0 -1
  354. package/assets/esri/core/workers/chunks/ef8b75b92cf549e0507e.js +0 -1
  355. package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +0 -1
  356. package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
  357. package/symbols/support/constants.js +0 -5
  358. package/tasks/operations/identify.js +0 -5
  359. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3505],{46851:(t,e,n)=>{n.d(e,{E:()=>a,R:()=>i});const a=1e-6,i=Math.random,o=Math.PI/180,s=180/Math.PI;Object.freeze({__proto__:null,EPSILON:a,RANDOM:i,toRadian:function(t){return t*o},toDegree:function(t){return t*s},equals:function(t,e){return Math.abs(t-e)<=a*Math.max(1,Math.abs(t),Math.abs(e))}})},52138:(t,e,n)=>{n.d(e,{a:()=>l,d:()=>d,e:()=>f,f:()=>m,h:()=>h,i:()=>s,j:()=>u,m:()=>c,p:()=>b,s:()=>o,t:()=>r,u:()=>p,v:()=>T,w:()=>g,y:()=>M});var a=n(65617),i=n(46851);function o(t,e,n,a,i,o,s,r,l,c,u,h,f,m,p,d,M){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t[4]=o,t[5]=s,t[6]=r,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=m,t[13]=p,t[14]=d,t[15]=M,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function r(t,e){if(t===e){const n=e[1],a=e[2],i=e[3],o=e[6],s=e[7],r=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=a,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=r}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15],x=n*r-a*s,v=n*l-i*s,g=n*c-o*s,T=a*l-i*r,b=a*c-o*r,w=i*c-o*l,R=u*d-h*p,_=u*M-f*p,E=u*y-m*p,q=h*M-f*d,I=h*y-m*d,A=f*y-m*M;let D=x*A-v*I+g*q+T*E-b*_+w*R;return D?(D=1/D,t[0]=(r*A-l*I+c*q)*D,t[1]=(i*I-a*A-o*q)*D,t[2]=(d*w-M*b+y*T)*D,t[3]=(f*b-h*w-m*T)*D,t[4]=(l*E-s*A-c*_)*D,t[5]=(n*A-i*E+o*_)*D,t[6]=(M*g-p*w-y*v)*D,t[7]=(u*w-f*g+m*v)*D,t[8]=(s*I-r*E+c*R)*D,t[9]=(a*E-n*I-o*R)*D,t[10]=(p*b-d*g+y*x)*D,t[11]=(h*g-u*b-m*x)*D,t[12]=(r*_-s*q-l*R)*D,t[13]=(n*q-a*_+i*R)*D,t[14]=(d*v-p*T-M*x)*D,t[15]=(u*T-h*v+f*x)*D,t):null}function c(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],m=e[10],p=e[11],d=e[12],M=e[13],y=e[14],x=e[15];let v=n[0],g=n[1],T=n[2],b=n[3];return t[0]=v*a+g*r+T*h+b*d,t[1]=v*i+g*l+T*f+b*M,t[2]=v*o+g*c+T*m+b*y,t[3]=v*s+g*u+T*p+b*x,v=n[4],g=n[5],T=n[6],b=n[7],t[4]=v*a+g*r+T*h+b*d,t[5]=v*i+g*l+T*f+b*M,t[6]=v*o+g*c+T*m+b*y,t[7]=v*s+g*u+T*p+b*x,v=n[8],g=n[9],T=n[10],b=n[11],t[8]=v*a+g*r+T*h+b*d,t[9]=v*i+g*l+T*f+b*M,t[10]=v*o+g*c+T*m+b*y,t[11]=v*s+g*u+T*p+b*x,v=n[12],g=n[13],T=n[14],b=n[15],t[12]=v*a+g*r+T*h+b*d,t[13]=v*i+g*l+T*f+b*M,t[14]=v*o+g*c+T*m+b*y,t[15]=v*s+g*u+T*p+b*x,t}function u(t,e,n){const a=n[0],i=n[1],o=n[2];let s,r,l,c,u,h,f,m,p,d,M,y;return e===t?(t[12]=e[0]*a+e[4]*i+e[8]*o+e[12],t[13]=e[1]*a+e[5]*i+e[9]*o+e[13],t[14]=e[2]*a+e[6]*i+e[10]*o+e[14],t[15]=e[3]*a+e[7]*i+e[11]*o+e[15]):(s=e[0],r=e[1],l=e[2],c=e[3],u=e[4],h=e[5],f=e[6],m=e[7],p=e[8],d=e[9],M=e[10],y=e[11],t[0]=s,t[1]=r,t[2]=l,t[3]=c,t[4]=u,t[5]=h,t[6]=f,t[7]=m,t[8]=p,t[9]=d,t[10]=M,t[11]=y,t[12]=s*a+u*i+p*o+e[12],t[13]=r*a+h*i+d*o+e[13],t[14]=l*a+f*i+M*o+e[14],t[15]=c*a+m*i+y*o+e[15]),t}function h(t,e,n){const a=n[0],i=n[1],o=n[2];return t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,n,a){let o,s,r,l,c,u,h,f,m,p,d,M,y,x,v,g,T,b,w,R,_,E,q,I,A=a[0],D=a[1],z=a[2],C=Math.sqrt(A*A+D*D+z*z);return C<i.E?null:(C=1/C,A*=C,D*=C,z*=C,o=Math.sin(n),s=Math.cos(n),r=1-s,l=e[0],c=e[1],u=e[2],h=e[3],f=e[4],m=e[5],p=e[6],d=e[7],M=e[8],y=e[9],x=e[10],v=e[11],g=A*A*r+s,T=D*A*r+z*o,b=z*A*r-D*o,w=A*D*r-z*o,R=D*D*r+s,_=z*D*r+A*o,E=A*z*r+D*o,q=D*z*r-A*o,I=z*z*r+s,t[0]=l*g+f*T+M*b,t[1]=c*g+m*T+y*b,t[2]=u*g+p*T+x*b,t[3]=h*g+d*T+v*b,t[4]=l*w+f*R+M*_,t[5]=c*w+m*R+y*_,t[6]=u*w+p*R+x*_,t[7]=h*w+d*R+v*_,t[8]=l*E+f*q+M*I,t[9]=c*E+m*q+y*I,t[10]=u*E+p*q+x*I,t[11]=h*E+d*q+v*I,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function m(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,e,n){let a,o,s,r=n[0],l=n[1],c=n[2],u=Math.sqrt(r*r+l*l+c*c);return u<i.E?null:(u=1/u,r*=u,l*=u,c*=u,a=Math.sin(e),o=Math.cos(e),s=1-o,t[0]=r*r*s+o,t[1]=l*r*s+c*a,t[2]=c*r*s-l*a,t[3]=0,t[4]=r*l*s-c*a,t[5]=l*l*s+o,t[6]=c*l*s+r*a,t[7]=0,t[8]=r*c*s+l*a,t[9]=l*c*s-r*a,t[10]=c*c*s+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=a+a,l=i+i,c=o+o,u=a*r,h=a*l,f=a*c,m=i*l,p=i*c,d=o*c,M=s*r,y=s*l,x=s*c;return t[0]=1-(m+d),t[1]=h+x,t[2]=f-y,t[3]=0,t[4]=h-x,t[5]=1-(u+d),t[6]=p+M,t[7]=0,t[8]=f+y,t[9]=p-M,t[10]=1-(u+m),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,a.c)();function v(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function g(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function T(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=t[3],r=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],m=t[10],p=t[11],d=t[12],M=t[13],y=t[14],x=t[15],v=e[0],g=e[1],T=e[2],b=e[3],w=e[4],R=e[5],_=e[6],E=e[7],q=e[8],I=e[9],A=e[10],D=e[11],z=e[12],C=e[13],Z=e[14],S=e[15];return Math.abs(n-v)<=i.E*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-g)<=i.E*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(o-T)<=i.E*Math.max(1,Math.abs(o),Math.abs(T))&&Math.abs(s-b)<=i.E*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(r-w)<=i.E*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(l-R)<=i.E*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(c-_)<=i.E*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-E)<=i.E*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(h-q)<=i.E*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-I)<=i.E*Math.max(1,Math.abs(f),Math.abs(I))&&Math.abs(m-A)<=i.E*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(p-D)<=i.E*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(d-z)<=i.E*Math.max(1,Math.abs(d),Math.abs(z))&&Math.abs(M-C)<=i.E*Math.max(1,Math.abs(M),Math.abs(C))&&Math.abs(y-Z)<=i.E*Math.max(1,Math.abs(y),Math.abs(Z))&&Math.abs(x-S)<=i.E*Math.max(1,Math.abs(x),Math.abs(S))}function b(t){const e=i.E,n=t[0],a=t[1],o=t[2],s=t[4],r=t[5],l=t[6],c=t[8],u=t[9],h=t[10];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(a*a+r*r+u*u))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e}const w=c,R=v;Object.freeze({__proto__:null,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:o,identity:s,transpose:r,invert:l,adjoint:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15];return t[0]=r*(f*y-m*M)-h*(l*y-c*M)+d*(l*m-c*f),t[1]=-(a*(f*y-m*M)-h*(i*y-o*M)+d*(i*m-o*f)),t[2]=a*(l*y-c*M)-r*(i*y-o*M)+d*(i*c-o*l),t[3]=-(a*(l*m-c*f)-r*(i*m-o*f)+h*(i*c-o*l)),t[4]=-(s*(f*y-m*M)-u*(l*y-c*M)+p*(l*m-c*f)),t[5]=n*(f*y-m*M)-u*(i*y-o*M)+p*(i*m-o*f),t[6]=-(n*(l*y-c*M)-s*(i*y-o*M)+p*(i*c-o*l)),t[7]=n*(l*m-c*f)-s*(i*m-o*f)+u*(i*c-o*l),t[8]=s*(h*y-m*d)-u*(r*y-c*d)+p*(r*m-c*h),t[9]=-(n*(h*y-m*d)-u*(a*y-o*d)+p*(a*m-o*h)),t[10]=n*(r*y-c*d)-s*(a*y-o*d)+p*(a*c-o*r),t[11]=-(n*(r*m-c*h)-s*(a*m-o*h)+u*(a*c-o*r)),t[12]=-(s*(h*M-f*d)-u*(r*M-l*d)+p*(r*f-l*h)),t[13]=n*(h*M-f*d)-u*(a*M-i*d)+p*(a*f-i*h),t[14]=-(n*(r*M-l*d)-s*(a*M-i*d)+p*(a*l-i*r)),t[15]=n*(r*f-l*h)-s*(a*f-i*h)+u*(a*l-i*r),t},determinant:function(t){const e=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],r=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],m=t[12],p=t[13],d=t[14],M=t[15];return(e*s-n*o)*(h*M-f*d)-(e*r-a*o)*(u*M-f*p)+(e*l-i*o)*(u*d-h*p)+(n*r-a*s)*(c*M-f*m)-(n*l-i*s)*(c*d-h*m)+(a*l-i*r)*(c*p-u*m)},multiply:c,translate:u,scale:h,rotate:f,rotateX:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[4],s=e[5],r=e[6],l=e[7],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*a,t[5]=s*i+u*a,t[6]=r*i+h*a,t[7]=l*i+f*a,t[8]=c*i-o*a,t[9]=u*i-s*a,t[10]=h*i-r*a,t[11]=f*i-l*a,t},rotateY:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*a,t[1]=s*i-u*a,t[2]=r*i-h*a,t[3]=l*i-f*a,t[8]=o*a+c*i,t[9]=s*a+u*i,t[10]=r*a+h*i,t[11]=l*a+f*i,t},rotateZ:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*a,t[1]=s*i+u*a,t[2]=r*i+h*a,t[3]=l*i+f*a,t[4]=c*i-o*a,t[5]=u*i-s*a,t[6]=h*i-r*a,t[7]=f*i-l*a,t},fromTranslation:m,fromScaling:p,fromRotation:d,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:y,fromQuat2:function(t,e){const n=x,a=-e[0],i=-e[1],o=-e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=a*a+i*i+o*o+s*s;return h>0?(n[0]=2*(r*s+u*a+l*o-c*i)/h,n[1]=2*(l*s+u*i+c*a-r*o)/h,n[2]=2*(c*s+u*o+r*i-l*a)/h):(n[0]=2*(r*s+u*a+l*o-c*i),n[1]=2*(l*s+u*i+c*a-r*o),n[2]=2*(c*s+u*o+r*i-l*a)),y(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[4],s=e[5],r=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.sqrt(n*n+a*a+i*i),t[1]=Math.sqrt(o*o+s*s+r*r),t[2]=Math.sqrt(l*l+c*c+u*u),t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let a=0;return n>0?(a=2*Math.sqrt(n+1),t[3]=.25*a,t[0]=(e[6]-e[9])/a,t[1]=(e[8]-e[2])/a,t[2]=(e[1]-e[4])/a):e[0]>e[5]&&e[0]>e[10]?(a=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/a,t[0]=.25*a,t[1]=(e[1]+e[4])/a,t[2]=(e[8]+e[2])/a):e[5]>e[10]?(a=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/a,t[0]=(e[1]+e[4])/a,t[1]=.25*a,t[2]=(e[6]+e[9])/a):(a=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/a,t[0]=(e[8]+e[2])/a,t[1]=(e[6]+e[9])/a,t[2]=.25*a),t},fromRotationTranslationScale:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3],l=i+i,c=o+o,u=s+s,h=i*l,f=i*c,m=i*u,p=o*c,d=o*u,M=s*u,y=r*l,x=r*c,v=r*u,g=a[0],T=a[1],b=a[2];return t[0]=(1-(p+M))*g,t[1]=(f+v)*g,t[2]=(m-x)*g,t[3]=0,t[4]=(f-v)*T,t[5]=(1-(h+M))*T,t[6]=(d+y)*T,t[7]=0,t[8]=(m+x)*b,t[9]=(d-y)*b,t[10]=(1-(h+p))*b,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,n,a,i){const o=e[0],s=e[1],r=e[2],l=e[3],c=o+o,u=s+s,h=r+r,f=o*c,m=o*u,p=o*h,d=s*u,M=s*h,y=r*h,x=l*c,v=l*u,g=l*h,T=a[0],b=a[1],w=a[2],R=i[0],_=i[1],E=i[2],q=(1-(d+y))*T,I=(m+g)*T,A=(p-v)*T,D=(m-g)*b,z=(1-(f+y))*b,C=(M+x)*b,Z=(p+v)*w,S=(M-x)*w,F=(1-(f+d))*w;return t[0]=q,t[1]=I,t[2]=A,t[3]=0,t[4]=D,t[5]=z,t[6]=C,t[7]=0,t[8]=Z,t[9]=S,t[10]=F,t[11]=0,t[12]=n[0]+R-(q*R+D*_+Z*E),t[13]=n[1]+_-(I*R+z*_+S*E),t[14]=n[2]+E-(A*R+C*_+F*E),t[15]=1,t},fromQuat:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=n+n,r=a+a,l=i+i,c=n*s,u=a*s,h=a*r,f=i*s,m=i*r,p=i*l,d=o*s,M=o*r,y=o*l;return t[0]=1-h-p,t[1]=u+y,t[2]=f-M,t[3]=0,t[4]=u-y,t[5]=1-c-p,t[6]=m+d,t[7]=0,t[8]=f+M,t[9]=m-d,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,a,i,o,s){const r=1/(n-e),l=1/(i-a),c=1/(o-s);return t[0]=2*o*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*r,t[9]=(i+a)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t},perspective:function(t,e,n,a,i){const o=1/Math.tan(e/2);let s;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(s=1/(a-i),t[10]=(i+a)*s,t[14]=2*i*a*s):(t[10]=-1,t[14]=-2*a),t},perspectiveFromFieldOfView:function(t,e,n,a){const i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),r=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+r),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-r)*l*.5,t[9]=(i-o)*c*.5,t[10]=a/(n-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*n/(n-a),t[15]=0,t},ortho:function(t,e,n,a,i,o,s){const r=1/(e-n),l=1/(a-i),c=1/(o-s);return t[0]=-2*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*r,t[13]=(i+a)*l,t[14]=(s+o)*c,t[15]=1,t},lookAt:function(t,e,n,a){let o,r,l,c,u,h,f,m,p,d;const M=e[0],y=e[1],x=e[2],v=a[0],g=a[1],T=a[2],b=n[0],w=n[1],R=n[2];return Math.abs(M-b)<i.E&&Math.abs(y-w)<i.E&&Math.abs(x-R)<i.E?s(t):(f=M-b,m=y-w,p=x-R,d=1/Math.sqrt(f*f+m*m+p*p),f*=d,m*=d,p*=d,o=g*p-T*m,r=T*f-v*p,l=v*m-g*f,d=Math.sqrt(o*o+r*r+l*l),d?(d=1/d,o*=d,r*=d,l*=d):(o=0,r=0,l=0),c=m*l-p*r,u=p*o-f*l,h=f*r-m*o,d=Math.sqrt(c*c+u*u+h*h),d?(d=1/d,c*=d,u*=d,h*=d):(c=0,u=0,h=0),t[0]=o,t[1]=c,t[2]=f,t[3]=0,t[4]=r,t[5]=u,t[6]=m,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=-(o*M+r*y+l*x),t[13]=-(c*M+u*y+h*x),t[14]=-(f*M+m*y+p*x),t[15]=1,t)},targetTo:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=a[0],l=a[1],c=a[2];let u=i-n[0],h=o-n[1],f=s-n[2],m=u*u+h*h+f*f;m>0&&(m=1/Math.sqrt(m),u*=m,h*=m,f*=m);let p=l*f-c*h,d=c*u-r*f,M=r*h-l*u;return m=p*p+d*d+M*M,m>0&&(m=1/Math.sqrt(m),p*=m,d*=m,M*=m),t[0]=p,t[1]=d,t[2]=M,t[3]=0,t[4]=h*M-f*d,t[5]=f*p-u*M,t[6]=u*d-h*p,t[7]=0,t[8]=u,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=s,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:v,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t[4]=e[4]+n[4]*a,t[5]=e[5]+n[5]*a,t[6]=e[6]+n[6]*a,t[7]=e[7]+n[7]*a,t[8]=e[8]+n[8]*a,t[9]=e[9]+n[9]*a,t[10]=e[10]+n[10]*a,t[11]=e[11]+n[11]*a,t[12]=e[12]+n[12]*a,t[13]=e[13]+n[13]*a,t[14]=e[14]+n[14]*a,t[15]=e[15]+n[15]*a,t},exactEquals:g,equals:T,isOrthoNormal:b,mul:w,sub:R})},17896:(t,e,n)=>{n.d(e,{E:()=>h,a:()=>f,b:()=>l,c:()=>x,d:()=>y,e:()=>v,f:()=>c,g:()=>s,h:()=>p,i:()=>m,k:()=>_,l:()=>o,m:()=>g,n:()=>M,p:()=>d,q:()=>b,r:()=>E,s:()=>r,t:()=>T,u:()=>C});var a=n(65617),i=n(46851);function o(t){const e=t[0],n=t[1],a=t[2];return Math.sqrt(e*e+n*n+a*a)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r(t,e,n,a){return t[0]=e,t[1]=n,t[2]=a,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function m(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+a*a+i*i)}function p(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return n*n+a*a+i*i}function d(t){const e=t[0],n=t[1],a=t[2];return e*e+n*n+a*a}function M(t,e){const n=e[0],a=e[1],i=e[2];let o=n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function y(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2];return t[0]=i*l-o*r,t[1]=o*s-a*l,t[2]=a*r-i*s,t}function v(t,e,n,a){const i=e[0],o=e[1],s=e[2];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t}function g(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12],t[1]=n[1]*a+n[5]*i+n[9]*o+n[13],t[2]=n[2]*a+n[6]*i+n[10]*o+n[14],t}function T(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=a*n[0]+i*n[3]+o*n[6],t[1]=a*n[1]+i*n[4]+o*n[7],t[2]=a*n[2]+i*n[5]+o*n[8],t}function b(t,e,n){const a=n[0],i=n[1],o=n[2],s=n[3],r=e[0],l=e[1],c=e[2];let u=i*c-o*l,h=o*r-a*c,f=a*l-i*r,m=i*f-o*h,p=o*u-a*f,d=a*h-i*u;const M=2*s;return u*=M,h*=M,f*=M,m*=2,p*=2,d*=2,t[0]=r+u+m,t[1]=l+h+p,t[2]=c+f+d,t}const w=(0,a.c)(),R=(0,a.c)();function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e,n){const a=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2];let s=a*a+i*i+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=a*s,t[1]=i*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const q=c,I=u,A=h,D=m,z=p,C=o,Z=d;Object.freeze({__proto__:null,length:o,copy:s,set:r,add:l,subtract:c,multiply:u,divide:h,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:f,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t},distance:m,squaredDistance:p,squaredLength:d,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},normalize:M,dot:y,cross:x,lerp:v,hermite:function(t,e,n,a,i,o){const s=o*o,r=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return t[0]=e[0]*r+n[0]*l+a[0]*c+i[0]*u,t[1]=e[1]*r+n[1]*l+a[1]*c+i[1]*u,t[2]=e[2]*r+n[2]*l+a[2]*c+i[2]*u,t},bezier:function(t,e,n,a,i,o){const s=1-o,r=s*s,l=o*o,c=r*s,u=3*o*r,h=3*l*s,f=l*o;return t[0]=e[0]*c+n[0]*u+a[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*u+a[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*u+a[2]*h+i[2]*f,t},random:function(t,e){e=e||1;const n=2*(0,i.R)()*Math.PI,a=2*(0,i.R)()-1,o=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=a*e,t},transformMat4:g,transformMat3:T,transformQuat:b,rotateX:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(a)-i[2]*Math.sin(a),o[2]=i[1]*Math.sin(a)+i[2]*Math.cos(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(a)+i[0]*Math.cos(a),o[1]=i[1],o[2]=i[2]*Math.cos(a)-i[0]*Math.sin(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(a)-i[1]*Math.sin(a),o[1]=i[0]*Math.sin(a)+i[1]*Math.cos(a),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},angle:function(t,e){s(w,t),s(R,e),M(w,w),M(R,R);const n=y(w,R);return n>1?0:n<-1?Math.PI:Math.acos(n)},str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:_,equals:function(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=e[0],r=e[1],l=e[2];return Math.abs(n-s)<=i.E*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-r)<=i.E*Math.max(1,Math.abs(a),Math.abs(r))&&Math.abs(o-l)<=i.E*Math.max(1,Math.abs(o),Math.abs(l))},direction:E,sub:q,mul:I,div:A,dist:D,sqrDist:z,len:C,sqrLen:Z})},65617:(t,e,n)=>{function a(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function s(t){const e=[0,0,0],n=Math.min(3,t.length);for(let a=0;a<n;++a)e[a]=t[a];return e}function r(t,e){return new Float64Array(t,e,3)}function l(){return o(1,1,1)}function c(){return o(1,0,0)}function u(){return o(0,1,0)}function h(){return o(0,0,1)}n.d(e,{O:()=>m,Z:()=>f,a:()=>i,b:()=>r,c:()=>a,d:()=>s,f:()=>o});const f=[0,0,0],m=l(),p=c(),d=u(),M=h();Object.freeze({__proto__:null,create:a,clone:i,fromValues:o,fromArray:s,createView:r,zeros:function(){return[0,0,0]},ones:l,unitX:c,unitY:u,unitZ:h,ZEROS:f,ONES:m,UNIT_X:p,UNIT_Y:d,UNIT_Z:M})},98766:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>u,c:()=>i,d:()=>M,e:()=>m,f:()=>p,g:()=>x,h:()=>v,l:()=>y,n:()=>d,s:()=>o});var a=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(t,e,n,a,i){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+a*a+i*i+o*o)}function f(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+a*a+i*i+o*o}function m(t){const e=t[0],n=t[1],a=t[2],i=t[3];return Math.sqrt(e*e+n*n+a*a+i*i)}function p(t){const e=t[0],n=t[1],a=t[2],i=t[3];return e*e+n*n+a*a+i*i}function d(t,e){const n=e[0],a=e[1],i=e[2],o=e[3];let s=n*n+a*a+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),t[0]=n*s,t[1]=a*s,t[2]=i*s,t[3]=o*s),t}function M(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function y(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t[3]=r+a*(n[3]-r),t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function v(t,e){const n=t[0],i=t[1],o=t[2],s=t[3],r=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-r)<=a.E*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-l)<=a.E*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=a.E*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=a.E*Math.max(1,Math.abs(s),Math.abs(u))}const g=r,T=l,b=c,w=h,R=f,_=m,E=p;Object.freeze({__proto__:null,copy:i,set:o,add:s,subtract:r,multiply:l,divide:c,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:u,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t},distance:h,squaredDistance:f,length:m,squaredLength:p,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},normalize:d,dot:M,lerp:y,random:function(t,e){let n,i,o,s,r,l;e=e||1;do{n=2*(0,a.R)()-1,i=2*(0,a.R)()-1,r=n*n+i*i}while(r>=1);do{o=2*(0,a.R)()-1,s=2*(0,a.R)()-1,l=o*o+s*s}while(l>=1);const c=Math.sqrt((1-r)/l);return t[0]=e*n,t[1]=e*i,t[2]=e*o*c,t[3]=e*s*c,t},transformMat4:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*a+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*a+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*a+n[7]*i+n[11]*o+n[15]*s,t},transformQuat:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2],c=n[3],u=c*a+r*o-l*i,h=c*i+l*a-s*o,f=c*o+s*i-r*a,m=-s*a-r*i-l*o;return t[0]=u*c+m*-s+h*-l-f*-r,t[1]=h*c+m*-r+f*-s-u*-l,t[2]=f*c+m*-l+u*-r-h*-s,t[3]=e[3],t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:x,equals:v,sub:g,mul:T,div:b,dist:w,sqrDist:R,len:_,sqrLen:E})},22021:(t,e,n)=>{n.d(e,{ZF:()=>f,Kt:()=>m,jE:()=>M,uZ:()=>s,oK:()=>p,Vl:()=>u,wt:()=>r,t7:()=>c,Sf:()=>o,fp:()=>l,BV:()=>h});var a=n(17896);n(98766);const i=new Float32Array(1);function o(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function s(t,e,n){return Math.min(Math.max(t,e),n)}function r(t){return 0==(t&t-1)}function l(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}function c(t,e,n){return t+(e-t)*n}function u(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function f(t){return Math.acos(s(t,-1,1))}function m(t){return Math.asin(s(t,-1,1))}function p(t){return d(Math.max(-y,Math.min(t,y)))}function d(t){return i[0]=t,i[0]}function M(t,e){const n=(0,a.l)(t),i=m(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,a.s)(e,n,i,o),e}const y=d(34028234663852886e22)},69285:(t,e,n)=>{n.d(e,{k:()=>s});var a=n(70586),i=n(67900),o=n(8744);function s(t,e,n){if((0,a.Wi)(e)||(0,a.Wi)(n)||n.vcsWkid||(0,o.fS)(e,n))return null;const s=(0,i._R)(e)/(0,i._R)(n);if(1===s)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){t&&null!=t.z&&(t.z*=e)}(t,s);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t)for(const n of t.paths)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t)for(const n of t.rings)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const n of t.points)n.length>2&&(n[2]*=e)}(t,s);case"extent":case"esriGeometryExtent":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,s);default:return null}}},33127:(t,e,n)=>{n.r(e),n.d(e,{ElevationQuery:()=>_,GeometryDescriptor:()=>E,default:()=>_,getFinestLodIndex:()=>D});var a=n(66643),i=n(20102),o=n(70586),s=n(95330),r=n(67900),l=n(65091),c=n(13473),u=n(58901),h=n(90411),f=n(24470),m=(n(66577),n(80442),n(92604)),p=n(54102),d=n(40488);const M=m.Z.getLogger("esri.layers.support.ElevationSampler");class y{queryElevation(t){return function(t,e){const n=g(t,e.spatialReference);if(!n)return null;switch(t.type){case"point":!function(t,e,n){t.z=(0,o.Pt)(n.elevationAt(e),0)}(t,n,e);break;case"polyline":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.paths.length;i++){const s=t.paths[i],r=e.paths[i];for(let t=0;t<s.length;t++){const e=s[t],i=r[t];T.x=i[0],T.y=i[1],a&&(e[3]=e[2]),e[2]=(0,o.Pt)(n.elevationAt(T),0)}}t.hasZ=!0}(t,n,e);break;case"multipoint":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.points.length;i++){const s=t.points[i],r=e.points[i];T.x=r[0],T.y=r[1],a&&(s[3]=s[2]),s[2]=(0,o.Pt)(n.elevationAt(T),0)}t.hasZ=!0}(t,n,e)}return t}(t.clone(),this)}on(){return b}projectIfRequired(t,e){return g(t,e)}}class x extends y{constructor(t,e,n){super(),this.tile=t,this.noDataValue=n,this.extent=(0,f.HH)(t.tile.extent,e.spatialReference);const a=(0,r.c9)(e.spatialReference),i=e.lodAt(t.tile.level).resolution*a;this.demResolution={min:i,max:i}}get spatialReference(){return this.extent.spatialReference}contains(t){const e=this.projectIfRequired(t,this.spatialReference);return(0,p.aV)(this.extent,e)}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if((0,o.Wi)(e))return null;if(!this.contains(t)){const e=this.extent,n=`${e.xmin}, ${e.ymin}, ${e.xmax}, ${e.ymax}`;return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler extent (${n})`),this.noDataValue}return this.tile.sample(e.x,e.y)}}class v extends y{constructor(t,e,n){let a;super(),"number"==typeof e?(this.noDataValue=e,a=null):(a=e,this.noDataValue=n),this.samplers=a?t.map((t=>new x(t,a,this.noDataValue))):t;const i=this.samplers[0];if(i){this.extent=i.extent.clone();const{min:t,max:e}=i.demResolution;this.demResolution={min:t,max:e};for(let t=1;t<this.samplers.length;t++){const e=this.samplers[t];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=(0,f.HH)((0,f.Ue)(),a.spatialReference),this.demResolution={min:0,max:0}}get spatialReference(){return this.extent.spatialReference}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;for(const t of this.samplers)if(t.contains(e))return t.elevationAt(e);return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler`),this.noDataValue}}function g(t,e){if((0,o.Wi)(t))return null;const n=t.spatialReference;if(n.equals(e))return t;const a=(0,d.iV)(t,e);return a||M.error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),a}const T=new c.Z,b={remove(){}};class w{constructor(t,e=null){if(this.tile=t,(0,o.pC)(e)){const n=t.extent;this.samplerData={pixelData:e.values,width:e.width,height:e.height,safeWidth:.99999999*(e.width-1),noDataValue:e.noDataValue,dx:(e.width-1)/(n[2]-n[0]),dy:(e.width-1)/(n[3]-n[1]),x0:n[0],y1:n[3]}}}sample(t,e){if((0,o.Wi)(this.samplerData))return;const{safeWidth:n,width:a,pixelData:i,noDataValue:s,dx:r,dy:l,y1:c,x0:u}=this.samplerData,h=R(l*(c-e),0,n),f=R(r*(t-u),0,n),m=Math.floor(h),p=Math.floor(f),d=m*a+p,M=d+a,y=i[d],x=i[M],v=i[d+1],g=i[M+1];if(y!==s&&x!==s&&v!==s&&g!==s){const t=f-p,e=y+(v-y)*t;return e+(x+(g-x)*t-e)*(h-m)}}}function R(t,e,n){return t<e?e:t>n?n:t}class _{async queryAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const a=E.fromGeometry(e);let o=!1;n&&n.returnSampleInfo||(o=!0);const s={...z,...n,returnSampleInfo:!0},r=await this.query(t[t.length-1],a,s),l=await this._queryAllContinue(t,r,s);return l.geometry=l.geometry.export(),o&&delete l.sampleInfo,l}async query(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||!(e instanceof E)&&"point"!==e.type&&"multipoint"!==e.type&&"polyline"!==e.type)throw new i.Z("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const a={...z,...n},o=new I(t,e.spatialReference,a),s=a.signal;return await t.load({signal:s}),await this._createGeometryDescriptor(o,e,s),await this._selectTiles(o,s),await this._populateElevationTiles(o,s),this._sampleGeometryWithElevation(o),this._createQueryResult(o,s)}async createSampler(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n};return this._createSampler(t,e,a)}async createSamplerAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n,returnSampleInfo:!0},o=await this._createSampler(t[t.length-1],e,a);return this._createSamplerAllContinue(t,e,o,a)}async _createSampler(t,e,n,a){const i=n.signal;await t.load({signal:i});const o=e.spatialReference,s=t.tileInfo.spatialReference;o.equals(s)||(await(0,h.iQ)([{source:o,dest:s}],{signal:i}),e=(0,h.iV)(e,s));const r=new A(t,e,n,a);return await this._selectTiles(r,i),await this._populateElevationTiles(r,i),new v(r.elevationTiles,r.layer.tileInfo,r.options.noDataValue)}async _createSamplerAllContinue(t,e,n,a){if(t.pop(),!t.length)return n;const i=n.samplers.map((t=>(0,f.oJ)(t.extent))),o=await this._createSampler(t[t.length-1],e,a,i);if(0===o.samplers.length)return n;const s=n.samplers.concat(o.samplers),r=new v(s,a.noDataValue);return this._createSamplerAllContinue(t,e,r,a)}async _queryAllContinue(t,e,n){const a=t.pop(),i=e.geometry.coordinates,o=[],s=[];for(let n=0;n<i.length;n++){const r=e.sampleInfo[n];r.demResolution>=0?r.source||(r.source=a):t.length&&(o.push(i[n]),s.push(n))}if(!t.length||0===o.length)return e;const r=e.geometry.clone(o),l=await this.query(t[t.length-1],r,n);return s.forEach(((t,n)=>{i[t].z=l.geometry.coordinates[n].z,e.sampleInfo[t].demResolution=l.sampleInfo[n].demResolution})),this._queryAllContinue(t,e,n)}async _createQueryResult(t,e){const n={geometry:(await t.geometry.project(t.outSpatialReference,e)).export(),noDataValue:t.options.noDataValue};return t.options.returnSampleInfo&&(n.sampleInfo=this._extractSampleInfo(t)),t.geometry.coordinates.forEach((t=>{t.tile=null,t.elevationTile=null})),n}async _createGeometryDescriptor(t,e,n){let a;const o=t.layer.tileInfo.spatialReference;if(e instanceof E?a=await e.project(o,n):(await(0,h.iQ)([{source:e.spatialReference,dest:o}],{signal:n}),a=(0,h.iV)(e,o)),!a)throw new i.Z("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${e.spatialReference.wkid}' on an elevation service in '${o.wkid}'`);t.geometry=E.fromGeometry(a)}async _selectTiles(t,e){const n=t.options.demResolution;if("geometry"===t.type&&this._preselectOutsideLayerExtent(t),"number"==typeof n)this._selectTilesClosestResolution(t);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(t,e);else{if("auto"!==n)throw new i.Z("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(t,e)}}_preselectOutsideLayerExtent(t){if((0,o.Wi)(t.layer.fullExtent))return;const e=new w(null);e.sample=()=>t.options.noDataValue,t.outsideExtentTile=e;const n=t.layer.fullExtent;t.geometry.coordinates.forEach((t=>{const a=t.x,i=t.y;(a<n.xmin||a>n.xmax||i<n.ymin||i>n.ymax)&&(t.elevationTile=e)}))}_selectTilesClosestResolution(t){const e=t.layer.tileInfo,n=this._findNearestDemResolutionLODIndex(e,t.options.demResolution);t.selectTilesAtLOD(n)}_findNearestDemResolutionLODIndex(t,e){const n=e/(0,r.c9)(t.spatialReference);let a=t.lods[0],i=0;for(let e=1;e<t.lods.length;e++){const o=t.lods[e];Math.abs(o.resolution-n)<Math.abs(a.resolution-n)&&(a=o,i=e)}return i}async _selectTilesFinestContiguous(t,e){const n=D(t.layer.tileInfo,t.options.minDemResolution);await this._selectTilesFinestContiguousAt(t,n,e)}async _selectTilesFinestContiguousAt(t,e,n){const a=t.layer;if(t.selectTilesAtLOD(e),e<0)return;const o=a.tilemapCache,r=t.getTilesToFetch();try{if(o)await(0,s.Hl)(Promise.all(r.map((t=>o.fetchAvailability(t.level,t.row,t.col,{signal:n})))),n);else if(await this._populateElevationTiles(t,n),!t.allElevationTilesFetched())throw t.clearElevationTiles(),new i.Z("elevation-query:has-unavailable-tiles")}catch(a){(0,s.r9)(a),await this._selectTilesFinestContiguousAt(t,e-1,n)}}async _populateElevationTiles(t,e){const n=t.getTilesToFetch(),a={},i=t.options.cache,r=t.options.noDataValue,l=n.map((async n=>{const s=`${t.layer.uid}:${n.id}:${r}`,l=(0,o.pC)(i)?i.get(s):null,c=(0,o.pC)(l)?l:await t.layer.fetchTile(n.level,n.row,n.col,{noDataValue:r,signal:e});(0,o.pC)(i)&&i.put(s,c),a[n.id]=new w(n,c)}));await(0,s.Hl)((0,s.as)(l),e),t.populateElevationTiles(a)}async _selectTilesAuto(t,e){this._selectTilesAutoFinest(t),this._reduceTilesForMaximumRequests(t);const n=t.layer.tilemapCache;if(!n)return this._selectTilesAutoPrefetchUpsample(t,e);const i=t.getTilesToFetch(),o={},r=i.map((async t=>{const i={id:null,level:0,row:0,col:0,extent:(0,f.Ue)()},r=await(0,a.q6)(n.fetchAvailabilityUpsample(t.level,t.row,t.col,i,{signal:e}));!1===r.ok?(0,s.r9)(r.error):o[t.id]=i}));await(0,s.Hl)(Promise.all(r),e),t.remapTiles(o)}_reduceTilesForMaximumRequests(t){const e=t.layer.tileInfo;let n=0;const a={},i=t=>{t.id in a?a[t.id]++:(a[t.id]=1,n++)},o=t=>{const e=a[t.id];1===e?(delete a[t.id],n--):a[t.id]=e-1};t.forEachTileToFetch(i,o);let s=!0;for(;s&&(s=!1,t.forEachTileToFetch((a=>{n<=t.options.maximumAutoTileRequests||(o(a),e.upsampleTile(a)&&(s=!0),i(a))}),o),s););}_selectTilesAutoFinest(t){const e=D(t.layer.tileInfo,t.options.minDemResolution);t.selectTilesAtLOD(e,t.options.maximumAutoTileRequests)}async _selectTilesAutoPrefetchUpsample(t,e){const n=t.layer.tileInfo;await this._populateElevationTiles(t,e);let a=!1;t.forEachTileToFetch(((t,e)=>{n.upsampleTile(t)?a=!0:e()})),a&&await this._selectTilesAutoPrefetchUpsample(t,e)}_sampleGeometryWithElevation(t){t.geometry.coordinates.forEach((e=>{const n=e.elevationTile;let a=t.options.noDataValue;if(n){const t=n.sample(e.x,e.y);(0,o.pC)(t)?a=t:e.elevationTile=null}e.z=a}))}_extractSampleInfo(t){const e=t.layer.tileInfo,n=(0,r.c9)(e.spatialReference);return t.geometry.coordinates.map((a=>{let i=-1;return a.elevationTile&&a.elevationTile!==t.outsideExtentTile&&(i=e.lodAt(a.elevationTile.tile.level).resolution*n),{demResolution:i}}))}}class E{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(t){const e=new E;return e.geometry=this.geometry,e.spatialReference=this.spatialReference,e.coordinates=t||this.coordinates.map((t=>this._cloneCoordinate(t))),e._exporter=this._exporter,e}async project(t,e){if(this.spatialReference.equals(t))return this.clone();await(0,h.iQ)([{source:this.spatialReference,dest:t}],{signal:e});const n=new l.Z({spatialReference:this.spatialReference,points:this.coordinates.map((t=>[t.x,t.y]))}),a=(0,h.iV)(n,t);if(!a)return null;const i=this.coordinates.map(((t,e)=>{const n=this._cloneCoordinate(t),i=a.points[e];return n.x=i[0],n.y=i[1],n})),o=this.clone(i);return o.spatialReference=t,o}_cloneCoordinate(t){return{x:t.x,y:t.y,z:t.z,m:t.m,tile:null,elevationTile:null}}static fromGeometry(t){const e=new E;if(e.geometry=t,e.spatialReference=t.spatialReference,t instanceof E)e.coordinates=t.coordinates.map((t=>e._cloneCoordinate(t))),e._exporter=(e,n)=>{const a=t.clone(e);return a.spatialReference=n,a};else switch(t.type){case"point":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?[{x:n.x,y:n.y,z:n.z,m:n.m}]:a?[{x:n.x,y:n.y,z:n.z}]:i?[{x:n.x,y:n.y,m:n.m}]:[{x:n.x,y:n.y}],e._exporter=(e,n)=>t.hasM?new c.Z(e[0].x,e[0].y,e[0].z,e[0].m,n):new c.Z(e[0].x,e[0].y,e[0].z,n);break}case"multipoint":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?n.points.map((t=>({x:t[0],y:t[1],z:t[2],m:t[3]}))):a?n.points.map((t=>({x:t[0],y:t[1],z:t[2]}))):i?n.points.map((t=>({x:t[0],y:t[1],m:t[2]}))):n.points.map((t=>({x:t[0],y:t[1]}))),e._exporter=(e,n)=>t.hasM?new l.Z({points:e.map((t=>[t.x,t.y,t.z,t.m])),hasZ:!0,hasM:!0,spatiaReference:n}):new l.Z(e.map((t=>[t.x,t.y,t.z])),n);break}case"polyline":{const n=t,a=[],i=[],{hasZ:o,hasM:s}=t;let r=0;for(const t of n.paths)if(i.push([r,r+t.length]),r+=t.length,o&&s)for(const e of t)a.push({x:e[0],y:e[1],z:e[2],m:e[3]});else if(o)for(const e of t)a.push({x:e[0],y:e[1],z:e[2]});else if(s)for(const e of t)a.push({x:e[0],y:e[1],m:e[2]});else for(const e of t)a.push({x:e[0],y:e[1]});e.coordinates=a,e._exporter=(e,n)=>{const a=t.hasM?e.map((t=>[t.x,t.y,t.z,t.m])):e.map((t=>[t.x,t.y,t.z])),o=i.map((t=>a.slice(t[0],t[1])));return new u.Z({paths:o,hasM:t.hasM,hasZ:!0,spatialReference:n})};break}}return e}}class q{constructor(t,e){this.layer=t,this.options=e}}class I extends q{constructor(t,e,n){super(t,n),this.outSpatialReference=e,this.type="geometry"}selectTilesAtLOD(t){if(t<0)this.geometry.coordinates.forEach((t=>t.tile=null));else{const e=this.layer.tileInfo,n=e.lods[t].level;this.geometry.coordinates.forEach((t=>{t.tile=e.tileAt(n,t.x,t.y)}))}}allElevationTilesFetched(){return!this.geometry.coordinates.some((t=>!t.elevationTile))}clearElevationTiles(){for(const t of this.geometry.coordinates)t.elevationTile!==this.outsideExtentTile&&(t.elevationTile=null)}populateElevationTiles(t){for(const e of this.geometry.coordinates)!e.elevationTile&&e.tile&&(e.elevationTile=t[e.tile.id])}remapTiles(t){for(const e of this.geometry.coordinates)e.tile=t[e.tile.id]}getTilesToFetch(){const t={},e=[];for(const n of this.geometry.coordinates){const a=n.tile;n.elevationTile||!n.tile||t[a.id]||(t[a.id]=a,e.push(a))}return e}forEachTileToFetch(t){for(const e of this.geometry.coordinates)e.tile&&!e.elevationTile&&t(e.tile,(()=>e.tile=null))}}class A extends q{constructor(t,e,n,a){super(t,n),this.type="extent",this.elevationTiles=[],this.candidateTiles=[],this.fetchedCandidates=new Set,this.extent=e.intersection(t.fullExtent),this.maskExtents=a}selectTilesAtLOD(t,e){const n=this._maximumLodForRequests(e),a=Math.min(n,t);a<0?this.candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(a)}_maximumLodForRequests(t){const e=this.layer.tileInfo;if(!t)return e.lods.length-1;const n=this.extent;if((0,o.Wi)(n))return-1;for(let a=e.lods.length-1;a>=0;a--){const i=e.lods[a],o=i.resolution*e.size[0],s=i.resolution*e.size[1];if(Math.ceil(n.width/o)*Math.ceil(n.height/s)<=t)return a}return-1}allElevationTilesFetched(){return this.candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this.fetchedCandidates.clear()}populateElevationTiles(t){for(const e of this.candidateTiles){const n=t[e.id];n&&(this.fetchedCandidates.add(e),this.elevationTiles.push(n))}}remapTiles(t){this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles.map((e=>t[e.id])))}getTilesToFetch(){return this.candidateTiles}forEachTileToFetch(t,e){const n=this.candidateTiles;this.candidateTiles=[],n.forEach((n=>{if(this.fetchedCandidates.has(n))return void(e&&e(n));let a=!1;t(n,(()=>a=!0)),a?e&&e(n):this.candidateTiles.push(n)})),this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles,e)}_uniqueNonOverlappingTiles(t,e){const n={},a=[];for(const i of t)n[i.id]?e&&e(i):(n[i.id]=i,a.push(i));const i=a.sort(((t,e)=>t.level-e.level));return i.filter(((t,n)=>{for(let a=0;a<n;a++)if((0,f.r3)(i[a].extent,t.extent))return e&&e(t),!1;return!0}))}_selectCandidateTilesCoveringExtentAt(t){this.candidateTiles.length=0;const e=this.extent;if((0,o.Wi)(e))return;const n=this.layer.tileInfo,a=n.lods[t],i=n.tileAt(a.level,e.xmin,e.ymin),s=a.resolution*n.size[0],r=a.resolution*n.size[1],l=Math.ceil((e.xmax-i.extent[0])/s),c=Math.ceil((e.ymax-i.extent[1])/r);for(let t=0;t<c;t++)for(let e=0;e<l;e++){const a={id:null,level:i.level,row:i.row-t,col:i.col+e};n.updateTileInfo(a),this._tileIsMasked(a)||this.candidateTiles.push(a)}}_tileIsMasked(t){return!!this.maskExtents&&this.maskExtents.some((e=>(0,f.r3)(e,t.extent)))}}function D(t,e){let n=t.lods.length-1;if(e>0){const a=t.lods.findIndex((t=>t.resolution<e));0===a?n=0:a>0&&(n=a-1)}return n}const z={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3505],{46851:(t,e,n)=>{n.d(e,{E:()=>a,R:()=>i});const a=1e-6,i=Math.random,o=Math.PI/180,s=180/Math.PI;Object.freeze({__proto__:null,EPSILON:a,RANDOM:i,toRadian:function(t){return t*o},toDegree:function(t){return t*s},equals:function(t,e){return Math.abs(t-e)<=a*Math.max(1,Math.abs(t),Math.abs(e))}})},52138:(t,e,n)=>{n.d(e,{a:()=>l,d:()=>d,e:()=>f,f:()=>m,h:()=>h,i:()=>s,j:()=>u,m:()=>c,p:()=>b,s:()=>o,t:()=>r,u:()=>p,v:()=>T,w:()=>g,y:()=>M});var a=n(65617),i=n(46851);function o(t,e,n,a,i,o,s,r,l,c,u,h,f,m,p,d,M){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t[4]=o,t[5]=s,t[6]=r,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=m,t[13]=p,t[14]=d,t[15]=M,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function r(t,e){if(t===e){const n=e[1],a=e[2],i=e[3],o=e[6],s=e[7],r=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=a,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=r}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15],x=n*r-a*s,v=n*l-i*s,g=n*c-o*s,T=a*l-i*r,b=a*c-o*r,w=i*c-o*l,R=u*d-h*p,_=u*M-f*p,E=u*y-m*p,q=h*M-f*d,I=h*y-m*d,A=f*y-m*M;let D=x*A-v*I+g*q+T*E-b*_+w*R;return D?(D=1/D,t[0]=(r*A-l*I+c*q)*D,t[1]=(i*I-a*A-o*q)*D,t[2]=(d*w-M*b+y*T)*D,t[3]=(f*b-h*w-m*T)*D,t[4]=(l*E-s*A-c*_)*D,t[5]=(n*A-i*E+o*_)*D,t[6]=(M*g-p*w-y*v)*D,t[7]=(u*w-f*g+m*v)*D,t[8]=(s*I-r*E+c*R)*D,t[9]=(a*E-n*I-o*R)*D,t[10]=(p*b-d*g+y*x)*D,t[11]=(h*g-u*b-m*x)*D,t[12]=(r*_-s*q-l*R)*D,t[13]=(n*q-a*_+i*R)*D,t[14]=(d*v-p*T-M*x)*D,t[15]=(u*T-h*v+f*x)*D,t):null}function c(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],m=e[10],p=e[11],d=e[12],M=e[13],y=e[14],x=e[15];let v=n[0],g=n[1],T=n[2],b=n[3];return t[0]=v*a+g*r+T*h+b*d,t[1]=v*i+g*l+T*f+b*M,t[2]=v*o+g*c+T*m+b*y,t[3]=v*s+g*u+T*p+b*x,v=n[4],g=n[5],T=n[6],b=n[7],t[4]=v*a+g*r+T*h+b*d,t[5]=v*i+g*l+T*f+b*M,t[6]=v*o+g*c+T*m+b*y,t[7]=v*s+g*u+T*p+b*x,v=n[8],g=n[9],T=n[10],b=n[11],t[8]=v*a+g*r+T*h+b*d,t[9]=v*i+g*l+T*f+b*M,t[10]=v*o+g*c+T*m+b*y,t[11]=v*s+g*u+T*p+b*x,v=n[12],g=n[13],T=n[14],b=n[15],t[12]=v*a+g*r+T*h+b*d,t[13]=v*i+g*l+T*f+b*M,t[14]=v*o+g*c+T*m+b*y,t[15]=v*s+g*u+T*p+b*x,t}function u(t,e,n){const a=n[0],i=n[1],o=n[2];let s,r,l,c,u,h,f,m,p,d,M,y;return e===t?(t[12]=e[0]*a+e[4]*i+e[8]*o+e[12],t[13]=e[1]*a+e[5]*i+e[9]*o+e[13],t[14]=e[2]*a+e[6]*i+e[10]*o+e[14],t[15]=e[3]*a+e[7]*i+e[11]*o+e[15]):(s=e[0],r=e[1],l=e[2],c=e[3],u=e[4],h=e[5],f=e[6],m=e[7],p=e[8],d=e[9],M=e[10],y=e[11],t[0]=s,t[1]=r,t[2]=l,t[3]=c,t[4]=u,t[5]=h,t[6]=f,t[7]=m,t[8]=p,t[9]=d,t[10]=M,t[11]=y,t[12]=s*a+u*i+p*o+e[12],t[13]=r*a+h*i+d*o+e[13],t[14]=l*a+f*i+M*o+e[14],t[15]=c*a+m*i+y*o+e[15]),t}function h(t,e,n){const a=n[0],i=n[1],o=n[2];return t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,n,a){let o,s,r,l,c,u,h,f,m,p,d,M,y,x,v,g,T,b,w,R,_,E,q,I,A=a[0],D=a[1],z=a[2],C=Math.sqrt(A*A+D*D+z*z);return C<i.E?null:(C=1/C,A*=C,D*=C,z*=C,o=Math.sin(n),s=Math.cos(n),r=1-s,l=e[0],c=e[1],u=e[2],h=e[3],f=e[4],m=e[5],p=e[6],d=e[7],M=e[8],y=e[9],x=e[10],v=e[11],g=A*A*r+s,T=D*A*r+z*o,b=z*A*r-D*o,w=A*D*r-z*o,R=D*D*r+s,_=z*D*r+A*o,E=A*z*r+D*o,q=D*z*r-A*o,I=z*z*r+s,t[0]=l*g+f*T+M*b,t[1]=c*g+m*T+y*b,t[2]=u*g+p*T+x*b,t[3]=h*g+d*T+v*b,t[4]=l*w+f*R+M*_,t[5]=c*w+m*R+y*_,t[6]=u*w+p*R+x*_,t[7]=h*w+d*R+v*_,t[8]=l*E+f*q+M*I,t[9]=c*E+m*q+y*I,t[10]=u*E+p*q+x*I,t[11]=h*E+d*q+v*I,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function m(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,e,n){let a,o,s,r=n[0],l=n[1],c=n[2],u=Math.sqrt(r*r+l*l+c*c);return u<i.E?null:(u=1/u,r*=u,l*=u,c*=u,a=Math.sin(e),o=Math.cos(e),s=1-o,t[0]=r*r*s+o,t[1]=l*r*s+c*a,t[2]=c*r*s-l*a,t[3]=0,t[4]=r*l*s-c*a,t[5]=l*l*s+o,t[6]=c*l*s+r*a,t[7]=0,t[8]=r*c*s+l*a,t[9]=l*c*s-r*a,t[10]=c*c*s+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=a+a,l=i+i,c=o+o,u=a*r,h=a*l,f=a*c,m=i*l,p=i*c,d=o*c,M=s*r,y=s*l,x=s*c;return t[0]=1-(m+d),t[1]=h+x,t[2]=f-y,t[3]=0,t[4]=h-x,t[5]=1-(u+d),t[6]=p+M,t[7]=0,t[8]=f+y,t[9]=p-M,t[10]=1-(u+m),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,a.c)();function v(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function g(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function T(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=t[3],r=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],m=t[10],p=t[11],d=t[12],M=t[13],y=t[14],x=t[15],v=e[0],g=e[1],T=e[2],b=e[3],w=e[4],R=e[5],_=e[6],E=e[7],q=e[8],I=e[9],A=e[10],D=e[11],z=e[12],C=e[13],Z=e[14],S=e[15];return Math.abs(n-v)<=i.E*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-g)<=i.E*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(o-T)<=i.E*Math.max(1,Math.abs(o),Math.abs(T))&&Math.abs(s-b)<=i.E*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(r-w)<=i.E*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(l-R)<=i.E*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(c-_)<=i.E*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-E)<=i.E*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(h-q)<=i.E*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-I)<=i.E*Math.max(1,Math.abs(f),Math.abs(I))&&Math.abs(m-A)<=i.E*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(p-D)<=i.E*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(d-z)<=i.E*Math.max(1,Math.abs(d),Math.abs(z))&&Math.abs(M-C)<=i.E*Math.max(1,Math.abs(M),Math.abs(C))&&Math.abs(y-Z)<=i.E*Math.max(1,Math.abs(y),Math.abs(Z))&&Math.abs(x-S)<=i.E*Math.max(1,Math.abs(x),Math.abs(S))}function b(t){const e=i.E,n=t[0],a=t[1],o=t[2],s=t[4],r=t[5],l=t[6],c=t[8],u=t[9],h=t[10];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(a*a+r*r+u*u))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e}const w=c,R=v;Object.freeze({__proto__:null,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:o,identity:s,transpose:r,invert:l,adjoint:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15];return t[0]=r*(f*y-m*M)-h*(l*y-c*M)+d*(l*m-c*f),t[1]=-(a*(f*y-m*M)-h*(i*y-o*M)+d*(i*m-o*f)),t[2]=a*(l*y-c*M)-r*(i*y-o*M)+d*(i*c-o*l),t[3]=-(a*(l*m-c*f)-r*(i*m-o*f)+h*(i*c-o*l)),t[4]=-(s*(f*y-m*M)-u*(l*y-c*M)+p*(l*m-c*f)),t[5]=n*(f*y-m*M)-u*(i*y-o*M)+p*(i*m-o*f),t[6]=-(n*(l*y-c*M)-s*(i*y-o*M)+p*(i*c-o*l)),t[7]=n*(l*m-c*f)-s*(i*m-o*f)+u*(i*c-o*l),t[8]=s*(h*y-m*d)-u*(r*y-c*d)+p*(r*m-c*h),t[9]=-(n*(h*y-m*d)-u*(a*y-o*d)+p*(a*m-o*h)),t[10]=n*(r*y-c*d)-s*(a*y-o*d)+p*(a*c-o*r),t[11]=-(n*(r*m-c*h)-s*(a*m-o*h)+u*(a*c-o*r)),t[12]=-(s*(h*M-f*d)-u*(r*M-l*d)+p*(r*f-l*h)),t[13]=n*(h*M-f*d)-u*(a*M-i*d)+p*(a*f-i*h),t[14]=-(n*(r*M-l*d)-s*(a*M-i*d)+p*(a*l-i*r)),t[15]=n*(r*f-l*h)-s*(a*f-i*h)+u*(a*l-i*r),t},determinant:function(t){const e=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],r=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],m=t[12],p=t[13],d=t[14],M=t[15];return(e*s-n*o)*(h*M-f*d)-(e*r-a*o)*(u*M-f*p)+(e*l-i*o)*(u*d-h*p)+(n*r-a*s)*(c*M-f*m)-(n*l-i*s)*(c*d-h*m)+(a*l-i*r)*(c*p-u*m)},multiply:c,translate:u,scale:h,rotate:f,rotateX:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[4],s=e[5],r=e[6],l=e[7],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*a,t[5]=s*i+u*a,t[6]=r*i+h*a,t[7]=l*i+f*a,t[8]=c*i-o*a,t[9]=u*i-s*a,t[10]=h*i-r*a,t[11]=f*i-l*a,t},rotateY:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*a,t[1]=s*i-u*a,t[2]=r*i-h*a,t[3]=l*i-f*a,t[8]=o*a+c*i,t[9]=s*a+u*i,t[10]=r*a+h*i,t[11]=l*a+f*i,t},rotateZ:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*a,t[1]=s*i+u*a,t[2]=r*i+h*a,t[3]=l*i+f*a,t[4]=c*i-o*a,t[5]=u*i-s*a,t[6]=h*i-r*a,t[7]=f*i-l*a,t},fromTranslation:m,fromScaling:p,fromRotation:d,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:y,fromQuat2:function(t,e){const n=x,a=-e[0],i=-e[1],o=-e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=a*a+i*i+o*o+s*s;return h>0?(n[0]=2*(r*s+u*a+l*o-c*i)/h,n[1]=2*(l*s+u*i+c*a-r*o)/h,n[2]=2*(c*s+u*o+r*i-l*a)/h):(n[0]=2*(r*s+u*a+l*o-c*i),n[1]=2*(l*s+u*i+c*a-r*o),n[2]=2*(c*s+u*o+r*i-l*a)),y(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[4],s=e[5],r=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.sqrt(n*n+a*a+i*i),t[1]=Math.sqrt(o*o+s*s+r*r),t[2]=Math.sqrt(l*l+c*c+u*u),t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let a=0;return n>0?(a=2*Math.sqrt(n+1),t[3]=.25*a,t[0]=(e[6]-e[9])/a,t[1]=(e[8]-e[2])/a,t[2]=(e[1]-e[4])/a):e[0]>e[5]&&e[0]>e[10]?(a=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/a,t[0]=.25*a,t[1]=(e[1]+e[4])/a,t[2]=(e[8]+e[2])/a):e[5]>e[10]?(a=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/a,t[0]=(e[1]+e[4])/a,t[1]=.25*a,t[2]=(e[6]+e[9])/a):(a=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/a,t[0]=(e[8]+e[2])/a,t[1]=(e[6]+e[9])/a,t[2]=.25*a),t},fromRotationTranslationScale:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3],l=i+i,c=o+o,u=s+s,h=i*l,f=i*c,m=i*u,p=o*c,d=o*u,M=s*u,y=r*l,x=r*c,v=r*u,g=a[0],T=a[1],b=a[2];return t[0]=(1-(p+M))*g,t[1]=(f+v)*g,t[2]=(m-x)*g,t[3]=0,t[4]=(f-v)*T,t[5]=(1-(h+M))*T,t[6]=(d+y)*T,t[7]=0,t[8]=(m+x)*b,t[9]=(d-y)*b,t[10]=(1-(h+p))*b,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,n,a,i){const o=e[0],s=e[1],r=e[2],l=e[3],c=o+o,u=s+s,h=r+r,f=o*c,m=o*u,p=o*h,d=s*u,M=s*h,y=r*h,x=l*c,v=l*u,g=l*h,T=a[0],b=a[1],w=a[2],R=i[0],_=i[1],E=i[2],q=(1-(d+y))*T,I=(m+g)*T,A=(p-v)*T,D=(m-g)*b,z=(1-(f+y))*b,C=(M+x)*b,Z=(p+v)*w,S=(M-x)*w,F=(1-(f+d))*w;return t[0]=q,t[1]=I,t[2]=A,t[3]=0,t[4]=D,t[5]=z,t[6]=C,t[7]=0,t[8]=Z,t[9]=S,t[10]=F,t[11]=0,t[12]=n[0]+R-(q*R+D*_+Z*E),t[13]=n[1]+_-(I*R+z*_+S*E),t[14]=n[2]+E-(A*R+C*_+F*E),t[15]=1,t},fromQuat:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=n+n,r=a+a,l=i+i,c=n*s,u=a*s,h=a*r,f=i*s,m=i*r,p=i*l,d=o*s,M=o*r,y=o*l;return t[0]=1-h-p,t[1]=u+y,t[2]=f-M,t[3]=0,t[4]=u-y,t[5]=1-c-p,t[6]=m+d,t[7]=0,t[8]=f+M,t[9]=m-d,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,a,i,o,s){const r=1/(n-e),l=1/(i-a),c=1/(o-s);return t[0]=2*o*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*r,t[9]=(i+a)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t},perspective:function(t,e,n,a,i){const o=1/Math.tan(e/2);let s;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(s=1/(a-i),t[10]=(i+a)*s,t[14]=2*i*a*s):(t[10]=-1,t[14]=-2*a),t},perspectiveFromFieldOfView:function(t,e,n,a){const i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),r=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+r),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-r)*l*.5,t[9]=(i-o)*c*.5,t[10]=a/(n-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*n/(n-a),t[15]=0,t},ortho:function(t,e,n,a,i,o,s){const r=1/(e-n),l=1/(a-i),c=1/(o-s);return t[0]=-2*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*r,t[13]=(i+a)*l,t[14]=(s+o)*c,t[15]=1,t},lookAt:function(t,e,n,a){let o,r,l,c,u,h,f,m,p,d;const M=e[0],y=e[1],x=e[2],v=a[0],g=a[1],T=a[2],b=n[0],w=n[1],R=n[2];return Math.abs(M-b)<i.E&&Math.abs(y-w)<i.E&&Math.abs(x-R)<i.E?s(t):(f=M-b,m=y-w,p=x-R,d=1/Math.sqrt(f*f+m*m+p*p),f*=d,m*=d,p*=d,o=g*p-T*m,r=T*f-v*p,l=v*m-g*f,d=Math.sqrt(o*o+r*r+l*l),d?(d=1/d,o*=d,r*=d,l*=d):(o=0,r=0,l=0),c=m*l-p*r,u=p*o-f*l,h=f*r-m*o,d=Math.sqrt(c*c+u*u+h*h),d?(d=1/d,c*=d,u*=d,h*=d):(c=0,u=0,h=0),t[0]=o,t[1]=c,t[2]=f,t[3]=0,t[4]=r,t[5]=u,t[6]=m,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=-(o*M+r*y+l*x),t[13]=-(c*M+u*y+h*x),t[14]=-(f*M+m*y+p*x),t[15]=1,t)},targetTo:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=a[0],l=a[1],c=a[2];let u=i-n[0],h=o-n[1],f=s-n[2],m=u*u+h*h+f*f;m>0&&(m=1/Math.sqrt(m),u*=m,h*=m,f*=m);let p=l*f-c*h,d=c*u-r*f,M=r*h-l*u;return m=p*p+d*d+M*M,m>0&&(m=1/Math.sqrt(m),p*=m,d*=m,M*=m),t[0]=p,t[1]=d,t[2]=M,t[3]=0,t[4]=h*M-f*d,t[5]=f*p-u*M,t[6]=u*d-h*p,t[7]=0,t[8]=u,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=s,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:v,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t[4]=e[4]+n[4]*a,t[5]=e[5]+n[5]*a,t[6]=e[6]+n[6]*a,t[7]=e[7]+n[7]*a,t[8]=e[8]+n[8]*a,t[9]=e[9]+n[9]*a,t[10]=e[10]+n[10]*a,t[11]=e[11]+n[11]*a,t[12]=e[12]+n[12]*a,t[13]=e[13]+n[13]*a,t[14]=e[14]+n[14]*a,t[15]=e[15]+n[15]*a,t},exactEquals:g,equals:T,isOrthoNormal:b,mul:w,sub:R})},17896:(t,e,n)=>{n.d(e,{E:()=>h,a:()=>f,b:()=>l,c:()=>x,d:()=>y,e:()=>v,f:()=>c,g:()=>s,h:()=>p,i:()=>m,k:()=>_,l:()=>o,m:()=>g,n:()=>M,p:()=>d,q:()=>b,r:()=>E,s:()=>r,t:()=>T,u:()=>C});var a=n(65617),i=n(46851);function o(t){const e=t[0],n=t[1],a=t[2];return Math.sqrt(e*e+n*n+a*a)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r(t,e,n,a){return t[0]=e,t[1]=n,t[2]=a,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function m(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+a*a+i*i)}function p(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return n*n+a*a+i*i}function d(t){const e=t[0],n=t[1],a=t[2];return e*e+n*n+a*a}function M(t,e){const n=e[0],a=e[1],i=e[2];let o=n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function y(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2];return t[0]=i*l-o*r,t[1]=o*s-a*l,t[2]=a*r-i*s,t}function v(t,e,n,a){const i=e[0],o=e[1],s=e[2];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t}function g(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12],t[1]=n[1]*a+n[5]*i+n[9]*o+n[13],t[2]=n[2]*a+n[6]*i+n[10]*o+n[14],t}function T(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=a*n[0]+i*n[3]+o*n[6],t[1]=a*n[1]+i*n[4]+o*n[7],t[2]=a*n[2]+i*n[5]+o*n[8],t}function b(t,e,n){const a=n[0],i=n[1],o=n[2],s=n[3],r=e[0],l=e[1],c=e[2];let u=i*c-o*l,h=o*r-a*c,f=a*l-i*r,m=i*f-o*h,p=o*u-a*f,d=a*h-i*u;const M=2*s;return u*=M,h*=M,f*=M,m*=2,p*=2,d*=2,t[0]=r+u+m,t[1]=l+h+p,t[2]=c+f+d,t}const w=(0,a.c)(),R=(0,a.c)();function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e,n){const a=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2];let s=a*a+i*i+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=a*s,t[1]=i*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const q=c,I=u,A=h,D=m,z=p,C=o,Z=d;Object.freeze({__proto__:null,length:o,copy:s,set:r,add:l,subtract:c,multiply:u,divide:h,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:f,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t},distance:m,squaredDistance:p,squaredLength:d,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},normalize:M,dot:y,cross:x,lerp:v,hermite:function(t,e,n,a,i,o){const s=o*o,r=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return t[0]=e[0]*r+n[0]*l+a[0]*c+i[0]*u,t[1]=e[1]*r+n[1]*l+a[1]*c+i[1]*u,t[2]=e[2]*r+n[2]*l+a[2]*c+i[2]*u,t},bezier:function(t,e,n,a,i,o){const s=1-o,r=s*s,l=o*o,c=r*s,u=3*o*r,h=3*l*s,f=l*o;return t[0]=e[0]*c+n[0]*u+a[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*u+a[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*u+a[2]*h+i[2]*f,t},random:function(t,e){e=e||1;const n=2*(0,i.R)()*Math.PI,a=2*(0,i.R)()-1,o=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=a*e,t},transformMat4:g,transformMat3:T,transformQuat:b,rotateX:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(a)-i[2]*Math.sin(a),o[2]=i[1]*Math.sin(a)+i[2]*Math.cos(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(a)+i[0]*Math.cos(a),o[1]=i[1],o[2]=i[2]*Math.cos(a)-i[0]*Math.sin(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(a)-i[1]*Math.sin(a),o[1]=i[0]*Math.sin(a)+i[1]*Math.cos(a),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},angle:function(t,e){s(w,t),s(R,e),M(w,w),M(R,R);const n=y(w,R);return n>1?0:n<-1?Math.PI:Math.acos(n)},str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:_,equals:function(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=e[0],r=e[1],l=e[2];return Math.abs(n-s)<=i.E*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-r)<=i.E*Math.max(1,Math.abs(a),Math.abs(r))&&Math.abs(o-l)<=i.E*Math.max(1,Math.abs(o),Math.abs(l))},direction:E,sub:q,mul:I,div:A,dist:D,sqrDist:z,len:C,sqrLen:Z})},65617:(t,e,n)=>{function a(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function s(t){const e=[0,0,0],n=Math.min(3,t.length);for(let a=0;a<n;++a)e[a]=t[a];return e}function r(t,e){return new Float64Array(t,e,3)}function l(){return o(1,1,1)}function c(){return o(1,0,0)}function u(){return o(0,1,0)}function h(){return o(0,0,1)}n.d(e,{O:()=>m,Z:()=>f,a:()=>i,b:()=>r,c:()=>a,d:()=>s,f:()=>o});const f=[0,0,0],m=l(),p=c(),d=u(),M=h();Object.freeze({__proto__:null,create:a,clone:i,fromValues:o,fromArray:s,createView:r,zeros:function(){return[0,0,0]},ones:l,unitX:c,unitY:u,unitZ:h,ZEROS:f,ONES:m,UNIT_X:p,UNIT_Y:d,UNIT_Z:M})},98766:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>u,c:()=>i,d:()=>M,e:()=>m,f:()=>p,g:()=>x,h:()=>v,l:()=>y,n:()=>d,s:()=>o});var a=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(t,e,n,a,i){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+a*a+i*i+o*o)}function f(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+a*a+i*i+o*o}function m(t){const e=t[0],n=t[1],a=t[2],i=t[3];return Math.sqrt(e*e+n*n+a*a+i*i)}function p(t){const e=t[0],n=t[1],a=t[2],i=t[3];return e*e+n*n+a*a+i*i}function d(t,e){const n=e[0],a=e[1],i=e[2],o=e[3];let s=n*n+a*a+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),t[0]=n*s,t[1]=a*s,t[2]=i*s,t[3]=o*s),t}function M(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function y(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t[3]=r+a*(n[3]-r),t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function v(t,e){const n=t[0],i=t[1],o=t[2],s=t[3],r=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-r)<=a.E*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-l)<=a.E*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=a.E*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=a.E*Math.max(1,Math.abs(s),Math.abs(u))}const g=r,T=l,b=c,w=h,R=f,_=m,E=p;Object.freeze({__proto__:null,copy:i,set:o,add:s,subtract:r,multiply:l,divide:c,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:u,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t},distance:h,squaredDistance:f,length:m,squaredLength:p,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},normalize:d,dot:M,lerp:y,random:function(t,e){let n,i,o,s,r,l;e=e||1;do{n=2*(0,a.R)()-1,i=2*(0,a.R)()-1,r=n*n+i*i}while(r>=1);do{o=2*(0,a.R)()-1,s=2*(0,a.R)()-1,l=o*o+s*s}while(l>=1);const c=Math.sqrt((1-r)/l);return t[0]=e*n,t[1]=e*i,t[2]=e*o*c,t[3]=e*s*c,t},transformMat4:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*a+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*a+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*a+n[7]*i+n[11]*o+n[15]*s,t},transformQuat:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2],c=n[3],u=c*a+r*o-l*i,h=c*i+l*a-s*o,f=c*o+s*i-r*a,m=-s*a-r*i-l*o;return t[0]=u*c+m*-s+h*-l-f*-r,t[1]=h*c+m*-r+f*-s-u*-l,t[2]=f*c+m*-l+u*-r-h*-s,t[3]=e[3],t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:x,equals:v,sub:g,mul:T,div:b,dist:w,sqrDist:R,len:_,sqrLen:E})},22021:(t,e,n)=>{n.d(e,{ZF:()=>f,Kt:()=>m,jE:()=>M,uZ:()=>s,oK:()=>p,Vl:()=>u,wt:()=>r,t7:()=>c,Sf:()=>o,fp:()=>l,BV:()=>h});var a=n(17896);n(98766);const i=new Float32Array(1);function o(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function s(t,e,n){return Math.min(Math.max(t,e),n)}function r(t){return 0==(t&t-1)}function l(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}function c(t,e,n){return t+(e-t)*n}function u(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function f(t){return Math.acos(s(t,-1,1))}function m(t){return Math.asin(s(t,-1,1))}function p(t){return d(Math.max(-y,Math.min(t,y)))}function d(t){return i[0]=t,i[0]}function M(t,e){const n=(0,a.l)(t),i=m(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,a.s)(e,n,i,o),e}const y=d(34028234663852886e22)},69285:(t,e,n)=>{n.d(e,{k:()=>s});var a=n(70586),i=n(67900),o=n(8744);function s(t,e,n){if((0,a.Wi)(e)||(0,a.Wi)(n)||n.vcsWkid||(0,o.fS)(e,n))return null;const s=(0,i._R)(e)/(0,i._R)(n);if(1===s)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){t&&null!=t.z&&(t.z*=e)}(t,s);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t)for(const n of t.paths)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t)for(const n of t.rings)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const n of t.points)n.length>2&&(n[2]*=e)}(t,s);case"extent":case"esriGeometryExtent":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,s);default:return null}}},33127:(t,e,n)=>{n.r(e),n.d(e,{ElevationQuery:()=>_,GeometryDescriptor:()=>E,default:()=>_,getFinestLodIndex:()=>D});var a=n(66643),i=n(20102),o=n(70586),s=n(95330),r=n(67900),l=n(65091),c=n(13473),u=n(58901),h=n(44547),f=n(24470),m=(n(66577),n(80442),n(92604)),p=n(54102),d=n(40488);const M=m.Z.getLogger("esri.layers.support.ElevationSampler");class y{queryElevation(t){return function(t,e){const n=g(t,e.spatialReference);if(!n)return null;switch(t.type){case"point":!function(t,e,n){t.z=(0,o.Pt)(n.elevationAt(e),0)}(t,n,e);break;case"polyline":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.paths.length;i++){const s=t.paths[i],r=e.paths[i];for(let t=0;t<s.length;t++){const e=s[t],i=r[t];T.x=i[0],T.y=i[1],a&&(e[3]=e[2]),e[2]=(0,o.Pt)(n.elevationAt(T),0)}}t.hasZ=!0}(t,n,e);break;case"multipoint":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.points.length;i++){const s=t.points[i],r=e.points[i];T.x=r[0],T.y=r[1],a&&(s[3]=s[2]),s[2]=(0,o.Pt)(n.elevationAt(T),0)}t.hasZ=!0}(t,n,e)}return t}(t.clone(),this)}on(){return b}projectIfRequired(t,e){return g(t,e)}}class x extends y{constructor(t,e,n){super(),this.tile=t,this.noDataValue=n,this.extent=(0,f.HH)(t.tile.extent,e.spatialReference);const a=(0,r.c9)(e.spatialReference),i=e.lodAt(t.tile.level).resolution*a;this.demResolution={min:i,max:i}}get spatialReference(){return this.extent.spatialReference}contains(t){const e=this.projectIfRequired(t,this.spatialReference);return(0,p.aV)(this.extent,e)}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if((0,o.Wi)(e))return null;if(!this.contains(t)){const e=this.extent,n=`${e.xmin}, ${e.ymin}, ${e.xmax}, ${e.ymax}`;return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler extent (${n})`),this.noDataValue}return this.tile.sample(e.x,e.y)}}class v extends y{constructor(t,e,n){let a;super(),"number"==typeof e?(this.noDataValue=e,a=null):(a=e,this.noDataValue=n),this.samplers=a?t.map((t=>new x(t,a,this.noDataValue))):t;const i=this.samplers[0];if(i){this.extent=i.extent.clone();const{min:t,max:e}=i.demResolution;this.demResolution={min:t,max:e};for(let t=1;t<this.samplers.length;t++){const e=this.samplers[t];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=(0,f.HH)((0,f.Ue)(),a.spatialReference),this.demResolution={min:0,max:0}}get spatialReference(){return this.extent.spatialReference}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;for(const t of this.samplers)if(t.contains(e))return t.elevationAt(e);return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler`),this.noDataValue}}function g(t,e){if((0,o.Wi)(t))return null;const n=t.spatialReference;if(n.equals(e))return t;const a=(0,d.iV)(t,e);return a||M.error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),a}const T=new c.Z,b={remove(){}};class w{constructor(t,e=null){if(this.tile=t,(0,o.pC)(e)){const n=t.extent;this.samplerData={pixelData:e.values,width:e.width,height:e.height,safeWidth:.99999999*(e.width-1),noDataValue:e.noDataValue,dx:(e.width-1)/(n[2]-n[0]),dy:(e.width-1)/(n[3]-n[1]),x0:n[0],y1:n[3]}}}sample(t,e){if((0,o.Wi)(this.samplerData))return;const{safeWidth:n,width:a,pixelData:i,noDataValue:s,dx:r,dy:l,y1:c,x0:u}=this.samplerData,h=R(l*(c-e),0,n),f=R(r*(t-u),0,n),m=Math.floor(h),p=Math.floor(f),d=m*a+p,M=d+a,y=i[d],x=i[M],v=i[d+1],g=i[M+1];if(y!==s&&x!==s&&v!==s&&g!==s){const t=f-p,e=y+(v-y)*t;return e+(x+(g-x)*t-e)*(h-m)}}}function R(t,e,n){return t<e?e:t>n?n:t}class _{async queryAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const a=E.fromGeometry(e);let o=!1;n&&n.returnSampleInfo||(o=!0);const s={...z,...n,returnSampleInfo:!0},r=await this.query(t[t.length-1],a,s),l=await this._queryAllContinue(t,r,s);return l.geometry=l.geometry.export(),o&&delete l.sampleInfo,l}async query(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||!(e instanceof E)&&"point"!==e.type&&"multipoint"!==e.type&&"polyline"!==e.type)throw new i.Z("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const a={...z,...n},o=new I(t,e.spatialReference,a),s=a.signal;return await t.load({signal:s}),await this._createGeometryDescriptor(o,e,s),await this._selectTiles(o,s),await this._populateElevationTiles(o,s),this._sampleGeometryWithElevation(o),this._createQueryResult(o,s)}async createSampler(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n};return this._createSampler(t,e,a)}async createSamplerAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n,returnSampleInfo:!0},o=await this._createSampler(t[t.length-1],e,a);return this._createSamplerAllContinue(t,e,o,a)}async _createSampler(t,e,n,a){const i=n.signal;await t.load({signal:i});const o=e.spatialReference,s=t.tileInfo.spatialReference;o.equals(s)||(await(0,h.iQ)([{source:o,dest:s}],{signal:i}),e=(0,h.iV)(e,s));const r=new A(t,e,n,a);return await this._selectTiles(r,i),await this._populateElevationTiles(r,i),new v(r.elevationTiles,r.layer.tileInfo,r.options.noDataValue)}async _createSamplerAllContinue(t,e,n,a){if(t.pop(),!t.length)return n;const i=n.samplers.map((t=>(0,f.oJ)(t.extent))),o=await this._createSampler(t[t.length-1],e,a,i);if(0===o.samplers.length)return n;const s=n.samplers.concat(o.samplers),r=new v(s,a.noDataValue);return this._createSamplerAllContinue(t,e,r,a)}async _queryAllContinue(t,e,n){const a=t.pop(),i=e.geometry.coordinates,o=[],s=[];for(let n=0;n<i.length;n++){const r=e.sampleInfo[n];r.demResolution>=0?r.source||(r.source=a):t.length&&(o.push(i[n]),s.push(n))}if(!t.length||0===o.length)return e;const r=e.geometry.clone(o),l=await this.query(t[t.length-1],r,n);return s.forEach(((t,n)=>{i[t].z=l.geometry.coordinates[n].z,e.sampleInfo[t].demResolution=l.sampleInfo[n].demResolution})),this._queryAllContinue(t,e,n)}async _createQueryResult(t,e){const n={geometry:(await t.geometry.project(t.outSpatialReference,e)).export(),noDataValue:t.options.noDataValue};return t.options.returnSampleInfo&&(n.sampleInfo=this._extractSampleInfo(t)),t.geometry.coordinates.forEach((t=>{t.tile=null,t.elevationTile=null})),n}async _createGeometryDescriptor(t,e,n){let a;const o=t.layer.tileInfo.spatialReference;if(e instanceof E?a=await e.project(o,n):(await(0,h.iQ)([{source:e.spatialReference,dest:o}],{signal:n}),a=(0,h.iV)(e,o)),!a)throw new i.Z("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${e.spatialReference.wkid}' on an elevation service in '${o.wkid}'`);t.geometry=E.fromGeometry(a)}async _selectTiles(t,e){const n=t.options.demResolution;if("geometry"===t.type&&this._preselectOutsideLayerExtent(t),"number"==typeof n)this._selectTilesClosestResolution(t);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(t,e);else{if("auto"!==n)throw new i.Z("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(t,e)}}_preselectOutsideLayerExtent(t){if((0,o.Wi)(t.layer.fullExtent))return;const e=new w(null);e.sample=()=>t.options.noDataValue,t.outsideExtentTile=e;const n=t.layer.fullExtent;t.geometry.coordinates.forEach((t=>{const a=t.x,i=t.y;(a<n.xmin||a>n.xmax||i<n.ymin||i>n.ymax)&&(t.elevationTile=e)}))}_selectTilesClosestResolution(t){const e=t.layer.tileInfo,n=this._findNearestDemResolutionLODIndex(e,t.options.demResolution);t.selectTilesAtLOD(n)}_findNearestDemResolutionLODIndex(t,e){const n=e/(0,r.c9)(t.spatialReference);let a=t.lods[0],i=0;for(let e=1;e<t.lods.length;e++){const o=t.lods[e];Math.abs(o.resolution-n)<Math.abs(a.resolution-n)&&(a=o,i=e)}return i}async _selectTilesFinestContiguous(t,e){const n=D(t.layer.tileInfo,t.options.minDemResolution);await this._selectTilesFinestContiguousAt(t,n,e)}async _selectTilesFinestContiguousAt(t,e,n){const a=t.layer;if(t.selectTilesAtLOD(e),e<0)return;const o=a.tilemapCache,r=t.getTilesToFetch();try{if(o)await(0,s.Hl)(Promise.all(r.map((t=>o.fetchAvailability(t.level,t.row,t.col,{signal:n})))),n);else if(await this._populateElevationTiles(t,n),!t.allElevationTilesFetched())throw t.clearElevationTiles(),new i.Z("elevation-query:has-unavailable-tiles")}catch(a){(0,s.r9)(a),await this._selectTilesFinestContiguousAt(t,e-1,n)}}async _populateElevationTiles(t,e){const n=t.getTilesToFetch(),a={},i=t.options.cache,r=t.options.noDataValue,l=n.map((async n=>{const s=`${t.layer.uid}:${n.id}:${r}`,l=(0,o.pC)(i)?i.get(s):null,c=(0,o.pC)(l)?l:await t.layer.fetchTile(n.level,n.row,n.col,{noDataValue:r,signal:e});(0,o.pC)(i)&&i.put(s,c),a[n.id]=new w(n,c)}));await(0,s.Hl)((0,s.as)(l),e),t.populateElevationTiles(a)}async _selectTilesAuto(t,e){this._selectTilesAutoFinest(t),this._reduceTilesForMaximumRequests(t);const n=t.layer.tilemapCache;if(!n)return this._selectTilesAutoPrefetchUpsample(t,e);const i=t.getTilesToFetch(),o={},r=i.map((async t=>{const i={id:null,level:0,row:0,col:0,extent:(0,f.Ue)()},r=await(0,a.q6)(n.fetchAvailabilityUpsample(t.level,t.row,t.col,i,{signal:e}));!1===r.ok?(0,s.r9)(r.error):o[t.id]=i}));await(0,s.Hl)(Promise.all(r),e),t.remapTiles(o)}_reduceTilesForMaximumRequests(t){const e=t.layer.tileInfo;let n=0;const a={},i=t=>{t.id in a?a[t.id]++:(a[t.id]=1,n++)},o=t=>{const e=a[t.id];1===e?(delete a[t.id],n--):a[t.id]=e-1};t.forEachTileToFetch(i,o);let s=!0;for(;s&&(s=!1,t.forEachTileToFetch((a=>{n<=t.options.maximumAutoTileRequests||(o(a),e.upsampleTile(a)&&(s=!0),i(a))}),o),s););}_selectTilesAutoFinest(t){const e=D(t.layer.tileInfo,t.options.minDemResolution);t.selectTilesAtLOD(e,t.options.maximumAutoTileRequests)}async _selectTilesAutoPrefetchUpsample(t,e){const n=t.layer.tileInfo;await this._populateElevationTiles(t,e);let a=!1;t.forEachTileToFetch(((t,e)=>{n.upsampleTile(t)?a=!0:e()})),a&&await this._selectTilesAutoPrefetchUpsample(t,e)}_sampleGeometryWithElevation(t){t.geometry.coordinates.forEach((e=>{const n=e.elevationTile;let a=t.options.noDataValue;if(n){const t=n.sample(e.x,e.y);(0,o.pC)(t)?a=t:e.elevationTile=null}e.z=a}))}_extractSampleInfo(t){const e=t.layer.tileInfo,n=(0,r.c9)(e.spatialReference);return t.geometry.coordinates.map((a=>{let i=-1;return a.elevationTile&&a.elevationTile!==t.outsideExtentTile&&(i=e.lodAt(a.elevationTile.tile.level).resolution*n),{demResolution:i}}))}}class E{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(t){const e=new E;return e.geometry=this.geometry,e.spatialReference=this.spatialReference,e.coordinates=t||this.coordinates.map((t=>this._cloneCoordinate(t))),e._exporter=this._exporter,e}async project(t,e){if(this.spatialReference.equals(t))return this.clone();await(0,h.iQ)([{source:this.spatialReference,dest:t}],{signal:e});const n=new l.Z({spatialReference:this.spatialReference,points:this.coordinates.map((t=>[t.x,t.y]))}),a=(0,h.iV)(n,t);if(!a)return null;const i=this.coordinates.map(((t,e)=>{const n=this._cloneCoordinate(t),i=a.points[e];return n.x=i[0],n.y=i[1],n})),o=this.clone(i);return o.spatialReference=t,o}_cloneCoordinate(t){return{x:t.x,y:t.y,z:t.z,m:t.m,tile:null,elevationTile:null}}static fromGeometry(t){const e=new E;if(e.geometry=t,e.spatialReference=t.spatialReference,t instanceof E)e.coordinates=t.coordinates.map((t=>e._cloneCoordinate(t))),e._exporter=(e,n)=>{const a=t.clone(e);return a.spatialReference=n,a};else switch(t.type){case"point":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?[{x:n.x,y:n.y,z:n.z,m:n.m}]:a?[{x:n.x,y:n.y,z:n.z}]:i?[{x:n.x,y:n.y,m:n.m}]:[{x:n.x,y:n.y}],e._exporter=(e,n)=>t.hasM?new c.Z(e[0].x,e[0].y,e[0].z,e[0].m,n):new c.Z(e[0].x,e[0].y,e[0].z,n);break}case"multipoint":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?n.points.map((t=>({x:t[0],y:t[1],z:t[2],m:t[3]}))):a?n.points.map((t=>({x:t[0],y:t[1],z:t[2]}))):i?n.points.map((t=>({x:t[0],y:t[1],m:t[2]}))):n.points.map((t=>({x:t[0],y:t[1]}))),e._exporter=(e,n)=>t.hasM?new l.Z({points:e.map((t=>[t.x,t.y,t.z,t.m])),hasZ:!0,hasM:!0,spatiaReference:n}):new l.Z(e.map((t=>[t.x,t.y,t.z])),n);break}case"polyline":{const n=t,a=[],i=[],{hasZ:o,hasM:s}=t;let r=0;for(const t of n.paths)if(i.push([r,r+t.length]),r+=t.length,o&&s)for(const e of t)a.push({x:e[0],y:e[1],z:e[2],m:e[3]});else if(o)for(const e of t)a.push({x:e[0],y:e[1],z:e[2]});else if(s)for(const e of t)a.push({x:e[0],y:e[1],m:e[2]});else for(const e of t)a.push({x:e[0],y:e[1]});e.coordinates=a,e._exporter=(e,n)=>{const a=t.hasM?e.map((t=>[t.x,t.y,t.z,t.m])):e.map((t=>[t.x,t.y,t.z])),o=i.map((t=>a.slice(t[0],t[1])));return new u.Z({paths:o,hasM:t.hasM,hasZ:!0,spatialReference:n})};break}}return e}}class q{constructor(t,e){this.layer=t,this.options=e}}class I extends q{constructor(t,e,n){super(t,n),this.outSpatialReference=e,this.type="geometry"}selectTilesAtLOD(t){if(t<0)this.geometry.coordinates.forEach((t=>t.tile=null));else{const e=this.layer.tileInfo,n=e.lods[t].level;this.geometry.coordinates.forEach((t=>{t.tile=e.tileAt(n,t.x,t.y)}))}}allElevationTilesFetched(){return!this.geometry.coordinates.some((t=>!t.elevationTile))}clearElevationTiles(){for(const t of this.geometry.coordinates)t.elevationTile!==this.outsideExtentTile&&(t.elevationTile=null)}populateElevationTiles(t){for(const e of this.geometry.coordinates)!e.elevationTile&&e.tile&&(e.elevationTile=t[e.tile.id])}remapTiles(t){for(const e of this.geometry.coordinates)e.tile=t[e.tile.id]}getTilesToFetch(){const t={},e=[];for(const n of this.geometry.coordinates){const a=n.tile;n.elevationTile||!n.tile||t[a.id]||(t[a.id]=a,e.push(a))}return e}forEachTileToFetch(t){for(const e of this.geometry.coordinates)e.tile&&!e.elevationTile&&t(e.tile,(()=>e.tile=null))}}class A extends q{constructor(t,e,n,a){super(t,n),this.type="extent",this.elevationTiles=[],this.candidateTiles=[],this.fetchedCandidates=new Set,this.extent=e.intersection(t.fullExtent),this.maskExtents=a}selectTilesAtLOD(t,e){const n=this._maximumLodForRequests(e),a=Math.min(n,t);a<0?this.candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(a)}_maximumLodForRequests(t){const e=this.layer.tileInfo;if(!t)return e.lods.length-1;const n=this.extent;if((0,o.Wi)(n))return-1;for(let a=e.lods.length-1;a>=0;a--){const i=e.lods[a],o=i.resolution*e.size[0],s=i.resolution*e.size[1];if(Math.ceil(n.width/o)*Math.ceil(n.height/s)<=t)return a}return-1}allElevationTilesFetched(){return this.candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this.fetchedCandidates.clear()}populateElevationTiles(t){for(const e of this.candidateTiles){const n=t[e.id];n&&(this.fetchedCandidates.add(e),this.elevationTiles.push(n))}}remapTiles(t){this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles.map((e=>t[e.id])))}getTilesToFetch(){return this.candidateTiles}forEachTileToFetch(t,e){const n=this.candidateTiles;this.candidateTiles=[],n.forEach((n=>{if(this.fetchedCandidates.has(n))return void(e&&e(n));let a=!1;t(n,(()=>a=!0)),a?e&&e(n):this.candidateTiles.push(n)})),this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles,e)}_uniqueNonOverlappingTiles(t,e){const n={},a=[];for(const i of t)n[i.id]?e&&e(i):(n[i.id]=i,a.push(i));const i=a.sort(((t,e)=>t.level-e.level));return i.filter(((t,n)=>{for(let a=0;a<n;a++)if((0,f.r3)(i[a].extent,t.extent))return e&&e(t),!1;return!0}))}_selectCandidateTilesCoveringExtentAt(t){this.candidateTiles.length=0;const e=this.extent;if((0,o.Wi)(e))return;const n=this.layer.tileInfo,a=n.lods[t],i=n.tileAt(a.level,e.xmin,e.ymin),s=a.resolution*n.size[0],r=a.resolution*n.size[1],l=Math.ceil((e.xmax-i.extent[0])/s),c=Math.ceil((e.ymax-i.extent[1])/r);for(let t=0;t<c;t++)for(let e=0;e<l;e++){const a={id:null,level:i.level,row:i.row-t,col:i.col+e};n.updateTileInfo(a),this._tileIsMasked(a)||this.candidateTiles.push(a)}}_tileIsMasked(t){return!!this.maskExtents&&this.maskExtents.some((e=>(0,f.r3)(e,t.extent)))}}function D(t,e){let n=t.lods.length-1;if(e>0){const a=t.lods.findIndex((t=>t.resolution<e));0===a?n=0:a>0&&(n=a-1)}return n}const z={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7054],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,m=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<m;){for(t(s,f,m),f++,m--;a(s[f],d)<0;)f++;for(;a(s[m],d)>0;)m--}0===a(s[r],d)?t(s,r,m):t(s,++m,n),m<=i&&(r=m+1),i<=m&&(n=m-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a.exports},43050:(e,t,s)=>{s.d(t,{S1:()=>a,on:()=>h,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>d});var i=s(91460),r=(s(22974),s(95330));const n=/\?(\.|$)/g;function a(e,t,s,i){const r=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,s,i){return e.watch(t,s,i)}(e,t,s,i);for(const t of r){const i=t.trim().replace(n,"$1"),r=e.get(i);s.call(e,r,r,i,e)}return a}function o(e,t,s,i){return d(e,t,f,s,i)}function l(e,t,s,i){return d(e,t,m,s,i)}function u(e,t,s,i){return d(e,t,p,s,i)}function c(e,t,s,i){return d(e,t,g,s,i)}function h(e,t,s,r,n,o,l){const u={};function c(t){const i=u[t];i&&(o&&o(i.target,t,e,s),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,o)=>{c(o),(0,i.vT)(t)&&(u[o]={handle:(0,i.on)(t,s,r),target:t},n&&n(t,o,e,s))}),l);return{remove(){h.remove();for(const e in u)c(e)}}}function d(e,t,s,i,n){const a="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,u=!1;function c(){l&&(l.remove(),l=null)}const h=(0,r.dD)();(0,r.fu)(o,(()=>{c(),h.reject((0,r.zE)())}));const d={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:c};return Object.freeze(d),l=function(e,t,s,i,r){const n=e.watch(t,((t,r,n,a)=>{s&&!s(t)||null==i||i.call(e,t,r,n,a)}),r);if(Array.isArray(t))for(const r of t){const n=e.get(r);s&&s(n)&&(null==i||i.call(e,n,n,t,e))}else{const r=e.get(t);s&&s(r)&&(null==i||i.call(e,r,r,t,e))}return n}(e,t,s,((t,s,i,r)=>{u=!0,c(),a&&a.call(e,t,s,i,r),h.resolve({value:t,oldValue:s,propertyName:i,target:r})}),n),u&&c(),d}function f(e){return!!e}function m(e){return!e}function p(e){return!0===e}function g(e){return!1===e}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,l){if((0,i.Wi)(t)||!t.lengths.length)return null;const u="upperLeft"===(null==l?void 0:l.originPosition)?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const c=e.coords,h=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:f,coords:m}=t,p=r(s,n);let g=0;for(const e of f){const t=a(d,m,g,e,s,n,u);t&&h.push(t),g+=e*p}if(h.sort(((e,t)=>{let i=u*e[2]-u*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];c[0]=h[0][0]/e,c[1]=h[0][1]/e,s&&(e=6*h[0][4],c[2]=0!==e?h[0][3]/e:0),(c[0]<d[0]||c[0]>d[1]||c[1]<d[2]||c[1]>d[3]||s&&(c[2]<d[4]||c[2]>d[5]))&&(c.length=0)}if(!c.length){const e=t.lengths[0]?o(m,0,f[0],s,n):null;if(!e)return null;c[0]=e[0],c[1]=e[1],s&&e.length>2&&(c[2]=e[2])}return e}function a(e,t,s,i,n,a,o=1){const l=r(n,a);let u=s,c=s+l,h=0,d=0,f=0,m=0,p=0;for(let s=0,r=i-1;s<r;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;m+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,p+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m*o>0&&(m*=-1),p*o>0&&(p*=-1),!m)return null;const g=[h,d,.5*m];return n&&(g[3]=f,g[4]=.5*p),g}function o(e,t,s,i,n){const a=r(i,n);let o=t,d=t+a,f=0,m=0,p=0,g=0;for(let t=0,r=s-1;t<r;t++,o+=a,d+=a){const t=e[o],s=e[o+1],r=e[o+2],n=e[d],a=e[d+1],_=e[d+2],y=i?u(t,s,r,n,a,_):l(t,s,n,a);if(y)if(f+=y,i){const e=h(t,s,r,n,a,_);m+=y*e[0],p+=y*e[1],g+=y*e[2]}else{const e=c(t,s,n,a);m+=y*e[0],p+=y*e[1]}}return f>0?i?[m/f,p/f,g/f]:[m/f,p/f]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function u(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function c(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},7673:(e,t,s)=>{s.d(t,{Z:()=>be});var i=s(20102),r=s(22974),n=s(70586),a=s(69801),o=s(67900),l=s(60437),u=s(24470),c=s(20322),h=s(33955),d=s(38581),f=s(8744),m=s(74669),p=s(41534);const g=new class{constructor(e,t){this._cache=new m.Z(e),this._invalidCache=new m.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=p.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),_="feature-store:unsupported-query",y=" as ",I=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function T(e,t){if(!t)return!0;const s=g.get(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"where clause is not standard",{where:t});return E(e,s.fieldNames,"where clause contains missing fields"),!0}function x(e,t,s){if(!t)return!0;const r=g.get(t,e);if(!r)throw new i.Z(_,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(_,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(E(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(_,"expressions in having should also exist in outStatistics",{having:t});return!0}function S(e,t){return e?g.get(e,t):null}function E(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=b(s);try{const s=S(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"expression is not standard",{clause:s});E(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(_,s,{missingFields:n})}function b(e){return e.split(y)[0]}function R(e){return e.split(y)[1]}function F(e,t){const s=t.get(e);return!!s&&!I.has(s.type)}var v=s(37427),w=s(61159),A=s(82397),N=s(98732),V=s(8418);class C{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&-1===i.indexOf("*")){this.outFields=i;let e=0;for(const t of i){const i=b(t),r=this.fieldsIndex.get(i),n=r?null:S(i,s),a=r?r.name:R(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=S(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getNormalizedValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,t.fieldInfo);if(s&&Number.isFinite(r)){const n=this.getFieldValue(e,t.normalizationField,t.normalizationFieldInfo);r=(0,V.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s){const i={attributes:this.featureAdapter.getAttributes(e)},r=s.createExecContext(i,t.viewInfo);return s.executeFunction(t.compiledFunc,r)}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,n.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var P,M,O=s(17590),k=s(11490),Q=s(35671),z=s(59266);class D{constructor(e,t,s){this.items=e,this.queryGeometry=t,this.definitionExpression=s.definitionExpression,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.fieldsIndex=s.fieldsIndex,this.timeInfo=s.timeInfo,this.featureAdapter=s.featureAdapter,this.aggregateAdapter=s.aggregateAdapter}get size(){return this.items.length}createQueryResponseForCount(e){const t=new C(e,this.featureAdapter,this.fieldsIndex);if(!e.outStatistics)return t.countDistinctValues(this.items);const{groupByFieldsForStatistics:s,having:i}=e;if(!(null==s?void 0:s.length))return 1;const r=new Map,n=new Map,a=new Set,o=e.outStatistics;for(const e of o){const{statisticType:o}=e,l="exceedslimit"!==o?e.onStatisticField:void 0;if(!n.has(l)){const e=[];for(const i of s){const s=this._getAttributeValues(t,i,r);e.push(s)}n.set(l,this._calculateUniqueValues(e,t.returnDistinctValues))}const u=n.get(l);for(const e in u){const{data:s,items:r}=u[e],n=s.join(",");i&&!t.validateItems(r,i)||a.add(n)}}return a.size}createQueryResponse(e){let t;return t=e.outStatistics?e.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(e):this._createStatisticsQueryResponse(e):this._createFeatureQueryResponse(e),e.returnQueryGeometry&&((0,f.JY)(e.outSR)&&!(0,f.fS)(this.queryGeometry.spatialReference,e.outSR)?t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...(0,v.iV)(this.queryGeometry,this.queryGeometry.spatialReference,e.outSR)}):t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...this.queryGeometry})),t}createSnappingResponse(e,t){const s=this.featureAdapter,i=function(e,t){return e?t?4:3:t?3:2}(this.hasZ,this.hasM),{x:r,y:a}=e.point,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h=this._getPointCreator(e.point,this.spatialReference,t);for(const t of this.items){const d=s.getGeometry(t);if((0,n.Wi)(d))continue;const{coords:f,lengths:m}=d;if(e.types&P.EDGE){let e=0;for(let n=0;n<m.length;n++){const c=m[n];for(let n=0;n<c;n++,e+=i){const d=f[e],m=f[e+1];if(n!==c-1){const n=f[e+i],c=f[e+i+1],{x:p,y:g}=G(r,a,d,m,n,c),_=(r-p)/o,y=(a-g)/l,I=_*_+y*y;I<=1&&u.candidates.push({type:"edge",objectId:s.getObjectId(t),distance:Math.sqrt(I),target:h(p,g),start:h(d,m),end:h(n,c)})}}}}if(e.types&P.VERTEX){const e=c?f.length-i:f.length;for(let n=0;n<e;n+=i){const e=f[n],i=f[n+1],c=(r-e)/o,d=(a-i)/l,m=c*c+d*d;m<=1&&u.candidates.push({type:"vertex",objectId:s.getObjectId(t),distance:Math.sqrt(m),target:h(e,i)})}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s){const i=(0,n.pC)(s)&&!(0,f.fS)(t,s)?e=>(0,v.iV)(e,t,s):e=>e;return null!=e.z&&null!=e.m?(t,s)=>i({x:t,y:s,z:e.z,m:e.m}):null!=e.z?(t,s)=>i({x:t,y:s,z:e.z}):null!=e.m?(t,s)=>i({x:t,y:s,m:e.m}):(e,t)=>i({x:e,y:t})}executeAttributesQuery(e){const t=S(e.where,this.fieldsIndex);if(!t)return Promise.resolve(this);if(t.isStandardized){let s=0;const i=[];for(const e of this.items)t.testFeature(e,this.featureAdapter)&&(i[s++]=e);const r=new D(i,this.queryGeometry,this);return r.definitionExpression=e.where,Promise.resolve(r)}return Promise.reject(new TypeError("Where clause is not standardized"))}executeAggregateIdsQuery(e){if(!e.aggregateIds||!e.aggregateIds.length||(0,n.Wi)(this.aggregateAdapter))return Promise.resolve(this);const t=new Set;for(const s of e.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeObjectIdsQuery(e){if(!e.objectIds||!e.objectIds.length)return Promise.resolve(this);const t=new Set(e.objectIds),s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeTimeQuery(e){const t=(0,O.y)(this.timeInfo,e.timeExtent,this.featureAdapter);if(!(0,n.pC)(t))return Promise.resolve(this);const s=this.items.filter(t);return Promise.resolve(new D(s,this.queryGeometry,this))}filterLatest(){const{trackIdField:e,startTimeField:t,endTimeField:s}=this.timeInfo,i=s||t,r=new Map,n=this.featureAdapter.getAttribute;for(const t of this.items){const s=n(t,e),a=n(t,i),o=r.get(s);(!o||a>n(o,i))&&r.set(s,t)}const a=Array.from(r.values());return Promise.resolve(new D(a,this.queryGeometry,this))}async project(e){if(!e||(0,f.fS)(this.spatialReference,e))return this;const t=this.featureAdapter,s=(await(0,v.oj)(this.items.map((e=>(0,k.Op)(this.geometryType,this.hasZ,this.hasM,t.getGeometry(e)))),this.spatialReference,e)).map(((e,s)=>t.cloneWithGeometry(this.items[s],(0,N.GH)(e,this.hasZ,this.hasM))));return new D(s,this.queryGeometry,{definitionExpression:this.definitionExpression,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:e,fieldsIndex:this.fieldsIndex,timeInfo:this.timeInfo,featureAdapter:this.featureAdapter})}async createSummaryStatisticsResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,minValue:o,maxValue:l,scale:u}=t,c=this.fieldsIndex.isDateField(s),h=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:u}),d=(0,V.S5)({normalizationType:n,normalizationField:r,minValue:o,maxValue:l}),f=this.fieldsIndex.get(s),m={value:.5,fieldType:null==f?void 0:f.type},p=(0,Q.qN)(f)?(0,V.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,V.i5)({values:h,minValue:o,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,V.F_)(p,c)}async createUniqueValuesResponse(e,t){const{field:s,valueExpression:i,domain:r,returnAllCodedValues:n,scale:a}=t,o=await this._getDataValues(e,{field:s,valueExpression:i,scale:a}),l=(0,V.eT)(o);return(0,V.Qm)(l,r,n)}async createClassBreaksResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d}),m=(0,V.G2)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h});return(0,V.DL)(m,o)}async createHistogramResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d});return(0,V.oF)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,V.Lq)(null==n?void 0:n.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,k.S2)(l||a),transform:u&&(0,A.vY)(u)||null}}_createFeatures(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=r&&d,p=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,A.vY)(a);if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=this.hasZ?this.hasM?4:3:this.hasM?3:2,s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+((0,n.pC)(i)&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}_createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new C(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,m=f&&u[0],p=f&&!this.fieldsIndex.get(m);for(const e of l){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I=f&&1===d&&(_===m||p)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};let t=null;if(I)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t,u.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:`EXPR_${s+1}`]=r[s])),a.set(d,e)}}}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=null!=s&&s.has(r)?s.get(r):(0,Q.qN)(this.fieldsIndex.get(r))?(0,V.H0)({values:t,returnDistinct:i}):(0,V.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s),l={value:n,orderBy:a,fieldType:null==o?void 0:o.type,isDiscrete:"percentile_disc"===r};return(0,V.XL)(t,l)}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeNormalizedValues(e,t){return this.items.map((s=>e.getNormalizedValue(s,{field:t.field,fieldInfo:this.fieldsIndex.get(t.field),normalizationField:t.normalizationField,normalizationFieldInfo:this.fieldsIndex.get(t.normalizationField),normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,z.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return this.items.map((t=>e.getExpressionValue(t,{compiledFunc:r,viewInfo:n},i)))}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{valueExpression:i,field:r,normalizationField:n,normalizationType:a,normalizationTotal:o,scale:l}=t,u=i?{viewingMode:"map",scale:l,spatialReference:e.outSR||this.spatialReference}:null;return i?this._getAttributeExpressionValues(s,i,u):this._getAttributeNormalizedValues(s,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:o})}}function G(e,t,s,i,r,n){const a=r-s,o=n-i,l=a*a+o*o,u=(e-s)*a+(t-i)*o,c=Math.min(1,Math.max(0,u/l));return{x:s+a*c,y:i+o*c}}(M=P||(P={}))[M.NONE=0]="NONE",M[M.EDGE=1]="EDGE",M[M.VERTEX=2]="VERTEX";var L=s(10402),U=s(99514),Z=s(43697),q=s(15923),j=s(61247),B=s(92604),Y=s(54790),H=s(44553),W=s(95330),X=s(17445),J=s(76882),$=s(43050),K=s(5600),ee=(s(67676),s(80442),s(75215),s(52011));let te=class extends q.Z{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.push(new se(i,r,e,t,s))))}unshift(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.unshift(new se(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,W.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,W.zE)());else{const i=s?t.abortCallback((0,W.zE)()):t.callback(e);(0,W.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=(0,W.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this.running=!1}};(0,Z._)([(0,K.Cb)()],te.prototype,"running",void 0),te=(0,Z._)([(0,ee.j)("esri.layers.support.PromiseQueue")],te);class se{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}let ie=class extends q.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Z._)([(0,K.Cb)()],ie.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Z._)([(0,K.Cb)()],ie.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ie=(0,Z._)([(0,ee.j)("esri.views.support.DebugFlags")],ie);const re=new ie,ne=B.Z.getLogger("esri.views.support.Scheduler");var ae;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(ae||(ae={}));const oe=new Map([[ae.RESOURCE_CONTROLLER,0],[ae.SLIDE,0],[ae.STREAM_DATA_LOADER,0],[ae.ELEVATION_QUERY,0],[ae.TERRAIN_SURFACE,1],[ae.SURFACE_GEOMETRY_UPDATES,1],[ae.GRAPHICS_CORE,2],[ae.I3S_CONTROLLER,2],[ae.POINT_CLOUD_LAYER,2],[ae.FEATURE_TILE_FETCHER,2],[ae.OVERLAY,4],[ae.STAGE,4],[ae.GRAPHICS_DECONFLICTOR,4],[ae.FILTER_VISIBILITY,4],[ae.SCALE_VISIBILITY,4],[ae.FRUSTUM_VISIBILITY,4],[ae.POINT_OF_INTEREST_FREQUENT,6],[ae.POINT_OF_INTEREST_INFREQUENT,30],[ae.LABELER,8],[ae.FEATURE_QUERY_ENGINE,8],[ae.FEATURE_TILE_TREE,16],[ae.FEATURE_TILE_TREE_ACTIVE,0],[ae.ELEVATION_ALIGNMENT,12],[ae.TEXT_TEXTURE_ATLAS,12],[ae.CLOUDS_GENERATOR,12],[ae.TEXTURE_UNLOAD,12],[ae.LINE_OF_SIGHT_TOOL,16],[ae.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[ae.SNAPPING,0],[ae.SHADOW_ACCUMULATOR,30]]);function le(e){return oe.has(e)?oe.get(e):"number"==typeof e?e:1}var ue;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(ue||(ue={}));const ce=(0,J.HA)(6.5),he=(0,J.HA)(1),de=(0,J.HA)(30),fe=(0,J.HA)(1e3/30),me=(0,J.HA)(100);var pe,ge;!function(e){let t=class extends q.Z{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new Y.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=ue.INTERACTING,this._tasks=new H.Z,this._runQueue=new H.Z,this._load=0,this._idleStateCallbacks=new H.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=Ie,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,$.S1)(re,"SCHEDULER_LOG_SLOW_TASKS",(e=>this._debug=e)),this._budget=new i(e.nowFunc);for(const e of Object.keys(ae))this.performanceInfo.tasks.set(ae[e],new Y.Z(ae[e]));let t;const s=this;this._test={get state(){return(0,n.Pt)(t,s._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:ce,INTERACTING_BUDGET:fe,IDLE_BUDGET:me,get budget(){return s._budget.budget},usedBudget:0,setBudget:e=>s._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=Ie,this._schedule(),this.frame()))})))}registerTask(e,t){const i=le(e),r=new s(this,e,t,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new Y.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===ue.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===ue.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==ue.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return(0,n.Wi)(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=ce,s=e.frameDuration,i=he;switch(this.state){case ue.IDLE:t=(0,J.HA)(0),s=(0,J.HA)(Math.max(me,e.frameDuration)),i=de;break;case ue.INTERACTING:s=(0,J.HA)(Math.max(fe,e.frameDuration));case ue.ANIMATING:}return s=(0,J.HA)(s-e.elapsedFrameTime-t),this.state!==ue.IDLE&&s<he&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,J.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=Ie,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case ue.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case ue.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,J.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ge.SCHEDULED;let t=ge.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ge.READY:t!==ge.READY&&(t=ge.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.some((t=>t===e))&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this.updating=!1,!1;this._maxReschedule===Ie&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){ne.error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some((e=>e.needsUpdate)),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some((e=>e.needsUpdate)),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(ae))this._frameTaskTimes.set(ae[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};(0,Z._)([(0,K.Cb)()],t.prototype,"updating",void 0),(0,Z._)([(0,K.Cb)()],t.prototype,"nowFunc",void 0),t=(0,Z._)([(0,ee.j)("esri.views.support.Scheduler")],t),e.Scheduler=t;let s=class extends q.Z{constructor(e,t,s,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new te,this._handles=new j.Z,this.schedulePriority=this._basePriority,this.task=(0,n.pC)(s)?s:this._queue,this._handles.add((0,X.gx)((()=>this.task.running),(()=>e.activate())))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(_e),this._scheduler.removeTask(this),this.schedule=ye.schedule,this.reschedule=ye.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=le(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}};(0,Z._)([(0,K.Cb)({constructOnly:!0})],s.prototype,"task",void 0),(0,Z._)([(0,K.Cb)({readOnly:!0})],s.prototype,"updating",null),s=(0,Z._)([(0,ee.j)("esri.views.support.SchedulerTask")],s);class i{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=ue.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=i}(pe||(pe={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ge||(ge={}));const _e=(()=>{const e=new pe.Budget((()=>performance.now()));return e.enabled=!1,e})(),ye=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,W.Hc)(t)){const e=(0,W.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,W.gx)(e(_e))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ie=Number.MAX_SAFE_INTEGER,Te="feature-store:unsupported-query",xe=new Set,Se=new a.WJ(2e6);let Ee=0;class be{constructor(e){this.capabilities={query:w.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new a.Xq(Ee+++"$$",Se)),this.fieldsIndex=new U.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return e?{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,k.S2)(this.spatialReference)}:null}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,O.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache&&this._geometryQueryCache.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e={},t){let s,i=(0,r.d9)(e);try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(i)}async executeQueryForCount(e={},t){let s=(0,r.d9)(e);s.returnGeometry=!1,s.returnCentroid=!1,s.outSR=null;try{s=await this._schedule((()=>(0,k.Up)(s,this.definitionExpression,this.spatialReference)),t),s=await this._reschedule((()=>this._checkQuerySupport(s)),t);let e=await this._reschedule((()=>this._executeGeometryQuery(s,t)),t);return e=await this._reschedule((()=>e.executeAggregateIdsQuery(s)),t),e=await this._reschedule((()=>e.executeObjectIdsQuery(s)),t),e=await this._reschedule((()=>e.executeTimeQuery(s)),t),e=await this._reschedule((()=>e.executeAttributesQuery(s)),t),e.createQueryResponseForCount(s)}catch(e){if(e!==k.vF)throw e;return 0}}async executeQueryForExtent(e={},t){let s,i=(0,r.d9)(e);const n=i.outSR;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),i.returnGeometry=!0,i.returnCentroid=!1,i.outSR=null,s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.size;if(!e)return{count:e,extent:null};(0,l.t8)(Fe,l.Gv),this.featureStore.forEachBounds(s.items,(e=>(0,l.TC)(Fe,e)),Re);const r={xmin:Fe[0],ymin:Fe[1],xmax:Fe[3],ymax:Fe[4],spatialReference:(0,k.S2)(this.spatialReference)};this.hasZ&&isFinite(Fe[2])&&isFinite(Fe[5])&&(r.zmin=Fe[2],r.zmax=Fe[5]);const a=(0,v.iV)(r,s.spatialReference,n);if(a.spatialReference=(0,k.S2)(n||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:e,extent:a}}catch(e){if(e===k.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e={},t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e={},t){let s,i=(0,r.d9)(e);i.returnGeometry=!1,i.returnCentroid=!1,i.outSR=null;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.items,r=new Set;return await this._reschedule((()=>{for(const t of e)r.add(s.featureAdapter.getObjectId(t))}),t),r}catch(e){if(e===k.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===P.NONE)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,f.fS)(s.spatialReference,this.spatialReference);o&&await(0,v._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},m=o?(0,v.iV)(c,this.spatialReference):c;if(!m)return{candidates:[]};const p=(await(0,d.aX)((0,h.im)(s),null,{signal:t}))[0],g=(await(0,d.aX)((0,h.im)(m),null,{signal:t}))[0];if((0,n.Wi)(p)||(0,n.Wi)(g))return{candidates:[]};let _=new D(this._searchFeatures(this._getQueryBBoxes(g.toJSON())),null,this);_=await this._reschedule((()=>_.executeObjectIdsQuery(a)),t),_=await this._reschedule((()=>_.executeTimeQuery(a)),t),_=await this._reschedule((()=>_.executeAttributesQuery(a)),t);const y=p.toJSON(),I=o?(0,v.iV)(y,this.spatialReference):y,T=o?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e={},t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new i.Z(Te,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});let s,n=(0,r.d9)(e);try{n=await this._schedule((()=>(0,k.Up)(n,this.definitionExpression,this.spatialReference)),t),n=await this._reschedule((()=>this._checkQuerySupport(n)),t),s=await this._reschedule((()=>this._executeGeometryQuery(n,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(n)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(n)),t),s=await this._reschedule((()=>s.executeTimeQuery(n)),t),s=await this._reschedule((()=>s.executeAttributesQuery(n)),t),s=await this._reschedule((()=>s.filterLatest()),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(n)}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(e,t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:i,valueExpression:r},s)).createUniqueValuesResponse(e,t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(e,t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(e,t)}async _schedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(_e)}async _reschedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(_e)}_getAll(){if(!this._allItems){const e=[];this.featureStore.forEach((t=>e.push(t))),this._allItems=new D(e,null,this)}return this._allItems}async _executeGeometryQuery(e,t){const{geometry:s,outSR:i,spatialRel:r,returnGeometry:a,returnCentroid:o}=e,l=a||o,u=(0,f.JY)(i)&&!(0,f.fS)(this.spatialReference,i),c=this._geometryQueryCache?u&&l?JSON.stringify({geometry:s,spatialRelationship:r,outSpatialReference:i}):JSON.stringify({geometry:s,spatialRelationship:r}):null;if(c){const e=this._geometryQueryCache.get(c);if(!(0,n.o8)(e))return e}const h=async e=>{if(u&&l){const t=await e.project(i);return c&&this._geometryQueryCache.put(c,t,t.size||1),t}return c&&this._geometryQueryCache.put(c,e,e.size||1),e};if(!s)return h(this._getAll());const d=this.featureAdapter;if("esriSpatialRelDisjoint"===r){const e=this._searchFeatures(this._getQueryBBoxes(s));if(!e.length)return h(this._getAll());let i,n;const a=new Set;for(const t of e)a.add(d.getObjectId(t));await this._reschedule((()=>{let e=0;i=new Array(a.size),this.featureStore.forEach((t=>i[e++]=t)),n=a}),t);const o=await this._reschedule((async()=>{const e=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM);return new D(await this._runSpatialFilter(i,(t=>!n.has(d.getObjectId(t))||e(d.getGeometry(t))),t),s,this)}),t);return h(o)}const m=this._searchFeatures(this._getQueryBBoxes(s));if(!m.length){const e=new D([],s,this);return c&&this._geometryQueryCache.put(c,e,e.size||1),e}if(this._canExecuteSoloPass(s,e))return h(new D(m,s,this));const p=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM),g=await this._runSpatialFilter(m,(e=>p(d.getGeometry(e))),t);return h(new D(g,s,this))}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,n.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_canExecuteSoloPass(e,t){const{geometryType:s}=this,{spatialRel:i}=t;return(0,L.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i||"esriSpatialRelWithin"===i))}_getQueryBBoxes(e){if((0,L.hN)(e)){if((0,h.YX)(e))return[(0,u.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,h.oU)(e))return e.rings.map((e=>(0,u.al)(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,c.$P)((0,u.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>{xe.add(e)}));const t=new Array(xe.size);let s=0;return xe.forEach((e=>t[s++]=e)),xe.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsParamsSupport(t),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new i.Z(Te,"params should have at least a field or valueExpression",{params:e});E(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.indexOf(e)>-1?i.split(e)[0]:i.indexOf(t)>-1?i.split(t)[0]:s})).filter((e=>-1===a.indexOf(e)));E(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)E(this.fieldsIndex,t,"outFields contains missing fields");else if(r)throw new i.Z(Te,"outFields should be specified for returnDistinctValues",{query:e});T(this.fieldsIndex,e.where)}async _checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,n=s&&s.length,a=t&&t.length;if(r){if(!n||!a)throw new i.Z(Te,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});x(this.fieldsIndex,r,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const r=t.map((e=>e.onStatisticField));E(this.fieldsIndex,r,"onStatisticFields contains missing fields"),n&&E(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:r}=s;if("percentile_disc"!==r&&"percentile_cont"!==r||!("statisticParameters"in s)){if("count"!==r&&t&&F(t,this.fieldsIndex))throw new i.Z(Te,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new i.Z(Te,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e={},t,s){let i;e=(0,r.d9)(e);try{e=await this._schedule((()=>(0,k.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s),i=await this._reschedule((()=>this._executeGeometryQuery(e,s)),s),i=await this._reschedule((()=>i.executeAggregateIdsQuery(e)),s),i=await this._reschedule((()=>i.executeObjectIdsQuery(e)),s),i=await this._reschedule((()=>i.executeTimeQuery(e)),s),i=await this._reschedule((()=>i.executeAttributesQuery(e)),s)}catch(e){if(e!==k.vF)throw e;i=new D([],null,this)}return i}}const Re=(0,l.Ue)(),Fe=(0,l.Ue)()},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>_});var i=s(70586),r=s(90411),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)&&e.geometry.spatialReference)):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s){return e?(s||(s=t,t=e.spatialReference),(0,a.JY)(t)&&(0,a.JY)(s)&&!(0,a.fS)(t,s)?(0,o.Q8)(t,s)?(0,a.sS)(s)?f(e):m(e):(0,r.oj)(n.N,[e],t,s,null)[0]:e):e}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),m=s(37427),p=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},T={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function x(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,p.Op)(i,o,l,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,p.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return!0===y[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return!0===I[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return!0===T[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(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}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{vF:()=>m,S2:()=>E,Op:()=>T,Up:()=>x,j6:()=>S,EG:()=>I});var i=s(35454),r=s(70586),n=s(67900),a=s(49600),o=s(33955),l=s(38581),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.Xn({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,c.fQ)(r,a,o)}return(0,c.fQ)(t,a,o)}function T(e,t,s,i,n,a,o=t,l=s){const u=t&&o,h=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,c.zj)(g,d,t,s,e,n,o,l);return a&&(i=(0,c.Nh)(_,i,u,h,e,a)),y[e](i,u,h)}if(a){const i=(0,c.Nh)(_,d,t,s,e,a,o,l);return y[e](i,u,h)}return(0,c.hY)(p,d,t,s,o,l),y[e](p,u,h)}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();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(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),S(e,t,s)}async function S(e,t,i){if(!e)return null;let{where:c}=e;if(e.where=c=c&&c.trim(),(!c||/^1 *= *1$/.test(c)||t&&t===c)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{geometry:t,distance:i,units:r}=e;if(null==i||"vertexAttributes"in t)return t;const a=t.spatialReference,o=r?f.fromJSON(r):(0,n.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?t:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(t,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,i,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,a.aO)(h),h.spatialReference=t}e.geometry=h,await(0,d._W)(h.spatialReference,i);const p=(await(0,l.aX)((0,o.im)(h)))[0];if((0,r.Wi)(p))throw m;const g=p.toJSON(),_=await(0,d.iV)(g,g.spatialReference,i);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}function E(e){return e&&b in e?JSON.parse(JSON.stringify(e,R)):e}const b="_geVersion",R=(e,t)=>e!==b?t:void 0},8418:(e,t,s)=>{s.d(t,{G2:()=>b,oF:()=>F,XL:()=>g,i5:()=>p,H0:()=>m,eT:()=>x,Qm:()=>S,Lq:()=>_,fk:()=>E,S5:()=>f,F_:()=>T,DL:()=>R});var i=s(57316);function r(e,t){return Number(e.toFixed(t))}function n(e){const t=e.definition,{classificationMethod:s,breakCount:i,normalizationType:n,definedInterval:l}=t,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===s)if(c.length>=i){const e=(d-h)/i;let t=h;for(let s=1;s<i;s++){const i=r(h+s*e,6);u.push({minValue:t,maxValue:i,label:a(t,i,n)}),t=i}u.push({minValue:t,maxValue:d,label:a(t,d,n)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:a(e,e,n)})}));else if("natural-breaks"===s){const t=function(e){const t=[],s=[];let i=Number.MIN_VALUE,r=1,n=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,s[n]=r):null!==o&&(t.push(o),i=o,r=1,s.push(r),n++)}return{uniqueValues:t,valueFrequency:s}}(c),s=e.valueFrequency||t.valueFrequency,l=o(t.uniqueValues,s,i);let f=h;for(let e=1;e<i;e++)if(t.uniqueValues.length>e){const s=r(t.uniqueValues[l[e]],6);u.push({minValue:f,maxValue:s,label:a(f,s,n)}),f=s}u.push({minValue:f,maxValue:d,label:a(f,d,n)})}else if("quantile"===s)if(c.length>=i&&h!==d){let e=h,t=Math.ceil(c.length/i),s=0;for(let r=1;r<i;r++){let o=t+s-1;o>c.length&&(o=c.length-1),o<0&&(o=0),u.push({minValue:e,maxValue:c[o],label:a(e,c[o],n)}),e=c[o],s+=t,t=Math.ceil((c.length-s)/(i-r))}u.push({minValue:e,maxValue:d,label:a(e,d,n)})}else{let e=-1;for(let t=0;t<c.length;t++){const s=c[t];s!==e&&(e=s,u.push({minValue:e,maxValue:s,label:a(e,s,n)}),e=s)}}else if("standard-deviation"===s){const e=function(e){let t=0;for(let s=0;s<e.length;s++)t+=e[s];return t/=e.length,t}(c),t=function(e,t){let s=0;for(let i=0;i<e.length;i++){const r=e[i];s+=(r-t)*(r-t)}return s/=e.length,Math.sqrt(s)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:a(c[0],c[0],n)});else{const s=function(e,t,s,i,r){let n=Math.max(i-e,t-i)/r/s;return n=n>=1?1:n>=.5?.5:.25,n}(h,d,i,e,t)*t;let o=0,l=h;for(let t=i;t>=1;t--){const i=r(e-(t-.5)*s,6);u.push({minValue:l,maxValue:i,label:a(l,i,n)}),l=i,o++}let c=r(e+.5*s,6);u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++;for(let t=1;t<=i;t++)c=o===2*i?d:r(e+(t+.5)*s,6),u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++}}else if("defined-interval"===s){if(!l)return u;const e=c[0],t=c[c.length-1],s=Math.ceil((t-e)/l);let i=e;for(let t=1;t<s;t++){const s=r(e+t*l,6);u.push({minValue:i,maxValue:s,label:a(i,s,n)}),i=s}u.push({minValue:i,maxValue:t,label:a(i,t,n)})}return u}function a(e,t,s){let i=null;return i=e===t?s&&"percent-of-total"===s?e+"%":e.toString():s&&"percent-of-total"===s?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,s){const i=e.length,r=[];s>i&&(s=i);for(let e=0;e<s;e++)r.push(Math.round(e*i/s-1));r.push(i-1);let n=l(r,e,t,s);return function(e,t,s,i,r,n){let a=0,o=0,l=0,c=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<n-1;d++)for(;s[d+1]+1!==s[d+2];){s[d+1]=s[d+1]+1;const n=u(d,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d+1,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d]+t[d+1])){s[d+1]=s[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=l,e[d+1]=c,h=!0}for(let d=n-1;d>0;d--)for(;s[d]!==s[d-1]+1;){s[d]=s[d]-1;const n=u(d-1,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d-1]+t[d])){s[d]=s[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=l,e[d]=c,h=!0}}return h}(n.mean,n.sdcm,r,e,t,s)&&(n=l(r,e,t,s)),r}function l(e,t,s,i){let r=[],n=[],a=[],o=0;const l=[],c=[];for(let r=0;r<i;r++){const i=u(r,e,t,s);l.push(i.sbMean),c.push(i.sbSdcm),o+=c[r]}let h,d=o,f=!0;for(;f||o<d;){f=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let s=0;s<i;s++)for(let r=e[s]+1;r<=e[s+1];r++)if(h=t[r],s>0&&r!==e[s+1]&&Math.abs(h-l[s])>Math.abs(h-l[s-1]))e[s]=r;else if(s<i-1&&e[s]!==r-1&&Math.abs(h-l[s])>Math.abs(h-l[s+1])){e[s+1]=r-1;break}d=o,o=0,n=[],a=[];for(let r=0;r<i;r++){n.push(l[r]),a.push(c[r]);const i=u(r,e,t,s);l[r]=i.sbMean,c[r]=i.sbSdcm,o+=c[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],l[t]=n[t],c[t]=a[t];o=d}return{mean:l,sdcm:c}}function u(e,t,s,i){let r=0,n=0;for(let a=t[e]+1;a<=t[e+1];a++){const e=i[a];r+=s[a]*e,n+=e}n<=0&&console.log("Exception in Natural Breaks calculation");const a=r/n;let o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=i[r]*(s[r]-a)**2;return{sbMean:a,sbSdcm:o}}const c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){const t=null!=e.normalizationField||null!=e.normalizationType,s=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!s&&!i}function m(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,s=t.filter((e=>null!=e)).length,i={count:s};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=g(t,e.percentileParams)),i}function p(e){const{values:t,useSampleStdDev:s,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=null,o=null,l=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a+=e,r=Math.min(r,e),n=Math.max(n,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const s of t)Number.isFinite(s)&&s>=h&&s<=d&&(e+=(s-o)**2);u=s?c>1?e/(c-1):0:c>0?e/c:0,l=Math.sqrt(u)}else r=null,n=null;const f={avg:o,count:c,max:n,min:r,stddev:l,sum:a,variance:u};return i&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=g(t,e.percentileParams)),f}function g(e,t){const{fieldType:s,value:i,orderBy:r,isDiscrete:n}=t,a=_(s,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,l=Math.floor(o),u=l+1,c=o%1,h=e[l],d=e[u];return u>=e.length||n||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const s=t?1:-1,i=function(e){return e?(e,t)=>t-e:(e,t)=>e-t}(t),r=y(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):s;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),n=new Date(t).getTime();return isNaN(r)||isNaN(n)?s:i(r,n)};if(h.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=y(t);return(t,s)=>e(I(t),I(s))}return t?(e,t)=>1:(e,t)=>-1}function y(e){return e?(e,t)=>(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0:(e,t)=>(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function I(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,t){let s;for(s in e)d.indexOf(s)>-1&&(Number.isFinite(e[s])||(e[s]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]))})),e):e}function x(e){const t={};for(let s of e)(null==s||"string"==typeof s&&""===s.trim())&&(s=null),null==t[s]?t[s]={count:1,data:s}:t[s].count++;return{count:t}}function S(e,t,s){const i=e.count,r=[];s&&t&&"coded-value"===t.type&&t.codedValues.forEach((e=>{const t=e.code;i.hasOwnProperty(t)||(i[t]={data:t,count:0})}));for(const e in i){const t=i[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function E(e,t,s,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(s)&&0!==s&&(r=e/s);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function b(e,t){const s=function(e){const t=e.field,s=e.classificationMethod||"equal-interval",r=e.normalizationType,n=e.normalizationField,a=new i.Z;return a.classificationField=t,a.breakCount=e.breakCount,a.classificationMethod=s,a.standardDeviationInterval="standard-deviation"===s?e.standardDeviationInterval||1:void 0,a.normalizationType=r,a.normalizationField="field"===r?n:void 0,a}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||5});return e=function(e,t,s){return t=null==t?-1/0:t,s=null==s?1/0:s,e.filter((e=>Number.isFinite(e)&&e>=t&&e<=s))}(e,t.minValue,t.maxValue),function(e){const{normalizationTotal:t}=e;return{classBreaks:n(e),normalizationTotal:t}}({definition:s,values:e,normalizationTotal:t.normalizationTotal})}function R(e,t){let s=e.classBreaks;const i=s.length,r=s[0].minValue,n=s[i-1].maxValue,a="standard-deviation"===t,o=c;return s=s.map((e=>{const t=e.label,s={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o).map((e=>+e.trim()));2===e.length?(s.minStdDev=e[0],s.maxStdDev=e[1],e[0]<0&&e[1]>0&&(s.hasAvg=!0)):1===e.length&&(t.includes("<")?(s.minStdDev=null,s.maxStdDev=e[0]):t.includes(">")&&(s.minStdDev=e[0],s.maxStdDev=null))}return s})),{minValue:r,maxValue:n,classBreakInfos:s,normalizationTotal:e.normalizationTotal}}function F(e,t){const{min:s,max:i,intervals:r}=function(e,t){const{field:s,classificationMethod:i,standardDeviationInterval:r,normalizationType:n,normalizationField:a,normalizationTotal:o,minValue:l,maxValue:u}=t,c=t.numBins||10;let h=null,d=null,m=null;if(i&&"equal-interval"!==i||n){const{classBreaks:t}=b(e,{field:s,normalizationType:n,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:l,maxValue:u,numClasses:c});h=t[0].minValue,d=t[t.length-1].maxValue,m=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)h=l,d=u;else{const t=p({values:e,minValue:l,maxValue:u,useSampleStdDev:!n,supportsNullCount:f({normalizationType:n,normalizationField:a,minValue:l,maxValue:u})});h=t.min,d=t.max}m=function(e,t,s){const i=(t-e)/s,r=[];let n,a=e;for(let e=1;e<=s;e++)n=a+i,n=Number(n.toFixed(16)),r.push([a,e===s?t:n]),a=n;return r}(h,d,c)}return{min:h,max:d,intervals:m}}(e,t),n=r.map(((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0})));for(const t of e)if(null!=t&&t>=s&&t<=i){const e=v(r,t);e>-1&&n[e].count++}return{bins:n,minValue:s,maxValue:i,normalizationTotal:t.normalizationTotal}}function v(e,t){let s=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){s=i;break}return s}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7054],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={exports:{}};i=a,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],f=r,m=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);f<m;){for(t(s,f,m),f++,m--;a(s[f],d)<0;)f++;for(;a(s[m],d)>0;)m--}0===a(s[r],d)?t(s,r,m):t(s,++m,n),m<=i&&(r=m+1),i<=m&&(n=m-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a.exports},43050:(e,t,s)=>{s.d(t,{S1:()=>a,on:()=>h,OY:()=>c,cm:()=>l,N1:()=>o,LR:()=>u,tH:()=>d});var i=s(91460),r=(s(22974),s(95330));const n=/\?(\.|$)/g;function a(e,t,s,i){const r=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],a=function(e,t,s,i){return e.watch(t,s,i)}(e,t,s,i);for(const t of r){const i=t.trim().replace(n,"$1"),r=e.get(i);s.call(e,r,r,i,e)}return a}function o(e,t,s,i){return d(e,t,f,s,i)}function l(e,t,s,i){return d(e,t,m,s,i)}function u(e,t,s,i){return d(e,t,p,s,i)}function c(e,t,s,i){return d(e,t,g,s,i)}function h(e,t,s,r,n,o,l){const u={};function c(t){const i=u[t];i&&(o&&o(i.target,t,e,s),i.handle.remove(),delete u[t])}const h=a(e,t,((t,a,o)=>{c(o),(0,i.vT)(t)&&(u[o]={handle:(0,i.on)(t,s,r),target:t},n&&n(t,o,e,s))}),l);return{remove(){h.remove();for(const e in u)c(e)}}}function d(e,t,s,i,n){const a="function"==typeof i?i:null,o="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,u=!1;function c(){l&&(l.remove(),l=null)}const h=(0,r.dD)();(0,r.fu)(o,(()=>{c(),h.reject((0,r.zE)())}));const d={then:h.promise.then.bind(h.promise),catch:h.promise.catch.bind(h.promise),remove:c};return Object.freeze(d),l=function(e,t,s,i,r){const n=e.watch(t,((t,r,n,a)=>{s&&!s(t)||null==i||i.call(e,t,r,n,a)}),r);if(Array.isArray(t))for(const r of t){const n=e.get(r);s&&s(n)&&(null==i||i.call(e,n,n,t,e))}else{const r=e.get(t);s&&s(r)&&(null==i||i.call(e,r,r,t,e))}return n}(e,t,s,((t,s,i,r)=>{u=!0,c(),a&&a.call(e,t,s,i,r),h.resolve({value:t,oldValue:s,propertyName:i,target:r})}),n),u&&c(),d}function f(e){return!!e}function m(e){return!e}function p(e){return!0===e}function g(e){return!1===e}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,l){if((0,i.Wi)(t)||!t.lengths.length)return null;const u="upperLeft"===(null==l?void 0:l.originPosition)?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const c=e.coords,h=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:f,coords:m}=t,p=r(s,n);let g=0;for(const e of f){const t=a(d,m,g,e,s,n,u);t&&h.push(t),g+=e*p}if(h.sort(((e,t)=>{let i=u*e[2]-u*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),h.length){let e=6*h[0][2];c[0]=h[0][0]/e,c[1]=h[0][1]/e,s&&(e=6*h[0][4],c[2]=0!==e?h[0][3]/e:0),(c[0]<d[0]||c[0]>d[1]||c[1]<d[2]||c[1]>d[3]||s&&(c[2]<d[4]||c[2]>d[5]))&&(c.length=0)}if(!c.length){const e=t.lengths[0]?o(m,0,f[0],s,n):null;if(!e)return null;c[0]=e[0],c[1]=e[1],s&&e.length>2&&(c[2]=e[2])}return e}function a(e,t,s,i,n,a,o=1){const l=r(n,a);let u=s,c=s+l,h=0,d=0,f=0,m=0,p=0;for(let s=0,r=i-1;s<r;s++,u+=l,c+=l){const s=t[u],i=t[u+1],r=t[u+2],a=t[c],o=t[c+1],l=t[c+2];let g=s*o-a*i;m+=g,h+=(s+a)*g,d+=(i+o)*g,n&&(g=s*l-a*r,f+=(r+l)*g,p+=g),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(m*o>0&&(m*=-1),p*o>0&&(p*=-1),!m)return null;const g=[h,d,.5*m];return n&&(g[3]=f,g[4]=.5*p),g}function o(e,t,s,i,n){const a=r(i,n);let o=t,d=t+a,f=0,m=0,p=0,g=0;for(let t=0,r=s-1;t<r;t++,o+=a,d+=a){const t=e[o],s=e[o+1],r=e[o+2],n=e[d],a=e[d+1],_=e[d+2],y=i?u(t,s,r,n,a,_):l(t,s,n,a);if(y)if(f+=y,i){const e=h(t,s,r,n,a,_);m+=y*e[0],p+=y*e[1],g+=y*e[2]}else{const e=c(t,s,n,a);m+=y*e[0],p+=y*e[1]}}return f>0?i?[m/f,p/f,g/f]:[m/f,p/f]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function l(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function u(e,t,s,i,r,n){const a=i-e,o=r-t,l=n-s;return Math.sqrt(a*a+o*o+l*l)}function c(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function h(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},7673:(e,t,s)=>{s.d(t,{Z:()=>be});var i=s(20102),r=s(22974),n=s(70586),a=s(69801),o=s(67900),l=s(60437),u=s(24470),c=s(20322),h=s(33955),d=s(38581),f=s(8744),m=s(74669),p=s(41534);const g=new class{constructor(e,t){this._cache=new m.Z(e),this._invalidCache=new m.Z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=p.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),_="feature-store:unsupported-query",y=" as ",I=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeDate"]);function T(e,t){if(!t)return!0;const s=g.get(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"where clause is not standard",{where:t});return E(e,s.fieldNames,"where clause contains missing fields"),!0}function x(e,t,s){if(!t)return!0;const r=g.get(t,e);if(!r)throw new i.Z(_,"invalid SQL expression",{having:t});if(!r.isAggregate)throw new i.Z(_,"having does not contain a valid aggregate function",{having:t});const n=r.fieldNames;if(E(e,n,"having contains missing fields"),!r.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,n=e.has(r)&&e.get(r).name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t;return(e.has(s)&&e.get(s).name)===n&&r.toLowerCase().trim()===i}))})))throw new i.Z(_,"expressions in having should also exist in outStatistics",{having:t});return!0}function S(e,t){return e?g.get(e,t):null}function E(e,t,s,r=!0){const n=[];for(const s of t)if("*"!==s&&!e.has(s))if(r){const t=b(s);try{const s=S(t,e);if(!s)throw new i.Z(_,"invalid SQL expression",{where:t});if(!s.isStandardized)throw new i.Z(_,"expression is not standard",{clause:s});E(e,s.fieldNames,"expression contains missing fields")}catch(e){const t=e&&e.details;if(t&&(t.clause||t.where))throw e;t&&t.missingFields?n.push(...t.missingFields):n.push(s)}}else n.push(s);if(n.length)throw new i.Z(_,s,{missingFields:n})}function b(e){return e.split(y)[0]}function R(e){return e.split(y)[1]}function F(e,t){const s=t.get(e);return!!s&&!I.has(s.type)}var v=s(37427),w=s(61159),A=s(82397),N=s(98732),V=s(8418);class C{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&-1===i.indexOf("*")){this.outFields=i;let e=0;for(const t of i){const i=b(t),r=this.fieldsIndex.get(i),n=r?null:S(i,s),a=r?r.name:R(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i).clause:s||(r=S(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r.calculateValue(e,this.featureAdapter)}getNormalizedValue(e,t){const s=t.normalizationType,i=t.normalizationTotal;let r=this.getFieldValue(e,t.field,t.fieldInfo);if(s&&Number.isFinite(r)){const n=this.getFieldValue(e,t.normalizationField,t.normalizationFieldInfo);r=(0,V.fk)(r,s,n,i)}return r}getExpressionValue(e,t,s){const i={attributes:this.featureAdapter.getAttributes(e)},r=s.createExecContext(i,t.viewInfo);return s.executeFunction(t.compiledFunc,r)}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testFeature(e,this.featureAdapter)}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:S(t,this.fieldsIndex)}),this._fieldDataCache.get(t).clause.testSet(e,this.featureAdapter)}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if((0,n.Wi)(e)||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var P,M,O=s(17590),k=s(11490),Q=s(35671),z=s(59266);class D{constructor(e,t,s){this.items=e,this.queryGeometry=t,this.definitionExpression=s.definitionExpression,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.fieldsIndex=s.fieldsIndex,this.timeInfo=s.timeInfo,this.featureAdapter=s.featureAdapter,this.aggregateAdapter=s.aggregateAdapter}get size(){return this.items.length}createQueryResponseForCount(e){const t=new C(e,this.featureAdapter,this.fieldsIndex);if(!e.outStatistics)return t.countDistinctValues(this.items);const{groupByFieldsForStatistics:s,having:i}=e;if(!(null==s?void 0:s.length))return 1;const r=new Map,n=new Map,a=new Set,o=e.outStatistics;for(const e of o){const{statisticType:o}=e,l="exceedslimit"!==o?e.onStatisticField:void 0;if(!n.has(l)){const e=[];for(const i of s){const s=this._getAttributeValues(t,i,r);e.push(s)}n.set(l,this._calculateUniqueValues(e,t.returnDistinctValues))}const u=n.get(l);for(const e in u){const{data:s,items:r}=u[e],n=s.join(",");i&&!t.validateItems(r,i)||a.add(n)}}return a.size}createQueryResponse(e){let t;return t=e.outStatistics?e.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(e):this._createStatisticsQueryResponse(e):this._createFeatureQueryResponse(e),e.returnQueryGeometry&&((0,f.JY)(e.outSR)&&!(0,f.fS)(this.queryGeometry.spatialReference,e.outSR)?t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...(0,v.iV)(this.queryGeometry,this.queryGeometry.spatialReference,e.outSR)}):t.queryGeometry=(0,k.S2)({spatialReference:e.outSR,...this.queryGeometry})),t}createSnappingResponse(e,t){const s=this.featureAdapter,i=function(e,t){return e?t?4:3:t?3:2}(this.hasZ,this.hasM),{x:r,y:a}=e.point,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h=this._getPointCreator(e.point,this.spatialReference,t);for(const t of this.items){const d=s.getGeometry(t);if((0,n.Wi)(d))continue;const{coords:f,lengths:m}=d;if(e.types&P.EDGE){let e=0;for(let n=0;n<m.length;n++){const c=m[n];for(let n=0;n<c;n++,e+=i){const d=f[e],m=f[e+1];if(n!==c-1){const n=f[e+i],c=f[e+i+1],{x:p,y:g}=G(r,a,d,m,n,c),_=(r-p)/o,y=(a-g)/l,I=_*_+y*y;I<=1&&u.candidates.push({type:"edge",objectId:s.getObjectId(t),distance:Math.sqrt(I),target:h(p,g),start:h(d,m),end:h(n,c)})}}}}if(e.types&P.VERTEX){const e=c?f.length-i:f.length;for(let n=0;n<e;n+=i){const e=f[n],i=f[n+1],c=(r-e)/o,d=(a-i)/l,m=c*c+d*d;m<=1&&u.candidates.push({type:"vertex",objectId:s.getObjectId(t),distance:Math.sqrt(m),target:h(e,i)})}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s){const i=(0,n.pC)(s)&&!(0,f.fS)(t,s)?e=>(0,v.iV)(e,t,s):e=>e;return null!=e.z&&null!=e.m?(t,s)=>i({x:t,y:s,z:e.z,m:e.m}):null!=e.z?(t,s)=>i({x:t,y:s,z:e.z}):null!=e.m?(t,s)=>i({x:t,y:s,m:e.m}):(e,t)=>i({x:e,y:t})}executeAttributesQuery(e){const t=S(e.where,this.fieldsIndex);if(!t)return Promise.resolve(this);if(t.isStandardized){let s=0;const i=[];for(const e of this.items)t.testFeature(e,this.featureAdapter)&&(i[s++]=e);const r=new D(i,this.queryGeometry,this);return r.definitionExpression=e.where,Promise.resolve(r)}return Promise.reject(new TypeError("Where clause is not standardized"))}executeAggregateIdsQuery(e){if(!e.aggregateIds||!e.aggregateIds.length||(0,n.Wi)(this.aggregateAdapter))return Promise.resolve(this);const t=new Set;for(const s of e.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeObjectIdsQuery(e){if(!e.objectIds||!e.objectIds.length)return Promise.resolve(this);const t=new Set(e.objectIds),s=this.featureAdapter.getObjectId;return Promise.resolve(new D(this.items.filter((e=>t.has(s(e)))),this.queryGeometry,this))}executeTimeQuery(e){const t=(0,O.y)(this.timeInfo,e.timeExtent,this.featureAdapter);if(!(0,n.pC)(t))return Promise.resolve(this);const s=this.items.filter(t);return Promise.resolve(new D(s,this.queryGeometry,this))}filterLatest(){const{trackIdField:e,startTimeField:t,endTimeField:s}=this.timeInfo,i=s||t,r=new Map,n=this.featureAdapter.getAttribute;for(const t of this.items){const s=n(t,e),a=n(t,i),o=r.get(s);(!o||a>n(o,i))&&r.set(s,t)}const a=Array.from(r.values());return Promise.resolve(new D(a,this.queryGeometry,this))}async project(e){if(!e||(0,f.fS)(this.spatialReference,e))return this;const t=this.featureAdapter,s=(await(0,v.oj)(this.items.map((e=>(0,k.Op)(this.geometryType,this.hasZ,this.hasM,t.getGeometry(e)))),this.spatialReference,e)).map(((e,s)=>t.cloneWithGeometry(this.items[s],(0,N.GH)(e,this.hasZ,this.hasM))));return new D(s,this.queryGeometry,{definitionExpression:this.definitionExpression,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:e,fieldsIndex:this.fieldsIndex,timeInfo:this.timeInfo,featureAdapter:this.featureAdapter})}async createSummaryStatisticsResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,minValue:o,maxValue:l,scale:u}=t,c=this.fieldsIndex.isDateField(s),h=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:u}),d=(0,V.S5)({normalizationType:n,normalizationField:r,minValue:o,maxValue:l}),f=this.fieldsIndex.get(s),m={value:.5,fieldType:null==f?void 0:f.type},p=(0,Q.qN)(f)?(0,V.H0)({values:h,supportsNullCount:d,percentileParams:m}):(0,V.i5)({values:h,minValue:o,maxValue:l,useSampleStdDev:!n,supportsNullCount:d,percentileParams:m});return(0,V.F_)(p,c)}async createUniqueValuesResponse(e,t){const{field:s,valueExpression:i,domain:r,returnAllCodedValues:n,scale:a}=t,o=await this._getDataValues(e,{field:s,valueExpression:i,scale:a}),l=(0,V.eT)(o);return(0,V.Qm)(l,r,n)}async createClassBreaksResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d}),m=(0,V.G2)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numClasses:h});return(0,V.DL)(m,o)}async createHistogramResponse(e,t){const{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h,scale:d}=t,f=await this._getDataValues(e,{field:s,valueExpression:i,normalizationField:r,normalizationType:n,normalizationTotal:a,scale:d});return(0,V.oF)(f,{field:s,normalizationField:r,normalizationType:n,normalizationTotal:a,classificationMethod:o,standardDeviationInterval:l,minValue:u,maxValue:c,numBins:h})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=t[1]&&"desc"===t[1].toLowerCase(),o=(0,V.Lq)(null==n?void 0:n.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,m=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:m,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,k.S2)(l||a),transform:u&&(0,A.vY)(u)||null}}_createFeatures(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,m=r&&d,p=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,A.vY)(a);if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,k.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,k.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,m,p)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const I=c||0;if(null!=h){const e=I+h;g=g.slice(I,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics)if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=this.hasZ?this.hasM?4:3:this.hasM?3:2,s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+((0,n.pC)(i)&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}_createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new C(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,m=f&&u[0],p=f&&!this.fieldsIndex.get(m);for(const e of l){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,I=f&&1===d&&(_===m||p)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,o.returnDistinctValues))}const e=n.get(_);for(const t in e){const{count:s,data:r,items:n,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};let t=null;if(I)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t,u.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:`EXPR_${s+1}`]=r[s])),a.set(d,e)}}}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=null!=s&&s.has(r)?s.get(r):(0,Q.qN)(this.fieldsIndex.get(r))?(0,V.H0)({values:t,returnDistinct:i}):(0,V.i5)({values:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s),l={value:n,orderBy:a,fieldType:null==o?void 0:o.type,isDiscrete:"percentile_disc"===r};return(0,V.XL)(t,l)}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_getAttributeNormalizedValues(e,t){return this.items.map((s=>e.getNormalizedValue(s,{field:t.field,fieldInfo:this.fieldsIndex.get(t.field),normalizationField:t.normalizationField,normalizationFieldInfo:this.fieldsIndex.get(t.normalizationField),normalizationType:t.normalizationType,normalizationTotal:t.normalizationTotal})))}async _getAttributeExpressionValues(e,t,s){const{arcadeUtils:i}=await(0,z.LC)(),r=i.createFunction(t),n=s&&i.getViewInfo(s);return this.items.map((t=>e.getExpressionValue(t,{compiledFunc:r,viewInfo:n},i)))}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");t?null==s[o]&&(s[o]={count:1,data:a,items:[r],itemPositions:[n]}):null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t){const s=new C(e,this.featureAdapter,this.fieldsIndex),{valueExpression:i,field:r,normalizationField:n,normalizationType:a,normalizationTotal:o,scale:l}=t,u=i?{viewingMode:"map",scale:l,spatialReference:e.outSR||this.spatialReference}:null;return i?this._getAttributeExpressionValues(s,i,u):this._getAttributeNormalizedValues(s,{field:r,normalizationField:n,normalizationType:a,normalizationTotal:o})}}function G(e,t,s,i,r,n){const a=r-s,o=n-i,l=a*a+o*o,u=(e-s)*a+(t-i)*o,c=Math.min(1,Math.max(0,u/l));return{x:s+a*c,y:i+o*c}}(M=P||(P={}))[M.NONE=0]="NONE",M[M.EDGE=1]="EDGE",M[M.VERTEX=2]="VERTEX";var L=s(10402),U=s(99514),Z=s(43697),q=s(15923),j=s(61247),B=s(92604),Y=s(54790),H=s(44553),W=s(95330),X=s(17445),J=s(76882),$=s(43050),K=s(5600),ee=(s(67676),s(80442),s(75215),s(52011));let te=class extends q.Z{constructor(){super(...arguments),this._tasks=new Array,this.running=!1}get length(){return this._tasks.length}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.push(new se(i,r,e,t,s))))}unshift(e,t,s){return this.running=!0,new Promise(((i,r)=>this._tasks.unshift(new se(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,W.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,W.zE)());else{const i=s?t.abortCallback((0,W.zE)()):t.callback(e);(0,W.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this.running=this._tasks.length>0,!0}cancelAll(){const e=(0,W.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this.running=!1}};(0,Z._)([(0,K.Cb)()],te.prototype,"running",void 0),te=(0,Z._)([(0,ee.j)("esri.layers.support.PromiseQueue")],te);class se{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}let ie=class extends q.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Z._)([(0,K.Cb)()],ie.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Z._)([(0,K.Cb)()],ie.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ie=(0,Z._)([(0,ee.j)("esri.views.support.DebugFlags")],ie);const re=new ie,ne=B.Z.getLogger("esri.views.support.Scheduler");var ae;!function(e){e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="cloud generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(ae||(ae={}));const oe=new Map([[ae.RESOURCE_CONTROLLER,0],[ae.SLIDE,0],[ae.STREAM_DATA_LOADER,0],[ae.ELEVATION_QUERY,0],[ae.TERRAIN_SURFACE,1],[ae.SURFACE_GEOMETRY_UPDATES,1],[ae.GRAPHICS_CORE,2],[ae.I3S_CONTROLLER,2],[ae.POINT_CLOUD_LAYER,2],[ae.FEATURE_TILE_FETCHER,2],[ae.OVERLAY,4],[ae.STAGE,4],[ae.GRAPHICS_DECONFLICTOR,4],[ae.FILTER_VISIBILITY,4],[ae.SCALE_VISIBILITY,4],[ae.FRUSTUM_VISIBILITY,4],[ae.POINT_OF_INTEREST_FREQUENT,6],[ae.POINT_OF_INTEREST_INFREQUENT,30],[ae.LABELER,8],[ae.FEATURE_QUERY_ENGINE,8],[ae.FEATURE_TILE_TREE,16],[ae.FEATURE_TILE_TREE_ACTIVE,0],[ae.ELEVATION_ALIGNMENT,12],[ae.TEXT_TEXTURE_ATLAS,12],[ae.CLOUDS_GENERATOR,12],[ae.TEXTURE_UNLOAD,12],[ae.LINE_OF_SIGHT_TOOL,16],[ae.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[ae.SNAPPING,0],[ae.SHADOW_ACCUMULATOR,30]]);function le(e){return oe.has(e)?oe.get(e):"number"==typeof e?e:1}var ue;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(ue||(ue={}));const ce=(0,J.HA)(6.5),he=(0,J.HA)(1),de=(0,J.HA)(30),fe=(0,J.HA)(1e3/30),me=(0,J.HA)(100);var pe,ge;!function(e){let t=class extends q.Z{constructor(e){super(e),this.updating=!0,this._microTaskQueued=!1,this.performanceInfo={total:new Y.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=null,this._state=ue.INTERACTING,this._tasks=new H.Z,this._runQueue=new H.Z,this._load=0,this._idleStateCallbacks=new H.Z,this._idleUpdatesStartFired=!1,this._maxReschedule=Ie,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,$.S1)(re,"SCHEDULER_LOG_SLOW_TASKS",(e=>this._debug=e)),this._budget=new i(e.nowFunc);for(const e of Object.keys(ae))this.performanceInfo.tasks.set(ae[e],new Y.Z(ae[e]));let t;const s=this;this._test={get state(){return(0,n.Pt)(t,s._state)},set state(e){t=e},FRAME_SAFETY_BUDGET:ce,INTERACTING_BUDGET:fe,IDLE_BUDGET:me,get budget(){return s._budget.budget},usedBudget:0,setBudget:e=>s._budget=e,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this.updating=!1}activate(){this._budget.done||this._microTaskQueued||(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.done||(this._maxReschedule=Ie,this._schedule(),this.frame()))})))}registerTask(e,t){const i=le(e),r=new s(this,e,t,i);return this._tasks.push(r),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new Y.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===ue.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===ue.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get now(){return this.nowFunc()}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==ue.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return(0,n.Wi)(this._test.state)?this._state:this._test.state}updateBudget(e){this._test.usedBudget=0;let t=ce,s=e.frameDuration,i=he;switch(this.state){case ue.IDLE:t=(0,J.HA)(0),s=(0,J.HA)(Math.max(me,e.frameDuration)),i=de;break;case ue.INTERACTING:s=(0,J.HA)(Math.max(fe,e.frameDuration));case ue.ANIMATING:}return s=(0,J.HA)(s-e.elapsedFrameTime-t),this.state!==ue.IDLE&&s<he&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,J.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._maxReschedule=Ie,this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case ue.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case ue.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,J.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e)}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ge.SCHEDULED;let t=ge.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ge.READY:t!==ge.READY&&(t=ge.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){if(this._maxReschedule<=0)return!1;for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.some((t=>t===e))&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this.updating=!1,!1;this._maxReschedule===Ie&&(this._maxReschedule=t),--this._maxReschedule}return this.updating=!0,!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)}catch(e){ne.error(`Exception in task "${s.name}"`,e)}s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&this._budget.elapsed>2*this._budget.budget&&console.log("Task",s.name,"used",this._budget.elapsed,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this.updating=this._tasks.some((e=>e.needsUpdate)),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this.updating=this._tasks.some((e=>e.needsUpdate)),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(ae))this._frameTaskTimes.set(ae[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};(0,Z._)([(0,K.Cb)()],t.prototype,"updating",void 0),(0,Z._)([(0,K.Cb)()],t.prototype,"nowFunc",void 0),t=(0,Z._)([(0,ee.j)("esri.views.support.Scheduler")],t),e.Scheduler=t;let s=class extends q.Z{constructor(e,t,s,i){super({}),this._scheduler=e,this.name=t,this._basePriority=i,this.runtime=0,this._queue=new te,this._handles=new j.Z,this.schedulePriority=this._basePriority,this.task=(0,n.pC)(s)?s:this._queue,this._handles.add((0,X.gx)((()=>this.task.running),(()=>e.activate())))}get updating(){return this._queue.running}normalizeCtorArgs(){return{}}remove(){this.processQueue(_e),this._scheduler.removeTask(this),this.schedule=ye.schedule,this.reschedule=ye.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=le(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}};(0,Z._)([(0,K.Cb)({constructOnly:!0})],s.prototype,"task",void 0),(0,Z._)([(0,K.Cb)({readOnly:!0})],s.prototype,"updating",null),s=(0,Z._)([(0,ee.j)("esri.views.support.SchedulerTask")],s);class i{constructor(e){this.now=e,this._begin=0,this._budget=0,this._state=ue.IDLE,this._didWork=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&(this._didWork=!0),!0)}get done(){return this._didWork&&this.elapsed>=this._budget&&this._enabled}get budget(){return this._budget}madeProgress(){this._didWork=!0}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this._didWork=!1}get remaining(){return Math.max(this._budget-this.elapsed,0)}get elapsed(){return this.now()-this._begin}resetProgress(){this._didWork=!1}get hasProgressed(){return this._didWork}}e.Budget=i}(pe||(pe={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ge||(ge={}));const _e=(()=>{const e=new pe.Budget((()=>performance.now()));return e.enabled=!1,e})(),ye=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,W.Hc)(t)){const e=(0,W.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,W.gx)(e(_e))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ie=Number.MAX_SAFE_INTEGER,Te="feature-store:unsupported-query",xe=new Set,Se=new a.WJ(2e6);let Ee=0;class be{constructor(e){this.capabilities={query:w.g},this.geometryType=e.geometryType,this.hasM=e.hasM,this.hasZ=e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new a.Xq(Ee+++"$$",Se)),this.fieldsIndex=new U.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get fullExtent(){const e=this.featureStore.fullBounds;return e?{xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:(0,k.S2)(this.spatialReference)}:null}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,O.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache&&this._geometryQueryCache.clear(),this._allItems=null,this._timeExtent=null}async executeQuery(e={},t){let s,i=(0,r.d9)(e);try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(i)}async executeQueryForCount(e={},t){let s=(0,r.d9)(e);s.returnGeometry=!1,s.returnCentroid=!1,s.outSR=null;try{s=await this._schedule((()=>(0,k.Up)(s,this.definitionExpression,this.spatialReference)),t),s=await this._reschedule((()=>this._checkQuerySupport(s)),t);let e=await this._reschedule((()=>this._executeGeometryQuery(s,t)),t);return e=await this._reschedule((()=>e.executeAggregateIdsQuery(s)),t),e=await this._reschedule((()=>e.executeObjectIdsQuery(s)),t),e=await this._reschedule((()=>e.executeTimeQuery(s)),t),e=await this._reschedule((()=>e.executeAttributesQuery(s)),t),e.createQueryResponseForCount(s)}catch(e){if(e!==k.vF)throw e;return 0}}async executeQueryForExtent(e={},t){let s,i=(0,r.d9)(e);const n=i.outSR;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),i.returnGeometry=!0,i.returnCentroid=!1,i.outSR=null,s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.size;if(!e)return{count:e,extent:null};(0,l.t8)(Fe,l.Gv),this.featureStore.forEachBounds(s.items,(e=>(0,l.TC)(Fe,e)),Re);const r={xmin:Fe[0],ymin:Fe[1],xmax:Fe[3],ymax:Fe[4],spatialReference:(0,k.S2)(this.spatialReference)};this.hasZ&&isFinite(Fe[2])&&isFinite(Fe[5])&&(r.zmin=Fe[2],r.zmax=Fe[5]);const a=(0,v.iV)(r,s.spatialReference,n);if(a.spatialReference=(0,k.S2)(n||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:e,extent:a}}catch(e){if(e===k.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e={},t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e={},t){let s,i=(0,r.d9)(e);i.returnGeometry=!1,i.returnCentroid=!1,i.outSR=null;try{i=await this._schedule((()=>(0,k.Up)(i,this.definitionExpression,this.spatialReference)),t),i=await this._reschedule((()=>this._checkQuerySupport(i)),t),s=await this._reschedule((()=>this._executeGeometryQuery(i,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(i)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(i)),t),s=await this._reschedule((()=>s.executeTimeQuery(i)),t),s=await this._reschedule((()=>s.executeAttributesQuery(i)),t);const e=s.items,r=new Set;return await this._reschedule((()=>{for(const t of e)r.add(s.featureAdapter.getObjectId(t))}),t),r}catch(e){if(e===k.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===P.NONE)return{candidates:[]};const a=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),o=!(0,f.fS)(s.spatialReference,this.spatialReference);o&&await(0,v._W)(s.spatialReference,this.spatialReference);const l="number"==typeof i?i:i.x,u="number"==typeof i?i:i.y,c={xmin:s.x-l,xmax:s.x+l,ymin:s.y-u,ymax:s.y+u,spatialReference:s.spatialReference},m=o?(0,v.iV)(c,this.spatialReference):c;if(!m)return{candidates:[]};const p=(await(0,d.aX)((0,h.im)(s),null,{signal:t}))[0],g=(await(0,d.aX)((0,h.im)(m),null,{signal:t}))[0];if((0,n.Wi)(p)||(0,n.Wi)(g))return{candidates:[]};let _=new D(this._searchFeatures(this._getQueryBBoxes(g.toJSON())),null,this);_=await this._reschedule((()=>_.executeObjectIdsQuery(a)),t),_=await this._reschedule((()=>_.executeTimeQuery(a)),t),_=await this._reschedule((()=>_.executeAttributesQuery(a)),t);const y=p.toJSON(),I=o?(0,v.iV)(y,this.spatialReference):y,T=o?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:i;return _.createSnappingResponse({...e,point:I,distance:T},s.spatialReference)}async executeQueryForLatestObservations(e={},t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new i.Z(Te,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});let s,n=(0,r.d9)(e);try{n=await this._schedule((()=>(0,k.Up)(n,this.definitionExpression,this.spatialReference)),t),n=await this._reschedule((()=>this._checkQuerySupport(n)),t),s=await this._reschedule((()=>this._executeGeometryQuery(n,t)),t),s=await this._reschedule((()=>s.executeAggregateIdsQuery(n)),t),s=await this._reschedule((()=>s.executeObjectIdsQuery(n)),t),s=await this._reschedule((()=>s.executeTimeQuery(n)),t),s=await this._reschedule((()=>s.executeAttributesQuery(n)),t),s=await this._reschedule((()=>s.filterLatest()),t)}catch(e){if(e!==k.vF)throw e;s=new D([],null,this)}return s.createQueryResponse(n)}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(e,t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,valueExpression:r}=t;return(await this._getQueryEngineResultForStats(e,{field:i,valueExpression:r},s)).createUniqueValuesResponse(e,t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(e,t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(e,t)}async _schedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(_e)}async _reschedule(e,t){return(0,n.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(_e)}_getAll(){if(!this._allItems){const e=[];this.featureStore.forEach((t=>e.push(t))),this._allItems=new D(e,null,this)}return this._allItems}async _executeGeometryQuery(e,t){const{geometry:s,outSR:i,spatialRel:r,returnGeometry:a,returnCentroid:o}=e,l=a||o,u=(0,f.JY)(i)&&!(0,f.fS)(this.spatialReference,i),c=this._geometryQueryCache?u&&l?JSON.stringify({geometry:s,spatialRelationship:r,outSpatialReference:i}):JSON.stringify({geometry:s,spatialRelationship:r}):null;if(c){const e=this._geometryQueryCache.get(c);if(!(0,n.o8)(e))return e}const h=async e=>{if(u&&l){const t=await e.project(i);return c&&this._geometryQueryCache.put(c,t,t.size||1),t}return c&&this._geometryQueryCache.put(c,e,e.size||1),e};if(!s)return h(this._getAll());const d=this.featureAdapter;if("esriSpatialRelDisjoint"===r){const e=this._searchFeatures(this._getQueryBBoxes(s));if(!e.length)return h(this._getAll());let i,n;const a=new Set;for(const t of e)a.add(d.getObjectId(t));await this._reschedule((()=>{let e=0;i=new Array(a.size),this.featureStore.forEach((t=>i[e++]=t)),n=a}),t);const o=await this._reschedule((async()=>{const e=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM);return new D(await this._runSpatialFilter(i,(t=>!n.has(d.getObjectId(t))||e(d.getGeometry(t))),t),s,this)}),t);return h(o)}const m=this._searchFeatures(this._getQueryBBoxes(s));if(!m.length){const e=new D([],s,this);return c&&this._geometryQueryCache.put(c,e,e.size||1),e}if(this._canExecuteSoloPass(s,e))return h(new D(m,s,this));const p=await(0,L.cW)(r,s,this.geometryType,this.hasZ,this.hasM),g=await this._runSpatialFilter(m,(e=>p(d.getGeometry(e))),t);return h(new D(g,s,this))}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,n.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_canExecuteSoloPass(e,t){const{geometryType:s}=this,{spatialRel:i}=t;return(0,L.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===s&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i||"esriSpatialRelWithin"===i))}_getQueryBBoxes(e){if((0,L.hN)(e)){if((0,h.YX)(e))return[(0,u.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,h.oU)(e))return e.rings.map((e=>(0,u.al)(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,c.$P)((0,u.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>{xe.add(e)}));const t=new Array(xe.size);let s=0;return xe.forEach((e=>t[s++]=e)),xe.clear(),t}async _checkStatisticsSupport(e,t){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsParamsSupport(t),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,z.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new i.Z(Te,"params should have at least a field or valueExpression",{params:e});E(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if(e.distance<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.Z(Te,"Unsupported query options",{query:e});return Promise.all([this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),(0,L.P0)(e,this.geometryType,this.spatialReference),(0,v._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.indexOf(e)>-1?i.split(e)[0]:i.indexOf(t)>-1?i.split(t)[0]:s})).filter((e=>-1===a.indexOf(e)));E(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)E(this.fieldsIndex,t,"outFields contains missing fields");else if(r)throw new i.Z(Te,"outFields should be specified for returnDistinctValues",{query:e});T(this.fieldsIndex,e.where)}async _checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,n=s&&s.length,a=t&&t.length;if(r){if(!n||!a)throw new i.Z(Te,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});x(this.fieldsIndex,r,t)}if(a){if(!function(e){return e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const r=t.map((e=>e.onStatisticField));E(this.fieldsIndex,r,"onStatisticFields contains missing fields"),n&&E(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:r}=s;if("percentile_disc"!==r&&"percentile_cont"!==r||!("statisticParameters"in s)){if("count"!==r&&t&&F(t,this.fieldsIndex))throw new i.Z(Te,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new i.Z(Te,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e={},t,s){let i;e=(0,r.d9)(e);try{e=await this._schedule((()=>(0,k.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s),i=await this._reschedule((()=>this._executeGeometryQuery(e,s)),s),i=await this._reschedule((()=>i.executeAggregateIdsQuery(e)),s),i=await this._reschedule((()=>i.executeObjectIdsQuery(e)),s),i=await this._reschedule((()=>i.executeTimeQuery(e)),s),i=await this._reschedule((()=>i.executeAttributesQuery(e)),s)}catch(e){if(e!==k.vF)throw e;i=new D([],null,this)}return i}}const Re=(0,l.Ue)(),Fe=(0,l.Ue)()},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>d,iV:()=>p,oj:()=>_});var i=s(70586),r=s(44547),n=s(37455),a=s(8744),o=s(40488);const l=[0,0];function u(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,l),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,l),[s.xmax,s.ymax]=e(t.xmax,t.ymax,l),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:c(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:c(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:h(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:void 0}function c(e,t){const s=[];for(const i of e)s.push(h(i,t));return s}function h(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function d(e,t){if(!t)return;const s=Array.isArray(e)?e.map((e=>(0,i.pC)(e.geometry)&&e.geometry.spatialReference)):[e];await(0,r.iQ)(s.map((e=>({source:e,dest:t}))))}const f=u.bind(null,o.hG),m=u.bind(null,o.R6);function p(e,t,s){return e?(s||(s=t,t=e.spatialReference),(0,a.JY)(t)&&(0,a.JY)(s)&&!(0,a.fS)(t,s)?(0,o.Q8)(t,s)?(0,a.sS)(s)?f(e):m(e):(0,r.oj)(n.N,[e],t,s,null)[0]:e):e}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s){if(!e||!e.length||!t||!s||(0,a.fS)(t,s))return e;const i={geometries:e,inSpatialReference:t,outSpatialReference:s,resolve:null};return this._jobs.push(i),new Promise((e=>{i.resolve=e,null===this._timer&&(this._timer=setTimeout(this._process,10))}))}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:l}=e;(0,o.Q8)(s,i)?(0,a.sS)(i)?l(t.map(f)):l(t.map(m)):l((0,r.oj)(n.N,t,s,i,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s){return g.push(e,t,s)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),f=s(5428),m=s(37427),p=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},T={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function x(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,p.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e=function(e){return"mesh"===e?n.h_:(0,n.IY)(e)}(i);return Promise.resolve((s=>e(t,(0,p.Op)(i,o,l,s))))}return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,p.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return!0===y[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return!0===I[(0,a.Ji)(e)]}(n))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return!0===T[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,m._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(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}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),o=e.getAttribute(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{vF:()=>m,S2:()=>E,Op:()=>T,Up:()=>x,j6:()=>S,EG:()=>I});var i=s(35454),r=s(70586),n=s(67900),a=s(49600),o=s(33955),l=s(38581),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.Xn({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),m=Object.freeze({}),p=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function I(e,t,s,i=e.hasZ,n=e.hasM){if((0,r.Wi)(t))return null;const a=e.hasZ&&i,o=e.hasM&&n;if(s){const r=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,n);return(0,c.fQ)(r,a,o)}return(0,c.fQ)(t,a,o)}function T(e,t,s,i,n,a,o=t,l=s){const u=t&&o,h=s&&l,d=(0,r.pC)(i)?"coords"in i?i:i.geometry:null;if((0,r.Wi)(d))return null;if(n){let i=(0,c.zj)(g,d,t,s,e,n,o,l);return a&&(i=(0,c.Nh)(_,i,u,h,e,a)),y[e](i,u,h)}if(a){const i=(0,c.Nh)(_,d,t,s,e,a,o,l);return y[e](i,u,h)}return(0,c.hY)(p,d,t,s,o,l),y[e](p,u,h)}async function x(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();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(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),S(e,t,s)}async function S(e,t,i){if(!e)return null;let{where:c}=e;if(e.where=c=c&&c.trim(),(!c||/^1 *= *1$/.test(c)||t&&t===c)&&(e.where=null),!e.geometry)return e;let h=await async function(e){const{geometry:t,distance:i,units:r}=e;if(null==i||"vertexAttributes"in t)return t;const a=t.spatialReference,o=r?f.fromJSON(r):(0,n.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?t:await(0,d._W)(a,u.Zn).then((()=>(0,d.iV)(t,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,i,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;h=(0,a.aO)(h),h.spatialReference=t}e.geometry=h,await(0,d._W)(h.spatialReference,i);const p=(await(0,l.aX)((0,o.im)(h)))[0];if((0,r.Wi)(p))throw m;const g=p.toJSON(),_=await(0,d.iV)(g,g.spatialReference,i);if(!_)throw m;return _.spatialReference=i,e.geometry=_,e}function E(e){return e&&b in e?JSON.parse(JSON.stringify(e,R)):e}const b="_geVersion",R=(e,t)=>e!==b?t:void 0},8418:(e,t,s)=>{s.d(t,{G2:()=>b,oF:()=>F,XL:()=>g,i5:()=>p,H0:()=>m,eT:()=>x,Qm:()=>S,Lq:()=>_,fk:()=>E,S5:()=>f,F_:()=>T,DL:()=>R});var i=s(57316);function r(e,t){return Number(e.toFixed(t))}function n(e){const t=e.definition,{classificationMethod:s,breakCount:i,normalizationType:n,definedInterval:l}=t,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const h=c[0],d=c[c.length-1];if("equal-interval"===s)if(c.length>=i){const e=(d-h)/i;let t=h;for(let s=1;s<i;s++){const i=r(h+s*e,6);u.push({minValue:t,maxValue:i,label:a(t,i,n)}),t=i}u.push({minValue:t,maxValue:d,label:a(t,d,n)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:a(e,e,n)})}));else if("natural-breaks"===s){const t=function(e){const t=[],s=[];let i=Number.MIN_VALUE,r=1,n=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,s[n]=r):null!==o&&(t.push(o),i=o,r=1,s.push(r),n++)}return{uniqueValues:t,valueFrequency:s}}(c),s=e.valueFrequency||t.valueFrequency,l=o(t.uniqueValues,s,i);let f=h;for(let e=1;e<i;e++)if(t.uniqueValues.length>e){const s=r(t.uniqueValues[l[e]],6);u.push({minValue:f,maxValue:s,label:a(f,s,n)}),f=s}u.push({minValue:f,maxValue:d,label:a(f,d,n)})}else if("quantile"===s)if(c.length>=i&&h!==d){let e=h,t=Math.ceil(c.length/i),s=0;for(let r=1;r<i;r++){let o=t+s-1;o>c.length&&(o=c.length-1),o<0&&(o=0),u.push({minValue:e,maxValue:c[o],label:a(e,c[o],n)}),e=c[o],s+=t,t=Math.ceil((c.length-s)/(i-r))}u.push({minValue:e,maxValue:d,label:a(e,d,n)})}else{let e=-1;for(let t=0;t<c.length;t++){const s=c[t];s!==e&&(e=s,u.push({minValue:e,maxValue:s,label:a(e,s,n)}),e=s)}}else if("standard-deviation"===s){const e=function(e){let t=0;for(let s=0;s<e.length;s++)t+=e[s];return t/=e.length,t}(c),t=function(e,t){let s=0;for(let i=0;i<e.length;i++){const r=e[i];s+=(r-t)*(r-t)}return s/=e.length,Math.sqrt(s)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:a(c[0],c[0],n)});else{const s=function(e,t,s,i,r){let n=Math.max(i-e,t-i)/r/s;return n=n>=1?1:n>=.5?.5:.25,n}(h,d,i,e,t)*t;let o=0,l=h;for(let t=i;t>=1;t--){const i=r(e-(t-.5)*s,6);u.push({minValue:l,maxValue:i,label:a(l,i,n)}),l=i,o++}let c=r(e+.5*s,6);u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++;for(let t=1;t<=i;t++)c=o===2*i?d:r(e+(t+.5)*s,6),u.push({minValue:l,maxValue:c,label:a(l,c,n)}),l=c,o++}}else if("defined-interval"===s){if(!l)return u;const e=c[0],t=c[c.length-1],s=Math.ceil((t-e)/l);let i=e;for(let t=1;t<s;t++){const s=r(e+t*l,6);u.push({minValue:i,maxValue:s,label:a(i,s,n)}),i=s}u.push({minValue:i,maxValue:t,label:a(i,t,n)})}return u}function a(e,t,s){let i=null;return i=e===t?s&&"percent-of-total"===s?e+"%":e.toString():s&&"percent-of-total"===s?e+"% - "+t+"%":e+" - "+t,i}function o(e,t,s){const i=e.length,r=[];s>i&&(s=i);for(let e=0;e<s;e++)r.push(Math.round(e*i/s-1));r.push(i-1);let n=l(r,e,t,s);return function(e,t,s,i,r,n){let a=0,o=0,l=0,c=0,h=!0;for(let d=0;d<2&&h;d++){0===d&&(h=!1);for(let d=0;d<n-1;d++)for(;s[d+1]+1!==s[d+2];){s[d+1]=s[d+1]+1;const n=u(d,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d+1,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d]+t[d+1])){s[d+1]=s[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=l,e[d+1]=c,h=!0}for(let d=n-1;d>0;d--)for(;s[d]!==s[d-1]+1;){s[d]=s[d]-1;const n=u(d-1,s,i,r);l=n.sbMean,a=n.sbSdcm;const f=u(d,s,i,r);if(c=f.sbMean,o=f.sbSdcm,!(a+o<t[d-1]+t[d])){s[d]=s[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=l,e[d]=c,h=!0}}return h}(n.mean,n.sdcm,r,e,t,s)&&(n=l(r,e,t,s)),r}function l(e,t,s,i){let r=[],n=[],a=[],o=0;const l=[],c=[];for(let r=0;r<i;r++){const i=u(r,e,t,s);l.push(i.sbMean),c.push(i.sbSdcm),o+=c[r]}let h,d=o,f=!0;for(;f||o<d;){f=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let s=0;s<i;s++)for(let r=e[s]+1;r<=e[s+1];r++)if(h=t[r],s>0&&r!==e[s+1]&&Math.abs(h-l[s])>Math.abs(h-l[s-1]))e[s]=r;else if(s<i-1&&e[s]!==r-1&&Math.abs(h-l[s])>Math.abs(h-l[s+1])){e[s+1]=r-1;break}d=o,o=0,n=[],a=[];for(let r=0;r<i;r++){n.push(l[r]),a.push(c[r]);const i=u(r,e,t,s);l[r]=i.sbMean,c[r]=i.sbSdcm,o+=c[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],l[t]=n[t],c[t]=a[t];o=d}return{mean:l,sdcm:c}}function u(e,t,s,i){let r=0,n=0;for(let a=t[e]+1;a<=t[e+1];a++){const e=i[a];r+=s[a]*e,n+=e}n<=0&&console.log("Exception in Natural Breaks calculation");const a=r/n;let o=0;for(let r=t[e]+1;r<=t[e+1];r++)o+=i[r]*(s[r]-a)**2;return{sbMean:a,sbSdcm:o}}const c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,h=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function f(e){const t=null!=e.normalizationField||null!=e.normalizationType,s=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!s&&!i}function m(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,s=t.filter((e=>null!=e)).length,i={count:s};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=g(t,e.percentileParams)),i}function p(e){const{values:t,useSampleStdDev:s,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,a=null,o=null,l=null,u=null,c=0;const h=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=h&&e<=d&&(a+=e,r=Math.min(r,e),n=Math.max(n,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const s of t)Number.isFinite(s)&&s>=h&&s<=d&&(e+=(s-o)**2);u=s?c>1?e/(c-1):0:c>0?e/c:0,l=Math.sqrt(u)}else r=null,n=null;const f={avg:o,count:c,max:n,min:r,stddev:l,sum:a,variance:u};return i&&(f.nullcount=t.length-c),e.percentileParams&&(f.median=g(t,e.percentileParams)),f}function g(e,t){const{fieldType:s,value:i,orderBy:r,isDiscrete:n}=t,a=_(s,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,l=Math.floor(o),u=l+1,c=o%1,h=e[l],d=e[u];return u>=e.length||n||"string"==typeof h||"string"==typeof d?h:h*(1-c)+d*c}function _(e,t){const s=t?1:-1,i=function(e){return e?(e,t)=>t-e:(e,t)=>e-t}(t),r=y(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...h].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):s;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),n=new Date(t).getTime();return isNaN(r)||isNaN(n)?s:i(r,n)};if(h.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=y(t);return(t,s)=>e(I(t),I(s))}return t?(e,t)=>1:(e,t)=>-1}function y(e){return e?(e,t)=>(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0:(e,t)=>(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}function I(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function T(e,t){let s;for(s in e)d.indexOf(s)>-1&&(Number.isFinite(e[s])||(e[s]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]))})),e):e}function x(e){const t={};for(let s of e)(null==s||"string"==typeof s&&""===s.trim())&&(s=null),null==t[s]?t[s]={count:1,data:s}:t[s].count++;return{count:t}}function S(e,t,s){const i=e.count,r=[];s&&t&&"coded-value"===t.type&&t.codedValues.forEach((e=>{const t=e.code;i.hasOwnProperty(t)||(i[t]={data:t,count:0})}));for(const e in i){const t=i[e];r.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:r}}function E(e,t,s,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(s)&&0!==s&&(r=e/s);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function b(e,t){const s=function(e){const t=e.field,s=e.classificationMethod||"equal-interval",r=e.normalizationType,n=e.normalizationField,a=new i.Z;return a.classificationField=t,a.breakCount=e.breakCount,a.classificationMethod=s,a.standardDeviationInterval="standard-deviation"===s?e.standardDeviationInterval||1:void 0,a.normalizationType=r,a.normalizationField="field"===r?n:void 0,a}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||5});return e=function(e,t,s){return t=null==t?-1/0:t,s=null==s?1/0:s,e.filter((e=>Number.isFinite(e)&&e>=t&&e<=s))}(e,t.minValue,t.maxValue),function(e){const{normalizationTotal:t}=e;return{classBreaks:n(e),normalizationTotal:t}}({definition:s,values:e,normalizationTotal:t.normalizationTotal})}function R(e,t){let s=e.classBreaks;const i=s.length,r=s[0].minValue,n=s[i-1].maxValue,a="standard-deviation"===t,o=c;return s=s.map((e=>{const t=e.label,s={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o).map((e=>+e.trim()));2===e.length?(s.minStdDev=e[0],s.maxStdDev=e[1],e[0]<0&&e[1]>0&&(s.hasAvg=!0)):1===e.length&&(t.includes("<")?(s.minStdDev=null,s.maxStdDev=e[0]):t.includes(">")&&(s.minStdDev=e[0],s.maxStdDev=null))}return s})),{minValue:r,maxValue:n,classBreakInfos:s,normalizationTotal:e.normalizationTotal}}function F(e,t){const{min:s,max:i,intervals:r}=function(e,t){const{field:s,classificationMethod:i,standardDeviationInterval:r,normalizationType:n,normalizationField:a,normalizationTotal:o,minValue:l,maxValue:u}=t,c=t.numBins||10;let h=null,d=null,m=null;if(i&&"equal-interval"!==i||n){const{classBreaks:t}=b(e,{field:s,normalizationType:n,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:l,maxValue:u,numClasses:c});h=t[0].minValue,d=t[t.length-1].maxValue,m=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)h=l,d=u;else{const t=p({values:e,minValue:l,maxValue:u,useSampleStdDev:!n,supportsNullCount:f({normalizationType:n,normalizationField:a,minValue:l,maxValue:u})});h=t.min,d=t.max}m=function(e,t,s){const i=(t-e)/s,r=[];let n,a=e;for(let e=1;e<=s;e++)n=a+i,n=Number(n.toFixed(16)),r.push([a,e===s?t:n]),a=n;return r}(h,d,c)}return{min:h,max:d,intervals:m}}(e,t),n=r.map(((e,t)=>({minValue:r[t][0],maxValue:r[t][1],count:0})));for(const t of e)if(null!=t&&t>=s&&t<=i){const e=v(r,t);e>-1&&n[e].count++}return{bins:n,minValue:s,maxValue:i,normalizationTotal:t.normalizationTotal}}function v(e,t){let s=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){s=i;break}return s}}}]);