@agrotools1/at-components 0.2.1 → 0.2.3

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 (553) hide show
  1. package/dist/AGraphicContainer-98a4c8a4.js +109 -0
  2. package/dist/APIKeyMixin-9511e0a5.js +19 -0
  3. package/dist/Analysis-4b1d1fb5.js +31 -0
  4. package/dist/ArcGISCachedService-93e2cb27.js +47 -0
  5. package/dist/ArcGISService-3f8d89c1.js +25 -0
  6. package/dist/AreaMeasurement2D-e0bb230c.js +405 -0
  7. package/dist/AreaMeasurement3D-a9959ecf.js +488 -0
  8. package/dist/AttachmentInfo-601c56e2.js +34 -0
  9. package/dist/AttachmentQuery-3504d550.js +18 -0
  10. package/dist/AttributeStore-b90878e3.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-b2faf028.js +63 -0
  12. package/dist/BindType-5e76c8e1.js +7 -0
  13. package/dist/BingMapsLayer-5d79fe2b.js +112 -0
  14. package/dist/Bitmap-f775c851.js +128 -0
  15. package/dist/BitmapContainer-af5942b8.js +23 -0
  16. package/dist/BlendLayer-a792edf6.js +13 -0
  17. package/dist/BoundsStore-789624df.js +63 -0
  18. package/dist/BufferObject-cbd0168e.js +100 -0
  19. package/dist/BufferView-004ad517.js +683 -0
  20. package/dist/BuildingSceneLayer-25bc760b.js +535 -0
  21. package/dist/Button/Button.d.ts +24 -2
  22. package/dist/Button-70963624.js +36 -0
  23. package/dist/ByteSizeUnit-90df2840.js +7 -0
  24. package/dist/CSVLayer-fd3b6750.js +208 -0
  25. package/dist/CSVSourceWorker-eb24cd85.js +367 -0
  26. package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +66 -0
  27. package/dist/CatalogFootprintLayerView2D-6eb16597.js +76 -0
  28. package/dist/CatalogLayer-1cc632fe.js +262 -0
  29. package/dist/CatalogLayerView2D-d143aa34.js +52 -0
  30. package/dist/Chips/index.d.ts +1 -0
  31. package/dist/CircularArray-b2bc1dfd.js +40 -0
  32. package/dist/ClassBreaksDefinition-07ba0c64.js +18 -0
  33. package/dist/ColorMaterial.glsl-e7801766.js +64 -0
  34. package/dist/ColorSet-df5696b5.js +45 -0
  35. package/dist/ColorStop-7187f368.js +29 -0
  36. package/dist/Container-ac97765a.js +521 -0
  37. package/dist/CustomParametersMixin-b3432b3e.js +12 -0
  38. package/dist/DatePicker/DatePicker.helper.d.ts +22 -0
  39. package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.helper.d.ts +18 -0
  40. package/dist/DatePicker/index.d.ts +2 -0
  41. package/dist/DefaultMaterial.glsl-3cc4efe7.js +42 -0
  42. package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +653 -0
  43. package/dist/DefaultTheme-12dffc66.js +130 -0
  44. package/dist/DeleteForwardEditsParameters-ae76d898.js +18 -0
  45. package/dist/DimensionLayer-9eb47c76.js +129 -0
  46. package/dist/DirectLineMeasurement3D-e9903136.js +449 -0
  47. package/dist/DistanceMeasurement2D-a4853462.js +303 -0
  48. package/dist/DoubleArray-5076283e.js +25 -0
  49. package/dist/EdgeProcessingWorker-c1783ddd.js +63 -0
  50. package/dist/EditBusLayer-e812f4c9.js +107 -0
  51. package/dist/ElevationInfo-fad03d5e.js +56 -0
  52. package/dist/ElevationLayer-397792d5.js +129 -0
  53. package/dist/ElevationQuery-beceb62f.js +598 -0
  54. package/dist/ElevationSamplerWorker-0048a204.js +62 -0
  55. package/dist/ExportImageParameters-c6c4bc61.js +66 -0
  56. package/dist/ExportStrategy-908f5b8d.js +93 -0
  57. package/dist/ExportWMSImageParameters-34da6b46.js +33 -0
  58. package/dist/External-14daf0c1.js +110 -0
  59. package/dist/FeatureCollectionSnappingSource-f97a1829.js +130 -0
  60. package/dist/FeatureCommandQueue-d4817eac.js +1244 -0
  61. package/dist/FeatureEffect-08976bbd.js +39 -0
  62. package/dist/FeatureEffectLayer-05c258f4.js +13 -0
  63. package/dist/FeatureFilter-8c5e44b1.js +27 -0
  64. package/dist/FeatureLayer-d3659466.js +693 -0
  65. package/dist/FeatureLayerBase-9b63f732.js +148 -0
  66. package/dist/FeatureLayerSource-960f1c01.js +444 -0
  67. package/dist/FeatureLayerView2D-7503e1ed.js +1967 -0
  68. package/dist/FeaturePipelineWorker-d4301d2a.js +3633 -0
  69. package/dist/FeatureReductionLayer-e6cf73ac.js +225 -0
  70. package/dist/FeatureReductionSelection-d90249a7.js +22 -0
  71. package/dist/FeatureServiceSnappingSource-9e49ca72.js +481 -0
  72. package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +747 -0
  73. package/dist/FeatureSet-d79f0e48.js +188 -0
  74. package/dist/FeatureStore-eb4b87c0.js +131 -0
  75. package/dist/FeatureTemplate-edb1b782.js +12 -0
  76. package/dist/FeatureType-bba29adb.js +25 -0
  77. package/dist/FieldsIndex-75cca4d0.js +109 -0
  78. package/dist/FormTemplate-22911c47.js +350 -0
  79. package/dist/GeoJSONLayer-b33c96b8.js +236 -0
  80. package/dist/GeoJSONSourceWorker-b04ff552.js +247 -0
  81. package/dist/GeoRSSLayer-6e5fcd0e.js +73 -0
  82. package/dist/GeoRSSLayerView2D-21b6b12e.js +140 -0
  83. package/dist/GeometryUtils-fa897cbd.js +403 -0
  84. package/dist/GraphicContainer-1fd6bfce.js +26 -0
  85. package/dist/GraphicManipulator-f3b7dc9b.js +1499 -0
  86. package/dist/GraphicsLayer-e0686779.js +38 -0
  87. package/dist/GraphicsLayerView2D-a7eba2fe.js +114 -0
  88. package/dist/GraphicsSnappingSource-594f402a.js +273 -0
  89. package/dist/GraphicsView2D-347562b8.js +620 -0
  90. package/dist/GroupLayer-7ae0a916.js +147 -0
  91. package/dist/GroupLayerView2D-ffcde606.js +98 -0
  92. package/dist/HUDMaterial.glsl-b0a3e0ce.js +65 -0
  93. package/dist/HighlightCounter-e18f0179.js +41 -0
  94. package/dist/HighlightGraphicContainer-fd774cea.js +18 -0
  95. package/dist/I3SBinaryReader-190e99de.js +310 -0
  96. package/dist/I3SLayerDefinitions-6ddaca60.js +55 -0
  97. package/dist/I3SUtil-44b83dc0.js +59 -0
  98. package/dist/IdentityManager-fbe91c13.js +899 -0
  99. package/dist/ImageHistogramParameters-d64fd9c8.js +905 -0
  100. package/dist/ImageryLayer-67878a78.js +1799 -0
  101. package/dist/ImageryLayerView2D-ae45faba.js +352 -0
  102. package/dist/ImageryTileLayer-9dca8b93.js +2157 -0
  103. package/dist/ImageryTileLayerView2D-977f66aa.js +1110 -0
  104. package/dist/ImmutableArray-fb7b7a6a.js +20 -0
  105. package/dist/Indices-e6dc3b15.js +67 -0
  106. package/dist/Input/Input.core.d.ts +37 -11
  107. package/dist/Input/index.d.ts +37 -11
  108. package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +112 -0
  109. package/dist/IntegratedMeshLayer-9162c0b5.js +141 -0
  110. package/dist/InteractiveAnalysisViewModel-b046fcb9.js +7397 -0
  111. package/dist/InterleavedLayout-32973c8a.js +163 -0
  112. package/dist/KMLLayer-80f81df7.js +162 -0
  113. package/dist/KMLLayerView2D-b6ba3b80.js +253 -0
  114. package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +43 -0
  115. package/dist/LRUCache-27e8c401.js +32 -0
  116. package/dist/LabelClass-d9a476d6.js +135 -0
  117. package/dist/LabelMetric-e2728bbf.js +400 -0
  118. package/dist/LaserlinePath.glsl-60d00e61.js +64 -0
  119. package/dist/Laserlines.glsl-499a6cbf.js +65 -0
  120. package/dist/LayerFloorInfo-d05cf9dd.js +15 -0
  121. package/dist/LayerView-036988a9.js +206 -0
  122. package/dist/LercWorker-b1b4bb47.js +157 -0
  123. package/dist/LineOfSightLayer-9a9a60b7.js +147 -0
  124. package/dist/LinkChartLayer-d61803bb.js +1027 -0
  125. package/dist/Lyr3DWorker-87be14e0.js +82 -0
  126. package/dist/MD5-1b5ec1c3.js +76 -0
  127. package/dist/MagnifierPrograms-da7a27ab.js +806 -0
  128. package/dist/Map/Map.d.ts +26 -0
  129. package/dist/Map/index.d.ts +1 -0
  130. package/dist/Map/types/index.d.ts +38 -0
  131. package/dist/Map/utils/index.d.ts +24 -0
  132. package/dist/MapImageLayer-f07adf1a.js +169 -0
  133. package/dist/MapImageLayerView2D-d1b140c3.js +146 -0
  134. package/dist/MapNotesLayer-c662d147.js +283 -0
  135. package/dist/MapNotesLayerView2D-bf9ac698.js +161 -0
  136. package/dist/MapServiceLayerViewHelper-fb724de9.js +288 -0
  137. package/dist/MeasurementWidgetContent-e4888ef2.js +2642 -0
  138. package/dist/MediaLayer-36d873a3.js +523 -0
  139. package/dist/MediaLayerView2D-e58b8ec0.js +332 -0
  140. package/dist/MemCache-a9232ec2.js +227 -0
  141. package/dist/MemorySourceWorker-20ff27d6.js +222 -0
  142. package/dist/Mesh-3839826a.js +980 -0
  143. package/dist/MeshLocalVertexSpace-00151564.js +19 -0
  144. package/dist/MultiOriginJSONSupport-bb258670.js +158 -0
  145. package/dist/NestedMap-83f8e815.js +29 -0
  146. package/dist/OGCFeatureLayer-2a8b7ecc.js +211 -0
  147. package/dist/OGCFeatureLayerView2D-185f9649.js +82 -0
  148. package/dist/ObjectStack-10d91171.js +21 -0
  149. package/dist/Octree-78797046.js +495 -0
  150. package/dist/OpenStreetMapLayer-b0a17790.js +30 -0
  151. package/dist/OperationalLayer-55af27d6.js +44 -0
  152. package/dist/OptimizedFeatureSet-54e095c4.js +12 -0
  153. package/dist/OptimizedGeometry-3b808152.js +68 -0
  154. package/dist/OrderByInfo-22e3c805.js +16 -0
  155. package/dist/OrderIndependentTransparency-3eadfe42.js +214 -0
  156. package/dist/OrderedLayer-1403a591.js +26 -0
  157. package/dist/OrientedImageryLayer-8ec8d7d1.js +216 -0
  158. package/dist/OverlayCompositing.glsl-ba3bd81d.js +65 -0
  159. package/dist/OverrideHelper-82325a2c.js +242 -0
  160. package/dist/PBFDecoderWorker-f6517afc.js +213 -0
  161. package/dist/PointCloudLayer-cff43a10.js +197 -0
  162. package/dist/PointCloudUniqueValueRenderer-f337a895.js +115 -0
  163. package/dist/PointCloudWorker-cdb28dc1.js +212 -0
  164. package/dist/PooledRBush-ee4e60af.js +272 -0
  165. package/dist/Popup-c7f55588.js +3990 -0
  166. package/dist/PortalLayer-07b3c53e.js +126 -0
  167. package/dist/Program-ba2f18b2.js +694 -0
  168. package/dist/ProgramTemplate-eee4f097.js +35 -0
  169. package/dist/ProgressBar/ProgressBar.d.ts +0 -13
  170. package/dist/QueryEngine-10c97624.js +896 -0
  171. package/dist/QueryEngineCapabilities-0d8477a2.js +4 -0
  172. package/dist/QueryTask-115430b6.js +119 -0
  173. package/dist/RasterSymbolizer-fbf433fe.js +3024 -0
  174. package/dist/RasterVFDisplayObject-20b0dd86.js +581 -0
  175. package/dist/RasterWorker-44c37e20.js +78 -0
  176. package/dist/RawBlockCache-25203dbd.js +185 -0
  177. package/dist/RealisticTree.glsl-bc07c4dc.js +42 -0
  178. package/dist/Rect-894f011c.js +14 -0
  179. package/dist/RefreshableLayer-9550b85a.js +80 -0
  180. package/dist/RefreshableLayerView-601f7038.js +16 -0
  181. package/dist/Relationship-c662830e.js +64 -0
  182. package/dist/RelationshipQuery-765f068e.js +22 -0
  183. package/dist/RenderState-b244097f.js +7 -0
  184. package/dist/RenderingContext-3db74548.js +889 -0
  185. package/dist/RibbonLine.glsl-c6a715b7.js +65 -0
  186. package/dist/RouteLayer-3f5411f3.js +786 -0
  187. package/dist/RouteLayerView2D-a5fd4cbf.js +195 -0
  188. package/dist/SDFHelper-a34e90ee.js +140 -0
  189. package/dist/SSAO.glsl-5491a708.js +43 -0
  190. package/dist/SSAOBlur.glsl-f3068b8e.js +42 -0
  191. package/dist/ScaleRangeLayer-7ddf00b4.js +21 -0
  192. package/dist/SceneLayer-c594bfc3.js +542 -0
  193. package/dist/SceneLayerSnappingSource-a0504ac7.js +218 -0
  194. package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +112 -0
  195. package/dist/SceneLayerWorker-1865768e.js +164 -0
  196. package/dist/SceneService-fb9f0142.js +215 -0
  197. package/dist/Scheduler-eacc84bb.js +373 -0
  198. package/dist/Select/Item/Item.d.ts +2 -1
  199. package/dist/Select/{Select.multiple.d.ts → Multiple/Select.multiple.d.ts} +26 -16
  200. package/dist/Select/Select.core.d.ts +18 -15
  201. package/dist/Select/{Select.single.d.ts → Single/Select.single.d.ts} +23 -14
  202. package/dist/Select/index.d.ts +42 -24
  203. package/dist/ShadedColorMaterial.glsl-db97956b.js +64 -0
  204. package/dist/SnappingOperation-9622a00d.js +48 -0
  205. package/dist/SourceLayerData-7016f1a5.js +116 -0
  206. package/dist/SpatialFilter-d20d4f50.js +1701 -0
  207. package/dist/Stop-68022e32.js +281 -0
  208. package/dist/StreamLayer-7c837e3d.js +188 -0
  209. package/dist/StreamLayerView2D-586f5a6a.js +164 -0
  210. package/dist/StyleDefinition-f4862d5a.js +36 -0
  211. package/dist/StyleRepository-fba75e70.js +2212 -0
  212. package/dist/SublayersOwner-3dc574cd.js +545 -0
  213. package/dist/SubtypeGroupLayer-1f9c5398.js +514 -0
  214. package/dist/SubtypeGroupLayerView2D-0f108d9d.js +84 -0
  215. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  216. package/dist/TechniqueInstance-0481dbff.js +233 -0
  217. package/dist/TemporalLayer-8116b4a4.js +23 -0
  218. package/dist/Texture-22a8cca5.js +501 -0
  219. package/dist/TextureOnly.glsl-458f8148.js +65 -0
  220. package/dist/Theme-f05b8eb0.js +3426 -0
  221. package/dist/Tick-aef93b48.js +723 -0
  222. package/dist/TileContainer-0bf0ea1b.js +31 -0
  223. package/dist/TileInfoTilemapCache-d78858c0.js +38 -0
  224. package/dist/TileLayer-0edee064.js +194 -0
  225. package/dist/TileLayerView2D-78d5801b.js +187 -0
  226. package/dist/TilemapCache-79699d61.js +189 -0
  227. package/dist/TimeInfo-40c96ade.js +42 -0
  228. package/dist/TimeOnly-9ee66ca6.js +706 -0
  229. package/dist/Tooltip-e7498dc9.js +138 -0
  230. package/dist/TopFeaturesQuery-ad224e01.js +32 -0
  231. package/dist/TurboLine-6ab04aef.js +565 -0
  232. package/dist/UniqueValueRenderer-eaa5f8a6.js +1039 -0
  233. package/dist/UnknownLayer-e280ddd4.js +30 -0
  234. package/dist/UnknownTimeZone-220952b5.js +15 -0
  235. package/dist/UnsupportedLayer-447f7676.js +31 -0
  236. package/dist/UpdateTracking2D-e9adad8f.js +8566 -0
  237. package/dist/Util-002f5109.js +57 -0
  238. package/dist/VectorTileLayer-3210be81.js +544 -0
  239. package/dist/VectorTileLayerView2D-6a51e3b8.js +2108 -0
  240. package/dist/Version-3de8cbca.js +33 -0
  241. package/dist/VertexArrayObject-07998745.js +73 -0
  242. package/dist/VertexAttribute-faad30bf.js +11 -0
  243. package/dist/VertexColor.glsl-e415cf02.js +2683 -0
  244. package/dist/VertexElementDescriptor-d7c718c2.js +8 -0
  245. package/dist/VertexSnappingCandidate-b676241f.js +13 -0
  246. package/dist/VideoLayerView2D-f659dd0d.js +124 -0
  247. package/dist/VoxelLayer-003f82ff.js +631 -0
  248. package/dist/WFSLayer-3da6c5f7.js +221 -0
  249. package/dist/WFSSourceWorker-9a11693a.js +157 -0
  250. package/dist/WGLContainer-3d159b63.js +5426 -0
  251. package/dist/WMSLayer-fc0632f8.js +536 -0
  252. package/dist/WMSLayerView2D-54e80e1b.js +117 -0
  253. package/dist/WMTSLayer-9324b12b.js +531 -0
  254. package/dist/WMTSLayerView2D-3ef936db.js +142 -0
  255. package/dist/WebTileLayer-45c563ff.js +110 -0
  256. package/dist/WhereClause-7a28b740.js +2766 -0
  257. package/dist/WorkerHandle-0d54a6c7.js +47 -0
  258. package/dist/WorkerTileHandler-786c2b24.js +1539 -0
  259. package/dist/action-163397e3.js +198 -0
  260. package/dist/action-group-4859fb97.js +145 -0
  261. package/dist/action-menu-2d70b2fc.js +1759 -0
  262. package/dist/agrotools-theme.css.map +1 -1
  263. package/dist/apng-9b71d52c.js +392 -0
  264. package/dist/ar-a17f8064.js +18 -0
  265. package/dist/arcade-fa309282.js +229 -0
  266. package/dist/arcadeAsyncRuntime-738498fd.js +943 -0
  267. package/dist/arcadeUtils-f71d80fa.js +8741 -0
  268. package/dist/arcgis-knowledge-client-core-6056bcea.js +1218 -0
  269. package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +1218 -0
  270. package/dist/arcgisLayers-b2b878bd.js +152 -0
  271. package/dist/associatedFeatureServiceUtils-df5b5187.js +92 -0
  272. package/dist/axisAngleDegrees-32643b7c.js +49 -0
  273. package/dist/basicInterfaces-fa4f5fa7.js +30 -0
  274. package/dist/basis_transcoder-3187cc92.js +1248 -0
  275. package/dist/bg_BG-9950a70b.js +18 -0
  276. package/dist/bs_BA-60482871.js +18 -0
  277. package/dist/ca_ES-a121088e.js +18 -0
  278. package/dist/calcite-action-bar-5a87c23c.js +303 -0
  279. package/dist/calcite-action-ee2ca847.js +22 -0
  280. package/dist/calcite-action-group-19aa86ee.js +28 -0
  281. package/dist/calcite-button-8e9175c0.js +228 -0
  282. package/dist/calcite-flow-57d26d2d.js +128 -0
  283. package/dist/calcite-flow-item-4a3e3fc0.js +499 -0
  284. package/dist/calcite-icon-d99e280a.js +16 -0
  285. package/dist/calcite-input-28b20785.js +24 -0
  286. package/dist/calcite-label-4f30e08d.js +79 -0
  287. package/dist/calcite-list-0cee7628.js +2135 -0
  288. package/dist/calcite-list-item-0a19efa8.js +576 -0
  289. package/dist/calcite-list-item-group-0706662f.js +71 -0
  290. package/dist/calcite-loader-865045b1.js +14 -0
  291. package/dist/calcite-modal-3e4da6fd.js +333 -0
  292. package/dist/calcite-notice-50b74ab7.js +181 -0
  293. package/dist/calcite-option-713c1d40.js +94 -0
  294. package/dist/calcite-scrim-809fbd0b.js +18 -0
  295. package/dist/calcite-select-28d8edfc.js +231 -0
  296. package/dist/capabilities-c8f838be.js +50 -0
  297. package/dist/chartCommon-13718cda.js +256 -0
  298. package/dist/chartUtilsAm5-6be145fb.js +2954 -0
  299. package/dist/clientSideDefaults-5c1f97c9.js +39 -0
  300. package/dist/colorRamps-8792655e.js +38 -0
  301. package/dist/colorUtils-54f4b662.js +164 -0
  302. package/dist/commonProperties-f9559903.js +60 -0
  303. package/dist/component-51a10bc0.js +18 -0
  304. package/dist/computeTranslationToOriginAndRotation-4876cb93.js +60 -0
  305. package/dist/conditionalSlot-87175989.js +27 -0
  306. package/dist/config-61215215.js +7 -0
  307. package/dist/constants-5bd557fe.js +5 -0
  308. package/dist/createConnection-f974a00a.js +299 -0
  309. package/dist/crsUtils-59933b10.js +7 -0
  310. package/dist/cs_CZ-1b968650.js +18 -0
  311. package/dist/da_DK-e0fe1642.js +18 -0
  312. package/dist/dataUtils-7c276b73.js +1421 -0
  313. package/dist/date-1c28c6a5.js +52 -0
  314. package/dist/de_CH-b0dbd4c8.js +6 -0
  315. package/dist/de_DE-8609ef65.js +6 -0
  316. package/dist/debounce-de27a42a.js +121 -0
  317. package/dist/deduplicate-59fb9cac.js +89 -0
  318. package/dist/defaults-2bfa4a36.js +31 -0
  319. package/dist/defaultsJSON-ba17aa15.js +10 -0
  320. package/dist/definitions-a00a3a6c.js +52 -0
  321. package/dist/deleteForwardEdits-f653b513.js +13 -0
  322. package/dist/devEnvironmentUtils-42cb97c7.js +11 -0
  323. package/dist/diffUtils-e71a6152.js +90 -0
  324. package/dist/dom-b589b728.js +358 -0
  325. package/dist/doublePrecisionUtils-46e21550.js +22 -0
  326. package/dist/drapedUtils-b42fcbc6.js +75 -0
  327. package/dist/earcut-6fa1a128.js +292 -0
  328. package/dist/edgeProcessing-2ff1f201.js +252 -0
  329. package/dist/editingSupport-68545668.js +203 -0
  330. package/dist/editsZScale-c7cdd215.js +37 -0
  331. package/dist/el_GR-5cfd1e7e.js +18 -0
  332. package/dist/elevationInfoUtils-5456a079.js +126 -0
  333. package/dist/en_CA-47f2633b.js +18 -0
  334. package/dist/en_US-47f2633b.js +18 -0
  335. package/dist/enums-25d066fc.js +13 -0
  336. package/dist/enums-2c166c09.js +99 -0
  337. package/dist/enums-fa8f05ab.js +152 -0
  338. package/dist/es_ES-489878a2.js +6 -0
  339. package/dist/et_EE-6472669a.js +18 -0
  340. package/dist/executeForIds-4ab75c0d.js +14 -0
  341. package/dist/executeForTopCount-7e095ec1.js +17 -0
  342. package/dist/executeForTopExtents-19daf9d0.js +17 -0
  343. package/dist/executeForTopIds-1ba3a4af.js +17 -0
  344. package/dist/executeQueryJSON-46168866.js +15 -0
  345. package/dist/executeQueryPBF-d8623daf.js +152 -0
  346. package/dist/executeRelationshipQuery-011dfb45.js +53 -0
  347. package/dist/executeTopFeaturesQuery-02166801.js +18 -0
  348. package/dist/featureConversionUtils-650d7601.js +479 -0
  349. package/dist/featureLayerUtils-64e09283.js +142 -0
  350. package/dist/featureLayerUtils-b07f9c11.js +250 -0
  351. package/dist/featureSetUtils-9d37d6f8.js +2530 -0
  352. package/dist/featuresetbase-62aeb079.js +707 -0
  353. package/dist/featuresetgeom-51f9fc4e.js +99 -0
  354. package/dist/featuresetstats-4db32894.js +81 -0
  355. package/dist/featuresetstring-990c3287.js +95 -0
  356. package/dist/fetchService-5198dd4a.js +33 -0
  357. package/dist/fi_FI-d7a3a525.js +18 -0
  358. package/dist/fieldProperties-edfa24cb.js +33 -0
  359. package/dist/floatRGBA-516d7961.js +20 -0
  360. package/dist/floorFilterUtils-936f7587.js +19 -0
  361. package/dist/focusTrapComponent-e849bb89.js +475 -0
  362. package/dist/form-99719d52.js +138 -0
  363. package/dist/fr_FR-a88f2596.js +7 -0
  364. package/dist/geohashUtils-2bc76440.js +85 -0
  365. package/dist/geojson-603231df.js +208 -0
  366. package/dist/geomasync-e9063b4c.js +567 -0
  367. package/dist/geometryEngine-d3bb2fd6.js +192 -0
  368. package/dist/geometryEngineAsync-55aa6170.js +217 -0
  369. package/dist/geometryEngineBase-527e8b63.js +18463 -0
  370. package/dist/geometryEngineJSON-28087174.js +46 -0
  371. package/dist/geometryEngineJSON-d54949f9.js +171 -0
  372. package/dist/geometryEngineWorker-dc2c7127.js +11 -0
  373. package/dist/geometryServiceUtils-6a3e1e93.js +28 -0
  374. package/dist/georeference-ed8b2c30.js +291 -0
  375. package/dist/gif-204e82dd.js +323 -0
  376. package/dist/glUtil-8f8bce6b.js +19 -0
  377. package/dist/gltfexport-b2566542.js +705 -0
  378. package/dist/groupLayerUtils-ea9e6359.js +39 -0
  379. package/dist/guid-5ee54248.js +17 -0
  380. package/dist/he_IL-e34cf273.js +18 -0
  381. package/dist/heatmapUtils-56758920.js +45 -0
  382. package/dist/highlightReasons-de432106.js +19 -0
  383. package/dist/hr_HR-6a124f87.js +18 -0
  384. package/dist/hu_HU-58f3feb6.js +18 -0
  385. package/dist/hydrated-0e1c7565.js +40 -0
  386. package/dist/i3s-bb0b5b67.js +809 -0
  387. package/dist/icon-c6e3bd23.js +127 -0
  388. package/dist/id_ID-18d97715.js +18 -0
  389. package/dist/imageBitmapUtils-881d8c64.js +23 -0
  390. package/dist/imageUtils-57eeedc5.js +69 -0
  391. package/dist/imageUtils-ef69c578.js +89 -0
  392. package/dist/imageryUtils-23f51cb1.js +43 -0
  393. package/dist/index-01c737ed.js +42563 -0
  394. package/dist/index.d.ts +2 -1
  395. package/dist/index.js +22 -10184
  396. package/dist/infoFor3D-bf4e6c95.js +58 -0
  397. package/dist/input-message-673a9baa.js +92 -0
  398. package/dist/input2-bbf6454e.js +575 -0
  399. package/dist/interactive-aeb2cb9f.js +80 -0
  400. package/dist/interfaces-fac3cfda.js +7 -0
  401. package/dist/it_IT-49e70bbf.js +6 -0
  402. package/dist/ja_JP-eaef2cc3.js +18 -0
  403. package/dist/json-5febf88a.js +57 -0
  404. package/dist/jsonContext-2dc288b1.js +15 -0
  405. package/dist/jsonUtils-1abd4bfc.js +59 -0
  406. package/dist/jsonUtils-913fa1bd.js +86 -0
  407. package/dist/jsonUtils-f6a5e63b.js +476 -0
  408. package/dist/kmlUtils-7c2744fe.js +112 -0
  409. package/dist/knowledgeGraphService-6a349e04.js +739 -0
  410. package/dist/knowledgegraph-c91b0bb2.js +149 -0
  411. package/dist/ko_KR-5c972fd8.js +14 -0
  412. package/dist/label2-1ab25f27.js +90 -0
  413. package/dist/labelUtils-a3634e8f.js +61 -0
  414. package/dist/labelingInfo-568c9210.js +46 -0
  415. package/dist/layerViewUtils-052e603c.js +10 -0
  416. package/dist/layersCreator-4a5366ea.js +151 -0
  417. package/dist/layersLoader-b87d4857.js +197 -0
  418. package/dist/lazyLayerLoader-8817000c.js +10 -0
  419. package/dist/lclayout-64c67b4e.js +773 -0
  420. package/dist/lengthUtils-695e744c.js +5 -0
  421. package/dist/lerc-wasm-13192bf3.js +325 -0
  422. package/dist/libtess-asm-4883179d.js +3673 -0
  423. package/dist/libtess-fc70d1ce.js +269 -0
  424. package/dist/lineSegment-3aa941f5.js +76 -0
  425. package/dist/loadGLTFMesh-db6645f5.js +181 -0
  426. package/dist/loadable-266f324b.js +24 -0
  427. package/dist/loader-d1ce1bc1.js +79 -0
  428. package/dist/lt_LT-26f13fd1.js +6 -0
  429. package/dist/lv_LV-4feafa92.js +18 -0
  430. package/dist/lyr3DWorker-dd48e619.js +2108 -0
  431. package/dist/mapViewDeps-226d9da3.js +3052 -0
  432. package/dist/mask-svg-30f64a7b.js +4 -0
  433. package/dist/mat3f64-03233387.js +19 -0
  434. package/dist/mat4f64-cce69db4.js +19 -0
  435. package/dist/mediaLayerUtils-ae485c27.js +35 -0
  436. package/dist/meshFeatureSet-8a2ad011.js +126 -0
  437. package/dist/meshVertexSpaceUtils-6efe3dcc.js +58 -0
  438. package/dist/multiOriginJSONSupportUtils-207ba4d4.js +6 -0
  439. package/dist/multidimensionalUtils-508a3f3f.js +290 -0
  440. package/dist/nb_NO-21543153.js +18 -0
  441. package/dist/nl_NL-7876d97f.js +7 -0
  442. package/dist/normalizeUtilsSync-1dae280b.js +181 -0
  443. package/dist/number-5aa3a81b.js +128 -0
  444. package/dist/objectIdUtils-93dae423.js +14 -0
  445. package/dist/objectResourceUtils-642ab03e.js +1455 -0
  446. package/dist/observers-f646a6a4.js +30 -0
  447. package/dist/ogcFeatureUtils-46ac1c44.js +206 -0
  448. package/dist/openCloseComponent-47eb52c6.js +37 -0
  449. package/dist/orientedBoundingBox-554ccdc6.js +447 -0
  450. package/dist/originUtils-87edf087.js +9 -0
  451. package/dist/overlay-svg-c3941b3b.js +4 -0
  452. package/dist/parser-0701286c.js +488 -0
  453. package/dist/pbf-5dd791f5.js +215 -0
  454. package/dist/pbfQueryUtils-a6ca7e23.js +422 -0
  455. package/dist/pe-wasm-6c16b121.js +887 -0
  456. package/dist/persistable-9eb0e8df.js +89 -0
  457. package/dist/perspectiveUtils-b194621d.js +42 -0
  458. package/dist/pieChart-b97433d0.js +555 -0
  459. package/dist/pl_PL-276c6dae.js +18 -0
  460. package/dist/plane-3398eec1.js +160 -0
  461. package/dist/popupUtils-c444b896.js +22 -0
  462. package/dist/popupUtils-d871563b.js +50 -0
  463. package/dist/portalItemUtils-4c4caad0.js +57 -0
  464. package/dist/portalLayers-cb07742f.js +312 -0
  465. package/dist/portalUtils-effd590f.js +7 -0
  466. package/dist/programUtils-65af7b7c.js +59 -0
  467. package/dist/project-ee9c2947.js +21 -0
  468. package/dist/projectPointToVector-7dc831a9.js +14 -0
  469. package/dist/projectVectorToVector-5163db7a.js +13 -0
  470. package/dist/pt_BR-4fae3055.js +6 -0
  471. package/dist/pt_PT-14d9efb1.js +6 -0
  472. package/dist/quantityUtils-5cd4cf90.js +33 -0
  473. package/dist/quantizationUtils-0a8f74c6.js +68 -0
  474. package/dist/quat-a508aed3.js +104 -0
  475. package/dist/quatf64-bec1af25.js +19 -0
  476. package/dist/query-b6e1fd14.js +89 -0
  477. package/dist/queryAttachments-7b39ebdc.js +39 -0
  478. package/dist/queryEngineUtils-cb8e309e.js +21 -0
  479. package/dist/queryTopFeatures-2e0e3941.js +50 -0
  480. package/dist/queryZScale-c5733d0a.js +12 -0
  481. package/dist/rasterProjectionHelper-213afa27.js +577 -0
  482. package/dist/rasterUtils-f2e44e8b.js +122 -0
  483. package/dist/rasterizingUtils-25cc0190.js +46 -0
  484. package/dist/request-e0c679b3.js +46 -0
  485. package/dist/requestImageUtils-37d79281.js +8 -0
  486. package/dist/resourceExtension-5f3f1c80.js +17 -0
  487. package/dist/resourceUtils-0d68cbc2.js +69 -0
  488. package/dist/resourceUtils-374db840.js +62 -0
  489. package/dist/resourceUtils-43ce192b.js +42 -0
  490. package/dist/ro_RO-8e733cf5.js +18 -0
  491. package/dist/ru_RU-f7bafc90.js +6 -0
  492. package/dist/saveAPIKeyUtils-1a3d4a8a.js +8 -0
  493. package/dist/saveUtils-43fdc547.js +24 -0
  494. package/dist/scaleUtils-bdf8b6cb.js +23 -0
  495. package/dist/scrim-44eb4dc0.js +114 -0
  496. package/dist/serviceCapabilitiesUtils-823612b8.js +64 -0
  497. package/dist/sizeVariableUtils-a1b694d8.js +27 -0
  498. package/dist/sk_SK-c279eea3.js +6 -0
  499. package/dist/sl_SL-e40950dd.js +6 -0
  500. package/dist/sourceUtils-01d115c6.js +71 -0
  501. package/dist/sphere-908cd9aa.js +199 -0
  502. package/dist/sr_RS-b1835dfa.js +18 -0
  503. package/dist/statsWorker-49f9befe.js +37 -0
  504. package/dist/streamLayerUtils-29324e05.js +31 -0
  505. package/dist/style.css +1 -1
  506. package/dist/styleUtils-82e8da52.js +75 -0
  507. package/dist/styleUtils-8541d60d.js +14 -0
  508. package/dist/sublayerUtils-eaac2486.js +37 -0
  509. package/dist/substitute-1f578d70.js +52 -0
  510. package/dist/sv_SE-15ca9e36.js +6 -0
  511. package/dist/symbolColorUtils-18fd6b3d.js +8 -0
  512. package/dist/symbolLayerUtils-4c58b291.js +31 -0
  513. package/dist/symbologySnappingCandidates-14d94b6b.js +221 -0
  514. package/dist/t9n-c1c2b6c8.js +349 -0
  515. package/dist/testSVGPremultipliedAlpha-159dac90.js +94 -0
  516. package/dist/th_TH-bf624a56.js +18 -0
  517. package/dist/tileUtils-3e0c8c1d.js +7 -0
  518. package/dist/timeSupport-3f529cdb.js +410 -0
  519. package/dist/tr_TR-ca5c315f.js +18 -0
  520. package/dist/triangle-8a3a2ba8.js +98 -0
  521. package/dist/types-adba9034.js +19 -0
  522. package/dist/uk_UA-4b3cb86d.js +6 -0
  523. package/dist/unitConversionUtils-f0ebaf75.js +17 -0
  524. package/dist/unitFormatUtils-555e2d94.js +40 -0
  525. package/dist/uploadAssetErrors-d1389781.js +70 -0
  526. package/dist/uploadAssets-5e85f09d.js +330 -0
  527. package/dist/utils-3a10b10c.js +34 -0
  528. package/dist/utils-505c54e9.js +91 -0
  529. package/dist/utils-5432e258.js +433 -0
  530. package/dist/utils-7a88ec6a.js +419 -0
  531. package/dist/utils-7fa9cdf9.js +2746 -0
  532. package/dist/utils-d252c575.js +73 -0
  533. package/dist/utils-f07e00b3.js +232 -0
  534. package/dist/utils-fda10b4b.js +79 -0
  535. package/dist/utils3-c34ab97c.js +75 -0
  536. package/dist/vec3-f79c600d.js +81 -0
  537. package/dist/vec3f32-304a6a9c.js +36 -0
  538. package/dist/vec42-36edeb73.js +125 -0
  539. package/dist/vec4f32-b2628ced.js +38 -0
  540. package/dist/vec4f64-043e974c.js +45 -0
  541. package/dist/versionUtils-6935648b.js +161 -0
  542. package/dist/vi_VN-ad09e708.js +18 -0
  543. package/dist/visualVariableUtils-c425461a.js +267 -0
  544. package/dist/webStyleSymbolUtils-4f42a29f.js +48 -0
  545. package/dist/webglDeps-5f18210d.js +23 -0
  546. package/dist/wfsUtils-6f7f1e3e.js +343 -0
  547. package/dist/workerHelper-9dc9a790.js +11 -0
  548. package/dist/xmlUtils-64cc47e1.js +24 -0
  549. package/dist/xyChart-e5648fee.js +3335 -0
  550. package/dist/zh_Hans-61faef57.js +14 -0
  551. package/dist/zh_Hant-87a9767b.js +14 -0
  552. package/dist/zipjs-wrapper-1bd67e07.js +6496 -0
  553. package/package.json +3 -2
@@ -0,0 +1,899 @@
1
+ import { e as p, y as f, fU as te, c as B, fV as pe, hO as _e, fW as x, hP as fe, bx as oe, dc as ae, bP as A, hQ as he, cT as F, dO as N, gU as j, W as U, gW as ge, dy as C, fK as D, U as R, eF as V, hR as J, f$ as H, eh as se, hS as me, c9 as W, cc as ve, hT as we, bU as L, dt as re, cJ as Ie, hU as Se } from "./index-01c737ed.js";
2
+ import { s as ye } from "./substitute-1f578d70.js";
3
+ import "vue";
4
+ const G = "esri-identity-modal", K = { base: G, info: `${G}__info`, notice: `${G}__notice` }, ke = "ArcGIS Online";
5
+ let O = class extends pe {
6
+ constructor(c, e) {
7
+ super(c, e), 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);
8
+ }
9
+ loadDependencies() {
10
+ return _e({ button: () => import("./calcite-button-8e9175c0.js"), input: () => import("./calcite-input-28b20785.js"), label: () => import("./calcite-label-4f30e08d.js"), modal: () => import("./calcite-modal-3e4da6fd.js"), notice: () => import("./calcite-notice-50b74ab7.js") });
11
+ }
12
+ get title() {
13
+ var c;
14
+ return (c = this.commonMessages) == null ? void 0 : c.auth.signIn;
15
+ }
16
+ render() {
17
+ var b;
18
+ const { open: c, title: e, messages: t, signingIn: s, oAuthPrompt: i, server: r, resource: n, error: h } = this, { info: u, oAuthInfo: o, lblItem: l, invalidUser: d, noAuthService: a, lblUser: _, lblPwd: I, lblCancel: g, lblSigning: w, lblOk: m } = t;
19
+ return x("div", { class: this.classes(K.base, fe()) }, x("form", { bind: this, onsubmit: this._submit }, x("calcite-modal", { bind: this, open: c, outsideCloseDisabled: !0, scale: "s", widthScale: "s", onCalciteModalClose: this._cancel, onCalciteModalOpen: this._focusUsernameInput }, x("div", { slot: "header" }, e), x("div", { slot: "content" }, x("div", { class: K.info }, ye(i ? o : u, { server: r && /\.arcgis\.com/i.test(r) ? ke : r, resource: `(${n || l})` })), h ? x("calcite-notice", { class: K.notice, icon: "exclamation-mark-triangle", kind: "danger", open: !0 }, x("div", { slot: "message" }, (b = h.details) != null && b.httpStatus ? d : a)) : null, i ? null : [x("calcite-label", null, _, x("calcite-input", { afterCreate: (q) => this._usernameInputNode = q, autocomplete: "off", bind: this, name: "username", required: !0, spellcheck: !1, type: "text", value: "" })), x("calcite-label", null, I, x("calcite-input", { afterCreate: (q) => this._passwordInputNode = q, bind: this, name: "password", required: !0, type: "password", value: "" }))]), x("calcite-button", { appearance: "outline", bind: this, onclick: this._cancel, slot: "secondary", type: "button", width: "full" }, g), x("calcite-button", { loading: !!s, slot: "primary", type: "submit", width: "full" }, s ? w : m))));
20
+ }
21
+ _focusUsernameInput() {
22
+ requestAnimationFrame(() => {
23
+ var c;
24
+ (c = this._usernameInputNode) == null || c.setFocus();
25
+ });
26
+ }
27
+ _cancel() {
28
+ this._set("signingIn", !1), this.open = !1, this._usernameInputNode && (this._usernameInputNode.value = ""), this._passwordInputNode && (this._passwordInputNode.value = ""), this.emit("cancel");
29
+ }
30
+ _submit(c) {
31
+ var t, s;
32
+ c.preventDefault(), this._set("signingIn", !0);
33
+ const e = this.oAuthPrompt ? {} : { username: (t = this._usernameInputNode) == null ? void 0 : t.value, password: (s = this._passwordInputNode) == null ? void 0 : s.value };
34
+ this.emit("submit", e);
35
+ }
36
+ };
37
+ p([f({ readOnly: !0 })], O.prototype, "container", void 0), p([f(), te("esri/t9n/common")], O.prototype, "commonMessages", void 0), p([f()], O.prototype, "error", void 0), p([f(), te("esri/identity/t9n/identity")], O.prototype, "messages", void 0), p([f()], O.prototype, "oAuthPrompt", void 0), p([f()], O.prototype, "open", void 0), p([f()], O.prototype, "signingIn", void 0), p([f()], O.prototype, "server", void 0), p([f({ readOnly: !0 })], O.prototype, "title", null), p([f()], O.prototype, "resource", void 0), O = p([B("esri.identity.IdentityModal")], O);
38
+ const ie = O, Q = "esriJSAPIOAuth";
39
+ class Y {
40
+ constructor(e, t) {
41
+ 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();
42
+ }
43
+ isValid() {
44
+ let e = !1;
45
+ if (this.oAuthInfo && this.userId && (this.refreshToken || this.token)) {
46
+ if (this.expires == null && this.refreshToken)
47
+ e = !0;
48
+ else if (this.expires) {
49
+ const t = Date.now();
50
+ this.expires > t && (this.expires - t) / 1e3 > 60 * this.oAuthInfo.minTimeUntilExpiration && (e = !0);
51
+ }
52
+ }
53
+ return e;
54
+ }
55
+ save() {
56
+ if (!this.storage)
57
+ return !1;
58
+ const e = this._load(), t = this.oAuthInfo;
59
+ if (t && t.authNamespace && t.portalUrl) {
60
+ let s = e[t.authNamespace];
61
+ s || (s = e[t.authNamespace] = {}), this.appId || (this.appId = t.appId), s[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 };
62
+ try {
63
+ this.storage.setItem(Q, JSON.stringify(e));
64
+ } catch (i) {
65
+ return console.warn(i), !1;
66
+ }
67
+ return !0;
68
+ }
69
+ return !1;
70
+ }
71
+ destroy() {
72
+ const e = this._load(), t = this.oAuthInfo;
73
+ if (t != null && t.appId && (t != null && t.portalUrl) && (this.expires == null || this.expires > Date.now()) && (this.refreshToken || this.token)) {
74
+ const s = t.portalUrl.replace(/^http:/i, "https:") + "/sharing/rest/oauth2/revokeToken", i = new FormData();
75
+ if (i.append("f", "json"), i.append("auth_token", this.refreshToken || this.token), i.append("client_id", t.appId), i.append("token_type_hint", this.refreshToken ? "refresh_token" : "access_token"), typeof navigator.sendBeacon == "function")
76
+ navigator.sendBeacon(s, i);
77
+ else {
78
+ const r = new XMLHttpRequest();
79
+ r.open("POST", s), r.send(i);
80
+ }
81
+ }
82
+ if (t && t.authNamespace && t.portalUrl && this.storage) {
83
+ const s = e[t.authNamespace];
84
+ if (s) {
85
+ delete s[t.portalUrl];
86
+ try {
87
+ this.storage.setItem(Q, JSON.stringify(e));
88
+ } catch (i) {
89
+ console.log(i);
90
+ }
91
+ }
92
+ }
93
+ t && (t._oAuthCred = null, this.oAuthInfo = null);
94
+ }
95
+ _init() {
96
+ const e = this._load(), t = this.oAuthInfo;
97
+ if (t && t.authNamespace && t.portalUrl) {
98
+ let s = e[t.authNamespace];
99
+ s && (s = s[t.portalUrl], s && (this.appId = s.appId, this.codeVerifier = s.codeVerifier, this.expires = s.expires, this.refreshToken = s.refreshToken, this.ssl = s.ssl, this.stateUID = s.stateUID, this.token = s.token, this.userId = s.userId));
100
+ }
101
+ }
102
+ _load() {
103
+ let e = {};
104
+ if (this.storage) {
105
+ const t = this.storage.getItem(Q);
106
+ if (t)
107
+ try {
108
+ e = JSON.parse(t);
109
+ } catch (s) {
110
+ console.warn(s);
111
+ }
112
+ }
113
+ return e;
114
+ }
115
+ }
116
+ Y.prototype.declaredClass = "esri.identity.OAuthCredential";
117
+ var Z;
118
+ let T = Z = class extends oe {
119
+ constructor(c) {
120
+ super(c), 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;
121
+ }
122
+ clone() {
123
+ return Z.fromJSON(this.toJSON());
124
+ }
125
+ };
126
+ p([f({ json: { write: !0 } })], T.prototype, "appId", void 0), p([f({ json: { write: !0 } })], T.prototype, "authNamespace", void 0), p([f({ json: { write: !0 } })], T.prototype, "expiration", void 0), p([f({ json: { write: !0 } })], T.prototype, "flowType", void 0), p([f({ json: { write: !0 } })], T.prototype, "forceLogin", void 0), p([f({ json: { write: !0 } })], T.prototype, "forceUserId", void 0), p([f({ json: { write: !0 } })], T.prototype, "locale", void 0), p([f({ json: { write: !0 } })], T.prototype, "minTimeUntilExpiration", void 0), p([f({ json: { write: !0 } })], T.prototype, "popup", void 0), p([f({ json: { write: !0 } })], T.prototype, "popupCallbackUrl", void 0), p([f({ json: { write: !0 } })], T.prototype, "popupWindowFeatures", void 0), p([f({ json: { write: !0 } })], T.prototype, "portalUrl", void 0), p([f({ json: { write: !0 } })], T.prototype, "preserveUrlHash", void 0), p([f({ json: { write: !0 } })], T.prototype, "userId", void 0), T = Z = p([B("esri.identity.OAuthInfo")], T);
127
+ const ne = T;
128
+ let P = class extends oe {
129
+ constructor(c) {
130
+ super(c), 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;
131
+ }
132
+ };
133
+ p([f({ json: { write: !0 } })], P.prototype, "adminTokenServiceUrl", void 0), p([f({ json: { write: !0 } })], P.prototype, "currentVersion", void 0), p([f({ json: { write: !0 } })], P.prototype, "hasPortal", void 0), p([f({ json: { write: !0 } })], P.prototype, "hasServer", void 0), p([f({ json: { write: !0 } })], P.prototype, "owningSystemUrl", void 0), p([f({ json: { write: !0 } })], P.prototype, "owningTenant", void 0), p([f({ json: { write: !0 } })], P.prototype, "server", void 0), p([f({ json: { write: !0 } })], P.prototype, "shortLivedTokenValidity", void 0), p([f({ json: { write: !0 } })], P.prototype, "tokenServiceUrl", void 0), p([f({ json: { write: !0 } })], P.prototype, "webTierAuth", void 0), P = p([B("esri.identity.ServerInfo")], P);
134
+ const X = P, E = {}, le = (c) => {
135
+ const e = new D(c.owningSystemUrl).host, t = new D(c.server).host, s = /.+\.arcgis\.com$/i;
136
+ return s.test(e) && s.test(t);
137
+ }, $ = (c, e) => !!(le(c) && e && e.some((t) => t.test(c.server)));
138
+ let M = null, z = null;
139
+ try {
140
+ M = window.localStorage, z = window.sessionStorage;
141
+ } catch {
142
+ }
143
+ class ce extends ae {
144
+ constructor() {
145
+ 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 = window.origin !== "null" ? window.origin : window.location.origin, this._appUrlObj = F(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._getOAuthLocationParams(), window.addEventListener("pageshow", (e) => {
146
+ this._pageShowHandler(e);
147
+ });
148
+ }
149
+ registerServers(e) {
150
+ const t = this.serverInfos;
151
+ t ? (e = e.filter((s) => !this.findServerInfo(s.server)), this.serverInfos = t.concat(e)) : this.serverInfos = e, e.forEach((s) => {
152
+ s.owningSystemUrl && this._portals.push(s.owningSystemUrl), s.hasPortal && this._portals.push(s.server);
153
+ });
154
+ }
155
+ registerOAuthInfos(e) {
156
+ const t = this.oAuthInfos;
157
+ if (t) {
158
+ for (const s of e) {
159
+ const i = this.findOAuthInfo(s.portalUrl);
160
+ i && t.splice(t.indexOf(i), 1);
161
+ }
162
+ this.oAuthInfos = t.concat(e);
163
+ } else
164
+ this.oAuthInfos = e;
165
+ }
166
+ registerToken(e) {
167
+ e = { ...e };
168
+ const t = this._sanitizeUrl(e.server), s = this._isServerRsrc(t);
169
+ let i, r = this.findServerInfo(t), n = !0;
170
+ r || (r = new X(), r.server = this._getServerInstanceRoot(t), s ? r.hasServer = !0 : (r.tokenServiceUrl = this._getTokenSvcUrl(t), r.hasPortal = !0), this.registerServers([r])), i = this._findCredential(t), i ? (delete e.server, Object.assign(i, e), n = !1) : (i = new S({ userId: e.userId, server: r.server, token: e.token, expires: e.expires, ssl: e.ssl, scope: s ? "server" : "portal" }), i.resources = [t], this.credentials.push(i)), i.emitTokenChange(!1), n || i.refreshServerTokens();
171
+ }
172
+ toJSON() {
173
+ return he({ serverInfos: this.serverInfos.map((e) => e.toJSON()), oAuthInfos: this.oAuthInfos.map((e) => e.toJSON()), credentials: this.credentials.map((e) => e.toJSON()) });
174
+ }
175
+ initialize(e) {
176
+ if (!e)
177
+ return;
178
+ typeof e == "string" && (e = JSON.parse(e));
179
+ const t = e.serverInfos, s = e.oAuthInfos, i = e.credentials;
180
+ if (t) {
181
+ const r = [];
182
+ t.forEach((n) => {
183
+ n.server && n.tokenServiceUrl && r.push(n.declaredClass ? n : new X(n));
184
+ }), r.length && this.registerServers(r);
185
+ }
186
+ if (s) {
187
+ const r = [];
188
+ s.forEach((n) => {
189
+ n.appId && r.push(n.declaredClass ? n : new ne(n));
190
+ }), r.length && this.registerOAuthInfos(r);
191
+ }
192
+ i && i.forEach((r) => {
193
+ r.server && r.token && r.expires && r.expires > Date.now() && ((r = r.declaredClass ? r : new S(r)).emitTokenChange(), this.credentials.push(r));
194
+ });
195
+ }
196
+ findServerInfo(e) {
197
+ let t;
198
+ e = this._sanitizeUrl(e);
199
+ for (const s of this.serverInfos)
200
+ if (this._hasSameServerInstance(s.server, e)) {
201
+ t = s;
202
+ break;
203
+ }
204
+ return t;
205
+ }
206
+ findOAuthInfo(e) {
207
+ let t;
208
+ e = this._sanitizeUrl(e);
209
+ for (const s of this.oAuthInfos)
210
+ if (this._hasSameServerInstance(s.portalUrl, e)) {
211
+ t = s;
212
+ break;
213
+ }
214
+ return t;
215
+ }
216
+ findCredential(e, t) {
217
+ if (!e)
218
+ return;
219
+ let s;
220
+ e = this._sanitizeUrl(e);
221
+ const i = this._isServerRsrc(e) ? "server" : "portal";
222
+ if (t) {
223
+ for (const r of this.credentials)
224
+ if (this._hasSameServerInstance(r.server, e) && t === r.userId && r.scope === i) {
225
+ s = r;
226
+ break;
227
+ }
228
+ } else
229
+ for (const r of this.credentials)
230
+ if (this._hasSameServerInstance(r.server, e) && this._getIdenticalSvcIdx(e, r) !== -1 && r.scope === i) {
231
+ s = r;
232
+ break;
233
+ }
234
+ return s;
235
+ }
236
+ getCredential(e, t) {
237
+ let s, i, r = !0;
238
+ t && (s = !!t.token, i = t.error, r = t.prompt !== !1), t = { ...t }, e = this._sanitizeUrl(e);
239
+ const n = new AbortController(), h = N();
240
+ if (t.signal && j(t.signal, () => {
241
+ n.abort();
242
+ }), j(n, () => {
243
+ h.reject(new U("identity-manager:user-aborted", "ABORTED"));
244
+ }), ge(n))
245
+ return h.promise;
246
+ t.signal = n.signal;
247
+ const u = this._isAdminResource(e), o = s ? this.findCredential(e) : null;
248
+ let l;
249
+ if (o && i && i.details && i.details.httpStatus === 498)
250
+ o.destroy();
251
+ else if (o)
252
+ return l = new U("identity-manager:not-authorized", "You are currently signed in as: '" + o.userId + "'. You do not have access to this resource: " + e, { error: i }), h.reject(l), h.promise;
253
+ const d = this._findCredential(e, t);
254
+ if (d)
255
+ return h.resolve(d), h.promise;
256
+ let a = this.findServerInfo(e);
257
+ if (a)
258
+ !a.hasPortal && a.server && a.owningSystemUrl && this._hasSameServerInstance(a.server, a.owningSystemUrl) && (a.hasPortal = !0), !a.hasServer && this._isServerRsrc(e) && (a._restInfoPms = this._getTokenSvcUrl(e), a.hasServer = !0);
259
+ else {
260
+ const _ = this._getTokenSvcUrl(e);
261
+ if (!_)
262
+ return l = new U("identity-manager:unknown-resource", "Unknown resource - could not find token service endpoint."), h.reject(l), h.promise;
263
+ a = new X(), a.server = this._getServerInstanceRoot(e), typeof _ == "string" ? (a.tokenServiceUrl = _, a.hasPortal = !0) : (a._restInfoPms = _, a.hasServer = !0), this.registerServers([a]);
264
+ }
265
+ return a.hasPortal && a._selfReq === void 0 && (r || C(a.tokenServiceUrl, this._appOrigin) || this._gwDomains.some((_) => _.tokenServiceUrl === a.tokenServiceUrl)) && (a._selfReq = { owningTenant: t == null ? void 0 : t.owningTenant, selfDfd: this._getPortalSelf(a.tokenServiceUrl.replace(this._rePortalTokenSvc, "/sharing/rest/portals/self"), e) }), this._enqueue(e, a, t, h, u);
266
+ }
267
+ getResourceName(e) {
268
+ 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") || "";
269
+ }
270
+ generateToken(e, t, s) {
271
+ const i = this._rePortalTokenSvc.test(e.tokenServiceUrl), r = new D(this._appOrigin), n = e.shortLivedTokenValidity;
272
+ let h, u, o, l, d, a, _, I;
273
+ t && (I = this.tokenValidity || n || this._defaultTokenValidity, I > n && n > 0 && (I = n)), s && (h = s.isAdmin, u = s.serverUrl, o = s.token, a = s.signal, _ = s.ssl, e.customParameters = s.customParameters), h ? l = e.adminTokenServiceUrl : (l = e.tokenServiceUrl, d = new D(l.toLowerCase()), e.webTierAuth && (s != null && s.serverUrl) && !_ && r.scheme === "http" && (C(r.uri, l, !0) || d.scheme === "https" && r.host === d.host && r.port === "7080" && d.port === "7443") && (l = l.replace(/^https:/i, "http:").replace(/:7443/i, ":7080")));
274
+ const g = { query: { request: "getToken", username: t == null ? void 0 : t.username, password: t == null ? void 0 : t.password, serverUrl: u, token: o, expiration: I, referer: h || i ? this._appOrigin : null, client: h ? "referer" : null, f: "json", ...e.customParameters }, method: "post", authMode: "anonymous", useProxy: this._useProxy(e, s), signal: a, ...s == null ? void 0 : s.ioArgs };
275
+ return i || (g.withCredentials = !1), R(l, g).then((w) => {
276
+ const m = w.data;
277
+ if (!(m != null && m.token))
278
+ return new U("identity-manager:authentication-failed", "Unable to generate token");
279
+ const b = e.server;
280
+ return E[b] || (E[b] = {}), t && (E[b][t.username] = t.password), m.validity = I, m;
281
+ });
282
+ }
283
+ isBusy() {
284
+ return !!this._busy;
285
+ }
286
+ checkSignInStatus(e) {
287
+ return this.checkAppAccess(e, "").then((t) => t.credential);
288
+ }
289
+ checkAppAccess(e, t, s) {
290
+ let i = !1;
291
+ return this.getCredential(e, { prompt: !1 }).then((r) => {
292
+ let n;
293
+ const h = { f: "json" };
294
+ if (r.scope === "portal")
295
+ if (t && (this._doPortalSignIn(e) || s != null && s.force))
296
+ n = r.server + "/sharing/rest/oauth2/validateAppAccess", h.client_id = t;
297
+ else {
298
+ if (!r.token)
299
+ return { credential: r };
300
+ n = r.server + "/sharing/rest";
301
+ }
302
+ else {
303
+ if (!r.token)
304
+ return { credential: r };
305
+ n = r.server + "/rest/services";
306
+ }
307
+ return r.token && (h.token = r.token), R(n, { query: h, authMode: "anonymous" }).then((u) => {
308
+ if (u.data.valid === !1)
309
+ throw new U("identity-manager:not-authorized", `You are currently signed in as: '${r.userId}'.`, u.data);
310
+ return i = !!u.data.viewOnlyUserTypeApp, { credential: r };
311
+ }).catch((u) => {
312
+ var l;
313
+ if (u.name === "identity-manager:not-authorized")
314
+ throw u;
315
+ const o = (l = u.details) == null ? void 0 : l.httpStatus;
316
+ if (o === 498)
317
+ throw r.destroy(), new U("identity-manager:not-authenticated", "User is not signed in.");
318
+ if (o === 400)
319
+ throw new U("identity-manager:invalid-request");
320
+ return { credential: r };
321
+ });
322
+ }).then((r) => ({ credential: r.credential, viewOnly: i }));
323
+ }
324
+ setOAuthResponseHash(e) {
325
+ e && (e.charAt(0) === "#" && (e = e.substring(1)), this._processOAuthPopupParams(V(e)));
326
+ }
327
+ setOAuthRedirectionHandler(e) {
328
+ this._oAuthRedirectFunc = e;
329
+ }
330
+ setProtocolErrorHandler(e) {
331
+ this._protocolFunc = e;
332
+ }
333
+ signIn(e, t, s = {}) {
334
+ const i = N(), r = () => {
335
+ var l;
336
+ u == null || u.remove(), o == null || o.remove(), (l = this.dialog) == null || l.destroy(), this.dialog = u = o = null;
337
+ }, n = () => {
338
+ r(), this._oAuthDfd = null, i.reject(new U("identity-manager:user-aborted", "ABORTED"));
339
+ };
340
+ s.signal && j(s.signal, () => {
341
+ n();
342
+ });
343
+ const h = new ie({ open: !0, resource: this.getResourceName(e), server: t.server });
344
+ this.dialog = h, this.emit("dialog-create");
345
+ let u = h.on("cancel", n), o = h.on("submit", (l) => {
346
+ this.generateToken(t, l, { isAdmin: s.isAdmin, signal: s.signal }).then((d) => {
347
+ r();
348
+ const a = new S({ userId: l.username, server: t.server, token: d.token, expires: d.expires != null ? Number(d.expires) : null, ssl: !!d.ssl, isAdmin: s.isAdmin, validity: d.validity });
349
+ i.resolve(a);
350
+ }).catch((d) => {
351
+ h.error = d, h.signingIn = !1;
352
+ });
353
+ });
354
+ return i.promise;
355
+ }
356
+ oAuthSignIn(e, t, s, i) {
357
+ this._oAuthDfd = N();
358
+ const r = this._oAuthDfd;
359
+ let n;
360
+ i != null && i.signal && j(i.signal, () => {
361
+ const a = this._oAuthDfd && this._oAuthDfd.oAuthWin_;
362
+ a && !a.closed ? a.close() : this.dialog && l();
363
+ }), r.resUrl_ = e, r.sinfo_ = t, r.oinfo_ = s;
364
+ const h = s._oAuthCred;
365
+ if (h.storage && (s.flowType === "authorization-code" || s.flowType === "auto" && t.currentVersion >= 8.4)) {
366
+ let a = crypto.getRandomValues(new Uint8Array(32));
367
+ n = J(a), h.codeVerifier = n, a = crypto.getRandomValues(new Uint8Array(32)), h.stateUID = J(a), h.save() || (h.codeVerifier = n = null);
368
+ } else
369
+ h.codeVerifier = null;
370
+ let u, o;
371
+ this._getCodeChallenge(n).then((a) => {
372
+ const _ = !i || i.oAuthPopupConfirmation !== !1;
373
+ if (!s.popup || !_)
374
+ return void this._doOAuthSignIn(e, t, s, a);
375
+ const I = new ie({ oAuthPrompt: !0, server: t.server, open: !0 });
376
+ this.dialog = I, this.emit("dialog-create"), u = I.on("cancel", l), o = I.on("submit", () => {
377
+ d(), this._doOAuthSignIn(e, t, s, a);
378
+ });
379
+ });
380
+ const l = () => {
381
+ d(), this._oAuthDfd = null, r.reject(new U("identity-manager:user-aborted", "ABORTED"));
382
+ }, d = () => {
383
+ var a;
384
+ u == null || u.remove(), o == null || o.remove(), (a = this.dialog) == null || a.destroy(), this.dialog = null;
385
+ };
386
+ return r.promise;
387
+ }
388
+ destroyCredentials() {
389
+ this.credentials && this.credentials.slice().forEach((e) => {
390
+ e.destroy();
391
+ }), this.emit("credentials-destroy");
392
+ }
393
+ enablePostMessageAuth(e = "https://www.arcgis.com/sharing/rest") {
394
+ this._postMessageAuthHandle && this._postMessageAuthHandle.remove(), this._postMessageAuthHandle = H(window, "message", (t) => {
395
+ var s;
396
+ if ((t.origin === this._appOrigin || t.origin.endsWith(".arcgis.com")) && ((s = t.data) == null ? void 0 : s.type) === "arcgis:auth:requestCredential") {
397
+ const i = t.source;
398
+ this.getCredential(e).then((r) => {
399
+ i.postMessage({ type: "arcgis:auth:credential", credential: { expires: r.expires, server: r.server, ssl: r.ssl, token: r.token, userId: r.userId } }, t.origin);
400
+ }).catch((r) => {
401
+ i.postMessage({ type: "arcgis:auth:error", error: { name: r.name, message: r.message } }, t.origin);
402
+ });
403
+ }
404
+ });
405
+ }
406
+ disablePostMessageAuth() {
407
+ this._postMessageAuthHandle && (this._postMessageAuthHandle.remove(), this._postMessageAuthHandle = null);
408
+ }
409
+ _getOAuthLocationParams() {
410
+ var s, i;
411
+ let e = window.location.hash;
412
+ if (e) {
413
+ e.charAt(0) === "#" && (e = e.substring(1));
414
+ const r = V(e);
415
+ let n = !1;
416
+ if (r.access_token && r.expires_in && r.state && r.hasOwnProperty("username"))
417
+ try {
418
+ r.state = JSON.parse(r.state), r.state.portalUrl && (this._oAuthLocationParams = r, n = !0);
419
+ } catch {
420
+ }
421
+ else if (r.error && r.error_description && (console.log("IdentityManager OAuth Error: ", r.error, " - ", r.error_description), r.error === "access_denied" && (n = !0, r.state)))
422
+ try {
423
+ r.state = JSON.parse(r.state);
424
+ } catch {
425
+ }
426
+ n && (window.location.hash = ((s = r.state) == null ? void 0 : s.hash) || "");
427
+ }
428
+ let t = window.location.search;
429
+ if (t) {
430
+ t.charAt(0) === "?" && (t = t.substring(1));
431
+ const r = V(t);
432
+ let n = !1;
433
+ if (r.code && r.state)
434
+ try {
435
+ r.state = JSON.parse(r.state), r.state.portalUrl && r.state.uid && (this._oAuthLocationParams = r, n = !0);
436
+ } catch {
437
+ }
438
+ else if (r.error && r.error_description && (console.log("IdentityManager OAuth Error: ", r.error, " - ", r.error_description), r.error === "access_denied" && (n = !0, r.state)))
439
+ try {
440
+ r.state = JSON.parse(r.state);
441
+ } catch {
442
+ }
443
+ if (n) {
444
+ const h = { ...r };
445
+ ["code", "error", "error_description", "message_code", "persist", "state"].forEach((l) => {
446
+ delete h[l];
447
+ });
448
+ const u = se(h), o = window.location.pathname + (u ? `?${u}` : "") + (((i = r.state) == null ? void 0 : i.hash) || "");
449
+ window.history.replaceState(window.history.state, "", o);
450
+ }
451
+ }
452
+ }
453
+ _getOAuthToken(e, t, s, i, r) {
454
+ return e = e.replace(/^http:/i, "https:"), R(`${e}/sharing/rest/oauth2/token`, { authMode: "anonymous", method: "post", query: i && r ? { grant_type: "authorization_code", code: t, redirect_uri: i, client_id: s, code_verifier: r } : { grant_type: "refresh_token", refresh_token: t, client_id: s } }).then((n) => n.data);
455
+ }
456
+ _getCodeChallenge(e) {
457
+ if (e && globalThis.isSecureContext) {
458
+ const t = new TextEncoder().encode(e);
459
+ return crypto.subtle.digest("SHA-256", t).then((s) => J(new Uint8Array(s)));
460
+ }
461
+ return Promise.resolve(null);
462
+ }
463
+ _pageShowHandler(e) {
464
+ if (e.persisted && this.isBusy() && this._rejectOnPersistedPageShow) {
465
+ const t = new U("identity-manager:user-aborted", "ABORTED");
466
+ this._errbackFunc(t);
467
+ }
468
+ }
469
+ _findCredential(e, t) {
470
+ let s, i, r, n, h = -1;
471
+ const u = t == null ? void 0 : t.token, o = t == null ? void 0 : t.resource, l = this._isServerRsrc(e) ? "server" : "portal", d = this.credentials.filter((a) => this._hasSameServerInstance(a.server, e) && a.scope === l);
472
+ if (e = o || e, d.length)
473
+ if (d.length === 1) {
474
+ if (s = d[0], r = this.findServerInfo(s.server), i = r == null ? void 0 : r.owningSystemUrl, n = i ? this.findCredential(i, s.userId) : void 0, h = this._getIdenticalSvcIdx(e, s), !u)
475
+ return h === -1 && s.resources.push(e), this._addResource(e, n), s;
476
+ h !== -1 && (s.resources.splice(h, 1), this._removeResource(e, n));
477
+ } else {
478
+ let a, _;
479
+ if (d.some((I) => (_ = this._getIdenticalSvcIdx(e, I), _ !== -1 && (a = I, r = this.findServerInfo(a.server), i = r == null ? void 0 : r.owningSystemUrl, n = i ? this.findCredential(i, a.userId) : void 0, h = _, !0))), u)
480
+ a && (a.resources.splice(h, 1), this._removeResource(e, n));
481
+ else if (a)
482
+ return this._addResource(e, n), a;
483
+ }
484
+ }
485
+ _findOAuthInfo(e) {
486
+ let t = this.findOAuthInfo(e);
487
+ if (!t) {
488
+ for (const s of this.oAuthInfos)
489
+ if (this._isIdProvider(s.portalUrl, e)) {
490
+ t = s;
491
+ break;
492
+ }
493
+ }
494
+ return t;
495
+ }
496
+ _addResource(e, t) {
497
+ t && this._getIdenticalSvcIdx(e, t) === -1 && t.resources.push(e);
498
+ }
499
+ _removeResource(e, t) {
500
+ let s = -1;
501
+ t && (s = this._getIdenticalSvcIdx(e, t), s > -1 && t.resources.splice(s, 1));
502
+ }
503
+ _useProxy(e, t) {
504
+ return (t == null ? void 0 : t.isAdmin) && !C(e.adminTokenServiceUrl, this._appOrigin) || !this._isPortalDomain(e.tokenServiceUrl) && String(e.currentVersion) === "10.1" && !C(e.tokenServiceUrl, this._appOrigin);
505
+ }
506
+ _getOrigin(e) {
507
+ const t = new D(e);
508
+ return t.scheme + "://" + t.host + (t.port != null ? ":" + t.port : "");
509
+ }
510
+ _getServerInstanceRoot(e) {
511
+ const t = e.toLowerCase();
512
+ let s = t.indexOf(this._agsRest);
513
+ return s === -1 && this._isAdminResource(e) && (s = this._agsAdmin.test(e) ? e.replace(this._agsAdmin, "$1").length : e.search(this._adminSvcs)), s !== -1 || me(t) || (s = t.indexOf("/sharing")), s === -1 && t.substr(-1) === "/" && (s = t.length - 1), s > -1 ? e.substring(0, s) : e;
514
+ }
515
+ _hasSameServerInstance(e, t) {
516
+ return e.substr(-1) === "/" && (e = e.slice(0, -1)), e = e.toLowerCase(), t = this._getServerInstanceRoot(t).toLowerCase(), e = this._normalizeAGOLorgDomain(e), t = this._normalizeAGOLorgDomain(t), (e = e.substr(e.indexOf(":"))) === (t = t.substr(t.indexOf(":")));
517
+ }
518
+ _normalizeAGOLorgDomain(e) {
519
+ const t = /^https?:\/\/(?:cdn|[a-z\d-]+\.maps)\.arcgis\.com/i, s = /^https?:\/\/(?:cdndev|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i, i = /^https?:\/\/(?:cdnqa|[a-z\d-]+\.mapsqa)\.arcgis\.com/i;
520
+ return t.test(e) ? e = e.replace(t, "https://www.arcgis.com") : s.test(e) ? e = e.replace(s, "https://devext.arcgis.com") : i.test(e) && (e = e.replace(i, "https://qaext.arcgis.com")), e;
521
+ }
522
+ _sanitizeUrl(e) {
523
+ const t = (W.request.proxyUrl || "").toLowerCase(), s = t ? e.toLowerCase().indexOf(t + "?") : -1;
524
+ return s !== -1 && (e = e.substring(s + t.length + 1)), e = ve(e), F(e).path;
525
+ }
526
+ _isRESTService(e) {
527
+ return e.includes(this._agsRest);
528
+ }
529
+ _isAdminResource(e) {
530
+ return this._agsAdmin.test(e) || this._adminSvcs.test(e);
531
+ }
532
+ _isServerRsrc(e) {
533
+ return this._isRESTService(e) || this._isAdminResource(e);
534
+ }
535
+ _isIdenticalService(e, t) {
536
+ let s = !1;
537
+ if (this._isRESTService(e) && this._isRESTService(t)) {
538
+ const i = this._getSuffix(e).toLowerCase(), r = this._getSuffix(t).toLowerCase();
539
+ if (s = i === r, !s) {
540
+ const n = /(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;
541
+ s = i.replaceAll(n, "$1") === r.replaceAll(n, "$1");
542
+ }
543
+ } else
544
+ this._isAdminResource(e) && this._isAdminResource(t) ? s = !0 : this._isServerRsrc(e) || this._isServerRsrc(t) || !this._isPortalDomain(e) || (s = !0);
545
+ return s;
546
+ }
547
+ _isPortalDomain(e) {
548
+ const t = new D(e.toLowerCase()), s = this._portalConfig;
549
+ let i = this._gwDomains.some((r) => r.regex.test(t.uri));
550
+ return !i && s && (i = this._hasSameServerInstance(this._getServerInstanceRoot(s.restBaseUrl), t.uri)), i || W.portalUrl && (i = C(t, W.portalUrl, !0)), i || (i = this._portals.some((r) => this._hasSameServerInstance(r, t.uri))), i = i || this._agsPortal.test(t.path), i;
551
+ }
552
+ _isIdProvider(e, t) {
553
+ let s = -1, i = -1;
554
+ this._gwDomains.forEach((n, h) => {
555
+ s === -1 && n.regex.test(e) && (s = h), i === -1 && n.regex.test(t) && (i = h);
556
+ });
557
+ let r = !1;
558
+ if (s > -1 && i > -1 && (s === 0 || s === 4 ? i !== 0 && i !== 4 || (r = !0) : s === 1 ? i !== 1 && i !== 2 || (r = !0) : s === 2 ? i === 2 && (r = !0) : s === 3 && i === 3 && (r = !0)), !r) {
559
+ const n = this.findServerInfo(t), h = n == null ? void 0 : n.owningSystemUrl;
560
+ h && le(n) && this._isPortalDomain(h) && this._isIdProvider(e, h) && (r = !0);
561
+ }
562
+ return r;
563
+ }
564
+ _getIdenticalSvcIdx(e, t) {
565
+ let s = -1;
566
+ for (let i = 0; i < t.resources.length; i++) {
567
+ const r = t.resources[i];
568
+ if (this._isIdenticalService(e, r)) {
569
+ s = i;
570
+ break;
571
+ }
572
+ }
573
+ return s;
574
+ }
575
+ _getSuffix(e) {
576
+ return e.replace(this._regexSDirUrl, "").replace(this._regexServerType, "$1");
577
+ }
578
+ _getTokenSvcUrl(e) {
579
+ let t, s, i;
580
+ if (this._isRESTService(e) || this._isAdminResource(e)) {
581
+ const r = this._getServerInstanceRoot(e);
582
+ return t = r + "/admin/generateToken", s = R(e = r + "/rest/info", { query: { f: "json" } }).then((n) => n.data), { adminUrl: t, promise: s };
583
+ }
584
+ if (this._isPortalDomain(e)) {
585
+ let r = "";
586
+ if (this._gwDomains.some((n) => (n.regex.test(e) && (r = n.tokenServiceUrl), !!r)), r || this._portals.some((n) => (this._hasSameServerInstance(n, e) && (r = n + this._gwTokenUrl), !!r)), r || (i = e.toLowerCase().indexOf("/sharing"), i !== -1 && (r = e.substring(0, i) + this._gwTokenUrl)), r || (r = this._getOrigin(e) + this._gwTokenUrl), r) {
587
+ const n = new D(e).port;
588
+ /^http:\/\//i.test(e) && n === "7080" && (r = r.replace(/:7080/i, ":7443")), r = r.replace(/http:/i, "https:");
589
+ }
590
+ return r;
591
+ }
592
+ if (e.toLowerCase().includes("premium.arcgisonline.com"))
593
+ return "https://premium.arcgisonline.com/server/tokens";
594
+ }
595
+ _processOAuthResponseParams(e, t, s) {
596
+ const i = t._oAuthCred;
597
+ if (e.code) {
598
+ const n = i.codeVerifier;
599
+ return i.codeVerifier = null, i.stateUID = null, i.save(), this._getOAuthToken(s.server, e.code, t.appId, this._getRedirectURI(t, !0), n).then((h) => {
600
+ const u = new S({ userId: h.username, server: s.server, token: h.access_token, expires: Date.now() + 1e3 * h.expires_in, ssl: h.ssl, oAuthState: e.state, _oAuthCred: i });
601
+ return t.userId = u.userId, i.storage = h.persist ? M : z, i.refreshToken = h.refresh_token, i.token = null, i.expires = h.refresh_token_expires_in ? Date.now() + 1e3 * h.refresh_token_expires_in : null, i.userId = u.userId, i.ssl = u.ssl, i.save(), u;
602
+ });
603
+ }
604
+ const r = new S({ userId: e.username, server: s.server, token: e.access_token, expires: Date.now() + 1e3 * Number(e.expires_in), ssl: e.ssl === "true", oAuthState: e.state, _oAuthCred: i });
605
+ return t.userId = r.userId, i.storage = e.persist ? M : z, i.refreshToken = null, i.token = r.token, i.expires = r.expires, i.userId = r.userId, i.ssl = r.ssl, i.save(), Promise.resolve(r);
606
+ }
607
+ _processOAuthPopupParams(e) {
608
+ var s;
609
+ const t = this._oAuthDfd;
610
+ if (this._oAuthDfd = null, t)
611
+ if (clearInterval(this._oAuthIntervalId), (s = this._oAuthOnPopupHandle) == null || s.remove(), e.error) {
612
+ const i = e.error === "access_denied", r = new U(i ? "identity-manager:user-aborted" : "identity-manager:authentication-failed", i ? "ABORTED" : "OAuth: " + e.error + " - " + e.error_description);
613
+ t.reject(r);
614
+ } else
615
+ this._processOAuthResponseParams(e, t.oinfo_, t.sinfo_).then((i) => {
616
+ t.resolve(i);
617
+ }).catch((i) => {
618
+ t.reject(i);
619
+ });
620
+ }
621
+ _setOAuthResponseQueryString(e) {
622
+ e && (e.charAt(0) === "?" && (e = e.substring(1)), this._processOAuthPopupParams(V(e)));
623
+ }
624
+ _exchangeToken(e, t, s) {
625
+ return R(`${e}/sharing/rest/oauth2/exchangeToken`, { authMode: "anonymous", method: "post", query: { f: "json", client_id: t, token: s } }).then((i) => i.data.token);
626
+ }
627
+ _getPlatformSelf(e, t) {
628
+ return e = e.replace(/^http:/i, "https:"), R(`${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 }).then((s) => s.data);
629
+ }
630
+ _getPortalSelf(e, t) {
631
+ let s;
632
+ return this._gwDomains.some((i) => (i.regex.test(e) && (s = i.customBaseUrl), !!s)), s ? Promise.resolve({ allSSL: !0, currentVersion: "8.4", customBaseUrl: s, 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")), R(e, { query: { f: "json" }, authMode: "anonymous", withCredentials: !0 }).then((i) => i.data));
633
+ }
634
+ _doPortalSignIn(e) {
635
+ const t = this._portalConfig, s = window.location.href, i = this.findServerInfo(e);
636
+ return !(!t && !this._isPortalDomain(s) || !(i ? i.hasPortal || i.owningSystemUrl && this._isPortalDomain(i.owningSystemUrl) : this._isPortalDomain(e)) || !(this._isIdProvider(s, e) || t && (this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl), e) || this._isIdProvider(t.restBaseUrl, e)) || C(s, e, !0)));
637
+ }
638
+ _checkProtocol(e, t, s, i) {
639
+ let r = !0;
640
+ const n = i ? t.adminTokenServiceUrl : t.tokenServiceUrl;
641
+ return n.trim().toLowerCase().startsWith("https:") && !this._appOrigin.startsWith("https:") && we(n) && (r = !!this._protocolFunc && !!this._protocolFunc({ resourceUrl: e, serverInfo: t }), !r) && s(new U("identity-manager:aborted", "Aborted the Sign-In process to avoid sending password over insecure connection.")), r;
642
+ }
643
+ _enqueue(e, t, s, i, r, n) {
644
+ return i || (i = N()), i.resUrl_ = e, i.sinfo_ = t, i.options_ = s, i.admin_ = r, i.refresh_ = n, this._busy ? this._hasSameServerInstance(this._getServerInstanceRoot(e), this._busy.resUrl_) ? (this._oAuthDfd && this._oAuthDfd.oAuthWin_ && this._oAuthDfd.oAuthWin_.focus(), this._soReqs.push(i)) : this._xoReqs.push(i) : this._doSignIn(i), i.promise;
645
+ }
646
+ _doSignIn(e) {
647
+ this._busy = e, this._rejectOnPersistedPageShow = !1;
648
+ const t = (o) => {
649
+ var w;
650
+ const l = (w = e.options_) == null ? void 0 : w.resource, d = e.resUrl_, a = e.refresh_;
651
+ let _ = !1;
652
+ this.credentials.includes(o) || (a && this.credentials.includes(a) ? (a.userId = o.userId, a.token = o.token, a.expires = o.expires, a.validity = o.validity, a.ssl = o.ssl, a.creationTime = o.creationTime, _ = !0, o = a) : this.credentials.push(o)), o.resources || (o.resources = []), o.resources.includes(l || d) || o.resources.push(l || d), o.scope = this._isServerRsrc(d) ? "server" : "portal", o.emitTokenChange();
653
+ const I = this._soReqs, g = {};
654
+ this._soReqs = [], I.forEach((m) => {
655
+ if (!this._isIdenticalService(d, m.resUrl_)) {
656
+ const b = this._getSuffix(m.resUrl_);
657
+ g[b] || (g[b] = !0, o.resources.push(m.resUrl_));
658
+ }
659
+ }), e.resolve(o), I.forEach((m) => {
660
+ this._hasSameServerInstance(this._getServerInstanceRoot(d), m.resUrl_) ? m.resolve(o) : this._soReqs.push(m);
661
+ }), this._busy = e.resUrl_ = e.sinfo_ = e.refresh_ = null, _ || this.emit("credential-create", { credential: o }), this._soReqs.length ? this._doSignIn(this._soReqs.shift()) : this._xoReqs.length && this._doSignIn(this._xoReqs.shift());
662
+ }, s = (o) => {
663
+ e.reject(o), 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());
664
+ }, i = (o, l, d, a) => {
665
+ var b, q, ee;
666
+ const _ = e.sinfo_, I = !e.options_ || e.options_.prompt !== !1, g = _.hasPortal && this._findOAuthInfo(e.resUrl_);
667
+ let w, m;
668
+ if (o)
669
+ t(new S({ userId: o, server: _.server, token: d || null, expires: a != null ? Number(a) : null, ssl: !!l }));
670
+ else if (window !== window.parent && ((b = this._appUrlObj.query) != null && b["arcgis-auth-origin"]) && ((q = this._appUrlObj.query) != null && q["arcgis-auth-portal"]) && this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]), e.resUrl_)) {
671
+ window.parent.postMessage({ type: "arcgis:auth:requestCredential" }, this._appUrlObj.query["arcgis-auth-origin"]);
672
+ const v = H(window, "message", (y) => {
673
+ y.source === window.parent && y.data && (y.data.type === "arcgis:auth:credential" ? (v.remove(), y.data.credential.expires < Date.now() ? s(new U("identity-manager:credential-request-failed", "Parent application's token has expired.")) : t(new S(y.data.credential))) : y.data.type === "arcgis:auth:error" && (v.remove(), y.data.error.name === "tokenExpiredError" ? s(new U("identity-manager:credential-request-failed", "Parent application's token has expired.")) : s(U.fromJSON(y.data.error))));
674
+ });
675
+ j((ee = e.options_) == null ? void 0 : ee.signal, () => {
676
+ v.remove();
677
+ });
678
+ } else if (g) {
679
+ let v = g._oAuthCred;
680
+ if (!v) {
681
+ const y = new Y(g, M), k = new Y(g, z);
682
+ y.isValid() && k.isValid() ? y.expires > k.expires ? (v = y, k.destroy()) : (v = k, y.destroy()) : v = y.isValid() ? y : k, g._oAuthCred = v;
683
+ }
684
+ if (v.isValid()) {
685
+ w = new S({ userId: v.userId, server: _.server, token: v.token, expires: v.expires, ssl: v.ssl, _oAuthCred: v });
686
+ const y = g.appId !== v.appId && this._doPortalSignIn(e.resUrl_);
687
+ y || v.refreshToken ? (e._pendingDfd = v.refreshToken ? this._getOAuthToken(_.server, v.refreshToken, v.appId).then((k) => (w.expires = Date.now() + 1e3 * k.expires_in, w.token = k.access_token, w)) : Promise.resolve(w), e._pendingDfd.then((k) => y ? this._exchangeToken(k.server, g.appId, k.token).then((ue) => (k.token = ue, k)).catch(() => k) : k).then((k) => {
688
+ t(k);
689
+ }).catch(() => {
690
+ v == null || v.destroy(), i();
691
+ })) : t(w);
692
+ } else if (this._oAuthLocationParams && this._hasSameServerInstance(g.portalUrl, this._oAuthLocationParams.state.portalUrl) && (this._oAuthLocationParams.access_token || this._oAuthLocationParams.code && this._oAuthLocationParams.state.uid === v.stateUID && v.codeVerifier)) {
693
+ const y = this._oAuthLocationParams;
694
+ this._oAuthLocationParams = null, e._pendingDfd = this._processOAuthResponseParams(y, g, _).then((k) => {
695
+ t(k);
696
+ }).catch(s);
697
+ } else {
698
+ const y = () => {
699
+ I ? e._pendingDfd = this.oAuthSignIn(e.resUrl_, _, g, e.options_).then(t, s) : (m = new U("identity-manager:not-authenticated", "User is not signed in."), s(m));
700
+ };
701
+ this._doPortalSignIn(e.resUrl_) ? e._pendingDfd = this._getPlatformSelf(_.server, g.appId).then((k) => {
702
+ C(k.portalUrl, this._appOrigin, !0) ? (w = new S({ userId: k.username, server: _.server, expires: Date.now() + 1e3 * k.expires_in, token: k.token }), t(w)) : y();
703
+ }).catch(y) : y();
704
+ }
705
+ } else if (I) {
706
+ if (this._checkProtocol(e.resUrl_, _, s, e.admin_)) {
707
+ let v = e.options_;
708
+ e.admin_ && (v = v || {}, v.isAdmin = !0), e._pendingDfd = this.signIn(e.resUrl_, _, v).then(t, s);
709
+ }
710
+ } else
711
+ m = new U("identity-manager:not-authenticated", "User is not signed in."), s(m);
712
+ }, r = () => {
713
+ const o = e.sinfo_, l = o.owningSystemUrl, d = e.options_;
714
+ let a, _, I, g;
715
+ if (d && (a = d.token, _ = d.error, I = d.prompt), g = this._findCredential(l, { token: a, resource: e.resUrl_ }), !g) {
716
+ for (const w of this.credentials)
717
+ if (this._isIdProvider(l, w.server)) {
718
+ g = w;
719
+ break;
720
+ }
721
+ }
722
+ if (g) {
723
+ const w = this.findCredential(e.resUrl_, g.userId);
724
+ if (w)
725
+ t(w);
726
+ else if ($(o, this._legacyFed)) {
727
+ const m = g.toJSON();
728
+ m.server = o.server, m.resources = null, t(new S(m));
729
+ } else
730
+ (e._pendingDfd = this.generateToken(this.findServerInfo(g.server), null, { serverUrl: e.resUrl_, token: g.token, signal: e.options_.signal, ssl: g.ssl })).then((m) => {
731
+ t(new S({ userId: g == null ? void 0 : g.userId, server: o.server, token: m.token, expires: m.expires != null ? Number(m.expires) : null, ssl: !!m.ssl, isAdmin: e.admin_, validity: m.validity }));
732
+ }, s);
733
+ } else
734
+ this._busy = null, a && (e.options_.token = null), (e._pendingDfd = this.getCredential(l.replace(/\/?$/, "/sharing"), { resource: e.resUrl_, owningTenant: o.owningTenant, signal: e.options_.signal, token: a, error: _, prompt: I })).then(() => {
735
+ this._enqueue(e.resUrl_, e.sinfo_, e.options_, e, e.admin_);
736
+ }, (w) => {
737
+ e.resUrl_ = e.sinfo_ = e.refresh_ = null, e.reject(w);
738
+ });
739
+ };
740
+ this._errbackFunc = s;
741
+ const n = e.sinfo_.owningSystemUrl, h = this._isServerRsrc(e.resUrl_), u = e.sinfo_._restInfoPms;
742
+ u ? u.promise.then((o) => {
743
+ const l = e.sinfo_;
744
+ if (l._restInfoPms) {
745
+ l.adminTokenServiceUrl = l._restInfoPms.adminUrl, l._restInfoPms = null, l.tokenServiceUrl = (L("authInfo.tokenServicesUrl", o) || L("authInfo.tokenServiceUrl", o) || L("tokenServiceUrl", o)) ?? null, l.shortLivedTokenValidity = L("authInfo.shortLivedTokenValidity", o) ?? null, l.currentVersion = o.currentVersion, l.owningTenant = o.owningTenant;
746
+ const d = l.owningSystemUrl = o.owningSystemUrl;
747
+ d && this._portals.push(d);
748
+ }
749
+ h && l.owningSystemUrl ? r() : i();
750
+ }, () => {
751
+ e.sinfo_._restInfoPms = null;
752
+ const o = new U("identity-manager:server-identification-failed", "Unknown resource - could not find token service endpoint.");
753
+ s(o);
754
+ }) : h && n ? r() : e.sinfo_._selfReq ? e.sinfo_._selfReq.selfDfd.then((o) => {
755
+ var g;
756
+ const l = {};
757
+ let d, a, _, I;
758
+ return o && (d = (g = o.user) == null ? void 0 : g.username, l.username = d, l.allSSL = o.allSSL, a = o.supportsOAuth, I = parseFloat(o.currentVersion), o.portalMode === "multitenant" && (_ = o.customBaseUrl), e.sinfo_.currentVersion = I), e.sinfo_.webTierAuth = !!d, d && this.normalizeWebTierAuth ? this.generateToken(e.sinfo_, null, { ssl: l.allSSL }).catch(() => null).then((w) => (l.portalToken = w && w.token, l.tokenExpiration = w && w.expires, l)) : !d && a && I >= 4.4 && !this._findOAuthInfo(e.resUrl_) ? this._generateOAuthInfo({ portalUrl: e.sinfo_.server, customBaseUrl: _, owningTenant: e.sinfo_._selfReq.owningTenant }).catch(() => null).then(() => l) : l;
759
+ }).catch(() => null).then((o) => {
760
+ e.sinfo_._selfReq = null, o ? i(o.username, o.allSSL, o.portalToken, o.tokenExpiration) : i();
761
+ }) : i();
762
+ }
763
+ _generateOAuthInfo(e) {
764
+ let t, s = null, i = e.portalUrl;
765
+ const r = e.customBaseUrl, n = e.owningTenant, h = !this._defaultOAuthInfo && this._createDefaultOAuthInfo && !this._hasTestedIfAppIsOnPortal;
766
+ if (h) {
767
+ s = window.location.href;
768
+ let u = s.indexOf("?");
769
+ u > -1 && (s = s.slice(0, u)), u = s.search(/\/(apps|home)\//), s = u > -1 ? s.slice(0, u) : null;
770
+ }
771
+ return h && s ? (this._hasTestedIfAppIsOnPortal = !0, t = R(s + "/sharing/rest", { query: { f: "json" } }).then(() => {
772
+ this._defaultOAuthInfo = new ne({ appId: "arcgisonline", popupCallbackUrl: s + "/home/oauth-callback.html" });
773
+ })) : t = Promise.resolve(), t.then(() => {
774
+ if (this._defaultOAuthInfo)
775
+ return i = i.replace(/^http:/i, "https:"), R(i + "/sharing/rest/oauth2/validateRedirectUri", { query: { accountId: n, client_id: this._defaultOAuthInfo.appId, redirect_uri: re(this._defaultOAuthInfo.popupCallbackUrl), f: "json" } }).then((u) => {
776
+ if (u.data.valid) {
777
+ const o = this._defaultOAuthInfo.clone();
778
+ u.data.urlKey && r ? o.portalUrl = "https://" + u.data.urlKey.toLowerCase() + "." + r : o.portalUrl = i, o.popup = window !== window.top || !(C(i, this._appOrigin) || this._gwDomains.some((l) => l.regex.test(i) && l.regex.test(this._appOrigin))), this.oAuthInfos.push(o);
779
+ }
780
+ });
781
+ });
782
+ }
783
+ _doOAuthSignIn(e, t, s, i) {
784
+ const r = s._oAuthCred, n = { portalUrl: s.portalUrl };
785
+ !s.popup && s.preserveUrlHash && window.location.hash && (n.hash = window.location.hash), r.stateUID && (n.uid = r.stateUID);
786
+ const h = { client_id: s.appId, response_type: r.codeVerifier ? "code" : "token", state: JSON.stringify(n), expiration: s.expiration, locale: s.locale, redirect_uri: this._getRedirectURI(s, !!r.codeVerifier) };
787
+ s.forceLogin && (h.force_login = !0), s.forceUserId && s.userId && (h.prepopulatedusername = s.userId), !s.popup && this._doPortalSignIn(e) && (h.redirectToUserOrgUrl = !0), r.codeVerifier && (h.code_challenge = i || r.codeVerifier, h.code_challenge_method = i ? "S256" : "plain");
788
+ const u = s.portalUrl.replace(/^http:/i, "https:") + "/sharing/oauth2/authorize", o = u + "?" + se(h);
789
+ if (s.popup) {
790
+ const l = window.open(o, "esriJSAPIOAuth", s.popupWindowFeatures);
791
+ if (l)
792
+ l.focus(), this._oAuthDfd.oAuthWin_ = l, this._oAuthIntervalId = setInterval(() => {
793
+ if (l.closed) {
794
+ clearInterval(this._oAuthIntervalId), this._oAuthOnPopupHandle.remove();
795
+ const d = this._oAuthDfd;
796
+ if (d) {
797
+ const a = new U("identity-manager:user-aborted", "ABORTED");
798
+ d.reject(a);
799
+ }
800
+ }
801
+ }, 500), this._oAuthOnPopupHandle = H(window, ["arcgis:auth:hash", "arcgis:auth:location:search"], (d) => {
802
+ d.type === "arcgis:auth:hash" ? this.setOAuthResponseHash(d.detail) : this._setOAuthResponseQueryString(d.detail);
803
+ });
804
+ else {
805
+ const d = new U("identity-manager:popup-blocked", "ABORTED");
806
+ this._oAuthDfd.reject(d);
807
+ }
808
+ } else
809
+ this._rejectOnPersistedPageShow = !0, this._oAuthRedirectFunc ? this._oAuthRedirectFunc({ authorizeParams: h, authorizeUrl: u, resourceUrl: e, serverInfo: t, oAuthInfo: s }) : window.location.href = o;
810
+ }
811
+ _getRedirectURI(e, t) {
812
+ const s = window.location.href.replace(/#.*$/, "");
813
+ if (e.popup)
814
+ return re(e.popupCallbackUrl);
815
+ if (t) {
816
+ const i = F(s);
817
+ return i.query && ["code", "error", "error_description", "message_code", "persist", "state"].forEach((r) => {
818
+ delete i.query[r];
819
+ }), Ie(i.path, i.query);
820
+ }
821
+ return s;
822
+ }
823
+ }
824
+ ce.prototype.declaredClass = "esri.identity.IdentityManagerBase";
825
+ let S = class extends ae.EventedAccessor {
826
+ constructor(c) {
827
+ super(c), this._oAuthCred = null, this.tokenRefreshBuffer = 2, c != null && c._oAuthCred && (this._oAuthCred = c._oAuthCred);
828
+ }
829
+ initialize() {
830
+ this.resources = this.resources || [], this.creationTime == null && (this.creationTime = Date.now());
831
+ }
832
+ refreshToken() {
833
+ const c = A.findServerInfo(this.server), e = c == null ? void 0 : c.owningSystemUrl, t = !!e && this.scope === "server", s = t && $(c, A._legacyFed), i = c.webTierAuth, r = i && A.normalizeWebTierAuth, n = E[this.server], h = n == null ? void 0 : n[this.userId];
834
+ let u, o = this.resources && this.resources[0], l = t ? A.findServerInfo(e) : null, d = { username: this.userId, password: h };
835
+ if (i && !r)
836
+ return;
837
+ t && !l && A.serverInfos.some((_) => (A._isIdProvider(e, _.server) && (l = _), !!l));
838
+ const a = l ? A.findCredential(l.server, this.userId) : null;
839
+ if (!t || a) {
840
+ if (!s) {
841
+ if (t)
842
+ u = { serverUrl: o, token: a == null ? void 0 : a.token, ssl: a && a.ssl };
843
+ else if (r)
844
+ d = null, u = { ssl: this.ssl };
845
+ else {
846
+ if (!h) {
847
+ let _;
848
+ return o && (o = A._sanitizeUrl(o), this._enqueued = 1, _ = A._enqueue(o, c, null, null, this.isAdmin, this), _.then(() => {
849
+ this._enqueued = 0, this.refreshServerTokens();
850
+ }).catch(() => {
851
+ this._enqueued = 0;
852
+ })), _;
853
+ }
854
+ this.isAdmin && (u = { isAdmin: !0 });
855
+ }
856
+ return A.generateToken(t ? l : c, t ? null : d, u).then((_) => {
857
+ this.token = _.token, this.expires = _.expires != null ? Number(_.expires) : null, this.creationTime = Date.now(), this.validity = _.validity, this.emitTokenChange(), this.refreshServerTokens();
858
+ }).catch(() => {
859
+ });
860
+ }
861
+ a == null || a.refreshToken();
862
+ }
863
+ }
864
+ refreshServerTokens() {
865
+ this.scope === "portal" && A.credentials.forEach((c) => {
866
+ const e = A.findServerInfo(c.server), t = e == null ? void 0 : e.owningSystemUrl;
867
+ c !== this && c.userId === this.userId && t && c.scope === "server" && (A._hasSameServerInstance(this.server, t) || A._isIdProvider(t, this.server)) && ($(e, A._legacyFed) ? (c.token = this.token, c.expires = this.expires, c.creationTime = this.creationTime, c.validity = this.validity, c.emitTokenChange()) : c.refreshToken());
868
+ });
869
+ }
870
+ emitTokenChange(c) {
871
+ clearTimeout(this._refreshTimer);
872
+ const e = this.server ? A.findServerInfo(this.server) : null, t = e == null ? void 0 : e.owningSystemUrl, s = t ? A.findServerInfo(t) : null;
873
+ c === !1 || t && this.scope !== "portal" && (!(s != null && s.webTierAuth) || A.normalizeWebTierAuth) || this.expires == null && this.validity == null || this._startRefreshTimer(), this.emit("token-change");
874
+ }
875
+ destroy() {
876
+ this.userId = this.server = this.token = this.expires = this.validity = this.resources = this.creationTime = null, this._oAuthCred && (this._oAuthCred.destroy(), this._oAuthCred = null);
877
+ const c = A.credentials.indexOf(this);
878
+ c > -1 && A.credentials.splice(c, 1), this.emitTokenChange(), this.emit("destroy");
879
+ }
880
+ toJSON() {
881
+ const c = he({ 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 }), e = this.resources;
882
+ return e && e.length > 0 && (c.resources = e.slice()), c;
883
+ }
884
+ _startRefreshTimer() {
885
+ clearTimeout(this._refreshTimer);
886
+ const c = 6e4 * this.tokenRefreshBuffer, e = 2 ** 31 - 1;
887
+ let t = (this.validity ? this.creationTime + 6e4 * this.validity : this.expires) - Date.now();
888
+ t < 0 ? t = 0 : t > e && (t = e), this._refreshTimer = setTimeout(this.refreshToken.bind(this), t > c ? t - c : t);
889
+ }
890
+ };
891
+ p([f()], S.prototype, "creationTime", void 0), p([f()], S.prototype, "expires", void 0), p([f()], S.prototype, "isAdmin", void 0), p([f()], S.prototype, "oAuthState", void 0), p([f()], S.prototype, "resources", void 0), p([f()], S.prototype, "scope", void 0), p([f()], S.prototype, "server", void 0), p([f()], S.prototype, "ssl", void 0), p([f()], S.prototype, "token", void 0), p([f()], S.prototype, "tokenRefreshBuffer", void 0), p([f()], S.prototype, "userId", void 0), p([f()], S.prototype, "validity", void 0), S = p([B("esri.identity.Credential")], S);
892
+ class de extends ce {
893
+ }
894
+ de.prototype.declaredClass = "esri.identity.IdentityManager";
895
+ const Ae = new de();
896
+ Se(Ae);
897
+ export {
898
+ Ae as default
899
+ };