@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923

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 (415) hide show
  1. package/Graphic.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/TimeExtent.js +1 -1
  4. package/arcade/ArcadeDate.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/featureSetUtils.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/support/FeatureSet.js +1 -1
  10. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  11. package/arcade/featureset/support/StatsField.js +1 -1
  12. package/arcade/featureset/support/sqlUtils.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/featuresetbase.js +1 -1
  16. package/arcade/functions/featuresetstats.js +1 -1
  17. package/arcade/treeAnalysis.js +1 -1
  18. package/arcade.js +1 -1
  19. package/assets/esri/core/workers/RemoteClient.js +1 -1
  20. package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
  21. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  22. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  23. package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
  24. package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
  25. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
  30. package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
  31. package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
  33. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  34. package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  36. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  42. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  43. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  44. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
  46. package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
  47. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  48. package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  51. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  52. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  53. package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
  54. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
  56. package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
  57. package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
  58. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  62. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  63. package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  65. package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
  66. package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
  68. package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
  69. package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
  70. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  71. package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
  72. package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
  74. package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
  75. package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
  76. package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
  77. package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
  78. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  79. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  80. package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
  81. package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
  82. package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
  84. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  86. package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
  88. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  89. package/assets/esri/themes/dark/main.css +1 -1
  90. package/assets/esri/themes/light/main.css +1 -1
  91. package/assets/esri/themes/light/view.css +1 -1
  92. package/chunks/arcade.js +1 -1
  93. package/config.js +1 -1
  94. package/core/Accessor.js +1 -1
  95. package/core/accessorSupport/diffUtils.js +1 -1
  96. package/core/has.js +1 -1
  97. package/core/number.js +1 -1
  98. package/core/reactiveUtils.js +1 -1
  99. package/core/sql/DateOnly.js +1 -1
  100. package/core/sql/WhereClause.js +1 -1
  101. package/core/sql.js +1 -1
  102. package/core/timeUtils.js +1 -1
  103. package/identity/IdentityForm.js +1 -1
  104. package/identity/IdentityModal.js +1 -1
  105. package/interfaces.d.ts +48 -203
  106. package/layers/LinkChartLayer.js +1 -1
  107. package/layers/OrientedImageryLayer.js +1 -1
  108. package/layers/SceneLayer.js +1 -1
  109. package/layers/graphics/applyEditsUtils.js +5 -0
  110. package/layers/graphics/editingSupport.js +1 -1
  111. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  112. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  113. package/layers/mixins/ArcGISImageService.js +1 -1
  114. package/layers/mixins/EditBusLayer.js +1 -1
  115. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  116. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  117. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  118. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  119. package/layers/orientedImagery/core/utils.js +5 -0
  120. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  121. package/layers/support/fieldProperties.js +1 -1
  122. package/layers/support/fieldUtils.js +1 -1
  123. package/layers/support/imageryRendererUtils.js +1 -1
  124. package/layers/support/kmlUtils.js +1 -1
  125. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  126. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  127. package/networks/Network.js +1 -1
  128. package/package.json +1 -1
  129. package/request.js +1 -1
  130. package/rest/featureService/FeatureService.js +1 -1
  131. package/rest/support/DirectionsFeatureSet.js +1 -1
  132. package/smartMapping/renderers/pieChart.js +1 -1
  133. package/smartMapping/renderers/relationship.js +1 -1
  134. package/smartMapping/renderers/support/utils.js +1 -1
  135. package/smartMapping/statistics/support/ageUtils.js +1 -1
  136. package/smartMapping/support/adapters/support/utils.js +1 -1
  137. package/smartMapping/support/utils.js +1 -1
  138. package/support/apiKeyUtils.js +1 -1
  139. package/support/arcadeUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/symbols/cim/cimAnalyzer.js +1 -1
  142. package/symbols/support/svgUtils.js +1 -1
  143. package/time/TimeReference.js +1 -1
  144. package/time/timeReferenceUtils.js +1 -1
  145. package/versionManagement/VersionManagementService.js +1 -1
  146. package/versionManagement/support/EditMomentStack.js +5 -0
  147. package/versionManagement/support/versionManagementUtils.js +1 -1
  148. package/views/2d/engine/Container.js +1 -1
  149. package/views/2d/engine/DisplayObject.js +1 -1
  150. package/views/2d/engine/ManagedCanvas.js +5 -0
  151. package/views/2d/engine/Stage.js +1 -1
  152. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  153. package/views/2d/engine/webgl/Painter.js +1 -1
  154. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  155. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  156. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  157. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  158. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  159. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  160. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  161. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  162. package/views/2d/layers/MediaLayerView2D.js +1 -1
  163. package/views/2d/layers/TileLayerView2D.js +1 -1
  164. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  165. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  166. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  167. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  168. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  169. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  170. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  171. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  172. package/views/2d/layers/support/DisplayGL.js +1 -1
  173. package/views/2d/webglDeps.js +1 -1
  174. package/views/3d/glTF/loader.js +1 -1
  175. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  176. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
  177. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  178. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  180. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  181. package/views/3d/layers/SceneLayerView3D.js +1 -1
  182. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  187. package/views/3d/layers/graphics/Labeler.js +1 -1
  188. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  189. package/views/3d/layers/i3s/featureEditing.js +1 -1
  190. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  191. package/views/3d/state/ViewStateManager.js +1 -1
  192. package/views/3d/support/buffer/glUtil.js +1 -1
  193. package/views/3d/support/engineContent/line.js +1 -1
  194. package/views/3d/support/viewpointUtils.js +1 -1
  195. package/views/3d/webgl-engine/Stage.js +1 -1
  196. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  197. package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
  198. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  199. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  200. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  201. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  202. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  203. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  204. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  205. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  206. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  207. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  210. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  212. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  213. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  214. package/views/View.js +1 -1
  215. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  216. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  217. package/views/interactive/tooltip/constraintUtils.js +1 -1
  218. package/views/interactive/tooltip/content/Fields.js +1 -1
  219. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  220. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  221. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  222. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  223. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  224. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  225. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  226. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  227. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  228. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  229. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  230. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  231. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  232. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  233. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  234. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  235. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  236. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  237. package/views/support/angularMeasurementUtils.js +1 -1
  238. package/views/ui/UI.js +1 -1
  239. package/views/webgl/ShaderTranspiler.js +1 -1
  240. package/views/webgl/Texture.js +1 -1
  241. package/views/webgl/contextUtils.js +1 -1
  242. package/webmap/InitialViewProperties.js +1 -1
  243. package/widgets/AreaMeasurement2D.js +1 -1
  244. package/widgets/AreaMeasurement3D.js +1 -1
  245. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  246. package/widgets/Attachments.js +1 -1
  247. package/widgets/Attribution.js +1 -1
  248. package/widgets/BasemapGallery.js +1 -1
  249. package/widgets/BasemapLayerList.js +1 -1
  250. package/widgets/BasemapToggle.js +1 -1
  251. package/widgets/Bookmarks.js +1 -1
  252. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  253. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  254. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  255. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  256. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  257. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  258. package/widgets/BuildingExplorer.js +1 -1
  259. package/widgets/Compass.js +1 -1
  260. package/widgets/CoordinateConversion.js +1 -1
  261. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  262. package/widgets/Daylight.js +1 -1
  263. package/widgets/DirectLineMeasurement3D.js +1 -1
  264. package/widgets/DirectionalPad.js +1 -1
  265. package/widgets/Directions/components/SaveLayer.js +1 -1
  266. package/widgets/Directions.js +1 -1
  267. package/widgets/DistanceMeasurement2D.js +1 -1
  268. package/widgets/Editor/components/FooterActions.js +1 -1
  269. package/widgets/Editor/components/Notices.js +1 -1
  270. package/widgets/Editor/components/PanelContent.js +1 -1
  271. package/widgets/Editor/components/PanelToolbar.js +1 -1
  272. package/widgets/Editor/components/Prompt.js +1 -1
  273. package/widgets/Editor/components/Settings.js +1 -1
  274. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  275. package/widgets/Editor/components/UploadDetails.js +1 -1
  276. package/widgets/Editor.js +1 -1
  277. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  278. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  279. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  280. package/widgets/ElevationProfile.js +1 -1
  281. package/widgets/Expand.js +1 -1
  282. package/widgets/Feature/FeatureContent.js +1 -1
  283. package/widgets/Feature/FeatureExpression.js +1 -1
  284. package/widgets/Feature/FeatureFields.js +1 -1
  285. package/widgets/Feature/FeatureMedia.js +1 -1
  286. package/widgets/Feature/FeatureRelationship.js +1 -1
  287. package/widgets/Feature/FeatureViewModel.js +1 -1
  288. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  289. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  290. package/widgets/Feature.js +1 -1
  291. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  292. package/widgets/FeatureForm/GroupInput.js +1 -1
  293. package/widgets/FeatureForm/css.js +1 -1
  294. package/widgets/FeatureForm.js +1 -1
  295. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  296. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  297. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  298. package/widgets/FeatureTable.js +1 -1
  299. package/widgets/FeatureTemplates/ItemList.js +1 -1
  300. package/widgets/FeatureTemplates.js +1 -1
  301. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  302. package/widgets/Features.js +1 -1
  303. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  304. package/widgets/FloorFilter.js +1 -1
  305. package/widgets/Fullscreen.js +1 -1
  306. package/widgets/Histogram.js +1 -1
  307. package/widgets/HistogramRangeSlider.js +1 -1
  308. package/widgets/Home.js +1 -1
  309. package/widgets/LayerList/ListItemPanel.js +1 -1
  310. package/widgets/LayerList.js +1 -1
  311. package/widgets/Legend/LegendViewModel.js +1 -1
  312. package/widgets/Legend/styles/Card.js +1 -1
  313. package/widgets/Legend/styles/Classic.js +1 -1
  314. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  315. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  316. package/widgets/LineOfSight.js +1 -1
  317. package/widgets/Locate.js +1 -1
  318. package/widgets/NavigationToggle.js +1 -1
  319. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  320. package/widgets/OrientedImageryViewer.js +1 -1
  321. package/widgets/Popup.js +1 -1
  322. package/widgets/Print.js +1 -1
  323. package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
  324. package/widgets/ScaleRangeSlider.js +1 -1
  325. package/widgets/Search/SearchResultRenderer.js +1 -1
  326. package/widgets/Search.js +1 -1
  327. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  328. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  329. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  330. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  331. package/widgets/ShadowCast.js +1 -1
  332. package/widgets/Sketch.js +1 -1
  333. package/widgets/Slice.js +1 -1
  334. package/widgets/Slider.js +1 -1
  335. package/widgets/Swipe.js +1 -1
  336. package/widgets/TableList.js +1 -1
  337. package/widgets/TimeSlider.js +1 -1
  338. package/widgets/Track.js +1 -1
  339. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  340. package/widgets/UtilityNetworkAssociations.js +1 -1
  341. package/widgets/UtilityNetworkTrace.js +1 -1
  342. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  343. package/widgets/ValuePicker.js +1 -1
  344. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  345. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  346. package/widgets/VideoPlayer.js +1 -1
  347. package/widgets/Weather/LabeledSlider.js +1 -1
  348. package/widgets/Weather.js +1 -1
  349. package/widgets/Zoom/IconButton.js +1 -1
  350. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  351. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  352. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  353. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  354. package/widgets/smartMapping/ColorSlider.js +1 -1
  355. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  356. package/widgets/smartMapping/OpacitySlider.js +1 -1
  357. package/widgets/smartMapping/SizeSlider.js +1 -1
  358. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  359. package/widgets/support/ColorPicker.js +1 -1
  360. package/widgets/support/DatePicker.js +1 -1
  361. package/widgets/support/Heading.js +1 -1
  362. package/widgets/support/LabeledSwitch.js +1 -1
  363. package/widgets/support/MeasurementWidgetContent.js +1 -1
  364. package/widgets/support/Popover.js +1 -1
  365. package/widgets/support/SelectionToolbar.js +1 -1
  366. package/widgets/support/SketchTooltipControls.js +1 -1
  367. package/widgets/support/SnappingControls.js +1 -1
  368. package/widgets/support/TimePicker.js +1 -1
  369. package/widgets/support/TimezonePicker.js +1 -1
  370. package/widgets/support/UnitSelect.js +1 -1
  371. package/widgets/support/dateUtils.js +1 -1
  372. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
  373. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  374. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
  375. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
  376. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  377. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
  378. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  379. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
  380. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
  382. package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
  383. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  384. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  385. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
  386. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
  387. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
  388. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  389. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  390. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  391. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
  392. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
  393. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
  394. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  395. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  396. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  397. package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
  398. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
  399. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
  400. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
  401. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  402. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  403. package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
  404. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
  405. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  406. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
  408. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
  409. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  410. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  411. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  412. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
  413. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
  414. package/core/watchUtils.d.ts +0 -4
  415. package/core/watchUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9059,5732,7865,2596],{92835:(e,t,r)=>{r.d(t,{Z:()=>m});var i,n=r(43697),s=r(96674),o=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),u=r(30556),h=r(15512);let y=i=class extends s.wq{static get allTime(){return c}static get empty(){return p}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=h.By){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,e,t));let n=this.end;if(n){const r=(0,o.JE)(n,e,t);n=n.getTime()===r.getTime()?r:(0,o.Nm)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;if(n>=t&&n<=r?o=n:t>=n&&t<=s&&(o=t),r>=n&&r<=s?a=r:s>=t&&s<=r&&(a=s),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t,r=h.By){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.Nm)(s,e,t,r)),null!=a&&(n.end=(0,o.Nm)(a,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,n._)([(0,l.r)("end")],y.prototype,"readEnd",null),(0,n._)([(0,u.c)("end")],y.prototype,"writeEnd",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,n._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,n._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,n._)([(0,l.r)("start")],y.prototype,"readStart",null),(0,n._)([(0,u.c)("start")],y.prototype,"writeStart",null),y=i=(0,n._)([(0,d.j)("esri.TimeExtent")],y);const c=new y,p=new y({start:void 0,end:void 0}),m=y},5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),n=r(46791),s=(r(66643),r(20102),r(92604),r(26258),r(87538)),o=r(5600),a=r(52011);let l=class extends n.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],l.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,a.j)("esri.core.CollectionFlattener")],l);const d=l},10699:(e,t,r)=>{r.d(t,{IG:()=>o,iv:()=>a});var i=r(43697),n=r(52011);let s=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return t=(0,i._)([(0,n.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return t=(0,i._)([(0,n.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,n.j)("esri.core.Identifiable")],l)},70921:(e,t,r)=>{r.d(t,{R:()=>s,Z:()=>n});var i=r(46791);function n(e,t,r=i.Z){return t||(t=new r),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function s(e){return e}},68668:(e,t,r)=>{r.d(t,{G:()=>o,w:()=>a});var i=r(66643),n=r(46791),s=r(83379);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):n.Z.isCollection(t)?t.forEach((e=>o(e))):s.Z.isLoadable(t)&&r.push(t))};t(o);let a=null;if(await(0,i.UI)(r,(async e=>{const t=await(0,i.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},17445:(e,t,r)=>{r.d(t,{N1:()=>y,YP:()=>l,Z_:()=>m,gx:()=>d,nn:()=>f,on:()=>h,tX:()=>g}),r(66643),r(46791);var i=r(91460),n=r(50758),s=r(70586),o=r(95330),a=r(26258);function l(e,t,r={}){return u(e,t,r,c)}function d(e,t,r={}){return u(e,t,r,p)}function u(e,t,r={},i){let n=null;const o=r.once?(e,r)=>{i(e)&&((0,s.hw)(n),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(n=(0,a.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return n}function h(e,t,r,o={}){let a=null,d=null,u=null;function h(){a&&d&&(d.remove(),o.onListenerRemove?.(a),a=null,d=null)}function y(e){o.once&&o.once&&(0,s.hw)(u),r(e)}const c=l(e,((e,r)=>{h(),(0,i.vT)(e)&&(a=e,d=(0,i.on)(e,t,y),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.kB)((()=>{c.remove(),h()})),u}function y(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,s.hw)(a)}return new Promise(((i,s)=>{a=(0,n.AL)([(0,o.fu)(r,(()=>{l(),s((0,o.zE)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??c)])}))}(e,p,t)}function c(e){return!0}function p(e){return!!e}r(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>a,rJ:()=>d});var i=r(90344),n=r(15512),s=r(17126);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function a(e,t,r,o=n.By){const a=new s.vF((0,i.f1)(o)),l=s.ou.fromJSDate(e,{zone:a}),d="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[d]:t}).toJSDate()}function l(e,t,r=n.By){const o=new s.vF((0,i.f1)(r)),a=s.ou.fromJSDate(e,{zone:o});if("decades"===t||"centuries"===t){const e=a.startOf("year"),{year:r}=e,i=r-r%("decades"===t?10:100);return e.set({year:i}).toJSDate()}const l=u(t);return a.startOf(l).toJSDate()}function d(e,t,r){return 0===e?0:e*o[t]/o[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},90344:(e,t,r)=>{r.d(t,{Xr:()=>p,Ze:()=>b,f1:()=>w,p6:()=>v});var i=r(35454),n=r(70171),s=r(15512);r(17126);const o=Intl.DateTimeFormat().resolvedOptions().timeZone,a=(s.pt,{year:"numeric",month:"numeric",day:"numeric"}),l={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},u={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},y={...h,second:"numeric"},c={"short-date":a,"short-date-short-time":{...a,...h},"short-date-short-time-24":{...a,...h,hour12:!1},"short-date-long-time":{...a,...y},"short-date-long-time-24":{...a,...y,hour12:!1},"short-date-le":a,"short-date-le-short-time":{...a,...h},"short-date-le-short-time-24":{...a,...h,hour12:!1},"short-date-le-long-time":{...a,...y},"short-date-le-long-time-24":{...a,...y,hour12:!1},"long-month-day-year":l,"long-month-day-year-short-time":{...l,...h},"long-month-day-year-short-time-24":{...l,...h,hour12:!1},"long-month-day-year-long-time":{...l,...y},"long-month-day-year-long-time-24":{...l,...y,hour12:!1},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...h},"day-short-month-year-short-time-24":{...d,...h,hour12:!1},"day-short-month-year-long-time":{...d,...y},"day-short-month-year-long-time-24":{...d,...y,hour12:!1},"long-date":u,"long-date-short-time":{...u,...h},"long-date-short-time-24":{...u,...h,hour12:!1},"long-date-long-time":{...u,...y},"long-date-long-time-24":{...u,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":y},p=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),m={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const g=c["short-date-short-time"];function b(e){return c[e]}function v(e,t=g){return function(e){let t=f.get(e);if(!t){const r=(0,n.Kd)(),i=m[r]||r,o=w(e.timeZone??s.By),a={...e,timeZone:o};t=new Intl.DateTimeFormat(i,a),f.set(e,t)}return t}(t).format(e)}function w(e){switch(e){case s.By:return o;case s._4:return s.pt;default:return e}}(0,n.Ze)((()=>{f=new WeakMap}))},40504:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var i=r(43697),n=r(57435),s=r(68668),o=r(92604),a=r(16453),l=r(17445),d=r(5600),u=(r(75215),r(67676),r(80442),r(1153)),h=r(52011),y=r(30556),c=r(87085),p=r(71612),m=r(38009),f=r(16859),g=r(72965),b=r(87344),v=r(46791),w=r(70921),_=r(95330);function C(e,t,r){let i,n;if(e)for(let s=0,o=e.length;s<o;s++){if(i=e.at(s),i?.[t]===r)return i;if("group"===i?.type&&(n=C(i.layers,t,r),n))return n}}const T=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||o.Z.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>r(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,w.Z)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof c.Z){const i=e;i.parent===this?this.reorder(i,t):r.add(i,t)}else(0,_.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):o.Z.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let i=r.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(r.add(e,i),i+=1):this.reorder(e,i)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,i._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,i._)([(0,h.j)("esri.support.LayersMixin")],t),t};function L(e,t,r){if(e)for(let i=0,n=e.length;i<n;i++){const n=e.at(i);if(n[t]===r)return n;if("group"===n?.type){const e=L(n.tables,t,r);if(e)return e}}}const I=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&o.Z.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,w.Z)(e,this._get("tables")))}findTableById(e){return L(this.tables,"id",e)}findTableByUid(e){return L(this.tables,"uid",e)}};return(0,i._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,i._)([(0,h.j)("esri.support.TablesMixin")],t),t},E=Symbol("WebScene");var S=r(15650);let D=class extends((0,p.h)((0,g.M)((0,m.q)((0,f.I)(I(T((0,a.R)(c.Z)))))))){constructor(e){var t;super(e),this.allLayers=new n.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new n.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,l.YP)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&E in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,l.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),o.Z.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")})),t))}),l.tX),(0,l.YP)((()=>this.visible),this._onVisibilityChange.bind(this),l.Z_)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}_writeLayers(e,t,r,i){const n=[];if(!e)return n;e.forEach((e=>{const t=(0,S.Nw)(e,i.webmap?i.webmap.getLayerJSONFromResourceInfo(e):null,i);null!=t&&t.layerType&&n.push(t)})),t.layers=n}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"],layerModuleTypeMap:b.T},e)),Promise.resolve(this)}async loadAll(){return(0,s.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer readded to Grouplayer: uid=${e.uid}`):this.addHandles((0,l.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),l.Z_),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.vw)(this).initialized)return;const r=this.layers;let i=r.find((e=>e.visible));switch(e){case"exclusive":r.length&&!i&&(i=r.at(0),i.visible=!0),this._turnOffOtherLayers(i);break;case"inherited":r.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,i._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],D.prototype,"allLayers",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],D.prototype,"allTables",void 0),(0,i._)([(0,d.Cb)()],D.prototype,"fullExtent",void 0),(0,i._)([(0,d.Cb)({json:{read:!0,write:!0}})],D.prototype,"blendMode",void 0),(0,i._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],D.prototype,"layers",void 0),(0,i._)([(0,y.c)("layers")],D.prototype,"_writeLayers",null),(0,i._)([(0,d.Cb)({type:["GroupLayer"]})],D.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],D.prototype,"portalItem",null),(0,i._)([(0,d.Cb)()],D.prototype,"spatialReference",void 0),(0,i._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],D.prototype,"type",void 0),(0,i._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],D.prototype,"visibilityMode",null),D=(0,i._)([(0,h.j)("esri.layers.GroupLayer")],D);const M=D},87085:(e,t,r)=>{r.d(t,{Z:()=>v});var i=r(43697),n=(r(66577),r(3172)),s=r(20102),o=r(32448),a=r(10699),l=r(83379),d=r(92604),u=r(95330),h=r(17452),y=r(5600),c=(r(75215),r(67676),r(80442),r(52011)),p=r(68773),m=r(6570),f=r(82971);let g=0,b=class extends(o.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,f.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",n=r&&r.portal&&r.portal.url||p.default.portalUrl;throw d.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||d.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.Z)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,y.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,y.Cb)({type:m.Z})],b.prototype,"fullExtent",void 0),(0,i._)([(0,y.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,y.Cb)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,y.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,y.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,y.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,y.Cb)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,y.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,y.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,y.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,y.Cb)({type:f.Z})],b.prototype,"spatialReference",void 0),(0,i._)([(0,y.Cb)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,y.Cb)()],b.prototype,"url",void 0),(0,i._)([(0,y.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,c.j)("esri.layers.Layer")],b);const v=b},16859:(e,t,r)=>{r.d(t,{I:()=>C});var i=r(43697),n=r(68773),s=r(40330),o=r(3172),a=r(66643),l=r(20102),d=r(92604),u=r(70586),h=r(95330),y=r(17452),c=r(5600),p=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);const C=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,h.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||d.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let n,o;if(i)n=r.portal.url;else try{n=await(0,g.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!n||!(0,y.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=b.Z.getDefault();if(n&&n.loaded&&(0,y.Fv)(n.restUrl)===(0,y.Fv)(i))return n.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?w.Z.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,y.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,c.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},15650:(e,t,r)=>{r.d(t,{Nw:()=>h});var i=r(20102),n=r(22974),s=r(78286),o=r(827),a=r(84230);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),d=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,o.k)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,o.k)(e.minScale)??void 0)}function h(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r&&r.messages&&r.messages.push(new i.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const r=function(e){return"basemap"===e.layerContainerType?l:"operational-layers"===e.layerContainerType?d:null}(t);return null==r||r.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,a.rQ)(e)){const r=(0,s.hS)("featureCollection.layers",t),i=r&&r[0]&&r[0].layerDefinition;i&&u(e,i)}else"group"!==e.type&&u(e,t)}(e,t),t&&("blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,o.k)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,a.rQ)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,n.d9)(t)),t}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4695],{42033:(e,n,r)=>{r.d(n,{E:()=>a,_:()=>s});var t=r(15512);async function a(e,n,a=t.pt){const{WhereClause:s}=await r.e(8968).then(r.bind(r,8968));return s.create(e,n,a)}function s(e,n){return null!=e?null!=n?`(${e}) AND (${n})`:e:n}},18848:(e,n,r)=>{r.d(n,{uf:()=>u});var t=r(70171);const a={ar:"ar-u-nu-latn"};let s=new WeakMap,l={};function u(e,n){return Object.is(e,-0)&&(e=0),function(e){const n=e||l;if(!s.has(n)){const r=(0,t.Kd)(),l=a[(0,t.Kd)()]||r;s.set(n,new Intl.NumberFormat(l,e))}return s.get(n)}(n).format(e)}(0,t.Ze)((()=>{s=new WeakMap,l={}}))},14695:(e,n,r)=>{r.d(n,{createLabelFunction:()=>w});var t=r(20102),a=r(92604),s=r(42033),l=r(90344),u=r(18848),i=r(35671),o=r(8813),c=r(59266);const p=a.Z.getLogger("esri.layers.support.labelFormatUtils"),f={type:"simple",evaluate:()=>null},d={getAttribute:(e,n)=>e.field(n)};async function w(e,n,r){if(!e||!e.symbol||!n)return f;const a=e.where,w=(0,o.hV)(e);let x;if("arcade"===w.type){const e=await(0,c.WW)(w.expression,r,n);if(null==e)return f;x={type:"arcade",evaluate(n){try{const r=e.evaluate({$feature:"attributes"in n?e.repurposeFeature(n):n},e.services);if(null!=r)return r.toString()}catch(e){p.error(new t.Z("arcade-expression-error","Encountered an error when evaluating label expression for feature",{error:e,feature:n,expression:w}))}return null},needsHydrationToEvaluate:()=>null==(0,o.el)(w.expression)}}else x={type:"simple",evaluate:e=>w.expression.replaceAll(/{[^}]*}/g,(r=>{const t=r.slice(1,-1),a=n.get(t);if(!a)return r;let s=null;return"attributes"in e?e&&e.attributes&&(s=e.attributes[a.name]):s=e.field(a.name),null==s?"":function(e,n){if(null==e)return"";const r=n.domain;if(r)if("codedValue"===r.type||"coded-value"===r.type){const n=e;for(const e of r.codedValues)if(e.code===n)return e.name}else if("range"===r.type){const n=+e,t="range"in r?r.range[0]:r.minValue,a="range"in r?r.range[1]:r.maxValue;if(t<=n&&n<=a)return r.name}let t=e;return"date"===n.type||"esriFieldTypeDate"===n.type?t=(0,l.p6)(t,(0,l.Ze)("short-date")):(0,i.H7)(n)&&(t=(0,u.uf)(+t)),t||""}(s,a)}))};if(a){let e;try{e=await(0,s.E)(a,n)}catch(e){return p.error(new t.Z("bad-where-clause","Encountered an error when evaluating where clause, ignoring",{where:a,error:e})),f}const r=x.evaluate;x.evaluate=n=>{const s="attributes"in n?void 0:d;try{if(e.testFeature(n,s))return r(n)}catch(e){p.error(new t.Z("bad-where-clause","Encountered an error when evaluating where clause for feature",{where:a,feature:n,error:e}))}return null}}return x}},8813:(e,n,r)=>{r.d(n,{UO:()=>g,YI:()=>x,dI:()=>b,el:()=>E,hV:()=>w,z7:()=>d});var t=r(19153);const a="__begin__",s="__end__",l=new RegExp(a,"ig"),u=new RegExp(s,"ig"),i=new RegExp("^"+a,"i"),o=new RegExp(s+"$","i"),c='"',p=c+" + ",f=" + "+c;function d(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function w(e){const n={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(n.expression=e.labelExpressionInfo.value,n.type="conventional"):e.labelExpressionInfo.expression&&(n.expression=e.labelExpressionInfo.expression,n.type="arcade"):null!=e.labelExpression&&(n.expression=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),n.type="conventional"),n}function x(e){const n=w(e);if(!n)return null;switch(n.type){case"conventional":return b(n.expression);case"arcade":return n.expression}return null}function g(e){const n=w(e);if(!n)return null;switch(n.type){case"conventional":return function(e){const n=e?.match(h);return n&&n[1].trim()||null}(n.expression);case"arcade":return E(n.expression)}return null}function b(e){let n;return e?(n=(0,t.gx)(e,(e=>a+'$feature["'+e+'"]'+s)),n=i.test(n)?n.replace(i,""):c+n,n=o.test(n)?n.replace(o,""):n+c,n=n.replaceAll(l,p).replaceAll(u,f)):n='""',n}const h=/^\s*\{([^}]+)\}\s*$/i,y=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,m=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function E(e){if(!e)return null;let n=y.exec(e)||v.exec(e);return n?n[1]||n[3]:(n=m.exec(e),n?n[2]:null)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[801,5935],{82960:(e,t,n)=>{n.d(t,{C:()=>r});const r=["operational-layers","basemap","ground"]},24133:(e,t,n)=>{n.d(t,{Q:()=>s});var r=n(67676),i=n(44553),o=n(88764);class s{constructor(e=9,t){this._compareMinX=u,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),_.prune(),x.prune(),C.prune()}all(e){this._all(this._data,e)}search(e,t){let n=this._data;const r=this._toBBox;if(g(e,n))for(b.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;g(e,s)&&(n.leaf?t(o):m(e,s)?this._all(o,t):b.push(o))}n=b.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!g(e,t))return!1;for(b.clear();t;){for(let r=0,i=t.children.length;r<i;r++){const i=t.children[r],o=t.leaf?n(i):i;if(g(e,o)){if(t.leaf||m(e,o))return!0;b.push(i)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(e){if(!e)return this;let t,n=this._data,i=null,o=0,s=!1;const a=this._toBBox(e);for(x.clear(),C.clear();n||x.length>0;){if(n||(n=x.pop(),i=x.data[x.length-1],o=C.pop()??0,s=!0),n.leaf&&(t=(0,r.cq)(n.children,e,n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),x.push(n),this._condense(x),this;s||n.leaf||!m(n,a)?i?(o++,n=i.children[o],s=!1):n=null:(x.push(n),C.push(o),o=0,i=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let n=e;for(_.clear();n;){if(!0===n.leaf)for(const e of n.children)t(e);else _.pushArray(n.children);n=_.pop()??null}}_build(e,t,n,r){const i=n-t+1;let o=this._maxEntries;if(i<=o){const r=new I(e.slice(t,n+1));return a(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new T([]);s.height=r;const l=Math.ceil(i/o),p=l*Math.ceil(Math.sqrt(o));w(e,t,n,p,this._compareMinX);for(let i=t;i<=n;i+=p){const t=Math.min(i+p-1,n);w(e,i,t,l,this._compareMinY);for(let n=i;n<=t;n+=l){const i=Math.min(n+l-1,t);s.children.push(this._build(e,n,i,r-1))}}return a(s,this._toBBox),s}_chooseSubtree(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=c(s),l=y(e,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}t=n||t.children[0]}return t}_insert(e,t,n){const r=this._toBBox,i=n?e:r(e);x.clear();const o=this._chooseSubtree(i,this._data,t,x);for(o.children.push(e),p(o,i);t>=0&&x.data[t].children.length>this._maxEntries;)this._split(x,t),t--;this._adjustParentBBoxes(i,x,t)}_split(e,t){const n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const s=n.children.splice(o,n.children.length-o),l=n.leaf?new I(s):new T(s);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){const t=l(e,0,s,this._toBBox),a=l(e,s,n,this._toBBox),p=f(t,a),u=c(t)+c(a);p<r?(r=p,o=s,i=u<i?u:i):p===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){const r=e.leaf?this._compareMinX:u,i=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);const i=this._toBBox,o=l(e,0,t,i),s=l(e,n-t,n,i);let a=h(o)+h(s);for(let r=t;r<n-t;r++){const t=e.children[r];p(o,e.leaf?i(t):t),a+=h(o)}for(let r=n-t-1;r>=t;r--){const t=e.children[r];p(s,e.leaf?i(t):t),a+=h(s)}return a}_adjustParentBBoxes(e,t,n){for(let r=n;r>=0;r--)p(t.data[r],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const i=e.data[t-1],o=i.children;o.splice((0,r.cq)(o,n,o.length,i.indexHint),1)}else this.clear();else a(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){l(e,0,e.children.length,t,e)}function l(e,t,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],p(i,e.leaf?r(o):o);return i}function p(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function h(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,r,i){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=r)continue;const a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const b=new i.Z,_=new i.Z,x=new i.Z,C=new i.Z({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new r.SO}}class I extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},42033:(e,t,n)=>{n.d(t,{E:()=>i,_:()=>o});var r=n(15512);async function i(e,t,i=r.pt){const{WhereClause:o}=await n.e(8968).then(n.bind(n,8968));return o.create(e,t,i)}function o(e,t){return null!=e?null!=t?`(${e}) AND (${t})`:e:t}},84864:(e,t,n)=>{n.d(t,{bU:()=>u,fC:()=>h,tp:()=>c,v7:()=>d});const r=new Float64Array(2),i=new Float64Array(2),o="0123456789bcdefghjkmnpqrstuvwxyz";function s(e){return o[e]}function a(e){return(e[0]+e[1])/2}function l(e,t,n){return e[0]=t,e[1]=n,e}function p(e,t){const n=t>a(e);return function(e,t){const n=a(e),r=t,i=!t;e[0]=i*e[0]+r*n,e[1]=i*n+r*e[1]}(e,n),n}function u(e,t){let n=-90,r=90,i=-180,o=180;for(let s=0;s<t;s++){const t=Math.ceil((s+1)/2),a=Math.floor((s+1)/2),l=1-s%2,p=30-(3*t+2*a),u=30-(2*t+3*a),d=3*l+2*(1-l),c=2*l+3*(1-l),h=3*l+7*(1-l)<<u,y=(7*l+3*(1-l)<<p&e.geohashX)>>p,f=(h&e.geohashY)>>u;for(let e=d-1;e>=0;e--){const t=(i+o)/2,n=y&1<<e?1:0;i=(1-n)*i+n*t,o=(1-n)*t+n*o}for(let e=c-1;e>=0;e--){const t=(n+r)/2,i=f&1<<e?1:0;n=(1-i)*n+i*t,r=(1-i)*t+i*r}}return[i,n,o,r]}function d(e,t,n,r){r%2&&(r+=1);let i=0,o=0,s=-90,a=90,l=-180,p=180;for(let e=0;e<r/2;e++){for(let t=0;t<5;t++){const r=(l+p)/2,o=n>r?1:0;i|=o<<29-(t+5*e),l=(1-o)*l+o*r,p=(1-o)*r+o*p}for(let n=0;n<5;n++){const r=(s+a)/2,i=t>r?1:0;o|=i<<29-(n+5*e),s=(1-i)*s+i*r,a=(1-i)*r+i*a}}e.geohashX=i,e.geohashY=o}function c(e,t,n,r,i){i%2&&(i+=1);let o=0,s=0,a=-90,l=90,p=-180,u=180;for(let e=0;e<i/2;e++){for(let t=0;t<5;t++){const n=(p+u)/2,i=r>n?1:0;o|=i<<29-(t+5*e),p=(1-i)*p+i*n,u=(1-i)*n+i*u}for(let t=0;t<5;t++){const r=(a+l)/2,i=n>r?1:0;s|=i<<29-(t+5*e),a=(1-i)*a+i*r,l=(1-i)*r+i*l}}e[2*t]=o,e[2*t+1]=s}function h(e,t,n){let o="";const a=l(r,-90,90),u=l(i,-180,180);for(let r=0;r<n;r++){let n=0;r%2?(n|=p(a,e)<<4,n|=p(u,t)<<3,n|=p(a,e)<<2,n|=p(u,t)<<1,n|=p(a,e)<<0):(n|=p(u,t)<<4,n|=p(a,e)<<3,n|=p(u,t)<<2,n|=p(a,e)<<1,n|=p(u,t)<<0),o+=s(n)}return o}},37455:(e,t,n)=>{n.d(t,{N:()=>r});const r={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,n){const r=new i(e.getPointX(t),e.getPointY(t),n),o=e.hasZ(t),s=e.hasM(t);return o&&(r.z=e.getPointZ(t)),s&&(r.m=e.getPointM(t)),r},exportPolygon:function(e,t,n){return new o(e.exportPaths(t),n,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,n){return new s(e.exportPaths(t),n,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,n){return new a(e.exportPoints(t),n,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,n){const r=e.hasZ(t),i=e.hasM(t),o=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),n);if(r){const n=e.getZExtent(t);o.zmin=n.vmin,o.zmax=n.vmax}if(i){const n=e.getMExtent(t);o.mmin=n.vmin,o.mmax=n.vmax}return o}};class i{constructor(e,t,n){this.x=e,this.y=t,this.spatialReference=n,this.z=void 0,this.m=void 0}}class o{constructor(e,t,n,r){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),r&&(this.hasM=r)}}class s{constructor(e,t,n,r){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),r&&(this.hasM=r)}}class a{constructor(e,t,n,r){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),r&&(this.hasM=r)}}class l{constructor(e,t,n,r,i){this.xmin=e,this.ymin=t,this.xmax=n,this.ymax=r,this.spatialReference=i,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},16306:(e,t,n)=>{n.d(t,{aX:()=>C});var r=n(68773),i=n(20102),o=n(92604),s=n(38913),a=n(58901),l=n(73913),p=n(8744),u=n(40488),d=(n(66577),n(3172)),c=n(33955),h=n(11282),y=n(17452);async function f(e,t,n){const r="string"==typeof e?(0,y.mN)(e):e,i=t[0].spatialReference,o=(0,c.Ji)(t[0]),s={...n,query:{...r.query,f:"json",sr:(0,p.B9)(i),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:a}=await(0,d.Z)(r.path+"/simplify",s);var l;return function(e,t,n){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=n,t}))}(a.geometries,o,i)}const m=o.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.Z||e instanceof s.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new i.Z(e)}const n=(0,l.x3)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const i=e[r][0],o=e[r][1],s=e[r+1][0],a=e[r+1][1],l=Math.sqrt((s-i)*(s-i)+(a-o)*(a-o)),p=(a-o)/l,u=(s-i)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,s=u*r+i,a=p*r+o;n.push([s,a])}const e=(l+Math.floor(d-1)*t)/2,r=u*e+i,s=p*e+o;n.push([r,s])}n.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.Z({rings:r,spatialReference:e.spatialReference}):new a.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.Sx)(t,!0)}return n&&(e=(0,l.Sy)(e,n)),e}function _(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,l.XZ)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.XZ)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,l.XZ)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,l.XZ)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const i=t.cutIndexes[r],o=t.geometries[r],s=(0,l.x3)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,l.XZ)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(i===n){if(g(e))for(const t of(0,l.x3)(o))e[i]=e[i].addRing(t);else if(w(e))for(const t of(0,l.x3)(o))e[i]=e[i].addPath(t)}else n=i,e[i]=o}return e}async function C(e,t,n){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const i="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let o,y,g,w,v,E,I,T,M=0;const S=[],L=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,y=(0,p.C5)(o),g=o.isWebMercator,E=g?102100:4326,w=l.UZ[E].maxX,v=l.UZ[E].minX,I=l.UZ[E].plus180Line,T=l.UZ[E].minus180Line),y)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(_(t.clone(),w,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,w,v))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);L.push(e.rings?new s.Z(e):e)}else if(t.extent){const e=t.extent,n=(0,l.XZ)(e.xmin,v)*(2*w);let r=0===n?t.clone():(0,l.Sy)(t.clone(),n);e.offset(n,0),e.intersects(I)&&e.xmax!==w?(M=e.xmax>M?e.xmax:M,r=b(r,g),S.push(r),L.push("cut")):e.intersects(T)&&e.xmin!==v?(M=e.xmax*(2*w)>M?e.xmax*(2*w):M,r=b(r,g,360),S.push(r),L.push("cut")):L.push(r)}else L.push(t.clone());else L.push(t);else L.push(t);let k=(0,l.XZ)(M,w),R=-90;const N=k,j=new a.Z;for(;k>0;){const e=360*k-180;j.addPath([[e,R],[e,-1*R]]),R*=-1,k--}if(S.length>0&&N>0){const t=x(S,await async function(e,t,n,r){const i=(0,h.en)(e),o=t[0].spatialReference,s={...r,responseType:"json",query:{...i.query,f:"json",sr:(0,p.B9)(o),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,d.Z)(i.path+"/cut",s),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,c.im)(e);return t.spatialReference=o,t}))}}(i,S,j,n)),r=[],o=[];for(let n=0;n<L.length;n++){const i=L[n];if("cut"!==i)o.push(i);else{const i=t.shift(),s=e[n];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(r.push(i),o.push("simplify")):o.push(g?(0,u.$)(i):i)}}if(!r.length)return o;const s=await f(i,r,n),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(g?(0,u.$)(s.shift()):s.shift())}return a}const D=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)D.push(t);else{const e=S.shift();D.push(!0===g?(0,u.$)(e):e)}}return D}},73913:(e,t,n)=>{n.d(t,{Sy:()=>l,UZ:()=>s,XZ:()=>a,x3:()=>p});var r=n(58901),i=n(82971),o=n(33955);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:i.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:i.Z.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=p(e);for(const e of n)for(const n of e)n[0]+=t;return e}function p(e){return(0,o.oU)(e)?e.rings:e.paths}},19087:(e,t,n)=>{n.r(t),n.d(t,{default:()=>on});var r=n(43697),i=(n(66577),n(46791)),o=n(20102),s=n(92604),a=n(95330),l=n(5600),p=(n(75215),n(67676),n(80442)),u=n(52011),d=n(84864),c=n(87085),h=n(98732),y=n(5428),f=n(92036),m=n(30175),g=n(42033),w=n(38913),b=n(73615),_=n(8744),x=n(70272),C=n(33955);class v{constructor(){this._featureLookup=new Map}static getInstance(){return v.instance||(v.instance=new v),v.instance}static resetInstance(){v.instance&&(v.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const n=this.readFromStoreById(e);n&&t.push(n)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const r=[];return e.forEach((e=>{if(!e||!e.id)return;e.properties||(e.properties=[]);let i,o=null;if(n&&e.properties[n]&&(o=(0,h.GH)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties.ESRI__ORIGIN_ID=e.originId,e.properties.ESRI__DESTINATION_ID=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),s=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));n&&e.properties[n]&&(s[n]=(0,C.im)(e.properties[n])),i=new x.u_(o?JSON.parse(JSON.stringify(o)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,s,null,e.properties[t])}else i=new x.u_(o?JSON.parse(JSON.stringify(o)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,i),r.push(i)})),r}}var E=n(40330),I=n(3172);let T=class extends f.Z{constructor(e){super(e),this.resultRows=[]}};(0,r._)([(0,l.Cb)()],T.prototype,"resultRows",void 0),T=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphQueryResult")],T);const M=T;let S=class extends f.Z{constructor(e){super(e),this.resultRowsStream=new ReadableStream}};(0,r._)([(0,l.Cb)()],S.prototype,"resultRowsStream",void 0),S=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphQueryResult")],S);const L=S;var k=n(96674),R=n(82971);let N=class extends k.wq{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"unique",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"ascending",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],N.prototype,"description",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],N.prototype,"fieldNames",void 0),N=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.FieldIndex")],N);const j=N;let D=class extends k.wq{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"alias",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"fieldType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],D.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"nullable",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"editable",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"required",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"defaultVisibility",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],D.prototype,"systemMaintained",void 0),(0,r._)([(0,l.Cb)()],D.prototype,"role",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{type:String,write:{writer:(e,t)=>{t.defaultValue=null!=e?e.toString():null}}}})],D.prototype,"defaultValue",void 0),D=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphProperty")],D);const G=D;let P=class extends k.wq{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"alias",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],P.prototype,"role",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],P.prototype,"strict",void 0),(0,r._)([(0,l.Cb)({type:[G],json:{write:!0}})],P.prototype,"properties",void 0),(0,r._)([(0,l.Cb)({type:[j],json:{write:!0}})],P.prototype,"fieldIndexes",void 0),P=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphObjectType")],P);const Z=P;let F=class extends Z{constructor(e){super(e)}};F=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.EntityType")],F);const O=F;let A=class extends Z{constructor(e){super(e),this.endPoints=[]}};(0,r._)([(0,l.Cb)()],A.prototype,"endPoints",void 0),A=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.RelationshipType")],A);const B=A;let z=class extends k.wq{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null}};(0,r._)([(0,l.Cb)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],z.prototype,"timestamp",void 0),(0,r._)([(0,l.Cb)({type:R.Z,json:{write:!0}})],z.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],z.prototype,"strict",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],z.prototype,"objectIdField",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],z.prototype,"globalIdField",void 0),(0,r._)([(0,l.Cb)()],z.prototype,"arcgisManaged",void 0),(0,r._)([(0,l.Cb)()],z.prototype,"identifierInfo",void 0),(0,r._)([(0,l.Cb)()],z.prototype,"searchIndexes",void 0),(0,r._)([(0,l.Cb)({type:[O],json:{write:!0}})],z.prototype,"entityTypes",void 0),(0,r._)([(0,l.Cb)({type:[B],json:{write:!0}})],z.prototype,"relationshipTypes",void 0),z=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.DataModel")],z);const q=z;let Y=class extends k.wq{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1}};(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],Y.prototype,"capabilities",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"supportsSearch",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],Y.prototype,"supportedQueryFormats",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"allowGeometryUpdates",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Y.prototype,"searchMaxRecordCount",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],Y.prototype,"serviceCapabilities",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Y.prototype,"maxRecordCount",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"description",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"copyrightText",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"units",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],Y.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Y.prototype,"currentVersion",void 0),(0,r._)([(0,l.Cb)({type:Object,json:{write:!0}})],Y.prototype,"dateFieldsTimeReference",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Y.prototype,"serviceItemId",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"supportsDocuments",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"dataEditingNotSupported",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"schemaEditingNotSupported",void 0),Y=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.ServiceDefinition")],Y);const Q=Y;let U=class extends k.wq{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],U.prototype,"url",void 0),(0,r._)([(0,l.Cb)({type:q,json:{write:!0}})],U.prototype,"dataModel",void 0),(0,r._)([(0,l.Cb)({type:Q,json:{write:!0}})],U.prototype,"serviceDefinition",void 0),U=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.KnowledgeGraph")],U);const $=U;var H=n(99880);const J="esri/rest/knowledgeGraph/wasmInterface/";let X,V=null;async function W(){const e=V??X;if(e)return e;const t=(0,p.Z)("wasm-simd");return X=async function(e){if(e){const{default:e}=await n.e(5389).then(n.bind(n,35389)).then((e=>e.a));return e({locateFile:e=>(0,H.V)(J+e)})}const{default:t}=await n.e(9931).then(n.bind(n,39931)).then((e=>e.a));return t({locateFile:e=>(0,H.V)(J+e)})}(t),X}var K=n(65091),ee=n(94139),te=n(58901),ne=n(9361);function re(e,t){const n=new t.ArrayValue;return n.deleteLater(),e.forEach((e=>{n.add_value(se(e,t))})),n}function ie(e,t){const n=new t.ObjectValue;n.deleteLater();for(const[r,i]of Object.entries(e))n.set_key_value(r,se(i,t));return n}function oe(e,t){if(e instanceof K.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.geometry_type=n.geometry_type=t.esriGeometryType.esriGeometryMultipoint,n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{r[o]=e,o++}))})),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);if(e instanceof ee.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.geometry_type=t.esriGeometryType.esriGeometryPoint,n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];i[0]=1,r[0]=e.x,r[1]=e.y;let o=2;return e.hasZ&&(r[o]=e.z,o++),e.hasM&&(r[o]=e.m,o++),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);if(e instanceof te.Z||e instanceof w.Z)return function(e,t){const n=new t.GeometryValue;n.deleteLater(),n.has_z=e.hasZ,n.has_m=e.hasM;const r=[],i=[];let o=[];e instanceof te.Z?(n.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof w.Z&&(n.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{r[a]=e,a++}))})),i[s]=t,s++})),n.coords=new Float64Array(r),n.lengths=new Uint32Array(i),n}(e,t);throw new o.Z("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function se(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof ne.Z)return oe(e,t);if(Array.isArray(e)){const n=new t.ArrayValue;return n.deleteLater(),e.forEach((e=>{n.add_value(se(e,t))})),n}return ie(e,t)}let ae=class extends k.wq{constructor(e){super(e),this.properties=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],ae.prototype,"properties",void 0),ae=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphObject")],ae);const le=ae;let pe=class extends le{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],pe.prototype,"typeName",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],pe.prototype,"id",void 0),pe=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphNamedObject")],pe);const ue=pe;let de=class extends ue{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,l.Cb)({type:ee.Z,json:{write:!0}})],de.prototype,"layoutGeometry",void 0),de=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.Entity")],de);const ce=de;let he=class extends ue{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"originId",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],he.prototype,"destinationId",void 0),(0,r._)([(0,l.Cb)({type:te.Z,json:{write:!0}})],he.prototype,"layoutGeometry",void 0),he=(0,r._)([(0,u.j)("esri.rest.Relationship.Relationship")],he);const ye=he;function fe(e,t){if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(e instanceof ce){const n=new t.EntityValue;n.deleteLater(),n.type_name=e.typeName;for(const[r,i]of Object.entries(e.properties))n.set_key_value(r,me(i,t));return e.id&&n.set_id(e.id),n}if(e instanceof ye){const n=new t.RelationshipValue;n.deleteLater(),n.type_name=e.typeName;for(const[r,i]of Object.entries(e.properties))n.set_key_value(r,me(i,t));return e.id&&n.set_id(e.id),e.originId&&e.destinationId&&n.set_related_entity_ids(e.originId,e.destinationId),n}throw new o.Z("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function me(e,t){return null==e?"":"object"!=typeof e||e instanceof Date?e:e instanceof ne.Z?oe(e,t):""}let ge=class extends f.Z{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,r._)([(0,l.Cb)()],ge.prototype,"name",void 0),(0,r._)([(0,l.Cb)()],ge.prototype,"supportedCategory",void 0),(0,r._)([(0,l.Cb)()],ge.prototype,"analyzers",void 0),(0,r._)([(0,l.Cb)()],ge.prototype,"searchProperties",void 0),ge=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.SearchIndex")],ge);const we=ge;var be,_e,xe,Ce,ve,Ee,Ie;function Te(e){return e.deleteLater(),new O(Se(e))}function Me(e){return e.deleteLater(),new j({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Ne(e.fields)})}function Se(e){return{name:e.name,alias:e.alias,role:be[e.role.value]?be[e.role.value]:null,strict:e.strict,properties:je(e.properties),fieldIndexes:De(e.field_indexes)}}function Le(e){return e.deleteLater(),new G({alias:e.alias,name:e.name,fieldType:_e[e.field_type.value]?_e[e.field_type.value]:null,geometryType:xe[e.geometry_type.value]?xe[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ee[e.role.value],defaultValue:e.default_value})}function ke(e){e.deleteLater();const t=Se(e),n=[];for(let t=0;t<e.end_points.size();t++){const r=e.end_points.get(t);n.push({originEntityType:r.origin_entity_type,destinationEntityType:r.dest_entity_type})}return new B(Object.assign({endPoints:n},t))}function Re(e){const t=[];for(let n=0;n<e.size();n++)t.push(Te(e.get(n)));return t}function Ne(e){const t=[];for(let n=0;n<e.size();n++)t.push(e.get(n));return t}function je(e){const t=[];for(let n=0;n<e.size();n++)t.push(Le(e.get(n)));return t}function De(e){const t=[];for(let n=0;n<e.size();n++)t.push(Me(e.get(n)));return t}function Ge(e){const t=[];for(let n=0;n<e.size();n++)t.push(ke(e.get(n)));return t}function Pe(e){const t=[];for(let n=0;n<e.size();n++){const n=new we,r=e.get(0);n.name=r.name,n.supportedCategory=ve[r.supported_category.value];const i=r.analyzers.size();for(let e=0;e<i;e++)n.analyzers.push({name:r.analyzers.get(e).name});for(let e=0;e<r.search_properties.keys().size();e++){const t=r.search_properties.keys().get(e),i=r.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));n.searchProperties.set(t,{propertyNames:o})}t.push(n)}return t}!function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(be||(be={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(_e||(_e={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(xe||(xe={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(Ce||(Ce={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(ve||(ve={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension"}(Ee||(Ee={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(Ie||(Ie={}));let Ze=class extends le{constructor(e){super(e)}};Ze=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.ObjectValue")],Ze);const Fe=Ze;let Oe=class extends k.wq{constructor(e){super(e),this.path=null}};(0,r._)([(0,l.Cb)({type:[le],json:{write:!0}})],Oe.prototype,"path",void 0),Oe=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.Path")],Oe);const Ae=Oe;var Be,ze,qe;function Ye(e){const t={},n=Qe(e,t),r=e.lengths,i=e.coords;let s="";if(e.geometry_type.value===Be.ESRI_GEOMETRY_POLYGON)s="rings";else{if(e.geometry_type.value!==Be.ESRI_GEOMETRY_POLYLINE)throw new o.Z("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");s="paths"}t[s]=[];let a=0;return r.forEach((e=>{const r=[];for(let t=0;t<e;t++){const e=[];for(let t=0;t<n;t++)e[t]=i[a],a++;r.push(e)}t[s].push(r)})),t}function Qe(e,t){let n=2;return e.has_z?(t.hasZ=e.has_z,n++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,n++):t.hasM=!1,n}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Be||(Be={})),function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(ze||(ze={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(qe||(qe={}));const Ue=s.Z.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors"),$e={decodedWasmObjToQueryResponseObj:(e,t)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Be.ESRI_GEOMETRY_POINT:return function(e){const t={};let n=2;Qe(e,t);const r=e.coords;return t.x=r[0],t.y=r[1],e.has_z&&(t.z=r[n],n++),e.has_m&&(t.m=r[n]),new ee.Z(t)}(e);case Be.ESRI_GEOMETRY_MULTIPOINT:return function(e){const t={},n=Qe(e,t),r=e.lengths,i=e.coords,o=r[0];t.points=[];let s=0;for(let e=0;e<o;e++){const e=[];for(let t=0;t<n;t++)e[t]=i[s],s++;t.points.push(e)}return new K.Z(t)}(e);case Be.ESRI_GEOMETRY_POLYLINE:return n=e,new te.Z(Ye(n));case Be.ESRI_GEOMETRY_POLYGON:return function(e){return new w.Z(Ye(e))}(e);case Be.ESRI_GEOMETRY_ENVELOPE:case Be.ESRI_GEOMETRY_MULTI_PATCH:return Ue.warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Be.ESRI_GEOMETRY_NULL:case Be.ESRI_GEOMETRY_ANY:default:return Ue.warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return Ue.warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case ze.OBJECT:return function(e,t){return new Fe(Xe(e,t))}(e,t);case ze.ENTITY:return Je(e,t);case ze.RELATIONSHIP:return Ve(e,t);case ze.PATH:return function(e,t){const n=e.entity_count(),r=e.relationship_count(),i=[];for(let o=0;o<n;o++)i.push(Je(e.get_entity_at(o),t)),o<r&&i.push(Ve(e.get_relationship_at(o),t));return new Ae({path:i})}(e,t);case ze.ARRAY:return function(e,t){const n=[],r=e.count();for(let i=0;i<r;i++){const r=e.get_value_at(i);n.push(He(r,t))}return n}(e,t);default:return Ue.warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}var n}};function He(e,t){return $e.decodedWasmObjToQueryResponseObj(e,t)}function Je(e,t){const n=e.type_name,r=Xe(e,t),i=e.get_id();return new ce(Object.assign({typeName:n,id:i},r))}function Xe(e,t){const n={},r=e.key_count();for(let i=0;i<r;i++)n[e.get_key_at(i)]=He(e.get_value_at(i),t);return{properties:n}}function Ve(e,t){const n=e.type_name,r=Xe(e,t);return new ye(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},r))}let We=class extends f.Z{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,r._)([(0,l.Cb)()],We.prototype,"hasError",void 0),(0,r._)([(0,l.Cb)()],We.prototype,"error",void 0),(0,r._)([(0,l.Cb)()],We.prototype,"editResults",void 0),We=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphApplyEdits")],We);const Ke=We,et={fetchKnowledgeGraph:async e=>{const t=new $({url:e}),n=[];return n.push(nt(t)),n.push(async function(e){return et.refreshServiceDefinition(e)}(t)),await Promise.all(n),t},refreshDataModel:async e=>{e.dataModel=await ut(e)},refreshServiceDefinition:async e=>{const t=(await(0,I.Z)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new Q(t),e.serviceDefinition},executeQueryStreaming:async(e,t,n)=>{const r=`${e.url}/graph/query`;await it(e);const i=await at(r,n);i.data.body=await async function(e,t){const n=await W(),r=new n.GraphQueryRequestEncoder;if(r.deleteLater(),r.output_spatial_reference=n.SpatialReferenceUtil.WGS84(),r.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))st(t,i,r,n);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,r);else{if(t.dataModel||await nt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.Z("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");r.input_quantization_parameters=n.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,n){if(!e.extent)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.Z("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:n.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,r,n);try{r.encode()}catch(e){throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=r.get_encoding_result();if(0!==i.error.error_code)throw new o.Z("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return i.get_byte_buffer()}(t,e);const s=await rt(i.data.url,i.data);if(e.dataModel)return new L({resultRowsStream:await pt(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,n)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new o.Z("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const r=`${e.url}/graph/applyEdits`;await it(e);const i=await at(r,n);return i.data.body=await async function(e,t){if(t.dataModel||await nt(t),!t.dataModel)throw new o.Z("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const n=await W(),r=!!e.options?.cascadeDelete,i=new n.GraphApplyEditsEncoder(n.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):n.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=r;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(fe(e,n)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new o.Z("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(fe(e,n)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(fe(e,n)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new o.Z("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(fe(e,n)),ot(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new o.Z("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new o.Z("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=i.get_encoding_result();return ot(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),s.get_byte_buffer()}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),n=new((await W()).GraphApplyEditsDecoder);return n.deleteLater(),n.decode(new Uint8Array(t)),function(e){const t=new Ke;t.hasError=e.has_error(),t.hasError&&(t.error={errorCode:e.error.error_code,errorMessage:e.error.error_message});const n=e.get_edit_results_count();for(let r=0;r<n;r++){const n=e.get_edit_results_at(r),i=e.get_edit_results_type_name_at(r),o=[],s=[],a=[],l=n.get_add_results_count(),p=n.get_update_results_count(),u=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=n.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<u;e++){const t=n.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}t.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return t}(n)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await rt(i.data.url,i.data))},executeQuery:async(e,t,n)=>{const r=`${e.url}/graph/query`,i=await(0,I.Z)(r,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...n?.query},signal:n?.signal,timeout:n?.timeout}),s=i.getHeader?.("content-type"),a=i.data;if(s?.includes("application/x-protobuf")){const t=new((await W()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new M({resultRows:lt(t,a,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:i.data})},executeSearch:async(e,t,n)=>{const r=t.typeCategoryFilter,i=`${e.url}/graph/search`,s=await(0,I.Z)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:r,...n?.query},signal:n?.signal,timeout:n?.timeout}),a=s.getHeader?.("content-type"),l=s.data;if(a?.includes("application/x-protobuf")){const t=new((await W()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel)return new M({resultRows:lt(t,l,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:s.data})},executeSearchStreaming:async(e,t,n)=>{const r=`${e.url}/graph/search`;await it(e);const i=await at(r,n);i.data.body=await async function(e){const t=await W(),n=new t.GraphSearchRequestEncoder;if(n.deleteLater(),n.search_query=e.searchQuery,n.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(n.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(n.start_index=e.start),null!=e.num&&(n.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{n.set_ids_filter(re(e.idsFilter,t))}catch(e){throw new o.Z("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{n.add_named_type_filter(e)}));try{n.encode()}catch(e){throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const r=n.get_encoding_result();if(0!==r.error.error_code)throw new o.Z("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:r.error.error_code,errorMessage:r.error.error_message});return r.get_byte_buffer()}(t);const s=await rt(i.data.url,i.data);if(e.dataModel)return new L({resultRowsStream:await pt(s,e.dataModel)});throw new o.Z("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},_fetchWrapper:async(e,t)=>fetch(e,t)};async function tt(e,t,n){return et.executeQueryStreaming(e,t,n)}async function nt(e){return et.refreshDataModel(e)}async function rt(e,t){return et._fetchWrapper(e,t)}async function it(e){const t=E.id?.findCredential(e.url);t||(e.dataModel?await ut(e):await nt(e))}function ot(e,t,n){if(0!==e.error_code)throw new o.Z(t,n,{errorCode:e.error_code,errorMessage:e.error_message})}function st(e,t,n,r){null==t?n.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?n.set_param_key_value(e,t):t instanceof ne.Z?n.set_param_key_value(e,oe(t,r)):t instanceof Array?n.set_param_key_value(e,re(t,r)):n.set_param_key_value(e,ie(t,r))}async function at(e,t){return(0,I.Z)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}function lt(e,t,n){e.push_buffer(new Uint8Array(t));const r=[];let i=0;for(;e.next_row();){i||(i=e.get_header_keys().size());const t=new Array(i);for(let r=0;r<i;r++){const i=e.get_value(r);t[r]=He(i,n)}r.push(t)}if(e.has_error())throw new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return r}async function pt(e,t){const n=e.headers.get("content-type");if(e.headers.get("content-length")&&s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),n?.includes("application/x-protobuf")){const n=e.body?.getReader(),r=new((await W()).GraphQueryDecoder);return r.deleteLater(),new ReadableStream({async start(e){try{return function i(){return n?.read().then((({done:s,value:a})=>{if(s){let t;if(r.has_error()&&(t=new o.Z("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded",{errorCode:r.error.error_code,errorMessage:r.error.error_message})),n.releaseLock(),t)throw e.error(t),t;return void e.close()}const l=lt(r,a,t);return l.length>0&&e.enqueue(l),i()}))}()}catch(t){n?.releaseLock(),e.error(new o.Z("knowledge-graph:stream-decoding-error","The server returned a valid response, but there was an error decoding the response stream",{error:t})),e.close()}}})}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:e.text()})}async function ut(e){const t=`${e.url}/dataModel/queryDataModel`,n=await(0,I.Z)(t,{responseType:"array-buffer",query:{f:"pbf"}}),r=n.getHeader?.("content-type"),i=n.data;if(r?.includes("application/x-protobuf")){const e=(await W()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new o.Z("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){return e.deleteLater(),new q({timestamp:e.timestamp,spatialReference:new R.Z(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Ie[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:Ce[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:Pe(e.search_indexes),entityTypes:Re(e.entity_types),relationshipTypes:Ge(e.relationship_types)})}(e)}throw new o.Z("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:n.data})}let dt=class extends f.Z{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,l.Cb)()],dt.prototype,"openCypherQuery",void 0),dt=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphQuery")],dt);const ct=dt;let ht=class extends ct{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null}};(0,r._)([(0,l.Cb)()],ht.prototype,"bindParameters",void 0),(0,r._)([(0,l.Cb)()],ht.prototype,"bindGeometryQuantizationParameters",void 0),(0,r._)([(0,l.Cb)()],ht.prototype,"outputQuantizationParameters",void 0),ht=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.GraphQueryStreaming")],ht);const yt=ht;function ft(e){if(!e.spatialReference.isWGS84)throw new o.Z("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");let t;return t=e.xmax>180&&e.xmin<180?[[[e.xmin,e.ymin],[e.xmin,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[-180,e.ymin]]]:e.xmax>180&&e.xmin>180?[[[e.xmin-360,e.ymin],[e.xmin-360,e.ymax],[e.xmax-360,e.ymax],[e.xmax-360,e.ymin],[e.xmin-360,e.ymin]]]:e.xmax>-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[180,e.ymax],[180,e.ymin],[e.xmin+360,e.ymin]],[[-180,e.ymin],[-180,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[-180,e.ymin]]]:e.xmax<-180&&e.xmin<-180?[[[e.xmin+360,e.ymin],[e.xmin+360,e.ymax],[e.xmax+360,e.ymax],[e.xmax+360,e.ymin],[e.xmin+360,e.ymin]]]:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]],t}var mt=n(14165),gt=n(6570);const wt="ESRI__ID",bt="ESRI__ORIGIN_ID",_t="ESRI__DESTINATION_ID",xt="ESRI__LAYOUT_GEOMETRY",Ct=12,vt=s.Z.getLogger("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager");let Et=class extends f.Z{constructor(e){super(e),this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.memberIdTypeLookup=new Map,this._processingCacheUpdatesLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,r)=>{if("entity"===t.get(r))this.entityTypeNames.add(r);else{if("relationship"!==t.get(r))return vt.warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);this.relationshipTypeNames.add(r)}const i=new Map;n.members?.forEach((e=>{this.memberIdTypeLookup.set(e.id,r);const t=this.getById(e.id);t&&i.set(e.id,t)})),this.sublayerCaches.set(r,i)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.Z("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),this.memberIdTypeLookup.set(t,e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),this.memberIdTypeLookup.set(t,e)}}))}getById(e){return v.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let r;if(r=e||new mt.Z({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),i=r.outFields,o=r.geometry;let s="",a="";o&&o.extent&&(s=(0,d.fC)(o.extent.ymin,o.extent.xmin,Ct),a=(0,d.fC)(o.extent.ymax,o.extent.xmax,Ct)),i&&1===i.length&&i[0]===wt&&"1=1"===r.where||await Promise.all(n??[]);const l=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],p=[];return l.forEach((n=>{if(n.geometry=e.linkChartDiagramLookup.get(n.attributes[t.objectIdField]),n.attributes[xt]=n.geometry,s&&a){const r=e.linkChartGeohashLookup.get(n.attributes[t.objectIdField]);r?r>=s&&r<=a&&p.push(n):p.push(n)}else p.push(n)})),p}return this.retrieveDataFromService(r,t,n)}async getConnectedRecordIds(e){const t=[],n=[],r=new Map;return e.forEach((e=>{if(this.memberIdTypeLookup.has(e)){const t=this.memberIdTypeLookup.get(e);if(!this.entityTypeNames.has(t))return;r.has(t)?r.get(t)?.push(e):r.set(t,[e])}})),r.forEach(((e,r)=>{const i=`MATCH (n:${r})-[r]-(m) WHERE id(n) IN $ids RETURN id(r), type(r), id(m), labels(m)[0]`,o=new Promise((n=>{(async()=>{const n=(await tt(this.knowledgeGraph,new yt({openCypherQuery:i,bindParameters:{ids:e}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:r}=await n.read();if(e)break;for(let e=0;e<r.length;e++){const n=r[e];t.push({id:n[0],typeName:n[1]}),t.push({id:n[2],typeName:n[3]})}}}catch(e){if("AbortError"!==e.name)throw e;vt.info("Request aborted as expected")}})().then((()=>{n()}))}));n.push(o)})),await Promise.all(n),t}async refreshCacheContent(e,t,n,r=!0){const i=v.getInstance(),s=[],a=new Map,l=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&l.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e)){const t=this.memberIdTypeLookup.get(e);a.has(t)?a.get(t)?.push(e):a.set(t,[e])}})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?a.set(t,null):e.members&&e.members.forEach((e=>{a.has(t)&&null!==a.get(t)?a.get(t)?.push(e.id):a.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&a.set(e.name,null)})));for(const[e,p]of a){const a=new Promise((s=>{(async()=>{const s=new Set,a=[];let u,d="",c=!1;if(t||l.get(e)?.properties?.forEach((e=>{e.name&&s.add(e.name)})),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&s.add(t)}if(this.entityTypeNames.has(e))d=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,s.forEach((e=>{d+=`, n.${e}`,a.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new o.Z("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,d=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,s.forEach((e=>{d+=`, n.${e}`,a.push(e)}))}u=new yt(p?{openCypherQuery:d,bindParameters:{ids:p}}:{openCypherQuery:d});const h=(await tt(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await h.read();if(t)break;const o=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,i=0;const s={properties:{}};for(s.id=t[r],r++,i++,c&&(s.originId=t[r],r++,i++,s.destinationId=t[r],r++,i++,(0,m.s1)(this.nodeConnectionsLookup,s.originId,(()=>new Set)).add(s.id),(0,m.s1)(this.nodeConnectionsLookup,s.destinationId,(()=>new Set)).add(s.id));r<t.length;r++)s.properties[a[r-i]]=t[r];o.push(s)}const s=i.writeToStore(o,wt,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach((t=>{l?.set(t.attributes[wt],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[wt])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[wt],{id:t.attributes[wt]}),this.memberIdTypeLookup.set(t.attributes[wt],e))}))}})().then((()=>{s(null)}))}));s.push(a),this._processingCacheUpdatesLookup.get(e)?.push(a)}await Promise.all(s)}removeFromLayer(e){const t=new Set,n=new Set(e.map((e=>e.id)));for(const n of e)t.add(n.typeName),this.memberIdTypeLookup.delete(n.id),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.members?.has(n.id)&&e.members.delete(n.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,r)=>{n.has(r)&&this.sublayerCaches.get(e)?.delete(r)}))}))}async retrieveDataFromService(e,t,n){const r=v.getInstance(),i=new Set,s=[];let a,l="",p=[];const u="relationship"===t.graphType,d=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,c=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let h=!d&&c?Array.from(c).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(h=e.objectIds);else if(null!=e.objectIds&&h&&h.length>0){const t=e.objectIds;e.objectIds=h.filter((e=>t.includes(e)))}else if(null!=e.objectIds)h=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=h}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach((e=>{i.add(e.name)})):n.forEach((e=>{e!==wt&&e!==t.geometryFieldName&&i.add(e)}))}if(null!=e.geometry){const n=e.geometry;let r;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,d=p?.spatialReference,c=p?.serviceCapabilities?.geometryCapabilities;let h=c?.geometryMaxBoundingRectangleSizeX,y=c?.geometryMaxBoundingRectangleSizeY;if(n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,b.initializeProjection)(n.extent.spatialReference,_.Zn),r=(0,b.project)(n.extent,_.Zn)):r=n.extent,h&&y&&d){if(4326!==d.wkid){const e=new gt.Z({spatialReference:d,xmax:h,ymax:y}),t=(0,b.project)(e,_.Zn);h=t.xmax,y=t.ymax}if(r.xmax-r.xmin>h)throw new o.Z("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${h}° latitude, limit exceeded`);if(r.ymax-r.ymin>y)throw new o.Z("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${y}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,g.E)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{n.fieldNames.includes(e.name)&&i.add(e.name)}))}l=u?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{l+=`, n.${e}`,s.push(e)})),a=new yt({openCypherQuery:l,bindParameters:{param_filter_geom:new w.Z({rings:ft(r)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,g.E)(e.where,t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&i.add(e.name)}));const o=new Set(["column-reference","string","number","binary-expression"]),s=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.has(e.left.type)&&o.has(e.right.type)&&s.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(r.parseTree),a&&(n="")}let r="";r=u?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;h&&(o=!0,r+=" WHERE ID(n) IN $ids"),n&&(r+=o?" AND":" WHERE",r+=` ${n}`),r+=" return ID(n)",u&&(r+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&i.add(t.geometryFieldName),i.forEach((e=>{r+=`, n.${e}`,s.push(e)})),a=new yt(h?{openCypherQuery:r,bindParameters:{ids:h}}:{openCypherQuery:r})}const y=(await tt(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await y.read();if(e)break;const i=[];for(let e=0;e<n.length;e++){const t=n[e];let r=0,o=0;const a={properties:{}};for(a.id=t[r],r++,o++,u&&(a.originId=t[r],r++,o++,a.destinationId=t[r],r++,o++);r<t.length;r++)a.properties[s[r-o]]=t[r];i.push(a)}p=p.concat(r.writeToStore(i,wt,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}};(0,r._)([(0,l.Cb)()],Et.prototype,"knowledgeGraph",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"entityTypeNames",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"geographicLookup",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"sublayerCaches",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"nodeConnectionsLookup",void 0),(0,r._)([(0,l.Cb)()],Et.prototype,"memberIdTypeLookup",void 0),Et=(0,r._)([(0,u.j)("esri.rest.knowledgeGraph.knowledgeGraphLayer.KnowledgeGraphLayerDataManager")],Et);var It=n(51773),Tt=(n(16050),n(12501),n(28756),n(92271),n(72529),n(5499),n(84382),n(81571),n(91423)),Mt=n(32400),St=(n(56569),n(28972)),Lt=n(11028),kt=n(25278);const Rt=(0,n(53518).v)(),Nt=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,l.Cb)(Rt.fields)],t.prototype,"fields",void 0),(0,r._)([(0,l.Cb)(Rt.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,u.j)("esri.layers.knowledgeGraphLayer.KnowledgeGraphSublayerBase")],t),t};var jt=n(71612),Dt=n(6404),Gt=n(34760),Pt=n(72965),Zt=n(1231),Ft=n(35671),Ot=n(74889),At=n(32163),Bt=n(728),zt=n(86973);let qt=class extends((0,Dt.M)(Nt((0,jt.h)((0,Pt.M)((0,Gt.Q)(c.Z)))))){constructor(e){if(super(e),this.capabilities=(0,kt.MS)(!1,!1),this.definitionExpression="",this.displayField="",this.elevationInfo=null,this.geometryType=null,this.geometryFieldName=null,this.graphType=null,this.hasM=!1,this.hasZ=!1,this.labelsVisible=null,this.labelingInfo=null,this.objectIdField=wt,this.objectType=null,this.parentCompositeLayer=null,this.popupTemplate=null,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new Bt.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=mt.Z.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer","link-chart"===e.parentCompositeLayer.type)"relationship"===e.graphType?this.geometryType="polyline":this.geometryType="point",this.geometryFieldName=xt;else if(e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType&&"esriGeometryNull"!==e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name)?.geometryType){const t=e.parentCompositeLayer.dataManager.geographicLookup.get(e.objectType.name);this.geometryFieldName=t?.name??null,this.geometryType=t?.geometryType?zt.M.fromJSON(t.geometryType):null;const n=t?.name,r=n?e.objectType.properties?.[n]:null;r?(this.hasM=r.hasM??!1,this.hasZ=r.hasZ??!1):(this.hasM=!1,this.hasZ=!1)}else this.geometryType=null;e.objectType.properties?.forEach((e=>{let t=e.fieldType;"esriFieldTypeOID"===t&&(t="esriFieldTypeInteger"),this.fields.push(Zt.Z.fromJSON({name:e.name,type:t,alias:e.alias,defaultValue:null,editable:e.editable,nullable:e.nullable}))})),this.fields.push(Zt.Z.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1})),this._set("fields",[...this.fields]),e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel?.spatialReference&&(this.spatialReference=e.parentCompositeLayer.dataManager.knowledgeGraph.dataModel.spatialReference),"link-chart"===e.parentCompositeLayer.type?"relationship"===e.graphType?this.renderer=(0,Tt.i)((0,kt.bU)(zt.M.toJSON("polyline")).renderer):this.renderer=(0,Tt.i)((0,kt.bU)(zt.M.toJSON("point")).renderer):this.renderer=(0,Tt.i)((0,kt.bU)(zt.M.toJSON(this.geometryType)).renderer)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Ft.YN)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,At.eZ)(this,e)}createQuery(){return new mt.Z({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];throw new Error("Field not found")}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e),i=Ot.Z.fromJSON(await r.executeQuery(n.toJSON(),t?.signal));return i.features.forEach((e=>{e.sourceLayer=this})),i}async queryFeaturesJSON(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return await r.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(e);return r.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){const n={...e,returnGeometry:!0},{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(n),o=await i.executeQueryForExtent(r.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new gt.Z(o.extent):new gt.Z,{count:o.count,extent:s}}async queryObjectIds(e,t){const n=mt.Z.from(e);let r;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);r=this.loadQueryEngine(e)}return r.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new St.Z({geometryType:zt.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new Lt.q({fields:this.fields.map((e=>e.toJSON())),geometryType:zt.M.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new mt.Z({where:"1=1",outFields:[wt]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const n=mt.Z.from(e),r=n.geometry;let i;if(r&&!r.spatialReference?.isWGS84&&(await(0,b.initializeProjection)(r.spatialReference,_.Zn),n.geometry=(0,b.project)(r instanceof w.Z||r instanceof te.Z?r:r.extent,_.Zn)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return{resolvedQuery:n,queryEngine:i}}};(0,r._)([(0,l.Cb)()],qt.prototype,"capabilities",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],qt.prototype,"defaultPopupTemplate",null),(0,r._)([(0,l.Cb)()],qt.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"displayField",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"elevationInfo",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"geometryFieldName",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"graphType",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"hasM",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"hasZ",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"labelsVisible",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"labelingInfo",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"objectIdField",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"objectType",void 0),(0,r._)([(0,l.Cb)()],qt.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,l.Cb)({type:It.Z,json:{name:"popupInfo",write:!0}})],qt.prototype,"popupTemplate",void 0),(0,r._)([(0,l.Cb)({types:Mt.A,json:{write:{target:"layerDefinition.drawingInfo.renderer"}}})],qt.prototype,"renderer",null),(0,r._)([(0,l.Cb)()],qt.prototype,"source",void 0),(0,r._)([(0,l.Cb)({json:{read:!1}})],qt.prototype,"type",void 0),qt=(0,r._)([(0,u.j)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],qt);const Yt=qt;let Qt,Ut=null;var $t,Ht,Jt,Xt,Vt,Wt,Kt,en,tn;function nn(e,t,n,r,i,o){const s=n.length,a=i.length,l=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,d=15+s*(u+2*l)+a*(2*p),c=Ut._malloc(d);try{const u=c+16-c%16,d=u+s*l,h=d+s*l,y=h+a*p,f=y+a*p,m=()=>[Ut.HEAPF64.subarray(u>>3,(u>>3)+s),Ut.HEAPF64.subarray(d>>3,(d>>3)+s),Ut.HEAPU32.subarray(h>>2,(h>>2)+a),Ut.HEAPU32.subarray(y>>2,(y>>2)+a),Ut.HEAPU8.subarray(f,f+s)],[g,w,b,_,x]=m();g.set(n),w.set(r),b.set(i),_.set(o),x.set(t);const C=e(s,f,u,d,a,h,y),[v,E,I,T,M]=m();return n.set(v),r.set(E),i.set(I),o.set(T),t.set(M),C}finally{Ut._free(c)}}!function(e){e[e.None=0]="None",e[e.IsMovable=1]="IsMovable",e[e.IsGeographic=2]="IsGeographic",e[e.IsRoot=4]="IsRoot"}($t||($t={})),function(e){e.getMinIdealEdgeLength=function(){return Ut.getMinIdealEdgeLength()},e.apply=function(e,t,n,r,i,o=2,s=1,a=-1){return nn(((e,t,n,r,i,l,p)=>Ut.applyForceDirectedLayout(e,t,n,r,i,l,p,o,s,a)),e,t,n,r,i)}}(Ht||(Ht={})),function(e){e.apply=function(e,t,n,r,i,o=2,s=1,a=-1){return nn(((e,t,n,r,i,l,p)=>Ut.applyCommunityLayout(e,t,n,r,i,l,p,o,s,a)),e,t,n,r,i)}}(Jt||(Jt={})),function(e){e.apply=function(e,t,n,r,i){return nn(Ut.applySimpleLayout,e,t,n,r,i)}}(Xt||(Xt={})),function(e){e.apply=function(e,t,n,r,i){return nn(Ut.applyHierarchicalLayout,e,t,n,r,i)}}(Vt||(Vt={})),function(e){e.apply=function(e,t,n,r,i){return nn(Ut.applyRadialTreeLayout,e,t,n,r,i)}}(Wt||(Wt={})),function(e){e.apply=function(e,t,n,r,i){return nn(Ut.applySmartTreeLayout,e,t,n,r,i)}}(Kt||(Kt={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(en||(en={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(tn||(tn={}));let rn=class extends((0,jt.h)((0,Pt.M)(c.Z))){constructor(e){if(super(e),this.dataPreloadedInLocalCache=!1,this.defaultLinkChartConfig=null,this._currentLinkChartConfig={layoutMode:"RADIAL_TREE",xScaleFactor:1,yScaleFactor:1},this._graphTypeLookup=new Map,this.knowledgeGraph=null,this.layers=new i.Z,this.linkChartDiagramLookup=new Map,this.linkChartExtent=new gt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.linkChartGeohashLookup=new Map,this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.sublayerIdsCache=new Map,this.tables=new i.Z,this.type="link-chart",this._originalInclusionList=e.inclusionModeDefinition,e.dataPreloadedInLocalCache&&!e.inclusionModeDefinition)throw new o.Z("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it")}normalizeCtorArgs(e){return{url:e.url,title:e.title,dataPreloadedInLocalCache:e.dataPreloadedInLocalCache,defaultLinkChartConfig:e.defaultLinkChartConfig}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let n=[],r=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new o.Z("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),e.inclusionModeDefinition?.generateAllSublayers?(n=e.knowledgeGraph.dataModel.entityTypes??[],r=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((i,o)=>{if(!this._graphTypeLookup.get(o))return s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);this._graphTypeLookup.get(o)instanceof B||"strictOrigin"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),r.push(this._graphTypeLookup.get(o))):this._graphTypeLookup.get(o)instanceof O||"properties"in this._graphTypeLookup.get(o)?t.has(o)||(t.add(o),n.push(this._graphTypeLookup.get(o))):(s.Z.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(n=e.knowledgeGraph.dataModel.entityTypes??[],r=e.knowledgeGraph.dataModel.relationshipTypes??[]);const i=new Et({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=n,this.memberRelationshipTypes=r,this.dataManager=i}load(e){return this.addResolvingPromise(new Promise((t=>{(async function(e){return et.fetchKnowledgeGraph(e)})(this.url).then((n=>{if(this._initializeLayerProperties({knowledgeGraph:n,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache)this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1,e.members?.forEach((e=>{let t;t=e.linkChartLocation instanceof y.Z?e.linkChartLocation:e.linkChartLocation?(0,h.GH)(e.linkChartLocation):null,this.linkChartDiagramLookup.set(e.id,t),t&&2===t.coords.length&&0===t.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,d.fC)(t.coords[1],t.coords[0],Ct)):this.linkChartGeohashLookup.set(e.id,"")})),this.addResolvingPromise(this._initializeDiagram().then((async()=>{this.layers.forEach((async e=>{await e.refreshCachedQueryEngine()})),this.tables.forEach((async e=>{await e.refreshCachedQueryEngine()}))})))}));else{const t="GEOGRAPHIC"===this.defaultLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,t,!0).then((async()=>{(0,a.k_)(e);const t=[],n=[];this.loadLayerAssumingLocalCache(),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1,this.dataManager.inclusionModeDefinition.namedTypeDefinitions.forEach((e=>{e.useAllData=!1}))),await this._initializeDiagram(),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine()),t.push(new Promise((t=>{e.on("layerview-create",(()=>{t(null)}))})))})),this.tables.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n)})))}t(null)}))}))),Promise.resolve(this)}async addRecords(e,t){let n=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(n=await async function(e,t){const n=[],r=new Map,i=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&r.set(e.name,[]);for(const t of e)r.has(t.typeName)&&r.get(t.typeName)?.push(t.id);for(const[e,o]of r){if(o.length<1)continue;const r=new yt({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:o}});i.push(tt(t,r).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:r}=await t.read();if(e)break;for(const e of r)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(i),n}(e,this.dataManager.knowledgeGraph));const r=e.concat(n).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));await this._handleNewRecords(r)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:n=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1}){let r=[];for(const t of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id)&&r.push(t);if(t){const e=new Set,t=[];for(const t of r)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const n of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(n);for(const n of e)this.dataManager.memberIdTypeLookup.has(n)&&t.push({id:n,typeName:this.dataManager.memberIdTypeLookup.get(n)});r=r.concat(t)}this.dataManager.removeFromLayer(r);for(const e of r)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.linkChartDiagramLookup.delete(e.id);n&&await this.calculateLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor});const i=[];return this.layers.forEach((e=>{i.push(e.refreshCachedQueryEngine())})),await Promise.all(i),this._refreshNamedTypes(),r}async expand(e){const t=await this.dataManager.getConnectedRecordIds(e),n=t.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));return await this._handleNewRecords(t),{records:n}}loadLayerAssumingLocalCache(){this.memberRelationshipTypes.forEach((e=>{const t=new Yt({objectType:e,parentCompositeLayer:this,graphType:"relationship",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.memberEntityTypes.forEach((e=>{const t=new Yt({objectType:e,parentCompositeLayer:this,graphType:"entity",title:e.name});t.geometryType?this.layers.push(t):this.tables.push(t),this.dataManager.sublayerCaches.has(e.name)||this.dataManager.sublayerCaches.set(e.name,new Map)})),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{const n=((e,t,n)=>(e.has(t)||e.set(t,new Set),e.get(t)))(this.sublayerIdsCache,t);e.members?.forEach((e=>{if(n.add(e.id),e.linkChartLocation)if(e.linkChartLocation instanceof y.Z)this.linkChartDiagramLookup.set(e.id,e.linkChartLocation),2===e.linkChartLocation.coords.length&&0===e.linkChartLocation.lengths.length?this.linkChartGeohashLookup.set(e.id,(0,d.fC)(e.linkChartLocation.coords[1],e.linkChartLocation.coords[0],Ct)):this.linkChartGeohashLookup.set(e.id,"");else{const t=(0,h.GH)(e.linkChartLocation);this.linkChartDiagramLookup.set(e.id,e.linkChartLocation?t:null),"x"in e.linkChartLocation&&"y"in e.linkChartLocation?this.linkChartGeohashLookup.set(e.id,(0,d.fC)(e.linkChartLocation.x,e.linkChartLocation.y,Ct)):this.linkChartGeohashLookup.set(e.id,"")}}))}))}async calculateLinkChartLayout(e="RADIAL_TREE",t){const r=[],i=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{r.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.linkChartDiagramLookup=new Map;const a=new Map,l=new Map,p=new Map,u=new Map,c=new Uint8Array(r.length),y=new Float64Array(r.length),f=new Float64Array(r.length),m=new Uint32Array(i.length),g=new Uint32Array(i.length),w=[],b=t?.xScaleFactor??1,_=t?.yScaleFactor??1,x=new gt.Z({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let C,v="FORCE_DIRECTED",E=0,I=0;switch(v="GEOGRAPHIC"===e?"FORCE_DIRECTED":e,v){case"FORCE_DIRECTED":C=Ht.apply;break;case"COMMUNITY":C=Jt.apply;break;case"HIERARCHICAL":C=Vt.apply;break;case"RADIAL_TREE":C=Wt.apply;break;case"SMART_TREE":C=Kt.apply;break;default:C=Xt.apply}r.forEach((({typeName:n,feature:r})=>{if(t?.lockedNodeLocations?.has(r.attributes[wt])){"GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)?c[E]=$t.IsGeographic:c[E]=$t.None;const i=t.lockedNodeLocations.get(r.attributes[wt]);y[E]=i.x,f[E]=i.y}else if("GEOGRAPHIC"===e&&this.dataManager.geographicLookup.has(n)){c[E]=$t.IsGeographic;let e=null;const t=r.attributes[this.dataManager.geographicLookup.get(n).name],i=this.dataManager.geographicLookup.get(n)?.geometryType;switch(i){case"esriGeometryPoint":y[E]=t?.x,f[E]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[E]=e.x,f[E]=e.y):c[E]=$t.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[E]=e.x,f[E]=e.y):c[E]=$t.IsMovable;break;default:c[E]=$t.IsMovable}(null==y[E]||null==f[E]||Number.isNaN(y[E])||Number.isNaN(f[E]))&&(c[E]=$t.IsMovable,y[E]=0,f[E]=0)}else c[E]=$t.IsMovable,y[E]=0,f[E]=0;u.set(r.attributes[wt],E),w[E]={feature:r,typeName:n},E++}));let T=!1;if(i.forEach((e=>{const t=u.get(e.feature.attributes[bt]),n=u.get(e.feature.attributes[_t]);void 0!==t&&void 0!==n?(m[I]=t,g[I]=n,I++):(T=!0,this.linkChartDiagramLookup.set(e.feature.attributes[bt],null),this.linkChartGeohashLookup.set(e.feature.attributes[bt],null))})),T&&s.Z.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null"),await(Qt||(Qt=n.e(6124).then(n.bind(n,36124)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,H.V)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){Ut=e}(e)})),Qt)),!C(c,y,f,m,g))throw new o.Z("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");for(let e=0;e<w.length;e++){if(c[e]===$t.IsMovable&&(y[e]=y[e]*b,f[e]=f[e]*_),f[e]>84.9999&&(f[e]=84.9999),f[e]<-84.9999&&(f[e]=-84.9999),y[e]>179.9999&&(y[e]=179.9999),y[e]<-179.9999&&(y[e]=-179.9999),w[e].feature.attributes[xt]=new ee.Z(y[e],f[e]),a.has(w[e].typeName)){const t=a.get(w[e].typeName);t?.set(w[e].feature.attributes[wt],w[e].feature)}else{const t=new Map;t.set(w[e].feature.attributes[wt],w[e].feature),a.set(w[e].typeName,t)}p.set(w[e].feature.attributes[wt],w[e].feature);const t=(0,h.GH)(w[e].feature.attributes[xt]);this.linkChartDiagramLookup.set(w[e].feature.attributes[wt],w[e].feature.attributes[xt]?t:null),this.linkChartGeohashLookup.set(w[e].feature.attributes[wt],(0,d.fC)(w[e].feature.attributes[xt].y,w[e].feature.attributes[xt].x,Ct)),w[e].feature.attributes[xt].x<x.xmin&&(x.xmin=w[e].feature.attributes[xt].x),w[e].feature.attributes[xt].x>x.xmax&&(x.xmax=w[e].feature.attributes[xt].x),w[e].feature.attributes[xt].y<x.ymin&&(x.ymin=w[e].feature.attributes[xt].y),w[e].feature.attributes[xt].y>x.ymax&&(x.ymax=w[e].feature.attributes[xt].y)}return this.linkChartExtent.xmin=x.xmin,this.linkChartExtent.xmax=x.xmax,this.linkChartExtent.ymin=x.ymin,this.linkChartExtent.ymax=x.ymax,i.forEach((e=>{const t=w[u.get(e.feature.attributes[bt])]?.feature.attributes[xt],n=w[u.get(e.feature.attributes[_t])]?.feature.attributes[xt];if(!t||!n)return;const r=new te.Z({paths:[[t.x,t.y],[n.x,n.y]]});if(e.feature.attributes[xt]=r,l.has(e.typeName)){const t=l.get(e.typeName);t?.set(e.feature.attributes[wt],e.feature)}else{const t=new Map;t.set(e.feature.attributes[wt],e.feature),l.set(e.typeName,t)}p.set(e.feature.attributes[wt],e.feature);const i=(0,h.GH)(e.feature.attributes[xt]);this.linkChartDiagramLookup.set(e.feature.attributes[wt],e.feature.attributes[xt]?i:null),this.linkChartGeohashLookup.set(e.feature.attributes[wt],"")})),this._currentLinkChartConfig={layoutMode:e,xScaleFactor:b,yScaleFactor:_},{nodes:a,links:l,idMap:p}}async applyNewLinkChartLayout(e="RADIAL_TREE",t){const n=[];await this.calculateLinkChartLayout(e,t),this.layers.forEach((e=>{n.push(e.refreshCachedQueryEngine())})),await Promise.all(n),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;return this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((t=>{t?.members?.forEach((t=>{const n=t.linkChartLocation;let r;const i=t.id;n&&(r="x"in n?{x:n.x,y:n.y}:{x:n.coords[0],y:n.coords[1]},e.set(i,new ee.Z({x:r.x,y:r.y})))}))})),e}async synchronizeInclusionListWithCache(){return new Promise((e=>{this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{if(e.useAllData=!1,e.members&&e.members.size>0){if(!this.dataManager.sublayerCaches.get(t))return;const n=new Set(Array.from(this.dataManager.sublayerCaches.get(t).keys()));Array.from(e.members.keys()).filter((e=>!n.has(e))).forEach((t=>{e.members?.delete(t)}))}})),e()}))}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const n of e)this.sublayerIdsCache.has(n.typeName)||(this.sublayerIdsCache.set(n.typeName,new Set),t.push(n.typeName)),this.sublayerIdsCache.get(n.typeName).add(n.id);for(const e of t)if(this._graphTypeLookup.has(e)){const t=this._graphTypeLookup.get(e),n="endPoints"in t?"relationship":"entity",r=new Yt({objectType:t,parentCompositeLayer:this,graphType:n,title:e});"entity"===n?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),r.geometryType?this.layers.push(r):this.tables.push(r),this.dataManager.sublayerCaches.set(e,new Map)}await this.dataManager.refreshCacheContent(e.map((e=>e.id))),await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,{xScaleFactor:this._currentLinkChartConfig.xScaleFactor,yScaleFactor:this._currentLinkChartConfig.xScaleFactor})}async _initializeDiagram(){this.defaultLinkChartConfig?this.defaultLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e=>{e?.members?.forEach((e=>{const t=e.linkChartLocation;let n;const r=e.id;if(!t)return;n="x"in t?{x:t.x,y:t.y}:{x:t.coords[0],y:t.coords[1]};const i=(0,h.GH)(n);this.linkChartDiagramLookup.set(r,i),this.linkChartGeohashLookup.set(r,(0,d.fC)(n.x,n.y,Ct)),this.linkChartExtent.xmin>n.x&&(this.linkChartExtent.xmin=n.x),this.linkChartExtent.xmax<n.x&&(this.linkChartExtent.xmax=n.x),this.linkChartExtent.ymin>n.y&&(this.linkChartExtent.ymin=n.y),this.linkChartExtent.ymax<n.y&&(this.linkChartExtent.ymax=n.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.linkChartDiagramLookup.get(e.attributes[bt]),n=this.linkChartDiagramLookup.get(e.attributes[_t]);if(t&&n){const r=(0,h.GH)(new te.Z({paths:[[t.coords[0],t.coords[1]],[n.coords[0],n.coords[1]]]}));this.linkChartDiagramLookup.set(e.attributes[wt],r)}else this.linkChartDiagramLookup.set(e.attributes[wt],null);this.linkChartGeohashLookup.set(e.attributes[wt],"")}))}))):await this.calculateLinkChartLayout(this.defaultLinkChartConfig.layoutMode,{xScaleFactor:this.defaultLinkChartConfig.xScaleFactor,yScaleFactor:this.defaultLinkChartConfig.yScaleFactor,lockedNodeLocations:this.getCurrentNodeLocations()}):await this.calculateLinkChartLayout("RADIAL_TREE",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}};(0,r._)([(0,l.Cb)()],rn.prototype,"dataPreloadedInLocalCache",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"defaultLinkChartConfig",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"dataManager",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"knowledgeGraph",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"layers",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"linkChartDiagramLookup",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"linkChartExtent",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"linkChartGeohashLookup",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"memberEntityTypes",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"memberRelationshipTypes",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"sublayerIdsCache",void 0),(0,r._)([(0,l.Cb)()],rn.prototype,"tables",void 0),(0,r._)([(0,l.Cb)({json:{read:!1}})],rn.prototype,"type",void 0),rn=(0,r._)([(0,u.j)("esri.layers.LinkChartLayer")],rn);const on=rn},37549:(e,t,n)=>{n.d(t,{H:()=>a});var r=n(80442),i=n(24133),o=n(24470);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.Q(9,(0,r.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((n,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},28972:(e,t,n)=>{n.d(t,{Z:()=>E});var r=n(67676),i=n(20102),o=n(32448),s=n(92604),a=n(60437),l=n(24470),p=n(98732),u=n(37549);function d(e,t){return e?t?4:3:t?3:2}function c(e,t,n,r,i){if(null==t||!t.lengths.length)return null;const o="upperLeft"===i?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const s=e.coords,a=[],l=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:p,coords:u}=t,c=d(n,r);let f=0;for(const e of p){const t=h(l,u,f,e,n,r,o);t&&a.push(t),f+=e*c}if(a.sort(((e,t)=>{let r=o*e[2]-o*t[2];return 0===r&&n&&(r=e[4]-t[4]),r})),a.length){let e=6*a[0][2];s[0]=a[0][0]/e,s[1]=a[0][1]/e,n&&(e=6*a[0][4],s[2]=0!==e?a[0][3]/e:0),(s[0]<l[0]||s[0]>l[1]||s[1]<l[2]||s[1]>l[3]||n&&(s[2]<l[4]||s[2]>l[5]))&&(s.length=0)}if(!s.length){const e=t.lengths[0]?y(u,0,p[0],n,r):null;if(!e)return null;s[0]=e[0],s[1]=e[1],n&&e.length>2&&(s[2]=e[2])}return e}function h(e,t,n,r,i,o,s=1){const a=d(i,o);let l=n,p=n+a,u=0,c=0,h=0,y=0,f=0;for(let n=0,o=r-1;n<o;n++,l+=a,p+=a){const n=t[l],r=t[l+1],o=t[l+2],s=t[p],a=t[p+1],d=t[p+2];let m=n*a-s*r;y+=m,u+=(n+s)*m,c+=(r+a)*m,i&&(m=n*d-s*o,h+=(o+d)*m,f+=m),n<e[0]&&(e[0]=n),n>e[1]&&(e[1]=n),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),i&&(o<e[4]&&(e[4]=o),o>e[5]&&(e[5]=o))}if(y*s>0&&(y*=-1),f*s>0&&(f*=-1),!y)return null;const m=[u,c,.5*y];return i&&(m[3]=h,m[4]=.5*f),m}function y(e,t,n,r,i){const o=d(r,i);let s=t,a=t+o,l=0,p=0,u=0,c=0;for(let t=0,i=n-1;t<i;t++,s+=o,a+=o){const t=e[s],n=e[s+1],i=e[s+2],o=e[a],d=e[a+1],h=e[a+2],y=r?m(t,n,i,o,d,h):f(t,n,o,d);if(y)if(l+=y,r){const e=w(t,n,i,o,d,h);p+=y*e[0],u+=y*e[1],c+=y*e[2]}else{const e=g(t,n,o,d);p+=y*e[0],u+=y*e[1]}}return l>0?r?[p/l,u/l,c/l]:[p/l,u/l]:n>0?r?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function f(e,t,n,r){const i=n-e,o=r-t;return Math.sqrt(i*i+o*o)}function m(e,t,n,r,i,o){const s=r-e,a=i-t,l=o-n;return Math.sqrt(s*s+a*a+l*l)}function g(e,t,n,r){return[e+.5*(n-e),t+.5*(r-t)]}function w(e,t,n,r,i,o){return[e+.5*(r-e),t+.5*(i-t),n+.5*(o-n)]}var b=n(70272),_=n(5428);const x={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new b.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=c(new _.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var C=n(11490);const v=(0,a.Ue)();class E{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new o.Z,this.featureAdapter=x}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:(0,C.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(r.pC)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.JR)(v,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,n)=>{this._markedIds.has(n)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void s.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let r;if(this._markedIds.add(t),n?(e.displayId=n.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,p.$)(null!=r?r:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return s.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._markedIds.add(t);const{geometry:r,attributes:o}=e;for(const e in o)n.attributes[e]=o[e];return r&&(n.geometry=r,this._boundsStore.set(t,(0,p.$)((0,l.Ue)(),r,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},61159:(e,t,n)=>{n.d(t,{g:()=>r});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,n)=>{n.d(t,{_W:()=>h,iV:()=>m,oj:()=>w});var r=n(67676),i=n(95330),o=n(73615),s=n(37455),a=n(8744),l=n(40488);const p=[0,0];function u(e,t){if(!t)return null;if("x"in t){const n={x:0,y:0};return[n.x,n.y]=e(t.x,t.y,p),null!=t.z&&(n.z=t.z),null!=t.m&&(n.m=t.m),n}if("xmin"in t){const n={xmin:0,ymin:0,xmax:0,ymax:0};return[n.xmin,n.ymin]=e(t.xmin,t.ymin,p),[n.xmax,n.ymax]=e(t.xmax,t.ymax,p),t.hasZ&&(n.zmin=t.zmin,n.zmax=t.zmax,n.hasZ=!0),t.hasM&&(n.mmin=t.mmin,n.mmax=t.mmax,n.hasM=!0),n}return"rings"in t?{rings:d(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:d(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:c(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function d(e,t){const n=[];for(const r of e)n.push(c(r,t));return n}function c(e,t){const n=[];for(const r of e){const e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function h(e,t){if(!e||!t)return;const n=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(r.pC):[e];await(0,o.initializeProjection)(n.map((e=>({source:e,dest:t}))))}const y=u.bind(null,l.hG),f=u.bind(null,l.R6);function m(e,t,n,r){if(!e)return e;if(n||(n=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(n)||(0,a.fS)(t,n))return e;if((0,l.Q8)(t,n)){const t=(0,a.sS)(n)?y(e):f(e);return t.spatialReference=n,t}return(0,o.projectMany)(s.N,[e],t,n,null,r)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e||!e.length||!t||!n||(0,a.fS)(t,n))return e;const o={geometries:e,inSpatialReference:t,outSpatialReference:n,geographicTransformation:r,resolve:(0,i.hh)()};return this._jobs.push(o),this._timer??=setTimeout(this._process,10),o.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:n,outSpatialReference:r,resolve:i,geographicTransformation:p}=e;(0,l.Q8)(n,r)?(0,a.sS)(r)?i(t.map(y)):i(t.map(f)):i((0,o.projectMany)(s.N,t,n,r,p,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function w(e,t,n,r){return g.push(e,t,n,r)}},25278:(e,t,n)=>{n.d(t,{Dm:()=>u,Hq:()=>d,MS:()=>c,bU:()=>a});var r=n(80442),i=n(22974),o=n(61159),s=n(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,r.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new r}catch(n){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},34760:(e,t,n)=>{n.d(t,{Q:()=>b});var r=n(43697),i=n(92604),o=n(95330),s=n(5600),a=n(90578),l=(n(67676),n(80442),n(52011)),p=n(82960),u=n(46791),d=(n(66643),n(20102),n(26258),n(87538));const c=new u.Z,h=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function w(){const e=Date.now();let t=!1;for(const n of c){const r=n.deref();r?r.refreshInterval&&e-(h.get(r)??0)+5>=6e4*r.refreshInterval&&(h.set(r,e),r.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const n of c){const r=n.deref();r&&(t=f(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?h.get(r)||h.set(r,e):h.delete(r))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(w,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,o.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,r._)([(0,s.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.C}}}}})],t.prototype,"refreshInterval",void 0),(0,r._)([(0,a.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,r._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,r._)([(0,s.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,r._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},54306:(e,t,n)=>{n.d(t,{Z:()=>T});var r,i=n(43697),o=n(9790),s=n(35454),a=n(96674),l=n(22974),p=n(62357),u=n(5600),d=(n(75215),n(71715)),c=n(52011),h=n(30556),y=(n(67676),n(80442),n(8813));let f=r=class extends a.wq{constructor(){super(...arguments),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,y.dI)(t.value):e}writeExpression(e,t,n){null!=this.value&&(e=(0,y.dI)(this.value)),null!=e&&(t[n]=e)}clone(){return new r({expression:this.expression,title:this.title,value:this.value})}};(0,i._)([(0,u.Cb)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],f.prototype,"expression",void 0),(0,i._)([(0,d.r)("expression",["expression","value"])],f.prototype,"readExpression",null),(0,i._)([(0,h.c)("expression")],f.prototype,"writeExpression",null),(0,i._)([(0,u.Cb)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],f.prototype,"title",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1}})],f.prototype,"value",void 0),f=r=(0,i._)([(0,c.j)("esri.layers.support.LabelExpressionInfo")],f);const m=f;var g,w=n(84230),b=n(28412),_=n(21878);const x=new s.X({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function C(e,t,n){return{enabled:!(0,w.A2)(n?.layer)}}function v(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function E(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let I=g=class extends a.wq{static evaluateWhere(e,t){const n=(e,t,n)=>{switch(t){case"=":return e==n;case"<>":return e!=n;case">":return e>n;case">=":return e>=n;case"<":return e<n;case"<=":return e<=n}return!1};try{if(null==e)return!0;const r=e.split(" ");if(3===r.length)return n(t[r[0]],r[1],r[2]);if(7===r.length){const e=n(t[r[0]],r[1],r[2]),i=r[3],o=n(t[r[4]],r[5],r[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(t){console.log("Error.: can't parse = "+e)}}constructor(e){super(e),this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.repeatLabelDistance=null,this.symbol=b.Rz,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const n=t.labelExpressionInfo;if(!n||!n.value&&!n.expression)return e}writeLabelExpression(e,t,n){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.z7)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.el)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[n]=e)}writeLabelExpressionInfo(e,t,n,r){if(null==e&&null!=this.labelExpression&&v(r))e=new m({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(r);i.expression&&(t[n]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}getLabelExpression(){return(0,y.hV)(this)}getLabelExpressionArcade(){return(0,y.YI)(this)}getLabelExpressionSingleField(){return(0,y.UO)(this)}hash(){return JSON.stringify(this)}clone(){return new g({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,l.d9)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,l.d9)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],I.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:C}}}}})],I.prototype,"allowOverrun",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:C}}}}})],I.prototype,"deconflictionStrategy",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:{overridePolicy(e,t,n){return this.labelExpressionInfo&&"service"===n?.origin&&E(n.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),(0,i._)([(0,d.r)("labelExpression")],I.prototype,"readLabelExpression",null),(0,i._)([(0,h.c)("labelExpression")],I.prototype,"writeLabelExpression",null),(0,i._)([(0,u.Cb)({type:m,json:{write:{overridePolicy:(e,t,n)=>function(e){return v(e)||E(e?.layer)}(n)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),(0,i._)([(0,h.c)("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),(0,i._)([(0,u.Cb)({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],I.prototype,"labelPlacement",void 0),(0,i._)([(0,u.Cb)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),(0,i._)([(0,u.Cb)({type:Number})],I.prototype,"maxScale",void 0),(0,i._)([(0,h.c)("maxScale")],I.prototype,"writeMaxScale",null),(0,i._)([(0,u.Cb)({type:Number})],I.prototype,"minScale",void 0),(0,i._)([(0,h.c)("minScale")],I.prototype,"writeMinScale",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],I.prototype,"repeatLabel",void 0),(0,i._)([(0,u.Cb)({type:Number,cast:p.t_,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],I.prototype,"repeatLabelDistance",void 0),(0,i._)([(0,u.Cb)({types:o.yK,json:{origins:{"web-scene":{types:o.S6,write:_.vX,default:null}},write:_.vX,default:null}})],I.prototype,"symbol",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=g=(0,i._)([(0,c.j)("esri.layers.support.LabelClass")],I);const T=I},21506:(e,t,n)=>{n.d(t,{qG:()=>x,PV:()=>m,id:()=>v,iR:()=>h,rn:()=>f,rT:()=>T,u1:()=>I,rO:()=>E,Oh:()=>b,bT:()=>_,C_:()=>c,Lx:()=>g,vg:()=>C,YI:()=>d,HQ:()=>y});var r=n(92835),i=n(82960),o=n(6570),s=n(82971),a=n(25929),l=(n(67676),n(35463)),p=n(86787),u=n(65242);const d={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:i.C}}},c={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,n){t[n]=!e}}}},h={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:i.C}}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:a.w}}},f={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:i.C}}},m={value:null,type:p.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:i.C}}};function g(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const w={write:{enabled:!0,layerContainerTypes:i.C},read:!0},b={type:Number,json:{origins:{"web-document":w,"portal-item":{write:!0}}}},_={...b,json:{...b.json,origins:{"web-document":{...w,write:{enabled:!0,layerContainerTypes:i.C,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,n)=>n&&"service"!==n.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,u.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,u.b)(t.drawingInfo.transparency)}}},x={type:r.Z,readOnly:!0,get(){if(!this.layer?.timeInfo)return null;const{datesInUnknownTimezone:e,timeOffset:t,useViewTime:n}=this.layer,i=this.view?.timeExtent;let o=this.layer.timeExtent;e&&(o=function(e){if(!e)return e;const{start:t,end:n}=e;return new r.Z({start:null!=t?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,l.Nm)(n,n.getTimezoneOffset(),"minutes"):n})}(o));let s=n?i&&o?i.intersection(o):i||o:o;if(!s||s.isEmpty||s.isAllTime)return s;t&&(s=s.offset(-t.value,t.unit)),e&&(s=function(e){if(!e)return e;const{start:t,end:n}=e;return new r.Z({start:null!=t?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:null!=n?(0,l.Nm)(n,-n.getTimezoneOffset(),"minutes"):n})}(s));const a=this._get("timeExtent");return s.equals(a)?a:s}},C={type:o.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const n=o.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(n.spatialReference=s.Z.fromJSON(t.spatialReference)),n}}}},read:!1}},v={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},E={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.minScale",write:{enabled:!0,layerContainerTypes:i.C}}},name:"layerDefinition.minScale",write:!0}},I={type:Number,json:{origins:{service:{write:{enabled:!1}},"web-scene":{name:"layerDefinition.maxScale",write:{enabled:!0,layerContainerTypes:i.C}}},name:"layerDefinition.maxScale",write:!0}},T={json:{write:{ignoreOrigin:!0,layerContainerTypes:i.C},origins:{"web-map":{read:!1,write:!1}}}}},50957:(e,t,n)=>{n.d(t,{C9:()=>S,Ci:()=>C,FV:()=>x,Fr:()=>f,JD:()=>m,JY:()=>j,Jj:()=>b,KE:()=>T,Ob:()=>F,SU:()=>v,VG:()=>I,Y5:()=>w,gG:()=>L,kZ:()=>N,kp:()=>M,nU:()=>G,rP:()=>k,rk:()=>R,sX:()=>P,tD:()=>E,uA:()=>O,uj:()=>_});var r=n(40330),i=n(9790),o=n(20102),s=n(35454),a=n(42033),l=n(63213),p=n(84230),u=n(84382),d=n(81571),c=n(56545),h=n(14165),y=n(75935);const f=new s.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function m(e,t,n,r){const i=await D(e);if(await g(e,t,r),!i.addAttachment)throw new o.Z(r,"Layer source does not support addAttachment capability");return i.addAttachment(t,n)}function g(e,t,n){const{attributes:r}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?r?i&&r[i]?Promise.resolve():Promise.reject(new o.Z(n,`feature is missing the identifying attribute ${i}`)):Promise.reject(new o.Z(n,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.Z(n,"A feature is required to add/delete/update attachments")):Promise.reject(new o.Z(n,"this layer doesn't support attachments"))}async function w(e,t,n,r,i){const s=await D(e);if(await g(e,t,i),!s.updateAttachment)throw new o.Z(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,n,r)}async function b(e,t,r){const{applyEdits:i}=await n.e(4720).then(n.bind(n,14720)),o=await e.load();return i(o,o.source,t,r)}async function _(e,t,r){const{uploadAssets:i}=await n.e(4720).then(n.bind(n,14720)),o=await e.load();return i(o,o.source,t,r)}async function x(e,t,n,r){const i=await D(e);if(await g(e,t,r),!i.deleteAttachments)throw new o.Z(r,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,n)}async function C(e,t,n){const r=(await e.load({signal:t?.signal})).source;if(!r.fetchRecomputedExtents)throw new o.Z(n,"Layer source does not support fetchUpdates capability");return r.fetchRecomputedExtents(t)}async function v(e,t,n,r){t=c.Z.from(t),await e.load();const i=e.source,s=e.capabilities;if(!s?.data?.supportsAttachment)throw new o.Z(r,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:p,num:u,size:d,start:h,where:y}=t;if(!s?.operations?.supportsQueryAttachments&&(a?.length>0||p?.length>0||d?.length>0||u||h||y))throw new o.Z(r,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||p?.length||y))throw new o.Z(r,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!i.queryAttachments)throw new o.Z(r,"Layer source does not support queryAttachments capability",t);return i.queryAttachments(t)}async function E(e,t,n,r){const i=await D(e);if(!i.queryObjectIds)throw new o.Z(r,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(h.Z.from(t)??e.createQuery(),n)}async function I(e,t,n,r){const i=await D(e);if(!i.queryFeatureCount)throw new o.Z(r,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(h.Z.from(t)??e.createQuery(),n)}async function T(e,t,n,r){const i=await D(e);if(!i.queryExtent)throw new o.Z(r,"Layer source does not support queryExtent capability");return i.queryExtent(h.Z.from(t)??e.createQuery(),n)}async function M(e,t,n,r){const i=await D(e);if(!i.queryRelatedFeatures)throw new o.Z(r,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(y.default.from(t),n)}async function S(e,t,n,r){const i=await D(e);if(!i.queryRelatedFeaturesCount)throw new o.Z(r,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(y.default.from(t),n)}async function L(e){const t=e.source;if(t?.refresh)try{const{dataChanged:n,updates:r}=await t.refresh();if(null!=r&&(e.sourceJSON={...e.sourceJSON,...r},e.read(r,{origin:"service",url:e.parsedUrl})),n)return!0}catch{}if(e.definitionExpression)try{return(await(0,a.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function k(e){const t=new h.Z,n=e.capabilities?.data,r=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference),n&&(n.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:i,timeExtent:o}=e;return t.timeExtent=null!=i&&null!=o?o.offset(-i.value,i.unit):o||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function R(e){const{globalIdField:t,fields:n}=e;if(t)return t;if(n)for(const e of n)if("esriFieldTypeGlobalID"===e.type)return e.name}function N(e){const{objectIdField:t,fields:n}=e;if(t)return t;if(n)for(const e of n)if("esriFieldTypeOID"===e.type)return e.name}function j(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function D(e){return(await e.load()).source}async function G(e,t,n){const i=e.parsedUrl?.path;i&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!r.id)return;if(r.id.findCredential(e))return;let n;try{const i=await(0,p.oP)(e,t);i&&(n=await r.id.checkSignInStatus(`${i}/sharing`))}catch(e){}if(n)try{const n=null!=t?t.signal:null;await r.id.getCredential(e,{signal:n})}catch(e){}}(i,n)}function P(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const Z=(0,l.d)({types:i.QT});function F(e,t){if(e.defaultSymbol)return e.types&&e.types.length?new d.Z({defaultSymbol:Z(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:Z(e.symbol,e,t)})))}):new u.Z({symbol:Z(e.defaultSymbol,e,t)})}function O(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const n=e.editingInfo?.lastEditDate?.getTime();return null==n||(t*=1e3,Date.now()-n<t)}},53518:(e,t,n)=>{n.d(t,{v:()=>l});var r=n(80442),i=n(92604),o=n(1231),s=n(99514),a=n(35671);function l(){return{fields:{type:[o.Z],value:null,set:function(e){if((0,r.Z)("big-integer-warning-enabled"))for(const t of e??[])("big-integer"===t.type||"oid"===t.type&&t.length>=8)&&i.Z.getLogger("esri.layers.support.fieldProperties").warnOnce("field-attributes-layer:big-integer-field",`Layer references a big-integer field '${t.name}', support for which is currently experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} are supported. Integers larger than this value may result in degraded performance or broken functionality. Disable this warning message by setting the esriConfig flag big-integer-warning-enabled to false.`,{layer:this,field:t});this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return new s.Z(this.fields??[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.Q0)(this.fieldsIndex,e)}}}}},8813:(e,t,n)=>{n.d(t,{UO:()=>m,YI:()=>f,dI:()=>g,el:()=>C,hV:()=>y,z7:()=>h});var r=n(19153);const i="__begin__",o="__end__",s=new RegExp(i,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+i,"i"),p=new RegExp(o+"$","i"),u='"',d=u+" + ",c=" + "+u;function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=function(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}(e.labelExpression),t.type="conventional"),t}function f(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function m(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t&&t[1].trim()||null}(t.expression);case"arcade":return C(t.expression)}return null}function g(e){let t;return e?(t=(0,r.gx)(e,(e=>i+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):u+t,t=p.test(t)?t.replace(p,""):t+u,t=t.replaceAll(s,d).replaceAll(a,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])([\w\s]+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,x=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])([\w\s]+)(\1)\s*\));?\s*$/i;function C(e){if(!e)return null;let t=b.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=x.exec(e),t?t[2]:null)}},99282:(e,t,n)=>{n.d(t,{a:()=>o});var r=n(67900),i=n(68441);const o={unknown:1,inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",i.sv.radius)}},56545:(e,t,n)=>{n.d(t,{Z:()=>c});var r,i=n(43697),o=n(96674),s=n(22974),a=n(5600),l=n(75215),p=n(52011),u=n(30556);let d=r=class extends o.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,s.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],d.prototype,"attachmentTypes",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],d.prototype,"attachmentsWhere",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],d.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],d.prototype,"keywords",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"globalIds",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],d.prototype,"returnMetadata",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],d.prototype,"size",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),(0,i._)([(0,u.c)("start"),(0,u.c)("num")],d.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=r=(0,i._)([(0,p.j)("esri.rest.support.AttachmentQuery")],d),d.from=(0,l.se)(d);const c=d},74889:(e,t,n)=>{n.d(t,{Z:()=>b});var r,i=n(43697),o=n(66577),s=n(38171),a=n(35454),l=n(96674),p=n(22974),u=n(5600),d=(n(75215),n(71715)),c=n(52011),h=n(30556),y=n(82971),f=n(33955),m=n(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=r=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const n=y.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const i=e[t],o=s.Z.fromJSON(i),a=i.geometry&&i.geometry.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=n);const l=i.aggregateGeometries,p=o.aggregateGeometries;if(l&&null!=p)for(const e in p){const t=p[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}r.push(o)}return r}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,f.im)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=y.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e&&e[n];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((i-e)/n)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,i],scale:[o,s]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const p=this._getHydrationFunction(e,(e=>e*o+r),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}_quantizePoints(e,t,n){let r,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=n(a[1]);e===r&&s===i||(o.push([e-r,s-i]),r=e,i=s)}else r=t(a[0]),i=n(a[1]),o.push([r,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],s=this._quantizePoints(o,t,n);s&&i.push(s)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,i){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.oU)(e)?e.rings:e.paths;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];for(let e=0,i=r.length;e<i;e++){const i=r[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=n(a)}}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=i(n[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=i(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=n(a)}if(r&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2]),t[3]=i(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,d.r)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,u.Cb)({type:[m.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,u.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,h.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,u.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,d.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,u.Cb)({type:y.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,h.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=r=(0,i._)([(0,c.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},75935:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r,i=n(43697),o=(n(66577),n(96674)),s=n(22974),a=n(5600),l=n(75215),p=n(52011),u=n(30556),d=n(10158),c=n(82971);let h=r=class extends o.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,s.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"cacheHint",void 0),(0,i._)([(0,a.Cb)({type:d.n,json:{write:!0}})],h.prototype,"dynamicDataSource",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"gdbVersion",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"geometryPrecision",void 0),(0,i._)([(0,a.Cb)({type:Date})],h.prototype,"historicMoment",void 0),(0,i._)([(0,u.c)("historicMoment")],h.prototype,"_writeHistoricMoment",null),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"maxAllowableOffset",void 0),(0,i._)([(0,a.Cb)({type:[Number],json:{write:!0}})],h.prototype,"objectIds",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],h.prototype,"orderByFields",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],h.prototype,"outFields",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],h.prototype,"outSpatialReference",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"relationshipId",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],h.prototype,"start",void 0),(0,i._)([(0,u.c)("start"),(0,u.c)("num")],h.prototype,"writeStart",null),(0,i._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],h.prototype,"num",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"returnGeometry",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],h.prototype,"returnM",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],h.prototype,"returnZ",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],h.prototype,"where",void 0),h=r=(0,i._)([(0,p.j)("esri.rest.support.RelationshipQuery")],h),h.from=(0,l.se)(h);const y=h},11282:(e,t,n)=>{n.d(t,{cv:()=>a,en:()=>s,lA:()=>o}),n(68773),n(40330);var r=n(22974),i=n(17452);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function s(e){return"string"==typeof e?(0,i.mN)(e):(0,r.d9)(e)}function a(e,t,n){const r={};for(const i in e){if("declaredClass"===i)continue;const o=e[i];if(null!=o&&"function"!=typeof o)if(Array.isArray(o)){r[i]=[];for(let e=0;e<o.length;e++)r[i][e]=a(o[e])}else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n&&n[i]);r[i]=t?e:JSON.stringify(e)}else r[i]=t?o:JSON.stringify(o);else r[i]=o}return r}n(71058)},32163:(e,t,n)=>{n.d(t,{eZ:()=>p});var r=n(51773),i=n(35671),o=n(84649),s=(n(63801),n(48074),n(38745),n(9190)),a=(n(10214),n(71423),n(44951),n(422)),l=n(29986);function p({displayField:e,editFieldsInfo:t,fields:n,objectIdField:l,title:p},h){if(!n)return null;const f=function(e,t){const n=t?.visibleFieldNames;return function(e,t){const n=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===n&&(e=e.slice()),e.sort(d),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.Z({fieldName:t.name,isEditable:(0,i.Hp)(t,e),label:t.alias,format:c(t),visible:u(t,{...e,visibleFieldNames:n})})))}({editFieldsInfo:t,fields:n,objectIdField:l},h);if(!f.length)return null;const m=function(e){const t=(0,i.O5)(e),{titleBase:n}=e;return t?`${n}: {${t.trim()}}`:n??""}({titleBase:p,fields:n,displayField:e}),g=[new s.Z,new o.Z];return new r.Z({title:m,content:g,fieldInfos:f})}const u=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,i.Fv)(e,t);function d(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"string":return(0,i.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]},86787:(e,t,n)=>{n.d(t,{Z:()=>_});var r,i=n(43697),o=n(35454),s=n(96674),a=n(70586),l=n(5600),p=(n(75215),n(67676),n(80442),n(71715)),u=n(52011),d=n(30556),c=n(35671);let h=r=class extends s.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,c.io)(e,t,this.expression)}clone(){return new r({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"expression",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),h=r=(0,i._)([(0,u.j)("esri.layers.support.FeatureExpressionInfo")],h);const y=h;var f,m=n(12541);const g=(0,o.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),w=new o.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let b=f=class extends s.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,n,r){t[n]=e.write({},r),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,i._)([(0,l.Cb)({type:y,json:{write:!0}})],b.prototype,"featureExpressionInfo",void 0),(0,i._)([(0,p.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],b.prototype,"readFeatureExpressionInfo",null),(0,i._)([(0,d.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],b.prototype,"writeFeatureExpressionInfo",null),(0,i._)([(0,l.Cb)({type:g.apiValues,nonNullable:!0,json:{type:g.jsonValues,read:g.read,write:{writer:g.write,isRequired:!0}}})],b.prototype,"mode",null),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],b.prototype,"offset",void 0),(0,i._)([(0,l.Cb)({type:m.f9,json:{type:String,read:w.read,write:w.write}})],b.prototype,"unit",null),b=f=(0,i._)([(0,u.j)("esri.layers.support.ElevationInfo")],b);const _=b},28412:(e,t,n)=>{n.d(t,{CJ:()=>p,Rz:()=>d,xA:()=>l,z3:()=>u}),n(80442);var r=n(20256),i=n(4095),o=n(77987),s=n(78724),a=n(58333);const l=o.Z.fromJSON(a.I4),p=i.Z.fromJSON(a.ET),u=r.Z.fromJSON(a.lF),d=s.Z.fromJSON(a.qP);o.Z.fromJSON(a.eG),i.Z.fromJSON(a.wW),r.Z.fromJSON(a.lj)},58333:(e,t,n)=>{n.d(t,{ET:()=>o,I4:()=>i,eG:()=>l,lF:()=>s,lj:()=>u,qP:()=>a,wW:()=>p});const r=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},12541:(e,t,n)=>{n.d(t,{Z7:()=>i,f9:()=>o});var r=n(99282);function i(e){return 1/(r.a[e]||1)}const o=function(){const e=Object.keys(r.a);return e.sort(),e}()},65242:(e,t,n)=>{n.d(t,{a:()=>i,b:()=>o});var r=n(75215);function i(e){const t=(0,r.vU)(100*(1-e));return Math.max(0,Math.min(t,100))}function o(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var n=r(68773),a=r(20102),s=r(92604),i=r(38913),o=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),f=r(11282),h=r(17452);async function y(e,t,r){const n="string"==typeof e?(0,h.mN)(e):e,a=t[0].spatialReference,s=(0,c.Ji)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,u.B9)(a),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.Z)(n.path+"/simplify",i);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(o.geometries,s,a)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof i.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new a.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],i=e[n+1][0],o=e[n+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),u=(o-s)/l,d=(i-a)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,i=d*n+a,o=u*n+s;r.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,n=d*e+a,i=u*e+s;r.push([n,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function F(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function Z(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],i=(0,l.x3)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.x3)(s))e[a]=e[a].addRing(t);else if(w(e))for(const t of(0,l.x3)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let s,h,g,w,v,S,I,R,$=0;const E=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,u.C5)(s),g=s.isWebMercator,S=g?102100:4326,w=l.UZ[S].maxX,v=l.UZ[S].minX,I=l.UZ[S].plus180Line,R=l.UZ[S].minus180Line),h)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(F(t.clone(),w,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,w,v))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);x.push(e.rings?new i.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,v)*(2*w);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==w?($=e.xmax>$?e.xmax:$,n=b(n,g),E.push(n),x.push("cut")):e.intersects(R)&&e.xmin!==v?($=e.xmax*(2*w)>$?e.xmax*(2*w):$,n=b(n,g,360),E.push(n),x.push("cut")):x.push(n)}else x.push(t.clone());else x.push(t);else x.push(t);let O=(0,l.XZ)($,w),L=-90;const U=O,k=new o.Z;for(;O>0;){const e=360*O-180;k.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(E.length>0&&U>0){const t=Z(E,await async function(e,t,r,n){const a=(0,f.en)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...a.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,p.Z)(a.path+"/cut",i),{cutIndexes:l,geometries:d=[]}=o.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(a,E,k,r)),n=[],s=[];for(let r=0;r<x.length;r++){const a=x[r];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(n.push(a),s.push("simplify")):s.push(g?(0,d.$)(a):a)}}if(!n.length)return s;const i=await y(a,n,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(g?(0,d.$)(i.shift()):i.shift())}return o}const X=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)X.push(t);else{const e=E.shift();X.push(!0===g?(0,d.$)(e):e)}}return X}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>i,XZ:()=>o,x3:()=>u});var n=r(58901),a=r(82971),s=r(33955);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:a.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:a.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>Z,aw:()=>w,uploadAssets:()=>E});var n=r(38171),a=r(46791),s=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(17452),d=r(41123),p=r(16306),c=r(54253),f=r(35671),h=r(2981),y=r(84230);function m(e){return e&&null!=e.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function w(e){return e.every(g)}function b(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(b)}async function Z(e,t,r,n={}){let u;if((0,c.lQ)(e)&&e.url)u=(0,c.jF)(e.url,e.layerId,n.gdbVersion,"original-and-current-features"===n.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,n){if(await e.load(),!m(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const n=(0,y.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(function(e,t,r,n,a,i){if(!e||!n&&!a)throw new s.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&a)throw new s.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,n,r,!!i,!!l,`${e.type}-layer`),!n.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!n.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||n.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!n.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const n=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(n.addFeatures?.length&&!t.operations.supportsAdd)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(n.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(n.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return n.addFeatures=n.addFeatures.map(R),n.updateFeatures=n.updateFeatures.map(R),n.addAssetFeatures=[],n}(t,n,`${e.type}-layer`),f=r?.globalIdUsed||u,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&e.length>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n),v(e,t)}(t,e,f,m))),c.updateFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n),v(e,t);const a=(0,y.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m))),c.deleteFeatures.forEach((t=>function(e,t,r,n){A(e,t,r,n)}(t,e,f,m))),c.addAttachments.forEach((t=>S(t,e))),c.updateAttachments.forEach((t=>S(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,h.S0)("model/gltf-binary",r.supportedFormats)??(0,h.Ow)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])$(t)&&a.push(t);for(const t of e.updateFeatures??[])$(t)&&a.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,n);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,n),c=e=>e.filter((e=>!e.error)).map(i.d9),f={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),u.resolve(f),l}catch(e){throw u.reject(e),e}}function A(e,t,r,n){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(n.length&&"attributes"in e)for(const r of n){const n=e.attributes[r.name];if(!(0,f.d2)(r,n))throw new s.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new s.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function S(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,u.sJ)(n.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(n),s=t.length,i=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function R(e){const t=new n.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function $(e){return"mesh"===e?.geometry?.type}function E(e,t,r,n){if(!m(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},2981:(e,t,r)=>{r.d(t,{$6:()=>h,$z:()=>s,F7:()=>a,Ow:()=>o,S0:()=>i,d1:()=>l,dm:()=>u});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=p(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=u(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return c(function(e,t){const r=e.toLowerCase();return d(t).find((e=>f(e)===r))}(e,t))}function o(e,t){return c(p(e,t))}function l(e,t){return f(function(e,t){return d(t).find((t=>c(t)===e))}(e,t))}function u(e,t){return o(e.name,t)??i(e.type,t)}function d(e){return[...n,...e]}function p(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function c(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>o,en:()=>i,lA:()=>s}),r(68773),r(40330);var n=r(22974),a=r(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.mN)(e):(0,n.d9)(e)}function o(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){n[a]=[];for(let e=0;e<s.length;e++)n[a][e]=o(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r&&r[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8465,661,5234,6148],{10661:(e,t,n)=>{n.d(t,{s:()=>i});var s=n(42100);class i extends s.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66643:(e,t,n)=>{n.d(t,{Ed:()=>u,UI:()=>c,mt:()=>f,q6:()=>h,vr:()=>m});var s=n(43697),i=n(92036),r=n(70586),o=n(95330),a=n(5600),l=n(52011);function u(e,t,n){return(0,o.as)(e.map(((e,s)=>t.apply(n,[e,s]))))}async function c(e,t,n){return(await(0,o.as)(e.map(((e,s)=>t.apply(n,[e,s]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return d(e)}}async function f(e){try{return p(await e)}catch(e){return(0,o.r9)(e),d(e)}}function m(e,t){return new g(e,t)}let g=class extends i.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.Cb)()],g.prototype,"value",null),(0,s._)([(0,a.Cb)()],g.prototype,"error",null),(0,s._)([(0,a.Cb)()],g.prototype,"finished",null),(0,s._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,s._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},20188:(e,t,n)=>{function s(e){return null!=o(e)||null!=r(e)}function i(e){return o(e)??r(e)}function r(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(u&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,s=0;for(;!t&&s<=e.length;)t=!l.test(e[s]),s++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function o(e){const t=a.exec(e);if(!t?.groups)return null;const n=t.groups,s=+n.year,i=+n.month-1,r=+n.day,o=+(n.hours??"0"),l=+(n.minutes??"0"),u=+(n.seconds??"0");if(o>23)return null;if(l>59)return null;if(u>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").substring(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(s,i,r,o,l,u,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,i,r,o,l,u,p)}return Number.isNaN(d)?null:d}n.d(t,{o:()=>s,s:()=>i});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,u=!Number.isNaN(new Date("technology 10").getTime())},14808:(e,t,n)=>{n.d(t,{Qc:()=>c,WU:()=>a,lt:()=>u});var s=n(19153),i=n(70171);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,i.Kd)()){let t=(e=e.toLowerCase())in r;if(!t){const n=e.split("-");n.length>1&&n[0]in r&&(e=n[0],t=!0),t||(e="en")}const[n,s,o="#,##0.###"]=r[e];return{decimal:n,group:s,pattern:o}}function a(e,t){const n=o((t={...t}).locale);t.customs=n;const s=t.pattern||n.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,n){const s=(n=n||{}).customs.group,i=n.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===n.fractional&&(n.places=0),t.replace(a,function(e,t,n){!0===(n=n||{}).places&&(n.places=0),n.places===1/0&&(n.places=6);const s=t.split("."),i="string"==typeof n.places&&n.places.indexOf(",");let r=n.places;i?r=n.places.substring(i+1):+r>=0||(r=(s[1]||[]).length),n.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(s[1]||n.places){i&&(n.places=n.places.substring(0,i));const e=void 0!==n.places?n.places:s[1]&&s[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.substr(0,Number(r)))}else o[1]&&o.pop();const l=s[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].substr(o[0].length-u)));let c,p,d=s[0].lastIndexOf(",");if(-1!==d){c=s[0].length-d-1;const e=s[0].substr(0,d);d=e.lastIndexOf(","),-1!==d&&(p=e.length-d-1)}const h=[];for(let e=o[0];e;){const t=e.length-c;h.push(t>0?e.substr(t):e),e=t>0?e.slice(0,t):"",p&&(c=p,p=void 0)}return o[0]=h.reverse().join(n.group||","),o.join(n.decimal||".")}(e,u[0],{decimal:i,group:s,places:n.places,round:n.round}))}(e,s,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),n=e.pattern||t.pattern,i=t.group,r=t.decimal;let a=1;if(n.includes("%"))a/=100;else if(n.includes("‰"))a/=1e3;else if(n.includes("¤"))throw new Error("currency notation not supported");const u=n.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,(t=>(t="(?:"+(0,s.Qs)(t,".")+")").replace(l,(t=>{const n={signed:!1,separator:e.strict?i:[i,""],fractional:e.fractional,decimal:r,exponent:!1},s=t.split(".");let o=e.places;1===s.length&&1!==a&&(s[1]="###"),1===s.length||0===o?n.fractional=!1:(void 0===o&&(o=e.pattern?s[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(n.fractional=!0),!e.places&&+o<s[1].length&&(o+=","+s[1].length),n.places=o);const l=s[0].split(",");return l.length>1&&(n.groupSize=l.pop().length,l.length>1&&(n.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=p(e),n=d(e.fractional,(t=>{let n="";return t&&0!==e.places&&(n="\\"+e.decimal,e.places===1/0?n="(?:"+n+"\\d+)?":n+="\\d{"+e.places+"}"),n}),!0);let s=t+n;return n&&(s="(?:(?:"+s+")|(?:"+n+"))"),s+d(e.exponent,(t=>t?"([eE]"+p({signed:e.eSigned})+")":""))}(n)+")"}))),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:i,decimal:r,factor:a}}function c(e,t){const n=u(t),s=new RegExp("^"+n.regexp+"$").exec(e);if(!s)return NaN;let i=s[1];if(!s[1]){if(!s[2])return NaN;i=s[2],n.factor*=-1}return i=i.replaceAll(new RegExp("["+n.group+"\\s\\xa0]","g"),"").replace(n.decimal,"."),Number(i)*n.factor}function p(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,(e=>e?"[-+]":""),!0)+d(e.separator,(t=>{if(!t)return"(?:\\d+)";" "===(t=(0,s.Qs)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const n=e.groupSize,i=e.groupSize2;if(i){const e="(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*["+t+"]\\d{"+n+"})";return n-i>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(n-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(n-1)+"}(?:["+t+"]\\d{"+n+"})*)"}),!0)}const d=(e,t,n)=>{if(!(e instanceof Array))return t(e);const s=[];for(let n=0;n<e.length;n++)s.push(t(e[n]));return h(s.join("|"),Boolean(n))},h=(e,t)=>"("+(t?"?:":"")+e+")"},37455:(e,t,n)=>{n.d(t,{N:()=>s});const s={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,n){const s=new i(e.getPointX(t),e.getPointY(t),n),r=e.hasZ(t),o=e.hasM(t);return r&&(s.z=e.getPointZ(t)),o&&(s.m=e.getPointM(t)),s},exportPolygon:function(e,t,n){return new r(e.exportPaths(t),n,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,n){return new o(e.exportPaths(t),n,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,n){return new a(e.exportPoints(t),n,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,n){const s=e.hasZ(t),i=e.hasM(t),r=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),n);if(s){const n=e.getZExtent(t);r.zmin=n.vmin,r.zmax=n.vmax}if(i){const n=e.getMExtent(t);r.mmin=n.vmin,r.mmax=n.vmax}return r}};class i{constructor(e,t,n){this.x=e,this.y=t,this.spatialReference=n,this.z=void 0,this.m=void 0}}class r{constructor(e,t,n,s){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),s&&(this.hasM=s)}}class o{constructor(e,t,n,s){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),s&&(this.hasM=s)}}class a{constructor(e,t,n,s){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),s&&(this.hasM=s)}}class l{constructor(e,t,n,s,i){this.xmin=e,this.ymin=t,this.xmax=n,this.ymax=s,this.spatialReference=i,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},70171:(e,t,n)=>{n.d(t,{G3:()=>l,Kd:()=>a,Ze:()=>d,qe:()=>c});var s=n(50758);let i;const r=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return r??globalThis.navigator?.language??"en"}function a(){return void 0===i&&(i=o()),i}function l(e=a()){const t=/^([a-zA-Z]{2,3})(?:[_\-]\w+)*$/.exec(e);return t?.[1].toLowerCase()}const u=[];function c(e){return u.push(e),(0,s.kB)((()=>u.splice(u.indexOf(e),1)))}const p=[];function d(e){return p.push(e),(0,s.kB)((()=>u.splice(p.indexOf(e),1)))}globalThis.addEventListener?.("languagechange",(function(){const e=o();i!==e&&(i=e,[...p].forEach((t=>{t.call(null,e)})),[...u].forEach((t=>{t.call(null,e)})))}))},70272:(e,t,n)=>{n.d(t,{S6:()=>i,nd:()=>r,u_:()=>s});class s{constructor(e=null,t={},n,s){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new s(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function i(e){return!(null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)}class r extends s{}},5428:(e,t,n)=>{n.d(t,{Z:()=>s});class s{constructor(e=[],t=[],n=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=n}static fromRect(e){const[t,n,i,r]=e,o=i-t,a=r-n;return new s([5],[t,n,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const s=this.lengths[n];for(let n=0;n<s;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=s}}clone(e){return e?(e.set(this.coords),new s(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new s(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},61159:(e,t,n)=>{n.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,n)=>{n.d(t,{_W:()=>h,iV:()=>g,oj:()=>x});var s=n(67676),i=n(95330),r=n(73615),o=n(37455),a=n(8744),l=n(40488);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const n={x:0,y:0};return[n.x,n.y]=e(t.x,t.y,u),null!=t.z&&(n.z=t.z),null!=t.m&&(n.m=t.m),n}if("xmin"in t){const n={xmin:0,ymin:0,xmax:0,ymax:0};return[n.xmin,n.ymin]=e(t.xmin,t.ymin,u),[n.xmax,n.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(n.zmin=t.zmin,n.zmax=t.zmax,n.hasZ=!0),t.hasM&&(n.mmin=t.mmin,n.mmax=t.mmax,n.hasM=!0),n}return"rings"in t?{rings:p(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:p(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function p(e,t){const n=[];for(const s of e)n.push(d(s,t));return n}function d(e,t){const n=[];for(const s of e){const e=t(s[0],s[1],[0,0]);n.push(e),s.length>2&&e.push(s[2]),s.length>3&&e.push(s[3])}return n}async function h(e,t){if(!e||!t)return;const n=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(s.pC):[e];await(0,r.initializeProjection)(n.map((e=>({source:e,dest:t}))))}const f=c.bind(null,l.hG),m=c.bind(null,l.R6);function g(e,t,n,s){if(!e)return e;if(n||(n=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(n)||(0,a.fS)(t,n))return e;if((0,l.Q8)(t,n)){const t=(0,a.sS)(n)?f(e):m(e);return t.spatialReference=n,t}return(0,r.projectMany)(o.N,[e],t,n,null,s)[0]}const y=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,s){if(!e||!e.length||!t||!n||(0,a.fS)(t,n))return e;const r={geometries:e,inSpatialReference:t,outSpatialReference:n,geographicTransformation:s,resolve:(0,i.hh)()};return this._jobs.push(r),this._timer??=setTimeout(this._process,10),r.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:n,outSpatialReference:s,resolve:i,geographicTransformation:u}=e;(0,l.Q8)(n,s)?(0,a.sS)(s)?i(t.map(f)):i(t.map(m)):i((0,r.projectMany)(o.N,t,n,s,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function x(e,t,n,s){return y.push(e,t,n,s)}},27793:(e,t,n)=>{n.r(t),n.d(t,{default:()=>$}),n(66577);var s=n(3172),i=n(66643),r=n(20188),o=n(20102),a=n(92604),l=n(95330),u=n(17452),c=n(73615),p=n(37455),d=n(8744),h=n(40488),f=n(70272),m=n(5428),g=n(37427),y=n(14808),x=n(35671);const _=/^\s*"([\S\s]*)"\s*$/,b=/""/g,S="\n",F=[","," ",";","|","\t"];function*w(e,t,n){let s=0;for(;s<=e.length;){const i=e.indexOf(t,s),r=e.substring(s,i>-1?i:void 0);s+=r.length+t.length,n&&!r.trim()||(yield r)}}function v(e){const t=e.includes("\r\n")?"\r\n":S;return w(e,t,!0)}function N(e,t){return w(e,t,!1)}function I(e,t,n){e=e.trim(),t=t?.trim();const s=[],i=Array.from(new Set([n?.delimiter,...F])).filter((e=>null!=e));for(const n of i){const i=E(e,n).length,r=E(t,n).length??i;i>1&&s.push({weight:Math.min(i,r),delimiter:n})}const r=s.sort((({weight:e},{weight:t})=>t-e)).map((({delimiter:e})=>e));for(const t of r){const s=O(C(e,t).names,n?.longitudeField,n?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*T(e,t,n,s=(()=>Object.create(null))){const i=v(e);i.next();let r="",o="",a=0,l=s(),u=0;e:for(const e of i){const i=N(e,n);for(const e of i)if(r+=o+e,o="",a+=M(e),a%2==0){if(a>0){const e=_.exec(r);if(!e){l=s(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(b,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=n;0===a?(yield l,l=s(),u=0):o=S}}function C(e,t){const n=E(e,t).filter((e=>null!=e)),s=n.map((e=>(0,x.q6)(e)));for(let e=s.length-1;e>=0;e--)s[e]||(s.splice(e,1),n.splice(e,1));return{names:s,aliases:n}}function E(e,t){if(!e?.length)return[];const n=[];let s="",i="",r=0;const o=N(e,t);for(const e of o)if(s+=i+e,i="",r+=M(e),r%2==0){if(r>0){const e=_.exec(s);e&&n.push(e[1].replaceAll(b,'"'))}else n.push(s);s="",r=0}else i=t;return n}function M(e){let t=0,n=0;for(n=e.indexOf('"',n);n>=0;)t++,n=e.indexOf('"',n+1);return t}function O(e,t,n){t=(0,x.q6)(t)?.toLowerCase(),n=(0,x.q6)(n)?.toLowerCase();const s=e.map((e=>e.toLowerCase())),i=t?e[s.indexOf(t)]:null,r=n?e[s.indexOf(n)]:null;return{longitudeFieldName:i||e[s.indexOf(k.find((e=>s.includes(e))))],latitudeFieldName:r||e[s.indexOf(z.find((e=>s.includes(e))))]}}function Z(e,t,n,s,i){const r=[],o=T(e,n,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<n.length;e++){const t=n[e],o=s[e];if(t===i.longitudeFieldName||t===i.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e,n;switch(R(a.map((e=>e[t])))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate",n=36;break;default:e="esriFieldTypeString",n=255}r.push({name:t,type:e,alias:o,length:n})}}return r}function R(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map((e=>{if(""!==e){if(!t.test(e)){let t=q(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.o)(e)?"date":"string"}})).reduce(((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0))}const q=function(){const e=(0,y.lt)(),t=new RegExp("^"+e.regexp+"$"),n=new RegExp("["+e.group+"\\s\\xa0]","g"),s=e.factor;return i=>{const r=t.exec(i);if(e.factor=s,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(n,"").replace(e.decimal,"."),+o*e.factor}}(),z=["lat","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],k=["lon","lng","long","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];var D=n(25278),j=n(99514),A=n(15512),P=n(82971);const L=(0,D.bU)("esriGeometryPoint"),Q=["csv"],G=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class ${constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[s,{QueryEngine:i,FeatureStore:r}]=await Promise.all([this._fetch(t.signal),Promise.all([n.e(7126),n.e(8968),n.e(8732),n.e(5286),n.e(8767),n.e(6030)]).then(n.bind(n,3922)),this._checkProjection(e?.parsingOptions?.spatialReference)]),o=V(s,e);this._locationInfo=o.locationInfo,this._delimiter=o.delimiter,this._queryEngine=this._createQueryEngine(i,r,o);const a=await this._createFeatures(s);this._queryEngine.featureStore.addMany(a);const{fullExtent:l,timeExtent:u}=await this._queryEngine.fetchRecomputedExtents();if(o.layerDefinition.extent=l,u){const{start:e,end:t}=u;o.layerDefinition.timeInfo.timeExtent=[e,t]}return o}async applyEdits(){throw new o.Z("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,i.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,l.D_)(e)||a.Z.getLogger("esri.layers.CSVLayer").error(new o.Z("csv-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:n}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:n}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:n}=this._loadOptions;if(!t)throw new o.Z("csv-layer:invalid-source","url not defined");const i=(0,u.mN)(t);return(await(0,s.Z)(i.path,{query:{...i.query,...n},responseType:"text",signal:e})).data}_createQueryEngine(e,t,n){const{objectIdField:s,fields:i,extent:r,timeInfo:o}=n.layerDefinition,a=new t({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});return new e({fields:i,geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:o,objectIdField:s,spatialReference:r.spatialReference||{wkid:4326},cacheSpatialQueries:!0,featureStore:a})}async _createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:s,fieldsIndex:i,spatialReference:o}=this._queryEngine;let a=[];const l=[],u=i.fields.filter((e=>e.name!==s)).map((e=>e.name));let g=0;const y={};for(const e of i.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,x.os)(e);void 0!==t&&(y[e.name]=t)}const _=T(e,u,this._delimiter,(0,D.Dm)(y,s));for(const e of _){const o=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[n]);if(null!=u&&null!=o&&!isNaN(o)&&!isNaN(u)){e[t]=o,e[n]=u;for(const s in e)if(s!==t&&s!==n)if(i.isDateField(s))e[s]=(0,r.s)(e[s]);else if(i.isNumericField(s)){const t=q(e[s]);isNaN(t)?e[s]=null:e[s]=t}e[s]=g,g++,a.push(new U(u,o)),l.push(e)}}if(!(0,d.fS)({wkid:4326},o))if((0,d.sS)(o))for(const e of a)[e.x,e.y]=(0,h.hG)(e.x,e.y,G);else a=(0,c.projectMany)(p.N,a,P.Z.WGS84,o,null,null);const b=[];for(let e=0;e<a.length;e++){const{x:t,y:n}=a[e],i=l[e];i[s]=e+1,b.push(new f.u_(new m.Z([],[t,n]),i,null,i[s]))}return b}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=q(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,g._W)(d.Zn,e)}catch{throw new o.Z("csv-layer:projection-not-supported","Projection not supported")}}}function V(e,t){const n=t.parsingOptions||{},s={delimiter:n.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:n.latitudeField,longitudeFieldName:n.longitudeField}},i=s.layerDefinition={name:(0,u.vt)(t.url,Q)||"csv",dateFieldsTimeReference:{timeZoneIANA:A.pt},drawingInfo:L,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:n.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:n.spatialReference||{wkid:4326}}},r=v(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.Z("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:p}=I(a,l,n);if(!c)throw new o.Z("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:n});if(!p)throw new o.Z("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:n});s.locationInfo=p,s.delimiter=c;const{names:d,aliases:h}=C(a,c),f=Z(e,s.delimiter,d,h,s.locationInfo);if(n.fields?.length){const e=new j.Z(n.fields);for(const t of f){const n=e.get(t.name);n&&Object.assign(t,n)}}if(!f.some((e=>"esriFieldTypeOID"===e.type&&(i.objectIdField=e.name,!0)))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};i.objectIdField=e.name,f.unshift(e)}i.fields=f;const m=new j.Z(i.fields);if(s.locationInfo&&(s.locationInfo.latitudeFieldName=m.get(s.locationInfo.latitudeFieldName).name,s.locationInfo.longitudeFieldName=m.get(s.locationInfo.longitudeFieldName).name),i.timeInfo){const e=i.timeInfo;if(e.startTimeField){const t=m.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=m.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=m.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(i.timeInfo=null)}return s}},25278:(e,t,n)=>{n.d(t,{Dm:()=>c,Hq:()=>p,MS:()=>d,bU:()=>a});var s=n(80442),i=n(22974),r=n(61159),o=n(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this.${t} = null;`;for(const t in e)n+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new s}catch(n){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},99514:(e,t,n)=>{n.d(t,{Z:()=>o});var s=n(35671);function i(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function r(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class o{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const o of e){const e=o?.name,u=l(o?.name);if(e&&u){const l=a(e);this._fieldsMap.set(e,o),this._fieldsMap.set(l,o),this._normalizedFieldsMap.set(u,o),t.push(l),"date"===(n=o).type||"esriFieldTypeDate"===n.type||"date-only"===n.type||"esriFieldTypeDateOnly"===n.type||"timestamp-offset"===n.type||"esriFieldTypeTimestampOffset"===n.type?(this.dateFields.push(o),this._dateFieldsSet.add(o)):(0,s.H7)(o)&&(this._numericFieldsSet.add(o),this.numericFields.push(o)),i(o)||r(o)||(o.editable=null==o.editable||!!o.editable,o.nullable=null==o.nullable||!!o.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)i(e)||r(e)||e.nullable||void 0!==(0,s.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(a(e))??this._normalizedFieldsMap.get(l(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){const t=this.get(e);return"time-only"===t?.type||"esriFieldTypeTimeOnly"===t?.type}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}}function a(e){return e.trim().toLowerCase()}function l(e){return(0,s.q6)(e)?.toLowerCase()??""}},58333:(e,t,n)=>{n.d(t,{ET:()=>r,I4:()=>i,eG:()=>l,lF:()=>o,lj:()=>c,qP:()=>a,wW:()=>u});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},r={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},15512:(e,t,n)=>{n.d(t,{By:()=>s,_4:()=>i,pt:()=>r});const s="system",i="unknown",r="UTC"}}]);