@agrotools1/at-components 0.2.3 → 0.2.4

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 (894) hide show
  1. package/dist/AGraphicContainer-75e55bb8.js +109 -0
  2. package/dist/APIKeyMixin-688c6ac6.js +19 -0
  3. package/dist/Analysis-53f71911.js +31 -0
  4. package/dist/ArcGISCachedService-ea7559f0.js +47 -0
  5. package/dist/ArcGISService-a447176d.js +25 -0
  6. package/dist/AreaMeasurement2D-4d0db109.js +405 -0
  7. package/dist/AreaMeasurement3D-a2a10ea8.js +488 -0
  8. package/dist/AttachmentInfo-a2849bf0.js +34 -0
  9. package/dist/AttachmentQuery-e743e06f.js +18 -0
  10. package/dist/AttributeStore-6a3291d4.js +1707 -0
  11. package/dist/BaseDynamicLayerView2D-b3ff0eae.js +63 -0
  12. package/dist/BingMapsLayer-689d8e88.js +112 -0
  13. package/dist/Bitmap-e2b1f93c.js +128 -0
  14. package/dist/BitmapContainer-4dcc4a14.js +23 -0
  15. package/dist/BlendLayer-113fd3b8.js +13 -0
  16. package/dist/BoundsStore-3598604e.js +63 -0
  17. package/dist/BufferObject-59880a47.js +100 -0
  18. package/dist/BufferView-2cfe8c7d.js +683 -0
  19. package/dist/BuildingSceneLayer-a3e4a869.js +535 -0
  20. package/dist/Button-5e85250d.js +36 -0
  21. package/dist/CSVLayer-a68a64b8.js +208 -0
  22. package/dist/CSVSourceWorker-cf1fee99.js +367 -0
  23. package/dist/CardWithInsights/CardWithInsights.d.ts +2 -1
  24. package/dist/CatalogDynamicGroupLayerView2D-a4ae390f.js +66 -0
  25. package/dist/CatalogFootprintLayerView2D-145014a4.js +76 -0
  26. package/dist/CatalogLayer-48e7048b.js +262 -0
  27. package/dist/CatalogLayerView2D-8b4a4d47.js +52 -0
  28. package/dist/ClassBreaksDefinition-e2d8b3cc.js +18 -0
  29. package/dist/ColorMaterial.glsl-a7c70d21.js +64 -0
  30. package/dist/ColorSet-f4b34654.js +45 -0
  31. package/dist/ColorStop-1111f0fd.js +29 -0
  32. package/dist/Container-4a2d8bcd.js +521 -0
  33. package/dist/CustomParametersMixin-601866cc.js +12 -0
  34. package/dist/DefaultMaterial.glsl-9243ba6c.js +42 -0
  35. package/dist/DefaultMaterial_COLOR_GAMMA-bf0d97c7.js +653 -0
  36. package/dist/DefaultTheme-e96ad45b.js +130 -0
  37. package/dist/DeleteForwardEditsParameters-bd5164e3.js +18 -0
  38. package/dist/DimensionLayer-d51dcf5e.js +129 -0
  39. package/dist/DirectLineMeasurement3D-7b426a46.js +449 -0
  40. package/dist/DistanceMeasurement2D-1f05b105.js +303 -0
  41. package/dist/DoubleArray-4f276822.js +25 -0
  42. package/dist/Dropdown/Dropdown.core.d.ts +31 -0
  43. package/dist/Dropdown/Filter/test.mocks.d.ts +6 -0
  44. package/dist/Dropdown/List/Dropdown.List.d.ts +84 -0
  45. package/dist/Dropdown/List/test.mocks.d.ts +6 -0
  46. package/dist/EdgeProcessingWorker-317b2f9a.js +63 -0
  47. package/dist/EditBusLayer-55763028.js +107 -0
  48. package/dist/ElevationInfo-5be88917.js +56 -0
  49. package/dist/ElevationLayer-754634d4.js +129 -0
  50. package/dist/ElevationQuery-1e84df59.js +598 -0
  51. package/dist/ElevationSamplerWorker-1c01b3d8.js +62 -0
  52. package/dist/ExportImageParameters-e00a1031.js +66 -0
  53. package/dist/ExportStrategy-ba992e25.js +93 -0
  54. package/dist/ExportWMSImageParameters-395804ac.js +33 -0
  55. package/dist/External-77e767f4.js +110 -0
  56. package/dist/Faq/Faq.d.ts +1 -1
  57. package/dist/Faq/index.d.ts +1 -1
  58. package/dist/FeatureCollectionSnappingSource-d1435805.js +130 -0
  59. package/dist/FeatureCommandQueue-4db7f162.js +1244 -0
  60. package/dist/FeatureEffect-5b570804.js +39 -0
  61. package/dist/FeatureEffectLayer-171a9749.js +13 -0
  62. package/dist/FeatureFilter-db89ec09.js +27 -0
  63. package/dist/FeatureLayer-881827c7.js +693 -0
  64. package/dist/FeatureLayerBase-b410d8eb.js +148 -0
  65. package/dist/FeatureLayerSource-e5eba81e.js +444 -0
  66. package/dist/FeatureLayerView2D-107b4ed6.js +1967 -0
  67. package/dist/FeaturePipelineWorker-2b42d98d.js +3633 -0
  68. package/dist/FeatureReductionLayer-1f3f6a98.js +225 -0
  69. package/dist/FeatureReductionSelection-b0c4bcaf.js +22 -0
  70. package/dist/FeatureServiceSnappingSource-fde9a8da.js +481 -0
  71. package/dist/FeatureServiceSnappingSourceWorker-d4113c50.js +747 -0
  72. package/dist/FeatureSet-595ae550.js +188 -0
  73. package/dist/FeatureStore-87fbe804.js +131 -0
  74. package/dist/FeatureTemplate-c810cba6.js +12 -0
  75. package/dist/FeatureType-22de76b9.js +25 -0
  76. package/dist/FieldsIndex-390b005f.js +109 -0
  77. package/dist/FormTemplate-728de82d.js +350 -0
  78. package/dist/GeoJSONLayer-fbf5ee27.js +236 -0
  79. package/dist/GeoJSONSourceWorker-30cd4133.js +247 -0
  80. package/dist/GeoRSSLayer-2addf639.js +73 -0
  81. package/dist/GeoRSSLayerView2D-29c15edb.js +140 -0
  82. package/dist/GeometryUtils-80d3036a.js +403 -0
  83. package/dist/GraphicContainer-2b112072.js +26 -0
  84. package/dist/GraphicManipulator-84ac0573.js +1499 -0
  85. package/dist/GraphicsLayer-ee9f874e.js +38 -0
  86. package/dist/GraphicsLayerView2D-c5eda7d2.js +114 -0
  87. package/dist/GraphicsSnappingSource-3dd1e9b3.js +273 -0
  88. package/dist/GraphicsView2D-40686b59.js +620 -0
  89. package/dist/GroupLayer-fd168a3e.js +147 -0
  90. package/dist/GroupLayerView2D-f4078b54.js +98 -0
  91. package/dist/HUDMaterial.glsl-bea5cb7c.js +65 -0
  92. package/dist/HighlightCounter-b3b4b206.js +41 -0
  93. package/dist/HighlightGraphicContainer-c00c331b.js +18 -0
  94. package/dist/I3SBinaryReader-d3a26893.js +310 -0
  95. package/dist/I3SLayerDefinitions-2bea64c8.js +55 -0
  96. package/dist/I3SUtil-ab1a91f5.js +59 -0
  97. package/dist/IdentityManager-8e14d109.js +899 -0
  98. package/dist/ImageHistogramParameters-711f313f.js +905 -0
  99. package/dist/ImageryLayer-fbaf4d8c.js +1799 -0
  100. package/dist/ImageryLayerView2D-199eb1fd.js +352 -0
  101. package/dist/ImageryTileLayer-48671dc9.js +2157 -0
  102. package/dist/ImageryTileLayerView2D-8ac1ee64.js +1110 -0
  103. package/dist/Indices-2f9cf62d.js +67 -0
  104. package/dist/Input/Input.core.d.ts +4553 -3
  105. package/dist/Input/index.d.ts +4547 -3
  106. package/dist/IntegratedMesh3DTilesLayer-89d862a2.js +112 -0
  107. package/dist/IntegratedMeshLayer-53f792e4.js +141 -0
  108. package/dist/InteractiveAnalysisViewModel-d7dd665d.js +7397 -0
  109. package/dist/InterleavedLayout-ff67e161.js +163 -0
  110. package/dist/KMLLayer-7a4cfa2a.js +162 -0
  111. package/dist/KMLLayerView2D-d0874e8d.js +253 -0
  112. package/dist/KnowledgeGraphLayerView2D-70d956b2.js +43 -0
  113. package/dist/LRUCache-5bebd9a8.js +32 -0
  114. package/dist/LabelClass-63459c37.js +135 -0
  115. package/dist/LabelMetric-09a9cd38.js +400 -0
  116. package/dist/LaserlinePath.glsl-731dbba1.js +64 -0
  117. package/dist/Laserlines.glsl-26d42447.js +65 -0
  118. package/dist/LayerFloorInfo-5c67a822.js +15 -0
  119. package/dist/LayerView-405cecd2.js +206 -0
  120. package/dist/LercWorker-a7892aa0.js +157 -0
  121. package/dist/LineOfSightLayer-abad68f7.js +147 -0
  122. package/dist/LinkChartLayer-c36d2a81.js +1027 -0
  123. package/dist/Lyr3DWorker-8f4c6c50.js +82 -0
  124. package/dist/MagnifierPrograms-ddc85113.js +806 -0
  125. package/dist/MapImageLayer-04f4cdcb.js +169 -0
  126. package/dist/MapImageLayerView2D-712dd60f.js +146 -0
  127. package/dist/MapNotesLayer-83fcba8e.js +283 -0
  128. package/dist/MapNotesLayerView2D-f0ad0a82.js +161 -0
  129. package/dist/MapServiceLayerViewHelper-6c746a26.js +288 -0
  130. package/dist/MeasurementWidgetContent-fc0c1569.js +2642 -0
  131. package/dist/MediaLayer-05162eaf.js +523 -0
  132. package/dist/MediaLayerView2D-474c563b.js +332 -0
  133. package/dist/MemCache-8f96824a.js +227 -0
  134. package/dist/MemorySourceWorker-08562524.js +222 -0
  135. package/dist/Mesh-3208420e.js +980 -0
  136. package/dist/MeshLocalVertexSpace-59268d9e.js +19 -0
  137. package/dist/MultiOriginJSONSupport-365740bb.js +158 -0
  138. package/dist/OGCFeatureLayer-7201d1ee.js +211 -0
  139. package/dist/OGCFeatureLayerView2D-d242f130.js +82 -0
  140. package/dist/ObjectStack-bad354ab.js +21 -0
  141. package/dist/Octree-cbaefa65.js +495 -0
  142. package/dist/OpenStreetMapLayer-b3c8020b.js +30 -0
  143. package/dist/OperationalLayer-30f48d16.js +44 -0
  144. package/dist/OrderByInfo-9bd0a8fe.js +16 -0
  145. package/dist/OrderedLayer-2962d196.js +26 -0
  146. package/dist/OrientedImageryLayer-5d599e15.js +216 -0
  147. package/dist/OverlayCompositing.glsl-334c68d5.js +65 -0
  148. package/dist/OverrideHelper-7981ecc2.js +242 -0
  149. package/dist/PBFDecoderWorker-48f7e620.js +213 -0
  150. package/dist/PointCloudLayer-5b804571.js +197 -0
  151. package/dist/PointCloudUniqueValueRenderer-9ef1db42.js +115 -0
  152. package/dist/PointCloudWorker-9e88daea.js +212 -0
  153. package/dist/PooledRBush-afceba5f.js +272 -0
  154. package/dist/Popup-89e3fd56.js +3990 -0
  155. package/dist/PortalLayer-21d22eb9.js +126 -0
  156. package/dist/Program-09ee8c67.js +694 -0
  157. package/dist/ProgramTemplate-be811b23.js +35 -0
  158. package/dist/ProgressBar/ProgressBar.d.ts +13 -1
  159. package/dist/QueryEngine-810a7f24.js +896 -0
  160. package/dist/QueryTask-013cc810.js +119 -0
  161. package/dist/RasterSymbolizer-ae063ee7.js +3024 -0
  162. package/dist/RasterVFDisplayObject-fe2f7ea2.js +581 -0
  163. package/dist/RasterWorker-7efcbd4d.js +78 -0
  164. package/dist/RawBlockCache-5a644219.js +185 -0
  165. package/dist/RealisticTree.glsl-4e33ae57.js +42 -0
  166. package/dist/RefreshableLayer-e64dd0ee.js +80 -0
  167. package/dist/RefreshableLayerView-61f7dd9a.js +16 -0
  168. package/dist/Relationship-adcdce15.js +64 -0
  169. package/dist/RelationshipQuery-0c20b8ed.js +22 -0
  170. package/dist/RenderingContext-29b578ca.js +889 -0
  171. package/dist/RibbonLine.glsl-038f5cac.js +65 -0
  172. package/dist/RouteLayer-479e0ccc.js +786 -0
  173. package/dist/RouteLayerView2D-1a646f54.js +195 -0
  174. package/dist/SDFHelper-9abcbcca.js +140 -0
  175. package/dist/SSAO.glsl-5d41f99f.js +43 -0
  176. package/dist/SSAOBlur.glsl-7ebf8f5c.js +42 -0
  177. package/dist/ScaleRangeLayer-3bbd6ead.js +21 -0
  178. package/dist/SceneLayer-b19fa11e.js +542 -0
  179. package/dist/SceneLayerSnappingSource-f53ddd8a.js +218 -0
  180. package/dist/SceneLayerSnappingSourceWorker-80f48214.js +112 -0
  181. package/dist/SceneLayerWorker-bab8aeb0.js +164 -0
  182. package/dist/SceneService-0c4fac79.js +215 -0
  183. package/dist/Scheduler-9db9a8cf.js +373 -0
  184. package/dist/Search/Search.d.ts +99 -0
  185. package/dist/Search/index.d.ts +1 -0
  186. package/dist/Search/test.mocks.d.ts +3 -0
  187. package/dist/Search/utils.d.ts +3 -0
  188. package/dist/Select/Item/Item.d.ts +1 -1
  189. package/dist/Select/Multiple/Select.multiple.d.ts +3 -3
  190. package/dist/Select/Select.core.d.ts +1 -1
  191. package/dist/Select/index.d.ts +3 -3
  192. package/dist/ShadedColorMaterial.glsl-a2dd0bb3.js +64 -0
  193. package/dist/SnappingOperation-25ff52da.js +48 -0
  194. package/dist/SourceLayerData-ec301fa4.js +116 -0
  195. package/dist/SpatialFilter-351a1d5e.js +1701 -0
  196. package/dist/Stop-595501a7.js +281 -0
  197. package/dist/StreamLayer-d5ebd4d3.js +188 -0
  198. package/dist/StreamLayerView2D-8a39daaa.js +164 -0
  199. package/dist/StyleRepository-dd283243.js +2212 -0
  200. package/dist/SublayersOwner-0be88fd0.js +545 -0
  201. package/dist/SubtypeGroupLayer-8386c037.js +514 -0
  202. package/dist/SubtypeGroupLayerView2D-97b63aa1.js +84 -0
  203. package/dist/Tabs/Tab/Tab.d.ts +3 -3
  204. package/dist/Tag/Tag.d.ts +52 -0
  205. package/dist/TechniqueInstance-87f77cd3.js +233 -0
  206. package/dist/TemporalLayer-7c15b8a6.js +23 -0
  207. package/dist/Texture-c1f5f21b.js +501 -0
  208. package/dist/TextureOnly.glsl-acae1d94.js +65 -0
  209. package/dist/Theme-72a69427.js +3426 -0
  210. package/dist/Tick-d7f9b999.js +723 -0
  211. package/dist/TileContainer-20f11bc5.js +31 -0
  212. package/dist/TileInfoTilemapCache-a50aaed0.js +38 -0
  213. package/dist/TileLayer-ce04649f.js +194 -0
  214. package/dist/TileLayerView2D-0f45ff75.js +187 -0
  215. package/dist/TilemapCache-95b53d5a.js +189 -0
  216. package/dist/TimeInfo-f17e0ff9.js +42 -0
  217. package/dist/TimeOnly-63922f1a.js +706 -0
  218. package/dist/Tooltip-a21a6650.js +138 -0
  219. package/dist/TopFeaturesQuery-9e4228e7.js +32 -0
  220. package/dist/TurboLine-aeb14d6e.js +565 -0
  221. package/dist/UniqueValueRenderer-7532473e.js +1039 -0
  222. package/dist/UnknownLayer-99d4832b.js +30 -0
  223. package/dist/UnknownTimeZone-4c0a5184.js +15 -0
  224. package/dist/UnsupportedLayer-f439265c.js +31 -0
  225. package/dist/UpdateTracking2D-a1164b3d.js +8566 -0
  226. package/dist/Upload/Upload.d.ts +91 -14
  227. package/dist/Upload/index.d.ts +1 -1
  228. package/dist/Util-26f81cc4.js +57 -0
  229. package/dist/VectorTileLayer-8b5289d2.js +544 -0
  230. package/dist/VectorTileLayerView2D-00d98337.js +2108 -0
  231. package/dist/Version-2556ea28.js +33 -0
  232. package/dist/VertexArrayObject-5595c535.js +73 -0
  233. package/dist/VertexColor.glsl-01eb58bb.js +2683 -0
  234. package/dist/VertexSnappingCandidate-c1e2992a.js +13 -0
  235. package/dist/VideoLayerView2D-e92c8bab.js +124 -0
  236. package/dist/VoxelLayer-e57c2b7b.js +631 -0
  237. package/dist/WFSLayer-486fff2e.js +221 -0
  238. package/dist/WFSSourceWorker-3d8ac573.js +157 -0
  239. package/dist/WGLContainer-1441483b.js +5426 -0
  240. package/dist/WMSLayer-07ea95cc.js +536 -0
  241. package/dist/WMSLayerView2D-8b67d5da.js +117 -0
  242. package/dist/WMTSLayer-b52fbe0c.js +531 -0
  243. package/dist/WMTSLayerView2D-8ca1d522.js +142 -0
  244. package/dist/WebTileLayer-dd24dee2.js +110 -0
  245. package/dist/WhereClause-2eefa48c.js +2766 -0
  246. package/dist/WorkerHandle-f6b5ac7b.js +47 -0
  247. package/dist/WorkerTileHandler-e060fab5.js +1539 -0
  248. package/dist/action-a2d13907.js +198 -0
  249. package/dist/action-group-af071314.js +145 -0
  250. package/dist/action-menu-c759068f.js +1759 -0
  251. package/dist/apng-b33ce902.js +392 -0
  252. package/dist/arcade-b05c8c22.js +229 -0
  253. package/dist/arcadeAsyncRuntime-9b4a7891.js +943 -0
  254. package/dist/arcadeUtils-41691d12.js +8741 -0
  255. package/dist/arcgis-knowledge-client-core-2217ce57.js +1218 -0
  256. package/dist/arcgis-knowledge-client-core-simd-ab44590a.js +1218 -0
  257. package/dist/arcgisLayers-0ea0be85.js +152 -0
  258. package/dist/associatedFeatureServiceUtils-09077513.js +92 -0
  259. package/dist/axisAngleDegrees-1c3d7520.js +49 -0
  260. package/dist/basis_transcoder-292f1aaf.js +1248 -0
  261. package/dist/calcite-action-ad0d1e23.js +22 -0
  262. package/dist/calcite-action-bar-1b2de6d0.js +303 -0
  263. package/dist/calcite-action-group-aacf8ec4.js +28 -0
  264. package/dist/calcite-button-125cbd95.js +228 -0
  265. package/dist/calcite-flow-c9a6e8fa.js +128 -0
  266. package/dist/calcite-flow-item-eb314bb8.js +499 -0
  267. package/dist/calcite-icon-07f22bc6.js +16 -0
  268. package/dist/calcite-input-167be799.js +24 -0
  269. package/dist/calcite-label-7de34a6b.js +79 -0
  270. package/dist/calcite-list-2087f9ca.js +2135 -0
  271. package/dist/calcite-list-item-3419fb5f.js +576 -0
  272. package/dist/calcite-list-item-group-3a6545e3.js +71 -0
  273. package/dist/calcite-loader-16bcfb95.js +14 -0
  274. package/dist/calcite-modal-f608731f.js +333 -0
  275. package/dist/calcite-notice-88ee1edf.js +181 -0
  276. package/dist/calcite-option-375585a2.js +94 -0
  277. package/dist/calcite-scrim-751cf767.js +18 -0
  278. package/dist/calcite-select-62db97da.js +231 -0
  279. package/dist/capabilities-359df394.js +50 -0
  280. package/dist/chartCommon-cceb2530.js +256 -0
  281. package/dist/chartUtilsAm5-08a29408.js +2954 -0
  282. package/dist/clientSideDefaults-b5450c9b.js +39 -0
  283. package/dist/colorRamps-314c4b5a.js +38 -0
  284. package/dist/colorUtils-6e9b620c.js +164 -0
  285. package/dist/commonProperties-3399f319.js +60 -0
  286. package/dist/computeTranslationToOriginAndRotation-0b0f32ad.js +60 -0
  287. package/dist/conditionalSlot-012fd5da.js +27 -0
  288. package/dist/createConnection-f1189f51.js +299 -0
  289. package/dist/dataUtils-950a0ae9.js +1421 -0
  290. package/dist/deduplicate-eabb5f9e.js +89 -0
  291. package/dist/defaults-e5c5ee75.js +31 -0
  292. package/dist/deleteForwardEdits-ea9258ea.js +13 -0
  293. package/dist/diffUtils-04a71a59.js +90 -0
  294. package/dist/drapedUtils-2515520d.js +75 -0
  295. package/dist/earcut-192842ab.js +292 -0
  296. package/dist/edgeProcessing-da003f69.js +252 -0
  297. package/dist/editingSupport-9f04ba1b.js +203 -0
  298. package/dist/editsZScale-97938687.js +37 -0
  299. package/dist/elevationInfoUtils-e1edd62e.js +126 -0
  300. package/dist/executeForIds-3b8a1698.js +14 -0
  301. package/dist/executeForTopCount-6c6cd2f2.js +17 -0
  302. package/dist/executeForTopExtents-86851593.js +17 -0
  303. package/dist/executeForTopIds-24bc9dea.js +17 -0
  304. package/dist/executeQueryJSON-cf7d748b.js +15 -0
  305. package/dist/executeQueryPBF-ad416846.js +152 -0
  306. package/dist/executeRelationshipQuery-9b6666bf.js +53 -0
  307. package/dist/executeTopFeaturesQuery-4ac72bd2.js +18 -0
  308. package/dist/featureConversionUtils-67a121da.js +479 -0
  309. package/dist/featureLayerUtils-a4002773.js +142 -0
  310. package/dist/featureLayerUtils-a7e985d2.js +250 -0
  311. package/dist/featureSetUtils-11fcb3c4.js +2530 -0
  312. package/dist/featuresetbase-47894167.js +707 -0
  313. package/dist/featuresetgeom-bff2aa07.js +99 -0
  314. package/dist/featuresetstats-14a3fe2b.js +81 -0
  315. package/dist/featuresetstring-de2b64db.js +95 -0
  316. package/dist/fetchService-b6d76f5e.js +33 -0
  317. package/dist/fieldProperties-a9fbe289.js +33 -0
  318. package/dist/floatRGBA-2bc6800c.js +20 -0
  319. package/dist/form-e210eee8.js +138 -0
  320. package/dist/geohashUtils-085312a3.js +85 -0
  321. package/dist/geojson-f0bc401a.js +208 -0
  322. package/dist/geomasync-3c3b5e8d.js +567 -0
  323. package/dist/geometryEngine-2772790a.js +192 -0
  324. package/dist/geometryEngineAsync-db2e5674.js +217 -0
  325. package/dist/geometryEngineBase-8b327072.js +18463 -0
  326. package/dist/geometryEngineJSON-95268e88.js +171 -0
  327. package/dist/geometryEngineJSON-fc48a48b.js +46 -0
  328. package/dist/geometryEngineWorker-2fbc65f7.js +11 -0
  329. package/dist/geometryServiceUtils-ed9cb722.js +28 -0
  330. package/dist/georeference-f6f67e9b.js +291 -0
  331. package/dist/gif-a4043534.js +323 -0
  332. package/dist/gltfexport-d028c5c9.js +705 -0
  333. package/dist/groupLayerUtils-22dde377.js +39 -0
  334. package/dist/heatmapUtils-8e578a0a.js +45 -0
  335. package/dist/highlightReasons-ab23926f.js +19 -0
  336. package/dist/hydrated-219f2b0c.js +40 -0
  337. package/dist/i3s-b5ed4851.js +809 -0
  338. package/dist/icon-8711ff33.js +127 -0
  339. package/dist/imageBitmapUtils-dc97b3de.js +23 -0
  340. package/dist/imageUtils-0a71062a.js +69 -0
  341. package/dist/imageUtils-a4c7c9bf.js +89 -0
  342. package/dist/imageryUtils-d21fd540.js +43 -0
  343. package/dist/index-f28919b2.js +43440 -0
  344. package/dist/index.d.ts +3 -0
  345. package/dist/index.js +15 -12
  346. package/dist/input-message-3df877b9.js +92 -0
  347. package/dist/input2-32e36924.js +575 -0
  348. package/dist/interactive-c1e1aeaf.js +80 -0
  349. package/dist/jsonContext-4622e179.js +15 -0
  350. package/dist/jsonUtils-9f58b7bb.js +476 -0
  351. package/dist/jsonUtils-d9bb6102.js +86 -0
  352. package/dist/jsonUtils-e40213c1.js +59 -0
  353. package/dist/kmlUtils-5f8f6cf6.js +112 -0
  354. package/dist/knowledgeGraphService-a34bf3b0.js +739 -0
  355. package/dist/knowledgegraph-68124c78.js +149 -0
  356. package/dist/labelUtils-3a1386e4.js +61 -0
  357. package/dist/labelingInfo-69c9f8f4.js +46 -0
  358. package/dist/layersCreator-5e6fe7f2.js +151 -0
  359. package/dist/layersLoader-f96735c7.js +197 -0
  360. package/dist/lazyLayerLoader-142515c4.js +10 -0
  361. package/dist/lclayout-639ec791.js +773 -0
  362. package/dist/lengthUtils-8796ccf3.js +5 -0
  363. package/dist/lerc-wasm-acb341bd.js +325 -0
  364. package/dist/libtess-a9e7192e.js +269 -0
  365. package/dist/libtess-asm-8de2fb72.js +3673 -0
  366. package/dist/lineSegment-2790f546.js +76 -0
  367. package/dist/loadGLTFMesh-33064e6d.js +181 -0
  368. package/dist/loadable-4558719f.js +24 -0
  369. package/dist/loader-4dbc522d.js +79 -0
  370. package/dist/lyr3DWorker-3365d66f.js +2108 -0
  371. package/dist/mapViewDeps-67ec1d27.js +3052 -0
  372. package/dist/mediaLayerUtils-612838fb.js +35 -0
  373. package/dist/meshFeatureSet-07b96756.js +126 -0
  374. package/dist/meshVertexSpaceUtils-673c2055.js +58 -0
  375. package/dist/multidimensionalUtils-79cc2536.js +290 -0
  376. package/dist/normalizeUtilsSync-9fd98ab4.js +181 -0
  377. package/dist/number-110986f5.js +128 -0
  378. package/dist/objectResourceUtils-1b8d1c03.js +1455 -0
  379. package/dist/observers-507c19a0.js +30 -0
  380. package/dist/ogcFeatureUtils-3c65f06a.js +206 -0
  381. package/dist/openCloseComponent-89dc4d35.js +37 -0
  382. package/dist/orientedBoundingBox-46d44acf.js +447 -0
  383. package/dist/parser-8f715684.js +488 -0
  384. package/dist/pbf-4ce99129.js +215 -0
  385. package/dist/pbfQueryUtils-23cca540.js +422 -0
  386. package/dist/pe-wasm-d186391a.js +887 -0
  387. package/dist/persistable-09062510.js +89 -0
  388. package/dist/perspectiveUtils-9da629d6.js +42 -0
  389. package/dist/pieChart-92709a5c.js +555 -0
  390. package/dist/plane-2b39f8eb.js +160 -0
  391. package/dist/popupUtils-dc099446.js +22 -0
  392. package/dist/popupUtils-e53c5c04.js +50 -0
  393. package/dist/portalItemUtils-39079445.js +57 -0
  394. package/dist/portalLayers-efcd5403.js +312 -0
  395. package/dist/portalUtils-44b1ac04.js +7 -0
  396. package/dist/programUtils-c22a40e2.js +59 -0
  397. package/dist/project-4759dc23.js +21 -0
  398. package/dist/projectPointToVector-1d9098bc.js +14 -0
  399. package/dist/projectVectorToVector-add01592.js +13 -0
  400. package/dist/quantityUtils-afe6e5b7.js +33 -0
  401. package/dist/quantizationUtils-51d3a038.js +68 -0
  402. package/dist/quat-22f56b72.js +104 -0
  403. package/dist/query-8cf3e12b.js +89 -0
  404. package/dist/queryAttachments-0a63ea2f.js +39 -0
  405. package/dist/queryEngineUtils-a1db57f0.js +21 -0
  406. package/dist/queryTopFeatures-b4fb05ad.js +50 -0
  407. package/dist/queryZScale-112cd8e3.js +12 -0
  408. package/dist/rasterProjectionHelper-3ae0fcfd.js +577 -0
  409. package/dist/rasterUtils-6868b6b6.js +122 -0
  410. package/dist/rasterizingUtils-922f43e7.js +46 -0
  411. package/dist/request-fd620c13.js +46 -0
  412. package/dist/requestImageUtils-f8f50ad7.js +8 -0
  413. package/dist/resourceExtension-f0327971.js +17 -0
  414. package/dist/resourceUtils-2e33090d.js +69 -0
  415. package/dist/resourceUtils-db0d7e83.js +42 -0
  416. package/dist/resourceUtils-ff5eafc3.js +62 -0
  417. package/dist/saveAPIKeyUtils-32bb955d.js +8 -0
  418. package/dist/saveUtils-d4ad8f94.js +24 -0
  419. package/dist/scaleUtils-a3ce8cc6.js +23 -0
  420. package/dist/scrim-7ef1cdf5.js +114 -0
  421. package/dist/serviceCapabilitiesUtils-cafdd4bc.js +64 -0
  422. package/dist/sourceUtils-1a30f8aa.js +71 -0
  423. package/dist/sphere-84d1e36b.js +199 -0
  424. package/dist/statsWorker-efb7a41b.js +37 -0
  425. package/dist/streamLayerUtils-4c5b417e.js +31 -0
  426. package/dist/style.css +1 -1
  427. package/dist/styleUtils-8f0e3848.js +75 -0
  428. package/dist/styleUtils-a61894cc.js +14 -0
  429. package/dist/sublayerUtils-aaa67481.js +37 -0
  430. package/dist/substitute-7b4a925f.js +52 -0
  431. package/dist/symbolColorUtils-45615b74.js +8 -0
  432. package/dist/symbolLayerUtils-6ee325f3.js +31 -0
  433. package/dist/symbologySnappingCandidates-a56c7bbb.js +221 -0
  434. package/dist/t9n-b5ab99e4.js +349 -0
  435. package/dist/testSVGPremultipliedAlpha-a89a8569.js +94 -0
  436. package/dist/timeSupport-76d5ec0e.js +410 -0
  437. package/dist/triangle-95e355d3.js +98 -0
  438. package/dist/unitConversionUtils-b0c2c156.js +17 -0
  439. package/dist/unitFormatUtils-b79fea5c.js +40 -0
  440. package/dist/uploadAssetErrors-7ef907ce.js +70 -0
  441. package/dist/uploadAssets-99a2ec95.js +330 -0
  442. package/dist/utils-0da4a164.js +419 -0
  443. package/dist/utils-0e163cdb.js +433 -0
  444. package/dist/utils-421c60f9.js +73 -0
  445. package/dist/utils-6e4fc34d.js +91 -0
  446. package/dist/utils-9612bce6.js +34 -0
  447. package/dist/utils-99bb2971.js +2746 -0
  448. package/dist/utils-d1f92cf8.js +79 -0
  449. package/dist/utils-e30b7de3.js +232 -0
  450. package/dist/utils3-41d8e55d.js +75 -0
  451. package/dist/vec3-ab2339d6.js +81 -0
  452. package/dist/vec42-1a7bd7a6.js +125 -0
  453. package/dist/versionUtils-b6c13869.js +161 -0
  454. package/dist/visualVariableUtils-1a38c540.js +267 -0
  455. package/dist/webStyleSymbolUtils-6f89a405.js +48 -0
  456. package/dist/webglDeps-dcb6738a.js +23 -0
  457. package/dist/wfsUtils-d679c9b9.js +343 -0
  458. package/dist/workerHelper-8fb7376f.js +11 -0
  459. package/dist/xyChart-b3c4e27e.js +3335 -0
  460. package/package.json +1 -1
  461. package/dist/AGraphicContainer-98a4c8a4.js +0 -109
  462. package/dist/APIKeyMixin-9511e0a5.js +0 -19
  463. package/dist/Analysis-4b1d1fb5.js +0 -31
  464. package/dist/ArcGISCachedService-93e2cb27.js +0 -47
  465. package/dist/ArcGISService-3f8d89c1.js +0 -25
  466. package/dist/AreaMeasurement2D-e0bb230c.js +0 -405
  467. package/dist/AreaMeasurement3D-a9959ecf.js +0 -488
  468. package/dist/AttachmentInfo-601c56e2.js +0 -34
  469. package/dist/AttachmentQuery-3504d550.js +0 -18
  470. package/dist/AttributeStore-b90878e3.js +0 -1707
  471. package/dist/BaseDynamicLayerView2D-b2faf028.js +0 -63
  472. package/dist/BingMapsLayer-5d79fe2b.js +0 -112
  473. package/dist/Bitmap-f775c851.js +0 -128
  474. package/dist/BitmapContainer-af5942b8.js +0 -23
  475. package/dist/BlendLayer-a792edf6.js +0 -13
  476. package/dist/BoundsStore-789624df.js +0 -63
  477. package/dist/BufferObject-cbd0168e.js +0 -100
  478. package/dist/BufferView-004ad517.js +0 -683
  479. package/dist/BuildingSceneLayer-25bc760b.js +0 -535
  480. package/dist/Button-70963624.js +0 -36
  481. package/dist/CSVLayer-fd3b6750.js +0 -208
  482. package/dist/CSVSourceWorker-eb24cd85.js +0 -367
  483. package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +0 -66
  484. package/dist/CatalogFootprintLayerView2D-6eb16597.js +0 -76
  485. package/dist/CatalogLayer-1cc632fe.js +0 -262
  486. package/dist/CatalogLayerView2D-d143aa34.js +0 -52
  487. package/dist/ClassBreaksDefinition-07ba0c64.js +0 -18
  488. package/dist/ColorMaterial.glsl-e7801766.js +0 -64
  489. package/dist/ColorSet-df5696b5.js +0 -45
  490. package/dist/ColorStop-7187f368.js +0 -29
  491. package/dist/Container-ac97765a.js +0 -521
  492. package/dist/CustomParametersMixin-b3432b3e.js +0 -12
  493. package/dist/DefaultMaterial.glsl-3cc4efe7.js +0 -42
  494. package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +0 -653
  495. package/dist/DefaultTheme-12dffc66.js +0 -130
  496. package/dist/DeleteForwardEditsParameters-ae76d898.js +0 -18
  497. package/dist/DimensionLayer-9eb47c76.js +0 -129
  498. package/dist/DirectLineMeasurement3D-e9903136.js +0 -449
  499. package/dist/DistanceMeasurement2D-a4853462.js +0 -303
  500. package/dist/DoubleArray-5076283e.js +0 -25
  501. package/dist/EdgeProcessingWorker-c1783ddd.js +0 -63
  502. package/dist/EditBusLayer-e812f4c9.js +0 -107
  503. package/dist/ElevationInfo-fad03d5e.js +0 -56
  504. package/dist/ElevationLayer-397792d5.js +0 -129
  505. package/dist/ElevationQuery-beceb62f.js +0 -598
  506. package/dist/ElevationSamplerWorker-0048a204.js +0 -62
  507. package/dist/ExportImageParameters-c6c4bc61.js +0 -66
  508. package/dist/ExportStrategy-908f5b8d.js +0 -93
  509. package/dist/ExportWMSImageParameters-34da6b46.js +0 -33
  510. package/dist/External-14daf0c1.js +0 -110
  511. package/dist/FeatureCollectionSnappingSource-f97a1829.js +0 -130
  512. package/dist/FeatureCommandQueue-d4817eac.js +0 -1244
  513. package/dist/FeatureEffect-08976bbd.js +0 -39
  514. package/dist/FeatureEffectLayer-05c258f4.js +0 -13
  515. package/dist/FeatureFilter-8c5e44b1.js +0 -27
  516. package/dist/FeatureLayer-d3659466.js +0 -693
  517. package/dist/FeatureLayerBase-9b63f732.js +0 -148
  518. package/dist/FeatureLayerSource-960f1c01.js +0 -444
  519. package/dist/FeatureLayerView2D-7503e1ed.js +0 -1967
  520. package/dist/FeaturePipelineWorker-d4301d2a.js +0 -3633
  521. package/dist/FeatureReductionLayer-e6cf73ac.js +0 -225
  522. package/dist/FeatureReductionSelection-d90249a7.js +0 -22
  523. package/dist/FeatureServiceSnappingSource-9e49ca72.js +0 -481
  524. package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +0 -747
  525. package/dist/FeatureSet-d79f0e48.js +0 -188
  526. package/dist/FeatureStore-eb4b87c0.js +0 -131
  527. package/dist/FeatureTemplate-edb1b782.js +0 -12
  528. package/dist/FeatureType-bba29adb.js +0 -25
  529. package/dist/FieldsIndex-75cca4d0.js +0 -109
  530. package/dist/FormTemplate-22911c47.js +0 -350
  531. package/dist/GeoJSONLayer-b33c96b8.js +0 -236
  532. package/dist/GeoJSONSourceWorker-b04ff552.js +0 -247
  533. package/dist/GeoRSSLayer-6e5fcd0e.js +0 -73
  534. package/dist/GeoRSSLayerView2D-21b6b12e.js +0 -140
  535. package/dist/GeometryUtils-fa897cbd.js +0 -403
  536. package/dist/GraphicContainer-1fd6bfce.js +0 -26
  537. package/dist/GraphicManipulator-f3b7dc9b.js +0 -1499
  538. package/dist/GraphicsLayer-e0686779.js +0 -38
  539. package/dist/GraphicsLayerView2D-a7eba2fe.js +0 -114
  540. package/dist/GraphicsSnappingSource-594f402a.js +0 -273
  541. package/dist/GraphicsView2D-347562b8.js +0 -620
  542. package/dist/GroupLayer-7ae0a916.js +0 -147
  543. package/dist/GroupLayerView2D-ffcde606.js +0 -98
  544. package/dist/HUDMaterial.glsl-b0a3e0ce.js +0 -65
  545. package/dist/HighlightCounter-e18f0179.js +0 -41
  546. package/dist/HighlightGraphicContainer-fd774cea.js +0 -18
  547. package/dist/I3SBinaryReader-190e99de.js +0 -310
  548. package/dist/I3SLayerDefinitions-6ddaca60.js +0 -55
  549. package/dist/I3SUtil-44b83dc0.js +0 -59
  550. package/dist/IdentityManager-fbe91c13.js +0 -899
  551. package/dist/ImageHistogramParameters-d64fd9c8.js +0 -905
  552. package/dist/ImageryLayer-67878a78.js +0 -1799
  553. package/dist/ImageryLayerView2D-ae45faba.js +0 -352
  554. package/dist/ImageryTileLayer-9dca8b93.js +0 -2157
  555. package/dist/ImageryTileLayerView2D-977f66aa.js +0 -1110
  556. package/dist/Indices-e6dc3b15.js +0 -67
  557. package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +0 -112
  558. package/dist/IntegratedMeshLayer-9162c0b5.js +0 -141
  559. package/dist/InteractiveAnalysisViewModel-b046fcb9.js +0 -7397
  560. package/dist/InterleavedLayout-32973c8a.js +0 -163
  561. package/dist/KMLLayer-80f81df7.js +0 -162
  562. package/dist/KMLLayerView2D-b6ba3b80.js +0 -253
  563. package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +0 -43
  564. package/dist/LRUCache-27e8c401.js +0 -32
  565. package/dist/LabelClass-d9a476d6.js +0 -135
  566. package/dist/LabelMetric-e2728bbf.js +0 -400
  567. package/dist/LaserlinePath.glsl-60d00e61.js +0 -64
  568. package/dist/Laserlines.glsl-499a6cbf.js +0 -65
  569. package/dist/LayerFloorInfo-d05cf9dd.js +0 -15
  570. package/dist/LayerView-036988a9.js +0 -206
  571. package/dist/LercWorker-b1b4bb47.js +0 -157
  572. package/dist/LineOfSightLayer-9a9a60b7.js +0 -147
  573. package/dist/LinkChartLayer-d61803bb.js +0 -1027
  574. package/dist/Lyr3DWorker-87be14e0.js +0 -82
  575. package/dist/MagnifierPrograms-da7a27ab.js +0 -806
  576. package/dist/MapImageLayer-f07adf1a.js +0 -169
  577. package/dist/MapImageLayerView2D-d1b140c3.js +0 -146
  578. package/dist/MapNotesLayer-c662d147.js +0 -283
  579. package/dist/MapNotesLayerView2D-bf9ac698.js +0 -161
  580. package/dist/MapServiceLayerViewHelper-fb724de9.js +0 -288
  581. package/dist/MeasurementWidgetContent-e4888ef2.js +0 -2642
  582. package/dist/MediaLayer-36d873a3.js +0 -523
  583. package/dist/MediaLayerView2D-e58b8ec0.js +0 -332
  584. package/dist/MemCache-a9232ec2.js +0 -227
  585. package/dist/MemorySourceWorker-20ff27d6.js +0 -222
  586. package/dist/Mesh-3839826a.js +0 -980
  587. package/dist/MeshLocalVertexSpace-00151564.js +0 -19
  588. package/dist/MultiOriginJSONSupport-bb258670.js +0 -158
  589. package/dist/OGCFeatureLayer-2a8b7ecc.js +0 -211
  590. package/dist/OGCFeatureLayerView2D-185f9649.js +0 -82
  591. package/dist/ObjectStack-10d91171.js +0 -21
  592. package/dist/Octree-78797046.js +0 -495
  593. package/dist/OpenStreetMapLayer-b0a17790.js +0 -30
  594. package/dist/OperationalLayer-55af27d6.js +0 -44
  595. package/dist/OrderByInfo-22e3c805.js +0 -16
  596. package/dist/OrderedLayer-1403a591.js +0 -26
  597. package/dist/OrientedImageryLayer-8ec8d7d1.js +0 -216
  598. package/dist/OverlayCompositing.glsl-ba3bd81d.js +0 -65
  599. package/dist/OverrideHelper-82325a2c.js +0 -242
  600. package/dist/PBFDecoderWorker-f6517afc.js +0 -213
  601. package/dist/PointCloudLayer-cff43a10.js +0 -197
  602. package/dist/PointCloudUniqueValueRenderer-f337a895.js +0 -115
  603. package/dist/PointCloudWorker-cdb28dc1.js +0 -212
  604. package/dist/PooledRBush-ee4e60af.js +0 -272
  605. package/dist/Popup-c7f55588.js +0 -3990
  606. package/dist/PortalLayer-07b3c53e.js +0 -126
  607. package/dist/Program-ba2f18b2.js +0 -694
  608. package/dist/ProgramTemplate-eee4f097.js +0 -35
  609. package/dist/QueryEngine-10c97624.js +0 -896
  610. package/dist/QueryTask-115430b6.js +0 -119
  611. package/dist/RasterSymbolizer-fbf433fe.js +0 -3024
  612. package/dist/RasterVFDisplayObject-20b0dd86.js +0 -581
  613. package/dist/RasterWorker-44c37e20.js +0 -78
  614. package/dist/RawBlockCache-25203dbd.js +0 -185
  615. package/dist/RealisticTree.glsl-bc07c4dc.js +0 -42
  616. package/dist/RefreshableLayer-9550b85a.js +0 -80
  617. package/dist/RefreshableLayerView-601f7038.js +0 -16
  618. package/dist/Relationship-c662830e.js +0 -64
  619. package/dist/RelationshipQuery-765f068e.js +0 -22
  620. package/dist/RenderingContext-3db74548.js +0 -889
  621. package/dist/RibbonLine.glsl-c6a715b7.js +0 -65
  622. package/dist/RouteLayer-3f5411f3.js +0 -786
  623. package/dist/RouteLayerView2D-a5fd4cbf.js +0 -195
  624. package/dist/SDFHelper-a34e90ee.js +0 -140
  625. package/dist/SSAO.glsl-5491a708.js +0 -43
  626. package/dist/SSAOBlur.glsl-f3068b8e.js +0 -42
  627. package/dist/ScaleRangeLayer-7ddf00b4.js +0 -21
  628. package/dist/SceneLayer-c594bfc3.js +0 -542
  629. package/dist/SceneLayerSnappingSource-a0504ac7.js +0 -218
  630. package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +0 -112
  631. package/dist/SceneLayerWorker-1865768e.js +0 -164
  632. package/dist/SceneService-fb9f0142.js +0 -215
  633. package/dist/Scheduler-eacc84bb.js +0 -373
  634. package/dist/ShadedColorMaterial.glsl-db97956b.js +0 -64
  635. package/dist/SnappingOperation-9622a00d.js +0 -48
  636. package/dist/SourceLayerData-7016f1a5.js +0 -116
  637. package/dist/SpatialFilter-d20d4f50.js +0 -1701
  638. package/dist/Stop-68022e32.js +0 -281
  639. package/dist/StreamLayer-7c837e3d.js +0 -188
  640. package/dist/StreamLayerView2D-586f5a6a.js +0 -164
  641. package/dist/StyleRepository-fba75e70.js +0 -2212
  642. package/dist/SublayersOwner-3dc574cd.js +0 -545
  643. package/dist/SubtypeGroupLayer-1f9c5398.js +0 -514
  644. package/dist/SubtypeGroupLayerView2D-0f108d9d.js +0 -84
  645. package/dist/TechniqueInstance-0481dbff.js +0 -233
  646. package/dist/TemporalLayer-8116b4a4.js +0 -23
  647. package/dist/Texture-22a8cca5.js +0 -501
  648. package/dist/TextureOnly.glsl-458f8148.js +0 -65
  649. package/dist/Theme-f05b8eb0.js +0 -3426
  650. package/dist/Tick-aef93b48.js +0 -723
  651. package/dist/TileContainer-0bf0ea1b.js +0 -31
  652. package/dist/TileInfoTilemapCache-d78858c0.js +0 -38
  653. package/dist/TileLayer-0edee064.js +0 -194
  654. package/dist/TileLayerView2D-78d5801b.js +0 -187
  655. package/dist/TilemapCache-79699d61.js +0 -189
  656. package/dist/TimeInfo-40c96ade.js +0 -42
  657. package/dist/TimeOnly-9ee66ca6.js +0 -706
  658. package/dist/Tooltip-e7498dc9.js +0 -138
  659. package/dist/TopFeaturesQuery-ad224e01.js +0 -32
  660. package/dist/TurboLine-6ab04aef.js +0 -565
  661. package/dist/UniqueValueRenderer-eaa5f8a6.js +0 -1039
  662. package/dist/UnknownLayer-e280ddd4.js +0 -30
  663. package/dist/UnknownTimeZone-220952b5.js +0 -15
  664. package/dist/UnsupportedLayer-447f7676.js +0 -31
  665. package/dist/UpdateTracking2D-e9adad8f.js +0 -8566
  666. package/dist/Util-002f5109.js +0 -57
  667. package/dist/VectorTileLayer-3210be81.js +0 -544
  668. package/dist/VectorTileLayerView2D-6a51e3b8.js +0 -2108
  669. package/dist/Version-3de8cbca.js +0 -33
  670. package/dist/VertexArrayObject-07998745.js +0 -73
  671. package/dist/VertexColor.glsl-e415cf02.js +0 -2683
  672. package/dist/VertexSnappingCandidate-b676241f.js +0 -13
  673. package/dist/VideoLayerView2D-f659dd0d.js +0 -124
  674. package/dist/VoxelLayer-003f82ff.js +0 -631
  675. package/dist/WFSLayer-3da6c5f7.js +0 -221
  676. package/dist/WFSSourceWorker-9a11693a.js +0 -157
  677. package/dist/WGLContainer-3d159b63.js +0 -5426
  678. package/dist/WMSLayer-fc0632f8.js +0 -536
  679. package/dist/WMSLayerView2D-54e80e1b.js +0 -117
  680. package/dist/WMTSLayer-9324b12b.js +0 -531
  681. package/dist/WMTSLayerView2D-3ef936db.js +0 -142
  682. package/dist/WebTileLayer-45c563ff.js +0 -110
  683. package/dist/WhereClause-7a28b740.js +0 -2766
  684. package/dist/WorkerHandle-0d54a6c7.js +0 -47
  685. package/dist/WorkerTileHandler-786c2b24.js +0 -1539
  686. package/dist/action-163397e3.js +0 -198
  687. package/dist/action-group-4859fb97.js +0 -145
  688. package/dist/action-menu-2d70b2fc.js +0 -1759
  689. package/dist/apng-9b71d52c.js +0 -392
  690. package/dist/arcade-fa309282.js +0 -229
  691. package/dist/arcadeAsyncRuntime-738498fd.js +0 -943
  692. package/dist/arcadeUtils-f71d80fa.js +0 -8741
  693. package/dist/arcgis-knowledge-client-core-6056bcea.js +0 -1218
  694. package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +0 -1218
  695. package/dist/arcgisLayers-b2b878bd.js +0 -152
  696. package/dist/associatedFeatureServiceUtils-df5b5187.js +0 -92
  697. package/dist/axisAngleDegrees-32643b7c.js +0 -49
  698. package/dist/basis_transcoder-3187cc92.js +0 -1248
  699. package/dist/calcite-action-bar-5a87c23c.js +0 -303
  700. package/dist/calcite-action-ee2ca847.js +0 -22
  701. package/dist/calcite-action-group-19aa86ee.js +0 -28
  702. package/dist/calcite-button-8e9175c0.js +0 -228
  703. package/dist/calcite-flow-57d26d2d.js +0 -128
  704. package/dist/calcite-flow-item-4a3e3fc0.js +0 -499
  705. package/dist/calcite-icon-d99e280a.js +0 -16
  706. package/dist/calcite-input-28b20785.js +0 -24
  707. package/dist/calcite-label-4f30e08d.js +0 -79
  708. package/dist/calcite-list-0cee7628.js +0 -2135
  709. package/dist/calcite-list-item-0a19efa8.js +0 -576
  710. package/dist/calcite-list-item-group-0706662f.js +0 -71
  711. package/dist/calcite-loader-865045b1.js +0 -14
  712. package/dist/calcite-modal-3e4da6fd.js +0 -333
  713. package/dist/calcite-notice-50b74ab7.js +0 -181
  714. package/dist/calcite-option-713c1d40.js +0 -94
  715. package/dist/calcite-scrim-809fbd0b.js +0 -18
  716. package/dist/calcite-select-28d8edfc.js +0 -231
  717. package/dist/capabilities-c8f838be.js +0 -50
  718. package/dist/chartCommon-13718cda.js +0 -256
  719. package/dist/chartUtilsAm5-6be145fb.js +0 -2954
  720. package/dist/clientSideDefaults-5c1f97c9.js +0 -39
  721. package/dist/colorRamps-8792655e.js +0 -38
  722. package/dist/colorUtils-54f4b662.js +0 -164
  723. package/dist/commonProperties-f9559903.js +0 -60
  724. package/dist/computeTranslationToOriginAndRotation-4876cb93.js +0 -60
  725. package/dist/conditionalSlot-87175989.js +0 -27
  726. package/dist/createConnection-f974a00a.js +0 -299
  727. package/dist/dataUtils-7c276b73.js +0 -1421
  728. package/dist/deduplicate-59fb9cac.js +0 -89
  729. package/dist/defaults-2bfa4a36.js +0 -31
  730. package/dist/deleteForwardEdits-f653b513.js +0 -13
  731. package/dist/diffUtils-e71a6152.js +0 -90
  732. package/dist/drapedUtils-b42fcbc6.js +0 -75
  733. package/dist/earcut-6fa1a128.js +0 -292
  734. package/dist/edgeProcessing-2ff1f201.js +0 -252
  735. package/dist/editingSupport-68545668.js +0 -203
  736. package/dist/editsZScale-c7cdd215.js +0 -37
  737. package/dist/elevationInfoUtils-5456a079.js +0 -126
  738. package/dist/executeForIds-4ab75c0d.js +0 -14
  739. package/dist/executeForTopCount-7e095ec1.js +0 -17
  740. package/dist/executeForTopExtents-19daf9d0.js +0 -17
  741. package/dist/executeForTopIds-1ba3a4af.js +0 -17
  742. package/dist/executeQueryJSON-46168866.js +0 -15
  743. package/dist/executeQueryPBF-d8623daf.js +0 -152
  744. package/dist/executeRelationshipQuery-011dfb45.js +0 -53
  745. package/dist/executeTopFeaturesQuery-02166801.js +0 -18
  746. package/dist/featureConversionUtils-650d7601.js +0 -479
  747. package/dist/featureLayerUtils-64e09283.js +0 -142
  748. package/dist/featureLayerUtils-b07f9c11.js +0 -250
  749. package/dist/featureSetUtils-9d37d6f8.js +0 -2530
  750. package/dist/featuresetbase-62aeb079.js +0 -707
  751. package/dist/featuresetgeom-51f9fc4e.js +0 -99
  752. package/dist/featuresetstats-4db32894.js +0 -81
  753. package/dist/featuresetstring-990c3287.js +0 -95
  754. package/dist/fetchService-5198dd4a.js +0 -33
  755. package/dist/fieldProperties-edfa24cb.js +0 -33
  756. package/dist/floatRGBA-516d7961.js +0 -20
  757. package/dist/form-99719d52.js +0 -138
  758. package/dist/geohashUtils-2bc76440.js +0 -85
  759. package/dist/geojson-603231df.js +0 -208
  760. package/dist/geomasync-e9063b4c.js +0 -567
  761. package/dist/geometryEngine-d3bb2fd6.js +0 -192
  762. package/dist/geometryEngineAsync-55aa6170.js +0 -217
  763. package/dist/geometryEngineBase-527e8b63.js +0 -18463
  764. package/dist/geometryEngineJSON-28087174.js +0 -46
  765. package/dist/geometryEngineJSON-d54949f9.js +0 -171
  766. package/dist/geometryEngineWorker-dc2c7127.js +0 -11
  767. package/dist/geometryServiceUtils-6a3e1e93.js +0 -28
  768. package/dist/georeference-ed8b2c30.js +0 -291
  769. package/dist/gif-204e82dd.js +0 -323
  770. package/dist/gltfexport-b2566542.js +0 -705
  771. package/dist/groupLayerUtils-ea9e6359.js +0 -39
  772. package/dist/heatmapUtils-56758920.js +0 -45
  773. package/dist/highlightReasons-de432106.js +0 -19
  774. package/dist/hydrated-0e1c7565.js +0 -40
  775. package/dist/i3s-bb0b5b67.js +0 -809
  776. package/dist/icon-c6e3bd23.js +0 -127
  777. package/dist/imageBitmapUtils-881d8c64.js +0 -23
  778. package/dist/imageUtils-57eeedc5.js +0 -69
  779. package/dist/imageUtils-ef69c578.js +0 -89
  780. package/dist/imageryUtils-23f51cb1.js +0 -43
  781. package/dist/index-01c737ed.js +0 -42563
  782. package/dist/input-message-673a9baa.js +0 -92
  783. package/dist/input2-bbf6454e.js +0 -575
  784. package/dist/interactive-aeb2cb9f.js +0 -80
  785. package/dist/jsonContext-2dc288b1.js +0 -15
  786. package/dist/jsonUtils-1abd4bfc.js +0 -59
  787. package/dist/jsonUtils-913fa1bd.js +0 -86
  788. package/dist/jsonUtils-f6a5e63b.js +0 -476
  789. package/dist/kmlUtils-7c2744fe.js +0 -112
  790. package/dist/knowledgeGraphService-6a349e04.js +0 -739
  791. package/dist/knowledgegraph-c91b0bb2.js +0 -149
  792. package/dist/labelUtils-a3634e8f.js +0 -61
  793. package/dist/labelingInfo-568c9210.js +0 -46
  794. package/dist/layersCreator-4a5366ea.js +0 -151
  795. package/dist/layersLoader-b87d4857.js +0 -197
  796. package/dist/lazyLayerLoader-8817000c.js +0 -10
  797. package/dist/lclayout-64c67b4e.js +0 -773
  798. package/dist/lengthUtils-695e744c.js +0 -5
  799. package/dist/lerc-wasm-13192bf3.js +0 -325
  800. package/dist/libtess-asm-4883179d.js +0 -3673
  801. package/dist/libtess-fc70d1ce.js +0 -269
  802. package/dist/lineSegment-3aa941f5.js +0 -76
  803. package/dist/loadGLTFMesh-db6645f5.js +0 -181
  804. package/dist/loadable-266f324b.js +0 -24
  805. package/dist/loader-d1ce1bc1.js +0 -79
  806. package/dist/lyr3DWorker-dd48e619.js +0 -2108
  807. package/dist/mapViewDeps-226d9da3.js +0 -3052
  808. package/dist/mediaLayerUtils-ae485c27.js +0 -35
  809. package/dist/meshFeatureSet-8a2ad011.js +0 -126
  810. package/dist/meshVertexSpaceUtils-6efe3dcc.js +0 -58
  811. package/dist/multidimensionalUtils-508a3f3f.js +0 -290
  812. package/dist/normalizeUtilsSync-1dae280b.js +0 -181
  813. package/dist/number-5aa3a81b.js +0 -128
  814. package/dist/objectResourceUtils-642ab03e.js +0 -1455
  815. package/dist/observers-f646a6a4.js +0 -30
  816. package/dist/ogcFeatureUtils-46ac1c44.js +0 -206
  817. package/dist/openCloseComponent-47eb52c6.js +0 -37
  818. package/dist/orientedBoundingBox-554ccdc6.js +0 -447
  819. package/dist/parser-0701286c.js +0 -488
  820. package/dist/pbf-5dd791f5.js +0 -215
  821. package/dist/pbfQueryUtils-a6ca7e23.js +0 -422
  822. package/dist/pe-wasm-6c16b121.js +0 -887
  823. package/dist/persistable-9eb0e8df.js +0 -89
  824. package/dist/perspectiveUtils-b194621d.js +0 -42
  825. package/dist/pieChart-b97433d0.js +0 -555
  826. package/dist/plane-3398eec1.js +0 -160
  827. package/dist/popupUtils-c444b896.js +0 -22
  828. package/dist/popupUtils-d871563b.js +0 -50
  829. package/dist/portalItemUtils-4c4caad0.js +0 -57
  830. package/dist/portalLayers-cb07742f.js +0 -312
  831. package/dist/portalUtils-effd590f.js +0 -7
  832. package/dist/programUtils-65af7b7c.js +0 -59
  833. package/dist/project-ee9c2947.js +0 -21
  834. package/dist/projectPointToVector-7dc831a9.js +0 -14
  835. package/dist/projectVectorToVector-5163db7a.js +0 -13
  836. package/dist/quantityUtils-5cd4cf90.js +0 -33
  837. package/dist/quantizationUtils-0a8f74c6.js +0 -68
  838. package/dist/quat-a508aed3.js +0 -104
  839. package/dist/query-b6e1fd14.js +0 -89
  840. package/dist/queryAttachments-7b39ebdc.js +0 -39
  841. package/dist/queryEngineUtils-cb8e309e.js +0 -21
  842. package/dist/queryTopFeatures-2e0e3941.js +0 -50
  843. package/dist/queryZScale-c5733d0a.js +0 -12
  844. package/dist/rasterProjectionHelper-213afa27.js +0 -577
  845. package/dist/rasterUtils-f2e44e8b.js +0 -122
  846. package/dist/rasterizingUtils-25cc0190.js +0 -46
  847. package/dist/request-e0c679b3.js +0 -46
  848. package/dist/requestImageUtils-37d79281.js +0 -8
  849. package/dist/resourceExtension-5f3f1c80.js +0 -17
  850. package/dist/resourceUtils-0d68cbc2.js +0 -69
  851. package/dist/resourceUtils-374db840.js +0 -62
  852. package/dist/resourceUtils-43ce192b.js +0 -42
  853. package/dist/saveAPIKeyUtils-1a3d4a8a.js +0 -8
  854. package/dist/saveUtils-43fdc547.js +0 -24
  855. package/dist/scaleUtils-bdf8b6cb.js +0 -23
  856. package/dist/scrim-44eb4dc0.js +0 -114
  857. package/dist/serviceCapabilitiesUtils-823612b8.js +0 -64
  858. package/dist/sourceUtils-01d115c6.js +0 -71
  859. package/dist/sphere-908cd9aa.js +0 -199
  860. package/dist/statsWorker-49f9befe.js +0 -37
  861. package/dist/streamLayerUtils-29324e05.js +0 -31
  862. package/dist/styleUtils-82e8da52.js +0 -75
  863. package/dist/styleUtils-8541d60d.js +0 -14
  864. package/dist/sublayerUtils-eaac2486.js +0 -37
  865. package/dist/substitute-1f578d70.js +0 -52
  866. package/dist/symbolColorUtils-18fd6b3d.js +0 -8
  867. package/dist/symbolLayerUtils-4c58b291.js +0 -31
  868. package/dist/symbologySnappingCandidates-14d94b6b.js +0 -221
  869. package/dist/t9n-c1c2b6c8.js +0 -349
  870. package/dist/testSVGPremultipliedAlpha-159dac90.js +0 -94
  871. package/dist/timeSupport-3f529cdb.js +0 -410
  872. package/dist/triangle-8a3a2ba8.js +0 -98
  873. package/dist/unitConversionUtils-f0ebaf75.js +0 -17
  874. package/dist/unitFormatUtils-555e2d94.js +0 -40
  875. package/dist/uploadAssetErrors-d1389781.js +0 -70
  876. package/dist/uploadAssets-5e85f09d.js +0 -330
  877. package/dist/utils-3a10b10c.js +0 -34
  878. package/dist/utils-505c54e9.js +0 -91
  879. package/dist/utils-5432e258.js +0 -433
  880. package/dist/utils-7a88ec6a.js +0 -419
  881. package/dist/utils-7fa9cdf9.js +0 -2746
  882. package/dist/utils-d252c575.js +0 -73
  883. package/dist/utils-f07e00b3.js +0 -232
  884. package/dist/utils-fda10b4b.js +0 -79
  885. package/dist/utils3-c34ab97c.js +0 -75
  886. package/dist/vec3-f79c600d.js +0 -81
  887. package/dist/vec42-36edeb73.js +0 -125
  888. package/dist/versionUtils-6935648b.js +0 -161
  889. package/dist/visualVariableUtils-c425461a.js +0 -267
  890. package/dist/webStyleSymbolUtils-4f42a29f.js +0 -48
  891. package/dist/webglDeps-5f18210d.js +0 -23
  892. package/dist/wfsUtils-6f7f1e3e.js +0 -343
  893. package/dist/workerHelper-9dc9a790.js +0 -11
  894. package/dist/xyChart-e5648fee.js +0 -3335
@@ -0,0 +1,3990 @@
1
+ import { r as Ze, bY as _s, bV as ti, dQ as ws, jX as bs, s as q, bZ as Ms, a5 as Fs, da as Si, cl as ii, u as Se, kJ as rt, V as Ve, e as a, y as l, ei as Be, z as De, c as O, S as me, o as y, P as R, W as L, h0 as Is, fU as ee, fV as te, H as Ee, hO as qe, fW as h, fX as F, kK as si, kL as ni, kM as xe, fY as ne, kN as Cs, b as As, iq as $s, cj as Vi, ad as Bi, kO as qt, a3 as Es, dE as xs, dL as ke, iS as ks, by as gt, Y as Ts, U as Ls, B as ut, kP as Rs, kQ as Ps, kR as Os, a$ as zt, kS as Ns, kT as Di, cn as Ss, kU as ri, bj as Vs, bk as qi, eQ as yt, k as et, x as Bs, fz as zi, jN as Ds, i as Rt, dc as qs, p as ot, ec as zs, kV as Ws, kW as Hs, kX as ve, aO as Wi, kY as js, kZ as Us, k_ as Ge, k$ as Hi, fc as Zs, l0 as Qs, ab as Gs, bT as Xs, eD as Ys, eA as Ks, bS as Js, a_ as oi, fS as Le, fH as en } from "./index-f28919b2.js";
2
+ import { s as de } from "./substitute-7b4a925f.js";
3
+ import { O as tn } from "./unitFormatUtils-b79fea5c.js";
4
+ import { a as sn } from "./AttachmentInfo-a2849bf0.js";
5
+ import { c as ai } from "./AttachmentQuery-e743e06f.js";
6
+ import { Z as nn, N as Wt } from "./utils-9612bce6.js";
7
+ import "./ColorStop-1111f0fd.js";
8
+ import { h as Re, N as rn, g as vt, R as on, D as an } from "./utils-e30b7de3.js";
9
+ import { l as ln } from "./jsonUtils-9f58b7bb.js";
10
+ import { s as _t } from "./executeQueryJSON-cf7d748b.js";
11
+ import "./pbf-4ce99129.js";
12
+ import "./FeatureSet-595ae550.js";
13
+ import Pt from "./RelationshipQuery-0c20b8ed.js";
14
+ import "./TopFeaturesQuery-9e4228e7.js";
15
+ import dn from "./FeatureLayer-881827c7.js";
16
+ import "./colorUtils-6e9b620c.js";
17
+ import "./styleUtils-8f0e3848.js";
18
+ import { n as li } from "./layerViewUtils-052e603c.js";
19
+ import "vue";
20
+ import "./ByteSizeUnit-90df2840.js";
21
+ import "./quantityUtils-afe6e5b7.js";
22
+ import "./parser-8f715684.js";
23
+ import "./utils-0da4a164.js";
24
+ import "./LRUCache-5bebd9a8.js";
25
+ import "./MemCache-8f96824a.js";
26
+ import "./UniqueValueRenderer-7532473e.js";
27
+ import "./diffUtils-04a71a59.js";
28
+ import "./colorRamps-314c4b5a.js";
29
+ import "./sizeVariableUtils-a1b694d8.js";
30
+ import "./visualVariableUtils-1a38c540.js";
31
+ import "./lengthUtils-8796ccf3.js";
32
+ import "./jsonUtils-e40213c1.js";
33
+ import "./Version-2556ea28.js";
34
+ import "./FieldsIndex-390b005f.js";
35
+ import "./UnknownTimeZone-4c0a5184.js";
36
+ import "./OverrideHelper-7981ecc2.js";
37
+ import "./quantizationUtils-51d3a038.js";
38
+ import "./heatmapUtils-8e578a0a.js";
39
+ import "./vec42-1a7bd7a6.js";
40
+ import "./vec4f64-043e974c.js";
41
+ import "./query-8cf3e12b.js";
42
+ import "./pbfQueryUtils-23cca540.js";
43
+ import "./OptimizedGeometry-3b808152.js";
44
+ import "./OptimizedFeatureSet-54e095c4.js";
45
+ import "./queryZScale-112cd8e3.js";
46
+ import "./MultiOriginJSONSupport-365740bb.js";
47
+ import "./commonProperties-3399f319.js";
48
+ import "./ElevationInfo-5be88917.js";
49
+ import "./unitConversionUtils-b0c2c156.js";
50
+ import "./FormTemplate-728de82d.js";
51
+ import "./editsZScale-97938687.js";
52
+ import "./APIKeyMixin-688c6ac6.js";
53
+ import "./ArcGISService-a447176d.js";
54
+ import "./BlendLayer-113fd3b8.js";
55
+ import "./jsonUtils-d9bb6102.js";
56
+ import "./CustomParametersMixin-601866cc.js";
57
+ import "./EditBusLayer-55763028.js";
58
+ import "./FeatureEffectLayer-171a9749.js";
59
+ import "./FeatureEffect-5b570804.js";
60
+ import "./FeatureFilter-db89ec09.js";
61
+ import "./FeatureLayerBase-b410d8eb.js";
62
+ import "./featureLayerUtils-a7e985d2.js";
63
+ import "./LayerFloorInfo-5c67a822.js";
64
+ import "./serviceCapabilitiesUtils-cafdd4bc.js";
65
+ import "./FeatureReductionLayer-1f3f6a98.js";
66
+ import "./FeatureReductionSelection-b0c4bcaf.js";
67
+ import "./LabelClass-63459c37.js";
68
+ import "./labelUtils-3a1386e4.js";
69
+ import "./defaults-e5c5ee75.js";
70
+ import "./defaultsJSON-ba17aa15.js";
71
+ import "./MD5-1b5ec1c3.js";
72
+ import "./OperationalLayer-30f48d16.js";
73
+ import "./OrderedLayer-2962d196.js";
74
+ import "./OrderByInfo-9bd0a8fe.js";
75
+ import "./PortalLayer-21d22eb9.js";
76
+ import "./portalItemUtils-39079445.js";
77
+ import "./RefreshableLayer-e64dd0ee.js";
78
+ import "./ScaleRangeLayer-3bbd6ead.js";
79
+ import "./TemporalLayer-7c15b8a6.js";
80
+ import "./TimeInfo-f17e0ff9.js";
81
+ import "./FeatureTemplate-c810cba6.js";
82
+ import "./FeatureType-22de76b9.js";
83
+ import "./fieldProperties-a9fbe289.js";
84
+ import "./labelingInfo-69c9f8f4.js";
85
+ import "./versionUtils-b6c13869.js";
86
+ import "./styleUtils-a61894cc.js";
87
+ import "./popupUtils-e53c5c04.js";
88
+ import "./interfaces-fac3cfda.js";
89
+ function at(t, e, i, s) {
90
+ let n = null, r = 1e3;
91
+ typeof e == "number" ? (r = e, s = i) : (n = e ?? null, r = i);
92
+ let o, d = 0;
93
+ const c = () => {
94
+ d = 0, t.apply(s, o);
95
+ }, u = (...p) => {
96
+ n && n.apply(s, p), o = p, r ? d || (d = setTimeout(c, r)) : c();
97
+ };
98
+ return u.remove = () => {
99
+ d && (clearTimeout(d), d = 0);
100
+ }, u.forceUpdate = () => {
101
+ d && (clearTimeout(d), c());
102
+ }, u.hasPendingUpdates = () => !!d, u;
103
+ }
104
+ function Ot(t) {
105
+ var e;
106
+ switch (t == null ? void 0 : t.type) {
107
+ case "point":
108
+ return t;
109
+ case "extent":
110
+ return t.center;
111
+ case "polygon":
112
+ return t.centroid;
113
+ case "multipoint":
114
+ case "polyline":
115
+ return (e = t.extent) == null ? void 0 : e.center;
116
+ default:
117
+ return null;
118
+ }
119
+ }
120
+ function cn(t) {
121
+ return t ? { backgroundImage: `url(${t})` } : {};
122
+ }
123
+ function un({ action: t, feature: e }) {
124
+ const i = e == null ? void 0 : e.attributes, s = "image" in t ? t.image : void 0;
125
+ return s && i ? de(s, i) : s ?? "";
126
+ }
127
+ const hn = "esri.widgets.Feature.support.featureUtils", di = () => q.getLogger(hn), pn = /href=(""|'')/gi, mn = /(\{([^\{\r\n]+)\})/g, fn = /\'/g, ji = /^\s*expression\//i, gn = /(\n)/gi, yn = /[\u00A0-\u9999<>\&]/gim, vn = /href\s*=\s*(?:\"([^\"]+)\"|\'([^\']+)\')/gi, _n = /^(?:mailto:|tel:)/, Ui = "relationships/", ci = Ms("short-date-short-time");
128
+ function Zi(t) {
129
+ if (t != null)
130
+ return (t.sourceLayer || t.layer) ?? void 0;
131
+ }
132
+ async function lt(t, e) {
133
+ return typeof t == "function" ? t(e) : t;
134
+ }
135
+ function Qi(t = "") {
136
+ if (t)
137
+ return !_n.test(t.trim().toLowerCase());
138
+ }
139
+ function Ht(t) {
140
+ return !!t && ji.test(t);
141
+ }
142
+ function wn(t, e) {
143
+ if (!Ht(e) || !t)
144
+ return;
145
+ const i = e.replace(ji, "").toLowerCase();
146
+ return t.find(({ name: s }) => s.toLowerCase() === i);
147
+ }
148
+ function Gi(t, e) {
149
+ const i = wn(e, t == null ? void 0 : t.fieldName);
150
+ return i ? i.title || null : t ? t.label || t.fieldName : null;
151
+ }
152
+ function bn(t, e) {
153
+ const i = e.get(t.toLowerCase());
154
+ return `{${(i == null ? void 0 : i.fieldName) || t}}`;
155
+ }
156
+ function Mn(t) {
157
+ return t.replaceAll(pn, "");
158
+ }
159
+ function Qe(t, e) {
160
+ const i = jt(e, t);
161
+ return i ? i.name : t;
162
+ }
163
+ function Fn(t, e) {
164
+ return t && t.map((i) => Qe(i, e));
165
+ }
166
+ function jt(t, e) {
167
+ return t && typeof t.getField == "function" && e ? t.getField(e) ?? null : null;
168
+ }
169
+ function Xi(t) {
170
+ return `${t}`.trim();
171
+ }
172
+ function Ie({ attributes: t, globalAttributes: e, layer: i, text: s, expressionAttributes: n, fieldInfoMap: r }) {
173
+ return s ? Nt({ formattedAttributes: e, template: $n(s, { ...e, ...n, ...t }, i), fieldInfoMap: r }) : "";
174
+ }
175
+ function Nt({ formattedAttributes: t, template: e, fieldInfoMap: i }) {
176
+ return Xi(Mn(Ze(Ze(e, (s) => bn(s, i)), t)));
177
+ }
178
+ function In(t, e, i = !1) {
179
+ const s = e[t];
180
+ if (typeof s == "string") {
181
+ const n = "%27", r = (i ? encodeURIComponent(s) : s).replaceAll(fn, n);
182
+ e[t] = r;
183
+ }
184
+ }
185
+ function Cn(t, e = !1) {
186
+ const i = { ...t };
187
+ return Object.keys(i).forEach((s) => In(s, i, e)), i;
188
+ }
189
+ function An(t, e, i) {
190
+ const s = (e = Xi(e)) && e[0] !== "{";
191
+ return Ze(t, Cn(i, s || !1));
192
+ }
193
+ function St(t, e) {
194
+ return t.replaceAll(mn, (i, s, n) => {
195
+ const r = jt(e, n);
196
+ return r ? `{${r.name}}` : s;
197
+ });
198
+ }
199
+ function $n(t, e, i) {
200
+ const s = St(t, i);
201
+ return s && s.replaceAll(vn, (n, r, o) => An(n, r || o, e));
202
+ }
203
+ function En(t, e) {
204
+ if (typeof t == "string" && e && e.dateFormat == null && (e.places != null || e.digitSeparator != null)) {
205
+ const i = Number(t);
206
+ if (!isNaN(i))
207
+ return i;
208
+ }
209
+ return t;
210
+ }
211
+ function xn(t) {
212
+ return t != null && typeof t == "object" && "fieldsIndex" in t && "geometryType" in t && "getField" in t && "load" in t && "loaded" in t && "objectIdField" in t && "spatialReference" in t && "type" in t && (t.type === "feature" || t.type === "scene") && "when" in t;
213
+ }
214
+ function kn(t) {
215
+ return t != null && typeof t == "object" && "createQuery" in t && "queryFeatureCount" in t && "queryObjectIds" in t && "queryRelatedFeatures" in t && "queryRelatedFeaturesCount" in t && "relationships" in t;
216
+ }
217
+ function Yi(t) {
218
+ return xn(t) && kn(t);
219
+ }
220
+ function Tn(t, e) {
221
+ var p;
222
+ const { fieldInfos: i, fieldName: s, preventPlacesFormatting: n, layer: r, timeZone: o } = e, d = Ki(i, s), c = jt(r, s);
223
+ if (d && !ii(s)) {
224
+ const m = c == null ? void 0 : c.type, f = (p = d.format) == null ? void 0 : p.dateFormat;
225
+ if (m === "date" || m === "date-only" || m === "time-only" || m === "timestamp-offset" || f)
226
+ return Wt(t, { format: f, fieldType: m, timeZoneOptions: { layerTimeZone: r && "preferredTimeZone" in r ? r.preferredTimeZone : null, viewTimeZone: o, datesInUnknownTimezone: !(!r || !("datesInUnknownTimezone" in r)) && !!r.datesInUnknownTimezone } });
227
+ }
228
+ const u = d == null ? void 0 : d.format;
229
+ return typeof t == "string" && ii(s) && u ? Ln(t, u) : typeof (t = En(t, u)) == "string" || t == null || u == null ? Xe(t) : Se(t, n ? { ...rt(u), minimumFractionDigits: 0, maximumFractionDigits: 20 } : rt(u));
230
+ }
231
+ function Ln(t, e) {
232
+ return t = t.trim(), /\d{2}-\d{2}/.test(t) ? t : t.includes(",") ? wt(t, ",", ", ", e) : t.includes(";") ? wt(t, ";", "; ", e) : t.includes(" ") ? wt(t, " ", " ", e) : Se(Number(t), rt(e));
233
+ }
234
+ function wt(t, e, i, s) {
235
+ return t.trim().split(e).map((n) => Se(Number(n), rt(s))).join(i);
236
+ }
237
+ function Ki(t, e) {
238
+ if (t != null && t.length && e)
239
+ return t.find((i) => {
240
+ var s;
241
+ return ((s = i.fieldName) == null ? void 0 : s.toLowerCase()) === e.toLowerCase();
242
+ });
243
+ }
244
+ function Rn({ fieldName: t, graphic: e, layer: i }) {
245
+ if (pe(t) || !i || typeof i.getFeatureType != "function")
246
+ return null;
247
+ const { typeIdField: s } = i;
248
+ if (!s || t !== s)
249
+ return null;
250
+ const n = i.getFeatureType(e);
251
+ return n ? n.name : null;
252
+ }
253
+ function Pn({ fieldName: t, value: e, graphic: i, layer: s }) {
254
+ if (pe(t) || !s || typeof s.getFieldDomain != "function")
255
+ return null;
256
+ const n = i && s.getFieldDomain(t, { feature: i });
257
+ return n && n.type === "coded-value" ? n.getName(e) : null;
258
+ }
259
+ function On(t, e, i, s) {
260
+ const { creatorField: n, creationDateField: r, editorField: o, editDateField: d } = t;
261
+ if (!e)
262
+ return;
263
+ const c = _s(s && "preferredTimeZone" in s ? s.preferredTimeZone : null, !(!s || !("datesInUnknownTimezone" in s)) && !!s.datesInUnknownTimezone, i, ci, "date"), u = { ...ci, ...c }, p = e[d];
264
+ if (typeof p == "number") {
265
+ const f = e[o];
266
+ return { type: "edit", date: ti(p, u), user: f };
267
+ }
268
+ const m = e[r];
269
+ if (typeof m == "number") {
270
+ const f = e[n];
271
+ return { type: "create", date: ti(m, u), user: f };
272
+ }
273
+ return null;
274
+ }
275
+ function Nn(t, e) {
276
+ const i = /* @__PURE__ */ new Map();
277
+ return t && t.forEach((s) => {
278
+ const n = Qe(s.fieldName, e);
279
+ s.fieldName = n, i.set(n.toLowerCase(), s);
280
+ }), i;
281
+ }
282
+ function ui(t) {
283
+ const e = [];
284
+ if (!t)
285
+ return e;
286
+ const { fieldInfos: i, content: s } = t;
287
+ return i && e.push(...i), s && Array.isArray(s) && s.forEach((n) => {
288
+ if (n.type === "fields") {
289
+ const r = n == null ? void 0 : n.fieldInfos;
290
+ r && e.push(...r);
291
+ }
292
+ }), e;
293
+ }
294
+ function Ut(t) {
295
+ return t.replaceAll(yn, (e) => `&#${e.charCodeAt(0)};`);
296
+ }
297
+ function Xe(t) {
298
+ return typeof t == "string" ? t.replaceAll(gn, '<br class="esri-text-new-line" />') : t;
299
+ }
300
+ function Ji(t) {
301
+ var m;
302
+ const { value: e, fieldName: i, fieldInfos: s, fieldInfoMap: n, layer: r, graphic: o, timeZone: d } = t;
303
+ if (e == null)
304
+ return "";
305
+ const c = Pn({ fieldName: i, value: e, graphic: o, layer: r });
306
+ if (c)
307
+ return c;
308
+ const u = Rn({ fieldName: i, graphic: o, layer: r });
309
+ if (u)
310
+ return u;
311
+ if (n.get(i.toLowerCase()))
312
+ return Tn(e, { fieldInfos: s || Array.from(n.values()), fieldName: i, layer: r, timeZone: d });
313
+ const p = (m = r == null ? void 0 : r.fieldsIndex) == null ? void 0 : m.get(i);
314
+ return p && (nn(p) || Fs(p)) ? Wt(e, { fieldType: p.type, timeZoneOptions: { layerTimeZone: r && "preferredTimeZone" in r ? r.preferredTimeZone : null, viewTimeZone: d, datesInUnknownTimezone: !(!r || !("datesInUnknownTimezone" in r)) && !!r.datesInUnknownTimezone } }) : Xe(e);
315
+ }
316
+ function bt({ fieldInfos: t, attributes: e, layer: i, graphic: s, fieldInfoMap: n, relatedInfos: r, timeZone: o }) {
317
+ const d = {};
318
+ return r == null || r.forEach((c) => Dn({ attributes: d, relatedInfo: c, fieldInfoMap: n, fieldInfos: t, layer: i, timeZone: o })), e && Object.keys(e).forEach((c) => {
319
+ const u = e[c];
320
+ d[c] = Ji({ fieldName: c, fieldInfos: t, fieldInfoMap: n, layer: i, value: u, graphic: s, timeZone: o });
321
+ }), d;
322
+ }
323
+ async function es(t, e) {
324
+ var p, m;
325
+ const { layer: i, graphic: s, outFields: n, objectIds: r, returnGeometry: o, spatialReference: d } = t, c = r[0];
326
+ if (typeof c != "number" && typeof c != "string") {
327
+ const f = "Could not query required fields for the specified feature. The feature's ID is invalid.", g = { layer: i, graphic: s, objectId: c, requiredFields: n };
328
+ return di().warn(f, g), null;
329
+ }
330
+ if (!((m = (p = ws(i)) == null ? void 0 : p.operations) != null && m.supportsQuery)) {
331
+ const f = "The specified layer cannot be queried. The following fields will not be available.", g = { layer: i, graphic: s, requiredFields: n, returnGeometry: o };
332
+ return di().warn(f, g), null;
333
+ }
334
+ const u = i.createQuery();
335
+ return u.objectIds = r, u.outFields = n != null && n.length ? n : [i.objectIdField], u.returnGeometry = !!o, u.returnZ = !!o, u.returnM = !!o, u.outSpatialReference = d, (await i.queryFeatures(u, e)).features[0];
336
+ }
337
+ async function Sn(t) {
338
+ var s;
339
+ if (!((s = t.expressionInfos) != null && s.length))
340
+ return !1;
341
+ const e = await Si(), { arcadeUtils: { hasGeometryFunctions: i } } = e;
342
+ return i(t);
343
+ }
344
+ async function Vn({ graphic: t, popupTemplate: e, layer: i, spatialReference: s }, n) {
345
+ if (!i || !e || (typeof i.load == "function" && await i.load(n), !t.attributes))
346
+ return;
347
+ const r = t.attributes[i.objectIdField];
348
+ if (r == null)
349
+ return;
350
+ const o = [r], d = await e.getRequiredFields(i.fieldsIndex), c = bs(d, t), u = c ? [] : d, p = e.returnGeometry || await Sn(e);
351
+ if (c && !p)
352
+ return;
353
+ const m = await es({ layer: i, graphic: t, outFields: u, objectIds: o, returnGeometry: p, spatialReference: s }, n);
354
+ m && (m.geometry && (t.geometry = m.geometry), m.attributes && (t.attributes = { ...t.attributes, ...m.attributes }));
355
+ }
356
+ function pe(t = "") {
357
+ return !!t && t.includes(Ui);
358
+ }
359
+ function Bn(t) {
360
+ return t ? `${Ui}${t.layerId}/${t.fieldName}` : "";
361
+ }
362
+ function hi({ attributes: t, graphic: e, relatedInfo: i, fieldInfos: s, fieldInfoMap: n, layer: r, timeZone: o }) {
363
+ t && e && i && Object.keys(e.attributes).forEach((d) => {
364
+ const c = Bn({ layerId: i.relation.id.toString(), fieldName: d }), u = e.attributes[d];
365
+ t[c] = Ji({ fieldName: c, fieldInfos: s, fieldInfoMap: n, layer: r, value: u, graphic: e, timeZone: o });
366
+ });
367
+ }
368
+ function Dn({ attributes: t, relatedInfo: e, fieldInfoMap: i, fieldInfos: s, layer: n, timeZone: r }) {
369
+ var o, d;
370
+ t && e && ((o = e.relatedFeatures) == null || o.forEach((c) => hi({ attributes: t, graphic: c, relatedInfo: e, fieldInfoMap: i, fieldInfos: s, layer: n, timeZone: r })), (d = e.relatedStatsFeatures) == null || d.forEach((c) => hi({ attributes: t, graphic: c, relatedInfo: e, fieldInfoMap: i, fieldInfos: s, layer: n, timeZone: r })));
371
+ }
372
+ const pi = (t) => {
373
+ if (!t)
374
+ return !1;
375
+ const e = t.toUpperCase();
376
+ return e.includes("CURRENT_TIMESTAMP") || e.includes("CURRENT_DATE") || e.includes("CURRENT_TIME");
377
+ }, ts = ({ layer: t, method: e, query: i, definitionExpression: s }) => {
378
+ var o, d;
379
+ if (!((d = (o = t.capabilities) == null ? void 0 : o.query) != null && d.supportsCacheHint) || e === "attachments")
380
+ return;
381
+ const n = i.where != null ? i.where : null, r = i.geometry != null ? i.geometry : null;
382
+ pi(s) || pi(n) || (r == null ? void 0 : r.type) === "extent" || i.resultType === "tile" || (i.cacheHint = !0);
383
+ }, qn = ({ query: t, layer: e, method: i }) => {
384
+ ts({ layer: e, method: i, query: t, definitionExpression: `${e.definitionExpression} ${e.serviceDefinitionExpression}` });
385
+ }, zn = ({ queryPayload: t, layer: e, method: i }) => {
386
+ ts({ layer: e, method: i, query: t, definitionExpression: `${e.definitionExpression} ${e.serviceDefinitionExpression}` });
387
+ };
388
+ function Wn(t, e, i) {
389
+ return t && e && i ? mi(t.allLayers, e, i) || mi(t.allTables, e, i) : null;
390
+ }
391
+ function mi(t, e, { relatedTableId: i }) {
392
+ const s = e.type === "scene" && e.associatedLayer ? e.associatedLayer.url : e.url;
393
+ return t.filter(Yi).find((n) => n !== e && n.url === s && n.layerId === i);
394
+ }
395
+ const fi = { editing: !1, operations: { add: !0, update: !0, delete: !0 } }, is = Ve.ofType(sn);
396
+ let X = class extends me {
397
+ constructor(e) {
398
+ super(e), this._getAttachmentsPromise = null, this._attachmentLayer = null, this.capabilities = { ...fi }, this.activeAttachmentInfo = null, this.activeFileInfo = null, this.attachmentInfos = new is(), this.fileInfos = new Ve(), this.graphic = null, this.mode = "view", this.filesEnabled = !1, this.addHandles(y(() => this.graphic, () => this._graphicChanged(), R));
399
+ }
400
+ destroy() {
401
+ this._attachmentLayer = null, this.graphic = null;
402
+ }
403
+ castCapabilities(e) {
404
+ return { ...fi, ...e };
405
+ }
406
+ get state() {
407
+ return this._getAttachmentsPromise ? "loading" : this.graphic ? "ready" : "disabled";
408
+ }
409
+ get supportsResizeAttachments() {
410
+ const { graphic: e } = this;
411
+ if (!e)
412
+ return !1;
413
+ const i = e.layer || e.sourceLayer;
414
+ return (i == null ? void 0 : i.loaded) && "capabilities" in i && i.capabilities && "operations" in i.capabilities && "supportsResizeAttachments" in i.capabilities.operations && i.capabilities.operations.supportsResizeAttachments || !1;
415
+ }
416
+ async getAttachments() {
417
+ const { _attachmentLayer: e, attachmentInfos: i } = this;
418
+ if (!e || typeof e.queryAttachments != "function")
419
+ throw new L("invalid-layer", "getAttachments(): A valid layer is required.");
420
+ const s = this._getObjectId(), n = new ai({ objectIds: [s], returnMetadata: !0 }), r = [], o = e.queryAttachments(n).then((c) => c[s] || r).catch(() => r);
421
+ this._getAttachmentsPromise = o, this.notifyChange("state");
422
+ const d = await o;
423
+ return i.removeAll(), d.length && i.addMany(d), this._getAttachmentsPromise = null, this.notifyChange("state"), d;
424
+ }
425
+ async addAttachment(e, i = this.graphic) {
426
+ var c;
427
+ const { _attachmentLayer: s, attachmentInfos: n, capabilities: r } = this;
428
+ if (!i)
429
+ throw new L("invalid-graphic", "addAttachment(): A valid graphic is required.", { graphic: i });
430
+ if (!e)
431
+ throw new L("invalid-attachment", "addAttachment(): An attachment is required.", { attachment: e });
432
+ if (!((c = r.operations) != null && c.add))
433
+ throw new L("invalid-capabilities", "addAttachment(): add capabilities are required.");
434
+ if (!s || typeof s.addAttachment != "function")
435
+ throw new L("invalid-layer", "addAttachment(): A valid layer is required.");
436
+ const o = s.addAttachment(i, e).then((u) => this._queryAttachment(u.objectId, i)), d = await o;
437
+ return n.add(d), d;
438
+ }
439
+ async deleteAttachment(e) {
440
+ var c;
441
+ const { _attachmentLayer: i, attachmentInfos: s, graphic: n, capabilities: r } = this;
442
+ if (!e)
443
+ throw new L("invalid-attachment-info", "deleteAttachment(): An attachmentInfo is required.", { attachmentInfo: e });
444
+ if (!((c = r.operations) != null && c.delete))
445
+ throw new L("invalid-capabilities", "deleteAttachment(): delete capabilities are required.");
446
+ if (!i || typeof i.deleteAttachments != "function")
447
+ throw new L("invalid-layer", "deleteAttachment(): A valid layer is required.");
448
+ if (!n)
449
+ throw new L("invalid-graphic", "deleteAttachment(): A graphic is required.");
450
+ const o = i.deleteAttachments(n, [e.id]).then(() => e), d = await o;
451
+ return s.remove(d), d;
452
+ }
453
+ async updateAttachment(e, i = this.activeAttachmentInfo) {
454
+ var p;
455
+ const { _attachmentLayer: s, attachmentInfos: n, graphic: r, capabilities: o } = this;
456
+ if (!e)
457
+ throw new L("invalid-attachment", "updateAttachment(): An attachment is required.", { attachment: e });
458
+ if (!i)
459
+ throw new L("invalid-attachment-info", "updateAttachment(): An attachmentInfo is required.", { attachmentInfo: i });
460
+ if (!((p = o.operations) != null && p.update))
461
+ throw new L("invalid-capabilities", "updateAttachment(): Update capabilities are required.");
462
+ const d = n.indexOf(i);
463
+ if (!s || typeof s.updateAttachment != "function")
464
+ throw new L("invalid-layer", "updateAttachment(): A valid layer is required.");
465
+ if (!r)
466
+ throw new L("invalid-graphic", "updateAttachment(): A graphic is required.");
467
+ const c = s.updateAttachment(r, i.id, e).then((m) => this._queryAttachment(m.objectId)), u = await c;
468
+ return n.splice(d, 1, u), u;
469
+ }
470
+ async commitFiles() {
471
+ return await Promise.all(this.fileInfos.items.map((e) => this.addAttachment(e.form))), this.fileInfos.removeAll(), this.getAttachments();
472
+ }
473
+ addFile(e, i) {
474
+ if (!e || !i)
475
+ return null;
476
+ const s = { file: e, form: i };
477
+ return this.fileInfos.add(s), s;
478
+ }
479
+ updateFile(e, i, s = this.activeFileInfo) {
480
+ if (!e || !i || !s)
481
+ return null;
482
+ const n = this.fileInfos.indexOf(s);
483
+ return n > -1 && this.fileInfos.splice(n, 1, { file: e, form: i }), this.fileInfos.items[n];
484
+ }
485
+ deleteFile(e) {
486
+ const i = this.fileInfos.find((s) => s.file === e);
487
+ return i ? (this.fileInfos.remove(i), i) : null;
488
+ }
489
+ async _queryAttachment(e, i) {
490
+ const { _attachmentLayer: s } = this;
491
+ if (!e || !(s != null && s.queryAttachments))
492
+ throw new L("invalid-attachment-id", "Could not query attachment.");
493
+ const n = this._getObjectId(i), r = new ai({ objectIds: [n], attachmentsWhere: `AttachmentId=${e}`, returnMetadata: !0 });
494
+ return s.queryAttachments(r).then((o) => o[n][0]);
495
+ }
496
+ _getObjectId(e = this.graphic) {
497
+ return (e == null ? void 0 : e.getObjectId()) ?? null;
498
+ }
499
+ _graphicChanged() {
500
+ this.graphic && (this._setAttachmentLayer(), this.getAttachments().catch(() => {
501
+ }));
502
+ }
503
+ _setAttachmentLayer() {
504
+ const { graphic: e } = this, i = Zi(e);
505
+ this._attachmentLayer = i ? i.type === "scene" && i.associatedLayer != null ? i.associatedLayer : i : null;
506
+ }
507
+ };
508
+ a([l()], X.prototype, "capabilities", void 0), a([Be("capabilities")], X.prototype, "castCapabilities", null), a([l()], X.prototype, "activeAttachmentInfo", void 0), a([l()], X.prototype, "activeFileInfo", void 0), a([l({ readOnly: !0, type: is })], X.prototype, "attachmentInfos", void 0), a([l()], X.prototype, "fileInfos", void 0), a([l({ type: De })], X.prototype, "graphic", void 0), a([l()], X.prototype, "mode", void 0), a([l({ readOnly: !0 })], X.prototype, "state", null), a([l()], X.prototype, "filesEnabled", void 0), a([l({ readOnly: !0 })], X.prototype, "supportsResizeAttachments", null), X = a([O("esri.widgets.Attachments.AttachmentsViewModel")], X);
509
+ const Zt = X;
510
+ function gi(t) {
511
+ const e = t.toLowerCase();
512
+ return e === "image/bmp" || e === "image/emf" || e === "image/exif" || e === "image/gif" || e === "image/x-icon" || e === "image/jpeg" || e === "image/png" || e === "image/tiff" || e === "image/x-wmf";
513
+ }
514
+ function Hn(t) {
515
+ const e = Is("esri/themes/base/images/files/");
516
+ return t ? t === "text/plain" ? `${e}text-32.svg` : t === "application/pdf" ? `${e}pdf-32.svg` : t === "text/csv" ? `${e}csv-32.svg` : t === "application/gpx+xml" ? `${e}gpx-32.svg` : t === "application/x-dwf" ? `${e}cad-32.svg` : t === "application/postscript" || t === "application/json" || t === "text/xml" || t === "model/vrml" ? `${e}code-32.svg` : t === "application/x-zip-compressed" || t === "application/x-7z-compressed" || t === "application/x-gzip" || t === "application/x-tar" || t === "application/x-gtar" || t === "application/x-bzip2" || t === "application/gzip" || t === "application/x-compress" || t === "application/x-apple-diskimage" || t === "application/x-rar-compressed" || t === "application/zip" ? `${e}zip-32.svg` : t.includes("image/") ? `${e}image-32.svg` : t.includes("audio/") ? `${e}sound-32.svg` : t.includes("video/") ? `${e}video-32.svg` : t.includes("msexcel") || t.includes("ms-excel") || t.includes("spreadsheetml") ? `${e}excel-32.svg` : t.includes("msword") || t.includes("ms-word") || t.includes("wordprocessingml") ? `${e}word-32.svg` : t.includes("powerpoint") || t.includes("presentationml") ? `${e}report-32.svg` : `${e}generic-32.svg` : `${e}generic-32.svg`;
517
+ }
518
+ const yi = { addButton: !0, addSubmitButton: !0, cancelAddButton: !0, cancelUpdateButton: !0, deleteButton: !0, errorMessage: !0, progressBar: !0, updateButton: !0 }, E = "esri-attachments", b = { base: E, loaderContainer: `${E}__loader-container`, loader: `${E}__loader`, fadeIn: `${E}--fade-in`, container: `${E}__container`, containerList: `${E}__container--list`, containerPreview: `${E}__container--preview`, actions: `${E}__actions`, deleteButton: `${E}__delete-button`, addAttachmentButton: `${E}__add-attachment-button`, errorMessage: `${E}__error-message`, items: `${E}__items`, item: `${E}__item`, itemButton: `${E}__item-button`, itemMask: `${E}__item-mask`, itemMaskIcon: `${E}__item-mask--icon`, itemImage: `${E}__image`, itemImageResizable: `${E}__image--resizable`, itemLabel: `${E}__label`, itemFilename: `${E}__filename`, itemChevronIcon: `${E}__item-chevron-icon`, itemLink: `${E}__item-link`, itemLinkOverlay: `${E}__item-link-overlay`, itemLinkOverlayIcon: `${E}__item-link-overlay-icon`, itemEditIcon: `${E}__item-edit-icon`, itemAddIcon: `${E}__item-add-icon`, itemAddButton: `${E}__item-add-button`, formNode: `${E}__form-node`, fileFieldset: `${E}__file-fieldset`, fileLabel: `${E}__file-label`, fileName: `${E}__file-name`, fileInput: `${E}__file-input`, metadata: `${E}__metadata`, metadataFieldset: `${E}__metadata-fieldset`, progressBar: `${E}__progress-bar` }, Mt = window.CSS;
519
+ let U = class extends te {
520
+ constructor(e, i) {
521
+ super(e, i), this.displayType = "auto", this.messages = null, this.messagesUnits = null, this.selectedFile = null, this.submitting = !1, this.viewModel = null, this.visibleElements = { ...yi }, this._supportsImageOrientation = Mt && Mt.supports && Mt.supports("image-orientation", "from-image"), this._addAttachmentForm = null, this._updateAttachmentForm = null;
522
+ }
523
+ normalizeCtorArgs(e) {
524
+ return e != null && e.viewModel || (e = { viewModel: new Zt(), ...e }), e;
525
+ }
526
+ initialize() {
527
+ this.addHandles([Ee(() => {
528
+ var e;
529
+ return (e = this.viewModel) == null ? void 0 : e.attachmentInfos;
530
+ }, "change", () => this.scheduleRender()), Ee(() => {
531
+ var e;
532
+ return (e = this.viewModel) == null ? void 0 : e.fileInfos;
533
+ }, "change", () => this.scheduleRender()), y(() => {
534
+ var e;
535
+ return (e = this.viewModel) == null ? void 0 : e.mode;
536
+ }, () => this._modeChanged(), R)]);
537
+ }
538
+ loadDependencies() {
539
+ return qe({ icon: () => import("./calcite-icon-07f22bc6.js") });
540
+ }
541
+ get capabilities() {
542
+ return this.viewModel.capabilities;
543
+ }
544
+ set capabilities(e) {
545
+ this.viewModel.capabilities = e;
546
+ }
547
+ get effectiveDisplayType() {
548
+ const { displayType: e } = this;
549
+ return e && e !== "auto" ? e : this.viewModel.supportsResizeAttachments ? "preview" : "list";
550
+ }
551
+ get graphic() {
552
+ return this.viewModel.graphic;
553
+ }
554
+ set graphic(e) {
555
+ this.viewModel.graphic = e;
556
+ }
557
+ get label() {
558
+ var e;
559
+ return ((e = this.messages) == null ? void 0 : e.widgetLabel) ?? "";
560
+ }
561
+ set label(e) {
562
+ this._overrideIfSome("label", e);
563
+ }
564
+ castVisibleElements(e) {
565
+ return { ...yi, ...e };
566
+ }
567
+ addAttachment() {
568
+ const { _addAttachmentForm: e, viewModel: i } = this;
569
+ return this._set("submitting", !0), this._set("error", null), i.addAttachment(e).then((s) => (this._set("submitting", !1), this._set("error", null), i.mode = "view", s)).catch((s) => {
570
+ throw this._set("submitting", !1), this._set("error", new L("attachments:add-attachment", this.messages.addErrorMessage, s)), s;
571
+ });
572
+ }
573
+ deleteAttachment(e) {
574
+ const { viewModel: i } = this;
575
+ return this._set("submitting", !0), this._set("error", null), i.deleteAttachment(e).then((s) => (this._set("submitting", !1), this._set("error", null), i.mode = "view", s)).catch((s) => {
576
+ throw this._set("submitting", !1), this._set("error", new L("attachments:delete-attachment", this.messages.deleteErrorMessage, s)), s;
577
+ });
578
+ }
579
+ updateAttachment() {
580
+ const { viewModel: e } = this, { _updateAttachmentForm: i } = this;
581
+ return this._set("submitting", !0), this._set("error", null), e.updateAttachment(i).then((s) => (this._set("submitting", !1), this._set("error", null), e.mode = "view", s)).catch((s) => {
582
+ throw this._set("submitting", !1), this._set("error", new L("attachments:update-attachment", this.messages.updateErrorMessage, s)), s;
583
+ });
584
+ }
585
+ addFile() {
586
+ const e = this.viewModel.addFile(this.selectedFile, this._addAttachmentForm);
587
+ return this.viewModel.mode = "view", e;
588
+ }
589
+ updateFile() {
590
+ const { viewModel: e } = this, i = e.updateFile(this.selectedFile, this._updateAttachmentForm, e.activeFileInfo);
591
+ return e.mode = "view", i;
592
+ }
593
+ deleteFile(e) {
594
+ var s;
595
+ const i = this.viewModel.deleteFile(e || ((s = this.viewModel.activeFileInfo) == null ? void 0 : s.file));
596
+ return this.viewModel.mode = "view", i;
597
+ }
598
+ render() {
599
+ const { submitting: e, viewModel: i } = this, { state: s } = i;
600
+ return h("div", { class: this.classes(b.base, F.widget) }, e ? this._renderProgressBar() : null, s === "loading" ? this._renderLoading() : this._renderAttachments(), this._renderErrorMessage());
601
+ }
602
+ _renderErrorMessage() {
603
+ const { error: e, visibleElements: i } = this;
604
+ return e && i.errorMessage ? h("div", { class: b.errorMessage, key: "error-message" }, e.message) : null;
605
+ }
606
+ _renderAttachments() {
607
+ const { activeFileInfo: e, mode: i, activeAttachmentInfo: s } = this.viewModel;
608
+ return i === "add" ? this._renderAddForm() : i === "edit" ? this._renderDetailsForm(s || e) : this._renderAttachmentContainer();
609
+ }
610
+ _renderLoading() {
611
+ return h("div", { class: b.loaderContainer, key: "loader" }, h("div", { class: b.loader }));
612
+ }
613
+ _renderProgressBar() {
614
+ return this.visibleElements.progressBar ? h("div", { class: b.progressBar, key: "progress-bar" }) : null;
615
+ }
616
+ _renderAddForm() {
617
+ const { submitting: e, selectedFile: i } = this, s = e || !i, n = this.visibleElements.cancelAddButton ? h("button", { bind: this, class: this.classes(F.button, F.buttonTertiary, F.buttonSmall, F.buttonHalf, e && F.buttonDisabled), disabled: e, onclick: this._cancelForm, type: "button" }, this.messages.cancel) : null, r = this.visibleElements.addSubmitButton ? h("button", { class: this.classes(F.button, F.buttonSecondary, F.buttonSmall, F.buttonHalf, { [F.buttonDisabled]: s }), disabled: s, type: "submit" }, this.messages.add) : null, o = i ? h("span", { class: b.fileName, key: "file-name" }, i.name) : null, d = h("form", { afterCreate: si, afterRemoved: ni, bind: this, "data-node-ref": "_addAttachmentForm", onsubmit: this._submitAddAttachment }, h("fieldset", { class: b.fileFieldset }, o, h("label", { class: this.classes(b.fileLabel, F.button, F.buttonSecondary) }, i ? this.messages.changeFile : this.messages.selectFile, h("input", { bind: this, class: b.fileInput, name: "attachment", onchange: this._handleFileInputChange, type: "file" }))), r, n);
618
+ return h("div", { class: b.formNode, key: "add-form-container" }, d);
619
+ }
620
+ _renderDetailsForm(e) {
621
+ var M, re, K;
622
+ const { visibleElements: i, viewModel: s, selectedFile: n, submitting: r } = this, { capabilities: o } = s, d = r || !n;
623
+ let c, u, p, m;
624
+ n ? (c = n.type, u = n.name, p = n.size) : e && "file" in e ? (c = e.file.type, u = e.file.name, p = e.file.size) : e && "contentType" in e && (c = e.contentType, u = e.name, p = e.size, m = e.url);
625
+ const f = o.editing && ((M = o.operations) != null && M.delete) && i.deleteButton ? h("button", { bind: this, class: this.classes(F.button, F.buttonSmall, F.buttonTertiary, b.deleteButton, { [F.buttonDisabled]: r }), disabled: r, key: "delete-button", onclick: (ie) => this._submitDeleteAttachment(ie, e), type: "button" }, this.messages.delete) : void 0, g = o.editing && ((re = o.operations) != null && re.update) && i.updateButton ? h("button", { class: this.classes(F.button, F.buttonSmall, F.buttonThird, { [F.buttonDisabled]: d }), disabled: d, key: "update-button", type: "submit" }, this.messages.update) : void 0, v = this.visibleElements.cancelUpdateButton ? h("button", { bind: this, class: this.classes(F.button, F.buttonSmall, F.buttonTertiary, F.buttonThird, { [F.buttonDisabled]: r }), disabled: r, key: "cancel-button", onclick: this._cancelForm, type: "button" }, this.messages.cancel) : void 0, _ = o.editing && ((K = o.operations) != null && K.update) ? h("fieldset", { class: b.fileFieldset, key: "file" }, h("span", { class: b.fileName, key: "file-name" }, u), h("label", { class: this.classes(b.fileLabel, F.button, F.buttonSecondary) }, this.messages.changeFile, h("input", { bind: this, class: b.fileInput, name: "attachment", onchange: this._handleFileInputChange, type: "file" }))) : void 0, I = h("fieldset", { class: b.metadataFieldset, key: "size" }, h("label", null, tn(this.messagesUnits, p ?? 0))), w = h("fieldset", { class: b.metadataFieldset, key: "content-type" }, h("label", null, c)), A = m != null ? h("a", { class: b.itemLink, href: m, rel: "noreferrer", target: "_blank" }, this._renderImageMask(e, 400), h("div", { class: b.itemLinkOverlay }, h("span", { class: b.itemLinkOverlayIcon }, h("calcite-icon", { icon: "launch" })))) : this._renderImageMask(e, 400), k = h("form", { afterCreate: si, afterRemoved: ni, bind: this, "data-node-ref": "_updateAttachmentForm", onsubmit: (ie) => this._submitUpdateAttachment(ie, e) }, h("div", { class: b.metadata }, I, w), _, h("div", { class: b.actions }, f, v, g));
626
+ return h("div", { class: b.formNode, key: "edit-form-container" }, A, k);
627
+ }
628
+ _renderImageMask(e, i) {
629
+ return e ? "file" in e ? this._renderGenericImageMask(e.file.name, e.file.type) : this._renderImageMaskForAttachment(e, i) : null;
630
+ }
631
+ _renderGenericImageMask(e, i) {
632
+ const { supportsResizeAttachments: s } = this.viewModel, n = Hn(i), r = { [b.itemImageResizable]: s };
633
+ return h("div", { class: this.classes(b.itemMaskIcon, b.itemMask), key: n }, h("img", { alt: e, class: this.classes(r, b.itemImage), src: n, title: e }));
634
+ }
635
+ _renderImageMaskForAttachment(e, i) {
636
+ const { supportsResizeAttachments: s } = this.viewModel;
637
+ if (!e)
638
+ return null;
639
+ const { contentType: n, name: r, url: o } = e;
640
+ if (!s || !gi(n))
641
+ return this._renderGenericImageMask(r, n);
642
+ const d = this._getCSSTransform(e), c = d ? { transform: d, "image-orientation": "none" } : {}, u = `${o}${o != null && o.includes("?") ? "&" : "?"}w=${i}`, p = { [b.itemImageResizable]: s };
643
+ return h("div", { class: this.classes(b.itemMask), key: u }, h("img", { alt: r, class: this.classes(p, b.itemImage), src: u, styles: c, title: r }));
644
+ }
645
+ _renderFile(e) {
646
+ const { file: i } = e;
647
+ return h("li", { class: b.item, key: i }, h("button", { "aria-label": this.messages.attachmentDetails, bind: this, class: b.itemButton, key: "details-button", onclick: () => this._startEditFile(e), title: this.messages.attachmentDetails, type: "button" }, this._renderImageMask(e), h("label", { class: b.itemLabel }, h("span", { class: b.itemFilename }, i.name || this.messages.noTitle), h("span", { "aria-hidden": "true", class: this.classes(b.itemChevronIcon, xe(this.container) ? ne.left : ne.right) }))));
648
+ }
649
+ _renderAttachmentInfo({ attachmentInfo: e, displayType: i }) {
650
+ const { viewModel: s, effectiveDisplayType: n } = this, { capabilities: r, supportsResizeAttachments: o } = s, { contentType: d, name: c, url: u } = e, p = this._renderImageMask(e, i === "list" ? 48 : 400), m = r.editing ? h("span", { "aria-hidden": "true", class: this.classes(b.itemChevronIcon, xe(this.container) ? ne.left : ne.right) }) : null, f = [p, n === "preview" && o && gi(d) ? null : h("label", { class: b.itemLabel }, h("span", { class: b.itemFilename }, c || this.messages.noTitle), m)], g = r.editing ? h("button", { "aria-label": this.messages.attachmentDetails, bind: this, class: b.itemButton, "data-attachment-info-id": e.id, key: "details-button", onclick: () => this._startEditAttachment(e), title: this.messages.attachmentDetails, type: "button" }, f) : h("a", { class: b.itemButton, href: u ?? void 0, key: "details-link", target: "_blank" }, f);
651
+ return h("li", { class: b.item, key: e }, g);
652
+ }
653
+ _renderAttachmentContainer() {
654
+ var v;
655
+ const { effectiveDisplayType: e, viewModel: i, visibleElements: s } = this, { attachmentInfos: n, capabilities: r, fileInfos: o } = i, d = !!(n != null && n.length), c = !!(o != null && o.length), u = { [b.containerList]: e !== "preview", [b.containerPreview]: e === "preview" }, p = r.editing && ((v = r.operations) != null && v.add) && s.addButton ? h("button", { bind: this, class: this.classes(F.button, F.buttonTertiary, b.addAttachmentButton), onclick: () => this._startAddAttachment(), type: "button" }, h("span", { "aria-hidden": "true", class: this.classes(b.itemAddIcon, ne.plus) }), this.messages.add) : void 0, m = d ? h("ul", { class: b.items, key: "attachments-list" }, n.toArray().map((_) => this._renderAttachmentInfo({ attachmentInfo: _, displayType: e }))) : void 0, f = c ? h("ul", { class: b.items, key: "file-list" }, o.toArray().map((_) => this._renderFile(_))) : void 0, g = c || d ? void 0 : h("div", { class: F.empty }, this.messages.noAttachments);
656
+ return h("div", { class: this.classes(b.container, u), key: "attachments-container" }, m, f, g, p);
657
+ }
658
+ _modeChanged() {
659
+ this._set("error", null), this._set("selectedFile", null);
660
+ }
661
+ _handleFileInputChange(e) {
662
+ var n;
663
+ const i = e.target, s = (n = i.files) == null ? void 0 : n.item(0);
664
+ this._set("selectedFile", s);
665
+ }
666
+ _submitDeleteAttachment(e, i) {
667
+ e.preventDefault(), i && ("file" in i ? this.deleteFile(i.file) : i && this.deleteAttachment(i));
668
+ }
669
+ _submitAddAttachment(e) {
670
+ e.preventDefault(), this.viewModel.filesEnabled ? this.addFile() : this.addAttachment();
671
+ }
672
+ _submitUpdateAttachment(e, i) {
673
+ e.preventDefault(), i && "file" in i ? this.updateFile() : this.updateAttachment();
674
+ }
675
+ _startEditAttachment(e) {
676
+ const { viewModel: i } = this;
677
+ i.activeFileInfo = null, i.activeAttachmentInfo = e, i.mode = "edit";
678
+ }
679
+ _startEditFile(e) {
680
+ const { viewModel: i } = this;
681
+ i.activeAttachmentInfo = null, i.activeFileInfo = e, i.mode = "edit";
682
+ }
683
+ _startAddAttachment() {
684
+ this.viewModel.mode = "add";
685
+ }
686
+ _cancelForm(e) {
687
+ e.preventDefault(), this.viewModel.mode = "view";
688
+ }
689
+ _getCSSTransform(e) {
690
+ const { orientationInfo: i } = e;
691
+ return !this._supportsImageOrientation && i ? [i.rotation ? `rotate(${i.rotation}deg)` : "", i.mirrored ? "scaleX(-1)" : ""].join(" ") : "";
692
+ }
693
+ };
694
+ a([l()], U.prototype, "capabilities", null), a([l()], U.prototype, "displayType", void 0), a([l({ readOnly: !0 })], U.prototype, "effectiveDisplayType", null), a([l()], U.prototype, "graphic", null), a([l()], U.prototype, "label", null), a([l(), ee("esri/widgets/Attachments/t9n/Attachments")], U.prototype, "messages", void 0), a([l(), ee("esri/core/t9n/Units")], U.prototype, "messagesUnits", void 0), a([l({ readOnly: !0 })], U.prototype, "selectedFile", void 0), a([l({ readOnly: !0 })], U.prototype, "submitting", void 0), a([l({ readOnly: !0 })], U.prototype, "error", void 0), a([l({ type: Zt })], U.prototype, "viewModel", void 0), a([l()], U.prototype, "visibleElements", void 0), a([Be("visibleElements")], U.prototype, "castVisibleElements", null), U = a([O("esri.widgets.Attachments")], U);
695
+ const jn = U;
696
+ let He = class extends Zt {
697
+ constructor(e) {
698
+ super(e), this.description = null, this.title = null;
699
+ }
700
+ };
701
+ a([l()], He.prototype, "description", void 0), a([l()], He.prototype, "title", void 0), He = a([O("esri.widgets.Feature.FeatureAttachments.FeatureAttachmentsViewModel")], He);
702
+ const Qt = He;
703
+ function Gt({ level: t, class: e, ...i }, s) {
704
+ const n = Un(t);
705
+ return h(`h${n}`, { ...i, "aria-level": String(n), class: Cs(F.heading, e), role: "heading" }, s);
706
+ }
707
+ function Un(t) {
708
+ return As(Math.ceil(t), 1, 6);
709
+ }
710
+ const Ft = "esri-feature-element-info", It = { base: Ft, title: `${Ft}__title`, description: `${Ft}__description` };
711
+ let Pe = class extends te {
712
+ constructor(e, i) {
713
+ super(e, i), this.description = null, this.headingLevel = 2, this.title = null;
714
+ }
715
+ render() {
716
+ return h("div", { class: It.base }, this._renderTitle(), this._renderDescription());
717
+ }
718
+ _renderTitle() {
719
+ const { title: e } = this;
720
+ return e ? h(Gt, { class: It.title, level: this.headingLevel }, e) : null;
721
+ }
722
+ _renderDescription() {
723
+ const { description: e } = this;
724
+ return e ? h("div", { class: It.description, key: "description" }, e) : null;
725
+ }
726
+ };
727
+ a([l()], Pe.prototype, "description", void 0), a([l()], Pe.prototype, "headingLevel", void 0), a([l()], Pe.prototype, "title", void 0), Pe = a([O("esri.widgets.Feature.support.FeatureElementInfo")], Pe);
728
+ const ht = Pe, Zn = { base: "esri-feature-attachments" };
729
+ let ae = class extends te {
730
+ constructor(e, i) {
731
+ super(e, i), this._featureElementInfo = null, this.attachmentsWidget = new jn(), this.headingLevel = 2, this.viewModel = new Qt();
732
+ }
733
+ initialize() {
734
+ this._featureElementInfo = new ht(), this.addHandles([y(() => {
735
+ var e, i;
736
+ return [(e = this.viewModel) == null ? void 0 : e.description, (i = this.viewModel) == null ? void 0 : i.title, this.headingLevel];
737
+ }, () => this._setupFeatureElementInfo(), R), y(() => this.viewModel, (e) => this.attachmentsWidget.viewModel = e, R)]);
738
+ }
739
+ destroy() {
740
+ var e;
741
+ this.attachmentsWidget.viewModel = null, this.attachmentsWidget.destroy(), (e = this._featureElementInfo) == null || e.destroy();
742
+ }
743
+ get description() {
744
+ return this.viewModel.description;
745
+ }
746
+ set description(e) {
747
+ this.viewModel.description = e;
748
+ }
749
+ get displayType() {
750
+ return this.attachmentsWidget.displayType;
751
+ }
752
+ set displayType(e) {
753
+ this.attachmentsWidget.displayType = e;
754
+ }
755
+ get graphic() {
756
+ return this.viewModel.graphic;
757
+ }
758
+ set graphic(e) {
759
+ this.viewModel.graphic = e;
760
+ }
761
+ get title() {
762
+ return this.viewModel.title;
763
+ }
764
+ set title(e) {
765
+ this.viewModel.title = e;
766
+ }
767
+ render() {
768
+ var i;
769
+ const { attachmentsWidget: e } = this;
770
+ return h("div", { class: Zn.base }, (i = this._featureElementInfo) == null ? void 0 : i.render(), e == null ? void 0 : e.render());
771
+ }
772
+ _setupFeatureElementInfo() {
773
+ var n;
774
+ const { description: e, title: i, headingLevel: s } = this;
775
+ (n = this._featureElementInfo) == null || n.set({ description: e, title: i, headingLevel: s });
776
+ }
777
+ };
778
+ a([l({ readOnly: !0 })], ae.prototype, "attachmentsWidget", void 0), a([l()], ae.prototype, "description", null), a([l()], ae.prototype, "displayType", null), a([l()], ae.prototype, "graphic", null), a([l()], ae.prototype, "headingLevel", void 0), a([l()], ae.prototype, "title", null), a([l({ type: Qt })], ae.prototype, "viewModel", void 0), ae = a([O("esri.widgets.Feature.FeatureAttachments")], ae);
779
+ const Qn = ae;
780
+ let ge = class extends me {
781
+ constructor(e) {
782
+ super(e), this._loadingPromise = null, this.created = null, this.creator = null, this.destroyer = null, this.graphic = null, this.addHandles(y(() => this.creator, (i) => {
783
+ this._destroyContent(), this._createContent(i);
784
+ }, R));
785
+ }
786
+ destroy() {
787
+ this._destroyContent();
788
+ }
789
+ get state() {
790
+ return this._loadingPromise ? "loading" : "ready";
791
+ }
792
+ _destroyContent() {
793
+ const { created: e, graphic: i, destroyer: s } = this;
794
+ e && i && (lt(s, { graphic: i }).catch(() => null), this._set("created", null));
795
+ }
796
+ async _createContent(e) {
797
+ const i = this.graphic;
798
+ if (!i || !e)
799
+ return;
800
+ const s = lt(e, { graphic: i }).catch(() => null);
801
+ this._loadingPromise = s, this.notifyChange("state");
802
+ const n = await s;
803
+ s === this._loadingPromise && (this._loadingPromise = null, this.notifyChange("state"), this._set("created", n));
804
+ }
805
+ };
806
+ a([l({ readOnly: !0 })], ge.prototype, "created", void 0), a([l()], ge.prototype, "creator", void 0), a([l()], ge.prototype, "destroyer", void 0), a([l({ type: De })], ge.prototype, "graphic", void 0), a([l({ readOnly: !0 })], ge.prototype, "state", null), ge = a([O("esri.widgets.Feature.FeatureContent.FeatureContentViewModel")], ge);
807
+ const dt = ge;
808
+ function ss(t) {
809
+ return (e) => {
810
+ e.hasOwnProperty("_delegatedEventNames") || (e._delegatedEventNames = e._delegatedEventNames ? e._delegatedEventNames.slice() : []);
811
+ const i = e._delegatedEventNames, s = Array.isArray(t) ? t : Gn(t);
812
+ i.push(...s);
813
+ };
814
+ }
815
+ function Gn(t) {
816
+ return t.split(",").map((e) => e.trim());
817
+ }
818
+ function ns(t) {
819
+ return t && typeof t.render == "function";
820
+ }
821
+ function Xn(t) {
822
+ return t && typeof t.postMixInProperties == "function" && typeof t.buildRendering == "function" && typeof t.postCreate == "function" && typeof t.startup == "function";
823
+ }
824
+ const Ct = "esri-feature-content", At = { base: Ct, loaderContainer: `${Ct}__loader-container`, loader: `${Ct}__loader` };
825
+ let Oe = class extends te {
826
+ constructor(e, i) {
827
+ super(e, i), this.viewModel = null, this._addTargetToAnchors = (s) => {
828
+ Array.from(s.querySelectorAll("a")).forEach((n) => {
829
+ Qi(n.href) && !n.hasAttribute("target") && n.setAttribute("target", "_blank");
830
+ });
831
+ };
832
+ }
833
+ get creator() {
834
+ var e;
835
+ return (e = this.viewModel) == null ? void 0 : e.creator;
836
+ }
837
+ set creator(e) {
838
+ this.viewModel && (this.viewModel.creator = e);
839
+ }
840
+ get graphic() {
841
+ var e;
842
+ return (e = this.viewModel) == null ? void 0 : e.graphic;
843
+ }
844
+ set graphic(e) {
845
+ this.viewModel && (this.viewModel.graphic = e);
846
+ }
847
+ render() {
848
+ var i;
849
+ const e = (i = this.viewModel) == null ? void 0 : i.state;
850
+ return h("div", { class: At.base }, e === "loading" ? this._renderLoading() : this._renderCreated());
851
+ }
852
+ _renderLoading() {
853
+ return h("div", { class: At.loaderContainer, key: "loader" }, h("div", { class: At.loader }));
854
+ }
855
+ _renderCreated() {
856
+ var i;
857
+ const e = (i = this.viewModel) == null ? void 0 : i.created;
858
+ return e ? e instanceof HTMLElement ? h("div", { afterCreate: this._attachToNode, bind: e, key: e }) : ns(e) ? h("div", { key: e }, !e.destroyed && e.render()) : h("div", { afterCreate: this._addTargetToAnchors, innerHTML: e, key: e }) : null;
859
+ }
860
+ _attachToNode(e) {
861
+ const i = this;
862
+ e.appendChild(i);
863
+ }
864
+ };
865
+ a([l()], Oe.prototype, "creator", null), a([l()], Oe.prototype, "graphic", null), a([l({ type: dt })], Oe.prototype, "viewModel", void 0), Oe = a([O("esri.widgets.Feature.FeatureContent")], Oe);
866
+ const tt = Oe;
867
+ let ue = class extends me {
868
+ constructor(e) {
869
+ super(e), this.attributes = null, this.expressionInfos = null, this.description = null, this.fieldInfos = null, this.title = null;
870
+ }
871
+ get formattedFieldInfos() {
872
+ const { expressionInfos: e, fieldInfos: i } = this, s = [];
873
+ return i == null || i.forEach((n) => {
874
+ if (!(!n.hasOwnProperty("visible") || n.visible))
875
+ return;
876
+ const r = n.clone();
877
+ r.label = Gi(r, e), s.push(r);
878
+ }), s;
879
+ }
880
+ };
881
+ a([l()], ue.prototype, "attributes", void 0), a([l({ type: [$s] })], ue.prototype, "expressionInfos", void 0), a([l()], ue.prototype, "description", void 0), a([l({ type: [Vi] })], ue.prototype, "fieldInfos", void 0), a([l({ readOnly: !0 })], ue.prototype, "formattedFieldInfos", null), a([l()], ue.prototype, "title", void 0), ue = a([O("esri.widgets.Feature.FeatureFields.FeatureFieldsViewModel")], ue);
882
+ const pt = ue, Yn = [{ pattern: /^\s*(https?:\/\/([^\s]+))\s*$/i, target: "_blank", label: "{messages.view}" }, { pattern: /^\s*(tel:([^\s]+))\s*$/i, label: "{hierPart}" }, { pattern: /^\s*(mailto:([^\s]+))\s*$/i, label: "{hierPart}" }, { pattern: /^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "App Studio Player" }, { pattern: /^\s*(arcgis-collector:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Collector" }, { pattern: /^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Explorer" }, { pattern: /^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Navigator" }, { pattern: /^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Survey123" }, { pattern: /^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Trek2There" }, { pattern: /^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Workforce" }, { pattern: /^\s*(iform:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "iForm" }, { pattern: /^\s*(flow:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "FlowFinity" }, { pattern: /^\s*(lfmobile:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Laserfische" }, { pattern: /^\s*(mspbi:\/\/([^\s]+))\s*$/i, label: "{messages.openInApp}", appName: "Microsoft Power Bi" }];
883
+ function Kn(t, e) {
884
+ if (typeof e != "string" || !e)
885
+ return e;
886
+ const i = Yn.find((c) => c.pattern.test(e));
887
+ if (!i)
888
+ return e;
889
+ const s = e.match(i.pattern), n = s && s[2], r = Ze(Ze(i.label, { messages: t, hierPart: n }), { appName: i.appName }), o = i.target ? ` target="${i.target}"` : "", d = i.target === "_blank" ? ' rel="noreferrer"' : "";
890
+ return e.replace(i.pattern, `<a${o} href="$1"${d}>${r}</a>`);
891
+ }
892
+ const Ye = "esri-feature-fields", Ke = { base: Ye, fieldHeader: `${Ye}__field-header`, fieldData: `${Ye}__field-data`, fieldDataDate: `${Ye}__field-data--date` };
893
+ let oe = class extends te {
894
+ constructor(e, i) {
895
+ super(e, i), this._featureElementInfo = null, this.viewModel = new pt(), this.messages = null, this.messagesURIUtils = null;
896
+ }
897
+ initialize() {
898
+ this._featureElementInfo = new ht(), this.addHandles(y(() => {
899
+ var e, i;
900
+ return [(e = this.viewModel) == null ? void 0 : e.description, (i = this.viewModel) == null ? void 0 : i.title];
901
+ }, () => this._setupFeatureElementInfo(), R));
902
+ }
903
+ destroy() {
904
+ var e;
905
+ (e = this._featureElementInfo) == null || e.destroy();
906
+ }
907
+ get attributes() {
908
+ return this.viewModel.attributes;
909
+ }
910
+ set attributes(e) {
911
+ this.viewModel.attributes = e;
912
+ }
913
+ get description() {
914
+ return this.viewModel.description;
915
+ }
916
+ set description(e) {
917
+ this.viewModel.description = e;
918
+ }
919
+ get expressionInfos() {
920
+ return this.viewModel.expressionInfos;
921
+ }
922
+ set expressionInfos(e) {
923
+ this.viewModel.expressionInfos = e;
924
+ }
925
+ get fieldInfos() {
926
+ return this.viewModel.fieldInfos;
927
+ }
928
+ set fieldInfos(e) {
929
+ this.viewModel.fieldInfos = e;
930
+ }
931
+ get title() {
932
+ return this.viewModel.title;
933
+ }
934
+ set title(e) {
935
+ this.viewModel.title = e;
936
+ }
937
+ render() {
938
+ var e;
939
+ return h("div", { class: Ke.base }, (e = this._featureElementInfo) == null ? void 0 : e.render(), this._renderFields());
940
+ }
941
+ _renderFieldInfo(e, i) {
942
+ const { attributes: s } = this.viewModel, n = e.fieldName, r = e.label || n, o = s ? s[n] == null ? "" : s[n] : "", d = !(!e.format || !e.format.dateFormat), c = typeof o == "number" && !d ? this._forceLTR(o) : Kn(this.messagesURIUtils, o), u = { [Ke.fieldDataDate]: d };
943
+ return h("tr", { key: `fields-element-info-row-${n}-${i}` }, h("th", { class: Ke.fieldHeader, innerHTML: r, key: `fields-element-info-row-header-${n}-${i}` }), h("td", { class: this.classes(Ke.fieldData, u), innerHTML: c, key: `fields-element-info-row-data-${n}-${i}` }));
944
+ }
945
+ _renderFields() {
946
+ const { formattedFieldInfos: e } = this.viewModel;
947
+ return e != null && e.length ? h("table", { class: F.table, summary: this.messages.fieldsSummary }, h("tbody", null, e.map((i, s) => this._renderFieldInfo(i, s)))) : null;
948
+ }
949
+ _setupFeatureElementInfo() {
950
+ var s;
951
+ const { description: e, title: i } = this;
952
+ (s = this._featureElementInfo) == null || s.set({ description: e, title: i });
953
+ }
954
+ _forceLTR(e) {
955
+ return `&lrm;${e}`;
956
+ }
957
+ };
958
+ a([l()], oe.prototype, "attributes", null), a([l()], oe.prototype, "description", null), a([l()], oe.prototype, "expressionInfos", null), a([l()], oe.prototype, "fieldInfos", null), a([l()], oe.prototype, "title", null), a([l({ type: pt, nonNullable: !0 })], oe.prototype, "viewModel", void 0), a([l(), ee("esri/widgets/Feature/t9n/Feature")], oe.prototype, "messages", void 0), a([l(), ee("esri/widgets/support/t9n/uriUtils")], oe.prototype, "messagesURIUtils", void 0), oe = a([O("esri.widgets.Feature.FeatureFields")], oe);
959
+ const rs = oe, Jn = () => window.matchMedia("(prefers-reduced-motion: reduce)").matches, er = { maximumFractionDigits: 20 };
960
+ function tr(t) {
961
+ return Se(t, er);
962
+ }
963
+ const ir = "<", sr = ">";
964
+ function nr(t, e, i, s) {
965
+ let n = "";
966
+ return e === 0 ? n = `${ir} ` : e === i && (n = `${sr} `), n + (s ? Wt(t, s) : tr(t));
967
+ }
968
+ const rr = new Bi([64, 64, 64]);
969
+ function or(t, e) {
970
+ const i = [], s = t.length - 1;
971
+ return t.length === 5 ? i.push(0, 2, 4) : i.push(0, s), t.map((n, r) => i.includes(r) ? nr(n, r, s, e) : null);
972
+ }
973
+ async function ar(t, e, i) {
974
+ let s = !1, n = [], r = [];
975
+ if (t.stops) {
976
+ const u = t.stops;
977
+ n = u.map((p) => p.value), s = u.some((p) => !!p.label), s && (r = u.map((p) => p.label));
978
+ }
979
+ const o = n[0], d = n[n.length - 1];
980
+ if (o == null && d == null)
981
+ return null;
982
+ const c = s ? null : or(n, i);
983
+ return (await Promise.all(n.map(async (u, p) => ({ value: u, color: t.type === "opacity" ? await lr(u, t, e) : (await import("./visualVariableUtils-1a38c540.js")).getColor(t, u), label: s ? r[p] : (c == null ? void 0 : c[p]) ?? "" })))).reverse();
984
+ }
985
+ async function lr(t, e, i) {
986
+ const s = new Bi(i ?? rr), n = (await import("./visualVariableUtils-1a38c540.js")).getOpacity(e, t);
987
+ return n != null && (s.a = n), s;
988
+ }
989
+ function dr(t) {
990
+ if (!t.colorStops)
991
+ return [];
992
+ const e = [...t.colorStops].filter((s) => {
993
+ var n;
994
+ return ((n = s.color) == null ? void 0 : n.a) > 0;
995
+ });
996
+ let i = e.length - 1;
997
+ if (e && e[0]) {
998
+ const s = e[i];
999
+ s && s.ratio !== 1 && (e.push(new ln({ ratio: 1, color: s.color })), i++);
1000
+ }
1001
+ return e.map((s, n) => {
1002
+ var o, d;
1003
+ let r = "";
1004
+ return n === 0 ? r = ((o = t.legendOptions) == null ? void 0 : o.minLabel) || "low" : n === i && (r = ((d = t.legendOptions) == null ? void 0 : d.maxLabel) || "high"), { color: s.color, label: r, ratio: s.ratio };
1005
+ }).reverse();
1006
+ }
1007
+ async function J(t, e, i) {
1008
+ Es(t, e, () => []).push(...i);
1009
+ }
1010
+ async function cr(t) {
1011
+ var i, s;
1012
+ const e = /* @__PURE__ */ new Map();
1013
+ if (!t)
1014
+ return e;
1015
+ if ("visualVariables" in t && t.visualVariables) {
1016
+ const n = t.visualVariables.filter((r) => r.type === "color");
1017
+ for (const r of n) {
1018
+ const o = (await ar(r) ?? []).map((d) => d.color);
1019
+ await J(e, r.field || r.valueExpression, o);
1020
+ }
1021
+ }
1022
+ if (t.type === "heatmap") {
1023
+ const n = dr(t).map((r) => r.color);
1024
+ await J(e, t.field || t.valueExpression, n);
1025
+ } else if (t.type === "pie-chart") {
1026
+ for (const n of t.attributes)
1027
+ await J(e, n.field || n.valueExpression, [n.color]);
1028
+ await J(e, "default", [(i = t == null ? void 0 : t.othersCategory) == null ? void 0 : i.color, Re(t.backgroundFillSymbol, null)]);
1029
+ } else if (t.type === "dot-density") {
1030
+ for (const n of t.attributes)
1031
+ await J(e, n.field || n.valueExpression, [n.color]);
1032
+ await J(e, "default", [t.backgroundColor]);
1033
+ } else if (t.type === "unique-value")
1034
+ if (((s = t.authoringInfo) == null ? void 0 : s.type) === "predominance")
1035
+ for (const n of t.uniqueValueInfos ?? [])
1036
+ await J(e, n.value.toString(), [Re(n.symbol, null)]);
1037
+ else {
1038
+ const n = (t.uniqueValueInfos ?? []).map((u) => Re(u.symbol, null)), { field: r, field2: o, field3: d, valueExpression: c } = t;
1039
+ (r || c) && await J(e, r || c, n), o && await J(e, o, n), d && await J(e, d, n);
1040
+ }
1041
+ else if (t.type === "class-breaks") {
1042
+ const n = t.classBreakInfos.map((d) => Re(d.symbol, null)), { field: r, valueExpression: o } = t;
1043
+ await J(e, r ?? o, n);
1044
+ } else
1045
+ t.type === "simple" && await J(e, "default", [Re(t.symbol, null)]);
1046
+ return "defaultSymbol" in t && t.defaultSymbol && await J(e, "default", [Re(t.defaultSymbol, null)]), e.forEach((n, r) => {
1047
+ const o = qt(n.filter(Boolean), (d, c) => JSON.stringify(d) === JSON.stringify(c));
1048
+ e.set(r, o);
1049
+ }), e;
1050
+ }
1051
+ const ur = "esri.widgets.Feature.support.relatedFeatureUtils", vi = () => q.getLogger(ur), _i = /* @__PURE__ */ new Map();
1052
+ function it(t) {
1053
+ if (!pe(t))
1054
+ return null;
1055
+ const [e, i] = t.split("/").slice(1);
1056
+ return { layerId: e, fieldName: i };
1057
+ }
1058
+ function hr(t, e) {
1059
+ if (!e.relationships)
1060
+ return null;
1061
+ let i = null;
1062
+ const { relationships: s } = e;
1063
+ return s.some((n) => n.id === parseInt(t, 10) && (i = n, !0)), i;
1064
+ }
1065
+ function pr({ originRelationship: t, relationships: e, layerId: i }) {
1066
+ return e.find(({ relatedTableId: s, id: n }) => `${s}` === i && n === (t == null ? void 0 : t.id)) ?? null;
1067
+ }
1068
+ function mr(t, e) {
1069
+ const i = e.toLowerCase();
1070
+ for (const s in t)
1071
+ if (s.toLowerCase() === i)
1072
+ return t[s];
1073
+ return null;
1074
+ }
1075
+ function fr(t, e) {
1076
+ const i = hr(t, e);
1077
+ if (i)
1078
+ return { url: `${e.url}/${i.relatedTableId}`, sourceSpatialReference: e.spatialReference, relation: i, relatedFields: [], outStatistics: [] };
1079
+ }
1080
+ function gr(t, e) {
1081
+ if (!e || !t)
1082
+ return;
1083
+ const { features: i, statsFeatures: s } = t, n = i == null ? void 0 : i.value;
1084
+ e.relatedFeatures = n ? n.features : [];
1085
+ const r = s == null ? void 0 : s.value;
1086
+ e.relatedStatsFeatures = r ? r.features : [];
1087
+ }
1088
+ function yr(t, e, i, s) {
1089
+ var r;
1090
+ const n = new Pt();
1091
+ return n.outFields = ["*"], n.relationshipId = typeof e.id == "number" ? e.id : parseInt(e.id, 10), n.objectIds = [t.attributes[i.objectIdField]], ((r = i.queryRelatedFeatures) == null ? void 0 : r.call(i, n, s)) ?? Promise.resolve({});
1092
+ }
1093
+ function vr(t, e, i) {
1094
+ let s = 0;
1095
+ const n = [];
1096
+ for (; s < e.length; )
1097
+ n.push(`${t} IN (${e.slice(s, i + s)})`), s += i;
1098
+ return n.join(" OR ");
1099
+ }
1100
+ function _r(t) {
1101
+ return t ? qt(t) : void 0;
1102
+ }
1103
+ function wr(t) {
1104
+ return t ? qt(t, (e, i) => JSON.stringify(e.toJSON()) === JSON.stringify(i.toJSON())) : void 0;
1105
+ }
1106
+ async function br(t, e, i, s) {
1107
+ const n = i.layerId.toString(), { layerInfo: r, relation: o, relatedFields: d, outStatistics: c, url: u, sourceSpatialReference: p } = e, m = _r(d), f = wr(c);
1108
+ if (!r || !o)
1109
+ return null;
1110
+ const g = pr({ originRelationship: o, relationships: r.relationships, layerId: n });
1111
+ if (g != null && g.relationshipTableId && g.keyFieldInRelationshipTable) {
1112
+ const _ = (await yr(t, g, i, s))[t.attributes[i.objectIdField]];
1113
+ if (!_)
1114
+ return null;
1115
+ const I = _.features.map((w) => w.attributes[r.objectIdField]);
1116
+ if (f != null && f.length && r.supportsStatistics) {
1117
+ const w = new gt();
1118
+ w.where = vr(r.objectIdField, I, 1e3), w.outFields = m, w.outStatistics = f, w.sourceSpatialReference = p;
1119
+ const A = { features: Promise.resolve(_), statsFeatures: _t(u, w) };
1120
+ return ke(A);
1121
+ }
1122
+ }
1123
+ const v = g == null ? void 0 : g.keyField;
1124
+ if (v) {
1125
+ const _ = Ts(Ar(r.fields, v)), I = mr(t.attributes, o.keyField), w = _ ? `${v}=${I}` : `${v}='${I}'`, A = _t(u, new gt({ where: w, outFields: m, sourceSpatialReference: p }), s), k = f != null && f.length && r.supportsStatistics ? _t(u, new gt({ where: w, outFields: m, outStatistics: f, sourceSpatialReference: p }), s) : null, M = { features: A };
1126
+ return k && (M.statsFeatures = k), ke(M);
1127
+ }
1128
+ return null;
1129
+ }
1130
+ function Mr(t, e) {
1131
+ return Ls(t, { query: { f: "json" }, signal: e == null ? void 0 : e.signal });
1132
+ }
1133
+ function Fr({ relatedInfos: t, layer: e }, i) {
1134
+ const s = {};
1135
+ return t.forEach((n, r) => {
1136
+ const { relation: o } = n;
1137
+ if (!o) {
1138
+ const m = new L("relation-required", "A relation is required on a layer to retrieve related records.");
1139
+ throw vi().error(m), m;
1140
+ }
1141
+ const { relatedTableId: d } = o;
1142
+ if (typeof d != "number") {
1143
+ const m = new L("A related table ID is required on a layer to retrieve related records.");
1144
+ throw vi().error(m), m;
1145
+ }
1146
+ const c = `${e.url}/${d}`, u = _i.get(c), p = u ?? Mr(c);
1147
+ u || _i.set(c, p), s[r] = p;
1148
+ }), xs(ke(s), i);
1149
+ }
1150
+ function Ir({ graphic: t, relatedInfos: e, layer: i }, s) {
1151
+ const n = {};
1152
+ return e.forEach((r, o) => {
1153
+ r.layerInfo && (n[o] = br(t, r, i, s));
1154
+ }), ke(n);
1155
+ }
1156
+ function Cr({ relatedInfo: t, fieldName: e, fieldInfo: i }) {
1157
+ var s, n;
1158
+ if ((s = t.relatedFields) == null || s.push(e), i.statisticType) {
1159
+ const r = new ks({ statisticType: i.statisticType, onStatisticField: e, outStatisticFieldName: e });
1160
+ (n = t.outStatistics) == null || n.push(r);
1161
+ }
1162
+ }
1163
+ function Ar(t, e) {
1164
+ if (t != null) {
1165
+ e = e.toLowerCase();
1166
+ for (const i of t)
1167
+ if (i && i.name.toLowerCase() === e)
1168
+ return i;
1169
+ }
1170
+ return null;
1171
+ }
1172
+ const wi = { chartAnimation: !0 };
1173
+ let B = class extends me {
1174
+ constructor(e) {
1175
+ super(e), this.abilities = { ...wi }, this.activeMediaInfoIndex = 0, this.attributes = null, this.description = null, this.fieldInfoMap = null, this.formattedAttributes = null, this.expressionAttributes = null, this.isAggregate = !1, this.layer = null, this.mediaInfos = null, this.popupTemplate = null, this.relatedInfos = null, this.title = null;
1176
+ }
1177
+ castAbilities(e) {
1178
+ return { ...wi, ...e };
1179
+ }
1180
+ get activeMediaInfo() {
1181
+ return this.formattedMediaInfos[this.activeMediaInfoIndex] || null;
1182
+ }
1183
+ get formattedMediaInfos() {
1184
+ return this._formatMediaInfos() || [];
1185
+ }
1186
+ get formattedMediaInfoCount() {
1187
+ return this.formattedMediaInfos.length;
1188
+ }
1189
+ setActiveMedia(e) {
1190
+ this._setContentElementMedia(e);
1191
+ }
1192
+ next() {
1193
+ this._pageContentElementMedia(1);
1194
+ }
1195
+ previous() {
1196
+ this._pageContentElementMedia(-1);
1197
+ }
1198
+ _setContentElementMedia(e) {
1199
+ const { formattedMediaInfoCount: i } = this, s = (e + i) % i;
1200
+ this.activeMediaInfoIndex = s;
1201
+ }
1202
+ _pageContentElementMedia(e) {
1203
+ const { activeMediaInfoIndex: i } = this, s = i + e;
1204
+ this._setContentElementMedia(s);
1205
+ }
1206
+ _formatMediaInfos() {
1207
+ const { mediaInfos: e, layer: i } = this, s = this.attributes ?? {}, n = this.formattedAttributes ?? {}, r = this.expressionAttributes ?? {}, o = this.fieldInfoMap ?? /* @__PURE__ */ new Map();
1208
+ return (e == null ? void 0 : e.map((d) => {
1209
+ const c = d == null ? void 0 : d.clone();
1210
+ if (!c)
1211
+ return null;
1212
+ if (c.title = Ie({ attributes: s, fieldInfoMap: o, globalAttributes: n, expressionAttributes: r, layer: i, text: c.title }), c.caption = Ie({ attributes: s, fieldInfoMap: o, globalAttributes: n, expressionAttributes: r, layer: i, text: c.caption }), c.altText = Ie({ attributes: s, fieldInfoMap: o, globalAttributes: n, expressionAttributes: r, layer: i, text: c.altText }), c.type === "image") {
1213
+ const { value: u } = c;
1214
+ return this._setImageValue({ value: u, formattedAttributes: n, layer: i }), c.value.sourceURL ? c : void 0;
1215
+ }
1216
+ if (c.type === "pie-chart" || c.type === "line-chart" || c.type === "column-chart" || c.type === "bar-chart") {
1217
+ const { value: u } = c;
1218
+ return this._setChartValue({ value: u, chartType: c.type, attributes: s, formattedAttributes: n, layer: i, expressionAttributes: r }), c;
1219
+ }
1220
+ return null;
1221
+ }).filter(ut)) ?? [];
1222
+ }
1223
+ _setImageValue(e) {
1224
+ const i = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { value: s, formattedAttributes: n, layer: r } = e, { linkURL: o, sourceURL: d } = s;
1225
+ if (d) {
1226
+ const c = St(d, r);
1227
+ s.sourceURL = Nt({ formattedAttributes: n, template: c, fieldInfoMap: i });
1228
+ }
1229
+ if (o) {
1230
+ const c = St(o, r);
1231
+ s.linkURL = Nt({ formattedAttributes: n, template: c, fieldInfoMap: i });
1232
+ }
1233
+ }
1234
+ _setChartValue(e) {
1235
+ const { value: i, attributes: s, formattedAttributes: n, chartType: r, layer: o, expressionAttributes: d } = e, { popupTemplate: c, relatedInfos: u } = this, { fields: p, normalizeField: m } = i, f = o;
1236
+ if (i.fields = Fn(p, f), m && (i.normalizeField = Qe(m, f)), !p.some((v) => !!(n[v] != null || pe(v) && (u != null && u.size))))
1237
+ return;
1238
+ const g = (c == null ? void 0 : c.fieldInfos) ?? [];
1239
+ p.forEach((v, _) => {
1240
+ var A;
1241
+ const I = (A = i.colors) == null ? void 0 : A[_];
1242
+ if (pe(v))
1243
+ return void (i.series = [...i.series, ...this._getRelatedChartInfos({ fieldInfos: g, fieldName: v, formattedAttributes: n, chartType: r, value: i, color: I })]);
1244
+ const w = this._getChartOption({ value: i, attributes: s, chartType: r, formattedAttributes: n, expressionAttributes: d, fieldName: v, fieldInfos: g, color: I });
1245
+ i.series.push(w);
1246
+ });
1247
+ }
1248
+ _getRelatedChartInfos(e) {
1249
+ var v;
1250
+ const { fieldInfos: i, fieldName: s, formattedAttributes: n, chartType: r, value: o, color: d } = e, c = [], u = it(s), p = u && ((v = this.relatedInfos) == null ? void 0 : v.get(u.layerId.toString()));
1251
+ if (!p)
1252
+ return c;
1253
+ const { relatedFeatures: m, relation: f } = p;
1254
+ if (!f || !m)
1255
+ return c;
1256
+ const { cardinality: g } = f;
1257
+ return m.forEach((_) => {
1258
+ const { attributes: I } = _;
1259
+ I && Object.keys(I).forEach((w) => {
1260
+ w === u.fieldName && c.push(this._getChartOption({ value: o, attributes: I, formattedAttributes: n, fieldName: s, chartType: r, relatedFieldName: w, hasMultipleRelatedFeatures: (m == null ? void 0 : m.length) > 1, fieldInfos: i, color: d }));
1261
+ });
1262
+ }), g === "one-to-many" || g === "many-to-many" ? c : [c[0]];
1263
+ }
1264
+ _getTooltip({ label: e, value: i, chartType: s }) {
1265
+ return s === "pie-chart" ? `${e}` : `${e}: ${i}`;
1266
+ }
1267
+ _getChartOption(e) {
1268
+ var ie;
1269
+ const { value: i, attributes: s, formattedAttributes: n, expressionAttributes: r, fieldName: o, relatedFieldName: d, fieldInfos: c, chartType: u, hasMultipleRelatedFeatures: p, color: m } = e, f = this.layer, g = this.fieldInfoMap ?? /* @__PURE__ */ new Map(), { normalizeField: v, tooltipField: _ } = i, I = v ? pe(v) ? s[it(v).fieldName] : s[v] : null, w = Ht(o) && r && r[o] !== void 0 ? r[o] : d && s[d] !== void 0 ? s[d] : s[o] !== void 0 ? s[o] : n[o], A = new Rs({ fieldName: o, color: m, value: w === void 0 ? null : w && I ? w / I : w });
1270
+ if (pe(o)) {
1271
+ const H = g.get(o.toLowerCase()), mt = _ && g.get(_.toLowerCase()), gs = (H == null ? void 0 : H.fieldName) ?? o, ft = p && _ ? it(_).fieldName : (mt == null ? void 0 : mt.fieldName) ?? _, ys = p && ft ? s[ft] : n[ft] ?? (H == null ? void 0 : H.label) ?? (H == null ? void 0 : H.fieldName) ?? d, vs = p && d ? s[d] : n[gs];
1272
+ return A.tooltip = this._getTooltip({ label: ys, value: vs, chartType: u }), A;
1273
+ }
1274
+ const k = Ki(c, o), M = Qe(o, f), re = _ && n[_] !== void 0 ? n[_] : Gi(k || new Vi({ fieldName: M }), (ie = this.popupTemplate) == null ? void 0 : ie.expressionInfos), K = n[M];
1275
+ return A.tooltip = this._getTooltip({ label: re, value: K, chartType: u }), A;
1276
+ }
1277
+ };
1278
+ a([l()], B.prototype, "abilities", void 0), a([Be("abilities")], B.prototype, "castAbilities", null), a([l()], B.prototype, "activeMediaInfoIndex", void 0), a([l({ readOnly: !0 })], B.prototype, "activeMediaInfo", null), a([l()], B.prototype, "attributes", void 0), a([l()], B.prototype, "description", void 0), a([l()], B.prototype, "fieldInfoMap", void 0), a([l()], B.prototype, "formattedAttributes", void 0), a([l()], B.prototype, "expressionAttributes", void 0), a([l({ readOnly: !0 })], B.prototype, "formattedMediaInfos", null), a([l()], B.prototype, "isAggregate", void 0), a([l()], B.prototype, "layer", void 0), a([l({ readOnly: !0 })], B.prototype, "formattedMediaInfoCount", null), a([l()], B.prototype, "mediaInfos", void 0), a([l()], B.prototype, "popupTemplate", void 0), a([l()], B.prototype, "relatedInfos", void 0), a([l()], B.prototype, "title", void 0), B = a([O("esri.widgets.Feature.FeatureMedia.FeatureMediaViewModel")], B);
1279
+ const Ce = B, S = "esri-feature-media", Z = { base: S, mediaContainer: `${S}__container`, mediaItemContainer: `${S}__item-container`, mediaItem: `${S}__item`, mediaItemText: `${S}__item-text`, mediaItemTitle: `${S}__item-title`, mediaItemCaption: `${S}__item-caption`, mediaNavigation: `${S}__item-navigation`, mediaPagination: `${S}__pagination`, mediaPaginationText: `${S}__pagination-text`, mediaPrevious: `${S}__previous`, mediaPreviousIconLTR: `${S}__previous-icon`, mediaPreviousIconRTL: `${S}__previous-icon--rtl`, mediaNext: `${S}__next`, mediaNextIconLTR: `${S}__next-icon`, mediaNextIconRTL: `${S}__next-icon--rtl`, mediaChart: `${S}__chart`, mediaPaginationButton: `${S}__pagination-button`, mediaPaginationIcon: `${S}__pagination-icon`, mediaChartRendered: `${S}__chart--rendered` }, $t = 15, fe = "category", ze = "value", $r = "rgba(50, 50, 50, 1)", Er = 250, xr = 500, kr = 200;
1280
+ let Q = class extends te {
1281
+ constructor(e, i) {
1282
+ super(e, i), this._refreshTimer = null, this._refreshIntervalInfo = null, this._featureElementInfo = null, this._chartRootMap = /* @__PURE__ */ new WeakMap(), this.viewModel = new Ce(), this.messages = null, this._disposeChart = (s) => {
1283
+ var n;
1284
+ (n = this._chartRootMap.get(s)) == null || n.dispose(), this._chartRootMap.delete(s);
1285
+ }, this._createChart = async (s) => {
1286
+ const { destroyed: n, viewModel: r } = this;
1287
+ if (n || !r || !s)
1288
+ return;
1289
+ const { createRoot: o } = await import("./chartUtilsAm5-08a29408.js"), d = await o(s);
1290
+ this._chartRootMap.set(s, d), this._renderChart({ mediaInfo: r.activeMediaInfo, root: d });
1291
+ };
1292
+ }
1293
+ initialize() {
1294
+ this._featureElementInfo = new ht(), this.addHandles([y(() => {
1295
+ var e, i;
1296
+ return [(e = this.viewModel) == null ? void 0 : e.activeMediaInfo, (i = this.viewModel) == null ? void 0 : i.activeMediaInfoIndex];
1297
+ }, () => this._setupMediaRefreshTimer(), R), y(() => {
1298
+ var e, i;
1299
+ return [(e = this.viewModel) == null ? void 0 : e.description, (i = this.viewModel) == null ? void 0 : i.title];
1300
+ }, () => this._setupFeatureElementInfo(), R)]);
1301
+ }
1302
+ loadDependencies() {
1303
+ return qe({ icon: () => import("./calcite-icon-07f22bc6.js") });
1304
+ }
1305
+ destroy() {
1306
+ var e;
1307
+ this._clearMediaRefreshTimer(), (e = this._featureElementInfo) == null || e.destroy();
1308
+ }
1309
+ get attributes() {
1310
+ return this.viewModel.attributes;
1311
+ }
1312
+ set attributes(e) {
1313
+ this.viewModel.attributes = e;
1314
+ }
1315
+ get activeMediaInfoIndex() {
1316
+ return this.viewModel.activeMediaInfoIndex;
1317
+ }
1318
+ set activeMediaInfoIndex(e) {
1319
+ this.viewModel.activeMediaInfoIndex = e;
1320
+ }
1321
+ get description() {
1322
+ return this.viewModel.description;
1323
+ }
1324
+ set description(e) {
1325
+ this.viewModel.description = e;
1326
+ }
1327
+ get fieldInfoMap() {
1328
+ return this.viewModel.fieldInfoMap;
1329
+ }
1330
+ set fieldInfoMap(e) {
1331
+ this.viewModel.fieldInfoMap = e;
1332
+ }
1333
+ get layer() {
1334
+ return this.viewModel.layer;
1335
+ }
1336
+ set layer(e) {
1337
+ this.viewModel.layer = e;
1338
+ }
1339
+ get mediaInfos() {
1340
+ return this.viewModel.mediaInfos;
1341
+ }
1342
+ set mediaInfos(e) {
1343
+ this.viewModel.mediaInfos = e;
1344
+ }
1345
+ get popupTemplate() {
1346
+ return this.viewModel.popupTemplate;
1347
+ }
1348
+ set popupTemplate(e) {
1349
+ this.viewModel.popupTemplate = e;
1350
+ }
1351
+ get relatedInfos() {
1352
+ return this.viewModel.relatedInfos;
1353
+ }
1354
+ set relatedInfos(e) {
1355
+ this.viewModel.relatedInfos = e;
1356
+ }
1357
+ get title() {
1358
+ return this.viewModel.title;
1359
+ }
1360
+ set title(e) {
1361
+ this.viewModel.title = e;
1362
+ }
1363
+ render() {
1364
+ var e;
1365
+ return h("div", { bind: this, class: Z.base, onkeyup: this._handleMediaKeyup }, (e = this._featureElementInfo) == null ? void 0 : e.render(), this._renderMedia());
1366
+ }
1367
+ _renderMedia() {
1368
+ const { formattedMediaInfoCount: e, activeMediaInfoIndex: i } = this.viewModel, s = this._renderMediaText();
1369
+ return e ? h("div", { class: Z.mediaContainer, key: "media-element-container" }, this._renderMediaInfo(), h("div", { class: Z.mediaNavigation }, s, e > 1 ? h("div", { class: Z.mediaPagination }, this._renderMediaPageButton("previous"), h("span", { class: Z.mediaPaginationText }, de(this.messages.pageText, { index: i + 1, total: e })), this._renderMediaPageButton("next")) : null)) : null;
1370
+ }
1371
+ _renderMediaText() {
1372
+ const { activeMediaInfo: e } = this.viewModel;
1373
+ if (!e)
1374
+ return null;
1375
+ const i = e && e.title ? h("div", { class: Z.mediaItemTitle, innerHTML: e.title, key: "media-title" }) : null, s = e && e.caption ? h("div", { class: Z.mediaItemCaption, innerHTML: e.caption, key: "media-caption" }) : null;
1376
+ return i || s ? h("div", { class: Z.mediaItemText, key: "media-text" }, i, s) : null;
1377
+ }
1378
+ _renderImageMediaInfo(e) {
1379
+ const { _refreshIntervalInfo: i } = this, { activeMediaInfoIndex: s, formattedMediaInfoCount: n } = this.viewModel, { value: r, refreshInterval: o, altText: d, title: c, type: u } = e, { sourceURL: p, linkURL: m } = r, f = Qi(m ?? void 0) ? "_blank" : "_self", g = f === "_blank" ? "noreferrer" : "", v = o ? i : null, _ = v ? v.timestamp : 0, I = v ? v.sourceURL : p, w = h("img", { alt: d || c, key: `media-${u}-${s}-${n}-${_}`, src: I ?? void 0 });
1380
+ return (m ? h("a", { href: m, rel: g, target: f, title: c }, w) : null) ?? w;
1381
+ }
1382
+ _renderChartMediaInfo(e) {
1383
+ const { activeMediaInfoIndex: i, formattedMediaInfoCount: s } = this.viewModel;
1384
+ return h("div", { afterCreate: this._createChart, afterRemoved: this._disposeChart, bind: this, class: Z.mediaChart, key: `media-${e.type}-${i}-${s}` });
1385
+ }
1386
+ _renderMediaInfoType() {
1387
+ const { activeMediaInfo: e } = this.viewModel;
1388
+ return e ? e.type === "image" ? this._renderImageMediaInfo(e) : e.type.includes("chart") ? this._renderChartMediaInfo(e) : null : null;
1389
+ }
1390
+ _renderMediaInfo() {
1391
+ const { activeMediaInfo: e } = this.viewModel;
1392
+ return e ? h("div", { class: Z.mediaItemContainer, key: "media-container" }, h("div", { class: Z.mediaItem, key: "media-item-container" }, this._renderMediaInfoType())) : null;
1393
+ }
1394
+ _renderMediaPageButton(e) {
1395
+ if (this.viewModel.formattedMediaInfoCount < 2)
1396
+ return null;
1397
+ const i = e === "previous", s = i ? this.messages.previous : this.messages.next, n = i ? "chevron-left" : "chevron-right", r = i ? "media-previous" : "media-next", o = i ? this._previous : this._next;
1398
+ return h("button", { "aria-label": s, bind: this, class: Z.mediaPaginationButton, key: r, onclick: o, tabIndex: 0, title: s, type: "button" }, h("calcite-icon", { class: Z.mediaPaginationIcon, icon: n, scale: "s" }));
1399
+ }
1400
+ _setupFeatureElementInfo() {
1401
+ var s;
1402
+ const { description: e, title: i } = this;
1403
+ (s = this._featureElementInfo) == null || s.set({ description: e, title: i });
1404
+ }
1405
+ _next() {
1406
+ this.viewModel.next();
1407
+ }
1408
+ _previous() {
1409
+ this.viewModel.previous();
1410
+ }
1411
+ _getRenderer() {
1412
+ if (!this.viewModel)
1413
+ return;
1414
+ const { isAggregate: e, layer: i } = this.viewModel;
1415
+ return e && (i != null && i.featureReduction) && "renderer" in i.featureReduction ? i.featureReduction.renderer : i == null ? void 0 : i.renderer;
1416
+ }
1417
+ async _getSeriesColors(e) {
1418
+ const { colorAm5: i } = await import("./chartCommon-cceb2530.js"), s = /* @__PURE__ */ new Map();
1419
+ return e.forEach((n) => {
1420
+ n.color && s.set(n, i(n.color.toCss(!0)));
1421
+ }), s;
1422
+ }
1423
+ async _getRendererColors() {
1424
+ const { colorAm5: e } = await import("./chartCommon-cceb2530.js"), i = /* @__PURE__ */ new Map(), s = this._getRenderer(), n = "default";
1425
+ if (!s)
1426
+ return i;
1427
+ const r = await cr(s);
1428
+ return r.delete(n), Array.from(r.values()).every((o) => (o == null ? void 0 : o.length) === 1) && Array.from(r.keys()).forEach((o) => {
1429
+ var c, u;
1430
+ const d = (u = (c = r.get(o)) == null ? void 0 : c[0]) == null ? void 0 : u.toCss(!0);
1431
+ d && i.set(o, e(d));
1432
+ }), i;
1433
+ }
1434
+ _handleMediaKeyup(e) {
1435
+ const { key: i } = e;
1436
+ i === "ArrowLeft" && (e.stopPropagation(), this.viewModel.previous()), i === "ArrowRight" && (e.stopPropagation(), this.viewModel.next());
1437
+ }
1438
+ _canAnimateChart() {
1439
+ return !!this.viewModel && !!this.viewModel.abilities.chartAnimation && !Jn();
1440
+ }
1441
+ _getChartAnimationMS() {
1442
+ return this._canAnimateChart() ? Er : 0;
1443
+ }
1444
+ _getChartSeriesAnimationMS() {
1445
+ return this._canAnimateChart() ? xr : 0;
1446
+ }
1447
+ async _renderChart(e) {
1448
+ const { root: i, mediaInfo: s } = e, { value: n, type: r } = s, { ResponsiveThemeAm5: o, DarkThemeAm5: d, AnimatedThemeAm5: c, ColorSetAm5: u, ThemeAm5: p, esriChartColorSet: m } = await import("./chartCommon-cceb2530.js"), f = p.new(i);
1449
+ f.rule("ColorSet").set("colors", m), f.rule("ColorSet").set("reuse", !0);
1450
+ const g = [o.new(i), f];
1451
+ Ps() && g.push(d.new(i)), this._canAnimateChart() && g.push(c.new(i)), i.setThemes(g);
1452
+ const v = await this._getRendererColors(), _ = await this._getSeriesColors(n.series), I = u.new(i, {}), w = _.get(n.series[0]), A = w ? { lineSettings: { stroke: w } } : void 0, k = n.series.map((M, re) => {
1453
+ const K = _.get(M) || v.get(M.fieldName) || I.getIndex(re);
1454
+ return { [fe]: M.tooltip, [ze]: M.value, columnSettings: { fill: K, stroke: K }, ...A };
1455
+ }).filter((M) => r !== "pie-chart" || M.value != null && M.value > 0);
1456
+ r === "pie-chart" ? this._createPieChart(e, k) : this._createXYChart(e, k);
1457
+ }
1458
+ _getDirection() {
1459
+ return xe(this.container) ? "rtl" : "ltr";
1460
+ }
1461
+ _isInversed() {
1462
+ return !!xe(this.container);
1463
+ }
1464
+ async _customizeChartTooltip(e, i = "horizontal") {
1465
+ var n;
1466
+ const { colorAm5: s } = await import("./chartCommon-cceb2530.js");
1467
+ e.setAll({ pointerOrientation: i }), (n = e.get("background")) == null || n.setAll({ stroke: s($r) }), e.label.setAll({ direction: this._getDirection(), oversizedBehavior: "wrap", maxWidth: kr });
1468
+ }
1469
+ async _createPieChart(e, i) {
1470
+ const { TooltipAm5: s } = await import("./chartCommon-cceb2530.js"), { PieChartAm5: n, PieSeriesAm5: r } = await import("./pieChart-92709a5c.js"), { mediaInfo: o, root: d } = e, { title: c } = o, u = 5, p = (o == null ? void 0 : o.altText) || (o == null ? void 0 : o.title) || "", m = d.container.children.push(n.new(d, { ariaLabel: p, focusable: !0, paddingBottom: u, paddingTop: u, paddingLeft: u, paddingRight: u })), f = `{category}: {valuePercentTotal.formatNumber('0.00')}%
1471
+ ({value})`, g = s.new(d, { labelText: f }), v = m.series.push(r.new(d, { name: c, valueField: ze, categoryField: fe, tooltip: g }));
1472
+ v.ticks.template.set("forceHidden", !0), v.labels.template.set("forceHidden", !0), v.slices.template.states.create("active", { shiftRadius: u }), this._customizeChartTooltip(g), v.slices.template.setAll({ ariaLabel: f, focusable: !0, templateField: "columnSettings" }), v.data.setAll(i), v.appear(this._getChartSeriesAnimationMS()), m.appear(this._getChartAnimationMS()), m.root.dom.classList.toggle(Z.mediaChartRendered, !0);
1473
+ }
1474
+ _getMinSeriesValue(e) {
1475
+ let i = 0;
1476
+ return e.forEach((s) => i = Math.min(s.value, i)), i;
1477
+ }
1478
+ async _createColumnChart(e, i, s) {
1479
+ const { TooltipAm5: n, ScrollbarAm5: r } = await import("./chartCommon-cceb2530.js"), { CategoryAxisAm5: o, AxisRendererXAm5: d, ValueAxisAm5: c, AxisRendererYAm5: u, ColumnSeriesAm5: p } = await import("./xyChart-b3c4e27e.js"), { mediaInfo: m, root: f } = i, { value: g, title: v } = m;
1480
+ e.setAll({ wheelX: "panX", wheelY: "zoomX" });
1481
+ const _ = e.xAxes.push(o.new(f, { renderer: d.new(f, { inversed: this._isInversed() }), categoryField: fe }));
1482
+ _.get("renderer").labels.template.setAll({ forceHidden: !0 });
1483
+ const I = e.yAxes.push(c.new(f, { renderer: u.new(f, { inside: !1 }), min: this._getMinSeriesValue(g.series) }));
1484
+ I.get("renderer").labels.template.setAll({ direction: this._getDirection() });
1485
+ const w = "{categoryX}", A = n.new(f, { labelText: w }), k = e.series.push(p.new(f, { name: v, xAxis: _, yAxis: I, valueYField: ze, categoryXField: fe, tooltip: A }));
1486
+ this._customizeChartTooltip(A), k.columns.template.setAll({ ariaLabel: w, focusable: !0, templateField: "columnSettings" }), g.series.length > $t && e.set("scrollbarX", r.new(f, { orientation: "horizontal" })), _.data.setAll(s), k.data.setAll(s), k.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
1487
+ }
1488
+ async _createBarChart(e, i, s) {
1489
+ const { TooltipAm5: n, ScrollbarAm5: r } = await import("./chartCommon-cceb2530.js"), { CategoryAxisAm5: o, AxisRendererXAm5: d, ValueAxisAm5: c, AxisRendererYAm5: u, ColumnSeriesAm5: p } = await import("./xyChart-b3c4e27e.js"), { mediaInfo: m, root: f } = i, { value: g, title: v } = m;
1490
+ e.setAll({ wheelX: "panY", wheelY: "zoomY" });
1491
+ const _ = e.yAxes.push(o.new(f, { renderer: u.new(f, { inversed: !0 }), categoryField: fe }));
1492
+ _.get("renderer").labels.template.setAll({ forceHidden: !0 });
1493
+ const I = e.xAxes.push(c.new(f, { renderer: d.new(f, { inside: !1, inversed: this._isInversed() }), min: this._getMinSeriesValue(g.series) }));
1494
+ I.get("renderer").labels.template.setAll({ direction: this._getDirection() });
1495
+ const w = "{categoryY}", A = n.new(f, { labelText: w }), k = e.series.push(p.new(f, { name: v, xAxis: I, yAxis: _, valueXField: ze, categoryYField: fe, tooltip: A }));
1496
+ this._customizeChartTooltip(A, "vertical"), k.columns.template.setAll({ ariaLabel: w, focusable: !0, templateField: "columnSettings" }), g.series.length > $t && e.set("scrollbarY", r.new(f, { orientation: "vertical" })), _.data.setAll(s), k.data.setAll(s), k.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
1497
+ }
1498
+ async _createLineChart(e, i, s) {
1499
+ var re, K, ie;
1500
+ const { TooltipAm5: n, ScrollbarAm5: r } = await import("./chartCommon-cceb2530.js"), { CategoryAxisAm5: o, AxisRendererXAm5: d, ValueAxisAm5: c, AxisRendererYAm5: u, LineSeriesAm5: p } = await import("./xyChart-b3c4e27e.js"), { root: m, mediaInfo: f } = i, { value: g, title: v } = f;
1501
+ e.setAll({ wheelX: "panX", wheelY: "zoomX" });
1502
+ const _ = e.xAxes.push(o.new(m, { renderer: d.new(m, { inversed: this._isInversed() }), categoryField: fe }));
1503
+ _.get("renderer").labels.template.setAll({ forceHidden: !0 });
1504
+ const I = e.yAxes.push(c.new(m, { renderer: u.new(m, { inside: !1 }), min: this._getMinSeriesValue(g.series) }));
1505
+ I.get("renderer").labels.template.setAll({ direction: this._getDirection() });
1506
+ const w = "{categoryX}", A = (K = (re = s[0]) == null ? void 0 : re.lineSettings) == null ? void 0 : K.stroke, k = n.new(m, { getFillFromSprite: !A, labelText: w });
1507
+ A && ((ie = k.get("background")) == null || ie.setAll({ fill: A }));
1508
+ const M = e.series.push(p.new(m, { name: v, xAxis: _, yAxis: I, valueYField: ze, categoryXField: fe, tooltip: k }));
1509
+ M.strokes.template.setAll({ templateField: "lineSettings" }), this._customizeChartTooltip(k, "vertical"), g.series.length > $t && e.set("scrollbarX", r.new(m, { orientation: "horizontal" })), _.data.setAll(s), M.data.setAll(s), M.appear(this._getChartSeriesAnimationMS()), e.appear(this._getChartAnimationMS());
1510
+ }
1511
+ async _createXYChart(e, i) {
1512
+ const { XYChartAm5: s, XYCursorAm5: n } = await import("./xyChart-b3c4e27e.js"), { root: r, mediaInfo: o } = e, { type: d } = o, c = (o == null ? void 0 : o.altText) || (o == null ? void 0 : o.title) || "", u = r.container.children.push(s.new(r, { ariaLabel: c, focusable: !0, panX: !0, panY: !0 }));
1513
+ u.set("cursor", n.new(r, {})), d === "column-chart" && await this._createColumnChart(u, e, i), d === "bar-chart" && await this._createBarChart(u, e, i), d === "line-chart" && await this._createLineChart(u, e, i), u.root.dom.classList.toggle(Z.mediaChartRendered, !0);
1514
+ }
1515
+ _clearMediaRefreshTimer() {
1516
+ const { _refreshTimer: e } = this;
1517
+ e && (clearTimeout(e), this._refreshTimer = null);
1518
+ }
1519
+ _updateMediaInfoTimestamp(e) {
1520
+ const i = Date.now();
1521
+ this._refreshIntervalInfo = { timestamp: i, sourceURL: e && this._getImageSource(e, i) };
1522
+ }
1523
+ _setupMediaRefreshTimer() {
1524
+ this._clearMediaRefreshTimer();
1525
+ const { activeMediaInfo: e } = this.viewModel;
1526
+ e && e.type === "image" && e.refreshInterval && this._setRefreshTimeout(e);
1527
+ }
1528
+ _setRefreshTimeout(e) {
1529
+ const { refreshInterval: i, value: s } = e;
1530
+ if (!i)
1531
+ return;
1532
+ const n = 6e4 * i;
1533
+ this._updateMediaInfoTimestamp(s.sourceURL);
1534
+ const r = setInterval(() => {
1535
+ this._updateMediaInfoTimestamp(s.sourceURL);
1536
+ }, n);
1537
+ this._refreshTimer = r;
1538
+ }
1539
+ _getImageSource(e, i) {
1540
+ const s = e.includes("?") ? "&" : "?", [n, r = ""] = e.split("#");
1541
+ return `${n}${s}timestamp=${i}${r ? "#" : ""}${r}`;
1542
+ }
1543
+ };
1544
+ a([l()], Q.prototype, "_refreshIntervalInfo", void 0), a([l()], Q.prototype, "attributes", null), a([l()], Q.prototype, "activeMediaInfoIndex", null), a([l()], Q.prototype, "description", null), a([l()], Q.prototype, "fieldInfoMap", null), a([l()], Q.prototype, "layer", null), a([l()], Q.prototype, "mediaInfos", null), a([l()], Q.prototype, "popupTemplate", null), a([l()], Q.prototype, "relatedInfos", null), a([l()], Q.prototype, "title", null), a([l({ type: Ce })], Q.prototype, "viewModel", void 0), a([l(), ee("esri/widgets/Feature/t9n/Feature")], Q.prototype, "messages", void 0), Q = a([O("esri.widgets.Feature.FeatureMedia")], Q);
1545
+ const os = Q, Tr = "esri.widgets.Feature.support.arcadeFeatureUtils", bi = () => q.getLogger(Tr);
1546
+ function Lr(t) {
1547
+ return typeof t == "string" ? Xe(Ut(t)) : Array.isArray(t) ? Rr(t) : (t == null ? void 0 : t.declaredClass) === "esri.arcade.Dictionary" ? Pr(t) : t;
1548
+ }
1549
+ function Rr(t) {
1550
+ return `<ul class="esri-widget__list">${t.map((e) => `<li>${typeof e == "string" ? Xe(Ut(e)) : e}</li>`).join("")}</ul>`;
1551
+ }
1552
+ function Pr(t) {
1553
+ const e = t.keys().map((i) => {
1554
+ const s = t.field(i);
1555
+ return `<tr><th>${i}</th><td>${typeof s == "string" ? Xe(Ut(s)) : s}</td></tr>`;
1556
+ }).join("");
1557
+ return `<table class="${F.table}">${e}</table>`;
1558
+ }
1559
+ function as() {
1560
+ return import("./arcade-b05c8c22.js");
1561
+ }
1562
+ function Or(t) {
1563
+ return "createQuery" in t && "queryFeatures" in t;
1564
+ }
1565
+ async function Nr({ graphic: t, view: e, options: i }) {
1566
+ const { isAggregate: s, layer: n } = t;
1567
+ if (!s || !n || (e == null ? void 0 : e.type) !== "2d")
1568
+ return [];
1569
+ const r = await e.whenLayerView(n);
1570
+ if (!Or(r))
1571
+ return [];
1572
+ const o = r.createQuery(), d = t.getObjectId();
1573
+ o.aggregateIds = d != null ? [d] : [];
1574
+ const { features: c } = await r.queryFeatures(o, i);
1575
+ return c;
1576
+ }
1577
+ function Sr({ layer: t, aggregatedFeatures: e, interceptor: i }) {
1578
+ const { fields: s, objectIdField: n, geometryType: r, spatialReference: o, displayField: d } = t;
1579
+ return new dn({ fields: s, objectIdField: n, geometryType: r, spatialReference: o, displayField: d, interceptor: i, ...t.type === "feature" ? { templates: t.templates, typeIdField: t.typeIdField, types: t.types } : null, source: e });
1580
+ }
1581
+ async function ls({ expressionInfo: t, arcade: e, interceptor: i, spatialReference: s, map: n, graphic: r, location: o, view: d, options: c }) {
1582
+ var k;
1583
+ if (!(t != null && t.expression))
1584
+ return null;
1585
+ const { isAggregate: u } = r, p = (r.sourceLayer || r.layer) ?? void 0, m = u ? "feature-reduction-popup" : "popup", f = e.createArcadeProfile(m), g = e.createArcadeExecutor(t.expression, f).catch((M) => bi().error("arcade-executor-error", { error: M, expressionInfo: t })), [v, _] = await Promise.all([Nr({ graphic: r, view: d, options: c }), g]);
1586
+ if (!_)
1587
+ return null;
1588
+ const I = m === "feature-reduction-popup" ? Sr({ layer: p, aggregatedFeatures: v, interceptor: i }) : void 0, w = { ...m === "feature-reduction-popup" ? { $aggregatedFeatures: I } : { $datastore: p == null ? void 0 : p.url, $layer: (p == null ? void 0 : p.type) === "feature" || (p == null ? void 0 : p.type) === "subtype-sublayer" ? p : (p == null ? void 0 : p.type) === "scene" && p.associatedLayer != null ? p.associatedLayer : void 0, $map: n, $userInput: o, $graph: (p == null ? void 0 : p.type) === "knowledge-graph-sublayer" ? (k = p == null ? void 0 : p.parentCompositeLayer) == null ? void 0 : k.knowledgeGraph : void 0 }, $feature: r }, A = { abortSignal: (c == null ? void 0 : c.signal) ?? void 0, interceptor: i ?? void 0, rawOutput: !0, spatialReference: s ?? void 0, timeZone: d == null ? void 0 : d.timeZone };
1589
+ return await _.executeAsync(w, A).catch((M) => bi().error("arcade-execution-error", { error: M, graphic: r, expressionInfo: t })).finally(() => I == null ? void 0 : I.destroy());
1590
+ }
1591
+ async function Vr({ expressionInfos: t, spatialReference: e, graphic: i, interceptor: s, map: n, view: r, location: o, options: d }) {
1592
+ if (!(t != null && t.length))
1593
+ return {};
1594
+ const c = await as(), u = {};
1595
+ for (const f of t)
1596
+ u[`expression/${f.name}`] = ls({ expressionInfo: f, arcade: c, interceptor: s, spatialReference: e, map: n, graphic: i, location: o, view: r, options: d });
1597
+ const p = await ke(u), m = {};
1598
+ for (const f in p)
1599
+ m[f] = Lr(p[f].value);
1600
+ return m;
1601
+ }
1602
+ const Br = 1;
1603
+ let Y = class extends me {
1604
+ constructor(e) {
1605
+ super(e), this._abortController = null, this.expressionInfo = null, this.graphic = null, this.contentElement = null, this.contentElementViewModel = null, this.interceptor = null, this.location = null, this.view = null, this._cancelQuery = () => {
1606
+ const { _abortController: i } = this;
1607
+ i && i.abort(), this._abortController = null;
1608
+ }, this._createVM = () => {
1609
+ var n, r;
1610
+ const i = (n = this.contentElement) == null ? void 0 : n.type;
1611
+ (r = this.contentElementViewModel) == null || r.destroy();
1612
+ const s = i === "fields" ? new pt() : i === "media" ? new Ce() : i === "text" ? new dt() : null;
1613
+ this._set("contentElementViewModel", s);
1614
+ }, this._compile = async () => {
1615
+ this._cancelQuery();
1616
+ const i = new AbortController();
1617
+ this._abortController = i, await this._compileExpression(), this._abortController === i && (this._abortController = null);
1618
+ }, this._compileThrottled = at(this._compile, Br, this), this._compileExpression = async () => {
1619
+ const { expressionInfo: i, graphic: s, interceptor: n, spatialReference: r, map: o, location: d, view: c, _abortController: u } = this;
1620
+ if (!i || !s)
1621
+ return void this._set("contentElement", null);
1622
+ const p = await as();
1623
+ if (u !== this._abortController)
1624
+ return;
1625
+ const m = await ls({ arcade: p, expressionInfo: i, graphic: s, location: d, interceptor: n, map: o, spatialReference: r, view: c });
1626
+ if (!m || m.declaredClass !== "esri.arcade.Dictionary")
1627
+ return void this._set("contentElement", null);
1628
+ const f = await m.castAsJsonAsync(u == null ? void 0 : u.signal), g = f == null ? void 0 : f.type, v = g === "media" ? Ns.fromJSON(f) : g === "text" ? Di.fromJSON(f) : g === "fields" ? Ss.fromJSON(f) : null;
1629
+ this._set("contentElement", v);
1630
+ }, this.addHandles([y(() => [this.expressionInfo, this.graphic, this.map, this.spatialReference, this.view], () => this._compileThrottled(), R), y(() => [this.contentElement], () => this._createVM(), R)]);
1631
+ }
1632
+ initialize() {
1633
+ this.addHandles(this._compileThrottled);
1634
+ }
1635
+ destroy() {
1636
+ var e;
1637
+ this._cancelQuery(), (e = this.contentElementViewModel) == null || e.destroy(), this._set("contentElementViewModel", null), this._set("contentElement", null);
1638
+ }
1639
+ get spatialReference() {
1640
+ var e;
1641
+ return ((e = this.view) == null ? void 0 : e.spatialReference) ?? null;
1642
+ }
1643
+ set spatialReference(e) {
1644
+ this._override("spatialReference", e);
1645
+ }
1646
+ get state() {
1647
+ const { _abortController: e, contentElement: i, contentElementViewModel: s } = this;
1648
+ return e ? "loading" : i || s ? "ready" : "disabled";
1649
+ }
1650
+ get map() {
1651
+ var e;
1652
+ return ((e = this.view) == null ? void 0 : e.map) ?? null;
1653
+ }
1654
+ set map(e) {
1655
+ this._override("map", e);
1656
+ }
1657
+ };
1658
+ a([l()], Y.prototype, "_abortController", void 0), a([l({ type: Os })], Y.prototype, "expressionInfo", void 0), a([l({ type: De })], Y.prototype, "graphic", void 0), a([l({ readOnly: !0 })], Y.prototype, "contentElement", void 0), a([l({ readOnly: !0 })], Y.prototype, "contentElementViewModel", void 0), a([l()], Y.prototype, "interceptor", void 0), a([l({ type: zt })], Y.prototype, "location", void 0), a([l()], Y.prototype, "spatialReference", null), a([l({ readOnly: !0 })], Y.prototype, "state", null), a([l()], Y.prototype, "map", null), a([l()], Y.prototype, "view", void 0), Y = a([O("esri.widgets.Feature.FeatureExpression.FeatureExpressionViewModel")], Y);
1659
+ const Xt = Y, Et = "esri-feature", xt = { base: `${Et}-expression`, loadingSpinnerContainer: `${Et}__loading-container`, spinner: `${Et}__loading-spinner` };
1660
+ let st = class extends te {
1661
+ constructor(e, i) {
1662
+ super(e, i), this._contentWidget = null, this.viewModel = new Xt();
1663
+ }
1664
+ initialize() {
1665
+ this.addHandles(y(() => {
1666
+ var e;
1667
+ return (e = this.viewModel) == null ? void 0 : e.contentElementViewModel;
1668
+ }, () => this._setupExpressionWidget(), R));
1669
+ }
1670
+ destroy() {
1671
+ this._destroyContentWidget();
1672
+ }
1673
+ render() {
1674
+ var i;
1675
+ const { state: e } = this.viewModel;
1676
+ return h("div", { class: xt.base }, e === "loading" ? this._renderLoading() : e === "disabled" ? null : (i = this._contentWidget) == null ? void 0 : i.render());
1677
+ }
1678
+ _renderLoading() {
1679
+ return h("div", { class: xt.loadingSpinnerContainer, key: "loading-container" }, h("span", { class: this.classes(ne.loadingIndicator, F.rotating, xt.spinner) }));
1680
+ }
1681
+ _destroyContentWidget() {
1682
+ const { _contentWidget: e } = this;
1683
+ e && (e.viewModel = null, e.destroy()), this._contentWidget = null;
1684
+ }
1685
+ _setupExpressionWidget() {
1686
+ const { contentElementViewModel: e, contentElement: i } = this.viewModel, s = i == null ? void 0 : i.type;
1687
+ this._destroyContentWidget();
1688
+ const n = e ? s === "fields" ? new rs({ viewModel: e }) : s === "media" ? new os({ viewModel: e }) : s === "text" ? new tt({ viewModel: e }) : null : null;
1689
+ this._contentWidget = n, this.scheduleRender();
1690
+ }
1691
+ };
1692
+ a([l({ type: Xt })], st.prototype, "viewModel", void 0), st = a([O("esri.widgets.Feature.FeatureExpression")], st);
1693
+ const Dr = st;
1694
+ var Mi;
1695
+ (function(t) {
1696
+ t.TOO_SHORT = "length-validation-error::too-short";
1697
+ })(Mi || (Mi = {}));
1698
+ const qr = (t) => {
1699
+ var i;
1700
+ const e = [];
1701
+ if (t.formTemplate) {
1702
+ const { description: s, title: n } = t.formTemplate;
1703
+ (i = t.fields) == null || i.forEach((r) => {
1704
+ const o = n && ri(n, r.name), d = s && ri(s, r.name);
1705
+ (o || d) && e.push(r.name);
1706
+ });
1707
+ }
1708
+ return e;
1709
+ }, kt = 100;
1710
+ let T = class extends Vs(qi(me)) {
1711
+ constructor(e) {
1712
+ super(e), this._loaded = !1, this._queryAbortController = null, this._queryPageAbortController = null, this._queryFeatureCountAbortController = null, this.featuresPerPage = 10, this.description = null, this.graphic = null, this.layer = null, this.map = null, this.orderByFields = null, this.featureCount = 0, this.relationshipId = null, this.showAllEnabled = !1, this.title = null, this._cancelQuery = () => {
1713
+ const { _queryAbortController: i } = this;
1714
+ i && i.abort(), this._queryAbortController = null;
1715
+ }, this._cancelQueryFeatureCount = () => {
1716
+ const { _queryFeatureCountAbortController: i } = this;
1717
+ i && i.abort(), this._queryFeatureCountAbortController = null;
1718
+ }, this._cancelQueryPage = () => {
1719
+ const { _queryPageAbortController: i } = this;
1720
+ i && i.abort(), this._queryPageAbortController = null;
1721
+ }, this._queryController = async () => {
1722
+ this._cancelQuery();
1723
+ const i = new AbortController();
1724
+ this._queryAbortController = i, await yt(this._query()), this._queryAbortController === i && (this._queryAbortController = null);
1725
+ }, this._queryFeatureCountController = async () => {
1726
+ this._loaded = !1, this._cancelQueryFeatureCount();
1727
+ const i = new AbortController();
1728
+ this._queryFeatureCountAbortController = i, await yt(this._queryFeatureCount()), this._queryFeatureCountAbortController === i && (this._queryFeatureCountAbortController = null), this._loaded = !0;
1729
+ }, this._queryPageController = async () => {
1730
+ const i = new AbortController();
1731
+ this._queryPageAbortController = i, await yt(this._queryPage()), this._queryPageAbortController === i && (this._queryPageAbortController = null);
1732
+ }, this._queryDebounced = et(this._queryController, kt), this._queryFeatureCountDebounced = et(this._queryFeatureCountController, kt), this._queryPageDebounced = et(this._queryPageController, kt), this._query = async () => {
1733
+ const { _queryAbortController: i, relatedFeatures: s } = this;
1734
+ this.featureCount && (this._destroyRelatedFeatureViewModels(), this.featurePage = 1, s.removeAll(), this.destroyed || s.addMany(this._sliceFeatures(await this._queryRelatedFeatures({ signal: i == null ? void 0 : i.signal }))));
1735
+ }, this.addHandles([y(() => {
1736
+ var i;
1737
+ return [this.displayCount, this.graphic, this.layer, (i = this.layer) == null ? void 0 : i.loaded, this.map, this.orderByFields, this.relationshipId, this.featuresPerPage, this.showAllEnabled, this.canQuery, this.featureCount];
1738
+ }, () => this._queryDebounced(), R), y(() => [this.featurePage, this.showAllEnabled], () => this._queryPageDebounced()), y(() => [this.layer, this.relationshipId, this.objectId, this.canQuery], () => this._queryFeatureCountDebounced())]);
1739
+ }
1740
+ destroy() {
1741
+ this._destroyRelatedFeatureViewModels(), this.relatedFeatures.removeAll(), this._cancelQuery(), this._cancelQueryFeatureCount(), this._cancelQueryPage();
1742
+ }
1743
+ set featurePage(e) {
1744
+ const { featuresPerPage: i, featureCount: s } = this, n = 1, r = Math.ceil(s / i) || 1;
1745
+ this._set("featurePage", Math.min(Math.max(e, n), r));
1746
+ }
1747
+ get featurePage() {
1748
+ return this._get("featurePage");
1749
+ }
1750
+ get orderByFieldsFixedCasing() {
1751
+ const { orderByFields: e, relatedLayer: i } = this;
1752
+ return e && (i != null && i.loaded) ? e.map((s) => {
1753
+ const n = s.clone();
1754
+ return n.field = Qe(s.field, i), n;
1755
+ }) : e ?? [];
1756
+ }
1757
+ get supportsCacheHint() {
1758
+ var e, i, s;
1759
+ return !!((s = (i = (e = this.layer) == null ? void 0 : e.capabilities) == null ? void 0 : i.queryRelated) != null && s.supportsCacheHint);
1760
+ }
1761
+ get canLoad() {
1762
+ return !!this.map && typeof this.relationshipId == "number" && typeof this.objectId == "number";
1763
+ }
1764
+ get canQuery() {
1765
+ var i, s;
1766
+ const e = (s = (i = this.layer) == null ? void 0 : i.capabilities) == null ? void 0 : s.queryRelated;
1767
+ return !!(this.relatedLayer && this.relationship && typeof this.relationshipId == "number" && typeof this.objectId == "number" && (e != null && e.supportsCount) && (e != null && e.supportsPagination));
1768
+ }
1769
+ get itemDescriptionFieldName() {
1770
+ var e;
1771
+ return ((e = this.orderByFieldsFixedCasing[0]) == null ? void 0 : e.field) || null;
1772
+ }
1773
+ set displayCount(e) {
1774
+ this._set("displayCount", Math.min(Math.max(e, 0), 10));
1775
+ }
1776
+ get displayCount() {
1777
+ return this._get("displayCount");
1778
+ }
1779
+ get objectId() {
1780
+ var e, i;
1781
+ return (this.objectIdField && ((i = (e = this.graphic) == null ? void 0 : e.attributes) == null ? void 0 : i[this.objectIdField])) ?? null;
1782
+ }
1783
+ get objectIdField() {
1784
+ var e;
1785
+ return ((e = this.layer) == null ? void 0 : e.objectIdField) || null;
1786
+ }
1787
+ get relatedFeatures() {
1788
+ return this._get("relatedFeatures") || new Ve();
1789
+ }
1790
+ get relatedLayer() {
1791
+ const { layer: e, map: i, relationship: s } = this;
1792
+ return e != null && e.loaded && i && s ? Wn(i, e, s) ?? null : null;
1793
+ }
1794
+ get relationship() {
1795
+ var s;
1796
+ const { relationshipId: e, layer: i } = this;
1797
+ return typeof e == "number" ? ((s = i == null ? void 0 : i.relationships) == null ? void 0 : s.find(({ id: n }) => n === e)) ?? null : null;
1798
+ }
1799
+ get relatedFeatureViewModels() {
1800
+ return this._get("relatedFeatureViewModels") || new Ve();
1801
+ }
1802
+ get state() {
1803
+ const { _queryAbortController: e, _queryFeatureCountAbortController: i, _queryPageAbortController: s, canQuery: n, _loaded: r, canLoad: o } = this;
1804
+ return i || o && !r ? "loading" : e || s ? "querying" : n ? "ready" : "disabled";
1805
+ }
1806
+ getRelatedFeatureByObjectId(e) {
1807
+ return this.relatedFeatures.find((i) => i.getObjectId() === e);
1808
+ }
1809
+ refresh() {
1810
+ this._queryFeatureCountDebounced();
1811
+ }
1812
+ _destroyRelatedFeatureViewModels() {
1813
+ var e;
1814
+ (e = this.relatedFeatureViewModels) == null || e.forEach((i) => !i.destroyed && i.destroy()), this.relatedFeatureViewModels.removeAll();
1815
+ }
1816
+ async _queryFeatureCount() {
1817
+ const { layer: e, relatedLayer: i, relationshipId: s, objectId: n, _queryFeatureCountAbortController: r, canQuery: o, supportsCacheHint: d } = this;
1818
+ if (await (e == null ? void 0 : e.load()), await (i == null ? void 0 : i.load()), !o || !e || !i)
1819
+ return void this._set("featureCount", 0);
1820
+ const c = i.createQuery(), u = new Pt({ cacheHint: d, relationshipId: s, returnGeometry: !1, objectIds: [n], where: c.where ?? void 0 }), p = await e.queryRelatedFeaturesCount(u, { signal: r == null ? void 0 : r.signal });
1821
+ this._set("featureCount", p[n] || 0);
1822
+ }
1823
+ _sliceFeatures(e) {
1824
+ const { showAllEnabled: i, displayCount: s } = this;
1825
+ return i ? e : s ? e.slice(0, s) : [];
1826
+ }
1827
+ async _queryPage() {
1828
+ const { relatedFeatures: e, featurePage: i, showAllEnabled: s, _queryPageAbortController: n, featureCount: r } = this;
1829
+ !s || i < 2 || !r || e.addMany(await this._queryRelatedFeatures({ signal: n == null ? void 0 : n.signal }));
1830
+ }
1831
+ async _queryRelatedFeatures(e) {
1832
+ var ie;
1833
+ const { orderByFieldsFixedCasing: i, showAllEnabled: s, featuresPerPage: n, displayCount: r, layer: o, relationshipId: d, featurePage: c, featureCount: u, relatedLayer: p, supportsCacheHint: m } = this, { canQuery: f, objectId: g } = this;
1834
+ if (!f || !o || !p)
1835
+ return [];
1836
+ const v = s ? ((c - 1) * n + u) % u : 0, _ = s ? n : r, I = p.objectIdField, w = [...i.map((H) => H.field), ...qr(p), I].filter(ut), A = i.map((H) => `${H.field} ${H.order}`), k = p.createQuery(), M = new Pt({ orderByFields: A, start: v, num: _, outFields: w, cacheHint: m, relationshipId: d, returnGeometry: !1, objectIds: [g], where: k.where ?? void 0 }), re = await o.queryRelatedFeatures(M, { signal: e == null ? void 0 : e.signal }), K = ((ie = re[g]) == null ? void 0 : ie.features) || [];
1837
+ return K.forEach((H) => {
1838
+ H.sourceLayer = p, H.layer = p;
1839
+ }), K;
1840
+ }
1841
+ };
1842
+ a([l()], T.prototype, "_loaded", void 0), a([l()], T.prototype, "_queryAbortController", void 0), a([l()], T.prototype, "_queryPageAbortController", void 0), a([l()], T.prototype, "_queryFeatureCountAbortController", void 0), a([l({ value: 1 })], T.prototype, "featurePage", null), a([l()], T.prototype, "featuresPerPage", void 0), a([l({ readOnly: !0 })], T.prototype, "orderByFieldsFixedCasing", null), a([l({ readOnly: !0 })], T.prototype, "supportsCacheHint", null), a([l({ readOnly: !0 })], T.prototype, "canLoad", null), a([l({ readOnly: !0 })], T.prototype, "canQuery", null), a([l()], T.prototype, "description", void 0), a([l({ readOnly: !0 })], T.prototype, "itemDescriptionFieldName", null), a([l({ value: 3 })], T.prototype, "displayCount", null), a([l({ type: De })], T.prototype, "graphic", void 0), a([l()], T.prototype, "layer", void 0), a([l()], T.prototype, "map", void 0), a([l({ readOnly: !0 })], T.prototype, "objectId", null), a([l({ readOnly: !0 })], T.prototype, "objectIdField", null), a([l()], T.prototype, "orderByFields", void 0), a([l({ readOnly: !0 })], T.prototype, "relatedFeatures", null), a([l({ readOnly: !0 })], T.prototype, "relatedLayer", null), a([l({ readOnly: !0 })], T.prototype, "relationship", null), a([l()], T.prototype, "featureCount", void 0), a([l({ readOnly: !0 })], T.prototype, "relatedFeatureViewModels", null), a([l()], T.prototype, "relationshipId", void 0), a([l()], T.prototype, "showAllEnabled", void 0), a([l()], T.prototype, "state", null), a([l()], T.prototype, "title", void 0), T = a([O("esri.widgets.Feature.FeatureRelationship.FeatureRelationshipViewModel")], T);
1843
+ const Yt = T, je = "esri-feature", We = `${je}-relationship`, ce = { base: We, listContainer: `${We}__list`, listItem: `${We}__list-item`, listItemHidden: `${We}__list-item--hidden`, listContainerQuerying: `${We}__list--querying`, featureObserver: `${je}__feature-observer`, stickySpinnerContainer: `${je}__sticky-loading-container`, loadingSpinnerContainer: `${je}__loading-container`, spinner: `${je}__loading-spinner` }, Fi = { title: !0, description: !0 };
1844
+ let G = class extends te {
1845
+ constructor(t, e) {
1846
+ super(t, e), this._featureElementInfo = null, this._relatedFeatureIntersectionObserverNode = null, this._relatedFeatureIntersectionObserver = new IntersectionObserver(([i]) => {
1847
+ i != null && i.isIntersecting && this._increaseFeaturePage();
1848
+ }, { root: window.document }), this.headingLevel = 2, this.viewModel = new Yt(), this.messages = null, this.messagesCommon = null, this.visibleElements = { ...Fi }, this._increaseFeaturePage = () => {
1849
+ const { state: i, showAllEnabled: s, relatedFeatures: n, featuresPerPage: r, featurePage: o } = this.viewModel;
1850
+ i === "ready" && s && n.length >= r * o && this.viewModel.featurePage++;
1851
+ };
1852
+ }
1853
+ initialize() {
1854
+ this._featureElementInfo = new ht(), this.addHandles([y(() => [this.viewModel.description, this.viewModel.title, this.headingLevel], () => this._setupFeatureElementInfo(), R), y(() => [this.viewModel.state, this.viewModel.showAllEnabled, this._relatedFeatureIntersectionObserverNode], () => this._handleRelatedFeatureObserverChange()), Ee(() => this.viewModel.relatedFeatureViewModels, "change", () => this._setupRelatedFeatureViewModels())]);
1855
+ }
1856
+ loadDependencies() {
1857
+ return qe({ icon: () => import("./calcite-icon-07f22bc6.js"), list: () => import("./calcite-list-2087f9ca.js"), "list-item": () => import("./calcite-list-item-3419fb5f.js"), notice: () => import("./calcite-notice-88ee1edf.js") });
1858
+ }
1859
+ destroy() {
1860
+ this._unobserveRelatedFeatureObserver(), this._featureElementInfo = Bs(this._featureElementInfo);
1861
+ }
1862
+ get displayShowAllButton() {
1863
+ const { showAllEnabled: t, featureCount: e, displayCount: i, state: s } = this.viewModel;
1864
+ return !t && !!e && s === "ready" && (e > i || i === 0);
1865
+ }
1866
+ get displayListItems() {
1867
+ return this.displayShowAllButton || this.viewModel.relatedFeatureViewModels.length > 0;
1868
+ }
1869
+ get description() {
1870
+ return this.viewModel.description;
1871
+ }
1872
+ set description(t) {
1873
+ this.viewModel.description = t;
1874
+ }
1875
+ get featureCountDescription() {
1876
+ const { messages: t } = this, { featureCount: e } = this.viewModel;
1877
+ return de(t == null ? void 0 : t.numberRecords, { number: e });
1878
+ }
1879
+ get title() {
1880
+ return this.viewModel.title;
1881
+ }
1882
+ set title(t) {
1883
+ this.viewModel.title = t;
1884
+ }
1885
+ castVisibleElements(t) {
1886
+ return { ...Fi, ...t };
1887
+ }
1888
+ render() {
1889
+ var e;
1890
+ const { state: t } = this.viewModel;
1891
+ return h("div", { class: this.classes(ce.base, F.widget) }, (e = this._featureElementInfo) == null ? void 0 : e.render(), t === "loading" ? this._renderLoading() : t === "disabled" ? this._renderRelationshipNotFound() : this._renderRelatedFeatures());
1892
+ }
1893
+ _renderStickyLoading() {
1894
+ return this.viewModel.state === "querying" ? h("div", { class: ce.stickySpinnerContainer, key: "sticky-loader" }, this._renderLoadingIcon()) : null;
1895
+ }
1896
+ _renderLoadingIcon() {
1897
+ return h("span", { class: this.classes(ne.loadingIndicator, F.rotating, ce.spinner) });
1898
+ }
1899
+ _renderLoading() {
1900
+ return h("div", { class: ce.loadingSpinnerContainer, key: "loading-container" }, this._renderLoadingIcon());
1901
+ }
1902
+ _renderShowAllIconNode() {
1903
+ return h("calcite-icon", { icon: "list", scale: "s", slot: "content-end" });
1904
+ }
1905
+ _renderChevronIconNode() {
1906
+ const t = xe(this.container) ? "chevron-left" : "chevron-right";
1907
+ return h("calcite-icon", { icon: t, scale: "s", slot: "content-end" });
1908
+ }
1909
+ _renderRelatedFeature(t) {
1910
+ var n;
1911
+ const { itemDescriptionFieldName: e } = this.viewModel, i = t.title;
1912
+ t.description = e && ((n = t.formattedAttributes) == null ? void 0 : n.global[e]);
1913
+ const s = t.state === "loading";
1914
+ return h("calcite-list-item", { class: this.classes(ce.listItem, { [ce.listItemHidden]: s }), description: t.description ?? "", key: t.uid, label: i, onCalciteListItemSelect: () => this.emit("select-record", { featureViewModel: t }) }, this._renderChevronIconNode());
1915
+ }
1916
+ _renderShowAllListItem() {
1917
+ var t;
1918
+ return this.displayShowAllButton ? h("calcite-list-item", { description: this.featureCountDescription, key: "show-all-item", label: (t = this.messages) == null ? void 0 : t.showAll, onCalciteListItemSelect: () => this.emit("show-all-records") }, this._renderShowAllIconNode()) : null;
1919
+ }
1920
+ _renderNoRelatedFeaturesMessage() {
1921
+ var t;
1922
+ return h("calcite-notice", { icon: "information", key: "no-related-features-message", kind: "brand", open: !0, scale: "s", width: "full" }, h("div", { slot: "message" }, (t = this.messages) == null ? void 0 : t.noRelatedFeatures));
1923
+ }
1924
+ _renderFeatureObserver() {
1925
+ return h("div", { afterCreate: this._relatedFeatureIntersectionObserverCreated, bind: this, class: ce.featureObserver, key: "feature-observer" });
1926
+ }
1927
+ _renderList() {
1928
+ const { relatedFeatureViewModels: t } = this.viewModel;
1929
+ return h("calcite-list", null, t.toArray().map((e) => this._renderRelatedFeature(e)), this._renderShowAllListItem());
1930
+ }
1931
+ _renderRelatedFeatures() {
1932
+ const { displayListItems: t } = this, { state: e } = this.viewModel;
1933
+ return h("div", { class: this.classes(ce.listContainer, { [ce.listContainerQuerying]: e === "querying" }), key: "list-container" }, t ? this._renderList() : e === "ready" ? this._renderNoRelatedFeaturesMessage() : null, this._renderStickyLoading(), this._renderFeatureObserver());
1934
+ }
1935
+ _renderRelationshipNotFound() {
1936
+ var t;
1937
+ return h("calcite-notice", { icon: "exclamation-mark-triangle", key: "relationship-not-found", kind: "danger", open: !0, scale: "s", width: "full" }, h("div", { slot: "message" }, (t = this.messages) == null ? void 0 : t.relationshipNotFound));
1938
+ }
1939
+ _setupRelatedFeatureViewModels() {
1940
+ const { relatedFeatureViewModels: t } = this.viewModel, e = "related-feature-viewmodels";
1941
+ this.removeHandles(e), t == null || t.forEach((i) => {
1942
+ this.addHandles(y(() => [i.title, i.state], () => this.scheduleRender(), R), e);
1943
+ }), this.scheduleRender();
1944
+ }
1945
+ _setupFeatureElementInfo() {
1946
+ var n;
1947
+ const { headingLevel: t, visibleElements: e } = this, i = e.description && this.description, s = e.title && this.title;
1948
+ (n = this._featureElementInfo) == null || n.set({ description: i, title: s, headingLevel: t });
1949
+ }
1950
+ async _handleRelatedFeatureObserverChange() {
1951
+ this._unobserveRelatedFeatureObserver();
1952
+ const { state: t, showAllEnabled: e } = this.viewModel;
1953
+ await zi(0), this._relatedFeatureIntersectionObserverNode && t === "ready" && e && this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode);
1954
+ }
1955
+ _relatedFeatureIntersectionObserverCreated(t) {
1956
+ this._relatedFeatureIntersectionObserverNode = t;
1957
+ }
1958
+ _unobserveRelatedFeatureObserver() {
1959
+ this._relatedFeatureIntersectionObserverNode && this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode);
1960
+ }
1961
+ };
1962
+ a([l()], G.prototype, "_relatedFeatureIntersectionObserverNode", void 0), a([l({ readOnly: !0 })], G.prototype, "displayShowAllButton", null), a([l({ readOnly: !0 })], G.prototype, "displayListItems", null), a([l()], G.prototype, "description", null), a([l({ readOnly: !0 })], G.prototype, "featureCountDescription", null), a([l()], G.prototype, "headingLevel", void 0), a([l()], G.prototype, "title", null), a([l({ type: Yt })], G.prototype, "viewModel", void 0), a([l(), ee("esri/widgets/Feature/t9n/Feature")], G.prototype, "messages", void 0), a([l(), ee("esri/t9n/common")], G.prototype, "messagesCommon", void 0), a([l()], G.prototype, "visibleElements", void 0), a([Be("visibleElements")], G.prototype, "castVisibleElements", null), G = a([O("esri.widgets.Feature.FeatureRelationship")], G);
1963
+ const Ii = G;
1964
+ let zr = class {
1965
+ constructor(e, i) {
1966
+ this.preLayerQueryCallback = e, this.preRequestCallback = i, this.preLayerQueryCallback || (this.preLayerQueryCallback = (s) => {
1967
+ }), this.preRequestCallback || (this.preLayerQueryCallback = (s) => {
1968
+ });
1969
+ }
1970
+ };
1971
+ var Ue;
1972
+ const Wr = 1, Ci = "content-view-models", Ai = "relationship-view-models", $i = { attachmentsContent: !0, chartAnimation: !0, customContent: !0, expressionContent: !0, fieldsContent: !0, mediaContent: !0, textContent: !0, relationshipContent: !0 };
1973
+ let P = Ue = class extends qi(me) {
1974
+ constructor(t) {
1975
+ super(t), this._error = null, this._featureAbortController = null, this._graphicChangedThrottled = at(this._graphicChanged, Wr, this), this._expressionAttributes = null, this._graphicExpressionAttributes = null, this.abilities = { ...$i }, this.content = null, this.contentViewModels = [], this.description = null, this.defaultPopupTemplateEnabled = !1, this.formattedAttributes = null, this.lastEditInfo = null, this.location = null, this.relatedInfos = /* @__PURE__ */ new Map(), this.title = "", this.view = null, this._isAllowedContentType = (e) => {
1976
+ const { abilities: i } = this;
1977
+ return e.type === "attachments" && !!i.attachmentsContent || e.type === "custom" && !!i.customContent || e.type === "fields" && !!i.fieldsContent || e.type === "media" && !!i.mediaContent || e.type === "text" && !!i.textContent || e.type === "expression" && !!i.expressionContent || e.type === "relationship" && !!i.relationshipContent;
1978
+ }, this.addHandles(y(() => [this.graphic, this._effectivePopupTemplate, this.abilities, this.timeZone], () => this._graphicChangedThrottled(), R));
1979
+ }
1980
+ initialize() {
1981
+ this.addHandles(this._graphicChangedThrottled);
1982
+ }
1983
+ destroy() {
1984
+ this._clear(), this._cancelFeatureQuery(), this._error = null, this.graphic = null, this._destroyContentViewModels(), this.relatedInfos.clear();
1985
+ }
1986
+ get _effectivePopupTemplate() {
1987
+ return this.graphic != null ? this.graphic.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled) : null;
1988
+ }
1989
+ get _fieldInfoMap() {
1990
+ return Nn(ui(this._effectivePopupTemplate), this._sourceLayer);
1991
+ }
1992
+ get _sourceLayer() {
1993
+ return Zi(this.graphic);
1994
+ }
1995
+ castAbilities(t) {
1996
+ return { ...$i, ...t };
1997
+ }
1998
+ get isTable() {
1999
+ var t;
2000
+ return ((t = this._sourceLayer) == null ? void 0 : t.isTable) || !1;
2001
+ }
2002
+ get state() {
2003
+ return this.graphic ? this._error ? "error" : this.waitingForContent ? "loading" : "ready" : "disabled";
2004
+ }
2005
+ set graphic(t) {
2006
+ this._set("graphic", (t == null ? void 0 : t.clone()) ?? null);
2007
+ }
2008
+ get spatialReference() {
2009
+ var t;
2010
+ return ((t = this.view) == null ? void 0 : t.spatialReference) ?? null;
2011
+ }
2012
+ set spatialReference(t) {
2013
+ this._override("spatialReference", t);
2014
+ }
2015
+ get timeZone() {
2016
+ var t;
2017
+ return ((t = this.view) == null ? void 0 : t.timeZone) ?? Ds;
2018
+ }
2019
+ set timeZone(t) {
2020
+ this._overrideIfSome("timeZone", t);
2021
+ }
2022
+ get map() {
2023
+ var t;
2024
+ return ((t = this.view) == null ? void 0 : t.map) || null;
2025
+ }
2026
+ set map(t) {
2027
+ this._override("map", t);
2028
+ }
2029
+ get waitingForContent() {
2030
+ return !!this._featureAbortController;
2031
+ }
2032
+ setActiveMedia(t, e) {
2033
+ const i = this.contentViewModels[t];
2034
+ i instanceof Ce && i.setActiveMedia(e);
2035
+ }
2036
+ nextMedia(t) {
2037
+ const e = this.contentViewModels[t];
2038
+ e instanceof Ce && e.next();
2039
+ }
2040
+ previousMedia(t) {
2041
+ const e = this.contentViewModels[t];
2042
+ e instanceof Ce && e.previous();
2043
+ }
2044
+ async updateGeometry() {
2045
+ var o;
2046
+ const { graphic: t, spatialReference: e, _sourceLayer: i } = this;
2047
+ await (i == null ? void 0 : i.load());
2048
+ const s = i == null ? void 0 : i.objectIdField;
2049
+ if (!s || !t || !i)
2050
+ return;
2051
+ const n = (o = t == null ? void 0 : t.attributes) == null ? void 0 : o[s];
2052
+ if (n == null)
2053
+ return;
2054
+ const r = [n];
2055
+ if (!t.geometry) {
2056
+ const d = await es({ layer: i, graphic: t, outFields: [], objectIds: r, returnGeometry: !0, spatialReference: e }), c = d == null ? void 0 : d.geometry;
2057
+ c && (t.geometry = c);
2058
+ }
2059
+ }
2060
+ _clear() {
2061
+ this._set("title", ""), this._set("content", null), this._set("formattedAttributes", null);
2062
+ }
2063
+ async _graphicChanged() {
2064
+ this._cancelFeatureQuery(), this._error = null, this._clear();
2065
+ const { graphic: t } = this;
2066
+ if (!t)
2067
+ return;
2068
+ const e = new AbortController();
2069
+ this._featureAbortController = e;
2070
+ try {
2071
+ await this._queryFeature({ signal: e.signal });
2072
+ } catch (i) {
2073
+ Rt(i) || (this._error = i, q.getLogger(this).error("error", "The popupTemplate could not be displayed for this feature.", { error: i, graphic: t, popupTemplate: this._effectivePopupTemplate }));
2074
+ }
2075
+ this._featureAbortController === e && (this._featureAbortController = null);
2076
+ }
2077
+ _cancelFeatureQuery() {
2078
+ const { _featureAbortController: t } = this;
2079
+ t && t.abort(), this._featureAbortController = null;
2080
+ }
2081
+ _compileContentElement(t, e) {
2082
+ return t.type === "attachments" ? this._compileAttachments(t, e) : t.type === "custom" ? this._compileCustom(t, e) : t.type === "fields" ? this._compileFields(t, e) : t.type === "media" ? this._compileMedia(t, e) : t.type === "text" ? this._compileText(t, e) : t.type === "expression" ? this._compileExpression(t, e) : t.type === "relationship" ? this._compileRelationship(t, e) : void 0;
2083
+ }
2084
+ _compileContent(t) {
2085
+ if (this._destroyContentViewModels(), this.graphic)
2086
+ return Array.isArray(t) ? t.filter(this._isAllowedContentType).map((e, i) => this._compileContentElement(e, i)).filter(ut) : typeof t == "string" ? this._compileText(new Di({ text: t }), 0).text : t;
2087
+ }
2088
+ _destroyContentViewModels() {
2089
+ this.removeHandles(Ai), this.removeHandles(Ci), this.contentViewModels.forEach((t) => t && !t.destroyed && t.destroy()), this._set("contentViewModels", []);
2090
+ }
2091
+ _matchesFeature(t, e) {
2092
+ var n;
2093
+ const i = (n = t == null ? void 0 : t.graphic) == null ? void 0 : n.getObjectId(), s = e == null ? void 0 : e.getObjectId();
2094
+ return i != null && s != null && i === s;
2095
+ }
2096
+ _setRelatedFeaturesViewModels({ relatedFeatureViewModels: t, relatedFeatures: e, map: i }) {
2097
+ const { view: s, spatialReference: n } = this;
2098
+ e == null || e.filter(Boolean).forEach((r) => {
2099
+ t.some((o) => this._matchesFeature(o, r)) || t.add(new Ue({ abilities: { relationshipContent: !1 }, map: i, view: s, spatialReference: n, graphic: r }));
2100
+ }), t.forEach((r) => {
2101
+ (e == null ? void 0 : e.find((d) => this._matchesFeature(r, d))) || t.remove(r);
2102
+ });
2103
+ }
2104
+ _setExpressionContentVM(t, e) {
2105
+ const i = this.formattedAttributes, { contentElement: s, contentElementViewModel: n } = t, r = s == null ? void 0 : s.type;
2106
+ n && r && (r === "fields" && (this._createFieldsFormattedAttributes({ contentElement: s, contentElementIndex: e, formattedAttributes: i }), n.set(this._createFieldsVMParams(s, e))), r === "media" && (this._createMediaFormattedAttributes({ contentElement: s, contentElementIndex: e, formattedAttributes: i }), n.set(this._createMediaVMParams(s, e))), r === "text" && n.set(this._createTextVMParams(s)));
2107
+ }
2108
+ _compileRelationship(t, e) {
2109
+ const { displayCount: i, orderByFields: s, relationshipId: n, title: r, description: o } = t, { _sourceLayer: d, graphic: c, map: u } = this;
2110
+ if (!Yi(d))
2111
+ return;
2112
+ const p = new Yt({ displayCount: i, graphic: c, orderByFields: s, relationshipId: n, layer: d, map: u, ...this._compileTitleAndDesc({ title: r, description: o }) });
2113
+ return this.contentViewModels[e] = p, this.addHandles(Ee(() => p.relatedFeatures, "change", () => this._setRelatedFeaturesViewModels(p)), Ai), t;
2114
+ }
2115
+ _compileExpression(t, e) {
2116
+ const { expressionInfo: i } = t, { graphic: s, map: n, spatialReference: r, view: o, location: d } = this, c = new Xt({ expressionInfo: i, graphic: s, interceptor: Ue.interceptor, map: n, spatialReference: r, view: o, location: d });
2117
+ return this.contentViewModels[e] = c, this.addHandles(y(() => c.contentElementViewModel, () => this._setExpressionContentVM(c, e), R), Ci), t;
2118
+ }
2119
+ _compileAttachments(t, e) {
2120
+ const { graphic: i } = this, { description: s, title: n } = t;
2121
+ return this.contentViewModels[e] = new Qt({ graphic: i, ...this._compileTitleAndDesc({ title: n, description: s }) }), t;
2122
+ }
2123
+ _compileCustom(t, e) {
2124
+ const { graphic: i } = this, { creator: s, destroyer: n } = t;
2125
+ return this.contentViewModels[e] = new dt({ graphic: i, creator: s, destroyer: n }), t;
2126
+ }
2127
+ _compileTitleAndDesc({ title: t, description: e }) {
2128
+ const { _fieldInfoMap: i, _sourceLayer: s, graphic: n, formattedAttributes: r } = this, o = n == null ? void 0 : n.attributes, d = this._expressionAttributes, c = r.global;
2129
+ return { title: Ie({ attributes: o, fieldInfoMap: i, globalAttributes: c, expressionAttributes: d, layer: s, text: t }), description: Ie({ attributes: o, fieldInfoMap: i, globalAttributes: c, expressionAttributes: d, layer: s, text: e }) };
2130
+ }
2131
+ _createFieldsVMParams(t, e) {
2132
+ const i = this._effectivePopupTemplate, s = this.formattedAttributes, n = { ...s == null ? void 0 : s.global, ...s == null ? void 0 : s.content[e] }, r = (t == null ? void 0 : t.fieldInfos) || (i == null ? void 0 : i.fieldInfos), o = r == null ? void 0 : r.filter(({ fieldName: p }) => Ht(p) || pe(p) || n.hasOwnProperty(p)), d = i == null ? void 0 : i.expressionInfos, { description: c, title: u } = t;
2133
+ return { attributes: n, expressionInfos: d, fieldInfos: o, ...this._compileTitleAndDesc({ title: u, description: c }) };
2134
+ }
2135
+ _compileFields(t, e) {
2136
+ const i = t.clone(), s = new pt(this._createFieldsVMParams(t, e));
2137
+ return this.contentViewModels[e] = s, i.fieldInfos = s.formattedFieldInfos.slice(0), i;
2138
+ }
2139
+ _createMediaVMParams(t, e) {
2140
+ const { abilities: i, graphic: s, _fieldInfoMap: n, _effectivePopupTemplate: r, relatedInfos: o, _sourceLayer: d, _expressionAttributes: c } = this, u = this.formattedAttributes, p = (s == null ? void 0 : s.attributes) ?? {}, { description: m, mediaInfos: f, title: g } = t;
2141
+ return { abilities: { chartAnimation: i.chartAnimation }, activeMediaInfoIndex: t.activeMediaInfoIndex || 0, attributes: p, isAggregate: s == null ? void 0 : s.isAggregate, layer: d, fieldInfoMap: n, formattedAttributes: { ...u == null ? void 0 : u.global, ...u == null ? void 0 : u.content[e] }, expressionAttributes: c, mediaInfos: f, popupTemplate: r, relatedInfos: o, ...this._compileTitleAndDesc({ title: g, description: m }) };
2142
+ }
2143
+ _compileMedia(t, e) {
2144
+ const i = t.clone(), s = new Ce(this._createMediaVMParams(t, e));
2145
+ return i.mediaInfos = s.formattedMediaInfos.slice(0), this.contentViewModels[e] = s, i;
2146
+ }
2147
+ _createTextVMParams(t) {
2148
+ var r;
2149
+ const { graphic: e, _fieldInfoMap: i, _sourceLayer: s, _expressionAttributes: n } = this;
2150
+ if (t && t.text) {
2151
+ const o = (e == null ? void 0 : e.attributes) ?? {}, d = ((r = this.formattedAttributes) == null ? void 0 : r.global) ?? {};
2152
+ t.text = Ie({ attributes: o, fieldInfoMap: i, globalAttributes: d, expressionAttributes: n, layer: s, text: t.text });
2153
+ }
2154
+ return { graphic: e, creator: t.text };
2155
+ }
2156
+ _compileText(t, e) {
2157
+ const i = t.clone();
2158
+ return this.contentViewModels[e] = new dt(this._createTextVMParams(i)), i;
2159
+ }
2160
+ _compileLastEditInfo() {
2161
+ const { _effectivePopupTemplate: t, _sourceLayer: e, graphic: i, timeZone: s } = this;
2162
+ if (!t)
2163
+ return;
2164
+ const { lastEditInfoEnabled: n } = t, r = e == null ? void 0 : e.editFieldsInfo;
2165
+ return n && r ? On(r, i == null ? void 0 : i.attributes, s, e) : void 0;
2166
+ }
2167
+ _compileTitle(t) {
2168
+ var d;
2169
+ const { _fieldInfoMap: e, _sourceLayer: i, graphic: s, _expressionAttributes: n } = this, r = (s == null ? void 0 : s.attributes) ?? {}, o = ((d = this.formattedAttributes) == null ? void 0 : d.global) ?? {};
2170
+ return Ie({ attributes: r, fieldInfoMap: e, globalAttributes: o, expressionAttributes: n, layer: i, text: t });
2171
+ }
2172
+ async _getTitle() {
2173
+ const { _effectivePopupTemplate: t, graphic: e } = this;
2174
+ if (!e)
2175
+ return null;
2176
+ const i = t == null ? void 0 : t.title;
2177
+ return lt(i, { graphic: e });
2178
+ }
2179
+ async _getContent() {
2180
+ const { _effectivePopupTemplate: t, graphic: e } = this;
2181
+ if (!e)
2182
+ return null;
2183
+ const i = t == null ? void 0 : t.content;
2184
+ return lt(i, { graphic: e });
2185
+ }
2186
+ async _queryFeature(t) {
2187
+ const { _featureAbortController: e, _sourceLayer: i, graphic: s, _effectivePopupTemplate: n } = this, r = this.map, o = this.view, d = this.spatialReference, c = this.location;
2188
+ if (e !== this._featureAbortController || !s)
2189
+ return;
2190
+ await Vn({ graphic: s, popupTemplate: n, layer: i, spatialReference: d }, t);
2191
+ const { content: { value: u }, title: { value: p } } = await ke({ content: this._getContent(), title: this._getTitle() }), { expressionAttributes: { value: m } } = await ke({ checkForRelatedFeatures: this._checkForRelatedFeatures(t), expressionAttributes: Vr({ expressionInfos: n == null ? void 0 : n.expressionInfos, spatialReference: d, graphic: s, map: r, interceptor: Ue.interceptor, view: o, options: t, location: c }) });
2192
+ e === this._featureAbortController && s && (this._expressionAttributes = m, this._graphicExpressionAttributes = { ...s.attributes, ...m }, this._set("formattedAttributes", this._createFormattedAttributes(u)), this._set("title", this._compileTitle(p)), this._set("lastEditInfo", this._compileLastEditInfo() || null), this._set("content", this._compileContent(u) || null));
2193
+ }
2194
+ _createMediaFormattedAttributes({ contentElement: t, contentElementIndex: e, formattedAttributes: i }) {
2195
+ const { _effectivePopupTemplate: s, graphic: n, relatedInfos: r, _sourceLayer: o, _fieldInfoMap: d, _graphicExpressionAttributes: c, timeZone: u } = this;
2196
+ i.content[e] = bt({ fieldInfos: s == null ? void 0 : s.fieldInfos, graphic: n, attributes: { ...c, ...t.attributes }, layer: o, fieldInfoMap: d, relatedInfos: r, timeZone: u });
2197
+ }
2198
+ _createFieldsFormattedAttributes({ contentElement: t, contentElementIndex: e, formattedAttributes: i }) {
2199
+ if (t.fieldInfos) {
2200
+ const { graphic: s, relatedInfos: n, _sourceLayer: r, _fieldInfoMap: o, _graphicExpressionAttributes: d, timeZone: c } = this;
2201
+ i.content[e] = bt({ fieldInfos: t.fieldInfos, graphic: s, attributes: { ...d, ...t.attributes }, layer: r, fieldInfoMap: o, relatedInfos: n, timeZone: c });
2202
+ }
2203
+ }
2204
+ _createFormattedAttributes(t) {
2205
+ const { _effectivePopupTemplate: e, graphic: i, relatedInfos: s, _sourceLayer: n, _fieldInfoMap: r, _graphicExpressionAttributes: o, timeZone: d } = this, c = e == null ? void 0 : e.fieldInfos, u = { global: bt({ fieldInfos: c, graphic: i, attributes: o, layer: n, fieldInfoMap: r, relatedInfos: s, timeZone: d }), content: [] };
2206
+ return Array.isArray(t) && t.forEach((p, m) => {
2207
+ p.type === "fields" && this._createFieldsFormattedAttributes({ contentElement: p, contentElementIndex: m, formattedAttributes: u }), p.type === "media" && this._createMediaFormattedAttributes({ contentElement: p, contentElementIndex: m, formattedAttributes: u });
2208
+ }), u;
2209
+ }
2210
+ _checkForRelatedFeatures(t) {
2211
+ const { graphic: e, _effectivePopupTemplate: i } = this;
2212
+ return this._queryRelatedInfos(e, ui(i), t);
2213
+ }
2214
+ async _queryRelatedInfos(t, e, i) {
2215
+ const { relatedInfos: s, _sourceLayer: n } = this;
2216
+ s.clear();
2217
+ const r = (n == null ? void 0 : n.associatedLayer) != null ? await (n == null ? void 0 : n.associatedLayer.load(i)) : n;
2218
+ if (!r || !t)
2219
+ return;
2220
+ const o = e.filter((u) => u && pe(u.fieldName));
2221
+ if (!(o != null && o.length))
2222
+ return;
2223
+ e.forEach((u) => this._configureRelatedInfo(u, r));
2224
+ const d = await Fr({ relatedInfos: s, layer: r }, i);
2225
+ Object.keys(d).forEach((u) => {
2226
+ var f;
2227
+ const p = s.get(u.toString()), m = (f = d[u]) == null ? void 0 : f.value;
2228
+ p && m && (p.layerInfo = m.data);
2229
+ });
2230
+ const c = await Ir({ graphic: t, relatedInfos: s, layer: r }, i);
2231
+ Object.keys(c).forEach((u) => {
2232
+ var p;
2233
+ gr((p = c[u]) == null ? void 0 : p.value, s.get(u.toString()));
2234
+ });
2235
+ }
2236
+ _configureRelatedInfo(t, e) {
2237
+ const { relatedInfos: i } = this, s = it(t.fieldName);
2238
+ if (!s)
2239
+ return;
2240
+ const { layerId: n, fieldName: r } = s;
2241
+ if (!n)
2242
+ return;
2243
+ const o = i.get(n.toString()) || fr(n, e);
2244
+ o && (Cr({ relatedInfo: o, fieldName: r, fieldInfo: t }), this.relatedInfos.set(n, o));
2245
+ }
2246
+ };
2247
+ P.interceptor = new zr(qn, zn), a([l()], P.prototype, "_error", void 0), a([l()], P.prototype, "_featureAbortController", void 0), a([l({ readOnly: !0 })], P.prototype, "_effectivePopupTemplate", null), a([l({ readOnly: !0 })], P.prototype, "_fieldInfoMap", null), a([l({ readOnly: !0 })], P.prototype, "_sourceLayer", null), a([l()], P.prototype, "abilities", void 0), a([Be("abilities")], P.prototype, "castAbilities", null), a([l({ readOnly: !0 })], P.prototype, "content", void 0), a([l({ readOnly: !0 })], P.prototype, "contentViewModels", void 0), a([l()], P.prototype, "description", void 0), a([l({ type: Boolean })], P.prototype, "defaultPopupTemplateEnabled", void 0), a([l({ readOnly: !0 })], P.prototype, "isTable", null), a([l({ readOnly: !0 })], P.prototype, "state", null), a([l({ readOnly: !0 })], P.prototype, "formattedAttributes", void 0), a([l({ type: De, value: null })], P.prototype, "graphic", null), a([l({ readOnly: !0 })], P.prototype, "lastEditInfo", void 0), a([l({ type: zt })], P.prototype, "location", void 0), a([l({ readOnly: !0 })], P.prototype, "relatedInfos", void 0), a([l()], P.prototype, "spatialReference", null), a([l()], P.prototype, "timeZone", null), a([l({ readOnly: !0 })], P.prototype, "title", void 0), a([l()], P.prototype, "map", null), a([l({ readOnly: !0 })], P.prototype, "waitingForContent", null), a([l()], P.prototype, "view", void 0), P = Ue = a([O("esri.widgets.Feature.FeatureViewModel")], P);
2248
+ const Kt = P, z = "esri-feature", N = { base: z, container: `${z}__size-container`, title: `${z}__title`, main: `${z}__main-container`, btn: `${z}__button`, icon: `${z}__icon`, content: `${z}__content`, contentNode: `${z}__content-node`, contentNodeText: `${z}__content-node--text`, contentElement: `${z}__content-element`, text: `${z}__text`, lastEditedInfo: `${z}__last-edited-info`, fields: `${z}__fields`, fieldHeader: `${z}__field-header`, fieldData: `${z}__field-data`, fieldDataDate: `${z}__field-data--date`, loadingSpinnerContainer: `${z}__loading-container`, spinner: `${z}__loading-spinner` }, ds = (t) => {
2249
+ let e = class extends t {
2250
+ constructor() {
2251
+ super(...arguments), this.renderNodeContent = (i) => ns(i) && !i.destroyed ? h("div", { class: N.contentNode, key: i }, i.render()) : i instanceof HTMLElement ? h("div", { afterCreate: this._attachToNode, bind: i, class: N.contentNode, key: i }) : Xn(i) ? h("div", { afterCreate: this._attachToNode, bind: i.domNode, class: N.contentNode, key: i }) : null;
2252
+ }
2253
+ _attachToNode(i) {
2254
+ const s = this;
2255
+ i.appendChild(s);
2256
+ }
2257
+ };
2258
+ return e = a([O("esri.widgets.Feature.ContentMixin")], e), e;
2259
+ };
2260
+ var Vt;
2261
+ const Ei = { title: !0, content: !0, lastEditedInfo: !0 }, xi = "relationship-handles";
2262
+ let D = Vt = class extends ds(te) {
2263
+ constructor(t, e) {
2264
+ super(t, e), this._contentWidgets = [], this.flowItems = null, this.headingLevel = 2, this.messages = null, this.messagesCommon = null, this.visibleElements = { ...Ei }, this.viewModel = new Kt();
2265
+ }
2266
+ initialize() {
2267
+ this.addHandles(y(() => {
2268
+ var t;
2269
+ return (t = this.viewModel) == null ? void 0 : t.contentViewModels;
2270
+ }, () => this._setupContentWidgets(), R));
2271
+ }
2272
+ loadDependencies() {
2273
+ return qe({ notice: () => import("./calcite-notice-88ee1edf.js") });
2274
+ }
2275
+ destroy() {
2276
+ this._destroyContentWidgets();
2277
+ }
2278
+ get graphic() {
2279
+ return this.viewModel.graphic;
2280
+ }
2281
+ set graphic(t) {
2282
+ this.viewModel.graphic = t;
2283
+ }
2284
+ get defaultPopupTemplateEnabled() {
2285
+ return this.viewModel.defaultPopupTemplateEnabled;
2286
+ }
2287
+ set defaultPopupTemplateEnabled(t) {
2288
+ this.viewModel.defaultPopupTemplateEnabled = t;
2289
+ }
2290
+ get isTable() {
2291
+ return this.viewModel.isTable;
2292
+ }
2293
+ get label() {
2294
+ var t;
2295
+ return ((t = this.messages) == null ? void 0 : t.widgetLabel) ?? "";
2296
+ }
2297
+ set label(t) {
2298
+ this._overrideIfSome("label", t);
2299
+ }
2300
+ get spatialReference() {
2301
+ return this.viewModel.spatialReference;
2302
+ }
2303
+ set spatialReference(t) {
2304
+ this.viewModel.spatialReference = t;
2305
+ }
2306
+ get timeZone() {
2307
+ return this.viewModel.timeZone;
2308
+ }
2309
+ set timeZone(t) {
2310
+ this.viewModel.timeZone = t;
2311
+ }
2312
+ get title() {
2313
+ return this.viewModel.title;
2314
+ }
2315
+ castVisibleElements(t) {
2316
+ return { ...Ei, ...t };
2317
+ }
2318
+ get map() {
2319
+ return this.viewModel.map;
2320
+ }
2321
+ set map(t) {
2322
+ this.viewModel.map = t;
2323
+ }
2324
+ get view() {
2325
+ return this.viewModel.view;
2326
+ }
2327
+ set view(t) {
2328
+ this.viewModel.view = t;
2329
+ }
2330
+ setActiveMedia(t, e) {
2331
+ return this.viewModel.setActiveMedia(t, e);
2332
+ }
2333
+ nextMedia(t) {
2334
+ return this.viewModel.nextMedia(t);
2335
+ }
2336
+ previousMedia(t) {
2337
+ return this.viewModel.previousMedia(t);
2338
+ }
2339
+ render() {
2340
+ const { state: t } = this.viewModel, e = h("div", { class: N.container, key: "container" }, this._renderTitle(), t === "error" ? this._renderError() : t === "loading" ? this._renderLoading() : this._renderContentContainer());
2341
+ return h("div", { class: this.classes(N.base, F.widget) }, e);
2342
+ }
2343
+ _renderError() {
2344
+ const { messagesCommon: t, messages: e, visibleElements: i } = this;
2345
+ return h("calcite-notice", { icon: "exclamation-mark-circle", kind: "danger", open: !0, scale: "s" }, i.title ? h("div", { key: "error-title", slot: "title" }, t.errorMessage) : null, h("div", { key: "error-message", slot: "message" }, e.loadingError));
2346
+ }
2347
+ _renderLoading() {
2348
+ return h("div", { class: N.loadingSpinnerContainer, key: "loading-container" }, h("span", { class: this.classes(ne.loadingIndicator, F.rotating, N.spinner) }));
2349
+ }
2350
+ _renderContentContainer() {
2351
+ const { visibleElements: t } = this;
2352
+ return t.content ? h("div", { class: N.main }, [this._renderContent(), this._renderLastEditInfo()]) : null;
2353
+ }
2354
+ _renderTitle() {
2355
+ const { visibleElements: t, title: e } = this;
2356
+ return t.title ? h(Gt, { class: N.title, innerHTML: e, level: this.headingLevel }) : null;
2357
+ }
2358
+ _renderContent() {
2359
+ const t = this.viewModel.content, e = "content";
2360
+ if (!t)
2361
+ return null;
2362
+ if (Array.isArray(t))
2363
+ return t.length ? h("div", { class: N.contentNode, key: `${e}-content-elements` }, t.map(this._renderContentElement, this)) : null;
2364
+ if (typeof t == "string") {
2365
+ const i = this._contentWidgets[0];
2366
+ return !i || i.destroyed ? null : h("div", { class: this.classes(N.contentNode, N.contentNodeText), key: `${e}-content` }, i.render());
2367
+ }
2368
+ return this.renderNodeContent(t);
2369
+ }
2370
+ _renderContentElement(t, e) {
2371
+ var s;
2372
+ const { visibleElements: i } = this;
2373
+ if (typeof i.content != "boolean" && !((s = i.content) != null && s[t.type]))
2374
+ return null;
2375
+ switch (t.type) {
2376
+ case "attachments":
2377
+ return this._renderAttachments(e);
2378
+ case "custom":
2379
+ return this._renderCustom(t, e);
2380
+ case "fields":
2381
+ return this._renderFields(e);
2382
+ case "media":
2383
+ return this._renderMedia(e);
2384
+ case "text":
2385
+ return this._renderText(t, e);
2386
+ case "expression":
2387
+ return this._renderExpression(e);
2388
+ case "relationship":
2389
+ return this._renderRelationship(e);
2390
+ default:
2391
+ return null;
2392
+ }
2393
+ }
2394
+ _renderAttachments(t) {
2395
+ const e = this._contentWidgets[t];
2396
+ if (!e || e.destroyed)
2397
+ return null;
2398
+ const { state: i, attachmentInfos: s } = e.viewModel;
2399
+ return i === "loading" || s.length > 0 ? h("div", { class: this.classes(N.contentElement), key: this._buildKey("attachments-element", t) }, e.render()) : null;
2400
+ }
2401
+ _renderRelationship(t) {
2402
+ const e = this._contentWidgets[t];
2403
+ return e && !e.destroyed && this.flowItems ? h("div", { class: N.contentElement, key: this._buildKey("relationship-element", t) }, e.render()) : null;
2404
+ }
2405
+ _renderExpression(t) {
2406
+ const e = this._contentWidgets[t];
2407
+ return !e || e.destroyed ? null : h("div", { class: N.contentElement, key: this._buildKey("expression-element", t) }, e.render());
2408
+ }
2409
+ _renderCustom(t, e) {
2410
+ const { creator: i } = t, s = this._contentWidgets[e];
2411
+ return !s || s.destroyed ? null : i ? h("div", { class: N.contentElement, key: this._buildKey("custom-element", e) }, s.render()) : null;
2412
+ }
2413
+ _renderFields(t) {
2414
+ const e = this._contentWidgets[t];
2415
+ return !e || e.destroyed ? null : h("div", { class: N.contentElement, key: this._buildKey("fields-element", t) }, e.render());
2416
+ }
2417
+ _renderMedia(t) {
2418
+ const e = this._contentWidgets[t];
2419
+ return !e || e.destroyed ? null : h("div", { class: N.contentElement, key: this._buildKey("media-element", t) }, e.render());
2420
+ }
2421
+ _renderLastEditInfo() {
2422
+ const { visibleElements: t, messages: e } = this, { lastEditInfo: i } = this.viewModel;
2423
+ if (!i || !t.lastEditedInfo)
2424
+ return null;
2425
+ const { date: s, user: n } = i, r = i.type === "edit" ? n ? e.lastEditedByUser : e.lastEdited : n ? e.lastCreatedByUser : e.lastCreated, o = de(r, { date: s, user: n });
2426
+ return h("div", { class: this.classes(N.lastEditedInfo, N.contentElement), key: "edit-info-element" }, o);
2427
+ }
2428
+ _renderText(t, e) {
2429
+ const i = t.text, s = this._contentWidgets[e];
2430
+ return !s || s.destroyed ? null : i ? h("div", { class: this.classes(N.contentElement, N.text), key: this._buildKey("text-element", e) }, s.render()) : null;
2431
+ }
2432
+ _buildKey(t, ...e) {
2433
+ var i, s;
2434
+ return `${t}__${((s = (i = this.viewModel) == null ? void 0 : i.graphic) == null ? void 0 : s.uid) || "0"}-${e.join("-")}`;
2435
+ }
2436
+ _destroyContentWidget(t) {
2437
+ t && (t.viewModel = null, !t.destroyed && t.destroy());
2438
+ }
2439
+ _destroyContentWidgets() {
2440
+ this.removeHandles(xi), this._contentWidgets.forEach((t) => this._destroyContentWidget(t)), this._contentWidgets = [];
2441
+ }
2442
+ _addFeatureRelationshipHandles(t) {
2443
+ const { flowItems: e, visibleElements: i } = this;
2444
+ this.addHandles([Ee(() => t, "select-record", ({ featureViewModel: s }) => {
2445
+ e && (s.abilities = { relationshipContent: !0 }, e.push(new Vt({ flowItems: e, viewModel: s, visibleElements: i })));
2446
+ }), Ee(() => t, "show-all-records", () => {
2447
+ if (!e)
2448
+ return;
2449
+ const { viewModel: s } = t;
2450
+ s.showAllEnabled = !0;
2451
+ const n = new Ii({ visibleElements: { title: !1, description: !1 }, viewModel: s });
2452
+ this._addFeatureRelationshipHandles(n), e.push(n);
2453
+ })], xi);
2454
+ }
2455
+ _setupContentWidgets() {
2456
+ var n;
2457
+ this._destroyContentWidgets();
2458
+ const { headingLevel: t, visibleElements: e } = this, i = (n = this.viewModel) == null ? void 0 : n.content, { contentViewModels: s } = this.viewModel;
2459
+ if (Array.isArray(i))
2460
+ i.forEach((r, o) => {
2461
+ if (r.type === "attachments" && (this._contentWidgets[o] = new Qn({ displayType: r.displayType, headingLevel: e.title ? t + 1 : t, viewModel: s[o] })), r.type === "fields" && (this._contentWidgets[o] = new rs({ viewModel: s[o] })), r.type === "media" && (this._contentWidgets[o] = new os({ viewModel: s[o] })), r.type === "text" && (this._contentWidgets[o] = new tt({ viewModel: s[o] })), r.type === "custom" && (this._contentWidgets[o] = new tt({ viewModel: s[o] })), r.type === "expression" && (this._contentWidgets[o] = new Dr({ viewModel: s[o] })), r.type === "relationship") {
2462
+ const d = new Ii({ viewModel: s[o] });
2463
+ this._addFeatureRelationshipHandles(d), this._contentWidgets[o] = d;
2464
+ }
2465
+ }, this);
2466
+ else {
2467
+ const r = s[0];
2468
+ r && !r.destroyed && (this._contentWidgets[0] = new tt({ viewModel: r }));
2469
+ }
2470
+ this.scheduleRender();
2471
+ }
2472
+ };
2473
+ a([l()], D.prototype, "graphic", null), a([l()], D.prototype, "defaultPopupTemplateEnabled", null), a([l()], D.prototype, "flowItems", void 0), a([l()], D.prototype, "headingLevel", void 0), a([l({ readOnly: !0 })], D.prototype, "isTable", null), a([l()], D.prototype, "label", null), a([l(), ee("esri/widgets/Feature/t9n/Feature")], D.prototype, "messages", void 0), a([l(), ee("esri/t9n/common")], D.prototype, "messagesCommon", void 0), a([l()], D.prototype, "spatialReference", null), a([l()], D.prototype, "timeZone", null), a([l({ readOnly: !0 })], D.prototype, "title", null), a([l()], D.prototype, "visibleElements", void 0), a([Be("visibleElements")], D.prototype, "castVisibleElements", null), a([l()], D.prototype, "map", null), a([l()], D.prototype, "view", null), a([l({ type: Kt })], D.prototype, "viewModel", void 0), D = Vt = a([O("esri.widgets.Feature")], D);
2474
+ const Hr = D;
2475
+ let we = class extends qs.EventedAccessor {
2476
+ constructor(e) {
2477
+ super(e), this.location = null, this.screenLocationEnabled = !1, this.view = null, this.addHandles([ot(() => {
2478
+ const i = this.screenLocationEnabled ? this.view : null;
2479
+ return i ? [i.size, i.type === "3d" ? i.camera : i.viewpoint] : null;
2480
+ }, () => this.notifyChange("screenLocation")), y(() => this.screenLocation, (i, s) => {
2481
+ i != null && s != null && this.emit("view-change");
2482
+ })]);
2483
+ }
2484
+ destroy() {
2485
+ this.view = null;
2486
+ }
2487
+ get screenLocation() {
2488
+ const { location: e, view: i, screenLocationEnabled: s } = this, n = i == null ? void 0 : i.spatialReference, r = n ? zs(e, n).geometry : null;
2489
+ return s && r && (i != null && i.ready) ? i.toScreen(r) : null;
2490
+ }
2491
+ };
2492
+ a([l()], we.prototype, "location", void 0), a([l()], we.prototype, "screenLocation", null), a([l()], we.prototype, "screenLocationEnabled", void 0), a([l()], we.prototype, "view", void 0), we = a([O("esri.widgets.support.AnchorElementViewModel")], we);
2493
+ const cs = we, jr = "esri.widgets.CompassViewModel";
2494
+ let nt = class extends cs {
2495
+ constructor(e) {
2496
+ super(e), this.visible = !1;
2497
+ }
2498
+ };
2499
+ a([l()], nt.prototype, "visible", void 0), nt = a([O(jr)], nt);
2500
+ const us = nt, Tt = "esri-spinner", Lt = { base: Tt, spinnerStart: `${Tt}--start`, spinnerFinish: `${Tt}--finish` };
2501
+ let be = class extends te {
2502
+ constructor(e, i) {
2503
+ super(e, i), this._animationDelay = 500, this._animationPromise = null, this.viewModel = new us();
2504
+ }
2505
+ initialize() {
2506
+ this.addHandles(y(() => this.visible, (e) => this._visibleChange(e)));
2507
+ }
2508
+ destroy() {
2509
+ this._animationPromise = null;
2510
+ }
2511
+ get location() {
2512
+ return this.viewModel.location;
2513
+ }
2514
+ set location(e) {
2515
+ this.viewModel.location = e;
2516
+ }
2517
+ get view() {
2518
+ return this.viewModel.view;
2519
+ }
2520
+ set view(e) {
2521
+ this.viewModel.view = e;
2522
+ }
2523
+ get visible() {
2524
+ return this.viewModel.visible;
2525
+ }
2526
+ set visible(e) {
2527
+ this.viewModel.visible = e;
2528
+ }
2529
+ show(e) {
2530
+ const { location: i, promise: s } = e ?? {};
2531
+ i && (this.viewModel.location = i), this.visible = !0;
2532
+ const n = () => this.hide();
2533
+ s && s.catch(() => {
2534
+ }).then(n);
2535
+ }
2536
+ hide() {
2537
+ this.visible = !1;
2538
+ }
2539
+ render() {
2540
+ const { visible: e } = this, { screenLocation: i } = this.viewModel, s = !!i, n = e && s, r = !e && s, o = { [Lt.spinnerStart]: n, [Lt.spinnerFinish]: r }, d = this._getPositionStyles();
2541
+ return h("div", { class: this.classes(Lt.base, o), styles: d });
2542
+ }
2543
+ _visibleChange(e) {
2544
+ if (e)
2545
+ return void (this.viewModel.screenLocationEnabled = !0);
2546
+ const i = zi(this._animationDelay);
2547
+ this._animationPromise = i, i.catch(() => {
2548
+ }).then(() => {
2549
+ this._animationPromise === i && (this.viewModel.screenLocationEnabled = !1, this._animationPromise = null);
2550
+ });
2551
+ }
2552
+ _getPositionStyles() {
2553
+ const { screenLocation: e, view: i } = this.viewModel;
2554
+ if (i == null || e == null)
2555
+ return {};
2556
+ const { padding: s } = i;
2557
+ return { left: e.x - s.left + "px", top: e.y - s.top + "px" };
2558
+ }
2559
+ };
2560
+ a([l()], be.prototype, "location", null), a([l()], be.prototype, "view", null), a([l({ type: us })], be.prototype, "viewModel", void 0), a([l()], be.prototype, "visible", null), be = a([O("esri.widgets.Spinner")], be);
2561
+ const Ur = be, j = "esri-features", W = { icon: `${j}__icon`, actionImage: `${j}__action-image`, base: j, container: `${j}__container`, contentContainer: `${j}__content-container`, contentFeature: `${j}__content-feature`, flowItemCollapsed: `${j}__flow-item--collapsed`, header: `${j}__header`, footer: `${j}__footer`, featureMenuObserver: `${j}__feature-menu-observer`, actionExit: `${j}__action--exit`, loader: `${j}__loader`, featuresHeading: `${j}__heading`, paginationActionBar: `${j}__pagination-action-bar`, paginationPrevious: `${j}__pagination-previous`, paginationNext: `${j}__pagination-next` };
2562
+ let Me = class extends te {
2563
+ constructor(e, i) {
2564
+ super(e, i), this.messages = null, this.closed = !1, this.closable = !0, this._handleOpenRelatedFeature = (s) => {
2565
+ this.emit("open-related-feature", { feature: s });
2566
+ };
2567
+ }
2568
+ loadDependencies() {
2569
+ return qe({ action: () => import("./calcite-action-ad0d1e23.js"), "flow-item": () => import("./calcite-flow-item-eb314bb8.js") });
2570
+ }
2571
+ render() {
2572
+ const { flowItems: e } = this, i = e == null ? void 0 : e.toArray();
2573
+ return h(Ws, null, i == null ? void 0 : i.map((s) => this._renderRelatedRecordsFlowItem(s)));
2574
+ }
2575
+ _handleCloseClick() {
2576
+ this.emit("close");
2577
+ }
2578
+ _handleExitClick() {
2579
+ this.emit("exit");
2580
+ }
2581
+ _handleRelatedRecordsBackClick() {
2582
+ var i;
2583
+ const e = (i = this.flowItems) == null ? void 0 : i.pop();
2584
+ e && ("showAllEnabled" in e.viewModel && (e.viewModel.showAllEnabled = !1), e && (e.viewModel = null, e.destroy()));
2585
+ }
2586
+ _renderRelatedRecordsFlowItem(e) {
2587
+ const { messages: i, closable: s, closed: n } = this, r = "graphic" in e && !e.isTable;
2588
+ return h("calcite-flow-item", { bind: this, closable: s, closed: n, description: this._getRelatedRecordsFlowItemDescription(e), heading: e.title ?? "", key: `flow-item-${e.viewModel.uid}`, onCalciteFlowItemBack: (o) => {
2589
+ o.preventDefault(), this._handleRelatedRecordsBackClick();
2590
+ }, onCalciteFlowItemClose: this._handleCloseClick }, h("calcite-action", { appearance: "transparent", bind: this, class: W.actionExit, icon: "move-up", key: "exit-related-records-action", label: i.exitRelatedRecords, onclick: this._handleExitClick, scale: "m", slot: "header-actions-start", text: i.exitRelatedRecords, title: i.exitRelatedRecords }), r ? h("calcite-action", { appearance: "transparent", bind: this, icon: "zoom-to-object", key: "open-related-feature-action", label: i.selectFeature, onclick: () => this._handleOpenRelatedFeature(e), scale: "m", slot: "header-actions-end", text: i.selectFeature, title: i.selectFeature }) : null, h("div", { class: W.container }, e.render()));
2591
+ }
2592
+ _getRelatedRecordsFlowItemDescription(e) {
2593
+ return "featureCountDescription" in e ? e.featureCountDescription : e.viewModel.description ?? "";
2594
+ }
2595
+ };
2596
+ a([l()], Me.prototype, "flowItems", void 0), a([l(), ee("esri/widgets/Features/t9n/Features")], Me.prototype, "messages", void 0), a([l()], Me.prototype, "closed", void 0), a([l()], Me.prototype, "closable", void 0), Me = a([O("esri.widgets.Features.FeaturesRelatedRecords")], Me);
2597
+ const Zr = Me;
2598
+ let Qr = class {
2599
+ constructor(e) {
2600
+ this._observable = new Hs(), this._set = new Set(e);
2601
+ }
2602
+ get size() {
2603
+ return ve(this._observable), this._set.size;
2604
+ }
2605
+ add(e) {
2606
+ const i = this._set.size;
2607
+ return this._set.add(e), this._set.size !== i && this._observable.notify(), this;
2608
+ }
2609
+ clear() {
2610
+ this._set.size > 0 && (this._set.clear(), this._observable.notify());
2611
+ }
2612
+ delete(e) {
2613
+ const i = this._set.delete(e);
2614
+ return i && this._observable.notify(), i;
2615
+ }
2616
+ entries() {
2617
+ return ve(this._observable), this._set.entries();
2618
+ }
2619
+ forEach(e, i) {
2620
+ ve(this._observable), this._set.forEach((s, n) => e.call(i, s, n, this), i);
2621
+ }
2622
+ has(e) {
2623
+ return ve(this._observable), this._set.has(e);
2624
+ }
2625
+ keys() {
2626
+ return ve(this._observable), this._set.keys();
2627
+ }
2628
+ values() {
2629
+ return ve(this._observable), this._set.values();
2630
+ }
2631
+ [Symbol.iterator]() {
2632
+ return ve(this._observable), this._set[Symbol.iterator]();
2633
+ }
2634
+ get [Symbol.toStringTag]() {
2635
+ return this._set[Symbol.toStringTag];
2636
+ }
2637
+ };
2638
+ const ki = "OBJECTID";
2639
+ var Te;
2640
+ (function(t) {
2641
+ t[t.size = 22] = "size", t[t.lineWidth = 50] = "lineWidth", t[t.maxSize = 120] = "maxSize", t[t.maxOutlineSize = 80] = "maxOutlineSize", t[t.tallSymbolWidth = 20] = "tallSymbolWidth";
2642
+ })(Te || (Te = {}));
2643
+ const Ti = Wi("android");
2644
+ Wi("chrome") || Ti && Ti >= 4;
2645
+ js();
2646
+ Te.size;
2647
+ Te.maxSize;
2648
+ Te.maxOutlineSize;
2649
+ Te.lineWidth;
2650
+ Te.tallSymbolWidth;
2651
+ function hs(t) {
2652
+ return t && "opacity" in t ? t.opacity * hs(t.parent) : 1;
2653
+ }
2654
+ async function Li(t, e) {
2655
+ var k;
2656
+ if (!t)
2657
+ return;
2658
+ const i = t.sourceLayer, s = (e != null && e.useSourceLayer ? i : t.layer) ?? i, n = hs(s);
2659
+ if (t.symbol != null && (e == null || e.ignoreGraphicSymbol !== !0)) {
2660
+ const M = t.symbol.type === "web-style" ? await rn(t.symbol, { ...e, cache: e != null ? e.webStyleCache : null }) : t.symbol.clone();
2661
+ return vt(M, null, n), M;
2662
+ }
2663
+ const r = (e == null ? void 0 : e.renderer) ?? Gr(s);
2664
+ let o = r && "getSymbolAsync" in r ? await r.getSymbolAsync(t, e) : null;
2665
+ if (!o)
2666
+ return;
2667
+ if (o = o.type === "web-style" ? await o.fetchSymbol({ ...e, cache: e != null ? e.webStyleCache : null }) : o.clone(), !r || !("visualVariables" in r) || !((k = r.visualVariables) != null && k.length))
2668
+ return vt(o, null, n), o;
2669
+ if ("arcadeRequiredForVisualVariables" in r && r.arcadeRequiredForVisualVariables && (e == null ? void 0 : e.arcade) == null) {
2670
+ const M = { ...e };
2671
+ M.arcade = await Si(), e = M;
2672
+ }
2673
+ const { getColor: d, getOpacity: c, getAllSizes: u, getRotationAngle: p } = await import("./visualVariableUtils-1a38c540.js"), m = [], f = [], g = [], v = [];
2674
+ for (const M of r.visualVariables)
2675
+ switch (M.type) {
2676
+ case "color":
2677
+ m.push(M);
2678
+ break;
2679
+ case "opacity":
2680
+ f.push(M);
2681
+ break;
2682
+ case "rotation":
2683
+ v.push(M);
2684
+ break;
2685
+ case "size":
2686
+ M.target || g.push(M);
2687
+ }
2688
+ const _ = !!m.length && m[m.length - 1], I = _ ? d(_, t, e) : null, w = !!f.length && f[f.length - 1];
2689
+ let A = w ? c(w, t, e) : null;
2690
+ if (n != null && (A = A != null ? A * n : n), vt(o, I, A), g.length) {
2691
+ const M = u(g, t, e);
2692
+ await on(o, M);
2693
+ }
2694
+ for (const M of v)
2695
+ an(o, p(M, t, e), M.axis);
2696
+ return o;
2697
+ }
2698
+ function Gr(t) {
2699
+ if (t)
2700
+ return "renderer" in t ? t.renderer : void 0;
2701
+ }
2702
+ const $e = Ve.ofType({ key: "type", defaultKeyValue: "button", base: Us, typeMap: { button: Ge, toggle: Hi } }), Ae = new Ge({ icon: "magnifying-glass-plus", id: "zoom-to-feature", title: "{messages.zoom}", className: ne.zoomInMagnifyingGlass }), Ri = new Ge({ icon: "trash", id: "remove-selected-feature", title: "{messages.remove}", className: ne.trash }), Ne = new Ge({ icon: "magnifying-glass-plus", id: "zoom-to-clustered-features", title: "{messages.zoom}", className: ne.zoomInMagnifyingGlass }), ye = new Hi({ icon: "table", id: "browse-clustered-features", title: "{messages.browseClusteredFeatures}", className: ne.table, value: !1 }), Xr = "esri.widgets.Popup.PopupViewModel", ct = () => q.getLogger(Xr), Yr = (t) => {
2703
+ const { event: e, view: i, viewModel: s } = t, { action: n } = e;
2704
+ if (!n)
2705
+ return Promise.reject(new L("trigger-action:missing-arguments", "Event has no action"));
2706
+ const { disabled: r, id: o } = n;
2707
+ if (!o)
2708
+ return Promise.reject(new L("trigger-action:invalid-action", "action.id is missing"));
2709
+ if (r)
2710
+ return Promise.reject(new L("trigger-action:invalid-action", "Action is disabled"));
2711
+ if (o === Ae.id)
2712
+ return Jr(s).catch(Zs);
2713
+ if (o === Ne.id)
2714
+ return eo(s);
2715
+ if (o === ye.id)
2716
+ return s.browseClusterEnabled = !s.browseClusterEnabled, s.featureMenuOpen = s.browseClusterEnabled, Promise.resolve();
2717
+ if (o === Ri.id) {
2718
+ s.visible = !1;
2719
+ const { selectedFeature: d } = s;
2720
+ if (!d)
2721
+ return Promise.reject(new L(`trigger-action:${Ri.id}`, "selectedFeature is required", { selectedFeature: d }));
2722
+ const { sourceLayer: c } = d;
2723
+ return c ? c.remove(d) : i == null || i.graphics.remove(d), Promise.resolve();
2724
+ }
2725
+ return Promise.resolve();
2726
+ };
2727
+ function ps(t) {
2728
+ const { selectedFeature: e, location: i, view: s } = t;
2729
+ return s ? e ?? i ?? null : null;
2730
+ }
2731
+ function Fe(t) {
2732
+ var e, i;
2733
+ return !!t && t.isAggregate && ((i = (e = t.sourceLayer) == null ? void 0 : e.featureReduction) == null ? void 0 : i.type) === "cluster";
2734
+ }
2735
+ async function Kr(t, e) {
2736
+ if ((e == null ? void 0 : e.type) !== "3d" || !t || t.declaredClass !== "esri.Graphic")
2737
+ return !0;
2738
+ const i = e.getViewForGraphic(t);
2739
+ if (i && "whenGraphicBounds" in i) {
2740
+ let s = null;
2741
+ try {
2742
+ s = await i.whenGraphicBounds(t, { useViewElevation: !0 });
2743
+ } catch {
2744
+ }
2745
+ return !s || !s.boundingBox || s.boundingBox[0] === s.boundingBox[3] && s.boundingBox[1] === s.boundingBox[4] && s.boundingBox[2] === s.boundingBox[5];
2746
+ }
2747
+ return !0;
2748
+ }
2749
+ async function Jr(t) {
2750
+ var p;
2751
+ const { location: e, selectedFeature: i, view: s, zoomFactor: n } = t, r = ps(t);
2752
+ if (!s || !r) {
2753
+ const m = new L("zoom-to:invalid-target-or-view", "Cannot zoom to location without a target and view.", { target: r, view: s });
2754
+ throw ct().error(m), m;
2755
+ }
2756
+ const o = s.scale / n, d = (p = t.selectedFeature) == null ? void 0 : p.geometry, c = d ?? e, u = c != null && c.type === "point" && await Kr(i, s);
2757
+ Ae.active = !0, Ae.disabled = !0;
2758
+ try {
2759
+ await t.zoomTo({ target: { target: r, scale: u ? o : void 0 } });
2760
+ } catch {
2761
+ const f = new L("zoom-to:invalid-graphic", "Could not zoom to the location of the graphic.", { graphic: i });
2762
+ ct().error(f);
2763
+ } finally {
2764
+ Ae.active = !1, Ae.disabled = !1, t.zoomToLocation = null, u && (t.location = c);
2765
+ }
2766
+ }
2767
+ async function eo(t) {
2768
+ const { selectedFeature: e, view: i } = t;
2769
+ if ((i == null ? void 0 : i.type) !== "2d") {
2770
+ const o = new L("zoomToCluster:invalid-view", "View must be 2d MapView.", { view: i });
2771
+ throw ct().error(o), o;
2772
+ }
2773
+ if (!e || !Fe(e)) {
2774
+ const o = new L("zoomToCluster:invalid-selectedFeature", "Selected feature must represent an aggregate/cluster graphic.", { selectedFeature: e });
2775
+ throw ct().error(o), o;
2776
+ }
2777
+ const [s, n] = await Jt(i, e);
2778
+ Ne.active = !0, Ne.disabled = !0;
2779
+ const { extent: r } = await s.queryExtent(n);
2780
+ r && await t.zoomTo({ target: r }), Ne.active = !1, Ne.disabled = !1;
2781
+ }
2782
+ async function to(t) {
2783
+ const { view: e, selectedFeature: i } = t;
2784
+ if (!e || !i)
2785
+ return;
2786
+ const [s, n] = await Jt(e, i), { extent: r } = await s.queryExtent(n);
2787
+ t.selectedClusterBoundaryFeature.geometry = r, e.graphics.add(t.selectedClusterBoundaryFeature);
2788
+ }
2789
+ async function io(t) {
2790
+ const { selectedFeature: e, view: i } = t;
2791
+ if (!i || !e)
2792
+ return;
2793
+ const [s, n] = await Jt(i, e);
2794
+ ye.active = !0, ye.disabled = !0;
2795
+ const { features: r } = await s.queryFeatures(n);
2796
+ ye.active = !1, ye.disabled = !1, ye.value = !0, t == null || t.open({ features: [e].concat(r), featureMenuOpen: !0 });
2797
+ }
2798
+ async function Jt(t, e) {
2799
+ const i = await t.whenLayerView(e.sourceLayer), s = i.createQuery(), n = e.getObjectId();
2800
+ return s.aggregateIds = n != null ? [n] : [], [i, s];
2801
+ }
2802
+ function so(t) {
2803
+ ye.value = !1;
2804
+ const e = t.features.filter((i) => Fe(i));
2805
+ e.length && (t.features = e);
2806
+ }
2807
+ const no = () => [Ae.clone()], ro = () => [Ne.clone(), ye.clone()];
2808
+ let Je = null;
2809
+ function oo(t, e) {
2810
+ return t === "building-scene" || e === "2d" && (t === "map-image" || t === "tile" || t === "imagery" || t === "imagery-tile");
2811
+ }
2812
+ let C = class extends Qs(cs) {
2813
+ constructor(t) {
2814
+ super(t), this._pendingPromises = new Qr(), this._fetchFeaturesController = null, this._highlightSelectedFeaturePromise = null, this._highlightActiveFeaturePromise = null, this._selectedClusterFeature = null, this._locationScaleHandle = null, this.actions = new $e(), this.activeFeature = null, this.autoCloseEnabled = !1, this.autoOpenEnabled = !0, this.browseClusterEnabled = !1, this.content = null, this.defaultPopupTemplateEnabled = !1, this.featurePage = null, this.featuresPerPage = 20, this.featureMenuOpen = !1, this.featureViewModelAbilities = null, this.featureViewModels = [], this.highlightEnabled = !0, this.includeDefaultActions = !0, this.selectedClusterBoundaryFeature = new De({ symbol: new Gs({ outline: { width: 1.5, color: "cyan" }, style: "none" }) }), this.title = null, this.updateLocationEnabled = !1, this.view = null, this.visible = !1, this.zoomFactor = 4, this.zoomToLocation = null, this._debouncedLocationUpdate = et(async (e) => {
2815
+ var r, o, d;
2816
+ const { view: i } = this, s = (o = (r = this.selectedFeature) == null ? void 0 : r.geometry) == null ? void 0 : o.type, n = this.location ?? e;
2817
+ if (s !== "mesh" && i && n && this.selectedFeature)
2818
+ if (s !== "point")
2819
+ try {
2820
+ const { pendingFeatures: c } = await this._fetchFeaturesWithController({ mapPoint: n }), u = (await Promise.all(c)).flat().filter(Boolean);
2821
+ if (!u.length)
2822
+ return;
2823
+ if (u.length !== this.features.length) {
2824
+ const g = this._getHighlightLayer(this.selectedFeature), v = (g == null ? void 0 : g.type) === "imagery" ? void 0 : g && "objectIdField" in g ? g.objectIdField || ki : null;
2825
+ if (v) {
2826
+ const _ = this.selectedFeature.getObjectId(), I = u.findIndex((w) => {
2827
+ const A = this._getHighlightLayer(w);
2828
+ return (A == null ? void 0 : A.uid) === (g == null ? void 0 : g.uid) && w.attributes[v] === _;
2829
+ });
2830
+ this.features = u, this.selectedFeatureIndex = I;
2831
+ }
2832
+ }
2833
+ const p = (d = u[this.selectedFeatureIndex]) == null ? void 0 : d.geometry, m = ((p == null ? void 0 : p.type) !== "mesh" ? p : null) ?? this.selectedFeature.geometry, f = m ? Xs(m, i.spatialReference) : null;
2834
+ if (!f)
2835
+ return;
2836
+ Je || (Je = await import("./geometryEngineAsync-db2e5674.js")), await Je.intersects(f, n) || (this.location = (await Je.nearestCoordinate(f, n)).coordinate ?? n);
2837
+ } catch (c) {
2838
+ Rt(c) || q.getLogger(this).error(c);
2839
+ }
2840
+ else
2841
+ this.location = Ot(this.selectedFeature.geometry) ?? n;
2842
+ });
2843
+ }
2844
+ initialize() {
2845
+ this.addHandles([this.on("view-change", () => this._autoClose()), y(() => [this.highlightEnabled, this.selectedFeature, this.visible, this.view], () => this._highlightSelectedFeature()), y(() => [this.highlightEnabled, this.activeFeature, this.visible, this.view], () => this._highlightActiveFeature()), y(() => {
2846
+ var t, e;
2847
+ return (e = (t = this.view) == null ? void 0 : t.animation) == null ? void 0 : e.state;
2848
+ }, (t) => this._animationStateChange(t)), y(() => this.location, (t) => this._locationChange(t)), y(() => this.selectedFeature, (t) => this._selectedFeatureChange(t)), y(() => [this.selectedFeatureIndex, this.featureCount, this.featuresPerPage], () => this._selectedFeatureIndexChange()), y(() => [this.featurePage, this.selectedFeatureIndex, this.featureCount, this.featuresPerPage, this.featureViewModels], () => this._setGraphicOnFeatureViewModels()), y(() => this.featureViewModels, () => this._featureViewModelsChange()), this.on("trigger-action", (t) => Yr({ event: t, viewModel: this, view: this.view })), ot(() => !this.waitingForResult, () => this._waitingForResultChange(), Ys), y(() => {
2849
+ var t, e, i;
2850
+ return [this.features, (t = this.view) == null ? void 0 : t.map, (e = this.view) == null ? void 0 : e.spatialReference, (i = this.view) == null ? void 0 : i.timeZone];
2851
+ }, () => this._updateFeatureVMs()), y(() => {
2852
+ var t;
2853
+ return (t = this.view) == null ? void 0 : t.scale;
2854
+ }, () => this._viewScaleChange()), ot(() => !this.visible, () => this.browseClusterEnabled = !1), y(() => this.browseClusterEnabled, (t) => t ? this.enableClusterBrowsing() : this.disableClusterBrowsing())]);
2855
+ }
2856
+ destroy() {
2857
+ var t;
2858
+ this._cancelFetchingFeatures(), this._pendingPromises.clear(), this.browseClusterEnabled = !1, this.view = null, (t = this._locationScaleHandle) == null || t.remove(), this._locationScaleHandle = null;
2859
+ }
2860
+ get active() {
2861
+ return !(!this.visible || this.waitingForResult);
2862
+ }
2863
+ get allActions() {
2864
+ const t = this._get("allActions") || new $e();
2865
+ t.removeAll();
2866
+ const { actions: e, defaultActions: i, defaultPopupTemplateEnabled: s, includeDefaultActions: n, selectedFeature: r } = this, o = n ? i.concat(e) : e, d = r && (typeof r.getEffectivePopupTemplate == "function" && r.getEffectivePopupTemplate(s) || r.popupTemplate), c = d == null ? void 0 : d.actions, u = d != null && d.overwriteActions ? c : (c == null ? void 0 : c.concat(o)) ?? o;
2867
+ return u == null || u.filter(Boolean).forEach((p) => t.add(p)), t;
2868
+ }
2869
+ get defaultActions() {
2870
+ const t = this._get("defaultActions") || new $e();
2871
+ return t.removeAll(), t.addMany(Fe(this.selectedFeature) ? ro() : no()), t;
2872
+ }
2873
+ get featureCount() {
2874
+ return this.features.length;
2875
+ }
2876
+ set features(t) {
2877
+ const e = t || [];
2878
+ this._set("features", e);
2879
+ const { pendingPromisesCount: i, promiseCount: s, selectedFeatureIndex: n } = this, r = s && e.length;
2880
+ r && i && n === -1 ? this.selectedFeatureIndex = 0 : r && n !== -1 || (this.selectedFeatureIndex = e.length ? 0 : -1);
2881
+ }
2882
+ set location(t) {
2883
+ var n, r, o;
2884
+ let e = t;
2885
+ const i = (r = (n = this.view) == null ? void 0 : n.spatialReference) == null ? void 0 : r.isWebMercator;
2886
+ ((o = t == null ? void 0 : t.spatialReference) == null ? void 0 : o.isWGS84) && i && (e = Ks(t)), this._set("location", e);
2887
+ }
2888
+ get pendingPromisesCount() {
2889
+ return this._pendingPromises.size;
2890
+ }
2891
+ get promiseCount() {
2892
+ return this.promises.length;
2893
+ }
2894
+ get promises() {
2895
+ return this._get("promises") || [];
2896
+ }
2897
+ set promises(t) {
2898
+ this._pendingPromises.clear(), this.features = [], Array.isArray(t) && t.length ? (this._set("promises", t), (t = t.slice(0)).forEach((e) => this._pendingPromises.add(e)), t.reduce((e, i) => e.finally(() => i.then((s) => {
2899
+ this._pendingPromises.has(i) && this._updateFeatures(s);
2900
+ }).finally(() => this._pendingPromises.delete(i)).catch(() => {
2901
+ })), Promise.resolve())) : this._set("promises", []);
2902
+ }
2903
+ get selectedFeature() {
2904
+ const { features: t, selectedFeatureIndex: e } = this;
2905
+ return e === -1 ? null : t[e] || null;
2906
+ }
2907
+ get selectedFeatureIndex() {
2908
+ const t = this._get("selectedFeatureIndex");
2909
+ return typeof t == "number" ? t : -1;
2910
+ }
2911
+ set selectedFeatureIndex(t) {
2912
+ const { featureCount: e } = this;
2913
+ t = isNaN(t) || t < -1 || !e ? -1 : (t + e) % e, this.activeFeature = null, this._set("selectedFeatureIndex", t);
2914
+ }
2915
+ get selectedFeatureViewModel() {
2916
+ return this.featureViewModels[this.selectedFeatureIndex] || null;
2917
+ }
2918
+ get state() {
2919
+ var t;
2920
+ return (t = this.view) != null && t.ready ? "ready" : "disabled";
2921
+ }
2922
+ get waitingForContents() {
2923
+ return this.featureViewModels.some((t) => t.waitingForContent);
2924
+ }
2925
+ get waitingForResult() {
2926
+ return !(!(this._fetchFeaturesController || this.pendingPromisesCount > 0) || this.featureCount !== 0);
2927
+ }
2928
+ centerAtLocation() {
2929
+ const { view: t } = this, e = ps(this);
2930
+ return e && t ? this.callGoTo({ target: { target: e, scale: t.scale } }) : Promise.reject(new L("center-at-location:invalid-target-or-view", "Cannot center at a location without a target and view.", { target: e, view: t }));
2931
+ }
2932
+ zoomTo(t) {
2933
+ return this.callGoTo(t);
2934
+ }
2935
+ clear() {
2936
+ this.set({ promises: [], features: [], content: null, title: null, location: null, activeFeature: null });
2937
+ }
2938
+ fetchFeatures(t, e) {
2939
+ var s;
2940
+ const { view: i } = this;
2941
+ if (!i || !t)
2942
+ throw new L("fetch-features:invalid-screenpoint-or-view", "Cannot fetch features without a screenPoint and view.", { screenPoint: t, view: i });
2943
+ return i.fetchPopupFeatures(t, { pointerType: (s = e == null ? void 0 : e.event) == null ? void 0 : s.pointerType, defaultPopupTemplateEnabled: this.defaultPopupTemplateEnabled, signal: e == null ? void 0 : e.signal });
2944
+ }
2945
+ open(t) {
2946
+ const e = { updateLocationEnabled: !1, promises: [], fetchFeatures: !1, ...t, visible: !0 }, { fetchFeatures: i } = e;
2947
+ delete e.fetchFeatures, i && this._setFetchFeaturesPromises(e.location);
2948
+ const s = ["actionsMenuOpen", "collapsed"];
2949
+ for (const n of s)
2950
+ delete e[n];
2951
+ this.set(e);
2952
+ }
2953
+ triggerAction(t) {
2954
+ const e = this.allActions.at(t);
2955
+ e && !e.disabled && this.emit("trigger-action", { action: e });
2956
+ }
2957
+ next() {
2958
+ return this.selectedFeatureIndex++, this;
2959
+ }
2960
+ previous() {
2961
+ return this.selectedFeatureIndex--, this;
2962
+ }
2963
+ disableClusterBrowsing() {
2964
+ so(this), this._clearBrowsedClusterGraphics();
2965
+ }
2966
+ async enableClusterBrowsing() {
2967
+ const { view: t, selectedFeature: e } = this;
2968
+ (t == null ? void 0 : t.type) === "2d" ? Fe(e) ? (await to(this), await io(this)) : q.getLogger(this).warn("enableClusterBrowsing:invalid-selectedFeature: Selected feature must represent an aggregate/cluster graphic.", e) : q.getLogger(this).warn("enableClusterBrowsing:invalid-view: View must be 2d MapView.", e);
2969
+ }
2970
+ handleViewClick(t) {
2971
+ this.autoOpenEnabled && this._fetchFeaturesAndOpen(t);
2972
+ }
2973
+ _animationStateChange(t) {
2974
+ this.zoomToLocation || (Ae.disabled = t === "waiting-for-target");
2975
+ }
2976
+ _clearBrowsedClusterGraphics() {
2977
+ var e, i;
2978
+ const t = [this.selectedClusterBoundaryFeature, this._selectedClusterFeature].filter(ut);
2979
+ (i = (e = this.view) == null ? void 0 : e.graphics) == null || i.removeMany(t), this._selectedClusterFeature = null, this.selectedClusterBoundaryFeature.geometry = null;
2980
+ }
2981
+ _viewScaleChange() {
2982
+ if (Fe(this.selectedFeature))
2983
+ return this.browseClusterEnabled = !1, this.visible = !1, void this.clear();
2984
+ this.browseClusterEnabled && (this.features = this.selectedFeature ? [this.selectedFeature] : []);
2985
+ }
2986
+ _locationChange(t) {
2987
+ const { selectedFeature: e, updateLocationEnabled: i } = this;
2988
+ i && t && (!e || e.geometry) && this.centerAtLocation();
2989
+ }
2990
+ _selectedFeatureIndexChange() {
2991
+ this.featurePage = this.featureCount > 1 ? Math.floor(this.selectedFeatureIndex / this.featuresPerPage) + 1 : null;
2992
+ }
2993
+ _featureViewModelsChange() {
2994
+ this.featurePage = this.featureCount > 1 ? 1 : null;
2995
+ }
2996
+ _setGraphicOnFeatureViewModels() {
2997
+ const { features: t, featureCount: e, featurePage: i, featuresPerPage: s, featureViewModels: n } = this;
2998
+ if (i === null)
2999
+ return;
3000
+ const r = ((i - 1) * s + e) % e, o = r + s;
3001
+ n.slice(r, o).forEach((d, c) => {
3002
+ d && (d.graphic ?? (d.graphic = t[r + c]));
3003
+ });
3004
+ }
3005
+ async _selectedFeatureChange(t) {
3006
+ var n;
3007
+ const { location: e, updateLocationEnabled: i, view: s } = this;
3008
+ if (t && s) {
3009
+ if (this.browseClusterEnabled)
3010
+ return this._selectedClusterFeature && (s.graphics.remove(this._selectedClusterFeature), this._selectedClusterFeature = null), Fe(t) ? void 0 : (t.symbol = await Li(t), this._selectedClusterFeature = t, void s.graphics.add(this._selectedClusterFeature));
3011
+ if (t.symbol = await Li(t), !i && e || !t.geometry) {
3012
+ if (i && !t.geometry) {
3013
+ await this.centerAtLocation();
3014
+ const r = (n = s.center) == null ? void 0 : n.clone();
3015
+ r && (this.location = r);
3016
+ }
3017
+ } else
3018
+ this.location = Ot(t.geometry);
3019
+ }
3020
+ }
3021
+ _waitingForResultChange() {
3022
+ !this.featureCount && this.promises && (this.visible = !1);
3023
+ }
3024
+ async _setFetchFeaturesPromises(t) {
3025
+ const { pendingFeatures: e } = await this._fetchFeaturesWithController({ mapPoint: t });
3026
+ this.promises = e;
3027
+ }
3028
+ _destroyFeatureVMs() {
3029
+ this.featureViewModels.forEach((t) => t && !t.destroyed && t.destroy()), this._set("featureViewModels", []);
3030
+ }
3031
+ _updateFeatureVMs() {
3032
+ const { selectedFeature: t, features: e, featureViewModels: i, view: s } = this;
3033
+ if (Fe(t) || (this.browseClusterEnabled = !1), this._destroyFeatureVMs(), !(e != null && e.length))
3034
+ return;
3035
+ const n = i.slice(0), r = [];
3036
+ e.forEach((o, d) => {
3037
+ if (!o)
3038
+ return;
3039
+ let c = null;
3040
+ if (n.some((u, p) => (u && u.graphic === o && (c = u, n.splice(p, 1)), !!c)), c)
3041
+ r[d] = c;
3042
+ else {
3043
+ const u = new Kt({ abilities: this.featureViewModelAbilities, defaultPopupTemplateEnabled: this.defaultPopupTemplateEnabled, spatialReference: s == null ? void 0 : s.spatialReference, graphic: o === t ? o : null, location: this.location, map: s == null ? void 0 : s.map, view: s });
3044
+ r[d] = u;
3045
+ }
3046
+ }), n.forEach((o) => o && !o.destroyed && o.destroy()), this._set("featureViewModels", r);
3047
+ }
3048
+ async _getScreenPoint(t, e) {
3049
+ const { view: i } = this;
3050
+ await (i == null ? void 0 : i.when());
3051
+ const s = t == null ? void 0 : t.spatialReference, n = i == null ? void 0 : i.spatialReference;
3052
+ return s && n ? (await Js(s, n, null, e), i.toScreen(t)) : null;
3053
+ }
3054
+ _cancelFetchingFeatures() {
3055
+ const t = this._fetchFeaturesController;
3056
+ t && t.abort(), this._fetchFeaturesController = null;
3057
+ }
3058
+ async _projectScreenPointAndFetchFeatures({ mapPoint: t, screenPoint: e, event: i, signal: s }) {
3059
+ return this.fetchFeatures(e ?? await this._getScreenPoint(t ?? this.location, { signal: s }), { signal: s, event: i });
3060
+ }
3061
+ _fetchFeaturesWithController({ mapPoint: t, screenPoint: e, event: i }) {
3062
+ this._cancelFetchingFeatures();
3063
+ const s = new AbortController(), { signal: n } = s;
3064
+ this._fetchFeaturesController = s;
3065
+ const r = this._projectScreenPointAndFetchFeatures({ mapPoint: t, screenPoint: e, signal: n, event: i });
3066
+ return r.catch(() => {
3067
+ }).then(() => {
3068
+ this._fetchFeaturesController = null;
3069
+ }), r;
3070
+ }
3071
+ async _fetchFeaturesAndOpen(t) {
3072
+ var r;
3073
+ const { mapPoint: e, screenPoint: i } = t, { view: s } = this;
3074
+ (r = this._locationScaleHandle) == null || r.remove(), this._locationScaleHandle = y(() => {
3075
+ var o;
3076
+ return (o = this.view) == null ? void 0 : o.scale;
3077
+ }, () => this._debouncedLocationUpdate(e).catch((o) => {
3078
+ Rt(o) || q.getLogger(this).error(o);
3079
+ }));
3080
+ const { pendingFeatures: n } = await this._fetchFeaturesWithController({ mapPoint: e, screenPoint: i, event: t });
3081
+ s != null && s.popup && "open" in s.popup && s.popup.open({ location: e ?? void 0, promises: n });
3082
+ }
3083
+ _autoClose() {
3084
+ this.autoCloseEnabled && (this.visible = !1);
3085
+ }
3086
+ async _getLayerView(t, e) {
3087
+ return await t.when(), t.whenLayerView(e);
3088
+ }
3089
+ _getHighlightLayer(t) {
3090
+ const { layer: e, sourceLayer: i } = t;
3091
+ return i && "layer" in i && i.layer ? i.layer : (i == null ? void 0 : i.type) === "map-notes" || (i == null ? void 0 : i.type) === "subtype-group" ? i : e;
3092
+ }
3093
+ _getHighlightTarget(t, e, i) {
3094
+ if (oo(e.type, i))
3095
+ return t;
3096
+ const s = t.getObjectId();
3097
+ if (s != null)
3098
+ return s;
3099
+ const n = e.type === "imagery" ? void 0 : "objectIdField" in e ? e.objectIdField || ki : null, r = t.attributes;
3100
+ return r && n && r[n] || t;
3101
+ }
3102
+ _mapIncludesLayer(t) {
3103
+ var e, i, s;
3104
+ return !!((s = (i = (e = this.view) == null ? void 0 : e.map) == null ? void 0 : i.allLayers) != null && s.includes(t));
3105
+ }
3106
+ async _highlightActiveFeature() {
3107
+ const t = "highlight-active-feature";
3108
+ this.removeHandles(t);
3109
+ const { highlightEnabled: e, view: i, activeFeature: s, visible: n } = this;
3110
+ if (!(s && i && e && n))
3111
+ return;
3112
+ const r = this._getHighlightLayer(s);
3113
+ if (!(r && r instanceof oi && this._mapIncludesLayer(r)))
3114
+ return;
3115
+ const o = this._getLayerView(i, r);
3116
+ this._highlightActiveFeaturePromise = o;
3117
+ const d = await o;
3118
+ if (!(d && li(d) && this._highlightActiveFeaturePromise === o && this.activeFeature && this.highlightEnabled))
3119
+ return;
3120
+ const c = d.highlight(this._getHighlightTarget(s, r, i.type));
3121
+ this.addHandles(c, t);
3122
+ }
3123
+ async _highlightSelectedFeature() {
3124
+ const t = "highlight-selected-feature";
3125
+ this.removeHandles(t);
3126
+ const { selectedFeature: e, highlightEnabled: i, view: s, visible: n } = this;
3127
+ if (!(e && s && i && n))
3128
+ return;
3129
+ const r = this._getHighlightLayer(e);
3130
+ if (!(r && r instanceof oi && this._mapIncludesLayer(r)))
3131
+ return;
3132
+ const o = this._getLayerView(s, r);
3133
+ this._highlightSelectedFeaturePromise = o;
3134
+ const d = await o;
3135
+ if (!(d && li(d) && this._highlightSelectedFeaturePromise === o && this.selectedFeature && this.highlightEnabled && this.visible))
3136
+ return;
3137
+ const c = d.highlight(this._getHighlightTarget(e, r, s.type));
3138
+ this.addHandles(c, t);
3139
+ }
3140
+ _updateFeatures(t) {
3141
+ const { features: e } = this, i = t.filter((s) => !e.includes(s));
3142
+ i != null && i.length && (this.features = e.concat(i));
3143
+ }
3144
+ };
3145
+ a([l()], C.prototype, "_fetchFeaturesController", void 0), a([l({ type: $e })], C.prototype, "actions", void 0), a([l({ readOnly: !0 })], C.prototype, "active", null), a([l()], C.prototype, "activeFeature", void 0), a([l({ readOnly: !0 })], C.prototype, "allActions", null), a([l()], C.prototype, "autoCloseEnabled", void 0), a([l()], C.prototype, "autoOpenEnabled", void 0), a([l()], C.prototype, "browseClusterEnabled", void 0), a([l()], C.prototype, "content", void 0), a([l({ type: $e, readOnly: !0 })], C.prototype, "defaultActions", null), a([l({ type: Boolean })], C.prototype, "defaultPopupTemplateEnabled", void 0), a([l({ readOnly: !0 })], C.prototype, "featureCount", null), a([l()], C.prototype, "featurePage", void 0), a([l({ value: [] })], C.prototype, "features", null), a([l()], C.prototype, "featuresPerPage", void 0), a([l()], C.prototype, "featureMenuOpen", void 0), a([l()], C.prototype, "featureViewModelAbilities", void 0), a([l({ readOnly: !0 })], C.prototype, "featureViewModels", void 0), a([l()], C.prototype, "highlightEnabled", void 0), a([l()], C.prototype, "includeDefaultActions", void 0), a([l({ type: zt })], C.prototype, "location", null), a([l({ readOnly: !0 })], C.prototype, "pendingPromisesCount", null), a([l({ readOnly: !0 })], C.prototype, "promiseCount", null), a([l()], C.prototype, "promises", null), a([l({ readOnly: !0 })], C.prototype, "selectedClusterBoundaryFeature", void 0), a([l({ value: null, readOnly: !0 })], C.prototype, "selectedFeature", null), a([l({ value: -1 })], C.prototype, "selectedFeatureIndex", null), a([l({ readOnly: !0 })], C.prototype, "selectedFeatureViewModel", null), a([l({ readOnly: !0 })], C.prototype, "state", null), a([l()], C.prototype, "title", void 0), a([l()], C.prototype, "updateLocationEnabled", void 0), a([l()], C.prototype, "view", void 0), a([l()], C.prototype, "visible", void 0), a([l({ readOnly: !0 })], C.prototype, "waitingForContents", null), a([l({ readOnly: !0 })], C.prototype, "waitingForResult", null), a([l()], C.prototype, "zoomFactor", void 0), a([l()], C.prototype, "zoomToLocation", void 0), a([l()], C.prototype, "centerAtLocation", null), C = a([O("esri.widgets.Features.FeaturesViewModel")], C);
3146
+ const ei = C;
3147
+ let le = class extends me {
3148
+ constructor() {
3149
+ super(...arguments), this.actionBar = !0, this.closeButton = !0, this.collapseButton = !1, this.featureNavigation = !0, this.flow = !0, this.heading = !0, this.spinner = !0;
3150
+ }
3151
+ };
3152
+ a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "actionBar", void 0), a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "closeButton", void 0), a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "collapseButton", void 0), a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "featureNavigation", void 0), a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "flow", void 0), a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "heading", void 0), a([l({ type: Boolean, nonNullable: !0 })], le.prototype, "spinner", void 0), le = a([O("esri.widgets.Features.FeaturesVisibleElements")], le);
3153
+ const ms = le, Pi = "selected-index", ao = 0, Oi = "features-spinner", lo = 50;
3154
+ let x = class extends ds(te) {
3155
+ constructor(t, e) {
3156
+ super(t, e), this._featureMenuIntersectionObserverCallback = ([i]) => {
3157
+ i != null && i.isIntersecting && this.viewModel.featurePage != null && this.viewModel.featurePage++;
3158
+ }, this._featureMenuIntersectionObserver = new IntersectionObserver(this._featureMenuIntersectionObserverCallback, { root: window.document }), this._featureMenuIntersectionObserverNode = null, this._focusOn = null, this._spinner = null, this._feature = null, this._relatedRecordsFlowItems = new Ve(), this._relatedRecordsWidget = new Zr({ flowItems: this._relatedRecordsFlowItems }), this._rootFlowItemNode = null, this._featureMenuViewportNode = null, this._actionBarMenuNode = null, this.collapsed = !1, this.icon = null, this.featureNavigationTop = !1, this.headerActions = new $e(), this.headingLevel = 2, this.messages = null, this.messagesCommon = null, this.responsiveActionsEnabled = !1, this.viewModel = new ei(), this.visibleElements = new ms(), this._renderAction = (i, s) => {
3159
+ const n = this._getActionTitle(i), { type: r, active: o, uid: d, disabled: c, indicator: u } = i;
3160
+ return i.visible ? h("calcite-action", { active: r === "toggle" && i.value, appearance: "solid", bind: this, "data-action-uid": d, disabled: c, icon: this._getActionIcon(i), indicator: u, key: `action-${s}`, loading: o, onclick: this._triggerAction, scale: "s", text: n, title: this._hideActionText ? n : void 0 }, this._getFallbackIcon(i)) : null;
3161
+ }, this._openFeatureMenu = () => {
3162
+ this.featureMenuOpen = !0, this._focusOn = "menu-flow-item";
3163
+ }, this._previousFeature = () => {
3164
+ this.viewModel.selectedFeatureIndex--;
3165
+ }, this._nextFeature = () => {
3166
+ this.viewModel.selectedFeatureIndex++;
3167
+ }, this._handleFeatureMenuBack = () => {
3168
+ this.featureMenuOpen && (this._focusOn = "root-flow-item", this.featureMenuOpen = !1);
3169
+ }, this._focusFlowItemNode = (i) => {
3170
+ this._focusOn === i && requestAnimationFrame(async () => {
3171
+ var s, n;
3172
+ switch (i) {
3173
+ case "menu-flow-item":
3174
+ await ((s = this._featureMenuViewportNode) == null ? void 0 : s.setFocus());
3175
+ break;
3176
+ case "root-flow-item":
3177
+ await ((n = this._rootFlowItemNode) == null ? void 0 : n.setFocus());
3178
+ }
3179
+ this._focusOn = null;
3180
+ });
3181
+ }, this._focusFlowItemNodeThrottled = at(this._focusFlowItemNode, lo), this._displaySpinnerThrottled = at(() => this._displaySpinner(), ao), this._addSelectedFeatureIndexHandle(), this.addHandles([this._displaySpinnerThrottled, this._focusFlowItemNodeThrottled, y(() => {
3182
+ var i;
3183
+ return (i = this.viewModel) == null ? void 0 : i.active;
3184
+ }, () => this._toggleScreenLocationEnabled()), y(() => {
3185
+ var i;
3186
+ return (i = this.viewModel) == null ? void 0 : i.active;
3187
+ }, (i) => this._relatedRecordsWidget.closed = !i), y(() => {
3188
+ var i;
3189
+ return (i = this.visibleElements) == null ? void 0 : i.closeButton;
3190
+ }, (i) => this._relatedRecordsWidget.closable = i), y(() => {
3191
+ var i;
3192
+ return (i = this.visibleElements) == null ? void 0 : i.spinner;
3193
+ }, (i) => this._spinnerEnabledChange(i)), y(() => {
3194
+ var i;
3195
+ return (i = this.viewModel) == null ? void 0 : i.view;
3196
+ }, (i, s) => this._viewChange(i, s)), y(() => {
3197
+ var i, s;
3198
+ return (s = (i = this.viewModel) == null ? void 0 : i.view) == null ? void 0 : s.ready;
3199
+ }, (i, s) => this._viewReadyChange(i ?? !1, s ?? !1)), y(() => {
3200
+ var i, s;
3201
+ return [(i = this.viewModel) == null ? void 0 : i.waitingForResult, (s = this.viewModel) == null ? void 0 : s.location];
3202
+ }, () => {
3203
+ this._hideSpinner(), this._displaySpinnerThrottled();
3204
+ }), y(() => {
3205
+ var i;
3206
+ return (i = this.viewModel) == null ? void 0 : i.screenLocation;
3207
+ }, () => this._closeOpenActionMenu()), y(() => this.selectedFeatureWidget, () => this._destroyRelatedRecordsFlowItemWidgets()), y(() => {
3208
+ var s;
3209
+ const i = (s = this.selectedFeatureWidget) == null ? void 0 : s.viewModel;
3210
+ return [i == null ? void 0 : i.title, i == null ? void 0 : i.state];
3211
+ }, () => this._setTitleFromFeatureWidget()), y(() => {
3212
+ var s;
3213
+ const i = (s = this.selectedFeatureWidget) == null ? void 0 : s.viewModel;
3214
+ return [i == null ? void 0 : i.content, i == null ? void 0 : i.state];
3215
+ }, () => this._setContentFromFeatureWidget()), y(() => {
3216
+ var i;
3217
+ return (i = this.viewModel) == null ? void 0 : i.featureViewModels;
3218
+ }, () => this._featureMenuViewportScrollTop()), this._relatedRecordsWidget.on("close", () => this.close()), this._relatedRecordsWidget.on("exit", () => this._destroyRelatedRecordsFlowItemWidgets()), this._relatedRecordsWidget.on("open-related-feature", ({ feature: i }) => this._openRelatedFeature(i))]);
3219
+ }
3220
+ loadDependencies() {
3221
+ return qe({ action: () => import("./calcite-action-ad0d1e23.js"), "action-bar": () => import("./calcite-action-bar-1b2de6d0.js"), "action-group": () => import("./calcite-action-group-aacf8ec4.js"), button: () => import("./calcite-button-125cbd95.js"), flow: () => import("./calcite-flow-c9a6e8fa.js"), "flow-item": () => import("./calcite-flow-item-eb314bb8.js"), list: () => import("./calcite-list-2087f9ca.js"), "list-item": () => import("./calcite-list-item-3419fb5f.js"), "list-item-group": () => import("./calcite-list-item-group-3a6545e3.js"), loader: () => import("./calcite-loader-16bcfb95.js") });
3222
+ }
3223
+ destroy() {
3224
+ var t, e;
3225
+ this._destroyRelatedRecordsFlowItemWidgets(), this._destroySelectedFeatureWidget(), this._destroySpinner(), this._unobserveFeatureMenuObserver(), (t = this._featureMenuIntersectionObserver) == null || t.disconnect(), (e = this._relatedRecordsWidget) == null || e.destroy();
3226
+ }
3227
+ get _hideActionText() {
3228
+ var e;
3229
+ if (!this.responsiveActionsEnabled)
3230
+ return !1;
3231
+ const t = (e = this.view) == null ? void 0 : e.widthBreakpoint;
3232
+ return t === "xsmall" || t === "small" || t === "medium";
3233
+ }
3234
+ get _featureNavigationVisible() {
3235
+ return this.viewModel.active && this.viewModel.featureCount > 1 && this.visibleElements.featureNavigation;
3236
+ }
3237
+ get _isCollapsed() {
3238
+ return this._collapseEnabled && this.collapsed;
3239
+ }
3240
+ get _collapseEnabled() {
3241
+ return this.visibleElements.collapseButton && !!this.title && !!this.content;
3242
+ }
3243
+ get content() {
3244
+ return this.viewModel.content;
3245
+ }
3246
+ set content(t) {
3247
+ this.viewModel.content = t;
3248
+ }
3249
+ get featureMenuOpen() {
3250
+ return this.viewModel.featureMenuOpen;
3251
+ }
3252
+ set featureMenuOpen(t) {
3253
+ this.viewModel.featureMenuOpen = t;
3254
+ }
3255
+ get features() {
3256
+ return this.viewModel.features;
3257
+ }
3258
+ set features(t) {
3259
+ this.viewModel.features = t;
3260
+ }
3261
+ get location() {
3262
+ return this.viewModel.location;
3263
+ }
3264
+ set location(t) {
3265
+ this.viewModel.location = t;
3266
+ }
3267
+ get label() {
3268
+ var t;
3269
+ return ((t = this.messages) == null ? void 0 : t.widgetLabel) ?? "";
3270
+ }
3271
+ set label(t) {
3272
+ this._overrideIfSome("label", t);
3273
+ }
3274
+ get promises() {
3275
+ return this.viewModel.promises;
3276
+ }
3277
+ set promises(t) {
3278
+ this.viewModel.promises = t;
3279
+ }
3280
+ get selectedFeature() {
3281
+ return this.viewModel.selectedFeature;
3282
+ }
3283
+ get selectedFeatureIndex() {
3284
+ return this.viewModel.selectedFeatureIndex;
3285
+ }
3286
+ set selectedFeatureIndex(t) {
3287
+ this.viewModel.selectedFeatureIndex = t;
3288
+ }
3289
+ get selectedFeatureWidget() {
3290
+ const { _feature: t, headingLevel: e, _relatedRecordsFlowItems: i } = this, { selectedFeatureViewModel: s } = this.viewModel, n = { title: !1 };
3291
+ return s ? (t ? (t.viewModel = s, t.visibleElements = n) : this._feature = new Hr({ flowItems: i, headingLevel: e + 1, viewModel: s, visibleElements: n }), this._feature) : null;
3292
+ }
3293
+ get title() {
3294
+ return this.viewModel.title;
3295
+ }
3296
+ set title(t) {
3297
+ this.viewModel.title = t;
3298
+ }
3299
+ get updateLocationEnabled() {
3300
+ return this.viewModel.updateLocationEnabled;
3301
+ }
3302
+ set updateLocationEnabled(t) {
3303
+ this.viewModel.updateLocationEnabled = t;
3304
+ }
3305
+ get view() {
3306
+ return this.viewModel.view;
3307
+ }
3308
+ set view(t) {
3309
+ this.viewModel.view = t;
3310
+ }
3311
+ get visible() {
3312
+ return this.viewModel.visible;
3313
+ }
3314
+ set visible(t) {
3315
+ this.viewModel.visible = t;
3316
+ }
3317
+ blur() {
3318
+ var e;
3319
+ const { active: t } = this.viewModel;
3320
+ t ? (e = this._rootFlowItemNode) == null || e.blur() : q.getLogger(this).warn("Features can only be blurred when currently active.");
3321
+ }
3322
+ clear() {
3323
+ return this.viewModel.clear();
3324
+ }
3325
+ close() {
3326
+ this.viewModel.visible = !1;
3327
+ }
3328
+ fetchFeatures(t, e) {
3329
+ return this.viewModel.fetchFeatures(t, e);
3330
+ }
3331
+ focus() {
3332
+ const { active: t } = this.viewModel;
3333
+ t ? this._setFocusOn() : q.getLogger(this).warn("Features can only be focused when currently active.");
3334
+ }
3335
+ next() {
3336
+ return this.viewModel.next();
3337
+ }
3338
+ open(t) {
3339
+ this.removeHandles(Pi);
3340
+ const e = { collapsed: (t == null ? void 0 : t.collapsed) ?? !1 };
3341
+ this.set(e), this.viewModel.open(t), this.addHandles(ot(() => !this.viewModel.waitingForResult, () => this._addSelectedFeatureIndexHandle(), { once: !0 }));
3342
+ }
3343
+ previous() {
3344
+ return this.viewModel.previous();
3345
+ }
3346
+ triggerAction(t) {
3347
+ return this.viewModel.triggerAction(t);
3348
+ }
3349
+ render() {
3350
+ return h("div", { bind: this, class: this.classes(W.base, F.widget, F.panel), onkeydown: this._onMainKeydown }, this._renderHeader(), this._renderContentContainer());
3351
+ }
3352
+ _renderFeatureNavigation() {
3353
+ return [this._renderPagination(), this._renderFeatureMenuButton()];
3354
+ }
3355
+ _renderHeader() {
3356
+ return !this.featureMenuOpen && this.featureNavigationTop && this._featureNavigationVisible ? h("div", { class: W.header, key: "header-actions" }, this._renderFeatureNavigation()) : null;
3357
+ }
3358
+ _renderFooter() {
3359
+ return this.featureMenuOpen || this.featureNavigationTop || !this._featureNavigationVisible ? null : h("div", { class: W.footer, key: "footer-actions", slot: "footer" }, this._renderFeatureNavigation());
3360
+ }
3361
+ _renderFeatureMenuButton() {
3362
+ const { messages: t, viewModel: e } = this, { featureCount: i, selectedFeatureIndex: s, pendingPromisesCount: n } = e;
3363
+ return h("calcite-action", { appearance: "solid", bind: this, icon: "list", key: "feature-menu-button", label: t.selectFeature, loading: n > 0, onclick: this._openFeatureMenu, scale: "s", text: de(t.pageText, { index: Se(s + 1), total: Se(i) }), textEnabled: !0, title: t.selectFeature });
3364
+ }
3365
+ _renderPagination() {
3366
+ const { previous: t, next: e } = this.messagesCommon.pagination;
3367
+ return h("calcite-action-bar", { class: W.paginationActionBar, expandDisabled: !0, key: "pagination-action-bar", layout: "horizontal", overflowActionsDisabled: !0, scale: "s" }, h("calcite-action-group", { scale: "s" }, h("calcite-action", { appearance: "solid", class: W.paginationPrevious, icon: "chevron-left", iconFlipRtl: !0, label: t, onclick: this._previousFeature, scale: "s", text: t, title: t }), h("calcite-action", { appearance: "solid", icon: "chevron-right", iconFlipRtl: !0, label: e, onclick: this._nextFeature, scale: "s", text: e, title: e })));
3368
+ }
3369
+ _renderFeatureMenuItem(t) {
3370
+ const { selectedFeatureViewModel: e, featureViewModels: i } = this.viewModel, s = t === e, n = i.indexOf(t);
3371
+ return h("calcite-list-item", { bind: this, "data-feature-index": n, key: `feature-menu-item-${t.uid}`, onblur: this._removeActiveFeature, onfocus: this._setActiveFeature, onmouseleave: this._removeActiveFeature, onmouseover: this._setActiveFeature, selected: s, onCalciteListItemSelect: this._selectFeature }, h("span", { innerHTML: t.title || this.messagesCommon.untitled, slot: "content" }));
3372
+ }
3373
+ _groupResultsByLayer() {
3374
+ const { featureViewModels: t } = this.viewModel, e = /* @__PURE__ */ new Map();
3375
+ return t.forEach((i) => {
3376
+ const s = i == null ? void 0 : i.graphic;
3377
+ if (!s)
3378
+ return;
3379
+ const n = s.sourceLayer ?? s.layer, r = e.get(n) ?? [];
3380
+ e.set(n, [...r, i]);
3381
+ }), e;
3382
+ }
3383
+ _renderFeatureMenu() {
3384
+ const { featureViewModels: t } = this.viewModel, e = this._groupResultsByLayer();
3385
+ return t.length ? h("calcite-list", { selectionAppearance: "icon", selectionMode: "single" }, Array.from(e.keys()).map((i) => {
3386
+ var s;
3387
+ return h("calcite-list-item-group", { heading: (i == null ? void 0 : i.title) ?? this.messagesCommon.untitled, key: (i == null ? void 0 : i.uid) || "untitled" }, (s = e.get(i)) == null ? void 0 : s.map((n) => this._renderFeatureMenuItem(n)));
3388
+ })) : null;
3389
+ }
3390
+ _renderHeaderAction(t, e) {
3391
+ return t.visible ? h("calcite-action", { active: t.type === "toggle" && t.value, appearance: "solid", bind: this, "data-action-uid": t.uid, disabled: t.disabled, icon: t.icon || "", indicator: t.indicator, key: `header-action-${e}`, loading: t.active, onclick: this._triggerHeaderAction, scale: "m", slot: "header-actions-end", text: t.title || "", title: t.title || "" }) : null;
3392
+ }
3393
+ _renderHeaderActions() {
3394
+ return this.headerActions.map((t, e) => this._renderHeaderAction(t, e)).toArray();
3395
+ }
3396
+ _renderContentFeature() {
3397
+ const { headingLevel: t, visibleElements: e, _isCollapsed: i, _collapseEnabled: s, featureNavigationTop: n } = this, { title: r, active: o } = this.viewModel, d = e.heading && r ? r : "";
3398
+ return h("calcite-flow-item", { afterCreate: this._storeRootFlowItemNode, afterUpdate: this._focusRootFlowItemNode, bind: this, class: this.classes({ [W.contentFeature]: !0, [W.flowItemCollapsed]: i }), closable: e.closeButton, closed: !o, collapsed: i, collapseDirection: n ? "down" : "up", collapsible: s, headingLevel: t, key: "root-flow-item", onCalciteFlowItemClose: this.close, onCalciteFlowItemToggle: this._handleCollapseToggle }, d ? h(Gt, { class: this.classes(W.featuresHeading, F.heading), innerHTML: d, key: "header-content", level: this.headingLevel, slot: "header-content" }) : null, this._renderHeaderActions(), this._renderActionBar(), i ? null : h("div", { class: this.classes(W.container, W.contentContainer) }, this._renderContent()), this._renderFooter());
3399
+ }
3400
+ _renderFeatureMenuContainer() {
3401
+ const { viewModel: t, featureMenuOpen: e, messages: i, messagesCommon: s } = this, { active: n, featureViewModels: r, pendingPromisesCount: o } = t;
3402
+ return e ? h("calcite-flow-item", { afterCreate: this._storeFeatureMenuFlowItemNode, afterUpdate: this._focusFeatureMenuFlowItemNode, bind: this, closable: !1, closed: !n, description: de(i.total, { total: r.length }), heading: i.selectFeature, key: "feature-menu", loading: t.waitingForContents, onCalciteFlowItemBack: (d) => {
3403
+ d.preventDefault(), this._handleFeatureMenuBack();
3404
+ } }, o > 0 ? h("calcite-loader", { class: W.loader, inline: !0, key: "feature-menu-loader", label: s.loading, scale: "m", slot: "header-actions-end" }) : null, h("div", { class: W.container }, this._renderFeatureMenu()), h("div", { afterCreate: this._featureMenuIntersectionObserverCreated, bind: this, class: W.featureMenuObserver }), h("calcite-button", { appearance: "transparent", onclick: this._handleFeatureMenuBack, slot: "footer-actions", width: "full" }, s.back)) : null;
3405
+ }
3406
+ _renderContentContainer() {
3407
+ const t = [this._renderContentFeature(), this._renderFeatureMenuContainer(), this._relatedRecordsWidget.render()];
3408
+ return this.visibleElements.flow ? h("calcite-flow", { key: "content-container" }, t) : t;
3409
+ }
3410
+ _getFallbackIcon(t) {
3411
+ const { className: e, icon: i } = t;
3412
+ if (i)
3413
+ return null;
3414
+ const s = un({ action: t, feature: this.selectedFeature }), n = { [W.icon]: !!e, [W.actionImage]: !!s };
3415
+ return e && (n[e] = !0), s || e ? h("span", { "aria-hidden": "true", class: this.classes(W.icon, n), key: "icon", styles: cn(s) }) : null;
3416
+ }
3417
+ _renderActionBar() {
3418
+ var t;
3419
+ return !this._isCollapsed && this.visibleElements.actionBar && ((t = this.viewModel.allActions) != null && t.length) ? h("calcite-action-bar", { expandDisabled: !0, expanded: !this._hideActionText, key: "header-action-bar", scale: "s", slot: "action-bar" }, h("calcite-action-group", { afterCreate: (e) => this._actionBarMenuNode = e, overlayPositioning: "fixed", scale: "s" }, this._renderActions())) : null;
3420
+ }
3421
+ _renderActions() {
3422
+ return this.viewModel.allActions.toArray().map(this._renderAction);
3423
+ }
3424
+ _renderContent() {
3425
+ var e;
3426
+ const t = (e = this.viewModel) == null ? void 0 : e.content;
3427
+ return t ? typeof t == "string" ? h("div", { class: N.contentNode, innerHTML: t, key: t }) : this.renderNodeContent(t) : null;
3428
+ }
3429
+ _setFocusOn() {
3430
+ this.renderNow(), requestAnimationFrame(() => {
3431
+ this._focusOn = this.featureMenuOpen ? "menu-flow-item" : "root-flow-item";
3432
+ });
3433
+ }
3434
+ _handleCollapseToggle() {
3435
+ this.collapsed = !this.collapsed;
3436
+ }
3437
+ async _openRelatedFeature(t) {
3438
+ await t.viewModel.updateGeometry();
3439
+ const e = t.graphic, i = e == null ? void 0 : e.geometry;
3440
+ if (i == null || e == null)
3441
+ return;
3442
+ this._destroyRelatedRecordsFlowItemWidgets(), await this.viewModel.zoomTo({ target: i });
3443
+ const s = Ot(i);
3444
+ this.open({ features: [e], location: s ?? void 0 });
3445
+ }
3446
+ _focusRootFlowItemNode() {
3447
+ this._focusFlowItemNodeThrottled("root-flow-item");
3448
+ }
3449
+ _focusFeatureMenuFlowItemNode() {
3450
+ this._focusFlowItemNodeThrottled("menu-flow-item");
3451
+ }
3452
+ _storeRootFlowItemNode(t) {
3453
+ this._rootFlowItemNode = t, this._focusFlowItemNodeThrottled("root-flow-item");
3454
+ }
3455
+ _storeFeatureMenuFlowItemNode(t) {
3456
+ this._featureMenuViewportNode = t, this._focusFlowItemNodeThrottled("menu-flow-item");
3457
+ }
3458
+ _setActiveFeature(t) {
3459
+ var s;
3460
+ const { viewModel: e } = this, i = t.currentTarget["data-feature-index"];
3461
+ e.activeFeature = ((s = e.features) == null ? void 0 : s[i]) || null;
3462
+ }
3463
+ _removeActiveFeature() {
3464
+ this.viewModel.activeFeature = null;
3465
+ }
3466
+ _selectFeature(t) {
3467
+ const e = t.currentTarget["data-feature-index"];
3468
+ isNaN(e) || (this.viewModel.selectedFeatureIndex = e), this._handleFeatureMenuBack();
3469
+ }
3470
+ _unobserveFeatureMenuObserver() {
3471
+ this._featureMenuIntersectionObserverNode && this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode);
3472
+ }
3473
+ _featureMenuIntersectionObserverCreated(t) {
3474
+ this._unobserveFeatureMenuObserver(), this._featureMenuIntersectionObserver.observe(t), this._featureMenuIntersectionObserverNode = t;
3475
+ }
3476
+ _getActionIcon(t) {
3477
+ return t.icon ? t.icon : t.image || t.className ? void 0 : "question";
3478
+ }
3479
+ _getActionTitle(t) {
3480
+ const { messages: e, selectedFeature: i, messagesCommon: s } = this, { id: n } = t, r = i == null ? void 0 : i.attributes, o = t.title ?? "", d = n === "zoom-to-feature" ? de(o, { messages: e }) : n === "remove-selected-feature" ? de(o, { messages: s }) : n === "zoom-to-clustered-features" || n === "browse-clustered-features" ? de(o, { messages: e }) : t.title;
3481
+ return d && r ? de(d, r) : d ?? "";
3482
+ }
3483
+ _onMainKeydown(t) {
3484
+ const { key: e } = t;
3485
+ e === "ArrowLeft" && (t.stopPropagation(), this._handleFeatureMenuBack(), this.previous()), e === "ArrowRight" && (t.stopPropagation(), this._handleFeatureMenuBack(), this.next());
3486
+ }
3487
+ _featureMenuViewportScrollTop() {
3488
+ this._featureMenuViewportNode && this._featureMenuViewportNode.scrollContentTo({ top: 0 });
3489
+ }
3490
+ _setContentFromFeatureWidget() {
3491
+ const { selectedFeatureWidget: t } = this;
3492
+ t && (this.viewModel.content = t);
3493
+ }
3494
+ _setTitleFromFeatureWidget() {
3495
+ const { selectedFeatureWidget: t, messagesCommon: e } = this, i = t == null ? void 0 : t.viewModel;
3496
+ t && (this.viewModel.title = (i == null ? void 0 : i.state) === "error" ? e == null ? void 0 : e.errorMessage : (i == null ? void 0 : i.title) || "");
3497
+ }
3498
+ _addSelectedFeatureIndexHandle() {
3499
+ const t = y(() => {
3500
+ var e;
3501
+ return (e = this.viewModel) == null ? void 0 : e.selectedFeatureIndex;
3502
+ }, (e, i) => this._selectedFeatureIndexUpdated(e, i));
3503
+ this.addHandles(t, Pi);
3504
+ }
3505
+ _selectedFeatureIndexUpdated(t, e) {
3506
+ const { featureCount: i } = this.viewModel;
3507
+ i && t !== e && t !== -1 && (this._destroyRelatedRecordsFlowItemWidgets(), this._rootFlowItemNode && this._rootFlowItemNode.scrollContentTo({ top: 0 }));
3508
+ }
3509
+ _triggerHeaderAction(t) {
3510
+ const e = t.currentTarget;
3511
+ if (e.disabled)
3512
+ return;
3513
+ const i = e.dataset.actionUid, s = this.headerActions.find(({ uid: n }) => n === i);
3514
+ s && !s.disabled && ((s == null ? void 0 : s.type) === "toggle" && (s.value = !s.value), this.emit("trigger-header-action", { action: s }));
3515
+ }
3516
+ _triggerAction(t) {
3517
+ const e = t.currentTarget;
3518
+ if (e.disabled)
3519
+ return;
3520
+ const i = e.dataset.actionUid, { allActions: s } = this.viewModel, n = s.findIndex((o) => o.uid === i), r = s.at(n);
3521
+ r && r.type === "toggle" && (r.value = !r.value), this.viewModel.triggerAction(n);
3522
+ }
3523
+ _createSpinner(t) {
3524
+ t && (this._spinner = new Ur({ view: t }), t.ui.add(this._spinner, { key: Oi, position: "manual", internal: !0 }));
3525
+ }
3526
+ _wireUpView(t) {
3527
+ var e;
3528
+ this._destroySpinner(), t && ((e = this.visibleElements) != null && e.spinner) && this._createSpinner(t);
3529
+ }
3530
+ _hideSpinner() {
3531
+ const { _spinner: t } = this;
3532
+ t && (t.location = null, t.hide());
3533
+ }
3534
+ _viewReadyChange(t, e) {
3535
+ var i;
3536
+ t ? this._wireUpView((i = this.viewModel) == null ? void 0 : i.view) : e && this.viewModel.clear();
3537
+ }
3538
+ _viewChange(t, e) {
3539
+ t && e && this.viewModel.clear();
3540
+ }
3541
+ _destroySelectedFeatureWidget() {
3542
+ const { _feature: t } = this;
3543
+ t && (t.viewModel = null, !t.destroyed && t.destroy()), this._feature = null;
3544
+ }
3545
+ _closeOpenActionMenu() {
3546
+ const { _actionBarMenuNode: t } = this;
3547
+ t && (t.menuOpen = !1);
3548
+ }
3549
+ _destroyRelatedRecordsFlowItemWidgets() {
3550
+ this._relatedRecordsFlowItems.removeAll().forEach((t) => {
3551
+ "showAllEnabled" in t.viewModel && (t.viewModel.showAllEnabled = !1), t.viewModel = null, t.destroy();
3552
+ });
3553
+ }
3554
+ _toggleScreenLocationEnabled() {
3555
+ const { viewModel: t } = this;
3556
+ t && (t.screenLocationEnabled = t.active);
3557
+ }
3558
+ _displaySpinner() {
3559
+ const { _spinner: t } = this;
3560
+ if (!t)
3561
+ return;
3562
+ const { location: e, waitingForResult: i } = this.viewModel;
3563
+ i && e ? t.show({ location: e }) : t.hide();
3564
+ }
3565
+ _destroySpinner() {
3566
+ var i;
3567
+ const { _spinner: t, view: e } = this;
3568
+ t && ((i = e == null ? void 0 : e.ui) == null || i.remove(t, Oi), t.destroy(), this._spinner = null);
3569
+ }
3570
+ _spinnerEnabledChange(t) {
3571
+ var e;
3572
+ this._destroySpinner(), t && this._createSpinner((e = this.viewModel) == null ? void 0 : e.view);
3573
+ }
3574
+ };
3575
+ a([l()], x.prototype, "_focusOn", void 0), a([l()], x.prototype, "_relatedRecordsFlowItems", void 0), a([l()], x.prototype, "_hideActionText", null), a([l()], x.prototype, "_featureNavigationVisible", null), a([l()], x.prototype, "_isCollapsed", null), a([l()], x.prototype, "_collapseEnabled", null), a([l()], x.prototype, "collapsed", void 0), a([l()], x.prototype, "content", null), a([l()], x.prototype, "icon", void 0), a([l()], x.prototype, "featureMenuOpen", null), a([l()], x.prototype, "featureNavigationTop", void 0), a([l()], x.prototype, "features", null), a([l({ type: $e })], x.prototype, "headerActions", void 0), a([l()], x.prototype, "headingLevel", void 0), a([l()], x.prototype, "location", null), a([l()], x.prototype, "label", null), a([l(), ee("esri/widgets/Features/t9n/Features")], x.prototype, "messages", void 0), a([l(), ee("esri/t9n/common")], x.prototype, "messagesCommon", void 0), a([l()], x.prototype, "promises", null), a([l()], x.prototype, "responsiveActionsEnabled", void 0), a([l({ readOnly: !0 })], x.prototype, "selectedFeature", null), a([l()], x.prototype, "selectedFeatureIndex", null), a([l({ readOnly: !0 })], x.prototype, "selectedFeatureWidget", null), a([l()], x.prototype, "title", null), a([l()], x.prototype, "updateLocationEnabled", null), a([l()], x.prototype, "view", null), a([l({ type: ei }), ss(["triggerAction", "trigger-action"])], x.prototype, "viewModel", void 0), a([l({ type: ms, nonNullable: !0 })], x.prototype, "visibleElements", void 0), a([l()], x.prototype, "visible", null), x = a([O("esri.widgets.Features")], x);
3576
+ const co = x, se = "esri-popup", _e = `${se}--is-docked`, V = { base: se, main: `${se}__main-container`, shadow: `${se}--shadow`, isDocked: _e, isDockedTopLeft: `${_e}-top-left`, isDockedTopCenter: `${_e}-top-center`, isDockedTopRight: `${_e}-top-right`, isDockedBottomLeft: `${_e}-bottom-left`, isDockedBottomCenter: `${_e}-bottom-center`, isDockedBottomRight: `${_e}-bottom-right`, alignTopCenter: `${se}--aligned-top-center`, alignBottomCenter: `${se}--aligned-bottom-center`, alignTopLeft: `${se}--aligned-top-left`, alignBottomLeft: `${se}--aligned-bottom-left`, alignTopRight: `${se}--aligned-top-right`, alignBottomRight: `${se}--aligned-bottom-right`, pointer: `${se}__pointer`, pointerDirection: `${se}__pointer-direction` };
3577
+ let Bt = class extends ei {
3578
+ constructor(t) {
3579
+ super(t);
3580
+ }
3581
+ };
3582
+ Bt = a([O("esri.widgets.Popup.PopupViewModel")], Bt);
3583
+ const fs = Bt;
3584
+ let he = class extends me {
3585
+ constructor() {
3586
+ super(...arguments), this.actionBar = !0, this.closeButton = !0, this.collapseButton = !0, this.featureNavigation = !0, this.heading = !0, this.spinner = !0;
3587
+ }
3588
+ };
3589
+ a([l({ type: Boolean, nonNullable: !0 })], he.prototype, "actionBar", void 0), a([l({ type: Boolean, nonNullable: !0 })], he.prototype, "closeButton", void 0), a([l({ type: Boolean, nonNullable: !0 })], he.prototype, "collapseButton", void 0), a([l({ type: Boolean, nonNullable: !0 })], he.prototype, "featureNavigation", void 0), a([l({ type: Boolean, nonNullable: !0 })], he.prototype, "heading", void 0), a([l({ type: Boolean, nonNullable: !0 })], he.prototype, "spinner", void 0), he = a([O("esri.widgets.Features.PopupVisibleElements")], he);
3590
+ const Dt = he, Ni = { buttonEnabled: !0, position: "auto", breakpoint: { width: 544 } };
3591
+ let $ = class extends te {
3592
+ constructor(t, e) {
3593
+ super(t, e), this._dockAction = new Ge({ id: "popup-dock-action" }), this._featuresWidget = new co({ responsiveActionsEnabled: !0 }), this._containerNode = null, this._mainContainerNode = null, this._pointerOffsetInPx = 16, this.alignment = "auto", this.collapsed = !1, this.dockEnabled = !1, this.headingLevel = 2, this.messages = null, this.viewModel = new fs(), this.visibleElements = new Dt();
3594
+ }
3595
+ initialize() {
3596
+ this.addHandles([y(() => {
3597
+ var t, e;
3598
+ return [(e = (t = this.viewModel) == null ? void 0 : t.view) == null ? void 0 : e.widthBreakpoint, this.dockEnabled];
3599
+ }, () => this._handleDockIcon(), R), y(() => {
3600
+ var t, e;
3601
+ return [this.dockEnabled, (t = this.messages) == null ? void 0 : t.undock, (e = this.messages) == null ? void 0 : e.dock];
3602
+ }, () => this._handleDockEnabled(), R), y(() => this.dockOptions, (t) => {
3603
+ const { _dockAction: e } = this, i = this._featuresWidget.headerActions;
3604
+ i.remove(e), t.buttonEnabled && i.add(e);
3605
+ }, R), y(() => {
3606
+ var t;
3607
+ return (t = this.viewModel) == null ? void 0 : t.screenLocation;
3608
+ }, () => this._positionContainer()), y(() => {
3609
+ var t;
3610
+ return [(t = this.viewModel) == null ? void 0 : t.active, this.dockEnabled];
3611
+ }, () => this._toggleScreenLocationEnabled()), y(() => {
3612
+ var t, e, i, s, n, r, o;
3613
+ return [(t = this.viewModel) == null ? void 0 : t.screenLocation, (i = (e = this.viewModel) == null ? void 0 : e.view) == null ? void 0 : i.padding, (n = (s = this.viewModel) == null ? void 0 : s.view) == null ? void 0 : n.size, (r = this.viewModel) == null ? void 0 : r.active, (o = this.viewModel) == null ? void 0 : o.location, this.alignment];
3614
+ }, () => this.reposition()), y(() => {
3615
+ var t, e;
3616
+ return (e = (t = this.viewModel) == null ? void 0 : t.view) == null ? void 0 : e.size;
3617
+ }, (t, e) => this._updateDockEnabledForViewSize(t, e)), y(() => {
3618
+ var t;
3619
+ return (t = this.viewModel) == null ? void 0 : t.view;
3620
+ }, (t, e) => this._viewChange(t, e)), y(() => {
3621
+ var t, e;
3622
+ return (e = (t = this.viewModel) == null ? void 0 : t.view) == null ? void 0 : e.ready;
3623
+ }, (t, e) => this._viewReadyChange(t ?? !1, e ?? !1)), y(() => this.viewModel, () => this._featuresWidget.viewModel = this.viewModel, R), y(() => this._featureNavigationTop, (t) => this._featuresWidget.featureNavigationTop = t, R), y(() => this.headingLevel, (t) => this._featuresWidget.headingLevel = t, R), y(() => this.collapsed, (t) => this._featuresWidget.collapsed = t, R), y(() => this.visibleElements.actionBar, (t) => this._featuresWidget.visibleElements.actionBar = !!t, R), y(() => this.visibleElements.closeButton, (t) => this._featuresWidget.visibleElements.closeButton = !!t, R), y(() => this.visibleElements.collapseButton, (t) => this._featuresWidget.visibleElements.collapseButton = !!t, R), y(() => this.visibleElements.heading, (t) => this._featuresWidget.visibleElements.heading = !!t, R), y(() => this.visibleElements.spinner, (t) => this._featuresWidget.visibleElements.spinner = !!t, R), y(() => this.visibleElements.featureNavigation, (t) => this._featuresWidget.visibleElements.featureNavigation = !!t, R), Ee(() => this._featuresWidget, "trigger-header-action", (t) => {
3624
+ t.action === this._dockAction && (this.dockEnabled = !this.dockEnabled);
3625
+ })]);
3626
+ }
3627
+ normalizeCtorArgs(t) {
3628
+ const e = { ...t };
3629
+ return (t == null ? void 0 : t.visibleElements) != null && (e.visibleElements = new Dt(t.visibleElements), t.collapseEnabled != null && (e.visibleElements.collapseButton = t.collapseEnabled), t.spinnerEnabled != null && (e.visibleElements.spinner = t.spinnerEnabled)), e;
3630
+ }
3631
+ destroy() {
3632
+ var t;
3633
+ this._dockAction.destroy(), (t = this._featuresWidget) == null || t.destroy();
3634
+ }
3635
+ get _featureNavigationTop() {
3636
+ const { currentAlignment: t, currentDockPosition: e } = this;
3637
+ return t === "bottom-left" || t === "bottom-center" || t === "bottom-right" || e === "top-left" || e === "top-center" || e === "top-right";
3638
+ }
3639
+ get actions() {
3640
+ return this.viewModel.actions;
3641
+ }
3642
+ set actions(t) {
3643
+ this.viewModel.actions = t;
3644
+ }
3645
+ get autoCloseEnabled() {
3646
+ return this.viewModel.autoCloseEnabled;
3647
+ }
3648
+ set autoCloseEnabled(t) {
3649
+ this.viewModel.autoCloseEnabled = t;
3650
+ }
3651
+ get autoOpenEnabled() {
3652
+ return Le(q.getLogger(this), "autoOpenEnabled", { replacement: "MapView/SceneView.popupEnabled", version: "4.27" }), this.viewModel.autoOpenEnabled;
3653
+ }
3654
+ set autoOpenEnabled(t) {
3655
+ Le(q.getLogger(this), "autoOpenEnabled", { replacement: "MapView/SceneView.popupEnabled", version: "4.27" }), this.viewModel.autoOpenEnabled = t;
3656
+ }
3657
+ get defaultPopupTemplateEnabled() {
3658
+ return this.viewModel.defaultPopupTemplateEnabled;
3659
+ }
3660
+ set defaultPopupTemplateEnabled(t) {
3661
+ this.viewModel.defaultPopupTemplateEnabled = t;
3662
+ }
3663
+ get content() {
3664
+ return this.viewModel.content;
3665
+ }
3666
+ set content(t) {
3667
+ this.viewModel.content = t;
3668
+ }
3669
+ get collapseEnabled() {
3670
+ return Le(q.getLogger(this), "collapseEnabled", { replacement: "PopupVisibleElements.collapseButton", version: "4.29" }), this.visibleElements.collapseButton;
3671
+ }
3672
+ set collapseEnabled(t) {
3673
+ Le(q.getLogger(this), "collapseEnabled", { replacement: "PopupVisibleElements.collapseButton", version: "4.29" }), this.visibleElements.collapseButton = t;
3674
+ }
3675
+ get currentAlignment() {
3676
+ return this._getCurrentAlignment();
3677
+ }
3678
+ get currentDockPosition() {
3679
+ return this._getCurrentDockPosition();
3680
+ }
3681
+ get dockOptions() {
3682
+ return this._get("dockOptions") || Ni;
3683
+ }
3684
+ set dockOptions(t) {
3685
+ var d, c;
3686
+ const e = { ...Ni }, i = (c = (d = this.viewModel) == null ? void 0 : d.view) == null ? void 0 : c.breakpoints, s = {};
3687
+ i && (s.width = i.xsmall, s.height = i.xsmall);
3688
+ const n = { ...e, ...t }, r = { ...e.breakpoint, ...s }, { breakpoint: o } = n;
3689
+ typeof o == "object" ? n.breakpoint = { ...r, ...o } : o && (n.breakpoint = r), this._set("dockOptions", n), this._setCurrentDockPosition(), this.reposition();
3690
+ }
3691
+ get featureCount() {
3692
+ return this.viewModel.featureCount;
3693
+ }
3694
+ get featureMenuOpen() {
3695
+ return this.viewModel.featureMenuOpen;
3696
+ }
3697
+ set featureMenuOpen(t) {
3698
+ this.viewModel.featureMenuOpen = t;
3699
+ }
3700
+ get features() {
3701
+ return this.viewModel.features;
3702
+ }
3703
+ set features(t) {
3704
+ this.viewModel.features = t;
3705
+ }
3706
+ get goToOverride() {
3707
+ return this.viewModel.goToOverride;
3708
+ }
3709
+ set goToOverride(t) {
3710
+ this.viewModel.goToOverride = t;
3711
+ }
3712
+ get highlightEnabled() {
3713
+ return this.viewModel.highlightEnabled;
3714
+ }
3715
+ set highlightEnabled(t) {
3716
+ this.viewModel.highlightEnabled = t;
3717
+ }
3718
+ get location() {
3719
+ return this.viewModel.location;
3720
+ }
3721
+ set location(t) {
3722
+ this.viewModel.location = t;
3723
+ }
3724
+ get label() {
3725
+ var t;
3726
+ return ((t = this.messages) == null ? void 0 : t.widgetLabel) ?? "";
3727
+ }
3728
+ set label(t) {
3729
+ this._overrideIfSome("label", t);
3730
+ }
3731
+ get promises() {
3732
+ return this.viewModel.promises;
3733
+ }
3734
+ set promises(t) {
3735
+ this.viewModel.promises = t;
3736
+ }
3737
+ get selectedFeature() {
3738
+ return this.viewModel.selectedFeature;
3739
+ }
3740
+ get selectedFeatureIndex() {
3741
+ return this.viewModel.selectedFeatureIndex;
3742
+ }
3743
+ set selectedFeatureIndex(t) {
3744
+ this.viewModel.selectedFeatureIndex = t;
3745
+ }
3746
+ get selectedFeatureWidget() {
3747
+ return this._featuresWidget.selectedFeatureWidget;
3748
+ }
3749
+ get spinnerEnabled() {
3750
+ return Le(q.getLogger(this), "spinnerEnabled", { replacement: "PopupVisibleElements.spinner", version: "4.29" }), this.visibleElements.spinner;
3751
+ }
3752
+ set spinnerEnabled(t) {
3753
+ Le(q.getLogger(this), "spinnerEnabled", { replacement: "PopupVisibleElements.spinner", version: "4.29" }), this.visibleElements.spinner = t;
3754
+ }
3755
+ get title() {
3756
+ return this.viewModel.title;
3757
+ }
3758
+ set title(t) {
3759
+ this.viewModel.title = t;
3760
+ }
3761
+ get updateLocationEnabled() {
3762
+ return this.viewModel.updateLocationEnabled;
3763
+ }
3764
+ set updateLocationEnabled(t) {
3765
+ this.viewModel.updateLocationEnabled = t;
3766
+ }
3767
+ get view() {
3768
+ return this.viewModel.view;
3769
+ }
3770
+ set view(t) {
3771
+ this.viewModel.view = t;
3772
+ }
3773
+ get visible() {
3774
+ return this.viewModel.visible;
3775
+ }
3776
+ set visible(t) {
3777
+ this.viewModel.visible = t;
3778
+ }
3779
+ blur() {
3780
+ const { active: t } = this.viewModel;
3781
+ t || q.getLogger(this).warn("Popup can only be blurred when currently active."), this._featuresWidget.blur();
3782
+ }
3783
+ clear() {
3784
+ return this.viewModel.clear();
3785
+ }
3786
+ close() {
3787
+ this.visible = !1;
3788
+ }
3789
+ fetchFeatures(t, e) {
3790
+ return this.viewModel.fetchFeatures(t, e);
3791
+ }
3792
+ focus() {
3793
+ const { active: t } = this.viewModel;
3794
+ t || q.getLogger(this).warn("Popup can only be focused when currently active."), this.reposition(), requestAnimationFrame(() => {
3795
+ this._featuresWidget.focus();
3796
+ });
3797
+ }
3798
+ next() {
3799
+ return this.viewModel.next();
3800
+ }
3801
+ open(t) {
3802
+ const e = !!t && !!t.featureMenuOpen, i = { collapsed: !!t && !!t.collapsed, featureMenuOpen: e };
3803
+ this.set(i), this.viewModel.open(t), this._shouldFocus(t);
3804
+ }
3805
+ previous() {
3806
+ return this.viewModel.previous();
3807
+ }
3808
+ reposition() {
3809
+ this.renderNow(), this._positionContainer(), this._setCurrentAlignment();
3810
+ }
3811
+ triggerAction(t) {
3812
+ return this.viewModel.triggerAction(t);
3813
+ }
3814
+ render() {
3815
+ var u, p, m, f;
3816
+ const { dockEnabled: t, currentAlignment: e, currentDockPosition: i } = this, { active: s } = this.viewModel, n = s && t, r = s && !t, o = (p = (u = this.selectedFeature) == null ? void 0 : u.layer) == null ? void 0 : p.title, d = (f = (m = this.selectedFeature) == null ? void 0 : m.layer) == null ? void 0 : f.id, c = { [V.alignTopCenter]: e === "top-center", [V.alignBottomCenter]: e === "bottom-center", [V.alignTopLeft]: e === "top-left", [V.alignBottomLeft]: e === "bottom-left", [V.alignTopRight]: e === "top-right", [V.alignBottomRight]: e === "bottom-right", [V.isDocked]: n, [V.shadow]: r, [V.isDockedTopLeft]: i === "top-left", [V.isDockedTopCenter]: i === "top-center", [V.isDockedTopRight]: i === "top-right", [V.isDockedBottomLeft]: i === "bottom-left", [V.isDockedBottomCenter]: i === "bottom-center", [V.isDockedBottomRight]: i === "bottom-right" };
3817
+ return h("div", { afterCreate: this._positionContainer, afterUpdate: this._positionContainer, bind: this, class: this.classes(V.base, c), "data-layer-id": d, "data-layer-title": o, role: "presentation" }, s ? [this._renderMainContainer(), this._renderPointer()] : null);
3818
+ }
3819
+ _renderPointer() {
3820
+ return this.dockEnabled ? null : h("div", { class: V.pointer, key: "popup-pointer", role: "presentation" }, h("div", { class: this.classes(V.pointerDirection, V.shadow) }));
3821
+ }
3822
+ _renderMainContainer() {
3823
+ const { dockEnabled: t } = this, e = { [V.shadow]: t };
3824
+ return h("div", { afterCreate: this._setMainContainerNode, afterUpdate: this._setMainContainerNode, bind: this, class: this.classes(V.main, F.widget, e) }, this._featuresWidget.render());
3825
+ }
3826
+ async _shouldFocus(t) {
3827
+ t != null && t.shouldFocus && (await en(() => {
3828
+ var e;
3829
+ return ((e = this.viewModel) == null ? void 0 : e.active) === !0;
3830
+ }), this.focus());
3831
+ }
3832
+ _isOutsideView(t) {
3833
+ const { popupHeight: e, popupWidth: i, screenLocation: s, side: n, view: r } = t;
3834
+ if (isNaN(i) || isNaN(e) || !r || !s)
3835
+ return !1;
3836
+ const o = r.padding;
3837
+ return n === "right" && s.x + i / 2 > r.width - o.right || n === "left" && s.x - i / 2 < o.left || n === "top" && s.y - e < o.top || n === "bottom" && s.y + e > r.height - o.bottom;
3838
+ }
3839
+ _calculateAutoAlignment(t) {
3840
+ if (t !== "auto")
3841
+ return t;
3842
+ const { _pointerOffsetInPx: e, _containerNode: i, _mainContainerNode: s, viewModel: n } = this, { screenLocation: r, view: o } = n;
3843
+ if (r == null || !o || !i)
3844
+ return "top-center";
3845
+ function d(k) {
3846
+ return parseInt(k.replaceAll(/[^-\d\.]/g, ""), 10);
3847
+ }
3848
+ const c = s ? window.getComputedStyle(s, null) : null, u = c ? d(c.getPropertyValue("max-height")) : 0, p = c ? d(c.getPropertyValue("height")) : 0, { height: m, width: f } = i.getBoundingClientRect(), g = f + e, v = Math.max(m, u, p) + e, _ = this._isOutsideView({ popupHeight: v, popupWidth: g, screenLocation: r, side: "right", view: o }), I = this._isOutsideView({ popupHeight: v, popupWidth: g, screenLocation: r, side: "left", view: o }), w = this._isOutsideView({ popupHeight: v, popupWidth: g, screenLocation: r, side: "top", view: o }), A = this._isOutsideView({ popupHeight: v, popupWidth: g, screenLocation: r, side: "bottom", view: o });
3849
+ return I ? w ? "bottom-right" : "top-right" : _ ? w ? "bottom-left" : "top-left" : w ? A ? "top-center" : "bottom-center" : "top-center";
3850
+ }
3851
+ _callCurrentAlignment(t) {
3852
+ return typeof t == "function" ? t.call(this) : t;
3853
+ }
3854
+ _getCurrentAlignment() {
3855
+ const { alignment: t, dockEnabled: e } = this;
3856
+ return e || !this.viewModel.active ? null : this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(t)));
3857
+ }
3858
+ _setCurrentAlignment() {
3859
+ this._set("currentAlignment", this._getCurrentAlignment());
3860
+ }
3861
+ _setCurrentDockPosition() {
3862
+ this._set("currentDockPosition", this._getCurrentDockPosition());
3863
+ }
3864
+ _calculatePositionResult(t) {
3865
+ const e = ["left", "right"];
3866
+ return xe(this.container) && e.reverse(), t == null ? void 0 : t.replace(/leading/gi, e[0]).replaceAll(/trailing/gi, e[1]);
3867
+ }
3868
+ _callDockPosition(t) {
3869
+ return typeof t == "function" ? t.call(this) : t;
3870
+ }
3871
+ _getDockPosition() {
3872
+ var t;
3873
+ return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition((t = this.dockOptions) == null ? void 0 : t.position)));
3874
+ }
3875
+ _getCurrentDockPosition() {
3876
+ return this.dockEnabled && this.viewModel.active ? this._getDockPosition() : null;
3877
+ }
3878
+ _calculateAutoDockPosition(t) {
3879
+ var o;
3880
+ if (t !== "auto")
3881
+ return t;
3882
+ const e = (o = this.viewModel) == null ? void 0 : o.view, i = xe(this.container) ? "top-left" : "top-right";
3883
+ if (!e)
3884
+ return i;
3885
+ const s = e.padding || { left: 0, right: 0, top: 0, bottom: 0 }, n = e.width - s.left - s.right, { breakpoints: r } = e;
3886
+ return r && n <= r.xsmall ? "bottom-center" : i;
3887
+ }
3888
+ _getDockIcon() {
3889
+ const t = this._getDockPosition();
3890
+ if (this.dockEnabled)
3891
+ return "minimize";
3892
+ switch (t) {
3893
+ case "top-left":
3894
+ case "bottom-left":
3895
+ return "dock-left";
3896
+ case "top-center":
3897
+ return "maximize";
3898
+ case "bottom-center":
3899
+ return "dock-bottom";
3900
+ default:
3901
+ return "dock-right";
3902
+ }
3903
+ }
3904
+ _handleDockIcon() {
3905
+ this._dockAction.icon = this._getDockIcon();
3906
+ }
3907
+ _handleDockEnabled() {
3908
+ var t, e;
3909
+ this._dockAction.title = this.dockEnabled ? (t = this.messages) == null ? void 0 : t.undock : (e = this.messages) == null ? void 0 : e.dock;
3910
+ }
3911
+ _setMainContainerNode(t) {
3912
+ this._mainContainerNode = t;
3913
+ }
3914
+ _positionContainer(t = this._containerNode) {
3915
+ if (t && (this._containerNode = t), !this._containerNode)
3916
+ return;
3917
+ const { screenLocation: e } = this.viewModel, { width: i } = this._containerNode.getBoundingClientRect(), s = this._calculatePositionStyle(e, i);
3918
+ s && Object.assign(this._containerNode.style, s);
3919
+ }
3920
+ _calculateFullWidth(t) {
3921
+ const { currentAlignment: e, _pointerOffsetInPx: i } = this;
3922
+ return e === "top-left" || e === "bottom-left" || e === "top-right" || e === "bottom-right" ? t + i : t;
3923
+ }
3924
+ _calculateAlignmentPosition(t, e, i, s) {
3925
+ const { currentAlignment: n, _pointerOffsetInPx: r } = this;
3926
+ if (!i)
3927
+ return;
3928
+ const { padding: o } = i, d = s / 2, c = i.height - e, u = i.width - t;
3929
+ return n === "bottom-center" ? { top: e + r - o.top, left: t - d - o.left } : n === "top-left" ? { bottom: c + r - o.bottom, right: u + r - o.right } : n === "bottom-left" ? { top: e + r - o.top, right: u + r - o.right } : n === "top-right" ? { bottom: c + r - o.bottom, left: t + r - o.left } : n === "bottom-right" ? { top: e + r - o.top, left: t + r - o.left } : n === "top-center" ? { bottom: c + r - o.bottom, left: t - d - o.left } : void 0;
3930
+ }
3931
+ _calculatePositionStyle(t, e) {
3932
+ const { dockEnabled: i, view: s } = this;
3933
+ if (!s)
3934
+ return;
3935
+ if (i)
3936
+ return { left: "", top: "", right: "", bottom: "" };
3937
+ if (t == null || !e)
3938
+ return;
3939
+ const n = this._calculateFullWidth(e), r = this._calculateAlignmentPosition(t.x, t.y, s, n);
3940
+ return r ? { top: r.top !== void 0 ? `${r.top}px` : "auto", left: r.left !== void 0 ? `${r.left}px` : "auto", bottom: r.bottom !== void 0 ? `${r.bottom}px` : "auto", right: r.right !== void 0 ? `${r.right}px` : "auto" } : void 0;
3941
+ }
3942
+ _viewChange(t, e) {
3943
+ t && e && (this.close(), this.clear());
3944
+ }
3945
+ _viewReadyChange(t, e) {
3946
+ t ? this._wireUpView() : e && (this.close(), this.clear());
3947
+ }
3948
+ _wireUpView() {
3949
+ this._setDockEnabledForViewSize(this.dockOptions);
3950
+ }
3951
+ _dockingThresholdCrossed(t, e, i) {
3952
+ const [s, n] = t, [r, o] = e, { width: d = 0, height: c = 0 } = i ?? {};
3953
+ return s <= d && r > d || s > d && r <= d || n <= c && o > c || n > c && o <= c;
3954
+ }
3955
+ _updateDockEnabledForViewSize(t, e) {
3956
+ var u, p;
3957
+ if (!t || !e)
3958
+ return;
3959
+ const i = ((p = (u = this.viewModel) == null ? void 0 : u.view) == null ? void 0 : p.padding) || { left: 0, right: 0, top: 0, bottom: 0 }, s = i.left + i.right, n = i.top + i.bottom, r = [], o = [];
3960
+ r[0] = t[0] - s, r[1] = t[1] - n, o[0] = e[0] - s, o[1] = e[1] - n;
3961
+ const { dockOptions: d } = this, c = d.breakpoint;
3962
+ this._dockingThresholdCrossed(r, o, c) && this._setDockEnabledForViewSize(d), this._setCurrentDockPosition();
3963
+ }
3964
+ _toggleScreenLocationEnabled() {
3965
+ const { dockEnabled: t, viewModel: e } = this;
3966
+ if (!e)
3967
+ return;
3968
+ const i = e.active && !t;
3969
+ e.screenLocationEnabled = i;
3970
+ }
3971
+ _shouldDockAtCurrentViewSize(t) {
3972
+ var d, c;
3973
+ const e = t.breakpoint, i = (c = (d = this.viewModel) == null ? void 0 : d.view) == null ? void 0 : c.ui;
3974
+ if (!i)
3975
+ return !1;
3976
+ const { width: s, height: n } = i;
3977
+ if (isNaN(s) || isNaN(n) || !e)
3978
+ return !1;
3979
+ const r = e.hasOwnProperty("width") && s <= (e.width ?? 0), o = e.hasOwnProperty("height") && n <= (e.height ?? 0);
3980
+ return r || o;
3981
+ }
3982
+ _setDockEnabledForViewSize(t) {
3983
+ t.breakpoint && (this.dockEnabled = this._shouldDockAtCurrentViewSize(t));
3984
+ }
3985
+ };
3986
+ a([l({ readOnly: !0 })], $.prototype, "_featureNavigationTop", null), a([l()], $.prototype, "actions", null), a([l()], $.prototype, "alignment", void 0), a([l()], $.prototype, "autoCloseEnabled", null), a([l()], $.prototype, "autoOpenEnabled", null), a([l()], $.prototype, "defaultPopupTemplateEnabled", null), a([l()], $.prototype, "content", null), a([l()], $.prototype, "collapsed", void 0), a([l()], $.prototype, "collapseEnabled", null), a([l({ readOnly: !0 })], $.prototype, "currentAlignment", null), a([l({ readOnly: !0 })], $.prototype, "currentDockPosition", null), a([l()], $.prototype, "dockOptions", null), a([l()], $.prototype, "dockEnabled", void 0), a([l({ readOnly: !0 })], $.prototype, "featureCount", null), a([l()], $.prototype, "featureMenuOpen", null), a([l()], $.prototype, "features", null), a([l()], $.prototype, "goToOverride", null), a([l()], $.prototype, "headingLevel", void 0), a([l()], $.prototype, "highlightEnabled", null), a([l()], $.prototype, "location", null), a([l()], $.prototype, "label", null), a([l(), ee("esri/widgets/Popup/t9n/Popup")], $.prototype, "messages", void 0), a([l()], $.prototype, "promises", null), a([l({ readOnly: !0 })], $.prototype, "selectedFeature", null), a([l()], $.prototype, "selectedFeatureIndex", null), a([l({ readOnly: !0 })], $.prototype, "selectedFeatureWidget", null), a([l()], $.prototype, "spinnerEnabled", null), a([l()], $.prototype, "title", null), a([l()], $.prototype, "updateLocationEnabled", null), a([l()], $.prototype, "view", null), a([l({ type: fs }), ss(["triggerAction", "trigger-action"])], $.prototype, "viewModel", void 0), a([l()], $.prototype, "visible", null), a([l({ type: Dt, nonNullable: !0 })], $.prototype, "visibleElements", void 0), $ = a([O("esri.widgets.Popup")], $);
3987
+ const hl = $;
3988
+ export {
3989
+ hl as default
3990
+ };