@arcgis/core 5.0.0-next.45 → 5.0.0-next.47

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 (332) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/063045ac5553e91c0c4c.js +1 -0
  3. package/assets/esri/core/workers/chunks/{20ad34f9d45c64392022.js → 08c1ea29678da27136f3.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{5dc2f2e28c30386efadf.js → 10094eb2b94e98dd4a8a.js} +1 -1
  5. package/assets/esri/core/workers/chunks/108675a17e432a02cf66.js +1 -0
  6. package/assets/esri/core/workers/chunks/169be08394c5e7703628.js +1 -0
  7. package/assets/esri/core/workers/chunks/19270a2de33f2662005b.js +1 -0
  8. package/assets/esri/core/workers/chunks/1a6f3531ef3d671e0289.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b809d499ff050976d9ed.js → 1c58064ea80e6a4a4a3b.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1c816aff8613d1e4bf38.js +1 -0
  11. package/assets/esri/core/workers/chunks/{ee67c8a7c1f8b482cd99.js → 1ced78750c61600b2d4e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{c5d6b416baf24e74b9ba.js → 1dfa949cc4f4c18ed4cf.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{98175b454e807b1a3c5f.js → 1e152a34e368bd810a0f.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1e17ad6cdffa5016a3db.js +1 -0
  15. package/assets/esri/core/workers/chunks/1e2d42e9984ed3437ba2.js +1 -0
  16. package/assets/esri/core/workers/chunks/2008b22f76071a2dde4e.js +1 -0
  17. package/assets/esri/core/workers/chunks/2107c93d1fe87f3b8dfa.js +1 -0
  18. package/assets/esri/core/workers/chunks/2209550b6510e25da375.js +1 -0
  19. package/assets/esri/core/workers/chunks/229e1ed4282005aa0b83.js +1 -0
  20. package/assets/esri/core/workers/chunks/22b8eaa6afab0e5ffc47.js +1 -0
  21. package/assets/esri/core/workers/chunks/{1c0fb4795a52204882a8.js → 2550d2ba935cfdf30236.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{49e6219dd08cb6c27023.js → 273ac1066095d63d6a6f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/2e2867bc66c94aba7dc7.js +1 -0
  24. package/assets/esri/core/workers/chunks/{cda5c95fd49b8901f7d4.js → 3298e96d3f2e49e338d2.js} +1 -1
  25. package/assets/esri/core/workers/chunks/34613b288cf174983f8b.js +1 -0
  26. package/assets/esri/core/workers/chunks/{e5baa30944061418cb13.js → 35f086a2ae0585348ae6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{f441fc74451330384fb0.js → 37ea150dec5e491f691e.js} +1 -1
  28. package/assets/esri/core/workers/chunks/3c94db7ecdcd38eeb1b1.js +1 -0
  29. package/assets/esri/core/workers/chunks/3f7749f06ae54a4437d9.js +1 -0
  30. package/assets/esri/core/workers/chunks/404229f10aef5ac23c87.js +1 -0
  31. package/assets/esri/core/workers/chunks/40a722933af28823953b.js +1 -0
  32. package/assets/esri/core/workers/chunks/{7aa730e5ac7b268e3c98.js → 424daef7b5dec1b99aba.js} +1 -1
  33. package/assets/esri/core/workers/chunks/456684b1c1417ed0e611.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d14e75b160aa432233c6.js → 461093ce28ceadd7853d.js} +1 -1
  35. package/assets/esri/core/workers/chunks/46b63a65484b102e9ccb.js +1 -0
  36. package/assets/esri/core/workers/chunks/4a48b8ec5f3f2fd139b5.js +1 -0
  37. package/assets/esri/core/workers/chunks/4b084f985bc4100e7aec.js +1 -0
  38. package/assets/esri/core/workers/chunks/4b1de1fcd13677b615a8.js +1 -0
  39. package/assets/esri/core/workers/chunks/{31186e83fe009aa0fd36.js → 4d933de84afb2e3b7d18.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{83aa39fbb1fad3b9d143.js → 4ff771942531fb2755c4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{e0017c6739d2532793e6.js → 513a4ef960e27500f986.js} +1 -1
  42. package/assets/esri/core/workers/chunks/56b693baa376bb990925.js +1 -0
  43. package/assets/esri/core/workers/chunks/{1d4ea8db272655c0608c.js → 57fd5e1260269002d18a.js} +1 -1
  44. package/assets/esri/core/workers/chunks/5fe40bb0e9ab333f6854.js +1 -0
  45. package/assets/esri/core/workers/chunks/{9f6c63a580b28ab715bd.js → 5ffeb8fb58d59bad68c3.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{b56c07c0b43cb1999070.js → 60362c5651ef41fa7e5f.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{e8a9971c8354569cb81d.js → 609919428305d8c8c243.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{ab88577987cf2fe1cb32.js → 61373d2fa7e7638d3395.js} +1 -1
  49. package/assets/esri/core/workers/chunks/6202922b1c2637e9aaa5.js +1 -0
  50. package/assets/esri/core/workers/chunks/633368ae6fbb46373328.js +1 -0
  51. package/assets/esri/core/workers/chunks/657602e6a84e8b4576fb.js +1 -0
  52. package/assets/esri/core/workers/chunks/6d3ae7969ea86a2e0b13.js +1 -0
  53. package/assets/esri/core/workers/chunks/6d702cb26cef46a76963.js +1 -0
  54. package/assets/esri/core/workers/chunks/{35272810c2ed04eb403d.js → 6f3943bebe2d5f4994f7.js} +1 -1
  55. package/assets/esri/core/workers/chunks/708aba69a1870ea41a61.js +1 -0
  56. package/assets/esri/core/workers/chunks/{7ba13b52fce1060fbb2a.js → 7147fc7502b385b302b2.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{9ba8a2e1c0fb4e1efc7c.js → 7364fb5e99933533890d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/74b1028e95f7cfff387b.js +1 -0
  59. package/assets/esri/core/workers/chunks/75d8244b725a2aee2003.js +1 -0
  60. package/assets/esri/core/workers/chunks/78fccea3445fb2f9120a.js +1 -0
  61. package/assets/esri/core/workers/chunks/7ba31425caa404f86424.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a4f492aa5444e6381063.js → 7d631ebf8f79225cf0f6.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{040f3d8e1099c4843390.js → 81a60dfa600b690098f9.js} +1 -1
  64. package/assets/esri/core/workers/chunks/833fd2bc42c5cb459084.js +1 -0
  65. package/assets/esri/core/workers/chunks/{75643711d9585ee26a15.js → 83c8e5a92d8d6193cb32.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{e537e1d37f3fcb14fce2.js → 870022661376442411e4.js} +1 -1
  67. package/assets/esri/core/workers/chunks/898ab7db220e81e921c6.js +1 -0
  68. package/assets/esri/core/workers/chunks/{31b074ae2162a3508d2a.js → 8b578ffc3a83089aa782.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{48c8ef4170e803a564d6.js → 8b75861196d1ce5cba63.js} +1 -1
  70. package/assets/esri/core/workers/chunks/8be61e13530fd0dc2fd1.js +1 -0
  71. package/assets/esri/core/workers/chunks/90b8ccee883738917a6d.js +1 -0
  72. package/assets/esri/core/workers/chunks/90bc9c299ae0e8b8b5e5.js +1 -0
  73. package/assets/esri/core/workers/chunks/91d9ade78854f40a962d.js +1 -0
  74. package/assets/esri/core/workers/chunks/9319d57494482668ab19.js +1 -0
  75. package/assets/esri/core/workers/chunks/{74881340e040bfd0580f.js → 934bc1028b287f8df4aa.js} +1 -1
  76. package/assets/esri/core/workers/chunks/96055de47831e59a28bf.js +1 -0
  77. package/assets/esri/core/workers/chunks/963ba863e0f87abfca25.js +1 -0
  78. package/assets/esri/core/workers/chunks/9aa8d60483ad905fe13b.js +1 -0
  79. package/assets/esri/core/workers/chunks/9fed9946241bb2a5cfa4.js +1 -0
  80. package/assets/esri/core/workers/chunks/a2662e98857f0abf8e82.js +1 -0
  81. package/assets/esri/core/workers/chunks/a5a9b0a35849b9f2e86d.js +1 -0
  82. package/assets/esri/core/workers/chunks/a60006c9ccf6817fc0d2.js +1 -0
  83. package/assets/esri/core/workers/chunks/a627b7eb94b7fca33210.js +1 -0
  84. package/assets/esri/core/workers/chunks/a651dc3b8f1fc1ab34cc.js +1 -0
  85. package/assets/esri/core/workers/chunks/{bf5f9da0837ed09729c6.js → aab93e885b6c7c6aa76e.js} +1 -1
  86. package/assets/esri/core/workers/chunks/adfe28c1c1619cdd3ca1.js +1019 -0
  87. package/assets/esri/core/workers/chunks/b88dc7d8ae105747e6a4.js +1 -0
  88. package/assets/esri/core/workers/chunks/b90c786dd474ea1a409c.js +1 -0
  89. package/assets/esri/core/workers/chunks/b92e9e5df8154a128982.js +1 -0
  90. package/assets/esri/core/workers/chunks/{9a855a10798348a21bab.js → bff814d34b38ec80c44d.js} +1 -1
  91. package/assets/esri/core/workers/chunks/c36d699a75b6e8fb93eb.js +1 -0
  92. package/assets/esri/core/workers/chunks/c50fdf723f2d4316862e.js +1 -0
  93. package/assets/esri/core/workers/chunks/{9461cc37ab3397265270.js → c5e8ff4721b15ac3c6eb.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{4cda42b94e9cb58dd372.js → ca61077e0a598654f33f.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{61a9ffd4cf07d8bb7a9b.js → ca81be5bdb88ef557bf3.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{ca1c65eb7f5900c60170.js → cd8fec3500e6503ae020.js} +1 -1
  97. package/assets/esri/core/workers/chunks/ce90e8489143228262e7.js +1 -0
  98. package/assets/esri/core/workers/chunks/d0320ca67abca4f8b0d2.js +1 -0
  99. package/assets/esri/core/workers/chunks/{4b6a44c6265c8959abd8.js → d3db7244fac7398cc700.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{19820cddba13a3585c0b.js → d561624ddb9388732b25.js} +1 -1
  101. package/assets/esri/core/workers/chunks/d65ca3b8fccae8c3c3fa.js +1 -0
  102. package/assets/esri/core/workers/chunks/{630eba99f48ea79a9560.js → d705410c369bd03b1875.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{9c7682b300b877f60095.js → d76513a6260d9ec4ea25.js} +1 -1
  104. package/assets/esri/core/workers/chunks/d82e17522ed946c2d809.js +1 -0
  105. package/assets/esri/core/workers/chunks/d8dc130ea559be1f68c6.js +1 -0
  106. package/assets/esri/core/workers/chunks/dae715b2b0094641e42f.js +1 -0
  107. package/assets/esri/core/workers/chunks/{768ae52b4e5c3e571ef5.js → dc29cb16704e2e4d0a46.js} +1 -1
  108. package/assets/esri/core/workers/chunks/e8c2e2fbe9cef4c8a8c6.js +1 -0
  109. package/assets/esri/core/workers/chunks/ecb4c223c0278971cdc9.js +1 -0
  110. package/assets/esri/core/workers/chunks/{3f33708eb39c7169a226.js → f2ba50eb29f93df885d6.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{6e5d41f51572e3e7cf92.js → f7163048146ddaedfc36.js} +1 -1
  112. package/assets/esri/core/workers/chunks/f92a78ce5510e0d0d0f7.js +1 -0
  113. package/assets/esri/core/workers/chunks/fa92a7c11befbad8739f.js +1 -0
  114. package/assets/esri/core/workers/chunks/fdaa10a588db394e2f65.js +1 -0
  115. package/chunks/Laserlines.glsl.js +1 -1
  116. package/chunks/boundedPlane.js +1 -1
  117. package/chunks/cameraUtilsSpherical.js +1 -1
  118. package/chunks/vec32.js +1 -1
  119. package/config.js +1 -1
  120. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  121. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  122. package/geometry/FlatGeometry.js +1 -1
  123. package/geometry/operators/support/apiConverter.js +1 -1
  124. package/geometry/operators/support/jsonConverter.js +1 -1
  125. package/geometry/support/curves/circleUtils.js +1 -1
  126. package/geometry/support/lineSegment.js +1 -1
  127. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  128. package/geometry/support/meshUtils/merge.js +1 -1
  129. package/geometry/support/sphere.js +1 -1
  130. package/interfaces.d.ts +179 -71
  131. package/kernel.js +1 -1
  132. package/layers/ParquetLayer.js +1 -1
  133. package/layers/VoxelWasmPerSceneView.js +1 -1
  134. package/layers/graphics/sources/ParquetSource.js +1 -1
  135. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  136. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  137. package/layers/support/{ParquetEncodingBase.js → ParquetGeometryEncodingBase.js} +1 -1
  138. package/layers/support/ParquetGeometryEncodingLocation.d.ts +4 -0
  139. package/layers/support/ParquetGeometryEncodingLocation.js +5 -0
  140. package/layers/support/ParquetGeometryEncodingWkb.d.ts +4 -0
  141. package/layers/support/ParquetGeometryEncodingWkb.js +5 -0
  142. package/layers/support/parquetEncodingUtils.js +1 -1
  143. package/layers/support/parquetUtils.js +1 -1
  144. package/layers/support/tiles3DUtils.js +1 -1
  145. package/layers/voxel/VoxelVolume.js +1 -1
  146. package/libs/parquet/parquet.js +1 -1
  147. package/package.json +2 -2
  148. package/support/revision.js +1 -1
  149. package/symbols/cim/effects/EffectSuppress.js +1 -1
  150. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  151. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  152. package/views/2d/interactive/SegmentLabels2D.js +1 -1
  153. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  154. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  155. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  156. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  157. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  158. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  159. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  160. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  161. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  162. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  163. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  164. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  165. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  166. package/views/3d/camera/constraintUtils/distance.js +1 -1
  167. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  168. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  169. package/views/3d/environment/CloudsParameters.js +1 -1
  170. package/views/3d/environment/EnvironmentManager.js +1 -1
  171. package/views/3d/environment/MarsAtmosphere.js +1 -1
  172. package/views/3d/glTF/internal/Resource.js +1 -1
  173. package/views/3d/glTF/loader.js +1 -1
  174. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  175. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  176. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  177. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  178. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  180. package/views/3d/layers/I3SMeshView3D.js +1 -1
  181. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  182. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  184. package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
  185. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  186. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  187. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  188. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  189. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  190. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  191. package/views/3d/state/Frustum.js +1 -1
  192. package/views/3d/state/controllers/FovController.js +1 -1
  193. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  194. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  195. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  196. package/views/3d/support/cameraUtils.js +1 -1
  197. package/views/3d/support/intersectionUtils.js +1 -1
  198. package/views/3d/support/orientedBoundingBox.js +1 -1
  199. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  200. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  201. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  202. package/views/3d/support/viewpointUtils.js +1 -1
  203. package/views/3d/terrain/OverlayManager.js +1 -1
  204. package/views/3d/terrain/PatchRenderData.js +1 -1
  205. package/views/3d/terrain/SphericalPatch.js +1 -1
  206. package/views/3d/terrain/Tile.js +1 -1
  207. package/views/3d/webgl/RenderCamera.js +1 -1
  208. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  209. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  210. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  211. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  212. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  213. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  214. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  215. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  216. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  217. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  218. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  219. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  220. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  221. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  222. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  223. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  224. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  225. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  226. package/views/SelectionManager.js +1 -1
  227. package/views/draw/support/Reshape.js +1 -1
  228. package/views/interactive/GraphicManipulator.js +1 -1
  229. package/views/interactive/coordinateHelper.js +1 -1
  230. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  231. package/views/interactive/sketch/constraints.js +1 -1
  232. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  233. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  234. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  235. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  236. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  237. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  238. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  239. package/views/support/geometry3dUtils.js +1 -1
  240. package/views/support/selectionUtils.js +1 -1
  241. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  242. package/widgets/BatchAttributeForm/css.js +1 -1
  243. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.d.ts +4 -0
  244. package/widgets/BatchAttributeForm/inputs/SingleFeatureInput.js +5 -0
  245. package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +4 -0
  246. package/widgets/BatchAttributeForm/inputs/TextElementInput.js +5 -0
  247. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  248. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  249. package/widgets/BatchAttributeForm/templates/GroupElementTemplate.js +1 -1
  250. package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +5 -0
  251. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  252. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  253. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  254. package/widgets/BatchAttributeForm.js +1 -1
  255. package/widgets/Editor/support/SketchController.js +1 -1
  256. package/widgets/FeatureForm/TextElementInput.d.ts +2 -2
  257. package/widgets/FeatureForm/TextElementInput.js +1 -1
  258. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  259. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  260. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  261. package/widgets/OrientedImageryViewer.js +1 -1
  262. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  263. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  264. package/widgets/PanoramicViewer/PanoramicZoomManager.js +1 -1
  265. package/widgets/PanoramicViewer/support/PanoramicMedia.js +5 -0
  266. package/widgets/PanoramicViewer/support/PanoramicMediaCollection.js +5 -0
  267. package/widgets/PanoramicViewer/support/PanoramicMediaError.js +5 -0
  268. package/widgets/PanoramicViewer/utils.js +1 -1
  269. package/widgets/PanoramicViewer.js +1 -1
  270. package/widgets/Search/SearchViewModel.js +1 -1
  271. package/widgets/Search.js +1 -1
  272. package/widgets/Sketch.js +1 -1
  273. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  274. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  275. package/assets/esri/core/workers/chunks/024104997daea0d74b38.js +0 -1
  276. package/assets/esri/core/workers/chunks/04a0685ee53ef74883aa.js +0 -1
  277. package/assets/esri/core/workers/chunks/08ef90e3fcfd4eda4301.js +0 -1
  278. package/assets/esri/core/workers/chunks/1e0e7cef7ef947894bbe.js +0 -1019
  279. package/assets/esri/core/workers/chunks/20988e116f3723228f36.js +0 -1
  280. package/assets/esri/core/workers/chunks/2613e482450b57f2d4f5.js +0 -1
  281. package/assets/esri/core/workers/chunks/274f2b5e6dbc58505142.js +0 -1
  282. package/assets/esri/core/workers/chunks/27dfbe3d903b95d4c67a.js +0 -1
  283. package/assets/esri/core/workers/chunks/28a5a7c6b3d6902146f6.js +0 -1
  284. package/assets/esri/core/workers/chunks/2c4218306747f5d15575.js +0 -1
  285. package/assets/esri/core/workers/chunks/2d3ae187f8aa3495d4ae.js +0 -1
  286. package/assets/esri/core/workers/chunks/2db7a7607657f1d669f7.js +0 -1
  287. package/assets/esri/core/workers/chunks/2f8cf7d9ff1f4de19a4c.js +0 -1
  288. package/assets/esri/core/workers/chunks/338570424337be05cef5.js +0 -1
  289. package/assets/esri/core/workers/chunks/36130910ba141f34531b.js +0 -1
  290. package/assets/esri/core/workers/chunks/3767617c0dfc7d801441.js +0 -1
  291. package/assets/esri/core/workers/chunks/44b6b7418cbf7f778bef.js +0 -1
  292. package/assets/esri/core/workers/chunks/4675ed3ca3e0104d00bf.js +0 -1
  293. package/assets/esri/core/workers/chunks/4df7cc3477bc46fc39af.js +0 -1
  294. package/assets/esri/core/workers/chunks/538ddb267aa328814865.js +0 -1
  295. package/assets/esri/core/workers/chunks/555a0ea44ba77819d493.js +0 -1
  296. package/assets/esri/core/workers/chunks/55818fe7a7aa1e5c8bbd.js +0 -1
  297. package/assets/esri/core/workers/chunks/59889855d23baec1adf9.js +0 -1
  298. package/assets/esri/core/workers/chunks/5f781ef46ce7c4048c2f.js +0 -1
  299. package/assets/esri/core/workers/chunks/60f2de8dd8876bfd715a.js +0 -1
  300. package/assets/esri/core/workers/chunks/679088064420a906aa7f.js +0 -1
  301. package/assets/esri/core/workers/chunks/706423d801fa9cbf2e90.js +0 -1
  302. package/assets/esri/core/workers/chunks/71dd80231ea656a6380c.js +0 -1
  303. package/assets/esri/core/workers/chunks/725819839434c59102f3.js +0 -1
  304. package/assets/esri/core/workers/chunks/72cebf18da5ec5eeb666.js +0 -1
  305. package/assets/esri/core/workers/chunks/768d9b6eaba7bfa18dde.js +0 -1
  306. package/assets/esri/core/workers/chunks/77b45957cfe42523c1c8.js +0 -1
  307. package/assets/esri/core/workers/chunks/852de585a72d902344a6.js +0 -1
  308. package/assets/esri/core/workers/chunks/871dd5e1f016a04b8d98.js +0 -1
  309. package/assets/esri/core/workers/chunks/892c417f5130b003889d.js +0 -1
  310. package/assets/esri/core/workers/chunks/8d4cc5f1d07b4aa3aea0.js +0 -1
  311. package/assets/esri/core/workers/chunks/907083c427d7fb4354e9.js +0 -1
  312. package/assets/esri/core/workers/chunks/93c5f097bb7b380bb175.js +0 -1
  313. package/assets/esri/core/workers/chunks/9f0172b83f25ef5f8d40.js +0 -1
  314. package/assets/esri/core/workers/chunks/a00bba1c7cbf8cd7892c.js +0 -1
  315. package/assets/esri/core/workers/chunks/a34a14fd989dbbd3c2d0.js +0 -1
  316. package/assets/esri/core/workers/chunks/ae793d814cf32db9fbde.js +0 -1
  317. package/assets/esri/core/workers/chunks/b21cf62652ca772108c8.js +0 -1
  318. package/assets/esri/core/workers/chunks/c5c02ace54fe4ab9214b.js +0 -1
  319. package/assets/esri/core/workers/chunks/c82a974c8448407885e6.js +0 -1
  320. package/assets/esri/core/workers/chunks/d0014b4a8c013f59b113.js +0 -1
  321. package/assets/esri/core/workers/chunks/d08ee45c501102deea20.js +0 -1
  322. package/assets/esri/core/workers/chunks/d239a4ef60e348cfb05a.js +0 -1
  323. package/assets/esri/core/workers/chunks/da2ba40bc017bff0fe49.js +0 -1
  324. package/assets/esri/core/workers/chunks/dc3a4ad62bc041a4f899.js +0 -1
  325. package/assets/esri/core/workers/chunks/e093e745708f722bc1b9.js +0 -1
  326. package/assets/esri/core/workers/chunks/e501d68a1464805c4b4e.js +0 -1
  327. package/assets/esri/core/workers/chunks/e6784251bbb8b71ead93.js +0 -1
  328. package/assets/esri/core/workers/chunks/f3c232fc56a29d51196a.js +0 -1
  329. package/layers/support/ParquetEncodingLocation.d.ts +0 -4
  330. package/layers/support/ParquetEncodingLocation.js +0 -5
  331. package/layers/support/ParquetEncodingWkb.d.ts +0 -4
  332. package/layers/support/ParquetEncodingWkb.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2168],{330:(e,t,i)=>{function s(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 n=[];if(t){const r=s(e,i);for(let e=0;e<r.length;e++)s(r[e],t).forEach(e=>n.push(e));return n}const r=e.getElementsByTagNameNS("*",i);if(!r||0===r.length)return[];for(let e=0;e<r.length;e++)n.push(r[e]||r.item(e));return n}function n(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 r=s(e,i);return r.length>0?t?n(r[0],t):r[0]:null}function r(e,t=null){const i=t?n(e,t):e;let s;return i?(s=i.textContent||i.nodeValue,s?s.trim():null):null}function o(e,t){const i=s(e,t),n=[];let r;for(let e=0;e<i.length;e++)r=i[e].textContent||i[e].nodeValue,r&&(r=r.trim(),""!==r&&n.push(r));return n}function l(e,t=null){const i=r(e,t);return i?.split(" ").map(e=>Number(e))??[]}function a(e,t){return o(e,t).map(e=>Number(e))}function c(e,t){const i=r(e,t);return Number(i)}function u(e,t){const i=e?.nodeName?.toLowerCase(),s=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===s}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>o,IC:()=>s,Ui:()=>a,V6:()=>n,g7:()=>u,mX:()=>r,pN:()=>l,v7:()=>c,vv:()=>h})},563:(e,t,i)=>{i.d(t,{QueueProcessor:()=>c,SharedConcurrency:()=>h});var s=i(97768),n=i(74887),r=i(9775),o=i(32587),l=i(76030),a=i(44794);class c{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,a.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??d,this._queue=new r.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,i)=>e(i))}_get(e){const t=this._deferreds.get(e);return t?.promise}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,r=(0,n.Tw)(),o=t?(0,n.u7)(t,()=>s.abort()):null,l=(0,n.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),a(),r.reject((0,n.NK)())}),a=()=>{l.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,r),this._controllers.set(e,s),r.promise.then(a,a),this._queue.push(e),this._scheduleNext(),r.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,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}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)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 u(e,i);this._processingItems.set(e,s),this.sharedConcurrency.current.value+=1;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)}}class u{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class h{constructor(e){this.limit=e,this.current=(0,a.v)(0)}get full(){return this.current.value>=this.limit}}const d=new h(1/0)},23636:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),n=i(49186),r=i(91429),o=i(39829),l=i(49859),a=i(34930),c=i(47520),u=i(37373),h=i(22671);let d=class extends l.A{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 o=!1;const{interpolation:l}=s,u=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&u&&(o=1===n.length&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:o}),s.requestRawData&&n.length>1&&!this.hasUniqueSourceStorageInfo&&(o=!1,s={...s,requestRawData:!1});const h=n.map(n=>n.fetchPixels(e,t,i,s)),d=await Promise.all(h),p=d.map(e=>e.pixelBlock),f=o||s.requestRawData?d.map(e=>e.srcTilePixelSize):null;if(s.skipRasterFunction||p.every(e=>null==e))return d[0];const m=d.find(e=>null!=e.pixelBlock)?.extent??e;let g=this.rasterJobHandler?await this.rasterJobHandler.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:r});const{transformGrid:y}=d[0];if(!o||null==g||null==y){const e=s.noClip?null:this.getClippingGeometry(m.spatialReference);return!s.noClip&&null!=g&&e&&(g=await(0,a.$Q)(g,m,e)),{...d[0],pixelBlock:g}}const x={rows:y.spacing[0],cols:y.spacing[1]};let _;_=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[g],srcMosaicSize:{width:g.width,height:g.height},destDimension:{width:t,height:i},coefs:y.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:l,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:(0,c.$i)(g,{width:t,height:i},y.coefficients,x,l);const b=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||null==_||null==b||(_=await(0,a.$Q)(_,e,b)),{extent:e,srcExtent:d[0].srcExtent,pixelBlock:_}}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,u.uk)(t,e),this._clippingGeometry.set(i,s)),s}async _open(e){const{rasterFunction:t}=this;t.isRoot=!0,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,r=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(r);const o=i.map(({rasterInfo:e})=>e),l=t.bind({rasterInfos:o,rasterIds:s});if(t.rawSourceRasterInfos=o,!l.success||0===o.length)throw new n.A("raster-function:open",`cannot bind the function: ${l.error??""}`);const a="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===a?.functionName&&(t.rasterInfo.attributeTable=h.A.fromJSON(a.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=o[0];this.hasUniqueSourceStorageInfo=1===o.length||o.slice(1).every(e=>function(e,t){const{storageInfo:i,pixelSize:s,spatialReference:n,extent:r}=e,{storageInfo:o,pixelSize:l,spatialReference:a,extent:c}=t;return s.x===l.x&&s.y===l.y&&n.equals(a)&&r.equals(c)&&i.blockHeight===o.blockHeight&&i.blockWidth===o.blockWidth&&i.maximumPyramidLevel===o.maximumPyramidLevel&&i.firstPyramidLevel===o.firstPyramidLevel&&i.pyramidBlockWidth===o.pyramidBlockWidth&&i.pyramidBlockHeight===o.pyramidBlockHeight&&i.pyramidScalingFactor===o.pyramidScalingFactor}(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,s=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(8411)]).then(i.bind(i,88411)),n=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(3054)]).then(i.bind(i,93054));let r=s.execute(o.A.fromExtent(e),2*(e.width+e.height)/40);r=(0,u.uk)(r,t.spatialReference),t=n.execute(r,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],d.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,r.MZ)()],d.prototype,"tileType",void 0),(0,s.Cg)([(0,r.MZ)()],d.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,r.MZ)()],d.prototype,"primaryRasters",void 0),d=(0,s.Cg)([(0,r.$K)("esri.layers.raster.datasets.FunctionRaster")],d)},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._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._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._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const i of t){if(!this._map.has(i))continue;const t=this._map.get(i),s=e(t,i);s!==t&&this.set(i,s)}})}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},44794:(e,t,i)=>{i.d(t,{v:()=>l});var s=i(4718),n=i(62788),r=i(95488);class o{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 l(e,t=s.gh){return new o(e,t)}},49859:(e,t,i)=>{i.d(t,{A:()=>D});var s=i(31635),n=i(11254),r=i(49186),o=i(25482),l=i(53966),a=i(74887),c=i(563),u=i(91429),h=i(56507),d=i(5443),p=i(86738),f=i(16930),m=i(7548),g=i(4366),y=i(37373);const x=new Map,_=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 b(e,t,i){const s=x.get(e);if(!s)return null==t?_.decreaseRefCount(e,i):0;if(null==t||null==s[t])return _.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=x.get(e);if(!s)return null==t?_.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 _.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 v(e,t,i,s,n=null){const r=x.get(e);if(!r)return void(null==t&&_.putBlock(e,i,s,n));if(null==t||null==r[t])return void _.putBlock(e,i,s,n);const o={refCount:1,block:s,isResolved:!1,isRejected:!1,controller:n};s.then(()=>o.isResolved=!0).catch(()=>o.isRejected=!0),r[t]?.cache.set(i,o)}function I(e,t,i){const s=x.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):_.deleteBlock(e,i):null==t&&_.deleteBlock(e,i)}var R=i(94778),S=i(20758),C=i(47520),k=i(34251),M=i(60694),T=i(10873),A=i(45617),z=i(91806),P=i(20223),F=i(87045);let B=0,D=class extends o.o{constructor(){super(...arguments),this._tileFetchQueue=new c.QueueProcessor({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:F.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,y.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),(0,m.qg)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+B++}set url(e){this._set("url",(0,M.Jf)(e,l.A.getLogger(this)))}async open(e){return this._openPromise??=(0,y.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,s={}){const n=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,o=this.getTileExtentFromTileInfo(e,t,i,n);if(!o)throw new r.A("imagery-tile:out-of-bounds","Level for fetch tile out of range");return s={noClip:!0,...s},this.fetchPixels(o,n.size[0],n.size[1],s)}async identify(e,t={}){e=(0,h.PZ)(p.A,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:s}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:r,multidimensionalInfo:o}=n;let{transposedVariableName:l}=t;const a=null!=o&&r&&(null!=s||(0,g.DY)(i));a&&!l&&(l=null!=i&&i.length>0?i[0].variableName??void 0:o.variables[0].name,t={...t,transposedVariableName:l}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=n,{datumTransformation:f}=t;let x=(0,y._I)(e,c,f);if(!u.intersects(x))return{location:x,value:null};if(null!=n.transform){const e=n.transform.inverseTransform(x);if(!n.nativeExtent.intersects(e))return{location:e,value:null};x=e}let _=0;const b=null!=l&&null!=o&&n.hasMultidimensionalTranspose;if((0,m.qg)(this)){const e=this.primaryRasters.rasters[0];if(b)return e.identify(x,t);const{pixelSize:s}=n,r=3,o=s.x*r/2,l=s.y*r/2,a=new d.A({xmin:x.x-o,xmax:x.x+o,ymin:x.y-l,ymax:x.y+l,spatialReference:c}),u={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:h}=await e.fetchPixels(a,r,r,u),{pixelBlock:p}=await this.fetchPixels(a,r,r,u);if(null==h)return{location:x,value:null};const f=Math.floor(r*r*.5),m=!h.mask||h.mask[f]?h.pixels.map(e=>e[f]):null;let g;return null!=p&&(g=!p.mask||p.mask[f]?p.pixels.map(e=>e[f]):void 0),{location:x,value:m,processedValue:g,pyramidLevel:0}}if(!b)if(t.srcResolution)_=(0,y.t$)(t.srcResolution,n,this.ioConfig.sampling).pyramidLevel;else if(_=await this.computeBestPyramidLevelForLocation(e,t),null==_)return{location:x,value:null};const w=this.identifyPixelLocation(x,_,null,b);if(null===w)return{location:x,value:null};const{row:v,col:I,rowOffset:R,colOffset:S,blockWidth:C}=w,k=await this._fetchRawTile(_,v,I,t);if(!k?.pixels?.length)return{location:x,value:null};const M=R*C+S;return this._processIdentifyResult(k,{srcLocation:x,position:M,pyramidLevel:_,useTransposedTile:!!b,requestSomeSlices:a,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,y.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:n}=this;if(s.requestRawData&&n)return this._fetchPixels(e,t,i,s);const r=(0,y.FT)(e.spatialReference),o=(0,y.OM)(e);if(null==r||0===o||1===o&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,s);if(o>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,u=Math.round(r/(c-a)*t),h=u-Math.round((r/2-a)/(c-a)*t);let p=0;const f=[];for(let n=0;n<=o;n++){const m=new d.A({xmin:0===n?a:-r/2,xmax:n===o?c-r*n:r/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),g=0===n?u-h:n===o?t-p:u;p+=g,f.push(g);const y=s.disableWrapAround&&n>0?null:this._fetchPixels(m,g,i,s);l.push(y)}const m=(await Promise.all(l)).map(e=>e?.pixelBlock);let g=null;const x={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:x,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:f},s)).pixelBlock:(0,C.z7)(m,x,{blockWidths:f}),{extent:e,srcExtent:(0,y._l)(e,this.rasterInfo.spatialReference,s.datumTransformation),pixelBlock:g}}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:o,storageInfo:l}=this.rasterInfo,a=2**e,c=o.x*a,u=o.y*a,h=new d.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:p,mosaicSize:f}=n;if(1===p.length&&null!=p[0]&&p[0].width===i.width&&p[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:n.pixelBlocks[0]};const m=e>0?l.pyramidBlockWidth:l.blockWidth,g=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%m,y:t.y%g};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:f,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:s.interpolation,alignmentInfo:null,blockWidths:null},s)).pixelBlock:(0,C.z7)(p,f,{clipOffset:y,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,i,s){throw new r.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,y._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,S.D)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:s}=this.ioConfig,{range:r,query:o,headers:l}=t;i=i??t.retryCount??this.ioConfig.retryCount;const a=r?{Range:`bytes=${r.from}-${r.to}`}:null;try{return await(0,n.A)(e,{...t,query:{...o,...s},headers:{...l,...a}})}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,g.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const n=s.lodAt(e);return n?this.getTileExtent({x:n.resolution,y:n.resolution},t,i,s.origin,s.spatialReference,s.size):null}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){const r=[],o=e.maximumPyramidLevel||0;let l=(s.x+s.y)/2,a=1/.0254*96*l;for(let e=0;e<=o&&(r.unshift(new z.A({level:o-e,resolution:l,scale:a})),e!==o);e++)if(n){const t=(n[e].x+n[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new p.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new F.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:o,pixelSize:l,spatialReference:a}=e,c=new p.A({x:o.xmin,y:o.ymax,spatialReference:a});null==s&&(s=Math.max(0,Math.round(Math.log(Math.max(n,r))/Math.LN2-8)));const u=this.computeBlockBoundary(o,512,512,{x:o.xmin,y:o.ymax},[l],s);e.storageInfo=new P.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,o=2){if(1===n.length&&r>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<r;i++)e*=o,t*=o,n.push({x:e,y:t})}const l=[],{x:a,y:c}=s;for(let s=0;s<n.length;s++){const{x:r,y:o}=n[s];l.push({minCol:Math.floor((e.xmin-a+.1*r)/t/r),maxCol:Math.floor((e.xmax-a-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*o)/i/o),maxRow:Math.floor((c-e.ymin-.1*o)/i/o)})}return l}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:o}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=o,u=s&&null!=c?c.tileSize[0]:o.blockWidth,h=s&&null!=c?c.tileSize[1]:o.blockHeight,d=(0,y._I)(e,n,i);if(!r.intersects(d))return null;if(t<0||t>l)return null;const p=this.getPyramidPixelSize(t),{x:f,y:m}=p,g=(a.y-d.y)/m/h,x=(d.x-a.x)/f/u,_=Math.min(h-1,Math.floor((g-Math.floor(g))*h)),b=Math.min(u-1,Math.floor((x-Math.floor(x))*u));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(x),rowOffset:_,colOffset:b,blockWidth:u,srcLocation:d}}getTileExtent(e,t,i,s,n,r){const[o,l]=r,a=s.x+i*o*e.x,c=a+o*e.x,u=s.y-t*l*e.y,h=u-l*e.y;return new d.A({xmin:a,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=f.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new d.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new p.A({x:1,y:1,spatialReference:n});const{extent:r,storageInfo:o}=e;if(o){o.origin=new p.A({x:r.xmin,y:r.ymax,spatialReference:n});const{pyramidResolutions:i,tileInfo:s}=o;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),s){s.origin=o.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,y.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};const r=this._getSourceDataInfo(e,t,i,s),{pyramidLevel:o,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:u,ul:h}=r;if(0===c||0===u)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:d}=this,f=d.transform,m="gcs-shift"===f?.type,g=null!=(0,y.FT)(e.spatialReference);!m&&g||(n=(0,y.OM)(r.srcExtent,m));const x=await this._fetchRawTiles(o,h,{width:c,height:u,wrapCount:n},s);if(!x)return{extent:e,srcExtent:a,pixelBlock:null};const _=d.storageInfo,b=o>0?_.pyramidBlockWidth:_.blockWidth,w=o>0?_.pyramidBlockHeight:_.blockHeight;let{x:v,y:I}=d.pixelSize;if(o>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=_;if(null!=e&&e[o-1])({x:v,y:I}=e[o-1]);else{const e=t**o;v*=e,I*=e}}const R=d.spatialReference,S=new p.A({x:v,y:I,spatialReference:R}),M=b===c&&w===u&&h.x%b===0&&h.y%w===0,T=new p.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),A=!e.spatialReference.equals(R),z=R.isGeographic?1e-9:1e-4,{datumTransformation:P}=s;if(!A&&M&&1===x.pixelBlocks.length&&b===t&&w===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(l,T,z))return{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:x.pixelBlocks[0]};const F=g&&null!=(0,y.FT)(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,B=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");B&&!this.rasterJobHandler&&await(0,y.Hh)();const D=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:T.toJSON(),datumTransformation:P,rasterTransform:f,hasWrapAround:n>0||F,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:B},s):(0,y.l0)({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:T,datumTransformation:P,rasterTransform:f,hasWrapAround:n>0||F,isAdaptive:!1,includeGCSGrid:B});let N;const J=!s.requestRawData,O={rows:D.spacing[0],cols:D.spacing[1]},H=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(o,x.extent.xmin):void 0,{pixelBlocks:E,mosaicSize:L,isPartiallyFilled:Z}=x;let q=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:L,destDimension:J?{width:t,height:i}:null,coefs:J?D.coefficients:null,sampleSpacing:J?O:null,projectDirections:B,gcsGrid:B?D.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:H,blockWidths:null},s);({pixelBlock:N,localNorthDirections:q}=e)}else{const e=(0,C.z7)(E,L,{alignmentInfo:H});N=J?(0,C.$i)(e,{width:t,height:i},D.coefficients,O,s.interpolation):e,B&&D.gcsGrid&&(q=(0,C.QF)({width:t,height:i},D.gcsGrid),N=(0,k.Y2)(N,this.rasterInfo.dataType,q))}return s.requestRawData||B?{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N,transformGrid:D,localNorthDirections:q,isPartiallyFilled:Z}:{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N}}async _fetchRawTiles(e,t,i,s){const{origin:n,blockBoundary:r}=this.rasterInfo.storageInfo,{blockWidth:o,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:u,height:h,wrapCount:p}=i;const f=this._getRasterTileAlignmentInfo(e,0);s.buffer&&(a-=s.buffer.cols,c-=s.buffer.rows,u+=2*s.buffer.cols,h+=2*s.buffer.rows);let m=0,g=0,y=0;p&&null!=f&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:m}=f),g*f.blockWidth-m>=a+u&&(m=0));const x=Math.floor(a/o),_=Math.floor(c/l),b=Math.floor((a+u+m-1)/o),w=Math.floor((c+h+m-1)/l),v=r[e];if(!v)return null;const{minRow:I,minCol:R,maxCol:S,maxRow:C}=v;if(0===p&&(w<I||b<R||_>C||x>S))return null;const k=new Array;let M=!1;const T=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=_;t<=w;t++)for(let i=x;i<=b;i++){let n=i;if(!s.disableWrapAround&&p&&null!=f&&g<=i&&(n=i-g-y),t>=I&&n>=R&&C>=t&&S>=n){const i=this._fetchRawTile(e,t,n,s);T?k.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{M=!0,e(null)})})):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;const A=await Promise.all(k),z={height:(w-_+1)*l,width:(b-x+1)*o},{spatialReference:P}=this.rasterInfo,F=this.getPyramidPixelSize(e),{x:B,y:D}=F;return{extent:new d.A({xmin:n.x+x*o*B,xmax:n.x+(b+1)*o*B,ymin:n.y-(w+1)*l*D,ymax:n.y-_*l*D,spatialReference:P}),pixelBlocks:A,mosaicSize:z,isPartiallyFilled:M}}_fetchRawTile(e,t,i,s){const{storageInfo:n}=this.rasterInfo,r=null!=n.transposeInfo&&!!s.transposedVariableName;if(!r){const s=n.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:r,minCol:o,maxCol:l,maxRow:a}=s;if(t<r||i<o||t>a||i>l)return Promise.resolve(null)}const o=r?s.transposeVariableName:s.sliceId,l=n.isBsqTile?s.bandIds:null,c=function(e,t,i){const s=[];return null!=t&&s.push(`sliceId=${t}`),null!=i&&s.push(`bandIds=${i.join(",")}`),s.length?`${e}?${s.join("&")}`:e}(this.rasterId,o,l),u=`${e}/${t}/${i}`;let h=w(c,s.registryId,u);if(null==h){const r=new AbortController,o=s.bandIds?.slice();if(o?.length&&n.isBsqTile){const n=new Set(o),l=[],a=Array.from(n);for(const n of a)l.push(this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:{...s,bandIds:[n]}},{signal:r.signal}));h=Promise.all(l).then(e=>{if(e.some(e=>null==e))return null;if(a.length!==o.length){const t=[];for(const i of o){let s=e[a.indexOf(i)];t.includes(s)&&(s=s.clone()),t.push(s)}e=t}return this.rasterJobHandler?this.rasterJobHandler.compositeBands({pixelBlocks:e},{signal:r.signal,transferPixelsToWorker:!0}):(0,C.Wy)(e)})}else h=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:s},{signal:r.signal});v(c,s.registryId,u,h,r),h.catch(()=>I(c,s.registryId,u))}return s.signal&&(0,a.u7)(s,()=>{b(c,s.registryId,u)}),h}_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,o=[],l=[];for(let e=0;e<s;e++){const[t,i]=(0,k.Lu)([n[e],r[e]]);o.push(t),l.push(i)}return[o,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,y.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:o,srcHeight:l,pyramidLevel:a}=n,c=o/t,u=l/i,h=a<r&&c*u>=16,d=a===r&&this._requireTooManySrcTiles(o,l,t,i);if(h||d||0===o||0===l){const o=new p.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=(0,y.Wo)(o,this.rasterInfo.spatialReference,e,n.datumTransformation);const d=!l||s.srcResolution&&l.x+l.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&d){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(r-a+3>=e){const t=2**e;l={x:s.srcResolution.x*t,y:s.srcResolution.y*t}}}l&&(n.srcResolution=l,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,o=t/s;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+s)/1024)||r>8||o>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,s=i.spatialReference,{srcResolution:n,datumTransformation:r}=t,{pyramidLevel:o,pyramidResolution:l,excessiveReading:a}=(0,y.t$)(n,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||(0,y._l)(e,s,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{origin:h}=i.storageInfo,{width:d,height:p,ul:f}=(0,m.$g)(c,h,l,o);t.pyramidLevel=o,t.pyramidResolution=l,t.srcWidth=d,t.srcHeight=p,t.ul=f}_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,o=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[s])return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!r){const t=e.pixels.map(e=>e[s]),r={location:i,value:t,pyramidLevel:n},o=this._computeMagDirValues(t.map(e=>[e]));return o?.length&&(r.magdirValue=o.map(e=>e[0])),r}let a=e.pixels.map(e=>e.slice(s*o,s*o+o)),c=this._computeMagDirValues(a);const{requestSomeSlices:u,identifyOptions:h}=t;let d=(0,g.QW)(l,h.transposedVariableName);if(u){const e=(0,g.xx)(d,h.multidimensionalDefinition,h.timeExtent);a=a.map(t=>e.map(e=>t[e])),c=c?.map(t=>e.map(e=>t[e])),d=e.map(e=>d[e])}const p=e.noDataValues||this.rasterInfo.noDataValue,f={pixels:a,pixelType:e.pixelType};let m;return null!=p&&((0,R.Sp)(f,p),m=f.mask),{location:i,value:null,dataSeries:d.map((e,t)=>{const i={value:0===m?.[t]?null:a.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.Cg)([(0,u.MZ)()],D.prototype,"_rasterTileAlignmentInfo",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"_tileFetchQueue",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"_isGlobalWrappableSource",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s.Cg)([(0,u.MZ)()],D.prototype,"_openPromise",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"rasterJobHandler",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"rasterId",null),(0,s.Cg)([(0,u.MZ)(T.OZ)],D.prototype,"url",null),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],D.prototype,"datasetName",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],D.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"ioConfig",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"sourceJSON",void 0),D=(0,s.Cg)([(0,u.$K)("esri.layers.raster.datasets.BaseRaster")],D)},72802:(e,t,i)=>{i.d(t,{U:()=>n});var s=i(19419);class n{constructor(e,t,i,n=(0,s.vt)()){this._level=e,this._row=t,this._col=i,this.extent=n}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new n(e.level,e.row,e.col,e.extent)}}},87045:(e,t,i)=>{i.d(t,{A:()=>_});var s,n=i(31635),r=i(66552),o=i(25482),l=i(86211),a=i(91429),c=i(56507),u=i(86738),h=i(16930),d=i(21325),p=i(28735),f=i(91806),m=i(72802),g=i(36005),y=i(43937);const x=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 _=class extends o.o{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:r=h.A.WebMercator,numLODs:o=24}=e;if(!(0,d.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new f.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new u.A(0,0,r),size:[n,n],spatialReference:r})}const a=(0,d.Vp)(r),c=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new u.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),p=1/(39.37*(0,l.GA)(r)*96),m=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*p;m.push(new f.A({level:e,scale:t,resolution:s}))}else{let e=(0,d.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(o/t);m.push(new f.A({level:0,scale:e,resolution:e*p}));for(let s=1;s<i;s++){const i=e/2**t,n=i*p;m.push(new f.A({level:s,scale:i,resolution:n})),e=i}}return new s({dpi:96,lods:m,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,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.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,o;if("number"==typeof t)r=t,o=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,s=i;else{const e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,s=i}const l=n.resolution*this.size[0],a=n.resolution*this.size[1];return s??=new m.U(0,0,0),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((r-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const s=e.level-i.level,n=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;return e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+r,!0}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 f.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}}};(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{read:x.read,write:x.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],_.prototype,"isWrappable",null),(0,n.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],_.prototype,"origin",void 0),(0,n.Cg)([(0,g.w)("origin")],_.prototype,"readOrigin",null),(0,n.Cg)([(0,a.MZ)({type:[f.A],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],_.prototype,"scales",void 0),(0,n.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,n.Cg)([(0,g.w)("size",["rows","cols"])],_.prototype,"readSize",null),(0,n.Cg)([(0,y.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],_.prototype,"writeSize",null),(0,n.Cg)([(0,a.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=s=(0,n.Cg)([(0,a.$K)("esri.layers.support.TileInfo")],_)},89015:(e,t,i)=>{i.d(t,{o:()=>D});var s=i(31635),n=i(11254),r=i(49186),o=i(53966),l=i(91429),a=i(56507),c=i(86738),u=i(16930),h=i(21325),d=i(7548),p=i(23636),f=i(4366),m=i(34930),g=i(8144),y=i(37373),x=i(51927),_=i(60694),b=i(10873),w=i(45617),v=i(43577),I=i(13868),R=i(22796),S=i(87045),C=i(12711),k=i(85676),M=i(94359),T=i(22048),A=i(49410),z=i(34606),P=i(51508),F=i(93223),B=i(36005);const D=e=>{const t=e;let D=class extends t{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,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=(0,d.qg)(e[0]?.raster)}destroy(){this._shutdownJobHandler()}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()}set url(e){this._set("url",(0,_.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,M.LF)(s,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,a.PZ)(T.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:o}=i;if(!s.spatialReference.equals(o)){await(0,y.Hh)();const e="extent"===s.type?(0,y._l)(s,o):(0,y.uk)(s,o);if(null==e)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new c.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:o}),{extent:u,width:h,height:d}=(0,m.b7)(i,n,l),p=await this.fetchPixels(u,h,d,{...t,interpolation:"nearest"});if(null==p.pixelBlock)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const f=await(0,m.$Q)(p.pixelBlock,u,n),g=this._rasterJobHandler;return g?g.computeStatisticsHistograms({pixelBlock:f},t):(0,x.eH)(f)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=(0,f.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:s}=this.raster,n=(0,f.ct)(s,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=n?.name,o=(0,C.m7)(s,r);return this._updateSymbolizer(t,i,r,o)}async applyRenderer(e,t,i){const s=e?.pixelBlock;if(!(null!=s&&s.pixels&&s.pixels.length>0))return null;await this.updateRenderer();const n=this.bandIds??[],{pixelBlock:r}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return r}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,d.qg)(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}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,h.Vp)(e);return S.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,i,s={}){if(N(this),s.requestAsImageElement){const r=this.getTileUrl(e,t,i);return(0,n.A)(r,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:r}=this;if(null!=r.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const n=s.tileInfo||r.storageInfo.tileInfo,o=this.raster.getTileExtentFromTileInfo(e,t,i,n);if(o)return{extent:o,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,i,s)}async fetchPixels(e,t,i,s={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const n=await this.raster.fetchPixels(e,t,i,s);return s.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(n.pixelBlock=n.pixelBlock?.extractBands(s.bandIds)),n}async getSamples(e,t){if(await this.load(),(e=(0,a.PZ)(z.A,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new r.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const i=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:i},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),o=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new P.A({samples:o})}async identify(e,t={}){await this.load(),e=(0,a.PZ)(c.A,e).clone().normalize();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&(!s.hasMultidimensionalTranspose||!(0,f.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null};const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new r.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=(0,d.qg)(i)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return i.identify(e,{...t,bandIds:o})}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((0,f.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,f.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,f.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&(0,d.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;N(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,(0,d.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:s,type:n}=t;if("multipoint"===n)return t.points.map(e=>new c.A({x:e[0],y:e[1],spatialReference:s}));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){const s=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(8411)]).then(i.bind(i,88411)),r=(await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(3299),i.e(4929)]).then(i.bind(i,23346))).execute(t,{unit:"meters"}),o=Math.min(e.sampleCount||100,1e3);let l=e.sampleDistance;l||(l=r/(o+(2===n.paths[0].length?1:0))),n=s.execute(t,l,{unit:"meters"})}return n.paths.flatMap(e=>e.map(e=>new c.A({x:e[0],y:e[1],spatialReference:s})))}const r=Math.min(e.sampleCount||100,1e3),o="extent"===t.type,l=o?t:t.extent,a=Math.sqrt(l.width*l.height/r),u=l.height/a,h=l.width/a,{xmin:d,ymax:p}=l,f=[];for(let e=0;e<u;e++)for(let i=0;i<h;i++){const n=new c.A({x:d+(i+.5)*a,y:p-(e+.5)*a,spatialReference:s});(o||t.contains(n))&&f.push(n)}return f}_configDefaultInterpolation(){if(null==this.interpolation){N(this);const{raster:e}=this,t=(0,C.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){N(this);const{rasterInfo:t}=this.raster,i=(0,f.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=(0,C.I8)({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??(0,C.ci)(t)),!this.renderer||"override"===e){const e=(0,C.Mm)(this.raster),i=n?.renderer??(0,C.PD)(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,l=o?.max??0,a=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(l>1e24||a<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const r=(0,C.$P)({...this.renderer.toJSON(),variableName:s}),l=(0,C.m7)(t,s);this.symbolizer?(this.symbolizer.rendererJSON=r,this.symbolizer.rasterInfo=l):this.symbolizer=new k.A({rendererJSON:r,rasterInfo:l});const a=this.symbolizer.bind();if(a.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,C.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",a.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,d.qg)(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",R.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,d.qg)(t)?(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,g.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),r=new p.A({rasterFunction:n});r.rasterJobHandler=this._rasterJobHandler,await r.open(),this.raster=r}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!s)return;const{bandIds:n}=this,{bandCount:r}=this.raster.rasterInfo,o=n?.length?n.some(e=>e>=r):r>=3;n&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,s=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*s;if(!e.dataSeries?.length)return[new A.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];const r=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:s},o)=>{const l={Variables:s[0].variableName,Dimensions:s.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of s){l[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];l[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const a=new A.A({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:n,attributes:l});r.push(a)}),r}};function N(e){if(!e.raster||!e.serviceRasterInfo)throw new r.A("imagery-tile","no raster")}return(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_cachedRasterFunctionJson",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_compatibleFullExtent",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_rasterFunctionUpdatePromise",void 0),(0,s.Cg)([(0,l.MZ)({type:[a.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],D.prototype,"bandIds",void 0),(0,s.Cg)([(0,l.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],D.prototype,"copyright",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1}})],D.prototype,"fullExtent",null),(0,s.Cg)([(0,l.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,F.e)(I.SZ)],D.prototype,"interpolation",void 0),(0,s.Cg)([(0,l.MZ)()],D.prototype,"ioConfig",void 0),(0,s.Cg)([(0,l.MZ)({type:[w.A],json:{write:!0}})],D.prototype,"multidimensionalDefinition",null),(0,s.Cg)([(0,l.MZ)({type:v.A,json:{write:!0}})],D.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,l.MZ)()],D.prototype,"raster",void 0),(0,s.Cg)([(0,l.MZ)({type:R.A})],D.prototype,"rasterFunction",null),(0,s.Cg)([(0,l.MZ)()],D.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,l.MZ)()],D.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{read:!1}})],D.prototype,"spatialReference",void 0),(0,s.Cg)([(0,l.MZ)({type:S.A})],D.prototype,"tileInfo",void 0),(0,s.Cg)([(0,l.MZ)(b.OZ)],D.prototype,"url",null),(0,s.Cg)([(0,l.MZ)({types:M.uy})],D.prototype,"renderer",null),(0,s.Cg)([(0,l.MZ)({types:M.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:M.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],D.prototype,"internalRenderer",null),(0,s.Cg)([(0,B.w)("internalRenderer")],D.prototype,"readRenderer",null),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"symbolizer",void 0),D=(0,s.Cg)([(0,l.$K)("esri.layers.mixins.ImageryTileMixin")],D),D}},91806:(e,t,i)=>{i.d(t,{A:()=>a});var s,n=i(31635),r=i(25482),o=i(91429),l=i(56507);let a=class extends r.o{static{s=this}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.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0),(0,n.Cg)([(0,o.MZ)({type:l.jz,json:{write:!0}})],a.prototype,"level",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"rows",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"scale",void 0),a=s=(0,n.Cg)([(0,o.$K)("esri.layers.support.LOD")],a)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2168],{330:(e,t,i)=>{function s(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 n=[];if(t){const r=s(e,i);for(let e=0;e<r.length;e++)s(r[e],t).forEach(e=>n.push(e));return n}const r=e.getElementsByTagNameNS("*",i);if(!r||0===r.length)return[];for(let e=0;e<r.length;e++)n.push(r[e]||r.item(e));return n}function n(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 r=s(e,i);return r.length>0?t?n(r[0],t):r[0]:null}function r(e,t=null){const i=t?n(e,t):e;let s;return i?(s=i.textContent||i.nodeValue,s?s.trim():null):null}function o(e,t){const i=s(e,t),n=[];let r;for(let e=0;e<i.length;e++)r=i[e].textContent||i[e].nodeValue,r&&(r=r.trim(),""!==r&&n.push(r));return n}function l(e,t=null){const i=r(e,t);return i?.split(" ").map(e=>Number(e))??[]}function a(e,t){return o(e,t).map(e=>Number(e))}function c(e,t){const i=r(e,t);return Number(i)}function u(e,t){const i=e?.nodeName?.toLowerCase(),s=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===s}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>o,IC:()=>s,Ui:()=>a,V6:()=>n,g7:()=>u,mX:()=>r,pN:()=>l,v7:()=>c,vv:()=>h})},563:(e,t,i)=>{i.d(t,{QueueProcessor:()=>c,SharedConcurrency:()=>h});var s=i(97768),n=i(74887),r=i(9775),o=i(32587),l=i(76030),a=i(44794);class c{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,a.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??d,this._queue=new r.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,s.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,i)=>e(i))}_get(e){const t=this._deferreds.get(e);return t?.promise}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,r=(0,n.Tw)(),o=t?(0,n.u7)(t,()=>s.abort()):null,l=(0,n.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),a(),r.reject((0,n.NK)())}),a=()=>{l.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,r),this._controllers.set(e,s),r.promise.then(a,a),this._queue.push(e),this._scheduleNext(),r.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,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}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)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 u(e,i);this._processingItems.set(e,s),this.sharedConcurrency.current.value+=1;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)}}class u{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class h{constructor(e){this.limit=e,this.current=(0,a.v)(0)}get full(){return this.current.value>=this.limit}}const d=new h(1/0)},23636:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),n=i(49186),r=i(91429),o=i(39829),l=i(49859),a=i(34930),c=i(47520),u=i(37373),h=i(22671);let d=class extends l.A{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 o=!1;const{interpolation:l}=s,u=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&u&&(o=1===n.length&&!s.skipRasterFunction,s={...s,interpolation:"bilinear",requestRawData:o}),s.requestRawData&&n.length>1&&!this.hasUniqueSourceStorageInfo&&(o=!1,s={...s,requestRawData:!1});const h=n.map(n=>n.fetchPixels(e,t,i,s)),d=await Promise.all(h),p=d.map(e=>e.pixelBlock),f=o||s.requestRawData?d.map(e=>e.srcTilePixelSize):null;if(s.skipRasterFunction||p.every(e=>null==e))return d[0];const m=d.find(e=>null!=e.pixelBlock)?.extent??e;let g=this.rasterJobHandler?await this.rasterJobHandler.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:m,primaryPixelBlocks:p,primaryPixelSizes:f,primaryRasterIds:r});const{transformGrid:y}=d[0];if(!o||null==g||null==y){const e=s.noClip?null:this.getClippingGeometry(m.spatialReference);return!s.noClip&&null!=g&&e&&(g=await(0,a.$Q)(g,m,e)),{...d[0],pixelBlock:g}}const x={rows:y.spacing[0],cols:y.spacing[1]};let _;_=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[g],srcMosaicSize:{width:g.width,height:g.height},destDimension:{width:t,height:i},coefs:y.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:l,alignmentInfo:void 0,blockWidths:null},s)).pixelBlock:(0,c.$i)(g,{width:t,height:i},y.coefficients,x,l);const b=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||null==_||null==b||(_=await(0,a.$Q)(_,e,b)),{extent:e,srcExtent:d[0].srcExtent,pixelBlock:_}}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,u.uk)(t,e),this._clippingGeometry.set(i,s)),s}async _open(e){const{rasterFunction:t}=this;t.isRoot=!0,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,r=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(r);const o=i.map(({rasterInfo:e})=>e),l=t.bind({rasterInfos:o,rasterIds:s});if(t.rawSourceRasterInfos=o,!l.success||0===o.length)throw new n.A("raster-function:open",`cannot bind the function: ${l.error??""}`);const a="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===a?.functionName&&(t.rasterInfo.attributeTable=h.A.fromJSON(a.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=o[0];this.hasUniqueSourceStorageInfo=1===o.length||o.slice(1).every(e=>function(e,t){const{storageInfo:i,pixelSize:s,spatialReference:n,extent:r}=e,{storageInfo:o,pixelSize:l,spatialReference:a,extent:c}=t;return s.x===l.x&&s.y===l.y&&n.equals(a)&&r.equals(c)&&i.blockHeight===o.blockHeight&&i.blockWidth===o.blockWidth&&i.maximumPyramidLevel===o.maximumPyramidLevel&&i.firstPyramidLevel===o.firstPyramidLevel&&i.pyramidBlockWidth===o.pyramidBlockWidth&&i.pyramidBlockHeight===o.pyramidBlockHeight&&i.pyramidScalingFactor===o.pyramidScalingFactor}(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,s=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(4772),i.e(5076)]).then(i.bind(i,88411)),n=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(4772),i.e(5867)]).then(i.bind(i,93054));let r=s.execute(o.A.fromExtent(e),2*(e.width+e.height)/40);r=(0,u.uk)(r,t.spatialReference),t=n.execute(r,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],d.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,r.MZ)()],d.prototype,"tileType",void 0),(0,s.Cg)([(0,r.MZ)()],d.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,r.MZ)()],d.prototype,"primaryRasters",void 0),d=(0,s.Cg)([(0,r.$K)("esri.layers.raster.datasets.FunctionRaster")],d)},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._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._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._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const i of t){if(!this._map.has(i))continue;const t=this._map.get(i),s=e(t,i);s!==t&&this.set(i,s)}})}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},44794:(e,t,i)=>{i.d(t,{v:()=>l});var s=i(4718),n=i(62788),r=i(95488);class o{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 l(e,t=s.gh){return new o(e,t)}},49859:(e,t,i)=>{i.d(t,{A:()=>D});var s=i(31635),n=i(11254),r=i(49186),o=i(25482),l=i(53966),a=i(74887),c=i(563),u=i(91429),h=i(56507),d=i(5443),p=i(86738),f=i(16930),m=i(7548),g=i(4366),y=i(37373);const x=new Map,_=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 b(e,t,i){const s=x.get(e);if(!s)return null==t?_.decreaseRefCount(e,i):0;if(null==t||null==s[t])return _.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=x.get(e);if(!s)return null==t?_.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 _.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 v(e,t,i,s,n=null){const r=x.get(e);if(!r)return void(null==t&&_.putBlock(e,i,s,n));if(null==t||null==r[t])return void _.putBlock(e,i,s,n);const o={refCount:1,block:s,isResolved:!1,isRejected:!1,controller:n};s.then(()=>o.isResolved=!0).catch(()=>o.isRejected=!0),r[t]?.cache.set(i,o)}function I(e,t,i){const s=x.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):_.deleteBlock(e,i):null==t&&_.deleteBlock(e,i)}var R=i(94778),S=i(20758),C=i(47520),k=i(34251),M=i(60694),T=i(10873),A=i(45617),z=i(91806),P=i(20223),F=i(87045);let B=0,D=class extends o.o{constructor(){super(...arguments),this._tileFetchQueue=new c.QueueProcessor({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:F.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,y.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),(0,m.qg)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+B++}set url(e){this._set("url",(0,M.Jf)(e,l.A.getLogger(this)))}async open(e){return this._openPromise??=(0,y.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,s={}){const n=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,o=this.getTileExtentFromTileInfo(e,t,i,n);if(!o)throw new r.A("imagery-tile:out-of-bounds","Level for fetch tile out of range");return s={noClip:!0,...s},this.fetchPixels(o,n.size[0],n.size[1],s)}async identify(e,t={}){e=(0,h.PZ)(p.A,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:s}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:r,multidimensionalInfo:o}=n;let{transposedVariableName:l}=t;const a=null!=o&&r&&(null!=s||(0,g.DY)(i));a&&!l&&(l=null!=i&&i.length>0?i[0].variableName??void 0:o.variables[0].name,t={...t,transposedVariableName:l}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=n,{datumTransformation:f}=t;let x=(0,y._I)(e,c,f);if(!u.intersects(x))return{location:x,value:null};if(null!=n.transform){const e=n.transform.inverseTransform(x);if(!n.nativeExtent.intersects(e))return{location:e,value:null};x=e}let _=0;const b=null!=l&&null!=o&&n.hasMultidimensionalTranspose;if((0,m.qg)(this)){const e=this.primaryRasters.rasters[0];if(b)return e.identify(x,t);const{pixelSize:s}=n,r=3,o=s.x*r/2,l=s.y*r/2,a=new d.A({xmin:x.x-o,xmax:x.x+o,ymin:x.y-l,ymax:x.y+l,spatialReference:c}),u={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:h}=await e.fetchPixels(a,r,r,u),{pixelBlock:p}=await this.fetchPixels(a,r,r,u);if(null==h)return{location:x,value:null};const f=Math.floor(r*r*.5),m=!h.mask||h.mask[f]?h.pixels.map(e=>e[f]):null;let g;return null!=p&&(g=!p.mask||p.mask[f]?p.pixels.map(e=>e[f]):void 0),{location:x,value:m,processedValue:g,pyramidLevel:0}}if(!b)if(t.srcResolution)_=(0,y.t$)(t.srcResolution,n,this.ioConfig.sampling).pyramidLevel;else if(_=await this.computeBestPyramidLevelForLocation(e,t),null==_)return{location:x,value:null};const w=this.identifyPixelLocation(x,_,null,b);if(null===w)return{location:x,value:null};const{row:v,col:I,rowOffset:R,colOffset:S,blockWidth:C}=w,k=await this._fetchRawTile(_,v,I,t);if(!k?.pixels?.length)return{location:x,value:null};const M=R*C+S;return this._processIdentifyResult(k,{srcLocation:x,position:M,pyramidLevel:_,useTransposedTile:!!b,requestSomeSlices:a,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,y.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:n}=this;if(s.requestRawData&&n)return this._fetchPixels(e,t,i,s);const r=(0,y.FT)(e.spatialReference),o=(0,y.OM)(e);if(null==r||0===o||1===o&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,s);if(o>=3)return{extent:e,pixelBlock:null};const l=[],{xmin:a,xmax:c}=e,u=Math.round(r/(c-a)*t),h=u-Math.round((r/2-a)/(c-a)*t);let p=0;const f=[];for(let n=0;n<=o;n++){const m=new d.A({xmin:0===n?a:-r/2,xmax:n===o?c-r*n:r/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),g=0===n?u-h:n===o?t-p:u;p+=g,f.push(g);const y=s.disableWrapAround&&n>0?null:this._fetchPixels(m,g,i,s);l.push(y)}const m=(await Promise.all(l)).map(e=>e?.pixelBlock);let g=null;const x={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:x,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:f},s)).pixelBlock:(0,C.z7)(m,x,{blockWidths:f}),{extent:e,srcExtent:(0,y._l)(e,this.rasterInfo.spatialReference,s.datumTransformation),pixelBlock:g}}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:o,storageInfo:l}=this.rasterInfo,a=2**e,c=o.x*a,u=o.y*a,h=new d.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:p,mosaicSize:f}=n;if(1===p.length&&null!=p[0]&&p[0].width===i.width&&p[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:n.pixelBlocks[0]};const m=e>0?l.pyramidBlockWidth:l.blockWidth,g=e>0?l.pyramidBlockHeight:l.blockHeight,y={x:t.x%m,y:t.y%g};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:f,destDimension:i,clipOffset:y,clipSize:i,coefs:null,sampleSpacing:null,interpolation:s.interpolation,alignmentInfo:null,blockWidths:null},s)).pixelBlock:(0,C.z7)(p,f,{clipOffset:y,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,i,s){throw new r.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,y._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,S.D)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:s}=this.ioConfig,{range:r,query:o,headers:l}=t;i=i??t.retryCount??this.ioConfig.retryCount;const a=r?{Range:`bytes=${r.from}-${r.to}`}:null;try{return await(0,n.A)(e,{...t,query:{...o,...s},headers:{...l,...a}})}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,g.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const n=s.lodAt(e);return n?this.getTileExtent({x:n.resolution,y:n.resolution},t,i,s.origin,s.spatialReference,s.size):null}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){const r=[],o=e.maximumPyramidLevel||0;let l=(s.x+s.y)/2,a=1/.0254*96*l;for(let e=0;e<=o&&(r.unshift(new z.A({level:o-e,resolution:l,scale:a})),e!==o);e++)if(n){const t=(n[e].x+n[e].y)/2;a*=t/l,l=t}else l*=2,a*=2;const c=new p.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new F.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:o,pixelSize:l,spatialReference:a}=e,c=new p.A({x:o.xmin,y:o.ymax,spatialReference:a});null==s&&(s=Math.max(0,Math.round(Math.log(Math.max(n,r))/Math.LN2-8)));const u=this.computeBlockBoundary(o,512,512,{x:o.xmin,y:o.ymax},[l],s);e.storageInfo=new P.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,o=2){if(1===n.length&&r>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<r;i++)e*=o,t*=o,n.push({x:e,y:t})}const l=[],{x:a,y:c}=s;for(let s=0;s<n.length;s++){const{x:r,y:o}=n[s];l.push({minCol:Math.floor((e.xmin-a+.1*r)/t/r),maxCol:Math.floor((e.xmax-a-.1*r)/t/r),minRow:Math.floor((c-e.ymax+.1*o)/i/o),maxRow:Math.floor((c-e.ymin-.1*o)/i/o)})}return l}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:o}=this.rasterInfo,{maximumPyramidLevel:l,origin:a,transposeInfo:c}=o,u=s&&null!=c?c.tileSize[0]:o.blockWidth,h=s&&null!=c?c.tileSize[1]:o.blockHeight,d=(0,y._I)(e,n,i);if(!r.intersects(d))return null;if(t<0||t>l)return null;const p=this.getPyramidPixelSize(t),{x:f,y:m}=p,g=(a.y-d.y)/m/h,x=(d.x-a.x)/f/u,_=Math.min(h-1,Math.floor((g-Math.floor(g))*h)),b=Math.min(u-1,Math.floor((x-Math.floor(x))*u));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(x),rowOffset:_,colOffset:b,blockWidth:u,srcLocation:d}}getTileExtent(e,t,i,s,n,r){const[o,l]=r,a=s.x+i*o*e.x,c=a+o*e.x,u=s.y-t*l*e.y,h=u-l*e.y;return new d.A({xmin:a,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=f.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new d.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-s,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new p.A({x:1,y:1,spatialReference:n});const{extent:r,storageInfo:o}=e;if(o){o.origin=new p.A({x:r.xmin,y:r.ymax,spatialReference:n});const{pyramidResolutions:i,tileInfo:s}=o;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),s){s.origin=o.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,y.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};const r=this._getSourceDataInfo(e,t,i,s),{pyramidLevel:o,srcResolution:l,srcExtent:a,srcWidth:c,srcHeight:u,ul:h}=r;if(0===c||0===u)return{extent:e,srcExtent:a,pixelBlock:null};const{rasterInfo:d}=this,f=d.transform,m="gcs-shift"===f?.type,g=null!=(0,y.FT)(e.spatialReference);!m&&g||(n=(0,y.OM)(r.srcExtent,m));const x=await this._fetchRawTiles(o,h,{width:c,height:u,wrapCount:n},s);if(!x)return{extent:e,srcExtent:a,pixelBlock:null};const _=d.storageInfo,b=o>0?_.pyramidBlockWidth:_.blockWidth,w=o>0?_.pyramidBlockHeight:_.blockHeight;let{x:v,y:I}=d.pixelSize;if(o>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=_;if(null!=e&&e[o-1])({x:v,y:I}=e[o-1]);else{const e=t**o;v*=e,I*=e}}const R=d.spatialReference,S=new p.A({x:v,y:I,spatialReference:R}),M=b===c&&w===u&&h.x%b===0&&h.y%w===0,T=new p.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),A=!e.spatialReference.equals(R),z=R.isGeographic?1e-9:1e-4,{datumTransformation:P}=s;if(!A&&M&&1===x.pixelBlocks.length&&b===t&&w===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(l,T,z))return{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:x.pixelBlocks[0]};const F=g&&null!=(0,y.FT)(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,B=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");B&&!this.rasterJobHandler&&await(0,y.Hh)();const D=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:T.toJSON(),datumTransformation:P,rasterTransform:f,hasWrapAround:n>0||F,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:B},s):(0,y.l0)({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:T,datumTransformation:P,rasterTransform:f,hasWrapAround:n>0||F,isAdaptive:!1,includeGCSGrid:B});let N;const J=!s.requestRawData,O={rows:D.spacing[0],cols:D.spacing[1]},H=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(o,x.extent.xmin):void 0,{pixelBlocks:E,mosaicSize:L,isPartiallyFilled:Z}=x;let q=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:L,destDimension:J?{width:t,height:i}:null,coefs:J?D.coefficients:null,sampleSpacing:J?O:null,projectDirections:B,gcsGrid:B?D.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:H,blockWidths:null},s);({pixelBlock:N,localNorthDirections:q}=e)}else{const e=(0,C.z7)(E,L,{alignmentInfo:H});N=J?(0,C.$i)(e,{width:t,height:i},D.coefficients,O,s.interpolation):e,B&&D.gcsGrid&&(q=(0,C.QF)({width:t,height:i},D.gcsGrid),N=(0,k.Y2)(N,this.rasterInfo.dataType,q))}return s.requestRawData||B?{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N,transformGrid:D,localNorthDirections:q,isPartiallyFilled:Z}:{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N}}async _fetchRawTiles(e,t,i,s){const{origin:n,blockBoundary:r}=this.rasterInfo.storageInfo,{blockWidth:o,blockHeight:l}=this.getBlockWidthHeight(e);let{x:a,y:c}=t,{width:u,height:h,wrapCount:p}=i;const f=this._getRasterTileAlignmentInfo(e,0);s.buffer&&(a-=s.buffer.cols,c-=s.buffer.rows,u+=2*s.buffer.cols,h+=2*s.buffer.rows);let m=0,g=0,y=0;p&&null!=f&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:m}=f),g*f.blockWidth-m>=a+u&&(m=0));const x=Math.floor(a/o),_=Math.floor(c/l),b=Math.floor((a+u+m-1)/o),w=Math.floor((c+h+m-1)/l),v=r[e];if(!v)return null;const{minRow:I,minCol:R,maxCol:S,maxRow:C}=v;if(0===p&&(w<I||b<R||_>C||x>S))return null;const k=new Array;let M=!1;const T=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=_;t<=w;t++)for(let i=x;i<=b;i++){let n=i;if(!s.disableWrapAround&&p&&null!=f&&g<=i&&(n=i-g-y),t>=I&&n>=R&&C>=t&&S>=n){const i=this._fetchRawTile(e,t,n,s);T?k.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{M=!0,e(null)})})):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;const A=await Promise.all(k),z={height:(w-_+1)*l,width:(b-x+1)*o},{spatialReference:P}=this.rasterInfo,F=this.getPyramidPixelSize(e),{x:B,y:D}=F;return{extent:new d.A({xmin:n.x+x*o*B,xmax:n.x+(b+1)*o*B,ymin:n.y-(w+1)*l*D,ymax:n.y-_*l*D,spatialReference:P}),pixelBlocks:A,mosaicSize:z,isPartiallyFilled:M}}_fetchRawTile(e,t,i,s){const{storageInfo:n}=this.rasterInfo,r=null!=n.transposeInfo&&!!s.transposedVariableName;if(!r){const s=n.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:r,minCol:o,maxCol:l,maxRow:a}=s;if(t<r||i<o||t>a||i>l)return Promise.resolve(null)}const o=r?s.transposeVariableName:s.sliceId,l=n.isBsqTile?s.bandIds:null,c=function(e,t,i){const s=[];return null!=t&&s.push(`sliceId=${t}`),null!=i&&s.push(`bandIds=${i.join(",")}`),s.length?`${e}?${s.join("&")}`:e}(this.rasterId,o,l),u=`${e}/${t}/${i}`;let h=w(c,s.registryId,u);if(null==h){const r=new AbortController,o=s.bandIds?.slice();if(o?.length&&n.isBsqTile){const n=new Set(o),l=[],a=Array.from(n);for(const n of a)l.push(this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:{...s,bandIds:[n]}},{signal:r.signal}));h=Promise.all(l).then(e=>{if(e.some(e=>null==e))return null;if(a.length!==o.length){const t=[];for(const i of o){let s=e[a.indexOf(i)];t.includes(s)&&(s=s.clone()),t.push(s)}e=t}return this.rasterJobHandler?this.rasterJobHandler.compositeBands({pixelBlocks:e},{signal:r.signal,transferPixelsToWorker:!0}):(0,C.Wy)(e)})}else h=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:s},{signal:r.signal});v(c,s.registryId,u,h,r),h.catch(()=>I(c,s.registryId,u))}return s.signal&&(0,a.u7)(s,()=>{b(c,s.registryId,u)}),h}_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,o=[],l=[];for(let e=0;e<s;e++){const[t,i]=(0,k.Lu)([n[e],r[e]]);o.push(t),l.push(i)}return[o,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,y.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:o,srcHeight:l,pyramidLevel:a}=n,c=o/t,u=l/i,h=a<r&&c*u>=16,d=a===r&&this._requireTooManySrcTiles(o,l,t,i);if(h||d||0===o||0===l){const o=new p.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=(0,y.Wo)(o,this.rasterInfo.spatialReference,e,n.datumTransformation);const d=!l||s.srcResolution&&l.x+l.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&d){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(r-a+3>=e){const t=2**e;l={x:s.srcResolution.x*t,y:s.srcResolution.y*t}}}l&&(n.srcResolution=l,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,o=t/s;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+s)/1024)||r>8||o>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const{rasterInfo:i}=this,s=i.spatialReference,{srcResolution:n,datumTransformation:r}=t,{pyramidLevel:o,pyramidResolution:l,excessiveReading:a}=(0,y.t$)(n,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||(0,y._l)(e,s,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{origin:h}=i.storageInfo,{width:d,height:p,ul:f}=(0,m.$g)(c,h,l,o);t.pyramidLevel=o,t.pyramidResolution=l,t.srcWidth=d,t.srcHeight=p,t.ul=f}_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,o=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[s])return{location:i,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if(null==l||!r){const t=e.pixels.map(e=>e[s]),r={location:i,value:t,pyramidLevel:n},o=this._computeMagDirValues(t.map(e=>[e]));return o?.length&&(r.magdirValue=o.map(e=>e[0])),r}let a=e.pixels.map(e=>e.slice(s*o,s*o+o)),c=this._computeMagDirValues(a);const{requestSomeSlices:u,identifyOptions:h}=t;let d=(0,g.QW)(l,h.transposedVariableName);if(u){const e=(0,g.xx)(d,h.multidimensionalDefinition,h.timeExtent);a=a.map(t=>e.map(e=>t[e])),c=c?.map(t=>e.map(e=>t[e])),d=e.map(e=>d[e])}const p=e.noDataValues||this.rasterInfo.noDataValue,f={pixels:a,pixelType:e.pixelType};let m;return null!=p&&((0,R.Sp)(f,p),m=f.mask),{location:i,value:null,dataSeries:d.map((e,t)=>{const i={value:0===m?.[t]?null:a.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.Cg)([(0,u.MZ)()],D.prototype,"_rasterTileAlignmentInfo",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"_tileFetchQueue",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"_isGlobalWrappableSource",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s.Cg)([(0,u.MZ)()],D.prototype,"_openPromise",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"rasterJobHandler",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],D.prototype,"rasterId",null),(0,s.Cg)([(0,u.MZ)(T.OZ)],D.prototype,"url",null),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],D.prototype,"datasetName",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],D.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"ioConfig",void 0),(0,s.Cg)([(0,u.MZ)()],D.prototype,"sourceJSON",void 0),D=(0,s.Cg)([(0,u.$K)("esri.layers.raster.datasets.BaseRaster")],D)},72802:(e,t,i)=>{i.d(t,{U:()=>n});var s=i(19419);class n{constructor(e,t,i,n=(0,s.vt)()){this._level=e,this._row=t,this._col=i,this.extent=n}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new n(e.level,e.row,e.col,e.extent)}}},87045:(e,t,i)=>{i.d(t,{A:()=>_});var s,n=i(31635),r=i(66552),o=i(25482),l=i(86211),a=i(91429),c=i(56507),u=i(86738),h=i(16930),d=i(21325),p=i(28735),f=i(91806),m=i(72802),g=i(36005),y=i(43937);const x=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 _=class extends o.o{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:r=h.A.WebMercator,numLODs:o=24}=e;if(!(0,d.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new f.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new u.A(0,0,r),size:[n,n],spatialReference:r})}const a=(0,d.Vp)(r),c=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new u.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),p=1/(39.37*(0,l.GA)(r)*96),m=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*p;m.push(new f.A({level:e,scale:t,resolution:s}))}else{let e=(0,d.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(o/t);m.push(new f.A({level:0,scale:e,resolution:e*p}));for(let s=1;s<i;s++){const i=e/2**t,n=i*p;m.push(new f.A({level:s,scale:i,resolution:n})),e=i}}return new s({dpi:96,lods:m,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,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.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,o;if("number"==typeof t)r=t,o=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,s=i;else{const e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,s=i}const l=n.resolution*this.size[0],a=n.resolution*this.size[1];return s??=new m.U(0,0,0),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((r-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const s=e.level-i.level,n=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;return e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+r,!0}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 f.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}}};(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{read:x.read,write:x.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],_.prototype,"isWrappable",null),(0,n.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],_.prototype,"origin",void 0),(0,n.Cg)([(0,g.w)("origin")],_.prototype,"readOrigin",null),(0,n.Cg)([(0,a.MZ)({type:[f.A],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],_.prototype,"scales",void 0),(0,n.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,n.Cg)([(0,g.w)("size",["rows","cols"])],_.prototype,"readSize",null),(0,n.Cg)([(0,y.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],_.prototype,"writeSize",null),(0,n.Cg)([(0,a.MZ)({type:h.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=s=(0,n.Cg)([(0,a.$K)("esri.layers.support.TileInfo")],_)},89015:(e,t,i)=>{i.d(t,{o:()=>D});var s=i(31635),n=i(11254),r=i(49186),o=i(53966),l=i(91429),a=i(56507),c=i(86738),u=i(16930),h=i(21325),d=i(7548),p=i(23636),f=i(4366),m=i(34930),g=i(8144),y=i(37373),x=i(51927),_=i(60694),b=i(10873),w=i(45617),v=i(43577),I=i(13868),R=i(22796),S=i(87045),C=i(12711),k=i(85676),M=i(94359),T=i(22048),A=i(49410),z=i(34606),P=i(51508),F=i(93223),B=i(36005);const D=e=>{const t=e;let D=class extends t{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,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=(0,d.qg)(e[0]?.raster)}destroy(){this._shutdownJobHandler()}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()}set url(e){this._set("url",(0,_.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,M.LF)(s,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,a.PZ)(T.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:o}=i;if(!s.spatialReference.equals(o)){await(0,y.Hh)();const e="extent"===s.type?(0,y._l)(s,o):(0,y.uk)(s,o);if(null==e)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new c.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:o}),{extent:u,width:h,height:d}=(0,m.b7)(i,n,l),p=await this.fetchPixels(u,h,d,{...t,interpolation:"nearest"});if(null==p.pixelBlock)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const f=await(0,m.$Q)(p.pixelBlock,u,n),g=this._rasterJobHandler;return g?g.computeStatisticsHistograms({pixelBlock:f},t):(0,x.eH)(f)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=(0,f.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:s}=this.raster,n=(0,f.ct)(s,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=n?.name,o=(0,C.m7)(s,r);return this._updateSymbolizer(t,i,r,o)}async applyRenderer(e,t,i){const s=e?.pixelBlock;if(!(null!=s&&s.pixels&&s.pixels.length>0))return null;await this.updateRenderer();const n=this.bandIds??[],{pixelBlock:r}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return r}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,d.qg)(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}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,h.Vp)(e);return S.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,i,s={}){if(N(this),s.requestAsImageElement){const r=this.getTileUrl(e,t,i);return(0,n.A)(r,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:r}=this;if(null!=r.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const n=s.tileInfo||r.storageInfo.tileInfo,o=this.raster.getTileExtentFromTileInfo(e,t,i,n);if(o)return{extent:o,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,i,s)}async fetchPixels(e,t,i,s={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const n=await this.raster.fetchPixels(e,t,i,s);return s.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(n.pixelBlock=n.pixelBlock?.extractBands(s.bandIds)),n}async getSamples(e,t){if(await this.load(),(e=(0,a.PZ)(z.A,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new r.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const i=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:i},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),o=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new P.A({samples:o})}async identify(e,t={}){await this.load(),e=(0,a.PZ)(c.A,e).clone().normalize();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&(!s.hasMultidimensionalTranspose||!(0,f.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null};const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new r.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=(0,d.qg)(i)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return i.identify(e,{...t,bandIds:o})}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((0,f.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,f.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,f.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&(0,d.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;N(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,(0,d.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:s,type:n}=t;if("multipoint"===n)return t.points.map(e=>new c.A({x:e[0],y:e[1],spatialReference:s}));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){const s=await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(4772),i.e(5076)]).then(i.bind(i,88411)),r=(await Promise.all([i.e(3661),i.e(1878),i.e(9117),i.e(4772),i.e(2834)]).then(i.bind(i,23346))).execute(t,{unit:"meters"}),o=Math.min(e.sampleCount||100,1e3);let l=e.sampleDistance;l||(l=r/(o+(2===n.paths[0].length?1:0))),n=s.execute(t,l,{unit:"meters"})}return n.paths.flatMap(e=>e.map(e=>new c.A({x:e[0],y:e[1],spatialReference:s})))}const r=Math.min(e.sampleCount||100,1e3),o="extent"===t.type,l=o?t:t.extent,a=Math.sqrt(l.width*l.height/r),u=l.height/a,h=l.width/a,{xmin:d,ymax:p}=l,f=[];for(let e=0;e<u;e++)for(let i=0;i<h;i++){const n=new c.A({x:d+(i+.5)*a,y:p-(e+.5)*a,spatialReference:s});(o||t.contains(n))&&f.push(n)}return f}_configDefaultInterpolation(){if(null==this.interpolation){N(this);const{raster:e}=this,t=(0,C.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){N(this);const{rasterInfo:t}=this.raster,i=(0,f.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=(0,C.I8)({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??(0,C.ci)(t)),!this.renderer||"override"===e){const e=(0,C.Mm)(this.raster),i=n?.renderer??(0,C.PD)(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,l=o?.max??0,a=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(l>1e24||a<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const r=(0,C.$P)({...this.renderer.toJSON(),variableName:s}),l=(0,C.m7)(t,s);this.symbolizer?(this.symbolizer.rendererJSON=r,this.symbolizer.rasterInfo=l):this.symbolizer=new k.A({rendererJSON:r,rasterInfo:l});const a=this.symbolizer.bind();if(a.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,C.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",a.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,d.qg)(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",R.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,d.qg)(t)?(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,g.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),r=new p.A({rasterFunction:n});r.rasterJobHandler=this._rasterJobHandler,await r.open(),this.raster=r}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!s)return;const{bandIds:n}=this,{bandCount:r}=this.raster.rasterInfo,o=n?.length?n.some(e=>e>=r):r>=3;n&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,s=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*s;if(!e.dataSeries?.length)return[new A.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];const r=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:s},o)=>{const l={Variables:s[0].variableName,Dimensions:s.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of s){l[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];l[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const a=new A.A({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:n,attributes:l});r.push(a)}),r}};function N(e){if(!e.raster||!e.serviceRasterInfo)throw new r.A("imagery-tile","no raster")}return(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_cachedRasterFunctionJson",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_compatibleFullExtent",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"_rasterFunctionUpdatePromise",void 0),(0,s.Cg)([(0,l.MZ)({type:[a.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],D.prototype,"bandIds",void 0),(0,s.Cg)([(0,l.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],D.prototype,"copyright",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1}})],D.prototype,"fullExtent",null),(0,s.Cg)([(0,l.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,F.e)(I.SZ)],D.prototype,"interpolation",void 0),(0,s.Cg)([(0,l.MZ)()],D.prototype,"ioConfig",void 0),(0,s.Cg)([(0,l.MZ)({type:[w.A],json:{write:!0}})],D.prototype,"multidimensionalDefinition",null),(0,s.Cg)([(0,l.MZ)({type:v.A,json:{write:!0}})],D.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,l.MZ)()],D.prototype,"raster",void 0),(0,s.Cg)([(0,l.MZ)({type:R.A})],D.prototype,"rasterFunction",null),(0,s.Cg)([(0,l.MZ)()],D.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,l.MZ)()],D.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{read:!1}})],D.prototype,"spatialReference",void 0),(0,s.Cg)([(0,l.MZ)({type:S.A})],D.prototype,"tileInfo",void 0),(0,s.Cg)([(0,l.MZ)(b.OZ)],D.prototype,"url",null),(0,s.Cg)([(0,l.MZ)({types:M.uy})],D.prototype,"renderer",null),(0,s.Cg)([(0,l.MZ)({types:M.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:M.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],D.prototype,"internalRenderer",null),(0,s.Cg)([(0,B.w)("internalRenderer")],D.prototype,"readRenderer",null),(0,s.Cg)([(0,l.MZ)({clonable:!1})],D.prototype,"symbolizer",void 0),D=(0,s.Cg)([(0,l.$K)("esri.layers.mixins.ImageryTileMixin")],D),D}},91806:(e,t,i)=>{i.d(t,{A:()=>a});var s,n=i(31635),r=i(25482),o=i(91429),l=i(56507);let a=class extends r.o{static{s=this}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.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0),(0,n.Cg)([(0,o.MZ)({type:l.jz,json:{write:!0}})],a.prototype,"level",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"rows",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"scale",void 0),a=s=(0,n.Cg)([(0,o.$K)("esri.layers.support.LOD")],a)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5605],{15605:(t,s,e)=>{e.r(s),e.d(s,{execute:()=>m,executeMany:()=>a});var i=e(4576),n=e(86211),o=e(66070),h=e(83299);const r={round:0,bevel:1,miter:2,square:3};function m(t,s,e={}){const{miterLimit:i=10,flattenError:m=0,joins:a="round",unit:c}=e,f=(0,h.getSpatialReference)(t);c&&f&&(s=(0,n.UW)(s,c,f));const _=(0,h.fromGeometry)(t),P=_.getSpatialReference();return(0,h.toGeometry)((0,o.g7)(_.getGeometry(),P,s,r[a],i,m),P)}function a(t,s,e={}){const{miterLimit:m=10,flattenError:a=0,joins:c="round",unit:f}=e,_=(0,h.getSpatialReference)(t);f&&_&&(s=(0,n.UW)(s,f,_));const[P,d]=(0,h.fromGeometries)(t);return(0,o.zo)(P,d,s,r[c],m,a).map(t=>(0,h.toGeometry)(t,d)).filter(i.Ru)}},66070:(t,s,e)=>{e.d(s,{g7:()=>l,zo:()=>y});var i=e(76061),n=e(95213),o=e(55537),h=e(88885),r=e(83661);const m=1.4142135623730951,a=.017453292519943295,c=256,f=1024;class _{static construct(t,s,e){const i=new _;return i.x=t.x,i.y=t.y,i.m_next=-1,i.m_prev=-1,i.z=s,i.m=e,i.type=0,i}clone(){const t=new _;return t.x=this.x,t.y=this.y,t.m_next=this.m_next,t.m_prev=this.m_prev,t.z=this.z,t.m=this.m,t.type=this.type,t}asPoint2D(){return new r.P(this.x,this.y)}}class P{constructor(t){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=t}constructOffset(){const t=this.m_inputGeometry.getGeometryType();if(t===o.G.enumLine)return this.offsetLine();if(t===o.G.enumEnvelope)return this.offsetEnvelope();if((0,o.f)(t)){const t=new h.P;return t.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=t,this.constructOffset()}if(t===o.G.enumPolyline){const t=new h.P;return this.offsetMultiPath(t),t}if(t===o.G.enumPolygon){const t=new h.a;return this.offsetMultiPath(t),t}(0,o.t)("")}offsetLine(){const t=this.m_inputGeometry,s=t.getStartXY(),e=t.getEndXY(),i=new r.P;i.setSub(e,s),i.normalize(),i.leftPerpendicularThis(),i.scale(this.m_distance),s.addThis(i),e.addThis(i);const n=t.clone();return n.setStartXY(s),n.setEndXY(e),n}offsetEnvelope(){const t=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const s=new h.a;return s.addEnvelope(t,!1),this.m_inputGeometry=s,this.constructOffset()}const s=t.clone();return s.inflateCoords(this.m_distance,this.m_distance),s}progress(){}static buildPoint(t,s,e,i){i.x=t.x+s*Math.cos(e),i.y=t.y+s*Math.sin(e),i.type=t.type,i.z=t.z,i.m=t.m,i.m_next=-1,i.m_prev=-1}addPoint(t){this.m_offsetPts.push(t.clone()),this.m_offsetPtCount++}addPointEx(t,s){if(0===this.m_offsetPtCount)return void this.addPoint(t);const e=this.m_srcPtCount,i=this.m_srcPts[0===s?e-1:s-1],n=this.m_srcPts[s],o=P.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(P.dotSign(i,n,n,this.m_offsetPts[this.m_offsetPtCount-1])>0){const n=new _;let o;o=0===s?e-2:1===s?e-1:s-2;const h=this.m_srcPts[o],m=Math.atan2(i.y-h.y,i.x-h.x);if(P.buildPoint(i,this.m_distance,m-r.o,n),this.m_offsetPts[this.m_offsetPtCount-1]=n.clone(),1===this.m_joins||2===this.m_joins){n.x=.5*(n.x+i.x),n.y=.5*(n.y+i.y),this.addPoint(n),P.buildPoint(i,this.m_distance,this.m_a1+r.o,n);const t=n.clone();t.x=.5*(t.x+i.x),t.y=.5*(t.y+i.y),t.type|=c,this.addPoint(t),this.addPoint(n)}else P.buildPoint(i,this.m_distance,this.m_a1+r.o,n),n.type|=c,this.addPoint(n);this.addPointEx(t,s)}else{const t=new _;if(P.buildPoint(n,this.m_distance,this.m_a1+r.o,t),this.addPoint(t),1===this.m_joins||2===this.m_joins){t.x=.5*(t.x+n.x),t.y=.5*(t.y+n.y),this.addPoint(t),P.buildPoint(n,this.m_distance,this.m_a2-r.o,t);const s=t.clone();s.x=.5*(s.x+n.x),s.y=.5*(s.y+n.y),s.type|=c,this.addPoint(s),this.addPoint(t)}else P.buildPoint(n,this.m_distance,this.m_a2-r.o,t),t.type|=c,this.addPoint(t)}}buildOffset(){const t=new _,s=this.m_srcPtCount;this.m_offsetPtCount=0;const e=.5*this.m_tolerance;let i=0,n=0;for(let o=0;o<s;o++){const h=this.m_srcPts[o],_=0===o?this.m_srcPts[s-1]:this.m_srcPts[o-1],d=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let u,l,y=0;{const t=_.x-h.x,s=_.y-h.y,e=d.x-h.x,m=d.y-h.y;u=Math.atan2(s,t),l=Math.atan2(m,e),this.m_a1=u,this.m_a2=l,0===o&&(i=u,n=l),y=r.P.orientationRobust(h.asPoint2D(),_.asPoint2D(),d.asPoint2D())}const x=l;if(l<u&&(l+=r.p),!(Math.abs(Math.abs(u-l)-Math.PI)<1e-8))if(y*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){P.buildPoint(h,this.m_distance,u+r.o,t),this.addPoint(t);const s=.001;t.x=h.x+(t.x-h.x)*s,t.y=h.y+(t.y-h.y)*s,this.addPoint(t),P.buildPoint(h,this.m_distance,l-r.o,t);const e=t.clone();e.x=h.x+(e.x-h.x)*s,e.y=h.y+(e.y-h.y)*s,e.type|=c,this.addPoint(e),this.addPoint(t)}else{const s=.5*(l-u),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));P.buildPoint(h,e,.5*(u+l),t),this.addPointEx(t,o)}else{if(512&h.type){const s=1-e/Math.abs(this.m_distance);let i=1,n=this.m_distance<0?-Math.PI:Math.PI;if(s>-1&&s<1){let t=2*Math.acos(s);t<a&&(t=a),i=Math.trunc(Math.PI/t+1.5),i>1&&(n/=i)}i<=1&&(i=2,n/=2);let m=u+r.o;P.buildPoint(h,this.m_distance,m,t),0===o&&(t.type|=f),this.addPointEx(t,o);const c=this.m_distance/Math.cos(n/2);for(m+=n/2,P.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);--i>0;)m+=n,P.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);P.buildPoint(h,this.m_distance,l-r.o,t),t.type|=f,this.addPoint(t);continue}if(1!==this.m_joins){if(0===this.m_joins){const s=1-e/Math.abs(this.m_distance);let i=1,n=l-r.o-(u+r.o);if(s>-1&&s<1){let t=2*Math.acos(s);t<a&&(t=a),i=Math.trunc(Math.abs(n)/t+1.5),i>1&&(n/=i)}const m=this.m_distance/Math.cos(.5*n);let c=u+r.o+.5*n;for(P.buildPoint(h,m,c,t),this.addPointEx(t,o);--i>0;)c+=n,P.buildPoint(h,m,c,t),this.addPoint(t);continue}if(2===this.m_joins){const s=_.x-h.x,e=_.y-h.y,i=d.x-h.x,n=d.y-h.y;let a=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(a=Math.max(a,-1),a>1-1e-8){P.buildPoint(h,m*this.m_distance,l-.25*Math.PI,t),this.addPointEx(t,o),P.buildPoint(h,m*this.m_distance,l+.25*Math.PI,t),this.addPoint(t);continue}const c=Math.abs(this.m_distance/Math.sin(.5*Math.acos(a))),f=Math.abs(this.m_miterLimit*this.m_distance);if(c>f){const s=.5*(l-u),e=this.m_distance/Math.abs(Math.sin(s));P.buildPoint(h,e,.5*(u+l),t);const i=r.P.construct(t.x,t.y),n=r.P.construct(h.x,h.y),m=new r.P;m.setSub(i,n);const a=new r.P;a.setScaleAdd(f/m.length(),m,n);const _=Math.sqrt(c*c-this.m_distance*this.m_distance),d=(c-f)*Math.abs(this.m_distance)/_;this.m_distance>0?m.rightPerpendicularThis():m.leftPerpendicularThis(),m.scale(d/m.length());const y=new r.P;y.setAdd(a,m);const x=new r.P;x.setSub(a,m),t.x=y.x,t.y=y.y,this.addPointEx(t,o),t.x=x.x,t.y=x.y,this.addPoint(t);continue}const y=.5*(l-u),x=this.m_distance/Math.abs(Math.sin(y));P.buildPoint(h,x,.5*(u+l),t),this.addPointEx(t,o);continue}{let s;if(l=x,this.m_distance>0?(l>u&&(l-=r.p),s=u-l<r.o):(l<u&&(l+=r.p),s=l-u<r.o),s){const s=this.m_distance*m;let e;e=s<0?u+.25*Math.PI:u+3*Math.PI*.25,P.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?l-.25*Math.PI:l-3*Math.PI*.25,P.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(l-u),e=this.m_distance/Math.abs(Math.sin(s));l<u&&(l+=r.p),P.buildPoint(h,e,(u+l)/2,t),this.addPointEx(t,o)}}}else P.buildPoint(h,this.m_distance,u+r.o,t),this.addPointEx(t,o),P.buildPoint(h,this.m_distance,l-r.o,t),this.addPoint(t)}}return this.m_a1=i,this.m_a2=n,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let t=!1;for(let t=0;t<this.m_offsetPtCount;t++){const s=this.m_offsetPts[t];s.m_next=t+1,s.m_prev=t-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let s=0;for(let e=0;e<this.m_offsetPtCount;e++)if(this.m_offsetPts[s].type&c){const e=this.deleteClosedSeg(s);if(-1===e){t=!0;break}s=e}else s=this.m_offsetPts[s].m_next;return!t&&(this.compressOffsetArray(s),!0)}deleteClosedSeg(t){const s=this.m_offsetPtCount-1;let e,i,n=t;for(let o=1;o<=s-2;o++){n=this.m_offsetPts[n].m_next,e=n,i=t;for(let t=1;t<=o;t++){if(i=this.m_offsetPts[i].m_prev,0===(this.m_offsetPts[i].type&c)&&0===(this.m_offsetPts[e].type&c)){const t=this.handleClosedIntersection(i,e);if(-1!==t)return t}e=this.m_offsetPts[e].m_prev}}return-1}handleClosedIntersection(t,s){const e=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t],n=this.m_offsetPts[this.m_offsetPts[s].m_prev],o=this.m_offsetPts[s];if(!this.sectGraphicRect(e,i,n,o))return-1;const h={pt:new _,bAtExistingPt:!1};if(((i.x-e.x)*(o.y-n.y)-(i.y-e.y)*(o.x-n.x))*this.m_distance<0&&this.findIntersection(e,i,n,o,h)&&!h.bAtExistingPt){const r=1e-8,m=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),a=(i.x-e.x)/m,c=(i.y-e.y)/m,f=Math.sqrt((o.x-n.x)*(o.x-n.x)+(o.y-n.y)*(o.y-n.y)),_=(o.x-n.x)/f,P=(o.y-n.y)/f;let d=!1;const u=h.pt.clone();u.x+=(a+_)*r,u.y+=(c+P)*r;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>u.y!=l.y>u.y&&u.x<(l.x-y.x)*(u.y-y.y)/(l.y-y.y)+y.x&&(d=!d),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(d)return-1;const p=this.m_offsetPts[t].m_prev;return h.pt.type=i.type,h.pt.m_next=s,h.pt.m_prev=p,this.m_offsetPts[t]=h.pt,this.m_offsetPts[s].m_prev=t,s}return-1}sectGraphicRect(t,s,e,i){return Math.max(t.x,s.x)>=Math.min(e.x,i.x)&&Math.max(e.x,i.x)>=Math.min(t.x,s.x)&&Math.max(t.y,s.y)>=Math.min(e.y,i.y)&&Math.max(e.y,i.y)>=Math.min(t.y,s.y)}findIntersection(t,s,e,i,n){let o,h,r,m;return n.bAtExistingPt=!1,o=(s.y-t.y)*(i.x-e.x)-(s.x-t.x)*(i.y-e.y),h=(e.y-t.y)*(s.x-t.x)-(e.x-t.x)*(s.y-t.y),r=0===o?2:h/o,r>=0&&r<=1&&(m=r,o=(i.y-e.y)*(s.x-t.x)-(i.x-e.x)*(s.y-t.y),h=(t.y-e.y)*(i.x-e.x)-(t.x-e.x)*(i.y-e.y),r=0===o?2:h/o,r>=0&&r<=1)&&(n.pt.x=t.x+r*(s.x-t.x),n.pt.y=t.y+r*(s.y-t.y),this.m_bUseZ&&(n.pt.z=e.z+m*(i.z-e.z)),this.m_bUseM&&(n.pt.m=e.m+m*(i.m-e.m)),0!==m&&1!==m||0!==r&&1!==r||(n.bAtExistingPt=!0),!((0===m||1===m)&&r>0&&r<1||(0===r||1===r)&&m>0&&m<1))}compressOffsetArray(t){for(;this.m_offsetPts[t].m_prev<t;)t=this.m_offsetPts[t].m_prev;let s=0,e=t;do{const t=this.m_offsetPts[e].clone();this.m_offsetPts[s]=t,e=t.m_next,s++}while(e!==t);this.m_offsetPts[s]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=s+1}addPart(t,s){if(!(s<2))for(let e=0;e<s;e++){const s=this.m_offsetPts[t+e];if(e?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(s.x,s.y,s.z):this.m_resultPath.lineToCoords(s.x,s.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(s.x,s.y,s.z):this.m_resultPath.startPathCoords(s.x,s.y),this.m_bUseM){const t=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,t,0,s.m)}}}offsetMultiPath(t){const s=(0,h.d)(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),e=s.querySegmentIterator();e.resetToFirstPath();let i=-1;for(;e.nextPath();)i++,this.offsetPath(s,i,t)}offsetPath(t,s,e){let i=t.getPathStart(s),n=t.getPathEnd(s);if(this.m_resultPath=e,t.isClosedPath(s)){const s=t.getXY(i);for(;n>i&&t.getXY(n-1).equals(s);)n--;if(n-i>=2){this.m_srcPtCount=n-i,this.m_srcPts.length=this.m_srcPtCount;for(let s=i;s<n;s++)this.progress(),this.m_srcPts[s-i]=_.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const s=t.getXY(i);for(;i<n-1&&t.getXY(i+1).equals(s);)i++;const e=t.getXY(n-1);for(;i<n-1&&t.getXY(n-2).equals(e);)n--;if(n-i>=2){this.m_srcPtCount=2*(n-i)-2,this.m_srcPts.length=this.m_srcPtCount;let e=_.construct(s,this.m_bUseZ?t.getAttributeAsDbl(1,i,0):0,this.m_bUseM?t.getAttributeAsDbl(2,i,0):0);e.type|=1536,this.m_srcPts[0]=e;let o=1,h=this.m_srcPtCount-1;for(let s=i+1;s<n-1;s++,o++,h--)this.progress(),e=_.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0),this.m_srcPts[o]=e.clone(),e.type|=f,this.m_srcPts[h]=e.clone();if(e=_.construct(t.getXY(n-1),this.m_bUseZ?t.getAttributeAsDbl(1,n-1,0):0,this.m_bUseM?t.getAttributeAsDbl(2,n-1,0):0),e.type|=512,this.m_srcPts[o]=e.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let t=-1,s=-1,e=0!==(this.m_offsetPts[this.m_offsetPtCount-1].type&f);e||(t=0);for(let i=1;i<this.m_offsetPtCount;i++){this.progress();const n=0!==(this.m_offsetPts[i].type&f);n?e||(s=i-1,s-t+1>1&&this.addPart(t,s-t+1)):e&&(t=i-1),e=n}e||(s=this.m_offsetPtCount-1,s-t+1>1&&this.addPart(t,s-t+1))}else{const t=0,s=this.m_offsetPtCount-1;s-t>=1&&this.addPart(t,s-t+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(t,s,e,i){const n=s.x-t.x,o=s.y-t.y,h=i.x-e.x,m=i.y-e.y,a=(0,r.t)(n,o,h,m);return(0,r.e)(a)}}class d extends i.G{constructor(t,s,e,i,n,o,h){super(),this.m_progressTracker=h,this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=s,this.m_distance=e,this.m_joins=i,this.m_miterLimit=n,this.m_flattenError=o}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let t;for(;t=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(t);return null}getGeometryID(){return this.m_index}offset(t){let s;return(0,o.c)(t),s=this.m_flattenError<=0?(0,n.b)(this.m_spatialReference,t,!0).total():this.m_flattenError,function(t,s,e,i,n,h){if(null===t&&(0,o.a)(""),t.getDimension()<1&&(0,o.a)(""),n>0||(0,o.a)(""),(0,o.c)(t),0===s||t.isEmpty())return t;const r=new P(h);return r.m_bUseZ=t.hasAttribute(1),r.m_bUseM=t.hasAttribute(2),r.m_inputGeometry=t,r.m_distance=s,r.m_tolerance=n,r.m_joins=e,r.m_miterLimit=i>1?i:1,r.m_progressCounter=0,r.constructOffset()}(t,this.m_distance,this.m_joins,this.m_miterLimit,s,this.m_progressTracker)}}const u=new class{getOperatorType(){return 10108}accelerateGeometry(t,s,e){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,s,e,i,n,o,h){return new d(t,s,e,i,n,o,h)}execute(t,s,e,i,n,o,h){return new d(null,s,e,i,n,o,h).offset(t)}};function l(t,s,e,i,n,o){return u.execute(t,s,e,i,n,o,null)}function y(t,s,e,n,o,h){const r=u.executeMany(new i.S(t),s,e,n,o,h,null);return Array.from(r)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5605],{15605:(t,s,e)=>{e.r(s),e.d(s,{execute:()=>m,executeMany:()=>a});var i=e(4576),n=e(86211),o=e(66070),h=e(34772);const r={round:0,bevel:1,miter:2,square:3};function m(t,s,e={}){const{miterLimit:i=10,flattenError:m=0,joins:a="round",unit:c}=e,f=(0,h.getSpatialReference)(t);c&&f&&(s=(0,n.UW)(s,c,f));const _=(0,h.fromGeometry)(t),P=_.getSpatialReference();return(0,h.toGeometry)((0,o.g7)(_.getGeometry(),P,s,r[a],i,m),P)}function a(t,s,e={}){const{miterLimit:m=10,flattenError:a=0,joins:c="round",unit:f}=e,_=(0,h.getSpatialReference)(t);f&&_&&(s=(0,n.UW)(s,f,_));const[P,d]=(0,h.fromGeometries)(t);return(0,o.zo)(P,d,s,r[c],m,a).map(t=>(0,h.toGeometry)(t,d)).filter(i.Ru)}},66070:(t,s,e)=>{e.d(s,{g7:()=>l,zo:()=>y});var i=e(76061),n=e(95213),o=e(55537),h=e(88885),r=e(83661);const m=1.4142135623730951,a=.017453292519943295,c=256,f=1024;class _{static construct(t,s,e){const i=new _;return i.x=t.x,i.y=t.y,i.m_next=-1,i.m_prev=-1,i.z=s,i.m=e,i.type=0,i}clone(){const t=new _;return t.x=this.x,t.y=this.y,t.m_next=this.m_next,t.m_prev=this.m_prev,t.z=this.z,t.m=this.m,t.type=this.type,t}asPoint2D(){return new r.P(this.x,this.y)}}class P{constructor(t){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=t}constructOffset(){const t=this.m_inputGeometry.getGeometryType();if(t===o.G.enumLine)return this.offsetLine();if(t===o.G.enumEnvelope)return this.offsetEnvelope();if((0,o.f)(t)){const t=new h.P;return t.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=t,this.constructOffset()}if(t===o.G.enumPolyline){const t=new h.P;return this.offsetMultiPath(t),t}if(t===o.G.enumPolygon){const t=new h.a;return this.offsetMultiPath(t),t}(0,o.t)("")}offsetLine(){const t=this.m_inputGeometry,s=t.getStartXY(),e=t.getEndXY(),i=new r.P;i.setSub(e,s),i.normalize(),i.leftPerpendicularThis(),i.scale(this.m_distance),s.addThis(i),e.addThis(i);const n=t.clone();return n.setStartXY(s),n.setEndXY(e),n}offsetEnvelope(){const t=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const s=new h.a;return s.addEnvelope(t,!1),this.m_inputGeometry=s,this.constructOffset()}const s=t.clone();return s.inflateCoords(this.m_distance,this.m_distance),s}progress(){}static buildPoint(t,s,e,i){i.x=t.x+s*Math.cos(e),i.y=t.y+s*Math.sin(e),i.type=t.type,i.z=t.z,i.m=t.m,i.m_next=-1,i.m_prev=-1}addPoint(t){this.m_offsetPts.push(t.clone()),this.m_offsetPtCount++}addPointEx(t,s){if(0===this.m_offsetPtCount)return void this.addPoint(t);const e=this.m_srcPtCount,i=this.m_srcPts[0===s?e-1:s-1],n=this.m_srcPts[s],o=P.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(P.dotSign(i,n,n,this.m_offsetPts[this.m_offsetPtCount-1])>0){const n=new _;let o;o=0===s?e-2:1===s?e-1:s-2;const h=this.m_srcPts[o],m=Math.atan2(i.y-h.y,i.x-h.x);if(P.buildPoint(i,this.m_distance,m-r.o,n),this.m_offsetPts[this.m_offsetPtCount-1]=n.clone(),1===this.m_joins||2===this.m_joins){n.x=.5*(n.x+i.x),n.y=.5*(n.y+i.y),this.addPoint(n),P.buildPoint(i,this.m_distance,this.m_a1+r.o,n);const t=n.clone();t.x=.5*(t.x+i.x),t.y=.5*(t.y+i.y),t.type|=c,this.addPoint(t),this.addPoint(n)}else P.buildPoint(i,this.m_distance,this.m_a1+r.o,n),n.type|=c,this.addPoint(n);this.addPointEx(t,s)}else{const t=new _;if(P.buildPoint(n,this.m_distance,this.m_a1+r.o,t),this.addPoint(t),1===this.m_joins||2===this.m_joins){t.x=.5*(t.x+n.x),t.y=.5*(t.y+n.y),this.addPoint(t),P.buildPoint(n,this.m_distance,this.m_a2-r.o,t);const s=t.clone();s.x=.5*(s.x+n.x),s.y=.5*(s.y+n.y),s.type|=c,this.addPoint(s),this.addPoint(t)}else P.buildPoint(n,this.m_distance,this.m_a2-r.o,t),t.type|=c,this.addPoint(t)}}buildOffset(){const t=new _,s=this.m_srcPtCount;this.m_offsetPtCount=0;const e=.5*this.m_tolerance;let i=0,n=0;for(let o=0;o<s;o++){const h=this.m_srcPts[o],_=0===o?this.m_srcPts[s-1]:this.m_srcPts[o-1],d=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let u,l,y=0;{const t=_.x-h.x,s=_.y-h.y,e=d.x-h.x,m=d.y-h.y;u=Math.atan2(s,t),l=Math.atan2(m,e),this.m_a1=u,this.m_a2=l,0===o&&(i=u,n=l),y=r.P.orientationRobust(h.asPoint2D(),_.asPoint2D(),d.asPoint2D())}const x=l;if(l<u&&(l+=r.p),!(Math.abs(Math.abs(u-l)-Math.PI)<1e-8))if(y*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){P.buildPoint(h,this.m_distance,u+r.o,t),this.addPoint(t);const s=.001;t.x=h.x+(t.x-h.x)*s,t.y=h.y+(t.y-h.y)*s,this.addPoint(t),P.buildPoint(h,this.m_distance,l-r.o,t);const e=t.clone();e.x=h.x+(e.x-h.x)*s,e.y=h.y+(e.y-h.y)*s,e.type|=c,this.addPoint(e),this.addPoint(t)}else{const s=.5*(l-u),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));P.buildPoint(h,e,.5*(u+l),t),this.addPointEx(t,o)}else{if(512&h.type){const s=1-e/Math.abs(this.m_distance);let i=1,n=this.m_distance<0?-Math.PI:Math.PI;if(s>-1&&s<1){let t=2*Math.acos(s);t<a&&(t=a),i=Math.trunc(Math.PI/t+1.5),i>1&&(n/=i)}i<=1&&(i=2,n/=2);let m=u+r.o;P.buildPoint(h,this.m_distance,m,t),0===o&&(t.type|=f),this.addPointEx(t,o);const c=this.m_distance/Math.cos(n/2);for(m+=n/2,P.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);--i>0;)m+=n,P.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);P.buildPoint(h,this.m_distance,l-r.o,t),t.type|=f,this.addPoint(t);continue}if(1!==this.m_joins){if(0===this.m_joins){const s=1-e/Math.abs(this.m_distance);let i=1,n=l-r.o-(u+r.o);if(s>-1&&s<1){let t=2*Math.acos(s);t<a&&(t=a),i=Math.trunc(Math.abs(n)/t+1.5),i>1&&(n/=i)}const m=this.m_distance/Math.cos(.5*n);let c=u+r.o+.5*n;for(P.buildPoint(h,m,c,t),this.addPointEx(t,o);--i>0;)c+=n,P.buildPoint(h,m,c,t),this.addPoint(t);continue}if(2===this.m_joins){const s=_.x-h.x,e=_.y-h.y,i=d.x-h.x,n=d.y-h.y;let a=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(a=Math.max(a,-1),a>1-1e-8){P.buildPoint(h,m*this.m_distance,l-.25*Math.PI,t),this.addPointEx(t,o),P.buildPoint(h,m*this.m_distance,l+.25*Math.PI,t),this.addPoint(t);continue}const c=Math.abs(this.m_distance/Math.sin(.5*Math.acos(a))),f=Math.abs(this.m_miterLimit*this.m_distance);if(c>f){const s=.5*(l-u),e=this.m_distance/Math.abs(Math.sin(s));P.buildPoint(h,e,.5*(u+l),t);const i=r.P.construct(t.x,t.y),n=r.P.construct(h.x,h.y),m=new r.P;m.setSub(i,n);const a=new r.P;a.setScaleAdd(f/m.length(),m,n);const _=Math.sqrt(c*c-this.m_distance*this.m_distance),d=(c-f)*Math.abs(this.m_distance)/_;this.m_distance>0?m.rightPerpendicularThis():m.leftPerpendicularThis(),m.scale(d/m.length());const y=new r.P;y.setAdd(a,m);const x=new r.P;x.setSub(a,m),t.x=y.x,t.y=y.y,this.addPointEx(t,o),t.x=x.x,t.y=x.y,this.addPoint(t);continue}const y=.5*(l-u),x=this.m_distance/Math.abs(Math.sin(y));P.buildPoint(h,x,.5*(u+l),t),this.addPointEx(t,o);continue}{let s;if(l=x,this.m_distance>0?(l>u&&(l-=r.p),s=u-l<r.o):(l<u&&(l+=r.p),s=l-u<r.o),s){const s=this.m_distance*m;let e;e=s<0?u+.25*Math.PI:u+3*Math.PI*.25,P.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?l-.25*Math.PI:l-3*Math.PI*.25,P.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(l-u),e=this.m_distance/Math.abs(Math.sin(s));l<u&&(l+=r.p),P.buildPoint(h,e,(u+l)/2,t),this.addPointEx(t,o)}}}else P.buildPoint(h,this.m_distance,u+r.o,t),this.addPointEx(t,o),P.buildPoint(h,this.m_distance,l-r.o,t),this.addPoint(t)}}return this.m_a1=i,this.m_a2=n,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let t=!1;for(let t=0;t<this.m_offsetPtCount;t++){const s=this.m_offsetPts[t];s.m_next=t+1,s.m_prev=t-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let s=0;for(let e=0;e<this.m_offsetPtCount;e++)if(this.m_offsetPts[s].type&c){const e=this.deleteClosedSeg(s);if(-1===e){t=!0;break}s=e}else s=this.m_offsetPts[s].m_next;return!t&&(this.compressOffsetArray(s),!0)}deleteClosedSeg(t){const s=this.m_offsetPtCount-1;let e,i,n=t;for(let o=1;o<=s-2;o++){n=this.m_offsetPts[n].m_next,e=n,i=t;for(let t=1;t<=o;t++){if(i=this.m_offsetPts[i].m_prev,0===(this.m_offsetPts[i].type&c)&&0===(this.m_offsetPts[e].type&c)){const t=this.handleClosedIntersection(i,e);if(-1!==t)return t}e=this.m_offsetPts[e].m_prev}}return-1}handleClosedIntersection(t,s){const e=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t],n=this.m_offsetPts[this.m_offsetPts[s].m_prev],o=this.m_offsetPts[s];if(!this.sectGraphicRect(e,i,n,o))return-1;const h={pt:new _,bAtExistingPt:!1};if(((i.x-e.x)*(o.y-n.y)-(i.y-e.y)*(o.x-n.x))*this.m_distance<0&&this.findIntersection(e,i,n,o,h)&&!h.bAtExistingPt){const r=1e-8,m=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),a=(i.x-e.x)/m,c=(i.y-e.y)/m,f=Math.sqrt((o.x-n.x)*(o.x-n.x)+(o.y-n.y)*(o.y-n.y)),_=(o.x-n.x)/f,P=(o.y-n.y)/f;let d=!1;const u=h.pt.clone();u.x+=(a+_)*r,u.y+=(c+P)*r;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>u.y!=l.y>u.y&&u.x<(l.x-y.x)*(u.y-y.y)/(l.y-y.y)+y.x&&(d=!d),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(d)return-1;const p=this.m_offsetPts[t].m_prev;return h.pt.type=i.type,h.pt.m_next=s,h.pt.m_prev=p,this.m_offsetPts[t]=h.pt,this.m_offsetPts[s].m_prev=t,s}return-1}sectGraphicRect(t,s,e,i){return Math.max(t.x,s.x)>=Math.min(e.x,i.x)&&Math.max(e.x,i.x)>=Math.min(t.x,s.x)&&Math.max(t.y,s.y)>=Math.min(e.y,i.y)&&Math.max(e.y,i.y)>=Math.min(t.y,s.y)}findIntersection(t,s,e,i,n){let o,h,r,m;return n.bAtExistingPt=!1,o=(s.y-t.y)*(i.x-e.x)-(s.x-t.x)*(i.y-e.y),h=(e.y-t.y)*(s.x-t.x)-(e.x-t.x)*(s.y-t.y),r=0===o?2:h/o,r>=0&&r<=1&&(m=r,o=(i.y-e.y)*(s.x-t.x)-(i.x-e.x)*(s.y-t.y),h=(t.y-e.y)*(i.x-e.x)-(t.x-e.x)*(i.y-e.y),r=0===o?2:h/o,r>=0&&r<=1)&&(n.pt.x=t.x+r*(s.x-t.x),n.pt.y=t.y+r*(s.y-t.y),this.m_bUseZ&&(n.pt.z=e.z+m*(i.z-e.z)),this.m_bUseM&&(n.pt.m=e.m+m*(i.m-e.m)),0!==m&&1!==m||0!==r&&1!==r||(n.bAtExistingPt=!0),!((0===m||1===m)&&r>0&&r<1||(0===r||1===r)&&m>0&&m<1))}compressOffsetArray(t){for(;this.m_offsetPts[t].m_prev<t;)t=this.m_offsetPts[t].m_prev;let s=0,e=t;do{const t=this.m_offsetPts[e].clone();this.m_offsetPts[s]=t,e=t.m_next,s++}while(e!==t);this.m_offsetPts[s]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=s+1}addPart(t,s){if(!(s<2))for(let e=0;e<s;e++){const s=this.m_offsetPts[t+e];if(e?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(s.x,s.y,s.z):this.m_resultPath.lineToCoords(s.x,s.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(s.x,s.y,s.z):this.m_resultPath.startPathCoords(s.x,s.y),this.m_bUseM){const t=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,t,0,s.m)}}}offsetMultiPath(t){const s=(0,h.d)(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),e=s.querySegmentIterator();e.resetToFirstPath();let i=-1;for(;e.nextPath();)i++,this.offsetPath(s,i,t)}offsetPath(t,s,e){let i=t.getPathStart(s),n=t.getPathEnd(s);if(this.m_resultPath=e,t.isClosedPath(s)){const s=t.getXY(i);for(;n>i&&t.getXY(n-1).equals(s);)n--;if(n-i>=2){this.m_srcPtCount=n-i,this.m_srcPts.length=this.m_srcPtCount;for(let s=i;s<n;s++)this.progress(),this.m_srcPts[s-i]=_.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const s=t.getXY(i);for(;i<n-1&&t.getXY(i+1).equals(s);)i++;const e=t.getXY(n-1);for(;i<n-1&&t.getXY(n-2).equals(e);)n--;if(n-i>=2){this.m_srcPtCount=2*(n-i)-2,this.m_srcPts.length=this.m_srcPtCount;let e=_.construct(s,this.m_bUseZ?t.getAttributeAsDbl(1,i,0):0,this.m_bUseM?t.getAttributeAsDbl(2,i,0):0);e.type|=1536,this.m_srcPts[0]=e;let o=1,h=this.m_srcPtCount-1;for(let s=i+1;s<n-1;s++,o++,h--)this.progress(),e=_.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0),this.m_srcPts[o]=e.clone(),e.type|=f,this.m_srcPts[h]=e.clone();if(e=_.construct(t.getXY(n-1),this.m_bUseZ?t.getAttributeAsDbl(1,n-1,0):0,this.m_bUseM?t.getAttributeAsDbl(2,n-1,0):0),e.type|=512,this.m_srcPts[o]=e.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let t=-1,s=-1,e=0!==(this.m_offsetPts[this.m_offsetPtCount-1].type&f);e||(t=0);for(let i=1;i<this.m_offsetPtCount;i++){this.progress();const n=0!==(this.m_offsetPts[i].type&f);n?e||(s=i-1,s-t+1>1&&this.addPart(t,s-t+1)):e&&(t=i-1),e=n}e||(s=this.m_offsetPtCount-1,s-t+1>1&&this.addPart(t,s-t+1))}else{const t=0,s=this.m_offsetPtCount-1;s-t>=1&&this.addPart(t,s-t+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(t,s,e,i){const n=s.x-t.x,o=s.y-t.y,h=i.x-e.x,m=i.y-e.y,a=(0,r.t)(n,o,h,m);return(0,r.e)(a)}}class d extends i.G{constructor(t,s,e,i,n,o,h){super(),this.m_progressTracker=h,this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=s,this.m_distance=e,this.m_joins=i,this.m_miterLimit=n,this.m_flattenError=o}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let t;for(;t=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(t);return null}getGeometryID(){return this.m_index}offset(t){let s;return(0,o.c)(t),s=this.m_flattenError<=0?(0,n.b)(this.m_spatialReference,t,!0).total():this.m_flattenError,function(t,s,e,i,n,h){if(null===t&&(0,o.a)(""),t.getDimension()<1&&(0,o.a)(""),n>0||(0,o.a)(""),(0,o.c)(t),0===s||t.isEmpty())return t;const r=new P(h);return r.m_bUseZ=t.hasAttribute(1),r.m_bUseM=t.hasAttribute(2),r.m_inputGeometry=t,r.m_distance=s,r.m_tolerance=n,r.m_joins=e,r.m_miterLimit=i>1?i:1,r.m_progressCounter=0,r.constructOffset()}(t,this.m_distance,this.m_joins,this.m_miterLimit,s,this.m_progressTracker)}}const u=new class{getOperatorType(){return 10108}accelerateGeometry(t,s,e){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,s,e,i,n,o,h){return new d(t,s,e,i,n,o,h)}execute(t,s,e,i,n,o,h){return new d(null,s,e,i,n,o,h).offset(t)}};function l(t,s,e,i,n,o){return u.execute(t,s,e,i,n,o,null)}function y(t,s,e,n,o,h){const r=u.executeMany(new i.S(t),s,e,n,o,h,null);return Array.from(r)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[905],{10427:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(31635),r=s(91429),o=s(35625);let n=class extends o.R{constructor(e){super(e),this.type="location",this.xField=null,this.yField=null}};(0,i.Cg)([(0,r.MZ)({type:["location"]})],n.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],n.prototype,"xField",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],n.prototype,"yField",void 0),n=(0,i.Cg)([(0,r.$K)("esri.layers.support.ParquetGeometryEncodingLocation")],n)},16238:(e,t,s)=>{s.d(t,{A:()=>n});var i=s(31635),r=s(91429),o=s(35625);let n=class extends o.R{constructor(e){super(e),this.type="wkb",this.field=null}};(0,i.Cg)([(0,r.MZ)({type:["wkb"]})],n.prototype,"type",void 0),(0,i.Cg)([(0,r.MZ)({type:["counter-clockwise"],json:{write:!0}})],n.prototype,"orientation",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],n.prototype,"field",void 0),n=(0,i.Cg)([(0,r.$K)("esri.layers.support.ParquetGeometryEncodingWkb")],n)},35625:(e,t,s)=>{s.d(t,{R:()=>a});var i=s(31635),r=s(69540),o=s(25482),n=s(91429);let a=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,n.MZ)({type:["wkb","location"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),a=(0,i.Cg)([(0,n.$K)("esri.layers.support.ParquetGeometryEncodingBase")],a)},42760:(e,t,s)=>{s.d(t,{hG:()=>f,nc:()=>h,sA:()=>d,ye:()=>p}),s(7762);var i=s(49186),r=s(66552),o=s(16930),n=s(20437),a=s(54625),u=s(10427),l=s(16238),c=s(70581);const p=new r.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function d(e){return p.toJSON(e)}function f(e){return p.fromJSON(e)}async function h(e,t={}){if(e.urls.length<1)throw new i.A("parquet:bad-input","At least one url must be specified",e);if(e.geometryType&&e.spatialReference&&e.geometryEncoding&&e.fields)return e;const s=await(0,c.DV)(e.urls.getItemAt(0),{getCustomParameters:()=>t.customParameters}),r=(0,c.hD)(s),p={...e,file:s};null==p.fields&&(p.fields=s.fields().map(e=>n.A.fromJSON({name:e.name,alias:e.name,type:e.type}))),null==p.geometryEncoding&&(p.geometryEncoding=function(e,t){if(null!=e){const t=e.primary_column,s=e.columns[t];return new l.A({field:t,orientation:"counterclockwise"===s.orientation?"counter-clockwise":null})}const s=(0,a.i_)(t.map(e=>e.name));return s.latitudeFieldName&&s.longitudeFieldName?new u.A({xField:s.longitudeFieldName,yField:s.latitudeFieldName}):null}(r,p.fields));const d=(0,c.Hj)(s);if(d)switch(d.mode){case"z":p.displayOptimization={mode:"z"};break;case"xz":{const e=d.multiscale;if(!e)throw new i.A("parquet:bad-format","XZ display optimization requires multiscale geometries");p.displayOptimization={mode:"xz",multiscale:e};break}}if(!p.geometryEncoding)return p;switch(p.geometryEncoding.type){case"location":null==p.spatialReference&&(p.spatialReference=o.A.WGS84),null==p.geometryType&&(p.geometryType="point");break;case"wkb":{if(!r)return p;const e=r.primary_column,t=r.columns[e];if(p.geometryType||(p.geometryType=function(e){const{geometry_types:t}=e,s=new Set;for(const e of t){const t=y(e);t&&s.add(t)}if(s.size>1)throw new i.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(t)),p.spatialReference||(p.spatialReference=function(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new o.A({wkid:t}):void 0}(t)),p.fields)for(const e of Object.keys(r.columns))p.fields=p.fields.filter(t=>t.name!==e)}}return p}function y(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}},48459:(e,t,s)=>{s.r(t),s.d(t,{default:()=>O});var i=s(31635),r=s(7762),o=s(21818),n=s(49186),a=s(44208),u=s(53966),l=s(563),c=s(16930),p=s(70328),d=s(56390),f=s(8384),h=s(64714),y=s(20437),m=s(95466),g=s(30524),_=s(10427),S=s(16238);function w(e){switch(e.type){case"wkb":return S.A.fromJSON(e);case"location":return _.A.fromJSON(e)}}var z=s(42760),x=s(70581),R=s(30661),b=s(28923),v=s(44320),I=s(35258),F=s(16630);const C=new R.Z,A=8e3,q="__OBJECTID";class O{constructor(){this._fileInfos=new Map,this._queue=new l.QueueProcessor({concurrency:4,process:(e,t)=>this._executeQuery(e,t)})}async load(e){const t=e.spatialReference?c.A.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");const s=await(0,z.nc)({urls:new r.A(e.urls),fields:e.fields?.map(e=>y.A.fromJSON(e)),geometryEncoding:e.geometryEncoding?w(e.geometryEncoding):null,geometryType:e.geometryType?(0,z.hG)(e.geometryType):null,spatialReference:t},{customParameters:e.customParameters});let o;if(s.geometryType&&s.geometryEncoding){if(!s.spatialReference)throw new n.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new n.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(u.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=c.A.WGS84),o={geometryType:(0,z.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),geometryEncoding:s.geometryEncoding.toJSON(),displayOptimization:s.displayOptimization}}this.setCustomParameters(e.customParameters),this._geometryInfo=o;const a=e.urls;for(const e of a){const t=await(0,x.DV)(e,{geometryInfo:o,outSpatialReference:null,getCustomParameters:()=>this._customParameters});this._fileInfos.set(e,{index:this._fileInfos.size,file:t})}this._capabilities=k(await this.getFileStatistics());const l=this._fileInfos.values().next().value?.file;if(!l)return{layerDefinition:{},capabilities:k(null)};const{fields:d}=s;if(null==d)throw new n.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",d);d.push(new y.A({name:q,type:"oid",alias:q}));const f={fields:d.map(e=>({...e.toJSON(),column:l.columnForFieldName(e.name)})),timeZoneByFieldName:null},g=m.A.fromJSON(f);this._fieldsIndex=g;const _=(0,z.sA)(s.geometryType??"point");if(this._metadata=I.i.createFeature({fieldsIndex:f,geometryType:_,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:o?.geometryType??"esriGeometryPoint",featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:o?.spatialReference??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},s.spatialReference&&(this._fullExtent=function(e,t){const s=(0,p.hZ)((0,p.vt)(),p.qv);for(const t of e){const e=(0,x.hD)(t.file);if(!e)return null;const i=e.columns[e.primary_column];if(!i.bbox)return null;const r=P(i.bbox);(0,p.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:t}}(this._fileInfos.values(),s.spatialReference.toJSON())),null==this._fullExtent&&"location"===s.geometryEncoding?.type){const{yField:e,xField:t}=s.geometryEncoding,r=this._fieldsIndex.get(t)?.column,o=this._fieldsIndex.get(e)?.column,n=(0,p.hZ)((0,p.vt)(),p.qv);for(const e of this._fileInfos.values())for(const t of e.file.rowGroups()){const e={stack:[],error:void 0,hasError:!1};try{const s=(0,i.mS)(e,t.columnDescriptorForAttribute(r),!1),a=(0,i.mS)(e,t.columnDescriptorForAttribute(o),!1),u=[s.minValue(),a.minValue(),s.maxValue(),a.maxValue()];(0,p.DC)(n,u),t.free()}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}this._fullExtent={xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:s.spatialReference?.toJSON()}}return{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(e=>e.toJSON()),drawingInfo:(0,h.F0)(_),extent:this._fullExtent??void 0,geometryType:_,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){for(const e of this._fileInfos.values())e.file.free();this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(e){this._customParameters=e}getFileStatistics(){if(!this._fileInfos.size)return null;const e=Array.from(this._fileInfos.values()).reduce((e,t)=>e+t.file.byteLength(),0);return{featureCount:this._getFeatureCount(),byteLength:e}}async updateFiles(e){const t=new Set(e);for(const[e,s]of this._fileInfos.entries())t.has(e)?t.delete(e):(s.file.free(),this._fileInfos.delete(e));for(const e of t){const t=await(0,x.DV)(e,{geometryInfo:this._geometryInfo,outSpatialReference:null,getCustomParameters:()=>this._customParameters});this._fileInfos.set(e,{index:this._fileInfos.size,file:t})}}async queryFeatures(e,t){return this._validateQuery(e),function(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}(e)||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0),(e.outStatistics||e.returnDistinctValues)&&delete e.returnGeometry,(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){return this._validateQuery(e),M(e)?(delete e.outFields,delete e.returnGeometry,(await this._enqueueQuery(e,t)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(e,t){return this._validateQuery(e),M(e)?(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,8e3):8e3,e.resultOffset=e.resultOffset??0,delete e.returnGeometry,delete e.outFields,(await this._enqueueQuery(e,t)).items.map(e=>e.getObjectId())):Array.from({length:this._getFeatureCount()},(e,t)=>t)}async queryExtent(e,t){if(this._validateQuery(e),this._fullExtent&&!M(e))return{count:this._getFeatureCount(),extent:this._fullExtent};const s=(0,o.zI)(this._metadata.spatialReference);e.returnGeometry=!0,delete e.outFields;const i=(0,p.hZ)((0,p.vt)(),p.qv),r=(0,p.vt)(),n=await this._enqueueQuery(e,t);let a=0;for(const e of n.items)e.getBounds(r)&&((0,p.RF)(i,r),a+=1);return{count:a,extent:(0,d.Wc)(i,s,e.outSR?(0,o.zI)(e.outSR):s,s,!1)}}_getFeatureCount(){return Array.from(this._fileInfos.values()).reduce((e,t)=>e+t.file.numRows(),0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new n.A("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new n.A("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new n.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async*_fetchChunks(e,t){for(const s of this._fileInfos.values()){const i=s.file.numRows(),r=Math.ceil(i/A);for(let i=0;i<r;i++){const r=i*A,o=await s.file.readChunk(r,A,e.fields,e.returnGeometry,t);for(const e of o){const t=new F.s(this._metadata,this._fieldsIndex,e,0,s.index),i=E([new b.j(t,null,0,!1)],this._queryEngineParams);yield i}}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const s=await this._getReadParams(e);if(e.objectIds?.length)for(const i of this._fileInfos.values()){const r=[],o=E((await i.file.readChunksByRowId(new Uint32Array(e.objectIds),s.fields,s.returnGeometry,t)).map((e,t)=>new F.s(this._metadata,this._fieldsIndex,e,t,i.index)).map((e,t)=>new b.j(e,null,t,!1)),this._queryEngineParams),n=await o.executeQueryForOpaqueFeatures(e,t);for(const e of n)r.push(e);return new f.G(r,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:C})}let i=e.resultRecordCount??this._getFeatureCount(),r=e.resultOffset??0;delete e.resultRecordCount,delete e.resultOffset;const o=[];for await(const n of this._fetchChunks(s,t)){const s=await n.executeQueryForOpaqueFeatures(e,t);if(s.length>r){const t=s.slice(r,Math.min(r+i,s.length));for(const e of t)o.push(e);if(r=0,i-=t.length,0===i)return new f.G(o,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:C})}else r-=s.length}return new f.G(o,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:C})}async _getReadParams(e){const t=new Set;if(e.where&&await(0,g.hz)(t,this._fieldsIndex,e.where),e.outStatistics)for(const s of e.outStatistics)null!=s.onStatisticField&&t.add(s.onStatisticField);if(e.outFields)for(const s of e.outFields)t.add(s);return{fields:this._getAttributeIds(Array.from(t)),returnGeometry:!!e.returnGeometry||!!e.geometry}}_getAttributeIds(e){if(null==e)return new Uint32Array;if(e.includes("*"))return new Uint32Array(this._fieldsIndex.fields.map(e=>e.column).filter(e=>null!=e));const t=[];for(const s of e){const e=this._fieldsIndex.get(s);if(null==e)throw new n.A("unknown-field",`Field ${s} does not exist`);null==e.column||t.push(e.column)}return new Uint32Array(t)}}function M(e){return Object.keys(e).some(e=>function(e){switch(e){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"where":case"objectIds":case"historicMoment":return!0;default:return!1}}(e))}function E(e,t){const s=new v.I;for(const t of e)s.insert(t);return new d.do({...t,featureStore:s})}function P(e){switch(e.length){case 4:return(0,p.Jt)((0,p.vt)(),e);case 6:return e;default:throw new n.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:e})}}function k(e){const t=e?.featureCount;let s=!1;return null!=t&&t<(0,a.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:s,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:s,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:s,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},54625:(e,t,s)=>{s.d(t,{i_:()=>r});var i=s(30524);function r(e,t,s){t=(0,i.rS)(t)?.toLowerCase(),s=(0,i.rS)(s)?.toLowerCase();const r=e.map(e=>e.toLowerCase()),a=t?e[r.indexOf(t)]:null,u=s?e[r.indexOf(s)]:null;return{longitudeFieldName:a||e[r.indexOf(n.find(e=>r.includes(e)))],latitudeFieldName:u||e[r.indexOf(o.find(e=>r.includes(e)))]}}const o=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],n=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},66344:(e,t,s)=>{s.d(t,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,r,n){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==s&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,s,0,0);const u=1+Math.max(n,-4)- -3;this._db.set(t,new o(s,r,u)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const s=this._db.get(t);if(!s)return;this._size-=s.size,e.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,s.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}s.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;s[r]=(s[r]||0)+e.size,this._users.forEach(s=>{const{id:r,name:o}=s;if(i.startsWith(r)){const s=t[o]||0;t[o]=s+e.size}})});const i={};this._users.forEach(e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[s]||0;t[s]=r,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(t);r.sort((e,s)=>t[s]-t[e]),r.forEach(s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]);for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,s]of this._db)t.startsWith(e.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){const r=this._users.get(e.split(n)[0])?.removeFunc,o=r?.(t,i,s);return"number"==typeof o?o:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const s=t??this;if(s.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[o,a]of this._db)if(0===a.lifetime&&(!i||o.startsWith(i))){const i=t??this._users.get(o.split(n)[0]);if(this._purgeItem(o,a,i),s.size<=.9*e)return;r||=this._db.has(o)}}for(const[r,o]of this._db)if(!i||r.startsWith(i)){const i=t??this._users.get(r.split(n)[0]);if(this._purgeItem(r,o,i),s.size<=.9*e)return}}_purgeItem(e,t,s){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class o{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}const n=":";class a{constructor(e,t){this.removeFunc=t,this._storage=new r,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69540:(e,t,s)=>{s.d(t,{OU:()=>c,Pw:()=>p});var i=s(31635),r=s(69622),o=(s(44208),s(4718)),n=(s(53966),s(97768)),a=s(88620),u=s(64108);const l=Symbol("ClonableMixin"),c=e=>{var t;const s=e;let r=class extends s{constructor(){super(...arguments),this[t]=!0}static{t=l}clone(e){const t=(0,a.oY)(this);(0,n.Lw)(t,"unable to clone instance of non-accessor class");const s=t.metadata,i=t.store,r={},u=new Map;for(const t in s){const n=s[t],a=i?.originOf(t),l=n.clonable;if(n.readOnly||!1===l||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let p=null;if("function"==typeof l)p=l(c,e);else if("reference"===l)p=c;else if(p=(0,o.TU)(c,e),null!=c&&null==p)continue;0===a?u.set(t,p):r[t]=p}const l=new(0,Object.getPrototypeOf(this).constructor)(r);if(u.size){const e=(0,a.oY)(l)?.store;if(e)for(const[t,s]of u)e.set(t,s,0)}return l}};return r=(0,i.Cg)([(0,u.$)("esri.core.Clonable")],r),r},p=c(r.A)},93470:(e,t,s)=>{s.d(t,{Cb:()=>o,HW:()=>c,JR:()=>r,JZ:()=>u,WR:()=>a,b6:()=>p,fT:()=>i,nC:()=>l,yM:()=>n});const i=[252,146,31,255],r=[153,153,153,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[189,1867,1947],{4197:(t,n,e)=>{e.d(n,{Vj:()=>c,cj:()=>h,jh:()=>s,l5:()=>u,xm:()=>o});var r=e(34275),i=e(9093);function s(t){return t<=r.y9?new Array(t).fill(0):new Float64Array(t)}function o(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=r.y9?Array.from(t):new Float64Array(t)}function u(t,n,e){return Array.isArray(t)?t.slice(n,n+e):t.subarray(n,n+e)}function h(t){return[...t]}function c(t){const n=(0,i.vt)();for(let e=0;e<16;++e)n[e]=t[e];return n}},9093:(t,n,e)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}e.d(n,{o8:()=>i,vt:()=>r,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,fromValues:function(t,n,e,r,i,s,o,u,h,c,a,f,l,m,d,g){return[t,n,e,r,i,s,o,u,h,c,a,f,l,m,d,g]}},Symbol.toStringTag,{value:"Module"}))},29127:(t,n,e)=>{e.r(n),e.d(n,{execute:()=>o});var r=e(39117),i=e(34772);const s=new r.E;function o(t,n){const e=(0,i.fromGeometry)(t);return s.execute(e.getGeometry(),(0,i.fromGeometryToGXGeometry)(n),e.getSpatialReference(),null)}},69397:(t,n,e)=>{e.d(n,{$B:()=>i,Qf:()=>c,Qh:()=>u,RS:()=>s,ez:()=>l,lM:()=>o,qK:()=>f});var r=e(34275);function i(t){return 32+t.length}const s=16;function o(t){if(!t)return 0;let n=f;for(const e in t)t.hasOwnProperty(e)&&(n+=h(t[e],!1));return n}function u(t){if(!t)return 0;if("number"==typeof t[0])return c(t);if(Array.isArray(t))return function(t){const n=t.length;if(0===n||"number"==typeof t[0])return a(t,8);let e=l;for(let r=0;r<n;r++)e+=h(t[r]);return e}(t);let n=f;for(const e in t)t.hasOwnProperty(e)&&(n+=h(t[e]));return n}function h(t,n=!0){switch(typeof t){case"object":return n?u(t):f;case"string":return i(t);case"number":return s;case"boolean":return 4;default:return 8}}function c(...t){return t.reduce((t,n)=>t+(n?(0,r.iu)(n)?n.byteLength+m:Array.isArray(n)?a(n,s):0:0),0)}function a(t,n){return l+t.length*n}const f=32,l=16,m=145},70328:(t,n,e)=>{e.d(n,{BI:()=>I,DC:()=>f,Ej:()=>m,Ie:()=>M,Jt:()=>x,Ne:()=>d,RF:()=>a,aI:()=>b,fA:()=>o,gE:()=>h,hZ:()=>y,iT:()=>l,is:()=>A,qv:()=>w,vI:()=>g,vY:()=>u,v_:()=>G,vt:()=>s,w1:()=>c});var r=e(5443),i=(e(19419),e(4197));function s(t=G){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,n,e,r,i,o,u=s()){return u[0]=t,u[1]=n,u[2]=e,u[3]=r,u[4]=i,u[5]=o,u}function u(t,n=s()){return function(t,n,e,r=s()){return y(r,w),function(t,n,e=0,r=n.length/3){let i=t[0],s=t[1],o=t[2],u=t[3],h=t[4],c=t[5];for(let t=0;t<r;t++)i=Math.min(i,n[e+3*t]),s=Math.min(s,n[e+3*t+1]),o=Math.min(o,n[e+3*t+2]),u=Math.max(u,n[e+3*t]),h=Math.max(h,n[e+3*t+1]),c=Math.max(c,n[e+3*t+2]);t[0]=i,t[1]=s,t[2]=o,t[3]=u,t[4]=h,t[5]=c}(r,t,n,e),r}(t,0,t.length/3,n)}function h(t,n=(0,i.jh)(24)){const[e,r,s,o,u,h]=t;return n[0]=e,n[1]=r,n[2]=s,n[3]=e,n[4]=r,n[5]=h,n[6]=e,n[7]=u,n[8]=s,n[9]=e,n[10]=u,n[11]=h,n[12]=o,n[13]=r,n[14]=s,n[15]=o,n[16]=r,n[17]=h,n[18]=o,n[19]=u,n[20]=s,n[21]=o,n[22]=u,n[23]=h,n}function c(t,n){const e=isFinite(t[2])||isFinite(t[5]);return new r.A(e?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:n}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:n})}function a(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.min(t[2],n[2]),t[3]=Math.max(t[3],n[3]),t[4]=Math.max(t[4],n[4]),t[5]=Math.max(t[5],n[5])}function f(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[3]=Math.max(t[3],n[2]),t[4]=Math.max(t[4],n[3])}function l(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.min(t[2],n[2]),t[3]=Math.max(t[3],n[0]),t[4]=Math.max(t[4],n[1]),t[5]=Math.max(t[5],n[2])}function m(t,n=[0,0,0]){return n[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),n[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),n[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),n}function d(t,n,e=t){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e!==t&&(e[3]=t[3],e[4]=t[4],e[5]=t[5]),e}function g(t,n,e=t){return e[3]=n[0],e[4]=n[1],e[5]=n[2],e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2]),t}function y(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function M(t){return t?y(t,w):s(w)}function x(t,n){return t[0]=n[0],t[1]=n[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=n[2],t[4]=n[3],t[5]=Number.POSITIVE_INFINITY,t}function I(t,n,e,r,i){return t[0]=n,t[1]=e,t[2]=Number.NEGATIVE_INFINITY,t[3]=r,t[4]=i,t[5]=Number.POSITIVE_INFINITY,t}function A(t){return 6===t.length}function b(t,n,e){if(null==t||null==n)return t===n;if(!A(t)||!A(n))return!1;if(e){for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}else for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}const w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],G=[0,0,0,0,0,0];s()},76061:(t,n,e)=>{e.d(n,{G:()=>r,S:()=>i});class r{*[Symbol.iterator](){let t=this.next();for(;t;)yield t,t=this.next()}}class i extends r{constructor(t){super(),this.m_iGeom=-1,this.m_aGeoms=t?t.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const t=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,t}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},92722:(t,n,e)=>{e.d(n,{A:()=>i});var r=e(69397);class i{constructor(t=[],n=[],e=!1,r=!1){this.lengths=t??[],this.coords=n??[],this.hasZ=e,this.hasM=r}static fromJSON({lengths:t,coords:n,hasZ:e,hasM:r}){return new i(t,n,e||!1,r||!1)}static fromRect([t,n,e,r]){const s=e-t,o=r-n;return new i([5],[t,n,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,n)=>t+n,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,n=0;for(const e of this.lengths){if(e<3)continue;const{stride:r}=this;let i=this.coords[r*n],s=this.coords[r*n+1];for(let o=1;o<e;o+=1){const e=r*(n+o),u=this.coords[e],h=this.coords[e+1];t+=-.5*(u-i)*(h+s),i=u,s=h}n+=e}return t}forEachVertex(t){let n=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:e}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=e*(n+i);t(this.coords[r],this.coords[r+1])}n+=r}}deltaDecode(){const t=this.clone(),{coords:n,lengths:e}=t;let r=0;const{stride:i}=this;for(const t of e){for(let e=1;e<t;e++){const t=i*(r+e);n[t]+=n[t-i],n[t+1]+=n[t+1-i]}r+=t}return t}clone(t){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const n=Array.from(this.lengths),{stride:e,size:r}=this,s=this.coords.slice(0,r*e);return t?(t.set(s),new i(n,t)):new i(n,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:n}=this;if(2===t)return this;const e=new Array(n*t);for(let n=0,r=0;n<e.length;n+=t)e[r++]=this.coords[n],e[r++]=this.coords[n+1];return new i(this.lengths,e,!1,!1)}}}}]);