@arcgis/core 5.1.0-next.51 → 5.1.0-next.53

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 (307) hide show
  1. package/applications/Components/imageryUtils.d.ts +6 -0
  2. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +1 -0
  5. package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +1 -0
  6. package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +1 -0
  7. package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +1 -0
  8. package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +1 -0
  9. package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +1 -0
  10. package/assets/esri/core/workers/chunks/07e791530677f7e70f32.js +30 -0
  11. package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +1 -0
  12. package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +1 -0
  13. package/assets/esri/core/workers/chunks/0d8294982853308225da.js +1 -0
  14. package/assets/esri/core/workers/chunks/0fc60b4c44c4e865b699.js +2 -0
  15. package/assets/esri/core/workers/chunks/156aecac067213642aae.js +1 -0
  16. package/assets/esri/core/workers/chunks/{942e4d69b140bc2f97c9.js → 15a45e26964c2eb381a6.js} +1 -1
  17. package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +1 -0
  18. package/assets/esri/core/workers/chunks/199f70c0373f6008a545.js +1 -0
  19. package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d2af5342fbe80e2d8c60.js → 20f9f3470cad47d01803.js} +1 -1
  21. package/assets/esri/core/workers/chunks/2757cf54656b5d318b11.js +1 -0
  22. package/assets/esri/core/workers/chunks/{54420b66fd53d6e19ba5.js → 278eecd729bed2832702.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{a3174b23aabcef2fa98c.js → 29c91b5c9ddcea85f39a.js} +1 -1
  24. package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +1 -0
  25. package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +1 -0
  26. package/assets/esri/core/workers/chunks/3104b10770903c265626.js +1 -0
  27. package/assets/esri/core/workers/chunks/33f00633131581e06328.js +1 -0
  28. package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +1 -0
  29. package/assets/esri/core/workers/chunks/{32a51ce8e1a362115c89.js → 354b309c8225336bc1e5.js} +1 -1
  30. package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +1 -0
  31. package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +1 -0
  32. package/assets/esri/core/workers/chunks/{48267b67564107a7d901.js → 3c9e1ec94bbcbf494916.js} +31 -31
  33. package/assets/esri/core/workers/chunks/{333a019ea18d07f6a159.js → 40bcfc4f8efe7de7ec9d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +1 -0
  35. package/assets/esri/core/workers/chunks/436941ec88439667022e.js +1 -0
  36. package/assets/esri/core/workers/chunks/{25946077568ab14c7bfc.js → 440f76c397a813b0dcf9.js} +1 -1
  37. package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +1 -0
  38. package/assets/esri/core/workers/chunks/{48033fa4b1b815bc9ece.js → 4d54beab8ae5ff31e7b0.js} +1 -1
  39. package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +1 -0
  40. package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +1 -0
  41. package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +1 -0
  42. package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +1 -0
  43. package/assets/esri/core/workers/chunks/5a573fa1012092328b88.js +1 -0
  44. package/assets/esri/core/workers/chunks/5f06a57b4f7d7de16bbf.js +1 -0
  45. package/assets/esri/core/workers/chunks/60ad54e5707d4414d8b9.js +1 -0
  46. package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +1 -0
  47. package/assets/esri/core/workers/chunks/{d0adf059085ddf7151dd.js → 64845b1f53eca9db1229.js} +1 -1
  48. package/assets/esri/core/workers/chunks/662932d2effd2b384b9e.js +1 -0
  49. package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +1 -0
  50. package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +1 -0
  51. package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +1 -0
  52. package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +1 -0
  53. package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +1 -0
  54. package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +1 -0
  55. package/assets/esri/core/workers/chunks/7d56b2ac5030dd8b748e.js +1 -0
  56. package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +1 -0
  57. package/assets/esri/core/workers/chunks/{b98dd9fc9a7e3ff6bd49.js → 816a4b03f2ea49238a6c.js} +1 -1
  58. package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +1 -0
  59. package/assets/esri/core/workers/chunks/{8d03d45a5ec65590019d.js → 851dd71d28681d4eccfd.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{88c6cc90606409b5c884.js → 87d2021e91d025a2a142.js} +1 -1
  61. package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +1 -0
  62. package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +1 -0
  63. package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +1 -0
  64. package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +1 -0
  65. package/assets/esri/core/workers/chunks/{278409028bc5af45b507.js → 93ceb74ac88ef460fe5f.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fe7dec83e40014c55a6b.js → 96e799ca97989a6ed448.js} +1 -1
  67. package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +1 -0
  68. package/assets/esri/core/workers/chunks/{cd491c37ba1ac381178c.js → 987dc23fdc0a8c7150b9.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{25509953f19fbc4949a1.js → 992e74570b76f3f9e52e.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{b1c5f69bd1400e66c635.js → 9ae90a4b281d4103e8bb.js} +1 -1
  71. package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +1 -0
  72. package/assets/esri/core/workers/chunks/9db2ff1d4cbb5d1b623e.js +1 -0
  73. package/assets/esri/core/workers/chunks/9f272445c285ee9abb7b.js +1 -0
  74. package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +1 -0
  75. package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +1 -0
  76. package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +1 -0
  77. package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +1 -0
  78. package/assets/esri/core/workers/chunks/{6c3916517664c9e8398f.js → a787fe09d3df9d4254ba.js} +1 -1
  79. package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +1 -0
  80. package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +1 -0
  81. package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +1 -0
  82. package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +1 -0
  83. package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +1 -0
  84. package/assets/esri/core/workers/chunks/{3fa5f102b6f77c523a76.js → b3e5dcb530cef678c8f8.js} +1 -1
  85. package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +1 -0
  86. package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +1 -0
  87. package/assets/esri/core/workers/chunks/{5b5340312086d7b0ca97.js → c460ca93ed8e20d8b53a.js} +1 -1
  88. package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +1 -0
  89. package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +1 -0
  90. package/assets/esri/core/workers/chunks/{a4a4ce33de6432ba4dc3.js → c6a0e770c1a89d3b5913.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{d527a57717d118c11311.js → ccf845ac0ac354507a25.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{73e384fd93cf22503d84.js → cdf6ad970dc1893dac58.js} +1 -1
  93. package/assets/esri/core/workers/chunks/dd319d5fe89b275e93cf.js +1 -0
  94. package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +1 -0
  95. package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +1 -0
  96. package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +1 -0
  97. package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +1 -0
  98. package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +1 -0
  99. package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +1 -0
  100. package/assets/esri/core/workers/chunks/{284ce99af7bdd73dc7e9.js → ec65c9c72507ef9a9cf9.js} +1 -1
  101. package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +1 -0
  102. package/assets/esri/core/workers/chunks/{eb36417edc11fa80e312.js → ee8cd91c27e9cdfc3b2e.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{cdec811b66d98e76be9e.js → eedeff8b344ff699b0b9.js} +1 -1
  104. package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +1 -0
  105. package/assets/esri/core/workers/chunks/f4d31d96681b649ddc95.js +1 -0
  106. package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +1 -0
  107. package/assets/esri/core/workers/chunks/{6aba8c3bce5f68568e3a.js → f7fb121169b7e5a5adbc.js} +1 -1
  108. package/assets/esri/core/workers/chunks/f8eb14170f927aecfbc8.js +1 -0
  109. package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +1 -0
  110. package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +1 -0
  111. package/assets/esri/core/workers/chunks/{bde4edc4d21363e2163a.js → fcfaaced184f8da3e28d.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{3e61e7805dc6ff284831.js → fdf8fe0f50a9ae548c16.js} +1 -1
  113. package/chunks/Fog.glsl.js +1 -1
  114. package/chunks/GlowBlur.glsl.js +2 -2
  115. package/chunks/GlowComposition.glsl.js +6 -6
  116. package/chunks/HUDMaterial.glsl.js +1 -1
  117. package/chunks/OITBlend.glsl.js +9 -9
  118. package/config.js +1 -1
  119. package/core/arrayUtils.js +1 -1
  120. package/core/maybe.js +1 -1
  121. package/geometry/support/aaBoundingBox.js +1 -1
  122. package/geometry/support/sphere.js +1 -1
  123. package/kernel.js +1 -1
  124. package/layers/FeatureLayer.js +1 -1
  125. package/layers/OrientedImageryLayer.js +1 -1
  126. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  127. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  128. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  129. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  130. package/layers/mixins/ArcGISImageService.js +1 -1
  131. package/layers/mixins/FeatureLayerBase.js +1 -1
  132. package/layers/raster/datasets/FunctionRaster.js +1 -1
  133. package/layers/raster/datasets/pixelReader.js +1 -1
  134. package/layers/raster/functions/AspectFunction.js +1 -1
  135. package/layers/raster/functions/BaseRasterFunction.js +1 -1
  136. package/layers/raster/functions/ConvolutionFunction.js +1 -1
  137. package/layers/raster/functions/CurvatureFunction.js +1 -1
  138. package/layers/raster/functions/HillshadeFunction.js +1 -1
  139. package/layers/raster/functions/ShadedReliefFunction.js +1 -1
  140. package/layers/raster/functions/SlopeFunction.js +1 -1
  141. package/layers/raster/functions/StatisticsFunction.js +1 -1
  142. package/layers/raster/functions/pixelUtils.js +1 -1
  143. package/layers/support/capabilities.js +1 -1
  144. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  145. package/package.json +3 -3
  146. package/support/revision.js +1 -1
  147. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  148. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  149. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  150. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  151. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  152. package/views/3d/layers/I3SMeshView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  154. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  155. package/views/3d/layers/support/Tiles3DBVH.js +2 -0
  156. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  157. package/views/3d/support/ElevationRange.js +1 -1
  158. package/views/3d/support/ResourceController.js +1 -1
  159. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  160. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  161. package/views/3d/support/orientedBoundingBox.js +1 -1
  162. package/views/3d/terrain/OverlayRenderer.js +1 -1
  163. package/views/3d/terrain/TerrainRenderer.js +1 -1
  164. package/views/3d/webgl/ManagedFBO.d.ts +1 -0
  165. package/views/3d/webgl/ManagedFBOResource.d.ts +1 -0
  166. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  167. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  168. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
  169. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  170. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  171. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  172. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  173. package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
  174. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +1 -1
  175. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
  176. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  177. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  178. package/views/3d/webgl-engine/effects/fboFormatUtils.js +2 -0
  179. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  180. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  181. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  182. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  183. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  184. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  185. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  186. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  187. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  188. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  189. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  190. package/views/3d/webgl-engine/lib/Material.js +1 -1
  191. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  192. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  193. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  194. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  195. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  196. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  197. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  198. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  199. package/views/3d/webgl-engine/materials/TriangleTechniqueConfiguration.js +1 -1
  200. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  201. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  202. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  203. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  204. package/views/3d/webgl-engine/shaders/Dithering.glsl.js +1 -1
  205. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  206. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +3 -3
  207. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  208. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  209. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  210. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  211. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  212. package/views/3d/webgl.js +1 -1
  213. package/views/SelectionManager.js +1 -1
  214. package/views/selection/types.d.ts +92 -1
  215. package/views/support/selectionUtils.js +1 -1
  216. package/views/webgl/InstanceCounter.js +1 -1
  217. package/views/webgl/Program.js +1 -1
  218. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  219. package/widgets/Editor/EditorViewModel.js +1 -1
  220. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  221. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +2 -2
  222. package/widgets/Editor/workflowUtils.js +1 -1
  223. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  224. package/widgets/LayerList/ListItemPanel.js +1 -1
  225. package/widgets/Legend/LegendViewModel.js +1 -1
  226. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  227. package/widgets/Sketch/SketchViewModel.js +1 -1
  228. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  229. package/widgets/support/SelectionList/LayerItem.js +1 -1
  230. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  231. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  232. package/assets/esri/core/workers/chunks/04b04548d4eb0941a01e.js +0 -1
  233. package/assets/esri/core/workers/chunks/06223d5d8281e5af14c5.js +0 -1
  234. package/assets/esri/core/workers/chunks/07bdcb622ea59fdbb3a6.js +0 -1
  235. package/assets/esri/core/workers/chunks/0b661b90f7ee3ae23425.js +0 -1
  236. package/assets/esri/core/workers/chunks/0eb57ef4a1b387c951d6.js +0 -1
  237. package/assets/esri/core/workers/chunks/136859ef29a3269c4128.js +0 -1
  238. package/assets/esri/core/workers/chunks/167e4ff7cbc88b42db71.js +0 -1
  239. package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +0 -1
  240. package/assets/esri/core/workers/chunks/1e018de43becf66cceaa.js +0 -1
  241. package/assets/esri/core/workers/chunks/236b4ab3da0bc8f788a2.js +0 -1
  242. package/assets/esri/core/workers/chunks/2379c64b0ca30814a815.js +0 -1
  243. package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +0 -1
  244. package/assets/esri/core/workers/chunks/35d115bde474c380c791.js +0 -1
  245. package/assets/esri/core/workers/chunks/380bb57bccc266d6442a.js +0 -1
  246. package/assets/esri/core/workers/chunks/3f6ebd82551c2000912e.js +0 -1
  247. package/assets/esri/core/workers/chunks/4577df99c92c7ec0f9de.js +0 -1
  248. package/assets/esri/core/workers/chunks/4869e2f35aaf6b058281.js +0 -1
  249. package/assets/esri/core/workers/chunks/4a4516bc5ec319c868cd.js +0 -2
  250. package/assets/esri/core/workers/chunks/4c6fc6d19fe519ce7bfc.js +0 -1
  251. package/assets/esri/core/workers/chunks/5351e71ce7839636d06d.js +0 -1
  252. package/assets/esri/core/workers/chunks/58f47dea6d8665611eff.js +0 -1
  253. package/assets/esri/core/workers/chunks/5b2fe488a461bc433f59.js +0 -1
  254. package/assets/esri/core/workers/chunks/5c0b3c76a7bc971c61dc.js +0 -1
  255. package/assets/esri/core/workers/chunks/5df9d2a255c9d63ae7df.js +0 -1
  256. package/assets/esri/core/workers/chunks/5f53d7d6bc9b67b2f357.js +0 -1
  257. package/assets/esri/core/workers/chunks/5ffe664eda334ad73175.js +0 -1
  258. package/assets/esri/core/workers/chunks/64da1ad9df9094ef5c12.js +0 -1
  259. package/assets/esri/core/workers/chunks/64fd3561bc94570ee954.js +0 -1
  260. package/assets/esri/core/workers/chunks/650614a9e4871714c42e.js +0 -1
  261. package/assets/esri/core/workers/chunks/666f201d222c50ab8428.js +0 -1
  262. package/assets/esri/core/workers/chunks/66e35e38aea978f91a0c.js +0 -1
  263. package/assets/esri/core/workers/chunks/696f645349249f26090c.js +0 -1
  264. package/assets/esri/core/workers/chunks/6d5bb00157e20ad90fc0.js +0 -1
  265. package/assets/esri/core/workers/chunks/70f0d66e5e6d5d2163f3.js +0 -1
  266. package/assets/esri/core/workers/chunks/7380177f16d914fdbc63.js +0 -1
  267. package/assets/esri/core/workers/chunks/768bbc910be6c65ac107.js +0 -1
  268. package/assets/esri/core/workers/chunks/76effcc35b3962cd5535.js +0 -1
  269. package/assets/esri/core/workers/chunks/777390e820b3824dc265.js +0 -1
  270. package/assets/esri/core/workers/chunks/7948d6f14ae44d346d88.js +0 -1
  271. package/assets/esri/core/workers/chunks/797bf402489b3677a5f7.js +0 -1
  272. package/assets/esri/core/workers/chunks/7a4cc1133e4410271b00.js +0 -1
  273. package/assets/esri/core/workers/chunks/7dba4121cdd20dbc4b20.js +0 -1
  274. package/assets/esri/core/workers/chunks/7dba4b04c148f03fdf21.js +0 -1
  275. package/assets/esri/core/workers/chunks/87c9a1fc9f2a392b78f5.js +0 -1
  276. package/assets/esri/core/workers/chunks/88426877d625ea333143.js +0 -1
  277. package/assets/esri/core/workers/chunks/8967a02f394a63f11030.js +0 -1
  278. package/assets/esri/core/workers/chunks/8c210529a28addb94ea0.js +0 -1
  279. package/assets/esri/core/workers/chunks/8d3c508995253cbe083f.js +0 -1
  280. package/assets/esri/core/workers/chunks/8e18ac7b22d8dca1e1e2.js +0 -1
  281. package/assets/esri/core/workers/chunks/8e3cb1c584951c3d1eb7.js +0 -1
  282. package/assets/esri/core/workers/chunks/908f171b9c512d738dea.js +0 -1
  283. package/assets/esri/core/workers/chunks/922484b43803ab4e4319.js +0 -1
  284. package/assets/esri/core/workers/chunks/947a715b608c8affd812.js +0 -1
  285. package/assets/esri/core/workers/chunks/9bd68abc6b5b07b2add3.js +0 -1
  286. package/assets/esri/core/workers/chunks/9e55f97291062985560b.js +0 -1
  287. package/assets/esri/core/workers/chunks/9e5f6ad08e54e4f49bf0.js +0 -1
  288. package/assets/esri/core/workers/chunks/a90883ff02c0cc6450c2.js +0 -1
  289. package/assets/esri/core/workers/chunks/ac9722a7897c994f11ab.js +0 -1
  290. package/assets/esri/core/workers/chunks/b1ac09d8fa340d194aa2.js +0 -1
  291. package/assets/esri/core/workers/chunks/c04c457f5295febb3c39.js +0 -1
  292. package/assets/esri/core/workers/chunks/cb2fbe585c0827eecf70.js +0 -1
  293. package/assets/esri/core/workers/chunks/cf74d1605ad2f21699e7.js +0 -1
  294. package/assets/esri/core/workers/chunks/d50e6681ecb9612e4528.js +0 -1
  295. package/assets/esri/core/workers/chunks/d6eddb94f5f2e9759bd0.js +0 -1
  296. package/assets/esri/core/workers/chunks/dcc3285e4ab2c38709bd.js +0 -1
  297. package/assets/esri/core/workers/chunks/e25bbd7cc553b1d2e208.js +0 -1
  298. package/assets/esri/core/workers/chunks/e72ca52d930afb5650af.js +0 -30
  299. package/assets/esri/core/workers/chunks/e96529e144c3268a04f7.js +0 -1
  300. package/assets/esri/core/workers/chunks/f379f94adbe79dc305a2.js +0 -1
  301. package/assets/esri/core/workers/chunks/f4e5163efa2a0567ee19.js +0 -1
  302. package/assets/esri/core/workers/chunks/f76833254f842fb0cd9a.js +0 -1
  303. package/assets/esri/core/workers/chunks/f8ff3c2dc00b0b27f72f.js +0 -1
  304. package/assets/esri/core/workers/chunks/f9abae8d07002fe04a08.js +0 -1
  305. package/assets/esri/core/workers/chunks/ff6c4f8420140b9f9577.js +0 -1
  306. package/assets/esri/core/workers/chunks/ffe9fa5111c149ddef49.js +0 -1
  307. /package/assets/esri/core/workers/chunks/{4a4516bc5ec319c868cd.js.LICENSE.txt → 0fc60b4c44c4e865b699.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,7229],{69540(e,t,i){i.d(t,{OU:()=>d,Pw:()=>h});var s=i(5482),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),d=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const d=this[t];let h=null;if("function"==typeof u)h=u(d,e);else if("reference"===u)h=d;else if(h=(0,r.TU)(d,e),null!=d&&null==h)continue;0===a?l.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],n),n},h=d(n.A)},66344(e,t,i){i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,l)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._clients.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const n=this._clients.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,r,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new n(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482(e,t,i){function s(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(d&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!u.test(e[s]),s++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const d=i.ms??"0",h=d?+d.padEnd(3,"0").slice(0,3):0;let c;if(i.isUTC||!i.offsetSign)c=Date.UTC(s,n,r,o,a,u,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;c=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,u,h)}return Number.isNaN(c)?null:c}i.d(t,{Br:()=>n,Cq:()=>s,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,d=!Number.isNaN(new Date("technology 10").getTime())},75503(e,t,i){i.d(t,{wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),S.prune(),v.prune(),B.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(b(e,i))for(I.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;b(e,o)&&(i.leaf?t(r):_(e,o)?l(r,t):I.push(r))}i=I.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!b(e,t))return!1;for(I.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(b(e,r)){if(t.leaf||_(e,r))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(v.clear(),B.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],o=B.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!_(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(v.push(i),B.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new z(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new A([]);o.height=s;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){const t=Math.min(n+l-1,i);x(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);v.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),l=y(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,v);for(r.children.push(e),h(r,n);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}(n,v,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new A(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new A([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=d(e,0,t,n),o=d(e,i-t,i,n);let a=p(r)+p(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(r,e.leaf?n(t):t),a+=p(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?n(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(S.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.z)(e));else S.pushArray(i.children);i=S.pop()??null}}function u(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,s,n){n||(n=new z([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(n,e.leaf?s(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const I=new r.A,S=new r.A,v=new r.A,B=new r.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class F extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class z extends F{constructor(e){super(),this.children=e,this.leaf=!0}}class A extends F{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,i){i.d(t,{C_:()=>c,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return d(e,t,i,f)}function u(e,t,i={}){return d(e,t,i,m)}function d(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let a=null,u=null,d=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,r.xt)(d),i(e)}const f=l(e,(e,i)=>{h(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,n.hA)(()=>{f.remove(),h()}),d}function c(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},60408(e,t,i){function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function n(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":n(e)?"esriGeometryMultipoint":null:null}function d(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>d,Rg:()=>o,U9:()=>n,W0:()=>h,ZC:()=>s,fT:()=>r,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>d,xD:()=>c});var s=i(5443),n=i(91075),r=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function d(e){return null==e?null:e instanceof n.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?r.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function c(e){return e&&h[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),d=i(6518),h=i(51441),c=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>n});var s=i(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new s.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},33032(e,t,i){i.d(t,{H:()=>n,L:()=>s});const s=1;function n(e,t){let i=0;for(const s of t){const t=s.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},29432(e,t,i){i.r(t),i.d(t,{default:()=>S});var s=i(49186),n=i(60408),r=i(21325),o=i(90708),a=i(33032),l=i(83221),u=i(31464),d=i(56390),h=i(64714),c=i(82832),f=i(95466),m=i(98453),p=i(30524),y=i(98623);const g=r.KK,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:c.PC};function x(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:i}=e,n=this._inferLayerProperties(i,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,x=!e.spatialReference&&!n.spatialReference,I=x?g:e.spatialReference||n.spatialReference,S=x?_:null,v=e.geometryType||n.geometryType,B=!v;let M=e.objectIdField||n.objectIdField,F=e.timeInfo;const z=new f.A(r);if(!B&&(x&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!v))throw new s.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!M)throw new s.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&M!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${M}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),M=n.objectIdField),M&&!n.objectIdField){const e=z.get(M);e?(M=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:M,name:M,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new s.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===M&&(e.type="esriFieldTypeOID"),!m.m.jsonValues.includes(e.type))throw new s.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,p._b)(e))}const A={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,p.lD)(e);void 0!==t&&(A[e.name]=t)}if(F){if(F.startTimeField){const e=z.get(F.startTimeField);e?(F.startTimeField=e.name,e.type="esriFieldTypeDate"):F.startTimeField=null}if(F.endTimeField){const e=z.get(F.endTimeField);e?(F.endTimeField=e.name,e.type="esriFieldTypeDate"):F.endTimeField=null}if(F.trackIdField){const e=z.get(F.trackIdField);e?F.trackIdField=e.name:(F.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:F}}))}F.startTimeField||F.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:F}}),F=null)}const T=z.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,h.Vx)(A,M);const w={warnings:t,featureErrors:[],layerDefinition:{...b,drawingInfo:(0,h.F0)(v),templates:(0,h.e2)(A),extent:S,geometryType:v,objectIdField:M,fields:r,hasZ:c,hasM:o,timeInfo:F,dateFieldsTimeReference:T},assignedObjectIds:{}},E={type:"object-id",fieldName:M};if(this._queryEngine=new d.do({fieldsIndex:f.A.fromLayerJSON({fields:r,timeInfo:F,dateFieldsTimeReference:T}),geometryType:v,hasM:o,hasZ:c,featureIdInfo:E,spatialReference:I,featureStore:new l.A({geometryType:v,hasM:o,hasZ:c}),timeInfo:F}),!i?.length)return this._nextObjectId=a.L,w;const R=(0,a.H)(M,i);return this._nextObjectId=R+1,await(0,u.Nk)(i,I),this._loadInitialFeatures(w,i)}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,c.$1)(t,i),(0,u.Nk)(e.adds,t),(0,u.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}queryAttributeBins(e,t={}){return this._queryEngine.executeAttributeBinsQuery(e,t.signal)}_inferLayerProperties(e,t){let i,s,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==i&&(i=x(e)),null==s&&(s=I(e)),r&&o&&null!=i&&null!=s))break}if(t&&t.length){let e=null;t.some(t=>{const i="esriFieldTypeOID"===t.type,s=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,i||s})&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:s,hasZ:i}}async _loadInitialFeatures(e,t){const{geometryType:i,hasM:s,hasZ:r,objectIdField:a,spatialReference:l,featureStore:d,fieldsIndex:h}=this._queryEngine,f=[],m={type:"object-id",fieldName:a};for(const s of t){if(null!=s.uid&&(e.assignedObjectIds[s.uid]=-1),s.geometry&&i!==(0,n.$B)(s.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(h,t,s.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,s.attributes,!0),s.attributes=t,null!=s.uid&&(e.assignedObjectIds[s.uid]=s.attributes[a]),null!=s.geometry&&(s.geometry=(0,u.Cv)(s.geometry,s.geometry.spatialReference,l)),f.push(s))}d.addMany((0,o.Di)([],f,i,r,s,m));const{fullExtent:p,timeExtent:y}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,y){const{start:t,end:i}=y;e.layerDefinition.timeInfo.timeExtent=[t,i]}return e}async _applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),i?.length&&this._applyUpdateEdits(n,i),s?.length){for(const e of s)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(s)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:r,hasZ:a,objectIdField:l,spatialReference:d,featureStore:h,featureIdInfo:f,fieldsIndex:m}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&s!==(0,n.$B)(r.geometry)){i.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(m,t,r.attributes);if(o)i.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[l];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??d;r.geometry=(0,u.Cv)((0,c.CR)(r.geometry,e),e,d)}p.push(r),i.push((0,c.bP)(r.attributes[l]))}}h.addMany((0,o.Di)([],p,s,a,r,f))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:r,objectIdField:a,spatialReference:l,featureStore:d,fieldsIndex:h,featureIdInfo:f}=this._queryEngine;for(const m of t){const{attributes:t,geometry:p}=m,y=t?.[a];if(null==y){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!d.has(y)){e.push((0,c.Yx)(`Feature with object id ${y} missing`));continue}const g=(0,o.oN)(d.getFeature(y),i,r,s);if(null!=p){if(i!==(0,n.$B)(p)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=p.spatialReference??l;g.geometry=(0,u.Cv)((0,c.CR)(p,t),t,l)}if(t){const i=(0,c.MB)(h,g.attributes,t);if(i){e.push(i);continue}}d.add((0,o.E2)(g,i,r,s,f)),e.push((0,c.bP)(y))}}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;i&&t&&isFinite(t[s])?e[s]=t[s]:e[s]=this._nextObjectId++}}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>f});var s=i(44208),n=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${h(t)} = null;`;for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,i){i.d(t,{$1:()=>y,CR:()=>p,MB:()=>c,PC:()=>g,Yx:()=>l,bP:()=>d});var s=i(67482),n=i(21325),r=i(30524);class o{constructor(e){this.description=e,this.code=null}}class a{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new o(e)}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new u(e)}const h=new Set;function c(e,t,i,s=!1){h.clear();for(const n in i){const o=e.get(n);if(!o)continue;const a=f(o,i[n]);if(h.add(o.name),o&&(s||o.editable)){const e=(0,r.CJ)(o,a);if(e)return l((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!h.has(t.name))return l(`missing required field "${t.name}"`);return null}function f(e,t){let i=t;return(0,r.WA)(e)&&"string"==typeof t?i=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,r.vE)(e)&&"string"==typeof t&&(i=(0,s._U)(t)),(0,r.WX)(i)}let m;function p(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await i.e(1023).then(i.bind(i,81023))),m}()}const g={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},98453(e,t,i){i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>l,lF:()=>d});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function d(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>d(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(3789),i.e(148)]).then(i.bind(i,50148));const l=await n.id.getCredential(e,r);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>c,Jn:()=>f,Qc:()=>m,getApiKey:()=>d,getSessionToken:()=>h});var s=i(92602),n=i(11254),r=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function d(e){if(!m(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=s.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}async function h(e){if(!s.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=d(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:r,duration:a=43200}=s.A.sessions.basemap,h=`${t}:${i}`,c=l.get(h);if(c&&(!r||c.endTime>Date.now()))return c.sessionToken;let f;u=(0,n.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(h,f)}finally{u=null}return f.sessionToken}function c(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function f(e,t){return t?m(e):null!=d(e)}function m(e){const t=(0,r.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},93470(e,t,i){i.d(t,{Cb:()=>r,HW:()=>d,JR:()=>n,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>s,nC:()=>u,yM:()=>o});const s=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,7229],{69540(e,t,i){i.d(t,{OU:()=>d,Pw:()=>h});var s=i(5482),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),d=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const d=this[t];let h=null;if("function"==typeof u)h=u(d,e);else if("reference"===u)h=d;else if(h=(0,r.TU)(d,e),null!=d&&null==h)continue;0===a?l.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],n),n},h=d(n.A)},66344(e,t,i){i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,l)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._clients.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const n=this._clients.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!s||r.startsWith(s))){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,a,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,r,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new n(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482(e,t,i){function s(e){return null!=a(e)||null!=o(e)}function n(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(d&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!u.test(e[s]),s++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,s=+i.year,n=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const d=i.ms??"0",h=d?+d.padEnd(3,"0").slice(0,3):0;let c;if(i.isUTC||!i.offsetSign)c=Date.UTC(s,n,r,o,a,u,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;c=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,n,r,o,a,u,h)}return Number.isNaN(c)?null:c}i.d(t,{Br:()=>n,Cq:()=>s,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,d=!Number.isNaN(new Date("technology 10").getTime())},75503(e,t,i){i.d(t,{wq:()=>a});var s=i(4576),n=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),S.prune(),v.prune(),B.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(b(e,i))for(I.clear();i;){for(let n=0,r=i.children.length;n<r;n++){const r=i.children[n],o=i.leaf?s(r):r;b(e,o)&&(i.leaf?t(r):_(e,o)?l(r,t):I.push(r))}i=I.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!b(e,t))return!1;for(I.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],r=t.leaf?i(n):n;if(b(e,r)){if(t.leaf||_(e,r))return!0;I.push(n)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(v.clear(),B.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],o=B.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,n.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!_(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(v.push(i),B.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const n=i-t+1;let r=this._maxEntries;if(n<=r){const s=new z(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(s-1)));const o=new A([]);o.height=s;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){const t=Math.min(n+l-1,i);x(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){const n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,n=i?e:s(e);v.clear();const r=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),l=y(e,o)-a;l<n?(n=l,s=a<s?a:s,i=o):l===n&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,v);for(r.children.push(e),h(r,n);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}(n,v,t)}_split(e,t){const i=e.data[t],s=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,s);const r=this._chooseSplitIndex(i,n,s);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new A(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new A([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,n,r;s=n=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<s?(s=l,r=o,n=u<n?u:n):l===s&&u<n&&(n=u,r=o)}return r}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,n)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const n=this._toBBox,r=d(e,0,t,n),o=d(e,i-t,i,n);let a=p(r)+p(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(r,e.leaf?n(t):t),a+=p(r)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?n(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,s.qh)(r,i,r.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(S.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,n.z)(e));else S.pushArray(i.children);i=S.pop()??null}}function u(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,s,n){n||(n=new z([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(n,e.leaf?s(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,r-s)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,n){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,n),r.push(i,a,a,t)}}const I=new r.A,S=new r.A,v=new r.A,B=new r.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class F extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class z extends F{constructor(e){super(),this.children=e,this.leaf=!0}}class A extends F{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,i){i.d(t,{C_:()=>c,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return d(e,t,i,f)}function u(e,t,i={}){return d(e,t,i,m)}function d(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let a=null,u=null,d=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function c(e){o.once&&o.once&&(0,r.xt)(d),i(e)}const f=l(e,(e,i)=>{h(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,c),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,n.hA)(()=>{f.remove(),h()}),d}function c(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((s,r)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},60408(e,t,i){function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function n(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":n(e)?"esriGeometryMultipoint":null:null}function d(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>d,Rg:()=>o,U9:()=>n,W0:()=>h,ZC:()=>s,fT:()=>r,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>d,xD:()=>c});var s=i(5443),n=i(91075),r=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function d(e){return null==e?null:e instanceof n.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?r.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function c(e){return e&&h[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var s=i(44208),n=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var s=i(4576),n=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),d=i(6518),h=i(51441),c=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:n,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,u.jQ)(null!=s?s:(0,l.vt)(),e.geometry),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>n});var s=i(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new s.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},33032(e,t,i){i.d(t,{H:()=>n,L:()=>s});const s=1;function n(e,t){let i=0;for(const s of t){const t=s.attributes?.[e];"number"==typeof t&&isFinite(t)&&(i=Math.max(i,t))}return i}},29432(e,t,i){i.r(t),i.d(t,{default:()=>S});var s=i(49186),n=i(60408),r=i(21325),o=i(90708),a=i(33032),l=i(83221),u=i(31464),d=i(56390),h=i(64714),c=i(82832),f=i(95466),m=i(98453),p=i(30524),y=i(98623);const g=r.KK,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:c.PC};function x(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:i}=e,n=this._inferLayerProperties(i,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,x=!e.spatialReference&&!n.spatialReference,I=x?g:e.spatialReference||n.spatialReference,S=x?_:null,v=e.geometryType||n.geometryType,B=!v;let M=e.objectIdField||n.objectIdField,F=e.timeInfo;const z=new f.A(r);if(!B&&(x&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!v))throw new s.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!M)throw new s.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&M!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${M}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),M=n.objectIdField),M&&!n.objectIdField){const e=z.get(M);e?(M=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:M,name:M,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new s.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===M&&(e.type="esriFieldTypeOID"),!m.m.jsonValues.includes(e.type))throw new s.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,p._b)(e))}const A={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,p.lD)(e);void 0!==t&&(A[e.name]=t)}if(F){if(F.startTimeField){const e=z.get(F.startTimeField);e?(F.startTimeField=e.name,e.type="esriFieldTypeDate"):F.startTimeField=null}if(F.endTimeField){const e=z.get(F.endTimeField);e?(F.endTimeField=e.name,e.type="esriFieldTypeDate"):F.endTimeField=null}if(F.trackIdField){const e=z.get(F.trackIdField);e?F.trackIdField=e.name:(F.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:F}}))}F.startTimeField||F.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:F}}),F=null)}const T=z.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,h.Vx)(A,M);const w={warnings:t,featureErrors:[],layerDefinition:{...b,drawingInfo:(0,h.F0)(v),templates:(0,h.e2)(A),extent:S,geometryType:v,objectIdField:M,fields:r,hasZ:c,hasM:o,timeInfo:F,dateFieldsTimeReference:T},assignedObjectIds:{}},E={type:"object-id",fieldName:M};if(this._queryEngine=new d.do({fieldsIndex:f.A.fromLayerJSON({fields:r,timeInfo:F,dateFieldsTimeReference:T}),geometryType:v,hasM:o,hasZ:c,featureIdInfo:E,spatialReference:I,featureStore:new l.A({geometryType:v,hasM:o,hasZ:c}),timeInfo:F}),!i?.length)return this._nextObjectId=a.L,w;const R=(0,a.H)(M,i);return this._nextObjectId=R+1,await(0,u.Nk)(i,I),this._loadInitialFeatures(w,i)}async applyEdits(e){const{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,c.$1)(t,i),(0,u.Nk)(e.adds,t),(0,u.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}queryAttributeBins(e,t={}){return this._queryEngine.executeAttributeBinsQuery(e,t.signal)}_inferLayerProperties(e,t){let i,s,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==i&&(i=x(e)),null==s&&(s=I(e)),r&&o&&null!=i&&null!=s))break}if(t&&t.length){let e=null;t.some(t=>{const i="esriFieldTypeOID"===t.type,s=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,i||s})&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:s,hasZ:i}}async _loadInitialFeatures(e,t){const{geometryType:i,hasM:s,hasZ:r,objectIdField:a,spatialReference:l,featureStore:d,fieldsIndex:h}=this._queryEngine,f=[],m={type:"object-id",fieldName:a};for(const s of t){if(null!=s.uid&&(e.assignedObjectIds[s.uid]=-1),s.geometry&&i!==(0,n.$B)(s.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(h,t,s.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,s.attributes,!0),s.attributes=t,null!=s.uid&&(e.assignedObjectIds[s.uid]=s.attributes[a]),null!=s.geometry&&(s.geometry=(0,u.Cv)(s.geometry,s.geometry.spatialReference,l)),f.push(s))}d.addMany((0,o.Di)([],f,i,r,s,m));const{fullExtent:p,timeExtent:y}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=p,y){const{start:t,end:i}=y;e.layerDefinition.timeInfo.timeExtent=[t,i]}return e}async _applyEdits(e){const{adds:t,updates:i,deletes:s}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),i?.length&&this._applyUpdateEdits(n,i),s?.length){for(const e of s)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(s)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:i}=e,{geometryType:s,hasM:r,hasZ:a,objectIdField:l,spatialReference:d,featureStore:h,featureIdInfo:f,fieldsIndex:m}=this._queryEngine,p=[];for(const r of t){if(r.geometry&&s!==(0,n.$B)(r.geometry)){i.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(m,t,r.attributes);if(o)i.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[l];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??d;r.geometry=(0,u.Cv)((0,c.CR)(r.geometry,e),e,d)}p.push(r),i.push((0,c.bP)(r.attributes[l]))}}h.addMany((0,o.Di)([],p,s,a,r,f))}_applyUpdateEdits({updateResults:e},t){const{geometryType:i,hasM:s,hasZ:r,objectIdField:a,spatialReference:l,featureStore:d,fieldsIndex:h,featureIdInfo:f}=this._queryEngine;for(const m of t){const{attributes:t,geometry:p}=m,y=t?.[a];if(null==y){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!d.has(y)){e.push((0,c.Yx)(`Feature with object id ${y} missing`));continue}const g=(0,o.oN)(d.getFeature(y),i,r,s);if(null!=p){if(i!==(0,n.$B)(p)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=p.spatialReference??l;g.geometry=(0,u.Cv)((0,c.CR)(p,t),t,l)}if(t){const i=(0,c.MB)(h,g.attributes,t);if(i){e.push(i);continue}}d.add((0,o.E2)(g,i,r,s,f)),e.push((0,c.bP)(y))}}_assignObjectId(e,t,i=!1){const s=this._queryEngine.objectIdField;i&&t&&isFinite(t[s])?e[s]=t[s]:e[s]=this._nextObjectId++}}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>f});var s=i(44208),n=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let i=`this${h(t)} = null;`;for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new s}catch(i){return()=>({[t]:null,...e})}}function h(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,i){i.d(t,{$1:()=>y,CR:()=>p,MB:()=>c,PC:()=>g,Yx:()=>l,bP:()=>d});var s=i(67482),n=i(21325),r=i(30524);class o{constructor(e){this.description=e,this.code=null}}class a{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new o(e)}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new u(e)}const h=new Set;function c(e,t,i,s=!1){h.clear();for(const n in i){const o=e.get(n);if(!o)continue;const a=f(o,i[n]);if(h.add(o.name),o&&(s||o.editable)){const e=(0,r.CJ)(o,a);if(e)return l((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!h.has(t.name))return l(`missing required field "${t.name}"`);return null}function f(e,t){let i=t;return(0,r.WA)(e)&&"string"==typeof t?i=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,r.vE)(e)&&"string"==typeof t&&(i=(0,s._U)(t)),(0,r.WX)(i)}let m;function p(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await i.e(1023).then(i.bind(i,81023))),m}()}const g={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},98453(e,t,i){i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>l,lF:()=>d});var s=i(92602),n=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function d(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map(e=>d(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??n.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!n.id&&s.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(692),i.e(148)]).then(i.bind(i,50148));const l=await n.id.getCredential(e,r);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>c,Jn:()=>f,Qc:()=>m,getApiKey:()=>d,getSessionToken:()=>h});var s=i(92602),n=i(11254),r=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function d(e){if(!m(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=s.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}async function h(e){if(!s.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=d(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:r,duration:a=43200}=s.A.sessions.basemap,h=`${t}:${i}`,c=l.get(h);if(c&&(!r||c.endTime>Date.now()))return c.sessionToken;let f;u=(0,n.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(h,f)}finally{u=null}return f.sessionToken}function c(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function f(e,t){return t?m(e):null!=d(e)}function m(e){const t=(0,r.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},93470(e,t,i){i.d(t,{Cb:()=>r,HW:()=>d,JR:()=>n,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>s,nC:()=>u,yM:()=>o});const s=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,6312,6342,8125],{61691(e,t,r){r.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},36633(e,t,r){r.d(t,{O:()=>g});var n=r(55537),s=r(79187),i=r(83661),o=r(15756);function a(){return u(new i.P,-1,Number.NaN)}function u(e,t,r){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:r,m_bRightSide:!1,isEmpty:c}}function c(){return Number.isNaN(this.m_distance)}function h(e,t,r=-1,a=-1){if(e.isEmpty())return 3;const u=e.getGeometryType();if((0,n.f)(u))return function(e,t,r,s){if(r>=0||s>=0)return(0,n.a)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){const r=i.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return r<0?1:r>0?0:2}const o=e.getClosestCoordinate(t,!1),a=e.getTangent(o),u=e.getCoord2D(o),c=i.P.orientationRobust(t,u,u.add(a));return c<0?1:c>0?0:2}(e,t,r,a);if(u===n.G.enumPolygon)return function(e,t,r,i){(r>=0||i>=0)&&(0,n.a)("");const a=new s.Envelope2D;e.queryEnvelope(a);const u=(0,o.l)(e,t,0);return 0===u?0:1===u?1:2}(e,t,r,a);if(u===n.G.enumPolyline)return function(e,t,r,s){(r<0&&s>=0||r>=0&&s<0)&&(0,n.a)("");const o=e.querySegmentIterator();if(r<0){let e=Number.MAX_VALUE,n=0;for(;o.nextPath();)for(;o.hasNextSegment();){const a=o.nextSegment(),u=a.getClosestCoordinate(t,!1),c=a.getCoord2D(u),h=i.P.sqrDistance(c,t);h<e?(n=1,r=o.getStartPointIndex(),s=o.getPathIndex(),e=h):h===e&&n++}if(0===n)return 3;if(1===n)return o.resetToVertex(r,s),h(o.nextSegment(),t)}const a=function(e,t,r,n){const s={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(s.i1=function(e,t,r){for(e.resetToVertex(t,r);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,r);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,r,n),-1!==s.i1){t.resetToVertex(s.i1,-1);const r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n),a=i.P.sqrDistance(o,e);{const t=o.clone();t.subThis(r.getStartXY());const n=e.clone();n.subThis(r.getStartXY()),s.bRight1=t.crossProduct(n)<0}if(s.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2){t.resetToVertex(s.i2,-1);const r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n);if(i.P.sqrDistance(o,e)>a)s.i2=-1;else{const t=o.clone();t.subThis(r.getStartXY());const n=e.clone();n.subThis(r.getStartXY()),s.bRight2=t.crossProduct(n)<0}}if(-1===s.i2&&(s.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2)){t.resetToVertex(s.i2,-1);const r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n);if(i.P.sqrDistance(o,e)>a)s.i2=-1;else{const t=o.clone();t.subThis(r.getStartXY());const n=e.clone();n.subThis(r.getStartXY()),s.bRight2=t.crossProduct(n)<0;const i=s.i1;s.i1=s.i2,s.i2=i;const a=s.bRight1;s.bRight1=s.bRight2,s.bRight2=a}}}return s}(t,o,r,s);if(-1!==a.i1&&-1===a.i2)return a.bRight1?1:0;if(-1!==a.i1&&-1!==a.i2){if(a.bRight1===a.bRight2)return a.bRight1?1:0;{o.resetToVertex(a.i1,-1);const e=o.nextSegment().getTangent(1);o.resetToVertex(a.i2,-1);const t=o.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}return o.resetToVertex(r,s),h(o.nextSegment(),t)}(e,t,r,a);if(u===n.G.enumEnvelope){const r=new s.Envelope2D;return e.queryEnvelope(r),r.contains(t)?r.containsExclusive(t)?1:2:0}return 3}var l=r(95213);class g{getOperatorType(){return 10500}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,r,s){if(t.isNAN()&&(0,n.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertex(e,t);case n.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case n.G.enumPolyline:case n.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,r,s);default:(0,n.t)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,n.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertex(e,t);case n.G.enumMultiPoint:case n.G.enumPolyline:case n.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,n.t)("")}}getNearestVertices(e,t,r,s){if(0===s&&(0,n.a)(""),t.isNAN()&&(0,n.a)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertices(e,t,r,s);case n.G.enumMultiPoint:case n.G.enumPolyline:case n.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,r,s);default:(0,n.t)("")}}multiPathGetNearestCoordinate(e,t,r,a){if(e.getGeometryType()===n.G.enumPolygon&&r){const r=new s.Envelope2D;e.queryEnvelope(r);const n=(0,l.d)(null,r,!1);let i;if(i=(0,o.l)(e,t,a?0:n),0!==i){const e=u(t,-1,0);return a&&(e.m_bRightSide=!0),e}}const c=e.querySegmentIterator(),g=new i.P;let m=-1,f=-1,x=Number.MAX_VALUE,p=0;for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment(),r=e.getClosestCoordinate(t,!1),n=e.getCoord2D(r),s=i.P.sqrDistance(n,t);s<x?(p=1,g.assign(n),m=c.getStartPointIndex(),f=c.getPathIndex(),x=s):s===x&&p++}-1===m&&(0,n.a)("");const y=u(g,m,Math.sqrt(x));if(a)if(e.getGeometryType()!==n.G.enumPolygon){let r=!1;if(p>1){const n=h(e,t,m,f);r=0!==n&&3!==n}else c.resetToVertex(m,f),r=0!==h(c.nextSegment(),t);y.m_bRightSide=r}else r||0!==(0,o.l)(e,t,0)&&(y.m_bRightSide=!0);return y}pointGetNearestVertex(e,t){const r=e.getXY();return u(r,0,i.P.distance(r,t))}multiVertexGetNearestVertex(e,t){const r=e.getAttributeStreamRef(0),n=e.getPointCount();let s=-1;const o=new i.P;let a=Number.MAX_VALUE;const c=new i.P;for(let e=0;e<n;e++){r.queryPoint2D(2*e,c);const n=i.P.sqrDistance(c,t);n<a&&(o.assign(c),s=e,a=n)}return u(o,s,Math.sqrt(a))}pointGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const n=r*r,o=e.getXY(),a=i.P.sqrDistance(o,t);a<=n&&s.push(u(o,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const o=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=n+1;const c=r*r;for(let e=0;e<a;e++){const r=o.read(2*e),n=o.read(2*e+1),a=t.x-r,h=t.y-n,l=a*a+h*h;l<=c&&s.push(u(i.P.construct(r,n),e,Math.sqrt(l)))}s.sort((e,t)=>e.m_distance-t.m_distance)}return s.slice(0,n)}}},76061(e,t,r){r.d(t,{S:()=>s});var n=r(61691);class s extends n.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},87992(e,t,r){r.d(t,{JR:()=>E,ME:()=>M,MY:()=>R,NO:()=>P,Nh:()=>V,V2:()=>A,_s:()=>w,e6:()=>O,gh:()=>S,tr:()=>Y,uX:()=>p});var n=r(5482),s=r(69397),i=r(16930),o=(r(70328),r(19419)),a=r(60408),u=r(21325),c=r(513),h=r(50954),l=r(79567),g=r(52006),m=r(49663),f=r(46068),x=r(92722);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:u,segmentFlags:c,segmentIndices:h,segmentParams:l,segmentCountArc:g,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=u,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=l,this.segmentCountArc=g,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?s.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=A(e,t,r,n,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(u.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,r+1)),a.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(r.subarray(0,t),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,u.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=N(e),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class v{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new C(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class C{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=N(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[r++],n=t[r++],s=t[r++],i=t[r++];return{b:[this.end,[e,n],[s,i]]}}const n=t[r++],s=t[r++],i=t[r++],o=t[r++],a=t[r++],u=t[r++];r++,r++;const c=t[r++],h=t[r++];if(!Boolean(4&n)&&1===i)return{c:[this.end,[c,h]]};const l=2&n?0:1,g=1&n?0:1;return{a:[this.end,[a,u],l,g,o,s,i]}}}function P(e,t){const r={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(r,new G(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:r,vertexXY:s,vertexZ:i,vertexM:a}=e,u=b(e);if(e.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new G(e,["vertexZ","vertexM"]),!1);const s=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:r}of t.segments)(0,l.e)(s,e,r),e=(0,g.yP)(r)}const[i,a,c,h]=s;t={xmin:i,ymin:a,xmax:c,ymax:h,spatialReference:u}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}else{let e,n,i,o;e=n=1/0,i=o=-1/0;for(let t=0;t<r;++t){const r=s[2*t],a=s[2*t+1];e=Math.min(e,r),i=Math.max(i,r),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:i,ymax:o,spatialReference:u}}if(i){let e=1/0,r=-1/0;for(const t of i)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(a){let e=1/0,r=-1/0;for(const t of a)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}function M(e){let t,r,n;if((0,a.fT)(e)){n="point";const{x:s,y:i,z:o,m:a}=e,u=[s,i];null!=o&&u.push(o),null!=a&&u.push(a),r=[[u]],t=1}else(0,a.U9)(e)?(n="multipoint",r=[e.points],t=e.points.length):(0,a.Rg)(e)?(n="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(n="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,_(t[0],(0,g.yP)(t.at(-1)))&&--e),e),0));const s=A(n,t,n.includes("point")?0:r.length,(0,a.Pv)(e),(0,a.W0)(e),(0,g.Ed)(e)),{hasZ:i,hasM:o,vertexXY:u,vertexZ:c,vertexM:h}=s;function l(e){u[2*f]=e[0],u[2*f+1]=e[1],i&&(c[f]=e[2]),o&&(h[f]=e[m]),++f}s.spatialReference=e.spatialReference??void 0;const m=s.hasZ?3:2;let f=0;if(!s.isMultipart()){if(!i&&!o){for(const[e,t]of r[0])u[2*f]=e,u[2*f+1]=t,++f;return s}for(const e of r[0])l(e);return s}const x="polygon"===n,{partOffsets:p}=s;let y=0;if(!s.hasCurves()){for(const e of r){if(p[y++]=f,0===e.length)continue;let t=e.length;if(x&&_(e[0],e.at(-1))&&--t,i||o)for(let r=0;r<t;++r)l(e[r]);else for(let r=0;r<t;++r){const[t,n]=e[r];u[2*f]=t,u[2*f+1]=n,++f}}return p[y]=f,s}function d(e){const t=v+e;if(t<=(s.segmentParams?.length??0))return;let r=t*I;r=20*Math.ceil(r/20);const n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let v=0;for(const e of r){if(s.partOffsets[y++]=f,0===e.length)continue;const t=e[0];let r=t;for(let t=1;t<e.length;++t){const n=e[t];l(r);const i=f-1;(0,g.wY)(n)?(d(10),++s.segmentCountArc,v=w(r,n,s,i,v),r=n.a[0]):(0,g.DA)(n)?(d(10),++s.segmentCountArc,v=Z(r,n,s,i,v),r=n.a[0]):(0,g.aO)(n)?(d(10),++s.segmentCountArc,v=O(r,n,s,i,v),r=n.c[0]):(0,g.n1)(n)?(d(4),++s.segmentCountBezier,v=Y(0,n,s,i,v),r=n.b[0]):r=n}x&&_(t,r)||l(r)}return s.partOffsets[y]=f,s}function S(e){const t=N(e),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=e,o=b(e);if("point"===e.type){const[t,r]=e.vertexXY,n=e.vertexZ?.[0],s=e.vertexM?.[0];return{x:t,y:r,z:n,m:s,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<r;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:s,hasM:i}}const u="polygon"===e.type;if(!e.hasCurves()){const r=new Array;for(let s=0;s<n;++s){const n=e.partOffsets[s+1],i=new Array;for(;a<n;)i.push(t(a++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:s,hasM:i,spatialReference:o}:{paths:r,hasZ:s,hasM:i,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:r}of e.parts){const e=[r];for(const{curve:r}of t)e.push(r);c.push(e)}return u?{rings:[],curveRings:c,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:c,hasZ:s,hasM:i,spatialReference:o}}function V(e,{lengths:t,coords:r,hasZ:n,hasM:s},i){const o=e.includes("point")?0:t.length,a="polygon"===e,u="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,s??=!1;const c=A(e,u,o,n,s,!1,0,0);if(c.spatialReference=i??void 0,!c.isMultipart()){for(let e=0,t=0;e<u;++e)c.vertexXY[2*e]=r[t++],c.vertexXY[2*e+1]=r[t++],n&&(c.vertexZ[e]=r[t++]),s&&(c.vertexM[e]=r[t++]);return c}const h=2+Number(n)+Number(s);let l=0,g=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[g],i=t+e-Number(a);c.partOffsets[++g]=i;for(let e=t;e<i;++e)c.vertexXY[2*e]=r[l++],c.vertexXY[2*e+1]=r[l++],n&&(c.vertexZ[e]=r[l++]),s&&(c.vertexM[e]=r[l++]);a&&(l+=h)}return c}function E({type:e,vertexCount:t,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:o,hasZ:a,hasM:u}){const c=new x.A([],[],a,u);i=Math.max(i,1);const h="polygon"===e;let l=0;for(let e=0;e<i;++e){const i=o?.[e+1]??t,g=c.coords.length;for(let e=l;e<i;++e)c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e]);if(h){const e=l;c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e])}c.lengths.push((c.coords.length-g)/c.stride),l=i}return"point"===e&&(c.lengths.length=0),c}function R(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===r)&&(n=void 0);const s=e.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:t};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:r,wkt:t,latestWkid:n,vcsWkid:i,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class G{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function b({spatialReference:e}){return e instanceof i.A?e.toJSON():e}function N({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?n=>[e[2*n],e[2*n+1],t[n],r[n]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function _(e,t){return e.every((e,r)=>e===t[r])}function A(e,t,r,n,s,i,o,a){o??=0,a??=0;const u=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),s&&(c+=Float64Array.BYTES_PER_ELEMENT*t),u.isMultipart()&&(c+=(r+1)*Int32Array.BYTES_PER_ELEMENT,c+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let l=0;return u.vertexXY=new Float64Array(h,l,2*t),l+=u.vertexXY.byteLength,n&&(u.vertexZ=new Float64Array(h,l,t),l+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(h,l,t),l+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(h,l,u.segmentParamCount),l+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(h,l,t),u.segmentIndices.fill(X),l+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(h,l,r+1),l+=u.partOffsets.byteLength,u.partFlags=new Int8Array(h,l,r+1),l+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(h,l,t),u.segmentFlags.fill(1),l+=u.segmentFlags.byteLength),u}function w(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const[a,[u,c],h,l,g,m,x]=t.a;let p=4;l||(p|=1),h||(p|=2);const y=(0,f.SW)(e,t),[d,v]=(0,f.Uk)(y,.5);return s[o++]=p,s[o++]=m,s[o++]=x,s[o++]=g,s[o++]=u,s[o++]=c,s[o++]=y.u2-y.u1,s[o++]=y.u1,s[o++]=d,s[o++]=v,o}function Z(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const a=(0,m.i)(e,t);return T(a,4,...(0,c.mq)(a,.5),s,o)}function O(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){return r[i]=4,n[i]=o,T((0,h.pM)(e,t),0,...t.c[1],s,o)}function T(e,t,r,n,s,i){const{cx:o,cy:a,thetaStart:u,thetaEnd:c,radius:h}=e;return u>c||(t|=1),Math.abs(c-u)<=Math.PI||(t|=2),s[i++]=t,s[i++]=h,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=c-u,s[i++]=u,s[i++]=r,s[i++]=n,i}function Y(e,{b:[t,[r,n],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:u},c,h){return o[c]=2,a[c]=h,u[h++]=r,u[h++]=n,u[h++]=s,u[h++]=i,h}const I=1.61803,X=-1},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>p,fromGeometry:()=>x,fromMultipoint:()=>y,fromPoint:()=>d,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>P,fromSpatialReference:()=>M,getSpatialReference:()=>f,toExtent:()=>V,toGeometry:()=>S,toMultipoint:()=>E,toPoint:()=>R,toPolygon:()=>G,toPolyline:()=>b});var n=r(83661),s=(r(79187),r(55537)),i=r(95213),o=r(88885),a=r(5443),u=r(48526),c=r(86738),h=r(39829),l=r(82799),g=(r(90293),r(83299));const m="_gxVersion";function f(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return d(e);case"multipoint":return y(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return p(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function p(e){if(!e.getCacheValue(m)){const t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(m,t)}return e.getCacheValue(m)}function y(e){if(!e.getCacheValue(m)){const t=new o.M,r=new i.P,n=e.points,s=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,i=n.length;e<i;e++){const i=n[e];r.setXYCoords(i[0],i[1]),a&&r.setZ(i[2]??0),s&&r.setM(i[u]??NaN),t.add(r)}e.setCacheValue(m,t)}return e.getCacheValue(m)}function d(e){if(!e.getCacheValue(m)){const t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(m,t)}return e.getCacheValue(m)}function v(e){if(!e.getCacheValue(m)){const{curveRings:t,hasM:r,hasZ:n,rings:s}=e,i=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:n,rings:s});e.setCacheValue(m,i)}return e.getCacheValue(m)}function C(e){if(!e.getCacheValue(m)){const{curvePaths:t,hasM:r,hasZ:n,paths:s}=e,i=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:n,paths:s});e.setCacheValue(m,i)}return e.getCacheValue(m)}function P(e){if(!e.getCacheValue(m)){const{curvePaths:t,hasM:r,hasZ:n,paths:s}=e,i=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:n,paths:s});e.setCacheValue(m,i)}return e.getCacheValue(m)}function M(e){return(0,g.fromSpatialReference)(e)}function S(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return R(e,t);case s.G.enumEnvelope:return V(e,t);case s.G.enumMultiPoint:return E(e,t);case s.G.enumPolyline:return b(e,t);case s.G.enumPolygon:return G(e,t)}return null}function V(e,t){if(e.isEmpty())return null;const r=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(m,e),r}function E(e,t){if(e.isEmpty())return null;const r=e.getDescription(),n=r.hasM(),s=r.hasZ(),o=[],a=new i.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,a);const r=[a.getX(),a.getY()];s&&r.push(a.getZ()),n&&r.push(a.getM()),o.push(r)}const c=new u.A({hasM:n,hasZ:s,points:o,spatialReference:t});return c.setCacheValue(m,e),c}function R(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const r=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(r.m=e.getM()),s.hasZ()&&(r.z=e.getZ()),r.setCacheValue(m,e),r}function G(e,t){if(e.isEmpty())return null;const r=h.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}function b(e,t){if(e.isEmpty())return null;const r=l.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3931,6061,6342,8125],{61691(e,t,r){r.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},36633(e,t,r){r.d(t,{O:()=>g});var n=r(55537),s=r(79187),i=r(83661),o=r(15756);function a(){return u(new i.P,-1,Number.NaN)}function u(e,t,r){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:r,m_bRightSide:!1,isEmpty:c}}function c(){return Number.isNaN(this.m_distance)}function h(e,t,r=-1,a=-1){if(e.isEmpty())return 3;const u=e.getGeometryType();if((0,n.f)(u))return function(e,t,r,s){if(r>=0||s>=0)return(0,n.a)("");if(e.isDegenerate(0))return e.getStartXY().equals(t)?2:3;if(!e.isCurve()){const r=i.P.orientationRobust(t,e.getStartXY(),e.getEndXY());return r<0?1:r>0?0:2}const o=e.getClosestCoordinate(t,!1),a=e.getTangent(o),u=e.getCoord2D(o),c=i.P.orientationRobust(t,u,u.add(a));return c<0?1:c>0?0:2}(e,t,r,a);if(u===n.G.enumPolygon)return function(e,t,r,i){(r>=0||i>=0)&&(0,n.a)("");const a=new s.Envelope2D;e.queryEnvelope(a);const u=(0,o.l)(e,t,0);return 0===u?0:1===u?1:2}(e,t,r,a);if(u===n.G.enumPolyline)return function(e,t,r,s){(r<0&&s>=0||r>=0&&s<0)&&(0,n.a)("");const o=e.querySegmentIterator();if(r<0){let e=Number.MAX_VALUE,n=0;for(;o.nextPath();)for(;o.hasNextSegment();){const a=o.nextSegment(),u=a.getClosestCoordinate(t,!1),c=a.getCoord2D(u),h=i.P.sqrDistance(c,t);h<e?(n=1,r=o.getStartPointIndex(),s=o.getPathIndex(),e=h):h===e&&n++}if(0===n)return 3;if(1===n)return o.resetToVertex(r,s),h(o.nextSegment(),t)}const a=function(e,t,r,n){const s={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(s.i1=function(e,t,r){for(e.resetToVertex(t,r);e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();for(e.resetToVertex(t,r);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,r,n),-1!==s.i1){t.resetToVertex(s.i1,-1);const r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n),a=i.P.sqrDistance(o,e);{const t=o.clone();t.subThis(r.getStartXY());const n=e.clone();n.subThis(r.getStartXY()),s.bRight1=t.crossProduct(n)<0}if(s.i2=function(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();)if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2){t.resetToVertex(s.i2,-1);const r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n);if(i.P.sqrDistance(o,e)>a)s.i2=-1;else{const t=o.clone();t.subThis(r.getStartXY());const n=e.clone();n.subThis(r.getStartXY()),s.bRight2=t.crossProduct(n)<0}}if(-1===s.i2&&(s.i2=function(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();)if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex();return-1}(t,s.i1),-1!==s.i2)){t.resetToVertex(s.i2,-1);const r=t.nextSegment(),n=r.getClosestCoordinate(e,!1),o=r.getCoord2D(n);if(i.P.sqrDistance(o,e)>a)s.i2=-1;else{const t=o.clone();t.subThis(r.getStartXY());const n=e.clone();n.subThis(r.getStartXY()),s.bRight2=t.crossProduct(n)<0;const i=s.i1;s.i1=s.i2,s.i2=i;const a=s.bRight1;s.bRight1=s.bRight2,s.bRight2=a}}}return s}(t,o,r,s);if(-1!==a.i1&&-1===a.i2)return a.bRight1?1:0;if(-1!==a.i1&&-1!==a.i2){if(a.bRight1===a.bRight2)return a.bRight1?1:0;{o.resetToVertex(a.i1,-1);const e=o.nextSegment().getTangent(1);o.resetToVertex(a.i2,-1);const t=o.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}return o.resetToVertex(r,s),h(o.nextSegment(),t)}(e,t,r,a);if(u===n.G.enumEnvelope){const r=new s.Envelope2D;return e.queryEnvelope(r),r.contains(t)?r.containsExclusive(t)?1:2:0}return 3}var l=r(95213);class g{getOperatorType(){return 10500}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}getNearestCoordinate(e,t,r,s){if(t.isNAN()&&(0,n.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertex(e,t);case n.G.enumMultiPoint:return this.multiVertexGetNearestVertex(e,t);case n.G.enumPolyline:case n.G.enumPolygon:return this.multiPathGetNearestCoordinate(e,t,r,s);default:(0,n.t)("")}}getNearestVertex(e,t){if(t.isNAN()&&(0,n.a)("NAN xy coordinates are not allowed"),e.isEmpty())return a();switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertex(e,t);case n.G.enumMultiPoint:case n.G.enumPolyline:case n.G.enumPolygon:return this.multiVertexGetNearestVertex(e,t);default:(0,n.t)("")}}getNearestVertices(e,t,r,s){if(0===s&&(0,n.a)(""),t.isNAN()&&(0,n.a)("NAN xy coordinates are not allowed"),e.isEmpty())return[];switch(e.getGeometryType()){case n.G.enumPoint:return this.pointGetNearestVertices(e,t,r,s);case n.G.enumMultiPoint:case n.G.enumPolyline:case n.G.enumPolygon:return this.multiVertexGetNearestVertices(e,t,r,s);default:(0,n.t)("")}}multiPathGetNearestCoordinate(e,t,r,a){if(e.getGeometryType()===n.G.enumPolygon&&r){const r=new s.Envelope2D;e.queryEnvelope(r);const n=(0,l.d)(null,r,!1);let i;if(i=(0,o.l)(e,t,a?0:n),0!==i){const e=u(t,-1,0);return a&&(e.m_bRightSide=!0),e}}const c=e.querySegmentIterator(),g=new i.P;let m=-1,f=-1,x=Number.MAX_VALUE,p=0;for(;c.nextPath();)for(;c.hasNextSegment();){const e=c.nextSegment(),r=e.getClosestCoordinate(t,!1),n=e.getCoord2D(r),s=i.P.sqrDistance(n,t);s<x?(p=1,g.assign(n),m=c.getStartPointIndex(),f=c.getPathIndex(),x=s):s===x&&p++}-1===m&&(0,n.a)("");const y=u(g,m,Math.sqrt(x));if(a)if(e.getGeometryType()!==n.G.enumPolygon){let r=!1;if(p>1){const n=h(e,t,m,f);r=0!==n&&3!==n}else c.resetToVertex(m,f),r=0!==h(c.nextSegment(),t);y.m_bRightSide=r}else r||0!==(0,o.l)(e,t,0)&&(y.m_bRightSide=!0);return y}pointGetNearestVertex(e,t){const r=e.getXY();return u(r,0,i.P.distance(r,t))}multiVertexGetNearestVertex(e,t){const r=e.getAttributeStreamRef(0),n=e.getPointCount();let s=-1;const o=new i.P;let a=Number.MAX_VALUE;const c=new i.P;for(let e=0;e<n;e++){r.queryPoint2D(2*e,c);const n=i.P.sqrDistance(c,t);n<a&&(o.assign(c),s=e,a=n)}return u(o,s,Math.sqrt(a))}pointGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const n=r*r,o=e.getXY(),a=i.P.sqrDistance(o,t);a<=n&&s.push(u(o,0,Math.sqrt(a)))}return s}multiVertexGetNearestVertices(e,t,r,n){const s=[];if(0!==n){const o=e.getAttributeStreamRef(0),a=e.getPointCount();s.length=n+1;const c=r*r;for(let e=0;e<a;e++){const r=o.read(2*e),n=o.read(2*e+1),a=t.x-r,h=t.y-n,l=a*a+h*h;l<=c&&s.push(u(i.P.construct(r,n),e,Math.sqrt(l)))}s.sort((e,t)=>e.m_distance-t.m_distance)}return s.slice(0,n)}}},76061(e,t,r){r.d(t,{S:()=>s});var n=r(61691);class s extends n.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},87992(e,t,r){r.d(t,{JR:()=>E,ME:()=>M,MY:()=>R,NO:()=>P,Nh:()=>V,V2:()=>A,_s:()=>w,e6:()=>O,gh:()=>S,tr:()=>Y,uX:()=>p});var n=r(5482),s=r(69397),i=r(16930),o=(r(70328),r(19419)),a=r(60408),u=r(21325),c=r(513),h=r(50954),l=r(79567),g=r(52006),m=r(49663),f=r(46068),x=r(92722);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:n,vertexZ:s,vertexM:i,partCount:o,partOffsets:a,partFlags:u,segmentFlags:c,segmentIndices:h,segmentParams:l,segmentCountArc:g,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=n,this.vertexZ=s,this.vertexM=i,this.partCount=o,this.partOffsets=a,this.partFlags=u,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=l,this.segmentCountArc=g,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return null!=this.segmentFlags}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?s.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:r,hasZ:n,hasM:s,segmentCountArc:i,segmentCountBezier:o}=this,a=A(e,t,r,n,s,this.hasCurves(),i,o);a.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(u.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,r+1)),a.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:r,segmentParams:n,segmentParamCount:s}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(r.subarray(0,t),0),a.segmentParams.set(n.subarray(0,s),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,u.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=N(e),this._segments=new v(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class v{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new C(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class C{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=N(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[r++],n=t[r++],s=t[r++],i=t[r++];return{b:[this.end,[e,n],[s,i]]}}const n=t[r++],s=t[r++],i=t[r++],o=t[r++],a=t[r++],u=t[r++];r++,r++;const c=t[r++],h=t[r++];if(!Boolean(4&n)&&1===i)return{c:[this.end,[c,h]]};const l=2&n?0:1,g=1&n?0:1;return{a:[this.end,[a,u],l,g,o,s,i]}}}function P(e,t){const r={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(r,new G(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:r,vertexXY:s,vertexZ:i,vertexM:a}=e,u=b(e);if(e.hasCurves()){const r={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(r,new G(e,["vertexZ","vertexM"]),!1);const s=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:r}of t.segments)(0,l.e)(s,e,r),e=(0,g.yP)(r)}const[i,a,c,h]=s;t={xmin:i,ymin:a,xmax:c,ymax:h,spatialReference:u}}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}else{let e,n,i,o;e=n=1/0,i=o=-1/0;for(let t=0;t<r;++t){const r=s[2*t],a=s[2*t+1];e=Math.min(e,r),i=Math.max(i,r),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:i,ymax:o,spatialReference:u}}if(i){let e=1/0,r=-1/0;for(const t of i)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(a){let e=1/0,r=-1/0;for(const t of a)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,n.hk)(r)}}function M(e){let t,r,n;if((0,a.fT)(e)){n="point";const{x:s,y:i,z:o,m:a}=e,u=[s,i];null!=o&&u.push(o),null!=a&&u.push(a),r=[[u]],t=1}else(0,a.U9)(e)?(n="multipoint",r=[e.points],t=e.points.length):(0,a.Rg)(e)?(n="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(n="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,_(t[0],(0,g.yP)(t.at(-1)))&&--e),e),0));const s=A(n,t,n.includes("point")?0:r.length,(0,a.Pv)(e),(0,a.W0)(e),(0,g.Ed)(e)),{hasZ:i,hasM:o,vertexXY:u,vertexZ:c,vertexM:h}=s;function l(e){u[2*f]=e[0],u[2*f+1]=e[1],i&&(c[f]=e[2]),o&&(h[f]=e[m]),++f}s.spatialReference=e.spatialReference??void 0;const m=s.hasZ?3:2;let f=0;if(!s.isMultipart()){if(!i&&!o){for(const[e,t]of r[0])u[2*f]=e,u[2*f+1]=t,++f;return s}for(const e of r[0])l(e);return s}const x="polygon"===n,{partOffsets:p}=s;let y=0;if(!s.hasCurves()){for(const e of r){if(p[y++]=f,0===e.length)continue;let t=e.length;if(x&&_(e[0],e.at(-1))&&--t,i||o)for(let r=0;r<t;++r)l(e[r]);else for(let r=0;r<t;++r){const[t,n]=e[r];u[2*f]=t,u[2*f+1]=n,++f}}return p[y]=f,s}function d(e){const t=v+e;if(t<=(s.segmentParams?.length??0))return;let r=t*I;r=20*Math.ceil(r/20);const n=s.segmentParams;s.segmentParams=new Float64Array(r),null!=n&&s.segmentParams.set(n)}let v=0;for(const e of r){if(s.partOffsets[y++]=f,0===e.length)continue;const t=e[0];let r=t;for(let t=1;t<e.length;++t){const n=e[t];l(r);const i=f-1;(0,g.wY)(n)?(d(10),++s.segmentCountArc,v=w(r,n,s,i,v),r=n.a[0]):(0,g.DA)(n)?(d(10),++s.segmentCountArc,v=Z(r,n,s,i,v),r=n.a[0]):(0,g.aO)(n)?(d(10),++s.segmentCountArc,v=O(r,n,s,i,v),r=n.c[0]):(0,g.n1)(n)?(d(4),++s.segmentCountBezier,v=Y(0,n,s,i,v),r=n.b[0]):r=n}x&&_(t,r)||l(r)}return s.partOffsets[y]=f,s}function S(e){const t=N(e),{vertexCount:r,partCount:n,hasZ:s,hasM:i}=e,o=b(e);if("point"===e.type){const[t,r]=e.vertexXY,n=e.vertexZ?.[0],s=e.vertexM?.[0];return{x:t,y:r,z:n,m:s,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<r;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:s,hasM:i}}const u="polygon"===e.type;if(!e.hasCurves()){const r=new Array;for(let s=0;s<n;++s){const n=e.partOffsets[s+1],i=new Array;for(;a<n;)i.push(t(a++));u&&i.length>0&&i.push(i[0]),r.push(i)}return u?{rings:r,hasZ:s,hasM:i,spatialReference:o}:{paths:r,hasZ:s,hasM:i,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:r}of e.parts){const e=[r];for(const{curve:r}of t)e.push(r);c.push(e)}return u?{rings:[],curveRings:c,hasZ:s,hasM:i,spatialReference:o}:{paths:[],curvePaths:c,hasZ:s,hasM:i,spatialReference:o}}function V(e,{lengths:t,coords:r,hasZ:n,hasM:s},i){const o=e.includes("point")?0:t.length,a="polygon"===e,u="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,s??=!1;const c=A(e,u,o,n,s,!1,0,0);if(c.spatialReference=i??void 0,!c.isMultipart()){for(let e=0,t=0;e<u;++e)c.vertexXY[2*e]=r[t++],c.vertexXY[2*e+1]=r[t++],n&&(c.vertexZ[e]=r[t++]),s&&(c.vertexM[e]=r[t++]);return c}const h=2+Number(n)+Number(s);let l=0,g=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[g],i=t+e-Number(a);c.partOffsets[++g]=i;for(let e=t;e<i;++e)c.vertexXY[2*e]=r[l++],c.vertexXY[2*e+1]=r[l++],n&&(c.vertexZ[e]=r[l++]),s&&(c.vertexM[e]=r[l++]);a&&(l+=h)}return c}function E({type:e,vertexCount:t,vertexXY:r,vertexZ:n,vertexM:s,partCount:i,partOffsets:o,hasZ:a,hasM:u}){const c=new x.A([],[],a,u);i=Math.max(i,1);const h="polygon"===e;let l=0;for(let e=0;e<i;++e){const i=o?.[e+1]??t,g=c.coords.length;for(let e=l;e<i;++e)c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e]);if(h){const e=l;c.coords.push(r[2*e],r[2*e+1]),a&&c.coords.push(n[e]),u&&c.coords.push(s[e])}c.lengths.push((c.coords.length-g)/c.stride),l=i}return"point"===e&&(c.lengths.length=0),c}function R(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===r)&&(n=void 0);const s=e.getVCS();if(null==s)return{wkid:r,latestWkid:n,wkt:t};const i=s.isCustomWkid()?0:s.getOldID();if(i<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===i)&&(o=void 0),{wkid:r,wkt:t,latestWkid:n,vcsWkid:i,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class G{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function b({spatialReference:e}){return e instanceof i.A?e.toJSON():e}function N({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?n=>[e[2*n],e[2*n+1],t[n],r[n]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function _(e,t){return e.every((e,r)=>e===t[r])}function A(e,t,r,n,s,i,o,a){o??=0,a??=0;const u=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),s&&(c+=Float64Array.BYTES_PER_ELEMENT*t),u.isMultipart()&&(c+=(r+1)*Int32Array.BYTES_PER_ELEMENT,c+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=u.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let l=0;return u.vertexXY=new Float64Array(h,l,2*t),l+=u.vertexXY.byteLength,n&&(u.vertexZ=new Float64Array(h,l,t),l+=u.vertexZ.byteLength),s&&(u.vertexM=new Float64Array(h,l,t),l+=u.vertexM.byteLength),i&&(u.segmentParams=new Float64Array(h,l,u.segmentParamCount),l+=u.segmentParams.byteLength,u.segmentIndices=new Int32Array(h,l,t),u.segmentIndices.fill(X),l+=u.segmentIndices.byteLength),u.isMultipart()&&(u.partOffsets=new Int32Array(h,l,r+1),l+=u.partOffsets.byteLength,u.partFlags=new Int8Array(h,l,r+1),l+=u.partFlags.byteLength,"polygon"===u.type&&u.partFlags.subarray(0,r).fill(1)),i&&(u.segmentFlags=new Int8Array(h,l,t),u.segmentFlags.fill(1),l+=u.segmentFlags.byteLength),u}function w(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const[a,[u,c],h,l,g,m,x]=t.a;let p=4;l||(p|=1),h||(p|=2);const y=(0,f.SW)(e,t),[d,v]=(0,f.Uk)(y,.5);return s[o++]=p,s[o++]=m,s[o++]=x,s[o++]=g,s[o++]=u,s[o++]=c,s[o++]=y.u2-y.u1,s[o++]=y.u1,s[o++]=d,s[o++]=v,o}function Z(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){r[i]=4,n[i]=o;const a=(0,m.i)(e,t);return T(a,4,...(0,c.mq)(a,.5),s,o)}function O(e,t,{segmentFlags:r,segmentIndices:n,segmentParams:s},i,o){return r[i]=4,n[i]=o,T((0,h.pM)(e,t),0,...t.c[1],s,o)}function T(e,t,r,n,s,i){const{cx:o,cy:a,thetaStart:u,thetaEnd:c,radius:h}=e;return u>c||(t|=1),Math.abs(c-u)<=Math.PI||(t|=2),s[i++]=t,s[i++]=h,s[i++]=1,s[i++]=0,s[i++]=o,s[i++]=a,s[i++]=c-u,s[i++]=u,s[i++]=r,s[i++]=n,i}function Y(e,{b:[t,[r,n],[s,i]]},{segmentFlags:o,segmentIndices:a,segmentParams:u},c,h){return o[c]=2,a[c]=h,u[h++]=r,u[h++]=n,u[h++]=s,u[h++]=i,h}const I=1.61803,X=-1},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>p,fromGeometry:()=>x,fromMultipoint:()=>y,fromPoint:()=>d,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>P,fromSpatialReference:()=>M,getSpatialReference:()=>f,toExtent:()=>V,toGeometry:()=>S,toMultipoint:()=>E,toPoint:()=>R,toPolygon:()=>G,toPolyline:()=>b});var n=r(83661),s=(r(79187),r(55537)),i=r(95213),o=r(88885),a=r(5443),u=r(48526),c=r(86738),h=r(39829),l=r(82799),g=(r(90293),r(83299));const m="_gxVersion";function f(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return d(e);case"multipoint":return y(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return p(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function p(e){if(!e.getCacheValue(m)){const t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(m,t)}return e.getCacheValue(m)}function y(e){if(!e.getCacheValue(m)){const t=new o.M,r=new i.P,n=e.points,s=e.hasM,a=e.hasZ,u=a?3:2;for(let e=0,i=n.length;e<i;e++){const i=n[e];r.setXYCoords(i[0],i[1]),a&&r.setZ(i[2]??0),s&&r.setM(i[u]??NaN),t.add(r)}e.setCacheValue(m,t)}return e.getCacheValue(m)}function d(e){if(!e.getCacheValue(m)){const t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(m,t)}return e.getCacheValue(m)}function v(e){if(!e.getCacheValue(m)){const{curveRings:t,hasM:r,hasZ:n,rings:s}=e,i=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:n,rings:s});e.setCacheValue(m,i)}return e.getCacheValue(m)}function C(e){if(!e.getCacheValue(m)){const{curvePaths:t,hasM:r,hasZ:n,paths:s}=e,i=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:n,paths:s});e.setCacheValue(m,i)}return e.getCacheValue(m)}function P(e){if(!e.getCacheValue(m)){const{curvePaths:t,hasM:r,hasZ:n,paths:s}=e,i=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:n,paths:s});e.setCacheValue(m,i)}return e.getCacheValue(m)}function M(e){return(0,g.fromSpatialReference)(e)}function S(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return R(e,t);case s.G.enumEnvelope:return V(e,t);case s.G.enumMultiPoint:return E(e,t);case s.G.enumPolyline:return b(e,t);case s.G.enumPolygon:return G(e,t)}return null}function V(e,t){if(e.isEmpty())return null;const r=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(m,e),r}function E(e,t){if(e.isEmpty())return null;const r=e.getDescription(),n=r.hasM(),s=r.hasZ(),o=[],a=new i.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,a);const r=[a.getX(),a.getY()];s&&r.push(a.getZ()),n&&r.push(a.getM()),o.push(r)}const c=new u.A({hasM:n,hasZ:s,points:o,spatialReference:t});return c.setCacheValue(m,e),c}function R(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const r=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(r.m=e.getM()),s.hasZ()&&(r.z=e.getZ()),r.setCacheValue(m,e),r}function G(e,t){if(e.isEmpty())return null;const r=h.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}function b(e,t){if(e.isEmpty())return null;const r=l.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}}}]);
@@ -13,7 +13,7 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{Re
13
13
 
14
14
  float fogAmount = fogAmount * getDistanceFalloff(terrainDepth, rayDir, fogStrength);
15
15
 
16
- ${t(h,a`vec3 emission = texture(emissionTexture, uv).rgb * oitInputScale;
16
+ ${t(h,a`vec3 emission = texture(emissionTexture, uv).rgb * floatBlendInputScale;
17
17
  vec3 emissionDistanceCorrected = mix(emission, vec3(0.0), fogAmount * fogColorDistanceWeight);
18
18
  vec3 finalFogColor = fogColor * fogAmount + emissionDistanceCorrected;
19
19
  vec4 fog = vec4(finalFogColor, fogAmount);`,a`vec4 fog = vec4(fogColor, 1.0) * fogAmount;`)}
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as l}from"../views/webgl/NoParameters.js";import{ShaderBuilder as a}from"../views/webgl/ShaderBuilder.js";class n extends l{constructor(){super(...arguments),this.blurRadius=0,this.inputScale=1}}function c(l){const n=new a,c=n.fragment;n.include(o),c.include(r),c.uniforms.add(new i("colorTexture",e=>e.emissionsToDownsample),new t("blurRadius",e=>e.blurRadius),new t("inputScale",e=>l.hasFloatOit?1:e.inputScale));let u="";const d=7;for(let e=0;e<d;e++){u+=`locations1D[${e}] = ${(e/(d-1)*2-1).toFixed(3).toString()};`}const m=2;let f="";for(let o=0;o<d;o++){f+=`locations1DWeights[${o}] = ${e(o-Math.floor(d/2),m).toFixed(7).toString()};`}const v=0===l.glowStage;return c.code.add(s`
2
+ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as o}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{NoParameters as l}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class a extends l{constructor(){super(...arguments),this.blurRadius=0,this.inputScale=1}}function c(l){const a=new n,c=a.fragment;a.include(o),c.include(r),c.uniforms.add(new i("colorTexture",e=>e.emissionsToDownsample),new t("blurRadius",e=>e.blurRadius),new t("inputScale",e=>l.useFloatBlend?1:e.inputScale));let u="";const d=7;for(let e=0;e<d;e++){u+=`locations1D[${e}] = ${(e/(d-1)*2-1).toFixed(3).toString()};`}const m=2;let f="";for(let o=0;o<d;o++){f+=`locations1DWeights[${o}] = ${e(o-Math.floor(d/2),m).toFixed(7).toString()};`}const v=0===l.glowStage;return c.code.add(s`
3
3
  float locations1D[${s.int(d)}];
4
4
  float locations1DWeights[${s.int(d)}];
5
5
 
@@ -22,4 +22,4 @@ import{gauss as e}from"../core/mathUtils.js";import{ScreenSpacePass as o}from"..
22
22
  }
23
23
  return res;
24
24
  }
25
- `).main.add(s`fragColor = vec4(blurUniformSamples(), 0.0);`),n}const u=Object.freeze(Object.defineProperty({__proto__:null,GlowBlurPassParameters:n,build:c},Symbol.toStringTag,{value:"Module"}));export{n as G,u as a,c as b};
25
+ `).main.add(s`fragColor = vec4(blurUniformSamples(), 0.0);`),a}const u=Object.freeze(Object.defineProperty({__proto__:null,GlowBlurPassParameters:a,build:c},Symbol.toStringTag,{value:"Module"}));export{a as G,u as a,c as b};
@@ -1,9 +1,9 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{If as s,glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{RayDistanceFalloffPassParameters as d,RayDistanceFalloff as m}from"../views/3d/webgl-engine/effects/raymarching/RayDistanceFalloff.glsl.js";import{Dithering as c}from"../views/3d/webgl-engine/shaders/Dithering.glsl.js";import{oitResolution as p}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ScreenSpacePassAtmosphere as u}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ToneMapping as g}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";class w extends d{constructor(){super(...arguments),this.glowLod=-1,this.minDisperse=new h([.8,.12,.05,.02,.01,0]),this.dispersionWeight=1,this.distanceModifier=1e-4}}function f(d){const w=new x,f=w.fragment,{blurEnabled:h,tonemappingEnabled:v}=d;return w.include(u,{needUVs:!0,needEyeDirection:!0}),f.include(o),f.include(m),f.include(e),w.outputs.add("fragColor","vec4",0),w.outputs.add("fragEmission","vec3",1),f.include(g),f.include(p,d),f.include(c,d),f.uniforms.add(new a("colorTexture",e=>e.color),new a("emissionTexture",e=>e.emission)),h?(f.uniforms.add(new n("depthTexture",e=>e.mainDepth),new r("distanceModifier",e=>e.distanceModifier),new a("lodTexture0",e=>e.lodTexture0),new a("lodTexture1",e=>e.lodTexture1),new a("lodTexture2",e=>e.lodTexture2),new a("lodTexture3",e=>e.lodTexture3),new a("lodTexture4",e=>e.lodTexture4),new t("glowLod",e=>e.glowLod),new i("minDisperse",6,e=>e.minDisperse.presets),new i("maxDisperse",6,e=>e.maxDisperse.presets),new r("dispersionWeight",e=>e.dispersionWeight)).main.add(l`
2
+ import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{Gamma as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{FloatPassUniform as r}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{FloatsPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js";import{If as s,glsl as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{IntegerPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/IntegerPassUniform.js";import{Texture2DBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{RayDistanceFalloffPassParameters as d,RayDistanceFalloff as m}from"../views/3d/webgl-engine/effects/raymarching/RayDistanceFalloff.glsl.js";import{Dithering as c}from"../views/3d/webgl-engine/shaders/Dithering.glsl.js";import{oitResolution as p}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ScreenSpacePassAtmosphere as u}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ToneMapping as g}from"../views/3d/webgl-engine/shaders/ToneMapping.glsl.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";class f extends d{constructor(){super(...arguments),this.glowLod=-1,this.minDisperse=new h([.8,.12,.05,.02,.01,0]),this.dispersionWeight=1,this.distanceModifier=1e-4}}function w(d){const f=new x,w=f.fragment,{blurEnabled:h,tonemappingEnabled:v}=d;return f.include(u,{needUVs:!0,needEyeDirection:!0}),w.include(o),w.include(m),w.include(e),f.outputs.add("fragColor","vec4",0),f.outputs.add("fragEmission","vec3",1),w.include(g),w.include(p,d),w.include(c,d),w.uniforms.add(new a("colorTexture",e=>e.color),new a("emissionTexture",e=>e.emission)),h?(w.uniforms.add(new n("depthTexture",e=>e.mainDepth),new r("distanceModifier",e=>e.distanceModifier),new a("lodTexture0",e=>e.lodTexture0),new a("lodTexture1",e=>e.lodTexture1),new a("lodTexture2",e=>e.lodTexture2),new a("lodTexture3",e=>e.lodTexture3),new a("lodTexture4",e=>e.lodTexture4),new t("glowLod",e=>e.glowLod),new i("minDisperse",6,e=>e.minDisperse.presets),new i("maxDisperse",6,e=>e.maxDisperse.presets),new r("dispersionWeight",e=>e.dispersionWeight)).main.add(l`
3
3
  vec4 color = texture(colorTexture, uv);
4
4
  color = vec4(linearizeGamma(color.rgb), color.a);
5
5
 
6
- vec3 lod0 = texture(emissionTexture, uv).rgb * oitInputScale;
6
+ vec3 lod0 = texture(emissionTexture, uv).rgb * floatBlendInputScale;
7
7
  vec3 lod1 = texture(lodTexture0, uv).rgb;
8
8
  vec3 lod2 = texture(lodTexture1, uv).rgb;
9
9
  vec3 lod3 = texture(lodTexture2, uv).rgb;
@@ -40,19 +40,19 @@ import{ReadDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/output/Re
40
40
  emission = glowLod == 0 ? lodFactor0 * lod0 : glowLod == 1 ? lodFactor1 * lod1 : glowLod == 2 ? lodFactor2 * lod2 : glowLod == 3 ? lodFactor3 * lod3 : glowLod == 4 ? lodFactor4 * lod4 : glowLod == 5 ? lodFactor5 * lod5 : emission;
41
41
 
42
42
  fragEmission = emission;
43
- fragEmission.rgb = emission.rgb * oitOutputScale + ditherNoise();
43
+ fragEmission.rgb = emission.rgb * floatBlendOutputScale + ditherNoise();
44
44
 
45
45
  // tonemapping is only applied to the emissive part since main color values are not in HDR.
46
46
  ${s(v,"emission = tonemapKhronosNeutral(emission, 1.0);")}
47
47
 
48
48
  fragColor = delinearizeGamma(vec4(color.rgb + emission.rgb, color.w));
49
- `),w):(f.main.add(l`
49
+ `),f):(w.main.add(l`
50
50
  vec4 color = texture(colorTexture, uv);
51
51
  color = vec4(linearizeGamma(color.rgb), color.a);
52
52
 
53
53
  // emission is already in linear color space here.
54
- vec3 emission = texture(emissionTexture, uv).rgb * oitInputScale;
54
+ vec3 emission = texture(emissionTexture, uv).rgb * floatBlendInputScale;
55
55
 
56
56
  ${s(v,"emission = tonemapKhronosNeutral(emission, 1.0);")}
57
57
  fragColor = delinearizeGamma(vec4(color.rgb + emission, color.w));
58
- `),w)}class h{constructor(e,o=!0){this.presets=e,this.presets=v(e,o)}}function v(e,o,r=1){const i=e[0]+e[1]+e[2]+e[3]+e[4]+e[5];return!o||i<=r?e:[e[0]/i,e[1]/i,e[2]/i,e[3]/i,e[4]/i,e[5]/i]}function b(e,o,r=1){return[e[0]*(1-r)+o[0]*r,e[1]*(1-r)+o[1]*r,e[2]*(1-r)+o[2]*r,e[3]*(1-r)+o[3]*r,e[4]*(1-r)+o[4]*r,e[5]*(1-r)+o[5]*r]}const D=Object.freeze(Object.defineProperty({__proto__:null,GlowCompositionPassParameters:w,GlowLodFactors:h,build:f,mixPreset:b},Symbol.toStringTag,{value:"Module"}));export{w as G,h as a,D as b,f as c,b as m};
58
+ `),f)}class h{constructor(e,o=!0){this.presets=e,this.presets=v(e,o)}}function v(e,o,r=1){const i=e[0]+e[1]+e[2]+e[3]+e[4]+e[5];return!o||i<=r?e:[e[0]/i,e[1]/i,e[2]/i,e[3]/i,e[4]/i,e[5]/i]}function b(e,o,r=1){return[e[0]*(1-r)+o[0]*r,e[1]*(1-r)+o[1]*r,e[2]*(1-r)+o[2]*r,e[3]*(1-r)+o[3]*r,e[4]*(1-r)+o[4]*r,e[5]*(1-r)+o[5]*r]}const D=Object.freeze(Object.defineProperty({__proto__:null,GlowCompositionPassParameters:f,GlowLodFactors:h,build:w,mixPreset:b},Symbol.toStringTag,{value:"Module"}));export{f as G,h as a,D as b,w as c,b as m};
@@ -139,4 +139,4 @@ samplePos += (vec2(1.0, -1.0) * texelSize) * scaleFactor;`),T?Y.main.add(S`
139
139
  }
140
140
  `),$&&Y.main.add("fragColor *= texelFetch(texOcclusion, ivec2(gl_FragCoord.xy), 0).r;"),!Z&&k&&Y.main.add("fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);"),2===A&&Y.main.add(S`if (fragColor.a < alphaCutoff) {
141
141
  discard;
142
- }`),re&&Y.main.add(S`fragColor = applyFocusAreaStyle(fragColor, focusAreaStyle);`),a(A)&&q&&Y.main.add("fragEmission = vec4(0.0);"),A){case 1:Y.main.add("\n fragColor = vec4(fragColor.rgb * oitOutputScale, fragColor.a);\n fragAlpha = fragColor.a * oitOutputScale;\n ");break;case 2:Y.main.add("fragColor.rgb /= fragColor.a;");break;case 11:Y.main.add("outputObjectAndLayerIdColor();");break;case 10:r.include(c,e),Y.main.add("outputHighlight(false);")}return r}function L(e){return e.outlineColor[3]>0&&e.outlineSize>0}function V(o){return o.textureIsSignedDistanceField?T(o.anchorPosition,o.distanceFieldBoundingBox,M):e(M,o.anchorPosition),M}const M=r();function T(e,r,i){o(i,e[0]*(r[2]-r[0])+r[0],e[1]*(r[3]-r[1])+r[1])}const U=.08,_=Object.freeze(Object.defineProperty({__proto__:null,anchorPosition:V,build:$},Symbol.toStringTag,{value:"Module"}));export{_ as H,V as a,$ as b};
142
+ }`),re&&Y.main.add(S`fragColor = applyFocusAreaStyle(fragColor, focusAreaStyle);`),a(A)&&q&&Y.main.add("fragEmission = vec4(0.0);"),A){case 1:Y.main.add("\n fragColor = vec4(fragColor.rgb * floatBlendOutputScale, fragColor.a);\n fragAlpha = fragColor.a * floatBlendOutputScale;\n ");break;case 2:Y.main.add("fragColor.rgb /= fragColor.a;");break;case 11:Y.main.add("outputObjectAndLayerIdColor();");break;case 10:r.include(c,e),Y.main.add("outputHighlight(false);")}return r}function L(e){return e.outlineColor[3]>0&&e.outlineSize>0}function V(o){return o.textureIsSignedDistanceField?T(o.anchorPosition,o.distanceFieldBoundingBox,M):e(M,o.anchorPosition),M}const M=r();function T(e,r,i){o(i,e[0]*(r[2]-r[0])+r[0],e[1]*(r[3]-r[1])+r[1])}const U=.08,_=Object.freeze(Object.defineProperty({__proto__:null,anchorPosition:V,build:$},Symbol.toStringTag,{value:"Module"}));export{_ as H,V as a,$ as b};
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{If as r,glsl as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{O as s}from"./OITDim.glsl.js";import{oitResolution as a}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class i extends s{}function c(s){const i=new n;i.include(e);const{hasEmission:c,frontFaceMask:u,computeHudOcclusion:l,hasFloatOit:m}=s,f=i.fragment;f.include(a,s),f.uniforms.add(new t("colorTexture",e=>e.colorTexture),new t("alphaTexture",e=>e.alphaTexture));let d=0;return i.outputs.add("fragColor","vec4",d++),c&&i.outputs.add("fragEmission","vec4",d++),l&&i.outputs.add("fragOcclusion","vec4",d++),f.uniforms.add(new t("frontFaceTexture",e=>e.frontFaceTexture)),c&&(f.uniforms.add(new t("emissionTexture",e=>e.emissionTexture)),f.uniforms.add(new t("emissionFrontFaceTexture",e=>e.emissionFrontFaceTexture))),f.main.add(o`
3
- float srcAlpha = texture(alphaTexture, uv).r * oitInputScale;
4
- ${r(l,"fragOcclusion = vec4(1.0, 0.0, 0.0, 1.0);")}
2
+ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{If as r,glsl as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{O as s}from"./OITDim.glsl.js";import{oitResolution as a}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class i extends s{}function c(s){const i=new n;i.include(e);const{hasEmission:c,frontFaceMask:l,computeHudOcclusion:u,useFloatBlend:m}=s,f=i.fragment;f.include(a,s),f.uniforms.add(new t("colorTexture",e=>e.colorTexture),new t("alphaTexture",e=>e.alphaTexture));let d=0;return i.outputs.add("fragColor","vec4",d++),c&&i.outputs.add("fragEmission","vec4",d++),u&&i.outputs.add("fragOcclusion","vec4",d++),f.uniforms.add(new t("frontFaceTexture",e=>e.frontFaceTexture)),c&&(f.uniforms.add(new t("emissionTexture",e=>e.emissionTexture)),f.uniforms.add(new t("emissionFrontFaceTexture",e=>e.emissionFrontFaceTexture))),f.main.add(o`
3
+ float srcAlpha = texture(alphaTexture, uv).r * floatBlendInputScale;
4
+ ${r(u,"fragOcclusion = vec4(1.0, 0.0, 0.0, 1.0);")}
5
5
 
6
6
  if(srcAlpha == 0.0) {
7
7
  fragColor = vec4(0.0);
@@ -10,7 +10,7 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
10
10
  }
11
11
  vec4 frontFace = texture(frontFaceTexture, uv);
12
12
 
13
- ${r(u,o`
13
+ ${r(l,o`
14
14
  if (frontFace.a == 0.0) {
15
15
  fragColor = vec4(0.0);
16
16
  ${r(c,"fragEmission = vec4(0.0);")}
@@ -19,10 +19,10 @@ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/Scr
19
19
  `)}
20
20
 
21
21
  vec4 srcColor = texture(colorTexture, uv);
22
- ${r(!m,"float frontWeight = srcAlpha * oitOutputScale;\n frontFace.a = mix(frontFace.a, 1.0, clamp((frontWeight - 0.9) * 10.0, 0.0, 1.0));")}
23
- fragColor = vec4(mix(srcColor.rgb * oitInputScale / srcAlpha, frontFace.rgb, frontFace.a), 1.0 - srcColor.a);
22
+ ${r(!m,"float frontWeight = srcAlpha * floatBlendOutputScale;\n frontFace.a = mix(frontFace.a, 1.0, clamp((frontWeight - 0.9) * 10.0, 0.0, 1.0));")}
23
+ fragColor = vec4(mix(srcColor.rgb * floatBlendInputScale / srcAlpha, frontFace.rgb, frontFace.a), 1.0 - srcColor.a);
24
24
 
25
- ${r(c,"vec4 emission = texture(emissionTexture, uv) * oitInputScale;\n vec4 emissionFrontFace = texture(emissionFrontFaceTexture, uv);\n\n // Modulate transparent emitter by front faces. This case is important for surfaces which contain emitter and\n // non-emitter at the same time. Non-emitter surface parts need to modulate emissions as well.\n emission.rgb = emission.rgb * (1.0 - frontFace.a);\n\n fragEmission = vec4(mix(emission.rgb / srcAlpha, emissionFrontFace.rgb, emissionFrontFace.a) * oitOutputScale, 1.0 - srcColor.a);\n ")}
25
+ ${r(c,"vec4 emission = texture(emissionTexture, uv) * floatBlendInputScale;\n vec4 emissionFrontFace = texture(emissionFrontFaceTexture, uv);\n\n // Modulate transparent emitter by front faces. This case is important for surfaces which contain emitter and\n // non-emitter at the same time. Non-emitter surface parts need to modulate emissions as well.\n emission.rgb = emission.rgb * (1.0 - frontFace.a);\n\n fragEmission = vec4(mix(emission.rgb / srcAlpha, emissionFrontFace.rgb, emissionFrontFace.a) * floatBlendOutputScale, 1.0 - srcColor.a);\n ")}
26
26
 
27
- ${r(l,"fragOcclusion.r = pow(srcColor.a, 0.5);")}
28
- `),i}const u=Object.freeze(Object.defineProperty({__proto__:null,OITBlendPassParameters:i,build:c},Symbol.toStringTag,{value:"Module"}));export{i as O,u as a,c as b};
27
+ ${r(u,"fragOcclusion.r = pow(srcColor.a, 0.5);")}
28
+ `),i}const l=Object.freeze(Object.defineProperty({__proto__:null,OITBlendPassParameters:i,build:c},Symbol.toStringTag,{value:"Module"}));export{i as O,l as a,c as b};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.51";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.1.0-next.53";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,l=.5;function o(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let l=1;l<n.length;++l){const o=n[l],u=Number(t(o));u>r&&(r=u,e=o)}return e}function i(n,t=u){return f(n,n=>-t(n))}function c(n,t){return t?n.filter((n,e,r)=>r.findIndex(t.bind(null,n))===e):Array.from(new Set(n))}function s(n,t,e,r,l,o,u){if(null==n&&null==r)return!0;t=Math.max(0,t),l=Math.max(0,l),e=Math.max(0,e<0?(n?.length??0)+e:e),o=Math.max(0,o<0?(r?.length??0)+o:o);const f=e-t;if(null==n||null==r||f!==o-l)return!1;if(u){for(let i=0;i<f;i++)if(!u(n[t+i],r[l+i]))return!1}else for(let i=0;i<f;i++)if(n[t+i]!==r[l+i])return!1;return!0}function h(n,t,e){return s(n,0,n?.length??0,t,0,t?.length??0,e)}function a(){return(n,t)=>{if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}}function g(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function d(n,t,e){let r,l;return e?(r=t.filter(t=>!n.some(n=>e(n,t))),l=n.filter(n=>!t.some(t=>e(t,n)))):(r=t.filter(t=>!n.includes(t)),l=n.filter(n=>!t.includes(n))),{added:r,removed:l}}function m(n,t,e){return n&&t?e?n.filter(n=>t.findIndex(t=>e(n,t))>-1):n.filter(n=>t.includes(n)):[]}function p(n){return n&&"number"==typeof n.length}function M(n,t){const e=n.length;if(0===e)return[];const r=[];for(let l=0;l<e;l+=t)r.push(n.slice(l,l+t));return r}function x(n,t){void 0===t&&(t=n,n=0);const e=new Array(t-n);for(let r=n;r<t;r++)e[r-n]=r;return e}function N(n,t,e){const r=n.length;let l=0,o=r-1;for(;l<o;){const e=l+Math.floor((o-l)/2);t>n[e]?l=e+1:o=e}const u=n[l];return e?t>=n[r-1]?-1:u===t?l:l-1:u===t?l:-1}function w(n,t,e,r){n.length>e&&(n.length=e);const l=n.length;let o=0,u=l;if(l===e){const e=r(n[l-1],t);if(e<=0||Number.isNaN(e))return}for(;o<u;){const e=o+u>>>1,l=r(n[e],t);l<=0||Number.isNaN(l)?o=e+1:u=e}l===e&&n.pop(),n.splice(o,0,t)}class b{constructor(){this.last=0}}const y=new b;function A(n,t,e,r){r=r||y;const l=Math.max(0,r.last-10);for(let u=l;u<e;++u)if(n[u]===t)return r.last=u,u;const o=Math.min(l,e);for(let u=0;u<o;++u)if(n[u]===t)return r.last=u,u;return-1}function S(t,e,r,l){const o=r??t.length,u=A(t,n(e),o,l);if(-1!==u)return t[u]=t[o-1],null==r&&t.pop(),e}const j=new Set;function v(n,t,e=n.length,r=t.length,l,o){if(0===r||0===e)return e;j.clear();for(let f=0;f<r;++f)j.add(t[f]);l=l||y;const u=Math.max(0,l.last-10);for(let f=u;f<e;++f)if(j.has(n[f])&&(o?.push(n[f]),j.delete(n[f]),n[f]=n[e-1],--e,--f,0===j.size||0===e))return j.clear(),e;for(let f=0;f<u;++f)if(j.has(n[f])&&(o?.push(n[f]),j.delete(n[f]),n[f]=n[e-1],--e,--f,0===j.size||0===e))return j.clear(),e;return j.clear(),e}function z(n,t){let e=0;for(let r=0;r<n.length;++r){const l=n[r];t(l,r)&&(n[e]=l,e++)}return n.length=e,n}function I(n,t,e){const r=n.length;if(t>=r)return n.slice();const l=C(e),o=new Set,u=[];for(;u.length<t;){const t=Math.floor(l()*r);o.has(t)||(o.add(t),u.push(n[t]))}return u}function C(n){return n?(F.seed=n,()=>F.getFloat()):Math.random}const F=new t;function G(n,t){if(!n)return n;const e=C(t);for(let r=n.length-1;r>0;r--){const t=Math.floor(e()*(r+1)),l=n[r];n[r]=n[t],n[t]=l}return n}function L(n,t){const e=n.indexOf(t);return-1!==e?(n.splice(e,1),t):null}function O(n,t){return null!=n}function R(n,...t){for(const e of t)null!=e&&n.push(e);return n.length}function U(n,t){return n.reduce((n,e)=>t(e)?n+1:n,0)}function k(n){return Array.isArray(n)}function q(n,t,e){for(t<n.length&&(n.length=t);n.length<t;)n.push(e())}function B(n,t){return n-t}const D=[];export{b as PositionHint,o as addMany,N as binaryIndexOf,U as countIf,d as difference,D as emptyArray,h as equals,z as filterInPlace,C as getRandomNumberGenerator,A as indexOf,w as insertSortedStableTopN,m as intersect,p as isArrayLike,k as isArrayWithReadonly,O as isSome,a as makeArrayEquals,f as max,i as min,B as numericSort,I as pickRandom,R as pushIfSome,x as range,e as reallocGrowthFactor,r as reallocShrinkFactor,l as reallocShrinkThreshold,L as remove,S as removeUnordered,v as removeUnorderedMany,q as resizeFilled,G as shuffle,s as sliceEquals,M as splitIntoChunks,c as unique,g as update};
2
+ import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,l=.5;function o(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let l=1;l<n.length;++l){const o=n[l],u=Number(t(o));u>r&&(r=u,e=o)}return e}function i(n,t=u){return f(n,n=>-t(n))}function c(n,t){return t?n.filter((n,e,r)=>r.findIndex(t.bind(null,n))===e):Array.from(new Set(n))}function s(n,t,e,r,l,o,u){if(null==n&&null==r)return!0;t=Math.max(0,t),l=Math.max(0,l),e=Math.max(0,e<0?(n?.length??0)+e:e),o=Math.max(0,o<0?(r?.length??0)+o:o);const f=e-t;if(null==n||null==r||f!==o-l)return!1;if(u){for(let i=0;i<f;i++)if(!u(n[t+i],r[l+i]))return!1}else for(let i=0;i<f;i++)if(n[t+i]!==r[l+i])return!1;return!0}function h(n,t,e){return s(n,0,n?.length??0,t,0,t?.length??0,e)}function a(){return(n,t)=>{if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}}const g=a();function d(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function m(n,t,e){let r,l;return e?(r=t.filter(t=>!n.some(n=>e(n,t))),l=n.filter(n=>!t.some(t=>e(t,n)))):(r=t.filter(t=>!n.includes(t)),l=n.filter(n=>!t.includes(n))),{added:r,removed:l}}function p(n,t,e){return n&&t?e?n.filter(n=>t.findIndex(t=>e(n,t))>-1):n.filter(n=>t.includes(n)):[]}function M(n){return n&&"number"==typeof n.length}function x(n,t){const e=n.length;if(0===e)return[];const r=[];for(let l=0;l<e;l+=t)r.push(n.slice(l,l+t));return r}function N(n,t){void 0===t&&(t=n,n=0);const e=new Array(t-n);for(let r=n;r<t;r++)e[r-n]=r;return e}function w(n,t,e){const r=n.length;let l=0,o=r-1;for(;l<o;){const e=l+Math.floor((o-l)/2);t>n[e]?l=e+1:o=e}const u=n[l];return e?t>=n[r-1]?-1:u===t?l:l-1:u===t?l:-1}function b(n,t,e,r){n.length>e&&(n.length=e);const l=n.length;let o=0,u=l;if(l===e){const e=r(n[l-1],t);if(e<=0||Number.isNaN(e))return}for(;o<u;){const e=o+u>>>1,l=r(n[e],t);l<=0||Number.isNaN(l)?o=e+1:u=e}l===e&&n.pop(),n.splice(o,0,t)}class y{constructor(){this.last=0}}const A=new y;function S(n,t,e,r){r=r||A;const l=Math.max(0,r.last-10);for(let u=l;u<e;++u)if(n[u]===t)return r.last=u,u;const o=Math.min(l,e);for(let u=0;u<o;++u)if(n[u]===t)return r.last=u,u;return-1}function j(t,e,r,l){const o=r??t.length,u=S(t,n(e),o,l);if(-1!==u)return t[u]=t[o-1],null==r&&t.pop(),e}const v=new Set;function z(n,t,e=n.length,r=t.length,l,o){if(0===r||0===e)return e;v.clear();for(let f=0;f<r;++f)v.add(t[f]);l=l||A;const u=Math.max(0,l.last-10);for(let f=u;f<e;++f)if(v.has(n[f])&&(o?.push(n[f]),v.delete(n[f]),n[f]=n[e-1],--e,--f,0===v.size||0===e))return v.clear(),e;for(let f=0;f<u;++f)if(v.has(n[f])&&(o?.push(n[f]),v.delete(n[f]),n[f]=n[e-1],--e,--f,0===v.size||0===e))return v.clear(),e;return v.clear(),e}function I(n,t){let e=0;for(let r=0;r<n.length;++r){const l=n[r];t(l,r)&&(n[e]=l,e++)}return n.length=e,n}function C(n,t,e){const r=n.length;if(t>=r)return n.slice();const l=F(e),o=new Set,u=[];for(;u.length<t;){const t=Math.floor(l()*r);o.has(t)||(o.add(t),u.push(n[t]))}return u}function F(n){return n?(G.seed=n,()=>G.getFloat()):Math.random}const G=new t;function L(n,t){if(!n)return n;const e=F(t);for(let r=n.length-1;r>0;r--){const t=Math.floor(e()*(r+1)),l=n[r];n[r]=n[t],n[t]=l}return n}function O(n,t){const e=n.indexOf(t);return-1!==e?(n.splice(e,1),t):null}function R(n,t){return null!=n}function U(n,...t){for(const e of t)null!=e&&n.push(e);return n.length}function k(n,t){return n.reduce((n,e)=>t(e)?n+1:n,0)}function q(n){return Array.isArray(n)}function B(n,t,e){for(t<n.length&&(n.length=t);n.length<t;)n.push(e())}function D(n,t){return n-t}const E=[];export{y as PositionHint,o as addMany,w as binaryIndexOf,k as countIf,m as difference,E as emptyArray,h as equals,I as filterInPlace,F as getRandomNumberGenerator,S as indexOf,b as insertSortedStableTopN,p as intersect,M as isArrayLike,q as isArrayWithReadonly,R as isSome,a as makeArrayEquals,f as max,i as min,g as numbersEquals,D as numericSort,C as pickRandom,U as pushIfSome,N as range,e as reallocGrowthFactor,r as reallocShrinkFactor,l as reallocShrinkThreshold,O as remove,j as removeUnordered,z as removeUnorderedMany,B as resizeFilled,L as shuffle,s as sliceEquals,x as splitIntoChunks,c as unique,d as update};
package/core/maybe.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function n(n,u){if(null==n)throw new Error(u??"value is None")}function u(n){return n?.destroy(),null}function r(n){return n?.dispose(),null}function l(n){return n?.remove(),null}function e(n){return n?.abort(),null}function t(n){return n?.release(),null}function o(n,u,r){return null!=n&&null!=u?null!=r?r(n,u):n.equals(u):n===u}function i(n,u){return n?.[u]}function f(n,u){let r;return n.some((n,l)=>(r=u(n,l),null!=r)),r??void 0}export{e as abortMaybe,n as assertIsSome,u as destroyMaybe,r as disposeMaybe,o as equalsMaybe,f as mappedFind,i as maybeProperty,t as releaseMaybe,l as removeMaybe};
2
+ function n(n,u){if(null==n)throw new Error(u??"value is None")}function u(n){return n&&!n.destroyed&&n.destroy(),null}function r(n){return n?.dispose(),null}function e(n){return n?.remove(),null}function l(n){return n?.abort(),null}function t(n){return n?.release(),null}function o(n){return n?.release()?null:n}function i(n,u,r){return null!=n&&null!=u?null!=r?r(n,u):n.equals(u):n===u}function f(n,u){return n?.[u]}function c(n,u){let r;return n.some((n,e)=>(r=u(n,e),null!=r)),r??void 0}export{l as abortMaybe,n as assertIsSome,u as destroyMaybe,r as disposeMaybe,i as equalsMaybe,c as mappedFind,f as maybeProperty,t as releaseMaybe,o as releaseReferencedMaybe,e as removeMaybe};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import n from"../Extent.js";import{create as t}from"./aaBoundingRect.js";import{newDoubleArray as r}from"./DoubleArray.js";function a(n){return n}function i(n=U){return a([n[0],n[1],n[2],n[3],n[4],n[5]])}function u(n,t,r,a,u,e,m=i()){return m[0]=n,m[1]=t,m[2]=r,m[3]=a,m[4]=u,m[5]=e,m}function e(n,t=i()){return t[0]=n.xmin,t[1]=n.ymin,t[2]=n.hasZ?n.zmin:-1/0,t[3]=n.xmax,t[4]=n.ymax,t[5]=n.hasZ?n.zmax:1/0,t}function m(n,t=i()){return o(n,0,n.length/3,t)}function o(n,t,r,a=i()){return q(a,Q),N(a,n,t,r),a}function f(n,t=r(24)){const[a,i,u,e,m,o]=n;return t[0]=a,t[1]=i,t[2]=u,t[3]=a,t[4]=i,t[5]=o,t[6]=a,t[7]=m,t[8]=u,t[9]=a,t[10]=m,t[11]=o,t[12]=e,t[13]=i,t[14]=u,t[15]=e,t[16]=i,t[17]=o,t[18]=e,t[19]=m,t[20]=u,t[21]=e,t[22]=m,t[23]=o,t}function h(t,r){const a=isFinite(t[2])||isFinite(t[5]);return new n(a?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:r}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:r})}function c(n,t,r=i()){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=t[0],r[4]=t[1],r[5]=t[2],r}function M(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[3]),n[4]=Math.max(n[4],t[4]),n[5]=Math.max(n[5],t[5])}function x(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[3]=Math.max(n[3],t[2]),n[4]=Math.max(n[4],t[3])}function l(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[0]),n[4]=Math.max(n[4],t[1]),n[5]=Math.max(n[5],t[2])}function N(n,t,r=0,a=t.length/3){let i=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];for(let h=0;h<a;h++)i=Math.min(i,t[r+3*h]),u=Math.min(u,t[r+3*h+1]),e=Math.min(e,t[r+3*h+2]),m=Math.max(m,t[r+3*h]),o=Math.max(o,t[r+3*h+1]),f=Math.max(f,t[r+3*h+2]);n[0]=i,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function s(n,t,r,a){n[0]=Math.min(n[0],n[0]+t),n[3]=Math.max(n[3],n[3]+t),n[1]=Math.min(n[1],n[1]+r),n[4]=Math.max(n[4],n[4]+r),n[2]=Math.min(n[2],n[2]+a),n[5]=Math.max(n[5],n[5]+a)}function I(n,{xmin:t,ymin:r,zmin:a,xmax:i,ymax:u,zmax:e}){n[0]=Math.min(n[0],t),n[3]=Math.max(n[3],i),n[1]=Math.min(n[1],r),n[4]=Math.max(n[4],u),n[2]=Math.min(n[2],a??-1/0),n[5]=Math.max(n[5],e??1/0)}function y(n,t,r){const a=t.length;let i=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];if(r)for(let h=0;h<a;h++){const n=t[h];i=Math.min(i,n[0]),u=Math.min(u,n[1]),e=Math.min(e,n[2]),m=Math.max(m,n[0]),o=Math.max(o,n[1]),f=Math.max(f,n[2])}else for(let h=0;h<a;h++){const n=t[h];i=Math.min(i,n[0]),u=Math.min(u,n[1]),m=Math.max(m,n[0]),o=Math.max(o,n[1])}n[0]=i,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function T(n){for(let t=0;t<6;t++)if(!isFinite(n[t]))return!1;return!0}function g(n){return n[0]>=n[3]?0:n[3]-n[0]}function E(n){return n[1]>=n[4]?0:n[4]-n[1]}function F(n){return n[2]>=n[5]?0:n[5]-n[2]}function b(n){const t=g(n),r=F(n),a=E(n);return Math.sqrt(t*t+r*r+a*a)}function p(n,t=[0,0,0]){return t[0]=n[0]+g(n)/2,t[1]=n[1]+E(n)/2,t[2]=n[2]+F(n)/2,t}function z(n,t=[0,0,0]){return t[0]=g(n),t[1]=E(n),t[2]=F(n),t}function V(n){return Math.max(g(n),F(n),E(n))}function Y(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[0]<=n[3]&&t[1]<=n[4]&&t[2]<=n[5]}function _(n,t,r){return t[0]>=n[0]-r&&t[1]>=n[1]-r&&t[2]>=n[2]-r&&t[0]<=n[3]+r&&t[1]<=n[4]+r&&t[2]<=n[5]+r}function j(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[3]<=n[3]&&t[4]<=n[4]&&t[5]<=n[5]}function A(n,t){return Math.max(t[0],n[0])<=Math.min(t[3],n[3])&&Math.max(t[1],n[1])<=Math.min(t[4],n[4])&&Math.max(t[2],n[2])<=Math.min(t[5],n[5])}function R(n,t){return null==t||A(n,t)}function G(n,t,r){let a=0,i=1;for(let u=0;u<3;++u){const e=n[u],m=n[u+3],o=t[u],f=r[u],h=f<o,c=h?f:o,M=h?o:f,x=Math.max(e,c),l=Math.min(m,M);if(x>l)return!1;if(M===c)break;const N=M-c,s=(x-c)/N,I=(l-c)/N;if(a=Math.max(a,h?1-I:s),i=Math.min(i,h?1-s:I),a>i)return!1}return!0}function O(n,t,r,a,i=n){return i[0]=n[0]+t,i[1]=n[1]+r,i[2]=n[2]+a,i[3]=n[3]+t,i[4]=n[4]+r,i[5]=n[5]+a,i}function P(n,t,r=n){const a=n[0]+g(n)/2,i=n[1]+E(n)/2,u=n[2]+F(n)/2;return r[0]=a+(n[0]-a)*t,r[1]=i+(n[1]-i)*t,r[2]=u+(n[2]-u)*t,r[3]=a+(n[3]-a)*t,r[4]=i+(n[4]-i)*t,r[5]=u+(n[5]-u)*t,r}function S(n,t){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function Z(n,t){return t[0]=n[3],t[1]=n[4],t[2]=n[5],t}function d(n,t,r=n){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==n&&(r[3]=n[3],r[4]=n[4],r[5]=n[5]),r}function k(n,t,r=n){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==n&&(r[0]=n[0],r[1]=n[1],r[2]=n[2]),n}function q(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function w(n){return n?q(n,Q):i(Q)}function B(n,r=t()){return r[0]=n[0],r[1]=n[1],r[2]=n[3],r[3]=n[4],r}function D(n,t){return n[0]=t[0],n[1]=t[1],n[2]=Number.NEGATIVE_INFINITY,n[3]=t[2],n[4]=t[3],n[5]=Number.POSITIVE_INFINITY,n}function v(n,t,r,a,i){return n[0]=t,n[1]=r,n[2]=Number.NEGATIVE_INFINITY,n[3]=a,n[4]=i,n[5]=Number.POSITIVE_INFINITY,n}function C(n){return 6===n.length}function H(n){return 0===g(n)&&0===E(n)&&0===F(n)}function J(n,t,r){if(null==n||null==t)return n===t;if(!C(n)||!C(t))return!1;if(r){for(let a=0;a<n.length;a++)if(!r(n[a],t[a]))return!1}else for(let a=0;a<n.length;a++)if(n[a]!==t[a])return!1;return!0}function K(n,t,r,a,i,e){return u(n,t,r,a,i,e,X)}const L=a([-1/0,-1/0,-1/0,1/0,1/0,1/0]),Q=a([1/0,1/0,1/0,-1/0,-1/0,-1/0]),U=a([0,0,0,0,0,0]),W=a([NaN,NaN,NaN,NaN,NaN,NaN]),X=i();export{T as allFinite,p as center,j as contains,Y as containsPoint,_ as containsPointWithMargin,i as create,E as depth,b as diameter,w as empty,J as equals,M as expandWithAABB,N as expandWithBuffer,I as expandWithExtent,y as expandWithNestedArray,s as expandWithOffset,x as expandWithRect,l as expandWithVec3,m as fromBuffer,e as fromExtent,c as fromMinMax,D as fromRect,v as fromRectValues,o as fromSubBuffer,u as fromValues,Z as getMax,S as getMin,F as height,A as intersects,R as intersectsClippingArea,G as intersectsSegment,C as is,H as isPoint,V as maximumDimension,W as nan,Q as negativeInfinity,O as offset,L as positiveInfinity,P as scale,q as set,k as setMax,d as setMin,z as size,f as toCorners,h as toExtent,B as toRect,g as width,K as wrap,U as zero};
2
+ import{len as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import t from"../Extent.js";import{create as r}from"./aaBoundingRect.js";import{newDoubleArray as i}from"./DoubleArray.js";function a(n){return n}function u(n=un){return a([n[0],n[1],n[2],n[3],n[4],n[5]])}function e(n,t){for(let r=0;r<6;r++)n[r]=t[r]}function m(n,t,r,i,a,e,m=u()){return m[0]=n,m[1]=t,m[2]=r,m[3]=i,m[4]=a,m[5]=e,m}function o(n,t=u()){return t[0]=n.xmin,t[1]=n.ymin,t[2]=n.hasZ?n.zmin:-1/0,t[3]=n.xmax,t[4]=n.ymax,t[5]=n.hasZ?n.zmax:1/0,t}function f(n,t=u()){return c(n,0,n.length/3,t)}function c(n,t,r,i=u()){return K(i,an),g(i,n,t,r),i}function h(n){n[0]=1/0,n[1]=1/0,n[2]=1/0,n[3]=-1/0,n[4]=-1/0,n[5]=-1/0}function M(n,t){for(let r=0;r<6;r++)if(n[r]!==t[r])return!1;return!0}function x(n){return!(n[0]<=n[3]&&n[1]<=n[4]&&n[2]<=n[5])}function l(n,t=i(24)){const[r,a,u,e,m,o]=n;return t[0]=r,t[1]=a,t[2]=u,t[3]=r,t[4]=a,t[5]=o,t[6]=r,t[7]=m,t[8]=u,t[9]=r,t[10]=m,t[11]=o,t[12]=e,t[13]=a,t[14]=u,t[15]=e,t[16]=a,t[17]=o,t[18]=e,t[19]=m,t[20]=u,t[21]=e,t[22]=m,t[23]=o,t}function s(n,r){const i=isFinite(n[2])||isFinite(n[5]);return new t(i?{xmin:n[0],xmax:n[3],ymin:n[1],ymax:n[4],zmin:n[2],zmax:n[5],spatialReference:r}:{xmin:n[0],xmax:n[3],ymin:n[1],ymax:n[4],spatialReference:r})}function N(n,t,r=u()){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=t[0],r[4]=t[1],r[5]=t[2],r}function I(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[3]),n[4]=Math.max(n[4],t[4]),n[5]=Math.max(n[5],t[5])}function b(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[3]=Math.max(n[3],t[2]),n[4]=Math.max(n[4],t[3])}function y(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[0]),n[4]=Math.max(n[4],t[1]),n[5]=Math.max(n[5],t[2])}function g(n,t,r=0,i=t.length/3){let a=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];for(let c=0;c<i;c++)a=Math.min(a,t[r+3*c]),u=Math.min(u,t[r+3*c+1]),e=Math.min(e,t[r+3*c+2]),m=Math.max(m,t[r+3*c]),o=Math.max(o,t[r+3*c+1]),f=Math.max(f,t[r+3*c+2]);n[0]=a,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function T(n,t,r,i){n[0]=Math.min(n[0],n[0]+t),n[3]=Math.max(n[3],n[3]+t),n[1]=Math.min(n[1],n[1]+r),n[4]=Math.max(n[4],n[4]+r),n[2]=Math.min(n[2],n[2]+i),n[5]=Math.max(n[5],n[5]+i)}function p(n,{xmin:t,ymin:r,zmin:i,xmax:a,ymax:u,zmax:e}){n[0]=Math.min(n[0],t),n[3]=Math.max(n[3],a),n[1]=Math.min(n[1],r),n[4]=Math.max(n[4],u),n[2]=Math.min(n[2],i??-1/0),n[5]=Math.max(n[5],e??1/0)}function E(n,t,r){const i=t.length;let a=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];if(r)for(let c=0;c<i;c++){const n=t[c];a=Math.min(a,n[0]),u=Math.min(u,n[1]),e=Math.min(e,n[2]),m=Math.max(m,n[0]),o=Math.max(o,n[1]),f=Math.max(f,n[2])}else for(let c=0;c<i;c++){const n=t[c];a=Math.min(a,n[0]),u=Math.min(u,n[1]),m=Math.max(m,n[0]),o=Math.max(o,n[1])}n[0]=a,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function F(n){for(let t=0;t<6;t++)if(!isFinite(n[t]))return!1;return!0}function z(n){return n[0]>=n[3]?0:n[3]-n[0]}function j(n){return n[1]>=n[4]?0:n[4]-n[1]}function V(n){return n[2]>=n[5]?0:n[5]-n[2]}function Y(n){const t=z(n),r=V(n),i=j(n);return Math.sqrt(t*t+r*r+i*i)}function _(n,t=[0,0,0]){return t[0]=n[0]+z(n)/2,t[1]=n[1]+j(n)/2,t[2]=n[2]+V(n)/2,t}function A(n,t=[0,0,0]){return t[0]=z(n),t[1]=j(n),t[2]=V(n),t}function R(n){return Math.max(z(n),V(n),j(n))}function d(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[0]<=n[3]&&t[1]<=n[4]&&t[2]<=n[5]}function G(n,t,r){return t[0]>=n[0]-r&&t[1]>=n[1]-r&&t[2]>=n[2]-r&&t[0]<=n[3]+r&&t[1]<=n[4]+r&&t[2]<=n[5]+r}function O(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[3]<=n[3]&&t[4]<=n[4]&&t[5]<=n[5]}function P(n,t){return Math.max(t[0],n[0])<=Math.min(t[3],n[3])&&Math.max(t[1],n[1])<=Math.min(t[4],n[4])&&Math.max(t[2],n[2])<=Math.min(t[5],n[5])}function S(n,t){return null==t||P(n,t)}function Z(n,t,r){let i=0,a=1;for(let u=0;u<3;++u){const e=n[u],m=n[u+3],o=t[u],f=r[u],c=f<o,h=c?f:o,M=c?o:f,x=Math.max(e,h),l=Math.min(m,M);if(x>l)return!1;if(M===h)break;const s=M-h,N=(x-h)/s,I=(l-h)/s;if(i=Math.max(i,c?1-I:N),a=Math.min(a,c?1-N:I),i>a)return!1}return!0}function k(n,t){const{center:r,radius:i}=t;let a=0;for(let u=0;u<3;u++){const t=Math.max(0,n[u]-r[u],r[u]-n[u+3]);if(t>i)return!1;a+=t**2}return a<=i**2}function q(t,r,i,a){const u=1e-8;let{tMin:e,tMax:m}=a;if(!(e<m))return null;if(!(Math.abs(n(i)-1)<1e-4))return null;for(let n=0;n<3;n++){const a=i[n],o=r[n],f=t[n],c=t[n+3];if(!(f<c))return null;if(Math.abs(a)<u){if(o<f||o>c)return null;continue}const h=1/a,M=(f-o)*h,x=(c-o)*h,l=h<0?x:M,s=h<0?M:x;if(e=Math.max(e,l),m=Math.min(m,s),m<=e)return null}return{tMin:e,tMax:m}}function v(n,t){const r=t[3];let i=r,a=r;for(let u=0;u<3;u++){const r=t[u],e=r*n[u],m=r*n[u+3];i+=Math.min(e,m),a+=Math.max(e,m)}return i>0?i:a<0?a:0}function w(n,t,r,i,a=n){return a[0]=n[0]+t,a[1]=n[1]+r,a[2]=n[2]+i,a[3]=n[3]+t,a[4]=n[4]+r,a[5]=n[5]+i,a}function B(n,t,r=n){const i=n[0]+z(n)/2,a=n[1]+j(n)/2,u=n[2]+V(n)/2;return r[0]=i+(n[0]-i)*t,r[1]=a+(n[1]-a)*t,r[2]=u+(n[2]-u)*t,r[3]=i+(n[3]-i)*t,r[4]=a+(n[4]-a)*t,r[5]=u+(n[5]-u)*t,r}function D(n,t){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function C(n,t){return t[0]=n[3],t[1]=n[4],t[2]=n[5],t}function H(n,t,r=n){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==n&&(r[3]=n[3],r[4]=n[4],r[5]=n[5]),r}function J(n,t,r=n){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==n&&(r[0]=n[0],r[1]=n[1],r[2]=n[2]),n}function K(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function L(n){return n?K(n,an):u(an)}function Q(n,t=r()){return t[0]=n[0],t[1]=n[1],t[2]=n[3],t[3]=n[4],t}function U(n,t){return n[0]=t[0],n[1]=t[1],n[2]=Number.NEGATIVE_INFINITY,n[3]=t[2],n[4]=t[3],n[5]=Number.POSITIVE_INFINITY,n}function W(n,t,r,i,a){return n[0]=t,n[1]=r,n[2]=Number.NEGATIVE_INFINITY,n[3]=i,n[4]=a,n[5]=Number.POSITIVE_INFINITY,n}function X(n){return 6===n.length}function $(n){return 0===z(n)&&0===j(n)&&0===V(n)}function nn(n,t,r){if(null==n||null==t)return n===t;if(!X(n)||!X(t))return!1;if(r){for(let i=0;i<n.length;i++)if(!r(n[i],t[i]))return!1}else for(let i=0;i<n.length;i++)if(n[i]!==t[i])return!1;return!0}function tn(n,t,r,i,a,u){return m(n,t,r,i,a,u,mn)}const rn=a([-1/0,-1/0,-1/0,1/0,1/0,1/0]),an=a([1/0,1/0,1/0,-1/0,-1/0,-1/0]),un=a([0,0,0,0,0,0]),en=a([NaN,NaN,NaN,NaN,NaN,NaN]),mn=u();export{F as allFinite,_ as center,O as contains,d as containsPoint,G as containsPointWithMargin,e as copy,u as create,j as depth,Y as diameter,L as empty,nn as equals,M as exactEquals,I as expandWithAABB,g as expandWithBuffer,p as expandWithExtent,E as expandWithNestedArray,T as expandWithOffset,b as expandWithRect,y as expandWithVec3,f as fromBuffer,o as fromExtent,N as fromMinMax,U as fromRect,W as fromRectValues,c as fromSubBuffer,m as fromValues,C as getMax,D as getMin,V as height,P as intersects,S as intersectsClippingArea,q as intersectsRay,Z as intersectsSegment,k as intersectsSphere,X as is,x as isEmpty,$ as isPoint,R as maximumDimension,en as nan,an as negativeInfinity,w as offset,rn as positiveInfinity,B as scale,K as set,h as setEmpty,J as setMax,H as setMin,v as signedDistanceFromPlane,A as size,l as toCorners,s as toExtent,Q as toRect,z as width,tn as wrap,un as zero};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../core/has.js";import"../../core/Logger.js";import{acosClamped as t}from"../../core/mathUtils.js";import{getEpsilon as e}from"../../core/libs/gl-matrix-2/math/common.js";import{fromRotation as r}from"../../core/libs/gl-matrix-2/math/mat4.js";import{copy as i,equals as s,squaredDistance as n,subtract as o,scale as c,length as a,add as h,cross as u,transformMat4 as m,distance as l,lerp as d,scaleAndAdd as g,squaredLength as f,normalize as p,set as M}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as j,fromArray as y,clone as _,create as x}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as b}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isVec3 as v}from"../../core/libs/gl-matrix-2/types/vec3.js";import{isVec4 as S}from"../../core/libs/gl-matrix-2/types/vec4.js";import{fromPoints as P,closestPoint as A}from"./ray.js";import{cartesianToSpherical as R}from"./sphereUtils.js";import{angle as q}from"./vector.js";import{sv3d as F,sm4d as O}from"./vectorStacks.js";class w{constructor(t=0,e=0,r=0,i=0){this.radius=i,"number"==typeof t?this._center=j(t,e,r):v(t)||S(t)?(this._center=y(t),this.radius=4===t.length?t[3]:e):(this._center=_(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){i(this.center,t)}exactEquals(t){return s(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&(i(this._center,t.center),this.radius=t.radius),this}clone(){return new w(this.center,this.radius)}toVec4(){return b(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return n(this.center,t)<=this.radius**2}intersectRay(t,e){if(null==t)return!1;if(!this._intersect(t,V))return!1;let{t0:r,t1:i}=V;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(e){const{origin:i,direction:s}=t;e[0]=i[0]+s[0]*r,e[1]=i[1]+s[1]*r,e[2]=i[2]+s[2]*r}return!0}intersectLine(t,r){const i=P(t,r);if(!this._intersect(i,V))return[];const{origin:s,direction:n}=i,{t0:o,t1:c}=V,a=t=>{const e=x();return g(e,s,n,t),this.projectPoint(e,e)};return Math.abs(o-c)<e()?[a(o)]:[a(o),a(c)]}_intersect(t,e){const{origin:r,direction:i}=t,s=C;s[0]=r[0]-this.center[0],s[1]=r[1]-this.center[1],s[2]=r[2]-this.center[2];const n=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===n)return!1;const o=2*(i[0]*s[0]+i[1]*s[1]+i[2]*s[2]),c=o*o-4*n*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-this.radius**2);if(c<0)return!1;const a=Math.sqrt(c);return e.t0=(-o-a)/(2*n),e.t1=(-o+a)/(2*n),!0}projectPoint(t,e){const r=o(F.get(),t,this.center),i=c(F.get(),r,this.radius/a(r));return h(e,i,this.center)}closestPointOnSilhouette(t,e){const i=F.get(),s=O.get();u(i,t.origin,t.direction),u(e,i,t.origin),c(e,e,1/a(e)*this.radius);const n=this._angleToSilhouette(t.origin),o=q(t.origin,e);return r(s,o+n,i),m(e,e,s),e}frustumCoverage(t,e,r){const i=this.radius,s=i*i,n=t+.5*Math.PI,o=e*e+s-2*Math.cos(n)*e*i,c=Math.sqrt(o),a=o-s;if(a<=0)return.5;const h=Math.sqrt(a),u=Math.acos(h/c)-Math.asin(i/(c/Math.sin(n)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const r=o(F.get(),e,this.center),i=a(r),s=this.radius,n=s+Math.abs(s-i);return t(s/n)}union(t){const e=l(this._center,t.center),r=this.radius,i=t.radius;return e+i<r?this:e+r<i?(this.copyFrom(t),this):(d(this._center,this._center,t.center,(e+i-r)/(2*e)),this.radius=(e+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}}const E={create:t=>new w(t),copy:(t,e)=>e.copyFrom(t),setExtent:(t,e,r)=>r.copyFrom(t),getExtent:(t,e)=>e,elevate:(t,e,r)=>(r.copyFrom(t),r.radius+=e,r),axisAt(t,e,r,i){const s=o(L,e,t.center);switch(r){case 0:{const t=R(s,L)[2];return M(i,-Math.sin(t),Math.cos(t),0)}case 1:{const t=R(s,L),e=t[1],r=t[2],n=Math.sin(e);return M(i,-n*Math.cos(r),-n*Math.sin(r),Math.cos(e))}case 2:return p(i,s);default:return}},altitudeAt(t,e){const r=o(U,e,t.center);return a(r)-t.radius},setAltitudeAt(t,e,r,i){const s=E.altitudeAt(t,e),n=E.axisAt(t,e,2,U),o=c(U,n,r-s);return h(i,e,o)},intersectRay:(t,e,r)=>t.intersectRay(e,r),closestPoint:(t,e,r)=>t.intersectRay(e,r)?r:(A(e,t.center,r),t.projectPoint(r,r)),intersectRayClosestSilhouette(t,e,r){if(t.intersectRay(e,r))return r;const i=t.closestPointOnSilhouette(e,F.get());return h(r,e.origin,c(F.get(),e.direction,l(e.origin,i)/a(e.direction))),r},closestPointOnSilhouette:(t,e,r)=>t.closestPointOnSilhouette(e,r),distanceToSilhouette(t,e){const r=o(F.get(),e,t.center),i=f(r),s=t.radius**2;return Math.sqrt(Math.abs(i-s))}},T=new w,V={t0:0,t1:0},C=x(),L=x(),U=x();export{T as NullSphere,w as Sphere,E as sphereCSO};
2
+ import"../../core/has.js";import"../../core/Logger.js";import{acosClamped as t}from"../../core/mathUtils.js";import{getEpsilon as e}from"../../core/libs/gl-matrix-2/math/common.js";import{fromRotation as r}from"../../core/libs/gl-matrix-2/math/mat4.js";import{copy as i,equals as s,squaredDistance as n,subtract as o,scale as c,length as a,add as h,cross as u,transformMat4 as m,distance as l,lerp as d,scaleAndAdd as g,squaredLength as f,normalize as p,set as M}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as j,fromArray as y,clone as x,create as _}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as b}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{isVec3 as v}from"../../core/libs/gl-matrix-2/types/vec3.js";import{isVec4 as P}from"../../core/libs/gl-matrix-2/types/vec4.js";import{fromPoints as S,closestPoint as A}from"./ray.js";import{cartesianToSpherical as R}from"./sphereUtils.js";import{angle as q}from"./vector.js";import{sv3d as F,sm4d as O}from"./vectorStacks.js";class w{constructor(t=0,e=0,r=0,i=0){this.radius=i,"number"==typeof t?this._center=j(t,e,r):v(t)||P(t)?(this._center=y(t),this.radius=4===t.length?t[3]:e):(this._center=x(t.center),this.radius=t.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(t){i(this.center,t)}exactEquals(t){return s(this._center,t.center)&&this.radius===t.radius}copyFrom(t){return t!==this&&(i(this._center,t.center),this.radius=t.radius),this}clone(){return new w(this.center,this.radius)}toVec4(){return b(this.center[0],this.center[1],this.center[2],this.radius)}contains(t){return n(this.center,t)<=this.radius**2}intersectRay(t,e){if(null==t)return!1;if(!this._intersect(t,V))return!1;let{t0:r,t1:i}=V;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(e){const{origin:i,direction:s}=t;e[0]=i[0]+s[0]*r,e[1]=i[1]+s[1]*r,e[2]=i[2]+s[2]*r}return!0}intersectLine(t,r){const i=S(t,r);if(!this._intersect(i,V))return[];const{origin:s,direction:n}=i,{t0:o,t1:c}=V,a=t=>{const e=_();return g(e,s,n,t),this.projectPoint(e,e)};return Math.abs(o-c)<e()?[a(o)]:[a(o),a(c)]}_intersect(t,e){const{origin:r,direction:i}=t,s=C;s[0]=r[0]-this.center[0],s[1]=r[1]-this.center[1],s[2]=r[2]-this.center[2];const n=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===n)return!1;const o=2*(i[0]*s[0]+i[1]*s[1]+i[2]*s[2]),c=o*o-4*n*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-this.radius**2);if(c<0)return!1;const a=Math.sqrt(c);return e.t0=(-o-a)/(2*n),e.t1=(-o+a)/(2*n),!0}projectPoint(t,e){const r=o(F.get(),t,this.center),i=c(F.get(),r,this.radius/a(r));return h(e,i,this.center)}closestPointOnSilhouette(t,e){const i=F.get(),s=O.get();u(i,t.origin,t.direction),u(e,i,t.origin),c(e,e,1/a(e)*this.radius);const n=this._angleToSilhouette(t.origin),o=q(t.origin,e);return r(s,o+n,i),m(e,e,s),e}frustumCoverage(t,e,r){const i=this.radius,s=i*i,n=t+.5*Math.PI,o=e*e+s-2*Math.cos(n)*e*i,c=Math.sqrt(o),a=o-s;if(a<=0)return.5;const h=Math.sqrt(a),u=Math.acos(h/c)-Math.asin(i/(c/Math.sin(n)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const r=o(F.get(),e,this.center),i=a(r),s=this.radius,n=s+Math.abs(s-i);return t(s/n)}union(t){const e=l(this._center,t.center),r=this.radius,i=t.radius;return e+i<r?this:e+r<i?(this.copyFrom(t),this):(d(this._center,this._center,t.center,(e+i-r)/(2*e)),this.radius=(e+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(t){const{center:e,radius:r}=this,i=t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}const T={create:t=>new w(t),copy:(t,e)=>e.copyFrom(t),setExtent:(t,e,r)=>r.copyFrom(t),getExtent:(t,e)=>e,elevate:(t,e,r)=>(r.copyFrom(t),r.radius+=e,r),axisAt(t,e,r,i){const s=o(L,e,t.center);switch(r){case 0:{const t=R(s,L)[2];return M(i,-Math.sin(t),Math.cos(t),0)}case 1:{const t=R(s,L),e=t[1],r=t[2],n=Math.sin(e);return M(i,-n*Math.cos(r),-n*Math.sin(r),Math.cos(e))}case 2:return p(i,s);default:return}},altitudeAt(t,e){const r=o(U,e,t.center);return a(r)-t.radius},setAltitudeAt(t,e,r,i){const s=T.altitudeAt(t,e),n=T.axisAt(t,e,2,U),o=c(U,n,r-s);return h(i,e,o)},intersectRay:(t,e,r)=>t.intersectRay(e,r),closestPoint:(t,e,r)=>t.intersectRay(e,r)?r:(A(e,t.center,r),t.projectPoint(r,r)),intersectRayClosestSilhouette(t,e,r){if(t.intersectRay(e,r))return r;const i=t.closestPointOnSilhouette(e,F.get());return h(r,e.origin,c(F.get(),e.direction,l(e.origin,i)/a(e.direction))),r},closestPointOnSilhouette:(t,e,r)=>t.closestPointOnSilhouette(e,r),distanceToSilhouette(t,e){const r=o(F.get(),e,t.center),i=f(r),s=t.radius**2;return Math.sqrt(Math.abs(i-s))}},E=new w,V={t0:0,t1:0},C=_(),L=_(),U=_();export{E as NullSphere,w as Sphere,T as sphereCSO};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.51",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.53",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};