@arcgis/core 4.31.0-next.20240919 → 4.31.0-next.20240921

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 (283) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/WebLinkChart.js +1 -1
  3. package/WebMap.js +1 -1
  4. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  5. package/arcade/featureset/actions/Adapted.js +1 -1
  6. package/arcade/featureset/support/StatsField.js +1 -1
  7. package/arcade/featureset/support/errorsupport.js +1 -1
  8. package/arcade/featureset/support/sqlUtils.js +1 -1
  9. package/arcade/functions/maths.js +1 -1
  10. package/assets/esri/core/workers/RemoteClient.js +1 -1
  11. package/assets/esri/core/workers/chunks/{d9d8606f0a7c82b42755.js → 093a1ee161cb6a840283.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2020b99675caabf5ac87.js +1 -0
  13. package/assets/esri/core/workers/chunks/24d45530fe47b3114daf.js +1 -0
  14. package/assets/esri/core/workers/chunks/35f92652df2561845d47.js +1 -0
  15. package/assets/esri/core/workers/chunks/42b92b4c2c9fd2b15f60.js +2 -0
  16. package/assets/esri/core/workers/chunks/{ba561e03df67894e437f.js.LICENSE.txt → 42b92b4c2c9fd2b15f60.js.LICENSE.txt} +1 -1
  17. package/assets/esri/core/workers/chunks/65b1d7fa57d4c764efe8.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b99d380cce485e65c990.js → 6cda92678ffeeaea0330.js} +1 -1
  19. package/assets/esri/core/workers/chunks/736e0c5cb9010ca818d8.js +1 -0
  20. package/assets/esri/core/workers/chunks/757b83799555958e059c.js +1 -0
  21. package/assets/esri/core/workers/chunks/76d8192015ce46dbf92a.js +1 -0
  22. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +1 -0
  23. package/assets/esri/core/workers/chunks/884cd0bd036c65567929.js +1 -0
  24. package/assets/esri/core/workers/chunks/95ea77a7d63c9d7ed78b.js +1 -0
  25. package/assets/esri/core/workers/chunks/{da3a4eb3fbb9dd509b4b.js → 98e872da08203455a5b6.js} +1 -1
  26. package/assets/esri/core/workers/chunks/ad4fa125e09cc0047f5b.js +1 -0
  27. package/assets/esri/core/workers/chunks/bb5a18dd1e6a71905668.js +2 -0
  28. package/assets/esri/core/workers/chunks/bf406a46515d5dfebe06.js +1 -0
  29. package/assets/esri/core/workers/chunks/d9c34e07627d93d4670b.js +1 -0
  30. package/assets/esri/core/workers/chunks/e1e9a7695e48e34a69bd.js +1 -0
  31. package/assets/esri/core/workers/chunks/e4f1464ed269c301b4ee.js +1 -0
  32. package/assets/esri/core/workers/chunks/{072029d05ccb56979523.js → e611141692355a1ba2b2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/f41e8d0d6f5e81289179.js +1 -0
  34. package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +1 -0
  35. package/assets/esri/core/workers/chunks/{5ca8e767cc03e1425338.js → f9e90a2fda559ca68848.js} +1 -1
  36. package/assets/esri/themes/base/_functions.scss +6 -2
  37. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +4 -0
  38. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +6 -0
  39. package/assets/esri/themes/dark/main.css +1 -1
  40. package/assets/esri/themes/light/main.css +1 -1
  41. package/assets/esri/themes/light/view.css +1 -1
  42. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  43. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  44. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  45. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  46. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  47. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  48. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  49. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  50. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  51. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  52. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  53. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  54. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  55. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  56. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  57. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  58. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  59. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  60. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  61. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  62. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  63. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  64. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  65. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
  66. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  67. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  68. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  69. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  70. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  71. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  72. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  73. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  74. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  75. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  76. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  77. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  78. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  79. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  80. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  81. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  82. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  83. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  84. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  85. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  102. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  103. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  104. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  105. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  106. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nb.json +1 -1
  107. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  108. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  109. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  110. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  111. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  112. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  113. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  114. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  115. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  116. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  117. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  118. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  119. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  120. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  121. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  122. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  123. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  124. package/chunks/Bufferer-93RDFIRm.js +5 -0
  125. package/chunks/Centroid-DZi-eb9F.js +1 -1
  126. package/chunks/ComponentShader.glsl.js +10 -13
  127. package/chunks/Distance2DCalculator-De7WFGFq.js +5 -0
  128. package/chunks/GeodeticDistanceCalculator-CN7xMqrJ.js +5 -0
  129. package/chunks/LineSeries.js +1 -1
  130. package/chunks/{OITCompositing.glsl.js → OITBlend.glsl.js} +1 -1
  131. package/chunks/OperatorGeneralize.js +1 -1
  132. package/chunks/OperatorGeodesicBuffer.js +1 -1
  133. package/chunks/OperatorGeodeticArea.js +1 -1
  134. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  135. package/chunks/OperatorGeodeticDistance.js +1 -1
  136. package/chunks/OperatorGeodeticLength.js +1 -1
  137. package/chunks/OperatorProximity.js +1 -1
  138. package/chunks/OperatorShapePreservingLength.js +5 -0
  139. package/chunks/Polyline.js +1 -1
  140. package/chunks/Theme.js +1 -1
  141. package/chunks/Tick.js +1 -1
  142. package/chunks/tslib.es6.js +1 -1
  143. package/core/mathUtils.js +1 -1
  144. package/core/sql/AggregateFunctions.js +1 -1
  145. package/core/sql/SqlInterval.js +1 -1
  146. package/core/sql/StandardizedFunctions.js +1 -1
  147. package/core/sql/WhereClause.js +1 -1
  148. package/core/sql/WhereGrammar.js +1 -1
  149. package/core/sql/errorSupport.js +5 -0
  150. package/core/sql/sqlArithmeticUtils.js +1 -1
  151. package/core/sql/sqlCompareUtils.js +1 -1
  152. package/core/sql/sqlDateParsingUtils.js +1 -1
  153. package/geometry/operators/areaOperator.js +5 -0
  154. package/geometry/operators/containsOperator.js +1 -1
  155. package/geometry/operators/crossesOperator.js +1 -1
  156. package/geometry/operators/disjointOperator.js +1 -1
  157. package/geometry/operators/distanceOperator.js +1 -1
  158. package/geometry/operators/equalsOperator.js +1 -1
  159. package/geometry/operators/geodeticDensifyOperator.js +5 -0
  160. package/geometry/operators/graphicBufferOperator.js +5 -0
  161. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  162. package/geometry/operators/gx/operatorBuffer.js +1 -1
  163. package/geometry/operators/gx/operatorClip.js +1 -1
  164. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  165. package/geometry/operators/gx/operatorCut.js +1 -1
  166. package/geometry/operators/gx/operatorDifference.js +1 -1
  167. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  168. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  169. package/geometry/operators/gx/{operatorGeodeticDensifyByLength.js → operatorGeodeticDensify.js} +1 -1
  170. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  171. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  172. package/geometry/operators/gx/operatorGraphicBuffer.js +5 -0
  173. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  174. package/geometry/operators/gx/operatorIntersection.js +1 -1
  175. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  176. package/geometry/operators/gx/operatorOffset.js +1 -1
  177. package/geometry/operators/gx/operatorSimplify.js +1 -1
  178. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  179. package/geometry/operators/gx/operatorUnion.js +1 -1
  180. package/geometry/operators/intersectsOperator.js +1 -1
  181. package/geometry/operators/isNearOperator.js +1 -1
  182. package/geometry/operators/lengthOperator.js +5 -0
  183. package/geometry/operators/overlapsOperator.js +1 -1
  184. package/geometry/operators/proximityOperator.d.ts +4 -0
  185. package/geometry/operators/proximityOperator.js +1 -1
  186. package/geometry/operators/relateOperator.js +1 -1
  187. package/geometry/operators/reshapeOperator.js +1 -1
  188. package/geometry/operators/touchesOperator.js +1 -1
  189. package/geometry/operators/withinOperator.js +1 -1
  190. package/interfaces.d.ts +310 -28
  191. package/layers/mixins/ArcGISMapService.js +1 -1
  192. package/layers/support/ControlPointsGeoreference.js +1 -1
  193. package/layers/support/MediaElementBase.js +1 -1
  194. package/layers/support/mediaUtils.js +1 -1
  195. package/linkChart/LinkChartProperties.js +1 -1
  196. package/linkChart/utils.js +1 -1
  197. package/package.json +2 -2
  198. package/portal/schemas/definitions.js +1 -1
  199. package/support/revision.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  201. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  202. package/views/2d/layers/LayerView2D.js +1 -1
  203. package/views/2d/support/highlightGroupUtils.js +1 -1
  204. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  205. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  206. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  207. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  208. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  209. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  210. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  211. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +5 -0
  212. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +5 -0
  213. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +5 -0
  214. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  215. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  216. package/views/LinkChartView.js +1 -1
  217. package/views/MapView.js +1 -1
  218. package/views/View.js +1 -1
  219. package/views/View2D.js +1 -1
  220. package/views/draw/DrawGraphicTool.js +1 -1
  221. package/views/draw/support/Box.js +1 -1
  222. package/views/draw/support/Reshape.js +1 -1
  223. package/views/interactive/Tooltip.d.ts +4 -0
  224. package/views/interactive/Tooltip.js +5 -0
  225. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  226. package/webdoc/widgets/TimeSlider.js +1 -1
  227. package/webmap/InitialViewProperties.js +1 -1
  228. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  229. package/widgets/BasemapGallery.js +1 -1
  230. package/widgets/BasemapLayerList/css.js +1 -1
  231. package/widgets/BasemapLayerList.js +1 -1
  232. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  233. package/widgets/BatchAttributeForm/templates/BatchAttributeFormElementTemplate.js +1 -1
  234. package/widgets/BatchAttributeForm/templates/BatchAttributeFormTemplate.js +1 -1
  235. package/widgets/BatchAttributeForm/templates/BatchFieldElementTemplate.js +1 -1
  236. package/widgets/BatchAttributeForm/templates/batchAttributeFormTemplateUtils.js +1 -1
  237. package/widgets/CatalogLayerList.js +1 -1
  238. package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
  239. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  240. package/widgets/FeatureForm/FieldInput.js +1 -1
  241. package/widgets/LayerList/LayerListItem.js +1 -1
  242. package/widgets/LayerList/LayerListViewModel.js +1 -1
  243. package/widgets/LayerList.js +1 -1
  244. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  245. package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter2D.js +1 -1
  246. package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter3D.js +1 -1
  247. package/widgets/OrientedImageryViewer/constants.js +1 -1
  248. package/widgets/OrientedImageryViewer/css.js +1 -1
  249. package/widgets/OrientedImageryViewer/utils.js +1 -1
  250. package/widgets/OrientedImageryViewer.js +1 -1
  251. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  252. package/widgets/Sketch/SketchViewModel.js +1 -1
  253. package/widgets/Sketch.js +1 -1
  254. package/widgets/support/SnappingControls.js +1 -1
  255. package/assets/esri/core/workers/chunks/0cfa9665dab31e5235a8.js +0 -1
  256. package/assets/esri/core/workers/chunks/22fb5687932019304225.js +0 -1
  257. package/assets/esri/core/workers/chunks/3b3c8362359a82c66793.js +0 -1
  258. package/assets/esri/core/workers/chunks/3cb1de0b9bf9a25112e0.js +0 -1
  259. package/assets/esri/core/workers/chunks/59833b27d8413b6d9312.js +0 -1
  260. package/assets/esri/core/workers/chunks/5e43cb91bbe20f2d32e3.js +0 -1
  261. package/assets/esri/core/workers/chunks/67df47efb9a9dfeafee2.js +0 -1
  262. package/assets/esri/core/workers/chunks/6be62448e33baabe028c.js +0 -1
  263. package/assets/esri/core/workers/chunks/6d668f7696f280ec9588.js +0 -1
  264. package/assets/esri/core/workers/chunks/74edde71352e1f578a3b.js +0 -1
  265. package/assets/esri/core/workers/chunks/907e74abb4a85a76e3b5.js +0 -1
  266. package/assets/esri/core/workers/chunks/941fe04f47059074c05b.js +0 -2
  267. package/assets/esri/core/workers/chunks/a0005bc65f79e83f26ee.js +0 -1
  268. package/assets/esri/core/workers/chunks/a6560ff77be29344bc50.js +0 -1
  269. package/assets/esri/core/workers/chunks/a6c3c1827d2e8bbfcd9e.js +0 -1
  270. package/assets/esri/core/workers/chunks/ba561e03df67894e437f.js +0 -2
  271. package/assets/esri/core/workers/chunks/df9daac7ea581e9e5ca4.js +0 -1
  272. package/assets/esri/core/workers/chunks/ea51a7c32f716f4f1a34.js +0 -1
  273. package/assets/esri/core/workers/chunks/ef7dcb8758e7f21d30bc.js +0 -1
  274. package/chunks/Distance2DCalculator-BzAEa8Xe.js +0 -5
  275. package/chunks/GeodeticDistanceCalculator-BS_KY66f.js +0 -5
  276. package/chunks/OperatorShapePreservingDensify.js +0 -5
  277. package/geometry/operators/geodeticDensifyByLengthOperator.js +0 -5
  278. package/geometry/operators/gx/operatorShapePreservingDensify.js +0 -5
  279. package/geometry/operators/shapePreservingDensifyOperator.js +0 -5
  280. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +0 -5
  281. package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +0 -5
  282. package/views/interactive/tooltip/Tooltip.js +0 -5
  283. /package/assets/esri/core/workers/chunks/{941fe04f47059074c05b.js.LICENSE.txt → bb5a18dd1e6a71905668.js.LICENSE.txt} +0 -0
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
4
  */
5
- import{earth as e,mars as r,moon as o}from"../geometry/support/Ellipsoid.js";import{OverlayContent as a}from"../views/3d/terrain/OverlayContent.js";import{IntegratedMeshMode as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js";import{ComponentData as t,ComponentDataType as l}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardByOpacity as n}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js";import{ForwardLinearDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d,isColorOrColorEmission as g}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as h}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as p}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadLinearDepth as b}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as x,addLightingGlobalFactor as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as S,PhysicallyBasedRenderingParameters as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayIM as $,getIMColorTexture as W}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{alphaCutoff as A}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaDraw as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{EllipsoidMode as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{If as B,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as z}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as I}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{outputColorHighlightOID as E}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";function H(H){const V=new z;V.include(h,H),V.include(u,H),V.include(v,H),V.include(c,H),V.include(s,H),V.include(t,H),V.include(D,H),V.include(m,H),V.include(N,H),V.include(n,H);const{vertex:F,fragment:_}=V,{output:G,pbrMode:k,hasNormalTexture:q,snowCover:U,receiveShadows:J,spherical:K,ellipsoidMode:Q}=H,X=k===S.Normal||k===S.Schematic;X&&(V.include(M,H),q&&V.include(y,H));const Y=G===d.Shadow||G===d.ShadowHighlight||G===d.ShadowExcludeHighlight,Z=Y&&H.componentData===l.Varying;F.code.add(`#define discardShadows(castShadows) { ${B(Z,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")} }`);const ee=H.integratedMeshMode===i.ColorOverlay||H.integratedMeshMode===i.ColorOverlayWithWater;if(ee){V.include(x,H),V.include($,H);const a=Q===P.Earth,i=Q===P.Earth,t=a?e.radius:i?r.radius:o.radius;F.code.add(`\n ${B(K,`const float invRadius = ${R.float(1/t)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${B(K,"/ (1.0 + invRadius * pos.z);")}; }`)}const re=ee&&g(G)&&k===S.WaterOnIntegratedMesh;if(re&&(V.varyings.add("tbnTangent","vec3"),V.varyings.add("tbnBiTangent","vec3"),V.varyings.add("groundNormal","vec3")),F.main.add(R`
5
+ import{earth as e,mars as r,moon as o}from"../geometry/support/Ellipsoid.js";import{OverlayContent as a}from"../views/3d/terrain/OverlayContent.js";import{IntegratedMeshMode as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js";import{ComponentData as l,ComponentDataType as t}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardByOpacity as n}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js";import{ForwardLinearDepth as s}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d,isColorOrColorEmission as g}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as h}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as p}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadLinearDepth as b}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as x,addLightingGlobalFactor as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as S,PhysicallyBasedRenderingParameters as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayIM as $,getIMColorTexture as A}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{alphaCutoff as W}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaDraw as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{EllipsoidMode as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{If as B,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as z}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{outputColorHighlightOID as H}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";function I(I){const V=new z;V.include(u,I),V.include(h,I),V.include(v,I),V.include(c,I),V.include(s,I),V.include(l,I),V.include(D,I),V.include(m,I),V.include(N,I),V.include(n,I);const{vertex:F,fragment:_}=V,{output:G,pbrMode:k,hasNormalTexture:q,snowCover:U,receiveShadows:J,spherical:K,ellipsoidMode:Q}=I,X=k===S.Normal||k===S.Schematic;X&&(V.include(M,I),q&&V.include(y,I));const Y=G===d.Shadow||G===d.ShadowHighlight||G===d.ShadowExcludeHighlight,Z=Y&&I.componentData===t.Varying;F.code.add(`#define discardShadows(castShadows) { ${B(Z,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")} }`);const ee=I.integratedMeshMode===i.ColorOverlay||I.integratedMeshMode===i.ColorOverlayWithWater;if(ee){V.include(x,I),V.include($,I);const a=Q===P.Earth,i=Q===P.Earth,l=a?e.radius:i?r.radius:o.radius;F.code.add(`\n ${B(K,`const float invRadius = ${R.float(1/l)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${B(K,"/ (1.0 + invRadius * pos.z);")}; }`)}const re=ee&&g(G)&&k===S.WaterOnIntegratedMesh;if(re&&(V.varyings.add("tbnTangent","vec3"),V.varyings.add("tbnBiTangent","vec3"),V.varyings.add("groundNormal","vec3")),F.main.add(R`
6
6
  bool castShadows;
7
7
  vec4 externalColor = forwardExternalColor(castShadows);
8
8
  discardShadows(castShadows);
@@ -11,7 +11,7 @@ import{earth as e,mars as r,moon as o}from"../geometry/support/Ellipsoid.js";imp
11
11
 
12
12
  ${G===d.ObjectAndLayerIdColor?R`externalColor.a = 1.0;`:""}
13
13
 
14
- if (externalColor.a < ${R.float(A)}) {
14
+ if (externalColor.a < ${R.float(W)}) {
15
15
  // Discard this vertex
16
16
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
17
17
  return;
@@ -31,10 +31,10 @@ import{earth as e,mars as r,moon as o}from"../geometry/support/Ellipsoid.js";imp
31
31
  tbnTangent = vec3(1.0, 0.0, 0.0);
32
32
  tbnBiTangent = vec3(0.0, 1.0, 0.0);`:""}
33
33
  ${ee?R`setOverlayVTC(projectOverlay(position));`:""}
34
- `),g(G))return _.include(b),V.include(O,H),V.include(f,H),V.include(C,H),V.include(x,H),V.include(E,H),J&&V.include(T,H),_.code.add(R`
34
+ `),g(G))return _.include(b),V.include(O,I),V.include(f,I),V.include(C,I),V.include(x,I),V.include(H,I),J&&V.include(T,I),_.code.add(R`
35
35
  float evaluateShadow() {
36
36
  return ${J?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
37
- }`),ee&&_.uniforms.add(new I("ovColorTex",((e,r)=>W(e,r)))),_.main.add(R`
37
+ }`),ee&&_.uniforms.add(new E("ovColorTex",((e,r)=>A(e,r)))),_.main.add(R`
38
38
  discardBySlice(vPositionWorldCameraRelative);
39
39
  terrainDepthTest(vPosition_view.z);
40
40
 
@@ -68,7 +68,7 @@ import{earth as e,mars as r,moon as o}from"../geometry/support/Ellipsoid.js";imp
68
68
  vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
69
69
  vec4 emission = getEmissions();
70
70
  vec4 shadedColor = vec4(evaluateSceneLightingPBR(shadingNormal, materialColor.rgb, evaluateShadow(), ssao, additionalLight, viewDir, normalGround, mrr, emission, additionalIrradiance), materialColor.a);
71
- `)):(!J&&K&&L(_),re&&_.uniforms.add(new I("ovNormalTex",((e,r)=>r.overlay?.getTexture(a.WaterNormal)))),_.main.add(R`
71
+ `)):(!J&&K&&L(_),re&&_.uniforms.add(new E("ovNormalTex",((e,r)=>r.overlay?.getTexture(a.WaterNormal)))),_.main.add(R`
72
72
  ${B(!J&&K,"float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());")}
73
73
  float shadow = ${J?"evaluateShadow()":K?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
74
74
 
@@ -91,18 +91,15 @@ import{earth as e,mars as r,moon as o}from"../geometry/support/Ellipsoid.js";imp
91
91
  // un-gamma the ground color to mix in linear space
92
92
  shadedColor = mix(shadedColor, waterColorNonLinear, waterColorLinear.w);
93
93
  }`)}
94
- `)),_.main.add(R`outputColorHighlightOID(shadedColor, vPositionWorldCameraRelative);`),V;const oe=G===d.Normal,ae=G===d.ObjectAndLayerIdColor,ie=G===d.Highlight,te=Y||G===d.ViewshedShadow;return te&&V.include(w,H),oe&&V.include(C,H),V.include(p,H),_.main.add(R`
94
+ `)),_.main.add(R`outputColorHighlightOID(shadedColor, vPositionWorldCameraRelative);`),V;const oe=G===d.Normal,ae=G===d.ObjectAndLayerIdColor,ie=G===d.Highlight,le=Y||G===d.ViewshedShadow;return le&&V.include(w,I),oe&&V.include(C,I),V.include(p,I),_.main.add(R`
95
95
  discardBySlice(vPositionWorldCameraRelative);
96
96
 
97
97
  vec4 textureColor = readBaseColorTexture();
98
98
  discardOrAdjustAlpha(textureColor);
99
99
 
100
- ${B(te,"outputDepth(linearDepth);")}
100
+ ${B(le,"outputDepth(linearDepth);")}
101
101
  ${B(oe,R`fragColor = vec4(vec3(0.5) + 0.5 * fragmentFaceNormalView, 1.0);`)}
102
102
  ${B(ae,ee?"fragColor = getOverlayColorTexel(vtcOverlay);":"outputObjectAndLayerIdColor();")}
103
- ${B(ie,R`${B(ee,R`vec4 overlayHighlightBits = getCombinedOverlayColor();
104
- if (overlayHighlightBits == vec4(0.0)) {
105
- discard;
106
- }`)}
107
- calculateOcclusionAndOutputHighlight();`)}
108
- `),V}const V=Object.freeze(Object.defineProperty({__proto__:null,build:H},Symbol.toStringTag,{value:"Module"}));export{V as C,H as b};
103
+ ${B(ie,R`${B(ee,R`
104
+ vec4 overlayHighlightTexel = getAllOverlayHighlightValuesEncoded();
105
+ outputAllHighlights(overlayHighlightTexel);`,R`calculateOcclusionAndOutputHighlight();`)}`)}`),V}const V=Object.freeze(Object.defineProperty({__proto__:null,build:I},Symbol.toStringTag,{value:"Module"}));export{V as C,I as b};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{b as e,c as t}from"./tslib.es6.js";import{G as n,v as i,w as r,e as s,P as o,x as m,E as a,s as u,y as c,z as h,n as l,A as g,B as y,g as _,a as D,C as v}from"./Polyline.js";class N{static leafSize(){return 20}}function p(){return{outPoint:new s,index:-1,t:Number.NaN}}function f(e,t,n){return{outPoint:e.clone(),index:t,t:n}}function P(e,t,n,i){e.outPoint.assign(t),e.index=n,e.t=i}function I(e,t){e.outPoint.assign(t.outPoint),e.index=t.index,e.t=t.t}function d(e,t,n,i){e.index=n,e.t=i,t.queryCoord2D(e.t,e.outPoint)}function q(e,t){const n=p();I(n,e),I(e,t),I(t,n)}function M(e,t,r,s,o,m){if(e.getGeometryType()===n.enumPolygon){for(;s.nextPath();)if(s.hasNextSegment()){const t=s.nextSegment();if(0!==i(e,t.getEndXY(),0))return P(o,t.getEndXY(),-1,Number.NaN),P(m,t.getEndXY(),-1,Number.NaN),!0}s.resetToFirstPath()}if(t.getGeometryType()===n.enumPolygon){for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment();if(0!==i(t,e.getEndXY(),0))return P(o,e.getEndXY(),-1,Number.NaN),P(m,e.getEndXY(),-1,Number.NaN),!0}r.resetToFirstPath()}return!1}function x(e){const t=e.getPathCount(),n=new Array(e.getSegmentCount());let i=0;for(let r=0;r<t;++r){const t=i+e.getSegmentCountPath(r);for(let s=i,o=e.getPathStart(r);s<t;++s,++o)n[s]=o;i=t}return r(e.getPointCount(),n),n}function E(e,t){return!!Number.isNaN(t)||e<=t}function b(e){const t=new D;return t.addEnvelope(e,!1),t}function S(e,t){return!1}function B(){return new N}class A{constructor(e,t){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=t,this.m_maxSqrDistance=e*e,this.m_maxDistance=e,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=e,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let e=Math.sqrt(this.m_maxSqrDistance);for(;e<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,e=Math.sqrt(this.m_maxSqrDistance)}}calculate(e,t,n,i){if(e.getGeometryType()!==o.type||t.getGeometryType()!==o.type){this.m_env2DgeometryA=new m,this.m_env2DgeometryB=new m,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB);if(!E(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance))return Number.POSITIVE_INFINITY}const r=f(new s,v(),Number.NaN),a=f(new s,v(),Number.NaN),u=this._ExecuteBruteForce(e,t,r,a);return E(u,this.m_maxDistance)?(null!==n&&I(n,r),null!==i&&I(i,a),u):Number.POSITIVE_INFINITY}isNear(e,t){if(this.m_bIsNearCalc=!0,e.isEmpty()||t.isEmpty())return!1;if(e===t)return!0;let n=!0;if(e.getGeometryType()!==o.type&&e.getGeometryType()!==a.type||t.getGeometryType()!==o.type&&t.getGeometryType()!==a.type||(n=!1),n){if(this.m_env2DgeometryA=new m,this.m_env2DgeometryB=new m,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const i=f(new s,v(),Number.NaN),r=f(new s,v(),Number.NaN);return this._ExecuteBruteForce(e,t,i,r)<=this.m_maxDistance}progress_(e=!1){}_ExecuteBruteForce(e,t,i,r){switch(e.getGeometryType()){case n.enumPoint:return this.distancePointGeometry(e,t,i,r);case n.enumMultiPoint:return this.distanceMultipointGeometry(e,t,i,r);case n.enumEnvelope:return this.distanceEnvelopeGeometry(e,t,i,r);case n.enumPolyline:case n.enumPolygon:return this.distanceMultipathGeometry(e,t,i,r);default:return Number.NaN}}distancePointGeometry(e,t,i,r){switch(t.getGeometryType()){case n.enumPoint:return this.distancePointPoint(e,t,i,r);case n.enumMultiPoint:return this.distancePointMultipoint(e,t,i,r);case n.enumPolyline:case n.enumPolygon:return this.distancePointMultipath(e,t,i,r);case n.enumEnvelope:return this.distancePointEnvelope(e,t,i,r);default:return Number.NaN}}distancePointPoint(e,t,n,i){const r=e.getXY(),o=t.getXY();return P(n,r,0,0),P(i,o,0,0),Math.sqrt(s.sqrDistance(r,o))}distancePointMultipoint(e,t,n,i){const r=e.getXY();let o=this.m_maxSqrDistance,m=o,a=!1;const u=t.getPointCount(),c=new s;for(let h=0;h<u;++h)if(t.queryXY(h,c),m=s.sqrDistance(r,c),this.m_bIsNearCalc){if(m<=o)return 0}else if(!(m>o)&&(!a&&m===o||m<o)&&(o=m,P(n,r,0,0),P(i,c,h,0),a=!0,0===o))return 0;return a?Math.sqrt(o):Number.POSITIVE_INFINITY}distancePointMultipath(e,t,r,o){const a=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),u=e.getXY();if(!a&&t.getGeometryType()===n.enumPolygon&&0!==i(t,u,0))return P(r,u,0,0),P(o,u,-1,Number.NaN),0;t.getImpl().getAccelerators();let c=this.m_maxSqrDistance,h=c,l=-1;const g=new m,y=t.querySegmentIterator();let _=!1;for(;y.nextPath();)for(;y.hasNextSegment();){const e=y.nextSegment();e.queryEnvelope(g);const t=g.sqrDistance(u);if(t>c)continue;if(!this.m_bIsNearCalc&&_&&t===c)continue;l=e.getClosestCoordinate(u,!1);const n=e.getCoord2D(l);if(h=s.sqrDistance(u,n),this.m_bIsNearCalc){if(h<=c)return 0}else if(!(h>c)&&(!_||h<c)&&(c=h,P(r,u,0,0),P(o,n,y.getStartPointIndex(),l),_=!0,0===c))return 0}return _?Math.sqrt(c):Number.POSITIVE_INFINITY}distancePointEnvelope(e,t,n,i){const r=e.getXY();P(n,r,0,0),P(i,r,-1,Number.NaN);const s=t.asEnvelope2D();return!s.contains(r)?Math.sqrt(s.sqrDistance(r,i.outPoint)):0}distanceMultipointGeometry(e,t,i,r){switch(t.getGeometryType()){case n.enumPoint:{this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const n=this.distancePointMultipoint(t,e,r,i);return this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),n}case n.enumMultiPoint:return this.distanceMultipointMultipoint(e,t,i,r,1,1);case n.enumPolyline:case n.enumPolygon:return this.distanceMultipointMultipath(e,t,i,r);case n.enumEnvelope:return this.distanceMultipointMultipath(e,b(t),i,r);default:return Number.NaN}}distanceMultipointMultipoint(n,i,r,o,m,a){const g={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===m&&1===a){const e=Math.trunc(c(Math.sqrt(n.getPointCount())+1,1,h())),t=Math.trunc(c(Math.sqrt(i.getPointCount())+1,1,h()));if((e>=4||t>=4)&&this.distanceMultipointMultipoint(n,i,r,o,e,t)<=this.m_maxSqrDistance)return 0}let t=this.m_maxSqrDistance;const y=[n],_=[i],D=this.swapGeometriesIfBGtA(y,_);D&&(this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),a=u(m,m=a),q(r,o));e(g,l((()=>{q(r,o),this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!D),!1);const v=y[0].getImpl(),N=_[0].getImpl(),p=v.getPointCount(),f=N.getPointCount(),I=f>1;let d=!1;const M=new s,x=new s;for(let e=0;e<p;e+=m){if(v.queryXY(e,M),I){const e=this.m_env2DgeometryB.sqrDistance(M);if(this.m_bIsNearCalc){if(e>t)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(M)<=t)return 0}else if(e>=t)continue}for(let n=0;n<f;n+=a){N.queryXY(n,x);const i=s.sqrDistance(M,x);if(this.m_bIsNearCalc){if(i<=t)return 0}else if(!(i>t||d&&i===t)&&(!d||i<t)&&(P(r,M,e,0),P(o,x,n,0),d=!0,t=i,0===t))return d?Math.sqrt(t):Number.POSITIVE_INFINITY}}return d?Math.sqrt(t):Number.POSITIVE_INFINITY}catch(y){g.error=y,g.hasError=!0}finally{t(g)}}distanceMultipointMultipath(e,t,r,o){let a=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&t.getGeometryType()===n.enumPolygon;const u=t.querySegmentIterator();u.stripAttributes();const c=new m,h=new s;let l=this.m_maxSqrDistance;const g=e.getImpl(),y=g.getPointCount(),_=y>1;let D=!1;for(;u.nextPath();)for(;u.hasNextSegment();){const e=u.nextSegment();if(e.queryLooseEnvelope(c),_){const e=c.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(e>l)continue}else if(e>l||D&&e===l)continue}for(let n=0;n<y;n++){if(g.queryXY(n,h),a&&0!==i(t,h,0))return P(r,h,-1,Number.NaN),P(o,h,n,0),0;{const e=c.sqrDistance(h);if(this.m_bIsNearCalc){if(e>l)continue}else if(e>l)continue}const s=e.getClosestCoordinate(h,!1),m=e.getCoord2D(s);h.subThis(m);const y=h.sqrLength();if(this.m_bIsNearCalc){if(y<=l)return 0}else if(!(y>l)&&(!D||y<l)&&(l=y,P(r,g.getXY(n),n,0),P(o,m,u.getStartPointIndex(),s),D=!0,0===l))return 0}a=!1}return D?Math.sqrt(l):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(e,t,i,r){switch(t.getGeometryType()){case n.enumPoint:return this.distancePointEnvelope(t,e,r,i);case n.enumMultiPoint:{this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const n=this.distanceMultipointMultipath(t,b(e),r,i);return this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),n}case n.enumPolyline:case n.enumPolygon:return this.distanceMultipathMultipath(b(e),t,i,r);case n.enumEnvelope:return this.distanceEnvelopeEnvelope(e,t,i,r);default:return Number.NaN}}distanceEnvelopeEnvelope(e,t,n,i){n.t=Number.NaN,n.index=-1,i.t=Number.NaN,i.index=-1;const r=e.asEnvelope2D(),s=t.asEnvelope2D();return Math.sqrt(r.sqrDistanceEnvelope(s,n.outPoint,i.outPoint))}distanceMultipathGeometry(e,t,i,r){switch(t.getGeometryType()){case n.enumPoint:{this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const n=this.distancePointMultipath(t,e,r,i);return this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),n}case n.enumMultiPoint:{this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const n=this.distanceMultipointMultipath(t,e,r,i);return this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),n}case n.enumPolyline:case n.enumPolygon:return this.distanceMultipathMultipath(e,t,i,r);case n.enumEnvelope:return this.distanceMultipathMultipath(e,b(t),i,r);default:return Number.NaN}}distanceMultipathMultipath(n,i,r,s){const o={stack:[],error:void 0,hasError:!1};try{const t=[n],a=[i],y=this.swapGeometriesIfAGtB(t,a);y&&(this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),q(r,s));e(o,l((()=>{q(r,s),this.m_env2DgeometryB=u(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!y),!1);const _=t[0],D=a[0],v=_.querySegmentIterator();v.stripAttributes();const N=D.querySegmentIterator();if(N.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const e=Math.trunc(c(Math.sqrt(_.getPointCount())+1,1,h())),t=Math.trunc(c(Math.sqrt(_.getPointCount())+1,1,h()));if(this.distanceMultipointMultipoint(_,D,r,s,e,t)<=this.m_maxSqrDistance)return 0}if(!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const e=p(),t=p();if(M(_,D,v,N,e,t))return I(r,e),I(s,t),0}const f=x(_),P=[],E=(B(),S(_,D)),b=new g,A=new m,T=new m,C=new m;let w=this.m_maxSqrDistance,G=!0,Y=!1;for(let e=0,n=f.length;e<n;++e){_.querySegment(f[e],b,!0);const t=b.get();if(t.queryEnvelope(A),!(A.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>w)){if(this.m_bIsNearCalc&&A.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=w)return 0;if(E);else{for(;N.nextPath();){if(G)D.queryPathEnvelope(N.getPathIndex(),C),P[N.getPathIndex()]=C.clone();else if(A.sqrDistanceEnvelope(P[N.getPathIndex()],null,null)>w)continue;for(;N.hasNextSegment();){const n=N.nextSegment();if(n.queryEnvelope(T),A.sqrDistanceEnvelope(T,null,null)<=w){const i=!A.isIntersecting(T),o=[0],m=[0];let a=t.distance(n,i,o,m);if(a*=a,this.m_bIsNearCalc&&a<=this.m_maxSqrDistance)return 0;if(a<w||a===w&&f[e]<r.index){if(Y=!0,d(r,t,f[e],o[0]),d(s,n,N.getStartPointIndex(),m[0]),0===a)return 0;w=a}}}}N.resetToFirstPath(),G=!1}}}return Y?Math.sqrt(w):Number.POSITIVE_INFINITY}catch(a){o.error=a,o.hasError=!0}finally{t(o)}}swapGeometriesIfAGtB(e,t){return y(e[0])>y(t[0])&&(t[0]=u(e[0],e[0]=t[0]),!0)}swapGeometriesIfBGtA(e,t){return this.swapGeometriesIfAGtB(t,e)}buildSpatialTree(e,t){_(0)}getNearestNeighbourVisitor(e,t,n,i,r,s,o,m){return _(0),{}}}export{A as D,p as m,x as s,M as w};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.31/esri/copyright.txt for details.
4
+ */
5
+ import{b as t,c as e}from"./tslib.es6.js";import{S as i,e as n,x as s,a6 as o,X as a,R as r,t as m,G as c,ae as u,af as h,g as l,bq as _,au as d,av as p,s as g,A as x,br as y,bm as P,be as S,bs as G,p as D,bt as f,ax as v,Y as b,H as w,a as T,o as M,B as E,bu as C,f as R,T as B,bv as I,bl as A,ag as q}from"./Polyline.js";import{s as F,w as k,m as N}from"./Distance2DCalculator-De7WFGFq.js";import{OperatorGeodeticDensifyCursor as X}from"./OperatorGeodeticDensifyByLength.js";class Y{getOperatorType(){return 10317}supportsCurves(){return!0}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}executeMany(t,e,i,n,s,o){return new X(t,e,4,i,n,s,o)}execute(t,e,n,s,o,a){const r=new i([t]);return this.executeMany(r,e,n,s,o,a).next()}}function O(){return new s}class U{constructor(t,e,i){void 0!==t?this.reset(t,e,i):this.reset(1,0,1)}reset(t,e,i){this.m_a=t,this.m_e2=e,this.m_b=this.m_a*Math.sqrt(1-this.m_e2),this.m_unitToDegree=i,this.m_unitToRad=.017453292519943295*i,this.m_u180=180/this.m_unitToDegree,this.m_u360=360/this.m_unitToDegree}calculateBbox(i,n,s,o){const a={stack:[],error:void 0,hasError:!1};try{const e=t(a,new u,!1),r=t(a,new u,!1),m=t(a,new u,!1);h.geodeticDistance(this.m_a,this.m_e2,i*this.m_unitToRad,n*this.m_unitToRad,s*this.m_unitToRad,o*this.m_unitToRad,m,e,r,0);const c=Math.cos(e.val),l=Math.cos(r.val+3.141592653589793),_=n*this.m_unitToRad,d=B.phiToEta(this.m_e2,_),p=Math.sin(e.val)*Math.cos(d);let g=n;if(c*l<0){const t=c<0?-1:1,e=Math.acos(Math.abs(p))*t;g=B.etaToPhi(this.m_e2,e)/this.m_unitToRad}let x=I((s-i)*this.m_unitToRad,2*Math.PI);Math.abs(x)>Math.PI&&(x=x>0?x-2*Math.PI:x+2*Math.PI),x/=this.m_unitToRad,s=i+x;const y=O();return y.xmin=Math.min(i,s),y.xmax=Math.max(i,s),y.ymin=Math.min(n,o),y.ymin=Math.min(y.ymin,g),y.ymax=Math.max(n,o),y.ymax=Math.max(y.ymax,g),y}catch(r){a.error=r,a.hasError=!0}finally{e(a)}}minDistanceGeodesic(t,e){const i=L(t),n=L(e);if(i&&n)return this.lowerDistanceGeodetic_(t.xmin,t.ymin,e.xmin,e.ymin);const s=this.normalizeGeodesic_(e,t);return V(t,s)?t.ymin>=s.ymax?this.minDistanceGeodesicUpDown_(t,s):s.ymin>=t.ymax?this.minDistanceGeodesicUpDown_(s,t):t.xmin>s.xmax?this.minDistanceGeodesicLeftRight_(s,t):this.minDistanceGeodesicLeftRight_(t,s):0}sqrMaxMinDistanceGeodesic(t,e){return l(0),0}maxDistanceGeodesic(t,e){return l(0),0}sqrMinDistance(t,e){return l(0),0}sqrMaxDistance(t,e){return l(0),0}sqrMaxMinDistance(t,e){return l(0),0}calculateMaxDim(t){return l(0),0}lowerDistanceGeodesic(t,e,i,n){return l(0),0}upperDistanceGeodesic(t,e,i,n){return l(0),0}normalizeGeodesic_(t,e){const i=t.clone(),n=t.clone();let s=z(i,e);if(0===s)return i;for(;n.xmax>e.xmin;){n.xmin-=this.m_u360,n.xmax-=this.m_u360;const t=z(n,e);if(t<s&&(i.assign(n),s=t,0===s))return i}for(n.assign(t);n.xmin<e.xmax;){n.xmin+=this.m_u360,n.xmax+=this.m_u360;const t=z(n,e);if(t<s&&(i.assign(n),s=t,0===s))return i}return i}lowerDistanceGeodetic_(i,n,s,o){const a={stack:[],error:void 0,hasError:!1};try{const e=t(a,new u,!1);{const t=this.m_b*this.m_b/this.m_a,a=B.phiToPhig(this.m_e2,this.m_unitToRad*n),r=B.phiToPhig(this.m_e2,this.m_unitToRad*o);h.geodeticDistance(t,0,this.m_unitToRad*i,a,this.m_unitToRad*s,r,e,null,null,0)}return e.val}catch(r){a.error=r,a.hasError=!0}finally{e(a)}}upperDistanceGeodetic_(t,e,i,n){return l(0),0}minDistanceGeodesicUpDown_(t,e){if(e.xmin<=t.xmin?e.xmax>=t.xmin:t.xmax>=e.xmin)return this.lowerDistanceGeodetic_(0,t.ymin,0,e.ymax);if(e.xmin>t.xmax){const i=this.lowerDistanceGeodeticSegMeridional_(t.xmax,t.ymin,t.ymax,e.xmin,e.ymin,e.ymax);if(e.xmax-t.xmin<this.m_u180)return i;const n=this.lowerDistanceGeodeticSegMeridional_(t.xmin,t.ymin,t.ymax,e.xmax,e.ymin,e.ymax);return Math.min(i,n)}{const i=this.lowerDistanceGeodeticSegMeridional_(t.xmin,t.ymin,t.ymax,e.xmax,e.ymin,e.ymax);if(t.xmax-e.xmin<this.m_u180)return i;const n=this.lowerDistanceGeodeticSegMeridional_(t.xmax,t.ymin,t.ymax,e.xmin,e.ymin,e.ymax);return Math.min(i,n)}}minDistanceGeodesicLeftRight_(t,e){let i=Math.abs(t.xmax-e.xmin);for(;i>this.m_u180;)i-=this.m_u360;let n=Math.abs(t.xmin-e.xmax);for(;n>this.m_u180;)n-=this.m_u360;return Math.abs(i)<=Math.abs(n)?this.minDistanceGeodesicLeftRightNormalized_(t,e):this.minDistanceGeodesicLeftRightNormalized_(e,t)}minDistanceGeodesicLeftRightNormalized_(t,e){let i,n;return i=this.lowerDistanceGeodetic_(t.xmax,t.ymin,e.xmin,e.ymin),t.ymin>=e.ymin&&t.ymin<=e.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(t.xmax,t.ymin,e.xmin,e.ymin,e.ymax),i=Math.min(i,n)),e.ymin>=t.ymin&&e.ymin<=t.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(e.xmin,e.ymin,t.xmax,t.ymin,t.ymax),i=Math.min(i,n)),n=this.lowerDistanceGeodetic_(t.xmax,t.ymax,e.xmin,e.ymax),i=Math.min(i,n),t.ymax>=e.ymin&&t.ymax<=e.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(t.xmax,t.ymax,e.xmin,e.ymin,e.ymax),i=Math.min(i,n)),e.ymax>=t.ymin&&e.ymax<=t.ymax&&(n=this.lowerDistanceGeodeticPtMeridional_(e.xmin,e.ymax,t.xmax,t.ymin,t.ymax),i=Math.min(i,n)),i}normalizeDistance_(t){return l(0),0}lowerDistanceGeodeticSegMeridional_(t,e,i,n,s,o){let a=this.lowerDistanceGeodeticPtMeridional_(t,e,n,s,o);const r=this.lowerDistanceGeodeticPtMeridional_(t,i,n,s,o);let m=this.lowerDistanceGeodeticPtMeridional_(n,s,t,e,i);const c=this.lowerDistanceGeodeticPtMeridional_(n,o,t,e,i);return a=Math.min(a,r),m=Math.min(m,c),Math.min(a,m)}minDistanceGeodesicPointBox_(t,e,i){return l(0),0}lowerDistanceGeodeticPtMeridional_(i,s,o,a,r){const m={stack:[],error:void 0,hasError:!1};try{const l=this.m_b*this.m_b/this.m_a,_=B.phiToPhig(this.m_e2,this.m_unitToRad*s),g=B.phiToPhig(this.m_e2,this.m_unitToRad*a),x=B.phiToPhig(this.m_e2,this.m_unitToRad*r),y=t(m,new u,!1);h.geodeticDistance(l,0,this.m_unitToRad*o,g,this.m_unitToRad*i,_,y,null,null,0);const P=t(m,new u,!1);h.geodeticDistance(l,0,this.m_unitToRad*o,x,this.m_unitToRad*i,_,P,null,null,0);const S=d(1,0,new n(this.m_unitToRad*i,_)),G=d(1,0,new n(this.m_unitToRad*o,g)),D=d(1,0,new n(this.m_unitToRad*o,x));let f=new p;f.setCrossProductVector(G,D);const v=G.dotProduct(D);if(f.length()<1.568e-10)return v>=0?Math.min(y.val,P.val):0;f=f.getUnitVector();let b=new p;if(b.setCrossProductVector(f,S),b.length()<1.568e-10){return Math.min(y.val,P.val)-1e-5*l}b=b.getUnitVector();let w=S.sub(f.mul(S.dotProduct(f)));{const n=new p;n.setCrossProductVector(G,w);const s=new p;s.setCrossProductVector(w,D);let o=f.dotProduct(n)>0&&f.dotProduct(s)>0;if(o||(w.negateThis(),n.setCrossProductVector(G,w),s.setCrossProductVector(w,D),o=f.dotProduct(n)>0&&f.dotProduct(s)>0),o){const n={stack:[],error:void 0,hasError:!1};try{w=w.getUnitVector();const e=A(1,0,w),s=t(n,new u,!1);h.geodeticDistance(l,0,this.m_unitToRad*i,_,e.x,e.y,s,null,null,0);const o=Math.min(y.val,P.val);return Math.min(o,s.val)}catch(c){n.error=c,n.hasError=!0}finally{e(n)}}}return Math.min(y.val,P.val)}catch(l){m.error=l,m.hasError=!0}finally{e(m)}}fixAngle(t){return l(0),0}moveCloser(t,e){return l(0),0}}function L(t){return t.xmin===t.xmax&&t.ymin===t.ymax}function V(t,e){return e.xmax<t.xmin||e.xmin>t.xmax||e.ymax<t.ymin||e.ymin>t.ymax}function z(t,e){let i,n=0;return i=t.xmin-e.xmax,i>n&&(n=i),i=e.xmin-t.xmax,i>n&&(n=i),n}class H{}function j(t){return{outPoint:void 0===t?new n:t.clone()}}function W(t,e){t.outPoint.assign(e.outPoint)}function J(){return new s}class K{constructor(t,e,i,s,o=0,a=4){this.m_ptDistFrom=new n,this.m_segStartPt=new n,this.m_segEndPt=new n,this.m_geodeticLength=new u,this.m_az12=new u,this.m_minGeodeticDist=new u,this.m_segStartPt3d=new p,this.m_segEndPt3d=new p,this.m_sr=s,this.m_distCurveType=o,this.m_segCurveType=a,this.m_inputGCS=this.m_sr.getGCS(),this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_bIsPannablePcs=2===this.m_sr.getCoordinateSystemType()&&this.m_sr.isPannable();const r=q();this.m_inputGCS.querySpheroidData(r),this.m_a=r.majorSemiAxis,this.m_eSquared=r.e2,this.setPointDistFrom(t),this.setSegmentEndPoints(e,i)}setSegmentEndPoints(t,e){this.m_segStartPt.assign(t),this.m_segEndPt.assign(e),this.m_bIsPannablePcs||(this.m_segStartPt.mulThis(this.m_rpu),this.m_segEndPt.mulThis(this.m_rpu)),2===this.m_segCurveType&&(this.m_segStartPt3d.assign(d(this.m_a,this.m_eSquared,this.m_segStartPt)),this.m_segEndPt3d.assign(d(this.m_a,this.m_eSquared,this.m_segEndPt))),this.calculateAndUpdateSegmentLength()}setPointDistFrom(t){this.m_ptDistFrom.assign(t),this.m_ptDistFrom.scale(this.m_rpu)}setSegmentCurveType(t){this.m_segCurveType=t}setDistanceCurveType(t){this.m_distCurveType=t}makeFunctor(){return i=>{let s;switch(this.m_segCurveType){case 0:case 1:case 3:{const a={stack:[],error:void 0,hasError:!1};try{const e=t(a,new u,!1),o=t(a,new u,!1);h.geodeticCoordinate(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_geodeticLength.val*i,this.m_az12.val,e,o,this.m_segCurveType),s=new n(e.val,o.val);break}catch(o){a.error=o,a.hasError=!0}finally{e(a)}}case 2:{const t=p.lerp(this.m_segStartPt3d,this.m_segEndPt3d,i);s=A(this.m_a,this.m_eSquared,t);break}case 4:s=n.lerp(this.m_segStartPt,this.m_segEndPt,i),this.m_bIsPannablePcs&&(y(this.m_sr,0,[s],1),s.mulThis(this.m_rpu));break;default:M("Invalid curve type")}return h.geodeticDistance(this.m_a,this.m_eSquared,this.m_ptDistFrom.x,this.m_ptDistFrom.y,s.x,s.y,this.m_minGeodeticDist,null,null,this.m_distCurveType),this.m_minGeodeticDist.val}}calculateAndUpdateSegmentLength(){switch(this.m_segCurveType){case 0:case 2:case 1:case 3:h.geodeticDistance(this.m_a,this.m_eSquared,this.m_segStartPt.x,this.m_segStartPt.y,this.m_segEndPt.x,this.m_segEndPt.y,this.m_geodeticLength,this.m_az12,null,this.m_segCurveType);break;case 4:this.m_geodeticLength.val=n.distance(this.m_segStartPt,this.m_segEndPt);break;default:M("Invalid curve type")}}[Symbol.dispose](){this.m_geodeticLength[Symbol.dispose](),this.m_az12[Symbol.dispose](),this.m_minGeodeticDist[Symbol.dispose]()}}function Q(){return new H}class Z{constructor(t,e,i,n,a){this.m_boxGeomA=J(),this.m_boxGeomB=J(),this.m_envGeomA=new s,this.m_envGeomB=new s,this.m_progressCounter=0,this.m_transformPCS2GCS=null,this.m_segmentBoxesA=new Map,this.m_segmentBoxesB=new Map,this.m_boundaryPtsA=[],this.m_boundaryPtsB=[],this.m_scaleToRadians=new o,this.m_scaleToDegrees=new o,this.m_inputSR=t,this.m_distCurveType=e,this.m_progressTracker=i,this.m_maxDistance=n,this.m_maxDeviation=a,this.m_inputGCS=t.getGCS(),this.m_peGeogcs=this.m_inputGCS.getPECoordSys(),this.m_tolerance=0;const r=q();this.m_inputGCS.querySpheroidData(r),this.m_a=r.majorSemiAxis,this.m_eSquared=r.e2,this.m_rpu=this.m_inputGCS.getUnit().getUnitToBaseFactor(),this.m_envHelper=new U(this.m_a,this.m_eSquared,1),4===this.m_distCurveType&&(this.m_distCurveType=0),this.m_boxGeomA.setEmpty(),this.m_boxGeomB.setEmpty(),this.m_envGeomA.setEmpty(),this.m_envGeomB.setEmpty(),this.m_bIsPannablePcs=2===this.m_inputSR.getCoordinateSystemType()&&this.m_inputSR.isPannable()}progress(t=!1){}calculate(t,e,i,n){const s=j(),o=j();if(t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB),this.checkGeometriesIntersect(t,e,s,o))return i&&W(i,s),n&&W(n,o),0;const a=this.prepareGeometry(t);if(a.isEmpty())return Number.NaN;const r=this.prepareGeometry(e);if(r.isEmpty())return Number.NaN;this.m_tolerance=this.computeTolerance(a,r);const m=this._ExecuteBruteForce(a,r,s,o);return m>=this.m_maxDistance?Number.NaN:(i&&(this.prepareOutput(s),W(i,s)),n&&(this.prepareOutput(o),W(n,o)),m)}createDistanceFunctor(t,e,i){const n=new K(t,e,i,this.m_inputSR,this.m_distCurveType);return this.m_bIsPannablePcs||1===this.m_inputSR.getCoordinateSystemType()||n.setSegmentCurveType(2),n}_NormalizeAndProject(t){if(this.m_inputSR.isPannable()&&(t=(new a).foldInto360Range(t,this.m_inputSR)),2===this.m_inputSR.getCoordinateSystemType()){const e=r(this.m_inputSR,this.m_inputGCS,null);t=(new a).execute(t,e,this.m_progressTracker)}return t}_ExecuteBruteForce(t,e,i,n){switch(t.getGeometryType()){case c.enumPoint:return this.calculateDistanceGeodeticPointGeometry(t,e,i,n);case c.enumMultiPoint:return this.calculateDistanceGeodeticMultipointGeometry(t,e,i,n);case c.enumPolyline:case c.enumPolygon:case c.enumEnvelope:return this.calculateDistanceGeodeticMultipathGeometry(t,e,i,n);default:m("")}}calculateDistanceGeodeticPointGeometry(t,e,i,n){switch(e.getGeometryType()){case c.enumPoint:return this.calculateDistanceGeodeticPointPoint(t,e,i,n);case c.enumMultiPoint:return this.calculateDistanceGeodeticPointMultipoint(t,e,i,n);case c.enumPolyline:case c.enumPolygon:return this.calculateDistanceGeodeticPointMultipath(t,e,i,n);default:m("")}}calculateDistanceGeodeticPointPoint(i,n,s,o){const a={stack:[],error:void 0,hasError:!1};try{const e=i.getXY();e.scale(this.m_rpu);const r=n.getXY();r.scale(this.m_rpu),s.outPoint.assign(e),o.outPoint.assign(r);const m=t(a,new u,!1);return h.geodeticDistance(this.m_a,this.m_eSquared,e.x,e.y,r.x,r.y,m,null,null,this.m_distCurveType),m.val}catch(r){a.error=r,a.hasError=!0}finally{e(a)}}calculateDistanceGeodeticPointMultipoint(t,e,i,n){return l(0),0}calculateDistanceGeodeticPointMultipath(i,s,o,a){const r={stack:[],error:void 0,hasError:!1};try{const e=new n,m=new n;e.assign(i.getXY()),m.assign(i.getXY()),o.outPoint.assign(m.mul(this.m_rpu)),this.m_bIsPannablePcs&&_(this.m_inputSR,[e],1,!1),this.computeEnvelopesAndBoxes(i,s);const c=this.estimateMinimumDistance(o,a);let u=c<this.m_maxDistance?c:this.m_maxDistance;const h=s.getImpl(),d=new n(0,0),p=new n(0,0),g=[1],x=this.canUseSpatialTree(i,s),y=Q();x&&this.buildSpatialTree(y,s);const P=J();P.setCoords({xmin:m.x,ymin:m.y,xmax:m.x,ymax:m.y});const S=t(r,this.createDistanceFunctor(m,d,p),!1),G=h.querySegmentIterator();G.stripAttributes();if(x)l(0);else for(;G.nextPath();)for(;G.hasNextSegment();){const t=G.nextSegment(),i=this.findOrComputeBoxSegment(G.getStartPointIndex(),t,this.m_segmentBoxesB);if(this.m_envHelper.minDistanceGeodesic(P,i)>u)continue;const n=this.calculateDistanceGeodeticPointSegment(e,m,t,g,S);if(n.second<u&&(this.updateOutputSegment(a,t,n.first),u=n.second,0===u))return 0}return u===this.m_maxDistance?Number.POSITIVE_INFINITY:u}catch(m){r.error=m,r.hasError=!0}finally{e(r)}}calculateDistanceGeodeticMultipointGeometry(t,e,i,n){switch(e.getGeometryType()){case c.enumPoint:return this.calculateDistanceGeodeticPointMultipoint(e,t,n,i);case c.enumMultiPoint:return this.calculateDistanceGeodeticMultipointMultipoint(t,e,i,n);case c.enumPolyline:case c.enumPolygon:case c.enumEnvelope:return this.calculateDistanceGeodeticMultipointMultipath(t,e,i,n);default:m("")}}calculateDistanceGeodeticMultipointMultipoint(i,s,o,a){const r={stack:[],error:void 0,hasError:!1};try{const e=t(r,new u,!1);this.computeEnvelopesAndBoxes(i,s);const m=this.estimateMinimumDistance(o,a);let c=m<this.m_maxDistance?m:this.m_maxDistance;const l=new n,_=new n,g=i.getImpl(),x=s.getImpl(),y=J(),P=g.getPointCount(),S=x.getPointCount();for(let t=0;t<P;++t){if(l.assign(g.getXY(t)),y.setCoords({xmin:l.x,ymin:l.y,xmax:l.x,ymax:l.y}),this.m_envHelper.minDistanceGeodesic(y,this.m_boxGeomB)>c)continue;l.scale(this.m_rpu);const i=d(this.m_a,this.m_eSquared,l);for(let t=0;t<S;++t){_.assign(x.getXY(t)),_.scale(this.m_rpu);const n=d(this.m_a,this.m_eSquared,_);if(!(p.distance(i,n)>=c)&&(h.geodeticDistance(this.m_a,this.m_eSquared,l.x,l.y,_.x,_.y,e,null,null,this.m_distCurveType),e.val<c&&(o.outPoint.assign(l),a.outPoint.assign(_),c=e.val,0===c)))return c}}return c===this.m_maxDistance?Number.POSITIVE_INFINITY:c}catch(m){r.error=m,r.hasError=!0}finally{e(r)}}calculateDistanceGeodeticMultipointMultipath(i,s,o,a){const r={stack:[],error:void 0,hasError:!1};try{const e=s.getImpl().querySegmentIterator();e.stripAttributes(),this.computeEnvelopesAndBoxes(i,s);const m=this.estimateMinimumDistance(o,a);let c=m<this.m_maxDistance?m:this.m_maxDistance;const u=new n,h=new n(0,0),d=new n(0,0),p=new n(0,0),g=[0],x=J(),y=t(r,this.createDistanceFunctor(h,d,p),!1),P=Q(),S=this.canUseSpatialTree(i,s);S&&this.buildSpatialTree(P,s);const G=i.getPointCount();for(let t=0;t<G;++t)if(u.assign(i.getXY(t)),h.assign(i.getXY(t)),this.m_bIsPannablePcs&&_(this.m_inputSR,[u],1,!1),x.setCoords({xmin:h.x,ymin:h.y,xmax:h.x,ymax:h.y}),!(this.m_envHelper.minDistanceGeodesic(x,this.m_boxGeomB)>c))if(y.setPointDistFrom(h),S)l(0);else{for(;e.nextPath();)for(;e.hasNextSegment();){const t=e.nextSegment();if(this.m_envHelper.minDistanceGeodesic(x,this.findOrComputeBoxSegment(e.getStartPointIndex(),t,this.m_segmentBoxesB))>c)continue;const i=this.calculateDistanceGeodeticPointSegment(u,h,t,g,y);if(i.second<c&&(o.outPoint.assign(h.mul(this.m_rpu)),this.updateOutputSegment(a,t,i.first),c=i.second,0===c))return 0}e.resetToFirstPath()}return c===this.m_maxDistance?Number.POSITIVE_INFINITY:c}catch(m){r.error=m,r.hasError=!0}finally{e(r)}}calculateDistanceGeodeticMultipathGeometry(t,e,i,n){switch(e.getGeometryType()){case c.enumPoint:return this.calculateDistanceGeodeticPointMultipath(e,t,n,i);case c.enumMultiPoint:return this.calculateDistanceGeodeticMultipointMultipath(e,t,n,i);case c.enumPolyline:case c.enumPolygon:case c.enumEnvelope:return this.calculateDistanceGeodeticMultipathMultipath(t,e,i,n);default:m("")}}calculateDistanceGeodeticMultipathMultipath(t,e,i,n){const s=[t],o=[e],a=this.swapGeometries(s,o),r=s[0],m=o[0];this.computeEnvelopesAndBoxes(s[0],o[0]);const c=this.estimateMinimumDistance(i,n),u=this.calculateDistanceGeodeticMultipathMultipath_(r,m,i,n,c);return a&&(n.outPoint=g(i.outPoint,i.outPoint=n.outPoint)),u}calculateDistanceGeodeticMultipathMultipath_(i,s,o,a,r=Number.MAX_VALUE){const m={stack:[],error:void 0,hasError:!1};try{let e=r;const c=new n(0,0),u=new n,h=new n(0,0),_=new n,d=new n(0,0),p=new n,g=new n,S=new n,G=[new n],D=[0],f=[0],v=J(),b=J(),w=t(m,this.createDistanceFunctor(d,c,h),!1),T=Q(),M=this.canUseSpatialTree(i,s);M&&this.buildSpatialTree(T,s);const E=s.querySegmentIterator();E.stripAttributes();const C=new x,R=F(i);for(let t=0;t<R.length;++t){const n=R[t];i.getSegmentBuffer(n,C,!0);const s=C.get();if(v.assign(this.findOrComputeBoxSegment(n,s,this.m_segmentBoxesA)),M)l(0);else{if(d.assign(s.getStartXY()),p.assign(s.getStartXY()),g.assign(s.getEndXY()),S.assign(s.getEndXY()),this.m_bIsPannablePcs&&(y(this.m_inputSR,0,[p],1),y(this.m_inputSR,0,[S],1)),this.m_envHelper.minDistanceGeodesic(v,this.m_boxGeomB)>e)continue;for(;E.nextPath();){for(;E.hasNextSegment();){const t=E.nextSegment();if(c.assign(t.getStartXY()),u.assign(t.getStartXY()),h.assign(t.getEndXY()),_.assign(t.getEndXY()),s.intersect(t,G,D,f,this.m_tolerance))return this.updateOutputSegment(o,s,D[0]),this.updateOutputSegment(a,t,f[0]),0;if(this.m_bIsPannablePcs&&(y(this.m_inputSR,0,[u],1),y(this.m_inputSR,0,[_],1)),b.assign(this.findOrComputeBoxPoint(E.getStartPointIndex(),u,_,this.m_segmentBoxesB)),this.m_envHelper.minDistanceGeodesic(v,b)>e)continue;w.setSegmentEndPoints(c,h),w.setPointDistFrom(p);let i=P(w.makeFunctor(),0,1,1e-10);if(i.second<e&&(o.outPoint.assign(p.mul(this.m_rpu)),this.updateOutputSegment(a,t,i.first),e=i.second,0===e))break;if(w.setPointDistFrom(S),i=P(w.makeFunctor(),0,1,1e-10),i.second<e&&(o.outPoint.assign(S.mul(this.m_rpu)),this.updateOutputSegment(a,t,i.first),e=i.second,0===e))break;if(w.setSegmentEndPoints(d,g),w.setPointDistFrom(u),i=P(w.makeFunctor(),0,1,1e-10),i.second<e&&(this.updateOutputSegment(o,s,i.first),a.outPoint.assign(u.mul(this.m_rpu)),e=i.second,0===e))break;if(w.setPointDistFrom(_),i=P(w.makeFunctor(),0,1,1e-10),i.second<e&&(this.updateOutputSegment(o,s,i.first),a.outPoint.assign(_.mul(this.m_rpu)),e=i.second,0===e))break}if(0===e)return 0}E.resetToFirstPath()}}return e===this.m_maxDistance?Number.POSITIVE_INFINITY:e}catch(c){m.error=c,m.hasError=!0}finally{e(m)}}calculateDistanceGeodeticPointSegment(t,e,i,n,s){const o=i.getStartXY(),a=i.getEndXY();return i.intersectPoint(t,n,this.m_tolerance)?S(n[0],0):(s.setPointDistFrom(e),s.setSegmentEndPoints(o,a),P(s.makeFunctor(),0,1,1e-10))}prepareGeometry(t){let e=t.clone();const i=t.getGeometryType();if(i===c.enumPoint||i===c.enumMultiPoint)return this._NormalizeAndProject(e);if(i===c.enumEnvelope&&(e=this.envelopeToPolygon(e)),this.m_inputSR.isPannable())return this.prepareGeometryPannable(e,4);if(2===this.m_inputSR.getCoordinateSystemType()){if(e=G(e,this.m_inputSR,0,null),e.isEmpty())return e;e=(new Y).execute(e,this.m_inputSR,5e4,this.m_maxDeviation/2,0,null);const t=this.m_inputSR.getSRToGCSTransform();return(new a).execute(e,t,this.m_progressTracker)}const n=new s;e.queryLooseEnvelope(n);const o=this.m_inputSR.getPannableExtent();if(n.ymin<o.ymin||n.ymax>o.ymax){const t=new s(n.xmin-1,o.ymin,n.xmax+1,o.ymax);if(e=(new D).execute(e,t,this.m_inputSR,this.m_progressTracker),e.isEmpty())return e}return n.width()>2*o.width()?(e=f(e,-2*o.width(),2*o.width(),this.m_inputSR,!0,0,!0,this.m_progressTracker),e):e}prepareGeometryPannable(t,e){const i=new s;t.queryEnvelope(i);const n=this.m_inputSR.getPannableExtent();if(n.containsEnvelope(i))return t;const o=new v;n.queryIntervalX(o);const r=new v;return i.queryIntervalX(r),t=o.contains(r)?b(t,this.m_inputSR):(new a).foldInto360RangeGeodetic(t,this.m_inputSR,e)}prepareOutput(t){t.outPoint.scale(1/this.m_rpu),2===this.m_inputSR.getCoordinateSystemType()&&_(this.m_inputSR,[t.outPoint],1,!1)}updateOutputSegment(t,e,i){e.queryCoord2D(i,t.outPoint),this.m_bIsPannablePcs&&y(this.m_inputSR,0,[t.outPoint],1),t.outPoint.mulThis(this.m_rpu)}computeTolerance(t,e){t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB);const i=new s(this.m_envGeomA);return i.mergeEnvelope2D(this.m_envGeomB),w(null,i)}envelopeToPolygon(t){const e=new T;return e.addEnvelope(t,!1),e}computeEnvelopesAndBoxes(t,e){t.queryEnvelope(this.m_envGeomA),e.queryEnvelope(this.m_envGeomB),this.m_boxGeomA=this.computeBoxGeometry(t,this.m_boundaryPtsA,this.m_segmentBoxesA),this.m_boxGeomB=this.computeBoxGeometry(e,this.m_boundaryPtsB,this.m_segmentBoxesB)}computeBoxGeometry(t,e,i){switch(t.getGeometryType()){case c.enumPoint:return this.computeBoxPoint(t,e);case c.enumMultiPoint:return this.computeBoxMultiPoint(t,e);case c.enumPolyline:case c.enumPolygon:return this.computeBoxMultiPath(t,e,i);default:M("Invalid geometry type")}}computeBoxPoint(t,e){const i=t.getXY();e.length=1,e[0]=i.mul(this.m_rpu);const n=J();return n.setCoords({xmin:i.x,ymin:i.y,xmax:i.x,ymax:i.y}),n}computeBoxSegment(t){return l(0),{}}computeBoxMultiPoint(t,e){let i=!0;for(let s=0;s<t.getPointCount();++s){const n=t.getXY(s);if(i){e.length=4;for(let t=0;t<e.length;++t)e[t]=n.clone();i=!1}n.x<e[0].x&&(e[0]=n),n.y>e[1].y&&(e[1]=n),n.x>e[2].x&&(e[2]=n),n.y<e[3].y&&(e[3]=n)}for(let s=0;s<e.length;++s)e[s].mulThis(this.m_rpu);const n=J();return t.queryEnvelope(n),n}computeBoxMultiPath(t,e,i){let n=!0;const s=J();s.setEmpty();const o=t.querySegmentIterator();for(o.stripAttributes();o.nextPath();)for(;o.hasNextSegment();){const t=o.nextSegment(),a=t.getStartXY(),r=t.getEndXY();if(this.m_bIsPannablePcs&&(y(this.m_inputSR,0,[a],1),y(this.m_inputSR,0,[r],1)),n){e.length=4;for(let t=0;t<e.length;++t)e[t]=a.clone();n=!1}a.x<e[0].x&&e[0].assign(a),a.y>e[1].y&&e[1].assign(a),a.x>e[2].x&&e[2].assign(a),a.y<e[3].y&&e[3].assign(a),r.x<e[0].x&&e[0].assign(r),r.y>e[1].y&&e[1].assign(r),r.x>e[2].x&&e[2].assign(r),r.y<e[3].y&&e[3].assign(r);const m=this.findOrComputeBoxPoint(o.getStartPointIndex(),a,r,i);s.mergeEnvelope2D(m)}for(let a=0;a<e.length;++a)e[a].mulThis(this.m_rpu);return s}findOrComputeBoxSegment(t,e,i){if(!i.has(t)){let s=J();if(e.queryEnvelope(s),this.m_bIsPannablePcs){const t=n.construct(s.xmin,s.ymin),e=n.construct(s.xmax,s.ymax);y(this.m_inputSR,0,[t],1),y(this.m_inputSR,0,[e],1),s=this.m_envHelper.calculateBbox(t.x,t.y,e.x,e.y)}return i.set(t,s),s}return i.get(t)}findOrComputeBoxPoint(t,e,i,n){if(!n.has(t)){let s=J();return s.setCoords({xmin:e.x,ymin:e.y,xmax:i.x,ymax:i.y}),this.m_bIsPannablePcs&&(s=this.m_envHelper.calculateBbox(s.xmin,s.ymin,s.xmax,s.ymax)),n.set(t,s),s}return n.get(t)}checkPointInPolygon(t,e){return l(0),!1}estimateMinimumDistance(i,n){const s={stack:[],error:void 0,hasError:!1};try{const e=t=>d(this.m_a,this.m_eSquared,t),o=this.m_boundaryPtsA.map(e),a=this.m_boundaryPtsB.map(e);let r=Number.MAX_VALUE,m=0,c=0;for(let t=0;t<o.length;++t)for(let e=0;e<a.length;++e){const i=p.distance(o[t],a[e]);i<r&&(r=i,m=t,c=e)}i.outPoint.assign(this.m_boundaryPtsA[m]),n.outPoint.assign(this.m_boundaryPtsB[c]);const l=t(s,new u,!1);return h.geodeticDistance(this.m_a,this.m_eSquared,this.m_boundaryPtsA[m].x,this.m_boundaryPtsA[m].y,this.m_boundaryPtsB[c].x,this.m_boundaryPtsB[c].y,l,null,null,this.m_distCurveType),l.val}catch(o){s.error=o,s.hasError=!0}finally{e(s)}}swapGeometries(t,e){return E(t[0])>E(e[0])&&(e[0]=g(t[0],t[0]=e[0]),this.m_envGeomB=g(this.m_envGeomA,this.m_envGeomA=this.m_envGeomB),!0)}canUseSpatialTree(t,e){return!1}checkGeometriesIntersect(t,e,i,n){let s=t.getGeometryType(),o=e.getGeometryType();if(this.m_envGeomA.isIntersecting(this.m_envGeomB)){if(s===c.enumPoint&&2===e.getDimension()){const s=[0],o=[t.getXY()];if(C(e,o,1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(o[0]),n.outPoint.assign(o[0]),!0}else if(o===c.enumPoint&&2===t.getDimension()){const s=[2],o=[e.getXY()];if(C(t,o,1,this.m_tolerance,s),0!==s[0])return i.outPoint.assign(o[0]),n.outPoint.assign(o[0]),!0}if(s===c.enumMultiPoint&&2===e.getDimension())return this.multipointIntersectsArea(t,e,i,n);if(o===c.enumMultiPoint&&2===t.getDimension())return this.multipointIntersectsArea(e,t,n,i);let a,r,m=t,u=e;if(s===c.enumEnvelope&&(a=this.envelopeToPolygon(t),m=a,s=c.enumPolygon),o===c.enumEnvelope&&(r=this.envelopeToPolygon(e),u=r,o=c.enumPolygon),R(s)&&R(o)){const t=m.querySegmentIterator(),e=u.querySegmentIterator(),s=N(),o=N();if(k(m,u,t,e,s,o))return i.outPoint.assign(s.outPoint),n.outPoint.assign(s.outPoint),!0}}return!1}multipointIntersectsArea(t,e,i,n){return l(0),!1}getNearestNeighbourVisitor(t,e,i,n,s,o,a){return l(0),{}}buildSpatialTree(t,e){l(0)}}export{Z as G,K as a,j as m};