@arcgis/core 4.34.0-next.58 → 4.34.0-next.59

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 (229) hide show
  1. package/Basemap.js +1 -1
  2. package/LICENSE.md +19 -0
  3. package/README.md +2 -18
  4. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  5. package/applications/KnowledgeStudio/reshape.js +5 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{26975e5b3fb7f2ed45a4.js → 03fe4164abd12abc7921.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{893e5eb5c028c4704317.js → 0427f66b56ec6601deb0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +1 -0
  10. package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +1 -0
  11. package/assets/esri/core/workers/chunks/{1776ef96c9f4636f8838.js → 138c11b5eca621e51396.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{57c438bb0da6410df525.js → 1bf17c6548ac4cd5a166.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{043bb97e38e3a54aa2ab.js → 1ed7a8f4a0058d3b69ef.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{827bebb4bcdde23adc91.js → 251b7f2e295ce191eb62.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{02a31483e09652a1a1a2.js → 2b7f9a57a2cfbc108673.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7c86af4f60cea383ed96.js → 39a1f361bb69073af765.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{327b0da744426ce40e60.js → 3a7ac10a6614fe5745f7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{8c79945909069733558f.js → 4094cebc4b92c52f4e27.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{82de1b50ae286f1e6c44.js → 451761c7bd2da530e1d0.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{cc748d4f4adb9c584aa4.js → 45aeff2f751f124f8e53.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{d20af70b23f175fb5442.js → 48b9ba825856a0c843ff.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4dee2f05508e90410f13.js +1 -0
  23. package/assets/esri/core/workers/chunks/{d630fc3acd2552c98dc0.js → 547af4ffbeeccba9d187.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{ff14b632f147cb68ed59.js → 58422c616a824ab49218.js} +1 -1
  25. package/assets/esri/core/workers/chunks/589a0e244ef5f1b84ab6.js +1 -0
  26. package/assets/esri/core/workers/chunks/{2c7e7895c4dda176220e.js → 5d4b24c864ebb68ae61e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{a1ff4c252012d5026133.js → 65eb183b5d001dfc42c8.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f1b6d6ee03635d985c3e.js → 6688efc71d9d8f4d2559.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d5faf3ddf9a39de826be.js → 672c04d48aa51f16e9b7.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{17e203e4680c07bd02f1.js → 7aa7aff6d42be7c2d1d2.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{549e073fe276363a9896.js → 7db105f6b688b6da8106.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{945c5a477940ebd23a4c.js → 7f0c78bcba0aed3c4eff.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{3eb792863a789b97ec58.js → 831a69e5a87e92830fbe.js} +1 -1
  34. package/assets/esri/core/workers/chunks/83dfaa6e3bd58d544f35.js +1 -0
  35. package/assets/esri/core/workers/chunks/8bbae8ac586e5c0819d2.js +1 -0
  36. package/assets/esri/core/workers/chunks/{9275313e0f1f521b2658.js → 9325000c87295c473291.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{944d1608f935516951c4.js → 94b9948ec628187c19fc.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{757717416d909059df2f.js → 981275b6f008431c983a.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{c71dac67f95d694bf67e.js → 9f4e23bae621ff3ecea3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{989251f5e0d6a08b1afa.js → a17ed7ce97e69466d730.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{319fe6a02ec630a827ea.js → a7ea2e3895046e566bc6.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5cfec58c7c31e6d8c6ea.js → abe60d92e0219ee97036.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{4193691ca076948f4f90.js → b53008c1461dd6bacc63.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{1d234c057a6671acc59f.js → b605dfdfed8ff8eda4f3.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{0fb2dcbd54175e75d94d.js → b68b54be3d67595a9446.js} +4 -6
  46. package/assets/esri/core/workers/chunks/{7eda1c400658b6a99be8.js → ba0c7339fa19cc7cbde7.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{724de82d101eb59c2834.js → bd451668c4ce9f7d7128.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{91ede8c62a7b1e8b8023.js → be06c8a58c217a17451b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{08c0c016787caa169492.js → c24214666d10cb648428.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{a3a23a56df4e5ee86bb2.js → c5fe356fc5b8b7be0d31.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{64fab4e1e28c06c83403.js → c779c8b98e07fa881c1d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{4a0257c449f31bdadf26.js → cef9ff811221a7c3812c.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{b1982490762972ae023d.js → d0296368ae143de4d5ce.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{3d5954478864a975e65e.js → d07d3b0e06f12aee4a8b.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{e1472dbf0795d737d6f8.js → d2371f5034b2a32e2523.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{2f65081bfedeab44d6cb.js → d35cadfb78ac9803069b.js} +1 -1
  57. package/assets/esri/core/workers/chunks/d7ce68667bb355ef8e5d.js +1 -0
  58. package/assets/esri/core/workers/chunks/{8c2fcfcfbb6b70f7bada.js → d823277612f971a9c2f0.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{c4ff5c78fc8668af9c05.js → d91b80aa4f847c2e2a33.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{c4ceb267d4004d8da8cc.js → e0bbfbe1ed39c82f1bd4.js} +1 -1
  61. package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a24762e976c1459b12de.js → e689a4849f5af3f2f641.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{5787101b2b814c5d2439.js → eacc7fccdc3fb670ac8f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{0df1f56df6d47dfbb6ea.js → eada3483116a5ea8baed.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{47682247910271077333.js → ee78a38a0cacb19b2fd4.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{f4061587ff5789fa4e1f.js → f594df2f5ce6ca41a254.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{d7b3e81cc313fd0a33b0.js → f5c821ca2911a5103c9a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +1 -0
  69. package/assets/esri/core/workers/chunks/fdae43a97537093e4b97.js +1 -0
  70. package/chunks/BloomComposition.glsl.js +36 -18
  71. package/chunks/ComponentShader.glsl.js +1 -1
  72. package/chunks/CompositeGeographicTransformation.js +1 -1
  73. package/chunks/DefaultMaterial.glsl.js +1 -1
  74. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  75. package/chunks/GeographicTransformation.js +1 -1
  76. package/chunks/MultiPathImpl.js +1 -1
  77. package/chunks/OperatorGeodesicBuffer.js +1 -1
  78. package/chunks/OperatorGeodeticArea.js +1 -1
  79. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  80. package/chunks/OperatorGeodeticLength.js +1 -1
  81. package/chunks/OperatorProximityGeodesic.js +1 -1
  82. package/chunks/OperatorShapePreservingLength.js +1 -1
  83. package/chunks/OperatorShapePreservingProject.js +1 -1
  84. package/chunks/Path.glsl.js +1 -1
  85. package/chunks/Point2D.js +1 -1
  86. package/chunks/ProjectionTransformation.js +1 -1
  87. package/chunks/RealisticTree.glsl.js +1 -1
  88. package/chunks/SpatialReference.js +1 -1
  89. package/chunks/UnitFactory.js +1 -1
  90. package/chunks/sphere.js +1 -1
  91. package/chunks/vec42.js +1 -1
  92. package/config.js +1 -1
  93. package/copyright.txt +2 -20
  94. package/core/accessorSupport/layerContainerType.js +1 -1
  95. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  96. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  97. package/core/quantityFormatUtils.js +1 -1
  98. package/core/unitFormatUtils.js +1 -1
  99. package/editing/geometry/coordUtils.js +5 -0
  100. package/editing/geometry/lineUtils.js +5 -0
  101. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  102. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  103. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  104. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  105. package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
  106. package/geometry/coordinateFormatter.js +1 -1
  107. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  108. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  109. package/geometry/operators/gx/operatorOffset.js +1 -1
  110. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  111. package/geometry/operators/support/apiConverter.js +1 -1
  112. package/geometry/operators/support/initNoPeFactory.js +1 -1
  113. package/geometry/operators/support/jsonConverter.js +1 -1
  114. package/geometry/support/sphere.js +1 -1
  115. package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
  116. package/graphic/LinkChartGraphicOrigin.js +5 -0
  117. package/graphic/isLinkChartGraphicOrigin.js +5 -0
  118. package/interfaces.d.ts +129 -10
  119. package/kernel.js +1 -1
  120. package/layers/FeatureLayer.js +1 -1
  121. package/layers/GroundLayer.js +1 -1
  122. package/layers/ParquetLayer.js +1 -1
  123. package/layers/catalog/catalogUtils.js +1 -1
  124. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  125. package/layers/knowledgeGraph/nodeMovementUtils.js +5 -0
  126. package/layers/mixins/ImageryTileMixin.js +1 -1
  127. package/layers/mixins/operationalLayers.js +1 -1
  128. package/layers/support/RasterStorageInfo.js +1 -1
  129. package/layers/support/Sublayer.js +1 -1
  130. package/layers/support/layersCreator.js +1 -1
  131. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  132. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  133. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  134. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  135. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  136. package/package.json +1 -1
  137. package/portal/schemas/definitions.js +1 -1
  138. package/renderers/support/RasterSymbolizer.js +1 -1
  139. package/support/basemapUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  142. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  143. package/views/3d/camera/constraintUtils/distance.js +1 -1
  144. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  145. package/views/3d/layers/I3SMeshView3D.js +1 -1
  146. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  147. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  148. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  149. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  150. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  151. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  152. package/views/3d/layers/graphics/pointUtils.js +1 -1
  153. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  154. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  155. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  156. package/views/3d/layers/support/FlowTileTree3DDebugger.js +1 -1
  157. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  158. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  159. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  160. package/views/3d/state/utils/navigationUtils.js +1 -1
  161. package/views/3d/support/CombinedElevationProvider.js +1 -1
  162. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  163. package/views/3d/terrain/OverlayManager.js +1 -1
  164. package/views/3d/terrain/SphericalPatch.js +1 -1
  165. package/views/3d/terrain/TerrainSurface.js +1 -1
  166. package/views/3d/terrain/Tile.js +1 -1
  167. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -4
  169. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  170. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  171. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  172. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
  173. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  174. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  175. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  176. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  177. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  178. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  179. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  180. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  181. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  182. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  183. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  184. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  185. package/views/LinkChartView.js +1 -1
  186. package/views/draw/DrawOperation.js +1 -1
  187. package/views/draw/support/GraphicMover.js +1 -1
  188. package/views/draw/support/HighlightHelper.js +1 -1
  189. package/views/draw/support/Reshape.js +1 -1
  190. package/views/draw/support/drawUtils.js +1 -1
  191. package/views/interactive/Tooltip.js +1 -1
  192. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  193. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  194. package/views/interactive/sketch/SketchOptions.js +1 -1
  195. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  196. package/views/interactive/sketch/SketchTooltipVisibleElements.js +1 -1
  197. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  198. package/views/interactive/sketch/Units.js +1 -1
  199. package/views/interactive/sketch/constraints.js +1 -1
  200. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  201. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  202. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  203. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  204. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  205. package/views/interactive/tooltip/fields/fields.js +1 -1
  206. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  207. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  208. package/views/support/angularMeasurementUtils.js +1 -1
  209. package/webdoc/support/writeUtils.js +1 -1
  210. package/webscene/spec-certification/api.js +1 -1
  211. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  212. package/widgets/Editor/support/splitFeatureUtils.js +5 -0
  213. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  214. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  215. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  216. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  217. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  218. package/widgets/OrientedImageryViewer.js +1 -1
  219. package/EULA.pdf +0 -0
  220. package/assets/esri/core/workers/chunks/00ee6f84119bc55a222f.js +0 -1
  221. package/assets/esri/core/workers/chunks/0569698a3e4eaf2bac8e.js +0 -1
  222. package/assets/esri/core/workers/chunks/0e4976f92b66793137c4.js +0 -1
  223. package/assets/esri/core/workers/chunks/171ce8c64f322cd5d6d1.js +0 -1
  224. package/assets/esri/core/workers/chunks/1ae15163af8875148fb8.js +0 -1
  225. package/assets/esri/core/workers/chunks/373c9e17e2834dfc1839.js +0 -1
  226. package/assets/esri/core/workers/chunks/55bb794bcdd9cc788322.js +0 -1
  227. package/assets/esri/core/workers/chunks/6acffacbb4a03af52e3b.js +0 -1
  228. package/assets/esri/core/workers/chunks/b457b7dd907f06278bee.js +0 -1
  229. package/assets/esri/core/workers/chunks/e7ccf067bea8f4766424.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7444],{1364:(e,t,s)=>{s.d(t,{c:()=>i});var n=s(55537);function i(e,t){const s=e.getGeometryType();return s===n.G.enumPoint?e:(0,n.h)(s)?function(e){if(function(e){for(let t=0,s=e.getPathCount();t<s;t++){const s=e.getPathSize(t);if(0===s)return!1;if(1===s){if(0===e.getSegmentCountPath(t))return!1;if(e.getSegmentType(e.getPathStart(t))===n.G.enumLine)return!1;if(!e.isClosedPath(t))return!1}}return!0}(e))return e;const t=e.createInstance();for(let s=0,i=e.getPathCount();s<i;s++){const i=e.getPathSize(s);if(0!==i){if(1===i){if(0===e.getSegmentCountPath(s))continue;if(e.getSegmentType(e.getPathStart(s))===n.G.enumLine)continue;if(!e.isClosedPath(s))continue}t.addPath(e,s,!0)}}return t}(e):s===n.G.enumMultiPoint||s===n.G.enumEnvelope?e:s===n.G.enumMultipatch?((0,n.t)("not implemented for multipatch"),e):e}},37444:(e,t,s)=>{s.r(t),s.d(t,{OperatorGeodesicBuffer:()=>T});var n=s(76061),i=s(55537),r=s(79187),o=s(39117),m=s(31635),a=s(88885),h=s(95213),c=s(11878),u=s(83661),l=s(31139),_=s(1364),f=s(5247);class d{constructor(e){this.m_sr=null,this.m_gcs=null,this.m_transform=null,this.m_a=0,this.m_eSquared=0,this.m_rpu=0,this.m_radTolerance=0,this.m_q90=0,this.m_gcs90=0,this.m_gcs180=0,this.m_gcs360=0,this.m_gcs60=0,this.m_ellipticToGeodesicMaxRatio=0,this.m_curveType=0,this.m_bShapePreserving=!1,this.m_distance=0,this.m_absDistance=0,this.m_convergenceOffset=0,this.m_cornerStep=0,this.m_segmentStep=0,this.m_progressTracker=e}bufferPolygon(e){const t=new a.a,s=new I(this,e,t);return this.processGnomonicBufferPiecesCursor(!0,s)}bufferPolyline(e){const t=new I(this,e,null);return this.processGnomonicBufferPiecesCursor(!0,t)}bufferMultiPoint(e){const t=new G(this,e);return this.processGnomonicBufferPiecesCursor(!1,t)}bufferPoint(e){const t=e.getXY();t.scale(this.m_rpu);let s=new a.a;if(this.bufferPoint2D(t,!1,s)){const e=(0,h.b)(null,s,!0);s=(0,o.a3)(s,e,!0,!0,-1,this.m_progressTracker,0,!1)}return s=(new o.O).foldInto360RangeGeodetic(s,this.m_gcs,2),s}processGnomonicBufferPiecesCursor(e,t){const s=t;let n=s.getGnomonic();const i=(0,o.r)((0,o.ao)());let m=new o.ap,a=(new o.W).executeMany(m,i,this.m_progressTracker,2);const l=(0,u.d)(6,!1),_=(0,u.m)(r.Envelope2D,6);this.initializeGrid(l,_);const f=[null,null,null,null,null,null],d=[null,null,null,null,null,null],g=[null,null,null,null,null,null];let p,P,x;for(;null!==(p=s.next());){if(P=s.getGnomonic(),P!==n){if(null!==n){let t=a.next();if(m=null,a=null,null!=t){const s=(0,h.b)(i,t,!0),r=(0,h.e)(s);t=n.unproject(t,r,this.m_progressTracker),this.putInGridCursors(e,t,i,!0,l,_,f,d,g)}}null!==P&&(m=new o.ap,a=(new o.W).executeMany(m,i,this.m_progressTracker,2)),n=P}if(s.isRunningInGnomonic()){if(P.project(p),s.needsSimplify()){const e=(0,h.b)(null,p,!0);p=(0,o.a3)(p,e,!0,!0,-1,this.m_progressTracker,0,!1)}m.tick(v(p)),a.tock()}else this.putInGridCursors(e,p,i,!0,l,_,f,d,g)}let b=!1;for(let e=0;e<6;e++)if(null!=g[e]){b=!0;break}if(b){let t=!1;const r=[null,null,null,null,null,null];if(e){const n=s.m_densified;if(s.m_densified=null,null!==n){const s=new c.T;s.scale(1/this.m_rpu,1/this.m_rpu),n.applyTransformation(s),this.m_distance>0?this.putInGridCursors(e,n,i,!1,l,_,f,d,g):(this.processInGrid(e,n,!1,l,_,f,r),t=!0)}}const u=new o.ap,p=(new o.W).executeMany(u,this.m_gcs,this.m_progressTracker,2);if(null!==a){let t=a.next();m=null,a=null;const s=(0,h.b)(i,t,!0),r=(0,h.e)(s);t=n.unproject(t,r,this.m_progressTracker),this.putInGridCursors(e,t,i,!0,l,_,f,d,g)}for(let e=0;e<6;e++)if(null!=g[e]){let s=g[e].next();g[e]=null,d[e]=null,t&&null!==r[e]&&(s=(new o.V).execute(r[e],s,i,this.m_progressTracker));const n=(0,h.b)(i,s,!0),m=(0,h.e)(n);s=f[e].unproject(s,m,this.m_progressTracker),s=(new o.L).execute(s,this.m_gcs,!0,this.m_progressTracker),u.tick(v(s)),p.tock()}x=p.next()}else{let t,r=!1;if(e){let e=s.m_densified;if(s.m_densified=null,null!==e){const s=new c.T;s.scale(1/this.m_rpu,1/this.m_rpu),e.applyTransformation(s),P.project(e);const n=(0,h.b)(null,e,!0);e=(0,o.a3)(e,n,!1,!0,-1,this.m_progressTracker,0,!1),this.m_distance>0?(m.tick(v(e)),a.tock()):(t=e,r=!0)}}let u=a.next();m=null,a=null,r&&(u=(new o.V).execute(t,u,i,this.m_progressTracker));const l=(0,h.b)(i,u,!0),_=(0,h.e)(l);x=n.unproject(u,_,this.m_progressTracker),x=(new o.L).execute(x,this.m_gcs,!0,this.m_progressTracker)}return x=(new o.O).foldInto360RangeGeodetic(x,this.m_gcs,2),x}putInGridCursors(e,t,s,n,i,r,m,a,h){const c=[null,null,null,null,null,null];this.processInGrid(e,t,n,i,r,m,c);for(let e=0;e<6;e++)null!==c[e]&&(null===a[e]&&(a[e]=new o.ap,h[e]=(new o.W).executeMany(a[e],s,this.m_progressTracker,2)),a[e].tick(v(c[e])),h[e].tock())}processInGrid(e,t,s,n,i,r,m){const a=.01,c=this.insertGeodeticPointsAlongGrid(t,i,a);for(let e=0;e<6;e++){if(n[e])continue;const _=i[e].clone();_.inflateCoords(a,a);const f=(0,h.f)(t,_),d=(0,h.c)(null,f,!1).total();let g=(0,l.c)(c,_,d,Number.NaN,this.m_progressTracker);if(null!==g&&!g.isEmpty()){if(g===c&&(g=g.clone()),null===r[e]){const t=new u.P;e<3?t.setCoords(0,1):t.setCoords(0,-1);const s=new u.P;s.setAdd(i[e].getCenter(),t),r[e]=C(this.m_gcs,s)}r[e].project(g);const t=(0,h.b)(null,g,!0);g=(0,o.a3)(g,t,s,!0,-1,this.m_progressTracker,0,!1),m[e]=g}}}insertGeodeticPointsAlongGrid(e,t,s){const n=r.Envelope2D.construct(t[3].xmin,t[3].ymin,t[2].xmax,t[2].ymax),i=(0,o.aq)(this.m_gcs,n,e,!0,this.m_progressTracker),m=new a.E,h=m.addGeometry(i);return(0,o.ar)(m,h,this.m_gcs,0,2,!0,t[0].xmax+s),(0,o.ar)(m,h,this.m_gcs,0,2,!0,t[1].xmax+s),(0,o.ar)(m,h,this.m_gcs,0,2,!1,t[1].ymin+s),0!==s&&((0,o.ar)(m,h,this.m_gcs,0,2,!0,t[0].xmax-s),(0,o.ar)(m,h,this.m_gcs,0,2,!0,t[1].xmax-s),(0,o.ar)(m,h,this.m_gcs,0,2,!1,t[1].ymin-s)),m.getGeometry(h)}initializeGrid(e,t){for(let t=0;t<6;t++)e[t]=!1;t[0].setCoords({xmin:-this.m_gcs180,ymin:0,xmax:-this.m_gcs60,ymax:this.m_gcs90}),t[1].setCoords({xmin:-this.m_gcs60,ymin:0,xmax:this.m_gcs60,ymax:this.m_gcs90}),t[2].setCoords({xmin:this.m_gcs60,ymin:0,xmax:this.m_gcs180,ymax:this.m_gcs90}),t[3].setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:-this.m_gcs60,ymax:0}),t[4].setCoords({xmin:-this.m_gcs60,ymin:-this.m_gcs90,xmax:this.m_gcs60,ymax:0}),t[5].setCoords({xmin:this.m_gcs60,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:0})}checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(e,t,s,n,i,r){const m=e[0],a=e.at(-1),h=m.y<a.y?m.y:a.y,c=m.y>a.y?m.y:a.y,l=o.ai.q(this.m_a,this.m_eSquared,h),_=o.ai.q(this.m_a,this.m_eSquared,c);if(this.m_q90-(l+t+this.m_absDistance)>.001&&this.m_q90+(_-t-this.m_absDistance)>.001)return!1;const f=s-u.o,d=n+u.o,g=f-Math.PI,b=f+Math.PI,y=d+Math.PI,S=[Number.NaN],w=[Number.NaN],C=[Number.NaN],v=[Number.NaN];let D=!1;if(x(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,m,f,g,a,d,S,w),x(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,a,y,d,m,g,C,v),(d<S[0]&&S[0]<y||d<w[0]&&w[0]<y)&&(D=!0),D||(g<C[0]&&C[0]<f||g<v[0]&&v[0]<f)&&(D=!0),!D&&i)return!1;const I=[];for(let t=e.length-1;t>=0;t--)I.push(e[t]);r.setEmpty(),r.addPathPoint2D(null,0,!0);let G=0;G=p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,this.m_curveType,e,f,d,i,G,r),G=P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,a,d,y,this.m_cornerStep,i,G,r,S[0],w[0]),G=p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,this.m_curveType,I,y,b,i,G,r),G=P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,m,g,f,this.m_cornerStep,i,G,r,C[0],v[0]);let T=!1;return i||(T=this.checkAndPrepForPole(r)),D||T}bufferPoint2D(e,t,s){s.setEmpty(),s.addPathPoint2D(null,0,!0),P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,e,-this.m_cornerStep,2*Math.PI,this.m_cornerStep,t,0,s);let n=!1;return t||(n=this.checkAndPrepForPole(s)),n}checkAndPrepForPole(e){const t=this.checkAndPrepForPoleTouch(e),s=this.checkAndPrepForPoleWrap(e);return t||s}checkAndPrepForPoleTouch(e){const t=new r.Envelope2D;return e.queryEnvelope(t),!(!(0,o.as)(t.ymax,this.m_gcs90)&&!(0,o.as)(t.ymin,-this.m_gcs90)||(this.prepPoleTouch(e),0))}checkAndPrepForPoleWrap(e){const t=e.getXY(0),s=e.getXY(e.getPointCount()-1);return Math.abs(t.x-s.x)>this.m_gcs180?(this.prepSinglePoleWrap(e),!0):this.checkAndPrepForDoublePoleWrap(e)}checkAndPrepForDoublePoleWrap(e){return e.calculateArea2D()<0&&(this.prepDoublePoleWrap(e),!0)}prepPoleTouch(e){const t=new a.a;t.insertPath2D(-1,null,0,0,!0);const s=e.getPathStart(0),n=e.getPathEnd(0),i=n-s;let r=-1;for(r=s;r<n;r++){const t=e.getXY(r),s=(0,o.as)(t.y,this.m_gcs90),n=(0,o.as)(t.y,-this.m_gcs90);if(!s&&!n)break}let m=r,h=!1,c=Number.NaN;do{const n=e.getXY(m),r=(0,o.as)(n.y,this.m_gcs90),a=(0,o.as)(n.y,-this.m_gcs90),l=s+(m+1-s)%i;if(r||a){let s=u.P.construct(c,n.y);t.insertPoint2D(0,-1,s);const i=e.getXY(l),r=(0,o.as)(i.y,this.m_gcs90),m=(0,o.as)(i.y,-this.m_gcs90);r||m||(s=u.P.construct(i.x,n.y),h?t.setXY(t.getPointCount()-1,s):t.insertPoint2D(0,-1,s)),h=!0}else t.insertPoint2D(0,-1,n),c=n.x,h=!1;m=l}while(m!==r);e.setEmpty(),e.add(t,!1)}prepSinglePoleWrap(e){const t=new a.a,s=new a.a,n=new c.T,i=e.getXY(e.getPathStart(0)),m=e.getXY(e.getPathEnd(0)-1),_=this.m_gcs360,f=this.m_gcs180,d=new r.Envelope2D;d.setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:this.m_gcs90});const g=new r.Envelope2D;e.queryEnvelope(g);const p=Math.ceil(g.width()/_);let P,x;i.x>m.x?(P=-_,x=this.m_gcs90):(P=_,x=-this.m_gcs90),n.setShiftCoords(P,0),t.addPath(e,0,!0),s.add(t,!1);const b=new h.P;for(let e=0;e<p;e++)s.applyTransformation(n),s.getPointByVal(0,b),t.lineToPoint(b),t.addSegmentsFromPath(s,0,0,s.getSegmentCount()-1,!1);const y=t.getXY(0),S=t.getXY(t.getPointCount()-1);y.y=x,S.y=x,t.lineTo(S);const w=new u.P;for(w.setCoordsPoint2D(S),w.x-=.5*P;Math.abs(w.x-y.x)>f;)t.lineTo(w),w.x-=.5*P;t.lineTo(y);const C=d.getCenterX(),v=new r.Envelope2D;t.queryEnvelope(v);let D=0;const I=v.getCenter().x;I-C>f?D=-Math.ceil((I-C-f)/_):C-I>f&&(D=Math.ceil((C-I-f)/_)),0!==D&&(n.setShiftCoords(D*_,0),t.applyTransformation(n));const G=new a.E,T=G.addGeometry(t);(0,o.ar)(G,T,this.m_gcs,0,2,!0,d.xmin),(0,o.ar)(G,T,this.m_gcs,0,2,!0,d.xmax);const k=G.getGeometry(T),M=(0,h.f)(k,d);M.inflateCoords(0,1);const E=(0,h.c)(null,M,!0).total(),N=(0,l.c)(k,d,E,Number.NaN,this.m_progressTracker);e.setEmpty(),e.add(N,!1)}prepDoublePoleWrap(e){const t=this.m_gcs360,s=this.m_gcs180,n=new r.Envelope2D;n.setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:this.m_gcs90});const i=n.getCenter().x,m=new r.Envelope2D;e.queryPathEnvelope(0,m);let _,f=0,d=m.getCenter().x;if(d-i>s?f=-Math.ceil((d-i-s)/t):i-d>s&&(f=Math.ceil((i-d-s)/t)),0!==f){const s=new c.T;s.setShiftCoords(f*t,0),e.getImpl().applyTransformationToPath(s,0),e.queryPathEnvelope(0,m),d=m.getCenter().x}const g=new r.Envelope2D;n.containsExclusiveEnvelope(m)?(_=!1,g.setCoords({env2D:n})):(_=!0,g.setCoords({env2D:n}),g.xmin-=t,g.xmax+=t);let p=e.createInstance();p.addPathPoint2D(null,0,!0);const P=new u.P;if(P.setCoords(g.xmin,g.ymin),p.insertPoint2D(0,-1,P),P.setCoords(g.xmin,g.ymax),p.insertPoint2D(0,-1,P),P.setCoords(.5*(g.xmin+g.xmax),g.ymax),p.insertPoint2D(0,-1,P),P.setCoords(g.xmax,g.ymax),p.insertPoint2D(0,-1,P),P.setCoords(g.xmax,g.ymin),p.insertPoint2D(0,-1,P),P.setCoords(.5*(g.xmin+g.xmax),g.ymin),p.insertPoint2D(0,-1,P),_){p.addPath(e,0,!0);const s=new c.T;d<i?s.setShiftCoords(t,0):s.setShiftCoords(-t,0),e.getImpl().applyTransformationToPath(s,0),p.addPath(e,0,!0);const r=new a.E,m=r.addGeometry(p);(0,o.ar)(r,m,this.m_gcs,0,2,!0,n.xmin),(0,o.ar)(r,m,this.m_gcs,0,2,!0,n.xmax),p=r.getGeometry(m);const u=(0,h.f)(p,n);u.inflateCoords(0,1);const _=(0,h.c)(null,u,!0).total();p=(0,l.c)(p,n,_,Number.NaN,this.m_progressTracker)}else p.addPath(e,0,!0);e.setEmpty(),e.add(p,!1)}setMinCornerStep(){const e={stack:[],error:void 0,hasError:!1};try{let t=Math.min(Math.PI*this.m_a-this.m_absDistance,this.m_absDistance);t=Math.min(t,.125*this.m_a*Math.PI);const s=new u.P;s.setCoords(0,10*this.m_rpu);const n=0;let i=45*this.m_rpu;const r=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),a=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),h=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),c=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),l=new u.P,_=new u.P,f=new u.P,d=new u.P;for(o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,n,r.at(0),r.at(1)),l.setCoords(r.at(0).val,r.at(1).val),o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,i,a.at(0),a.at(1)),_.setCoords(a.at(0).val,a.at(1).val);;){const e={stack:[],error:void 0,hasError:!1};try{const r=.5*(n+i);o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,r,h.at(0),h.at(1)),f.setCoords(h.at(0).val,h.at(1).val);const u=(0,m.mS)(e,new o.a7,!1),g=(0,m.mS)(e,new o.a7,!1);o.a8.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,_.x,_.y,u,g,null,2),o.a8.geodeticCoordinate(this.m_a,this.m_eSquared,l.x,l.y,.5*u.val,g.val,c.at(0),c.at(1),2),d.setCoords(c.at(0).val,c.at(1).val);const p=(0,m.mS)(e,new o.a7,!1);if(o.a8.geodeticDistance(this.m_a,this.m_eSquared,f.x,f.y,d.x,d.y,p,null,null,2),p.val<=this.m_convergenceOffset)break;i*=.9,o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,i,a.at(0),a.at(1)),_.setCoords(a.at(0).val,a.at(1).val)}catch(t){e.error=t,e.hasError=!0}finally{(0,m.hk)(e)}}const g=i-n,p=2*Math.PI/Math.ceil(2*Math.PI/g);this.m_cornerStep=p}catch(t){e.error=t,e.hasError=!0}finally{(0,m.hk)(e)}}setMinSegmentStep(){const e={stack:[],error:void 0,hasError:!1};try{let t=Math.min(Math.PI*this.m_a-this.m_absDistance,this.m_absDistance);t=Math.min(t,.125*this.m_a*Math.PI);const s=new u.P,n=new u.P;s.setCoords(0,10*this.m_rpu),n.setCoords(10*this.m_rpu,10*this.m_rpu);const i=(0,m.mS)(e,new o.a7,!1),r=(0,m.mS)(e,new o.a7,!1),a=(0,m.mS)(e,new o.a7,!1);o.a8.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,n.x,n.y,a,i,r,this.m_curveType);const h=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),c=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),l=new u.P,_=(0,m.mS)(e,new o.a7,!1),f=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),d=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),g=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),p=(0,m.mS)(e,new u.S(new o.a7,new o.a7),!1),P=new u.P,x=new u.P,b=new u.P,y=new u.P,S=0;let w=1;const C=i.val,v=r.val,D=C-.5*Math.PI,I=v+.5*Math.PI,G=a.val;for(o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,D,f.at(0),f.at(1)),P.setCoords(f.at(0).val,f.at(1).val),o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,n.x,n.y,t,I,d.at(0),d.at(1)),x.setCoords(d.at(0).val,d.at(1).val);;){const e={stack:[],error:void 0,hasError:!1};try{const i=.5*(S+w);o.a8.geodeticCoordinate(this.m_a,this.m_eSquared,s.x,s.y,i*G,C,h.at(0),h.at(1),this.m_curveType),l.setCoords(h.at(0).val,h.at(1).val),o.a8.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,l.x,l.y,null,null,_,this.m_curveType);const r=_.val+.5*Math.PI;o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,l.x,l.y,t,r,g.at(0),g.at(1)),b.setCoords(g.at(0).val,g.at(1).val);const a=(0,m.mS)(e,new o.a7,!1),u=(0,m.mS)(e,new o.a7,!1);o.a8.geodeticDistance(this.m_a,this.m_eSquared,P.x,P.y,x.x,x.y,a,u,null,2),o.a8.geodeticCoordinate(this.m_a,this.m_eSquared,P.x,P.y,.5*a.val,u.val,p.at(0),p.at(1),2),y.setCoords(p.at(0).val,p.at(1).val);const f=(0,m.mS)(e,new o.a7,!1);if(o.a8.geodeticDistance(this.m_a,this.m_eSquared,b.x,b.y,y.x,y.y,f,null,null,2),f.val<=this.m_convergenceOffset)break;{const e={stack:[],error:void 0,hasError:!1};try{w*=.9,o.a8.geodeticCoordinate(this.m_a,this.m_eSquared,s.x,s.y,w*G,C,c.at(0),c.at(1),this.m_curveType),n.setCoords(c.at(0).val,c.at(1).val);const i=(0,m.mS)(e,new o.a7,!1);o.a8.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,n.x,n.y,null,null,i,this.m_curveType);const r=i.val+.5*Math.PI;o.a8.geodesicCoordinate(this.m_a,this.m_eSquared,n.x,n.y,t,r,d.at(0),d.at(1)),x.setCoords(d.at(0).val,d.at(1).val)}catch(t){e.error=t,e.hasError=!0}finally{(0,m.hk)(e)}}}catch(t){e.error=t,e.hasError=!0}finally{(0,m.hk)(e)}}let T=w*G;T>1e5&&(T=1e5),this.m_segmentStep=T}catch(t){e.error=t,e.hasError=!0}finally{(0,m.hk)(e)}}setConvergenceOffset(){let e;e=this.m_absDistance>5e4?100:this.m_absDistance>1e4?10:1,this.m_absDistance/e<500&&(e=this.m_absDistance/500),e<.01&&(e=.01),this.m_convergenceOffset=e}}function g(e,t,s,n,m,c,l){if(e.isEmpty())return new a.a({vd:e.getDescription()});let _=e;if((0,i.m)(_)){const e=10*t.getTolerance(0);_=(new f.O).execute(_,0,e,0,l,12e3)}const g=new d(l);g.m_sr=t,g.m_gcs=t.getGCS(),g.m_transform=(0,o.g)(t,g.m_gcs,null);const p=(0,o.F)();g.m_gcs.querySpheroidData(p);const P=new r.Envelope2D;_.queryEnvelope(P),g.m_a=p.majorSemiAxis,g.m_eSquared=p.e2,g.m_rpu=g.m_gcs.getUnit().getUnitToBaseFactor(),g.m_gcs90=.5*Math.PI/g.m_rpu,g.m_gcs180=Math.PI/g.m_rpu,g.m_gcs360=2*Math.PI/g.m_rpu,g.m_gcs60=g.m_gcs360/6,g.m_q90=o.ai.q90(g.m_a,g.m_eSquared),g.m_ellipticToGeodesicMaxRatio=.5*g.m_a*Math.PI/g.m_q90;const x=g.m_gcs.getTolerance(0);g.m_radTolerance=x*g.m_rpu,4===s?(g.m_curveType=2,g.m_bShapePreserving=!0):(g.m_curveType=s,g.m_bShapePreserving=!1),g.m_distance=n,g.m_absDistance=Math.abs(n),Number.isNaN(m)||m<=0?g.setConvergenceOffset():g.m_convergenceOffset=Math.max(m,.001),g.m_convergenceOffset/=c;let b,y=_.getGeometryType();if((0,i.f)(y)){const e=new a.P({vd:_.getDescription()});e.addSegment(_,!0),b=e,y=i.G.enumPolyline}else if(y===i.G.enumEnvelope){const e=_,t=new r.Envelope2D;e.queryEnvelope(t);const s=(0,h.e)((0,h.c)(g.m_sr,P,!0));if(t.minDimension()<=s)if(0===t.maxDimension()){const t=new h.P({vd:_.getDescription()});e.getCenter(t),b=t,y=i.G.enumPoint}else{const t=new a.P({vd:_.getDescription()});t.addEnvelope(e,!1),b=t,y=i.G.enumPolyline}else{const t=new a.a({vd:_.getDescription()});t.addEnvelope(e,!1),b=t,y=i.G.enumPolygon}}else b=_;if(g.setMinCornerStep(),(0,i.e)(y)||g.setMinSegmentStep(),g.m_absDistance<=.5*g.m_convergenceOffset)return y!==i.G.enumPolygon?new a.a({vd:b.getDescription()}):g.m_bShapePreserving?b:(0,o.ak)(b,g.m_sr,g.m_curveType,g.m_segmentStep,-1,l);if(g.m_distance<0&&y!==i.G.enumPolygon)return new a.a({vd:b.getDescription()});if(g.m_bShapePreserving&&(0,i.h)(y)){const e=(0,o.ak)(b,t,4,Number.NaN,g.m_convergenceOffset,l);b=(new o.O).execute(e,g.m_transform,l)}else b=(new o.O).execute(b,g.m_transform,l);if(b=(0,o.af)(b,g.m_gcs),b.isEmpty())return new a.a({vd:b.getDescription()});!g.m_bShapePreserving&&(0,i.h)(y)&&(b=(0,o.an)(g.m_rpu,b)),b=function(e,t){const s=e.getGeometryType();let n;if(n=(0,i.h)(s)?e.getPathCount():s===i.G.enumMultiPoint?e.getPointCount():1,1===n)return e;const o=[],m=[];for(let a=0;a<n;a++){o.push(a);const n=new u.P;if((0,i.h)(s)){const t=new r.Envelope2D;e.queryPathEnvelope(a,t),n.assign(t.getCenter())}else n.assign(e.getXY(a));const h=t.toGeohash(n);m.push(h)}o.sort((e,t)=>m[e]<m[t]?-1:m[e]>m[t]?1:0);const a=e.createInstance();for(let t=0;t<n;t++){const n=o[t];(0,i.h)(s)?a.addPath(e,n,!0):a.addPoints(e,n,n+1)}return a}(b,g.m_gcs);let S=new a.a;switch(y){case i.G.enumPolygon:S=g.bufferPolygon(b);break;case i.G.enumPolyline:S=g.bufferPolyline(b);break;case i.G.enumMultiPoint:S=g.bufferMultiPoint(b);break;case i.G.enumPoint:S=g.bufferPoint(b);break;default:(0,i.n)("")}const w=(new o.O).execute(S,g.m_transform.getInverse(),l);return w.mergeVertexDescription(b.getDescription()),w}function p(e,t,s,n,i,r,a,h,c,l,_){const f={stack:[],error:void 0,hasError:!1};try{const d=new u.P;d.setNAN(),c||_.getPointCount()>0&&(d.setCoordsPoint2D(_.getXY(_.getPointCount()-1)),d.scale(s));const g=(0,m.mS)(f,new o.a7,!1),p=(0,m.mS)(f,new u.S(new o.a7,new o.a7),!1),P=new u.P,x=new u.P,y=r.at(-1),S=1/s;for(let s=0;s<r.length;s++){const m=r[s];let u;0===s?u=a:s===r.length-1?u=h:(o.a8.geodeticDistance(e,t,y.x,y.y,m.x,m.y,null,null,g,i),u=g.val-.5*Math.PI),o.a8.geodesicCoordinate(e,t,m.x,m.y,n,u,p.at(0),p.at(1)),c?x.setCoords(p.at(0).val,p.at(1).val):(P.setCoords(p.at(0).val,p.at(1).val),l=b(m.x,P.x,d.x,l),x.setCoords(l+P.x,P.y),d.setCoordsPoint2D(x)),x.scale(S),_.insertPoint2D(0,-1,x)}return l}catch(e){f.error=e,f.hasError=!0}finally{(0,m.hk)(f)}}function P(e,t,s,n,i,r,a,h,c,l,_,f=Number.NaN,d=Number.NaN){const g={stack:[],error:void 0,hasError:!1};try{if(a-r<h)return l;const p=(0,m.mS)(g,new u.S(new o.a7,new o.a7),!1),P=new u.P,x=new u.P,y=new u.P;x.setNAN(),c||_.getPointCount()>0&&(x.setCoordsPoint2D(_.getXY(_.getPointCount()-1)),x.scale(s));let S=Math.ceil(r/h),w=S++*h;w===r&&(w=S++*h);let C=r;const v=1/s;for(;w<a+h&&(C<f&&f<w?(w=f,S--):C<d&&d<w&&(w=d,S--),!(w>=a));)o.a8.geodesicCoordinate(e,t,i.x,i.y,n,w,p.at(0),p.at(1)),c?y.setCoords(p.at(0).val,p.at(1).val):(P.setCoords(p.at(0).val,p.at(1).val),l=b(i.x,P.x,x.x,l),y.setCoords(l+P.x,P.y),x.setCoordsPoint2D(y)),y.scale(v),_.insertPoint2D(0,-1,y),C=w,w=S++*h;return l}catch(e){g.error=e,g.hasError=!0}finally{(0,m.hk)(g)}}function x(e,t,s,n,i,r,a,h,c,l,_){const f={stack:[],error:void 0,hasError:!1};try{const s=new u.P,d=new u.P,g=(0,m.mS)(f,new u.S(new o.a7,new o.a7),!1);o.a8.geodesicCoordinate(e,t,i.x,i.y,n,r,g.at(0),g.at(1)),s.setCoords(g.at(0).val,g.at(1).val),o.a8.geodesicCoordinate(e,t,i.x,i.y,n,a,g.at(0),g.at(1)),d.setCoords(g.at(0).val,g.at(1).val);const p=(0,m.mS)(f,new o.a7,!1);for(o.a8.geodeticDistance(e,t,h.x,h.y,s.x,s.y,null,p,null,0),l[0]=p.val,o.a8.geodeticDistance(e,t,h.x,h.y,d.x,d.y,null,p,null,0),_[0]=p.val;l[0]<=_[0];)l[0]+=u.p;for(;l[0]>_[0];)l[0]-=u.p;for(;l[0]>=c;)l[0]-=u.p,_[0]-=u.p;for(;l[0]<c;)l[0]+=u.p,_[0]+=u.p}catch(e){f.error=e,f.hasError=!0}finally{(0,m.hk)(f)}}function b(e,t,s,n){if(Number.isNaN(s)){for(;n+t-e>Math.PI;)n-=u.p;for(;e-(n+t)>Math.PI;)n+=u.p;return n}return n+t-s>Math.PI?n-=u.p:s-(n+t)>Math.PI&&(n+=u.p),n}function y(e,t,s,n,i,r){const a={stack:[],error:void 0,hasError:!1};try{if(n>=r)return!1;const h=s[0],c=s.at(-1),u=(0,m.mS)(a,new o.a7,!1),l=(0,m.mS)(a,new o.a7,!1),_=(0,m.mS)(a,new o.a7,!1);o.a8.greatEllipticDistance(e,t,i.x,i.y,h.x,h.y,u,null,null),o.a8.greatEllipticDistance(e,t,i.x,i.y,c.x,c.y,l,null,null),o.a8.greatEllipticDistance(e,t,h.x,h.y,c.x,c.y,_,null,null);let f=Math.min(u.val,l.val)+_.val,d=f+n;if(d<r)return!0;const g=(0,m.mS)(a,new o.a7,!1);f=Math.max(u.val,l.val);for(let n=1;n<s.length-1;n++){const r=s[n];o.a8.greatEllipticDistance(e,t,i.x,i.y,r.x,r.y,g,null,null),g.val>f&&(f=g.val)}return d=f+n,d<r}catch(e){a.error=e,a.hasError=!0}finally{(0,m.hk)(a)}}function S(e,t,s,n,i,r,m,a){let h;if(n.length%2==0){const e=n.length>>1,t=n[e],s=n[e-1];h=u.P.lerp(t,s,.5)}else h=n[n.length-1>>1].clone();const c=h.clone(),l=(0,o.at)(e,t,c,75/180*Math.PI);return!!y(e,t,n,i,c,l)&&(null!==r&&(r.setCoordsPoint2D(h),r.scale(1/s)),null!==m&&m.setCoordsPoint2D(c),null!==a&&(a[0]=l),!0)}function w(e,t,s,n,i,r){const a={stack:[],error:void 0,hasError:!1};try{if(n>=r)return!1;const h=(0,m.mS)(a,new o.a7,!1);return o.a8.greatEllipticDistance(e,t,i.x,i.y,s.x,s.y,h,null,null),h.val+n<r}catch(e){a.error=e,a.hasError=!0}finally{(0,m.hk)(a)}}function C(e,t){return new o.ay(e,t)}function v(e){return(0,h.h)(e,0)||(0,h.s)(e,0),e}class D{constructor(e){this.m_bRunningInGnomonic=!1,this.m_bNeedsSimplify=!1,this.m_gnomonic=null,this.m_gnomonicCenterRad=new u.P,this.m_minGnomonicRadius=Number.NaN,this.m_progressTracker=e}isRunningInGnomonic(){return this.m_bRunningInGnomonic}needsSimplify(){return this.m_bNeedsSimplify}getGnomonic(){return this.m_gnomonic}}class I extends D{constructor(e,t,s){super(e.m_progressTracker),this.m_segIter=null,this.m_bNextSegmentCannotJoin=!1,this.m_currentDensifiedDelta=[0],this.m_currentBufferedDelta=0,this.m_lastAzimuth=0,this.m_startAzimuth=[0],this.m_endAzimuth=[0],this.m_numWinds=0,this.m_debugCounter=0,this.m_bufferHelper=new a.a,this.m_densifiedPoints=[],this.m_bufferer=e,this.m_multiPath=t,this.m_densified=s,this.m_bNeedsSimplify=!0;const n=new r.Envelope2D;this.m_multiPath.queryEnvelope(n);const i=n.getCenter(),m=i.clone();m.scale(this.m_bufferer.m_rpu),this.m_gnomonic=C(this.m_bufferer.m_gcs,i),this.m_gnomonicCenterRad=m.clone(),this.m_minGnomonicRadius=(0,o.at)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,m,75/180*Math.PI)}next(){let e;if(this.m_bNextSegmentCannotJoin)return this.m_bNextSegmentCannotJoin=!1,this.m_segIter.nextSegment(),e=this.m_bufferHelper.clone(),e;if(null===this.m_segIter){if(this.m_segIter=this.m_multiPath.getImpl().querySegmentIterator(),!this.m_segIter.nextPath())return null;null!==this.m_densified&&this.m_densified.addPathPoint2D(null,0,!0)}if(!this.m_segIter.hasNextSegment()){if(!this.m_segIter.nextPath())return null;null!=this.m_densified&&this.m_densified.addPathPoint2D(null,0,!0)}let t=null;this.m_currentBufferedDelta=0,this.m_currentDensifiedDelta=[0],this.m_numWinds=0,this.m_lastAzimuth=Number.NaN,this.m_bNextSegmentCannotJoin=!1,this.m_densifiedPoints.length=0;let s=0;const n=new u.P,i=new u.P;for(;this.m_segIter.hasNextSegment()&&this.m_numWinds<16;){const e=this.m_segIter.nextSegment();if(n.setCoordsPoint2D(e.getStartXY()),i.setCoordsPoint2D(e.getEndXY()),n.scale(this.m_bufferer.m_rpu),i.scale(this.m_bufferer.m_rpu),(0,o.au)(n,i))n.x=i.x;else if((0,o.av)(n,i))i.x=n.x;else{let e=-1,t=-1;const s=this.m_segIter.getPathIndex(),r=this.m_multiPath.getPathStart(s),m=this.m_multiPath.getPathEnd(s);if(e=this.m_segIter.getStartPointIndex()-1,t=this.m_segIter.getEndPointIndex()+1,e<r&&(e=this.m_multiPath.isClosedPath(s)?m-1:-1),t>m-1&&(t=this.m_multiPath.isClosedPath(s)?r:-1),-1!==e){const t=this.m_multiPath.getXY(e);t.scale(this.m_bufferer.m_rpu),(0,o.av)(t,n)&&(n.x=t.x)}if(-1!==t){const e=this.m_multiPath.getXY(t);e.scale(this.m_bufferer.m_rpu),(0,o.au)(i,e)&&(i.x=e.x)}}this.m_densifiedPoints.length=0;const r=(0,o.aw)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_curveType,n,i,this.m_bufferer.m_segmentStep,Number.NaN,this.m_bufferer.m_radTolerance,this.m_startAzimuth,this.m_endAzimuth,this.m_densifiedPoints,this.m_currentDensifiedDelta);if(0===s)this.m_bRunningInGnomonic=this.isSegmentBufferInCurrentGnomonic(this.m_densifiedPoints),this.m_bRunningInGnomonic||(this.m_bRunningInGnomonic=this.tryUpdateGnomonic(this.m_densifiedPoints));else if(this.m_bRunningInGnomonic){if(!this.isSegmentBufferInCurrentGnomonic(this.m_densifiedPoints)){this.m_segIter.previousSegment(),this.m_segIter.previousSegment(),this.m_segIter.nextSegment();break}}else if(S(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_densifiedPoints,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,null,null,null)){this.m_segIter.previousSegment(),this.m_segIter.previousSegment(),this.m_segIter.nextSegment();break}if(0===r||(0,o.ax)(n,i)?(this.m_bufferHelper.setEmpty(),this.m_bufferer.bufferPoint2D(n,this.m_bRunningInGnomonic,this.m_bufferHelper),this.m_bNextSegmentCannotJoin=!0):(this.m_bufferHelper.setEmpty(),this.m_bNextSegmentCannotJoin=this.checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(r,this.m_bufferHelper)),this.m_bNextSegmentCannotJoin){this.m_segIter.previousSegment(),this.m_segIter.hasPreviousSegment()?(this.m_segIter.previousSegment(),this.m_segIter.nextSegment()):this.m_segIter.resetToFirstSegment(),null!=this.m_densified&&this.m_densified.insertPointsFromPoints(this.m_densified.getPathCount()-1,-1,this.m_densifiedPoints,0,this.m_densifiedPoints.length-1,!0);break}null!=this.m_densified&&this.m_densified.insertPointsFromPoints(this.m_densified.getPathCount()-1,-1,this.m_densifiedPoints,0,this.m_densifiedPoints.length-1,!0),null===t&&(t=new a.a,t.addPathPoint2D(null,0,!0)),this.addJoinAndBufferLeftSide(t),s++}if(this.m_currentDensifiedDelta=[0],s>0){const e=this.m_segIter.getStartPointIndex(),r=this.m_segIter.getPathIndex();for(;s>0;){if(this.m_segIter.previousSegment(),n.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getStartPointIndex())),i.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getEndPointIndex())),n.scale(this.m_bufferer.m_rpu),i.scale(this.m_bufferer.m_rpu),this.m_bRunningInGnomonic)if((0,o.au)(n,i))n.x=i.x;else if((0,o.av)(n,i))i.x=n.x;else{let e=-1,t=-1;const s=this.m_segIter.getPathIndex(),r=this.m_multiPath.getPathStart(s),m=this.m_multiPath.getPathEnd(s);if(e=this.m_segIter.getStartPointIndex()-1,t=this.m_segIter.getEndPointIndex()+1,e<r&&(e=this.m_multiPath.isClosedPath(s)?m-1:-1),t>m-1&&(t=this.m_multiPath.isClosedPath(s)?r:-1),-1!==e){const t=this.m_multiPath.getXY(e);t.scale(this.m_bufferer.m_rpu),(0,o.av)(t,n)&&(n.x=t.x)}if(-1!==t){const e=this.m_multiPath.getXY(t);e.scale(this.m_bufferer.m_rpu),(0,o.au)(i,e)&&(i.x=e.x)}}this.m_densifiedPoints.length=0,(0,o.aw)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_curveType,i,n,this.m_bufferer.m_segmentStep,Number.NaN,this.m_bufferer.m_radTolerance,this.m_startAzimuth,this.m_endAzimuth,this.m_densifiedPoints,this.m_currentDensifiedDelta),this.addJoinAndBufferLeftSide(t),s--}return n.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getStartPointIndex())),n.scale(this.m_bufferer.m_rpu),this.m_currentBufferedDelta=P(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,n,this.m_lastAzimuth+.5*Math.PI,this.m_lastAzimuth+1.5*Math.PI,this.m_bufferer.m_cornerStep,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,t),this.m_segIter.resetToVertex(e,r),this.m_segIter.nextSegment(),t}return this.m_bNextSegmentCannotJoin=!1,this.m_segIter.nextSegment(),e=this.m_bufferHelper.clone(),e}isSegmentBufferInCurrentGnomonic(e){return null!==this.m_gnomonic&&y(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,this.m_gnomonicCenterRad,this.m_minGnomonicRadius)}tryUpdateGnomonic(e){const t=new u.P,s=new u.P,n=[0];return S(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,t,s,n)?(this.m_gnomonicCenterRad.setCoordsPoint2D(s),this.m_minGnomonicRadius=n[0],this.m_gnomonic=C(this.m_bufferer.m_gcs,t),!0):(this.m_gnomonic=null,!1)}checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(e,t){return this.m_bufferer.checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(this.m_densifiedPoints,e,this.m_startAzimuth[0],this.m_endAzimuth[0],this.m_bRunningInGnomonic,t)}addJoinAndBufferLeftSide(e){const t=this.m_densifiedPoints[0];let s=Number.NaN,n=this.m_startAzimuth[0]-u.o;const i=this.m_endAzimuth[0]+u.o;let r=!1;if(!Number.isNaN(this.m_lastAzimuth)){this.m_lastAzimuth>=this.m_startAzimuth[0]?(s=this.m_lastAzimuth+u.o,n=s+Math.PI-(this.m_lastAzimuth-this.m_startAzimuth[0])):(s=this.m_lastAzimuth+u.o,n=s+Math.PI-(u.p-(this.m_startAzimuth[0]-this.m_lastAzimuth))),r=!(this.m_lastAzimuth>=this.m_startAzimuth[0]&&this.m_lastAzimuth-this.m_startAzimuth[0]<=Math.PI||this.m_lastAzimuth<this.m_startAzimuth[0]&&this.m_startAzimuth[0]-this.m_lastAzimuth>=Math.PI);let i=!1;if(Math.abs(n-s)<=.5*this.m_bufferer.m_cornerStep&&(r||(i=!0)),i){if(e.removePointFromPath(0,e.getPointCount()-1),!this.m_bRunningInGnomonic){const t=new u.P;t.setCoordsPoint2D(e.getXY(e.getPointCount()-1)),t.scale(this.m_bufferer.m_rpu),t.x-this.m_currentBufferedDelta<-Math.PI?this.m_currentBufferedDelta-=u.p:t.x-this.m_currentBufferedDelta>Math.PI&&(this.m_currentBufferedDelta+=u.p)}n=.5*(n+s)}else if(r){const s=new u.P;s.setCoordsPoint2D(t),s.scale(1/this.m_bufferer.m_rpu),e.insertPoint2D(0,-1,s)}else P(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,this.m_densifiedPoints[0],s,n,this.m_bufferer.m_cornerStep,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,e)}this.m_startAzimuth[0]!==this.m_lastAzimuth&&this.m_numWinds++,p(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,this.m_bufferer.m_curveType,this.m_densifiedPoints,n,i,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,e),this.m_lastAzimuth=this.m_endAzimuth[0]}}class G extends D{constructor(e,t){super(e.m_progressTracker),this.m_pointIndex=-1,this.m_bufferer=e,this.m_multiPoint=t,this.m_bNeedsSimplify=!1;const s=new r.Envelope2D;this.m_multiPoint.queryEnvelope(s);const n=s.getCenter(),i=n.clone();i.scale(this.m_bufferer.m_rpu),this.m_gnomonic=C(this.m_bufferer.m_gcs,n),this.m_gnomonicCenterRad=i.clone(),this.m_minGnomonicRadius=(0,o.at)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,i,75/180*Math.PI)}next(){if(this.m_bNeedsSimplify=!1,++this.m_pointIndex===this.m_multiPoint.getPointCount())return null;const e=this.m_multiPoint.getXY(this.m_pointIndex);e.scale(this.m_bufferer.m_rpu),this.m_bRunningInGnomonic=this.isPointBufferInCurrentGnomonic(e),this.m_bRunningInGnomonic||(this.m_bRunningInGnomonic=this.tryUpdateGnomonic(e));const t=new a.a,s=this.m_bufferer.bufferPoint2D(e,this.m_bRunningInGnomonic,t);return this.m_bNeedsSimplify=s,t}isPointBufferInCurrentGnomonic(e){return null!==this.m_gnomonic&&w(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,this.m_gnomonicCenterRad,this.m_minGnomonicRadius)}tryUpdateGnomonic(e){const t=new u.P,s=new u.P,n=[0];return function(e,t,s,n,i,r,m,a){const h=(0,o.at)(e,t,n,75/180*Math.PI);return!!w(e,t,n,i,n,h)&&(null!==r&&(r.setCoordsPoint2D(n),r.scale(1/s)),null!==m&&m.setCoordsPoint2D(n),null!==a&&(a[0]=h),!0)}(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,t,s,n)?(this.m_gnomonicCenterRad.setCoordsPoint2D(s),this.m_minGnomonicRadius=n[0],this.m_gnomonic=C(this.m_bufferer.m_gcs,t),!0):(this.m_gnomonic=null,!1)}}class T{getOperatorType(){return 10110}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n,i,r,m,a){if(m){const m=new k(e,t,s,n,i,!1,r,a);return(new o.W).executeMany(m,t,a)}return new k(e,t,s,n,i,!1,r,a)}execute(e,t,s,r,o,m,a){const h=new n.S([e]),c=[r],u=this.executeMany(h,t,s,c,o,!1,m,a).next();return u||(0,i.d)("geodesic buffer null output"),u}}class k extends n.G{constructor(e,t,s,n,o,m,a,h){super(),this.m_currentUnionEnvelope2D=new r.Envelope2D,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,m&&(0,i.t)(""),t||(0,i.a)(""),0===t.getCoordinateSystemType()&&(0,i.a)(""),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=s,this.m_distances=n,this.m_convergenceOffset=o,this.m_bOutlineOnly=m,this.m_bUnion=a}next(){let e;for(;e=this.m_inputGeoms.next();)return(0,i.c)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.geodesicBuffer(e,this.m_distances[this.m_dindex]);return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodesicBuffer(e,t){return function(e,t,s,n,r,o){n<Number.MAX_VALUE&&n>-Number.MAX_VALUE||(0,i.a)("Geodesic_bufferer.buffer - bad distance"),(0,i.c)(e);const m=(0,_.c)(e),a=m.getGeometryType();if((0,i.i)(a)){const e=m.getPointCount(),h=8e6;if(Math.abs(n)>h&&(e>50||a!==i.G.enumMultiPoint&&4===s&&e>2)){let e=m;const i=n>0?1:-1,a=7e6;let c=n,u=1;do{u++,c=(Math.abs(c)-a)*i}while(Math.abs(c)>h);c=n;for(let n=0;n<u-1;n++)e=g(e,t,s,a*i,r,u,o),c=(Math.abs(c)-a)*i;return e=g(e,t,s,c,r,u,o),e}}return g(m,t,s,n,r,1,o)}(e,this.m_spatialReference,this.m_curveType,t,this.m_convergenceOffset,this.m_progressTracker)}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7444],{1364:(e,t,s)=>{s.d(t,{c:()=>i});var n=s(55537);function i(e,t){const s=e.getGeometryType();return s===n.G.enumPoint?e:(0,n.h)(s)?function(e){if(function(e){for(let t=0,s=e.getPathCount();t<s;t++){const s=e.getPathSize(t);if(0===s)return!1;if(1===s){if(0===e.getSegmentCountPath(t))return!1;if(e.getSegmentType(e.getPathStart(t))===n.G.enumLine)return!1;if(!e.isClosedPath(t))return!1}}return!0}(e))return e;const t=e.createInstance();for(let s=0,i=e.getPathCount();s<i;s++){const i=e.getPathSize(s);if(0!==i){if(1===i){if(0===e.getSegmentCountPath(s))continue;if(e.getSegmentType(e.getPathStart(s))===n.G.enumLine)continue;if(!e.isClosedPath(s))continue}t.addPath(e,s,!0)}}return t}(e):s===n.G.enumMultiPoint||s===n.G.enumEnvelope?e:s===n.G.enumMultipatch?((0,n.t)("not implemented for multipatch"),e):e}},37444:(e,t,s)=>{s.r(t),s.d(t,{OperatorGeodesicBuffer:()=>T});var n=s(76061),i=s(55537),r=s(79187),a=s(39117),o=s(31635),m=s(88885),h=s(95213),c=s(11878),u=s(83661),l=s(31139),_=s(1364),f=s(5247);class d{constructor(e){this.m_sr=null,this.m_gcs=null,this.m_transform=null,this.m_a=0,this.m_eSquared=0,this.m_rpu=0,this.m_radTolerance=0,this.m_q90=0,this.m_gcs90=0,this.m_gcs180=0,this.m_gcs360=0,this.m_gcs60=0,this.m_ellipticToGeodesicMaxRatio=0,this.m_curveType=0,this.m_bShapePreserving=!1,this.m_distance=0,this.m_absDistance=0,this.m_convergenceOffset=0,this.m_cornerStep=0,this.m_segmentStep=0,this.m_progressTracker=e}bufferPolygon(e){const t=new m.a,s=new I(this,e,t);return this.processGnomonicBufferPiecesCursor(!0,s)}bufferPolyline(e){const t=new I(this,e,null);return this.processGnomonicBufferPiecesCursor(!0,t)}bufferMultiPoint(e){const t=new G(this,e);return this.processGnomonicBufferPiecesCursor(!1,t)}bufferPoint(e){const t=e.getXY();t.scale(this.m_rpu);let s=new m.a;if(this.bufferPoint2D(t,!1,s)){const e=(0,h.b)(null,s,!0);s=(0,a.a3)(s,e,!0,!0,-1,this.m_progressTracker,0,!1)}return s=(new a.O).foldInto360RangeGeodetic(s,this.m_gcs,2),s}processGnomonicBufferPiecesCursor(e,t){const s=t;let n=s.getGnomonic();const i=(0,a.e)((0,a.ao)());let o=new a.ap,m=(new a.W).executeMany(o,i,this.m_progressTracker,2);const l=(0,u.d)(6,!1),_=(0,u.m)(r.Envelope2D,6);this.initializeGrid(l,_);const f=[null,null,null,null,null,null],d=[null,null,null,null,null,null],g=[null,null,null,null,null,null];let p,P,b;for(;null!==(p=s.next());){if(P=s.getGnomonic(),P!==n){if(null!==n){let t=m.next();if(o=null,m=null,null!=t){const s=(0,h.b)(i,t,!0),r=(0,h.e)(s);t=n.unproject(t,r,this.m_progressTracker),this.putInGridCursors(e,t,i,!0,l,_,f,d,g)}}null!==P&&(o=new a.ap,m=(new a.W).executeMany(o,i,this.m_progressTracker,2)),n=P}if(s.isRunningInGnomonic()){if(P.project(p),s.needsSimplify()){const e=(0,h.b)(null,p,!0);p=(0,a.a3)(p,e,!0,!0,-1,this.m_progressTracker,0,!1)}o.tick(v(p)),m.tock()}else this.putInGridCursors(e,p,i,!0,l,_,f,d,g)}let x=!1;for(let e=0;e<6;e++)if(null!=g[e]){x=!0;break}if(x){let t=!1;const r=[null,null,null,null,null,null];if(e){const n=s.m_densified;if(s.m_densified=null,null!==n){const s=new c.T;s.scale(1/this.m_rpu,1/this.m_rpu),n.applyTransformation(s),this.m_distance>0?this.putInGridCursors(e,n,i,!1,l,_,f,d,g):(this.processInGrid(e,n,!1,l,_,f,r),t=!0)}}const u=new a.ap,p=(new a.W).executeMany(u,this.m_gcs,this.m_progressTracker,2);if(null!==m){let t=m.next();o=null,m=null;const s=(0,h.b)(i,t,!0),r=(0,h.e)(s);t=n.unproject(t,r,this.m_progressTracker),this.putInGridCursors(e,t,i,!0,l,_,f,d,g)}for(let e=0;e<6;e++)if(null!=g[e]){let s=g[e].next();g[e]=null,d[e]=null,t&&null!==r[e]&&(s=(new a.V).execute(r[e],s,i,this.m_progressTracker));const n=(0,h.b)(i,s,!0),o=(0,h.e)(n);s=f[e].unproject(s,o,this.m_progressTracker),s=(new a.L).execute(s,this.m_gcs,!0,this.m_progressTracker),u.tick(v(s)),p.tock()}b=p.next()}else{let t,r=!1;if(e){let e=s.m_densified;if(s.m_densified=null,null!==e){const s=new c.T;s.scale(1/this.m_rpu,1/this.m_rpu),e.applyTransformation(s),P.project(e);const n=(0,h.b)(null,e,!0);e=(0,a.a3)(e,n,!1,!0,-1,this.m_progressTracker,0,!1),this.m_distance>0?(o.tick(v(e)),m.tock()):(t=e,r=!0)}}let u=m.next();o=null,m=null,r&&(u=(new a.V).execute(t,u,i,this.m_progressTracker));const l=(0,h.b)(i,u,!0),_=(0,h.e)(l);b=n.unproject(u,_,this.m_progressTracker),b=(new a.L).execute(b,this.m_gcs,!0,this.m_progressTracker)}return b=(new a.O).foldInto360RangeGeodetic(b,this.m_gcs,2),b}putInGridCursors(e,t,s,n,i,r,o,m,h){const c=[null,null,null,null,null,null];this.processInGrid(e,t,n,i,r,o,c);for(let e=0;e<6;e++)null!==c[e]&&(null===m[e]&&(m[e]=new a.ap,h[e]=(new a.W).executeMany(m[e],s,this.m_progressTracker,2)),m[e].tick(v(c[e])),h[e].tock())}processInGrid(e,t,s,n,i,r,o){const m=.01,c=this.insertGeodeticPointsAlongGrid(t,i,m);for(let e=0;e<6;e++){if(n[e])continue;const _=i[e].clone();_.inflateCoords(m,m);const f=(0,h.f)(t,_),d=(0,h.c)(null,f,!1).total();let g=(0,l.c)(c,_,d,Number.NaN,this.m_progressTracker);if(null!==g&&!g.isEmpty()){if(g===c&&(g=g.clone()),null===r[e]){const t=new u.P;e<3?t.setCoords(0,1):t.setCoords(0,-1);const s=new u.P;s.setAdd(i[e].getCenter(),t),r[e]=C(this.m_gcs,s)}r[e].project(g);const t=(0,h.b)(null,g,!0);g=(0,a.a3)(g,t,s,!0,-1,this.m_progressTracker,0,!1),o[e]=g}}}insertGeodeticPointsAlongGrid(e,t,s){const n=r.Envelope2D.construct(t[3].xmin,t[3].ymin,t[2].xmax,t[2].ymax),i=(0,a.aq)(this.m_gcs,n,e,!0,this.m_progressTracker),o=new m.E,h=o.addGeometry(i);return(0,a.ar)(o,h,this.m_gcs,0,2,!0,t[0].xmax+s),(0,a.ar)(o,h,this.m_gcs,0,2,!0,t[1].xmax+s),(0,a.ar)(o,h,this.m_gcs,0,2,!1,t[1].ymin+s),0!==s&&((0,a.ar)(o,h,this.m_gcs,0,2,!0,t[0].xmax-s),(0,a.ar)(o,h,this.m_gcs,0,2,!0,t[1].xmax-s),(0,a.ar)(o,h,this.m_gcs,0,2,!1,t[1].ymin-s)),o.getGeometry(h)}initializeGrid(e,t){for(let t=0;t<6;t++)e[t]=!1;t[0].setCoords({xmin:-this.m_gcs180,ymin:0,xmax:-this.m_gcs60,ymax:this.m_gcs90}),t[1].setCoords({xmin:-this.m_gcs60,ymin:0,xmax:this.m_gcs60,ymax:this.m_gcs90}),t[2].setCoords({xmin:this.m_gcs60,ymin:0,xmax:this.m_gcs180,ymax:this.m_gcs90}),t[3].setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:-this.m_gcs60,ymax:0}),t[4].setCoords({xmin:-this.m_gcs60,ymin:-this.m_gcs90,xmax:this.m_gcs60,ymax:0}),t[5].setCoords({xmin:this.m_gcs60,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:0})}checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(e,t,s,n,i,r){const o=e[0],m=e.at(-1),h=o.y<m.y?o.y:m.y,c=o.y>m.y?o.y:m.y,l=a.al.q(this.m_a,this.m_eSquared,h),_=a.al.q(this.m_a,this.m_eSquared,c);if(this.m_q90-(l+t+this.m_absDistance)>.001&&this.m_q90+(_-t-this.m_absDistance)>.001)return!1;const f=s-u.o,d=n+u.o,g=f-Math.PI,x=f+Math.PI,y=d+Math.PI,S=[Number.NaN],w=[Number.NaN],C=[Number.NaN],v=[Number.NaN];let D=!1;if(b(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,o,f,g,m,d,S,w),b(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,m,y,d,o,g,C,v),(d<S[0]&&S[0]<y||d<w[0]&&w[0]<y)&&(D=!0),D||(g<C[0]&&C[0]<f||g<v[0]&&v[0]<f)&&(D=!0),!D&&i)return!1;const I=[];for(let t=e.length-1;t>=0;t--)I.push(e[t]);r.setEmpty(),r.addPathPoint2D(null,0,!0);let G=0;G=p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,this.m_curveType,e,f,d,i,G,r),G=P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,m,d,y,this.m_cornerStep,i,G,r,S[0],w[0]),G=p(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,this.m_curveType,I,y,x,i,G,r),G=P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,o,g,f,this.m_cornerStep,i,G,r,C[0],v[0]);let T=!1;return i||(T=this.checkAndPrepForPole(r)),D||T}bufferPoint2D(e,t,s){s.setEmpty(),s.addPathPoint2D(null,0,!0),P(this.m_a,this.m_eSquared,this.m_rpu,this.m_absDistance,e,-this.m_cornerStep,2*Math.PI,this.m_cornerStep,t,0,s);let n=!1;return t||(n=this.checkAndPrepForPole(s)),n}checkAndPrepForPole(e){const t=this.checkAndPrepForPoleTouch(e),s=this.checkAndPrepForPoleWrap(e);return t||s}checkAndPrepForPoleTouch(e){const t=new r.Envelope2D;return e.queryEnvelope(t),!(!(0,a.as)(t.ymax,this.m_gcs90)&&!(0,a.as)(t.ymin,-this.m_gcs90)||(this.prepPoleTouch(e),0))}checkAndPrepForPoleWrap(e){const t=e.getXY(0),s=e.getXY(e.getPointCount()-1);return Math.abs(t.x-s.x)>this.m_gcs180?(this.prepSinglePoleWrap(e),!0):this.checkAndPrepForDoublePoleWrap(e)}checkAndPrepForDoublePoleWrap(e){return e.calculateArea2D()<0&&(this.prepDoublePoleWrap(e),!0)}prepPoleTouch(e){const t=new m.a;t.insertPath2D(-1,null,0,0,!0);const s=e.getPathStart(0),n=e.getPathEnd(0),i=n-s;let r=-1;for(r=s;r<n;r++){const t=e.getXY(r),s=(0,a.as)(t.y,this.m_gcs90),n=(0,a.as)(t.y,-this.m_gcs90);if(!s&&!n)break}let o=r,h=!1,c=Number.NaN;do{const n=e.getXY(o),r=(0,a.as)(n.y,this.m_gcs90),m=(0,a.as)(n.y,-this.m_gcs90),l=s+(o+1-s)%i;if(r||m){let s=u.P.construct(c,n.y);t.insertPoint2D(0,-1,s);const i=e.getXY(l),r=(0,a.as)(i.y,this.m_gcs90),o=(0,a.as)(i.y,-this.m_gcs90);r||o||(s=u.P.construct(i.x,n.y),h?t.setXY(t.getPointCount()-1,s):t.insertPoint2D(0,-1,s)),h=!0}else t.insertPoint2D(0,-1,n),c=n.x,h=!1;o=l}while(o!==r);e.setEmpty(),e.add(t,!1)}prepSinglePoleWrap(e){const t=new m.a,s=new m.a,n=new c.T,i=e.getXY(e.getPathStart(0)),o=e.getXY(e.getPathEnd(0)-1),_=this.m_gcs360,f=this.m_gcs180,d=new r.Envelope2D;d.setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:this.m_gcs90});const g=new r.Envelope2D;e.queryEnvelope(g);const p=Math.ceil(g.width()/_);let P,b;i.x>o.x?(P=-_,b=this.m_gcs90):(P=_,b=-this.m_gcs90),n.setShiftCoords(P,0),t.addPath(e,0,!0),s.add(t,!1);const x=new h.P;for(let e=0;e<p;e++)s.applyTransformation(n),s.getPointByVal(0,x),t.lineToPoint(x),t.addSegmentsFromPath(s,0,0,s.getSegmentCount()-1,!1);const y=t.getXY(0),S=t.getXY(t.getPointCount()-1);y.y=b,S.y=b,t.lineTo(S);const w=new u.P;for(w.setCoordsPoint2D(S),w.x-=.5*P;Math.abs(w.x-y.x)>f;)t.lineTo(w),w.x-=.5*P;t.lineTo(y);const C=d.getCenterX(),v=new r.Envelope2D;t.queryEnvelope(v);let D=0;const I=v.getCenter().x;I-C>f?D=-Math.ceil((I-C-f)/_):C-I>f&&(D=Math.ceil((C-I-f)/_)),0!==D&&(n.setShiftCoords(D*_,0),t.applyTransformation(n));const G=new m.E,T=G.addGeometry(t);(0,a.ar)(G,T,this.m_gcs,0,2,!0,d.xmin),(0,a.ar)(G,T,this.m_gcs,0,2,!0,d.xmax);const k=G.getGeometry(T),M=(0,h.f)(k,d);M.inflateCoords(0,1);const E=(0,h.c)(null,M,!0).total(),N=(0,l.c)(k,d,E,Number.NaN,this.m_progressTracker);e.setEmpty(),e.add(N,!1)}prepDoublePoleWrap(e){const t=this.m_gcs360,s=this.m_gcs180,n=new r.Envelope2D;n.setCoords({xmin:-this.m_gcs180,ymin:-this.m_gcs90,xmax:this.m_gcs180,ymax:this.m_gcs90});const i=n.getCenter().x,o=new r.Envelope2D;e.queryPathEnvelope(0,o);let _,f=0,d=o.getCenter().x;if(d-i>s?f=-Math.ceil((d-i-s)/t):i-d>s&&(f=Math.ceil((i-d-s)/t)),0!==f){const s=new c.T;s.setShiftCoords(f*t,0),e.getImpl().applyTransformationToPath(s,0),e.queryPathEnvelope(0,o),d=o.getCenter().x}const g=new r.Envelope2D;n.containsExclusiveEnvelope(o)?(_=!1,g.setCoords({env2D:n})):(_=!0,g.setCoords({env2D:n}),g.xmin-=t,g.xmax+=t);let p=e.createInstance();p.addPathPoint2D(null,0,!0);const P=new u.P;if(P.setCoords(g.xmin,g.ymin),p.insertPoint2D(0,-1,P),P.setCoords(g.xmin,g.ymax),p.insertPoint2D(0,-1,P),P.setCoords(.5*(g.xmin+g.xmax),g.ymax),p.insertPoint2D(0,-1,P),P.setCoords(g.xmax,g.ymax),p.insertPoint2D(0,-1,P),P.setCoords(g.xmax,g.ymin),p.insertPoint2D(0,-1,P),P.setCoords(.5*(g.xmin+g.xmax),g.ymin),p.insertPoint2D(0,-1,P),_){p.addPath(e,0,!0);const s=new c.T;d<i?s.setShiftCoords(t,0):s.setShiftCoords(-t,0),e.getImpl().applyTransformationToPath(s,0),p.addPath(e,0,!0);const r=new m.E,o=r.addGeometry(p);(0,a.ar)(r,o,this.m_gcs,0,2,!0,n.xmin),(0,a.ar)(r,o,this.m_gcs,0,2,!0,n.xmax),p=r.getGeometry(o);const u=(0,h.f)(p,n);u.inflateCoords(0,1);const _=(0,h.c)(null,u,!0).total();p=(0,l.c)(p,n,_,Number.NaN,this.m_progressTracker)}else p.addPath(e,0,!0);e.setEmpty(),e.add(p,!1)}setMinCornerStep(){const e={stack:[],error:void 0,hasError:!1};try{let t=Math.min(Math.PI*this.m_a-this.m_absDistance,this.m_absDistance);t=Math.min(t,.125*this.m_a*Math.PI);const s=new u.P;s.setCoords(0,10*this.m_rpu);const n=0;let i=45*this.m_rpu;const r=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),m=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),h=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),c=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),l=new u.P,_=new u.P,f=new u.P,d=new u.P;for(a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,n,r.at(0),r.at(1)),l.setCoords(r.at(0).val,r.at(1).val),a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,i,m.at(0),m.at(1)),_.setCoords(m.at(0).val,m.at(1).val);;){const e={stack:[],error:void 0,hasError:!1};try{const r=.5*(n+i);a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,r,h.at(0),h.at(1)),f.setCoords(h.at(0).val,h.at(1).val);const u=(0,o.mS)(e,new a.aa,!1),g=(0,o.mS)(e,new a.aa,!1);a.ab.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,_.x,_.y,u,g,null,2),a.ab.geodeticCoordinate(this.m_a,this.m_eSquared,l.x,l.y,.5*u.val,g.val,c.at(0),c.at(1),2),d.setCoords(c.at(0).val,c.at(1).val);const p=(0,o.mS)(e,new a.aa,!1);if(a.ab.geodeticDistance(this.m_a,this.m_eSquared,f.x,f.y,d.x,d.y,p,null,null,2),p.val<=this.m_convergenceOffset)break;i*=.9,a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,i,m.at(0),m.at(1)),_.setCoords(m.at(0).val,m.at(1).val)}catch(t){e.error=t,e.hasError=!0}finally{(0,o.hk)(e)}}const g=i-n,p=2*Math.PI/Math.ceil(2*Math.PI/g);this.m_cornerStep=p}catch(t){e.error=t,e.hasError=!0}finally{(0,o.hk)(e)}}setMinSegmentStep(){const e={stack:[],error:void 0,hasError:!1};try{let t=Math.min(Math.PI*this.m_a-this.m_absDistance,this.m_absDistance);t=Math.min(t,.125*this.m_a*Math.PI);const s=new u.P,n=new u.P;s.setCoords(0,10*this.m_rpu),n.setCoords(10*this.m_rpu,10*this.m_rpu);const i=(0,o.mS)(e,new a.aa,!1),r=(0,o.mS)(e,new a.aa,!1),m=(0,o.mS)(e,new a.aa,!1);a.ab.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,n.x,n.y,m,i,r,this.m_curveType);const h=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),c=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),l=new u.P,_=(0,o.mS)(e,new a.aa,!1),f=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),d=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),g=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),p=(0,o.mS)(e,new u.S(new a.aa,new a.aa),!1),P=new u.P,b=new u.P,x=new u.P,y=new u.P,S=0;let w=1;const C=i.val,v=r.val,D=C-.5*Math.PI,I=v+.5*Math.PI,G=m.val;for(a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,s.x,s.y,t,D,f.at(0),f.at(1)),P.setCoords(f.at(0).val,f.at(1).val),a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,n.x,n.y,t,I,d.at(0),d.at(1)),b.setCoords(d.at(0).val,d.at(1).val);;){const e={stack:[],error:void 0,hasError:!1};try{const i=.5*(S+w);a.ab.geodeticCoordinate(this.m_a,this.m_eSquared,s.x,s.y,i*G,C,h.at(0),h.at(1),this.m_curveType),l.setCoords(h.at(0).val,h.at(1).val),a.ab.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,l.x,l.y,null,null,_,this.m_curveType);const r=_.val+.5*Math.PI;a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,l.x,l.y,t,r,g.at(0),g.at(1)),x.setCoords(g.at(0).val,g.at(1).val);const m=(0,o.mS)(e,new a.aa,!1),u=(0,o.mS)(e,new a.aa,!1);a.ab.geodeticDistance(this.m_a,this.m_eSquared,P.x,P.y,b.x,b.y,m,u,null,2),a.ab.geodeticCoordinate(this.m_a,this.m_eSquared,P.x,P.y,.5*m.val,u.val,p.at(0),p.at(1),2),y.setCoords(p.at(0).val,p.at(1).val);const f=(0,o.mS)(e,new a.aa,!1);if(a.ab.geodeticDistance(this.m_a,this.m_eSquared,x.x,x.y,y.x,y.y,f,null,null,2),f.val<=this.m_convergenceOffset)break;{const e={stack:[],error:void 0,hasError:!1};try{w*=.9,a.ab.geodeticCoordinate(this.m_a,this.m_eSquared,s.x,s.y,w*G,C,c.at(0),c.at(1),this.m_curveType),n.setCoords(c.at(0).val,c.at(1).val);const i=(0,o.mS)(e,new a.aa,!1);a.ab.geodeticDistance(this.m_a,this.m_eSquared,s.x,s.y,n.x,n.y,null,null,i,this.m_curveType);const r=i.val+.5*Math.PI;a.ab.geodesicCoordinate(this.m_a,this.m_eSquared,n.x,n.y,t,r,d.at(0),d.at(1)),b.setCoords(d.at(0).val,d.at(1).val)}catch(t){e.error=t,e.hasError=!0}finally{(0,o.hk)(e)}}}catch(t){e.error=t,e.hasError=!0}finally{(0,o.hk)(e)}}let T=w*G;T>1e5&&(T=1e5),this.m_segmentStep=T}catch(t){e.error=t,e.hasError=!0}finally{(0,o.hk)(e)}}setConvergenceOffset(){let e;e=this.m_absDistance>5e4?100:this.m_absDistance>1e4?10:1,this.m_absDistance/e<500&&(e=this.m_absDistance/500),e<.01&&(e=.01),this.m_convergenceOffset=e}}function g(e,t,s,n,o,c,l){if(e.isEmpty())return new m.a({vd:e.getDescription()});let _=e;if((0,i.m)(_)){const e=10*t.getTolerance(0);_=(new f.O).execute(_,0,e,0,l,12e3)}const g=new d(l);g.m_sr=t,g.m_gcs=t.getGCS(),g.m_transform=(0,a.E)(t,g.m_gcs,null);const p=(0,a.r)();g.m_gcs.querySpheroidData(p);const P=new r.Envelope2D;_.queryEnvelope(P),g.m_a=p.majorSemiAxis,g.m_eSquared=p.e2,g.m_rpu=g.m_gcs.getUnit().getUnitToBaseFactor(),g.m_gcs90=.5*Math.PI/g.m_rpu,g.m_gcs180=Math.PI/g.m_rpu,g.m_gcs360=2*Math.PI/g.m_rpu,g.m_gcs60=g.m_gcs360/6,g.m_q90=a.al.q90(g.m_a,g.m_eSquared),g.m_ellipticToGeodesicMaxRatio=.5*g.m_a*Math.PI/g.m_q90;const b=g.m_gcs.getTolerance(0);g.m_radTolerance=b*g.m_rpu,4===s?(g.m_curveType=2,g.m_bShapePreserving=!0):(g.m_curveType=s,g.m_bShapePreserving=!1),g.m_distance=n,g.m_absDistance=Math.abs(n),Number.isNaN(o)||o<=0?g.setConvergenceOffset():g.m_convergenceOffset=Math.max(o,.001),g.m_convergenceOffset/=c;let x,y=_.getGeometryType();if((0,i.f)(y)){const e=new m.P({vd:_.getDescription()});e.addSegment(_,!0),x=e,y=i.G.enumPolyline}else if(y===i.G.enumEnvelope){const e=_,t=new r.Envelope2D;e.queryEnvelope(t);const s=(0,h.e)((0,h.c)(g.m_sr,P,!0));if(t.minDimension()<=s)if(0===t.maxDimension()){const t=new h.P({vd:_.getDescription()});e.getCenter(t),x=t,y=i.G.enumPoint}else{const t=new m.P({vd:_.getDescription()});t.addEnvelope(e,!1),x=t,y=i.G.enumPolyline}else{const t=new m.a({vd:_.getDescription()});t.addEnvelope(e,!1),x=t,y=i.G.enumPolygon}}else x=_;if(g.setMinCornerStep(),(0,i.e)(y)||g.setMinSegmentStep(),g.m_absDistance<=.5*g.m_convergenceOffset)return y!==i.G.enumPolygon?new m.a({vd:x.getDescription()}):g.m_bShapePreserving?x:(0,a.am)(x,g.m_sr,g.m_curveType,g.m_segmentStep,-1,l);if(g.m_distance<0&&y!==i.G.enumPolygon)return new m.a({vd:x.getDescription()});if(g.m_bShapePreserving&&(0,i.h)(y)){const e=(0,a.am)(x,t,4,Number.NaN,g.m_convergenceOffset,l);x=(new a.O).execute(e,g.m_transform,l)}else x=(new a.O).execute(x,g.m_transform,l);if(x=(0,a.a7)(x,g.m_gcs),x.isEmpty())return new m.a({vd:x.getDescription()});!g.m_bShapePreserving&&(0,i.h)(y)&&(x=(0,a.an)(g.m_rpu,x)),x=function(e,t){const s=e.getGeometryType();let n;if(n=(0,i.h)(s)?e.getPathCount():s===i.G.enumMultiPoint?e.getPointCount():1,1===n)return e;const a=[],o=[];for(let m=0;m<n;m++){a.push(m);const n=new u.P;if((0,i.h)(s)){const t=new r.Envelope2D;e.queryPathEnvelope(m,t),n.assign(t.getCenter())}else n.assign(e.getXY(m));const h=t.toGeohash(n);o.push(h)}a.sort((e,t)=>o[e]<o[t]?-1:o[e]>o[t]?1:0);const m=e.createInstance();for(let t=0;t<n;t++){const n=a[t];(0,i.h)(s)?m.addPath(e,n,!0):m.addPoints(e,n,n+1)}return m}(x,g.m_gcs);let S=new m.a;switch(y){case i.G.enumPolygon:S=g.bufferPolygon(x);break;case i.G.enumPolyline:S=g.bufferPolyline(x);break;case i.G.enumMultiPoint:S=g.bufferMultiPoint(x);break;case i.G.enumPoint:S=g.bufferPoint(x);break;default:(0,i.n)("")}const w=(new a.O).execute(S,g.m_transform.getInverse(),l);return w.mergeVertexDescription(x.getDescription()),w}function p(e,t,s,n,i,r,m,h,c,l,_){const f={stack:[],error:void 0,hasError:!1};try{const d=new u.P;d.setNAN(),c||_.getPointCount()>0&&(d.setCoordsPoint2D(_.getXY(_.getPointCount()-1)),d.scale(s));const g=(0,o.mS)(f,new a.aa,!1),p=(0,o.mS)(f,new u.S(new a.aa,new a.aa),!1),P=new u.P,b=new u.P,y=r.at(-1),S=1/s;for(let s=0;s<r.length;s++){const o=r[s];let u;0===s?u=m:s===r.length-1?u=h:(a.ab.geodeticDistance(e,t,y.x,y.y,o.x,o.y,null,null,g,i),u=g.val-.5*Math.PI),a.ab.geodesicCoordinate(e,t,o.x,o.y,n,u,p.at(0),p.at(1)),c?b.setCoords(p.at(0).val,p.at(1).val):(P.setCoords(p.at(0).val,p.at(1).val),l=x(o.x,P.x,d.x,l),b.setCoords(l+P.x,P.y),d.setCoordsPoint2D(b)),b.scale(S),_.insertPoint2D(0,-1,b)}return l}catch(e){f.error=e,f.hasError=!0}finally{(0,o.hk)(f)}}function P(e,t,s,n,i,r,m,h,c,l,_,f=Number.NaN,d=Number.NaN){const g={stack:[],error:void 0,hasError:!1};try{if(m-r<h)return l;const p=(0,o.mS)(g,new u.S(new a.aa,new a.aa),!1),P=new u.P,b=new u.P,y=new u.P;b.setNAN(),c||_.getPointCount()>0&&(b.setCoordsPoint2D(_.getXY(_.getPointCount()-1)),b.scale(s));let S=Math.ceil(r/h),w=S++*h;w===r&&(w=S++*h);let C=r;const v=1/s;for(;w<m+h&&(C<f&&f<w?(w=f,S--):C<d&&d<w&&(w=d,S--),!(w>=m));)a.ab.geodesicCoordinate(e,t,i.x,i.y,n,w,p.at(0),p.at(1)),c?y.setCoords(p.at(0).val,p.at(1).val):(P.setCoords(p.at(0).val,p.at(1).val),l=x(i.x,P.x,b.x,l),y.setCoords(l+P.x,P.y),b.setCoordsPoint2D(y)),y.scale(v),_.insertPoint2D(0,-1,y),C=w,w=S++*h;return l}catch(e){g.error=e,g.hasError=!0}finally{(0,o.hk)(g)}}function b(e,t,s,n,i,r,m,h,c,l,_){const f={stack:[],error:void 0,hasError:!1};try{const s=new u.P,d=new u.P,g=(0,o.mS)(f,new u.S(new a.aa,new a.aa),!1);a.ab.geodesicCoordinate(e,t,i.x,i.y,n,r,g.at(0),g.at(1)),s.setCoords(g.at(0).val,g.at(1).val),a.ab.geodesicCoordinate(e,t,i.x,i.y,n,m,g.at(0),g.at(1)),d.setCoords(g.at(0).val,g.at(1).val);const p=(0,o.mS)(f,new a.aa,!1);for(a.ab.geodeticDistance(e,t,h.x,h.y,s.x,s.y,null,p,null,0),l[0]=p.val,a.ab.geodeticDistance(e,t,h.x,h.y,d.x,d.y,null,p,null,0),_[0]=p.val;l[0]<=_[0];)l[0]+=u.p;for(;l[0]>_[0];)l[0]-=u.p;for(;l[0]>=c;)l[0]-=u.p,_[0]-=u.p;for(;l[0]<c;)l[0]+=u.p,_[0]+=u.p}catch(e){f.error=e,f.hasError=!0}finally{(0,o.hk)(f)}}function x(e,t,s,n){if(Number.isNaN(s)){for(;n+t-e>Math.PI;)n-=u.p;for(;e-(n+t)>Math.PI;)n+=u.p;return n}return n+t-s>Math.PI?n-=u.p:s-(n+t)>Math.PI&&(n+=u.p),n}function y(e,t,s,n,i,r){const m={stack:[],error:void 0,hasError:!1};try{if(n>=r)return!1;const h=s[0],c=s.at(-1),u=(0,o.mS)(m,new a.aa,!1),l=(0,o.mS)(m,new a.aa,!1),_=(0,o.mS)(m,new a.aa,!1);a.ab.greatEllipticDistance(e,t,i.x,i.y,h.x,h.y,u,null,null),a.ab.greatEllipticDistance(e,t,i.x,i.y,c.x,c.y,l,null,null),a.ab.greatEllipticDistance(e,t,h.x,h.y,c.x,c.y,_,null,null);let f=Math.min(u.val,l.val)+_.val,d=f+n;if(d<r)return!0;const g=(0,o.mS)(m,new a.aa,!1);f=Math.max(u.val,l.val);for(let n=1;n<s.length-1;n++){const r=s[n];a.ab.greatEllipticDistance(e,t,i.x,i.y,r.x,r.y,g,null,null),g.val>f&&(f=g.val)}return d=f+n,d<r}catch(e){m.error=e,m.hasError=!0}finally{(0,o.hk)(m)}}function S(e,t,s,n,i,r,o,m){let h;if(n.length%2==0){const e=n.length>>1,t=n[e],s=n[e-1];h=u.P.lerp(t,s,.5)}else h=n[n.length-1>>1].clone();const c=h.clone(),l=(0,a.at)(e,t,c,75/180*Math.PI);return!!y(e,t,n,i,c,l)&&(null!==r&&(r.setCoordsPoint2D(h),r.scale(1/s)),null!==o&&o.setCoordsPoint2D(c),null!==m&&(m[0]=l),!0)}function w(e,t,s,n,i,r){const m={stack:[],error:void 0,hasError:!1};try{if(n>=r)return!1;const h=(0,o.mS)(m,new a.aa,!1);return a.ab.greatEllipticDistance(e,t,i.x,i.y,s.x,s.y,h,null,null),h.val+n<r}catch(e){m.error=e,m.hasError=!0}finally{(0,o.hk)(m)}}function C(e,t){return new a.ay(e,t)}function v(e){return(0,h.h)(e,0)||(0,h.s)(e,0),e}class D{constructor(e){this.m_bRunningInGnomonic=!1,this.m_bNeedsSimplify=!1,this.m_gnomonic=null,this.m_gnomonicCenterRad=new u.P,this.m_minGnomonicRadius=Number.NaN,this.m_progressTracker=e}isRunningInGnomonic(){return this.m_bRunningInGnomonic}needsSimplify(){return this.m_bNeedsSimplify}getGnomonic(){return this.m_gnomonic}}class I extends D{constructor(e,t,s){super(e.m_progressTracker),this.m_segIter=null,this.m_bNextSegmentCannotJoin=!1,this.m_currentDensifiedDelta=[0],this.m_currentBufferedDelta=0,this.m_lastAzimuth=0,this.m_startAzimuth=[0],this.m_endAzimuth=[0],this.m_numWinds=0,this.m_debugCounter=0,this.m_bufferHelper=new m.a,this.m_densifiedPoints=[],this.m_bufferer=e,this.m_multiPath=t,this.m_densified=s,this.m_bNeedsSimplify=!0;const n=new r.Envelope2D;this.m_multiPath.queryEnvelope(n);const i=n.getCenter(),o=i.clone();o.scale(this.m_bufferer.m_rpu),this.m_gnomonic=C(this.m_bufferer.m_gcs,i),this.m_gnomonicCenterRad=o.clone(),this.m_minGnomonicRadius=(0,a.at)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,o,75/180*Math.PI)}next(){let e;if(this.m_bNextSegmentCannotJoin)return this.m_bNextSegmentCannotJoin=!1,this.m_segIter.nextSegment(),e=this.m_bufferHelper.clone(),e;if(null===this.m_segIter){if(this.m_segIter=this.m_multiPath.getImpl().querySegmentIterator(),!this.m_segIter.nextPath())return null;null!==this.m_densified&&this.m_densified.addPathPoint2D(null,0,!0)}if(!this.m_segIter.hasNextSegment()){if(!this.m_segIter.nextPath())return null;null!=this.m_densified&&this.m_densified.addPathPoint2D(null,0,!0)}let t=null;this.m_currentBufferedDelta=0,this.m_currentDensifiedDelta=[0],this.m_numWinds=0,this.m_lastAzimuth=Number.NaN,this.m_bNextSegmentCannotJoin=!1,this.m_densifiedPoints.length=0;let s=0;const n=new u.P,i=new u.P;for(;this.m_segIter.hasNextSegment()&&this.m_numWinds<16;){const e=this.m_segIter.nextSegment();if(n.setCoordsPoint2D(e.getStartXY()),i.setCoordsPoint2D(e.getEndXY()),n.scale(this.m_bufferer.m_rpu),i.scale(this.m_bufferer.m_rpu),(0,a.au)(n,i))n.x=i.x;else if((0,a.av)(n,i))i.x=n.x;else{let e=-1,t=-1;const s=this.m_segIter.getPathIndex(),r=this.m_multiPath.getPathStart(s),o=this.m_multiPath.getPathEnd(s);if(e=this.m_segIter.getStartPointIndex()-1,t=this.m_segIter.getEndPointIndex()+1,e<r&&(e=this.m_multiPath.isClosedPath(s)?o-1:-1),t>o-1&&(t=this.m_multiPath.isClosedPath(s)?r:-1),-1!==e){const t=this.m_multiPath.getXY(e);t.scale(this.m_bufferer.m_rpu),(0,a.av)(t,n)&&(n.x=t.x)}if(-1!==t){const e=this.m_multiPath.getXY(t);e.scale(this.m_bufferer.m_rpu),(0,a.au)(i,e)&&(i.x=e.x)}}this.m_densifiedPoints.length=0;const r=(0,a.aw)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_curveType,n,i,this.m_bufferer.m_segmentStep,Number.NaN,this.m_bufferer.m_radTolerance,this.m_startAzimuth,this.m_endAzimuth,this.m_densifiedPoints,this.m_currentDensifiedDelta);if(0===s)this.m_bRunningInGnomonic=this.isSegmentBufferInCurrentGnomonic(this.m_densifiedPoints),this.m_bRunningInGnomonic||(this.m_bRunningInGnomonic=this.tryUpdateGnomonic(this.m_densifiedPoints));else if(this.m_bRunningInGnomonic){if(!this.isSegmentBufferInCurrentGnomonic(this.m_densifiedPoints)){this.m_segIter.previousSegment(),this.m_segIter.previousSegment(),this.m_segIter.nextSegment();break}}else if(S(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_densifiedPoints,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,null,null,null)){this.m_segIter.previousSegment(),this.m_segIter.previousSegment(),this.m_segIter.nextSegment();break}if(0===r||(0,a.ax)(n,i)?(this.m_bufferHelper.setEmpty(),this.m_bufferer.bufferPoint2D(n,this.m_bRunningInGnomonic,this.m_bufferHelper),this.m_bNextSegmentCannotJoin=!0):(this.m_bufferHelper.setEmpty(),this.m_bNextSegmentCannotJoin=this.checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(r,this.m_bufferHelper)),this.m_bNextSegmentCannotJoin){this.m_segIter.previousSegment(),this.m_segIter.hasPreviousSegment()?(this.m_segIter.previousSegment(),this.m_segIter.nextSegment()):this.m_segIter.resetToFirstSegment(),null!=this.m_densified&&this.m_densified.insertPointsFromPoints(this.m_densified.getPathCount()-1,-1,this.m_densifiedPoints,0,this.m_densifiedPoints.length-1,!0);break}null!=this.m_densified&&this.m_densified.insertPointsFromPoints(this.m_densified.getPathCount()-1,-1,this.m_densifiedPoints,0,this.m_densifiedPoints.length-1,!0),null===t&&(t=new m.a,t.addPathPoint2D(null,0,!0)),this.addJoinAndBufferLeftSide(t),s++}if(this.m_currentDensifiedDelta=[0],s>0){const e=this.m_segIter.getStartPointIndex(),r=this.m_segIter.getPathIndex();for(;s>0;){if(this.m_segIter.previousSegment(),n.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getStartPointIndex())),i.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getEndPointIndex())),n.scale(this.m_bufferer.m_rpu),i.scale(this.m_bufferer.m_rpu),this.m_bRunningInGnomonic)if((0,a.au)(n,i))n.x=i.x;else if((0,a.av)(n,i))i.x=n.x;else{let e=-1,t=-1;const s=this.m_segIter.getPathIndex(),r=this.m_multiPath.getPathStart(s),o=this.m_multiPath.getPathEnd(s);if(e=this.m_segIter.getStartPointIndex()-1,t=this.m_segIter.getEndPointIndex()+1,e<r&&(e=this.m_multiPath.isClosedPath(s)?o-1:-1),t>o-1&&(t=this.m_multiPath.isClosedPath(s)?r:-1),-1!==e){const t=this.m_multiPath.getXY(e);t.scale(this.m_bufferer.m_rpu),(0,a.av)(t,n)&&(n.x=t.x)}if(-1!==t){const e=this.m_multiPath.getXY(t);e.scale(this.m_bufferer.m_rpu),(0,a.au)(i,e)&&(i.x=e.x)}}this.m_densifiedPoints.length=0,(0,a.aw)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_curveType,i,n,this.m_bufferer.m_segmentStep,Number.NaN,this.m_bufferer.m_radTolerance,this.m_startAzimuth,this.m_endAzimuth,this.m_densifiedPoints,this.m_currentDensifiedDelta),this.addJoinAndBufferLeftSide(t),s--}return n.setCoordsPoint2D(this.m_multiPath.getXY(this.m_segIter.getStartPointIndex())),n.scale(this.m_bufferer.m_rpu),this.m_currentBufferedDelta=P(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,n,this.m_lastAzimuth+.5*Math.PI,this.m_lastAzimuth+1.5*Math.PI,this.m_bufferer.m_cornerStep,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,t),this.m_segIter.resetToVertex(e,r),this.m_segIter.nextSegment(),t}return this.m_bNextSegmentCannotJoin=!1,this.m_segIter.nextSegment(),e=this.m_bufferHelper.clone(),e}isSegmentBufferInCurrentGnomonic(e){return null!==this.m_gnomonic&&y(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,this.m_gnomonicCenterRad,this.m_minGnomonicRadius)}tryUpdateGnomonic(e){const t=new u.P,s=new u.P,n=[0];return S(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,t,s,n)?(this.m_gnomonicCenterRad.setCoordsPoint2D(s),this.m_minGnomonicRadius=n[0],this.m_gnomonic=C(this.m_bufferer.m_gcs,t),!0):(this.m_gnomonic=null,!1)}checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(e,t){return this.m_bufferer.checkAndPrepSegmentForCrossingAzimuthsOrPoleWrap(this.m_densifiedPoints,e,this.m_startAzimuth[0],this.m_endAzimuth[0],this.m_bRunningInGnomonic,t)}addJoinAndBufferLeftSide(e){const t=this.m_densifiedPoints[0];let s=Number.NaN,n=this.m_startAzimuth[0]-u.o;const i=this.m_endAzimuth[0]+u.o;let r=!1;if(!Number.isNaN(this.m_lastAzimuth)){this.m_lastAzimuth>=this.m_startAzimuth[0]?(s=this.m_lastAzimuth+u.o,n=s+Math.PI-(this.m_lastAzimuth-this.m_startAzimuth[0])):(s=this.m_lastAzimuth+u.o,n=s+Math.PI-(u.p-(this.m_startAzimuth[0]-this.m_lastAzimuth))),r=!(this.m_lastAzimuth>=this.m_startAzimuth[0]&&this.m_lastAzimuth-this.m_startAzimuth[0]<=Math.PI||this.m_lastAzimuth<this.m_startAzimuth[0]&&this.m_startAzimuth[0]-this.m_lastAzimuth>=Math.PI);let i=!1;if(Math.abs(n-s)<=.5*this.m_bufferer.m_cornerStep&&(r||(i=!0)),i){if(e.removePointFromPath(0,e.getPointCount()-1),!this.m_bRunningInGnomonic){const t=new u.P;t.setCoordsPoint2D(e.getXY(e.getPointCount()-1)),t.scale(this.m_bufferer.m_rpu),t.x-this.m_currentBufferedDelta<-Math.PI?this.m_currentBufferedDelta-=u.p:t.x-this.m_currentBufferedDelta>Math.PI&&(this.m_currentBufferedDelta+=u.p)}n=.5*(n+s)}else if(r){const s=new u.P;s.setCoordsPoint2D(t),s.scale(1/this.m_bufferer.m_rpu),e.insertPoint2D(0,-1,s)}else P(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,this.m_densifiedPoints[0],s,n,this.m_bufferer.m_cornerStep,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,e)}this.m_startAzimuth[0]!==this.m_lastAzimuth&&this.m_numWinds++,p(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,this.m_bufferer.m_absDistance,this.m_bufferer.m_curveType,this.m_densifiedPoints,n,i,this.m_bRunningInGnomonic,this.m_currentBufferedDelta,e),this.m_lastAzimuth=this.m_endAzimuth[0]}}class G extends D{constructor(e,t){super(e.m_progressTracker),this.m_pointIndex=-1,this.m_bufferer=e,this.m_multiPoint=t,this.m_bNeedsSimplify=!1;const s=new r.Envelope2D;this.m_multiPoint.queryEnvelope(s);const n=s.getCenter(),i=n.clone();i.scale(this.m_bufferer.m_rpu),this.m_gnomonic=C(this.m_bufferer.m_gcs,n),this.m_gnomonicCenterRad=i.clone(),this.m_minGnomonicRadius=(0,a.at)(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,i,75/180*Math.PI)}next(){if(this.m_bNeedsSimplify=!1,++this.m_pointIndex===this.m_multiPoint.getPointCount())return null;const e=this.m_multiPoint.getXY(this.m_pointIndex);e.scale(this.m_bufferer.m_rpu),this.m_bRunningInGnomonic=this.isPointBufferInCurrentGnomonic(e),this.m_bRunningInGnomonic||(this.m_bRunningInGnomonic=this.tryUpdateGnomonic(e));const t=new m.a,s=this.m_bufferer.bufferPoint2D(e,this.m_bRunningInGnomonic,t);return this.m_bNeedsSimplify=s,t}isPointBufferInCurrentGnomonic(e){return null!==this.m_gnomonic&&w(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,this.m_gnomonicCenterRad,this.m_minGnomonicRadius)}tryUpdateGnomonic(e){const t=new u.P,s=new u.P,n=[0];return function(e,t,s,n,i,r,o,m){const h=(0,a.at)(e,t,n,75/180*Math.PI);return!!w(e,t,n,i,n,h)&&(null!==r&&(r.setCoordsPoint2D(n),r.scale(1/s)),null!==o&&o.setCoordsPoint2D(n),null!==m&&(m[0]=h),!0)}(this.m_bufferer.m_a,this.m_bufferer.m_eSquared,this.m_bufferer.m_rpu,e,this.m_bufferer.m_absDistance*this.m_bufferer.m_ellipticToGeodesicMaxRatio,t,s,n)?(this.m_gnomonicCenterRad.setCoordsPoint2D(s),this.m_minGnomonicRadius=n[0],this.m_gnomonic=C(this.m_bufferer.m_gcs,t),!0):(this.m_gnomonic=null,!1)}}class T{getOperatorType(){return 10110}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,n,i,r,o,m){if(o){const o=new k(e,t,s,n,i,!1,r,m);return(new a.W).executeMany(o,t,m)}return new k(e,t,s,n,i,!1,r,m)}execute(e,t,s,r,a,o,m){const h=new n.S([e]),c=[r],u=this.executeMany(h,t,s,c,a,!1,o,m).next();return u||(0,i.d)("geodesic buffer null output"),u}}class k extends n.G{constructor(e,t,s,n,a,o,m,h){super(),this.m_currentUnionEnvelope2D=new r.Envelope2D,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,o&&(0,i.t)(""),t||(0,i.a)(""),0===t.getCoordinateSystemType()&&(0,i.a)(""),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_curveType=s,this.m_distances=n,this.m_convergenceOffset=a,this.m_bOutlineOnly=o,this.m_bUnion=m}next(){let e;for(;e=this.m_inputGeoms.next();)return(0,i.c)(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.geodesicBuffer(e,this.m_distances[this.m_dindex]);return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}geodesicBuffer(e,t){return function(e,t,s,n,r,a){n<Number.MAX_VALUE&&n>-Number.MAX_VALUE||(0,i.a)("Geodesic_bufferer.buffer - bad distance"),(0,i.c)(e);const o=(0,_.c)(e),m=o.getGeometryType();if((0,i.i)(m)){const e=o.getPointCount(),h=8e6;if(Math.abs(n)>h&&(e>50||m!==i.G.enumMultiPoint&&4===s&&e>2)){let e=o;const i=n>0?1:-1,m=7e6;let c=n,u=1;do{u++,c=(Math.abs(c)-m)*i}while(Math.abs(c)>h);c=n;for(let n=0;n<u-1;n++)e=g(e,t,s,m*i,r,u,a),c=(Math.abs(c)-m)*i;return e=g(e,t,s,c,r,u,a),e}}return g(o,t,s,n,r,1,a)}(e,this.m_spatialReference,this.m_curveType,t,this.m_convergenceOffset,this.m_progressTracker)}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[807,3169,8125],{10767:(e,t,n)=>{n.d(t,{a:()=>o,e:()=>u,i:()=>c,s:()=>i});var r=n(70031),a=n(78125);const s=new r.O;function o(e){const t=(0,a.getSpatialReference)(e);return s.accelerateGeometry((0,a.fromGeometry)(e),(0,a.fromSpatialReference)(t),1)}function u(e,t){return s.execute((0,a.fromGeometry)(e),(0,a.fromGeometry)(t),(0,a.fromSpatialReference)(e.spatialReference),null)}const i=s.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:o,execute:u,supportsCurves:i},Symbol.toStringTag,{value:"Module"}))},25275:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.e,supportsCurves:()=>r.s}),n(70031),n(78125);var r=n(10767)},70031:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(39117);class a extends r.T{getOperatorType(){return 4}execute(e,t,n,a){return!(0,r.U)(e,t,n,4,a)}}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>G,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>v,fromPolyline:()=>w,fromSpatialReference:()=>d,getSpatialReference:()=>x,toExtent:()=>R,toGeometry:()=>P,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>S,toPolyline:()=>k});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(88885),u=n(39117),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function G(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function d(e){if(e.wkid)return(0,u.n)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.o)(t):null}function P(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return _(e,t);case a.G.enumEnvelope:return R(e,t);case a.G.enumMultiPoint:return Z(e,t);case a.G.enumPolyline:return k(e,t);case a.G.enumPolygon:return S(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[807,3169,8125],{10767:(e,t,n)=>{n.d(t,{a:()=>o,e:()=>u,i:()=>c,s:()=>i});var r=n(70031),a=n(78125);const s=new r.O;function o(e){const t=(0,a.getSpatialReference)(e);return s.accelerateGeometry((0,a.fromGeometry)(e),(0,a.fromSpatialReference)(t),1)}function u(e,t){return s.execute((0,a.fromGeometry)(e),(0,a.fromGeometry)(t),(0,a.fromSpatialReference)(e.spatialReference),null)}const i=s.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:o,execute:u,supportsCurves:i},Symbol.toStringTag,{value:"Module"}))},25275:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.e,supportsCurves:()=>r.s}),n(70031),n(78125);var r=n(10767)},70031:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(39117);class a extends r.T{getOperatorType(){return 4}execute(e,t,n,a){return!(0,r.U)(e,t,n,4,a)}}},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>a});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class a extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>G,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>v,fromPolyline:()=>w,fromSpatialReference:()=>d,getSpatialReference:()=>x,toExtent:()=>R,toGeometry:()=>P,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>S,toPolyline:()=>k});var r=n(83661),a=(n(79187),n(55537)),s=n(95213),o=n(88885),u=n(39117),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function G(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new s.P,r=e.points,a=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),u&&n.setZ(s[2]??0),a&&n.setM(s[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:a}=e,s=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:a}=e,s=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:a});e.setCacheValue(p,s)}return e.getCacheValue(p)}function d(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.b)(t):null}function P(e,t){if(e)switch(e.getGeometryType()){case a.G.enumPoint:return _(e,t);case a.G.enumEnvelope:return R(e,t);case a.G.enumMultiPoint:return Z(e,t);case a.G.enumPolyline:return k(e,t);case a.G.enumPolygon:return S(e,t)}return null}function R(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),a=n.hasZ(),o=[],u=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];a&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:a,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),a=e.getDescription();return a.hasM()&&(n.m=e.getM()),a.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,5180,8125],{45328:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.b,supportsCurves:()=>r.s});var r=n(90836);n(78125)},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>G,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>v,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>d,toGeometry:()=>R,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>S,toPolyline:()=>k});var r=n(83661),s=(n(79187),n(55537)),a=n(95213),o=n(88885),u=n(39117),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function G(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new a.P,r=e.points,s=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,a=r.length;e<a;e++){const a=r[e];n.setXYCoords(a[0],a[1]),u&&n.setZ(a[2]??0),s&&n.setM(a[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,a=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,u.n)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.o)(t):null}function R(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return _(e,t);case s.G.enumEnvelope:return d(e,t);case s.G.enumMultiPoint:return Z(e,t);case s.G.enumPolyline:return k(e,t);case s.G.enumPolygon:return S(e,t)}return null}function d(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),s=n.hasZ(),o=[],u=new a.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];s&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:s,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},90836:(e,t,n)=>{n.d(t,{a:()=>u,b:()=>i,e:()=>l,s:()=>c});var r=n(39117),s=n(78125);class a extends r.T{getOperatorType(){return 2}execute(e,t,n,s){return(0,r.U)(e,t,n,3,s)}}const o=new a;function u(e){const t=(0,s.getSpatialReference)(e);return o.accelerateGeometry((0,s.fromGeometry)(e),(0,s.fromSpatialReference)(t),1)}function i(e,t){return o.execute((0,s.fromGeometry)(e),(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(e.spatialReference),null)}const c=o.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:i,supportsCurves:c},Symbol.toStringTag,{value:"Module"}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,5180,8125],{45328:(e,t,n)=>{n.r(t),n.d(t,{accelerateGeometry:()=>r.a,execute:()=>r.b,supportsCurves:()=>r.s});var r=n(90836);n(78125)},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>s});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class s extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>C,fromGeometry:()=>G,fromMultipoint:()=>M,fromPoint:()=>V,fromPolygon:()=>v,fromPolyline:()=>w,fromSpatialReference:()=>P,getSpatialReference:()=>x,toExtent:()=>d,toGeometry:()=>R,toMultipoint:()=>Z,toPoint:()=>_,toPolygon:()=>S,toPolyline:()=>k});var r=n(83661),s=(n(79187),n(55537)),a=n(95213),o=n(88885),u=n(39117),i=n(5443),c=n(48526),l=n(86738),m=n(39829),f=n(82799),h=(n(90293),n(83299));const p="_gxVersion",y=2,g=1;function x(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function G(e){switch(e.type){case"point":return V(e);case"multipoint":return M(e);case"polyline":return w(e);case"polygon":return v(e);case"extent":return C(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function C(e){if(!e.getCacheValue(p)){const t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(y,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(g,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function M(e){if(!e.getCacheValue(p)){const t=new o.M,n=new a.P,r=e.points,s=e.hasM,u=e.hasZ,i=u?3:2;for(let e=0,a=r.length;e<a;e++){const a=r[e];n.setXYCoords(a[0],a[1]),u&&n.setZ(a[2]??0),s&&n.setM(a[i]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,a=(0,h.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=(0,h.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function P(e){if(e.wkid)return(0,u.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,u.b)(t):null}function R(e,t){if(e)switch(e.getGeometryType()){case s.G.enumPoint:return _(e,t);case s.G.enumEnvelope:return d(e,t);case s.G.enumMultiPoint:return Z(e,t);case s.G.enumPolyline:return k(e,t);case s.G.enumPolygon:return S(e,t)}return null}function d(e,t){if(e.isEmpty())return null;const n=new i.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(y,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(g,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function Z(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),s=n.hasZ(),o=[],u=new a.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,u);const n=[u.getX(),u.getY()];s&&n.push(u.getZ()),r&&n.push(u.getM()),o.push(n)}const i=new c.A({hasM:r,hasZ:s,points:o,spatialReference:t});return i.setCacheValue(p,e),i}function _(e,t){if(e instanceof r.P)return new l.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new l.A({x:e.getX(),y:e.getY(),spatialReference:t}),s=e.getDescription();return s.hasM()&&(n.m=e.getM()),s.hasZ()&&(n.z=e.getZ()),n.setCacheValue(p,e),n}function S(e,t){if(e.isEmpty())return null;const n=m.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}function k(e,t){if(e.isEmpty())return null;const n=f.A.fromJSON({spatialReference:t,...(0,h.toGeometry)(e,null)});return n.setCacheValue(p,e),n}},90836:(e,t,n)=>{n.d(t,{a:()=>u,b:()=>i,e:()=>l,s:()=>c});var r=n(39117),s=n(78125);class a extends r.T{getOperatorType(){return 2}execute(e,t,n,s){return(0,r.U)(e,t,n,3,s)}}const o=new a;function u(e){const t=(0,s.getSpatialReference)(e);return o.accelerateGeometry((0,s.fromGeometry)(e),(0,s.fromSpatialReference)(t),1)}function i(e,t){return o.execute((0,s.fromGeometry)(e),(0,s.fromGeometry)(t),(0,s.fromSpatialReference)(e.spatialReference),null)}const c=o.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:i,supportsCurves:c},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -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(83047),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),u=_.getSpatialReference();return(0,h.toGeometry)((0,o.g7)(_.getGeometry(),u,s,r[a],i,m),u)}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[u,P]=(0,h.fromGeometries)(t);return(0,o.zo)(u,P,s,r[c],m,a).map(t=>(0,h.toGeometry)(t,P)).filter(i.Ru)}},66070:(t,s,e)=>{e.d(s,{fz:()=>x,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 u{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=u.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(u.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(u.buildPoint(i,this.m_distance,m-r.o,n),this.m_offsetPts[this.m_offsetPtCount-1]=n,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),u.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 u.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(u.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),u.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 u.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],P=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let d,l,y=0;{const t=_.x-h.x,s=_.y-h.y,e=P.x-h.x,m=P.y-h.y;d=Math.atan2(s,t),l=Math.atan2(m,e),this.m_a1=d,this.m_a2=l,0===o&&(i=d,n=l),y=r.P.orientationRobust(h.asPoint2D(),_.asPoint2D(),P.asPoint2D())}const x=l;if(l<d&&(l+=r.p),y*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){u.buildPoint(h,this.m_distance,d+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),u.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-d),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));u.buildPoint(h,e,.5*(d+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=d+r.o;u.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,u.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);--i>0;)m+=n,u.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);u.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-(d+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=d+r.o+.5*n;for(u.buildPoint(h,m,c,t),this.addPointEx(t,o);--i>0;)c+=n,u.buildPoint(h,m,c,t),this.addPoint(t);continue}if(2===this.m_joins){const s=_.x-h.x,e=_.y-h.y,i=P.x-h.x,n=P.y-h.y,a=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(a>1-1e-8){u.buildPoint(h,m*this.m_distance,l-.25*Math.PI,t),this.addPointEx(t,o),u.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-d),e=this.m_distance/Math.abs(Math.sin(s));u.buildPoint(h,e,.5*(d+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),P=(c-f)*Math.abs(this.m_distance)/_;this.m_distance>0?m.leftPerpendicularThis():m.rightPerpendicularThis(),m.scale(P/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-d),x=this.m_distance/Math.abs(Math.sin(y));u.buildPoint(h,x,.5*(d+l),t),this.addPointEx(t,o);continue}{let s;if(l=x,this.m_distance>0?(l>d&&(l-=r.p),s=d-l<r.o):(l<d&&(l+=r.p),s=l-d<r.o),s){const s=this.m_distance*m;let e;e=s<0?d+.25*Math.PI:d+3*Math.PI*.25,u.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?l-.25*Math.PI:l-3*Math.PI*.25,u.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(l-d),e=this.m_distance/Math.abs(Math.sin(s));l<d&&(l+=r.p),u.buildPoint(h,e,(d+l)/2,t),this.addPointEx(t,o)}}}else u.buildPoint(h,this.m_distance,d+r.o,t),this.addPointEx(t,o),u.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,u=(o.y-n.y)/f;let P=!1;const d=h.pt.clone();d.x+=(a+_)*r,d.y+=(c+u)*r;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>d.y!=l.y>d.y&&d.x<(l.x-y.x)*(d.y-y.y)/(l.y-y.y)+y.x&&(P=!P),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(P)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 P 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 u(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 d=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 P(t,s,e,i,n,o,h)}execute(t,s,e,i,n,o,h){return new P(null,s,e,i,n,o,h).offset(t)}};function l(t,s,e,i,n,o){return d.execute(t,s,e,i,n,o,null)}function y(t,s,e,n,o,h){const r=d.executeMany(new i.S(t),s,e,n,o,h,null);return Array.from(r)}function x(){return d.supportsCurves()}}}]);
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(83047),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),u=_.getSpatialReference();return(0,h.toGeometry)((0,o.g7)(_.getGeometry(),u,s,r[a],i,m),u)}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[u,P]=(0,h.fromGeometries)(t);return(0,o.zo)(u,P,s,r[c],m,a).map(t=>(0,h.toGeometry)(t,P)).filter(i.Ru)}},66070:(t,s,e)=>{e.d(s,{fz:()=>x,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 u{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=u.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(u.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(u.buildPoint(i,this.m_distance,m-r.o,n),this.m_offsetPts[this.m_offsetPtCount-1]=n,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),u.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 u.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(u.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),u.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 u.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],P=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let d,l,y=0;{const t=_.x-h.x,s=_.y-h.y,e=P.x-h.x,m=P.y-h.y;d=Math.atan2(s,t),l=Math.atan2(m,e),this.m_a1=d,this.m_a2=l,0===o&&(i=d,n=l),y=r.P.orientationRobust(h.asPoint2D(),_.asPoint2D(),P.asPoint2D())}const x=l;if(l<d&&(l+=r.p),y*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){u.buildPoint(h,this.m_distance,d+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),u.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-d),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));u.buildPoint(h,e,.5*(d+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=d+r.o;u.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,u.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);--i>0;)m+=n,u.buildPoint(h,c,m,t),t.type|=f,this.addPoint(t);u.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-(d+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=d+r.o+.5*n;for(u.buildPoint(h,m,c,t),this.addPointEx(t,o);--i>0;)c+=n,u.buildPoint(h,m,c,t),this.addPoint(t);continue}if(2===this.m_joins){const s=_.x-h.x,e=_.y-h.y,i=P.x-h.x,n=P.y-h.y,a=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(a>1-1e-8){u.buildPoint(h,m*this.m_distance,l-.25*Math.PI,t),this.addPointEx(t,o),u.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-d),e=this.m_distance/Math.abs(Math.sin(s));u.buildPoint(h,e,.5*(d+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),P=(c-f)*Math.abs(this.m_distance)/_;this.m_distance>0?m.leftPerpendicularThis():m.rightPerpendicularThis(),m.scale(P/m.length());const y=new r.P;y.setAdd(a,m);const x=new r.P;x.setSub(a,m),t.x=x.x,t.y=x.y,this.addPointEx(t,o),t.x=y.x,t.y=y.y,this.addPoint(t);continue}const y=.5*(l-d),x=this.m_distance/Math.abs(Math.sin(y));u.buildPoint(h,x,.5*(d+l),t),this.addPointEx(t,o);continue}{let s;if(l=x,this.m_distance>0?(l>d&&(l-=r.p),s=d-l<r.o):(l<d&&(l+=r.p),s=l-d<r.o),s){const s=this.m_distance*m;let e;e=s<0?d+.25*Math.PI:d+3*Math.PI*.25,u.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?l-.25*Math.PI:l-3*Math.PI*.25,u.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(l-d),e=this.m_distance/Math.abs(Math.sin(s));l<d&&(l+=r.p),u.buildPoint(h,e,(d+l)/2,t),this.addPointEx(t,o)}}}else u.buildPoint(h,this.m_distance,d+r.o,t),this.addPointEx(t,o),u.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,u=(o.y-n.y)/f;let P=!1;const d=h.pt.clone();d.x+=(a+_)*r,d.y+=(c+u)*r;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>d.y!=l.y>d.y&&d.x<(l.x-y.x)*(d.y-y.y)/(l.y-y.y)+y.x&&(P=!P),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(P)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 P 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 u(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 d=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 P(t,s,e,i,n,o,h)}execute(t,s,e,i,n,o,h){return new P(null,s,e,i,n,o,h).offset(t)}};function l(t,s,e,i,n,o){return d.execute(t,s,e,i,n,o,null)}function y(t,s,e,n,o,h){const r=d.executeMany(new i.S(t),s,e,n,o,h,null);return Array.from(r)}function x(){return d.supportsCurves()}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7677],{563:(e,t,i)=>{i.d(t,{QueueProcessor:()=>u});var s=i(97768),n=i(74887),r=i(9775),o=i(32587),l=i(96211),a=i(44794);class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class u{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.concurrency=1,e.concurrency&&(this.concurrency=e.concurrency),this._queue=new r.A(e.peeker),this.process=e.process}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._processingItems.size<this.concurrency}abort(e){const t=this._controllers.get(e);t&&t.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach(t=>e.push(t)),this._controllers.clear(),e.forEach(e=>e.abort()),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,i)=>e(i))}get(e){const t=this._deferreds.get(e);return t?t.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const i=this.get(e);if(i)return i;const s=new AbortController;let r=null;t&&(r=(0,n.u7)(t,()=>s.abort()));const o=()=>{l.remove(),null!=r&&r.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()},l=(0,n.NY)(s.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),o(),a.reject((0,n.NK)())}),a=(0,n.Tw)();return this._deferreds.set(e,a),this._controllers.set(e,s),a.promise.then(o,o),this._queue.push(e),this._scheduleNext(),a.promise}last(){return this._queue.last()}lastPromise(){const e=this.last();return e?this.get(e):null}peek(){return this._queue.peek()}popLast(){const e=this._queue.popLast();return e&&(this._deferreds.get(e)?.reject((0,n.NK)()),this._removeItem(e)),e}reset(){const e=Array.from(this._processingItems.values());this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.delete(e)}_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._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const i=new AbortController,s=new c(e,i);this._processingItems.set(e,s);try{t=this.process(e,i.signal)}catch(e){this._processError(s,e)}(0,n.$X)(t)?(s.promise=t,t.then(e=>this._processResult(s,e),e=>this._processError(s,e))):this._processResult(s,t)}}},4916:(e,t,i)=>{i.d(t,{A:()=>N});var s=i(31635),n=i(78888),r=i(49186),o=i(25482),l=i(53966),a=i(74887),c=i(563),u=i(10107),h=i(56507),p=(i(44208),i(87811),i(40608)),d=i(5443),f=i(86738),m=i(16930),g=i(60694),y=i(10873),x=i(45617),_=i(91806),b=i(20223),v=i(87045),w=i(76353),I=i(77301),R=i(70834);const S=new Map,C=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 M(e,t,i){const s=S.get(e);if(!s)return null==t?C.decreaseRefCount(e,i):0;if(null==t||null==s[t])return C.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 k(e,t,i){const s=S.get(e);if(!s)return null==t?C.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 C.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 T(e,t,i,s,n=null){const r=S.get(e);if(!r)return void(null==t&&C.putBlock(e,i,s,n));if(null==t||null==r[t])return void C.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 A(e,t,i){const s=S.get(e);s?null!=t&&null!=s[t]?s[t]?.cache.delete(i):C.deleteBlock(e,i):null==t&&C.deleteBlock(e,i)}var z=i(16019),F=i(51244),P=i(28435),D=i(14636);let B=0,N=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:v.A.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,R.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,w.q)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+B++}set url(e){this._set("url",(0,g.Jf)(e,l.A.getLogger(this)))}async open(e){return this._openPromise??=(0,R.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,s={}){const n=s.tileInfo||this.rasterInfo.storageInfo.tileInfo,r=this.getTileExtentFromTileInfo(e,t,i,n);return s={noClip:!0,...s},this.fetchPixels(r,n.size[0],n.size[1],s)}async identify(e,t={}){e=(0,h.PZ)(f.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,I.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:p}=t;let m=(0,R._I)(e,c,p);if(!u.intersects(m))return{location:m,value:null};if(null!=n.transform){const e=n.transform.inverseTransform(m);if(!n.nativeExtent.intersects(e))return{location:e,value:null};m=e}let g=0;const y=null!=l&&null!=o&&n.hasMultidimensionalTranspose;if((0,w.q)(this)){const e=this.primaryRasters.rasters[0];if(y)return e.identify(m,t);const{pixelSize:s}=n,r=3,o=s.x*r/2,l=s.y*r/2,a=new d.A({xmin:m.x-o,xmax:m.x+o,ymin:m.y-l,ymax:m.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:m,value:null};const f=Math.floor(r*r*.5),g=!h.mask||h.mask[f]?h.pixels.map(e=>e[f]):null;let x;return null!=p&&(x=!p.mask||p.mask[f]?p.pixels.map(e=>e[f]):void 0),{location:m,value:g,processedValue:x,pyramidLevel:0}}if(!y)if(t.srcResolution)g=(0,R.t$)(t.srcResolution,n,this.ioConfig.sampling).pyramidLevel;else if(g=await this.computeBestPyramidLevelForLocation(e,t),null==g)return{location:m,value:null};const x=this.identifyPixelLocation(m,g,null,y);if(null===x)return{location:m,value:null};const{row:_,col:b,rowOffset:v,colOffset:S,blockWidth:C}=x,M=await this._tileFetchQueue.push({pyramidLevel:g,row:_,col:b,options:t},{signal:t.signal});if(!M?.pixels?.length)return{location:m,value:null};const k=v*C+S;return this._processIdentifyResult(M,{srcLocation:m,position:k,pyramidLevel:g,useTransposedTile:!!y,requestSomeSlices:a,identifyOptions:t})}async fetchPixels(e,t,i,s={}){e=(0,R.Ps)(e),s=this._getRequestOptionsWithSliceId(s);const{_hasNoneOrGCSShiftTransform:n}=this;if(s.requestRawData&&n)return this._fetchPixels(e,t,i,s);const r=(0,R.FT)(e.spatialReference),o=(0,R.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 y={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:f},s)).pixelBlock:(0,P.z7)(m,y,{blockWidths:f}),{extent:e,srcExtent:(0,R._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,P.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,R._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,F.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,I.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,s){const n=s.lodAt(e);return this.getTileExtent({x:n.resolution,y:n.resolution},t,i,s.origin,s.spatialReference,s.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:s}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){const r=[],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 _.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 f.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new v.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 f.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 b.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,p=(0,R._I)(e,n,i);if(!r.intersects(p))return null;if(t<0||t>l)return null;const d=this.getPyramidPixelSize(t),{x:f,y:m}=d,g=(a.y-p.y)/m/h,y=(p.x-a.x)/f/u,x=Math.min(h-1,Math.floor((g-Math.floor(g))*h)),_=Math.min(u-1,Math.floor((y-Math.floor(y))*u));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(y),rowOffset:x,colOffset:_,blockWidth:u,srcLocation:p}}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=m.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 f.A({x:1,y:1,spatialReference:n});const{extent:r,storageInfo:o}=e;if(o){o.origin=new f.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,R.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:p}=this,d=p.transform,m="gcs-shift"===d?.type,g=null!=(0,R.FT)(e.spatialReference);!m&&g||(n=(0,R.OM)(r.srcExtent,m));const y=await this._fetchRawTiles(o,h,{width:c,height:u,wrapCount:n},s);if(!y)return{extent:e,srcExtent:a,pixelBlock:null};const x=p.storageInfo,_=o>0?x.pyramidBlockWidth:x.blockWidth,b=o>0?x.pyramidBlockHeight:x.blockHeight;let{x:v,y:w}=p.pixelSize;if(o>0){const{pyramidResolutions:e,pyramidScalingFactor:t}=x;if(null!=e&&e[o-1])({x:v,y:w}=e[o-1]);else{const e=t**o;v*=e,w*=e}}const I=p.spatialReference,S=new f.A({x:v,y:w,spatialReference:I}),C=_===c&&b===u&&h.x%_===0&&h.y%b===0,M=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),k=!e.spatialReference.equals(I),T=I.isGeographic?1e-9:1e-4,{datumTransformation:A}=s;if(!k&&C&&1===y.pixelBlocks.length&&_===t&&b===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(l,M,T))return{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:y.pixelBlocks[0]};const z=g&&null!=(0,R.FT)(a.spatialReference)&&this._hasNoneOrGCSShiftTransform,F=s.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");F&&!this.rasterJobHandler&&await(0,R.Hh)();const B=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:M.toJSON(),datumTransformation:A,rasterTransform:d,hasWrapAround:n>0||z,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:F},s):(0,R.l0)({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:M,datumTransformation:A,rasterTransform:d,hasWrapAround:n>0||z,isAdaptive:!1,includeGCSGrid:F});let N;const J=!s.requestRawData,O={rows:B.spacing[0],cols:B.spacing[1]},E=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(o,y.extent.xmin):void 0,{pixelBlocks:H,mosaicSize:q,isPartiallyFilled:L}=y;let Z=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:H,srcMosaicSize:q,destDimension:J?{width:t,height:i}:null,coefs:J?B.coefficients:null,sampleSpacing:J?O:null,projectDirections:F,gcsGrid:F?B.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:s.interpolation,alignmentInfo:E,blockWidths:null},s);({pixelBlock:N,localNorthDirections:Z}=e)}else{const e=(0,P.z7)(H,q,{alignmentInfo:E});N=J?(0,P.$i)(e,{width:t,height:i},B.coefficients,O,s.interpolation):e,F&&B.gcsGrid&&(Z=(0,P.QF)({width:t,height:i},B.gcsGrid),N=(0,D.Y2)(N,this.rasterInfo.dataType,Z))}return s.requestRawData||F?{extent:e,srcExtent:a,srcTilePixelSize:S,pixelBlock:N,transformGrid:B,localNorthDirections:Z,isPartiallyFilled:L}:{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),v=Math.floor((c+h+m-1)/l),w=r[e];if(!w)return null;const{minRow:I,minCol:R,maxCol:S,maxRow:C}=w;if(0===p&&(v<I||b<R||_>C||x>S))return null;const M=new Array;let k=!1;const T=null==this.ioConfig.allowPartialFill?s.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=_;t<=v;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._tileFetchQueue.push({pyramidLevel:e,row:t,col:n,options:s},{signal:s.signal});T?M.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{k=!0,e(null)})})):M.push(i)}else M.push(Promise.resolve(null))}if(0===M.length)return null;const A=await Promise.all(M),z={height:(v-_+1)*l,width:(b-x+1)*o},{spatialReference:F}=this.rasterInfo,P=this.getPyramidPixelSize(e),{x:D,y:B}=P;return{extent:new d.A({xmin:n.x+x*o*D,xmax:n.x+(b+1)*o*D,ymin:n.y-(v+1)*l*B,ymax:n.y-_*l*B,spatialReference:F}),pixelBlocks:A,mosaicSize:z,isPartiallyFilled:k}}_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=this.rasterInfo.storageInfo.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=k(c,s.registryId,u);if(null==h){const n=new AbortController;h=this.fetchRawTile(e,t,i,{...s,signal:n.signal}),T(c,s.registryId,u,h,n),h.catch(()=>A(c,s.registryId,u))}return s.signal&&(0,a.u7)(s,()=>{M(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,D.Lu)([n[e],r[e]]);o.push(t),l.push(i)}return[o,l]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlignmentInfo&&(this._rasterTileAlignmentInfo=(0,R.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,p=a===r&&this._requireTooManySrcTiles(o,l,t,i);if(h||p||0===o||0===l){const o=new f.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let l=(0,R.Wo)(o,this.rasterInfo.spatialReference,e,n.datumTransformation);const p=!l||s.srcResolution&&l.x+l.y<s.srcResolution.x+s.srcResolution.y;if(h&&s.srcResolution&&p){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,R.t$)(n,i,this.ioConfig.sampling);if(a)return;let c=t.srcExtent||(0,R._l)(e,s,r);if(null==c)return;const u=i.transform;u&&(c=u.inverseTransform(c)),t.srcExtent=c;const{x:h,y:p}=i.storageInfo.origin,d=Math.floor((c.xmin-h)/l.x+.1),f=Math.floor((p-c.ymax)/l.y+.1),m=Math.floor((c.xmax-h)/l.x-.1),g=Math.floor((p-c.ymin)/l.y-.1),y=c.width<.1*l.x?0:m-d+1,x=c.height<.1*l.y?0:g-f+1;t.pyramidLevel=o,t.pyramidResolution=l,t.srcWidth=y,t.srcHeight=x,t.ul={x:d,y: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 p=(0,I.QW)(l,h.transposedVariableName);if(u){const e=(0,I.xx)(p,h.multidimensionalDefinition,h.timeExtent);a=a.map(t=>e.map(e=>t[e])),c=c?.map(t=>e.map(e=>t[e])),p=e.map(e=>p[e])}const d=e.noDataValues||this.rasterInfo.noDataValue,f={pixels:a,pixelType:e.pixelType};let m;return null!=d&&((0,z.Sp)(f,d),m=f.mask),{location:i,value:null,dataSeries:p.map((e,t)=>{const i={value:0===m?.[t]?null:a.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new x.A({...e,isSlice:!0}))};return c?.length&&(i.magdirValue=[c[0][t],c[1][t]]),i}),pyramidLevel:n}}};(0,s.Cg)([(0,u.MZ)()],N.prototype,"_rasterTileAlignmentInfo",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"_tileFetchQueue",void 0),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"_isGlobalWrappableSource",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"_hasNoneOrGCSShiftTransform",null),(0,s.Cg)([(0,u.MZ)()],N.prototype,"_openPromise",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"rasterJobHandler",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0})],N.prototype,"rasterId",null),(0,s.Cg)([(0,u.MZ)(y.OZ)],N.prototype,"url",null),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],N.prototype,"datasetName",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],N.prototype,"datasetFormat",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"hasUniqueSourceStorageInfo",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"ioConfig",void 0),(0,s.Cg)([(0,u.MZ)()],N.prototype,"sourceJSON",void 0),N=(0,s.Cg)([(0,p.$)("esri.layers.support.rasterDatasets.BaseRaster")],N)},32587:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(62788),n=i(95488);class r{constructor(e){this._observable=new n.I,this._map=new Map(e)}get size(){return(0,s.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(e){const t=this._map.delete(e);return t&&this._observable.notify(),t}entries(){return(0,s.gc)(this._observable),this._map.entries()}forEach(e,t){(0,s.gc)(this._observable),this._map.forEach((i,s)=>e.call(t,i,s,this),t)}get(e){return(0,s.gc)(this._observable),this._map.get(e)}has(e){return(0,s.gc)(this._observable),this._map.has(e)}keys(){return(0,s.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._observable.notify(),this}values(){return(0,s.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,s.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},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)}},50103:(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})},72802:(e,t,i)=>{i.d(t,{U:()=>s});class s{constructor(e,t,i,s,n=void 0){this.id=e,this.level=t,this.row=i,this.col=s,this.extent=n}}},84169:(e,t,i)=>{i.d(t,{A:()=>d});var s=i(31635),n=i(49186),r=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),l=i(39829),a=i(4916),c=i(77359),u=i(28435),h=i(70834),p=i(22671);let d=class extends a.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,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!s.requestRawData&&a&&(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)),p=await Promise.all(h),d=p.map(e=>e.pixelBlock),f=o||s.requestRawData?p.map(e=>e.srcTilePixelSize):null;if(s.skipRasterFunction||d.every(e=>null==e))return p[0];const m=p.find(e=>null!=e.pixelBlock)?.extent??e;let g=this.rasterJobHandler?await this.rasterJobHandler.process({extent:m,primaryPixelBlocks:d,primaryPixelSizes:f,primaryRasterIds:r}):this.rasterFunction.process({extent:m,primaryPixelBlocks:d,primaryPixelSizes:f,primaryRasterIds:r});const{transformGrid:y}=p[0];if(!o||null==g||null==y){const e=s.noClip?null:this.getClippingGeometry(m.spatialReference);return s.noClip||s.requestRawData||null==g||!e||(g=await(0,c.$Q)(g,m,e)),{...p[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,u.$i)(g,{width:t,height:i},y.coefficients,x,l);const b=s.noClip?null:this.getClippingGeometry(e.spatialReference);return s.noClip||s.requestRawData||null==_||null==b||(_=await(0,c.$Q)(_,e,b)),{extent:e,srcExtent:p[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,h.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=p.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(l.A.fromExtent(e),2*(e.width+e.height)/40);r=(0,h.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,o.$)("esri.layers.support.rasterDatasets.FunctionRaster")],d)},87045:(e,t,i)=>{i.d(t,{A:()=>v});var s,n=i(31635),r=i(66552),o=i(25482),l=i(83047),a=i(10107),c=i(56507),u=(i(44208),i(87811),i(36005)),h=i(40608),p=i(43937),d=i(86738),f=i(16930),m=i(19419),g=i(21325),y=i(28735),x=i(91806),_=i(72802);const b=new r.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let v=class extends o.o{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:r=f.A.WebMercator,numLODs:o=24}=e;if(!(0,g.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new x.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new x.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new d.A(0,0,r),size:[n,n],spatialReference:r})}const a=(0,g.Vp)(r),c=e.origin?new d.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new d.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),u=1/(39.37*(0,l.GA)(r)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*u;h.push(new x.A({level:e,scale:t,resolution:s}))}else{let e=(0,g.EA)(r)?512/n*591657527.5917094:256/n*591657527.591555;const i=Math.ceil(o/t);h.push(new x.A({level:0,scale:e,resolution:e*u}));for(let s=1;s<i;s++){const i=e/2**t,n=i*u;h.push(new x.A({level:s,scale:i,resolution:n})),e=i}}return new s({dpi:96,lods:h,origin:c,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,g.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return d.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,g.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,s=i;else{const e=(0,y.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||(s=new _.U(null,0,0,0,(0,m.vt)())),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){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;const s=e.level-i.level,n=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.vt)()),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}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:s}=i,n=s*this.size[0],r=s*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],n=this.lods.length-t;for(let e=0;e<n;e++){const s=e+t,{scale:n,resolution:r}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new x.A({level:e,scale:n,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"dpi",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],v.prototype,"format",void 0),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],v.prototype,"isWrappable",null),(0,n.Cg)([(0,a.MZ)({type:d.A,json:{write:!0}})],v.prototype,"origin",void 0),(0,n.Cg)([(0,u.w)("origin")],v.prototype,"readOrigin",null),(0,n.Cg)([(0,a.MZ)({type:[x.A],value:null,json:{write:!0}})],v.prototype,"lods",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],v.prototype,"scales",void 0),(0,n.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],v.prototype,"size",void 0),(0,n.Cg)([(0,u.w)("size",["rows","cols"])],v.prototype,"readSize",null),(0,n.Cg)([(0,p.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],v.prototype,"writeSize",null),(0,n.Cg)([(0,a.MZ)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),v=s=(0,n.Cg)([(0,h.$)("esri.layers.support.TileInfo")],v)},89015:(e,t,i)=>{i.d(t,{o:()=>N});var s=i(31635),n=i(78888),r=i(49186),o=i(53966),l=i(10107),a=i(56507),c=(i(44208),i(87811),i(93223)),u=i(36005),h=i(40608),p=i(86738),d=i(16930),f=i(21325),m=i(60694),g=i(10873),y=i(45617),x=i(43577),_=i(13868),b=i(22796),v=i(87045),w=i(76353),I=i(84169),R=i(77301),S=i(77359),C=i(6049),M=i(70834),k=i(6952),T=i(12711),A=i(85676),z=i(94359),F=i(22048),P=i(49410),D=i(34606),B=i(51508);const N=e=>{const t=e;let N=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,w.q)(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,m.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,z.LF)(s,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,a.PZ)(F.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,M.Hh)();const e="extent"===s.type?(0,M._l)(s,o):(0,M.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 p.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:o}),{extent:c,width:u,height:h}=(0,S.b7)(i,n,l),d=await this.fetchPixels(c,u,h,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new r.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const f=await(0,S.$Q)(d.pixelBlock,c,n),m=this._rasterJobHandler;return m?m.computeStatisticsHistograms({pixelBlock:f},t):(0,k.eH)(f)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=(0,R.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,R.ct)(s,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),r=n?.name,o=(0,T.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,w.q)(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,f.Vp)(e);return v.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(J(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;return{extent:this.raster.getTileExtentFromTileInfo(e,t,i,n),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={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,s))}async getSamples(e,t){if(await this.load(),(e=(0,a.PZ)(D.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 B.A({samples:o})}async identify(e,t={}){await this.load();const{raster:i,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo&&(!s.hasMultidimensionalTranspose||!(0,R.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,w.q)(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,R.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,R.z2)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,R.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&(0,w.q)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;J(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,(0,w.q)(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 p.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,965))).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 p.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),c=l.height/a,u=l.width/a,{xmin:h,ymax:d}=l,f=[];for(let e=0;e<c;e++)for(let i=0;i<u;i++){const n=new p.A({x:h+(i+.5)*a,y:d-(e+.5)*a,spatialReference:s});(o||t.contains(n))&&f.push(n)}return f}_configDefaultInterpolation(){if(null==this.interpolation){J(this);const{raster:e}=this,t=(0,T.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){J(this);const{rasterInfo:t}=this.raster,i=(0,R.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=(0,T.I8)({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??(0,T.ci)(t)),!this.renderer||"override"===e){const e=(0,T.Mm)(this.raster),i=n?.renderer??(0,T.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,T.$P)({...this.renderer.toJSON(),variableName:s}),l=(0,T.m7)(t,s);this.symbolizer?(this.symbolizer.rendererJSON=r,this.symbolizer.rasterInfo=l):this.symbolizer=new A.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,T.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,w.q)(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,w.q)(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,C.vt)(s.functionDefinition?.toJSON()??s.toJSON(),i),r=new I.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 P.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 P.A({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:n,attributes:l});r.push(a)}),r}};function J(e){if(!e.raster||!e.serviceRasterInfo)throw new r.A("imagery-tile","no raster")}return(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_cachedRasterFunctionJson",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_compatibleFullExtent",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"_isConstructedFromFunctionRaster",void 0),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.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(",")}}}}})],N.prototype,"bandIds",void 0),(0,s.Cg)([(0,l.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],N.prototype,"copyright",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1}})],N.prototype,"fullExtent",null),(0,s.Cg)([(0,l.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,c.e)(_.SZ)],N.prototype,"interpolation",void 0),(0,s.Cg)([(0,l.MZ)()],N.prototype,"ioConfig",void 0),(0,s.Cg)([(0,l.MZ)({type:[y.A],json:{write:!0}})],N.prototype,"multidimensionalDefinition",null),(0,s.Cg)([(0,l.MZ)({type:x.A,json:{write:!0}})],N.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,l.MZ)()],N.prototype,"raster",void 0),(0,s.Cg)([(0,l.MZ)({type:b.A})],N.prototype,"rasterFunction",null),(0,s.Cg)([(0,l.MZ)()],N.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,l.MZ)()],N.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:d.A,json:{read:!1}})],N.prototype,"spatialReference",void 0),(0,s.Cg)([(0,l.MZ)({type:v.A})],N.prototype,"tileInfo",void 0),(0,s.Cg)([(0,l.MZ)(g.OZ)],N.prototype,"url",null),(0,s.Cg)([(0,l.MZ)()],N.prototype,"renderer",null),(0,s.Cg)([(0,l.MZ)({types:z.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:z.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],N.prototype,"internalRenderer",null),(0,s.Cg)([(0,u.w)("internalRenderer")],N.prototype,"readRenderer",null),(0,s.Cg)([(0,l.MZ)({clonable:!1})],N.prototype,"symbolizer",void 0),N=(0,s.Cg)([(0,h.$)("esri.layers.mixins.ImageryTileMixin")],N),N}},91806:(e,t,i)=>{i.d(t,{A:()=>c});var s,n=i(31635),r=i(25482),o=i(10107),l=i(56507),a=(i(44208),i(87811),i(40608));let c=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}}}})],c.prototype,"cols",void 0),(0,n.Cg)([(0,o.MZ)({type:l.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.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}}}})],c.prototype,"origin",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],c.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}}}})],c.prototype,"rows",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=s=(0,n.Cg)([(0,a.$)("esri.layers.support.LOD")],c)}}]);