@arcgis/core 4.32.0-next.20241021 → 4.32.0-next.20241023

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 (257) hide show
  1. package/applications/MapViewer/templateUtils.d.ts +4 -0
  2. package/applications/MapViewer/templateUtils.js +5 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0b7ee57bec7ffac312f2.js +1 -0
  5. package/assets/esri/core/workers/chunks/{1ba1d9c867ec6a492af9.js → 0f3912bca9fe25eea75c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{842ebde78db9bfcaf07b.js → 1678d1d0ecb9b2af69a8.js} +1 -1
  7. package/assets/esri/core/workers/chunks/1d16ca7791f64dd7c7fb.js +1 -0
  8. package/assets/esri/core/workers/chunks/1d4be734ff961e313257.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b292758308dfac4ba8ee.js → 2d8aa31dc96bbd014036.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{53f648321c5fde26bfe4.js → 319e06888467f9f460ab.js} +1 -1
  11. package/assets/esri/core/workers/chunks/33cae7ece52a77394b05.js +1 -0
  12. package/assets/esri/core/workers/chunks/{210a954f5299fe105e0b.js → 539060ffb7f230fb1bd0.js} +1 -1
  13. package/assets/esri/core/workers/chunks/545441dcc8e915e63ff1.js +1 -0
  14. package/assets/esri/core/workers/chunks/{303f39b9b7bd33109df8.js → 587df97288a83721d251.js} +1 -1
  15. package/assets/esri/core/workers/chunks/5caa02a7a85d05e253b4.js +1 -0
  16. package/assets/esri/core/workers/chunks/5cfecb320e1dcd258b2e.js +1 -0
  17. package/assets/esri/core/workers/chunks/67018ef25736f0722f6e.js +1 -0
  18. package/assets/esri/core/workers/chunks/89f74819ac1b5884c149.js +1 -0
  19. package/assets/esri/core/workers/chunks/92b2d81ef16877341f97.js +1 -0
  20. package/assets/esri/core/workers/chunks/{e6e77cbdeb99d90caad1.js → 97f62fad6d416a666319.js} +1 -1
  21. package/assets/esri/core/workers/chunks/98c1956b2e27058c8a51.js +1 -0
  22. package/assets/esri/core/workers/chunks/9c8a910b6261a4d5da77.js +1 -0
  23. package/assets/esri/core/workers/chunks/ab6eaa3ae2e233f91a5e.js +1 -0
  24. package/assets/esri/core/workers/chunks/{63719f892a7d1025c7d3.js → b42c1ab7579a3c464f72.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{03eba36affe6ed1f5a11.js → bc4ef18d0a02354186e3.js} +7 -7
  26. package/assets/esri/core/workers/chunks/{c71304c88fce556340ef.js → c859f73b57a764e99b02.js} +1 -1
  27. package/assets/esri/core/workers/chunks/cb3038ec3ef0d86bf2a0.js +1 -0
  28. package/assets/esri/core/workers/chunks/{ae20ca2008a2ea6a46b2.js → d8f4bd2b4366388f8a28.js} +1 -1
  29. package/assets/esri/core/workers/chunks/e71fa25ed45bae5a1adb.js +320 -0
  30. package/assets/esri/core/workers/chunks/{9c9a8a529494c6d1dfa3.js → ec9d5af8887854e821c8.js} +1 -1
  31. package/assets/esri/libs/parquet/pkg/arcgis_parquet_bg.wasm +0 -0
  32. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +14 -0
  33. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  34. package/assets/esri/themes/dark/main.css +1 -1
  35. package/assets/esri/themes/light/main.css +1 -1
  36. package/assets/esri/themes/light/view.css +1 -1
  37. package/chunks/Bufferer-BhkgvSV4.js +5 -0
  38. package/chunks/{Distance2DCalculator-DM4OojiI.js → Distance2DCalculator-BX0Ep7eP.js} +1 -1
  39. package/chunks/{GeodeticDistanceCalculator-DzvUOSaR.js → GeodeticDistanceCalculator-B5uO-Y_z.js} +1 -1
  40. package/chunks/OperatorCrosses.js +5 -0
  41. package/chunks/OperatorCut.js +1 -1
  42. package/chunks/OperatorGeodesicBuffer.js +1 -1
  43. package/chunks/OperatorGeodeticArea.js +1 -1
  44. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  45. package/chunks/OperatorGeodeticDistance.js +1 -1
  46. package/chunks/OperatorGeodeticLength.js +1 -1
  47. package/chunks/OperatorIntersects.js +5 -0
  48. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  49. package/chunks/OperatorOverlaps.js +5 -0
  50. package/chunks/OperatorProximity.js +1 -1
  51. package/chunks/OperatorProximityGeodesic.js +1 -1
  52. package/chunks/OperatorShapePreservingLength.js +1 -1
  53. package/chunks/OperatorTouches.js +5 -0
  54. package/chunks/OperatorWithin.js +5 -0
  55. package/chunks/QuadraticBezier.js +1 -1
  56. package/chunks/SSAOBlur.glsl.js +5 -5
  57. package/chunks/SideCalculator2D-CoWc8Oe3.js +1 -1
  58. package/chunks/Transformation2D.js +1 -1
  59. package/core/MemCache.js +1 -1
  60. package/core/MemCachePool.js +1 -1
  61. package/core/unitUtils.js +1 -1
  62. package/geometry/Mesh.js +1 -1
  63. package/geometry/operators/affineTransformOperator.js +1 -1
  64. package/geometry/operators/alphaShapeOperator.js +1 -1
  65. package/geometry/operators/areaOperator.js +1 -1
  66. package/geometry/operators/autoCompleteOperator.js +1 -1
  67. package/geometry/operators/boundaryOperator.js +1 -1
  68. package/geometry/operators/bufferOperator.js +1 -1
  69. package/geometry/operators/centroidOperator.js +1 -1
  70. package/geometry/operators/clipOperator.js +1 -1
  71. package/geometry/operators/containsOperator.js +1 -1
  72. package/geometry/operators/convexHullOperator.js +1 -1
  73. package/geometry/operators/crossesOperator.js +1 -1
  74. package/geometry/operators/cutOperator.js +1 -1
  75. package/geometry/operators/densifyOperator.js +1 -1
  76. package/geometry/operators/differenceOperator.js +1 -1
  77. package/geometry/operators/disjointOperator.js +1 -1
  78. package/geometry/operators/distanceOperator.js +1 -1
  79. package/geometry/operators/equalsOperator.js +1 -1
  80. package/geometry/operators/extendOperator.js +1 -1
  81. package/geometry/operators/generalizeOperator.js +1 -1
  82. package/geometry/operators/geodesicBufferOperator.js +1 -1
  83. package/geometry/operators/geodesicProximityOperator.js +1 -1
  84. package/geometry/operators/geodeticAreaOperator.js +1 -1
  85. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  86. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  87. package/geometry/operators/geodeticLengthOperator.js +1 -1
  88. package/geometry/operators/graphicBufferOperator.js +1 -1
  89. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  90. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  91. package/geometry/operators/gx/operatorBoundary.js +1 -1
  92. package/geometry/operators/gx/operatorBuffer.js +1 -1
  93. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  94. package/geometry/operators/gx/operatorDifference.js +1 -1
  95. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  96. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  97. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  98. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  99. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  100. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  101. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  102. package/geometry/operators/gx/operatorIntersection.js +1 -1
  103. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  104. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  105. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  106. package/geometry/operators/gx/operatorOffset.js +1 -1
  107. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  108. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  109. package/geometry/operators/gx/operatorProject.js +1 -1
  110. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  111. package/geometry/operators/gx/operatorSimplify.js +1 -1
  112. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  113. package/geometry/operators/gx/operatorUnion.js +1 -1
  114. package/geometry/operators/integrateOperator.js +1 -1
  115. package/geometry/operators/intersectionOperator.js +1 -1
  116. package/geometry/operators/intersectsOperator.js +1 -1
  117. package/geometry/operators/isNearOperator.js +1 -1
  118. package/geometry/operators/json/containsOperator.js +5 -0
  119. package/geometry/operators/json/crossesOperator.js +5 -0
  120. package/geometry/operators/json/disjointOperator.js +5 -0
  121. package/geometry/operators/json/intersectsOperator.js +5 -0
  122. package/geometry/operators/json/offsetOperator.js +5 -0
  123. package/geometry/operators/json/overlapsOperator.js +5 -0
  124. package/geometry/operators/json/touchesOperator.js +5 -0
  125. package/geometry/operators/json/withinOperator.js +5 -0
  126. package/geometry/operators/labelPointOperator.js +1 -1
  127. package/geometry/operators/lengthOperator.js +1 -1
  128. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  129. package/geometry/operators/locateBetweenOperator.js +1 -1
  130. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  131. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  132. package/geometry/operators/offsetOperator.js +1 -1
  133. package/geometry/operators/overlapsOperator.js +1 -1
  134. package/geometry/operators/polygonOverlayOperator.js +1 -1
  135. package/geometry/operators/polygonSlicerOperator.js +1 -1
  136. package/geometry/operators/projectOperator.js +1 -1
  137. package/geometry/operators/proximityOperator.js +1 -1
  138. package/geometry/operators/relateOperator.js +1 -1
  139. package/geometry/operators/reshapeOperator.js +1 -1
  140. package/geometry/operators/simplifyOperator.js +1 -1
  141. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  142. package/geometry/operators/support/apiConverter.js +5 -0
  143. package/geometry/operators/support/initNoPeFactory.js +5 -0
  144. package/geometry/operators/support/jsonConverter.js +5 -0
  145. package/geometry/operators/support/proximityResult.js +1 -1
  146. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  147. package/geometry/operators/touchesOperator.js +1 -1
  148. package/geometry/operators/unionOperator.js +1 -1
  149. package/geometry/operators/withinOperator.js +1 -1
  150. package/geometry/support/MeshVertexAttributes.js +1 -1
  151. package/interfaces.d.ts +134 -0
  152. package/layers/LinkChartLayer.js +1 -1
  153. package/layers/SceneLayer.js +1 -1
  154. package/layers/graphics/OptimizedGeometry.js +1 -1
  155. package/layers/graphics/sources/ParquetSource.js +1 -1
  156. package/layers/knowledgeGraph/supportUtils.js +1 -1
  157. package/layers/support/ElevationQueryTileCache.js +1 -1
  158. package/layers/support/ElevationTileData.js +1 -1
  159. package/layers/support/mediaUtils.js +1 -1
  160. package/layers/support/parquetLayerUtils.js +1 -1
  161. package/layers/support/rasterFunctions/ClipFunction.js +1 -1
  162. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  163. package/layers/support/rasterFunctions/localUtils.js +1 -1
  164. package/libs/parquet/parquet.js +1 -1
  165. package/linkChart/LinkChartProperties.js +1 -1
  166. package/package.json +1 -1
  167. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  168. package/smartMapping/raster/renderers/rgb.js +1 -1
  169. package/smartMapping/raster/renderers/stretch.js +1 -1
  170. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  171. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  172. package/smartMapping/renderers/support/rendererUtils.d.ts +4 -0
  173. package/support/revision.js +1 -1
  174. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  175. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  176. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  177. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  178. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  179. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  180. package/views/2d/grid/GridView2D.js +1 -1
  181. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  182. package/views/2d/layers/MediaLayerView2D.js +1 -1
  183. package/views/2d/layers/TileLayerView2D.js +1 -1
  184. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  185. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  186. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  187. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  188. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  189. package/views/3d/glTF/loader.js +1 -1
  190. package/views/3d/layers/I3SMeshView3D.js +1 -1
  191. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  192. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  193. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  195. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  196. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  197. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  198. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  199. package/views/3d/layers/i3s/CachedMeshData.js +5 -0
  200. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  201. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  202. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  203. package/views/3d/layers/support/FeatureTile.js +1 -1
  204. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  205. package/views/3d/state/ViewStateManager.js +1 -1
  206. package/views/3d/state/controllers/FovController.js +1 -1
  207. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  208. package/views/3d/terrain/Tile.js +1 -1
  209. package/views/3d/terrain/TileTexture.js +1 -1
  210. package/views/3d/webgl/ManagedFBO.js +1 -1
  211. package/views/3d/webgl/ManagedFBOAttachment.js +1 -1
  212. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  213. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  214. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  215. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  216. package/views/3d/webgl-engine/materials/ProceduralTextureRepository.js +1 -1
  217. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  218. package/views/3d/webgl-engine/shaders/SSAOBlur.glsl.js +1 -1
  219. package/views/input/BrowserEventSource.js +1 -1
  220. package/views/webgl/Texture.js +1 -1
  221. package/views/webgl/VertexArrayObject.js +1 -1
  222. package/webdoc/support/webdocSaveUtils.js +1 -1
  223. package/widgets/Attribution/AttributionViewModel.js +1 -1
  224. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  225. package/widgets/BatchAttributeForm/css.js +1 -1
  226. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  227. package/widgets/BatchAttributeForm.js +1 -1
  228. package/widgets/ElevationProfile/support/ElevationProfileView2D.js +1 -1
  229. package/widgets/ElevationProfile/support/ProfileLine2D.js +5 -0
  230. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  231. package/widgets/ElevationProfile/support/constants.js +1 -1
  232. package/widgets/ElevationProfile/support/visualizationUtils.js +5 -0
  233. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  234. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  235. package/widgets/FeatureTable/support/columnUtils.js +1 -1
  236. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  237. package/widgets/FeatureTable/support/templateUtils.js +5 -0
  238. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  239. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  240. package/widgets/support/GridControls.js +1 -1
  241. package/assets/esri/core/workers/chunks/03d0394fff1463c224f9.js +0 -1
  242. package/assets/esri/core/workers/chunks/0c40cac18711f79f0a7d.js +0 -1
  243. package/assets/esri/core/workers/chunks/1a97f98facfc62a9fc69.js +0 -1
  244. package/assets/esri/core/workers/chunks/1e3ed3ee48c2977cff6f.js +0 -1
  245. package/assets/esri/core/workers/chunks/1fc064e37d030e449d5e.js +0 -1
  246. package/assets/esri/core/workers/chunks/4daab36de5efa03a8cbb.js +0 -1
  247. package/assets/esri/core/workers/chunks/77d129134c2a66cd86d8.js +0 -1
  248. package/assets/esri/core/workers/chunks/88bd9e023764da377aa7.js +0 -1
  249. package/assets/esri/core/workers/chunks/92ce57cb12d9a7a3699e.js +0 -1
  250. package/assets/esri/core/workers/chunks/a5675c989d00b7400f98.js +0 -1
  251. package/assets/esri/core/workers/chunks/c06c5c815b5e37717fa1.js +0 -1
  252. package/assets/esri/core/workers/chunks/ca1385e165aae8a32ca2.js +0 -1
  253. package/assets/esri/core/workers/chunks/ce8c1208916f54af7e68.js +0 -320
  254. package/assets/esri/core/workers/chunks/df51c93b2dbcc89efc23.js +0 -1
  255. package/assets/esri/core/workers/chunks/efa3c919261672871f2f.js +0 -1
  256. package/chunks/Bufferer-fr1_Nc47.js +0 -5
  257. package/geometry/operators/support/converterAPI.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4943,7136],{71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},69540:(e,t,i)=>{i.d(t,{O:()=>u,P:()=>h});var s=i(90237),n=i(69622),r=(i(44208),i(4718)),a=(i(53966),i(97768)),o=i(35666),l=i(88620),c=i(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,a.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,i=e.store,s={},n=new Map;for(const e in t){const a=t[e],l=i?.originOf(e),c=a.clonable;if(a.readOnly||!1===c||l!==o.Gr.USER&&l!==o.Gr.DEFAULTS&&l!==o.Gr.WEB_MAP&&l!==o.Gr.WEB_SCENE)continue;const u=this[e];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,r.TU)(u),null!=u&&null==h||(l===o.Gr.DEFAULTS?n.set(e,h):s[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(s);if(n.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,i]of n)e.set(t,i,o.Gr.DEFAULTS)}return c}};return t=(0,s._)([(0,c.$)("esri.core.Clonable")],t),t};let h=class extends(u(n.A)){};h=(0,s._)([(0,c.$)("esri.core.Clonable")],h)},32587:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(62788),n=i(95488);class r{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach(((i,s)=>e.call(t,i,s,this)),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(e,t,i)=>{i.d(t,{v:()=>o});var s=i(4718),n=i(62788),r=i(95488);class a{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=s.gh){return new a(e,t)}},17136:(e,t,i)=>{i.d(t,{el:()=>b});var s=i(92602),n=i(49186),r=i(53966),a=i(39829),o=i(82799),l=i(80754),c=i(21325),u=i(28735),h=(i(59456),i(78888)),f=i(65864),p=i(2272),d=i(84952),m=i(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function w(e,t,i){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A(e)}const i=(0,l.r8)(e),s=[];for(const e of i){const i=[];s.push(i),i.push([e[0][0],e[0][1]]);for(let s=0;s<e.length-1;s++){const n=e[s][0],r=e[s][1],a=e[s+1][0],o=e[s+1][1],l=Math.sqrt((a-n)*(a-n)+(o-r)*(o-r)),c=(o-r)/l,u=(a-n)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const s=e*t,a=u*s+n,o=c*s+r;i.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,s=u*e+n,a=c*e+r;i.push([s,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:s,spatialReference:e.spatialReference}):new o.A({paths:s,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return i&&(e=(0,l.kS)(e,i)),e}function _(e,t,i){if(Array.isArray(e)){const s=e[0];if(s>t){const i=(0,l.kd)(s,t);e[0]=s+i*(-2*t)}else if(s<i){const t=(0,l.kd)(s,i);e[0]=s+t*(-2*i)}}else{const s=e.x;if(s>t){const i=(0,l.kd)(s,t);e=e.clone().offset(i*(-2*t),0)}else if(s<i){const t=(0,l.kd)(s,i);e=e.clone().offset(t*(-2*i),0)}}return e}function v(e,t){let i=-1;for(let s=0;s<t.cutIndexes.length;s++){const n=t.cutIndexes[s],r=t.geometries[s],a=(0,l.r8)(r);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const s=t[e][0];i=s>i?s:i}i=Number(i.toFixed(9));const s=-360*(0,l.kd)(i,180);for(let i=0;i<t.length;i++){const t=r.getPoint(e,i);r.setPoint(e,i,t.clone().offset(s,0))}return!0}}))}if(n===i){if(g(e))for(const t of(0,l.r8)(r))e[n]=e[n].addRing(t);else if(x(e))for(const t of(0,l.r8)(r))e[n]=e[n].addPath(t)}else i=n,e[n]=r}return e}async function b(e,t,i){if(!Array.isArray(e))return b([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??s.A.geometryServiceUrl;let r,g,x,I,R,S,T,A,M=0;const k=[],O=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,c.Vp)(r),x=r.isWebMercator,S=x?102100:4326,I=l.j7[S].maxX,R=l.j7[S].minX,T=l.j7[S].plus180Line,A=l.j7[S].minus180Line),g)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(_(t.clone(),I,R));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,I,R))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);O.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,l.kd)(e.xmin,R)*(2*I);let s=0===i?t.clone():(0,l.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(T)&&r!==I?(M=r>M?r:M,s=w(s,x),k.push(s),O.push("cut")):e.intersects(A)&&n!==R?(M=r*(2*I)>M?r*(2*I):M,s=w(s,x,360),k.push(s),O.push("cut")):O.push(s)}else O.push(t.clone());else O.push(t);else O.push(t);let F=(0,l.kd)(M,I),C=-90;const P=F,N=new o.A;for(;F>0;){const e=360*F-180;N.addPath([[e,C],[e,-1*C]]),C*=-1,F--}if(k.length>0&&P>0){const t=v(k,await async function(e,t,i,s){const n=(0,p.Dl)(e),r=t[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,c.YX)(r),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,h.A)(n.path+"/cut",a),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,f.rS)(e);return t.spatialReference=r,t}))}}(n,k,N,i)),s=[],r=[];for(let i=0;i<O.length;i++){const n=O[i];if("cut"!==n)r.push(n);else{const n=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),r.push("simplify")):r.push(x?(0,u.Gh)(n):n)}}if(!s.length)return r;const a=await async function(e,t,i){const s="string"==typeof e?(0,d.An)(e):e,n=t[0].spatialReference,r=(0,f.$B)(t[0]),a={...i,query:{...s.query,f:"json",sr:(0,c.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,h.A)(s.path+"/simplify",a);return(0,m.V)(o.geometries,r,n)}(n,s,i),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(x?(0,u.Gh)(a.shift()):a.shift())}return o}const D=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)D.push(t);else{const e=k.shift();D.push(!0===x?(0,u.Gh)(e):e)}}return D}},80754:(e,t,i)=>{i.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>c});var s=i(82799),n=i(16930),r=i(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=c(e);for(const e of i)for(const i of e)i[0]+=t;return e}function c(e){return(0,r.Bi)(e)?e.rings:e.paths}},38146:(e,t,i)=>{i.r(t),i.d(t,{default:()=>bt});var s=i(90237),n=i(13874),r=i(69540),a=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),h=i(10107),f=i(56507),p=(i(87811),i(44208)),d=i(40608),m=i(4146),y=i(18768),g=i(63074),x=i(69208),w=(i(59456),i(68729)),_=i(78888),v=i(51447),b=i(93223),I=i(36005),R=i(21325),S=i(60694),T=i(10873),A=i(45617),M=i(43577),k=i(13868),O=i(22796),F=i(69409),C=i(87045),P=i(39829),N=i(25482),D=i(91806),E=i(20223),B=i(77301),z=i(70834),L=i(86738);const J=new Map,H=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.refCount--,e.refCount<=0&&(s.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const i=e+"/"+t,s=this._cachedBlocks;if(s.has(i)){const e=s.get(i);return e.ts=Date.now(),e.refCount++,s.delete(i),s.set(i,e),e.block}return null}putBlock(e,t,i,s){const n=this._cachedBlocks,r=e+"/"+t;if(n.has(r)){const e=n.get(r);e.ts=Date.now(),e.refCount++}else n.set(r,{block:i,ts:Date.now(),refCount:1,controller:s});this._trim(),this._updateTimer()}deleteBlock(e,t){const i=this._cachedBlocks,s=e+"/"+t;i.has(s)&&i.delete(s)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),i=Date.now();for(let s=0;s<t.length&&t[s][1].ts<=i-this._duration;s++)e.delete(t[s][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function G(e,t){return null==t?e:`${e}?sliceId=${t}`}function q(e,t,i){const s=J.get(e);if(!s)return null==t?H.decreaseRefCount(e,i):0;if(null==t||null==s[t])return H.decreaseRefCount(e,i);const n=s[t]?.cache,r=n?.get(i);if(n&&r){if(r.refCount--,0===r.refCount){n.delete(i);for(let e=0;e<s.length;e++)s[e]?.cache.delete(i);r.controller&&r.controller.abort()}return r.refCount}return 0}function W(e,t,i){const s=J.get(e);if(!s)return null==t?H.getBlock(e,i):null;if(null==t||null==s[t]){for(let e=0;e<s.length;e++){const t=s[e]?.cache.get(i);if(t)return t.refCount++,t.block}return H.getBlock(e,i)}const n=s[t]?.cache.get(i);if(n)return n.refCount++,n.block;for(let e=0;e<s.length;e++){if(e===t||!s[e])continue;const n=s[e]?.cache,r=n?.get(i);if(n&&r)return r.refCount++,n.set(i,r),r.block}return null}function j(e,t,i,s,n=null){const r=J.get(e);if(!r)return void(null==t&&H.putBlock(e,i,s,n));if(null==t||null==r[t])return void H.putBlock(e,i,s,n);const a={refCount:1,block:s,isResolved:!1,isRejected:!1,controller:n};s.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),r[t]?.cache.set(i,a)}function Z(e,t,i){const s=J.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):H.deleteBlock(e,i):null==t&&H.deleteBlock(e,i)}var $=i(16019),U=i(51244),V=i(28435),Y=i(14636),X=i(89738),K=i(5443),Q=i(16930);let ee=0,te=class extends N.oY{constructor(){super(...arguments),this._tileFetchQueue=new X.e({concurrency:32,process:(e,t)=>this._fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}normalizeCtorArgs(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:C.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,z.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){const{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),"Function"===this.datasetFormat&&this.primaryRasters?.rasters?.forEach((t=>t.rasterJobHandler=e))}get rasterId(){return this.url||"rasterId-"+ee++}set url(e){this._set("url",(0,S.Jf)(e,o.A.getLogger(this)))}async open(e){return this._openPromise??=(0,z.Hh)().then((()=>this._open(e))),this._openPromise}async fetchTile(e,t,i,s={}){const n=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,r=this.getTileExtentFromTileInfo(e,t,i,n);return s={noClip:!0,...s},this.fetchPixels(r,n.size[0],n.size[1],s)}async identify(e,t={}){e=(0,f.PZ)(L.A,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:s}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:r,multidimensionalInfo:a}=n;let{transposedVariableName:o}=t;const l=null!=a&&r&&(null!=s||(0,B.DY)(i));l&&!o&&(o=null!=i&&i.length>0?i[0].variableName??void 0:a.variables[0].name,t={...t,transposedVariableName:o}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=n,{datumTransformation:h}=t;let p=(0,z._I)(e,c,h);if(!u.intersects(p))return{location:p,value:null};if(null!=n.transform){const e=n.transform.inverseTransform(p);if(!n.nativeExtent.intersects(e))return{location:e,value:null};p=e}let d=0;const m=null!=o&&null!=a&&n.hasMultidimensionalTranspose;if("Function"===this.datasetFormat){const e=this.primaryRasters.rasters[0];if(m)return e.identify(p,t);const{pixelSize:s}=n,r=3,a=s.x*r/2,o=s.y*r/2,l=new K.A({xmin:p.x-a,xmax:p.x+a,ymin:p.y-o,ymax:p.y+o,spatialReference:c}),u={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId},{pixelBlock:h}=await e.fetchPixels(l,r,r,u),{pixelBlock:f}=await this.fetchPixels(l,r,r,u);if(null==h)return{location:p,value:null};const d=Math.floor(r*r*.5),y=!h.mask||h.mask[d]?h.pixels.map((e=>e[d])):null;let g;return null!=f&&(g=!f.mask||f.mask[d]?f.pixels.map((e=>e[d])):void 0),{location:p,value:y,processedValue:g,pyramidLevel:0}}if(!m)if(t.srcResolution)d=(0,z.t$)(t.srcResolution,n,this.ioConfig.sampling).pyramidLevel;else if(d=await this.computeBestPyramidLevelForLocation(e,t),null==d)return{location:p,value:null};const y=this.identifyPixelLocation(p,d,null,m);if(null===y)return{location:p,value:null};const{row:g,col:x,rowOffset:w,colOffset:_,blockWidth:v}=y,b=o??t.sliceId,I=G(this.rasterId,b),R=`${d}/${g}/${x}`;let S=W(I,null,R);null==S&&(S=this.fetchRawTile(d,g,x,t),j(I,null,R,S));const T=await S;if(!T?.pixels?.length)return{location:p,value:null};const A=w*v+_;return this._processIdentifyResult(T,{srcLocation:p,position:A,pyramidLevel:d,useTransposedTile:!!m,requestSomeSlices:l,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,z.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:n}=this;if(s.requestRawData&&n)return this._fetchPixels(e,t,i,s);const r=(0,z.FT)(e.spatialReference),a=(0,z.OM)(e);if(null==r||0===a||1===a&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,s);if(a>=3)return{extent:e,pixelBlock:null};const o=[],{xmin:l,xmax:c}=e,u=Math.round(r/(c-l)*t),h=u-Math.round((r/2-l)/(c-l)*t);let f=0;const p=[];for(let n=0;n<=a;n++){const d=new K.A({xmin:0===n?l:-r/2,xmax:n===a?c-r*n:r/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),m=0===n?u-h:n===a?t-f:u;f+=m,p.push(m);const y=s.disableWrapAround&&n>0?null:this._fetchPixels(d,m,i,s);o.push(y)}const d=(await Promise.all(o)).map((e=>e?.pixelBlock));let m=null;const y={width:t,height:i};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},s)).pixelBlock:(0,V.z7)(d,y,{blockWidths:p}),{extent:e,srcExtent:(0,z._l)(e,this.rasterInfo.spatialReference,s.datumTransformation),pixelBlock:m}}async fetchRawPixels(e,t,i,s={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const n=await this._fetchRawTiles(e,t,i,s),{nativeExtent:r,nativePixelSize:a,storageInfo:o}=this.rasterInfo,l=2**e,c=a.x*l,u=a.y*l,h=new K.A({xmin:r.xmin+c*t.x,xmax:r.xmin+c*(t.x+i.width-1),ymin:r.ymax-u*(t.y+i.height-1),ymax:r.ymax-u*t.y,spatialReference:r.spatialReference});if(!n)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:f,mosaicSize:p}=n;if(1===f.length&&null!=f[0]&&f[0].width===i.width&&f[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:n.pixelBlocks[0]};const d=e>0?o.pyramidBlockWidth:o.blockWidth,m=e>0?o.pyramidBlockHeight:o.blockHeight,y={x:t.x%d,y:t.y%m};let g;return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:f,srcMosaicSize:p,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:s.interpolation,alignmentInfo:null,blockWidths:null},s)).pixelBlock:(0,V.z7)(f,p,{clipOffset:y,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:g}}fetchRawTile(e,t,i,s){throw new a.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,z._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,U.D)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:s}=this.ioConfig,{range:n,query:r,headers:a}=t;i=i??t.retryCount??this.ioConfig.retryCount;const o=n?{Range:`bytes=${n.from}-${n.to}`}:null;try{return await(0,_.A)(e,{...t,query:{...r,...s},headers:{...a,...o}})}catch(s){if(i>0)return i--,this.request(e,t,i);throw s}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,B.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const n=s.lodAt(e);return this.getTileExtent({x:n.resolution,y:n.resolution},t,i,s.origin,s.spatialReference,s.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){const r=[],a=e.maximumPyramidLevel||0;let o=(s.x+s.y)/2,l=1/.0254*96*o;for(let e=0;e<=a&&(r.unshift(new D.A({level:a-e,resolution:o,scale:l})),e!==a);e++)if(n){const t=(n[e].x+n[e].y)/2;l*=t/o,o=t}else o*=2,l*=2;const c=new L.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new C.A({origin:c,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:r}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,s){const{width:n,height:r,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new L.A({x:a.xmin,y:a.ymax,spatialReference:l});null==s&&(s=Math.max(0,Math.round(Math.log(Math.max(n,r))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],s);e.storageInfo=new E.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:s,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,s,n,r=0,a=2){if(1===n.length&&r>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<r;i++)e*=a,t*=a,n.push({x:e,y:t})}const o=[],{x:l,y:c}=s;for(let s=0;s<n.length;s++){const{x:r,y:a}=n[s];o.push({minCol:Math.floor((e.xmin-l+.1*r)/t/r),maxCol:Math.floor((e.xmax-l-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*a)/i/a),maxRow:Math.floor((c-e.ymin-.1*a)/i/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:s}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];const n=s**e;return{x:t.x*n,y:t.y*n}}identifyPixelLocation(e,t,i,s){const{spatialReference:n,nativeExtent:r,storageInfo:a}=this.rasterInfo,{maximumPyramidLevel:o,origin:l,transposeInfo:c}=a,u=s&&null!=c?c.tileSize[0]:a.blockWidth,h=s&&null!=c?c.tileSize[1]:a.blockHeight,f=(0,z._I)(e,n,i);if(!r.intersects(f))return null;if(t<0||t>o)return null;const p=this.getPyramidPixelSize(t),{x:d,y:m}=p,y=(l.y-f.y)/m/h,g=(f.x-l.x)/d/u,x=Math.min(h-1,Math.floor((y-Math.floor(y))*h)),w=Math.min(u-1,Math.floor((g-Math.floor(g))*u));return{pyramidLevel:t,row:Math.floor(y),col:Math.floor(g),rowOffset:x,colOffset:w,blockWidth:u,srcLocation:f}}getTileExtent(e,t,i,s,n,r){const[a,o]=r,l=s.x+i*a*e.x,c=l+a*e.x,u=s.y-t*o*e.y,h=u-o*e.y;return new K.A({xmin:l,xmax:c,ymin:h,ymax:u,spatialReference:n})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];return!s||s.maxRow<t||s.maxCol<i||s.minRow>t||s.minCol>i}updateImageSpaceRasterInfo(e){const{pixelSize:t}=e,{width:i,height:s}=e,n=Q.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new K.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new L.A({x:1,y:1,spatialReference:n});const{extent:r,storageInfo:a}=e;if(a){a.origin=new L.A({x:r.xmin,y:r.ymax,spatialReference:n});const{pyramidResolutions:i,tileInfo:s}=a;if(i&&i.forEach((e=>{e.x/=t.x,e.y/=t.y})),s){s.origin=a.origin;const t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;s.lods.forEach(((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254}))}}}async _fetchPixels(e,t,i,s={}){let n=(0,z.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};const r=this._getSourceDataInfo(e,t,i,s),{pyramidLevel:a,srcResolution:o,srcExtent:l,srcWidth:c,srcHeight:u,ul:h}=r;if(0===c||0===u)return{extent:e,srcExtent:l,pixelBlock:null};const{rasterInfo:f}=this,p=f.transform,d="gcs-shift"===p?.type,m=null!=(0,z.FT)(e.spatialReference);!d&&m||(n=(0,z.OM)(r.srcExtent,d));const y=await this._fetchRawTiles(a,h,{width:c,height:u,wrapCount:n},s);if(!y)return{extent:e,srcExtent:l,pixelBlock:null};const g=f.storageInfo,x=a>0?g.pyramidBlockWidth:g.blockWidth,w=a>0?g.pyramidBlockHeight:g.blockHeight;let{x:_,y:v}=f.pixelSize;if(a>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=g;if(null!=e&&e[a-1])({x:_,y:v}=e[a-1]);else{const e=t**a;_*=e,v*=e}}const b=f.spatialReference,I=new L.A({x:_,y:v,spatialReference:b}),R=x===c&&w===u&&h.x%x==0&&h.y%w==0,S=new L.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),T=!e.spatialReference.equals(b),A=b.isGeographic?1e-9:1e-4,{datumTransformation:M}=s;if(!T&&R&&1===y.pixelBlocks.length&&x===t&&w===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(o,S,A))return{extent:e,srcExtent:l,srcTilePixelSize:I,pixelBlock:y.pixelBlocks[0]};const k=m&&null!=(0,z.FT)(l.spatialReference)&&this._hasNoneOrGCSShiftTransform,O=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");O&&!this.rasterJobHandler&&await(0,z.Hh)();const F=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:S.toJSON(),datumTransformation:M,rasterTransform:p,hasWrapAround:n>0||k,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:O},s):(0,z.l0)({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:S,datumTransformation:M,rasterTransform:p,hasWrapAround:n>0||k,isAdaptive:!1,includeGCSGrid:O});let C;const P=!s.requestRawData,N={rows:F.spacing[0],cols:F.spacing[1]},D=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(a,y.extent.xmin):void 0,{pixelBlocks:E,mosaicSize:B,isPartiallyFilled:J}=y;let H=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:B,destDimension:P?{width:t,height:i}:null,coefs:P?F.coefficients:null,sampleSpacing:P?N:null,projectDirections:O,gcsGrid:O?F.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:D,blockWidths:null},s);({pixelBlock:C,localNorthDirections:H}=e)}else{const e=(0,V.z7)(E,B,{alignmentInfo:D});C=P?(0,V.$i)(e,{width:t,height:i},F.coefficients,N,s.interpolation):e,O&&F.gcsGrid&&(H=(0,V.QF)({width:t,height:i},F.gcsGrid),C=(0,Y.Y2)(C,this.rasterInfo.dataType,H))}return s.requestRawData||O?{extent:e,srcExtent:l,srcTilePixelSize:I,pixelBlock:C,transformGrid:F,localNorthDirections:H,isPartiallyFilled:J}:{extent:e,srcExtent:l,srcTilePixelSize:I,pixelBlock:C}}async _fetchRawTiles(e,t,i,s){const{origin:n,blockBoundary:r}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:o}=this.getBlockWidthHeight(e);let{x:l,y:c}=t,{width:u,height:h,wrapCount:f}=i;const p=this._getRasterTileAlignmentInfo(e,0);s.buffer&&(l-=s.buffer.cols,c-=s.buffer.rows,u+=2*s.buffer.cols,h+=2*s.buffer.rows);let d=0,m=0,y=0;f&&null!=p&&(({worldColumnCountFromOrigin:m,originColumnOffset:y,rightPadding:d}=p),m*p.blockWidth-d>=l+u&&(d=0));const g=Math.floor(l/a),x=Math.floor(c/o),w=Math.floor((l+u+d-1)/a),_=Math.floor((c+h+d-1)/o),v=r[e];if(!v)return null;const{minRow:b,minCol:I,maxCol:R,maxRow:S}=v;if(0===f&&(_<b||w<I||x>S||g>R))return null;const T=new Array;let A=!1;const M=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=x;t<=_;t++)for(let i=g;i<=w;i++){let n=i;if(!s.disableWrapAround&&f&&null!=p&&m<=i&&(n=i-m-y),t>=b&&n>=I&&S>=t&&R>=n){const i=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:n,options:s},{signal:s.signal});M?T.push(new Promise((e=>{i.then((t=>e(t))).catch((()=>{A=!0,e(null)}))}))):T.push(i)}else T.push(Promise.resolve(null))}if(0===T.length)return null;const k=await Promise.all(T),O={height:(_-x+1)*o,width:(w-g+1)*a},{spatialReference:F}=this.rasterInfo,C=this.getPyramidPixelSize(e),{x:P,y:N}=C;return{extent:new K.A({xmin:n.x+g*a*P,xmax:n.x+(w+1)*a*P,ymin:n.y-(_+1)*o*N,ymax:n.y-x*o*N,spatialReference:F}),pixelBlocks:k,mosaicSize:O,isPartiallyFilled:A}}_fetchRawTile(e,t,i,s){const n=this.rasterInfo.storageInfo.blockBoundary[e];if(!n)return Promise.resolve(null);const{minRow:r,minCol:a,maxCol:o,maxRow:l}=n;if(t<r||i<a||t>l||i>o)return Promise.resolve(null);const u=G(this.rasterId,s.sliceId),h=`${e}/${t}/${i}`;let f=W(u,s.registryId,h);if(null==f){const n=new AbortController;f=this.fetchRawTile(e,t,i,{...s,signal:n.signal}),j(u,s.registryId,h,f,n),f.catch((()=>Z(u,s.registryId,h)))}return s.signal&&(0,c.u7)(s,(()=>{q(u,s.registryId,h)})),f}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;const s=e[0].length;if("vector-magdir"===i){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[n,r]=e,a=[],o=[];for(let e=0;e<s;e++){const[t,i]=(0,Y.Lu)([n[e],r[e]]);a.push(t),o.push(i)}return[a,o]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,z.DO)(this.rasterInfo)),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,s={}){const n={datumTransformation:s.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};s.srcResolution&&(n.srcResolution=s.srcResolution,this._updateSourceDataInfo(e,n));const r=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=n,c=a/t,u=o/i,h=l<r&&c*u>=16,f=l===r&&this._requireTooManySrcTiles(a,o,t,i);if(h||f||0===a||0===o){const a=new L.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let o=(0,z.Wo)(a,this.rasterInfo.spatialReference,e,n.datumTransformation);const f=!o||s.srcResolution&&o.x+o.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&f){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(r-l+3>=e){const t=2**e;o={x:s.srcResolution.x*t,y:s.srcResolution.y*t}}}o&&(n.srcResolution=o,this._updateSourceDataInfo(e,n))}return this._requireTooManySrcTiles(n.srcWidth,n.srcHeight,t,i)&&(n.srcWidth=0,n.srcHeight=0),n}_requireTooManySrcTiles(e,t,i,s){const{tileInfo:n}=this.rasterInfo.storageInfo,r=e/i,a=t/s;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+s)/1024)||r>8||a>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,s=i.spatialReference,{srcResolution:n,datumTransformation:r}=t,{pyramidLevel:a,pyramidResolution:o,excessiveReading:l}=(0,z.t$)(n,i,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,z._l)(e,s,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{x:h,y:f}=i.storageInfo.origin,p=Math.floor((c.xmin-h)/o.x+.1),d=Math.floor((f-c.ymax)/o.y+.1),m=Math.floor((c.xmax-h)/o.x-.1),y=Math.floor((f-c.ymin)/o.y-.1),g=c.width<.1*o.x?0:m-p+1,x=c.height<.1*o.y?0:y-d+1;t.pyramidLevel=a,t.pyramidResolution=o,t.srcWidth=g,t.srcHeight=x,t.ul={x:p,y:d}}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:s,pyramidLevel:n,useTransposedTile:r}=t,a=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[s])return{location:i,value:null};const{multidimensionalInfo:o}=this.rasterInfo;if(null==o||!r){const t=e.pixels.map((e=>e[s])),r={location:i,value:t,pyramidLevel:n},a=this._computeMagDirValues(t.map((e=>[e])));return a?.length&&(r.magdirValue=a.map((e=>e[0]))),r}let l=e.pixels.map((e=>e.slice(s*a,s*a+a))),c=this._computeMagDirValues(l);const{requestSomeSlices:u,identifyOptions:h}=t;let f=(0,B.QW)(o,h.transposedVariableName);if(u){const e=(0,B.xx)(f,h.multidimensionalDefinition,h.timeExtent);l=l.map((t=>e.map((e=>t[e])))),c=c?.map((t=>e.map((e=>t[e])))),f=e.map((e=>f[e]))}const p=e.noDataValues||this.rasterInfo.noDataValue,d={pixels:l,pixelType:e.pixelType};let m;return null!=p&&((0,$.Sp)(d,p),m=d.mask),{location:i,value:null,dataSeries:f.map(((e,t)=>{const i={value:0===m?.[t]?null:l.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition.map((e=>new A.A({...e,isSlice:!0})))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i})),pyramidLevel:n}}};(0,s._)([(0,h.MZ)()],te.prototype,"_rasterTileAlignmentInfo",void 0),(0,s._)([(0,h.MZ)()],te.prototype,"_tileFetchQueue",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],te.prototype,"_isGlobalWrappableSource",null),(0,s._)([(0,h.MZ)({readOnly:!0})],te.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s._)([(0,h.MZ)()],te.prototype,"_openPromise",void 0),(0,s._)([(0,h.MZ)()],te.prototype,"rasterJobHandler",null),(0,s._)([(0,h.MZ)({readOnly:!0})],te.prototype,"rasterId",null),(0,s._)([(0,h.MZ)(T.OZ)],te.prototype,"url",null),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],te.prototype,"datasetName",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],te.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],te.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s._)([(0,h.MZ)()],te.prototype,"rasterInfo",void 0),(0,s._)([(0,h.MZ)()],te.prototype,"ioConfig",void 0),(0,s._)([(0,h.MZ)()],te.prototype,"sourceJSON",void 0),te=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.BaseRaster")],te);const ie=te;var se=i(77359),ne=i(22671);let re=class extends ie{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,s={}){const{rasters:n,rasterIds:r}=this.primaryRasters;let a=!1;const{interpolation:o}=s,l=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&l&&(a=1===n.length&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:a});const c=n.map((n=>n.fetchPixels(e,t,i,s))),u=await Promise.all(c),h=u.map((e=>e.pixelBlock)),f=a||s.requestRawData?u.map((e=>e.srcTilePixelSize)):null;if(s.skipRasterFunction||h.every((e=>null==e)))return u[0];const p=u.find((e=>null!=e.pixelBlock))?.extent??e;let d=this.rasterJobHandler?await this.rasterJobHandler.process({extent:p,primaryPixelBlocks:h,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:p,primaryPixelBlocks:h,primaryPixelSizes:f,primaryRasterIds:r});const{transformGrid:m}=u[0];if(!a||null==d||null==m){const e=s.noClip?null:this.getClippingGeometry(p.spatialReference);return s.noClip||s.requestRawData||null==d||!e||(d=await(0,se.$Q)(d,p,e)),{...u[0],pixelBlock:d}}const y={rows:m.spacing[0],cols:m.spacing[1]};let g;g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[d],srcMosaicSize:{width:d.width,height:d.height},destDimension:{width:t,height:i},coefs:m.coefficients,sampleSpacing:y,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:o,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:(0,V.$i)(d,{width:t,height:i},m.coefficients,y,o);const x=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||s.requestRawData||null==g||null==x||(g=await(0,se.$Q)(g,e,x)),{extent:e,srcExtent:u[0].srcExtent,pixelBlock:g}}getClippingGeometry(e){const t=this._clippingGeometry.get("0");if(!e||!t)return t;const i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e);let s=this._clippingGeometry.get(i);return null!=s||(s=e.equals(t.spatialReference)?t:(0,z.uk)(t,e),this._clippingGeometry.set(i,s)),s}async _open(e){const{rasterFunction:t}=this;this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach((e=>e.rasterJobHandler=this.rasterJobHandler)));const{rasters:i,rasterIds:s}=this.primaryRasters,n=i.map((t=>t.rasterInfo?void 0:t.open(e)));await Promise.all(n);const r=i.map((({rasterInfo:e})=>e)),o=t.bind({rasterInfos:r,rasterIds:s});if(t.rawSourceRasterInfos=r,!o.success||0===r.length)throw new a.A("raster-function:open",`cannot bind the function: ${o.error??""}`);const l="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===l?.functionName&&(t.rasterInfo.attributeTable=ne.A.fromJSON(l.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=r[0];this.hasUniqueSourceStorageInfo=1===r.length||r.slice(1).every((e=>function(e,t){const{storageInfo:i,pixelSize:s,spatialReference:n,extent:r}=e,{storageInfo:a,pixelSize:o,spatialReference:l,extent:c}=t;return s.x===o.x&&s.y===o.y&&n.equals(l)&&r.equals(c)&&i.blockHeight===a.blockHeight&&i.blockWidth===a.blockWidth&&i.maximumPyramidLevel===a.maximumPyramidLevel}(e,c))),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _updateClipGeometry(){const e=this.rasterFunction.getClippingGeometries()[0];let t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){const{extent:e}=this.rasterInfo,{difference:s,densify:n}=await Promise.all([i.e(9930),i.e(3209)]).then(i.bind(i,33209));let r=n(P.A.fromExtent(e),2*(e.width+e.height)/40);r=(0,z.uk)(r,t.spatialReference),t=s(r,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],re.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],re.prototype,"tileType",void 0),(0,s._)([(0,h.MZ)()],re.prototype,"rasterFunction",void 0),(0,s._)([(0,h.MZ)()],re.prototype,"primaryRasters",void 0),re=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.FunctionRaster")],re);const ae=re;var oe=i(6049),le=i(6952),ce=i(12711),ue=i(85676),he=i(22048),fe=i(4095);const pe=e=>{let t=class extends e{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster="Function"===e[0]?.raster?.datasetFormat}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}get rasterInfo(){return(0,v.Lx)(o.A.getLogger(this),"rasterInfo",{replacement:"serviceRasterInfo",version:"4.29",warnOnce:!0}),this._get("serviceRasterInfo")}set url(e){this._set("url",(0,S.Jf)(e,o.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find((({name:t})=>t===e));return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const s=t?.layerDefinition?.drawingInfo?.renderer;return(0,w.LF)(s,i)||void 0}async convertVectorFieldData(e,t){const{serviceRasterInfo:i}=this;if(null==e||!i)return null;const s=this._rasterJobHandler.instance,n=i.dataType;return s?s.convertVectorFieldData({pixelBlock:e,dataType:n},t):(0,Y.FI)(e,n)}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,f.PZ)(he.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new a.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new a.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:r}=i;s.spatialReference.equals(r)||(await(0,z.Hh)(),n="extent"===s.type?(0,z._l)(s,r):(0,z.uk)(s,r));const o=e.pixelSize??new L.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:r}),{extent:l,width:c,height:u}=(0,se.b7)(i,n,o),h=await this.fetchPixels(l,c,u,{...t,interpolation:"nearest"});if(null==h.pixelBlock)throw new a.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const p=await(0,se.$Q)(h.pixelBlock,l,n),d=this._rasterJobHandler.instance;return d?d.computeStatisticsHistograms({pixelBlock:p},t):(0,le.eH)(p)}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,fe.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;let i=e.multidimensionalDefinition||this.multidimensionalDefinition;i?.length||(i=(0,B.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const s=e.timeExtent||this.timeExtent;if(null!=i&&null!=s&&(null!=s.start||null!=s.end)){i=i.map((e=>e.clone()));const n=t.variables.find((({name:e})=>e===i[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),r=i.find((({dimensionName:e})=>"StdTime"===e));if(!n||!r)return{...e,multidimensionalDefinition:null};const{start:a,end:o}=s,l=null==a?null:a.getTime(),c=null==o?null:o.getTime(),u=l??c,h=c??l;if(null!=n.values){const e=n.values.filter((e=>{if(Array.isArray(e)){if(u===h)return e[0]<=u&&e[1]>=u;const t=e[0]<=u&&e[1]>u||e[0]<h&&e[1]>=h,i=e[0]>=u&&e[1]<=h||e[0]<u&&e[1]>h;return t||i}return u===h?e===u:e>=u&&e<=h}));if(e.length){const t=e.sort(((e,t)=>{const i=Array.isArray(e)?e[0]:e,s=Array.isArray(e)?e[1]:e,n=Array.isArray(t)?t[0]:t,r=Array.isArray(t)?t[1]:t;return u===h?i-n:Math.abs(s-h)-Math.abs(r-h)}))[0];r.values=[t]}else i=null}else if(n.hasRegularIntervals&&n.extent){const[e,t]=n.extent;u>t||h<e?i=null:r.values=u===h?[u]:[Math.max(e,u),Math.min(t,h)]}}return null!=i&&(0,B.sx)(i,this.multidimensionalSubset)?{...e,multidimensionalDefinition:null}:{...e,multidimensionalDefinition:i}}async updateRasterFunction(){if(!this.loaded||"imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson))return;if(this._isConstructedFromFunctionRaster&&"Function"===this.raster.datasetFormat){const e=this.raster.rasterFunction.toJSON();return!this.rasterFunction&&e&&this._set("rasterFunction",O.A.fromJSON(e)),void(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON())}let e,t=this.raster,i=!1;"Function"===t.datasetFormat?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:s}=this;if(s){const i={raster:t};e.length>1&&e.forEach((e=>i[e.url]=e));const n=(0,oe.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),r=new ae({rasterFunction:n});r.rasterJobHandler=this._rasterJobHandler.instance,await r.open(),this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this.raster=r}else this.raster=t,this._cachedRasterFunctionJson=null,await t.open();if(this._cachedRendererJson=null,!i&&!s)return;const{bandIds:n}=this,{bandCount:r}=this.raster.rasterInfo,a=n?.length?n.some((e=>e>=r)):r>=3;n&&(a||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}async updateRenderer(){const{loaded:e,symbolizer:t}=this;if(!e||!t||!this.renderer)return;const{rasterInfo:i}=this.raster,s=(0,B.ct)(i,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,r=(0,ce.$P)({...this.renderer.toJSON(),variableName:n});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(r))return;const a=this._rasterJobHandler.instance;a&&(t.rasterInfo=(0,ce.m7)(i,n),t.rendererJSON=r,t.bind(),await a.updateSymbolizer(t),this._cachedRendererJson=r)}async applyRenderer(e,t){const i=e?.pixelBlock;if(!(null!=i&&i.pixels&&i.pixels.length>0))return null;let s;await this.updateRenderer();const n=this._rasterJobHandler.instance,r=this.bandIds??[];return s=n?await n.symbolize({...e,simpleStretchParams:t,bandIds:r}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:r}),s}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const s=(0,R.Vp)(e);return C.A.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,s,n={}){if(i(this),n.requestAsImageElement){const i=this.getTileUrl(e,t,s);return(0,_.A)(i,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:n.signal}).then((e=>e.data))}const{serviceRasterInfo:r}=this;if(null!=r.multidimensionalInfo&&null==(n=this.normalizeRasterFetchOptions(n)).multidimensionalDefinition){const i=n.tileInfo||r.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,s,i),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(n={...n,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,s,n)}async fetchPixels(e,t,i,s={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,s))}async identify(e,t={}){await this.load();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&!(s.hasMultidimensionalTranspose&&((0,B.DY)(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||null!=(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition))return{location:e,value:null};const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new a.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");return i.identify(e,t)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some((e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some((e=>"StdTime"===e.name)))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,B.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,B.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&"Function"===this.raster.datasetFormat&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new F.A;return this._rasterJobHandler.connectionPromise=e.initialize().then((async()=>{i(this),this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,"Function"===this.raster.datasetFormat&&this.raster.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch((()=>{})),this.renderer&&this.updateRenderer()})).catch((()=>{})),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){if(null==this.interpolation){i(this);const{raster:e}=this,t=(0,ce.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){i(this);const{rasterInfo:t}=this.raster,s=(0,B.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,r=(0,ce.I8)({variableName:n,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=r?.bandIds??(0,ce.ci)(t)),!this.renderer||"override"===e){const e=(0,ce.Mm)(this.raster),i=r?.renderer??(0,ce.PD)(t,{bandIds:this.bandIds,variableName:n,rasterFunctionColorRamp:e}),s=t.statistics,a=s&&s.length>0?s[0]:null,o=a?.max??0,l=a?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(o>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const a=(0,ce.$P)({...this.renderer.toJSON(),variableName:n}),l=(0,ce.m7)(t,n);this.symbolizer?(this.symbolizer.rendererJSON=a,this.symbolizer.rasterInfo=l):this.symbolizer=new ue.A({rendererJSON:a,rasterInfo:l});const c=this.symbolizer.bind();if(c.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,ce.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else o.A.getLogger(this).warn("imagery-tile-mixin",c.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}};function i(e){if(!e.raster||!e.serviceRasterInfo)throw new a.A("imagery-tile","no raster")}return(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"_cachedRasterFunctionJson",void 0),(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"_compatibleFullExtent",void 0),(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,s._)([(0,h.MZ)({type:[f.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],t.prototype,"bandIds",void 0),(0,s._)([(0,h.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,s._)([(0,h.MZ)({json:{read:!1}})],t.prototype,"fullExtent",null),(0,s._)([(0,h.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,b.e)(k.SZ)],t.prototype,"interpolation",void 0),(0,s._)([(0,h.MZ)()],t.prototype,"ioConfig",void 0),(0,s._)([(0,h.MZ)({type:[A.A],json:{write:!0}})],t.prototype,"multidimensionalDefinition",null),(0,s._)([(0,h.MZ)({type:M.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,s._)([(0,h.MZ)()],t.prototype,"raster",void 0),(0,s._)([(0,h.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],t.prototype,"rasterFunction",null),(0,s._)([(0,h.MZ)({readOnly:!0})],t.prototype,"rasterInfo",null),(0,s._)([(0,h.MZ)()],t.prototype,"serviceRasterInfo",void 0),(0,s._)([(0,h.MZ)()],t.prototype,"sourceJSON",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,type:Q.A,json:{read:!1}})],t.prototype,"spatialReference",void 0),(0,s._)([(0,h.MZ)({type:C.A})],t.prototype,"tileInfo",void 0),(0,s._)([(0,h.MZ)(T.OZ)],t.prototype,"url",null),(0,s._)([(0,h.MZ)()],t.prototype,"renderer",null),(0,s._)([(0,h.MZ)({types:w.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:w.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,s._)([(0,I.w)("internalRenderer")],t.prototype,"readRenderer",null),(0,s._)([(0,h.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),t=(0,s._)([(0,d.$)("esri.layers.mixins.ImageryTileMixin")],t),t};var de=i(16131),me=i(8303),ye=i(56551),ge=i(54310),xe=i(25036),we=i(82935),_e=i(20437),ve=i(68197),be=i(73444),Ie=i(14140);function Re(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function Se(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function Te(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],n=[];let r=-1,a=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];Re(l)?r=e:Se(l)&&(a=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),n.push(e)}else{const{start:e,stop:t,num:i}=c,r=(t-e)/(i-1);s.push([e-.5*r,t+.5*r]),n.push(r);for(let t=0;t<i;t++)u.push(e+r*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}r>-1&&-1===a?a=0===r?1:0:a>-1&&-1===r?r=0===a?1:0:-1===a&&-1===r&&(r=0,a=1),o=o.filter(((e,t)=>!(t===r||t===a)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[r]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),h=null==u||"CRS84"===u?4326:Number(u),f=new Q.A({wkid:h}),[p,d]=s[r],[m,y]=s[a],g=new K.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:f});return{width:Math.round(g.width/n[r]),height:Math.round(g.height/n[a]),extent:g,dimensions:o}}function Ae(e){const t=(0,be.Z0)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function Me(){return Math.round(255*Math.random())}function ke(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const n=e[s];null!=n&&(n<t&&(t=n),n>i&&(i=n))}return(0,$.X1)(t,i)}function Oe(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),n=(r=1,e=>r*=e.count);var r;const a=[...s.slice(1),{name:"",count:1}].reverse().map(n).reverse();let o=0;for(let n=e.length-1;n>=0;n--)o+=a[s.findIndex((({name:t})=>t===e[n]))]*(i%t[n]),i=Math.floor(i/t[n]);return o}var Fe=i(87186);let Ce=class extends ie{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:n}=this,[r,a]=n.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==n.dataType,tileSize:{width:r,height:a},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,V.J$)(c);return Promise.resolve(u)}const n=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(n)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:n,histograms:r,name:a,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:h,pixelType:f}=c,p=t.extent??new K.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:h-.5,spatialReference:new Q.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/h},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new Fe.A({width:u,height:h,pixelType:f,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:n,isPseudoSpatialReference:d,histograms:r});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,n=s.storageInfo.maximumPyramidLevel??0,r="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:n,useBilinear:r},i):Promise.resolve((0,V.lD)(e,t,n,r)),l=null!=s.statistics,u=null!=s.histograms,h=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,le.f4)(e)),f=await(0,c.Lx)([o,h]);if(!f[0].value&&f[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=f[0].value,l||(s.statistics=f[1].value?.statistics),u||(s.histograms=f[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const n=t.variables[s];if(n.statistics)continue;const r=n.dimensions.map((e=>new A.A({variableName:n.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),a=(0,B.NG)(r,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,le.eH)(o);n.statistics=l.statistics,n.histograms||(n.histograms=l.histograms)}}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],Ce.prototype,"source",void 0),(0,s._)([(0,h.MZ)()],Ce.prototype,"url",null),Ce=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Ce);const Pe=Ce;let Ne=class extends ie{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:n,bandNames:r}=await this._fetchData(e),{statistics:a,histograms:o}=(0,le.eH)(i[0]),l=r?.map((e=>({BandName:e}))),c={DataType:n?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new Pe({source:{extent:t,pixelBlocks:i,attributeTable:n?ne.A.fromJSON(n):null,multidimensionalInfo:s,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:n,type:r,values:o}=s[e];if(!("ndarray"===r.toLowerCase()&&o?.length&&t?.length&&n?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!Re(t[t.length-1])||!Se(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:n}=Te(e),{ranges:r}=e,a=Object.keys(r).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<a.length;e++){const t=a[e];n?.length&&o.push({name:t,dimensions:n})}const l=function(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:n,unit:r,categoryEncoding:a,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},n&&(t[e].description=Ae(n)),r&&(t[e].unit=r.label?Ae(r.label):null,t[e].symbol=r.symbol?.value),a)){const i=Object.entries(a).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),n=i.find((e=>e.ClassName===t));if(!n)return;const r=e.label?Ae(e.label):null;if(n.Label=r,e.preferredColor){const t=ve.A.fromHex(e.preferredColor);t&&(s=!0,n.Red=t.r,n.Green=t.g,n.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=Me(),e.Green=Me(),e.Blue=Me())})));const n={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&n.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=n}}return t}(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<a.length;e++){const s=a[e],{values:o,dataType:l,axisNames:c,shape:h}=r[s],f=h.length>2?e*h.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=h.slice(0,-2),m="float"===l?"f32":ke(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const r=Ie.A.createEmptyBand(m,y),a=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):r[e]=t}if(0===e||n?.length){const e=new Ie.A({width:t,height:i,mask:l?a:null,pixels:[r],pixelType:m});e.updateStatistics(),n?.length?u[Oe(p,d,s)+f]=e:u.push(e)}else{const e=u[s];e.pixels.push(r),l?e.mask&&(e.mask=Ie.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const h=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:h,bandNames:c?void 0:a}}(t)}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Ne.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)({constructOnly:!0})],Ne.prototype,"source",void 0),Ne=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],Ne);const De=Ne;var Ee=i(4576);function Be(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const s=[];if(t){const n=Be(e,i);for(let e=0;e<n.length;e++)Be(n[e],t).forEach((e=>s.push(e)));return s}const n=e.getElementsByTagNameNS("*",i);if(!n||0===n.length)return[];for(let e=0;e<n.length;e++)s.push(n[e]||n.item(e));return s}function ze(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const s=Be(e,i);return s.length>0?t?ze(s[0],t):s[0]:null}function Le(e,t=null){const i=t?ze(e,t):e;let s;return i?(s=i.textContent||i.nodeValue,s?s.trim():null):null}function Je(e,t){return function(e,t){const i=Be(e,t),s=[];let n;for(let e=0;e<i.length;e++)n=i[e].textContent||i[e].nodeValue,n&&(n=n.trim(),""!==n&&s.push(n));return s}(e,t).map((e=>Number(e)))}function He(e,t){const i=Le(e,t);return Number(i)}function Ge(e,t){const i=e?.nodeName?.toLowerCase(),s=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===s}var qe=i(21312);function We(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function je(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new Q.A({wkid:t});if(e=String(e).trim(),(0,R.jp)(e))return new Q.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),n=i.indexOf("PROJCS"),r=n>-1?n:i.indexOf("GEOGCS");if(-1===r)return null;const a=e.slice(r,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=Ze(a);const l=new Q.A(t?{wkid:t}:{wkt:a}),c=Ze(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=Ze(e),new Q.A(0!==t?{wkid:t}:{wkt:e})):null}function Ze(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function $e(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(Ge(e,"SRS")){if(!t.spatialReference){const i=Le(e);t.spatialReference=je(i)}}else if(Ge(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=ze(e,"GeodataXform"),i=je(He(t,"SpatialReference/WKID")||Le(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=He(t,"PolynomialOrder")??1,n=Je(t,"CoeffX/Double"),r=Je(t,"CoeffY/Double"),a=Je(t,"InverseCoeffX/Double"),o=Je(t,"InverseCoeffY/Double"),l=We(n,r),c=We(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new qe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else Be(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=Le(e)));else if(Ge(e,"PAMRasterBand")){const i=function(e){const t=He(e,"NoDataValue"),i=ze(e,"Histograms/HistItem"),s=He(i,"HistMin"),n=He(i,"HistMax"),r=He(i,"BucketCount"),a=Le(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;Be(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=He(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=s&&null!=n?{min:s,max:n,size:r||a.length,counts:a}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(Ee.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(Ee.Ru):null}return t}let Ue=class extends ie{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:n,transform:r}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new Q.A({wkid:3857})),n?.length&&null==s&&(s=(0,le.Pg)(n));const{width:o,height:l}=t;let c=new K.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=r?r.forwardTransform(c):c;let h=!0;if(r){const e=r.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(r=null,c=u)}const f=new Pe({source:{extent:u,nativeExtent:c,transform:r,pixelBlocks:[t],statistics:s,histograms:n,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(f.ioConfig.skipMapInfo=!0),await f.open(),f.source=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,U.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),n="gif"===s||"bmp"===s||!(0,p.A)("ios"),r=await this.decodePixelBlock(t,{format:s,useCanvas:n,hasNoZlibMask:!0});if(null==r)throw new a.A("image-aux-raster:open","the data cannot be decoded");return r}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,n=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),r=this.datasetFormat,a="JPG"===r?"jgw":"PNG"===r?"pgw":"BMP"===r?"bpw":null,o=a&&i.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,c.Lx)([n,o]);if(t?.aborted)throw(0,c.NK)();const u=$e(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new qe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],Ue.prototype,"datasetFormat",void 0),Ue=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Ue);const Ve=Ue;var Ye=i(97768),Xe=i(84952),Ke=i(25943),Qe=i(73037),et=i(82371);let tt=class extends ie{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:n,extent:r}=this.rasterInfo,{transposeInfo:a}=n,o=null!=a&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:n.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal});if(!h)return null;const f=o?a.tileSize:n.tileInfo.size,p=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==p)return null;const d=n.blockBoundary[e];if("jpg"!==n.compression||i>d.minCol&&i<d.maxCol&&t>d.minRow&&t<d.maxRow)return p;const{origin:m,blockWidth:y,blockHeight:g}=n,{x,y:w}=this.getPyramidPixelSize(e),_=Math.round((r.xmin-m.x)/x)%y,v=Math.round((r.xmax-m.x)/x)%y||y,b=Math.round((m.y-r.ymax)/w)%g,I=Math.round((m.y-r.ymin)/w)%g||g,R=i===d.minCol?_:0,S=t===d.minRow?b:0,T=i===d.maxCol?v:y,A=t===d.maxRow?I:g;return(0,V.z$)(p,{x:R,y:S},{width:T-R,height:A-S}),p}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([i,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),n[1]?.[0]?.counts?.length||(n[1]=null),{statistics:n[0]||null,histograms:n[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:n}=this.rasterInfo.storageInfo;let r=n-s+this._levelOffset;const a=i.srcLocation;for(;r>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(r,i.row,i.col,t))break}catch{}if(r--,s++,i=this.identifyPixelLocation(a,s,t.datumTransformation),null===i)return null}return-1===r||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const n=await this._fetchRasterInfo({signal:t});if(null==n)throw new a.A("image-server-raster:open","cannot initialize image service");(0,et.E9)(n,s);const r="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:n,maxLOD:r}=t;if(null!=n&&null!=r)return C.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=n&&e<=r))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,n=i?t(i):1/0,r=s?t(s):-1/0;return C.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=n&&i>=r}))})}return C.A.fromJSON(e)}(s.tileInfo,s):C.A.fromJSON(s.tileInfo);(0,Ye.Lw)(r);const[o,l]=this._computeMinMaxLOD(n,r),{extent:c,pixelSize:u}=n,h=.5/n.width*u.x,f=Math.max(u.x,u.y),{lods:p}=r;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>h||!p.some((e=>Math.abs(e.resolution-f)<h)))&&(u.x=u.y=o.resolution,n.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),n.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=r.size,g=[],x=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&x.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const w=this.computeBlockBoundary(c,m,y,r.origin,g,d),_=g.length>1?g.slice(1):null;let v;s.transposeInfo&&(v={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:n.keyProperties?._yxs.PacketSize??0});const b=x.length<=1||x.length>=3&&x.slice(0,-1).every((e=>e===x[0]))?x[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(n.storageInfo=new E.A({blockWidth:r.size[0],blockHeight:r.size[1],pyramidBlockWidth:r.size[0],pyramidBlockHeight:r.size[1],pyramidResolutions:_,pyramidScalingFactor:b,compression:r.format,origin:r.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:r,transposeInfo:v,blockBoundary:w}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Qe.A,e.extent=e.transform.forwardTransform(t))}(n),this._set("rasterInfo",n),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:n.storageInfo.tileInfo,parsedUrl:(0,Xe.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new Ke.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),n=Q.A.fromJSON(t.spatialReference||e.spatialReference),r=new L.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:n});return new Fe.A({width:i,height:s,bandCount:3,extent:K.A.fromJSON(e),spatialReference:n,pixelSize:r,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,et.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),n=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,r=await Promise.all([s,n]);return this._slices=r[1],r[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:n}=t,r=t.lodAt(Math.max.apply(null,n.map((e=>e.level)))),a=t.lodAt(Math.min.apply(null,n.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=n[0].level,[r,a];if("Raster"===o)return[n.find((e=>e.resolution===i.x))??r,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=r;c>0&&(u=n.find((e=>Math.abs(e.scale-c)<s)),u||(u=n.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??r));let h=a;return l>0&&(h=n.find((e=>Math.abs(e.scale-l)<s))??a,this._levelOffset=h.level-a.level),[u,h]}};(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],tt.prototype,"datasetFormat",void 0),(0,s._)([(0,h.MZ)()],tt.prototype,"tileType",void 0),tt=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],tt);const it=tt;var st=i(47124);const nt=new Map;nt.set("Int8","s8"),nt.set("UInt8","u8"),nt.set("Int16","s16"),nt.set("UInt16","u16"),nt.set("Int32","s32"),nt.set("UInt32","u32"),nt.set("Float32","f32"),nt.set("Float64","f32"),nt.set("Double64","f32");const rt=new Map;rt.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),rt.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),rt.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),rt.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let at=class extends ie{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:n,blockHeight:r,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(n*r);return new Ie.A({width:n,height:r,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),x=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),w=new Uint8Array(x),_=[];let v=0;for(y=0;y<d;y++)_.push(v),w.set(new Uint8Array(g[y].data),v),v+=g[y].data.byteLength;const b=rt.get(this.rasterInfo.storageInfo.compression).decoderFormat,I=await this.decodePixelBlock(w.buffer,{width:n,height:r,format:b,planes:p?.length||l,offsets:_,pixelType:c});if(null==I)return null;let{noDataValue:R}=this.rasterInfo;if(null!=R&&"lerc"!==b&&!I.mask&&(R=R[0],null!=R)){const e=I.width*I.height,t=new Uint8Array(e);if(Math.abs(R)>1e24)for(y=0;y<e;y++)Math.abs((I.pixels[0][y]-R)/R)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)I.pixels[0][y]!==R&&(t[y]=1);I.mask=t}let S=0,T=0;if(h!==n||f!==r){let e=I.mask;if(e)for(y=0;y<r;y++)if(T=y*n,y<f)for(S=h;S<n;S++)e[T+S]=0;else for(S=0;S<n;S++)e[T+S]=0;else for(e=new Uint8Array(n*r),I.mask=e,y=0;y<f;y++)for(T=y*n,S=0;S<h;S++)e[T+S]=1}return I}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:n}=this._parseHeader(i.data),{skipMapInfo:r,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!r){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,le.Pg)(t.histograms)))}r&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=n;const o=await this.request(n.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,n,r,a;if(st.Z){for(i=new Uint8Array(e),n=new ArrayBuffer(e.byteLength),s=new Uint8Array(n),r=0;r<e.byteLength/4;r++)for(a=0;a<4;a++)s[4*r+a]=i[4*r+3-a];t=new Uint32Array(n)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:f}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(h/l/u**y)-1,t=Math.ceil(f/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return rt.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:n,pyramidScalingFactor:r}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,p=0;for(h=0;h<e;h++)p=r**h,c=Math.ceil(a/s/p),u=Math.ceil(o/n/p),f+=c*u;p=r**e,c=Math.ceil(a/s/p),u=Math.ceil(o/n/p),f+=t*c+i,f*=4*l;const d=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(a/p)-s*(c-1),actualTileHeight:t<u-1?n:Math.ceil(o/p)-n*(u-1)}}_parseHeader(e){const t=ze(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");const i=ze(t,"Size"),s=parseInt(i.getAttribute("x"),10),n=parseInt(i.getAttribute("y"),10),r=parseInt(i.getAttribute("c"),10),o=(Le(t,"Compression")||"none").toLowerCase();if(!rt.has(o))throw new a.A("mrf:open","currently does not support compression "+o);const l=Le(t,"DataType")||"UInt8",c=nt.get(l);if(null==c)throw new a.A("mrf:open","currently does not support pixel type "+l);const u=ze(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),p=ze(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),ze(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");const y=ze(e,"MRF_META/GeoTags"),g=ze(y,"BoundingBox");let x,w=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),n=Le(y,"Projection")||"";let r=Q.A.WGS84;if("LOCAL_CS[]"!==n)if(n.toLowerCase().startsWith("epsg:")){const e=Number(n.slice(5));isNaN(e)||0===e||(r=new Q.A({wkid:e}))}else r=je(n)??Q.A.WGS84;else w=!0,r=new Q.A({wkid:3857});x=new K.A(e,t,i,s),x.spatialReference=r}else w=!0,x=new K.A({xmin:-.5,ymin:.5-n,xmax:s-.5,ymax:.5,spatialReference:new Q.A({wkid:3857})});const _=ze(e,"MRF_META/Rsets"),v=parseInt(_?.getAttribute("scale")||"2",10),b=x.spatialReference,I=new E.A({origin:new L.A({x:x.xmin,y:x.ymax,spatialReference:b}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:v}),R=new L.A({x:x.width/s,y:x.height/n,spatialReference:b}),S=new Fe.A({width:s,height:n,extent:x,isPseudoSpatialReference:w,spatialReference:b,bandCount:r,pixelType:c,pixelSize:R,noDataValue:d,storageInfo:I}),T=Le(e,"datafile"),A=Le(e,"IndexFile");return{rasterInfo:S,files:{mrf:this.url,index:A||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",rt.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return $e(t)}catch{return null}}};(0,s._)([(0,h.MZ)()],at.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],at.prototype,"_storageIndex",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],at.prototype,"datasetFormat",void 0),at=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],at);const ot=at;var lt=i(15265);function ct(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",n=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),r=n.map((e=>e.name)),a=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<r.length;l++)t[r[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:n,features:a}}class ut{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),n=t.getUint16(8,!0),r=t.getUint16(10,!0),a={version:i,recordCount:s,headerByteCount:n,recordByteCount:r};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,lt.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>r;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,lt.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=r}}return{header:a,fields:l,records:c,recordSet:ct({fields:l,records:c})}}}var ht=i(45664),ft=i(47915);const pt=(e,t)=>e.get(t)?.values,dt=(e,t)=>e.get(t)?.values?.[0];let mt=class extends ie{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const n=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=n&&this._headerInfo.hasMaskBand){const r=await this._fetchRawTiffTile(e,t,i,!0,s);null!=r&&r.pixels[0]instanceof Uint8Array&&(n.mask=r.pixels[0])}return n}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:n,isBigTiff:r}=(0,ht.uT)(i),l=[];await this._readIFDs(l,i,s,n,0,r?8:4,t);const{imageInfo:c,rasterInfo:u}=function(e){const t=(0,ht.uc)(e),{width:i,height:s,tileWidth:n,tileHeight:r,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:h,pyramidBlockHeight:f,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=je(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),x=!!t.isPseudoGeographic;null==g&&(x=!0,g=new Q.A({wkid:3857}));const w=new K.A({...t.extent,spatialReference:g}),_=new L.A(w?{x:w.xmin,y:w.ymax,spatialReference:g}:{x:0,y:0}),v=new E.A({blockWidth:n,blockHeight:r,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:l,origin:_,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),b=new L.A({x:(w.xmax-w.xmin)/i,y:(w.ymax-w.ymin)/s,spatialReference:g}),I=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let R=null;const S=dt(e[0],"PHOTOMETRICINTERPRETATION"),T=pt(e[0],"COLORMAP");if(S<=3&&T?.length>3&&T.length%3==0){R=[];const e=T.length/3;for(let t=0;t<e;t++)R.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const A=new Fe.A({width:i,height:s,bandCount:a,pixelType:o,pixelSize:b,storageInfo:v,spatialReference:g,isPseudoSpatialReference:x,keyProperties:I,extent:w,colormap:R,statistics:y?y.statistics:null});if(m?.length&&(A.nativeExtent=new K.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),A.transform=new qe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),A.extent=A.transform.forwardTransform(A.nativeExtent),A.pixelSize=new L.A({x:(w.xmax-w.xmin)/i,y:(w.ymax-w.ymin)/s,spatialReference:g}),v.origin.x=-.5,v.origin.y=.5),p){const{x:e,y:t}=A.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:A}}(l),h=(0,ht.zS)(l),f=(0,ht.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:r,ifds:l,pyramidIFDs:h,maskIFDs:f,...c},this._set("rasterInfo",u),!c.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new a.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");u.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const p=l[0].get("PREDICTOR")?.values?.[0],d=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===d&&2===p)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:m,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!m){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,le.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new L.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,u)}y.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||m||(u.attributeTable=await this._fetchAuxiliaryTable(e),null!=u.attributeTable&&(u.keyProperties.DataType="thematic")),m&&this.updateImageSpaceRasterInfo(u),this.updateTileInfo()}async _readIFDs(e,t,i,s,n,r=4,a){if(!s)return null;(s>=t.byteLength||s<0)&&(t=(await this.request(this.url,{range:{from:s+n,to:s+n+this._bufferSize},responseType:"array-buffer",signal:a})).data,n=s+n,s=0);const o=await this._readIFD(t,i,s,n,ft.A.tiffTags,r,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-n,n,r,a)}async _readIFD(e,t,i,s,n=ft.A.tiffTags,r=4,a){if(!e)return null;const o=(0,ht.JM)(e,t,i,s,n,r);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const n=i.map((e=>e.offlineOffsetSize)).filter(Ee.Ru),r=Math.min.apply(null,n.map((e=>e[0])));if(Math.min.apply(null,n.map((e=>e[0]+e[1])))-r<=this._bufferSize){const{data:n}=await this.request(this.url,{range:{from:r,to:r+this._bufferSize},responseType:"array-buffer",signal:a});e=n,s=r,i.forEach((i=>(0,ht.Cr)(e,t,i,s)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),n=i?.values;if(n&&n.length>4){const r=n[0]+"."+n[1]+"."+n[2],o=await this._readIFD(e,t,i.valueOffset+6-s,s,ft.A.geoKeys,2,a);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[r]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:s,to:s+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,s,ft.A.tiffTags,4,a)}}async _fetchRawTiffTile(e,t,i,s,n={}){const r=this._getTileLocation(e,t,i,s);if(!r)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=r,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:n.signal}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===h.length?h[0].data:new ArrayBuffer(f),d=[0],m=[0];if(h.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){const s=h[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==x)return null;let w,_,v;if(o!==y||l!==g){let e=x.mask;if(e)for(w=0;w<g;w++)if(v=w*y,w<l)for(_=o;_<y;_++)e[v+_]=0;else for(_=0;_<y;_++)e[v+_]=0;else for(e=new Uint8Array(y*g),x.mask=e,w=0;w<l;w++)for(v=w*y,_=0;_<o;_++)e[v+_]=1}return x}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:n,blockBoundary:r}=this.rasterInfo.storageInfo,a=0===e?0:e-(n-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,ht.XO)(l,o),u=pt(l,"TILEOFFSETS");if(void 0===u)return null;const h=pt(l,"TILEBYTECOUNTS"),{minRow:f,minCol:p,maxRow:d,maxCol:m}=r[a];if(t>d||i>m||t<f||i<p)return null;const y=dt(l,"IMAGEWIDTH"),g=dt(l,"IMAGELENGTH"),x=dt(l,"TILEWIDTH"),w=dt(l,"TILELENGTH"),_=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;_[s]={from:u[e],to:u[e]+h[e]-1}}}else{const e=t*(m+1)+i;_.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<_.length;e++)if(null==_[e].from||!_[e].to||_[e].to<0)return null;return{ranges:_,ifd:l,actualTileWidth:i===m&&y%x||x,actualTileHeight:t===d&&g%w||w}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return $e(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=ut.parse(t);return i?.recordSet?ne.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,h.MZ)()],mt.prototype,"_files",void 0),(0,s._)([(0,h.MZ)()],mt.prototype,"_headerInfo",void 0),(0,s._)([(0,h.MZ)()],mt.prototype,"_bufferSize",void 0),(0,s._)([(0,h.MZ)({type:String,json:{write:!0}})],mt.prototype,"datasetFormat",void 0),mt=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],mt);const yt=mt,gt=new Map;gt.set("MRF",{desc:"Meta Raster Format",constructor:ot}),gt.set("TIFF",{desc:"GeoTIFF",constructor:yt}),gt.set("RasterTileServer",{desc:"Raster Tile Server",constructor:it}),gt.set("JPG",{desc:"JPG Raster Format",constructor:Ve}),gt.set("PNG",{desc:"PNG Raster Format",constructor:Ve}),gt.set("GIF",{desc:"GIF Raster Format",constructor:Ve}),gt.set("BMP",{desc:"BMP Raster Format",constructor:Ve}),gt.set("CovJSON",{desc:"COVJSON Raster Format",constructor:De}),gt.set("MEMORY",{desc:"In Memory Raster Format",constructor:Pe});class xt{static get supportedFormats(){const e=new Set;return gt.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:n}=e;let r=e.datasetFormat??i?.datasetFormat;null==r&&(t.includes(".")?r=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?r="CovJSON":s?.extent&&s.pixelblocks&&(r="MEMORY")),"OVR"===r||"TIF"===r?r="TIFF":"JPG"===r||"JPEG"===r||"JFIF"===r?r="JPG":"COVJSON"===r&&(r="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(r="RasterTileServer");const o={url:t,source:s,sourceJSON:n,datasetFormat:r,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),r){if(!this.supportedFormats.has(r))throw new a.A("rasterfactory:open","not a supported format "+r);if("CRF"===r)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,gt.get(r).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(gt.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(r=l[c++],!r)return null;if("CRF"===r)return null;const t=new(0,gt.get(r).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){gt.has(e.toUpperCase())||gt.set(e.toUpperCase(),{desc:t,constructor:i})}}var wt=i(30291),_t=i(92935);let vt=class extends((0,g.dM)((0,xe.j)((0,de.q)((0,me.A)((0,ye.H)((0,x.d)(pe((0,we.e)((0,y.b)((0,ge.J)((0,l.P)((0,r.O)(m.A))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:n,saveAs:r}=await i.e(9838).then(i.bind(i,59838));switch(e){case _t.X.SAVE:return n(this,t);case _t.X.SAVE_AS:return r(this,s,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[new _e.A({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"}),new _e.A({name:"Raster.ServicePixelValue.Raw",alias:"Raw Pixel Value",domain:null,editable:!1,length:50,type:"string"})],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable,s=null!=i?i.fields:null;if(s){const t=s.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));e.push(...t)}const n=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===n||"vector-uv"===n)&&null!=r){const t=r.variables[0].unit?.trim(),i="Magnitude"+(t?` (${t})`:"");e.push(new _e.A({name:"Raster.Magnitude",alias:i,domain:null,editable:!1,type:"double"})),e.push(new _e.A({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>"raster.servicepixelvalue.raw"!==e.toLowerCase()))),s=(0,wt.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:n}=this.raster;return s?.fieldInfos&&n?.pixelType.startsWith("f")&&s.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&t&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),s}async generateRasterInfo(e,t){if(e=(0,f.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof a.A)throw e;throw new a.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(_t.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(_t.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t="Function"===this.raster.datasetFormat,!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new a.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new a.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters="Function"===e.datasetFormat?e.primaryRasters.rasters:[e],this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,oe.UD)(t.toJSON(),s);const n=await Promise.all(s.map((e=>xt.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),r=n.findIndex((e=>null==e));if(r>-1)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${s[r]}`);return this._primaryRasters=n,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await xt.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new a.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const n=await xt.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==n)throw new a.A("imagery-tile-layer:open",i);this._primaryRasters=[n],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=n}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,oe.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),n=new ae({rasterFunction:s});return await n.open(t),n}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof a.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};(0,s._)([(0,h.MZ)({clonable:!1})],vt.prototype,"_primaryRasters",void 0),(0,s._)([(0,h.MZ)(T.fV)],vt.prototype,"legendEnabled",void 0),(0,s._)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],vt.prototype,"isReference",void 0),(0,s._)([(0,h.MZ)({type:["show","hide"]})],vt.prototype,"listMode",void 0),(0,s._)([(0,h.MZ)({json:{read:!0,write:!0}})],vt.prototype,"blendMode",void 0),(0,s._)([(0,h.MZ)()],vt.prototype,"sourceJSON",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],vt.prototype,"version",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],vt.prototype,"type",void 0),(0,s._)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],vt.prototype,"operationalLayerType",void 0),(0,s._)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],vt.prototype,"popupEnabled",void 0),(0,s._)([(0,h.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],vt.prototype,"popupTemplate",void 0),(0,s._)([(0,h.MZ)({readOnly:!0})],vt.prototype,"defaultPopupTemplate",null),(0,s._)([(0,h.MZ)({readOnly:!0,type:[_e.A]})],vt.prototype,"fields",void 0),(0,s._)([(0,h.MZ)({readOnly:!0,type:[_e.A]})],vt.prototype,"rasterFields",null),(0,s._)([(0,h.MZ)({constructOnly:!0})],vt.prototype,"source",void 0),vt=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],vt);const bt=vt},91806:(e,t,i)=>{i.d(t,{A:()=>u});var s,n=i(90237),r=i(25482),a=i(10107),o=i(56507),l=(i(87811),i(44208),i(40608));let c=s=class extends r.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,n._)([(0,a.MZ)({type:o.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,n._)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,n._)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,n._)([(0,a.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=s=(0,n._)([(0,l.$)("esri.layers.support.LOD")],c);const u=c},87045:(e,t,i)=>{i.d(t,{A:()=>R});var s,n=i(90237),r=i(66552),a=i(25482),o=i(83047),l=i(10107),c=i(56507),u=(i(87811),i(44208),i(36005)),h=i(40608),f=i(43937),p=i(86738),d=i(16930),m=i(19419),y=i(21325),g=i(28735),x=i(91806),w=i(72802);const _=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=s=class extends a.oY{static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:r=d.A.WebMercator,numLODs:a=24}=e;if(!(0,y.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new x.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new x.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new p.A(0,0,r),size:[n,n],spatialReference:r})}const l=(0,y.Vp)(r),c=e.origin?new p.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,o.GA)(r)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*u;h.push(new x.A({level:e,scale:t,resolution:s}))}else{let e=(0,y.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(a/t);h.push(new x.A({level:0,scale:e,resolution:e*u}));for(let s=1;s<i;s++){const i=e/2**t,n=i*u;h.push(new x.A({level:s,scale:i,resolution:n})),e=i}}return new s({dpi:96,lods:h,origin:c,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return p.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[],n=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,n[e.level]=e}))),this._set("scales",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],n=t[s+1];if(i<=e)return s;if(n===e)return s+1;if(i>e&&n<e)return s+Math.log(i/e)/Math.log(i/n)}return s}tileAt(e,t,i,s){const n=this.lodAt(e);if(!n)return null;let r,a;if("number"==typeof t)r=t,a=i;else if((0,y.aI)(t.spatialReference,this.spatialReference))r=t.x,a=t.y,s=i;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,a=e.y,s=i}const o=n.resolution*this.size[0],l=n.resolution*this.size[1];return s||(s=new w.U(null,0,0,0,(0,m.vt)())),s.level=e,s.row=Math.floor((this.origin.y-a)/l+.001),s.col=Math.floor((r-this.origin.x)/o+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,a=i.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.vt)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*a,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+a}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:s}=i,n=s*this.size[0],r=s*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],n=this.lods.length-t;for(let e=0;e<n;e++){const s=e+t,{scale:n,resolution:r}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new x.A({level:e,scale:n,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var b,I;(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,n._)([(0,l.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,n._)([(0,l.MZ)({type:p.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,n._)([(0,u.w)("origin")],v.prototype,"readOrigin",null),(0,n._)([(0,l.MZ)({type:[x.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,n._)([(0,l.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,n._)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,n._)([(0,u.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,n._)([(0,f.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],v.prototype,"writeSize",null),(0,n._)([(0,l.MZ)({type:d.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=s=(0,n._)([(0,h.$)("esri.layers.support.TileInfo")],v),b=v||(v={}),(I=b.ExtrapolateOptions||(b.ExtrapolateOptions={}))[I.NONE=0]="NONE",I[I.POWER_OF_TWO=1]="POWER_OF_TWO";const R=v},72802:(e,t,i)=>{i.d(t,{U:()=>s});class s{constructor(e,t,i,s,n=void 0){this.id=e,this.level=t,this.row=i,this.col=s,this.extent=n}}},25943:(e,t,i)=>{i.d(t,{d:()=>R});var s,n=i(90237),r=i(78888),a=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),h=i(3694),f=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),x=i(72802),w=i(4718),_=i(34275);class v{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,w.o8)(t));const s=this.location.width,n=this.location.height;let r=!0,a=!0;const o=function(e,t=!1){return e<=_.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*n/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[c]|=1<<t):r=!1,31===t&&++c}a?(this._availability="unavailable",this.byteSize=40):r?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,_.Ek)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,n=i>>5,r=this._availability;return n<0||n>r.length?"unknown":r[n]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||r.A,{row:s,col:n,width:a,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:n,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==n||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:n,width:a,height:o}});return v.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new v(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function I(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let R=s=class extends a.A{constructor(e){super(e),this._pendingTilemapRequests={},this.request=r.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(I(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof v){const n=s.getAvailability(t,i);if("unavailable"===n)throw I(e,t,i);return n}if((0,f.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,n){s.level=e,s.row=t,s.col=i;const r=this.layer.tileInfo;r.updateTileInfo(s);const a=this.fetchAvailability(e,t,i,n).catch((e=>{if((0,f.zf)(e))throw e;if(r.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,n);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,n,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,n,r,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;a.then((()=>l.abort()),(()=>l.abort()));let u=!1;const h=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(h,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,f.G4)(l))return;const p=new x.U(e,t,i,n),m={...r,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const n=this._tmpTilemapDefinition,r=this._tilemapFromCache(e,t,i,n);if(r)return Promise.resolve(r);const a=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,f.u7)(a,(()=>t((0,f.NK)())));const i=b(n);let r=this._pendingTilemapRequests[i];if(!r){r=v.fromDefinition(n,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=r,r.then(e,e)}r.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const n=b(s);return this._tilemapCache.get(n)}get test(){}};R._maxPrefetch=4,R._prefetches=new h.A({initialSize:s._maxPrefetch}),(0,n._)([(0,y.MZ)({constructOnly:!0})],R.prototype,"layer",void 0),(0,n._)([(0,y.MZ)({constructOnly:!0})],R.prototype,"minLOD",void 0),(0,n._)([(0,y.MZ)({constructOnly:!0})],R.prototype,"maxLOD",void 0),(0,n._)([(0,y.MZ)({constructOnly:!0})],R.prototype,"request",void 0),(0,n._)([(0,y.MZ)({constructOnly:!0})],R.prototype,"size",void 0),R=s=(0,n._)([(0,g.$)("esri.layers.support.TilemapCache")],R)},92300:(e,t,i)=>{i.d(t,{V:()=>r,X:()=>n});var s=i(65864);function n(e){return{geometryType:(0,s.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,i){const n=(0,s.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=i,t}))}},2272:(e,t,i)=>{i.d(t,{Dl:()=>a,jV:()=>r,lF:()=>o}),i(92602),i(70333);var s=i(4718),n=i(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,n.An)(e):(0,s.o8)(e)}function o(e,t,i){const s={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))s[n]=r.map((e=>o(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[n]);s[n]=t?e:JSON.stringify(e)}else s[n]=t?r:JSON.stringify(r);else s[n]=r}return s}i(926)},79677:(e,t,i)=>{i.d(t,{A:()=>p});var s,n=i(90237),r=i(25482),a=i(88930),o=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),u=i(43937),h=i(56400);let f=s=class extends r.oY{static get allTime(){return d}static get empty(){return m}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===s&&i===n}expandTo(e,t=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,a.lL)(i,e,t));let n=this.end;if(n){const i=(0,a.lL)(n,e,t);n=n.getTime()===i.getTime()?i:(0,a.S1)(i,1,e,t)}return new s({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let a,o;return n>=t&&n<=i?a=n:t>=n&&t<=r&&(a=t),i>=n&&i<=r?o=i:r>=t&&r<=i&&(o=r),null==a||null==o||isNaN(a)||isNaN(o)?s.empty:new s({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,i=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new s,{start:r,end:o}=this;return null!=r&&(n.start=(0,a.S1)(r,e,t,i)),null!=o&&(n.end=(0,a.S1)(o,e,t,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,n._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],f.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],f.prototype,"readEnd",null),(0,n._)([(0,u.K)("end")],f.prototype,"writeEnd",null),(0,n._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],f.prototype,"isAllTime",null),(0,n._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],f.prototype,"isEmpty",null),(0,n._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],f.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],f.prototype,"readStart",null),(0,n._)([(0,u.K)("start")],f.prototype,"writeStart",null),f=s=(0,n._)([(0,c.$)("esri.time.TimeExtent")],f);const p=f,d=new f,m=new f({start:void 0,end:void 0})},89738:(e,t,i)=>{i.d(t,{e:()=>u}),i(44208);var s=i(97768),n=i(74887),r=i(9775),a=i(32587),o=i(11932),l=i(44794);class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class u{constructor(e){this._schedule=null,this._task=null,this._deferreds=new a.A,this._controllers=new a.A,this._processingItems=new a.A,this._pausedSignal=(0,l.v)(!1),this.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new r.A(e.peeker),this.process=e.process;const t=e.scheduler;e.priority&&t&&(this._task=t.registerTask(e.priority,this))}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule),this._task=(0,s.xt)(this._task)}get updating(){return!!this._task?.updating||this.running}get length(){return this._processingItems.size+this._queue.length}abort(e){const t=this._controllers.get(e);t&&t.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach((t=>e.push(t))),this._controllers.clear(),e.forEach((e=>e.abort())),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach(((t,i)=>e(i)))}get(e){const t=this._deferreds.get(e);return t?t.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const i=this.get(e);if(i)return i;const s=new AbortController;let r=null;t&&(r=(0,n.u7)(t,(()=>s.abort())));const a=()=>{o.remove(),null!=r&&r.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()},o=(0,n.NY)(s.signal,(()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),a(),l.reject((0,n.NK)())})),l=(0,n.Tw)();return this._deferreds.set(e,l),this._controllers.set(e,s),l.promise.then(a,a),this._queue.push(e),this._scheduleNext(),l.promise}last(){return this._queue.last()}lastPromise(){const e=this.last();return e?this.get(e):null}peek(){return this._queue.peek()}popLast(){const e=this._queue.popLast();return e&&(this._deferreds.get(e)?.reject((0,n.NK)()),this._removeItem(e)),e}reset(){const e=Array.from(this._processingItems.values());this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}runTask(e){for(;!e.done&&this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop()),e.madeProgress()}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.delete(e)}_scheduleNext(){this._task||this._pausedSignal.value||this._schedule||(this._schedule=(0,o._)((()=>{this._schedule=null,this._next()})))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const i=new AbortController,s=new c(e,i);this._processingItems.set(e,s);try{t=this.process(e,i.signal)}catch(e){this._processError(s,e)}(0,n.$X)(t)?(s.promise=t,t.then((e=>this._processResult(s,e)),(e=>this._processError(s,e)))):this._processResult(s,t)}get test(){}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8943],{9775:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(62788),n=s(95488);class i{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new n.I,this._items=new Set}get length(){return(0,r.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.gc)(this._observable),yield*this._items}}},75503:(e,t,s)=>{s.d(t,{E:()=>v,w:()=>o});var r=s(4576),n=(s(44208),s(3694)),i=s(11006);class o{constructor(e=9,t){this._compareMinX=p,this._compareMinY=h,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(),T.prune(),I.prune(),E.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const r=this._toBBox;if(_(e,s))for(w.clear();s;){for(let n=0,i=s.children.length;n<i;n++){const i=s.children[n],o=s.leaf?r(i):i;_(e,o)&&(s.leaf?t(i):g(e,o)?a(i,t):w.push(i))}s=w.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let r=0,n=t.children.length;r<n;r++){const n=t.children[r],i=t.leaf?s(n):n;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;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){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,i=0,o=!1;const a=this._toBBox(e);for(I.clear(),E.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],i=E.pop()??0,o=!0),s.leaf&&(t=(0,r.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!g(s,a)?n?(i++,s=n.children[i],o=!1):s=null:(I.push(s),E.push(i),i=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,r){const n=s-t+1;let i=this._maxEntries;if(n<=i){const r=new A(e.slice(t,s+1));return l(r,this._toBBox),r}r||(r=Math.ceil(Math.log(n)/Math.log(i)),i=Math.ceil(n/i**(r-1)));const o=new x([]);o.height=r;const a=Math.ceil(n/i),d=a*Math.ceil(Math.sqrt(i));b(e,t,s,d,this._compareMinX);for(let n=t;n<=s;n+=d){const t=Math.min(n+d-1,s);b(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,r-1))}}return l(o,this._toBBox),o}_insert(e,t,s){const r=this._toBBox,n=s?e:r(e);I.clear();const i=function(e,t,s,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==s;){let s,r=1/0,n=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=m(e,o)-a;l<n?(n=l,r=a<r?a:r,s=o):l===n&&a<r&&(r=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,I);for(i.children.push(e),u(i,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,s){for(let r=s;r>=0;r--)u(t.data[r],e)}(n,I,t)}_split(e,t){const s=e.data[t],r=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,r);const i=this._chooseSplitIndex(s,n,r);if(!i)return;const o=s.children.splice(i,s.children.length-i),a=s.leaf?new A(o):new x(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let r,n,i;r=n=1/0;for(let o=t;o<=s-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,s,this._toBBox),l=f(t,a),u=c(t)+c(a);l<r?(r=l,i=o,n=u<n?u:n):l===r&&u<n&&(n=u,i=o)}return i}_chooseSplitAxis(e,t,s){const r=e.leaf?this._compareMinX:p,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,s,r)<this._allDistMargin(e,t,s,n)&&e.children.sort(r)}_allDistMargin(e,t,s,r){e.children.sort(r);const n=this._toBBox,i=d(e,0,t,n),o=d(e,s-t,s,n);let a=y(i)+y(o);for(let r=t;r<s-t;r++){const t=e.children[r];u(i,e.leaf?n(t):t),a+=y(i)}for(let r=s-t-1;r>=t;r--){const t=e.children[r];u(o,e.leaf?n(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],i=n.children;i.splice((0,r.qh)(i,s,i.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(T.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else T.pushArray(s.children);s=T.pop()??null}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,s,r,n){n||(n=new A([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let i,o=t;o<s;o++)i=e.children[o],u(n,e.leaf?r(i):i);return n}function u(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 p(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const s=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,i-r)}function g(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 b(e,t,s,r,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=r)continue;const a=s+Math.ceil((t-s)/r/2)*r;(0,i.q)(e,a,s,t,n),o.push(s,a,a,t)}}const w=new n.A,T=new n.A,I=new n.A,E=new n.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class A extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,s)=>{s.d(t,{A:()=>d});var r=s(36563),n=(s(44208),s(74887)),i=s(9775),o=s(72457),a=s(52268),l=s(61322);class d{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((s,r)=>{let i=!0;const o=e=>{(0,n.Te)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,n.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(s),this._clients[i])),(()=>(o(r),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(s))}}))}broadcast(e,t,s){const r=new Array(this._clientPromises.length);for(let n=0;n<this._clientPromises.length;++n){const i=this._clientPromises[n];r[n]=i.then((r=>r?.invoke(e,t,s)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,s){return this.apply(e,[t],s)}apply(e,t,s){const r=(0,n.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:s,resolver:r});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return r.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.vE)(this._clients.map((s=>s.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let s=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((n=>{n&&(t[r]=n.openPort()),0==--s&&e(t)}))}))}get test(){}}},72457:(e,t,s)=>{s.d(t,{h:()=>i,k:()=>n});const r=new FinalizationRegistry((e=>{e.close()}));function n(e,t){r.register(e,t,t)}function i(e){r.unregister(e)}},29953:(e,t,s)=>{s.d(t,{ho:()=>$});var r=s(49186),n=s(44208),i=s(74887),o=s(10382),a=s(72457),l=s(61322),d=s(53966),u=s(97768),p=s(78888),h=s(84952);const c={async request(e,t){const s=e.options,r=s.responseType;s.signal=t?.signal,s.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,h.sC)(e.url)?.after?r:"array-buffer";const n=await(0,p.A)(e.url,s),i={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch(n.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=s(8341),m=s(2741),f=s(92602),g=(s(47566),s(70333));const _={};var b=s(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...s)=>e[t](...s)}))}}class T{constructor(){this._dispatcher=new w,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,s){this._dispatcher.addEventListener(e,t,s)}removeEventListener(e,t,s){this._dispatcher.removeEventListener(e,t,s)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:s}=t;let r=await l.default.loadWorker(e);r||(r=await import(e));const n=l.default.connect(r);this._workerPostMessage({type:y.Go.OPENED,jobId:s,data:n})}}}var I=s(73444),E=s(18357);const v=()=>d.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:M}=y.Go;let A,x;const S="Failed to create Worker. Fallback to execute module in main thread";async function N(e){return new Promise((t=>{function s(n){const i=(0,y.VI)(n);i&&i.type===M&&(e.removeEventListener("message",s),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",s),e.removeEventListener("error",r),v().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new T).addEventListener("message",s),e.addEventListener("error",r)}e.addEventListener("message",s),e.addEventListener("error",r)}))}let k=0;const{ABORT:L,INVOKE:R,OPEN:C,OPENED:D,RESPONSE:O}=y.Go;class B{static async create(e){const t=await async function(){if(!(0,n.A)("esri-workers"))return N(new T);if(!A&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,h.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,h.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,I.JK)(),e.has={"esri-csp-restrictions":(0,n.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,n.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,n.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,n.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,n.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,n.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,n.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,n.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,n.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,n.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,n.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,n.A)("esri-atomics"),"esri-shared-array-buffer":(0,n.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,n.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,n.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,n.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,h.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,h.s2)(e.workers.workerPath):e.workers.workerPath=(0,h.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,s=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,I.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:E.$,fullVersion:g.ol,revision:E.u};return JSON.stringify({esriConfig:e,loaderConfig:s,kernelInfo:r})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+k++})}catch(t){v().warn(S,x),e=new T}else v().warn(S,x),e=new T;return N(e)}();return new B(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),d.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:s}=t,r=(0,y.Jc)();return new Promise(((t,n)=>{const o={resolve:t,reject:n,abortHandle:(0,i.NY)(s,(()=>{this._outJobs.delete(r),this._post({type:L,jobId:r})}))};this._outJobs.set(r,o),this._post({type:C,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case D:this._onOpenedMessage(t);break;case O:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case R:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,s=e.jobId,r=t.get(s);r&&(r.controller&&r.controller.abort(),t.delete(s))}_onInvokeMessage(e){const{methodName:t,jobId:s,data:r,abortable:n}=e,o=n?new AbortController:null,a=this._inJobs,l=c[t];let d;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);d=l.call(null,r,{signal:o?o.signal:null})}catch(e){return void this._post({type:O,jobId:s,error:(0,y.mF)(e)})}(0,i.$X)(d)?(a.set(s,{controller:o,promise:d}),d.then((e=>{a.has(s)&&(a.delete(s),this._post({type:O,jobId:s},e))}),(e=>{a.has(s)&&(a.delete(s),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:O,jobId:s,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:O,jobId:s},d)}_onOpenedMessage(e){const{jobId:t,data:s}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,u.xt)(r.abortHandle),r.resolve(s))}_onResponseMessage(e){const{jobId:t,error:s,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,u.xt)(i.abortHandle),s?i.reject(r.A.fromJSON(JSON.parse(s))):i.resolve(n))}_post(e,t,s){return(0,y.u1)(this.worker,e,t,s)}}const F=(0,n.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,n.A)("workers-pool-size")??8):0;let j=(0,n.A)("esri-mobile")?Math.min(F,3):F;j||(j=(0,n.A)("safari")&&(0,n.A)("mac")?7:2);let P=0;const q=[];async function G(e,t){const s=new o.A,{registryTarget:r,...n}=t;return await s.open(e,n),r&&(0,a.k)(r,s),s}async function $(e,t={}){if("string"!=typeof e)throw new r.A("workers:undefined-module","modulePath is missing");let s=t.strategy||"distributed";if((0,n.A)("host-webworker")&&!(0,n.A)("esri-workers")&&(s="local"),"local"===s){let s=await l.default.loadWorker(e);s||(s=await import(e)),(0,i.Te)(t.signal);const r=t.client||s;return G([l.default.connect(s,t.schedule)],{...t,client:r})}if(await async function(){if(U)return U;Z=new AbortController;const e=[];for(let t=0;t<j;t++){const s=B.create(t).then((e=>(q[t]=e,e)));e.push(s)}return U=Promise.all(e),U}(),(0,i.Te)(t.signal),"dedicated"===s){const s=P++%j;return G([await q[s].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const s=Math.min(t.maxNumWorkers,j);if(s<j){const r=new Array(s);for(let n=0;n<s;++n){const s=P++%j;r[n]=q[s].open(e,t)}return G(r,t)}}return G(q.map((s=>s.open(e,t))),t)}let Z,U=null},43334:(e,t,s)=>{s.d(t,{N3:()=>i,Om:()=>n});var r=s(92722);class n{constructor(e=null,t={},s,r){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?r.A.fromJSON(e.geometry):null,i=e.centroid?r.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(s,e.attributes,i,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new r(e.lengths,e.coords)}static fromRect(e){const[t,s,n,i]=e,o=n-t,a=i-s;return new r([5],[t,s,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const r=this.lengths[s];for(let s=0;s<r;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let r=0;for(const e of s){for(let s=1;s<e;s++)t[2*(r+s)]+=t[2*(r+s)-2],t[2*(r+s)+1]+=t[2*(r+s)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new r(this.lengths,e)):new r(Array.from(this.lengths),Array.from(s))}}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var r=s(44208),n=s(75503),i=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(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){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,r)=>{e[t++]=r})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,i.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>y});var r=s(4576),n=s(49186),i=s(65529),o=s(53966),a=s(70328),l=s(19419),d=s(90708),u=s(6518),p=s(51441),h=s(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new u.F,this._featuresById=new Map,this.events=new i.A,this.featureAdapter=h.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,r,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:r,ymax:n,spatialReference:(0,p.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(r.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let r;if(s?(e.displayId=s.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,d.jQ)(null!=r?r:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=r&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:r,attributes:i}=e;for(const e in i)s.attributes[e]=i[e];return r&&(s.geometry=r,this._boundsStore.set(t,(0,d.jQ)((0,l.vt)(),r,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var r=s(27647),n=s(43334),i=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,r.Q)(new i.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},64714:(e,t,s)=>{s.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>y});var r=s(44208),n=s(4718),i=s(99352),o=s(4071),a=s(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const d=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,r.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${h(t)} = null;`;for(const t in e)s+=`this${h(t)} = ${JSON.stringify(e[t])};`;const r=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>({[t]:null,...e})}}function h(e){return d.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},89270:(e,t,s)=>{var r;s.d(t,{x:()=>r}),function(e){e.MULTIPLIER="multiplier",e.ABSOLUTE="absoluteValue"}(r||(r={}))},80340:(e,t,s)=>{s.d(t,{P:()=>T});var r=s(90237),n=(s(59456),s(69622)),i=s(49186),o=s(53966),a=s(91869),l=s(39516),d=s(10107),u=(s(44208),s(87811),s(40608)),p=s(39829),h=s(57251),c=s(21325),y=s(85342),m=s(69860),f=s(45654),g=s(71402),_=s(42538),b=s(61956),w=s(5443);let T=class extends n.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((s=>{s.name&&(t.set(s.name,"entity"),this._processingCacheUpdatesLookup.set(s.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(s.name),s.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(s.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((s=>{s.name&&(t.set(s.name,"relationship"),this._processingCacheUpdatesLookup.set(s.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(s.name),s.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(s.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((s,r)=>{if("entity"===t.get(r))this.entityTypeNames.add(r);else{if("relationship"!==t.get(r))return o.A.getLogger(this).warn(`A named type, ${r}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(r);this.relationshipTypeNames.add(r)}const n=new Map;s.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(r);const t=this.getById(e.id);t&&n.set(e.id,t)})),this.sublayerCaches.set(r,n)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const s=this.inclusionModeDefinition.namedTypeDefinitions.get(e);s.members||(s.members=new Map),s.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const s=new Map;s.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:s}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return m.A.getInstance().readFromStoreById(e)}async getData(e,t,s){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let r;if(r=e||new b.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,s=this._processingCacheUpdatesLookup.get(t.objectType.name??""),n=r.outFields;n&&1===n.length&&n[0]===y.dr&&"1=1"===r.where||await Promise.all(s??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((s=>{if(this.relationshipTypeNames.has(t.objectType.name)){s.geometry=e.relationshipLinkChartDiagramLookup.get(s.attributes[t.objectIdField]);const r=this.memberIdTypeLookup.get(s.attributes[y.Cz]),n=this.memberIdTypeLookup.get(s.attributes[y.KQ]),i=this._isEndEntitySpatial(r,s,y.Cz),o=this._isEndEntitySpatial(n,s,y.KQ);s.attributes[y.BL]=Number(i&&o)}else{s.geometry=e.entityLinkChartDiagramLookup.get(s.attributes[t.objectIdField]);const r=this.geographicLookup.get(t.objectType.name);r&&s.attributes[r.name]?s.attributes[y.BL]=1:s.attributes[y.BL]=0}s.attributes[y.T1]=s.geometry,o.push(s)})),o}return this.retrieveDataFromService(r,t,s)}async getConnectedRecordIds(e,t){const s=[];let r="";const n=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const i={},a=[];for(const[e,s]of n){const n=`${e}_ids`;i[n]=s,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return s;const l=a.join(" UNION "),d=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:i}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await d.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];s.push({id:r[0],typeName:r[1]}),s.push({id:r[2],typeName:r[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return s}async getRelationshipsBetweenNodes(e,t){const s=this._getNamedTypeIdMapFromNodeIds(e);if(0===s.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},n=[];for(const[e,t]of s.entries()){const s=`${e}_ids`;r[s]=t,n.push(`MATCH (n:${e}) WHERE id(n) IN $${s} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const i=n.join(" UNION "),a=[],l=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:i,bindParameters:r}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const s=t[e];a.push({id:s[0],typeName:s[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return a}async getRelationshipsFromNodes(e,t,s){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const n={relationshipExclusionIds:s,possibleConnectionEntityIds:t},i=[];for(const[e,t]of r.entries()){const s=`${e}_ids`;n[s]=t,i.push(`MATCH (n:${e}) WHERE id(n) IN $${s} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=i.join(" UNION "),l=new Map,d=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:n}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await d.read();if(e)break;for(let e=0;e<t.length;e++){const s=t[e];let r=l.get(s[1]);r||(r=new Set,l.set(s[1],r)),r.add(s[0])}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}const u=[];for(const[e,t]of l)for(const s of t)u.push({id:s,typeName:e});return u}async refreshCacheContent(e,t,s,r=!0){const n=m.A.getInstance(),o=[],l=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&d.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&d.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))l.has(t)?l.get(t)?.push(e):l.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?l.set(t,null):e.members&&e.members.forEach((e=>{l.has(t)&&null!==l.get(t)?l.get(t)?.push(e.id):l.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})));for(const[e,u]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let p,h="",c=!1;if(t||d.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),s&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))h=`MATCH (n:${e}) ${u?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new i.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,h=`MATCH ()-[n:${e}]->() ${u?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}))}p=new _.A(u?{openCypherQuery:h,bindParameters:{ids:u}}:{openCypherQuery:h});const m=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,p)).resultRowsStream.getReader();for(;;){const{done:t,value:s}=await m.read();if(t)break;const i=[];for(let e=0;e<s.length;e++){const t=s[e];let r=0,n=0;const o={properties:{}};for(o.id=t[r],r++,n++,c&&(o.originId=t[r],r++,n++,o.destinationId=t[r],r++,n++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));r<t.length;r++)o.properties[l[r-n]]=t[r];i.push(o)}const o=n.writeToStore(i,y.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const d=this.sublayerCaches.get(e);o.forEach((t=>{d?.set(t.attributes[y.dr],t),r&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[y.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[y.dr],{id:t.attributes[y.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[y.dr],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,s=new Set(e.map((e=>e.id)));for(const s of e)t.add(s.typeName),1===this.memberIdTypeLookup.get(s.id)?.size?this.memberIdTypeLookup.delete(s.id):this.memberIdTypeLookup.get(s.id)?.delete(s.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===s.typeName&&e.members?.has(s.id)&&e.members.delete(s.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,r)=>{s.has(r)&&this.sublayerCaches.get(e)?.delete(r)}))}))}async retrieveDataFromService(e,t,s){const r=m.A.getInstance(),n=new Set,o=[];let a,d="",u=[];const b="relationship"===t.graphType,T=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,I=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let E=!T&&I?Array.from(I).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(E=e.objectIds);else if(null!=e.objectIds&&E&&E.length>0){const t=e.objectIds;e.objectIds=E.filter((e=>t.includes(e)))}else if(null!=e.objectIds)E=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=E}if(null!=e.outFields){const s=e.outFields;s.includes("*")?t.fields.forEach((e=>{n.add(e.name)})):s.forEach((e=>{e!==y.dr&&e!==t.geometryFieldName&&n.add(e)}))}if(null!=e.geometry){const s=e.geometry;let r;const u=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,y=u?.spatialReference,m=u?.serviceCapabilities?.geometryCapabilities;let g=m?.geometryMaxBoundingRectangleSizeX,T=m?.geometryMaxBoundingRectangleSizeY;if("point"===s.type){let e=s;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,c.KK),e=(0,h.project)(e,c.KK)),r=new w.A({spatialReference:c.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else s?.extent?.spatialReference&&!s.spatialReference?.isWGS84?(await(0,h.initializeProjection)(s.extent.spatialReference,c.KK),r=(0,h.project)(s.extent,c.KK)):r=s.extent;if(g&&T&&y){if(4326!==y.wkid){const e=new w.A({spatialReference:y,xmax:g,ymax:T}),t=(0,h.project)(e,c.KK);g=t.xmax,T=t.ymax}if(r.xmax-r.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(r.ymax-r.ymin>T)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${T}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const s=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{s.fieldNames.includes(e.name)&&n.add(e.name)}))}d=b?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{d+=`, n.${e}`,o.push(e)})),a=new _.A({openCypherQuery:d,bindParameters:{param_filter_geom:new p.A({rings:(0,f.DX)(r)})}})}else{let s="";if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&n.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const d=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&i.has(e.left.type)&&i.has(e.right.type)&&o.has(e.operator))return`${d(e.left)} ${e.operator} ${d(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let s=e.right.value;"%"===s.charAt(0)&&(s=s.slice(1)),"%"===s.charAt(s.length-1)&&(s=s.slice(0,-1)),t+=`'${s.toLowerCase()}')`}return t}return a=!0,""};s=d(r.parseTree),a&&(s="")}let r="";r=b?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;E&&(i=!0,r+=" WHERE ID(n) IN $ids"),s&&(r+=i?" AND":" WHERE",r+=` ${s}`),r+=" return ID(n)",b&&(r+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{r+=`, n.${e}`,o.push(e)})),a=new _.A(E?{openCypherQuery:r,bindParameters:{ids:E}}:{openCypherQuery:r})}const v=(await(0,g.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,s)).resultRowsStream.getReader();for(;;){const{done:e,value:s}=await v.read();if(e)break;const n=[];for(let e=0;e<s.length;e++){const t=s[e];let r=0,i=0;const a={properties:{}};for(a.id=t[r],r++,i++,b&&(a.originId=t[r],r++,i++,a.destinationId=t[r],r++,i++);r<t.length;r++)a.properties[o[r-i]]=t[r];n.push(a)}u=u.concat(r.writeToStore(n,y.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return u}_isEndEntitySpatial(e,t,s){for(const r of e??[])if(this.entityTypeNames.has(r)){const e=this.geographicLookup.get(r),n=e&&this.sublayerCaches.get(r)?.get(t.attributes[s]);if(e&&n?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const s of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(s))return;t.has(s)?t.get(s)?.push(e):t.set(s,[e])}})),t}};(0,r._)([(0,d.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"entityTypeNames",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"geographicLookup",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"sublayerCaches",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,r._)([(0,d.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,r._)([(0,u.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},70643:(e,t,s)=>{s.d(t,{A:()=>V});var r=s(90237),n=(s(59456),s(13874)),i=(s(86162),s(94409),s(65345),s(42980),s(20917),s(92438),s(96576),s(93618),s(65494)),o=s(15036),a=s(4718),l=s(92071),d=(s(29953),s(10107)),u=(s(44208),s(53966),s(40608)),p=s(43937),h=s(35666),c=s(57251),y=s(16930),m=s(21325),f=s(4146),g=s(83221),_=s(88856),b=s(64714);s(87811);const w=(0,s(17036).p)(),T=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,r._)([(0,d.MZ)(w.fields)],t.prototype,"fields",void 0),(0,r._)([(0,d.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,r._)([(0,u.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var I=s(85342),E=s(63074),v=s(87718),M=s(76294),A=s(32756),x=s(54310),S=s(25036),N=s(82935),k=s(10873),L=s(13213),R=s(20437),C=s(30524),D=s(81457),O=s(39383),B=s(96184),F=s(22671),j=s(61956),P=s(30291),q=s(61322),G=s(5443),$=s(39829),Z=s(82799),U=s(86738),H=s(50498);function Y(e){if(!e.json)return e;e.json.write=Q(e.json.write);const t=e.json.origins;if(!t)return e;let s;for(s in t){const e=t[s];e&&(e.write=Q(e.write))}return e}function Q(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:s,overridePolicy:r,...n}=e;return function(e,t){const s=J.call(this,e,t);return s.enabled?{...n,...s}:s}}(e)),e):!0===e?z():e}function z(){return{overridePolicy:J}}function J(e,t){const s=!!this.geometryType;let r={enabled:s};return s&&(r={...r,...W.call(this,e,t)}),r}function W(e,t){return{ignoreOrigin:this.originIdOf(t)>h.Gr.DEFAULTS}}let X=class extends(T((0,M.J)((0,v.F)((0,E.dM)((0,A.f)((0,N.e)((0,S.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=I.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new q.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const s=j.A.fromJSON(e);return this.queryFeaturesJSON(s,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const s="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(R.A.fromJSON({name:t.name,type:s,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(R.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),R.A.fromJSON({name:I.M1,type:"esriFieldTypeInteger",alias:I.M1,editable:!1}),R.A.fromJSON({name:I.BL,type:"esriFieldTypeInteger",alias:I.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?H.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return I.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,s=t?this.objectType?.properties?.[t]:null;return s?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,s=t?this.objectType?.properties?.[t]:null;return s?.hasZ??!1}set renderer(e){(0,C.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,i.r)((0,b.F0)(H.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,P.tn)(this,e)}createQuery(){return new j.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:s,queryEngine:r}=await this._setupQueryObjects(e),n=F.A.fromJSON(await r.executeQuery(s.toJSON(),t?.signal));return n.features.forEach((e=>{e.sourceLayer=this})),n}async queryFeaturesJSON(e,t){const{resolvedQuery:s,queryEngine:r}=await this._setupQueryObjects(e);return await r.executeQuery(s.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:s,queryEngine:r}=await this._setupQueryObjects(e);return r.executeQueryForCount(s.toJSON(),t?.signal)}async queryExtent(e={},t){const s={...e,returnGeometry:!0},{resolvedQuery:r,queryEngine:n}=await this._setupQueryObjects(s),i=await n.executeQueryForExtent(r.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new G.A(i.extent):new G.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const s=j.A.from(e);let r;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)r=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(s,this,t);r=this.loadQueryEngine(e)}return r.executeQueryForIds(s.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),s=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return s.featureStore.addMany(e),s}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new j.A({where:"1=1",outFields:[I.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then((()=>{(0,C.sv)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}async _setupQueryObjects(e,t){const s=j.A.from(e),r=s.geometry;let n;if(r&&!r.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(r.spatialReference,m.KK),s.geometry=(0,c.project)(r instanceof $.A||r instanceof Z.A||r instanceof U.A?r:r.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(s,this,t);n=this.loadQueryEngine(e)}return{resolvedQuery:s,queryEngine:n}}};(0,r._)([(0,d.MZ)(Y((0,a.o8)(E.sU)))],X.prototype,"blendMode",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"capabilities",void 0),(0,r._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:z()}})],X.prototype,"charts",void 0),(0,r._)([(0,d.MZ)({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),(0,r._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],X.prototype,"definitionExpression",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"displayField",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(E.LF)))],X.prototype,"effect",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"elevationInfo",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(v.Y)))],X.prototype,"featureEffect",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(L.d)))],X.prototype,"featureReduction",null),(0,r._)([(0,d.MZ)()],X.prototype,"fields",null),(0,r._)([(0,d.MZ)()],X.prototype,"geometryType",null),(0,r._)([(0,d.MZ)()],X.prototype,"geometryFieldName",null),(0,r._)([(0,d.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphType",void 0),(0,r._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphTypeName",null),(0,r._)([(0,d.MZ)()],X.prototype,"hasM",null),(0,r._)([(0,d.MZ)()],X.prototype,"hasZ",null),(0,r._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],X.prototype,"id",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(k.kF)))],X.prototype,"labelsVisible",void 0),(0,r._)([(0,d.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:O.w,write:z()}})],X.prototype,"labelingInfo",void 0),(0,r._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"layerType",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(k.fV)))],X.prototype,"legendEnabled",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(k.hG)))],X.prototype,"maxScale",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(k.hn)))],X.prototype,"minScale",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"objectIdField",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"objectType",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(k.ke)))],X.prototype,"opacity",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(A.n)))],X.prototype,"orderBy",void 0),(0,r._)([(0,d.MZ)({clonable:!1})],X.prototype,"parent",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"parentCompositeLayer",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(k.M6)))],X.prototype,"popupEnabled",void 0),(0,r._)([(0,d.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],X.prototype,"popupTemplate",void 0),(0,r._)([(0,d.MZ)({type:Number,json:{write:{overridePolicy:W}}})],X.prototype,"refreshInterval",void 0),(0,r._)([(0,d.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:z()}})],X.prototype,"renderer",null),(0,r._)([(0,d.MZ)()],X.prototype,"source",void 0),(0,r._)([(0,d.MZ)()],X.prototype,"spatialReference",null),(0,r._)([(0,d.MZ)({type:B.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],X.prototype,"timeInfo",null),(0,r._)([(0,d.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"title",null),(0,r._)([(0,p.K)("title")],X.prototype,"writeTitle",null),(0,r._)([(0,d.MZ)({json:{read:!1}})],X.prototype,"type",void 0),(0,r._)([(0,d.MZ)(Y((0,a.o8)(N.B)))],X.prototype,"useViewTime",void 0),(0,r._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:z()}})],X.prototype,"visible",void 0),X=(0,r._)([(0,u.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],X);const V=X},69860:(e,t,s)=>{s.d(t,{A:()=>a}),s(59456);var r=s(90708),n=s(43334),i=s(85342),o=s(65864);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const s=this.readFromStoreById(e);s&&t.push(s)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,s){const a=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,d=null;if(s&&e.properties[s]&&(d=(0,r.Ux)(e.properties[s])),"originId"in e&&"destinationId"in e&&(e.properties[i.Cz]=e.originId,e.properties[i.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),i=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));s&&e.properties[s]&&(i[s]=(0,o.rS)(e.properties[s])),l=new n.Om(d?JSON.parse(JSON.stringify(d)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,i,null,e.properties[t])}else l=new n.Om(d?JSON.parse(JSON.stringify(d)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)})),a}}},85342:(e,t,s)=>{s.d(t,{BL:()=>d,Cz:()=>i,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>n,qN:()=>h});var r=s(71402);const n="ESRI__ID",i="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",d="LC.ESRI__IsSpatial",u={initializeLayersFromClientData:async(e,t)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const s=new Map;for(const r of t)s.set(r,p(e,r));const n=await(0,r.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(s.values()));for(const t of[...e.layers,...e.tables]){const s=t.objectType.name;if(null===s)continue;const r=n.get(p(e,s));if(r){const e=JSON.parse(r);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},p=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function h(e,t){return u.initializeLayersFromClientData(e,t)}},45654:(e,t,s)=>{s.d(t,{fz:()=>H,k1:()=>U,DX:()=>F,_s:()=>P,aq:()=>j,Y1:()=>Y,fe:()=>q}),s(59456),s(52106);var r,n=s(78888),i=(s(61147),s(49186)),o=s(91869),a=(s(94194),s(90708),s(92722)),l=s(89270),d=(s(85342),s(69860),s(8460),s(71402)),u=s(42538),p=s(16930);class h{constructor(){this.version="",this.queryResult=new c}}class c{constructor(){this.featureResult=new y}}class y{constructor(){this.objectIdFieldName="",this.uniqueIdField=new m,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new f,this.geometryType=null,this.spatialReference=new p.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new g,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class m{constructor(){this.name="",this.isSystemMaintained=!1}}class f{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class g{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new _,this.translate=new b}}class _{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class b{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class w{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class T{constructor(){this.attributes=[],this.compressedGeometry=new I,this.centroid=new I,this.aggregateGeometries=[]}}class I{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}!function(e){e.ELEMENTUID="ELEMENTUID",e.TYPENAME="TYPENAME"}(r||(r={}));const E=[r.ELEMENTUID,r.TYPENAME];var v,M;!function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(v||(v={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(M||(M={}));var A,x,S,N,k,L=s(45724),R=s(35448);function C(e){const t=new h;t.version=e.version;const s=e.get_query_result();if(0!==s.results_type.value)throw new Error("Got a non-feature collection type");const r=s.get_feature_result(),n=t.queryResult.featureResult;n.objectIdFieldName=r.objectid_field_name,n.exceededTransferLimit=r.exceeded_transfer_limit,n.hasM=r.has_m,n.hasZ=r.has_z,n.geometryType=R.bV[r.geometry_type.value],n.globalIdFieldName=r.globalid_field_name,n.geohashFieldName=r.geohash_field_name;const i=n.uniqueIdField,o=r.unique_id_field;i.name=o.name,i.isSystemMaintained=o.isSystemMaintained;const a=n.geometryProperties,l=r.geometry_properties;a.shapeAreaFieldName=l.shapeAreaFieldName,a.shapeLengthFieldName=l.shapeLengthFieldName,a.units=l.units;const d=n.spatialReference,u=r.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,n.transform=function(e){const t=new g;t.quantizeOriginPosition=x[e.quantizeOriginPosition.value];const s=t.scale,r=e.scale;s.xScale=r.xScale,s.yScale=r.yScale,s.mScale=r.mScale,s.zScale=r.zScale;const n=t.translate,i=e.translate;return n.xTranslate=i.xTranslate,n.yTranslate=i.yTranslate,n.mTranslate=i.mTranslate,n.zTranslate=i.zTranslate,t}(r.transform);const p=n.fields,c=n.fieldNameToAttributeIndexMap,y=r.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),s=O(t);p.push(s),c[s.name]=e,t.delete()}y.delete();const f=n.values,_=r.values_count();for(let e=0;e<_;e++)f.push(r.get_value_at(e));const b=n.features,w=r.features,I=w.size();if(I>0)for(const e of E)if(void 0===c[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<I;e++){const t=new T,s=w.get(e),r=t.attributes,n=s.attributes_count();for(let e=0;e<n;e++)r.push(s.get_attribute_at(e));const i=s.get_compressed_geometry();i&&(t.compressedGeometry=D(i),t.centroid=D(s.get_centroid()));const o=t.aggregateGeometries,a=s.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),s=D(t);o.push(s),t.delete()}a.delete(),b.push(t),s.delete()}w.delete();const v=n.geometryFields,M=r.geometry_fields,A=M.size();for(let e=0;e<A;e++){const t=M.get(e),s=B(t);v.push(s),t.delete()}return M.delete(),t}function D(e){const t=new I;t.geometryType=R.bV[e.geometry_type.value];const s=[],r=[];for(let t=0;t<e.lengths.length;t++)s.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)r.push(e.coords[t]);return t.lengths=s,t.coords=r,t}function O(e){const t=new w;return t.name=e.name,t.alias=e.alias,t.fieldType=R.r5[e.field_type.value],t.sqlType=S[e.sql_type.value],t.domain=e.domain,t.defaultValue=e.default_value,t}function B(e){const t=O(e);return t.geometryType=R.bV[e.geometry_type.value],t}function F(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}async function j(e,t){const s=[],r=function(e,t){const s=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&s.set(e.name,[]);for(const t of e)s.has(t.typeName)&&s.get(t.typeName)?.push(t.id);return s}(e,t),n={},i=[];for(const[e,t]of r){if(t.length<1)continue;const s=`${e}_ids`;n[s]=t,i.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${s} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===i.length)return[];const o=i.join(" UNION "),a=new u.A({openCypherQuery:o,bindParameters:n}),l=(await(0,d.executeQueryStreaming)(t,a)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(const e of t)s.push({id:e[0],typeName:e[1]}),s.push({id:e[2],typeName:e[3]})}return s}async function P(e,t){t??=!1;const s={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,n.A)(e,{responseType:"array-buffer"}),s=await t.data;return async function(e){const t=new((await(0,L.I)()).MapOfObjectIdentifierSetsDecoder),s=t.decode(new Uint8Array(e)),r=new Map;if(0!==s.error_code)throw new i.A("knowledge-graph:layer-support-utils",s.error_message);const n=t.get_map_of_identifier_sets(),o=n.keys,a=o.size();for(let e=0;e<a;e++){const t=o.get(e),s=n.query_identifier_set(t),a=[];if(s.id_array_type.value===N.GLOBALID_ARRAY){const e=s.get_globalid_array(),t=e.count();for(let s=0;s<t;s++)a.push(e.get_globalid_at(s))}else if(s.id_array_type.value===N.IDENTIFIER_ARRAY){const e=s.get_identifier_array(),t=e.count();for(let s=0;s<t;s++)a.push(e.get_identifier_at(s).toString())}else if(s.id_array_type.value===N.STRING_ARRAY){const e=s.get_string_array(),t=e.count();for(let s=0;s<t;s++)a.push(e.get_string_at(s))}else{if(s.id_array_type.value!==N.OID_ARRAY)throw new i.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=s.get_oid_array(),t=e.count();for(let s=0;s<t;s++)a.push(e.get_objectid_at(s).toString())}}r.set(t,a)}return t.delete(),r}(new Uint8Array(s))}(e).then((e=>{!function(e,t){for(const[s,r]of e){const e=(0,o.tE)(t.namedTypeDefinitions,s,(()=>({useAllData:!1,members:new Map})));for(const t of r)e.members.has(t)||e.members.set(t,{id:t})}}(e,s)})),s}async function q(e){const t=await(0,L.I)(),s=new t.MapOfObjectIdentifierSets;!function(e,t,s){for(const[r,n]of s.namedTypeDefinitions){if(!n.members||n.useAllData)continue;const s=n.members.keys();let i=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,d=new t.GlobalIdArray,u=new t.IdentifierArray,p=new t.ObjectIdentifierSet;for(const e of s)o&&(i=!isNaN(Number(e)),o=!1),i?a.add_objectid(Number(e)):(l.add_string(e),d.add_globalid(e)),u.add_identifier(e);p.set_oid_array(a),p.set_string_array(l),p.set_globalid_array(d),p.set_identifier_array(u),a.delete(),l.delete(),d.delete(),u.delete(),e.put_identifier_set(r,p),p.delete()}}(s,t,e);const r=new t.MapOfObjectIdentifierSetsEncoder;try{r.set_map_of_identifier_sets(s),r.encode();const e=r.get_encoding_result();if(0!==e.error.error_code)throw new i.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return r.delete(),t}finally{s.delete()}}async function G(e){const t=await(0,n.A)(e,{responseType:"array-buffer"});return async function(e){const t=new((await(0,L.I)()).FeatureCollectionDecoder),s=t.decode(new Uint8Array(e));if(0!==s.error_code)throw new i.A("knowledge-graph:layer-support-utils",s.error_message);const r=C(t.get_feature_collection());return t.delete(),r}(await t.data)}function $(e,t){if(!e?.queryResult?.featureResult)return t;const s=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const n of e.queryResult.featureResult.features){const e=n.attributes[s[r.TYPENAME]],i=(0,o.tE)(t.namedTypeDefinitions,e,(()=>({useAllData:!1,members:new Map}))),l=n.attributes[s[r.ELEMENTUID]];if(n.compressedGeometry?.coords?.length>0){let e=n.compressedGeometry.lengths;"esriGeometryPoint"===n.compressedGeometry.geometryType&&(e=[]),i.members.set(l,{id:l,linkChartLocation:new a.A(e,n.compressedGeometry.coords)})}else i.members.set(l,{id:l})}return t}(k=A||(A={}))[k.featureResult=0]="featureResult",k[k.countResult=1]="countResult",k[k.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(x||(x={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(S||(S={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(N||(N={})),s(40863),s(82799),s(94985),s(39829),s(68249),s(86738);const Z={"basic-grid":"SIMPLE","geographic-organic-standard":"GEOGRAPHIC","hierarchical-bottom-to-top":"HIERARCHICAL","hierarchical-top-to-bottom":"HIERARCHICAL","organic-community":"COMMUNITY","organic-fusiform":"FORCE_DIRECTED","organic-leaf-circle":"FORCE_DIRECTED","organic-standard":"FORCE_DIRECTED","radial-node-centric":"RADIAL_TREE","radial-root-centric":"RADIAL_TREE","tree-bottom-to-top":"SMART_TREE","tree-left-to-right":"SMART_TREE","tree-right-to-left":"SMART_TREE","tree-top-to-bottom":"SMART_TREE","chronological-mono-timeline":"CHRONOLOGICAL_SINGLE","chronological-multi-timeline":"CHRONOLOGICAL_MULTIPLE"},U=e=>Z[e],H=(e,t)=>{const s=e?.chronologicalLayoutSettings,r=e?.organicLayoutSettings;return{chronologicalLayoutSettings:null!==s?s:void 0,organicLayoutSettings:r?{idealEdgeLengthType:"absolute-value"===r.idealEdgeLengthType?l.x.ABSOLUTE:l.x.MULTIPLIER,repulsionRadiusMultiplier:r.autoRepulsionRadius?void 0:r.repulsionRadiusMultiplier,idealEdgeLength:null==r.idealEdgeLengthType?void 0:"absolute-value"===r.idealEdgeLengthType?r.absoluteIdealEdgeLength:r.multiplicativeIdealEdgeLength,computationBudgetTime:t}:void 0}},Y={fetchAndConvertSerializedLinkChart:e=>async function(e){const t=[],s={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&t.push(G(e.entitiesUrl).then((e=>{$(e,s)}))),e.relationshipsUrl&&t.push(G(e.relationshipsUrl).then((e=>{$(e,s)}))),await Promise.all(t),s}(e)}},32756:(e,t,s)=>{s.d(t,{f:()=>d,n:()=>l});var r=s(90237),n=s(93637),i=s(10107),o=(s(44208),s(53966),s(87811),s(40608)),a=s(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,s){if(!e)return null;const r=e.find((e=>!!e.field));if(!r)return null;const n=new a.A;return n.read(r,s),[n]}},write:{writer:function(e,t,s,r){const i=e.find((e=>!!e.field));i&&(0,n.sM)(s,[i.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},91880:(e,t,s)=>{s.d(t,{A:()=>p});var r,n=s(90237),i=s(66552),o=s(25482),a=s(10107),l=(s(44208),s(53966),s(87811),s(40608));const d=new i.J({asc:"ascending",desc:"descending"});let u=r=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],u.prototype,"order",void 0),u=r=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],u);const p=u},4071:(e,t,s)=>{s.d(t,{$:()=>r,P:()=>n});const r={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:r,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},8460:(e,t,s)=>{s.d(t,{$C:()=>m,Hh:()=>o,J:()=>l,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>_,pM:()=>h,tx:()=>a,vJ:()=>f});var r=s(2741);let n,i=null;function o(){return n||(n=s.e(3666).then(s.bind(s,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,r.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),n)}var a,l,d,u,p,h,c,y,m,f,g,_,b,w;function T(e){const t=Object.keys(d).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection),s=Object.keys(u).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.eventsTicksVisualization);return{timeDirection:{value:t>-1?t:d.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:s>-1?s:u.startAndEnd},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function I(e,t,s,r,n,o){const a=s.length,l=n.length,d=Float64Array.BYTES_PER_ELEMENT,u=Uint32Array.BYTES_PER_ELEMENT,p=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(p+2*d)+l*(2*u),c=i._malloc(h);try{const p=c+16-c%16,h=p+a*d,y=h+a*d,m=y+l*u,f=m+l*u,g=()=>[i.HEAPF64.subarray(p>>3,(p>>3)+a),i.HEAPF64.subarray(h>>3,(h>>3)+a),i.HEAPU32.subarray(y>>2,(y>>2)+l),i.HEAPU32.subarray(m>>2,(m>>2)+l),i.HEAPU8.subarray(f,f+a)],[_,b,w,T,I]=g();_.set(s),b.set(r),w.set(n),T.set(o),I.set(t);let E=e(a,f,p,h,l,y,m),v=null,M=null;if(E){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),s=i.getLayoutLinksVertices(),r=i.countLayoutLinksVertices();!l||e&&t?r&&!s?E=!1:(v={types:new Uint8Array(i.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(i.HEAPF64.subarray(s>>3,(s>>3)+2*r))},M=i.getAuxiliaryGraphicElements()):E=!1}const[A,x,S,N,k]=g();return s.set(A),r.set(x),n.set(S),o.set(N),t.set(k),{success:E,links:v,graphics:M}}finally{i._free(c),i.cleanupLayout()}}(p=a||(a={}))[p.None=0]="None",p[p.IsMovable=1]="IsMovable",p[p.IsGeographic=2]="IsGeographic",p[p.IsRoot=4]="IsRoot",p[p.IsOld=8]="IsOld",function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(l||(l={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(d||(d={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(u||(u={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,s,r,n,o=2,a=1,l=-1){return I(((e,t,s,r,n,d,u)=>i.applyForceDirectedLayout(e,t,s,r,n,d,u,o,a,l)),e,t,s,r,n)}}(h||(h={})),function(e){e.apply=function(e,t,s,r,n,o=2,a=1,l=-1){return I(((e,t,s,r,n,d,u)=>i.applyCommunityLayout(e,t,s,r,n,d,u,o,a,l)),e,t,s,r,n)}}(c||(c={})),function(e){e.apply=function(e,t,s,r,n){return I(i.applySimpleLayout,e,t,s,r,n)}}(y||(y={})),function(e){e.apply=function(e,t,s,r,n){return I(i.applyHierarchicalLayout,e,t,s,r,n)}}(m||(m={})),function(e){e.apply=function(e,t,s,r,n){return I(i.applyRadialTreeLayout,e,t,s,r,n)}}(f||(f={})),function(e){e.apply=function(e,t,s,r,n){return I(i.applySmartTreeLayout,e,t,s,r,n)}}(g||(g={})),function(e){e.apply=function(e,t,s,r,n,o,a,l,p,h,c){const y={timeDirection:d.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:u.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return I(((e,t,s,o,a,d,u)=>{if(r.length!==e)return!1;if(n.length!==e)return!1;if(l.length!==a)return!1;if(p.length!==a)return!1;const m=Float64Array.BYTES_PER_ELEMENT,f=16,g=i._malloc(f+e*m),_=i._malloc(f+e*m),b=i._malloc(f+a*m),w=i._malloc(f+a*m),I=g+f-g%f,E=_+f-_%f,v=b+f-b%f,M=w+f-w%f;try{i.HEAPF64.subarray(I>>3,(I>>3)+e).set(r),i.HEAPF64.subarray(E>>3,(E>>3)+e).set(n),i.HEAPF64.subarray(v>>3,(v>>3)+a).set(l),i.HEAPF64.subarray(M>>3,(M>>3)+a).set(p);const m=T(Object.assign(y,c));return i.applyChronologicalLayout(e,t,s,o,I,E,a,d,u,v,M,h,m)}finally{i._free(g),i._free(_),i._free(b),i._free(w)}}),e,t,s,o,a)}}(_||(_={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(b||(b={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(w||(w={}))},25927:(e,t,s)=>{s.d(t,{A:()=>d});var r=s(90237),n=(s(59456),s(10107)),i=(s(44208),s(53966),s(87811),s(40608)),o=s(54238),a=s(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,r._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const d=l},54238:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(90237),n=s(10107),i=(s(44208),s(53966),s(87811),s(40608)),o=s(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,r._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,s)=>{s.d(t,{A:()=>l});var r=s(90237),n=s(25482),i=s(10107),o=(s(44208),s(53966),s(87811),s(40608));let a=class extends n.oY{constructor(e){super(e),this.properties=null}};(0,r._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,r._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,s)=>{s.d(t,{A:()=>u});var r=s(90237),n=s(10107),i=(s(44208),s(53966),s(87811),s(40608)),o=s(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,r._)([(0,n.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let d=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,r._)([(0,n.MZ)()],d.prototype,"bindParameters",void 0),(0,r._)([(0,n.MZ)()],d.prototype,"bindGeometryQuantizationParameters",void 0),(0,r._)([(0,n.MZ)()],d.prototype,"outputQuantizationParameters",void 0),(0,r._)([(0,n.MZ)()],d.prototype,"outputSpatialReference",void 0),(0,r._)([(0,n.MZ)()],d.prototype,"provenanceBehavior",void 0),d=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],d);const u=d},40662:(e,t,s)=>{s.d(t,{A:()=>a});var r=s(90237),n=(s(53966),s(44208),s(87811),s(49186),s(40608)),i=s(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,r._)([(0,n.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,s)=>{s.d(t,{A:()=>d});var r=s(90237),n=s(25482),i=s(10107),o=(s(44208),s(53966),s(87811),s(40608)),a=s(77901);let l=class extends n.oY{constructor(e){super(e),this.path=null}};(0,r._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,r._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const d=l},23150:(e,t,s)=>{s.d(t,{A:()=>d});var r=s(90237),n=(s(59456),s(10107)),i=(s(44208),s(53966),s(87811),s(40608)),o=s(54238),a=s(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,r._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,r._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,r._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const d=l}}]);