@arcgis/core 6.0.0-next.8 → 6.0.0-next.9

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 (330) hide show
  1. package/arcade/featureSetUtils.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{85908e6e9c50749cee60.js → 037a8cc19debbaaa4e10.js} +1 -1
  4. package/assets/esri/core/workers/chunks/066550852483ab8f77bc.js +1 -0
  5. package/assets/esri/core/workers/chunks/0f725cf79ce00e790a7d.js +1 -0
  6. package/assets/esri/core/workers/chunks/12a7997a40c77f5c9160.js +1 -0
  7. package/assets/esri/core/workers/chunks/1b077c92345ffb5916c2.js +1 -0
  8. package/assets/esri/core/workers/chunks/{6dd0b79fa3a629ab4f27.js → 1bca39e0e651426bdbb5.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1b35ec54968fbeec17ce.js → 2686fe5b62dd0be699c0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +1 -0
  11. package/assets/esri/core/workers/chunks/2e2e33ec50e97b91b178.js +1 -0
  12. package/assets/esri/core/workers/chunks/{7a05b18f655c1167ce0a.js → 2ef5237e4c876d6a4ee0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{776ae25a34352d3468bc.js → 3081ee6d8019494fc21e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/37d6a264a3f1d8072aa0.js +1 -0
  15. package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +1 -0
  16. package/assets/esri/core/workers/chunks/{ded8b64a46992c3ae693.js → 40a584cb952e94326e9e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{1ba0dfbe0958cdbd7c9f.js → 42fd2a7b22b03dacc6a7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +1 -0
  19. package/assets/esri/core/workers/chunks/{d201fbf3ceff946d2bd6.js → 44d5508042cacdfcac47.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{09a63cc1987f8636c5b0.js → 4503b20ca6a80fb63d72.js} +1 -1
  21. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +1 -0
  22. package/assets/esri/core/workers/chunks/45800373650fbc8262e6.js +1 -0
  23. package/assets/esri/core/workers/chunks/{6a7ab1ef9a37e87db5ae.js → 46a7da93a63663878583.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{f43a50d4bd9636e68ae5.js → 46b4fb6a7fe4877b0efc.js} +63 -61
  25. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +1 -0
  26. package/assets/esri/core/workers/chunks/{257910cca66dc5df465e.js → 4911ce62421a6c3320b0.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +1 -0
  28. package/assets/esri/core/workers/chunks/4debf2d9c3465250ef7a.js +1 -0
  29. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +1 -0
  30. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +1 -0
  31. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +1 -0
  32. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ceb680688fe7e570a774.js → 608be1172a908e92b9f1.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{6f358116f79021ff9687.js → 612104dff305ff062dfa.js} +2 -2
  35. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +1 -0
  36. package/assets/esri/core/workers/chunks/6400446b7615b97c3521.js +1 -0
  37. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +1 -0
  38. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +1 -0
  39. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +1 -0
  40. package/assets/esri/core/workers/chunks/745a153d0cd34faa124e.js +1 -0
  41. package/assets/esri/core/workers/chunks/7572c2bc5062e66f6330.js +1 -0
  42. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +1 -0
  43. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +1 -0
  44. package/assets/esri/core/workers/chunks/{56a24061589f4a968818.js → 814751e705c05099f864.js} +1 -1
  45. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +1 -0
  46. package/assets/esri/core/workers/chunks/836bb3673ab30fc66f1e.js +1 -0
  47. package/assets/esri/core/workers/chunks/8487727f1197cf7dbf50.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ceb112fe7aef354f8051.js → 88e54449261ef94e390d.js} +1 -1
  49. package/assets/esri/core/workers/chunks/8b0d5551978ab0aac0d1.js +1 -0
  50. package/assets/esri/core/workers/chunks/8d0c2de92770a1567536.js +1 -0
  51. package/assets/esri/core/workers/chunks/{c76c42c74eedd43263d3.js → 9dd1fc56eb1ea6eb705e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{86a051e9fe71aa356108.js → 9e3e442a9874ed23a043.js} +1 -1
  53. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +1 -0
  54. package/assets/esri/core/workers/chunks/aaba33611753c6aada68.js +1 -0
  55. package/assets/esri/core/workers/chunks/aeaaff7a4b1a99540f52.js +1 -0
  56. package/assets/esri/core/workers/chunks/{ecaac39dde7ec4213264.js → af75747b06d79446a855.js} +1 -1
  57. package/assets/esri/core/workers/chunks/b564ec4e03478f5659db.js +1 -0
  58. package/assets/esri/core/workers/chunks/bc0f54a2c15502b630ec.js +1 -0
  59. package/assets/esri/core/workers/chunks/c1c534e08fc21842670b.js +1 -0
  60. package/assets/esri/core/workers/chunks/{9ab25ee06041f907b9a2.js → c2c1f51a4668055c2838.js} +1 -1
  61. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a7985d20fa6e8d4878e7.js → d0f5bee9db1ad51ae687.js} +1 -1
  63. package/assets/esri/core/workers/chunks/dba280c370df13196711.js +1 -0
  64. package/assets/esri/core/workers/chunks/{19b9d393046a780e6c3f.js → de5ecb567bd69c613e9d.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{534186fc921a0ccf58dc.js → e1f5d00878f27e1d413e.js} +1 -1
  66. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +1 -0
  67. package/assets/esri/core/workers/chunks/e932951598499befabf5.js +1 -0
  68. package/assets/esri/core/workers/chunks/f1df76f098a3cc924832.js +1 -0
  69. package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +1 -0
  70. package/assets/esri/core/workers/chunks/f4f9d08b2df856e3b694.js +1 -0
  71. package/assets/esri/core/workers/chunks/fc44227c1756f65b95df.js +1 -0
  72. package/assets/esri/core/workers/chunks/{3b737dae6efed627406e.js → fc44d45598a7476bc606.js} +1 -1
  73. package/assets/esri/themes/base/_mixins.scss +2 -2
  74. package/assets/esri/themes/base/widgets/_Attribution.scss +1 -1
  75. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +2 -2
  76. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -5
  77. package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -1
  78. package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +2 -2
  79. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +5 -5
  80. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +1 -1
  81. package/assets/esri/themes/base/widgets/_Compass.scss +0 -2
  82. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +4 -10
  83. package/assets/esri/themes/base/widgets/_Directions.scss +40 -40
  84. package/assets/esri/themes/base/widgets/_Editor.scss +7 -7
  85. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  86. package/assets/esri/themes/base/widgets/_Feature.scss +1 -1
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +6 -6
  88. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  89. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +1 -1
  90. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +3 -3
  91. package/assets/esri/themes/base/widgets/_FeatureTable.scss +27 -27
  92. package/assets/esri/themes/base/widgets/_FeatureTemplates.scss +1 -1
  93. package/assets/esri/themes/base/widgets/_Features.scss +5 -5
  94. package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -1
  95. package/assets/esri/themes/base/widgets/_FilterCondition.scss +1 -1
  96. package/assets/esri/themes/base/widgets/_Grid.scss +18 -18
  97. package/assets/esri/themes/base/widgets/_GridControls.scss +11 -11
  98. package/assets/esri/themes/base/widgets/_LayerList.scss +1 -1
  99. package/assets/esri/themes/base/widgets/_Legend.scss +5 -5
  100. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +4 -1
  101. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +18 -19
  102. package/assets/esri/themes/base/widgets/_ResponsiveToolbar.scss +0 -2
  103. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +1 -1
  104. package/assets/esri/themes/base/widgets/_SelectionList.scss +15 -15
  105. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -2
  106. package/assets/esri/themes/base/widgets/_ShadowCast.scss +11 -11
  107. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
  108. package/assets/esri/themes/base/widgets/_Slice.scss +3 -3
  109. package/assets/esri/themes/base/widgets/_SnappingControls.scss +1 -1
  110. package/assets/esri/themes/base/widgets/_TimeSlider.scss +5 -5
  111. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +5 -4
  112. package/assets/esri/themes/base/widgets/_Tooltip.scss +14 -17
  113. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +2 -2
  114. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +1 -1
  115. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +2 -2
  116. package/assets/esri/themes/base/widgets/_ValuePicker.scss +2 -2
  117. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +5 -5
  118. package/assets/esri/themes/base/widgets/_Widget.scss +5 -1
  119. package/assets/esri/themes/dark/main.css +1 -1
  120. package/assets/esri/themes/light/main.css +1 -1
  121. package/assets/esri/themes/light/view.css +1 -1
  122. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  123. package/chunks/ChapmanAtmosphere.glsl.js +3 -3
  124. package/chunks/CloudsComposition.glsl.js +1 -1
  125. package/chunks/Component.glsl.js +41 -41
  126. package/chunks/DefaultMaterial.glsl.js +2 -2
  127. package/chunks/EdgeShader.glsl.js +9 -9
  128. package/chunks/Fog.glsl.js +5 -5
  129. package/chunks/GaussianSplat.glsl.js +2 -2
  130. package/chunks/GlobalIllumination.glsl.js +9 -9
  131. package/chunks/HUDMaterial.glsl.js +13 -13
  132. package/chunks/Haze.glsl.js +6 -6
  133. package/chunks/HazeCompositing.glsl.js +1 -1
  134. package/chunks/LaserlinePath.glsl.js +6 -6
  135. package/chunks/LineCallout.glsl.js +1 -1
  136. package/chunks/LineMarker.glsl.js +5 -5
  137. package/chunks/NavigationDepth.glsl.js +2 -2
  138. package/chunks/Path.glsl.js +1 -1
  139. package/chunks/Pattern.glsl.js +26 -26
  140. package/chunks/Precipitation.glsl.js +7 -7
  141. package/chunks/RealisticTree.glsl.js +2 -2
  142. package/chunks/RibbonLine.glsl.js +60 -60
  143. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  144. package/chunks/ShadowHighlight.glsl.js +5 -5
  145. package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
  146. package/chunks/SimpleAtmosphere.glsl.js +4 -4
  147. package/chunks/Terrain.glsl.js +29 -32
  148. package/chunks/Viewshed.glsl.js +2 -2
  149. package/chunks/Water.glsl.js +2 -2
  150. package/config.js +1 -1
  151. package/core/Loadable.js +1 -1
  152. package/geometry/HeightModelInfo.js +1 -1
  153. package/geometry/support/meshUtils.d.ts +1 -1
  154. package/kernel.js +1 -1
  155. package/layers/BaseDynamicLayer.d.ts +1 -0
  156. package/layers/BaseElevationLayer.d.ts +2 -0
  157. package/layers/BaseTileLayer.d.ts +12 -9
  158. package/layers/CSVLayer.d.ts +0 -15
  159. package/layers/FeatureLayer.d.ts +2 -15
  160. package/layers/GeoJSONLayer.d.ts +0 -52
  161. package/layers/GeoRSSLayer.d.ts +0 -44
  162. package/layers/ParquetLayer.d.ts +92 -12
  163. package/layers/ParquetLayer.js +1 -1
  164. package/layers/SketchLayer.d.ts +0 -1
  165. package/layers/VectorTileLayer.d.ts +2 -12
  166. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  167. package/layers/mixins/PortalLayer.js +1 -1
  168. package/layers/mixins/RefreshableLayer.d.ts +1 -3
  169. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  170. package/layers/raster/datasets/TIFFRaster.js +1 -1
  171. package/layers/raster/formats/tiffParser.js +1 -1
  172. package/layers/support/ParquetPortalItemData.d.ts +2 -0
  173. package/layers/support/ParquetPortalItemData.js +1 -1
  174. package/layers/support/PortalItemData.d.ts +21 -0
  175. package/layers/support/PortalItemData.js +1 -1
  176. package/layers/support/layersLoader.js +1 -1
  177. package/layers/support/parquetUtils.d.ts +1 -1
  178. package/layers/support/types.d.ts +1 -1
  179. package/package.json +2 -2
  180. package/popup/FeaturesModel.d.ts +1 -1
  181. package/popup/FeaturesModel.js +1 -1
  182. package/portal/support/layersLoader.js +1 -1
  183. package/portal/support/portalLayers.js +1 -1
  184. package/rest/print.js +1 -1
  185. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  186. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  187. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  188. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  189. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  190. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +2 -0
  191. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  192. package/views/3d/layers/graphics/Graphics3DDrapedBufferGraphicLayer.js +2 -0
  193. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +2 -0
  195. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  196. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  197. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  198. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +2 -0
  199. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  200. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  201. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  202. package/views/3d/layers/graphics/pointUtils.js +1 -1
  203. package/views/3d/terrain/OverlayManager.js +1 -1
  204. package/views/3d/terrain/OverlayRenderer.js +1 -1
  205. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  206. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +5 -5
  207. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +13 -13
  208. package/views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js +2 -0
  209. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  210. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +2 -0
  211. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +7 -7
  212. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +29 -27
  213. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +4 -4
  214. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  215. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +14 -14
  216. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  217. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +5 -5
  218. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +8 -8
  219. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +1 -1
  220. package/views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js +2 -0
  221. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +1 -1
  222. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +6 -6
  223. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  224. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  225. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  226. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  227. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  228. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  229. package/views/3d/webgl-engine/effects/atmosphere/ChapmanRaymarching.glsl.js +1 -1
  230. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  231. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  232. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  233. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  234. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +5 -5
  235. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  236. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  237. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
  238. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
  239. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  240. package/views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js +1 -1
  241. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
  242. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  243. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  244. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  245. package/views/3d/webgl-engine/lib/affectsGeometry.js +1 -1
  246. package/views/3d/webgl-engine/lib/bufferGeometryUtils.js +2 -0
  247. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +5 -5
  248. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  249. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +11 -11
  250. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  251. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  252. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  253. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  254. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  255. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  256. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  257. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  258. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  259. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  260. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  261. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  262. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  263. package/views/3d/webgl-engine/shaders/lineUniforms.js +2 -0
  264. package/views/DOMContainer.d.ts +27 -9
  265. package/views/DOMContainer.js +1 -1
  266. package/views/PopupView.d.ts +6 -0
  267. package/views/VideoView.d.ts +27 -9
  268. package/views/View.d.ts +16 -7
  269. package/views/View.js +1 -1
  270. package/views/View2D.d.ts +1 -1
  271. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  272. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  273. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  274. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  275. package/views/layers/FeatureLikeLayerView.d.ts +1 -2
  276. package/views/layers/ParquetLayerView.d.ts +15 -0
  277. package/views/layers/ParquetLayerView.js +1 -1
  278. package/webdoc/support/saveUtils.js +1 -1
  279. package/webdoc/support/unsupportedErrors.js +1 -1
  280. package/widgets/Legend.d.ts +1 -0
  281. package/widgets/support/SnappingControls.d.ts +1 -1
  282. package/assets/esri/core/workers/chunks/05963f57cbe5a5249496.js +0 -1
  283. package/assets/esri/core/workers/chunks/06ab24a083c3229228dd.js +0 -1
  284. package/assets/esri/core/workers/chunks/122111703528381539cc.js +0 -1
  285. package/assets/esri/core/workers/chunks/15cc2c295682f48030f9.js +0 -1
  286. package/assets/esri/core/workers/chunks/17b76e0d401c7e396d10.js +0 -1
  287. package/assets/esri/core/workers/chunks/2164fcaced72b0fda31f.js +0 -1
  288. package/assets/esri/core/workers/chunks/25b0885d3bc190b28c04.js +0 -1
  289. package/assets/esri/core/workers/chunks/27da9ece2afaeec39f59.js +0 -1
  290. package/assets/esri/core/workers/chunks/2b6c74646ff475a6e302.js +0 -1
  291. package/assets/esri/core/workers/chunks/340621182db9e8edbec2.js +0 -1
  292. package/assets/esri/core/workers/chunks/347bf269c2b1583d2dca.js +0 -1
  293. package/assets/esri/core/workers/chunks/384ae10053d35940de73.js +0 -1
  294. package/assets/esri/core/workers/chunks/451d7d456df0f4466563.js +0 -1
  295. package/assets/esri/core/workers/chunks/4cddd217383b9333f32e.js +0 -1
  296. package/assets/esri/core/workers/chunks/4fa59f8ed3b7b6239548.js +0 -1
  297. package/assets/esri/core/workers/chunks/5a5d80c2519aa3ea8878.js +0 -1
  298. package/assets/esri/core/workers/chunks/5b434e8c98e7119d4a3b.js +0 -1
  299. package/assets/esri/core/workers/chunks/5e4d6c283c2fa28db022.js +0 -1
  300. package/assets/esri/core/workers/chunks/5ea8809b6519c05ad9f6.js +0 -1
  301. package/assets/esri/core/workers/chunks/604344e45c0f27497188.js +0 -1
  302. package/assets/esri/core/workers/chunks/64770e2cf41211b63fd2.js +0 -1
  303. package/assets/esri/core/workers/chunks/658b2642ab6880770e4e.js +0 -1
  304. package/assets/esri/core/workers/chunks/6ef647b7769d27529f9c.js +0 -1
  305. package/assets/esri/core/workers/chunks/8313c626596a76c7449d.js +0 -1
  306. package/assets/esri/core/workers/chunks/841f67baf6a1634ada48.js +0 -1
  307. package/assets/esri/core/workers/chunks/84e9258a57d8c365f361.js +0 -1
  308. package/assets/esri/core/workers/chunks/8730e7e6e0296f43f10b.js +0 -1
  309. package/assets/esri/core/workers/chunks/87b4e916b2668203a6b0.js +0 -1
  310. package/assets/esri/core/workers/chunks/8fcfd515ee1b18c902e5.js +0 -1
  311. package/assets/esri/core/workers/chunks/9001e9a1e81bce175ddd.js +0 -1
  312. package/assets/esri/core/workers/chunks/966d0832a3c1f03668a0.js +0 -1
  313. package/assets/esri/core/workers/chunks/97dbbedea9fe03bd1306.js +0 -1
  314. package/assets/esri/core/workers/chunks/9a28a66807a1e3557018.js +0 -1
  315. package/assets/esri/core/workers/chunks/9bf48a907f91ea004648.js +0 -1
  316. package/assets/esri/core/workers/chunks/9c0fd8baa00ee9733ba4.js +0 -1
  317. package/assets/esri/core/workers/chunks/9c7fa9d324fa0bf64d9c.js +0 -1
  318. package/assets/esri/core/workers/chunks/a20526996d01386ec3b7.js +0 -1
  319. package/assets/esri/core/workers/chunks/a7edf7541569fef77cb3.js +0 -1
  320. package/assets/esri/core/workers/chunks/b1008bdfca995ebf98ed.js +0 -1
  321. package/assets/esri/core/workers/chunks/bfd85e8d54062a590f0e.js +0 -1
  322. package/assets/esri/core/workers/chunks/c8ba0673d1b87216e619.js +0 -1
  323. package/assets/esri/core/workers/chunks/d4926545193414cf2f16.js +0 -1
  324. package/assets/esri/core/workers/chunks/da18d96b35af20e73b3b.js +0 -1
  325. package/assets/esri/core/workers/chunks/df0481bcc1613ee4b7af.js +0 -1
  326. package/assets/esri/core/workers/chunks/e1af43e2a8f2ef1059e3.js +0 -1
  327. package/assets/esri/core/workers/chunks/eaf6d587477399a83088.js +0 -1
  328. package/assets/esri/core/workers/chunks/ec28e18275d36e71b438.js +0 -1
  329. package/assets/esri/core/workers/chunks/f05de08e194a3f9b96f2.js +0 -1
  330. package/assets/esri/core/workers/chunks/f31b424a3667686af10c.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3902],{49403(e,t,r){r.d(t,["Eq",0,{Regular:0,Provenance:1,Document:2},"G3",0,{esriMergePolicyType_UNSPECIFIED:0,esriMergePolicyTypeSumValues:1,esriMergePolicyTypeAreaWeighted:2,esriMergePolicyTypeDefaultValue:3},"GH",0,{esriSplitPolicyType_UNSPECIFIED:0,esriSplitPolicyTypeGeometryRatio:1,esriSplitPolicyTypeDuplicate:2,esriSplitPolicyTypeDefaultValue:3},"bV",0,{esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},"nP",0,{esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},"r5",0,{esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},"ti",0,{esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},"vy",0,{esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2},"wr",0,{esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2}])},45724(e,t,r){r.d(t,{I:()=>s});var a=r(2741),n=r(44208);const i="esri/rest/knowledgeGraph/wasmInterface/";let o;async function s(){return o||(o=async function(e){if(e){let{default:e}=await r.e(5367).then(()=>r(15367));return e({locateFile:e=>(0,a.s)(i+e)})}let{default:t}=await r.e(9013).then(()=>r(29013));return t({locateFile:e=>(0,a.s)(i+e)})}(!!(0,n.A)("wasm-simd")),o)}},53902(e,t,r){r.r(t),r.d(t,{_checkAuthentication:()=>ea,_esriRequestWrapper:()=>Xr,_fetchWrapper:()=>Wr,_getClientDataCacheCopy:()=>_r,_setMaxQueryParsingDurationForTesting:()=>ia,_submitJobWrapper:()=>Yr,clearClientDataCache:()=>Hr,clientDataCache:()=>wr,executeAddDomain:()=>Kr,executeAddGraphFieldIndex:()=>Rr,executeAddGraphProperties:()=>Mr,executeAddNamedTypes:()=>br,executeApplyEdits:()=>Ar,executeCreateReplica:()=>zr,executeDeleteDomain:()=>Vr,executeDeleteGraphFieldIndex:()=>kr,executeDeleteGraphProperty:()=>Dr,executeDeleteNamedType:()=>Cr,executeFindPaths:()=>qr,executeFindPathsAsynchronous:()=>Fr,executeQuery:()=>Pr,executeQueryStreaming:()=>Gr,executeSearch:()=>Ir,executeSearchStreaming:()=>Nr,executeUnregisterReplica:()=>Qr,executeUpdateDomain:()=>$r,executeUpdateGraphProperty:()=>Sr,executeUpdateNamedType:()=>Tr,executeUpdateSearchIndex:()=>xr,fetchAllClientDataKeys:()=>jr,fetchAsynchronousFindPathsResultData:()=>Lr,fetchClientDataAtKeys:()=>Or,fetchKnowledgeGraph:()=>Ur,fetchReplicaDefinition:()=>Jr,fetchReplicasInformation:()=>Br,kgRestServices:()=>vr,refreshDataModel:()=>Zr,refreshServiceDefinition:()=>Er});var a,n=r(70333),i=r(56507),o=r(49186),s=r(53966),l=r(17676),d=r(91075),u=r(16930),p=r(32198),c=r(69622),y=r(91429),h=r(78888),g=r(5443);let f=a=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(a,e)}};(0,p.Cg)([(0,y.MZ)({type:u.A})],f.prototype,"outSpatialReference",void 0),(0,p.Cg)([(0,y.MZ)({type:g.A})],f.prototype,"processExtent",void 0),(0,p.Cg)([(0,y.MZ)({type:u.A})],f.prototype,"processSpatialReference",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnColumnName",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnFeatureCollection",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnM",void 0),(0,p.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnZ",void 0),f=a=(0,p.Cg)([(0,y.$K)("esri.rest.geoprocessor.GPOptions")],f);var m=r(52039),w=r(20437),_=r(25482);let v=class extends _.o{constructor(e){super(e),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p.Cg)([(0,y.MZ)({type:g.A})],v.prototype,"extent",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"height",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"href",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"opacity",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"rotation",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"scale",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"visible",void 0),(0,p.Cg)([(0,y.MZ)()],v.prototype,"width",void 0),v=(0,p.Cg)([(0,y.$K)("esri.layers.support.MapImage")],v);var A=r(2272),b=r(2073),C=r(93223);let T=class extends _.o{constructor(e){super(e),this.area=0,this.units=null}};(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],T.prototype,"area",void 0),(0,p.Cg)([(0,C.e)(b.UO)],T.prototype,"units",void 0),T=(0,p.Cg)([(0,y.$K)("esri.rest.support.ArealUnit")],T);let M=class extends _.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],M.prototype,"itemId",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],M.prototype,"url",void 0),M=(0,p.Cg)([(0,y.$K)("esri.rest.support.DataFile")],M);var D=r(22671);let S=class extends _.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],S.prototype,"distance",void 0),(0,p.Cg)([(0,C.e)(b.Y8)],S.prototype,"units",void 0),S=(0,p.Cg)([(0,y.$K)("esri.rest.support.LinearUnit")],S);var R=r(66552);const k="multi-value-",x=new R.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPTimeUnit:"time-unit",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${k}areal-unit`,"GPMultiValue:GPBoolean":`${k}boolean`,"GPMultiValue:GPComposite":`${k}composite`,"GPMultiValue:GPDataFile":`${k}data-file`,"GPMultiValue:GPDate":`${k}date`,"GPMultiValue:GPDouble":`${k}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${k}feature-record-set-layer`,"GPMultiValue:Field":`${k}field`,"GPMultiValue:GPLinearUnit":`${k}linear-unit`,"GPMultiValue:GPLong":`${k}long`,"GPMultiValue:GPRasterData":`${k}raster-data`,"GPMultiValue:GPRasterDataLayer":`${k}raster-data-layer`,"GPMultiValue:GPRecordSet":`${k}record-set`,"GPMultiValue:GPString":`${k}string`,"GPMultiValue:GPTimeUnit":`${k}time-unit`});let P=class extends _.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p.Cg)([(0,C.e)(x,{ignoreUnknown:!1})],P.prototype,"dataType",void 0),(0,p.Cg)([(0,y.MZ)()],P.prototype,"paramName",void 0),(0,p.Cg)([(0,y.MZ)()],P.prototype,"value",void 0),P=(0,p.Cg)([(0,y.$K)("esri.rest.support.ParameterValue")],P);var G=r(36005);let I=class extends _.o{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};(0,p.Cg)([(0,y.MZ)()],I.prototype,"format",void 0),(0,p.Cg)([(0,y.MZ)({json:{name:"itemID",write:!0}})],I.prototype,"itemId",void 0),(0,p.Cg)([(0,y.MZ)()],I.prototype,"type",void 0),(0,p.Cg)([(0,G.w)("type")],I.prototype,"readType",null),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],I.prototype,"url",void 0),I=(0,p.Cg)([(0,y.$K)("esri.rest.support.RasterData")],I);var N=r(73133);let j=class extends _.o{constructor(e){super(e),this.time=0,this.units=null}};async function O(e,t){switch(e){case"time-unit":return j.fromJSON(t);case"areal-unit":return T.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return M.fromJSON(t);case"linear-unit":return S.fromJSON(t);case"feature-record-set-layer":if("url"in t)return M.fromJSON(t);if("layerDefinition"in t){let e=new(0,(await Promise.all([r.e(6361),r.e(8278),r.e(7865),r.e(6554),r.e(9953),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(2889),r.e(6263),r.e(8247),r.e(4674),r.e(7283),r.e(8589),r.e(7568)]).then(()=>r(18589))).default),{layerDefinition:a,featureSet:n}=t;return e.read({layerDefinition:a,featureSet:n},{origin:"portal-item"}),e.spatialReference=u.A.fromJSON(n.spatialReference??a.spatialReference??a.extent.spatialReference),e}return D.A.fromJSON(t);case"record-set":return"url"in t?M.fromJSON(t):D.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?v.fromJSON(t.mapImage):I.fromJSON(t);case"field":return w.A.fromJSON(t)}}function U(e){return e.startsWith(k)}function Z(e){return e.replace(k,"")}async function E(e){let t=x.fromJSON(e.dataType),{paramName:r}=e,a=U(t)?await async function(e,t){let r=Z(e),a="composite"===r?t.map(e=>O(x.fromJSON(e.dataType),e.value)):t.map(e=>O(r,e));return Promise.all(a)}(t,e.value):await O(t,e.value);return new P({dataType:t,paramName:r,value:a})}function F(e,t,r){for(let t in e){let r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>F({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],j.prototype,"time",void 0),(0,p.Cg)([(0,C.e)(N.j)],j.prototype,"units",void 0),j=(0,p.Cg)([(0,y.$K)("esri.rest.support.TimeUnit")],j);var q,L=r(37807);const K=(0,R.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),$=1e3;let V=class extends _.o{static{q=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){let{jobId:t,sourceUrl:r}=this,{path:a}=(0,A.Dl)(r),n={...this.requestOptions,...e,query:{f:"json"}},o=`${a}/jobs/${t}/cancel`,{data:s}=await(0,i.A)(o,n),{messages:d,jobStatus:u,progress:p}=q.fromJSON(s);return this.set({messages:d,jobStatus:u,progress:p}),"job-cancelled"===u?this:new Promise((t,r)=>{(0,l.u7)(n.signal,()=>{this.clearCancelJobTimer(),r((0,l.NK)())}),this.clearCancelJobTimer();let a=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then(({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(a,$);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(a,$)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){let{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},a=`${t}/jobs/${this.jobId}`,{data:n}=await(0,i.A)(a,r),{messages:o,jobStatus:s,progress:l}=q.fromJSON(n);return this.set({messages:o,jobStatus:s,progress:l}),this}async fetchResultData(e,t,r){t=f.from(t||{});let{returnColumnName:a,returnFeatureCollection:n,returnM:o,returnZ:s,outSpatialReference:l}=t,{path:d}=(0,A.Dl)(this.sourceUrl),u=F({returnColumnName:a||null,returnFeatureCollection:n||null,returnM:o||null,returnZ:s||null,outSR:l,returnType:"data",f:"json",...r?.query},null),p={...this.requestOptions,...r,query:u},c=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,i.A)(c,p);return E(y)}async fetchResultImage(e,t,r){let{path:a}=(0,A.Dl)(this.sourceUrl),n=F({...t.toJSON(),f:"json"}),o={...this.requestOptions,...r,query:n},s=`${a}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,i.A)(s,o);return E(l)}async fetchResultMapImageLayer(){let{path:e}=(0,A.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),a=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(8278),r.e(7865),r.e(6554),r.e(5566),r.e(7552),r.e(1722),r.e(1214),r.e(2889),r.e(4674),r.e(893),r.e(6884),r.e(2733)]).then(()=>r(7656))).default)({url:a})}async waitForJobCompletion(e={}){let{interval:t=$,signal:r,statusCallback:a,apiKey:n}=e;return new Promise((e,i)=>{(0,l.u7)(r,()=>{this.clearJobCompletionTimer(),i((0,l.NK)())}),this.clearJobCompletionTimer();let o=()=>{this._jobCompletionTimer||i((0,l.NK)()),this.checkJobStatus({query:{token:n}}).then(({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":a&&a(this),this._jobCompletionTimer=setTimeout(o,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":i(this);break;default:this._jobCompletionTimer=setTimeout(o,t)}}).catch(e=>{i(e)})};this._jobCompletionTimer=setTimeout(o,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p.Cg)([(0,y.MZ)()],V.prototype,"jobId",void 0),(0,p.Cg)([(0,C.e)(K,{ignoreUnknown:!1})],V.prototype,"jobStatus",void 0),(0,p.Cg)([(0,y.MZ)({type:[L.A]})],V.prototype,"messages",void 0),(0,p.Cg)([(0,y.MZ)()],V.prototype,"progress",void 0),(0,p.Cg)([(0,y.MZ)()],V.prototype,"requestOptions",void 0),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],V.prototype,"sourceUrl",void 0),V=q=(0,p.Cg)([(0,y.$K)("esri.rest.support.JobInfo")],V);let z=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1,this.dataModelTimestamp=null}};(0,p.Cg)([(0,y.MZ)()],z.prototype,"headerKeys",void 0),(0,p.Cg)([(0,y.MZ)()],z.prototype,"outSpatialReference",void 0),(0,p.Cg)([(0,y.MZ)()],z.prototype,"exceededTransferLimit",void 0),(0,p.Cg)([(0,y.MZ)()],z.prototype,"dataModelTimestamp",void 0),z=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],z);let J=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new z}};(0,p.Cg)([(0,y.MZ)()],J.prototype,"resultRows",void 0),(0,p.Cg)([(0,y.MZ)()],J.prototype,"resultHeader",void 0),J=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResult")],J);let B=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new z}};(0,p.Cg)([(0,y.MZ)()],B.prototype,"resultRowsStream",void 0),(0,p.Cg)([(0,y.MZ)()],B.prototype,"resultHeader",void 0),B=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],B);var Q=r(8631);let H=class extends _.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"unique",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"ascending",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"description",void 0),(0,p.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],H.prototype,"fieldNames",void 0),H=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.FieldIndex")],H);let W=class extends _.o{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=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.domain=null,this.defaultValue=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"alias",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"fieldType",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"geometryType",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasM",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasZ",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"nullable",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"editable",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"required",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"defaultVisibility",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"systemMaintained",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"role",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"domain",void 0),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],W.prototype,"defaultValue",void 0),W=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphProperty")],W);let Y=class extends _.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"alias",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"role",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,p.Cg)([(0,y.MZ)({type:[W],json:{write:!0}})],Y.prototype,"properties",void 0),(0,p.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],Y.prototype,"fieldIndexes",void 0),Y=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphObjectType")],Y);let X=class extends Y{constructor(e){super(e),this.type="entity"}};X=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.EntityType")],X);let ee=class extends Y{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],ee.prototype,"endPoints",void 0),ee=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.RelationshipType")],ee);let te=class extends _.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"value",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"behavior",void 0),te=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],te);let re=class extends _.o{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=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[],this.domains=[]}};(0,p.Cg)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],re.prototype,"timestamp",void 0),(0,p.Cg)([(0,y.MZ)({type:u.A,json:{write:!0}})],re.prototype,"spatialReference",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"strict",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"objectIdField",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"globalIdField",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"arcgisManaged",void 0),(0,p.Cg)([(0,y.MZ)({json:{write:!0}})],re.prototype,"identifierInfo",void 0),(0,p.Cg)([(0,y.MZ)()],re.prototype,"searchIndexes",void 0),(0,p.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"entityTypes",void 0),(0,p.Cg)([(0,y.MZ)({type:[ee],json:{write:!0}})],re.prototype,"relationshipTypes",void 0),(0,p.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"metaEntityTypes",void 0),(0,p.Cg)([(0,y.MZ)({type:[te],json:{write:!0}})],re.prototype,"provenanceSourceTypeValues",void 0),(0,p.Cg)([(0,y.MZ)({types:[Q.g],json:{write:!0}})],re.prototype,"domains",void 0),re=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.DataModel")],re);let ae=class extends _.o{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,this.supportsProvenance=!1}};(0,p.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ae.prototype,"capabilities",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"supportsSearch",void 0),(0,p.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ae.prototype,"supportedQueryFormats",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"allowGeometryUpdates",void 0),(0,p.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ae.prototype,"searchMaxRecordCount",void 0),(0,p.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ae.prototype,"serviceCapabilities",void 0),(0,p.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ae.prototype,"maxRecordCount",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"description",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"copyrightText",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"units",void 0),(0,p.Cg)([(0,y.MZ)({type:u.A,json:{write:!0}})],ae.prototype,"spatialReference",void 0),(0,p.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ae.prototype,"currentVersion",void 0),(0,p.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ae.prototype,"dateFieldsTimeReference",void 0),(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"serviceItemId",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"supportsDocuments",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"dataEditingNotSupported",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"schemaEditingNotSupported",void 0),(0,p.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"supportsProvenance",void 0),ae=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ServiceDefinition")],ae);let ne=class extends _.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function ie(e,t,r){if(0!==e.error_code)throw new o.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function oe(e){return e?.error_code?new o.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function se(e,t,r,a){let n=new r.ClientDataKey;n.deleteLater(),n.key_string=e;let i=new r.ClientDataFetchRequestParameter;i.deleteLater(),i.set_key(n);let o=t.get(e);return o&&!a&&(i.v_tag={v_tag:o.version}),i}(0,p.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"url",void 0),(0,p.Cg)([(0,y.MZ)({type:re,json:{write:!0}})],ne.prototype,"dataModel",void 0),(0,p.Cg)([(0,y.MZ)({type:ae,json:{write:!0}})],ne.prototype,"serviceDefinition",void 0),ne=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.KnowledgeGraph")],ne);var le=r(45724),de=r(48526),ue=r(86738),pe=r(39829),ce=r(82799);const ye={exclude:0,include:1};function he(e,t){let r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(me(e,t))}),r}function ge(e,t){let r=new t.ObjectValue;r.deleteLater();for(let[a,n]of Object.entries(e))r.set_key_value(a,me(n,t));return r}function fe(e,t){if(e instanceof de.A)return function(e,t){let r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;let a=[],n=[];n[0]=e.points.length;let i=0;return e.points.forEach(e=>{e.forEach(e=>{a[i]=e,i++})}),r.coords=new Float64Array(a),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof ue.A)return function(e,t){let r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;let a=[],n=[];n[0]=1,a[0]=e.x,a[1]=e.y;let i=2;return e.hasZ&&(a[i]=e.z,i++),e.hasM&&(a[i]=e.m,i++),r.coords=new Float64Array(a),r.lengths=new Uint32Array(n),r}(e,t);if(e instanceof ce.A||e instanceof pe.A)return function(e,t){let r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;let a=[],n=[],i=[];e instanceof ce.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,i=e.paths):e instanceof pe.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,i=e.rings);let o=0,s=0;return i.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{a[s]=e,s++})}),n[o]=t,o++}),r.coords=new Float64Array(a),r.lengths=new Uint32Array(n),r}(e,t);throw new o.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function me(e,t){if(null==e)return"";if("object"!=typeof e||e instanceof Date)return e;if(e instanceof d.A)return fe(e,t);if(Array.isArray(e)){let r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(me(e,t))}),r}return ge(e,t)}var we=r(49403);function _e(e,t){if(!e.typeName)throw new o.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){let r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(let[a,n]of Object.entries(e.properties))r.set_key_value(a,De(n,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){let r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(let[a,n]of Object.entries(e.properties))r.set_key_value(a,De(n,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new o.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function ve(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}}function Ae(e,t){let r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:we.r5[e.fieldType]},r.geometry_type={value:e.geometryType?we.bV[e.geometryType]:we.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:we.ti[e.role]},r.default_value=De(e.defaultValue,t),r.domain=e.domain??"",r}function be(e,t){let r=new t.SearchIndexProperties;r.deleteLater();for(let t of e.propertyNames)r.add_search_property_name(t);return r}function Ce(e,t,r,a){let n=new t.Domain;n.deleteLater(),n.name=e.name;let i=we.r5[r];n.field_type={value:i};let o=i;if((i===we.r5.esriFieldTypeTimeOnly||i===we.r5.esriFieldTypeDateOnly||i===we.r5.esriFieldTypeTimestampOffset)&&(o=we.r5.esriFieldTypeString),a&&(n.merge_policy_type={value:we.G3[a.mergePolicy]},n.split_policy_type={value:we.GH[a.splitPolicy]}),"coded-value"===e.type){let r=e;n.type="codedValue";let a=new t.CodedValueDomain;a.deleteLater();for(let e of r.codedValues){let r=new t.CodedValue;r.deleteLater(),r.name=e.name,r.set_code(e.code,{value:o}),a.add_coded_value(r)}n.coded_value_domain=a}else if("range"===e.type){let r=e;n.type="range";let a=new t.RangeDomain;a.deleteLater(),a.add_value(r.minValue,{value:o}),a.add_value(r.maxValue,{value:o}),n.range_domain=a}else n.type=e.type??"unspecified";return n}function Te(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:we.Eq[e.role]},r.strict=e.strict;for(let a of e.properties){let e=Ae(a,t);r.add_property(e)}return r}function Me(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function De(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?fe(e,t):null}function Se(e,t){let r=new t.EntityTypeReplicaDefinition;return r.deleteLater(),ke(e,t,r),e.documentOptions&&(r.document_options=function(e,t){let r=e.includeConnectedDocuments?function(e,t){let r=xe(e.includeDocumentProvenance?{includeProvenance:!0,includeSourceDocuments:e.includeDocumentSourceDocuments}:{includeProvenance:!1},t),a=new t.IncludeConnectedDocuments(r);return a.deleteLater(),a}(e,t):void 0,a=new t.DocumentOptions(r);return a.deleteLater(),a}(e.documentOptions,t)),r}function Re(e,t){let r=new t.RelationshipTypeReplicaDefinition;return r.deleteLater(),ke(e,t,r),r}function ke(e,t,r){if(r.type_name=e.typeName,r.open_cypher_where_clause=e.openCypherWhereClause??"",e.provenanceOptions&&(r.provenance_options=xe(e.provenanceOptions,t)),e.parameters)for(let[a,n]of Object.entries(e.parameters))void 0!==n&&r.add_parameter(a,me(n,t));return r}function xe(e,t){let r=function(e,t){let r=new t.IncludeProvenance("includeSourceDocuments"in e&&e.includeSourceDocuments);return r.deleteLater(),r}(e,t),a=new t.ProvenanceOptions(r);return a.deleteLater(),a}let Pe=class extends c.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,p.Cg)([(0,y.MZ)()],Pe.prototype,"decoderError",void 0),(0,p.Cg)([(0,y.MZ)()],Pe.prototype,"resultsCount",void 0),(0,p.Cg)([(0,y.MZ)()],Pe.prototype,"results",void 0),(0,p.Cg)([(0,y.MZ)()],Pe.prototype,"updatedKnowledgeGraph",void 0),Pe=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Pe);const Ge=Pe;let Ie=class extends Ge{constructor(e){super(e)}};Ie=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Ie);const Ne=Ie;let je=class extends Ge{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,p.Cg)([(0,y.MZ)()],je.prototype,"entityAddResultsCount",void 0),(0,p.Cg)([(0,y.MZ)()],je.prototype,"relationshipAddResultsCount",void 0),(0,p.Cg)([(0,y.MZ)()],je.prototype,"entityAddResults",void 0),(0,p.Cg)([(0,y.MZ)()],je.prototype,"relationshipAddResults",void 0),je=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],je);const Oe=je;let Ue=class extends Ge{constructor(e){super(e)}};Ue=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Ue);const Ze=Ue;let Ee=class extends c.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};(0,p.Cg)([(0,y.MZ)()],Ee.prototype,"decoderError",void 0),(0,p.Cg)([(0,y.MZ)()],Ee.prototype,"updatedKnowledgeGraph",void 0),Ee=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelSingletonOperationResult")],Ee);const Fe=Ee;let qe=class extends Ge{constructor(e){super(e)}};qe=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],qe);const Le=qe;let Ke=class extends Ge{constructor(e){super(e),this.warnings=[]}};(0,p.Cg)([(0,y.MZ)()],Ke.prototype,"warnings",void 0),Ke=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Ke);const $e=Ke;let Ve=class extends Ge{constructor(e){super(e)}};Ve=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],Ve);const ze=Ve;let Je=class extends Ge{constructor(e){super(e)}};Je=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Je);const Be=Je;let Qe=class extends Ge{constructor(e){super(e)}};Qe=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],Qe);const He=Qe;let We=class extends Ge{constructor(e){super(e)}};We=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],We);const Ye=We;function Xe(e,t){let r=[];for(let a=0;a<t;a++){let t=e.get_result_at(a);r.push({name:t.get_name(),error:oe(t.get_error())})}return r}function et(e){let t=e.get_results_count(),r=e.get_entity_type_add_results_count(),a=e.get_relationship_type_add_results_count(),n=new Oe({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error),entityAddResultsCount:r,relationshipAddResultsCount:a});for(let t=0;t<r;t++){let r=e.get_entity_type_add_results_at(t),a=r.get_name(),i=r.get_error();n.entityAddResults.push({name:a,error:oe(i)})}for(let t=0;t<a;t++){let r=e.get_relationship_type_add_results_at(t),a=r.get_name(),i=r.get_error();n.relationshipAddResults.push({name:a,error:oe(i)})}return n}function tt(e){let t=e.get_results_count();return new Be({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function rt(e){let t=e.get_results_count(),r=[];for(let t=0;t<e.get_warnings_count();t++){let a=oe(e.get_warning_at(t));null!=a&&r.push(a)}let a=Xe(e,t);return new $e({resultsCount:t,results:a,warnings:r,decoderError:oe(e.error)})}function at(e){let t=e.get_results_count();return new Ze({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function nt(e){let t=e.get_results_count();return new ze({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function it(e){let t=e.get_results_count();return new He({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function ot(e){let t=e.get_results_count();return new Ye({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function st(e){let t=e.get_results_count();return new Ne({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function lt(e){let t=e.get_results_count();return new Le({resultsCount:t,results:Xe(e,t),decoderError:oe(e.error)})}function dt(e){return new Fe({decoderError:oe(e.error)})}var ut=r(93637),pt=r(64108),ct=r(39357),yt=r(53177),ht=r(76357),gt=r(41628);let ft=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p.Cg)([(0,y.MZ)()],ft.prototype,"name",void 0),(0,p.Cg)([(0,y.MZ)()],ft.prototype,"supportedCategory",void 0),(0,p.Cg)([(0,y.MZ)()],ft.prototype,"analyzers",void 0),(0,p.Cg)([(0,y.MZ)()],ft.prototype,"searchProperties",void 0),ft=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SearchIndex")],ft);var mt=r(25927),wt=(r(77901),r(40662)),_t=r(42095),vt=r(23150);function At(e,t){let r={paths:[],hasM:!1,hasZ:!1},a=bt(e,r),{coords:n,geometry_type:i,lengths:s}=e;if(i.value!==t)throw new o.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return s.forEach(e=>{let t=[];for(let r=0;r<e;r++){let e=[];for(let t=0;t<a;t++)e[t]=n[l],l++;t.push(e)}r.paths.push(t)}),r}function bt(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}const Ct=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function Tt(e,t){if(null==e)return null;if("object"!=typeof e||"getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case 1:return function(e,t){let r={spatialReference:t},a=2;bt(e,r);let n=e.coords;return r.x=n[0],r.y=n[1],e.has_z&&(r.z=n[a],a++),e.has_m&&(r.m=n[a]),new ue.A(r)}(e,t);case 2:return function(e,t){let r={spatialReference:t},a=bt(e,r),n=e.lengths,i=e.coords,o=n[0];r.points=[];let s=0;for(let e=0;e<o;e++){let e=[];for(let t=0;t<a;t++)e[t]=i[s],s++;r.points.push(e)}return new de.A(r)}(e,t);case 3:return function(e,t){let{paths:r,hasM:a,hasZ:n}=At(e,3);return new ce.A({paths:r,hasM:a,hasZ:n,spatialReference:t})}(e,t);case 4:return function(e,t){let{paths:r,hasM:a,hasZ:n}=At(e,4);return new pe.A({rings:r,hasM:a,hasZ:n,spatialReference:t})}(e,t);case 5:case 7:return Ct().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return Ct().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}return Ct().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null}function Mt(e,t,r){return((e,t,r)=>{if(!function(e){return"object"==typeof e&&!!e&&"object_value_type"in e}(e))return Tt(e,r);if(t)switch(e.object_value_type.value){case 0:return function(e,t,r){return new wt.A(St(e,t,r))}(e,t,r);case 1:return Dt(e,t,r);case 2:return Rt(e,t,r);case 3:return function(e,t,r){let a=e.entity_count(),n=e.relationship_count(),i=[];for(let o=0;o<a;o++)i.push(Dt(e.get_entity_at(o),t,r)),o<n&&i.push(Rt(e.get_relationship_at(o),t,r));return new _t.A({path:i})}(e,t,r);case 4:return function(e,t,r){let a=[],n=e.count();for(let i=0;i<n;i++){let n=e.get_value_at(i);a.push(Mt(n,t,r))}return a}(e,t,r);default:return Ct().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}return Ct().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null})(e,t,r)}function Dt(e,t,r){let a=e.type_name,n=St(e,t,r),i=e.get_id();return new mt.A(Object.assign({typeName:a,id:i},n))}function St(e,t,r){let a={},n=e.key_count();for(let i=0;i<n;i++)a[e.get_key_at(i)]=Mt(e.get_value_at(i),t,r);return{properties:a}}function Rt(e,t,r){let a=e.type_name,n=St(e,t,r);return new vt.A(Object.assign({typeName:a,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},n))}function kt(e){let t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));let r=new u.A(e.get_out_sr());return new z({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit(),dataModelTimestamp:e.data_model_timestamp?new Date(e.data_model_timestamp):null})}let xt=!1;function Pt(e){return e.deleteLater(),new X(It(e))}function Gt(e){return e.deleteLater(),new H({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:Ft(e.fields)})}function It(e){return{name:e.name,alias:e.alias,role:(0,ut.i7)(we.Eq,e.role.value),strict:e.strict,properties:qt(e.properties),fieldIndexes:Lt(e.field_indexes)}}function Nt(e){return e.deleteLater(),new W({alias:e.alias,name:e.name,fieldType:(0,ut.i7)(we.r5,e.field_type.value)??void 0,geometryType:(0,ut.i7)(we.bV,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:(0,ut.i7)(we.ti,e.role.value),defaultValue:Tt(e.default_value,new u.A({wkid:4326})),domain:e.domain})}let jt=class extends ht.A{};function Ot(e){return 2===e.get_domain_type().value?new gt.A({name:e.name,minValue:e.range_domain.value_at(0),maxValue:e.range_domain.value_at(1)}):1===e.get_domain_type().value?new yt.A({name:e.name,codedValues:Jt(e)}):new jt({name:e.name})}function Ut(e){e.deleteLater();let t=It(e),r=[];for(let t=0;t<e.end_points.size();t++){let a=e.end_points.get(t);r.push({originEntityType:a.origin_entity_type,destinationEntityType:a.dest_entity_type})}return e.end_points.delete(),new ee(Object.assign({endPoints:r},t))}function Zt(e){return new te({behavior:e.behavior,value:e.value})}function Et(e){let t=[];for(let r=0;r<e.size();r++)t.push(Pt(e.get(r)));return e.delete(),t}function Ft(e){let t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function qt(e){let t=[];for(let r=0;r<e.size();r++){let a=Nt(e.get(r));"esriFieldTypeBigInteger"===a.fieldType&&(xt=!0),t.push(a)}return e.delete(),t}function Lt(e){let t=[];for(let r=0;r<e.size();r++)t.push(Gt(e.get(r)));return e.delete(),t}function Kt(e){let t=[];for(let r=0;r<e.size();r++)t.push(Ut(e.get(r)));return e.delete(),t}function $t(e){let t=[];for(let r=0;r<e.size();r++){let a=e.get(r);a.deleteLater(),t.push(Zt(a))}return e.delete(),t}function Vt(e){let t=[];for(let r=0;r<e.size();r++){let a=new ft,n=e.get(r);a.name=n.name,a.supportedCategory=(0,ut.i7)(we.nP,n.supported_category.value);let i=n.analyzers.size();for(let e=0;e<i;e++)a.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){let t=n.search_properties.keys().get(e),r=n.search_properties.get(t),i=[];for(let e=0;e<r.property_names.size();e++)i.push(r.property_names.get(e));a.searchProperties.set(t,{propertyNames:i})}t.push(a)}return e.delete(),t}function zt(e){let t=[];for(let r=0;r<e.domains_count();r++){let a=e.domain_at(r);a.deleteLater(),t.push(Ot(a))}return t}function Jt(e){let t=[];for(let r=0;r<e.coded_value_domain.coded_values_count();r++){let a=e.coded_value_domain.coded_value_at(r);a.deleteLater(),t.push(new ct.A({name:a.name,code:a.get_code()}))}return t}jt=(0,p.Cg)([(0,pt.$)("esri.rest.knowledgeGraph.wasmInterface.wasmToDataModelFactories")],jt);let Bt=class extends c.A{constructor(e){super(e),this.asyncStatusUrl=null,this.createReplicaResult=null}};(0,p.Cg)([(0,y.MZ)()],Bt.prototype,"asyncStatusUrl",void 0),(0,p.Cg)([(0,y.MZ)()],Bt.prototype,"createReplicaResult",void 0),Bt=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.CreateReplicaResponse")],Bt);let Qt=class extends c.A{constructor(e){super(e),this.replicaName=null,this.replicaId=null,this.replicaOwner=null,this.lastSyncDate=null,this.creationDate=null,this.syncDirection=null,this.replicaFilters=null}};(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"replicaName",void 0),(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"replicaId",void 0),(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"replicaOwner",void 0),(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"lastSyncDate",void 0),(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"creationDate",void 0),(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"syncDirection",void 0),(0,p.Cg)([(0,y.MZ)()],Qt.prototype,"replicaFilters",void 0),Qt=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicaDefinition")],Qt);let Ht=class extends c.A{constructor(e){super(e),this.replicas=[]}};(0,p.Cg)([(0,y.MZ)()],Ht.prototype,"replicas",void 0),Ht=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicasInformationResponse")],Ht);let Wt=class extends c.A{constructor(e){super(e),this.decoderError=null,this.unregisterReplicaResults=[]}};(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"decoderError",void 0),(0,p.Cg)([(0,y.MZ)()],Wt.prototype,"unregisterReplicaResults",void 0),Wt=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.UnregisterReplicaResponse")],Wt);const Yt=new u.A({wkid:4326});function Xt(e,t){let r=[];for(let a=0;a<e;a++){let e=oe(t.get_warning_at(a));e&&r.push(e)}return r}function er(e,t){let r=[];for(let a=0;a<e;a++){let e=oe(t.get_error_at(a));e&&r.push(e)}return r}function tr(e){return{replicaName:e.get_replica_name(),replicaId:e.get_replica_id(),lastSyncDate:hr(e.get_last_sync_date())}}function rr(e){return{replicaId:e.get_replica_id(),error:e.has_error()?oe(e.get_error()):void 0}}function ar(e,t){let r=e.get_static_definition();return r.deleteLater(),{inputQuantizationParameters:void 0,inputSpatialReference:new u.A(e.input_spatial_reference),staticDefinition:nr(r,t)}}function nr(e,t){let r=[],a=[];for(let a=0;a<e.get_entity_type_replica_definition_count();a++){let n=e.get_entity_type_replica_definition_at(a);n.deleteLater(),r.push(ir(n,t))}for(let r=0;r<e.get_relationship_type_replica_definition_count();r++){let n=e.get_relationship_type_replica_definition_at(r);n.deleteLater(),a.push(or(n,t))}return{entityTypeReplicaDefinitions:r,relationshipTypeReplicaDefinitions:a}}function ir(e,t){let r=e.document_options.get_include_connected_documents();return r?.deleteLater(),{...sr(e,t),documentOptions:r?dr(r):{includeConnectedDocuments:!1}}}function or(e,t){return sr(e,t)}function sr(e,t){let r=e.provenance_options;r.deleteLater();let a={},n=e.get_parameter_count();for(let r=0;r<n;r++)a[e.get_parameter_key_at(r)]=lr(e.get_parameter_value_at(r),t);return{typeName:e.type_name,openCypherWhereClause:e.open_cypher_where_clause,provenanceOptions:ur(r),parameters:n?a:void 0}}function lr(e,t){return Mt(e,t,Yt)}function dr(e){let t=e.get_provenance_options();t.deleteLater();let r=ur(t);return r.includeProvenance?{includeConnectedDocuments:!0,includeDocumentProvenance:!0,includeDocumentSourceDocuments:r.includeSourceDocuments}:{includeConnectedDocuments:!0,includeDocumentProvenance:!1}}function ur(e){let t=e.get_include_provenance();return t?{includeProvenance:!0,includeSourceDocuments:pr(t)}:{includeProvenance:!1}}function pr(e){return e.get_include_source_documents()}function cr(e,t){let r=e.value,a=t.SyncDirection;if(r===a.BIDIRECTIONAL.value)return"bidirectional";if(r===a.UPLOAD.value)return"upload";if(r===a.DOWNLOAD.value)return"download";throw new o.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction value: ${r}`)}function yr(e){switch(e.value){case 0:return;case 1:return"pbf";case 2:return"spbf";case 3:return"geoparquet";case 4:return"sqlite";default:throw new o.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format value: ${e.value}`)}}function hr(e){return e?new Date(e):null}let gr=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.username=null,this.timestamp=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,p.Cg)([(0,y.MZ)()],gr.prototype,"hasError",void 0),(0,p.Cg)([(0,y.MZ)()],gr.prototype,"error",void 0),(0,p.Cg)([(0,y.MZ)()],gr.prototype,"username",void 0),(0,p.Cg)([(0,y.MZ)()],gr.prototype,"timestamp",void 0),(0,p.Cg)([(0,y.MZ)()],gr.prototype,"editResults",void 0),(0,p.Cg)([(0,y.MZ)()],gr.prototype,"cascadeRelationshipDeleteResults",void 0),(0,p.Cg)([(0,y.MZ)()],gr.prototype,"cascadeProvenanceDeleteResults",void 0),gr=(0,p.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],gr);const fr=gr;function mr(e){let t=e.has_error(),r=function(e){let t=e.get_apply_edits_metadata();t.deleteLater();let r=t.get_username(),a=t.get_timestamp();return{username:r,timestamp:null==a?null:new Date(a)}}(e),a=new fr({hasError:t,error:t?oe(e.error):null});a.username=r.username,a.timestamp=r.timestamp;let n=e.get_edit_results_count();for(let t=0;t<n;t++){let r=e.get_edit_results_at(t);r.deleteLater();let n=e.get_edit_results_type_name_at(t),i=[],o=[],s=[],l=r.get_add_results_count(),d=r.get_update_results_count(),u=r.get_delete_results_count();for(let e=0;e<l;e++){let t=r.get_add_result_at(e);t.deleteLater(),i.push({id:t.id,error:oe(t.error)})}for(let e=0;e<d;e++){let t=r.get_update_result_at(e);t.deleteLater(),o.push({id:t.id,error:oe(t.error)})}for(let e=0;e<u;e++){let t=r.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:oe(t.error)})}a.editResults.push({typeName:n,adds:i,updates:o,deletes:s})}let i=e.get_cascaded_rel_deletes_count();for(let t=0;t<i;t++){let r=e.get_cascaded_rel_deletes_at(t);r.deleteLater();let n=e.get_cascaded_rel_deletes_type_name_at(t),i=[];for(let e=0;e<r.get_count();e++){let t=r.get_result_at(e);t.deleteLater(),i.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:oe(t.error)})}a.cascadeRelationshipDeleteResults.push({typeName:n,cascadeRelationshipDeletes:i})}if(e.has_cascading_provenance_deletes()){let t=e.get_cascading_provenance_deletes();t.deleteLater();let r=t.get_count();for(let e=0;e<r;e++){let r=t.get_result_at(e);r.deleteLater(),a.cascadeProvenanceDeleteResults.push({id:r.id,error:oe(r.error)})}}return a}const wr=new Map,_r=()=>new Map(wr.entries()),vr={fetchKnowledgeGraph:async e=>{let t=new ne({url:e}),r=[];return r.push(Zr(t)),r.push(Er(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await la(e)},refreshServiceDefinition:async e=>{let t=(await(0,i.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new ae(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{let r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new o.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");let a=r[0],n=(await Xr(`${a}/rest/info`,{query:{f:"json"}})).data.currentVersion;return await Yr(`${a}/rest/services/${n&&n<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{let r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new o.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");let a,n=r[0],i=(await Xr(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,s=await Xr(`${n}/rest/services/${i&&i<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"json",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new o.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);for(let e of s.data.results)if("out_results_string"===e.paramName){a=e.value;break}if(!a)throw new o.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return a},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{let a=`${e.url}/graph/query`;await ea(e);let n=await ra(a,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new o.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");n.data.body=await async function(e,t){let r=await(0,le.I)(),a=new r.GraphQueryRequestEncoder;if(a.deleteLater(),a.output_spatial_reference=e.outputSpatialReference?{wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:r.SpatialReferenceUtil.WGS84(),a.open_cypher_query=e.openCypherQuery,e.bindParameters)for(let[t,n]of Object.entries(e.bindParameters))ta(t,n,a,r);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,a);else{if(t.dataModel||await Zr(t),4326!==t.dataModel?.spatialReference?.wkid)throw new o.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");a.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new o.A("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.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new o.A("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:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,a,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:ye[e]}}(e.provenanceBehavior,a);try{a.encode()}catch(e){throw new o.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}let n=a.get_encoding_result();if(0!==n.error.error_code)throw new o.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t,e);let i=await Wr(n.data.url,n.data);if(e.dataModel){let t=await sa(i,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new o.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported||null!=e.dataModel.arcgisManaged&&!e.dataModel.arcgisManaged)throw new o.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");let a=`${e.url}/graph/applyEdits`;await ea(e);let n=await ra(a,r);return n.data.body=await async function(e,t){if(t.dataModel||await Zr(t),!t.dataModel)throw new o.A("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");let r=await(0,le.I)(),a=!!e.options?.cascadeDelete,n=!!e.options?.cascadeProvenanceDelete,i=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?ve(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=a,i.cascade_delete_provenance=n;try{let t;e.entityAdds?.forEach(e=>{t=i.add_entity(_e(e,r)),ie(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.A("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(_e(e,r)),ie(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.A("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(_e(e,r)),ie(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.A("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(_e(e,r)),ie(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.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");let 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.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");let t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),i.encode()}catch(e){throw new o.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}let s=i.get_encoding_result();return ie(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return aa(e,(await(0,le.I)()).GraphApplyEditsDecoder,mr)}(await Wr(n.data.url,n.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new o.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");let a=`${e.url}/dataModel/edit/namedTypes/add`;await ea(e);let n=await ra(a,r);n.data.body=await async function(e){let t=await(0,le.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach(e=>{r.add_entity_type(function(e,t){let r=new t.EntityType;return r.deleteLater(),Te(e,t,r)}(e,t))}),e.newRelationshipTypes?.forEach(e=>{r.add_relationship_type(function(e,t){let r=new t.RelationshipType;r.deleteLater();for(let a of e.endPoints){let e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=a.originEntityType,e.dest_entity_type=a.destinationEntityType,r.add_end_point(e)}return Te(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new o.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}let a=r.get_encoding_result();return ie(a.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(a.get_byte_buffer())}(t);let i=await async function(e){return aa(e,(await(0,le.I)()).GraphNamedObjectTypeAddsResponseDecoder,et)}(await Wr(n.data.url,n.data));return i.updatedKnowledgeGraph=await Ur(e.url),i},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new o.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");let a=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await ea(e);let n=await ra(a,r);n.data.body="";let i=await async function(e){return aa(e,(await(0,le.I)()).GraphNamedObjectTypeDeleteResponseDecoder,rt)}(await Wr(n.data.url,n.data));return i.updatedKnowledgeGraph=await Ur(e.url),i},executeUpdateNamedType:async(e,t,r,a)=>{if(!t&&!Object.keys(r).length)throw new o.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");let n=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await ea(e);let i=await ra(n,a);i.data.body=await async function(e,t,r){let a=await(0,le.I)(),n=new a.GraphNamedObjectTypeUpdateRequestEncoder;if(n.deleteLater(),r.entityTypes.some(e=>e.name===t))n.update_entity_type(function(e,t){let r=new t.EntityType;return r.deleteLater(),Me(e,r)}(e,a));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new o.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");n.update_relationship_type(function(e,t){let r=new t.RelationshipType;return r.deleteLater(),Me(e,r)}(e,a))}n.update_alias=e.hasOwnProperty("alias");try{n.encode()}catch(e){throw new o.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}let i=n.get_encoding_result();return ie(i.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(i.get_byte_buffer())}(r,t,e.dataModel);let s=await async function(e){return aa(e,(await(0,le.I)()).GraphNamedObjectTypeUpdateResponseDecoder,tt)}(await Wr(i.data.url,i.data));return s.updatedKnowledgeGraph=await Ur(e.url),s},executeAddGraphProperties:async(e,t,r,a)=>{if(!t&&!r.length)throw new o.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");let n=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await ea(e);let i=await ra(n,a);i.data.body=await async function(e){let t=await(0,le.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(Ae(e,t))});try{r.encode()}catch(e){throw new o.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}let a=r.get_encoding_result();return ie(a.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(a.get_byte_buffer())}(r);let s=await async function(e){return aa(e,(await(0,le.I)()).GraphPropertyAddsResponseDecoder,at)}(await Wr(i.data.url,i.data));return s.updatedKnowledgeGraph=await Ur(e.url),s},executeDeleteGraphProperty:async(e,t,r,a)=>{if(!t&&!r)throw new o.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");let n=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await ea(e);let i=await ra(n,a);i.data.body=await async function(e){let t=new((await(0,le.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new o.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}let r=t.get_encoding_result();return ie(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);let s=await async function(e){return aa(e,(await(0,le.I)()).GraphPropertyDeleteResponseDecoder,nt)}(await Wr(i.data.url,i.data));return s.updatedKnowledgeGraph=await Ur(e.url),s},executeUpdateGraphProperty:async(e,t,r,a,n)=>{if(!t&&!r&&!Object.keys(a).length)throw new o.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");let i=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await ea(e);let s=await ra(i,n);s.data.body=await async function(e,t){let r=await(0,le.I)(),a=new r.GraphPropertyUpdateRequestEncoder;a.deleteLater(),a.update_graph_property(function(e,t){let r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=De(e.defaultValue,t)),e.hasOwnProperty("domain")&&(r.domain=e.domain),r}(t,r)),a.set_property_name(e),a.update_alias=t.hasOwnProperty("alias"),a.update_editable=t.hasOwnProperty("editable"),a.update_required=t.hasOwnProperty("required"),a.update_visible=t.hasOwnProperty("defaultVisibility"),a.update_default_value=t.hasOwnProperty("defaultValue"),a.update_domain=t.hasOwnProperty("domain");try{a.encode()}catch(e){throw new o.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}let n=a.get_encoding_result();return ie(n.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(n.get_byte_buffer())}(r,a);let l=await async function(e){return aa(e,(await(0,le.I)()).GraphPropertyUpdateResponseDecoder,it)}(await Wr(s.data.url,s.data));return l.updatedKnowledgeGraph=await Ur(e.url),l},executeAddGraphFieldIndex:async(e,t,r,a)=>{if(!t)throw new o.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new o.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");let n=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await ea(e);let i=await ra(n,a);i.data.body=await async function(e){let t=await(0,le.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){let r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(let t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new o.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}let a=r.get_encoding_result();return ie(a.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(a.get_byte_buffer())}(r);let s=await async function(e){return aa(e,(await(0,le.I)()).GraphIndexAddsResponseDecoder,st)}(await Wr(i.data.url,i.data));return s.updatedKnowledgeGraph=await Ur(e.url),s},executeDeleteGraphFieldIndex:async(e,t,r,a)=>{if(!t)throw new o.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new o.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");let n=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await ea(e);let i=await ra(n,a);i.data.body=await async function(e){let t=new((await(0,le.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new o.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}let r=t.get_encoding_result();return ie(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);let s=await async function(e){return aa(e,(await(0,le.I)()).GraphIndexDeleteResponseDecoder,lt)}(await Wr(i.data.url,i.data));return s.updatedKnowledgeGraph=await Ur(e.url),s},executeUpdateSearchIndex:async(e,t,r,a)=>{if(!t)throw new o.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new o.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");let n=`${e.url}/dataModel/searchIndex/update`;await ea(e);let i=await ra(n,a);i.data.body=await async function(e,t){let r=await(0,le.I)(),a=new r.GraphUpdateSearchIndexRequestEncoder;a.deleteLater(),t.hasOwnProperty("addSearchProperties")&&a.insert_add_search_property(e,be(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&a.insert_delete_search_property(e,be(t.removeSearchProperties,r));try{a.encode()}catch(e){throw new o.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}let n=a.get_encoding_result();return ie(n.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(n.get_byte_buffer())}(t,r);let s=await async function(e){return aa(e,(await(0,le.I)()).GraphUpdateSearchIndexResponseDecoder,ot)}(await Wr(i.data.url,i.data));return s.updatedKnowledgeGraph=await Ur(e.url),s},executeAddDomain:async(e,t,r,{mergePolicy:a="esriMergePolicyTypeDefaultValue",splitPolicy:n="esriSplitPolicyTypeDefaultValue"},i)=>{let s=`${e.url}/dataModel/domains/add`;await ea(e);let l=await ra(s,i);l.data.body=await async function(e,t,r){let a=await(0,le.I)(),n=new a.GraphDomainAddRequestEncoder;n.deleteLater(),n.set_domain(Ce(e,a,t,r));try{n.encode()}catch(e){throw new o.A("knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}let i=n.get_encoding_result();return ie(i.error,"knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(i.get_byte_buffer())}(t,r,{mergePolicy:a,splitPolicy:n});let d=await async function(e){return aa(e,(await(0,le.I)()).GraphDomainAddResponseDecoder,dt)}(await Wr(l.data.url,l.data));return d.updatedKnowledgeGraph=await Ur(e.url),d},executeUpdateDomain:async(e,t,r,a,n)=>{let i=`${e.url}/dataModel/domains/${t.name}/update`;await ea(e);let s=await ra(i,n);s.data.body=await async function(e,t,r){let a=await(0,le.I)(),n=new a.GraphDomainUpdateRequestEncoder;n.deleteLater(),n.set_domain(Ce(e,a,t,r)),n.update_domain=!0,r?.mergePolicy&&(n.update_merge_policy=!0),r?.splitPolicy&&(n.update_split_policy=!0);try{n.encode()}catch(e){throw new o.A("knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}let i=n.get_encoding_result();return ie(i.error,"knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(i.get_byte_buffer())}(t,r,a);let l=await async function(e){return aa(e,(await(0,le.I)()).GraphDomainUpdateResponseDecoder,dt)}(await Wr(s.data.url,s.data));return l.updatedKnowledgeGraph=await Ur(e.url),l},executeDeleteDomain:async(e,t,r)=>{let a=`${e.url}/dataModel/domains/${t}/delete`;if(!t)throw new o.A("knowledge-graph:no-arguments","The operation to delete a domain from the data model contained missing or empty domain name");await ea(e);let n=await ra(a,r);n.data.body="";let i=await async function(e){return aa(e,(await(0,le.I)()).GraphDomainDeleteResponseDecoder,dt)}(await Wr(n.data.url,n.data));return i.updatedKnowledgeGraph=await Ur(e.url),i},executeCreateReplica:async(e,t,r)=>{let a=`${e.url}/replicas/create`;await ea(e);let n=await ra(a,r);return n.data.body=await async function(e){let t=function(e,t){let r=new t.CreateReplicaRequestEncoder;return r.deleteLater(),e.requestedReplicaId&&(r.replica_id=e.requestedReplicaId),e.requestedReplicaName&&(r.requested_replica_name=e.requestedReplicaName),r.sync_direction=function(e,t){let r=t.SyncDirection,a=e.toUpperCase(),n=r?.[a];if(!n)throw new o.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction: ${e}`);return n}(e.syncDirection,t),r.sync_data_format=function(e,t){let r=t.SyncDataFormat,a=e.toUpperCase(),n=r?.[a];if(!n)throw new o.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format: ${e}`);return n}(e.syncDataFormat,t),r.async=!1,"reference"===e.type&&(r.reference_replica=function(e,t){let r=new t.ReferenceReplica;return r.deleteLater(),r.replica_id=e.replicaId,r}(e.referenceReplica,t)),"filter"===e.type&&(r.replica_filters=function(e,t){let r=e.inputQuantizationParameters?ve(e.inputQuantizationParameters):t.InputQuantizationUtil.WGS84_lossless(),a=function(e,t){let r=new t.StaticDefinition;r.deleteLater();let a=e.entityTypeReplicaDefinitions??[],n=e.relationshipTypeReplicaDefinitions??[];if(a.length<1&&n.length<1)throw new o.A("knowledge-graph:replica-invalid-static-definition","A Filter Replica static definition must include at least one entity type or relationship type replica definition");for(let e of a)r.add_entity_type_replica_definition(Se(e,t));for(let e of n)r.add_relationship_type_replica_definition(Re(e,t));return r}(e.staticDefinition,t),n=new t.ReplicaFilters(a);return n.deleteLater(),n.input_quantization_parameters=r,e.inputSpatialReference&&(n.input_spatial_reference=e.inputSpatialReference),n}(e.replicaFilters,t)),r}(e,await(0,le.I)());try{t.encode()}catch(e){throw new o.A("knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed",{error:e})}let r=t.get_encoding_result();return ie(r.error,"knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed"),structuredClone(r.get_byte_buffer())}(t),async function(e){let t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){let t=await e.arrayBuffer(),r=new((await(0,le.I)()).CreateReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&ie(r.error,"knowledge-graph:createReplica-decoding-error","An error occurred while decoding the createReplica response"),function(e){let t=new Bt;if(e.has_async_status_url()&&(t.asyncStatusUrl=e.get_async_status_url()),e.has_create_replica_result()){let r=e.get_create_replica_result();r.deleteLater(),t.createReplicaResult=function(e){return{errors:er(e.get_error_count(),e),warnings:Xt(e.get_warning_count(),e),replicaName:e.get_replica_name(),requestedReplicaName:e.get_requested_replica_name(),replicaId:e.get_replica_id(),syncDate:hr(e.get_sync_date()),replicaDataFormat:yr(e.get_replica_data_format()),replicaDataUrl:e.get_replica_data_url()}}(r)}return t}(r)}finally{r.deleteLater()}}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for createReplica",{responseType:t,data:await e.text()})}(await Wr(n.data.url,n.data))},fetchReplicaDefinition:async(e,t,r)=>{let a=`${e.url}/replicas/${t}`,n=await(0,i.A)(a,{responseType:"array-buffer",query:{f:"pbf",...r?.query},signal:r?.signal,timeout:r?.timeout}),s=n.getHeader?.("content-type"),l=n.data;if(s?.includes("application/x-protobuf")){let t=await(0,le.I)(),r=new t.ReplicaDefinitionResponseDecoder;return r.deleteLater(),r.decode(new Uint8Array(l)),r.has_error()&&ie(r.error,"knowledge-graph:fetchReplica-decoding-error","An error occurred while decoding the replica definition response"),function(e,t,r){let a=e.get_replica_definition();a.deleteLater();let n=a.get_replica_filters();return n.deleteLater(),new Qt({replicaName:a.get_replica_name(),replicaId:a.get_replica_id(),replicaOwner:a.get_replica_owner(),lastSyncDate:hr(a.get_last_sync_date()),creationDate:hr(a.get_creation_date()),syncDirection:cr(a.get_sync_direction(),t),replicaFilters:ar(n,r)})}(r,t,e.dataModel)}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching a replica",{responseType:s,data:n.data})},fetchReplicasInformation:async(e,t)=>{let r=`${e.url}/replicas`,a=await(0,i.A)(r,{responseType:"array-buffer",query:{f:"pbf",...t?.query},signal:t?.signal,timeout:t?.timeout}),n=a.getHeader?.("content-type"),s=a.data;if(n?.includes("application/x-protobuf")){let e=new((await(0,le.I)()).ReplicasResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&ie(e.error,"knowledge-graph:fetchReplicasInformation-decoding-error","An error occurred while decoding the replicas information response"),function(e){let t=[];for(let r=0;r<e.get_replicas_count();r++){let a=e.get_replica_info_at(r);a.deleteLater(),t.push(tr(a))}return new Ht({replicas:t})}(e)}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching replicas information",{responseType:n,data:a.data})},executeUnregisterReplica:async(e,t,r)=>{if(!0===t.unregisterAll&&"replicaIds"in t)throw new o.A("knowledge-graph:no-arguments","The operation to unregister replicas cannot include replica ids when unregisterAll is true");if(!0!==t.unregisterAll){let e="replicaIds"in t?t.replicaIds:void 0;if(!Array.isArray(e)||!e.some(e=>!!e))throw new o.A("knowledge-graph:no-arguments","The operation to unregister replicas requires at least one replica id")}let a=`${e.url}/replicas/unregister`;await ea(e);let n=await ra(a,r);return n.data.body=await async function(e){let t=function(e,t){let r=new t.UnregisterReplicaRequestEncoder;if(r.deleteLater(),e.unregisterAll)r.set_unregister_all();else{let{replicaIds:t=[]}=e;t.forEach(e=>r.add_replica_id(e))}return r}(e,await(0,le.I)());try{t.encode()}catch(e){throw new o.A("knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed",{error:e})}let r=t.get_encoding_result();return ie(r.error,"knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed"),structuredClone(r.get_byte_buffer())}(t),async function(e){let t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){let t=await e.arrayBuffer(),r=new((await(0,le.I)()).UnregisterReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&ie(r.error,"knowledge-graph:unregisterReplica-decoding-error","An error occurred while decoding the unregisterReplica response"),function(e){let t=[];for(let r=0;r<e.get_unregister_replica_result_count();r++){let a=e.get_unregister_replica_result_at(r);a.deleteLater(),t.push(rr(a))}return new Wt({decoderError:oe(e.error)??null,unregisterReplicaResults:t})}(r)}finally{r.deleteLater()}}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for unregisterReplica",{responseType:t,data:await e.text()})}(await Wr(n.data.url,n.data))},executeQuery:async(e,t,r)=>{let a=`${e.url}/graph/query`,n=await(0,i.A)(a,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=n.getHeader?.("content-type"),l=n.data;if(s?.includes("application/x-protobuf")){let t=new((await(0,le.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){let r=oa({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new o.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:n.data})},executeSearch:async(e,t,r)=>{let a="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,n=`${e.url}/graph/search`,s=await(0,i.A)(n,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:a,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=s.getHeader?.("content-type"),d=s.data;if(l?.includes("application/x-protobuf")){let t=new((await(0,le.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){let r=oa({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new J({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new o.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:s.data})},executeSearchStreaming:async(e,t,r)=>{let a=`${e.url}/graph/search`;await ea(e);let n=await ra(a,r);n.data.body=await async function(e){let t=await(0,le.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;let a="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[a],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(he(e.idsFilter,t))}catch(e){throw new o.A("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=>{r.add_named_type_filter(e)});try{r.encode()}catch(e){throw new o.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}let n=r.get_encoding_result();if(0!==n.error.error_code)throw new o.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t);let i=await Wr(n.data.url,n.data);if(e.dataModel){let t=await sa(i,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new o.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let a=wr.get(e.url||"");a||(a=new Map,wr.set(e.url||"",a));let n=new Map(a.entries()),i=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));let s=await(0,le.I)(),l=function(e,t,r,a=!1){let n=new r.ClientDataFetchRequestEncoder;n.deleteLater();for(let i of e){let e=se(i,t,r,a);n.add_client_data_fetch_request_parameter(e)}n.encode();let i=n.get_encoding_result();return ie(i.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(i.get_byte_buffer())}(t,a,s,r.ignoreCache),d=await ra(i,r.requestOptions);d.data.body=l;let u=await Wr(d.data.url,d.data),p=u.headers.get("content-type");if(p?.includes("application/x-protobuf")){let e=new s.ClientDataFetchResponseDecoder;e.deleteLater();let t=await u.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&ie(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,a=!1){let n=new Map;for(let i=0;i<e.get_results_count();i++){let o=e.get_result_at(i);if(2!==o.get_fetch_result_case().value||0!==o.error().error_code){let e=o.get_key().key_string;r.has(e)&&t.delete(e);continue}let s,l=o.get_value(),d=o.get_key().key_string,u=r.get(d);if(2===l.get_data_case().value&&u)s=u.value;else{if(1!==l.get_data_case().value)continue;{s=l.get_data().client_data_string;let e=o.get_value().get_v_tag().v_tag;a||t.set(d,{key:d,version:e,value:s})}}n.set(d,s)}return n}(e,a,n,r.ignoreCache)}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:u})},fetchAllClientDataKeys:async(e,t)=>{let r=`${e.url}/clientData`,a=await(0,i.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),n=a.getHeader?.("content-type"),s=a.data;if(n?.includes("application/x-protobuf")){let e=new((await(0,le.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&ie(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){let t=e.get_keys(),r=[];for(let e=0;e<t.get_keys_count();e++){let a=t.get_key_at(e);1===a.get_client_data_key_type().value&&r.push(a.key_string)}return r}(e)}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:a.data})},clearClientDataCache:()=>wr.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,a)=>async function(e,t,r,a){return r=f.from(r||{}),async function(e,t,r,a,n){let o={},s={},l=[];!function(e,t,r){for(let a in e){let n=e[a];if(n&&"object"==typeof n&&n instanceof D.A){let{features:e}=n;r[a]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(a,l,o);let d=await(0,m.el)(l),{outSpatialReference:u,processExtent:p,processSpatialReference:c,returnColumnName:y,returnFeatureCollection:h,returnM:g,returnZ:f}=r,{path:w}=(0,A.Dl)(e);for(let e in o){let[t,r]=o[e];s[e]=d.slice(t,r)}let _=u?u.wkid||u:null,v=c?c.wkid||c:null,b="execute"===t?{returnColumnName:y||void 0,returnFeatureCollection:h||void 0,returnM:g||void 0,returnZ:f||void 0}:null,C={...n,query:F({...p?{context:{extent:p,outSR:_,processSR:v}}:{"env:outSR":_,"env:processSR":v},...a,...b,f:"json"},null,s)},T=`${w}/${t}`;return(0,i.A)(T,C)}(e,"submitJob",r,t??{},a).then(({data:t})=>{let r=V.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,a),_esriRequestWrapper:async(e,t)=>(0,i.A)(e,t)};async function Ar(e,t,r){return vr.executeApplyEdits(e,t,r)}async function br(e,t,r){return vr.executeAddNamedTypes(e,t,r)}async function Cr(e,t,r){return vr.executeDeleteNamedType(e,t,r)}async function Tr(e,t,r,a){return vr.executeUpdateNamedType(e,t,r,a)}async function Mr(e,t,r,a){return vr.executeAddGraphProperties(e,t,r,a)}async function Dr(e,t,r,a){return vr.executeDeleteGraphProperty(e,t,r,a)}async function Sr(e,t,r,a,n){return vr.executeUpdateGraphProperty(e,t,r,a,n)}async function Rr(e,t,r,a){return vr.executeAddGraphFieldIndex(e,t,r,a)}async function kr(e,t,r,a){return vr.executeDeleteGraphFieldIndex(e,t,r,a)}async function xr(e,t,r,a){return vr.executeUpdateSearchIndex(e,t,r,a)}async function Pr(e,t,r){return vr.executeQuery(e,t,r)}async function Gr(e,t,r){return vr.executeQueryStreaming(e,t,r)}async function Ir(e,t,r){return vr.executeSearch(e,t,r)}async function Nr(e,t,r){return vr.executeSearchStreaming(e,t,r)}function jr(e,t){return vr.fetchAllClientDataKeys(e,t)}function Or(e,t,r){return vr.fetchClientDataAtKeys(e,t,r)}async function Ur(e){return vr.fetchKnowledgeGraph(e)}async function Zr(e){return vr.refreshDataModel(e)}async function Er(e){return vr.refreshServiceDefinition(e)}async function Fr(e,t){return vr.executeFindPathsAsynchronous(e,t)}async function qr(e,t){return vr.executeFindPaths(e,t)}async function Lr(e,t){return vr.fetchAsynchronousFindPathsResultData(e,t)}async function Kr(e,t,r,a={mergePolicy:"esriMergePolicyTypeDefaultValue",splitPolicy:"esriSplitPolicyTypeDefaultValue"},n){return vr.executeAddDomain(e,t,r,a,n)}async function $r(e,t,r,a,n){return vr.executeUpdateDomain(e,t,r,a,n)}async function Vr(e,t,r){return vr.executeDeleteDomain(e,t,r)}async function zr(e,t,r){return vr.executeCreateReplica(e,t,r)}async function Jr(e,t,r){return vr.fetchReplicaDefinition(e,t,r)}async function Br(e,t){return vr.fetchReplicasInformation(e,t)}async function Qr(e,t,r){return vr.executeUnregisterReplica(e,t,r)}function Hr(){return vr.clearClientDataCache()}async function Wr(e,t){return vr._fetchWrapper(e,t)}async function Yr(e,t,r,a){return vr._submitJobWrapper(e,t,r,a)}async function Xr(e,t){return vr._esriRequestWrapper(e,t)}async function ea(e){n.id?.findCredential(e.url)||(e.dataModel?await la(e):await Zr(e))}function ta(e,t,r,a){null==t?r.set_param_key_value(e,""):"object"==typeof t?t instanceof Date?r.set_param_key_value(e,t):t instanceof d.A?r.set_param_key_value(e,fe(t,a)):Array.isArray(t)?r.set_param_key_value(e,he(t,a)):r.set_param_key_value(e,ge(t,a)):r.set_param_key_value(e,t)}async function ra(e,t){return(0,i.A)(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})}async function aa(e,t,r){let a=e.headers.get("content-type");if(a?.includes("application/x-protobuf")){let a=await e.arrayBuffer(),n=new t;try{return n.decode(new Uint8Array(a)),r(n)}finally{n.deleteLater()}}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:await e.text()})}let na=50;function ia(e){na=e}function oa({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:a,limitMaxProcessingTime:n=!1}){t&&e.push_buffer(new Uint8Array(t));let i,s,l=[],d=0,p=Date.now(),c=!0;for(;e.next_row();){(!i||!s)&&(i=a??kt(e),s=i.outSpatialReference??new u.A({wkid:4326})),d||=e.get_header_keys().size();let t=Array(d);for(let a=0;a<d;a++){let n=e.get_value(a);t[a]=Mt(n,r,s)}if(l.push(t),n&&Date.now()-p>na){c=!1;break}}if(e.has_error())throw new o.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:i,resultRows:l,parsedAllResultsFromBuffer:c}}async function sa(e,t){let r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.A.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."),r?.includes("application/x-protobuf")){let r=e.body?.getReader(),a=new((await(0,le.I)()).GraphQueryDecoder);a.deleteLater();let n,i,d,u=new Promise((e,t)=>{i=e,d=t}),p=!1,c=null;return{readableStream:new ReadableStream({pull:async function e(u){if(!r){let e=new o.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}let{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch(e=>{throw d(e),r.releaseLock(),e});h&&(c=h);try{if(y){let e;if(a.has_error()?e=new o.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:a.error.error_code,errorMessage:a.error.error_message}):p||i(new z),r.releaseLock(),e)throw u.error(e),d(e),e;return void u.close()}let{resultHeader:s,resultRows:l,parsedAllResultsFromBuffer:g}=oa({wasmQueryDecoder:a,newArrayBufferToParse:h,dataModel:t,decodedHeader:n,limitMaxProcessingTime:!0});return g&&(c=null),!n&&s&&(n=s,i(s),p=!0),l.length>0?void u.enqueue(l):await e(u)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new o.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}}),resultHeader:await u}}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function la(e){let t=`${e.url}/dataModel/queryDataModel`,r=await(0,i.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),a=r.getHeader?.("content-type"),n=r.data;if(a?.includes("application/x-protobuf")){let e=(await(0,le.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(n));if(!e)throw new o.A("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){e.deleteLater(),xt=!1;let t=new re({timestamp:e.timestamp,spatialReference:new u.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,ut.i7)(we.vy,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:(0,ut.i7)(we.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:Vt(e.search_indexes),entityTypes:Et(e.entity_types),relationshipTypes:Kt(e.relationship_types),metaEntityTypes:Et(e.meta_entity_types),provenanceSourceTypeValues:$t(e.provenance_source_type_values.value_behavior_array),domains:zt(e)});return xt&&s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/references/core/layers/support/Field/#type"),t}(e)}throw new o.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:r.data})}},37807(e,t,r){var a=r(32198),n=r(66552),i=r(25482),o=r(91429);const s=new n.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends i.o{constructor(e){super(e),this.description=null,this.type=null}};(0,a.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,a.Cg)([(0,o.MZ)({type:String,json:{read:s.read,write:s.write}})],l.prototype,"type",void 0),l=(0,a.Cg)([(0,o.$K)("esri.rest.support.GPMessage")],l);const d=l;r.d(t,["A",0,d])},2073(e,t,r){var a=r(66552);const n={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},i=(0,a.O)()(n),o=(0,a.O)()({...n,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),s=(0,a.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,a.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),d=(0,a.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),u=(0,a.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),p=(0,a.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,a.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,a.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,a.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,a.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,a.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,a.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),g=(0,a.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),f=(0,a.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),m=(0,a.O)()({1:"right",2:"left"},{useNumericKeys:!0}),w=(0,a.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),_=(0,a.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,a.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),A=(0,a.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),b=(0,a.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),C=(0,a.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),T=(0,a.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),M=(0,a.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),D=(0,a.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),S=(0,a.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),R=(0,a.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),k=(0,a.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),x=(0,a.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});r.d(t,["$n",0,b,"$r",0,f,"EM",0,g,"Ec",0,x,"JJ",0,h,"Mm",0,T,"OC",0,D,"Sr",0,p,"UO",0,s,"Vj",0,R,"WU",0,k,"Y8",0,o,"Z7",0,l,"_6",0,v,"aJ",0,u,"dd",0,C,"dn",0,d,"et",0,M,"fe",0,_,"gD",0,A,"hE",0,c,"hY",0,i,"iM",0,w,"mt",0,m,"ow",0,y,"vS",0,S])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2491],{11006(e,t,n){function r(e,t,n,r,o){i(e,t,n||0,r||e.length-1,o||s)}function i(e,t,n,r,s){for(;r>n;){if(r-n>600){var l=r-n+1,a=t-n+1,u=Math.log(l),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(l-h)/l)*(a-l/2<0?-1:1);i(e,t,Math.max(n,Math.floor(t-a*h/l+c)),Math.min(r,Math.floor(t+(l-a)*h/l+c)),s)}var d=e[t],p=n,m=r;for(o(e,n,t),s(e[r],d)>0&&o(e,n,r);p<m;){for(o(e,p,m),p++,m--;s(e[p],d)<0;)p++;for(;s(e[m],d)>0;)m--}0===s(e[n],d)?o(e,n,m):o(e,++m,r),m<=t&&(n=m+1),t<=m&&(r=m-1)}}function o(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function s(e,t){return e<t?-1:+(e>t)}n.d(t,{q:()=>r})},40876(e,t,n){n.d(t,{Eq:()=>p,G1:()=>f,Q6:()=>_,TS:()=>o,V6:()=>i,Vm:()=>m,ay:()=>a,c1:()=>g,c4:()=>s,j5:()=>u,lT:()=>c,oW:()=>h,xV:()=>v});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(e){return!!r[e]||!!r[e.toLowerCase()]}function o(e){return r[e]??r[e.toLowerCase()]}function s(e){return[...o(e)]}function l(e,t,n){n<0&&++n,n>1&&--n;let r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function a(e,t,n,r=1){let i=(e%360+360)%360/360,o=n<=.5?n*(t+1):n+t-n*t,s=2*n-o;return[Math.round(255*l(s,o,i+1/3)),Math.round(255*l(s,o,i)),Math.round(255*l(s,o,i-1/3)),r]}function u(e){let t=e.length>5,n=t?8:4,r=(1<<n)-1,i=t?1:17,o=t?9===e.length:5===e.length,s=Number("0x"+e.slice(1));if(isNaN(s))return null;let l,a=[0,0,0,1];return o&&(l=s&r,s>>=n,a[3]=i*l/255),l=s&r,s>>=n,a[2]=i*l,l=s&r,s>>=n,a[1]=i*l,l=s&r,s>>=n,a[0]=i*l,a}function h(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),i=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(i+16*i)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function c(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?f(e[3]):1,e}function p(e){let t=i(e)?o(e):null;return t??=c(e),t??=h(e),t}function m(e){let t=p(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function f(e){return y(e,0,1)}function g(e){return Math.round(y(e,0,255))}function y(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const x=1/2.2;function _(e){return e**2.2}function v(e){return e**x}n.d(t,["iw",0,x])},62885(e,t,n){n.d(t,{H:()=>o,V:()=>i});var r=n(7762);function i(e,t,n=r.A){return t||=new n,t===e||t.destroyed||(t.removeAll(),(i=e)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?t.addMany(e):e&&t.add(e)),t;var i}function o(e){return e}},21287(e,t,n){n.d(t,{M5:()=>c,eV:()=>h});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function h(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function c(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),h="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(h){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},48163(e,t,n){function r(){return[0,0]}function i(e){return[e[0],e[1]]}function o(e,t){return[e,t]}function s(){return o(1,1)}function l(){return o(-1,-1)}function a(){return o(1,0)}function u(){return o(0,1)}n.d(t,{fA:()=>o,o8:()=>i,vt:()=>r});const h=s(),c=l(),d=a(),p=u();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:c,ONES:h,UNIT_X:d,UNIT_Y:p,ZEROS:[0,0],clone:i,create:r,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){let n=Math.min(2,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},fromValues:o,negativeOnes:l,ones:s,unitX:a,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(t,["IA",0,c,"Un",0,h])},35522(e,t,n){n.d(t,{$A:()=>I,Bw:()=>o,C:()=>s,Cc:()=>C,DI:()=>M,Io:()=>x,Ln:()=>y,Om:()=>P,Qr:()=>c,Re:()=>u,S8:()=>b,T9:()=>f,WQ:()=>a,Z0:()=>A,_S:()=>p,aI:()=>E,ei:()=>R,fw:()=>O,gL:()=>S,hG:()=>_,hZ:()=>l,hs:()=>g,jk:()=>m,lw:()=>h,m3:()=>v,oW:()=>Z,t2:()=>T,tn:()=>d,ze:()=>w});var r=n(51850),i=n(34304);function o(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function h(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function f(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function y(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function x(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function _(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function v(e){let t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t=e){let n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function P(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function I(e,t,n){let r=t[0],i=t[1],o=t[2],s=n[0],l=n[1],a=n[2];return e[0]=i*a-o*l,e[1]=o*s-r*a,e[2]=r*l-i*s,e}function C(e,t,n,r){let i=t[0],o=t[1],s=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=s+r*(n[2]-s),e}function A(e,t,n){let r=t[0],i=t[1],o=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12],e[1]=n[1]*r+n[5]*i+n[9]*o+n[13],e[2]=n[2]*r+n[6]*i+n[10]*o+n[14],e}function R(e,t,n){let r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}function S(e,t,n){return O(e,t,n[0],n[1],n[2],n[3])}function O(e,t,n,r,i,o){let s=t[0],l=t[1],a=t[2],u=r*a-i*l,h=i*s-n*a,c=n*l-r*s,d=r*c-i*h,p=i*u-n*c,m=n*h-r*u,f=2*o;return e[0]=s+u*f+2*d,e[1]=l+h*f+2*p,e[2]=a+c*f+2*m,e}const L=(0,r.vt)(),B=(0,r.vt)();function T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function E(e,t){if(e===t)return!0;let n=e[0],r=e[1],o=e[2],s=t[0],l=t[1],a=t[2],u=(0,i.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-l)<=u*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(o-a)<=u*Math.max(1,Math.abs(o),Math.abs(a))}function Z(e,t,n){let r=n[0]-t[0],i=n[1]-t[1],o=n[2]-t[2],s=r*r+i*i+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=r*s,e[1]=i*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,j=h,U=c,N=x,X=_,Y=o,H=v;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:a,angle:function(e,t){b(L,e),b(B,t);let n=P(L,B);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,i,o){let s=1-o,l=s*s,a=o*o,u=l*s,h=3*o*l,c=3*a*s,d=a*o;return e[0]=t[0]*u+n[0]*h+r[0]*c+i[0]*d,e[1]=t[1]*u+n[1]*h+r[1]*c+i[1]*d,e[2]=t[2]*u+n[2]*h+r[2]*c+i[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:s,cross:I,crossAndNormalize:function(e,t,n){let r=t[0],i=t[1],o=t[2],s=n[0],l=n[1],a=n[2],u=i*a-o*l,h=o*s-r*a,c=r*l-i*s,d=Math.sqrt(u*u+h*h+c*c);return e[0]=u/d,e[1]=h/d,e[2]=c/d,e},direction:Z,dist:N,distance:x,div:U,divide:c,dot:P,equals:E,exactEquals:T,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,o){let s=o*o,l=s*(2*o-3)+1,a=s*(o-2)+o,u=s*(o-1),h=s*(3-2*o);return e[0]=t[0]*l+n[0]*a+r[0]*u+i[0]*h,e[1]=t[1]*l+n[1]*a+r[1]*u+i[1]*h,e[2]=t[2]*l+n[2]*a+r[2]*u+i[2]*h,e},inverse:M,len:Y,length:o,lerp:C,max:f,min:m,mul:j,multiply:h,negate:w,normalize:b,random:function(e,t=1){let n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(r)*s,e[1]=Math.sin(r)*s,e[2]=o*t,e},rotateX:function(e,t,n,r){let i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateY:function(e,t,n,r){let i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateZ:function(e,t,n,r){let i=[],o=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,scaleTo:function(e,t){return g(e,e,t/Y(e))},set:l,sign:p,sqrDist:X,sqrLen:H,squaredDistance:_,squaredLength:v,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:R,transformMat4:A,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:S,transformQuatValues:O},Symbol.toStringTag,{value:"Module"})),n.d(t,["Il",0,Y,"jb",0,k,"lo",0,X,"uE",0,H])},75503(e,t,n){n.d(t,{wq:()=>l});var r=n(4576),i=n(21818),o=(n(44208),n(15142)),s=n(11006);class l{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,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(),w.prune(),M.prune(),b.prune(),P.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data,r=this._toBBox;if(_(e,n))for(w.clear();n;){for(let i=0,o=n.children.length;i<o;i++){let o=n.children[i],s=n.leaf?r(o):o;_(e,s)&&(n.leaf?t(o):x(e,s)?a(o,t):w.push(o))}n=w.pop()}}collides(e){let t=this._data,n=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let r=0,i=t.children.length;r<i;r++){let i=t.children[r],o=t.leaf?n(i):i;if(_(e,o)){if(t.leaf||x(e,o))return!0;w.push(i)}}t=w.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-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){let 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 A([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,l=!1,a=this._toBBox(e);for(b.clear(),P.clear();n||b.length>0;){if(n||(n=b.pop(),o=b.data[b.length-1],s=P.pop()??0,l=!0),n.leaf&&(t=(0,r.qh)(n.children,(0,i.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),b.push(n),this._condense(b),this;l||n.leaf||!x(n,a)?o?(s++,n=o.children[s],l=!1):n=null:(b.push(n),P.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){let i=n-t+1,o=this._maxEntries;if(i<=o){let r=new A(e.slice(t,n+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));let s=new R([]);s.height=r;let l=Math.ceil(i/o),a=l*Math.ceil(Math.sqrt(o));v(e,t,n,a,this._compareMinX);for(let i=t;i<=n;i+=a){let t=Math.min(i+a-1,n);v(e,i,t,l,this._compareMinY);for(let n=i;n<=t;n+=l){let i=Math.min(n+l-1,t);s.children.push(this._build(e,n,i,r-1))}}return u(s,this._toBBox),s}_insert(e,t,n){let r=this._toBBox,i=n?e:r(e);b.clear();let o=function(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++){let s=t.children[o],l=m(s),a=g(e,s)-l;a<i?(i=a,r=l<r?l:r,n=s):a===i&&l<r&&(r=l,n=s)}t=n||t.children[0]}return t}(i,this._data,t,b);for(o.children.push(e),c(o,i);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)c(t.data[r],e)}(i,b,t)}_split(e,t){let n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);let o=this._chooseSplitIndex(n,i,r);if(!o)return;let s=n.children.splice(o,n.children.length-o),l=n.leaf?new A(s):new R(s);l.height=n.height,u(n,this._toBBox),u(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new R([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,o;r=i=1/0;for(let s=t;s<=n-t;s++){let t=h(e,0,s,this._toBBox),l=h(e,s,n,this._toBBox),a=y(t,l),u=m(t)+m(l);a<r?(r=a,o=s,i=u<i?u:i):a===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(e,t,n){let r=e.leaf?this._compareMinX:d,i=e.leaf?this._compareMinY:p;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);let i=this._toBBox,o=h(e,0,t,i),s=h(e,n-t,n,i),l=f(o)+f(s);for(let r=t;r<n-t;r++){let t=e.children[r];c(o,e.leaf?i(t):t),l+=f(o)}for(let r=n-t-1;r>=t;r--){let t=e.children[r];c(s,e.leaf?i(t):t),l+=f(s)}return l}_condense(e){for(let t=e.length-1;t>=0;t--){let n=e.data[t];if(0===n.children.length)if(t>0){let i=e.data[t-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(let e of n.children)t((0,i.z)(e));else M.pushArray(n.children);n=M.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,n,r,i){i||=new A([]),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],c(i,e.leaf?r(o):o);return i}function c(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 d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(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 y(e,t){let 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 x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,r,i){let o=[t,n];for(;o.length;){let t=o.pop(),n=o.pop();if(t-n<=r)continue;let l=n+Math.ceil((t-n)/r/2)*r;(0,s.q)(e,l,n,t,i),o.push(n,l,l,t)}}const w=new o.A,M=new o.A,b=new o.A,P=new o.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class A extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class R extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},16494(e,t,n){var r=n(76361);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup",..."animate.animatetransform.circle.clippath.defs.ellipse.g.image.line.lineargradient.marker.mask.path.pattern.polygon.polyline.radialgradient.rect.stop.svg.switch.symbol.text.textpath.tspan.use".split(".")].reduce((e,t)=>(e[t]=[],e),{}),o="align.alink.alt.bgcolor.border.cellpadding.cellspacing.class.color.cols.colspan.coords.d.dir.face.height.hspace.ismap.lang.marginheight.marginwidth.multiple.nohref.noresize.noshade.nowrap.ref.rel.rev.rows.rowspan.scrolling.shape.span.summary.tabindex.title.usemap.valign.value.vlink.vspace.width".split("."),s=new r.I({whiteList:i,onTagAttr:(e,t,n)=>{let r=`${t}="${n}"`;if(o.includes(t))return r},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new r.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);n.d(t,["Nd",0,l,"W5",0,s])},90629(e,t,n){n.d(t,{Lz:()=>s,PN:()=>l,cr:()=>a,gs:()=>h,r_:()=>c,tc:()=>u}),n(39829);const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i=l(1),o=s(1);function s(e){return e?e/72*96:0}function l(e){return e?72*e/96:0}function a(e){if("string"==typeof e){let t=e.match(r);if(t){let n=Number(t[1]),r=t[3]&&t[3].toLowerCase(),i=e.startsWith("-"),o="px"===r?l(n):n;return i?-o:o}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function u(e=0,t=0){return{x:e,y:t}}function h(e=0,t=0){return[e,t]}function c(e=0,t=0,n=0){return[e,t,n]}n.d(t,["L7",0,o,"ps",0,i])},13069(e,t,n){n.d(t,{AG:()=>l,lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function l(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},80754(e,t,n){n.d(t,{kS:()=>u,kd:()=>a});var r=n(82799),i=n(16930),o=n(60408),s=n(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let n of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of n)if((0,s.aO)(e)){let[n,r]=e.c;n[0]+=t,r[0]+=t}else if((0,s.FG)(e)){let[n,r]=e.a;n[0]+=t,r[0]+=t}else if((0,s.n1)(e)){let[n,r,i]=e.b;n[0]+=t,r[0]+=t,i[0]+=t}else e[0]+=t;for(let n of function(e){return(0,o.Bi)(e)?e.rings:e.paths}(e))for(let e of n)e[0]+=t;return e}n.d(t,["j7",0,l])},89056(e,t,n){n.d(t,{b3:()=>c,jZ:()=>h});var r=n(12195),i=n(19419),o=n(537),s=n(95108),l=n(60408),a=n(80754),u=n(21325);function h(e){return d(e,!0)}function c(e){return d(e,!1)}function d(e,t){if(null==e)return null;let n=e.spatialReference,i=(0,u.Vp)(n),s=(0,r.W)(e)?e.toJSON():e;if(!i)return s;let h=(0,u.K8)(n)?102100:4326,c=a.j7[h].maxX,d=a.j7[h].minX;if((0,l.fT)(s))return m(s,c,d);if((0,l.U9)(s))return s.points=s.points.map(e=>m(e,c,d)),s;if((0,l.ZC)(s))return p(s,i);if((0,l.Bi)(s)||(0,l.Rg)(s)){let e=(0,o.Rg)(v,s),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},r=(0,a.kd)(n.xmin,d),i=2*c*r,l=0===i?s:(0,a.kS)(s,i);return n.xmin+=i,n.xmax+=i,n.xmax>c?x(l,c,t):n.xmin<d?x(l,d,t):l}return s}function p(e,t){if(!t)return e;let n=function(e,t){let n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=e,l=e.xmax-e.xmin,[a,u]=t.valid,{x:h,frameId:c}=f(e.xmin,t),{x:d,frameId:p}=f(e.xmax,t),m=h===d&&l>0;if(l>2*u){let e={xmin:o<s?h:d,ymin:r,xmax:u,ymax:i},t={xmin:a,ymin:r,xmax:o<s?d:h,ymax:i},l={xmin:0,ymin:r,xmax:u,ymax:i},m={xmin:a,ymin:r,xmax:0,ymax:i},f=[],y=[];g(e,l)&&f.push(c),g(e,m)&&y.push(c),g(t,l)&&f.push(p),g(t,m)&&y.push(p);for(let e=c+1;e<p;e++)f.push(e),y.push(e);n.push(new _(e,[c]),new _(t,[p]),new _(l,f),new _(m,y))}else h>d||m?n.push(new _({xmin:h,ymin:r,xmax:u,ymax:i},[c]),new _({xmin:a,ymin:r,xmax:d,ymax:i},[p])):n.push(new _({xmin:h,ymin:r,xmax:d,ymax:i},[c]));return n}(e,t).map(e=>e.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,n){if(Array.isArray(e)){let r=e[0];if(r>t){let n=(0,a.kd)(r,t);e[0]=r+-2*t*n}else if(r<n){let t=(0,a.kd)(r,n);e[0]=r+-2*n*t}}else{let r=e.x;if(r>t){let n=(0,a.kd)(r,t);e.x+=-2*t*n}else if(r<n){let t=(0,a.kd)(r,n);e.x+=-2*n*t}}return e}function f(e,t){let n,[r,i]=t.valid,o=2*i,s=0;return e>i?(n=Math.ceil(Math.abs(e-i)/o),e-=n*o,s=n):e<r&&(n=Math.ceil(Math.abs(e-r)/o),e+=n*o,s=-n),{x:e,frameId:s}}function g(e,t){let{xmin:n,ymin:r,xmax:i,ymax:o}=t;return y(e,n,r)&&y(e,n,o)&&y(e,i,o)&&y(e,i,r)}function y(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function x(e,t,n=!0){let r=!(0,l.Rg)(e);if(r&&(0,s.m3)(e),n)return(new w).cut(e,t);let i=r?e.rings:e.paths,o=r?4:2,a=i.length,u=-2*t;for(let e=0;e<a;e++){let t=i[e];if(t&&t.length>=o){let e=[];for(let[n,...r]of t)e.push([n+u,...r]);i.push(e)}}return r?e.rings=i:e.paths=i,e}class _{constructor(e,t){this.extent=e,this.frameIds=t}}const v=(0,i.vt)();class w{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(let e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(let n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(let e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);let r=-2*this._xCut;for(let e of this._linesOut)if(e&&e.length>=this._minPts){for(let t of e)t[0]+=r;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){let t=this._side(e[0]);if(t*this._prevSide===-1){let n=this._intersect(this._prevPt,e);this._lineTo(n,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){let e=this._firstPt,t=this._prevPt;(e[0]!==t[0]||e[1]!==t[1])&&this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(M(e,t<=0?e[0]:this._xCut)),this._lineOut.push(M(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(b(this._lineIn,e,t<=0?e[0]:this._xCut),b(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){let t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:+(e>this._xCut)}_intersect(e,t){let n=(this._xCut-e[0])/(t[0]-e[0]),r=[this._xCut,e[1]+n*(t[1]-e[1])],i=Math.min(e.length,t.length);for(let o=2;o<i;o++)r.push(e[o]+n*(t[o]-e[o]));return r}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function M(e,t){let n=e.slice();return n[0]=t,n}function b(e,t,n){let r=e.length;r>1&&e[r-1][0]===n&&e[r-2][0]===n?e[r-1]=M(t,n):e.push(M(t,n))}},90182(e,t,n){n.r(t),n.d(t,{default:()=>nt});var r=n(32198),i=n(7762),o=n(49186),s=n(53966),l=n(25728),a=n(17676),u=n(91429),h=n(16930),c=n(4146),d=n(63074),p=n(34287),m=n(8303),f=n(25036),g=n(69540),y=n(25482),x=n(77690),_=n(29242),v=n(37585),w=n(35522);const M=(0,n(51850).vt)(),b=(0,_.vt)(),P=(0,_.vt)(),I=(0,_.vt)();function C(e,t,n){return(0,w.hZ)(M,t[0],t[1],1),(0,w.ei)(M,M,(0,x.mg)(b,n)),0===M[2]?(0,v.hZ)(e,M[0],M[1]):(0,v.hZ)(e,M[0]/M[2],M[1]/M[2])}function A(e,t,n){return R(P,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(I,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,x.lw)(e,(0,x.KC)(P,P),I),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,r,i,o,s,l,a){(0,x.hZ)(e,t,r,o,n,i,s,1,1,1),(0,w.hZ)(M,l,a,1),(0,x.KC)(b,e);let[u,h,c]=(0,w.ei)(M,M,(0,x.mg)(b,b));return(0,x.hZ)(b,u,0,0,0,h,0,0,0,c),(0,x.lw)(e,b,e)}var S=n(90629),O=n(48163),L=n(86738),B=n(39829),T=n(99917),E=n(56560);const Z=e=>{let t=e;return class extends t{projectOrWarn(e,t){if(null==e)return e;let{geometry:n,pending:r}=(0,T.projectOrLoad)(e,t);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}}};var k=n(36005),j=n(43937);const U=(0,_.vt)(),N=(0,O.vt)();let X=class extends y.o{};(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],X.prototype,"x",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],X.prototype,"y",void 0),X=(0,r.Cg)([(0,u.$K)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let Y=class extends((0,y.T)(Z(g.Pw))){constructor(e){super(e),this.height=0,this.type="control-points",this.width=0}get controlPoints(){return this._get("controlPoints")??null}set controlPoints(e){this._set("controlPoints",e)}readControlPoints(e,t){let n=h.A.fromJSON(t.spatialReference),r=(0,_.fA)(...t.coefficients,1);return e.map(e=>((0,v.hZ)(N,e.x,e.y),C(N,N,r),{sourcePoint:e,mapPoint:new L.A({x:N[0],y:N[1],spatialReference:n})}))}writeControlPoints(e,t,n,r){if(null==this.transform){let e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}else null!=e&&H(e[0])&&(t.controlPoints=e.map(e=>{let t=e.sourcePoint;return{x:t.x,y:t.y}}),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8))}get coords(){if(null==this.controlPoints)return null;let e=this._updateTransform(U);if(null==e||!H(this.controlPoints[0]))return null;let t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,r){let i=(0,O.fA)(0,n),o=(0,O.fA)(0,0),s=(0,O.fA)(t,0),l=(0,O.fA)(t,n);return C(i,i,e),C(o,o,e),C(s,s,e),C(l,l,e),new B.A({rings:[[i,o,s,l,i]],spatialReference:r})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!H(this.controlPoints[0]))return;let t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;let{width:n,height:r}=this,{rings:[[i,o,s,l]]}=e,a=new E.A({sourcePoint:(0,S.tc)(0,r),mapPoint:new L.A({x:i[0],y:i[1],spatialReference:t})}),u=new E.A({sourcePoint:(0,S.tc)(0,0),mapPoint:new L.A({x:o[0],y:o[1],spatialReference:t})}),h=new E.A({sourcePoint:(0,S.tc)(n,0),mapPoint:new L.A({x:s[0],y:s[1],spatialReference:t})}),c=new E.A({sourcePoint:(0,S.tc)(n,r),mapPoint:new L.A({x:l[0],y:l[1],spatialReference:t})});H(a)&&H(u)&&H(h)&&H(c)&&(Q(U,a,u,h,c),this.controlPoints=this.controlPoints.map(({sourcePoint:e})=>((0,v.hZ)(N,e.x,e.y),C(N,N,U),{sourcePoint:e,mapPoint:new L.A({x:N[0],y:N[1],spatialReference:t})})))}get inverseTransform(){return null==this.transform?null:(0,x.B8)((0,_.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!H(this.controlPoints[0]))return null;(0,v.hZ)(N,e.x,e.y);let t=this.controlPoints[0].mapPoint.spatialReference;return C(N,N,this.transform),new L.A({x:N[0],y:N[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!H(this.controlPoints[0]))return null;let t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,T.projectOrLoad)(e,t).geometry)?null:((0,v.hZ)(N,e.x,e.y),C(N,N,this.inverseTransform),(0,S.tc)(N[0],N[1]))}toSourceNormalized(e){let t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){let{controlPoints:t,width:n,height:r}=this;if(!(null!=t&&n>0&&r>0))return null;let[i,o,s,l]=t;if(!H(i))return null;let a=i.mapPoint.spatialReference,u=this._projectControlPoint(o,a),h=this._projectControlPoint(s,a),c=this._projectControlPoint(l,a);if(!(u.valid&&h.valid&&c.valid&&H(u.controlPoint)))return null;e??=(0,_.vt)();let d=null;return d=H(h.controlPoint)&&H(c.controlPoint)?Q(e,i,u.controlPoint,h.controlPoint,c.controlPoint):H(h.controlPoint)?function(e,t,n,r){return J(q,V,t),J($,W,n),J(z,G,r),(0,v.Cc)(F,q,$,.5),(0,v.e$)(F,z,F,Math.PI),(0,v.Cc)(D,V,W,.5),(0,v.e$)(D,G,D,Math.PI),re(e,q,$,z,F,V,W,G,D)}(e,i,u.controlPoint,h.controlPoint):function(e,t,n){return J(q,V,t),J($,W,n),(0,v.e$)(z,$,q,K),(0,v.e$)(F,q,$,K),(0,v.e$)(G,W,V,-K),(0,v.e$)(D,V,W,-K),re(e,q,$,z,F,V,W,G,D)}(e,i,u.controlPoint),d.every(e=>0===e)?null:d}_projectControlPoint(e,t){if(!H(e))return{valid:!0,controlPoint:e};let{sourcePoint:n,mapPoint:r}=e,{geometry:i,pending:o}=(0,T.projectOrLoad)(r,t);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:new E.A({sourcePoint:n,mapPoint:i})}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:r.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function H(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,r.Cg)([(0,u.MZ)({type:[E.A],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:h.A,isRequired:!0}}}}})],Y.prototype,"controlPoints",null),(0,r.Cg)([(0,k.w)("controlPoints")],Y.prototype,"readControlPoints",null),(0,r.Cg)([(0,j.K)("controlPoints")],Y.prototype,"writeControlPoints",null),(0,r.Cg)([(0,u.MZ)({clonable:!1})],Y.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],Y.prototype,"height",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Y.prototype,"inverseTransform",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Y.prototype,"transform",null),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],Y.prototype,"width",void 0),Y=(0,r.Cg)([(0,u.$K)("esri.layers.support.ControlPointsGeoreference")],Y);const q=(0,O.vt)(),$=(0,O.vt)(),z=(0,O.vt)(),F=(0,O.vt)(),V=(0,O.vt)(),W=(0,O.vt)(),G=(0,O.vt)(),D=(0,O.vt)(),K=Math.PI/2;function J(e,t,n){(0,v.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,v.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function Q(e,t,n,r,i){return J(q,V,t),J($,W,n),J(z,G,r),J(F,D,i),re(e,q,$,z,F,V,W,G,D)}const ee=Array(8).fill(0),te=Array(8).fill(0);function ne(e,t,n,r,i){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=r[0],e[5]=r[1],e[6]=i[0],e[7]=i[1],e}function re(e,t,n,r,i,o,s,l,a){return A(e,ne(ee,t,n,r,i),ne(te,o,s,l,a))}var ie=n(56507),oe=n(21287),se=n(84952),le=n(13069),ae=n(92474),ue=n(64108);let he=0;const ce=e=>{let t=e,n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:he++})}};return n=(0,r.Cg)([(0,ue.$)("esri.core.NumericIdentifiable")],n),n};var de=n(35666),pe=n(5443),me=n(21325);const fe=(0,O.vt)();let ge=class extends(Z(g.Pw)){constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:r}=this;if(null==e||null==t||null==n||null==r)return null;let i=e.spatialReference;return t=this.projectOrWarn(t,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==t||null==n||null==r?null:new B.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(e){let{topLeft:t}=this;if(null==t)return;let n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;let{rings:[[r,i,o,s]]}=e;this.bottomLeft=new L.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new L.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new L.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new L.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){let{topLeft:t,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==e||null==t||null==n||null==r||null==i)return null;let o=t.spatialReference;e=e.normalize();let s=(0,T.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,v.hZ)(fe,s.x,s.y);let l=A((0,_.vt)(),[t.x,t.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return C(fe,fe,l),(0,S.tc)(fe[0],fe[1])}};(0,r.Cg)([(0,u.MZ)({clonable:!1})],ge.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"bottomLeft",void 0),(0,r.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"bottomRight",void 0),(0,r.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"topLeft",void 0),(0,r.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"topRight",void 0),ge=(0,r.Cg)([(0,u.$K)("esri.layers.support.CornersGeoreference")],ge);const ye=ge;var xe=n(34727),_e=n(34304);let ve=class extends(Z(g.Pw)){constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;let e,{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:o}=this.extent;if(this.rotation){let{x:o,y:s}=this.extent.center,l=we(o,s,this.rotation);e=[l(t,n),l(t,i),l(r,i),l(r,n)],e.push(e[0])}else e=[[t,n],[t,i],[r,i],[r,n],[t,n]];return new B.A({rings:[e],spatialReference:o})}set coords(e){if(null==e||null==this.extent)return;let t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;let{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=e,l=(0,xe.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),a=we(o,s,-l),[u,h]=a(n[0],n[1]),[c,d]=a(i[0],i[1]);this.extent=new pe.A({xmin:u,ymin:h,xmax:c,ymax:d,spatialReference:t}),this.rotation=l}toSourceNormalized(e){let{extent:t,rotation:n}=this;if(null==e||null==t)return null;let{xmin:r,ymin:i,xmax:o,ymax:s,center:l,spatialReference:a}=t;e=e.normalize();let u=(0,T.projectOrLoad)(e,a).geometry;if(null==u)return null;let h=u.x,c=u.y;return n&&([h,c]=we(l.x,l.y,-n)(h,c)),(0,S.tc)((0,xe.hs)(h,r,o,0,1),(0,xe.hs)(c,s,i,0,1))}};function we(e,t,n){let r=(0,_e.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-e)+o*(r-t)+e,i*(r-t)-o*(n-e)+t]}function Me(e,t){let n=(0,de.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>3}function be(e,t,n){return{enabled:!Me(n?.layer,n?.origin),ignoreOrigin:!0}}(0,r.Cg)([(0,u.MZ)({clonable:!1})],ve.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)({type:pe.A})],ve.prototype,"extent",void 0),(0,r.Cg)([(0,u.MZ)({type:Number})],ve.prototype,"rotation",void 0),ve=(0,r.Cg)([(0,u.$K)("esri.layers.support.ExtentAndRotationGeoreference")],ve);const Pe={json:{name:"url",type:String,write:{overridePolicy:be}}},Ie={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:be}}},Ce={types:{key:"type",base:null,typeMap:{"control-points":Y,corners:ye,"extent-and-rotation":ve}},json:{types:{key:"type",base:null,typeMap:{"control-points":Y}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};var Ae=n(59923);let Re=class extends(ce((0,l.M)(ae.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return Y.fromJSON(e)}writeGeoreference(e,t,n,r){let i=r?.resources?.pendingOperations,o=()=>{let i=function(e,t,n){if(!e||"control-points"===e.type)return e;let{coords:r}=e;if(5!==r?.rings[0]?.length)return null;let[i,o,s,l]=r.rings[0],{spatialReference:a}=r;return new Y({controlPoints:[new E.A({mapPoint:new L.A({x:i[0],y:i[1],spatialReference:a}),sourcePoint:(0,S.tc)(0,n)}),new E.A({mapPoint:new L.A({x:o[0],y:o[1],spatialReference:a}),sourcePoint:(0,S.tc)(0,0)}),new E.A({mapPoint:new L.A({x:s[0],y:s[1],spatialReference:a}),sourcePoint:(0,S.tc)(t,0)}),new E.A({mapPoint:new L.A({x:l[0],y:l[1],spatialReference:a}),sourcePoint:(0,S.tc)(t,n)})],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==i.controlPoints?.length)return void(0,Ae.qt)(r,"ControlPointsGeoreference.controlPoints","only 'control-points' georeference with 4 control points may be persisted.");t[n]=i.write({},r)}};"control-points"!==e.type&&!this.loaded&&i?(t[n]={},i.push(this.load().then(o))):o()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){let{georeference:t,contentWidth:n,contentHeight:r}=this;if(null==e||null==t||0===n||0===r)return null;let i=t.toSourceNormalized(e);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r.Cg)([(0,u.MZ)(Ce)],Re.prototype,"georeference",void 0),(0,r.Cg)([(0,k.w)("georeference")],Re.prototype,"readGeoreference",null),(0,r.Cg)([(0,j.K)("georeference")],Re.prototype,"writeGeoreference",null),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],Re.prototype,"opacity",void 0),Re=(0,r.Cg)([(0,u.$K)("esri.layers.support.MediaElementBase")],Re);var Se=n(85648);const Oe=Symbol("ImageElementInstance"),Le=Symbol("VideoElementInstance");function Be(e){return"object"==typeof e&&!!e&&Oe in e}function Te(e){return Be(e)||function(e){return"object"==typeof e&&!!e&&Le in e}(e)}var Ee,Ze=n(97159);let ke=class extends Re{static{Ee=Oe}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Ee]=!0,this.image=null}load(){let e=this.image;if("string"==typeof e){let t=(0,oe.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){let t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Ze.f)(t.url,n)}writeImage(e,t,n,r){if(null==e)return;let i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof e&&(t[n]=(0,Ze.t)(e,r)));let s=function(e){return"string"==typeof e&&!(0,se.DB)(e)&&!(0,se.w8)(e)}(e)?e:null;if(s){if(null==(0,Ze.i)(s))return void(t[n]=s);let e=(0,Ze.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(i&&e&&!(0,se.oP)(e))return o.toKeep.push({resource:i.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,se.DB)(e)?(0,se.N9)(e):(await(0,ie.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;let t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=t,r.height=n,e instanceof HTMLImageElement?i.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&i.putImageData(e,0,0),r}(e).toBlob(t))}(e).then(e=>{let r=function(e,t){let n=(0,le.lk)(),r=`${(0,se.fj)("media",n)}.${(0,Se.n)({type:"blob",blob:e})}`;return t.resourceFromPath(r)}(e,i);t[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,r.Cg)([(0,u.MZ)()],ke.prototype,"animationOptions",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],ke.prototype,"content",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],ke.prototype,"contentWidth",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],ke.prototype,"contentHeight",null),(0,r.Cg)([(0,u.MZ)(Pe)],ke.prototype,"image",void 0),(0,r.Cg)([(0,k.w)("image",["url"])],ke.prototype,"readImage",null),(0,r.Cg)([(0,j.K)("image")],ke.prototype,"writeImage",null),(0,r.Cg)([(0,u.MZ)(Ie)],ke.prototype,"type",void 0),ke=(0,r.Cg)([(0,u.$K)("esri.layers.support.ImageElement")],ke);var je=n(62885),Ue=n(65529),Ne=n(61893),Xe=n(36708),Ye=n(19419),He=n(12176),qe=n(6518),$e=n(69622),ze=n(89056);let Fe=class extends $e.A{constructor(e){super(e)}get bounds(){let e=this.coords;return null==e?.extent?null:(0,Ye.VY)(e.extent)}get coords(){let e=this.element.georeference?.coords;return(0,T.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return B.A.fromJSON((0,ze.jZ)(this.coords))}get normalizedBounds(){let e=null==this.normalizedCoords?null:this.normalizedCoords.extent;return null==e?null:(0,Ye.VY)(e)}};(0,r.Cg)([(0,u.MZ)()],Fe.prototype,"spatialReference",void 0),(0,r.Cg)([(0,u.MZ)()],Fe.prototype,"element",void 0),(0,r.Cg)([(0,u.MZ)()],Fe.prototype,"bounds",null),(0,r.Cg)([(0,u.MZ)()],Fe.prototype,"coords",null),(0,r.Cg)([(0,u.MZ)()],Fe.prototype,"normalizedCoords",null),(0,r.Cg)([(0,u.MZ)()],Fe.prototype,"normalizedBounds",null),Fe=(0,r.Cg)([(0,u.$K)("esri.layers.support.MediaElementView")],Fe);var Ve,We=n(16494),Ge=n(38969);const De=Symbol("canplay");let Ke=class extends Re{static{Ve=Le}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[Ve]=!0}load(){let e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{let t=document.createElement("video");return t.src=We.W5.sanitizeUrl((0,se.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;let t=(0,xe.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,r){if(!e)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source is missing")));let i=function(e){return"string"==typeof e&&!(0,se.DB)(e)&&!(0,se.w8)(e)}(e)?e:null;if(!i)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,se.oP)(i)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(i);let s=(0,se.s2)(i);(0,Ze.i)(s)?r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=s}async _preProcessVideoUrl(e){if((0,se.zs)(e))return(0,se.yM)(e);try{return await(0,ie.A)(e,{method:"head"}),e}catch{try{return(0,se.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,se.w8)(e.src)||(e.src=e.src));try{await(0,Ge.i)(e,e=>this.addHandles(e,De)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(De)}}};(0,r.Cg)([(0,u.MZ)()],Ke.prototype,"autoplay",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Ke.prototype,"content",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Ke.prototype,"contentWidth",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],Ke.prototype,"contentHeight",null),(0,r.Cg)([(0,u.MZ)({type:Number})],Ke.prototype,"currentTime",null),(0,r.Cg)([(0,u.MZ)({type:Number})],Ke.prototype,"duration",null),(0,r.Cg)([(0,u.MZ)(Pe)],Ke.prototype,"video",null),(0,r.Cg)([(0,j.K)("video")],Ke.prototype,"writeVideo",null),(0,r.Cg)([(0,u.MZ)(Ie)],Ke.prototype,"type",void 0),Ke=(0,r.Cg)([(0,u.$K)("esri.layers.support.VideoElement")],Ke);const Je={key:"type",defaultKeyValue:"image",base:Re,typeMap:{image:ke,video:Ke}},Qe=i.A.ofType(Je);let et=class extends((0,ae.WV)((0,Ne.g)(Ue.nJ))){constructor(e){super(e),this._index=new qe.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(let t of e.removed){let e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}let{spatialReference:t}=this;for(let n of e.added){if(this._elementViewsMap.get(n))continue;let e=new Fe({spatialReference:t,element:n});this._elementViewsMap.set(n,e);let r=(0,Xe.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(r,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new Qe}async load(e){if((0,a.Te)(e),!this.spatialReference){let e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:h.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}get elements(){return this._get("elements")}set elements(e){this._set("elements",(0,je.V)(e,this._get("elements"),Qe))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;let e=this._index.fullBounds;return null==e?null:new pe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,T.initializeProjection)(e.spatialReference,this.spatialReference,null,t);let n=(0,me.aI)(e.spatialReference,this.spatialReference)?e:(0,T.project)(e,this.spatialReference);if(!n)return[];let r=n.normalize(),i=[];for(let e of r)this._index.forEachInBounds((0,Ye.VY)(e),({normalizedCoords:t,element:n})=>{null!=t&&(0,He.fA)(e,t)&&i.push(n)});return i.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),i}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){let n=e.normalizedBounds,r=this._index.has(e),i=null!=n;this._index.delete(e),i&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(r===i?this.emit("change",{element:e.element}):this.emit("refresh"))}};(0,r.Cg)([(0,u.MZ)()],et.prototype,"elements",null),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],et.prototype,"fullExtent",null),(0,r.Cg)([(0,u.MZ)()],et.prototype,"spatialReference",null),et=(0,r.Cg)([(0,u.$K)("esri.layers.support.LocalMediaElementSource")],et);let tt=class extends((0,d.dM)((0,f.j)((0,p.q)((0,m.A)((0,l.M)(c.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{let{save:i,saveAs:o}=await n.e(3561).then(()=>n(63561));switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}}),this.source=new et}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");let n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);let r=Te(t)?new et({elements:new i.A([t])}):t;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(e),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"===this.loadStatus||"failed"===this.loadStatus?s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded."):this._set("source",e)}castSource(e){return e?Array.isArray(e)?new et({elements:new i.A(e)}):e instanceof i.A?new et({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;let r=this._createSource(t);return r?.read(t,n),r}writeSource(e,t,n,r){if(e&&e instanceof et){let t=e.elements.length;if(1!==t)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}Te(e)?e.write(t,r):r?.messages&&(e?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new ke;case"video":return new Ke}return null}_getSourceOverride(e,t){if(Te(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){let n=e.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:t},{origin:"web-map"}),r.read({georeference:t},{origin:"web-scene"}),r}return null}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],tt.prototype,"effectiveSource",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],tt.prototype,"georeference",void 0),(0,r.Cg)([(0,k.w)("web-document","georeference")],tt.prototype,"readGeoreference",null),(0,r.Cg)([(0,u.MZ)({type:String})],tt.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],tt.prototype,"fullExtent",null),(0,r.Cg)([(0,u.MZ)({type:["MediaLayer"]})],tt.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],tt.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:Y}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Me(this,n?.origin)&&Te(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],tt.prototype,"source",null),(0,r.Cg)([(0,u.wg)("source")],tt.prototype,"castSource",null),(0,r.Cg)([(0,k.w)("source",["url"])],tt.prototype,"readSource",null),(0,r.Cg)([(0,j.K)("source")],tt.prototype,"writeSource",null),(0,r.Cg)([(0,u.MZ)({type:h.A})],tt.prototype,"spatialReference",void 0),(0,r.Cg)([(0,u.MZ)({readOnly:!0})],tt.prototype,"type",void 0),tt=(0,r.Cg)([(0,u.$K)("esri.layers.MediaLayer")],tt);const nt=tt},6518(e,t,n){n.d(t,{F:()=>l});var r=n(44208),i=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.wq(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),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;let e=(0,o.Ie)();for(let 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){let 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){let 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()))}}},8303(e,t,n){var r=n(32198),i=n(92602),o=n(70333),s=n(56507),l=n(60999),a=n(49186),u=n(36563),h=n(53966),c=n(97768),d=n(17676),p=n(84952),m=n(91429),f=n(77548),g=n(20655),y=n(80812),x=n(41318),_=n(10407),v=n(26121),w=n(36005),M=n(43937);const b={credential:null,user:null};n.d(t,["A",0,e=>{let t=e,P=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new y.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:r}=await n.e(1204).then(()=>n(41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let r=t?.signal?null:new AbortController;try{let{reload:i}=await n.e(1204).then(()=>n(41204));return r&&this.addHandles((0,u.rE)(r),"reloadFromPortal"),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:r.signal})}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{r&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);let r,i,s=!o.id?.findCredential(this.url),l=e===n.id;if(l&&n.portal.user)return this._getUserPrivileges(n,s);if(l)r=n.portal.url;else try{r=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!r||!(0,p.b8)(r,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;i=await(o.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!i)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await n.reload():(n=new y.default({id:e,portal:{url:r}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,s)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let n=(0,_.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;let r=`${n.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;let a=`${r}/community/self`,u=null==e?null:e.signal,h=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?x.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,v.wN)(this.portalItem,t)?(t?.messages?.push(new a.A("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,r.Cg)([(0,m.MZ)({type:y.default})],P.prototype,"portalItem",null),(0,r.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],P.prototype,"readPortalItem",null),(0,r.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],P.prototype,"writePortalItem",null),(0,r.Cg)([(0,m.MZ)({clonable:!1})],P.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasUpdateItemPrivileges",void 0),P=(0,r.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],P),P}])},38969(e,t,n){n.d(t,{i:()=>i});var r=n(37955);function i(e,t){return new Promise((n,i)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,r.Oo)(e,"canplay",n)),t((0,r.Oo)(e,"error",i)))})}},85648(e,t,n){n.d(t,{n:()=>i});var r=n(84952);function i(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,r.Zo)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let e in a)o[a[e]]=e},26121(e,t,n){n.d(t,{I6:()=>h,ci:()=>u,dL:()=>a,wN:()=>c});var r=n(49186),i=n(84952),o=n(77548),s=n(20655),l=n(59923);async function a(e){let t=[];for(let n of e.allLayers)if("beforeSave"in n&&"function"==typeof n.beforeSave){let e=n.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,n){let i=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:n})=>new r.A(e,t,n));if(e.blockedRelativeUrls&&(i=i.concat(e.blockedRelativeUrls.map(e=>(0,l.GL)("url",`Relative url '${e}' is not supported`)))),n){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:r}=n;e&&(i=i.filter(({name:e})=>!(l.MG.has(e)||t.includes(e)))),r&&(i=i.filter(e=>"web-document-write:property-required"!==e.name))}if(i.length>0)throw new r.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}function h(e){return(0,o.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let n=t?.portal,r=e?.id&&(e.portal||s.A.getDefault());return!!n&&!!r&&!(0,i.ut)(r.restUrl,n.restUrl)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,7885,8768],{46130(e,t,r){r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},60999(e,t,r){r.d(t,{DZ:()=>y,Ke:()=>h,QA:()=>f,Tj:()=>d,UT:()=>g,aD:()=>v,jJ:()=>u});var i=r(32198),s=r(69622),n=r(97768),o=r(17676),a=r(10107),l=r(64108);function u(e,t,r){return(0,o.Lx)(e.map((e,i)=>t.apply(r,[e,i])))}async function d(e,t,r){return(await(0,o.Lx)(e.map((e,i)=>t.apply(r,[e,i])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return p(await e)}catch(e){return c(e)}}async function y(e){try{return p(await e)}catch(e){return(0,o.QP)(e),c(e)}}function f(e){if(!0===e.ok)return e.value;throw e.error}function g(e,t){return new m(e,t)}let m=class extends s.A{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,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=p(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],m.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,i.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},56512(e,t,r){function i(e){let t,r,i=[],s=!1;return function(...n){return s&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,i)||(r=e.apply(this,n),t=this,i=n,s=!0),r}}r.d(t,{B:()=>i})},76553(e,t,r){function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();let e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;let t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){let t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},54239(e,t,r){r.d(t,{A:()=>m});var i,s=r(32198),n=r(4576),o=r(66552),a=r(25482),l=r(86211),u=r(67076),d=r(91429),p=r(97348),c=r(43937),h=r(36005);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.Xy)(f,"orthometric");const g=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;let s=(null==t?null:p.B.get(t))??p.B.get(r);return s?new i({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,d.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,d.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,d.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,h.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,h.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,d.$K)("esri.geometry.HeightModelInfo")],m)},99959(e,t,r){r.d(t,{A:()=>n});var i=r(32198),s=r(91429);let n=class{};n=(0,i.Cg)([(0,s.$K)("esri.graphic.GraphicOrigin")],n)},89808(e,t,r){const i=Symbol("getSliceableSymbol");r.d(t,["Q",0,i])},77885(e,t,r){r.r(t),r.d(t,{default:()=>le});var i=r(32198),s=r(37838),n=r(56507),o=r(69540),a=r(49186),l=r(4718),u=r(53966),d=r(25728),p=r(93637),c=r(17676),h=r(84952),y=r(91429),f=r(41910),g=r(60950),m=r(89808),v=r(99959);const w=Symbol("isPointCloudGraphicOrigin");var S;class I extends v.A{get[(S=w,g.ym)](){return this.layer}get[m.Q](){return this.layer}get[f.e7](){return this.layer}constructor(e){super(),this[S]=!0,this.type="point-cloud",this.layer=e}get id(){return this.layer.id}}var C=r(4146),b=r(52136),A=r(18768),P=r(69208),R=r(34287),x=r(8303),M=r(25036),_=r(58947),T=r(78888),E=r(25482);let U=class extends E.o{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],U.prototype,"field",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],U.prototype,"type",void 0),U=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudFilter")],U);const L=U;var O,j=r(93223);let F=O=class extends L{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new O({field:this.field,requiredClearBits:(0,l.o8)(this.requiredClearBits),requiredSetBits:(0,l.o8)(this.requiredSetBits)})}};(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],F.prototype,"requiredClearBits",void 0),(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],F.prototype,"requiredSetBits",void 0),(0,i.Cg)([(0,j.e)({pointCloudBitfieldFilter:"bitfield"})],F.prototype,"type",void 0),F=O=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],F);const Z=F;var $;let N=$=class extends L{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new $({field:this.field,includedReturns:(0,l.o8)(this.includedReturns)})}};(0,i.Cg)([(0,y.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],N.prototype,"includedReturns",void 0),(0,i.Cg)([(0,j.e)({pointCloudReturnFilter:"return"})],N.prototype,"type",void 0),N=$=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],N);const K=N;var q;let k=q=class extends L{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new q({field:this.field,mode:this.mode,values:(0,l.o8)(this.values)})}};(0,i.Cg)([(0,y.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"mode",void 0),(0,i.Cg)([(0,j.e)({pointCloudValueFilter:"value"})],k.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],k.prototype,"values",void 0),k=q=(0,i.Cg)([(0,y.$K)("esri.layers.pointCloudFilters.PointCloudValueFilter")],k);const B={key:"type",base:L,typeMap:{value:k,bitfield:Z,return:K}};var D,H=r(10873),G=r(20437),V=r(17036),z=r(93705),Y=r(63531),J=r(51857);let Q=D=class extends J.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new D({...this.cloneProperties(),field:(0,l.o8)(this.field)})}};(0,i.Cg)([(0,j.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],Q.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{isRequired:!0}}})],Q.prototype,"field",void 0),Q=D=(0,i.Cg)([(0,y.$K)("esri.renderers.PointCloudRGBRenderer")],Q);const W=Q;var X=r(69846),ee=r(48425);const te={key:"type",base:J.A,typeMap:{"point-cloud-class-breaks":Y.A,"point-cloud-rgb":W,"point-cloud-stretch":X.A,"point-cloud-unique-value":ee.A},errorContext:"renderer"};var re=r(24212),ie=r(30291),se=r(36005),ne=r(43937);const oe=(0,V.p)();let ae=class extends((0,_.w6)((0,A.b)((0,R.q)((0,x.A)((0,M.j)((0,d.M)((0,P.d)((0,b.p)((0,o.OU)(C.A)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new I(this),this.rootPagePromise=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){let t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map(e=>{let t=new G.A;return"FieldTypeInteger"===e.type&&((e=(0,l.o8)(e)).type="esriFieldTypeInteger"),t.read(e,r),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new G.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,r,i){(0,p.sM)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP),await this._fetchService(e?.signal),await this._fetchRootPageAndUpdateExtent(e?.signal)}async _fetchRootPageAndUpdateExtent(e){this.rootPagePromise=this._fetchRootPage(e),this.rootPagePromise.catch(()=>{});let{fullExtent:t}=this;if(null!=t&&!t.hasZ){let e=await this.rootPagePromise;(0,_.qM)(t,e?.nodes?.[0]?.obb)}}async _fetchRootPage(e){let t=`${this.parsedUrl?.path??""}/nodepages/0`;try{return(await(0,n.A)(t,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data}catch(e){throw new a.A("pointcloudlayer:root-page-missing","Root page missing.",{error:e,url:t})}}createPopupTemplate(e){let t=(0,ie.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){let t=this.fieldsIndex.get("RETURNS");if(!t)return;let r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;let i=new z.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){let t=this.fieldsIndex.get("RGB");if(!t)return;let r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;let i=new z.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new a.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");let r=this.fieldsIndex.get(e);if(!r)throw new a.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(let e of this.attributeStorageInfo)if(e.name===r.name){let r=(0,h.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,n.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new a.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"})}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new a.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new a.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){(0,re.XF)(u.A.getLogger(this),(0,re.B)("Point cloud layers","absolute-height",e)),(0,re.XF)(u.A.getLogger(this),(0,re.tW)("Point cloud layers",e))}};(0,i.Cg)([(0,y.MZ)({type:["PointCloudLayer"]})],ae.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,y.MZ)(H.M6)],ae.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],ae.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide"]})],ae.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({types:[B],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],ae.prototype,"filters",void 0),(0,i.Cg)([(0,y.MZ)({type:[G.A]})],ae.prototype,"fields",void 0),(0,i.Cg)([(0,y.MZ)(oe.fieldsIndex)],ae.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,se.w)("service","fields",["fields","attributeStorageInfo"])],ae.prototype,"readServiceFields",null),(0,i.Cg)([(0,y.MZ)(oe.outFields)],ae.prototype,"outFields",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,y.MZ)(H.Yj)],ae.prototype,"elevationInfo",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),(0,i.Cg)([(0,y.MZ)(H.fV)],ae.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({types:te,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:te},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],ae.prototype,"renderer",void 0),(0,i.Cg)([(0,ne.K)("renderer")],ae.prototype,"writeRenderer",null),(0,i.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"graphicOrigin",void 0),ae=(0,i.Cg)([(0,y.$K)("esri.layers.PointCloudLayer")],ae);const le=ae},52136(e,t,r){var i=r(32198),s=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},18768(e,t,r){var i=r(32198),s=r(53966),n=r(91429),o=r(60694);r.d(t,["b",0,e=>{let t=e,r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(e,t,r){var i=r(32198),s=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},85707(e,t,r){var i=r(32198),s=r(91429),n=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,i.Cg)([(0,s.MZ)({readOnly:!0,type:n.A})],r.prototype,"heightModelInfo",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},8303(e,t,r){var i=r(32198),s=r(92602),n=r(70333),o=r(56507),a=r(60999),l=r(49186),u=r(36563),d=r(53966),p=r(97768),c=r(17676),h=r(84952),y=r(91429),f=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),S=r(26121),I=r(36005),C=r(43937);const b={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:s}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,s,o=!n.id?.findCredential(this.url),a=e===r.id;if(a&&r.portal.user)return this._getUserPrivileges(r,o);if(a)i=r.portal.url;else try{i=await(0,f.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,h.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(a?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,o)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;let r=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;let l=`${i}/community/self`,u=null==e?null:e.signal,d=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,S.wN)(this.portalItem,t)?(t?.messages?.push(new l.A("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.Cg)([(0,y.MZ)({type:m.default})],A.prototype,"portalItem",null),(0,i.Cg)([(0,I.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,i.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,i.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],A),A}])},25036(e,t,r){var i=r(32198),s=r(91429),n=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,n.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},58947(e,t,r){r.d(t,{w6:()=>b,qM:()=>R});var i=r(32198),s=r(56507),n=r(49186),o=r(53966),a=r(17676),l=r(91429),u=r(46130),d=r(5443),p=r(16930),c=r(85707),h=r(60694),y=r(10873),f=r(83898),g=r(73179);var m=r(20655),v=r(80812),w=r(88788),S=r(91682),I=r(26121),C=r(36005);const b=e=>{let t=(0,c.a)(e),r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.minScale=0,this.maxScale=0,this.version={major:NaN,minor:NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return P(t)}readFullExtent(e,t,r){if("object"==typeof e&&e){let i=null==e.spatialReference?{...e,spatialReference:P(t)}:e;return d.A.fromJSON(i,r)}let i=t.store,s=P(t);return null==s||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<A)?null:new d.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){let t={major:NaN,minor:NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){let r=t.store,i=null==r.version?"":r.version.toString();return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}readTitleService(e,t){if("item-title"===this.sublayerTitleMode)return this.url?(0,h.yG)(this.url,t.name):t.name;let r=t.name;if(!r&&this.url){let e=(0,h.qg)(this.url);null!=e&&(r=e.title)}let i=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&i&&(r=i+" - "+r),(0,h.cr)(r)}get parsedUrl(){return(0,g.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,f.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,o.A.getLogger(this),t),this.indexInfo.catch(()=>{});let{fullExtent:r}=this;null!=r&&!r.hasZ&&this._updateExtent(r,await this.indexInfo)}_updateExtent(e,t){if("page"===t?.type){let r=t.rootIndex%t.pageSize,i=t.rootPage?.nodes?.[r];R(e,i?.obb)}else if("node"===t?.type){let r=t.rootNode?.mbs;if(!Array.isArray(r)||4!==r.length||r[0]<A)return;let i=r[2],s=r[3];e.zmin=i-s,e.zmax=i+s}}async _fetchService(e){if(null==this.url)throw new n.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){let t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){let t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){let t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();let i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){let t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){let r={..._,...t},i=v.default.from(e);if(!i)throw new n.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);let s=i.portal||m.A.getDefault();await this._ensureLoadBeforeSave(),i.type=M,i.portal=s;let o=(0,w.m)(i,"portal-item",{withResources:!0}),a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),x(i,r,1),await s.signIn(),await s.user.addItem({item:i,folder:r?.folder,data:a}),await(0,S.r)(this.resourceReferences,o),this.portalItem=i,(0,u.v)(o),o.portalItem=i,i}async _save(e){let t={..._,...e};if(!this.portalItem)throw new n.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==M)throw new n.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${M}"`);await this._ensureLoadBeforeSave();let r=(0,w.m)(this.portalItem,"portal-item",{withResources:!0}),i=this.write({},r),o=await async function(e,t){let r=await e.fetchData("json")??{};return Array.isArray(r.layers)||(r.layers=await async function(e,t){let r=await async function(e){let t=E(e.url);if(!t)return null;let r=(await(0,s.A)(t,{query:{f:"json"},responseType:"json"})).data.layers;if(!Array.isArray(r))return null;let i=r.filter(({id:e})=>null!=e).map(({id:e})=>({id:e}));return i.length?i:null}(e).catch(()=>null);return r?.some(({id:e})=>e===t.id)?r:[t]}(e,t)),function(e,t){let r=e.findIndex(({id:e})=>e===t.id);-1===r?e.push(t):e[r]=t}(r.layers,t),r}(this.portalItem,i);await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(o,r,t);let a=function(e,t){return t&&function(e,t){let r=E(e);return!!r&&r===U(t).url}(e.url,t)?e.url:t}(this.portalItem,this.url);return a&&(this.portalItem.url=a),this.portalItem.title||(this.portalItem.title=this.title),x(this.portalItem,t,0),await(0,S.S)(this.portalItem,o,this.resourceReferences,r),(0,u.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=r?.validationOptions;(0,I.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});let s=i?.enabled,a=null;if(s&&a){let t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;let s=`Layer item did not validate:\n${t.join("\n")}`;if(o.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===i.failPolicy){let e=t.map(e=>new n.A("sceneservice:schema-validation",e));throw new n.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i.Cg)([(0,l.MZ)(y.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({type:p.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,C.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,i.Cg)([(0,l.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,C.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,C.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,i.Cg)([(0,C.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,i.Cg)([(0,C.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,i.Cg)([(0,l.MZ)((0,g.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.SceneService")],r),r},A=-1e38;function P(e){if(null!=e.spatialReference)return p.A.fromJSON(e.spatialReference);let t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null==i?null:new p.A(i)}function R(e,t){if(null==t?.center||null==t.halfSize)throw new n.A("sceneservice:invalid-node-page","Invalid node page.");if(t.center[0]<A)return;let r=t.halfSize,i=t.center[2],s=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);e.zmin=i-s,e.zmax=i+s}function x(e,t,r){e.typeKeywords||=[];let i=t.getTypeKeywords();for(let t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const M="Scene Service",_={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}},T={layerId:null};function E(e){if(!e)return null;let t=U(e);if(null!=t.layerId)return null;let r=(0,h.qg)(t.url);return null==r||"SceneServer"===r.serverType?t.url:null}function U(e){return(0,h.HZ)({layer:T,url:e,nonStandardUrlAllowed:!0})}},83898(e,t,r){r.d(t,{F:()=>n});var i=r(56507),s=r(49186);async function n(e,t,r,n,o,a,l){let u=null;if(null!=r){let t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(s,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){a?.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),u=e}}if(!t)return null;let d=t?.split("/").pop(),p=`${e}/nodes/`,c=p+d;try{return{type:"node",rootNode:(await(0,i.A)(c,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:u,nodeError:e,url:c})}}},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,a.DB)(this.fieldsIndex,e)}}}}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);let r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null==e.dynamicDataSource?null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString())):i.path=(0,n.fj)(i.path,"dynamicLayer")),i}},88788(e,t,r){r.d(t,{m:()=>o,v:()=>n});var i=r(84952),s=r(20655);function n(e,t){return{...a(e,t),readResourcePaths:[]}}function o(e,t,r){let s=(0,i.An)(r?.forceNewItemContext?null:e.itemUrl);return{...a(e,t,r),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?.withResources?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t,r){return{origin:t,url:(0,i.An)(r?.forceNewItemContext?null:e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},10407(e,t,r){r.d(t,{It:()=>h,LG:()=>o,OM:()=>u,Sm:()=>d,Y:()=>a,bK:()=>l,sQ:()=>p});var i=r(99917),s=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function d(e,t,r){r?o(e,t):u(e,t)}async function p(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);let r=s.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const c={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function h(e){let{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges,n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit"),a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}r.d(t,["mm",0,c])},15804(e,t,r){r.d(t,{addOrUpdateResources:()=>a,bg:()=>c,cL:()=>p,fetchResources:()=>o,removeAllResources:()=>u,removeResource:()=>l});var i=r(56507),s=r(49186),n=r(84952);async function o(e,t={},r){await e.load(r);let i=(0,n.fj)(e.itemUrl,"resources"),{start:s=1,num:o=10,sortOrder:a="asc",sortField:l="resource"}=t,u={query:{start:s,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(i,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map(({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)}))}}async function a(e,t,r,i){let o=new Map;for(let{resource:e,content:i,compress:n,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");let[t,l]=d(e.path),u=`${t}/${n??""}/${a??""}`;o.has(u)||o.set(u,{prefix:t,compress:n,access:a,files:[]}),o.get(u).files.push({fileName:l,content:i})}await e.load(i);let a=(0,n.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(let{prefix:t,compress:r,access:n,files:l}of o.values())for(let o=0;o<l.length;o+=25){let u=l.slice(o,o+25),d=new FormData;t&&"."!==t&&d.append("resourcesPrefix",t),r&&d.append("compress","true"),n&&d.append("access",n);let p=0;for(let{fileName:e,content:t}of u)d.append("file"+ ++p,t,e);d.append("f","json");try{await e.portal.request(a,{method:"post",body:d,signal:i?.signal})}catch(e){if(i?.ignoreResourceCopyErrors&&e instanceof s.A&&"CONT_00942"===e.details?.messageCode)continue;throw e}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);let i=(0,n.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);let r=(0,n.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){let t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function c(e,t){if(!e.hasPath())return null;let[r,,i]=function(e){let[t,r]=function(e){let t=(0,n.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=d(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,n.fj)(r,t+i))}},24212(e,t,r){r.d(t,{$7:()=>l,B:()=>a,M7:()=>p,XF:()=>d,tW:()=>u,w7:()=>o});var i=r(56512),s=r(86211),n=r(16271);function o(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?c:h}(e).mode}(null==e||(e.hasZ??!1),t)}function a(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function l(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function d(e,t){t&&e.warn(".elevationInfo=",t)}function p(e){return(e?.offset??0)*(0,n.Ao)(e?.unit)}(0,i.B)((e,t,r)=>{if(!e||"decimal-degrees"===t)return 0;let i="unknown"!==t&&t?t:"meters",n=(0,s.mq)(r);return n?(0,s.oU)(e,i,n):0});const c={mode:"absolute-height",offset:0},h={mode:"on-the-ground",offset:null}},30291(e,t,r){r.d(t,{tn:()=>u});var i=r(37838),s=r(30524),n=r(41227),o=r(89893),a=r(66159),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;let f=function(e,t){let r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){let i=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map(t=>new n.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:d(t,{...e,visibleFieldNames:r})}))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!f.length)return null;let g=function(e){let t=(0,s.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),m=[new a.A,new o.A];return new i.A({title:g,content:m,fieldInfos:f})}const d=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(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":return new l.A({digitSeparator:!0,places:0});case"single":case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===e.alias?.toLowerCase()}const y=["geometry","blob","raster","guid","xml"]},91682(e,t,r){r.d(t,{S:()=>l,r:()=>a});var i=r(49186),s=r(17676),n=r(13069),o=r(15804);async function a(e,t,r){await d(await u(e,t,r),t,r)}async function l(e,t,r,i,s){let n=await u(r,i,s);await e.update({data:t}),await d(n,i,s)}async function u(e,t,a){if(!t?.resources)return;let l=function(e,t){let{portalItem:r,portalItemResourcePath:i}=e,{portalItem:s,portalItemResourcePath:n}=t;return r===s&&(!(i||n)||i===n)}(e,t)?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem,e.portalItemResourcePath=t.portalItemResourcePath;let u=new Set(t.resources.toKeep.map(e=>e.resource.path)),d=new Set,p=[];u.forEach(t=>{l.delete(t),e.paths.push(t)});let c=[],h=[],y=[];for(let r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||d.has(r.resource.path)){let{resource:t,content:i,finish:s}=r,a=(0,o.bg)(t,(0,n.lk)());e.paths.push(a.path),c.push({resource:a,content:await(0,o.cL)(i),compress:r.compress}),s&&y.push(()=>s(a))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});let t=r.finish;t&&y.push(()=>t(r.resource)),d.add(r.resource.path)}for(let r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{c.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});let e=r.finish;e&&y.push(()=>e(r.resource))}if(c.length||h.length){let{addOrUpdateResources:e}=await Promise.resolve().then(()=>r(15804));await e(t.portalItem,c,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach(e=>e()),0===p.length)return l;let f=await(0,s.Ol)(p);if((0,s.Te)(a),f.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:f});return l}async function d(e,t,r){if(!e||!t.portalItem)return;let i=[];for(let s of e){let e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(i)}},26121(e,t,r){r.d(t,{I6:()=>d,ci:()=>u,dL:()=>l,wN:()=>p});var i=r(49186),s=r(84952),n=r(77548),o=r(20655),a=r(59923);async function l(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,a.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter(({name:e})=>!(a.MG.has(e)||t.includes(e)))),i&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function d(e){return(0,n.qd)(e).some(e=>!!e.charts?.length)}function p(e,t){let r=t?.portal,i=e?.id&&(e.portal||o.A.getDefault());return!!r&&!!i&&!(0,s.ut)(i.restUrl,r.restUrl)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8768],{18768(t,e,i){var l=i(32198),s=i(53966),r=i(91429),u=i(60694);i.d(e,["b",0,t=>{let e=t,i=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let t=(0,u.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,u.Jf)(t,s.A.getLogger(this)))}};return(0,l.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,l.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,l.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISService")],i),i}])}}]);