@arcgis/core 4.33.0-next.20250429 → 4.33.0-next.20250501

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 (277) hide show
  1. package/analysis/AreaMeasurementAnalysis.js +1 -1
  2. package/applications/Components/baUtils.js +5 -0
  3. package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -1
  4. package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -1
  5. package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -1
  6. package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/02b38423276536596aba.js +1 -0
  9. package/assets/esri/core/workers/chunks/{9a1c058d3ecd1db0e996.js → 0c338364cb55afdbd580.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{4351b3e54b309935faed.js → 173737c60fa54f7d82bb.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{90dc783a617ff053e862.js → 181ad3cee0b30a72e7c7.js} +1 -1
  12. package/assets/esri/core/workers/chunks/210e057fe5e66abea984.js +1 -0
  13. package/assets/esri/core/workers/chunks/{9850ff14bd9c7da81c65.js → 23c76963481e38f39653.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{b1473d15c75fc560ea4a.js → 2ad47c0ba1680f7d5e03.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2c3920ad82b9d86c3f05.js +1 -0
  16. package/assets/esri/core/workers/chunks/{12c9dd3932218238033b.js → 3a205f87f100832ef9f5.js} +1 -1
  17. package/assets/esri/core/workers/chunks/3cee3ff926f47aae476f.js +1 -0
  18. package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js.LICENSE.txt +1 -1
  19. package/assets/esri/core/workers/chunks/{2fd5b48976cefe7cc0ab.js → 581180668e0229dcdc14.js} +1 -1
  20. package/assets/esri/core/workers/chunks/5c2299f22a69e58cc4dd.js +1 -0
  21. package/assets/esri/core/workers/chunks/60eb6dd09080da5653a1.js +1 -0
  22. package/assets/esri/core/workers/chunks/6210346dc9d064ac90af.js +1 -0
  23. package/assets/esri/core/workers/chunks/{c3033f148213c960b906.js → 653ff3e631fea8ad393a.js} +290 -291
  24. package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js → 670a66617249f2d15a62.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js.LICENSE.txt → 670a66617249f2d15a62.js.LICENSE.txt} +1 -1
  26. package/assets/esri/core/workers/chunks/6d89d42bcba213be2d9d.js +1 -0
  27. package/assets/esri/core/workers/chunks/6ecc3a3737ae8622dfa4.js +1 -0
  28. package/assets/esri/core/workers/chunks/6fef5a07f75b2a5736ad.js +1 -0
  29. package/assets/esri/core/workers/chunks/6ff46126c82354e6c78e.js +1 -0
  30. package/assets/esri/core/workers/chunks/710e03feaa25e357f17a.js +1 -0
  31. package/assets/esri/core/workers/chunks/71dc9d78dec981078a1a.js +1 -0
  32. package/assets/esri/core/workers/chunks/{ab6ecd8eeec5ff761b34.js → 73bca519c93920bc8c9f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{a6de903f22f76d875005.js → 7496c4c33c2d8f60a434.js} +1 -1
  34. package/assets/esri/core/workers/chunks/7a282674d77875c58acd.js +1 -0
  35. package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +2 -0
  36. package/assets/esri/core/workers/chunks/{30551c1d3e4fa7be86c1.js.LICENSE.txt → 7b4523ab392966624d97.js.LICENSE.txt} +1 -1
  37. package/assets/esri/core/workers/chunks/{50ffb2620cdbcfd75723.js → 81b3351ea9627bb631d4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +1 -0
  39. package/assets/esri/core/workers/chunks/84f972d7851d982701a0.js +319 -0
  40. package/assets/esri/core/workers/chunks/{f52e597dca4b32a81881.js → 867c6c5b2ee1db977c99.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js → 8a87c181b85d0b86b9bb.js} +2 -2
  42. package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js.LICENSE.txt → 8a87c181b85d0b86b9bb.js.LICENSE.txt} +1 -1
  43. package/assets/esri/core/workers/chunks/{a0c51c4c30a5f749dfc6.js → 8bf2e2fe5e3e8b4a1fa0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{213adc87c843d627c5d6.js → 8f2e0277c66247bd40b4.js} +1 -1
  45. package/assets/esri/core/workers/chunks/9652cfd4668b95036c87.js +39 -0
  46. package/assets/esri/core/workers/chunks/{a600194cfe26aedc21dd.js → 9d32f41f8f69b8a507c3.js} +1 -1
  47. package/assets/esri/core/workers/chunks/9f07919ade6707b103da.js +1 -0
  48. package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js.LICENSE.txt +1 -1
  49. package/assets/esri/core/workers/chunks/{899f197556b6ced6eddf.js → ad9b4e0164706c53b872.js} +2 -2
  50. package/assets/esri/core/workers/chunks/{72097a8247101018dcdf.js → ba4aafa8dfa76006c3e7.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{d3174ff4dd5acd16485a.js → c041f4a1d18d42e27ad7.js} +1 -1
  52. package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +2 -0
  53. package/assets/esri/core/workers/chunks/{e524462c63834fae7e01.js.LICENSE.txt → c2594024d72133d3ed7b.js.LICENSE.txt} +1 -1
  54. package/assets/esri/core/workers/chunks/{5a821b7bf58eebb9062c.js → c607d618b64d3accecc4.js} +1 -1
  55. package/assets/esri/core/workers/chunks/c9a2c4fd169b943db4b4.js +1 -0
  56. package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js → ce9de24cb96b56d20562.js} +2 -2
  57. package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js.LICENSE.txt → ce9de24cb96b56d20562.js.LICENSE.txt} +1 -1
  58. package/assets/esri/core/workers/chunks/d30fae6233d3426615ed.js +1 -0
  59. package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js.LICENSE.txt +1 -1
  60. package/assets/esri/core/workers/chunks/{28317c8d7fa2eeeaf997.js → d92ea6b0674f34206ab6.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{345993291540433d3d92.js → e93222c65bd28203ddf7.js} +1 -1
  62. package/assets/esri/themes/base/widgets/_SelectionList.scss +5 -17
  63. package/assets/esri/themes/dark/main.css +1 -1
  64. package/assets/esri/themes/light/main.css +1 -1
  65. package/assets/esri/themes/light/view.css +1 -1
  66. package/chunks/BloomBlur.glsl.js +1 -1
  67. package/chunks/BloomComposition.glsl.js +2 -2
  68. package/chunks/ChapmanAtmosphere.glsl.js +1 -1
  69. package/chunks/CloudsComposition.glsl.js +1 -1
  70. package/chunks/ComponentShader.glsl.js +33 -33
  71. package/chunks/DefaultMaterial.glsl.js +22 -22
  72. package/chunks/Fog.glsl.js +3 -3
  73. package/chunks/Haze.glsl.js +1 -1
  74. package/chunks/Path.glsl.js +22 -18
  75. package/chunks/RealisticTree.glsl.js +9 -9
  76. package/chunks/RibbonLine.glsl.js +1 -1
  77. package/chunks/SSAO.glsl.js +43 -42
  78. package/chunks/ShadowCastAccumulate.glsl.js +5 -5
  79. package/chunks/ShadowHighlight.glsl.js +3 -3
  80. package/chunks/Terrain.glsl.js +1 -1
  81. package/chunks/Viewshed.glsl.js +1 -1
  82. package/core/NestedMap.js +1 -1
  83. package/core/deprecate.js +1 -1
  84. package/geometry/support/PolylineBuilder.js +1 -1
  85. package/geometry/support/curves/bezierCurveUtils.js +5 -0
  86. package/geometry/support/curves/circleUtils.js +5 -0
  87. package/geometry/support/curves/circularArcUtils.js +5 -0
  88. package/geometry/support/curves/closestPointOnCurve.js +5 -0
  89. package/geometry/support/curves/curveUtils.js +5 -0
  90. package/geometry/support/curves/densifyCurvedGeometry.js +5 -0
  91. package/geometry/support/curves/ellipticArc4Utils.js +5 -0
  92. package/geometry/support/curves/ellipticArc7Utils.js +5 -0
  93. package/geometry/support/curves/mathUtils.js +5 -0
  94. package/geometry/support/curves/splitCurveAtPoint.js +5 -0
  95. package/interfaces.d.ts +650 -22
  96. package/layers/MapImageLayer.js +1 -1
  97. package/layers/RouteLayer.js +1 -1
  98. package/layers/VideoLayer.js +1 -1
  99. package/layers/mixins/operationalLayers.js +1 -1
  100. package/layers/save/mapImageLayerUtils.js +5 -0
  101. package/package.json +1 -1
  102. package/portal/schemas/definitions.js +1 -1
  103. package/portal/support/portalItemUtils.js +1 -1
  104. package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +5 -0
  105. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +5 -0
  106. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  107. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  108. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +5 -0
  109. package/rest/knowledgeGraph/wasmInterface/wasmUtils.js +1 -1
  110. package/rest/knowledgeGraphService.js +1 -1
  111. package/support/revision.js +1 -1
  112. package/symbols/cim/CIMOperators.js +1 -1
  113. package/symbols/cim/effects/EffectSuppress.js +5 -0
  114. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  115. package/views/2d/layers/MediaLayerView2D.js +1 -1
  116. package/views/2d/layers/TileLayerView2D.js +1 -1
  117. package/views/2d/layers/VideoLayerView2D.js +1 -1
  118. package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
  119. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  120. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  121. package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
  122. package/views/3d/environment/EnvironmentManager.js +1 -1
  123. package/views/3d/glTF/LoaderResult.js +1 -1
  124. package/views/3d/glTF/loader.js +1 -1
  125. package/views/3d/interactive/Manipulator3D.js +1 -1
  126. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  127. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  128. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  129. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  130. package/views/3d/layers/I3SMeshView3D.js +1 -1
  131. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  132. package/views/3d/layers/graphics/DeconflictAABR.js +5 -0
  133. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  135. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  136. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  137. package/views/3d/layers/graphics/Labeler.js +1 -1
  138. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  139. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  140. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  141. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  142. package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
  143. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  144. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +5 -0
  145. package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +5 -0
  146. package/views/3d/layers/graphics/pipeline/symbolization/Point3DSymbolRenderer.js +5 -0
  147. package/views/3d/layers/graphics/pipeline/symbolization/SimpleFeatureRenderer.js +1 -1
  148. package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
  149. package/views/3d/layers/graphics/pipeline/symbolization/factoryUtils.js +5 -0
  150. package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
  151. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  152. package/views/3d/webgl-engine/Stage.js +1 -1
  153. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  154. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  155. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  156. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  157. package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +3 -3
  158. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +2 -2
  159. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +15 -15
  160. package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +3 -3
  161. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +1 -1
  162. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +10 -11
  163. package/views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js +1 -1
  164. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
  165. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
  166. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +27 -0
  168. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +28 -0
  169. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  170. package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
  171. package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +12 -0
  172. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  173. package/views/3d/webgl-engine/lib/ContentObjectType.js +1 -1
  174. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +5 -0
  175. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  176. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  177. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  178. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  179. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  180. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  181. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  182. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  183. package/views/3d/webgl-engine/lib/RendererBase.js +1 -1
  184. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  185. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  186. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  187. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  189. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  190. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  191. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  192. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  193. package/views/3d/webgl-engine/parts/Model.js +1 -1
  194. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  195. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  196. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  197. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  198. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  199. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  200. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  201. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  202. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  203. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +9 -9
  204. package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
  205. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  206. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  208. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  209. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  210. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  211. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +2 -20
  212. package/views/SelectionManager.js +1 -1
  213. package/views/VideoView.js +1 -1
  214. package/views/ui/DefaultUI.js +1 -1
  215. package/views/webgl/Sync.js +5 -0
  216. package/webscene/support/FeatureReference.d.ts +4 -0
  217. package/webscene/support/FeatureReference.js +5 -0
  218. package/webscene/support/FeatureReferenceGlobalId.d.ts +4 -0
  219. package/webscene/support/FeatureReferenceGlobalId.js +5 -0
  220. package/webscene/support/FeatureReferenceId.d.ts +4 -0
  221. package/webscene/support/FeatureReferenceId.js +5 -0
  222. package/webscene/support/FeatureReferenceObjectId.d.ts +4 -0
  223. package/webscene/support/FeatureReferenceObjectId.js +5 -0
  224. package/webscene/support/LayerReference.d.ts +4 -0
  225. package/webscene/support/LayerReference.js +5 -0
  226. package/webscene/support/SlideElements.js +1 -1
  227. package/webscene/support/SlidePopupInfo.d.ts +4 -0
  228. package/webscene/support/SlidePopupInfo.js +5 -0
  229. package/webscene/support/featureReferenceUtils.js +5 -0
  230. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  231. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  232. package/widgets/Directions/DirectionsViewModel.js +1 -1
  233. package/widgets/Directions.js +1 -1
  234. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  235. package/widgets/FeatureTable/support/AttachmentsViewOptions.d.ts +4 -0
  236. package/widgets/FeatureTable.js +1 -1
  237. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  238. package/widgets/Fullscreen.js +1 -1
  239. package/widgets/LayerList/LayerListItem.js +1 -1
  240. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  241. package/widgets/NavigationToggle.js +1 -1
  242. package/widgets/VideoPlayer.js +1 -1
  243. package/widgets/Weather/WeatherViewModel.js +1 -1
  244. package/widgets/Weather.js +1 -1
  245. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  246. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  247. package/widgets/support/SelectionList.js +1 -1
  248. package/assets/esri/core/workers/chunks/1a6d2d090b643a87408a.js +0 -1
  249. package/assets/esri/core/workers/chunks/25142d431dd1e5e82234.js +0 -1
  250. package/assets/esri/core/workers/chunks/2e3019ce49e972a815ca.js +0 -1
  251. package/assets/esri/core/workers/chunks/30551c1d3e4fa7be86c1.js +0 -2
  252. package/assets/esri/core/workers/chunks/3293b4041c222299428f.js +0 -1
  253. package/assets/esri/core/workers/chunks/4da99f058cca83937e9b.js +0 -1
  254. package/assets/esri/core/workers/chunks/626ba3a7dee952308566.js +0 -1
  255. package/assets/esri/core/workers/chunks/7fce62ef3f0b011e0d35.js +0 -1
  256. package/assets/esri/core/workers/chunks/8c8d812a7f2d29c29676.js +0 -1
  257. package/assets/esri/core/workers/chunks/97eedd6b90c6a9c67947.js +0 -1
  258. package/assets/esri/core/workers/chunks/b1e420cb425a3625170e.js +0 -319
  259. package/assets/esri/core/workers/chunks/b8248939373e25a8d6db.js +0 -1
  260. package/assets/esri/core/workers/chunks/baa9fd23414f03ef90bc.js +0 -1
  261. package/assets/esri/core/workers/chunks/bf4947fe446dcb477031.js +0 -1
  262. package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +0 -1
  263. package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +0 -1
  264. package/assets/esri/core/workers/chunks/def182fff5a0244b1c2c.js +0 -1
  265. package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +0 -1
  266. package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +0 -2
  267. package/assets/esri/core/workers/chunks/e64e0c3240f8e577a61c.js +0 -39
  268. package/assets/esri/core/workers/chunks/f2bc75a718a10065011d.js +0 -1
  269. package/geometry/support/curveUtils.js +0 -5
  270. package/geometry/support/densifyUtils.js +0 -5
  271. package/views/3d/layers/graphics/pipeline/symbolization/Factory.js +0 -5
  272. package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +0 -5
  273. package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +0 -5
  274. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.js +0 -38
  275. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.js +0 -35
  276. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +0 -5
  277. package/widgets/support/InteractiveAnalysisViewModel.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256,8596],{4146:(t,e,n)=>{n.d(e,{A:()=>_});var i=n(90237),r=n(78888),s=n(49186),o=n(65529),a=n(4902),l=n(92474),u=n(53966),c=n(74887),d=n(84952),g=n(10107),h=(n(44208),n(87811),n(40608)),p=n(5443),f=n(16930),b=n(92602),y=n(79677);let v=0,m=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await n.e(5613).then(n.bind(n,45613));try{return await i(e)}catch(t){const n=e?.portalItem,i=n?.id||"unset",r=n?.portal?.url||b.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,r.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,g.MZ)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"effectiveVisible",null),(0,i._)([(0,g.MZ)({type:p.A})],m.prototype,"fullExtent",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,i._)([(0,g.MZ)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,i._)([(0,g.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,i._)([(0,g.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,i._)([(0,g.MZ)({clonable:!1})],m.prototype,"parent",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,i._)([(0,g.MZ)({type:Boolean,readOnly:!0})],m.prototype,"persistenceEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,i._)([(0,g.MZ)({type:f.A})],m.prototype,"spatialReference",void 0),(0,i._)([(0,g.MZ)({type:String})],m.prototype,"title",void 0),(0,i._)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,i._)([(0,g.MZ)()],m.prototype,"url",void 0),(0,i._)([(0,g.MZ)({type:y.A})],m.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,g.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,i._)([(0,h.$)("esri.layers.Layer")],m);const _=m},4341:(t,e,n)=>{n.d(e,{I:()=>r});var i=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,s));t++)this._items.push(this._allocator())}}const s=1024},4902:(t,e,n)=>{n.d(e,{A:()=>c});var i=n(90237),r=n(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,i._)([(0,r.$)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,i._)([(0,r.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,r.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>g,_I:()=>d,kb:()=>c,vt:()=>l});var i=n(34727),r=n(4341),s=n(38954),o=n(51850),a=n(32114);function l(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function u(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.d)(n.vector,e,t),n}function c(t,e){const n=(0,s.d)(a.rq.get(),e,t.origin),r=(0,s.f)(t.vector,n),o=(0,s.f)(t.vector,t.vector),l=(0,i.qE)(r/o,0,1),u=(0,s.d)(a.rq.get(),(0,s.h)(a.rq.get(),t.vector,l),n);return(0,s.f)(u,u)}function d(t,e,n){return g(t,e,0,1,n)}function g(t,e,n,r,o){const{vector:l,origin:u}=t,c=(0,s.d)(a.rq.get(),e,u),d=(0,s.f)(l,c)/(0,s.k)(l);return(0,s.h)(o,l,(0,i.qE)(d,n,r)),(0,s.g)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)(),new r.I((()=>l()))},17352:(t,e,n)=>{n.d(e,{b:()=>B,f:()=>_}),n(44208);var i=n(53966),r=n(34727),s=n(4341),o=n(58083),a=n(9093),l=n(38954),u=n(51850),c=n(19419),d=n(88582),g=n(11964),h=n(240),p=n(71351),f=n(44280),b=n(32114);const y=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function v(t=D){return{plane:(0,h.vt)(t.plane),origin:(0,u.o8)(t.origin),basis1:(0,u.o8)(t.basis1),basis2:(0,u.o8)(t.basis2)}}function m(t,e=v()){return _(t.origin,t.basis1,t.basis2,e)}function _(t,e,n,i=v()){return(0,l.c)(i.origin,t),(0,l.c)(i.basis1,e),(0,l.c)(i.basis2,n),M(i),function(t,e){Math.abs((0,l.f)(t.basis1,t.basis2)/((0,l.l)(t.basis1)*(0,l.l)(t.basis2)))>1e-6&&y().warn(e,"Provided basis vectors are not perpendicular"),Math.abs((0,l.f)(t.basis1,x(t)))>1e-6&&y().warn(e,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,l.f)(x(t),t.origin)-t.plane[3])>1e-6&&y().warn(e,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function M(t){(0,h.mR)(t.basis2,t.basis1,t.origin,t.plane)}function A(t,e,n){t!==n&&m(t,n);const i=(0,l.h)(b.rq.get(),x(t),e);return(0,l.g)(n.origin,n.origin,i),n.plane[3]-=e,n}function w(t,e=v()){const n=(t[2]-t[0])/2,i=(t[3]-t[1])/2;return(0,l.i)(e.origin,t[0]+n,t[1]+i,0),(0,l.i)(e.basis1,n,0,0),(0,l.i)(e.basis2,0,i,0),(0,h.fA)(0,0,1,0,e.plane),e}function S(t,e,n){return!!(0,h.Ui)(t.plane,e,n)&&j(t,n)}function O(t,e,n){const i=U.get();R(t,e,i,U.get());let s=Number.POSITIVE_INFINITY;for(const o of k){const a=P(t,o,Z.get()),u=b.rq.get();if((0,h.T7)(i,a,u)){const t=(0,l.o)(b.rq.get(),e.origin,u),i=Math.abs((0,r.XM)((0,l.f)(e.direction,t)));i<s&&(s=i,(0,l.c)(n,u))}}return s===Number.POSITIVE_INFINITY?I(t,e,n):n}function I(t,e,n){if(S(t,e,n))return n;const i=U.get(),r=U.get();R(t,e,i,r);let s=Number.POSITIVE_INFINITY;for(const o of k){const a=P(t,o,Z.get()),u=b.rq.get();if((0,h.gv)(i,a,u)){const t=(0,p.kb)(e,u);if(!(0,h.Tj)(r,u))continue;t<s&&(s=t,(0,l.c)(n,u))}}return q(t,e.origin)<s&&E(t,e.origin,n),n}function E(t,e,n){const i=(0,h._I)(t.plane,e,b.rq.get()),r=(0,g.H6)(L(t,t.basis1),i,-1,1,b.rq.get()),s=(0,g.H6)(L(t,t.basis2),i,-1,1,b.rq.get());return(0,l.d)(n,(0,l.g)(b.rq.get(),r,s),t.origin),n}function T(t,e,n){const{origin:i,basis1:r,basis2:s}=t,o=(0,l.d)(b.rq.get(),e,i),a=(0,f.gr)(r,o),u=(0,f.gr)(s,o),c=(0,f.gr)(x(t),o);return(0,l.i)(n,a,u,c)}function q(t,e){const n=T(t,e,b.rq.get()),{basis1:i,basis2:r}=t,s=(0,l.l)(i),o=(0,l.l)(r),a=Math.max(Math.abs(n[0])-s,0),u=Math.max(Math.abs(n[1])-o,0),c=n[2];return a*a+u*u+c*c}function N(t,e){const n=-t.plane[3];return(0,f.gr)(x(t),e)-n}function x(t){return(0,h.Qj)(t.plane)}function j(t,e){const n=(0,l.d)(b.rq.get(),e,t.origin),i=(0,l.k)(t.basis1),r=(0,l.k)(t.basis2),s=(0,l.f)(t.basis1,n),o=(0,l.f)(t.basis2,n);return-s-i<0&&s-i<0&&-o-r<0&&o-r<0}function L(t,e){const n=Z.get();return(0,l.c)(n.origin,t.origin),(0,l.c)(n.vector,e),n}function P(t,e,n){const{basis1:i,basis2:r,origin:s}=t,o=(0,l.h)(b.rq.get(),i,e.origin[0]),a=(0,l.h)(b.rq.get(),r,e.origin[1]);(0,l.g)(n.origin,o,a),(0,l.g)(n.origin,n.origin,s);const u=(0,l.h)(b.rq.get(),i,e.direction[0]),c=(0,l.h)(b.rq.get(),r,e.direction[1]);return(0,l.h)(n.vector,(0,l.g)(u,u,c),2),n}function R(t,e,n,i){const r=x(t);(0,h.mR)(r,e.direction,e.origin,n),(0,h.mR)((0,h.Qj)(n),r,e.origin,i)}const D={plane:(0,h.vt)(),origin:(0,u.fA)(0,0,0),basis1:(0,u.fA)(1,0,0),basis2:(0,u.fA)(0,1,0)},U=new s.I(h.vt),Z=new s.I(g.vt),C=(0,u.vt)(),V=new s.I((()=>v())),k=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],$=(0,a.vt)(),F=(0,a.vt)(),B=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,h.vt)(),this.origin=(0,u.vt)(),this.basis1=(0,u.vt)(),this.basis2=(0,u.vt)()}},altitudeAt:N,axisAt:function(t,e,n,i){return function(t,e,n){switch(e){case d._.X:(0,l.c)(n,t.basis1),(0,l.n)(n,n);break;case d._.Y:(0,l.c)(n,t.basis2),(0,l.n)(n,n);break;case d._.Z:(0,l.c)(n,x(t))}return n}(t,n,i)},cameraFrustumCoverage:function(t,e){return(e-t)/e},closestPoint:I,closestPointOnSilhouette:O,copy:m,copyWithoutVerify:function(t,e){(0,l.c)(e.origin,t.origin),(0,l.c)(e.basis1,t.basis1),(0,l.c)(e.basis2,t.basis2),(0,h.C)(e.plane,t.plane)},create:v,distance:function(t,e){return Math.sqrt(q(t,e))},distance2:q,distanceToSilhouette:function(t,e){let n=Number.NEGATIVE_INFINITY;for(const i of k){const r=P(t,i,Z.get()),s=(0,g.kb)(r,e);s>n&&(n=s)}return Math.sqrt(n)},elevate:A,equals:function(t,e){return(0,l.p)(t.basis1,e.basis1)&&(0,l.p)(t.basis2,e.basis2)&&(0,l.p)(t.origin,e.origin)},extrusionContainsPoint:function(t,e){return(0,h.Tj)(t.plane,e)&&j(t,e)},fromAABoundingRect:w,fromValues:_,getExtent:function(t,e){const n=t.basis1[0],i=t.basis2[1],[r,s]=t.origin;return(0,c.fA)(r-n,s-i,r+n,s+i,e)},intersectRay:S,intersectRayClosestSilhouette:function(t,e,n){if(S(t,e,n))return n;const i=O(t,e,b.rq.get());return(0,l.g)(n,e.origin,(0,l.h)(b.rq.get(),e.direction,(0,l.j)(e.origin,i)/(0,l.l)(e.direction))),n},normal:x,projectPoint:E,projectPointLocal:T,rotate:function(t,e,n,i){return t!==i&&m(t,i),(0,o.$0)(F,e,n),(0,l.t)(i.basis1,t.basis1,F),(0,l.t)(i.basis2,t.basis2,F),M(i),i},setAltitudeAt:function(t,e,n,i){const r=N(t,e),s=(0,l.h)(C,x(t),n-r);return(0,l.g)(i,e,s),i},setExtent:function(t,e,n){return w(e,n),A(n,N(t,t.origin),n),n},transform:function(t,e,n){return t!==n&&m(t,n),(0,o.B8)($,e),(0,o.mg)($,$),(0,l.t)(n.basis1,t.basis1,$),(0,l.t)(n.basis2,t.basis2,$),(0,l.t)((0,h.Qj)(n.plane),(0,h.Qj)(t.plane),$),(0,l.t)(n.origin,t.origin,e),(0,h.mP)(n.plane,n.plane,n.origin),n},up:D,updateUnboundedPlane:M,wrap:function(t,e,n){const i=V.get();return i.origin=t,i.basis1=e,i.basis2=n,i.plane=(0,h.LV)(0,0,0,0),M(i),i}},Symbol.toStringTag,{value:"Module"}))},44612:(t,e,n)=>{n.d(e,{xH:()=>o,N1:()=>l}),n(38954);var i=n(51850),r=n(71351),s=(n(62258),n(58083),n(70328),n(97937),n(65215));function o(t,e){return a(t)===a(e)}function a(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let n=null;return n=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==n?null:`o-${e}-${n}`}n(86305),s.R6,s.HE,s.R6,s.R6,s.R6,n(87582),(0,i.vt)();const l={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}}};(0,r.vt)(),(0,i.vt)()},62258:(t,e,n)=>{var i,r;n.d(e,{dz:()=>i}),function(t){t[t.OBJECT=0]="OBJECT",t[t.HUD=1]="HUD",t[t.TERRAIN=2]="TERRAIN",t[t.OVERLAY=3]="OVERLAY",t[t.I3S=4]="I3S",t[t.PCL=5]="PCL",t[t.LOD=6]="LOD",t[t.VOXEL=7]="VOXEL",t[t.TILES3D=8]="TILES3D"}(i||(i={})),function(t){t[t.MIN=0]="MIN",t[t.MINMAX=1]="MINMAX",t[t.ALL=2]="ALL"}(r||(r={}))},62885:(t,e,n)=>{n.d(e,{H:()=>s,V:()=>r});var i=n(5503);function r(t,e,n=i.A){return e||(e=new n),e===t||(e.removeAll(),(r=t)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?e.addMany(t):t&&e.add(t)),e;var r}function s(t){return t}},65215:(t,e,n)=>{n.d(e,{HE:()=>i,R6:()=>r}),n(51850);class i{constructor(t){this.layerViewUid=t}}class r extends i{constructor(t,e){super(t),this.graphicUid=e}}},69540:(t,e,n)=>{n.d(e,{A:()=>g});var i=n(90237),r=n(69622),s=(n(44208),n(4718)),o=(n(53966),n(97768)),a=n(35666),l=n(88620),u=n(40608);const c=t=>{let e=class extends t{clone(){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,n=t.store,i={},r=new Map;for(const t in e){const o=e[t],l=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[t];let d=null;d="function"==typeof u?u(c):"reference"===u?c:(0,s.TU)(c),null!=c&&null==d||(l===a.Gr.DEFAULTS?r.set(t,d):i[t]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(r.size){const t=(0,l.oY)(u)?.store;if(t)for(const[e,n]of r)t.set(e,n,a.Gr.DEFAULTS)}return u}};return e=(0,i._)([(0,u.$)("esri.core.Clonable")],e),e};let d=class extends(c(r.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=c;const g=d},71351:(t,e,n)=>{n.d(e,{C:()=>d,Cr:()=>g,LV:()=>c,kb:()=>h,oC:()=>p,vt:()=>l}),n(4576);var i=n(4341),r=(n(77690),n(29242)),s=n(38954),o=n(51850),a=n(32114);function l(t){return t?u((0,o.o8)(t.origin),(0,o.o8)(t.direction)):u((0,o.vt)(),(0,o.vt)())}function u(t,e){return{origin:t,direction:e}}function c(t,e){const n=f.get();return n.origin=t,n.direction=e,n}function d(t,e=l()){return function(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.c)(n.direction,e),n}(t.origin,t.direction,e)}function g(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.d)(n.direction,e,t),n}function h(t,e){const n=(0,s.e)(a.rq.get(),(0,s.n)(a.rq.get(),t.direction),(0,s.d)(a.rq.get(),e,t.origin));return(0,s.f)(n,n)}function p(t,e,n){const i=(0,s.f)(t.direction,(0,s.d)(n,e,t.origin));return(0,s.g)(n,t.origin,(0,s.h)(n,t.direction,i)),n}const f=new i.I((()=>l()));(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,r.vt)()},78553:(t,e,n)=>{n.d(e,{D:()=>s,p:()=>r});var i=n(56507);function r(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,n)=>{n.d(e,{A:()=>p});var i=n(90237),r=n(69540),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i._)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);const l=a;var u=n(69622),c=n(4902),d=n(25482);let g=0,h=class extends(d.A.JSONSupportMixin(r.A.ClonableMixin(c.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${g++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,i._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],h.prototype,"id",void 0),(0,i._)([(0,s.MZ)({clonable:!1,value:null})],h.prototype,"parent",null),(0,i._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],h.prototype,"origin",void 0),h=(0,i._)([(0,o.$)("esri.analysis.Analysis")],h);const p=h},79677:(t,e,n)=>{n.d(e,{A:()=>h});var i,r=n(90237),s=n(25482),o=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),c=n(43937),d=n(98623);let g=class extends s.A{static{i=this}static get allTime(){return p}static get empty(){return f}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,r=t.end?.getTime()??t.end;return e===i&&n===r}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,t,e));let r=this.end;if(r){const n=(0,o.lL)(r,t,e);r=r.getTime()===n.getTime()?n:(0,o.S1)(n,1,t,e)}return new i({start:n,end:r})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,r=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return r>=e&&r<=n?o=r:e>=r&&e<=s&&(o=e),n>=r&&n<=s?a=n:s>=e&&s<=n&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,n=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,t,e,n)),null!=a&&(r.end=(0,o.S1)(a,t,e,n)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,r._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"end",void 0),(0,r._)([(0,l.w)("end")],g.prototype,"readEnd",null),(0,r._)([(0,c.K)("end")],g.prototype,"writeEnd",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"isAllTime",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"isEmpty",null),(0,r._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"start",void 0),(0,r._)([(0,l.w)("start")],g.prototype,"readStart",null),(0,r._)([(0,c.K)("start")],g.prototype,"writeStart",null),g=i=(0,r._)([(0,u.$)("esri.time.TimeExtent")],g);const h=g,p=new g,f=new g({start:void 0,end:void 0})},86305:(t,e,n)=>{n.d(e,{i3:()=>r}),n(38954);var i=n(51850);function r(t){return null!=t?.dist}n(17352),n(62258),(0,i.vt)()},87582:(t,e,n)=>{n(62258);var i=n(65215);n(86305),i.R6},92071:(t,e,n)=>{n.d(e,{P:()=>m,L:()=>_});var i=n(90237),r=n(69622),s=n(76953),o=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((t,n)=>{e.set(n,(0,o.o8)(t),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const i=this._originStores[n];i&&i.forEach(((i,r)=>{t&&t.has(r)||e.set(r,(0,o.o8)(i),n)}))}return e}get(t,e){const n=void 0===e?this._values:this._originStores[e];return n?n.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,n=a.Gr.USER){let i=this._originStores[n];if(i||(i=new Map,this._originStores[n]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=n){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,n),i!==e}return!1}delete(t,e=a.Gr.USER){const n=this._originStores[e];if(!n)return;const i=n.get(t);if(n.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let n=e-1;n>=0;n--){const e=this._originStores[n];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,n);break}}}return i}has(t,e){const n=void 0===e?this._values:this._originStores[e];return!!n&&n.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const n=this._originStores[e],i=n?.get(t),r=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),r!==i}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=n(45917),c=n(88620),d=n(40608);const g=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,c.oY)(this),n=e.store,i=new l;e.store=i,(0,s.k)(e,n,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const n=h(this),i=(0,a.aB)(e);if("string"==typeof t)return n.get(t,i);const r={};return t.forEach((t=>{r[t]=n.get(t,i)})),r}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return h(this).originOf(t)}revert(t,e){const n=h(this),i=(0,a.aB)(e),r=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?n.keys(i):[t]:t,s.forEach((t=>{r.invalidate(t),n.revert(t,i),r.commit(t)}))}};return e=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function h(t){return(0,c.oY)(t).store}let p=class extends(g(r.A)){};p=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],p);var f=n(16649),b=n(49422);const y=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,b.M)(this,t=t||{},e),t}setAtOrigin(t,e,n){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(n))}removeOrigin(t){const e=v(this),n=(0,a.aB)(t),i=e.keys(n);for(const t of i)e.originOf(t)===n&&e.set(t,e.get(t,n),a.Gr.USER)}updateOrigin(t,e){const n=v(this),i=(0,a.aB)(e),r=(0,f.Jt)(this,t);for(let e=i+1;e<a.AU;++e)n.delete(t,e);n.set(t,r,i)}toJSON(t){return this.write({},t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function v(t){return(0,c.oY)(t).store}const m=t=>{let e=class extends(y(g(t))){constructor(...t){super(...t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],e),e};let _=class extends(m(r.A)){};_=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],_)},97937:(t,e,n)=>{n.d(e,{a:()=>M,c:()=>b,e:()=>m,f:()=>A,g:()=>_,i:()=>E,o:()=>P,s:()=>U}),n(44208),n(53966);var i=n(34727),r=n(58083),s=n(38954),o=n(51850),a=n(87317),l=n(91829),u=n(34304),c=n(88582),d=n(71351);function g(t,e){const n=(0,s.l)(t),r=(0,i.YN)(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,s.i)(e,n,r,o),e}var h=n(44280),p=n(32114);const f=b();function b(){return(0,l.vt)()}const y=a.e,v=a.e;function m(t,e){return(0,a.c)(e,t)}function _(t){return t[3]}function M(t){return t}function A(t,e,n,i){return(0,l.fA)(t,e,n,i)}function w(t,e,n){if(null==e)return!1;if(!O(t,e,S))return!1;let{t0:i,t1:r}=S;if((i<0||r<i&&r>0)&&(i=r),i<0)return!1;if(n){const{origin:t,direction:r}=e;n[0]=t[0]+r[0]*i,n[1]=t[1]+r[1]*i,n[2]=t[2]+r[2]*i}return!0}const S={t0:0,t1:0};function O(t,e,n){const{origin:i,direction:r}=e,s=I;s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2];const o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;const a=2*(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]),l=a*a-4*o*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-t[3]*t[3]);if(l<0)return!1;const u=Math.sqrt(l);return n.t0=(-a-u)/(2*o),n.t1=(-a+u)/(2*o),!0}const I=(0,o.vt)();function E(t,e){return w(t,e,null)}function T(t,e,n){const i=p.rq.get(),o=p.Rc.get();(0,s.e)(i,e.origin,e.direction);const a=_(t);(0,s.e)(n,i,e.origin),(0,s.h)(n,n,1/(0,s.l)(n)*a);const l=N(t,e.origin),u=(0,h.g7)(e.origin,n);return(0,r.$0)(o,u+l,i),(0,s.t)(n,n,o),n}function q(t,e,n){const i=(0,s.d)(p.rq.get(),e,t),r=(0,s.h)(p.rq.get(),i,t[3]/(0,s.l)(i));return(0,s.g)(n,r,t)}function N(t,e){const n=(0,s.d)(p.rq.get(),e,t),r=(0,s.l)(n),o=_(t),a=o+Math.abs(o-r);return(0,i.XM)(o/a)}const x=(0,o.vt)();function j(t,e,n,i){const r=(0,s.d)(x,e,t);switch(n){case c._.X:{const t=g(r,x)[2];return(0,s.i)(i,-Math.sin(t),Math.cos(t),0)}case c._.Y:{const t=g(r,x),e=t[1],n=t[2],o=Math.sin(e);return(0,s.i)(i,-o*Math.cos(n),-o*Math.sin(n),Math.cos(e))}case c._.Z:return(0,s.n)(i,r);default:return}}function L(t,e){const n=(0,s.d)(R,e,t);return(0,s.l)(n)-t[3]}function P(t,e){const n=(0,s.s)(t,e),i=_(t);return n<=i*i}const R=(0,o.vt)(),D=b(),U=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:f,altitudeAt:L,angleToSilhouette:N,axisAt:j,cameraFrustumCoverage:function(t,e,n,i){const r=_(t),s=r*r,o=e+.5*Math.PI,a=n*n+s-2*Math.cos(o)*n*r,l=Math.sqrt(a),u=a-s;if(u<=0)return.5;const c=Math.sqrt(u),d=Math.acos(c/l)-Math.asin(r/(l/Math.sin(o)));return Math.min(1,(d+.5*i)/i)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return w(t,e,n)?n:((0,d.oC)(e,t,n),q(t,n,n))},closestPointOnSilhouette:T,containsPoint:P,copy:m,create:b,distanceToSilhouette:function(t,e){const n=(0,s.d)(p.rq.get(),e,t),i=(0,s.k)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(i-r))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:v,exactEquals:y,fromCenterAndRadius:function(t,e){return(0,l.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:A,getCenter:M,getExtent:function(t,e){return e},getRadius:_,intersectLine:function(t,e,n){const i=(0,d.Cr)(e,n);if(!O(t,i,S))return[];const{origin:r,direction:a}=i,{t0:l,t1:c}=S,g=e=>{const n=(0,o.vt)();return(0,s.b)(n,r,a,e),q(t,n,n)};return Math.abs(l-c)<(0,u.FD)()?[g(l)]:[g(l),g(c)]},intersectRay:w,intersectRayClosestSilhouette:function(t,e,n){if(w(t,e,n))return n;const i=T(t,e,p.rq.get());return(0,s.g)(n,e.origin,(0,s.h)(p.rq.get(),e.direction,(0,s.j)(e.origin,i)/(0,s.l)(e.direction))),n},intersectsRay:E,projectPoint:q,setAltitudeAt:function(t,e,n,i){const r=L(t,e),o=j(t,e,c._.Z,R),a=(0,s.h)(R,o,n-r);return(0,s.g)(i,e,a)},setExtent:function(t,e,n){return t!==n&&m(t,n),n},tmpSphere:D,union:function(t,e,n=(0,l.vt)()){const i=(0,s.j)(t,e),r=t[3],o=e[3];return i+o<r?((0,a.c)(n,t),n):i+r<o?((0,a.c)(n,e),n):((0,s.m)(n,t,e,(i+o-r)/(2*i)),n[3]=(i+r+o)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3747],{13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},18047:(e,t,r)=>{r.d(t,{ZV:()=>l,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.JK)(),o=(0,s.ZS)(r)?.language,a=o&&i[o]||r;n.set(t,new Intl.NumberFormat(a,e))}return n.get(t)}(t).format(e)}(0,s.Ml)((()=>{n=new WeakMap,o={}})),new Map},36708:(e,t,r)=>{r.d(t,{C_:()=>u,OH:()=>_,Vh:()=>g,on:()=>d,pc:()=>m,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return c(e,t,r,p)}function h(e,t,r={}){return c(e,t,r,f)}function c(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function d(e,t,r,o={}){let a=null,h=null,c=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(c),r(e)}const p=l(e,((e,r)=>{d(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,i.hA)((()=>{p.remove(),d()})),c}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise(((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,(()=>{l(),n((0,o.NK)())})),c(e,(e=>{l(),s(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const _={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},47566:(e,t,r)=>{r(97770),r(18047),r(71754),r(73444);var s=r(10838),i=r(78888),n=r(49186);async function o(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,i.A)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new n.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",h=a[2],c=(0,s.xO)(i),d=`${l}${h}.json`,u=c?`${l}${h}_${c}.json`:d;let p;try{p=await o(e(u))}catch(t){if(u===d)throw new n.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{p=await o(e(d))}catch(e){throw new n.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return p}(this.getAssetUrl,this.matcher,e,t)}}const l={};var h,c=r(2741);(0,s.ao)((h={pattern:"esri/",location:c.s},new a(h)))},61893:(e,t,r)=>{r.d(t,{A:()=>u});var s,i,n=r(90237),o=r(69622),a=r(74887),l=r(40608);(i=s||(s={}))[i.PENDING=0]="PENDING",i[i.RESOLVED=1]="RESOLVED",i[i.REJECTED=2]="REJECTED";class h{constructor(){this._resolver=(0,a.Tw)(),this._status=s.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=s.RESOLVED,this._cleanUp()}),(()=>{this._status=s.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return this._status===s.RESOLVED}isRejected(){return this._status===s.REJECTED}isFulfilled(){return this._status!==s.PENDING}abort(){this._resolver.reject((0,a.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,a.Tw)(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(e=>{this.isFulfilled()||this._allPromise!==r||(0,a.zf)(e)||this._resolver.reject(e)})),e.resolve()}}const c=e=>{let t=class extends e{constructor(...e){super(...e),this._promiseProps=new h,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then((()=>this)).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}};return t=(0,n._)([(0,l.$)("esri.core.Promise")],t),t};let d=class extends(c(o.A)){};d=(0,n._)([(0,l.$)("esri.core.Promise")],d),function(e){e.EsriPromiseMixin=c}(d||(d={}));const u=d},71754:(e,t,r)=>{r.d(t,{V:()=>h});var s=r(53966),i=r(93637),n=r(799),o=r(97770),a=r(18047);const l=()=>s.A.getLogger("esri.intl.substitute");function h(e,t,r={}){const{format:s={}}=r;return(0,n.HC)(e,(e=>function(e,t,r){let s,n;const o=e.indexOf(":");if(-1===o?s=e.trim():(s=e.slice(0,o).trim(),n=e.slice(o+1).trim()),!s)return"";const a=(0,i.wc)(s,t);if(null==a)return"";const l=(n?r?.[n]:null)??r?.[s];return l?c(a,l):n?d(a,n):u(a)}(e,t,s)))}function c(e,t){switch(t.type){case"date":return(0,o.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return l().warn("missing format descriptor for key {key}"),u(e)}}function d(e,t){switch(t.toLowerCase()){case"dateformat":return(0,o.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return l().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,o.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,o.Yq)(e):""}}},73747:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ut});var s=r(70333),i=r(90237),n=r(92602),o=r(78888),a=r(49186),l=r(65529),h=r(37955),c=r(4718),d=r(93637),u=r(74887),p=r(84952),f=r(10107),_=(r(44208),r(53966)),g=r(40608);r(47566),r(87811);var m=r(97768),v=r(61893),w=r(36708),y=r(13069),S=r(79901),I=r(62788),A=r(71429),k=r(37330),U=r(98291),P=r(36563),b=r(11932);const T=new Map;function x(){T.clear()}function R(e){T.delete(e)}function O(...e){const t=U.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return U.A.release(t),r}(()=>{const e=new Map;new ResizeObserver((t=>{x();for(const r of t)e.get(r.target)?.(r)}))})();const C=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce(((e,t)=>(e[t]=[],e)),{}),N=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],E=new k.I({whiteList:C,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(N.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),M="http://www.w3.org/",D=`${M}2000/svg`,j=`${M}1999/xlink`;let L=[],q=(e,t)=>{let r={};return Object.keys(e).forEach((t=>{r[t]=e[t]})),t&&Object.keys(t).forEach((e=>{r[e]=t[e]})),r},$=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),Z=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},V=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if($(e[s],t))return s;return-1},F=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if($(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},B=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},H=[],z=!1,J=e=>{(e.children||[]).forEach(J),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},G=()=>{z=!1,H.forEach(J),H.length=0},W=e=>{H.push(e),z||(z=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(G,{timeout:16}):setTimeout(G,16))},X=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),W(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),W(e))},Y=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)re(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(Z(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===D?"href"===n?e.setAttributeNS(j,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=E.sanitize(a):K(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function K(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let Q,ee=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)te(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),Y(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},te=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),c=o.slice(n,l);"."===h?i.classList.add(c):"#"===h?i.id=c:("svg"===c&&(s=q(s,{namespace:D})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,c):(i=e.domNode=e.domNode||a.createElement(c),"input"===c&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}ee(i,e,s)}},re=(e,t,r)=>{t&&t.split(" ").forEach((t=>{t&&e.classList.toggle(t,r)}))},se=(e,t,r,s,i)=>{if(r===s)return!1;s=s||L;let n,o=(r=r||L).length,a=s.length,l=0,h=0,c=!1;for(;h<a;){let a=l<o?r[l]:void 0,d=s[h];if(void 0!==a&&$(a,d))c=Q(a,d,i)||c,l++;else{let a=V(r,d,l+1);if(a>=0){for(n=l;n<a;n++)X(r[n]),F(r,n,e,"removed");c=Q(r[a],d,i)||c,l=a+1}else te(d,t,l<o?r[l].domNode:void 0,i),B(d),F(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)X(r[n]),F(r,n,e,"removed");return c};Q=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=q(r,{namespace:D})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=se(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(re(e,h,!1),re(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(Z(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||K(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===D?"href"===o?e.setAttributeNS(j,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=E.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):K(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let ie=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,Q(s,r,t)},domNode:e.domNode});const ne={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let oe,ae=e=>q(ne,e),le=(e,t,r)=>(r=ae(r),te(t,e,void 0,r),ie(t,r)),he=(e,t,r)=>(r=ae(r),te(t,e.parentNode,e,r),ie(t,r)),ce=(e,t,r)=>(r=ae(r),t.domNode=e,ee(e,t,r),ie(t,r)),de=(e,t,r)=>(r=ae(r),te(t,e.parentNode,e,r),e.parentNode.removeChild(e),ie(t,r));oe=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ue={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},pe={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}},fe=(e,t,r=!1)=>{let s=e;return t.forEach(((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,(t=>t.domNode===e)):void 0;r&&!n&&i!==t.length-1||(s=n)})),s};var _e=r(14813),ge=r(2741);let me;me="components/assets";const ve=Symbol("widget"),we=Symbol("widget-test-data"),ye=[],Se={},Ie=new WeakMap;function Ae(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=Ae(e,r[t]);else r=ye;const s=t.vnodeSelector;if(be(s)){const i=t.properties||Se,n=i.key||s,o={key:n,afterCreate:ke,afterUpdate:Ue,afterRemoved:Pe,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function ke(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,Ie.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,P.hA)((()=>Pe(e)))),queueMicrotask((()=>{o[we].projector.renderNow()}))}function Ue(e,t,r,{widgetProperties:s}){const i=Ie.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Pe(e){const t=Ie.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),Ie.delete(e))}function be(e){return"function"==typeof e&&e[ve]}const Te=new Set;new Map;var xe,Re=r(73444),Oe=r(10838);let Ce=0;function Ne(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?Ne(e[s],t[s]):e[s]=t[s]);return e}const Ee=(e=>{let t;const r={...ue,...e},s=(n=r,{...pe,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],c=[],d=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some((e=>customElements.get(e?.tagName?.toLowerCase())));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=fe(a.getLastRender(),r,!0)}else n.reverse(),s=fe(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),c.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=c[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,c)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{d(le,e,t)},insertBefore:(e,t)=>{d(he,e,t)},merge:(e,t)=>{d(ce,e,t)},replace:(e,t)=>{d(de,e,t)},detach:e=>{for(let t=0;t<c.length;t++)if(c[t]===e)return c.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(x(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let Me=!1,De=class extends(v.A.EsriPromiseMixin(l.A.EventedAccessor)){static{this[xe]=!0}constructor(e,t){super(e,t),this._attached=!1,this._projector=Ee,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=(0,u.sg)((async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map((async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,Oe.ud)(e);this.uiStrings&&Object.keys(this.uiStrings)&&(r=Ne((0,c.o8)(r),this.uiStrings)),this[t]=r})));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&_.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()})),this.addHandles((0,P.hA)()),_e.qu||(0,_e.Qu)((0,p.s2)((0,ge.s)("components/assets")));const r="esri-widget-uid-"+(0,y.lk)(),s=this.render.bind(this);this._trackingTarget=new A.r((()=>{this.autoRenderingEnabled&&this.scheduleRender()}));const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,be(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach((e=>{be(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)})),Ae(this,e)};this.render=()=>{if(Me)return n();let e=function(e){return T.get(e)}(this)??null;if(e)return e;this._trackingTarget.clear(),Me=!0;try{e=(0,I.a)(this._trackingTarget,n)}catch(e){throw _.A.getLogger(this).error(e),e}finally{Me=!1}return e&&function(e,t){T.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then((()=>{this._readyForTrueRender=!0,this._postInitialize()})):(this._resourcesFetch=Promise.resolve().then((()=>{this._postInitialize()})),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){Te.add(e),e.finally((()=>Te.delete(e)))}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then((()=>{})).catch(u.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,m.pR)(this._trackingTarget),(0,m.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this._emitter.clear(),this.render=()=>null,this._projector=null,R(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return"string"==typeof(t=e)?document.getElementById(t):t??null;var t}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+Ce++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(xe=ve,we)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(R(this),this._projector.scheduleRender())}classes(...e){return O.apply(this,e)}renderNow(){R(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,w.wB)((()=>this.viewModel),((e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,h.wb)(e)&&this.addHandles(this._delegatedEventNames.map((t=>(0,h.on)(e,t,(e=>{this.emit(t,e)})))),"delegated-events")}),w.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(u.jH),this.scheduleRender()};this.addHandles([(0,Re.oQ)(e),(0,w.wB)((()=>this.uiStrings),e)]),this.addHandles((0,w.z7)((()=>this.container),(e=>{this.destroyed||this._attach(e)}),{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,i._)([(0,f.MZ)()],De.prototype,"_readyForTrueRender",void 0),(0,i._)([(0,f.MZ)({value:null})],De.prototype,"container",null),(0,i._)([(0,S.w)("container")],De.prototype,"castContainer",null),(0,i._)([(0,f.MZ)()],De.prototype,"icon",null),(0,i._)([(0,f.MZ)()],De.prototype,"id",null),(0,i._)([(0,f.MZ)()],De.prototype,"label",null),(0,i._)([(0,f.MZ)()],De.prototype,"renderable",null),(0,i._)([(0,f.MZ)()],De.prototype,"uiStrings",void 0),(0,i._)([(0,f.MZ)()],De.prototype,"viewModel",void 0),(0,i._)([(0,f.MZ)({value:!0})],De.prototype,"visible",null),(0,i._)([(0,f.MZ)()],De.prototype,"key",void 0),(0,i._)([(0,f.MZ)()],De.prototype,"children",void 0),(0,i._)([(0,f.MZ)()],De.prototype,"afterCreate",void 0),(0,i._)([(0,f.MZ)()],De.prototype,"afterUpdate",void 0),(0,i._)([(0,f.MZ)()],De.prototype,"afterRemoved",void 0),De=(0,i._)([(0,g.$)("esri.widgets.Widget")],De);const je=De;function Le(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}}var qe=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},$e=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?$e(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=qe(i)),t.push(i))}};function Ze(e,t,...r){return"function"!=typeof e||be(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return $e(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}const Ve=/\W/g;function Fe(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(Ve,"").toLowerCase();switch(e){case"dark":case"light":return`calcite-mode-${e}`;default:return null}}var Be=r(71754);const He="esri-identity-modal",ze={base:He,info:`${He}__info`,notice:`${He}__notice`};let Je=class extends je{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(9e3),r.e(3761),r.e(7836)]).then(r.bind(r,37836)),dialog:()=>Promise.all([r.e(9e3),r.e(2893)]).then(r.bind(r,52893)),input:()=>Promise.all([r.e(9e3),r.e(3761),r.e(2165)]).then(r.bind(r,2165)),label:()=>Promise.all([r.e(9e3),r.e(224)]).then(r.bind(r,87843)),notice:()=>Promise.all([r.e(9e3),r.e(8098)]).then(r.bind(r,48098))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:c,invalidUser:d,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:_,lblSigning:g,lblOk:m}=r;return Ze("div",{class:this.classes(ze.base,Fe())},Ze("form",{bind:this,onsubmit:this._submit},Ze("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Ze("div",{class:ze.info},(0,Be.V)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||c})`})),a?Ze("calcite-notice",{class:ze.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Ze("div",{slot:"message"},a.details?.httpStatus?d:u)):null,i?null:[Ze("calcite-label",null,p,Ze("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Ze("calcite-label",null,f,Ze("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Ze("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},_),Ze("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?g:m))))}_focusUsernameInput(){return async function(e){await(0,b.$m)((0,u.Mq)(void 0));const t=e();t&&("setFocus"in t&&"function"==typeof t.setFocus?await t.setFocus():t instanceof HTMLElement&&t.focus())}((()=>this._usernameInputNode))}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,i._)([(0,f.MZ)({readOnly:!0})],Je.prototype,"container",void 0),(0,i._)([(0,f.MZ)(),Le("esri/t9n/common")],Je.prototype,"commonMessages",void 0),(0,i._)([(0,f.MZ)()],Je.prototype,"error",void 0),(0,i._)([(0,f.MZ)(),Le("esri/identity/t9n/identity")],Je.prototype,"messages",void 0),(0,i._)([(0,f.MZ)()],Je.prototype,"oAuthPrompt",void 0),(0,i._)([(0,f.MZ)()],Je.prototype,"open",void 0),(0,i._)([(0,f.MZ)()],Je.prototype,"signingIn",void 0),(0,i._)([(0,f.MZ)()],Je.prototype,"server",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Je.prototype,"title",null),(0,i._)([(0,f.MZ)()],Je.prototype,"resource",void 0),Je=(0,i._)([(0,g.$)("esri.identity.IdentityModal")],Je);const Ge=Je,We="esriJSAPIOAuth";class Xe{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(We,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken",r=new FormData;if(r.append("f","json"),r.append("auth_token",this.refreshToken||this.token),r.append("client_id",t.appId),r.append("token_type_hint",this.refreshToken?"refresh_token":"access_token"),"function"==typeof navigator.sendBeacon)navigator.sendBeacon(e,r);else{const t=new XMLHttpRequest;t.open("POST",e),t.send(r)}}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(We,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(We);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Xe.prototype.declaredClass="esri.identity.OAuthCredential";var Ye,Ke=r(25482);let Qe=class extends Ke.A{static{Ye=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ye.fromJSON(this.toJSON())}};(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"appId",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"authNamespace",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"expiration",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"flowType",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"forceLogin",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"forceUserId",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"locale",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"minTimeUntilExpiration",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"popup",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"popupCallbackUrl",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"popupWindowFeatures",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"portalUrl",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"preserveUrlHash",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],Qe.prototype,"userId",void 0),Qe=Ye=(0,i._)([(0,g.$)("esri.identity.OAuthInfo")],Qe);const et=Qe;let tt=class extends Ke.A{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"adminTokenServiceUrl",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"currentVersion",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"hasPortal",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"hasServer",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"owningSystemUrl",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"owningTenant",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"server",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"shortLivedTokenValidity",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"tokenServiceUrl",void 0),(0,i._)([(0,f.MZ)({json:{write:!0}})],tt.prototype,"webTierAuth",void 0),tt=(0,i._)([(0,g.$)("esri.identity.ServerInfo")],tt);const rt=tt;var st=r(39131);const it={},nt=e=>{const t=new p.s0(e.owningSystemUrl).host,r=new p.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},ot=(e,t)=>!!(nt(e)&&t&&t.some((t=>t.test(e.server))));let at=null,lt=null;try{at=window.localStorage,lt=window.sessionStorage}catch{}class ht extends l.A{constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,p.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",(e=>{this._pageShowHandler(e)}))}registerServers(e){const t=this.serverInfos;t?(e=e.filter((e=>!this.findServerInfo(e.server))),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach((e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)}))}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new rt,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new ct({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,c.oy)({serverInfos:this.serverInfos.map((e=>e.toJSON())),oAuthInfos:this.oAuthInfos.map((e=>e.toJSON())),credentials:this.credentials.map((e=>e.toJSON()))})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach((t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new rt(t))})),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach((t=>{t.appId&&e.push(t.declaredClass?t:new et(t))})),e.length&&this.registerOAuthInfos(e)}s&&s.forEach((e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new ct(e)).emitTokenChange(),this.credentials.push(e))}))}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,o=(0,u.Tw)();if(t.signal&&(0,u.u7)(t.signal,(()=>{n.abort()})),(0,u.u7)(n,(()=>{o.reject(new a.A("identity-manager:user-aborted","ABORTED"))})),(0,u.G4)(n))return o.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let c;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return c=new a.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),o.reject(c),o.promise;const d=this._findCredential(e,t);if(d)return o.resolve(d),o.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return c=new a.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),o.reject(c),o.promise;f=new rt,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(i||(0,p.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some((e=>e.tokenServiceUrl===f.tokenServiceUrl)))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,o,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new p.s0(this._appOrigin),n=e.shortLivedTokenValidity;let l,h,c,d,u,f,_,g;t&&(g=this.tokenValidity||n||this._defaultTokenValidity,g>n&&n>0&&(g=n)),r&&(l=r.isAdmin,h=r.serverUrl,c=r.token,f=r.signal,_=r.ssl,e.customParameters=r.customParameters),l?d=e.adminTokenServiceUrl:(d=e.tokenServiceUrl,u=new p.s0(d.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!_&&"http"===i.scheme&&((0,p.FX)(i.uri,d,!0)||"https"===u.scheme&&i.host===u.host&&"7080"===i.port&&"7443"===u.port)&&(d=d.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const m={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:c,expiration:g,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:f,...r?.ioArgs};return s||(m.withCredentials=!1),(0,o.A)(d,m).then((r=>{const s=r.data;if(!s?.token)return new a.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return it[i]||(it[i]={}),t&&(it[i][t.username]=t.password),s.validity=g,s}))}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then((i=>{let n;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))n=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};n=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};n=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,o.A)(n,{query:l,authMode:"anonymous"}).then((e=>{if(!1===e.data.valid)throw new a.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}})).catch((e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new a.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new a.A("identity-manager:invalid-request","Bad request");return{credential:i}}))})).then((e=>({credential:e.credential,viewOnly:s})))}setOAuthResponseHash(e){e&&("#"===e.charAt(0)&&(e=e.slice(1)),this._processOAuthPopupParams((0,p.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=(0,u.Tw)(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new a.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,u.u7)(r.signal,(()=>{n()}));const o=new Ge({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=o,this.emit("dialog-create");let l=o.on("cancel",n),h=o.on("submit",(e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then((n=>{i();const o=new ct({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)})).catch((e=>{o.error=e,o.signingIn=!1}))}));return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=(0,u.Tw)();const i=this._oAuthDfd;let n;s?.signal&&(0,u.u7)(s.signal,(()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&c()})),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const o=r._oAuthCred;if(o.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,p.$1)(e),o.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),o.stateUID=(0,p.$1)(e),o.save()||(o.codeVerifier=n=null)}else o.codeVerifier=null;let l,h;this._getCodeChallenge(n).then((i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new Ge({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",c),h=o.on("submit",(()=>{d(),this._doOAuthSignIn(e,t,r,i)}))}));const c=()=>{d(),this._oAuthDfd=null,i.reject(new a.A("identity-manager:user-aborted","ABORTED"))},d=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}destroyCredentials(){this.credentials&&this.credentials.slice().forEach((e=>{e.destroy()})),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,h.on)(window,"message",(t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then((e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)})).catch((e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)}))}}))}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){"#"===e.charAt(0)&&(e=e.slice(1));const t=(0,p.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){"?"===t.charAt(0)&&(t=t.slice(1));const e=(0,p.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach((e=>{delete t[e]}));const r=(0,p.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,o.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then((e=>e.data))}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,p.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new a.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",c=this.credentials.filter((t=>this._hasSameServerInstance(t.server,e)&&t.scope===h));if(e=l||e,c.length)if(1===c.length){if(r=c[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(c.some((a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0)))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,p.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,p.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new p.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,st.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,st.qG)(e),t=(0,st.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(n.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,p.S8)(e),(0,p.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new p.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some((e=>e.regex.test(t.uri)));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||n.A.portalUrl&&(s=(0,p.FX)(t,n.A.portalUrl,!0)),s||(s=this._portals.some((e=>this._hasSameServerInstance(e,t.uri)))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach(((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)}));let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&nt(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,o.A)(e=s+"/rest/info",{query:{f:"json"}}).then((e=>e.data)),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some((r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t))),t||this._portals.some((r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t))),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new p.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then((i=>{const n=new ct({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?at:lt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n}))}const i=new ct({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?at:lt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new a.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then((e=>{t.resolve(e)})).catch((e=>{t.reject(e)}))}_setOAuthResponseQueryString(e){e&&("?"===e.charAt(0)&&(e=e.slice(1)),this._processOAuthPopupParams((0,p.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,o.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,o.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some((t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r))),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,o.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then((e=>e.data)))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,p.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,p.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new a.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=(0,u.Tw)()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach((e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}})),e.resolve(t),o.forEach((e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)})),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,o,l)=>{const c=e.sinfo_,d=!e.options_||!1!==e.options_.prompt,f=c.hasPortal&&this._findOAuthInfo(e.resUrl_);let _,g;if(i)t(new ct({userId:i,server:c.server??void 0,token:o??void 0,expires:null!=l?Number(l):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,h.on)(window,"message",(e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new a.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new ct(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new a.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(a.A.fromJSON(e.data.error))))}));(0,u.u7)(e.options_?.signal,(()=>{s.remove()}))}else if(f){let i=f._oAuthCred;if(!i){const e=new Xe(f,at),t=new Xe(f,lt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,f._oAuthCred=i}if(i.isValid()){_=new ct({userId:i.userId??void 0,server:c.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=f.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(c.server,i.refreshToken,i.appId).then((e=>(_.expires=Date.now()+1e3*e.expires_in,_.token=e.access_token,_))):Promise.resolve(_),e._pendingDfd.then((e=>n?this._exchangeToken(e.server,f.appId,e.token).then((t=>(e.token=t,e))).catch((()=>e)):e)).then((e=>{t(e)})).catch((e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)}))):t(_)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(f.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,f,c).then((e=>{t(e)})).catch(r)}else{const s=()=>{d?e._pendingDfd=this.oAuthSignIn(e.resUrl_,c,f,e.options_).then(t,r):(g=new a.A("identity-manager:not-authenticated","User is not signed in."),r(g))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(c.server,f.appId).then((e=>{(0,p.FX)(e.portalUrl,this._appOrigin,!0)?(_=new ct({userId:e.username,server:c.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(_)):s()})).catch(s):s()}}else if(d){if(this._checkProtocol(e.resUrl_,c,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,c,s).then(t,r)}}else g=new a.A("identity-manager:not-authenticated","User is not signed in."),r(g)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(ot(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new ct(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then((r=>{t(new ct({userId:h?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))}),r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then((()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)}),(t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)}))};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,o=this._isServerRsrc(e.resUrl_),l=e.sinfo_._restInfoPms;l?l.promise.then((t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}o&&r.owningSystemUrl?i():s()}),(()=>{e.sinfo_._restInfoPms=null;const t=new a.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)})):o&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then((t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch((()=>null)).then((e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r))):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch((()=>null)).then((()=>r)):r})).catch((()=>null)).then((t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()})):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,n=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,o.A)(r+"/sharing/rest",{query:{f:"json"}}).then((()=>{this._defaultOAuthInfo=new et({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})}))):t=Promise.resolve(),t.then((()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,o.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:n,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,p.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then((e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,p.FX)(s,this._appOrigin)||this._gwDomains.some((e=>e.regex.test(s)&&e.regex.test(this._appOrigin)))),this.oAuthInfos.push(t)}}))}))}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const o={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(o.force_login=!0),r.forceUserId&&r.userId&&(o.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(o.redirectToUserOrgUrl=!0),i.codeVerifier&&(o.code_challenge=s||i.codeVerifier,o.code_challenge_method=s?"S256":"plain");const l=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",c=l+"?"+(0,p.x0)(o);if(r.popup){const e=window.open(c,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval((()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new a.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}}),500),this._oAuthOnPopupHandle=(0,h.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],(e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)}));else{const e=new a.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:o,authorizeUrl:l,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=c}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,p.s2)(e.popupCallbackUrl);if(t){const e=(0,p.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach((t=>{delete e.query[t]})),(0,p.a6)(e.path,e.query)}return r}}ht.prototype.declaredClass="esri.identity.IdentityManagerBase";let ct=class extends l.A.EventedAccessor{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){const e=s.id,t=e.findServerInfo(this.server),r=t?.owningSystemUrl,i=!!r&&"server"===this.scope,n=i&&ot(t,e._legacyFed),o=t.webTierAuth,a=o&&e.normalizeWebTierAuth,l=it[this.server],h=l?.[this.userId];let c,d=this.resources&&this.resources[0],u=i?e.findServerInfo(r):null,p={username:this.userId,password:h};if(o&&!a)return;i&&!u&&e.serverInfos.some((t=>(e._isIdProvider(r,t.server)&&(u=t),!!u)));const f=u?e.findCredential(u.server,this.userId):null;if(!i||f){if(!n){if(i)c={serverUrl:d,token:f?.token,ssl:f?.ssl};else if(a)p=null,c={ssl:this.ssl};else{if(!h){let r;return d&&(d=e._sanitizeUrl(d),this._enqueued=1,r=e._enqueue(d,t,null,null,this.isAdmin,this),r.then((()=>{this._enqueued=0,this.refreshServerTokens()})).catch((()=>{this._enqueued=0}))),r}this.isAdmin&&(c={isAdmin:!0})}return e.generateToken(i?u:t,i?null:p,c).then((e=>{this.token=e.token,this.expires=null!=e.expires?Number(e.expires):null,this.creationTime=Date.now(),this.validity=e.validity,this.emitTokenChange(),this.refreshServerTokens()})).catch((()=>{}))}f?.refreshToken()}}refreshServerTokens(){if("portal"===this.scope){const e=s.id;e.credentials.forEach((t=>{const r=e.findServerInfo(t.server),s=r?.owningSystemUrl;t!==this&&t.userId===this.userId&&s&&"server"===t.scope&&(e._hasSameServerInstance(this.server,s)||e._isIdProvider(s,this.server))&&(ot(r,e._legacyFed)?(t.token=this.token,t.expires=this.expires,t.creationTime=this.creationTime,t.validity=this.validity,t.emitTokenChange()):t.refreshToken())}))}}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,c.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,i._)([(0,f.MZ)()],ct.prototype,"creationTime",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"expires",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"isAdmin",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"oAuthState",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"resources",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"scope",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"server",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"ssl",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"token",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"tokenRefreshBuffer",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"userId",void 0),(0,i._)([(0,f.MZ)()],ct.prototype,"validity",void 0),ct=(0,i._)([(0,g.$)("esri.identity.Credential")],ct);class dt extends ht{}dt.prototype.declaredClass="esri.identity.IdentityManager";const ut=new dt;(0,s.Aq)(ut)}}]);