@arcgis/core 5.0.0-next.49 → 5.0.0-next.50

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 (558) hide show
  1. package/applications/Components/baUtils.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/0000781c850b1b4828b3.js +1 -0
  5. package/assets/esri/core/workers/chunks/00f044370bf3bb6b24d7.js +1 -0
  6. package/assets/esri/core/workers/chunks/0136cd1a5da204b6daeb.js +1 -0
  7. package/assets/esri/core/workers/chunks/044a0ccd89741c1ae770.js +1 -0
  8. package/assets/esri/core/workers/chunks/090dad5579f0148d6486.js +1 -0
  9. package/assets/esri/core/workers/chunks/09bd9bd37a339802907a.js +1 -0
  10. package/assets/esri/core/workers/chunks/0bc01d71ed1ab8c3af3c.js +1 -0
  11. package/assets/esri/core/workers/chunks/0d9904ba62558686c289.js +1 -0
  12. package/assets/esri/core/workers/chunks/0fcb40204db8ee5571c3.js +1 -0
  13. package/assets/esri/core/workers/chunks/1065fd655bb7cee243fd.js +1 -0
  14. package/assets/esri/core/workers/chunks/11ab10668632648b2ba7.js +1 -0
  15. package/assets/esri/core/workers/chunks/13167bdd486b41163147.js +1 -0
  16. package/assets/esri/core/workers/chunks/{d8db2c51b2fb42f37b2a.js → 1363345f31f4f5051132.js} +1 -1
  17. package/assets/esri/core/workers/chunks/13be94357dcf5afc4fcb.js +1 -0
  18. package/assets/esri/core/workers/chunks/{e66bcdfd75e0113d1cec.js → 13ce8e8d45779b11ee12.js} +1 -1
  19. package/assets/esri/core/workers/chunks/1693f19f1c37e0a2087e.js +1 -0
  20. package/assets/esri/core/workers/chunks/18ab5959ebf8689f8fe8.js +1 -0
  21. package/assets/esri/core/workers/chunks/18c4cd160a4052b05831.js +1 -0
  22. package/assets/esri/core/workers/chunks/1bf4b5e5402790ccb450.js +1 -0
  23. package/assets/esri/core/workers/chunks/1db058f91a8e17b24db6.js +1 -0
  24. package/assets/esri/core/workers/chunks/1dc3ab52fcde7bff0f23.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a7cd795042ebb8585906.js → 1f0c7ab33e466a37c7f9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/224f01b11fdba9250b1e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{a1a7b0e7ca488c895cb7.js → 22c115ec003351c7d8ee.js} +1 -1
  28. package/assets/esri/core/workers/chunks/24c35a46cf8ed11b774d.js +1 -0
  29. package/assets/esri/core/workers/chunks/27794d48c04a5875fd22.js +1 -0
  30. package/assets/esri/core/workers/chunks/294acaaebfedb05fe81e.js +1 -0
  31. package/assets/esri/core/workers/chunks/2a66841243975cac3e3c.js +1 -0
  32. package/assets/esri/core/workers/chunks/2c12848e4934e9bb2bd0.js +1 -0
  33. package/assets/esri/core/workers/chunks/2d61b6efa17e8c5832da.js +1 -0
  34. package/assets/esri/core/workers/chunks/2d6fa00273a73d44297d.js +1 -0
  35. package/assets/esri/core/workers/chunks/2da13c2269ab90281143.js +1 -0
  36. package/assets/esri/core/workers/chunks/2dfaead2ec6434513d45.js +1 -0
  37. package/assets/esri/core/workers/chunks/2fae37f34b28a46841e3.js +1 -0
  38. package/assets/esri/core/workers/chunks/{3298e96d3f2e49e338d2.js → 308fb48d080e01499a26.js} +1 -1
  39. package/assets/esri/core/workers/chunks/30dd4a7c93b33988a270.js +1 -0
  40. package/assets/esri/core/workers/chunks/355c8d0eadfff9f62dfb.js +1 -0
  41. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +1 -0
  42. package/assets/esri/core/workers/chunks/36a04be40369111a633d.js +1 -0
  43. package/assets/esri/core/workers/chunks/36d9208895abd1ba4ff1.js +1 -0
  44. package/assets/esri/core/workers/chunks/395a0773ccafd1f24c4d.js +1 -0
  45. package/assets/esri/core/workers/chunks/{81a60dfa600b690098f9.js → 3a612f873e29348370b2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3b1471f908fdecec2815.js +1 -0
  47. package/assets/esri/core/workers/chunks/{da1e61f355fb943085dc.js → 3c66dd52ad156711a6a2.js} +1 -1
  48. package/assets/esri/core/workers/chunks/3dd0db77a05263000bd8.js +1 -0
  49. package/assets/esri/core/workers/chunks/{08c1ea29678da27136f3.js → 44fb1184eeed0636704a.js} +1 -1
  50. package/assets/esri/core/workers/chunks/46d430a6983b81ba7556.js +1 -0
  51. package/assets/esri/core/workers/chunks/472d290f8eb1c1a85724.js +1 -0
  52. package/assets/esri/core/workers/chunks/47338472f5a8e004a671.js +1 -0
  53. package/assets/esri/core/workers/chunks/48b3906ac3ec57253d90.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2a41283bba2361afa1fd.js → 495af366ec1defd89a72.js} +1 -1
  55. package/assets/esri/core/workers/chunks/49b581782f63abb6dd9f.js +1 -0
  56. package/assets/esri/core/workers/chunks/49df576f0215618aa651.js +1 -0
  57. package/assets/esri/core/workers/chunks/4abe2c56aecc9e9b8e86.js +1 -0
  58. package/assets/esri/core/workers/chunks/4e01e509a761a9d00b52.js +1 -0
  59. package/assets/esri/core/workers/chunks/{9d0f0d055ec25af037e0.js → 51093e552e31344cefa5.js} +1 -1
  60. package/assets/esri/core/workers/chunks/521aac8a665e98e4ca78.js +1 -0
  61. package/assets/esri/core/workers/chunks/54666586754949bfa584.js +1 -0
  62. package/assets/esri/core/workers/chunks/549f4ab9e285deaf04fb.js +1 -0
  63. package/assets/esri/core/workers/chunks/553ca1e55e9f1359839c.js +1 -0
  64. package/assets/esri/core/workers/chunks/{6f3943bebe2d5f4994f7.js → 58242447b72cc60a5040.js} +1 -1
  65. package/assets/esri/core/workers/chunks/58419d362f24b35003c1.js +1 -0
  66. package/assets/esri/core/workers/chunks/5aa354854219361f722b.js +1 -0
  67. package/assets/esri/core/workers/chunks/{aab93e885b6c7c6aa76e.js → 5ce524e0060053f35592.js} +19 -19
  68. package/assets/esri/core/workers/chunks/5d244fcf5c075afccdc6.js +1 -0
  69. package/assets/esri/core/workers/chunks/5e9fdd4eff7189f45932.js +1 -0
  70. package/assets/esri/core/workers/chunks/60954ab810dbbf36e5e1.js +1 -0
  71. package/assets/esri/core/workers/chunks/62ed6b45482e39d67785.js +1 -0
  72. package/assets/esri/core/workers/chunks/63b8193ad90b2ebe6884.js +1 -0
  73. package/assets/esri/core/workers/chunks/63c91421a71ae3b3599e.js +1 -0
  74. package/assets/esri/core/workers/chunks/63cf702cde83692126be.js +1 -0
  75. package/assets/esri/core/workers/chunks/687d2b761dc5b5cf0c31.js +1 -0
  76. package/assets/esri/core/workers/chunks/6cfcfebe9a4c491e453a.js +1 -0
  77. package/assets/esri/core/workers/chunks/{88aa71f02f43bb069345.js → 7033fa18b7dd7bd3e49c.js} +1 -1
  78. package/assets/esri/core/workers/chunks/710b29729f252f11115d.js +1 -0
  79. package/assets/esri/core/workers/chunks/72a520802b8accfd4512.js +1 -0
  80. package/assets/esri/core/workers/chunks/{72fbee59d5d909615408.js → 73892ac79b24b05e6863.js} +1 -1
  81. package/assets/esri/core/workers/chunks/73c3ee2697265b0f7208.js +1 -0
  82. package/assets/esri/core/workers/chunks/73f9cbf0f919b6adc2d5.js +1 -0
  83. package/assets/esri/core/workers/chunks/75e9759290f0f67b2128.js +1 -0
  84. package/assets/esri/core/workers/chunks/7737e69da604d2521da8.js +1 -0
  85. package/assets/esri/core/workers/chunks/{8e8d5422f57269d8c8d2.js → 7891825d5cdca03d2db0.js} +1 -1
  86. package/assets/esri/core/workers/chunks/7cd0ab01933bfb2c6e43.js +1 -0
  87. package/assets/esri/core/workers/chunks/81c2cc77c275a5b555c0.js +1 -0
  88. package/assets/esri/core/workers/chunks/82ace0195b63790b22c9.js +1 -0
  89. package/assets/esri/core/workers/chunks/8892bf3d2367e35de001.js +1 -0
  90. package/assets/esri/core/workers/chunks/8a132d91077ecf849248.js +1 -0
  91. package/assets/esri/core/workers/chunks/8a6e50d95539b46f629c.js +1 -0
  92. package/assets/esri/core/workers/chunks/8d941204425571b656ec.js +1 -0
  93. package/assets/esri/core/workers/chunks/914746077017fa50933f.js +1 -0
  94. package/assets/esri/core/workers/chunks/{004c2a1a37b99a184b13.js → 91fba3bebd78cb956941.js} +1 -1
  95. package/assets/esri/core/workers/chunks/92ec96aa743cabc9475d.js +1 -0
  96. package/assets/esri/core/workers/chunks/{5b290d18de61789417f9.js → 9361834d2c3064eb41fc.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{44f036cc21e3a2308f69.js → 93b139be6488a1b4ba19.js} +1 -1
  98. package/assets/esri/core/workers/chunks/95057105f1b3bf805140.js +1 -0
  99. package/assets/esri/core/workers/chunks/968335b28b895e19913b.js +1 -0
  100. package/assets/esri/core/workers/chunks/973bf2ed34d57f299472.js +1 -0
  101. package/assets/esri/core/workers/chunks/9b6e2099aabf67b9f9f2.js +1 -0
  102. package/assets/esri/core/workers/chunks/{97b01803d0c38541aa08.js → 9c93eadbd19bef1191b4.js} +1 -1
  103. package/assets/esri/core/workers/chunks/a1594486177015e8a6c3.js +1 -0
  104. package/assets/esri/core/workers/chunks/{df458ad51be27df3d79d.js → a1f264abbd6354c333bf.js} +1 -1
  105. package/assets/esri/core/workers/chunks/a3407ca77b0ff62c0e75.js +1 -0
  106. package/assets/esri/core/workers/chunks/{8be61e13530fd0dc2fd1.js → a4f89568205d78d91cfe.js} +1 -1
  107. package/assets/esri/core/workers/chunks/a5e7c9517939f762c518.js +1 -0
  108. package/assets/esri/core/workers/chunks/a63ff3e9a9f3853d12f3.js +1 -0
  109. package/assets/esri/core/workers/chunks/a81a7cba815adb575c36.js +1 -0
  110. package/assets/esri/core/workers/chunks/{fe6fa1f2c2d54d41645e.js → a8dfd246c797f3b979f5.js} +1 -1
  111. package/assets/esri/core/workers/chunks/a8f7e44657083f6aa3fd.js +1 -0
  112. package/assets/esri/core/workers/chunks/a8fd635d1165db8616ab.js +1 -0
  113. package/assets/esri/core/workers/chunks/a92c1171314a68504c1b.js +1 -0
  114. package/assets/esri/core/workers/chunks/aa297e0931213341f51b.js +1 -0
  115. package/assets/esri/core/workers/chunks/aa7a1705266eec353cb6.js +1 -0
  116. package/assets/esri/core/workers/chunks/ab5e2f823960c33cefe4.js +1 -0
  117. package/assets/esri/core/workers/chunks/{f11453f24c0b728669d2.js → ac6f002cfad42e60de8f.js} +1 -1
  118. package/assets/esri/core/workers/chunks/b11c0e80e583f2b7c5de.js +1 -0
  119. package/assets/esri/core/workers/chunks/b14f9a46e583e1625a2b.js +1 -0
  120. package/assets/esri/core/workers/chunks/{8c271e9272e4eaf1325a.js → b1d3d2c93c189e215f67.js} +1 -1
  121. package/assets/esri/core/workers/chunks/b2425f6af7df6902dfc4.js +1 -0
  122. package/assets/esri/core/workers/chunks/b638ce18b93d3cfb9967.js +1 -0
  123. package/assets/esri/core/workers/chunks/b648a1e641cf5c772d67.js +1 -0
  124. package/assets/esri/core/workers/chunks/{1c58064ea80e6a4a4a3b.js → b907d16e82ac908bb896.js} +1 -1
  125. package/assets/esri/core/workers/chunks/b91c13f44f4d1bac5799.js +1 -0
  126. package/assets/esri/core/workers/chunks/ba7e97b1e324118b8156.js +1 -0
  127. package/assets/esri/core/workers/chunks/bb4aefaf9b0327dda738.js +1 -0
  128. package/assets/esri/core/workers/chunks/{9664d9e679abc41f6c42.js → bce81df760f5e34c01d7.js} +1 -1
  129. package/assets/esri/core/workers/chunks/be6a05d5375e80968877.js +1 -0
  130. package/assets/esri/core/workers/chunks/c02b09f16241db233103.js +1 -0
  131. package/assets/esri/core/workers/chunks/c09cba77ee60a3d765e2.js +1 -0
  132. package/assets/esri/core/workers/chunks/c0d6336c10b4081c4e32.js +1 -0
  133. package/assets/esri/core/workers/chunks/c27842a34e73ccb46116.js +1 -0
  134. package/assets/esri/core/workers/chunks/c7802c144959d60e774a.js +1 -0
  135. package/assets/esri/core/workers/chunks/c91201b37d1cb3875fb4.js +1 -0
  136. package/assets/esri/core/workers/chunks/cc4ae105e727d9211d82.js +1 -0
  137. package/assets/esri/core/workers/chunks/cd39a53ef74f47604977.js +1 -0
  138. package/assets/esri/core/workers/chunks/d22e0d733bfe821c0510.js +1 -0
  139. package/assets/esri/core/workers/chunks/{d7878fba02814adaf19f.js → d57577c02fb2932e8305.js} +1 -1
  140. package/assets/esri/core/workers/chunks/d62193323c67b379dee3.js +1 -0
  141. package/assets/esri/core/workers/chunks/d7a62504e00989202c45.js +1 -0
  142. package/assets/esri/core/workers/chunks/{adfe28c1c1619cdd3ca1.js → d8511e71c5108a0ba9eb.js} +2 -2
  143. package/assets/esri/core/workers/chunks/da922e861d5845ae0979.js +1 -0
  144. package/assets/esri/core/workers/chunks/dbe55d4731227d6e9571.js +1 -0
  145. package/assets/esri/core/workers/chunks/de05c59da6d67716795d.js +1 -0
  146. package/assets/esri/core/workers/chunks/de60421029fbcebe2950.js +1 -0
  147. package/assets/esri/core/workers/chunks/e00d56ae5e68267fe269.js +1 -0
  148. package/assets/esri/core/workers/chunks/{fecae7495e53bb05f282.js → e25be3b6b67ce6b03011.js} +1 -1
  149. package/assets/esri/core/workers/chunks/e2973e5626e5039209f9.js +1 -0
  150. package/assets/esri/core/workers/chunks/e2c7c269be93c552dc5b.js +1 -0
  151. package/assets/esri/core/workers/chunks/e4d593ddcbcf06010ab0.js +1 -0
  152. package/assets/esri/core/workers/chunks/e5ac9b048b16fef9840c.js +1 -0
  153. package/assets/esri/core/workers/chunks/{f7163048146ddaedfc36.js → e668ddc7332e5e560e78.js} +1 -1
  154. package/assets/esri/core/workers/chunks/e6bab7b739bfbb39f6cd.js +1 -0
  155. package/assets/esri/core/workers/chunks/{8b578ffc3a83089aa782.js → e7c08a03772f7fccd949.js} +1 -1
  156. package/assets/esri/core/workers/chunks/e8e4d48ab4024e17108d.js +1 -0
  157. package/assets/esri/core/workers/chunks/e9e0f1c355f963cbea74.js +1 -0
  158. package/assets/esri/core/workers/chunks/ec7e6427d99cf3148a61.js +1 -0
  159. package/assets/esri/core/workers/chunks/edd3cf415955309b4ca4.js +1 -0
  160. package/assets/esri/core/workers/chunks/ee361690b456c12c30d8.js +1 -0
  161. package/assets/esri/core/workers/chunks/efa95c50d1ed8e74219f.js +1 -0
  162. package/assets/esri/core/workers/chunks/f142c5cbdd16f1768275.js +1 -0
  163. package/assets/esri/core/workers/chunks/f286f13686f003c5eec5.js +1 -0
  164. package/assets/esri/core/workers/chunks/f379fd459a103f42d447.js +1 -0
  165. package/assets/esri/core/workers/chunks/{f2ba50eb29f93df885d6.js → f3d8d5fe15501220792d.js} +1 -1
  166. package/assets/esri/core/workers/chunks/f56906c443ce8ff68a27.js +1 -0
  167. package/assets/esri/core/workers/chunks/fb6670a929b7333f1764.js +1 -0
  168. package/assets/esri/core/workers/chunks/fbdf553253cf8f22c022.js +1 -0
  169. package/assets/esri/core/workers/chunks/fc10c738bae304721ab2.js +1 -0
  170. package/assets/esri/core/workers/chunks/ff79c2cb28db7e0a1fc4.js +1 -0
  171. package/assets/esri/core/workers/chunks/ffdf1cbc1e54414d0f96.js +1 -0
  172. package/assets/esri/themes/base/widgets/_Attribution.scss +7 -4
  173. package/assets/esri/themes/dark/main.css +1 -1
  174. package/assets/esri/themes/light/main.css +1 -1
  175. package/assets/esri/themes/light/view.css +1 -1
  176. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  177. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  178. package/chunks/Envelope.js +1 -1
  179. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  180. package/chunks/GeodeticUtils.js +1 -1
  181. package/chunks/Geometry.js +1 -1
  182. package/chunks/MultiPathImpl.js +1 -1
  183. package/chunks/OperatorCrosses.js +1 -1
  184. package/chunks/OperatorCut.js +1 -1
  185. package/chunks/OperatorGeodesicBuffer.js +1 -1
  186. package/chunks/OperatorGeodeticArea.js +1 -1
  187. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  188. package/chunks/OperatorGeodeticLength.js +1 -1
  189. package/chunks/OperatorIntersects.js +1 -1
  190. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  191. package/chunks/OperatorOverlaps.js +1 -1
  192. package/chunks/OperatorProject.js +1 -1
  193. package/chunks/OperatorProximity.js +1 -1
  194. package/chunks/OperatorProximityGeodesic.js +1 -1
  195. package/chunks/OperatorShapePreservingLength.js +1 -1
  196. package/chunks/OperatorShapePreservingProject.js +1 -1
  197. package/chunks/OperatorSimplifyOGC.js +1 -1
  198. package/chunks/OperatorTouches.js +1 -1
  199. package/chunks/OperatorWithin.js +1 -1
  200. package/chunks/Point2D.js +1 -1
  201. package/chunks/ProjectionTransformation.js +1 -1
  202. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  203. package/chunks/SpatialReference.js +1 -1
  204. package/chunks/boundedPlane.js +1 -1
  205. package/chunks/containsOperator.js +1 -1
  206. package/chunks/disjointOperator.js +1 -1
  207. package/chunks/equalsOperator.js +1 -1
  208. package/chunks/pe.js +1 -1
  209. package/chunks/relateOperator.js +1 -1
  210. package/config.js +1 -1
  211. package/core/units.js +1 -1
  212. package/core/workers/workerFactory.js +1 -1
  213. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  214. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  215. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  216. package/geometry/FlatGeometry.js +1 -1
  217. package/geometry/GeometryCursor.js +1 -1
  218. package/geometry/operators/containsOperator.js +1 -1
  219. package/geometry/operators/disjointOperator.js +1 -1
  220. package/geometry/operators/gx/geodeticUtils.js +1 -1
  221. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  222. package/geometry/operators/gx/operatorBuffer.js +1 -1
  223. package/geometry/operators/gx/operatorDifference.js +1 -1
  224. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  225. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  226. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  227. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  228. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  229. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  230. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  231. package/geometry/operators/gx/operatorIntersection.js +1 -1
  232. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  233. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  234. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  235. package/geometry/operators/gx/operatorProject.js +1 -1
  236. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  237. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  238. package/geometry/operators/gx/operatorSimplify.js +1 -1
  239. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  240. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  241. package/geometry/operators/gx/operatorUnion.js +1 -1
  242. package/geometry/operators/json/containsOperator.js +1 -1
  243. package/geometry/operators/json/disjointOperator.js +1 -1
  244. package/geometry/operators/json/projectOperator.js +1 -1
  245. package/geometry/operators/projectOperator.js +1 -1
  246. package/geometry/operators/reshapeOperator.js +1 -1
  247. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  248. package/geometry/operators/support/initNoPeFactory.js +1 -1
  249. package/geometry/operators/support/jsonConverter.js +1 -1
  250. package/geometry/operators/support/projectionTransformation.js +1 -1
  251. package/geometry/operators/support/projectionZScaling.js +5 -0
  252. package/geometry/projection/projectPointToVector.js +1 -1
  253. package/geometry/projectionUtils.js +1 -1
  254. package/geometry/support/boundedPlane.js +1 -1
  255. package/geometry/support/jsonTypeUtils.js +5 -0
  256. package/geometry/support/jsonUtils.js +1 -1
  257. package/geometry/support/normalizeUtilsCommon.js +1 -1
  258. package/geometry/support/normalizeUtilsSync.js +1 -1
  259. package/geometry/support/quantizationUtils.js +1 -1
  260. package/geometry/support/zscale.js +1 -1
  261. package/interfaces.d.ts +84 -17
  262. package/kernel.js +1 -1
  263. package/layers/SceneLayer.js +1 -1
  264. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  265. package/layers/graphics/data/QueryEngine.js +1 -1
  266. package/layers/graphics/data/queryUtils.js +1 -1
  267. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  268. package/layers/graphics/featureConversionUtils.js +1 -1
  269. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  270. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  271. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  272. package/layers/mixins/ArcGISMapService.js +1 -1
  273. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  274. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  275. package/layers/orientedImagery/transformations/utils.js +1 -1
  276. package/layers/support/ControlPointsGeoreference.js +1 -1
  277. package/layers/support/Sublayer.js +1 -1
  278. package/package.json +4 -4
  279. package/renderers/support/DictionaryLoader.js +1 -1
  280. package/renderers/support/pointCloud/PointSizeFixedSizeAlgorithm.js +1 -1
  281. package/renderers/support/pointCloud/PointSizeSplatAlgorithm.js +1 -1
  282. package/rest/geometryService/cut.js +1 -1
  283. package/rest/geometryService/difference.js +1 -1
  284. package/rest/geometryService/intersect.js +1 -1
  285. package/rest/geometryService/project.js +1 -1
  286. package/rest/geometryService/reshape.js +1 -1
  287. package/rest/geometryService/simplify.js +1 -1
  288. package/rest/geometryService/utils.js +1 -1
  289. package/rest/knowledgeGraph/DataModel.js +1 -1
  290. package/rest/operations/generalize.js +1 -1
  291. package/rest/operations/identify.js +1 -1
  292. package/rest/operations/offset.js +1 -1
  293. package/rest/operations/relation.js +1 -1
  294. package/rest/query/operations/queryAttributeBins.js +1 -1
  295. package/rest/query/operations/queryTopFeatures.js +1 -1
  296. package/rest/query/operations/queryUtils.js +1 -1
  297. package/rest/support/BaseImageMeasureResultValue.js +1 -1
  298. package/rest/support/BufferParameters.js +1 -1
  299. package/rest/support/DensifyParameters.js +1 -1
  300. package/rest/support/DistanceParameters.js +1 -1
  301. package/rest/support/FeatureSet.js +1 -1
  302. package/rest/support/IdentifyParameters.js +1 -1
  303. package/rest/support/ImageAreaParameters.js +1 -1
  304. package/rest/support/ImageDistanceParameters.js +1 -1
  305. package/rest/support/ImageGPSInfoParameters.js +1 -1
  306. package/rest/support/ImageHeightParameters.js +1 -1
  307. package/rest/support/ImageHistogramParameters.js +1 -1
  308. package/rest/support/ImageIdentifyParameters.js +1 -1
  309. package/rest/support/ImageMeasureResultAngleValue.js +1 -1
  310. package/rest/support/ImageMeasureResultAreaValue.js +1 -1
  311. package/rest/support/ImageMeasureResultLengthValue.js +1 -1
  312. package/rest/support/ImagePointParameters.js +1 -1
  313. package/rest/support/ImageSampleParameters.js +1 -1
  314. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  315. package/rest/support/ImageToMapParameters.js +1 -1
  316. package/rest/support/ImageVolumeParameters.js +1 -1
  317. package/rest/support/MapToImageParameters.js +1 -1
  318. package/rest/support/MeasureFromImageParameters.js +1 -1
  319. package/rest/support/ProjectParameters.js +1 -1
  320. package/support/modeUtils.js +1 -1
  321. package/support/revision.js +1 -1
  322. package/support/tests/serviceMockDependencies.js +1 -1
  323. package/symbols/MarkerSymbol.js +1 -1
  324. package/symbols/PictureMarkerSymbol.js +1 -1
  325. package/symbols/SimpleFillSymbol.js +1 -1
  326. package/symbols/SimpleMarkerSymbol.js +1 -1
  327. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  328. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  329. package/symbols/cim/SDFHelper.js +1 -1
  330. package/symbols/cim/effects/EffectOffset.js +1 -1
  331. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  332. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  333. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  334. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  335. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  336. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  337. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  338. package/views/2d/layers/MediaLayerView2D.js +1 -1
  339. package/views/2d/layers/TileLayerView2D.js +1 -1
  340. package/views/2d/layers/features/support/GraphicsReader.js +1 -1
  341. package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
  342. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  343. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  344. package/views/3d/analysis/ShadowCast/analysisViewRegister.js +5 -0
  345. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  346. package/views/3d/analysis/Slice/SliceController.js +1 -1
  347. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  348. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  349. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  350. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  351. package/views/3d/analysis/support/projectionUtils.js +1 -1
  352. package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
  353. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  354. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  355. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  356. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  357. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  358. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  359. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  360. package/views/3d/layers/RouteLayerView3D.js +1 -1
  361. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  362. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  363. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  364. package/views/3d/layers/support/featureReference.js +1 -1
  365. package/views/3d/state/ScreenSizePerspective.js +1 -1
  366. package/views/3d/support/ViewSlice.js +1 -1
  367. package/views/3d/support/cameraUtils.js +1 -1
  368. package/views/3d/support/viewpointUtils.js +1 -1
  369. package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
  370. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  371. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  372. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  373. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  374. package/views/Attribution.js +1 -1
  375. package/views/DOMContainer.js +1 -1
  376. package/views/PopupView.js +1 -1
  377. package/views/SceneView.js +1 -1
  378. package/views/VideoView.js +1 -1
  379. package/views/View.js +1 -1
  380. package/views/View2D.js +1 -1
  381. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  382. package/views/draw/DrawAction.js +1 -1
  383. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  384. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  385. package/views/layers/CatalogFootprintLayerView.js +1 -1
  386. package/views/layers/LayerView.js +1 -1
  387. package/views/support/attributionUtils.js +1 -1
  388. package/views/support/projectionUtils.js +1 -1
  389. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  390. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  391. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  392. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  393. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  394. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  395. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  396. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  397. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  398. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  399. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  400. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +5 -0
  401. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +5 -0
  402. package/widgets/OrientedImageryViewer/support/urlUtils.js +5 -0
  403. package/widgets/OrientedImageryViewer/utils.js +1 -1
  404. package/widgets/OrientedImageryViewer.js +1 -1
  405. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  406. package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
  407. package/widgets/PanoramicViewer/utils.js +1 -1
  408. package/widgets/PanoramicViewer.js +1 -1
  409. package/widgets/Slice.js +1 -1
  410. package/widgets/Swipe/SwipeViewModel.js +1 -1
  411. package/widgets/TimeSlider.js +1 -1
  412. package/widgets/Track.js +1 -1
  413. package/widgets/UtilityNetworkAssociations.js +1 -1
  414. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  415. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  416. package/widgets/Weather.js +1 -1
  417. package/widgets/support/GridControls.js +1 -1
  418. package/widgets/support/SnappingControls.js +1 -1
  419. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  420. package/assets/esri/core/workers/chunks/00ff4ca88c9d291d82c3.js +0 -1
  421. package/assets/esri/core/workers/chunks/0271a2ca4e9b1e4fd284.js +0 -1
  422. package/assets/esri/core/workers/chunks/02a65563779b4c64b2cf.js +0 -1
  423. package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +0 -1
  424. package/assets/esri/core/workers/chunks/05b7720ab6bf0874f27c.js +0 -1
  425. package/assets/esri/core/workers/chunks/061def9163a09c804b5c.js +0 -1
  426. package/assets/esri/core/workers/chunks/06221ebadab32111e2c6.js +0 -1
  427. package/assets/esri/core/workers/chunks/063045ac5553e91c0c4c.js +0 -1
  428. package/assets/esri/core/workers/chunks/06d52a570d5d44f8c86e.js +0 -1
  429. package/assets/esri/core/workers/chunks/0a58b57e1777a8b0ea23.js +0 -1
  430. package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +0 -1
  431. package/assets/esri/core/workers/chunks/103153951ba312dc5e9e.js +0 -1
  432. package/assets/esri/core/workers/chunks/169be08394c5e7703628.js +0 -1
  433. package/assets/esri/core/workers/chunks/1a6f3531ef3d671e0289.js +0 -1
  434. package/assets/esri/core/workers/chunks/1c816aff8613d1e4bf38.js +0 -1
  435. package/assets/esri/core/workers/chunks/1e2d42e9984ed3437ba2.js +0 -1
  436. package/assets/esri/core/workers/chunks/2008b22f76071a2dde4e.js +0 -1
  437. package/assets/esri/core/workers/chunks/20e4243ea563d05a5256.js +0 -1
  438. package/assets/esri/core/workers/chunks/2107c93d1fe87f3b8dfa.js +0 -1
  439. package/assets/esri/core/workers/chunks/21f37a4b8d1857369203.js +0 -1
  440. package/assets/esri/core/workers/chunks/229e1ed4282005aa0b83.js +0 -1
  441. package/assets/esri/core/workers/chunks/22b8eaa6afab0e5ffc47.js +0 -1
  442. package/assets/esri/core/workers/chunks/231c0b583fa97f2ca675.js +0 -1
  443. package/assets/esri/core/workers/chunks/233f9eb617f3d72995b5.js +0 -1
  444. package/assets/esri/core/workers/chunks/2463cebf904a3c46c639.js +0 -1
  445. package/assets/esri/core/workers/chunks/249504f7d356be80d214.js +0 -1
  446. package/assets/esri/core/workers/chunks/2550d2ba935cfdf30236.js +0 -1
  447. package/assets/esri/core/workers/chunks/273ac1066095d63d6a6f.js +0 -1
  448. package/assets/esri/core/workers/chunks/28db329528def851efd7.js +0 -1
  449. package/assets/esri/core/workers/chunks/2de32649f8b0c6404d7c.js +0 -1
  450. package/assets/esri/core/workers/chunks/2e2867bc66c94aba7dc7.js +0 -1
  451. package/assets/esri/core/workers/chunks/30c4af16e3a2acc25589.js +0 -1
  452. package/assets/esri/core/workers/chunks/32d32d3c3b38a215d20d.js +0 -1
  453. package/assets/esri/core/workers/chunks/3386d4392f465b807b94.js +0 -1
  454. package/assets/esri/core/workers/chunks/34613b288cf174983f8b.js +0 -1
  455. package/assets/esri/core/workers/chunks/35f086a2ae0585348ae6.js +0 -1
  456. package/assets/esri/core/workers/chunks/37ea150dec5e491f691e.js +0 -1
  457. package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +0 -1
  458. package/assets/esri/core/workers/chunks/3c94db7ecdcd38eeb1b1.js +0 -1
  459. package/assets/esri/core/workers/chunks/3f7749f06ae54a4437d9.js +0 -1
  460. package/assets/esri/core/workers/chunks/40a722933af28823953b.js +0 -1
  461. package/assets/esri/core/workers/chunks/444026d1938c1078ca97.js +0 -1
  462. package/assets/esri/core/workers/chunks/44f759d723ae05bb1b19.js +0 -1
  463. package/assets/esri/core/workers/chunks/456684b1c1417ed0e611.js +0 -1
  464. package/assets/esri/core/workers/chunks/48e2737182c75005fb8f.js +0 -1
  465. package/assets/esri/core/workers/chunks/48f805929fe6241952f5.js +0 -1
  466. package/assets/esri/core/workers/chunks/4a48b8ec5f3f2fd139b5.js +0 -1
  467. package/assets/esri/core/workers/chunks/4b084f985bc4100e7aec.js +0 -1
  468. package/assets/esri/core/workers/chunks/4b1de1fcd13677b615a8.js +0 -1
  469. package/assets/esri/core/workers/chunks/4d933de84afb2e3b7d18.js +0 -1
  470. package/assets/esri/core/workers/chunks/4f0de45a0a295d66d446.js +0 -1
  471. package/assets/esri/core/workers/chunks/4ff771942531fb2755c4.js +0 -1
  472. package/assets/esri/core/workers/chunks/513a4ef960e27500f986.js +0 -1
  473. package/assets/esri/core/workers/chunks/56b693baa376bb990925.js +0 -1
  474. package/assets/esri/core/workers/chunks/57fd5e1260269002d18a.js +0 -1
  475. package/assets/esri/core/workers/chunks/5b73c77587772120b209.js +0 -1
  476. package/assets/esri/core/workers/chunks/5fe40bb0e9ab333f6854.js +0 -1
  477. package/assets/esri/core/workers/chunks/61373d2fa7e7638d3395.js +0 -1
  478. package/assets/esri/core/workers/chunks/6202922b1c2637e9aaa5.js +0 -1
  479. package/assets/esri/core/workers/chunks/633368ae6fbb46373328.js +0 -1
  480. package/assets/esri/core/workers/chunks/6d0fe4db6b94f3d2c53a.js +0 -1
  481. package/assets/esri/core/workers/chunks/6d702cb26cef46a76963.js +0 -1
  482. package/assets/esri/core/workers/chunks/6e8925412fb90f88d688.js +0 -1
  483. package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +0 -1
  484. package/assets/esri/core/workers/chunks/708aba69a1870ea41a61.js +0 -1
  485. package/assets/esri/core/workers/chunks/74b1028e95f7cfff387b.js +0 -1
  486. package/assets/esri/core/workers/chunks/755ce019c97f5d527772.js +0 -1
  487. package/assets/esri/core/workers/chunks/780f60210878a8286633.js +0 -1
  488. package/assets/esri/core/workers/chunks/78fccea3445fb2f9120a.js +0 -1
  489. package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +0 -1
  490. package/assets/esri/core/workers/chunks/7eab0bb42f9f062522ef.js +0 -1
  491. package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +0 -1
  492. package/assets/esri/core/workers/chunks/82ba4140e30f083fbc87.js +0 -1
  493. package/assets/esri/core/workers/chunks/833fd2bc42c5cb459084.js +0 -1
  494. package/assets/esri/core/workers/chunks/83c8e5a92d8d6193cb32.js +0 -1
  495. package/assets/esri/core/workers/chunks/83da9ee6544ee9d3c124.js +0 -1
  496. package/assets/esri/core/workers/chunks/870022661376442411e4.js +0 -1
  497. package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +0 -1
  498. package/assets/esri/core/workers/chunks/898ab7db220e81e921c6.js +0 -1
  499. package/assets/esri/core/workers/chunks/8b75861196d1ce5cba63.js +0 -1
  500. package/assets/esri/core/workers/chunks/8c07396e9ea3007d6404.js +0 -1
  501. package/assets/esri/core/workers/chunks/8e26831f71634288f834.js +0 -1
  502. package/assets/esri/core/workers/chunks/8ec238b5b59ef18a1713.js +0 -1
  503. package/assets/esri/core/workers/chunks/90b8ccee883738917a6d.js +0 -1
  504. package/assets/esri/core/workers/chunks/90bc9c299ae0e8b8b5e5.js +0 -1
  505. package/assets/esri/core/workers/chunks/9100330ed4b4437c819d.js +0 -1
  506. package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +0 -1
  507. package/assets/esri/core/workers/chunks/934bc1028b287f8df4aa.js +0 -1
  508. package/assets/esri/core/workers/chunks/94dc8b0fa129f1e168c4.js +0 -1
  509. package/assets/esri/core/workers/chunks/96055de47831e59a28bf.js +0 -1
  510. package/assets/esri/core/workers/chunks/963ba863e0f87abfca25.js +0 -1
  511. package/assets/esri/core/workers/chunks/987e19af8a525e77883f.js +0 -1
  512. package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +0 -1
  513. package/assets/esri/core/workers/chunks/9aa8d60483ad905fe13b.js +0 -1
  514. package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +0 -1
  515. package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +0 -1
  516. package/assets/esri/core/workers/chunks/9fed9946241bb2a5cfa4.js +0 -1
  517. package/assets/esri/core/workers/chunks/a2662e98857f0abf8e82.js +0 -1
  518. package/assets/esri/core/workers/chunks/a59dab47a58695c639da.js +0 -1
  519. package/assets/esri/core/workers/chunks/a5a9b0a35849b9f2e86d.js +0 -1
  520. package/assets/esri/core/workers/chunks/a60006c9ccf6817fc0d2.js +0 -1
  521. package/assets/esri/core/workers/chunks/a627b7eb94b7fca33210.js +0 -1
  522. package/assets/esri/core/workers/chunks/a651dc3b8f1fc1ab34cc.js +0 -1
  523. package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +0 -1
  524. package/assets/esri/core/workers/chunks/af663e81c851bcf142f1.js +0 -1
  525. package/assets/esri/core/workers/chunks/af8d6e6949930d0e6c7b.js +0 -1
  526. package/assets/esri/core/workers/chunks/b59be95949445ff5afab.js +0 -1
  527. package/assets/esri/core/workers/chunks/b6dec5dfdeca54bae88d.js +0 -1
  528. package/assets/esri/core/workers/chunks/b88dc7d8ae105747e6a4.js +0 -1
  529. package/assets/esri/core/workers/chunks/b90c786dd474ea1a409c.js +0 -1
  530. package/assets/esri/core/workers/chunks/b92e9e5df8154a128982.js +0 -1
  531. package/assets/esri/core/workers/chunks/bbdfa8ffcf084cbd9938.js +0 -1
  532. package/assets/esri/core/workers/chunks/bff814d34b38ec80c44d.js +0 -1
  533. package/assets/esri/core/workers/chunks/c36d699a75b6e8fb93eb.js +0 -1
  534. package/assets/esri/core/workers/chunks/c50fdf723f2d4316862e.js +0 -1
  535. package/assets/esri/core/workers/chunks/c5e8ff4721b15ac3c6eb.js +0 -1
  536. package/assets/esri/core/workers/chunks/ca61077e0a598654f33f.js +0 -1
  537. package/assets/esri/core/workers/chunks/ca81be5bdb88ef557bf3.js +0 -1
  538. package/assets/esri/core/workers/chunks/ced12ad98f8f48d0dc00.js +0 -1
  539. package/assets/esri/core/workers/chunks/d0320ca67abca4f8b0d2.js +0 -1
  540. package/assets/esri/core/workers/chunks/d561624ddb9388732b25.js +0 -1
  541. package/assets/esri/core/workers/chunks/d5fd6d0eaf96edfab123.js +0 -1
  542. package/assets/esri/core/workers/chunks/d705410c369bd03b1875.js +0 -1
  543. package/assets/esri/core/workers/chunks/d82e17522ed946c2d809.js +0 -1
  544. package/assets/esri/core/workers/chunks/dc29cb16704e2e4d0a46.js +0 -1
  545. package/assets/esri/core/workers/chunks/dc5075b2326c79130baa.js +0 -1
  546. package/assets/esri/core/workers/chunks/dd105d6e0fcedee32644.js +0 -1
  547. package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +0 -1
  548. package/assets/esri/core/workers/chunks/e1148067ceae7d9eaaf8.js +0 -1
  549. package/assets/esri/core/workers/chunks/e5a6a646f27715152714.js +0 -1
  550. package/assets/esri/core/workers/chunks/e8c2e2fbe9cef4c8a8c6.js +0 -1
  551. package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +0 -1
  552. package/assets/esri/core/workers/chunks/f693a4d97b2762d0e6ff.js +0 -1
  553. package/assets/esri/core/workers/chunks/f7f53567b0c5b35d6aea.js +0 -1
  554. package/assets/esri/core/workers/chunks/f92a78ce5510e0d0d0f7.js +0 -1
  555. package/assets/esri/core/workers/chunks/fb76b43181077c55a207.js +0 -1
  556. package/assets/esri/core/workers/chunks/fc61443546f21869f8ba.js +0 -1
  557. package/assets/esri/core/workers/chunks/fdaa10a588db394e2f65.js +0 -1
  558. package/chunks/UnitFactory.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../core/has.js";import s from"../core/Logger.js";import{acosClamped as t}from"../core/mathUtils.js";import{ObjectStack as i}from"../core/ObjectStack.js";import{invert as n,transpose as r,fromRotation as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as a,j as c,i as u,h as g,D as b,b as f,E as p,g as l,e as m,m as d,p as j,F as h,n as I}from"./vec32.js";import{fromValues as y,clone as v,create as P}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as N}from"../geometry/support/aaBoundingRect.js";import{projectPointClamp as w,distance2 as x,create as M}from"../geometry/support/lineSegment.js";import{create as S,wrap as T,copy as V,fromVectorsAndPoint as A,fromValues as E,intersectRay as _,intersectLineSegment as O,intersectLineSegmentClamp as F,isPointInside as k,projectPoint as R,getNormal as q,setOffsetFromPoint as B}from"../geometry/support/plane.js";import{distance2 as C}from"../geometry/support/ray.js";import{projectPointSignedLength as Y}from"../geometry/support/vector.js";import{sv3d as L}from"../geometry/support/vectorStacks.js";const U=()=>s.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function z(s=Ns){return{plane:S(s.plane),origin:v(s.origin),basis1:v(s.basis1),basis2:v(s.basis2)}}function D(s,t,i){const n=Ss.get();return n.origin=s,n.basis1=t,n.basis2=i,n.plane=T(0,0,0,0),J(n),n}function G(s,t=z()){return H(s.origin,s.basis1,s.basis2,t)}function W(s,t){a(t.origin,s.origin),a(t.basis1,s.basis1),a(t.basis2,s.basis2),V(t.plane,s.plane)}function H(s,t,i,n=z()){return a(n.origin,s),a(n.basis1,t),a(n.basis2,i),J(n),vs(n,"fromValues()"),n}function J(s){A(s.basis2,s.basis1,s.origin,s.plane)}function K(s,t,i){s!==i&&G(s,i);const n=c(L.get(),ds(s),t);return u(i.origin,i.origin,n),i.plane[3]-=t,i}function Q(s,t,i){return Z(t,i),K(i,bs(s,s.origin),i),i}function X(s,t){const i=s.basis1[0],n=s.basis2[1],[r,e]=s.origin;return N(r-i,e-n,r+i,e+n,t)}function Z(s,t=z()){const i=(s[2]-s[0])/2,n=(s[3]-s[1])/2;return g(t.origin,s[0]+i,s[1]+n,0),g(t.basis1,i,0,0),g(t.basis2,0,n,0),E(0,0,1,0,t.plane),t}function $(s,t,i){return!!_(s.plane,t,i)&&hs(s,i)}function ss(s,t,i){if($(s,t,i))return i;const n=ts(s,t,L.get());return u(i,t.origin,c(L.get(),t.direction,b(t.origin,n)/f(t.direction))),i}function ts(s,i,n){const r=ws.get();Ps(s,i,r,ws.get());let e=Number.POSITIVE_INFINITY;for(const o of Ts){const c=ys(s,o,xs.get()),u=L.get();if(O(r,c,u)){const s=p(L.get(),i.origin,u),r=Math.abs(t(l(i.direction,s)));r<e&&(e=r,a(n,u))}}return e===Number.POSITIVE_INFINITY?ns(s,i,n):n}function is(s,t){return(t-s)/t}function ns(s,t,i){if($(s,t,i))return i;const n=ws.get(),r=ws.get();Ps(s,t,n,r);let e=Number.POSITIVE_INFINITY;for(const o of Ts){const c=ys(s,o,xs.get()),u=L.get();if(F(n,c,u)){const s=C(t,u);if(!k(r,u))continue;s<e&&(e=s,a(i,u))}}return os(s,t.origin)<e&&rs(s,t.origin,i),i}function rs(s,t,i){const n=R(s.plane,t,L.get()),r=w(Is(s,s.basis1),n,-1,1,L.get()),e=w(Is(s,s.basis2),n,-1,1,L.get());return m(i,u(L.get(),r,e),s.origin),i}function es(s,t,i){const{origin:n,basis1:r,basis2:e}=s,o=m(L.get(),t,n),a=Y(r,o),c=Y(e,o),u=Y(ds(s),o);return g(i,a,c,u)}function os(s,t){const i=es(s,t,L.get()),{basis1:n,basis2:r}=s,e=f(n),o=f(r),a=Math.max(Math.abs(i[0])-e,0),c=Math.max(Math.abs(i[1])-o,0),u=i[2];return a*a+c*c+u*u}function as(s,t){return Math.sqrt(os(s,t))}function cs(s,t){let i=Number.NEGATIVE_INFINITY;for(const n of Ts){const r=ys(s,n,xs.get()),e=x(r,t);e>i&&(i=e)}return Math.sqrt(i)}function us(s,t){return k(s.plane,t)&&hs(s,t)}function gs(s,t,i,n){return js(s,i,n)}function bs(s,t){const i=-s.plane[3];return Y(ds(s),t)-i}function fs(s,t,i,n){const r=bs(s,t),e=c(Ms,ds(s),i-r);return u(n,t,e),n}function ps(s,t){return d(s.basis1,t.basis1)&&d(s.basis2,t.basis2)&&d(s.origin,t.origin)}function ls(s,t,i){return s!==i&&G(s,i),n(Vs,t),r(Vs,Vs),j(i.basis1,s.basis1,Vs),j(i.basis2,s.basis2,Vs),j(q(i.plane),q(s.plane),Vs),j(i.origin,s.origin,t),B(i.plane,i.plane,i.origin),i}function ms(s,t,i,n){return s!==n&&G(s,n),e(As,t,i),j(n.basis1,s.basis1,As),j(n.basis2,s.basis2,As),J(n),n}function ds(s){return q(s.plane)}function js(s,t,i){switch(t){case 0:a(i,s.basis1),I(i,i);break;case 1:a(i,s.basis2),I(i,i);break;case 2:a(i,ds(s))}return i}function hs(s,t){const i=m(L.get(),t,s.origin),n=h(s.basis1),r=h(s.basis2),e=l(s.basis1,i),o=l(s.basis2,i);return-e-n<0&&e-n<0&&-o-r<0&&o-r<0}function Is(s,t){const i=xs.get();return a(i.origin,s.origin),a(i.vector,t),i}function ys(s,t,i){const{basis1:n,basis2:r,origin:e}=s,o=c(L.get(),n,t.origin[0]),a=c(L.get(),r,t.origin[1]);u(i.origin,o,a),u(i.origin,i.origin,e);const g=c(L.get(),n,t.direction[0]),b=c(L.get(),r,t.direction[1]);return c(i.vector,u(g,g,b),2),i}function vs(s,t){Math.abs(l(s.basis1,s.basis2)/(f(s.basis1)*f(s.basis2)))>1e-6&&U().warn(t,"Provided basis vectors are not perpendicular"),Math.abs(l(s.basis1,ds(s)))>1e-6&&U().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-l(ds(s),s.origin)-s.plane[3])>1e-6&&U().warn(t,"Plane offset is not consistent with plane origin")}function Ps(s,t,i,n){const r=ds(s);A(r,t.direction,t.origin,i),A(q(i),r,t.origin,n)}const Ns={plane:S(),origin:y(0,0,0),basis1:y(1,0,0),basis2:y(0,1,0)},ws=new i(S),xs=new i(M),Ms=P(),Ss=new i(()=>z()),Ts=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],Vs=o(),As=o(),Es=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:bs,axisAt:gs,cameraFrustumCoverage:is,closestPoint:ns,closestPointOnSilhouette:ts,copy:G,copyWithoutVerify:W,create:z,distance:as,distance2:os,distanceToSilhouette:cs,elevate:K,equals:ps,extrusionContainsPoint:us,fromAABoundingRect:Z,fromValues:H,getExtent:X,intersectRay:$,intersectRayClosestSilhouette:ss,normal:ds,projectPoint:rs,projectPointLocal:es,rotate:ms,setAltitudeAt:fs,setExtent:Q,transform:ls,up:Ns,updateUnboundedPlane:J,wrap:D},Symbol.toStringTag,{value:"Module"}));export{gs as A,bs as B,fs as C,Ns as D,z as a,Es as b,is as c,G as d,us as e,H as f,ps as g,Z as h,$ as i,as as j,W as k,K as l,X as m,ds as n,ss as o,ts as p,ns as q,ms as r,Q as s,ls as t,J as u,rs as v,D as w,es as x,os as y,cs as z};
5
+ import"../core/has.js";import s from"../core/Logger.js";import{acosClamped as t}from"../core/mathUtils.js";import{ObjectStack as i}from"../core/ObjectStack.js";import{invert as n,transpose as r,fromRotation as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as a,j as c,i as u,h as g,D as b,b as f,E as p,g as l,e as m,m as d,p as j,F as h,n as I}from"./vec32.js";import{fromValues as y,clone as v,create as P}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as N}from"../geometry/support/aaBoundingRect.js";import{projectPointClamp as w,distance2 as x,create as M}from"../geometry/support/lineSegment.js";import{create as S,wrap as T,copy as V,fromVectorsAndPoint as A,fromValues as E,intersectRay as _,intersectLineSegment as O,intersectLineSegmentClamp as F,isPointInside as k,projectPoint as R,signedDistance as q,getNormal as B,setOffsetFromPoint as C}from"../geometry/support/plane.js";import{distance2 as Y}from"../geometry/support/ray.js";import{projectPointSignedLength as L}from"../geometry/support/vector.js";import{sv3d as U}from"../geometry/support/vectorStacks.js";const z=()=>s.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function D(s=ws){return{plane:S(s.plane),origin:v(s.origin),basis1:v(s.basis1),basis2:v(s.basis2)}}function G(s,t,i){const n=Ts.get();return n.origin=s,n.basis1=t,n.basis2=i,n.plane=T(0,0,0,0),K(n),n}function W(s,t=D()){return J(s.origin,s.basis1,s.basis2,t)}function H(s,t){a(t.origin,s.origin),a(t.basis1,s.basis1),a(t.basis2,s.basis2),V(t.plane,s.plane)}function J(s,t,i,n=D()){return a(n.origin,s),a(n.basis1,t),a(n.basis2,i),K(n),Ps(n,"fromValues()"),n}function K(s){A(s.basis2,s.basis1,s.origin,s.plane)}function Q(s,t,i){s!==i&&W(s,i);const n=c(U.get(),js(s),t);return u(i.origin,i.origin,n),i.plane[3]-=t,i}function X(s,t,i){return $(t,i),Q(i,fs(s,s.origin),i),i}function Z(s,t){const i=s.basis1[0],n=s.basis2[1],[r,e]=s.origin;return N(r-i,e-n,r+i,e+n,t)}function $(s,t=D()){const i=(s[2]-s[0])/2,n=(s[3]-s[1])/2;return g(t.origin,s[0]+i,s[1]+n,0),g(t.basis1,i,0,0),g(t.basis2,0,n,0),E(0,0,1,0,t.plane),t}function ss(s,t,i){return!!_(s.plane,t,i)&&Is(s,i)}function ts(s,t,i){if(ss(s,t,i))return i;const n=is(s,t,U.get());return u(i,t.origin,c(U.get(),t.direction,b(t.origin,n)/f(t.direction))),i}function is(s,i,n){const r=xs.get();Ns(s,i,r,xs.get());let e=Number.POSITIVE_INFINITY;for(const o of Vs){const c=vs(s,o,Ms.get()),u=U.get();if(O(r,c,u)){const s=p(U.get(),i.origin,u),r=Math.abs(t(l(i.direction,s)));r<e&&(e=r,a(n,u))}}return e===Number.POSITIVE_INFINITY?rs(s,i,n):n}function ns(s,t){return(t-s)/t}function rs(s,t,i){if(ss(s,t,i))return i;const n=xs.get(),r=xs.get();Ns(s,t,n,r);let e=Number.POSITIVE_INFINITY;for(const o of Vs){const c=vs(s,o,Ms.get()),u=U.get();if(F(n,c,u)){const s=Y(t,u);if(!k(r,u))continue;s<e&&(e=s,a(i,u))}}return as(s,t.origin)<e&&es(s,t.origin,i),i}function es(s,t,i){const n=R(s.plane,t,U.get()),r=w(ys(s,s.basis1),n,-1,1,U.get()),e=w(ys(s,s.basis2),n,-1,1,U.get());return m(i,u(U.get(),r,e),s.origin),i}function os(s,t,i){const{origin:n,basis1:r,basis2:e}=s,o=m(U.get(),t,n),a=L(r,o),c=L(e,o),u=L(js(s),o);return g(i,a,c,u)}function as(s,t){const i=os(s,t,U.get()),{basis1:n,basis2:r}=s,e=f(n),o=f(r),a=Math.max(Math.abs(i[0])-e,0),c=Math.max(Math.abs(i[1])-o,0),u=i[2];return a*a+c*c+u*u}function cs(s,t){return Math.sqrt(as(s,t))}function us(s,t){let i=Number.NEGATIVE_INFINITY;for(const n of Vs){const r=vs(s,n,Ms.get()),e=x(r,t);e>i&&(i=e)}return Math.sqrt(i)}function gs(s,t){return q(s.plane,t)>0&&Is(s,t)}function bs(s,t,i,n){return hs(s,i,n)}function fs(s,t){const i=-s.plane[3];return L(js(s),t)-i}function ps(s,t,i,n){const r=fs(s,t),e=c(Ss,js(s),i-r);return u(n,t,e),n}function ls(s,t){return d(s.basis1,t.basis1)&&d(s.basis2,t.basis2)&&d(s.origin,t.origin)}function ms(s,t,i){return s!==i&&W(s,i),n(As,t),r(As,As),j(i.basis1,s.basis1,As),j(i.basis2,s.basis2,As),j(B(i.plane),B(s.plane),As),j(i.origin,s.origin,t),C(i.plane,i.plane,i.origin),i}function ds(s,t,i,n){return s!==n&&W(s,n),e(Es,t,i),j(n.basis1,s.basis1,Es),j(n.basis2,s.basis2,Es),K(n),n}function js(s){return B(s.plane)}function hs(s,t,i){switch(t){case 0:a(i,s.basis1),I(i,i);break;case 1:a(i,s.basis2),I(i,i);break;case 2:a(i,js(s))}return i}function Is(s,t){const i=m(U.get(),t,s.origin),n=h(s.basis1),r=h(s.basis2),e=l(s.basis1,i),o=l(s.basis2,i);return-e-n<0&&e-n<0&&-o-r<0&&o-r<0}function ys(s,t){const i=Ms.get();return a(i.origin,s.origin),a(i.vector,t),i}function vs(s,t,i){const{basis1:n,basis2:r,origin:e}=s,o=c(U.get(),n,t.origin[0]),a=c(U.get(),r,t.origin[1]);u(i.origin,o,a),u(i.origin,i.origin,e);const g=c(U.get(),n,t.direction[0]),b=c(U.get(),r,t.direction[1]);return c(i.vector,u(g,g,b),2),i}function Ps(s,t){Math.abs(l(s.basis1,s.basis2)/(f(s.basis1)*f(s.basis2)))>1e-6&&z().warn(t,"Provided basis vectors are not perpendicular"),Math.abs(l(s.basis1,js(s)))>1e-6&&z().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-l(js(s),s.origin)-s.plane[3])>1e-6&&z().warn(t,"Plane offset is not consistent with plane origin")}function Ns(s,t,i,n){const r=js(s);A(r,t.direction,t.origin,i),A(B(i),r,t.origin,n)}const ws={plane:S(),origin:y(0,0,0),basis1:y(1,0,0),basis2:y(0,1,0)},xs=new i(S),Ms=new i(M),Ss=P(),Ts=new i(()=>D()),Vs=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],As=o(),Es=o(),_s=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:fs,axisAt:bs,cameraFrustumCoverage:ns,closestPoint:rs,closestPointOnSilhouette:is,copy:W,copyWithoutVerify:H,create:D,distance:cs,distance2:as,distanceToSilhouette:us,elevate:Q,equals:ls,extrusionContainsPoint:gs,fromAABoundingRect:$,fromValues:J,getExtent:Z,intersectRay:ss,intersectRayClosestSilhouette:ts,normal:js,projectPoint:es,projectPointLocal:os,rotate:ds,setAltitudeAt:ps,setExtent:X,transform:ms,up:ws,updateUnboundedPlane:K,wrap:G},Symbol.toStringTag,{value:"Module"}));export{fs as A,ps as B,ms as C,ws as D,ns as a,_s as b,W as c,D as d,gs as e,J as f,ls as g,$ as h,ss as i,cs as j,H as k,Q as l,Z as m,js as n,ts as o,is as p,rs as q,ds as r,X as s,es as t,K as u,os as v,G as w,as as x,us as y,bs as z};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{E as e}from"./UnitFactory.js";import{getSpatialReference as t,fromGeometry as r,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=t(e);return s.accelerateGeometry(r(e),o(a),1)}function n(e,t){return s.execute(r(e),r(t),o(e.spatialReference),null)}const c=s.supportsCurves(),u=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,u as c,n as e,c as s};
5
+ import{g as e}from"./SpatialReference.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference),null)}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as c,n as e,c as s};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{F as e}from"./UnitFactory.js";import{getSpatialReference as t,fromGeometry as r,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=t(e);return s.accelerateGeometry(r(e),o(a),1)}function n(e,t){return s.execute(r(e),r(t),o(e.spatialReference))}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as d,n as e,c as s};
5
+ import{j as e}from"./SpatialReference.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference))}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as d,n as e,c as s};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{I as e,J as t}from"./UnitFactory.js";import{getSpatialReference as r,fromGeometry as o,fromSpatialReference as s}from"../geometry/operators/support/apiConverter.js";class a extends e{getOperatorType(){return 2}execute(e,r,o,s){return t(e,r,o,3,s)}}const n=new a;function u(e){const t=r(e);return n.accelerateGeometry(o(e),s(t),1)}function c(e,t){return n.execute(o(e),o(t),s(e.spatialReference),null)}const p=n.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:c,supportsCurves:p},Symbol.toStringTag,{value:"Module"}));export{u as a,c as b,l as e,p as s};
5
+ import{n as e,r}from"./SpatialReference.js";import{getSpatialReference as t,fromGeometry as o,fromSpatialReference as s}from"../geometry/operators/support/apiConverter.js";class a extends e{getOperatorType(){return 2}execute(e,t,o,s){return r(e,t,o,3,s)}}const n=new a;function u(e){const r=t(e);return n.accelerateGeometry(o(e),s(r),1)}function c(e,r){return n.execute(o(e),o(r),s(e.spatialReference),null)}const p=n.supportsCurves(),l=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:u,execute:c,supportsCurves:p},Symbol.toStringTag,{value:"Module"}));export{u as a,c as b,l as e,p as s};
package/chunks/pe.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{getAssetUrl as e}from"../assets.js";import has from"../core/has.js";let t,o=null;function r(){return!!o}function _(){return!!has("esri-wasm")}function n(){return t||(t=import("./pe-wasm.js").then(({default:t})=>t({locateFile:t=>e(`esri/geometry/support/${t}`)})).then(e=>{h(e)}),t)}const P={geogToProj(e,t,r){o.ensureCache.prepare();const _=I(r),n=r===_,P=o.ensureFloat64(_),s=o._pe_geog_to_proj(o.getPointer(e),t,P);return s&&U(r,t,P,n),s},projGeog(e,t,o,r){switch(r){case s.PE_TRANSFORM_P_TO_G:return P.projToGeog(e,t,o);case s.PE_TRANSFORM_G_TO_P:return P.geogToProj(e,t,o)}return 0},projToGeog:(e,t,o)=>P.projToGeogCenter(e,t,o,0),projToGeogCenter(e,t,r,_){o.ensureCache.prepare();const n=I(r),P=r===n,s=o.ensureFloat64(n),p=o._pe_proj_to_geog_center(o.getPointer(e),t,s,_);return p&&U(r,t,s,P),p}};class s{static init(){s.PE_BUFFER_MAX=o.PeDefs.prototype.PE_BUFFER_MAX,s.PE_NAME_MAX=o.PeDefs.prototype.PE_NAME_MAX,s.PE_MGRS_MAX=o.PeDefs.prototype.PE_MGRS_MAX,s.PE_USNG_MAX=o.PeDefs.prototype.PE_USNG_MAX,s.PE_DD_MAX=o.PeDefs.prototype.PE_DD_MAX,s.PE_DDM_MAX=o.PeDefs.prototype.PE_DDM_MAX,s.PE_DMS_MAX=o.PeDefs.prototype.PE_DMS_MAX,s.PE_UTM_MAX=o.PeDefs.prototype.PE_UTM_MAX,s.PE_PARM_MAX=o.PeDefs.prototype.PE_PARM_MAX,s.PE_TYPE_NONE=o.PeDefs.prototype.PE_TYPE_NONE,s.PE_TYPE_GEOGCS=o.PeDefs.prototype.PE_TYPE_GEOGCS,s.PE_TYPE_PROJCS=o.PeDefs.prototype.PE_TYPE_PROJCS,s.PE_TYPE_GEOGTRAN=o.PeDefs.prototype.PE_TYPE_GEOGTRAN,s.PE_TYPE_COORDSYS=o.PeDefs.prototype.PE_TYPE_COORDSYS,s.PE_TYPE_UNIT=o.PeDefs.prototype.PE_TYPE_UNIT,s.PE_TYPE_LINUNIT=o.PeDefs.prototype.PE_TYPE_LINUNIT,s.PE_STR_OPTS_NONE=o.PeDefs.prototype.PE_STR_OPTS_NONE,s.PE_STR_AUTH_NONE=o.PeDefs.prototype.PE_STR_AUTH_NONE,s.PE_STR_AUTH_TOP=o.PeDefs.prototype.PE_STR_AUTH_TOP,s.PE_STR_NAME_CANON=o.PeDefs.prototype.PE_STR_NAME_CANON,s.PE_STR_FMT_WKT=o.PeDefs.prototype.PE_STR_FMT_WKT,s.PE_STR_FMT_WKT2=o.PeDefs.prototype.PE_STR_FMT_WKT2,s.PE_PARM_X0=o.PeDefs.prototype.PE_PARM_X0,s.PE_PARM_ND=o.PeDefs.prototype.PE_PARM_ND,s.PE_TRANSFORM_1_TO_2=o.PeDefs.prototype.PE_TRANSFORM_1_TO_2,s.PE_TRANSFORM_2_TO_1=o.PeDefs.prototype.PE_TRANSFORM_2_TO_1,s.PE_TRANSFORM_P_TO_G=o.PeDefs.prototype.PE_TRANSFORM_P_TO_G,s.PE_TRANSFORM_G_TO_P=o.PeDefs.prototype.PE_TRANSFORM_G_TO_P,s.PE_HORIZON_RECT=o.PeDefs.prototype.PE_HORIZON_RECT,s.PE_HORIZON_POLY=o.PeDefs.prototype.PE_HORIZON_POLY,s.PE_HORIZON_LINE=o.PeDefs.prototype.PE_HORIZON_LINE,s.PE_HORIZON_DELTA=o.PeDefs.prototype.PE_HORIZON_DELTA}}let p=null;const a={},i={},E=e=>{const t=e.getType();switch(t){case s.PE_TYPE_GEOGCS:e=o.castObject(e,o.PeGeogcs);break;case s.PE_TYPE_PROJCS:e=o.castObject(e,o.PeProjcs);break;case s.PE_TYPE_GEOGTRAN:e=o.castObject(e,o.PeGeogtran);break;default:t&s.PE_TYPE_UNIT&&(e=o.castObject(e,o.PeUnit))}return e},c={initialize(){o.PeFactory.prototype.initialize(null)},coordsys:e=>c.factoryByType(s.PE_TYPE_COORDSYS,e),factoryByType(e,t){let r=null,_=a[e];if(_||(_={},a[e]=_),_.hasOwnProperty(String(t))&&(r=_[t],o.compare(r,o.NULL)&&(r=null)),!r){const n=o.PeFactory.prototype.factoryByType(e,t);o.compare(n,o.NULL)||(r=E(n),_[t]=r)}return r},fromString(e,t){let r=null,_=i[e];if(_||(_={},i[e]=_),_.hasOwnProperty(t)&&(r=_[t],o.compare(r,o.NULL)&&(r=null)),!r){const n=o.PeFactory.prototype.fromString(e,t);o.compare(n,o.NULL)||(r=E(n),_[t]=r)}return r},geogcs:e=>c.factoryByType(s.PE_TYPE_GEOGCS,e),geogtran:e=>c.factoryByType(s.PE_TYPE_GEOGTRAN,e),getCode:e=>o.PeFactory.prototype.getCode(e),projcs:e=>c.factoryByType(s.PE_TYPE_PROJCS,e),unit:e=>c.factoryByType(s.PE_TYPE_UNIT,e)};let T,g=null;const y={PE_GTLIST_OPTS_COMMON:0,init(){y.PE_GTLIST_OPTS_COMMON=o.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,T=o._pe_getPeGTlistExtendedEntrySize()},getGTlist(e,t,r,_,n,P){let s=null;const p=new o.PeInteger(P);try{const a=o.PeGTlistExtended.prototype.getGTlist(e,t,r,_,n,p);if((P=p.val)&&(s=[a],P>1)){const e=o.getPointer(a);for(let t=1;t<P;t++)s.push(o.wrapPointer(e+T*t,o.PeGTlistExtendedEntry))}}finally{o.destroy(p)}return s}},l={destroy(e){if(e?.length){for(const t of e)m(t),t.getEntries().forEach(e=>{m(e);const t=e.getGeogtran();m(t),t.getParameters().forEach(m),[t.getGeogcs1(),t.getGeogcs2()].forEach(e=>{m(e);const t=e.getDatum();m(t),m(t.getSpheroid()),m(e.getPrimem()),m(e.getUnit())})});o.PeGTlistExtendedEntry.prototype.Delete(e[0])}}},u={geogToGeog(e,t,r,_,n){o.ensureCache.prepare();const P=I(r),s=r===P,p=o.ensureFloat64(P);let a=0;_&&(a=o.ensureFloat64(_));const i=o._pe_geog_to_geog(o.getPointer(e),t,p,a,n);return i&&U(r,t,p,s),i}},S={geodesicCoordinate(e,t,r,_,n,P,s,p){o.PeLineType.prototype.geodesic_coordinate(e,t,r,_,n,P,s,p)},geodeticCoordinate(e,t,r,_,n,P,s,p,a){o.PeLineType.prototype.geodetic_coordinate(e,t,r,_,n,P,s,p,a)},geodeticDistance(e,t,r,_,n,P,s,p,a,i){o.PeLineType.prototype.geodetic_distance(e,t,r,_,n,P,s,p,a,i)},greatEllipticDistance(e,t,r,_,n,P,s,p,a){o.PeLineType.prototype.great_elliptic_distance(e,t,r,_,n,P,s,p,a)}},O={phiToEta:(e,t)=>o.PeMath.prototype.phi_to_eta(e,t),etaToPhi:(e,t)=>o.PeMath.prototype.eta_to_phi(e,t),phiToPhig:(e,t)=>o.PeMath.prototype.phi_to_phig(e,t),q:(e,t,r)=>o.PeMath.prototype.q(e,t,r),q90:(e,t)=>o.PeMath.prototype.q90(e,t)},N=(e,t,r,_,n,P)=>{let p,a;switch(o.ensureCache.prepare(),e){case"dd":p=o._pe_geog_to_dd,a=s.PE_DD_MAX;break;case"ddm":p=o._pe_geog_to_ddm,a=s.PE_DDM_MAX;break;case"dms":p=o._pe_geog_to_dms,a=s.PE_DMS_MAX}let i=0;t&&(i=o.getPointer(t));const E=I(_),c=o.ensureFloat64(E),T=C(r,a),g=p(i,r,c,n,o.ensureInt32(T));if(g)for(let s=0;s<r;s++)P[s]=o.UTF8ToString(T[s]);return g},f=(e,t,r,_,n)=>{let P;switch(o.ensureCache.prepare(),e){case"dd":P=o._pe_dd_to_geog;break;case"ddm":P=o._pe_ddm_to_geog;break;case"dms":P=o._pe_dms_to_geog}let s=0;t&&(s=o.getPointer(t));const p=_.map(e=>o.ensureString(e)),a=o.ensureInt32(p),i=o.ensureFloat64(new Array(2*r)),E=P(s,r,a,i);return E&&U(n,r,i),E},d={geogToDms:(e,t,o,r,_)=>N("dms",e,t,o,r,_),dmsToGeog:(e,t,o,r)=>f("dms",e,t,o,r),geogToDdm:(e,t,o,r,_)=>N("ddm",e,t,o,r,_),ddmToGeog:(e,t,o,r)=>f("ddm",e,t,o,r),geogToDd:(e,t,o,r,_)=>N("dd",e,t,o,r,_),ddToGeog:(e,t,o,r)=>f("dd",e,t,o,r)};class M{static init(){M.PE_MGRS_STYLE_NEW=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,M.PE_MGRS_STYLE_OLD=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,M.PE_MGRS_STYLE_AUTO=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,M.PE_MGRS_180_ZONE_1_PLUS=o.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,M.PE_MGRS_ADD_SPACES=o.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}static geogToMgrsExtended(e,t,r,_,n,P,p){o.ensureCache.prepare();let a=0;e&&(a=o.getPointer(e));const i=I(r),E=o.ensureFloat64(i),c=C(t,s.PE_MGRS_MAX),T=o.ensureInt32(c),g=o._pe_geog_to_mgrs_extended(a,t,E,_,n,P,T);if(g)for(let s=0;s<t;s++)p[s]=o.UTF8ToString(c[s]);return g}static mgrsToGeogExtended(e,t,r,_,n){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const s=r.map(e=>o.ensureString(e)),p=o.ensureInt32(s),a=o.ensureFloat64(new Array(2*t)),i=o._pe_mgrs_to_geog_extended(P,t,p,_,a);return i&&U(n,t,a),i}}const A={geogToUsng(e,t,r,_,n,P,p){o.ensureCache.prepare();let a=0;e&&(a=o.getPointer(e));const i=I(r),E=o.ensureFloat64(i),c=C(t,s.PE_MGRS_MAX),T=o.ensureInt32(c),g=o._pe_geog_to_usng(a,t,E,_,n,P,T);if(g)for(let s=0;s<t;s++)p[s]=o.UTF8ToString(c[s]);return g},usngToGeog(e,t,r,_){o.ensureCache.prepare();let n=0;e&&(n=o.getPointer(e));const P=r.map(e=>o.ensureString(e)),s=o.ensureInt32(P),p=o.ensureFloat64(new Array(2*t)),a=o._pe_usng_to_geog(n,t,s,p);return a&&U(_,t,p),a}};class D{static init(){D.PE_UTM_OPTS_NONE=o.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,D.PE_UTM_OPTS_ADD_SPACES=o.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,D.PE_UTM_OPTS_NS=o.PeNotationUtm.prototype.PE_UTM_OPTS_NS}static geogToUtm(e,t,r,_,n){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const p=I(r),a=o.ensureFloat64(p),i=C(t,s.PE_UTM_MAX),E=o.ensureInt32(i),c=o._pe_geog_to_utm(P,t,a,_,E);if(c)for(let s=0;s<t;s++)n[s]=o.UTF8ToString(i[s]);return c}static utmToGeog(e,t,r,_,n){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const s=r.map(e=>o.ensureString(e)),p=o.ensureInt32(s),a=o.ensureFloat64(new Array(2*t)),i=o._pe_utm_to_geog(P,t,p,_,a);return i&&U(n,t,a),i}}class R{static{this.cache=new Map}static init(){R.PE_PCSINFO_OPTION_NONE=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,R.PE_PCSINFO_OPTION_DOMAIN=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,R.PE_POLE_OUTSIDE_BOUNDARY=o.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,R.PE_POLE_POINT=o.PePCSInfo.prototype.PE_POLE_POINT}static generate(e,t=R.PE_PCSINFO_OPTION_DOMAIN){let r=null,_=null;return R.cache.has(e)&&(_=R.cache.get(e),_[t]&&(r=_[t])),r||(r=o.PePCSInfo.prototype.generate(e,t),_||(_=[],R.cache.set(e,_)),_[t]=r),r}}const G={versionString:()=>o.PeVersion.prototype.version_string()};function h(e){function t(e,t,o){e[t]=o(e[t])}o=e,s.init(),y.init(),M.init(),D.init(),R.init(),p=class extends o.PeDouble{constructor(e=NaN){super(e)}destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}},g=class extends o.PeGCSExtent{destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}};const r=[o.PeAngunit,o.PeDatum,o.PeGeogcs,o.PeGeogtran,o.PeObject,o.PeParameter,o.PePrimem,o.PeProjcs,o.PeSpheroid,o.PeUnit];for(const o of r)t(o.prototype,"getName",e=>function(){return e.call(this,new Array(s.PE_NAME_MAX))});for(const P of[o.PeGeogtran,o.PeProjcs])t(P.prototype,"getParameters",e=>function(){const t=new Array(s.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const _=o.getValue(r,"*");t[e]=_?o.wrapPointer(_,o.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t});t(o.PeHorizon.prototype,"getCoord",e=>function(t=!1){const o=this.getSize();if(!o)return null;const r=[];return U(r,o,e.call(this),t),r}),t(o.PeGTlistExtendedEntry.prototype,"getEntries",e=>{const t=o._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const _=e.call(this);if(!o.compare(_,o.NULL)){r=[_];const e=this.getSteps();if(e>1){const n=o.getPointer(_);for(let _=1;_<e;_++)r.push(o.wrapPointer(n+t*_,o.PeGTlistExtendedGTs))}}return r}});const _=o._pe_getPeHorizonSize(),n=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const n=e.call(this);if(!o.compare(n,o.NULL)){r=[n];const e=n.getNump();if(e>1){const t=o.getPointer(n);for(let n=1;n<e;n++)r.push(o.wrapPointer(t+_*n,o.PeHorizon))}}return t.set(e,r),r};t(o.PeProjcs.prototype,"horizonGcsGenerate",n),t(o.PeProjcs.prototype,"horizonPcsGenerate",n),o.PeObject.prototype.toString=function(e=s.PE_STR_OPTS_NONE){o.ensureCache.prepare();const t=o.getPointer(this),r=o.ensureInt8(new Array(s.PE_BUFFER_MAX));return o.UTF8ToString(o._pe_object_to_string_ext(t,e,r))},o.PeGeogcs.prototype.destroy=function(){this.Delete(),m(this),this.ptr=0},o.PeGeogcs.prototype[Symbol.dispose]=function(){this.destroy()},o.PeProjcs.prototype.destroy=function(){this.Delete(),m(this),this.ptr=0},o.PeProjcs.prototype[Symbol.dispose]=function(){this.destroy()}}function m(e){if(!e)return;const t=o.getClass(e);if(!t)return;const r=o.getCache(t);if(!r)return;const _=o.getPointer(e);_&&delete r[_]}function C(e,t){const r=[],_=new Array(t);for(let n=0;n<e;n++)r.push(o.ensureInt8(_));return r}function I(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function U(e,t,r,_=!1){if(_)for(let n=0;n<2*t;n++)e[n]=o.getValue(r+n*Float64Array.BYTES_PER_ELEMENT,"double");else{const _=0===e.length;for(let n=0;n<t;n++)_&&(e[n]=new Array(2)),e[n][0]=o.getValue(r,"double"),e[n][1]=o.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}const F=Object.freeze(Object.defineProperty({__proto__:null,PeCSTransformations:P,PeDefs:s,get PeDouble(){return p},PeFactory:c,get PeGCSExtent(){return g},PeGTTransformations:u,PeGTlistExtended:y,PeGTlistExtendedEntry:l,PeLineType:S,PeMath:O,PeNotationDms:d,PeNotationMgrs:M,PeNotationUsng:A,PeNotationUtm:D,PePCSInfo:R,PeVersion:G,_init:h,get _pe(){return o},isLoaded:r,isSupported:_,load:n},Symbol.toStringTag,{value:"Module"}));export{c as P,o as _,s as a,d as b,A as c,D as d,M as e,_ as f,R as g,P as h,r as i,u as j,p as k,n as l,g as m,y as n,l as o,F as p,S as q,O as r,G as s,h as t};
5
+ import{getAssetUrl as e}from"../assets.js";import has from"../core/has.js";let t,o=null;function r(){return!!o}function _(){return!!has("esri-wasm")}function P(){return t||(t=import("./pe-wasm.js").then(({default:t})=>t({locateFile:t=>e(`esri/geometry/support/${t}`)})).then(e=>{h(e)}),t)}const n={geogToProj(e,t,r){o.ensureCache.prepare();const _=I(r),P=r===_,n=o.ensureFloat64(_),s=o._pe_geog_to_proj(o.getPointer(e),t,n);return s&&U(r,t,n,P),s},projGeog(e,t,o,r){switch(r){case s.PE_TRANSFORM_P_TO_G:return n.projToGeog(e,t,o);case s.PE_TRANSFORM_G_TO_P:return n.geogToProj(e,t,o)}return 0},projToGeog:(e,t,o)=>n.projToGeogCenter(e,t,o,0),projToGeogCenter(e,t,r,_){o.ensureCache.prepare();const P=I(r),n=r===P,s=o.ensureFloat64(P),p=o._pe_proj_to_geog_center(o.getPointer(e),t,s,_);return p&&U(r,t,s,n),p}};class s{static init(){s.PE_BUFFER_MAX=o.PeDefs.prototype.PE_BUFFER_MAX,s.PE_NAME_MAX=o.PeDefs.prototype.PE_NAME_MAX,s.PE_MGRS_MAX=o.PeDefs.prototype.PE_MGRS_MAX,s.PE_USNG_MAX=o.PeDefs.prototype.PE_USNG_MAX,s.PE_DD_MAX=o.PeDefs.prototype.PE_DD_MAX,s.PE_DDM_MAX=o.PeDefs.prototype.PE_DDM_MAX,s.PE_DMS_MAX=o.PeDefs.prototype.PE_DMS_MAX,s.PE_UTM_MAX=o.PeDefs.prototype.PE_UTM_MAX,s.PE_PARM_MAX=o.PeDefs.prototype.PE_PARM_MAX,s.PE_TYPE_NONE=o.PeDefs.prototype.PE_TYPE_NONE,s.PE_TYPE_GEOGCS=o.PeDefs.prototype.PE_TYPE_GEOGCS,s.PE_TYPE_PROJCS=o.PeDefs.prototype.PE_TYPE_PROJCS,s.PE_TYPE_GEOGTRAN=o.PeDefs.prototype.PE_TYPE_GEOGTRAN,s.PE_TYPE_COORDSYS=o.PeDefs.prototype.PE_TYPE_COORDSYS,s.PE_TYPE_UNIT=o.PeDefs.prototype.PE_TYPE_UNIT,s.PE_TYPE_LINUNIT=o.PeDefs.prototype.PE_TYPE_LINUNIT,s.PE_STR_OPTS_NONE=o.PeDefs.prototype.PE_STR_OPTS_NONE,s.PE_STR_AUTH_NONE=o.PeDefs.prototype.PE_STR_AUTH_NONE,s.PE_STR_AUTH_TOP=o.PeDefs.prototype.PE_STR_AUTH_TOP,s.PE_STR_NAME_CANON=o.PeDefs.prototype.PE_STR_NAME_CANON,s.PE_STR_FMT_WKT=o.PeDefs.prototype.PE_STR_FMT_WKT,s.PE_STR_FMT_WKT2=o.PeDefs.prototype.PE_STR_FMT_WKT2,s.PE_PARM_X0=o.PeDefs.prototype.PE_PARM_X0,s.PE_PARM_ND=o.PeDefs.prototype.PE_PARM_ND,s.PE_TRANSFORM_1_TO_2=o.PeDefs.prototype.PE_TRANSFORM_1_TO_2,s.PE_TRANSFORM_2_TO_1=o.PeDefs.prototype.PE_TRANSFORM_2_TO_1,s.PE_TRANSFORM_P_TO_G=o.PeDefs.prototype.PE_TRANSFORM_P_TO_G,s.PE_TRANSFORM_G_TO_P=o.PeDefs.prototype.PE_TRANSFORM_G_TO_P,s.PE_HORIZON_RECT=o.PeDefs.prototype.PE_HORIZON_RECT,s.PE_HORIZON_POLY=o.PeDefs.prototype.PE_HORIZON_POLY,s.PE_HORIZON_LINE=o.PeDefs.prototype.PE_HORIZON_LINE,s.PE_HORIZON_DELTA=o.PeDefs.prototype.PE_HORIZON_DELTA}}let p=null;const a={},i={},E=e=>{const t=e.getType();switch(t){case s.PE_TYPE_GEOGCS:e=o.castObject(e,o.PeGeogcs);break;case s.PE_TYPE_PROJCS:e=o.castObject(e,o.PeProjcs);break;case s.PE_TYPE_GEOGTRAN:e=o.castObject(e,o.PeGeogtran);break;default:t&s.PE_TYPE_UNIT&&(e=o.castObject(e,o.PeUnit))}return e},c={initialize(){o.PeFactory.prototype.initialize(null)},coordsys:e=>c.factoryByType(s.PE_TYPE_COORDSYS,e),factoryByType(e,t){let r=null,_=a[e];if(_||(_={},a[e]=_),_.hasOwnProperty(String(t))&&(r=_[t],o.compare(r,o.NULL)&&(r=null)),!r){const P=o.PeFactory.prototype.factoryByType(e,t);o.compare(P,o.NULL)||(r=E(P),_[t]=r)}return r},fromString(e,t,r=!1){if(r)switch(e){case s.PE_TYPE_GEOGCS:case s.PE_TYPE_PROJCS:case s.PE_TYPE_COORDSYS:{const r=o.PeFactory.prototype.fromString(e,t);return o.compare(r,o.NULL)?null:E(r)}default:return null}let _=null,P=i[e];if(P||(P={},i[e]=P),P.hasOwnProperty(t)&&(_=P[t],o.compare(_,o.NULL)&&(_=null)),!_){const r=o.PeFactory.prototype.fromString(e,t);o.compare(r,o.NULL)||(_=E(r),P[t]=_)}return _},geogcs:e=>c.factoryByType(s.PE_TYPE_GEOGCS,e),geogtran:e=>c.factoryByType(s.PE_TYPE_GEOGTRAN,e),getCode:e=>o.PeFactory.prototype.getCode(e),projcs:e=>c.factoryByType(s.PE_TYPE_PROJCS,e),unit:e=>c.factoryByType(s.PE_TYPE_UNIT,e)};let T,g=null;const l={PE_GTLIST_OPTS_COMMON:0,init(){l.PE_GTLIST_OPTS_COMMON=o.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,T=o._pe_getPeGTlistExtendedEntrySize()},getGTlist(e,t,r,_,P,n){let s=null;const p=new o.PeInteger(n);try{const a=o.PeGTlistExtended.prototype.getGTlist(e,t,r,_,P,p);if((n=p.val)&&(s=[a],n>1)){const e=o.getPointer(a);for(let t=1;t<n;t++)s.push(o.wrapPointer(e+T*t,o.PeGTlistExtendedEntry))}}finally{o.destroy(p)}return s}},y={destroy(e){if(e?.length){for(const t of e)m(t),t.getEntries().forEach(e=>{m(e);const t=e.getGeogtran();m(t),t.getParameters().forEach(m),[t.getGeogcs1(),t.getGeogcs2()].forEach(e=>{m(e);const t=e.getDatum();m(t),m(t.getSpheroid()),m(e.getPrimem()),m(e.getUnit())})});o.PeGTlistExtendedEntry.prototype.Delete(e[0])}}},u={geogToGeog(e,t,r,_,P){o.ensureCache.prepare();const n=I(r),s=r===n,p=o.ensureFloat64(n);let a=0;_&&(a=o.ensureFloat64(_));const i=o._pe_geog_to_geog(o.getPointer(e),t,p,a,P);return i&&U(r,t,p,s),i}},S={geodesicCoordinate(e,t,r,_,P,n,s,p){o.PeLineType.prototype.geodesic_coordinate(e,t,r,_,P,n,s,p)},geodeticCoordinate(e,t,r,_,P,n,s,p,a){o.PeLineType.prototype.geodetic_coordinate(e,t,r,_,P,n,s,p,a)},geodeticDistance(e,t,r,_,P,n,s,p,a,i){o.PeLineType.prototype.geodetic_distance(e,t,r,_,P,n,s,p,a,i)},greatEllipticDistance(e,t,r,_,P,n,s,p,a){o.PeLineType.prototype.great_elliptic_distance(e,t,r,_,P,n,s,p,a)}},O={phiToEta:(e,t)=>o.PeMath.prototype.phi_to_eta(e,t),etaToPhi:(e,t)=>o.PeMath.prototype.eta_to_phi(e,t),phiToPhig:(e,t)=>o.PeMath.prototype.phi_to_phig(e,t),q:(e,t,r)=>o.PeMath.prototype.q(e,t,r),q90:(e,t)=>o.PeMath.prototype.q90(e,t)},f=(e,t,r,_,P,n)=>{let p,a;switch(o.ensureCache.prepare(),e){case"dd":p=o._pe_geog_to_dd,a=s.PE_DD_MAX;break;case"ddm":p=o._pe_geog_to_ddm,a=s.PE_DDM_MAX;break;case"dms":p=o._pe_geog_to_dms,a=s.PE_DMS_MAX}let i=0;t&&(i=o.getPointer(t));const E=I(_),c=o.ensureFloat64(E),T=C(r,a),g=p(i,r,c,P,o.ensureInt32(T));if(g)for(let s=0;s<r;s++)n[s]=o.UTF8ToString(T[s]);return g},N=(e,t,r,_,P)=>{let n;switch(o.ensureCache.prepare(),e){case"dd":n=o._pe_dd_to_geog;break;case"ddm":n=o._pe_ddm_to_geog;break;case"dms":n=o._pe_dms_to_geog}let s=0;t&&(s=o.getPointer(t));const p=_.map(e=>o.ensureString(e)),a=o.ensureInt32(p),i=o.ensureFloat64(new Array(2*r)),E=n(s,r,a,i);return E&&U(P,r,i),E},d={geogToDms:(e,t,o,r,_)=>f("dms",e,t,o,r,_),dmsToGeog:(e,t,o,r)=>N("dms",e,t,o,r),geogToDdm:(e,t,o,r,_)=>f("ddm",e,t,o,r,_),ddmToGeog:(e,t,o,r)=>N("ddm",e,t,o,r),geogToDd:(e,t,o,r,_)=>f("dd",e,t,o,r,_),ddToGeog:(e,t,o,r)=>N("dd",e,t,o,r)};class M{static init(){M.PE_MGRS_STYLE_NEW=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,M.PE_MGRS_STYLE_OLD=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,M.PE_MGRS_STYLE_AUTO=o.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,M.PE_MGRS_180_ZONE_1_PLUS=o.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,M.PE_MGRS_ADD_SPACES=o.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES}static geogToMgrsExtended(e,t,r,_,P,n,p){o.ensureCache.prepare();let a=0;e&&(a=o.getPointer(e));const i=I(r),E=o.ensureFloat64(i),c=C(t,s.PE_MGRS_MAX),T=o.ensureInt32(c),g=o._pe_geog_to_mgrs_extended(a,t,E,_,P,n,T);if(g)for(let s=0;s<t;s++)p[s]=o.UTF8ToString(c[s]);return g}static mgrsToGeogExtended(e,t,r,_,P){o.ensureCache.prepare();let n=0;e&&(n=o.getPointer(e));const s=r.map(e=>o.ensureString(e)),p=o.ensureInt32(s),a=o.ensureFloat64(new Array(2*t)),i=o._pe_mgrs_to_geog_extended(n,t,p,_,a);return i&&U(P,t,a),i}}const A={geogToUsng(e,t,r,_,P,n,p){o.ensureCache.prepare();let a=0;e&&(a=o.getPointer(e));const i=I(r),E=o.ensureFloat64(i),c=C(t,s.PE_MGRS_MAX),T=o.ensureInt32(c),g=o._pe_geog_to_usng(a,t,E,_,P,n,T);if(g)for(let s=0;s<t;s++)p[s]=o.UTF8ToString(c[s]);return g},usngToGeog(e,t,r,_){o.ensureCache.prepare();let P=0;e&&(P=o.getPointer(e));const n=r.map(e=>o.ensureString(e)),s=o.ensureInt32(n),p=o.ensureFloat64(new Array(2*t)),a=o._pe_usng_to_geog(P,t,s,p);return a&&U(_,t,p),a}};class D{static init(){D.PE_UTM_OPTS_NONE=o.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,D.PE_UTM_OPTS_ADD_SPACES=o.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,D.PE_UTM_OPTS_NS=o.PeNotationUtm.prototype.PE_UTM_OPTS_NS}static geogToUtm(e,t,r,_,P){o.ensureCache.prepare();let n=0;e&&(n=o.getPointer(e));const p=I(r),a=o.ensureFloat64(p),i=C(t,s.PE_UTM_MAX),E=o.ensureInt32(i),c=o._pe_geog_to_utm(n,t,a,_,E);if(c)for(let s=0;s<t;s++)P[s]=o.UTF8ToString(i[s]);return c}static utmToGeog(e,t,r,_,P){o.ensureCache.prepare();let n=0;e&&(n=o.getPointer(e));const s=r.map(e=>o.ensureString(e)),p=o.ensureInt32(s),a=o.ensureFloat64(new Array(2*t)),i=o._pe_utm_to_geog(n,t,p,_,a);return i&&U(P,t,a),i}}class R{static{this.cache=new Map}static init(){R.PE_PCSINFO_OPTION_NONE=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,R.PE_PCSINFO_OPTION_DOMAIN=o.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,R.PE_POLE_OUTSIDE_BOUNDARY=o.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,R.PE_POLE_POINT=o.PePCSInfo.prototype.PE_POLE_POINT}static generate(e,t=R.PE_PCSINFO_OPTION_DOMAIN){let r=null,_=null;return R.cache.has(e)&&(_=R.cache.get(e),_[t]&&(r=_[t])),r||(r=o.PePCSInfo.prototype.generate(e,t),_||(_=[],R.cache.set(e,_)),_[t]=r),r}}const G={versionString:()=>o.PeVersion.prototype.version_string()};function h(e){function t(e,t,o){e[t]=o(e[t])}o=e,s.init(),l.init(),M.init(),D.init(),R.init(),p=class extends o.PeDouble{constructor(e=NaN){super(e)}destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}},g=class extends o.PeGCSExtent{destroy(){o.destroy(this)}[Symbol.dispose](){this.destroy()}};const r=[o.PeAngunit,o.PeDatum,o.PeGeogcs,o.PeGeogtran,o.PeObject,o.PeParameter,o.PePrimem,o.PeProjcs,o.PeSpheroid,o.PeUnit];for(const o of r)t(o.prototype,"getName",e=>function(){return e.call(this,new Array(s.PE_NAME_MAX))});for(const n of[o.PeGeogtran,o.PeProjcs])t(n.prototype,"getParameters",e=>function(){const t=new Array(s.PE_PARM_MAX);let r=e.call(this);for(let e=0;e<t.length;e++){const _=o.getValue(r,"*");t[e]=_?o.wrapPointer(_,o.PeParameter):null,r+=Int32Array.BYTES_PER_ELEMENT}return t});t(o.PeHorizon.prototype,"getCoord",e=>function(t=!1){const o=this.getSize();if(!o)return null;const r=[];return U(r,o,e.call(this),t),r}),t(o.PeGTlistExtendedEntry.prototype,"getEntries",e=>{const t=o._pe_getPeGTlistExtendedGTsSize();return function(){let r=null;const _=e.call(this);if(!o.compare(_,o.NULL)){r=[_];const e=this.getSteps();if(e>1){const P=o.getPointer(_);for(let _=1;_<e;_++)r.push(o.wrapPointer(P+t*_,o.PeGTlistExtendedGTs))}}return r}});const _=o._pe_getPeHorizonSize(),P=e=>function(){let t=this._cache;if(t||(t=new Map,this._cache=t),t.has(e))return t.get(e);let r=null;const P=e.call(this);if(!o.compare(P,o.NULL)){r=[P];const e=P.getNump();if(e>1){const t=o.getPointer(P);for(let P=1;P<e;P++)r.push(o.wrapPointer(t+_*P,o.PeHorizon))}}return t.set(e,r),r};t(o.PeProjcs.prototype,"horizonGcsGenerate",P),t(o.PeProjcs.prototype,"horizonPcsGenerate",P),o.PeObject.prototype.toString=function(e=s.PE_STR_OPTS_NONE){o.ensureCache.prepare();const t=o.getPointer(this),r=o.ensureInt8(new Array(s.PE_BUFFER_MAX));return o.UTF8ToString(o._pe_object_to_string_ext(t,e,r))},o.PeGeogcs.prototype.destroy=function(){this.Delete(),m(this),this.ptr=0},o.PeGeogcs.prototype[Symbol.dispose]=function(){this.destroy()},o.PeProjcs.prototype.destroy=function(){this.Delete(),m(this),this.ptr=0},o.PeProjcs.prototype[Symbol.dispose]=function(){this.destroy()}}function m(e){if(!e)return;const t=o.getClass(e);if(!t)return;const r=o.getCache(t);if(!r)return;const _=o.getPointer(e);_&&delete r[_]}function C(e,t){const r=[],_=new Array(t);for(let P=0;P<e;P++)r.push(o.ensureInt8(_));return r}function I(e){return ArrayBuffer.isView(e)?e:Array.isArray(e[0])?e.flat():e}function U(e,t,r,_=!1){if(_)for(let P=0;P<2*t;P++)e[P]=o.getValue(r+P*Float64Array.BYTES_PER_ELEMENT,"double");else{const _=0===e.length;for(let P=0;P<t;P++)_&&(e[P]=new Array(2)),e[P][0]=o.getValue(r,"double"),e[P][1]=o.getValue(r+Float64Array.BYTES_PER_ELEMENT,"double"),r+=2*Float64Array.BYTES_PER_ELEMENT}}const F=Object.freeze(Object.defineProperty({__proto__:null,PeCSTransformations:n,PeDefs:s,get PeDouble(){return p},PeFactory:c,get PeGCSExtent(){return g},PeGTTransformations:u,PeGTlistExtended:l,PeGTlistExtendedEntry:y,PeLineType:S,PeMath:O,PeNotationDms:d,PeNotationMgrs:M,PeNotationUsng:A,PeNotationUtm:D,PePCSInfo:R,PeVersion:G,_init:h,get _pe(){return o},isLoaded:r,isSupported:_,load:P},Symbol.toStringTag,{value:"Module"}));export{c as P,o as _,s as a,d as b,A as c,D as d,M as e,_ as f,R as g,n as h,r as i,u as j,p as k,P as l,g as m,l as n,y as o,F as p,S as q,O as r,G as s,h as t};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{aF as e,aG as r,aH as t,aI as a}from"./UnitFactory.js";import{getSpatialReference as s,fromGeometry as o,fromSpatialReference as n}from"../geometry/operators/support/apiConverter.js";class u{supportsCurves(){return!0}getOperatorType(){return 1}execute(r,t,a,s,o){return e(r,t,a,s,o)}isValidDE9IM(e){return 0===r(e)}accelerateGeometry(e,r,a){return t(e,r,a)}canAccelerateGeometry(e){return a(e)}}const c=new u;function p(e){const r=s(e);return c.accelerateGeometry(o(e),n(r),1)}function i(e,r,t){return c.execute(o(e),o(r),n(e.spatialReference),t,null)}function l(e){return c.isValidDE9IM(e)}const m=c.supportsCurves(),y=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:p,execute:i,isValidDE9IM:l,supportsCurves:m},Symbol.toStringTag,{value:"Module"}));export{p as a,i as e,l as i,y as r,m as s};
5
+ import{an as e,ao as r,ap as t,aq as a}from"./SpatialReference.js";import{getSpatialReference as s,fromGeometry as o,fromSpatialReference as n}from"../geometry/operators/support/apiConverter.js";class u{supportsCurves(){return!0}getOperatorType(){return 1}execute(r,t,a,s,o){return e(r,t,a,s,o)}isValidDE9IM(e){return 0===r(e)}accelerateGeometry(e,r,a){return t(e,r,a)}canAccelerateGeometry(e){return a(e)}}const c=new u;function p(e){const r=s(e);return c.accelerateGeometry(o(e),n(r),1)}function i(e,r,t){return c.execute(o(e),o(r),n(e.spatialReference),t,null)}function l(e){return c.isValidDE9IM(e)}const m=c.supportsCurves(),f=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:p,execute:i,isValidDE9IM:l,supportsCurves:m},Symbol.toStringTag,{value:"Module"}));export{p as a,i as e,l as i,f as r,m as s};
package/config.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.49";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
5
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.0.0-next.50";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/core/units.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"./has.js";import{strict as e}from"./jsonMap.js";import{getReferenceEllipsoid as s}from"../geometry/ellipsoidUtils.js";import{earth as i,mars as n,moon as t}from"../geometry/support/Ellipsoid.js";import{isGeographic as a,isWKIDFromMars as r,isWKIDFromMoon as c,isEarth as u}from"../geometry/support/spatialReferenceUtils.js";import l from"../geometry/support/WKIDUnitConversion.js";const o=39.37,m=i.radius*Math.PI/200,f=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,d=l,U=/UNIT\[([^\]]+)]/i,b=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),B=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,k={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in k)for(const i in k[s].units)e[i]=s;return e})();function q(e,s,i){return e*k[i].units[s].inBaseUnits}function p(e,s,i){return e/k[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],g=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],M=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","liters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...g],v=[...S,...w],C=[...S,...M],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function E(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return k[e].baseUnit}function j(e){return I(E(e))}function R(e,s=null){return s=s||E(e),k[s].baseUnit===e}function N(e,s,i){if(s===i)return e;const n=E(s);if(n!==E(i))throw new Error("incompatible units");const t=R(s,n)?e:q(e,s,n);return R(i,n)?t:p(t,i,n)}function O(e,s,i,n=!1){if(!n&&a(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const t=oe(s);return t!==i&&(e=t?N(e,t,i):N(e*=ae(s),"meters",i)),e}function F(e,s,i,n=!1){if(!n&&a(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const t=oe(i);return s!==t&&(e=t?N(e,s,t):N(e,s,"meters")/ae(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function K(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function A(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function G(e,s,i){switch(i){case"metric":return L(e,s);case"imperial":return W(e,s);default:return i}}function H(e,s,i){switch(i){case"metric":return Y(e,s);case"imperial":return $(e,s);default:return i}}function L(e,s){const i=N(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function Y(e,s){const i=N(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function W(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=N(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=N(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function V(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function X(e,s){const i=N(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function Z(e,s){const i=N(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function ee(e,s,i){switch(i){case"metric":return X(e,s);case"imperial":return Z(e,s);default:return i}}function se(e,s,i){return N(e,s,"meters")/(i*Math.PI/180)}function ie(e){return B.fromJSON(e.toLowerCase())||null}function ne(e){if(null!=e&&!u(e))return 1;const s=ae(e);return s>1e5?1:s}function te(e){return ae(e)>=s(e).metersPerDegree?"meters":oe(e)}function ae(e,s=i.metersPerDegree){return re(e,!0)??s}function re(e,s=!1){const i=e?.wkid??null,a=e?.wkt2??e?.wkt??null;let u=null;if(i){if(r(i))return n.metersPerDegree;if(c(i))return t.metersPerDegree;u=d.values[d[i]],!u&&s&&b.has(i)&&(u=m)}else a&&(be(a)?u=ue(f.exec(a),u):Ue(a)&&(u=ue(U.exec(a),u)));return u}function ce(e){return a(e)?1:ae(e)}function ue(e,s){return e?.[1]?le(e[1]):s}function le(e){return parseFloat(e.split(",")[1])}function oe(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let n=null;if(s)n=d.units[d[s]];else if(i){const e=be(i)?f:Ue(i)?U:null;if(e){const s=e.exec(i);s?.[1]&&(n=he(s[1]))}}return null!=n?ie(n):null}function me(e){const s=oe(e);return null!=s&&v.includes(s)?s:null}function fe(e){const s=te(e);return null!=s&&v.includes(s)?s:null}function de(e){const s=oe(e);return null==s?null:P.get(s)}function Ue(e){return/^GEOCCS/i.test(e)}function be(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const Be=1e-7;function he(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!ie(i)){const s=le(e);i=null;const n=d.values;for(let e=0;e<n.length;++e)if(Math.abs(s-n[e])<Be){i=d.units[e];break}}return i}function _e(e){const s=oe(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const ke={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},ye={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},qe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},pe=e()(ke),we=e()(ye),ge=e()(qe);export{V as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,W as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,Z as adaptiveImperialVolumeUnit,G as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,L as adaptiveMetricLengthUnit,Y as adaptiveMetricVerticalLengthUnit,X as adaptiveMetricVolumeUnit,H as adaptiveVerticalLengthUnit,ee as adaptiveVolumeUnit,ge as angleUnitsJSONMap,de as areaUnitFromSpatialReference,pe as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,O as convertFromSpatialReferenceUnit,F as convertToSpatialReferenceUnit,N as convertUnit,K as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,A as defaultVolumeUnit,_e as getDefaultUnitSystem,ce as getMetersPerCartesianUnitForSR,re as getMetersPerUnit,ae as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,oe as getUnitString,te as getVerticalUnitStringForSR,b as gradGcsIds,o as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,be as isProjectedWKT,se as lengthToDegrees,me as lengthUnitFromSpatialReference,w as lengthUnits,we as lengthUnitsJSONMap,D as measurementAreaUnits,v as measurementLengthUnits,C as measurementVolumeUnits,ie as unitFromRESTJSON,E as unitType,fe as verticalLengthUnitFromSpatialReference};
5
+ import"./has.js";import{strict as e}from"./jsonMap.js";import{getReferenceEllipsoid as s}from"../geometry/ellipsoidUtils.js";import{earth as i,mars as n,moon as t}from"../geometry/support/Ellipsoid.js";import{isGeographic as a,isWKIDFromMars as r,isWKIDFromMoon as c,isEarth as u}from"../geometry/support/spatialReferenceUtils.js";import l from"../geometry/support/WKIDUnitConversion.js";const o=39.37,m=i.radius*Math.PI/200,f=/(?:LENGTH)?UNIT\[([^\]]+)]]$/i,d=l,U=/UNIT\[([^\]]+)]/i,b=new Set([4305,4807,4810,4811,4812,4816,4819,4821,4901,4902,37225,104025,104026,104139,104140]),B=e()({millimeter:"millimeters",centimeter:"centimeters",meter:"meters",meter_german:"german-meters",kilometer:"kilometers",decimeter:"decimeters",micrometer:"micrometers",nanometer:"nanometers","50_kilometers":"50-kilometers","150_kilometers":"150-kilometers",foot:"feet",foot_us:"us-feet",foot_clarke:"clarke-feet",fathom:"fathoms",nautical_mile:"nautical-miles",chain_us:"us-chains",link_us:"us-links",mile_us:"us-miles",yard_clarke:"clarke-yards",chain_clarke:"clarke-chains",link_clarke:"clarke-links",yard_sears:"sears-yards",foot_sears:"sears-feet",chain_sears:"sears-chains",link_sears:"sears-links",yard_benoit_1895_a:"benoit-1895-a-yards",foot_benoit_1895_a:"benoit-1895-a-feet",chain_benoit_1895_a:"benoit-1895-a-chains",link_benoit_1895_a:"benoit-1895-a-links",yard_benoit_1895_b:"benoit-1895-b-yards",foot_benoit_1895_b:"benoit-1895-b-feet",chain_benoit_1895_b:"benoit-1895-b-chains",link_benoit_1895_b:"benoit-1895-b-links",foot_1865:"1865-feet",foot_indian:"indian-feet",foot_indian_1937:"indian-1937-feet",foot_indian_1962:"indian-1962-feet",foot_indian_1975:"indian-1975-feet",yard_indian:"indian-yards",yard_indian_1937:"indian-1937-yards",yard_indian_1962:"indian-1962-yards",yard_indian_1975:"indian-1975-yards",statute_mile:"statute-miles",foot_gold_coast:"gold-coast-feet",foot_british_1936:"british-1936-feet",yard:"yards",chain:"chains",link:"links",yard_sears_1922_truncated:"sears-1922-truncated-yards",foot_sears_1922_truncated:"sears-1922-truncated-feet",chain_sears_1922_truncated:"sears-1922-truncated-chains",link_sears_1922_truncated:"sears-1922-truncated-links",yard_us:"us-yards",inch:"inches",inch_us:"us-inches",rod:"rods",rod_us:"us-rods",nautical_mile_us:"us-nautical-miles",nautical_mile_uk:"uk-nautical-miles",smoot:"smoots",vara_tx:"tx-vara",point:"points"}),h=e=>e*e,_=e=>e*e*e,k={length:{baseUnit:"meters",units:{millimeters:{inBaseUnits:.001},centimeters:{inBaseUnits:.01},meters:{inBaseUnits:1},feet:{inBaseUnits:.3048},"us-feet":{inBaseUnits:.3048006096012192},"clarke-feet":{inBaseUnits:.3047972654},fathoms:{inBaseUnits:1.8288},"nautical-miles":{inBaseUnits:1852},"german-meters":{inBaseUnits:1.0000135965},"us-chains":{inBaseUnits:20.11684023368047},"us-links":{inBaseUnits:.2011684023368047},"us-miles":{inBaseUnits:1609.347218694438},kilometers:{inBaseUnits:1e3},"clarke-yards":{inBaseUnits:.9143917962},"clarke-chains":{inBaseUnits:20.1166195164},"clarke-links":{inBaseUnits:.201166195164},"sears-yards":{inBaseUnits:.9143984146160287},"sears-feet":{inBaseUnits:.3047994715386762},"sears-chains":{inBaseUnits:20.11676512155263},"sears-links":{inBaseUnits:.2011676512155263},"benoit-1895-a-yards":{inBaseUnits:.9143992},"benoit-1895-a-feet":{inBaseUnits:.3047997333333333},"benoit-1895-a-chains":{inBaseUnits:20.1167824},"benoit-1895-a-links":{inBaseUnits:.201167824},"benoit-1895-b-yards":{inBaseUnits:.9143992042898124},"benoit-1895-b-feet":{inBaseUnits:.3047997347632708},"benoit-1895-b-chains":{inBaseUnits:20.11678249437587},"benoit-1895-b-links":{inBaseUnits:.2011678249437587},"1865-feet":{inBaseUnits:.3048008333333334},"indian-feet":{inBaseUnits:.3047995102481469},"indian-1937-feet":{inBaseUnits:.30479841},"indian-1962-feet":{inBaseUnits:.3047996},"indian-1975-feet":{inBaseUnits:.3047995},"indian-yards":{inBaseUnits:.9143985307444408},"indian-1937-yards":{inBaseUnits:.91439523},"indian-1962-yards":{inBaseUnits:.9143988},"indian-1975-yards":{inBaseUnits:.9143985},miles:{inBaseUnits:1609.344},"statute-miles":{inBaseUnits:1609.344},"gold-coast-feet":{inBaseUnits:.3047997101815088},"british-1936-feet":{inBaseUnits:.3048007491},yards:{inBaseUnits:.9144},chains:{inBaseUnits:20.1168},links:{inBaseUnits:.201168},"sears-1922-truncated-yards":{inBaseUnits:.914398},"sears-1922-truncated-feet":{inBaseUnits:.3047993333333334},"sears-1922-truncated-chains":{inBaseUnits:20.116756},"sears-1922-truncated-links":{inBaseUnits:.20116756},"us-yards":{inBaseUnits:.9144018288036576},decimeters:{inBaseUnits:.1},inches:{inBaseUnits:.0254},"us-inches":{inBaseUnits:.0254000508001016},rods:{inBaseUnits:5.0292},"us-rods":{inBaseUnits:5.029210058420118},"us-nautical-miles":{inBaseUnits:1853.248},"uk-nautical-miles":{inBaseUnits:1853.184},smoots:{inBaseUnits:1.7018},"tx-vara":{inBaseUnits:.8466683600033867},points:{inBaseUnits:.0003527777777777778},micrometers:{inBaseUnits:1e-6},nanometers:{inBaseUnits:1e-9},"50-kilometers":{inBaseUnits:5e4},"150-kilometers":{inBaseUnits:15e4}}},area:{baseUnit:"square-meters",units:{"square-millimeters":{inBaseUnits:h(.001)},"square-centimeters":{inBaseUnits:h(.01)},"square-decimeters":{inBaseUnits:h(.1)},"square-meters":{inBaseUnits:1},"square-kilometers":{inBaseUnits:h(1e3)},"square-inches":{inBaseUnits:h(.0254)},"square-feet":{inBaseUnits:h(.3048)},"square-yards":{inBaseUnits:h(.9144)},"square-miles":{inBaseUnits:h(1609.344)},"square-nautical-miles":{inBaseUnits:h(1852)},"square-us-feet":{inBaseUnits:h(1200/3937)},acres:{inBaseUnits:.0015625*h(1609.344)},ares:{inBaseUnits:100},hectares:{inBaseUnits:1e4}}},volume:{baseUnit:"liters",units:{liters:{inBaseUnits:1},"cubic-millimeters":{inBaseUnits:1e3*_(.001)},"cubic-centimeters":{inBaseUnits:1e3*_(.01)},"cubic-decimeters":{inBaseUnits:1e3*_(.1)},"cubic-meters":{inBaseUnits:1e3},"cubic-kilometers":{inBaseUnits:1e3*_(1e3)},"cubic-inches":{inBaseUnits:1e3*_(.0254)},"cubic-feet":{inBaseUnits:1e3*_(.3048)},"cubic-yards":{inBaseUnits:1e3*_(.9144)},"cubic-miles":{inBaseUnits:1e3*_(1609.344)}}},angle:{baseUnit:"radians",units:{radians:{inBaseUnits:1},degrees:{inBaseUnits:Math.PI/180}}}},y=(()=>{const e={};for(const s in k)for(const i in k[s].units)e[i]=s;return e})();function q(e,s,i){return e*k[i].units[s].inBaseUnits}function p(e,s,i){return e/k[i].units[s].inBaseUnits}const w=["inches","feet","yards","miles","nautical-miles","us-feet","millimeters","centimeters","decimeters","meters","kilometers"],g=["square-inches","square-feet","square-yards","square-miles","square-nautical-miles","square-us-feet","square-millimeters","square-centimeters","square-decimeters","square-meters","square-kilometers","acres","ares","hectares"],M=["cubic-inches","cubic-feet","cubic-yards","cubic-miles","liters","cubic-millimeters","cubic-centimeters","cubic-decimeters","cubic-meters","cubic-kilometers"],S=["metric","imperial"],D=[...S,...g],v=[...S,...w],C=[...S,...M],P=new Map([["meters","square-meters"],["feet","square-feet"],["us-feet","square-us-feet"]]);function x(e){return"imperial"===e||"metric"===e}function E(e){const s=y[e];if(!s)throw new Error("unknown type");return s}function I(e){return k[e].baseUnit}function j(e){return I(E(e))}function R(e,s=null){return s=s||E(e),k[s].baseUnit===e}function N(e,s,i){if(s===i)return e;const n=E(s);if(n!==E(i))throw new Error("incompatible units");const t=R(s,n)?e:q(e,s,n);return R(i,n)?t:p(t,i,n)}function O(e,s,i,n=!1){if(!n&&a(s))throw new Error("Unable to convert from an angular unit to a linear unit.");const t=oe(s);return t!==i&&(e=t?N(e,t,i):N(e*=ae(s),"meters",i)),e}function F(e,s,i,n=!1){if(!n&&a(i))throw new Error("Unable to convert from a linear unit to an angular unit.");const t=oe(i);return s!==t&&(e=t?N(e,s,t):N(e,s,"meters")/ae(i)),e}function J(e){switch(e){case"metric":return"meters";case"imperial":return"feet";default:return e}}function T(e){return J(e)}function K(e){switch(e){case"metric":return"square-meters";case"imperial":return"square-feet";default:return e}}function A(e){switch(e){case"metric":return"cubic-meters";case"imperial":return"cubic-feet";default:return e}}function G(e,s,i){switch(i){case"metric":return L(e,s);case"imperial":return W(e,s);default:return i}}function H(e,s,i){switch(i){case"metric":return Y(e,s);case"imperial":return $(e,s);default:return i}}function L(e,s){const i=N(e,s,"meters");return Math.abs(i)<3e3?"meters":"kilometers"}function Y(e,s){const i=N(e,s,"meters");return Math.abs(i)<1e5?"meters":"kilometers"}function W(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e3?"feet":"miles"}function $(e,s){const i=N(e,s,"feet");return Math.abs(i)<1e5?"feet":"miles"}function z(e,s){const i=N(e,s,"square-meters");return Math.abs(i)<3e6?"square-meters":"square-kilometers"}function Q(e,s){const i=N(e,s,"square-feet");return Math.abs(i)<1e6?"square-feet":"square-miles"}function V(e,s,i){switch(i){case"metric":return z(e,s);case"imperial":return Q(e,s);default:return i}}function X(e,s){const i=N(e,s,"cubic-meters");return Math.abs(i)<3e8?"cubic-meters":"cubic-kilometers"}function Z(e,s){const i=N(e,s,"cubic-feet");return Math.abs(i)<1e8?"cubic-feet":"cubic-miles"}function ee(e,s,i){switch(i){case"metric":return X(e,s);case"imperial":return Z(e,s);default:return i}}function se(e,s,i){return N(e,s,"meters")/(i*Math.PI/180)}function ie(e){return B.fromJSON(e.toLowerCase())||null}function ne(e){return null==e||u(e)?re(e,!1)??1:1}function te(e){return ae(e)>=s(e).metersPerDegree?"meters":oe(e)}function ae(e,s=i.metersPerDegree){return re(e,!0)??s}function re(e,s=!1){const i=e?.wkid??null,a=e?.wkt2??e?.wkt??null;let u=null;if(i){if(r(i))return n.metersPerDegree;if(c(i))return t.metersPerDegree;u=d.values[d[i]],!u&&s&&b.has(i)&&(u=m)}else a&&(be(a)?u=ue(f.exec(a),u):Ue(a)&&(u=ue(U.exec(a),u)));return u}function ce(e){return a(e)?1:ae(e)}function ue(e,s){return e?.[1]?le(e[1]):s}function le(e){return parseFloat(e.split(",")[1])}function oe(e){const s=e?.wkid??null,i=e?.wkt2??e?.wkt??null;let n=null;if(s)n=d.units[d[s]];else if(i){const e=be(i)?f:Ue(i)?U:null;if(e){const s=e.exec(i);s?.[1]&&(n=he(s[1]))}}return null!=n?ie(n):null}function me(e){const s=oe(e);return null!=s&&v.includes(s)?s:null}function fe(e){const s=te(e);return null!=s&&v.includes(s)?s:null}function de(e){const s=oe(e);return null==s?null:P.get(s)}function Ue(e){return/^GEOCCS/i.test(e)}function be(e){return/^\s*(?:PROJCS|PROJCRS|PROJECTEDCRS)/i.test(e)}const Be=1e-7;function he(e){const s=/[\\"']([^\\"']+)/.exec(e);let i=s?.[1];if(!i||!ie(i)){const s=le(e);i=null;const n=d.values;for(let e=0;e<n.length;++e)if(Math.abs(s-n[e])<Be){i=d.units[e];break}}return i}function _e(e){const s=oe(e);if(null==s)return null;switch(s){case"feet":case"us-feet":case"clarke-feet":case"fathoms":case"nautical-miles":case"us-chains":case"us-links":case"us-miles":case"clarke-yards":case"clarke-chains":case"clarke-links":case"sears-yards":case"sears-feet":case"sears-chains":case"sears-links":case"benoit-1895-a-yards":case"benoit-1895-a-feet":case"benoit-1895-a-chains":case"benoit-1895-a-links":case"benoit-1895-b-yards":case"benoit-1895-b-feet":case"benoit-1895-b-chains":case"benoit-1895-b-links":case"1865-feet":case"indian-feet":case"indian-1937-feet":case"indian-1962-feet":case"indian-1975-feet":case"indian-yards":case"indian-1937-yards":case"indian-1962-yards":case"indian-1975-yards":case"statute-miles":case"gold-coast-feet":case"british-1936-feet":case"yards":case"chains":case"links":case"sears-1922-truncated-yards":case"sears-1922-truncated-feet":case"sears-1922-truncated-chains":case"sears-1922-truncated-links":case"us-yards":case"inches":case"us-inches":case"rods":case"us-rods":case"us-nautical-miles":case"uk-nautical-miles":case"smoots":case"tx-vara":case"points":return"imperial";case"millimeters":case"centimeters":case"meters":case"german-meters":case"kilometers":case"decimeters":case"micrometers":case"nanometers":case"50-kilometers":case"150-kilometers":return"metric"}return null}const ke={esriAcres:"acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-feet",esriSquareInches:"square-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-miles",esriSquareMillimeters:"square-millimeters",esriSquareUsFeet:"square-us-feet",esriSquareYards:"square-yards"},ye={esriCentimeters:"centimeters",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriYards:"yards"},qe={esriDUDecimalDegrees:"degrees",esriDURadians:"radians"},pe=e()(ke),we=e()(ye),ge=e()(qe);export{V as adaptiveAreaUnit,Q as adaptiveImperialAreaUnit,W as adaptiveImperialLengthUnit,$ as adaptiveImperialVerticalLengthUnit,Z as adaptiveImperialVolumeUnit,G as adaptiveLengthUnit,z as adaptiveMetricAreaUnit,L as adaptiveMetricLengthUnit,Y as adaptiveMetricVerticalLengthUnit,X as adaptiveMetricVolumeUnit,H as adaptiveVerticalLengthUnit,ee as adaptiveVolumeUnit,ge as angleUnitsJSONMap,de as areaUnitFromSpatialReference,pe as areaUnitsJSONMap,j as baseUnitForUnit,I as baseUnitForUnitType,O as convertFromSpatialReferenceUnit,F as convertToSpatialReferenceUnit,N as convertUnit,K as defaultAreaUnit,J as defaultLengthUnit,T as defaultVerticalLengthUnit,A as defaultVolumeUnit,_e as getDefaultUnitSystem,ce as getMetersPerCartesianUnitForSR,re as getMetersPerUnit,ae as getMetersPerUnitForSR,ne as getMetersPerVerticalUnitForSR,oe as getUnitString,te as getVerticalUnitStringForSR,b as gradGcsIds,o as inchesPerMeter,R as isBaseUnit,x as isMeasurementSystem,be as isProjectedWKT,se as lengthToDegrees,me as lengthUnitFromSpatialReference,w as lengthUnits,we as lengthUnitsJSONMap,D as measurementAreaUnits,v as measurementLengthUnits,C as measurementVolumeUnits,ie as unitFromRESTJSON,E as unitType,fe as verticalLengthUnitFromSpatialReference};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{getAssetUrl as e}from"../../assets.js";import r from"../../config.js";import{getLocale as t}from"../../intl.js";import{fullVersion as o}from"../../kernel.js";import has from"../has.js";import s from"../Logger.js";import{makeAbsolute as a}from"../urlUtils.js";import{loaderConfig as n}from"./loaderConfig.js";import{receiveMessage as i,MessageType as l}from"./utils.js";import f from"./WorkerFallback.js";import{commitHash as u,buildDate as c}from"../../support/revision.js";const d=()=>s.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:m}=l,p='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}).finally(()=>{t&&t.removeEventListener("abort",s)})}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://esriurl.com/using-local-assets.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(e=>e||new Promise(e=>{require([o.modulePath],e)})).then(t)}):"System"in self&&"function"==typeof System.import?System.import(workerPath).then(e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath))).then(e=>e||System.import(o.modulePath)).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(e=>e||import(o.modulePath)).then(t)}):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});';let g,y;const h="Failed to create Worker. Fallback to execute module in main thread";async function k(){if(!has("esri-workers"))return w(new f);if(!g&&!y)try{const e=p.split("{CONFIGURATION}").join(b());g=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(r){y=r||{}}let e;if(g)try{e=new Worker(g,{name:"esri-worker-"+v++})}catch(r){d().warn(h,y),e=new f}else d().warn(h,y),e=new f;return w(e)}async function w(e){return new Promise(r=>{function t(s){const a=i(s);a&&a.type===m&&(e.removeEventListener("message",t),e.removeEventListener("error",o),r(e))}function o(r){r.preventDefault(),e.removeEventListener("message",t),e.removeEventListener("error",o),d().warn("Failed to create Worker. Fallback to execute module in main thread",r),(e=new f).addEventListener("message",t),e.addEventListener("error",o)}e.addEventListener("message",t),e.addEventListener("error",o)})}function b(){let s;if(null!=r.default){const e={...r};delete e.default,s=JSON.parse(JSON.stringify(e))}else s=JSON.parse(JSON.stringify(r));s.assetsPath=a(s.assetsPath),s.defaultAssetsPath=s.defaultAssetsPath?a(s.defaultAssetsPath):void 0,s.request.interceptors=[],s.log.interceptors=[],s.locale=t(),s.has={"esri-csp-restrictions":has("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":has("esri-2d-update-debug"),"esri-2d-log-updating":has("esri-2d-log-updating"),"featurelayer-pbf":has("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":has("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":has("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":has("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":has("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":has("featurelayer-query-max-depth"),"featurelayer-query-tile-max-features":has("featurelayer-query-tile-max-features"),"featurelayer-query-tile-concurrency":has("featurelayer-query-tile-concurrency"),"featurelayer-query-pausing-enabled":has("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-concurrency":has("featurelayer-snapshot-concurrency"),"featurelayer-snapshot-enabled":has("featurelayer-snapshot-enabled"),"parquetlayer-full-query-feature-count":has("parquetlayer-full-query-feature-count"),"esri-atomics":has("esri-atomics"),"esri-shared-array-buffer":has("esri-shared-array-buffer"),"esri-tiles-debug":has("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":has("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":has("feature-polyline-generalization-factor"),"host-webworker":1},s.workers.loaderUrl&&(s.workers.loaderUrl=a(s.workers.loaderUrl)),s.workers.workerPath?s.workers.workerPath=a(s.workers.workerPath):s.workers.workerPath=a(e("esri/core/workers/RemoteClient.js")),s.workers.useDynamicImport=has("esri-esbuild-build")||!1;const i=r.workers.loaderConfig,l=n({baseUrl:i?.baseUrl,locale:t(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...i?.has},map:{...i?.map},paths:{...i?.paths},packages:i?.packages||[]}),f={buildDate:c,fullVersion:o,revision:u};return JSON.stringify({esriConfig:s,loaderConfig:l,kernelInfo:f})}let v=0;export{k as createWorker};
5
+ import{getAssetUrl as e}from"../../assets.js";import r from"../../config.js";import{getLocale as t}from"../../intl.js";import{fullVersion as o}from"../../kernel.js";import has from"../has.js";import s from"../Logger.js";import{makeAbsolute as a}from"../urlUtils.js";import{loaderConfig as n}from"./loaderConfig.js";import{receiveMessage as i,MessageType as l}from"./utils.js";import f from"./WorkerFallback.js";import{commitHash as u,buildDate as c}from"../../support/revision.js";const d=()=>s.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:m}=l,p='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}).finally(()=>{t&&t.removeEventListener("abort",s)})}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://esriurl.com/using-local-assets.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(e=>e||new Promise(e=>{require([o.modulePath],e)})).then(t)}):"System"in self&&"function"==typeof System.import?System.import(workerPath).then(e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath))).then(e=>e||System.import(o.modulePath)).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(e=>e||import(o.modulePath)).then(t)}):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});';let g,y;const h="Failed to create Worker. Fallback to execute module in main thread",k=void 0;async function w(){if(!has("esri-workers"))return b(new f);if(!g&&!y)try{const e=p.split("{CONFIGURATION}").join(v());g=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(r){y=r||{}}let e;if(g)try{e=new Worker(g,{name:"esri-worker-"+P++,...k})}catch(r){d().warn(h,y),e=new f}else d().warn(h,y),e=new f;return b(e)}async function b(e){return new Promise(r=>{function t(s){const a=i(s);a&&a.type===m&&(e.removeEventListener("message",t),e.removeEventListener("error",o),r(e))}function o(r){r.preventDefault(),e.removeEventListener("message",t),e.removeEventListener("error",o),d().warn("Failed to create Worker. Fallback to execute module in main thread",r),(e=new f).addEventListener("message",t),e.addEventListener("error",o)}e.addEventListener("message",t),e.addEventListener("error",o)})}function v(){let s;if(null!=r.default){const e={...r};delete e.default,s=JSON.parse(JSON.stringify(e))}else s=JSON.parse(JSON.stringify(r));s.assetsPath=a(s.assetsPath),s.defaultAssetsPath=s.defaultAssetsPath?a(s.defaultAssetsPath):void 0,s.request.interceptors=[],s.log.interceptors=[],s.locale=t(),s.has={"esri-csp-restrictions":has("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":has("esri-2d-update-debug"),"esri-2d-log-updating":has("esri-2d-log-updating"),"featurelayer-pbf":has("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":has("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":has("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":has("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":has("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":has("featurelayer-query-max-depth"),"featurelayer-query-tile-max-features":has("featurelayer-query-tile-max-features"),"featurelayer-query-tile-concurrency":has("featurelayer-query-tile-concurrency"),"featurelayer-query-pausing-enabled":has("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-concurrency":has("featurelayer-snapshot-concurrency"),"featurelayer-snapshot-enabled":has("featurelayer-snapshot-enabled"),"parquetlayer-full-query-feature-count":has("parquetlayer-full-query-feature-count"),"esri-atomics":has("esri-atomics"),"esri-shared-array-buffer":has("esri-shared-array-buffer"),"esri-tiles-debug":has("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":has("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":has("feature-polyline-generalization-factor"),"host-webworker":1},s.workers.loaderUrl&&(s.workers.loaderUrl=a(s.workers.loaderUrl)),s.workers.workerPath?s.workers.workerPath=a(s.workers.workerPath):s.workers.workerPath=a(e("esri/core/workers/RemoteClient.js")),s.workers.useDynamicImport=has("esri-esbuild-build");const i=r.workers.loaderConfig,l=n({baseUrl:i?.baseUrl,locale:t(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...i?.has},map:{...i?.map},paths:{...i?.paths},packages:i?.packages||[]}),f={buildDate:c,fullVersion:o,revision:u};return JSON.stringify({esriConfig:s,loaderConfig:l,kernelInfo:f})}let P=0;export{w as createWorker};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../core/Error.js";import{isLoadedSharedTemplate as e,isSharedPresetTemplate as o,isSharedFeatureTemplate as r}from"../../../../templateUtils.js";import{createFeatureServiceEdit as n}from"../../support/createFeatureServiceEdit.js";import{createPresetServiceEdit as s}from"../../support/createPresetServiceEdit.js";import i from"../../../../../geometry/Polygon.js";import{isPoint as a,isPolygon as l}from"../../../../../geometry/support/jsonUtils.js";function u({edits:i,mode:l,relationships:u,shape:p,templatePart:f},c=""){if(null===f)return;const{template:m}=f;if(!e(m))throw new t("shared-template:template-not-loaded","A template part's template must be loaded before use");if(o(m)){if(!a(p))throw new t("shared-template:invalid-geometry","Preset templates must have a point geometry");s({geometry:p,template:m,edits:i,relationships:u,rotation:0,mode:l,tag:c})}else r(m)&&n({geometry:p,template:m,edits:i,relationships:u,tag:c})}function p(t,e){if(!t||!l(t))return null;if(!e.hasZ&&!e.hasM)return t;let o=null,r=null;const n=e.hasZ&&e.hasM?3:2;switch(e.type){case"point":o=e.hasZ?e.z:null,r=e.hasM?e.m:null;break;case"polygon":case"polyline":{const t="polygon"===e.type?e.rings:e.paths;for(const s of t)for(const t of s)e.hasZ&&(null===o||t[2]>o)&&(o=t[2]),e.hasM&&(null===r||t[n]>r)&&(r=t[n])}break;case"multipoint":for(const t of e.points)e.hasZ&&(null===o||t[2]>o)&&(o=t[2]),e.hasM&&(null===r||t[n]>r)&&(r=t[n]);break;default:return t}const s=v(t.rings,e.hasZ,e.hasM,o,r);return new i({rings:s,spatialReference:t.spatialReference,hasZ:e.hasZ,hasM:e.hasM})}function f(t){let e=!1;return void 0!==t.byNumber&&(e=!0===t.byNumber),e}function c(t){let e=0;return void 0!==t.count&&(e=t.count),e}function m(t,e){let o=0;return e?void 0!==t.proportional&&(o=t.proportional):void 0!==t.distanceValue&&(o=t.distanceValue),e&&(o/=100),o}function h(t){return!0===t.isProportional}function d(t){return!1!==t.createUnique}function g(t){let e=0;return void 0!==t.offsetDistance&&(e=t.offsetDistance),void 0!==t.side&&1===t.side&&(e*=-1),e}function y(t){return!0===t.vertexBeforeOffset}function v(t,e,o,r,n){const s=[];for(const i of t)s.push(b(i,e,o,r,n));return s}function b(t,e,o,r,n){const s=[];for(const i of t){const t=[i[0],i[1]];e&&(t[2]=r),o&&(t[e?3:2]=n),s.push(t)}return s}export{p as correctZandMFollowingBuffer,u as makeFeatureFromGroupPart,f as readByNumber,c as readCount,m as readDistance,h as readIsProportional,d as readIsUnique,g as readOffsetDistance,y as readVertexBeforeOffset};
5
+ import e from"../../../../../core/Error.js";import{isLoadedSharedTemplate as t,isSharedPresetTemplate as o,isSharedFeatureTemplate as r}from"../../../../templateUtils.js";import{createFeatureServiceEdit as n}from"../../support/createFeatureServiceEdit.js";import{createPresetServiceEdit as s}from"../../support/createPresetServiceEdit.js";import i from"../../../../../geometry/Polygon.js";import{isPoint as a,isPolygon as l}from"../../../../../geometry/support/jsonTypeUtils.js";function u({edits:i,mode:l,relationships:u,shape:p,templatePart:f},c=""){if(null===f)return;const{template:m}=f;if(!t(m))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(o(m)){if(!a(p))throw new e("shared-template:invalid-geometry","Preset templates must have a point geometry");s({geometry:p,template:m,edits:i,relationships:u,rotation:0,mode:l,tag:c})}else r(m)&&n({geometry:p,template:m,edits:i,relationships:u,tag:c})}function p(e,t){if(!e||!l(e))return null;if(!t.hasZ&&!t.hasM)return e;let o=null,r=null;const n=t.hasZ&&t.hasM?3:2;switch(t.type){case"point":o=t.hasZ?t.z:null,r=t.hasM?t.m:null;break;case"polygon":case"polyline":{const e="polygon"===t.type?t.rings:t.paths;for(const s of e)for(const e of s)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===r||e[n]>r)&&(r=e[n])}break;case"multipoint":for(const e of t.points)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===r||e[n]>r)&&(r=e[n]);break;default:return e}const s=v(e.rings,t.hasZ,t.hasM,o,r);return new i({rings:s,spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM})}function f(e){let t=!1;return void 0!==e.byNumber&&(t=!0===e.byNumber),t}function c(e){let t=0;return void 0!==e.count&&(t=e.count),t}function m(e,t){let o=0;return t?void 0!==e.proportional&&(o=e.proportional):void 0!==e.distanceValue&&(o=e.distanceValue),t&&(o/=100),o}function h(e){return!0===e.isProportional}function d(e){return!1!==e.createUnique}function y(e){let t=0;return void 0!==e.offsetDistance&&(t=e.offsetDistance),void 0!==e.side&&1===e.side&&(t*=-1),t}function g(e){return!0===e.vertexBeforeOffset}function v(e,t,o,r,n){const s=[];for(const i of e)s.push(b(i,t,o,r,n));return s}function b(e,t,o,r,n){const s=[];for(const i of e){const e=[i[0],i[1]];t&&(e[2]=r),o&&(e[t?3:2]=n),s.push(e)}return s}export{p as correctZandMFollowingBuffer,u as makeFeatureFromGroupPart,f as readByNumber,c as readCount,m as readDistance,h as readIsProportional,d as readIsUnique,y as readOffsetDistance,g as readVertexBeforeOffset};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{getHeightUnitCorrectionFactor as t}from"../../../../geometry/coordUtils.js";import{segmentLength3d as e}from"../../../../geometry/lineUtils.js";import{makeFeatureFromGroupPart as s}from"./builderUtils.js";import{pointAlongLineWithZAndOffset as o,pointAlongLineAndOffset as r,pointFromPolylineVertex as i,offsetPointFromSegment as n,computedTotalLength as a}from"./shapeUtils.js";import{maxDigitizingDisplayEdits as p}from"../../support/executorUtils.js";import{execute as h}from"../../../../../geometry/operators/offsetOperator.js";import{getLength as l}from"../../../../../geometry/support/coordsUtils.js";import{isPolyline as f}from"../../../../../geometry/support/jsonUtils.js";function m({templatePart:a,edits:h,relationships:m,shape:c,distance:u,isProportional:d,offsetDistance:j,vertexBeforeOffset:P,vertexPlacement:U,mode:x}){const y=P||0===j?c:g(c,j);if(null===y||!f(y))return;const V=t(y.spatialReference);j=P?j:0;let Z=0,v=null,O=0;for(let t=0;t<y.paths.length;t++){if(h.length>p&&"digitizing"===x)return;const f=y.paths[t].length,g=t===y.paths.length-1;for(let c=0;c<f;c++){if(h.length>p&&"digitizing"===x)return;if(c>0&&0!==u&&(Z+=y.hasZ?e(y.paths[t][c-1],y.paths[t][c],V):l(y.paths[t][c-1],y.paths[t][c])),(0!==c||1!==U)&&!(c===f-1&&2===U&&g||(0===c||c===f-1&&g)&&3===U||0===c&&u<0&&d||c===f-1&&u>0&&d)){if(0!==u){let s=1;if(d){const o=u<0?c-1:c+1;if(o>=f||o<0)continue;s=y.hasZ?e(y.paths[t][c],y.paths[t][o],V):l(y.paths[t][c],y.paths[t][o])}const i=Z+s*u;v=y.hasZ?o(y,i,j,V):r(y,i,0)}else v=i(y,t,c),0!==j&&(v=n(v,c===f-1?[y.paths[t][c-1],y.paths[t][c]]:[y.paths[t][c],y.paths[t][c+1]],j));v&&s({templatePart:a,shape:v,edits:h,relationships:m,mode:x},`V${(O+c).toString()}`)}}O+=f}}function g(t,e){return h(t,e,{unit:"meters",joins:"miter",miterLimit:2})}function c(t){let e=0;for(const s of t.paths)e+=s.length;return e}function u({templatePart:p,edits:h,relationships:m,shape:u,distance:d,isProportional:j,offsetDistance:P,vertexBeforeOffset:U,vertexPlacement:x,mode:y}){const V=U||0===P?u:g(u,P);if(null===V||!f(V))return;const Z=t(V.spatialReference);P=U?P:0;let v=null,O="";if(0!==d){const t=4===x?0:V.paths.length-1,s=4===x?0:V.paths[V.paths.length-1].length-1,i=4===x?0:a(V),n=4===x?V.paths[0].length:V.paths[V.paths.length-1].length;let p=1;if(j){const o=d<0?s-1:s+1;if(o>=n||o<0)return;p=V.hasZ?e(V.paths[t][s],V.paths[t][o],Z):l(V.paths[t][s],V.paths[t][o])}const h=i+p*d;v=V.hasZ?o(V,h,P,Z):r(V,h,P),O=4===x?"V0":`V${(c(V)-1).toString()}`}else{if(v=4===x?i(V,0,0):i(V,V.paths.length-1,V.paths[V.paths.length-1].length-1),0!==P)if(4===x)v=n(v,[V.paths[0][0],V.paths[0][1]],P);else{const t=V.paths[V.paths.length-1];v=n(v,[t[t.length-2],t[t.length-1]],P)}O=4===x?"V0":`V${(c(V)-1).toString()}`}v&&s({templatePart:p,shape:v,edits:h,relationships:m,mode:y},O)}export{m as lineVerticesOffset,g as offset,u as vertexOffsetFromStartOrEndOfLine};
5
+ import{getHeightUnitCorrectionFactor as t}from"../../../../geometry/coordUtils.js";import{segmentLength3d as e}from"../../../../geometry/lineUtils.js";import{makeFeatureFromGroupPart as s}from"./builderUtils.js";import{pointAlongLineWithZAndOffset as o,pointAlongLineAndOffset as r,pointFromPolylineVertex as i,offsetPointFromSegment as n,computedTotalLength as a}from"./shapeUtils.js";import{maxDigitizingDisplayEdits as p}from"../../support/executorUtils.js";import{execute as h}from"../../../../../geometry/operators/offsetOperator.js";import{getLength as l}from"../../../../../geometry/support/coordsUtils.js";import{isPolyline as f}from"../../../../../geometry/support/jsonTypeUtils.js";function m({templatePart:a,edits:h,relationships:m,shape:c,distance:u,isProportional:d,offsetDistance:j,vertexBeforeOffset:P,vertexPlacement:U,mode:x}){const y=P||0===j?c:g(c,j);if(null===y||!f(y))return;const V=t(y.spatialReference);j=P?j:0;let Z=0,v=null,O=0;for(let t=0;t<y.paths.length;t++){if(h.length>p&&"digitizing"===x)return;const f=y.paths[t].length,g=t===y.paths.length-1;for(let c=0;c<f;c++){if(h.length>p&&"digitizing"===x)return;if(c>0&&0!==u&&(Z+=y.hasZ?e(y.paths[t][c-1],y.paths[t][c],V):l(y.paths[t][c-1],y.paths[t][c])),(0!==c||1!==U)&&!(c===f-1&&2===U&&g||(0===c||c===f-1&&g)&&3===U||0===c&&u<0&&d||c===f-1&&u>0&&d)){if(0!==u){let s=1;if(d){const o=u<0?c-1:c+1;if(o>=f||o<0)continue;s=y.hasZ?e(y.paths[t][c],y.paths[t][o],V):l(y.paths[t][c],y.paths[t][o])}const i=Z+s*u;v=y.hasZ?o(y,i,j,V):r(y,i,0)}else v=i(y,t,c),0!==j&&(v=n(v,c===f-1?[y.paths[t][c-1],y.paths[t][c]]:[y.paths[t][c],y.paths[t][c+1]],j));v&&s({templatePart:a,shape:v,edits:h,relationships:m,mode:x},`V${(O+c).toString()}`)}}O+=f}}function g(t,e){return h(t,e,{unit:"meters",joins:"miter",miterLimit:2})}function c(t){let e=0;for(const s of t.paths)e+=s.length;return e}function u({templatePart:p,edits:h,relationships:m,shape:u,distance:d,isProportional:j,offsetDistance:P,vertexBeforeOffset:U,vertexPlacement:x,mode:y}){const V=U||0===P?u:g(u,P);if(null===V||!f(V))return;const Z=t(V.spatialReference);P=U?P:0;let v=null,O="";if(0!==d){const t=4===x?0:V.paths.length-1,s=4===x?0:V.paths[V.paths.length-1].length-1,i=4===x?0:a(V),n=4===x?V.paths[0].length:V.paths[V.paths.length-1].length;let p=1;if(j){const o=d<0?s-1:s+1;if(o>=n||o<0)return;p=V.hasZ?e(V.paths[t][s],V.paths[t][o],Z):l(V.paths[t][s],V.paths[t][o])}const h=i+p*d;v=V.hasZ?o(V,h,P,Z):r(V,h,P),O=4===x?"V0":`V${(c(V)-1).toString()}`}else{if(v=4===x?i(V,0,0):i(V,V.paths.length-1,V.paths[V.paths.length-1].length-1),0!==P)if(4===x)v=n(v,[V.paths[0][0],V.paths[0][1]],P);else{const t=V.paths[V.paths.length-1];v=n(v,[t[t.length-2],t[t.length-1]],P)}O=4===x?"V0":`V${(c(V)-1).toString()}`}v&&s({templatePart:p,shape:v,edits:h,relationships:m,mode:y},O)}export{m as lineVerticesOffset,g as offset,u as vertexOffsetFromStartOrEndOfLine};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Graphic.js";import t from"../../../core/Error.js";import r from"../../../core/Logger.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{isPromiseLike as s}from"../../../core/promiseUtils.js";import{generateBracedUUID as i}from"../../../core/uuid.js";import{isLoadedSharedTemplate as a,isSharedFeatureTemplate as l,isSharedGroupTemplate as n,isSharedPresetTemplate as u}from"../../templateUtils.js";import{createFeatureServiceEdit as p}from"./support/createFeatureServiceEdit.js";import{calculateExtent as c,groupEditsByLayer as m}from"./support/executorUtils.js";import{getBuilder as d}from"./support/getBuilder.js";import{isPoint as f}from"../../../geometry/support/jsonUtils.js";import{getAssociationsTableFields as y}from"../../../networks/support/networkFieldUtils.js";const T=()=>r.getLogger("esri.editing.sharedTemplates.executor.createTemplateExecutor"),h="globalid";async function g(e){if(!a(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(l(e))return I(e);if(n(e))return w(e);if(u(e))return G(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function I(e){return t=>{const r=[],o=[];p({geometry:t,template:e,edits:r,relationships:o});const s=c(r);return{edits:m(r),relationships:o,primary:r[0]??null,featureExtent:s,rotationPoint:s?.center??null}}}async function w(e){const{definition:t}=e,r=await Promise.all(t.allParts.map(b));return(o,i)=>{const a=[],l=[],n=new Set,u=()=>{if(t.createUtilityNetworkAssociations&&"completion"===i){const{utilityNetwork:e,utilityNetworkAssociationsTable:r}=t;e&&r?k({associationGraphics:n,associationsTable:r,edits:a,relationships:l,utilityNetworkHelper:e}):T().warn("Unable to create utility network associations between group template features. The utility network or its associations table is unavailable.")}const e=c(a);return{associationGraphics:n,edits:m(a),relationships:l,primary:a[0]??null,featureExtent:e,rotationPoint:e?.center??null}};if(null==o)return T().warn("No geometry provided to group template executor. Result will be empty."),u();const p=r.map(t=>t({edits:a,mode:i,parentTemplate:e,relationships:l,shape:o})).filter(s);return 0===p.length?u():Promise.all(p).then(()=>u())}}async function b(e){const t=await d(e.builderType);return r=>t.execute({...r,templatePart:e})}async function G(e){const{createPresetServiceEdit:r}=await import("./support/createPresetServiceEdit.js");return(o,s,i=0)=>{if(!f(o))throw new t("template-executor:invalid-input-geometry","The input geometry for a preset template must be a point.");const a=[],l=[],n=r({geometry:o,template:e,edits:a,relationships:l,rotation:i,mode:s});return{edits:m(a),relationships:l,primary:a[0]??null,featureExtent:c(a),rotationPoint:n}}}function k(e){const{edits:t,utilityNetworkHelper:r}=e,s=new Map;for(const i of t)""!==i.tag&&r.layerIdToSourceIdLookup.has(i.id)&&o(s,i.tag,()=>[]).push(i);for(const o of s.values())if(!(o.length<2))for(let t=0;t<o.length;t++){const r=o[t];for(let s=t+1;s<o.length;s++){S(r,o[s],e)}}}function S(t,r,o){const{associationGraphics:s,associationsTable:a,edits:l,utilityNetworkHelper:n,relationships:u}=o,p=n.findAgat(t.graphic,t.layer),c=n.findAgat(r.graphic,r.layer);if(!p||!c)return;const m=n.findRules(p).map(e=>e.fromNetworkSource?.sourceId!==p.networkSourceId||e.fromAssetGroup?.assetGroupCode!==p.assetGroup||null!==e.fromAssetType?.assetTypeCode&&e.fromAssetType?.assetTypeCode!==p.assetType||e.toNetworkSource.sourceId!==c.networkSourceId||e.toAssetGroup?.assetGroupCode!==c.assetGroup||null!==e.toAssetType&&e.toAssetType?.assetTypeCode!==c.assetType?e.toNetworkSource.sourceId!==p.networkSourceId||e.toAssetGroup?.assetGroupCode!==p.assetGroup||null!==e.toAssetType&&e.toAssetType?.assetTypeCode!==p.assetType||e.fromNetworkSource.sourceId!==c.networkSourceId||e.fromAssetGroup?.assetGroupCode!==c.assetGroup||null!==e.fromAssetType?.assetTypeCode&&e.fromAssetType?.assetTypeCode!==c.assetType?null:{rule:e,from:{agat:c,item:r},to:{agat:p,item:t}}:{rule:e,from:{agat:p,item:t},to:{agat:c,item:r}}).filter(e=>4===e?.rule.ruleType||5===e?.rule.ruleType||2===e?.rule.ruleType?null:e).filter(e=>null!==e);if(0===m.length)return;const d=y(a),f=new Set;for(const y of m){const t={};t[d.fromNetworkSourceId]=y.rule.fromNetworkSource.sourceId,t[d.fromGlobalId]=y.from.item.graphic.attributes[y.from.item.layer.globalIdField??h],t[d.fromTerminalId]=null,y.rule.fromTerminal&&(t[d.fromTerminalId]=y.rule.fromTerminal.terminalId),t[d.toNetworkSourceId]=y.rule.toNetworkSource.sourceId,t[d.toGlobalId]=y.to.item.graphic.attributes[y.to.item.layer.globalIdField??h],t[d.toTerminalId]=null,y.rule.toTerminal&&(t[d.toTerminalId]=y.rule.toTerminal.terminalId),t[d.associationType]=y.rule.ruleType,t[d.percentAlong]=null,t[d.isContentVisible]=2===y.rule.ruleType?1:0,t[d.status]=0,t[d.globalId]=i();const r=`${t[d.fromNetworkSourceId]}-${t[d.fromGlobalId]}-${t[d.toNetworkSourceId]}-${t[d.toGlobalId]}-${t[d.associationType]}`;if(f.has(r))continue;f.add(r);const o=new e({attributes:t,sourceLayer:a});s.add(o),l.push({id:a.layerId,graphic:o,tag:"",layer:a}),u.push({sourceGraphic:y.to.item.graphic,sourceLayerId:y.to.item.layer.layerId,destinationGraphic:o,destinationLayerId:a.layerId,sourceField:y.to.item.layer.globalIdField??h,destinationField:d.toGlobalId??h}),u.push({sourceGraphic:y.from.item.graphic,sourceLayerId:y.from.item.layer.layerId,destinationGraphic:o,destinationLayerId:a.layerId,sourceField:y.from.item.layer.globalIdField??h,destinationField:d.fromGlobalId??h})}}export{g as createTemplateExecutor};
5
+ import e from"../../../Graphic.js";import t from"../../../core/Error.js";import r from"../../../core/Logger.js";import{getOrCreateMapValue as o}from"../../../core/MapUtils.js";import{isPromiseLike as s}from"../../../core/promiseUtils.js";import{generateBracedUUID as i}from"../../../core/uuid.js";import{isLoadedSharedTemplate as a,isSharedFeatureTemplate as l,isSharedGroupTemplate as n,isSharedPresetTemplate as u}from"../../templateUtils.js";import{createFeatureServiceEdit as p}from"./support/createFeatureServiceEdit.js";import{calculateExtent as c,groupEditsByLayer as m}from"./support/executorUtils.js";import{getBuilder as d}from"./support/getBuilder.js";import{isPoint as f}from"../../../geometry/support/jsonTypeUtils.js";import{getAssociationsTableFields as y}from"../../../networks/support/networkFieldUtils.js";const T=()=>r.getLogger("esri.editing.sharedTemplates.executor.createTemplateExecutor"),h="globalid";async function g(e){if(!a(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(l(e))return I(e);if(n(e))return w(e);if(u(e))return G(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function I(e){return t=>{const r=[],o=[];p({geometry:t,template:e,edits:r,relationships:o});const s=c(r);return{edits:m(r),relationships:o,primary:r[0]??null,featureExtent:s,rotationPoint:s?.center??null}}}async function w(e){const{definition:t}=e,r=await Promise.all(t.allParts.map(b));return(o,i)=>{const a=[],l=[],n=new Set,u=()=>{if(t.createUtilityNetworkAssociations&&"completion"===i){const{utilityNetwork:e,utilityNetworkAssociationsTable:r}=t;e&&r?k({associationGraphics:n,associationsTable:r,edits:a,relationships:l,utilityNetworkHelper:e}):T().warn("Unable to create utility network associations between group template features. The utility network or its associations table is unavailable.")}const e=c(a);return{associationGraphics:n,edits:m(a),relationships:l,primary:a[0]??null,featureExtent:e,rotationPoint:e?.center??null}};if(null==o)return T().warn("No geometry provided to group template executor. Result will be empty."),u();const p=r.map(t=>t({edits:a,mode:i,parentTemplate:e,relationships:l,shape:o})).filter(s);return 0===p.length?u():Promise.all(p).then(()=>u())}}async function b(e){const t=await d(e.builderType);return r=>t.execute({...r,templatePart:e})}async function G(e){const{createPresetServiceEdit:r}=await import("./support/createPresetServiceEdit.js");return(o,s,i=0)=>{if(!f(o))throw new t("template-executor:invalid-input-geometry","The input geometry for a preset template must be a point.");const a=[],l=[],n=r({geometry:o,template:e,edits:a,relationships:l,rotation:i,mode:s});return{edits:m(a),relationships:l,primary:a[0]??null,featureExtent:c(a),rotationPoint:n}}}function k(e){const{edits:t,utilityNetworkHelper:r}=e,s=new Map;for(const i of t)""!==i.tag&&r.layerIdToSourceIdLookup.has(i.id)&&o(s,i.tag,()=>[]).push(i);for(const o of s.values())if(!(o.length<2))for(let t=0;t<o.length;t++){const r=o[t];for(let s=t+1;s<o.length;s++){S(r,o[s],e)}}}function S(t,r,o){const{associationGraphics:s,associationsTable:a,edits:l,utilityNetworkHelper:n,relationships:u}=o,p=n.findAgat(t.graphic,t.layer),c=n.findAgat(r.graphic,r.layer);if(!p||!c)return;const m=n.findRules(p).map(e=>e.fromNetworkSource?.sourceId!==p.networkSourceId||e.fromAssetGroup?.assetGroupCode!==p.assetGroup||null!==e.fromAssetType?.assetTypeCode&&e.fromAssetType?.assetTypeCode!==p.assetType||e.toNetworkSource.sourceId!==c.networkSourceId||e.toAssetGroup?.assetGroupCode!==c.assetGroup||null!==e.toAssetType&&e.toAssetType?.assetTypeCode!==c.assetType?e.toNetworkSource.sourceId!==p.networkSourceId||e.toAssetGroup?.assetGroupCode!==p.assetGroup||null!==e.toAssetType&&e.toAssetType?.assetTypeCode!==p.assetType||e.fromNetworkSource.sourceId!==c.networkSourceId||e.fromAssetGroup?.assetGroupCode!==c.assetGroup||null!==e.fromAssetType?.assetTypeCode&&e.fromAssetType?.assetTypeCode!==c.assetType?null:{rule:e,from:{agat:c,item:r},to:{agat:p,item:t}}:{rule:e,from:{agat:p,item:t},to:{agat:c,item:r}}).filter(e=>4===e?.rule.ruleType||5===e?.rule.ruleType||2===e?.rule.ruleType?null:e).filter(e=>null!==e);if(0===m.length)return;const d=y(a),f=new Set;for(const y of m){const t={};t[d.fromNetworkSourceId]=y.rule.fromNetworkSource.sourceId,t[d.fromGlobalId]=y.from.item.graphic.attributes[y.from.item.layer.globalIdField??h],t[d.fromTerminalId]=null,y.rule.fromTerminal&&(t[d.fromTerminalId]=y.rule.fromTerminal.terminalId),t[d.toNetworkSourceId]=y.rule.toNetworkSource.sourceId,t[d.toGlobalId]=y.to.item.graphic.attributes[y.to.item.layer.globalIdField??h],t[d.toTerminalId]=null,y.rule.toTerminal&&(t[d.toTerminalId]=y.rule.toTerminal.terminalId),t[d.associationType]=y.rule.ruleType,t[d.percentAlong]=null,t[d.isContentVisible]=2===y.rule.ruleType?1:0,t[d.status]=0,t[d.globalId]=i();const r=`${t[d.fromNetworkSourceId]}-${t[d.fromGlobalId]}-${t[d.toNetworkSourceId]}-${t[d.toGlobalId]}-${t[d.associationType]}`;if(f.has(r))continue;f.add(r);const o=new e({attributes:t,sourceLayer:a});s.add(o),l.push({id:a.layerId,graphic:o,tag:"",layer:a}),u.push({sourceGraphic:y.to.item.graphic,sourceLayerId:y.to.item.layer.layerId,destinationGraphic:o,destinationLayerId:a.layerId,sourceField:y.to.item.layer.globalIdField??h,destinationField:d.toGlobalId??h}),u.push({sourceGraphic:y.from.item.graphic,sourceLayerId:y.from.item.layer.layerId,destinationGraphic:o,destinationLayerId:a.layerId,sourceField:y.from.item.layer.globalIdField??h,destinationField:d.fromGlobalId??h})}}export{g as createTemplateExecutor};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__addDisposableResource as t,__disposeResources as e}from"tslib";import r from"./SpatialReference.js";import{empty as s,expandWithExtent as n}from"./support/aaBoundingBox.js";import{empty as i,expandExtentInPlace as a}from"./support/aaBoundingRect.js";import{isPoint as o,isMultipoint as h,isPolyline as u,isGeometryWithM as l,isGeometryWithZ as c}from"./support/jsonUtils.js";import{equals as f}from"./support/spatialReferenceUtils.js";import{interpolateCircle as g}from"./support/curves/circleUtils.js";import{deriveCircleFromCircularArc as m}from"./support/curves/circularArcUtils.js";import{curveExtent as p}from"./support/curves/curveExtent.js";import{isCurvedGeometry as x,isEllipticArc7 as v,getEndpoint as d,isEllipticArc4 as y,isBezierCurve as C,isCircularArc as M}from"./support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as E}from"./support/curves/ellipticArc4Utils.js";import{deriveEllipse as O,interpolateEllipse as S}from"./support/curves/ellipticArc7Utils.js";import Z from"../layers/graphics/OptimizedGeometry.js";class _{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:h,segmentFlags:u,segmentIndices:l,segmentParams:c,segmentCountArc:f,segmentCountBezier:g}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=h,this.segmentFlags=u,this.segmentIndices=l,this.segmentParams=c,this.segmentCountArc=f,this.segmentCountBezier=g}get segmentParamCount(){return z(4)*this.segmentCountArc+z(2)*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}get hasCurves(){return null!=this.segmentFlags}get isMultipart(){return"polyline"===this.type||"polygon"===this.type}toGeometryJSON(){const t=T(this),{vertexCount:e,partCount:r,hasZ:s,hasM:n}=this,i=L(this);if("point"===this.type){const[t,e]=this.vertexXY,r=this.vertexZ?.[0],s=this.vertexM?.[0];return{x:t,y:e,z:r,m:s,spatialReference:i}}let a=0;if("multipoint"===this.type){const r=[];for(;a<e;)r.push(t(a++));return{points:r,spatialReference:i,hasZ:s,hasM:n}}const o="polygon"===this.type;if(!this.hasCurves){const e=new Array;for(let s=0;s<r;++s){const r=this.partOffsets[s+1],n=new Array;for(;a<r;)n.push(t(a++));o&&n.length>0&&n.push(n[0]),e.push(n)}return o?{rings:e,hasZ:s,hasM:n,spatialReference:i}:{paths:e,hasZ:s,hasM:n,spatialReference:i}}const h=new Array;for(const{segments:u,startVertex:l}of this.parts){const t=[l];for(const{curve:e}of u)t.push(e);h.push(t)}return o?{rings:[],curveRings:h,hasZ:s,hasM:n,spatialReference:i}:{paths:[],curvePaths:h,hasZ:s,hasM:n,spatialReference:i}}toOptimizedGeometry(){const{vertexCount:t,vertexXY:e,vertexZ:r,vertexM:s,partOffsets:n,hasZ:i,hasM:a}=this,o=new Z([],[],i,a),h=Math.max(this.partCount,1),u="polygon"===this.type;let l=0;for(let c=0;c<h;++c){const h=n?.[c+1]??t,f=o.coords.length;for(let t=l;t<h;++t)o.coords.push(e[2*t],e[2*t+1]),i&&o.coords.push(r[t]),a&&o.coords.push(s[t]);if(u){const t=l;o.coords.push(e[2*t],e[2*t+1]),i&&o.coords.push(r[t]),a&&o.coords.push(s[t])}o.lengths.push((o.coords.length-f)/o.stride),l=h}return"point"===this.type&&(o.lengths.length=0),o}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,hasCurves:i,segmentCountArc:a,segmentCountBezier:o}=this,h=j(t,e,r,s,n,i,a,o);h.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:l,vertexM:c}=this;h.vertexXY.set(u.subarray(0,2*e),0),h.vertexZ?.set(l.subarray(0,e),0),h.vertexM?.set(c.subarray(0,e),0);const{partOffsets:f,partFlags:g}=this;h.partFlags?.set(g.subarray(0,r+1)),h.partOffsets?.set(f.subarray(0,r+1));const{segmentFlags:m,segmentIndices:p,segmentParams:x,segmentParamCount:v}=this;return h.segmentFlags?.set(m.subarray(0,e),0),h.segmentIndices?.set(p.subarray(0,e),0),h.segmentParams?.set(x.subarray(0,v),0),h}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!f(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves!==t.hasCurves||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let s=0;s<this.vertexCount;++s)if(r(this.vertexXY[2*s],t.vertexXY[2*s])||r(this.vertexXY[2*s+1],t.vertexXY[2*s+1]))return!1;if(this.hasZ)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexZ[s],t.vertexZ[s]))return!1;if(this.hasM)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexM[s],t.vertexM[s]))return!1;for(let s=0;s<this.partCount;++s)if(this.partFlags[s]!==t.partFlags[s]||this.partOffsets[s]!==t.partOffsets[s])return!1;if(this.hasCurves){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return new Y(this)}}class Y{constructor(t){this.geometry=t,this.value=new P(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class P{constructor(t){this.geometry=t,this.index=-1,this._readVertex=T(t),this._segments=new R(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class R{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new A(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class A{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=T(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}const s=e[r++],n=e[r++],i=e[r++],a=e[r++],o=e[r++],h=e[r++];r++,r++;const u=e[r++],l=e[r++];if(!Boolean(4&s)&&1===i)return{c:[this.end,[u,l]]};const c=2&s?0:1,f=1&s?0:1;return{a:[this.end,[o,h],c,f,a,n,i]}}}function F(r){let s;const{hasCurves:n,vertexCount:a,vertexXY:o,vertexZ:h,vertexM:u}=r,l=L(r);if(n){const n={stack:[],error:void 0,hasError:!1};try{t(n,new N(r,["vertexZ","vertexM"]),!1);const e=i();for(const t of r.parts){let r=t.startVertex;for(const{curve:s}of t.segments)p(e,r,s),r=d(s)}const[a,o,h,u]=e;s={xmin:a,ymin:o,xmax:h,ymax:u,spatialReference:l}}catch(c){n.error=c,n.hasError=!0}finally{e(n)}}else{let t,e,r,n;t=e=1/0,r=n=-1/0;for(let s=0;s<a;++s){const i=o[2*s],a=o[2*s+1];t=Math.min(t,i),r=Math.max(r,i),e=Math.min(e,a),n=Math.max(n,a)}s={xmin:t,ymin:e,xmax:r,ymax:n,spatialReference:l}}if(h){let t=1/0,e=-1/0;for(const r of h)t=Math.min(t,r),e=Math.max(e,r);s.zmin=t,s.zmax=e}if(u){let t=1/0,e=-1/0;for(const r of u)t=Math.min(t,r),e=Math.max(e,r);s.mmin=t,s.mmax=e}return s}function V(r,s){const n={stack:[],error:void 0,hasError:!1};try{s??=i();t(n,new N(r,["vertexZ","vertexM","spatialReference"]),!1);return a(s,F(r)),s}catch(o){n.error=o,n.hasError=!0}finally{e(n)}}function w(r,i){const a={stack:[],error:void 0,hasError:!1};try{i??=s();t(a,new N(r,["vertexM","spatialReference"]),!1);return n(i,F(r)),i}catch(o){a.error=o,a.hasError=!0}finally{e(a)}}function X(t){let e,r,s;if(o(t)){s="point";const{x:n,y:i,z:a,m:o}=t,h=[n,i];null!=a&&h.push(a),null!=o&&h.push(o),r=[[h]],e=1}else h(t)?(s="multipoint",r=[t.points],e=t.points.length):u(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>t+e.length-k(e),0));const n=j(s,e,s.includes("point")?0:r.length,c(t),l(t),x(t));function i(t){n.vertexXY[2*f]=t[0],n.vertexXY[2*f+1]=t[1],n.hasZ&&(n.vertexZ[f]=t[2]),n.hasM&&(n.vertexM[f]=t[a]),++f}n.spatialReference=t.spatialReference??void 0;const a=n.hasZ?3:2;let f=0;if(!n.isMultipart){if(!n.hasZ&&!n.hasM){for(const[t,e]of r[0])n.vertexXY[2*f]=t,n.vertexXY[2*f+1]=e,++f;return n}for(const t of r[0])i(t);return n}const p="polygon"===n.type;let Z=0;if(!n.hasCurves){for(const t of r){n.partOffsets[Z++]=f;let e=t.length;if(p&&(e-=k(t)),n.hasZ||n.hasM)for(let r=0;r<e;++r)i(t[r]);else for(let r=0;r<e;++r){const[e,s]=t[r];n.vertexXY[2*f]=e,n.vertexXY[2*f+1]=s,++f}}return n.partOffsets[Z]=f,n}function _(t){const e=f-1;n.segmentFlags[e]=t;const r=z(t);n.segmentIndices[e]=0===r?U:Y,4===t?++n.segmentCountArc:2===t&&++n.segmentCountBezier;const s=Y+r;if(s<=(n.segmentParams?.length??0))return;let i=s*W;i=20*Math.ceil(i/20);const a=n.segmentParams;if(n.segmentParams=new Float64Array(i),null!=a)for(let o=0;o<a.length;++o)n.segmentParams[o]=a[o]}let Y=0;for(const o of r){n.partOffsets[Z++]=f,i(o[0]);let t=o.length;p&&(t-=k(o));for(let e=1;e<t;++e){const t=o[e];if(v(t)){_(4);const r=n.segmentParams,[s,[a,h],u,l,c,f,g]=t.a;let m=4;l||(m|=1),u||(m|=2);const p=O(d(o[e-1]),t),[x,v]=S(p,.5);r[Y++]=m,r[Y++]=f,r[Y++]=g,r[Y++]=c,r[Y++]=a,r[Y++]=h,r[Y++]=p.u2-p.u1,r[Y++]=p.u1,r[Y++]=x,r[Y++]=v,i(s);continue}const r=M(t);if(y(t)||r){_(4);const s=n.segmentParams,a=d(t),h=r?m(d(o[e-1]),t):E(d(o[e-1]),t),{cx:u,cy:l,thetaStart:c,thetaEnd:f,radius:p}=h;let x=r?0:4;c>f||(x|=1),Math.abs(f-c)<=Math.PI||(x|=2);const[v,y]=r?t.c[1]:g(h,.5);s[Y++]=x,s[Y++]=p,s[Y++]=1,s[Y++]=0,s[Y++]=u,s[Y++]=l,s[Y++]=f-c,s[Y++]=c,s[Y++]=v,s[Y++]=y,i(a);continue}if(C(t)){_(2);const e=n.segmentParams,[r,[s,a],[o,h]]=t.b;e[Y++]=s,e[Y++]=a,e[Y++]=o,e[Y++]=h,i(r);continue}_(1),i(t)}}return n.partOffsets[Z]=f,n}function b(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,h="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);s??=!1,n??=!1;const u=j(t,h,a,s,n,!1,0,0);if(u.spatialReference=i??void 0,!u.isMultipart){for(let t=0,e=0;t<h;++t)u.vertexXY[2*t]=r[e++],u.vertexXY[2*t+1]=r[e++],s&&(u.vertexZ[t]=r[e++]),n&&(u.vertexM[t]=r[e++]);return u}const l=2+Number(s)+Number(n);let c=0,f=0;u.partOffsets[0]=0;for(const g of e){const t=u.partOffsets[f],e=t+g-Number(o);u.partOffsets[++f]=e;for(let i=t;i<e;++i)u.vertexXY[2*i]=r[c++],u.vertexXY[2*i+1]=r[c++],s&&(u.vertexZ[i]=r[c++]),n&&(u.vertexM[i]=r[c++]);o&&(c+=l)}return u}function I(t,e){return"getSpatialReference"in t&&(e=B(t.getSpatialReference()),t=t.getGeometry()),new _({...t.toFlatGeometry(),spatialReference:e})}function B(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);const n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}class N{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function L({spatialReference:t}){return t instanceof r?t.toJSON():t}function T({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function z(t){switch(t){case 1:return 0;case 4:return 10;case 2:return 4}}function k(t){if(t.length>0){const e=t[0],r=d(t.at(-1));return e.every((t,e)=>t===r[e])?1:0}return 0}function j(t,e,r,s,n,i,a,o){a??=0,o??=0;const h=new _({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let u=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(u+=Float64Array.BYTES_PER_ELEMENT*e),n&&(u+=Float64Array.BYTES_PER_ELEMENT*e),h.isMultipart&&(u+=(r+1)*Int32Array.BYTES_PER_ELEMENT,u+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(u+=e*Int8Array.BYTES_PER_ELEMENT,u+=e*Int32Array.BYTES_PER_ELEMENT,u+=h.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const l=new ArrayBuffer(u);let c=0;if(h.vertexXY=new Float64Array(l,c,2*e),c+=h.vertexXY.byteLength,s&&(h.vertexZ=new Float64Array(l,c,e),c+=h.vertexZ.byteLength),n&&(h.vertexM=new Float64Array(l,c,e),c+=h.vertexM.byteLength),i&&(h.segmentParams=new Float64Array(l,c,h.segmentParamCount),c+=h.segmentParams.byteLength,h.segmentIndices=new Int32Array(l,c,e),h.segmentIndices.fill(U),c+=h.segmentIndices.byteLength),h.isMultipart&&(h.partOffsets=new Int32Array(l,c,r+1),c+=h.partOffsets.byteLength,h.partFlags=new Int8Array(l,c,r+1),c+=h.partFlags.byteLength),i&&(h.segmentFlags=new Int8Array(l,c,e),h.segmentFlags.fill(1),c+=h.segmentFlags.byteLength),"polygon"===h.type)for(let f=0;f<r;++f)h.partFlags[f]=1;return h}const W=1.61803,U=-1;export{_ as FlatGeometry,X as convertGeometryToFlat,I as convertGeometryxToFlat,b as convertOptimizedGeometryToFlat,w as getBoundingBox,V as getBoundingRect,F as getExtentJSON};
5
+ import{__addDisposableResource as t,__disposeResources as e}from"tslib";import r from"./SpatialReference.js";import{empty as s,expandWithExtent as n}from"./support/aaBoundingBox.js";import{empty as i,expandExtentInPlace as a}from"./support/aaBoundingRect.js";import{isPoint as o,isMultipoint as h,isPolyline as u,isGeometryWithM as l,isGeometryWithZ as c}from"./support/jsonTypeUtils.js";import{equals as f}from"./support/spatialReferenceUtils.js";import{interpolateCircle as g}from"./support/curves/circleUtils.js";import{deriveCircleFromCircularArc as m}from"./support/curves/circularArcUtils.js";import{curveExtent as p}from"./support/curves/curveExtent.js";import{isCurvedGeometry as x,isEllipticArc7 as v,getEndpoint as y,isEllipticArc4 as d,isBezierCurve as C,isCircularArc as M}from"./support/curves/curveUtils.js";import{deriveCircleFromEllipticArc4 as E}from"./support/curves/ellipticArc4Utils.js";import{deriveEllipse as O,interpolateEllipse as S}from"./support/curves/ellipticArc7Utils.js";import Z from"../layers/graphics/OptimizedGeometry.js";class _{constructor({type:t,spatialReference:e,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:h,segmentFlags:u,segmentIndices:l,segmentParams:c,segmentCountArc:f,segmentCountBezier:g}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=t,this.spatialReference=e,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=h,this.segmentFlags=u,this.segmentIndices=l,this.segmentParams=c,this.segmentCountArc=f,this.segmentCountBezier=g}get segmentParamCount(){return z(4)*this.segmentCountArc+z(2)*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:t,segmentCountArc:e,segmentCountBezier:r}=this;return t&&t-e-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}get hasCurves(){return null!=this.segmentFlags}get isMultipart(){return"polyline"===this.type||"polygon"===this.type}toGeometryJSON(){const t=L(this),{vertexCount:e,partCount:r,hasZ:s,hasM:n}=this,i=T(this);if("point"===this.type){const[t,e]=this.vertexXY,r=this.vertexZ?.[0],s=this.vertexM?.[0];return{x:t,y:e,z:r,m:s,spatialReference:i}}let a=0;if("multipoint"===this.type){const r=[];for(;a<e;)r.push(t(a++));return{points:r,spatialReference:i,hasZ:s,hasM:n}}const o="polygon"===this.type;if(!this.hasCurves){const e=new Array;for(let s=0;s<r;++s){const r=this.partOffsets[s+1],n=new Array;for(;a<r;)n.push(t(a++));o&&n.length>0&&n.push(n[0]),e.push(n)}return o?{rings:e,hasZ:s,hasM:n,spatialReference:i}:{paths:e,hasZ:s,hasM:n,spatialReference:i}}const h=new Array;for(const{segments:u,startVertex:l}of this.parts){const t=[l];for(const{curve:e}of u)t.push(e);h.push(t)}return o?{rings:[],curveRings:h,hasZ:s,hasM:n,spatialReference:i}:{paths:[],curvePaths:h,hasZ:s,hasM:n,spatialReference:i}}toOptimizedGeometry(){const{vertexCount:t,vertexXY:e,vertexZ:r,vertexM:s,partOffsets:n,hasZ:i,hasM:a}=this,o=new Z([],[],i,a),h=Math.max(this.partCount,1),u="polygon"===this.type;let l=0;for(let c=0;c<h;++c){const h=n?.[c+1]??t,f=o.coords.length;for(let t=l;t<h;++t)o.coords.push(e[2*t],e[2*t+1]),i&&o.coords.push(r[t]),a&&o.coords.push(s[t]);if(u){const t=l;o.coords.push(e[2*t],e[2*t+1]),i&&o.coords.push(r[t]),a&&o.coords.push(s[t])}o.lengths.push((o.coords.length-f)/o.stride),l=h}return"point"===this.type&&(o.lengths.length=0),o}clone(){const{type:t,vertexCount:e,partCount:r,hasZ:s,hasM:n,hasCurves:i,segmentCountArc:a,segmentCountBezier:o}=this,h=j(t,e,r,s,n,i,a,o);h.spatialReference=this.spatialReference;const{vertexXY:u,vertexZ:l,vertexM:c}=this;h.vertexXY.set(u.subarray(0,2*e),0),h.vertexZ?.set(l.subarray(0,e),0),h.vertexM?.set(c.subarray(0,e),0);const{partOffsets:f,partFlags:g}=this;h.partFlags?.set(g.subarray(0,r+1)),h.partOffsets?.set(f.subarray(0,r+1));const{segmentFlags:m,segmentIndices:p,segmentParams:x,segmentParamCount:v}=this;return h.segmentFlags?.set(m.subarray(0,e),0),h.segmentIndices?.set(p.subarray(0,e),0),h.segmentParams?.set(x.subarray(0,v),0),h}equals(t){return this.equalsWithinTolerance(t,0)}equalsWithinTolerance(t,e){if(null==t)return!1;if(this===t)return!0;if(!f(this.spatialReference,t.spatialReference))return!1;if(this.vertexCount!==t.vertexCount||this.partCount!==t.partCount)return!1;if(this.hasZ!==t.hasZ||this.hasM!==t.hasM)return!1;if(this.hasCurves!==t.hasCurves||this.segmentCountArc!==t.segmentCountArc||this.segmentCountBezier!==t.segmentCountBezier)return!1;const r=0===e?(t,e)=>t!==e||isNaN(t)!==isNaN(e):(t,r)=>Math.abs(t-r)>e||isNaN(t)!==isNaN(r);for(let s=0;s<this.vertexCount;++s)if(r(this.vertexXY[2*s],t.vertexXY[2*s])||r(this.vertexXY[2*s+1],t.vertexXY[2*s+1]))return!1;if(this.hasZ)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexZ[s],t.vertexZ[s]))return!1;if(this.hasM)for(let s=0;s<this.vertexCount;++s)if(r(this.vertexM[s],t.vertexM[s]))return!1;for(let s=0;s<this.partCount;++s)if(this.partFlags[s]!==t.partFlags[s]||this.partOffsets[s]!==t.partOffsets[s])return!1;if(this.hasCurves){for(let e=0;e<this.vertexCount;++e)if(this.segmentFlags[e]!==t.segmentFlags[e]||this.segmentIndices[e]!==t.segmentIndices[e])return!1;for(let e=0;e<this.segmentParamCount;++e)if(r(this.segmentParams[e],t.segmentParams[e]))return!1}return!0}get parts(){return new Y(this)}}class Y{constructor(t){this.geometry=t,this.value=new P(t)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class P{constructor(t){this.geometry=t,this.index=-1,this._readVertex=L(t),this._segments=new R(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const t=this.geometry.partOffsets;return t[this.index+1]-t[this.index]}}class R{constructor(t){this._part=t,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===t.geometry.type,this.value=new A(t.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const t=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=t&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:t}=this._part,e=this._part.geometry.partOffsets;this._partStart=e[t],this._partEnd=e[t+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class A{constructor(t){this.geometry=t,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=L(t)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const t=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===t)return this.end;const e=this.geometry.segmentParams;let r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===t){const t=e[r++],s=e[r++],n=e[r++],i=e[r++];return{b:[this.end,[t,s],[n,i]]}}const s=e[r++],n=e[r++],i=e[r++],a=e[r++],o=e[r++],h=e[r++];r++,r++;const u=e[r++],l=e[r++];if(!Boolean(4&s)&&1===i)return{c:[this.end,[u,l]]};const c=2&s?0:1,f=1&s?0:1;return{a:[this.end,[o,h],c,f,a,n,i]}}}function F(r){let s;const{hasCurves:n,vertexCount:a,vertexXY:o,vertexZ:h,vertexM:u}=r,l=T(r);if(n){const n={stack:[],error:void 0,hasError:!1};try{t(n,new N(r,["vertexZ","vertexM"]),!1);const e=i();for(const t of r.parts){let r=t.startVertex;for(const{curve:s}of t.segments)p(e,r,s),r=y(s)}const[a,o,h,u]=e;s={xmin:a,ymin:o,xmax:h,ymax:u,spatialReference:l}}catch(c){n.error=c,n.hasError=!0}finally{e(n)}}else{let t,e,r,n;t=e=1/0,r=n=-1/0;for(let s=0;s<a;++s){const i=o[2*s],a=o[2*s+1];t=Math.min(t,i),r=Math.max(r,i),e=Math.min(e,a),n=Math.max(n,a)}s={xmin:t,ymin:e,xmax:r,ymax:n,spatialReference:l}}if(h){let t=1/0,e=-1/0;for(const r of h)t=Math.min(t,r),e=Math.max(e,r);s.zmin=t,s.zmax=e}if(u){let t=1/0,e=-1/0;for(const r of u)t=Math.min(t,r),e=Math.max(e,r);s.mmin=t,s.mmax=e}return s}function V(r,s){const n={stack:[],error:void 0,hasError:!1};try{s??=i();t(n,new N(r,["vertexZ","vertexM","spatialReference"]),!1);return a(s,F(r)),s}catch(o){n.error=o,n.hasError=!0}finally{e(n)}}function w(r,i){const a={stack:[],error:void 0,hasError:!1};try{i??=s();t(a,new N(r,["vertexM","spatialReference"]),!1);return n(i,F(r)),i}catch(o){a.error=o,a.hasError=!0}finally{e(a)}}function X(t){let e,r,s;if(o(t)){s="point";const{x:n,y:i,z:a,m:o}=t,h=[n,i];null!=a&&h.push(a),null!=o&&h.push(o),r=[[h]],e=1}else h(t)?(s="multipoint",r=[t.points],e=t.points.length):u(t)?(s="polyline",r=t.curvePaths??t.paths,e=r.reduce((t,e)=>t+e.length,0)):(s="polygon",r=t.curveRings??t.rings,e=r.reduce((t,e)=>t+e.length-k(e),0));const n=j(s,e,s.includes("point")?0:r.length,c(t),l(t),x(t));function i(t){n.vertexXY[2*f]=t[0],n.vertexXY[2*f+1]=t[1],n.hasZ&&(n.vertexZ[f]=t[2]),n.hasM&&(n.vertexM[f]=t[a]),++f}n.spatialReference=t.spatialReference??void 0;const a=n.hasZ?3:2;let f=0;if(!n.isMultipart){if(!n.hasZ&&!n.hasM){for(const[t,e]of r[0])n.vertexXY[2*f]=t,n.vertexXY[2*f+1]=e,++f;return n}for(const t of r[0])i(t);return n}const p="polygon"===n.type;let Z=0;if(!n.hasCurves){for(const t of r){n.partOffsets[Z++]=f;let e=t.length;if(p&&(e-=k(t)),n.hasZ||n.hasM)for(let r=0;r<e;++r)i(t[r]);else for(let r=0;r<e;++r){const[e,s]=t[r];n.vertexXY[2*f]=e,n.vertexXY[2*f+1]=s,++f}}return n.partOffsets[Z]=f,n}function _(t){const e=f-1;n.segmentFlags[e]=t;const r=z(t);n.segmentIndices[e]=0===r?U:Y,4===t?++n.segmentCountArc:2===t&&++n.segmentCountBezier;const s=Y+r;if(s<=(n.segmentParams?.length??0))return;let i=s*W;i=20*Math.ceil(i/20);const a=n.segmentParams;if(n.segmentParams=new Float64Array(i),null!=a)for(let o=0;o<a.length;++o)n.segmentParams[o]=a[o]}let Y=0;for(const o of r){n.partOffsets[Z++]=f,i(o[0]);let t=o.length;p&&(t-=k(o));for(let e=1;e<t;++e){const t=o[e];if(v(t)){_(4);const r=n.segmentParams,[s,[a,h],u,l,c,f,g]=t.a;let m=4;l||(m|=1),u||(m|=2);const p=O(y(o[e-1]),t),[x,v]=S(p,.5);r[Y++]=m,r[Y++]=f,r[Y++]=g,r[Y++]=c,r[Y++]=a,r[Y++]=h,r[Y++]=p.u2-p.u1,r[Y++]=p.u1,r[Y++]=x,r[Y++]=v,i(s);continue}const r=M(t);if(d(t)||r){_(4);const s=n.segmentParams,a=y(t),h=r?m(y(o[e-1]),t):E(y(o[e-1]),t),{cx:u,cy:l,thetaStart:c,thetaEnd:f,radius:p}=h;let x=r?0:4;c>f||(x|=1),Math.abs(f-c)<=Math.PI||(x|=2);const[v,d]=r?t.c[1]:g(h,.5);s[Y++]=x,s[Y++]=p,s[Y++]=1,s[Y++]=0,s[Y++]=u,s[Y++]=l,s[Y++]=f-c,s[Y++]=c,s[Y++]=v,s[Y++]=d,i(a);continue}if(C(t)){_(2);const e=n.segmentParams,[r,[s,a],[o,h]]=t.b;e[Y++]=s,e[Y++]=a,e[Y++]=o,e[Y++]=h,i(r);continue}_(1),i(t)}}return n.partOffsets[Z]=f,n}function b(t,{lengths:e,coords:r,hasZ:s,hasM:n},i){const a=t.includes("point")?0:e.length,o="polygon"===t,h="point"===t?1:e.reduce((t,e)=>t+e,0)-(o?a:0);s??=!1,n??=!1;const u=j(t,h,a,s,n,!1,0,0);if(u.spatialReference=i??void 0,!u.isMultipart){for(let t=0,e=0;t<h;++t)u.vertexXY[2*t]=r[e++],u.vertexXY[2*t+1]=r[e++],s&&(u.vertexZ[t]=r[e++]),n&&(u.vertexM[t]=r[e++]);return u}const l=2+Number(s)+Number(n);let c=0,f=0;u.partOffsets[0]=0;for(const g of e){const t=u.partOffsets[f],e=t+g-Number(o);u.partOffsets[++f]=e;for(let i=t;i<e;++i)u.vertexXY[2*i]=r[c++],u.vertexXY[2*i+1]=r[c++],s&&(u.vertexZ[i]=r[c++]),n&&(u.vertexM[i]=r[c++]);o&&(c+=l)}return u}function I(t,e){return"getSpatialReference"in t&&(e=B(t.getSpatialReference()),t=t.getGeometry()),new _({...t.toFlatGeometry(),spatialReference:e})}function B(t){if(null==t)return;const e=t.getText()||void 0,r=t.isCustomWkid()?0:t.getOldID();if(r<=0)return{wkt:e};let s=t.getLatestID();(s<=0||s===r)&&(s=void 0);const n=t.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:e};const i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:e};let a=t.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:e,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}class N{constructor(t,e){this.target=t,this.keys=e,this.oldValues=e.map(e=>t[e]);for(const r of e)t[r]=void 0}[Symbol.dispose](){this.keys.map((t,e)=>{this.target[t]=this.oldValues[e]})}}function T({spatialReference:t}){return t instanceof r?t.toJSON():t}function L({vertexXY:t,vertexZ:e,vertexM:r}){return e?r?s=>[t[2*s],t[2*s+1],e[s],r[s]]:r=>[t[2*r],t[2*r+1],e[r]]:r?e=>[t[2*e],t[2*e+1],r[e]]:e=>[t[2*e],t[2*e+1]]}function z(t){switch(t){case 1:return 0;case 4:return 10;case 2:return 4}}function k(t){if(t.length>0){const e=t[0],r=y(t.at(-1));return e.every((t,e)=>t===r[e])?1:0}return 0}function j(t,e,r,s,n,i,a,o){a??=0,o??=0;const h=new _({type:t,vertexCount:e,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o});let u=2*Float64Array.BYTES_PER_ELEMENT*e;s&&(u+=Float64Array.BYTES_PER_ELEMENT*e),n&&(u+=Float64Array.BYTES_PER_ELEMENT*e),h.isMultipart&&(u+=(r+1)*Int32Array.BYTES_PER_ELEMENT,u+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(u+=e*Int8Array.BYTES_PER_ELEMENT,u+=e*Int32Array.BYTES_PER_ELEMENT,u+=h.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const l=new ArrayBuffer(u);let c=0;if(h.vertexXY=new Float64Array(l,c,2*e),c+=h.vertexXY.byteLength,s&&(h.vertexZ=new Float64Array(l,c,e),c+=h.vertexZ.byteLength),n&&(h.vertexM=new Float64Array(l,c,e),c+=h.vertexM.byteLength),i&&(h.segmentParams=new Float64Array(l,c,h.segmentParamCount),c+=h.segmentParams.byteLength,h.segmentIndices=new Int32Array(l,c,e),h.segmentIndices.fill(U),c+=h.segmentIndices.byteLength),h.isMultipart&&(h.partOffsets=new Int32Array(l,c,r+1),c+=h.partOffsets.byteLength,h.partFlags=new Int8Array(l,c,r+1),c+=h.partFlags.byteLength),i&&(h.segmentFlags=new Int8Array(l,c,e),h.segmentFlags.fill(1),c+=h.segmentFlags.byteLength),"polygon"===h.type)for(let f=0;f<r;++f)h.partFlags[f]=1;return h}const W=1.61803,U=-1;export{_ as FlatGeometry,X as convertGeometryToFlat,I as convertGeometryxToFlat,b as convertOptimizedGeometryToFlat,w as getBoundingBox,V as getBoundingRect,F as getExtentJSON};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{clone as t}from"../core/lang.js";import{collectMultipath as e}from"./geometryCursorCollectUtils.js";import{isGeometryWithZ as s,isGeometryWithM as i,isPolygon as h,isPolyline as r,isMultipoint as n,isExtent as o,isPoint as a}from"./support/jsonUtils.js";import p from"../layers/graphics/OptimizedGeometry.js";class _{static fromOptimized(t,e,s=1){return(new u).initialize(t,e,s)}static fromJSON(t){const[e,h]=c(t),r=s(t),n=i(t);return(new l).initialize(e,h,r,n,1)}static fromOptimizedCIM(t,e,s=1){return(new g).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[h,r]=c(t),n=s(t),o=i(t);return(new f).initialize(h,r,n,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new g).initialize(new p([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new l).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new g).initialize(new p([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new f).initialize([],t,e,s,i)}asJSON(){const t=e(this),{hasZ:s,hasM:i}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:s,hasM:i}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:s?t[0][0][2]:void 0,m:i?t[0][0][s?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:s,hasM:i}:{paths:t,hasZ:s,hasM:i}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,h=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+h),-.5*s}invertY(){this.yFactor*=-1}}class u extends _{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1)&&(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,!0)}prevPath(){return!(this.pathIndex<=0)&&(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,!0)}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new u).initialize(new p([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let h=this._pathOffset+e;h<t;h+=e){const t=s[h-e],r=s[h-e+1],n=s[h]-t,o=s[h+1]-r;i+=Math.sqrt(n*n+o*o)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new u).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function d(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return h(t)?[t.rings,"esriGeometryPolygon"]:r(t)?[t.paths,"esriGeometryPolyline"]:n(t)?[[t.points],"esriGeometryMultipoint"]:o(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:a(t)?[[[d(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class l extends _{initialize(t,e,s,i,h){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=h,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],h=e[i],r=t[0],n=t[1],o=h[0]-r,a=h[1]-n;s+=Math.sqrt(o*o+a*a)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new l).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const s=e(t);for(const e of s)this.pushPath(e)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new p([],[],t,e),{coords:i,lengths:h}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),h.length=0;else for(const r of this._paths){for(const s of r)i.push(s[0]),i.push(s[1]*this.yFactor),t&&i.push(s[2]),e&&i.push(s[this._mIndex]);h.push(r.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new l).initialize(t(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}const y=4,m=1;class g extends u{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new g).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class f extends l{initialize(t,e,s,i,h){return super.initialize(t,e,s,i,h)}clone(){return(new f).initialize(t(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][y]=m}getControlPoint(){return this._paths[this.pathIndex][this._pointIndex][y]===m}setControlPointAt(t){this._paths[this.pathIndex][t][y]=m}getControlPointAt(t){return this._paths[this.pathIndex][t][y]===m}}export{_ as GeometryCursor};
5
+ import{clone as t}from"../core/lang.js";import{collectMultipath as e}from"./geometryCursorCollectUtils.js";import{isGeometryWithZ as s,isGeometryWithM as i,isPolygon as h,isPolyline as r,isMultipoint as n,isExtent as o,isPoint as a}from"./support/jsonTypeUtils.js";import p from"../layers/graphics/OptimizedGeometry.js";class _{static fromOptimized(t,e,s=1){return(new u).initialize(t,e,s)}static fromJSON(t){const[e,h]=c(t),r=s(t),n=i(t);return(new l).initialize(e,h,r,n,1)}static fromOptimizedCIM(t,e,s=1){return(new g).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[h,r]=c(t),n=s(t),o=i(t);return(new f).initialize(h,r,n,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new g).initialize(new p([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new l).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new g).initialize(new p([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new f).initialize([],t,e,s,i)}asJSON(){const t=e(this),{hasZ:s,hasM:i}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:s,hasM:i}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:s?t[0][0][2]:void 0,m:i?t[0][0][s?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:s,hasM:i}:{paths:t,hasZ:s,hasM:i}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,h=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+h),-.5*s}invertY(){this.yFactor*=-1}}class u extends _{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1)&&(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,!0)}prevPath(){return!(this.pathIndex<=0)&&(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,!0)}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new u).initialize(new p([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let h=this._pathOffset+e;h<t;h+=e){const t=s[h-e],r=s[h-e+1],n=s[h]-t,o=s[h+1]-r;i+=Math.sqrt(n*n+o*o)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new u).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function d(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return h(t)?[t.rings,"esriGeometryPolygon"]:r(t)?[t.paths,"esriGeometryPolyline"]:n(t)?[[t.points],"esriGeometryMultipoint"]:o(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:a(t)?[[[d(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class l extends _{initialize(t,e,s,i,h){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=h,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],h=e[i],r=t[0],n=t[1],o=h[0]-r,a=h[1]-n;s+=Math.sqrt(o*o+a*a)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new l).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const s=e(t);for(const e of s)this.pushPath(e)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new p([],[],t,e),{coords:i,lengths:h}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),h.length=0;else for(const r of this._paths){for(const s of r)i.push(s[0]),i.push(s[1]*this.yFactor),t&&i.push(s[2]),e&&i.push(s[this._mIndex]);h.push(r.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new l).initialize(t(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}const y=4,m=1;class g extends u{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new g).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class f extends l{initialize(t,e,s,i,h){return super.initialize(t,e,s,i,h)}clone(){return(new f).initialize(t(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][y]=m}getControlPoint(){return this._paths[this.pathIndex][this._pointIndex][y]===m}setControlPointAt(t){this._paths[this.pathIndex][t][y]=m}getControlPointAt(t){return this._paths[this.pathIndex][t][y]===m}}export{_ as GeometryCursor};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../chunks/UnitFactory.js";import"./support/apiConverter.js";export{a as accelerateGeometry,e as execute,s as supportsCurves}from"../../chunks/containsOperator.js";
5
+ import"../../chunks/SpatialReference.js";import"./support/apiConverter.js";export{a as accelerateGeometry,e as execute,s as supportsCurves}from"../../chunks/containsOperator.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import"../../chunks/UnitFactory.js";import"./support/apiConverter.js";export{a as accelerateGeometry,e as execute,s as supportsCurves}from"../../chunks/disjointOperator.js";
5
+ import"../../chunks/SpatialReference.js";import"./support/apiConverter.js";export{a as accelerateGeometry,e as execute,s as supportsCurves}from"../../chunks/disjointOperator.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{l as t,i as n,p as e}from"../../../chunks/pe.js";let i,c;function s(){return!!i&&n()}async function o(){if(!s()){const[n]=await Promise.all([import("../../../chunks/SpatialReference.js").then(({injectPe:t})=>t),import("../../../chunks/GeodeticUtils.js").then(({calculateDistanceAndAzimuth:t,movePointsByDistance:n})=>{i=t,c=n}),t()]);n(e)}}function a(t,n,e,c,s,o){return i(t,n,e,c,s,o)}function r(t,n,e,i,s,o){return c(t,n,e,i,s,o)}export{a as calculateDistanceAndAzimuth,s as isLoaded,o as load,r as movePointsByDistance};
5
+ import{l as t,i as n,p as e}from"../../../chunks/pe.js";let i,c;function s(){return!!i&&n()}async function a(){if(!s()){const[n]=await Promise.all([import("../../../chunks/SpatialReference.js").then(t=>t.aP).then(({injectPe:t})=>t),import("../../../chunks/GeodeticUtils.js").then(({calculateDistanceAndAzimuth:t,movePointsByDistance:n})=>{i=t,c=n}),t()]);n(e)}}function o(t,n,e,c,s,a){return i(t,n,e,c,s,a)}function r(t,n,e,i,s,a){return c(t,n,e,i,s,a)}export{o as calculateDistanceAndAzimuth,s as isLoaded,a as load,r as movePointsByDistance};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/MultiPathImpl.js";import{G as n,k as o}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{c as u}from"../../../chunks/Envelope.js";import{L as i,aL as l}from"../../../chunks/UnitFactory.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const n=(new i).executeMany(e,r,s);return new c(n,t,r,s)}}class c extends e{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new m,t=new r;let i,p=s;for(;i=this.m_polylines.next();){if(i.getGeometryType()!==n.enumPolyline||i.isEmpty())continue;p===s?p=t.addGeometry(i):t.appendGeometry(p,i);const r=new m;i.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;i=this.m_polygons.next();){if(!o(i.getGeometryType())||i.isEmpty())continue;const r=new m;i.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(i)}const c=u(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const y=new p;function a(e,r,s){const n=y.execute(new t(e),new t(r),s,null);return Array.from(n)}function h(){return y.supportsCurves()}export{a as execute,h as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/MultiPathImpl.js";import{G as n,k as o}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{c as u}from"../../../chunks/Envelope.js";import{p as i,at as l}from"../../../chunks/SpatialReference.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const n=(new i).executeMany(e,r,s);return new c(n,t,r,s)}}class c extends e{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new m,t=new r;let i,p=s;for(;i=this.m_polylines.next();){if(i.getGeometryType()!==n.enumPolyline||i.isEmpty())continue;p===s?p=t.addGeometry(i):t.appendGeometry(p,i);const r=new m;i.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;i=this.m_polygons.next();){if(!o(i.getGeometryType())||i.isEmpty())continue;const r=new m;i.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(i)}const c=u(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const n=a.execute(new t(e),new t(r),s,null);return Array.from(n)}function h(){return a.supportsCurves()}export{y as execute,h as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{a as r,d as n,c as s}from"../../../chunks/Geometry.js";import{L as i}from"../../../chunks/UnitFactory.js";import{Envelope2D as u}from"../../../chunks/Envelope2D.js";import{B as o}from"../../../chunks/Bufferer-Dw9Qi4T1.js";class m{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,Number.NaN,96,n,s)}execute(t,s,i,u){Number.isFinite(i)||r("Invalid distance for buffer operation");const o=new e([t]),m=[i],c=this.executeMany(o,s,m,!1,u).next();return c||n("null buffer output"),c}executeManyEx(e,t,n,s,u,o,m){if(void 0!==n.find(e=>!Number.isFinite(e))&&r("Invalid distance for buffer operation"),o){const r=new c(e,t,n,s,u,!1,m);return(new i).executeMany(r,t,m,2)}return new c(e,t,n,s,u,!1,m)}}class c extends t{constructor(e,t,r,n,s,i,m){super(),this.m_currentUnionEnvelope2D=new u,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new o(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return s(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const a=new m;function f(e,t,r){return a.execute(e,t,r,null)}function h(t,r,n,s){const i=a.executeMany(new e(t),r,n,s,null);return Array.from(i)}function l(t,r,n,s,i,u){const o=a.executeManyEx(new e(t),r,n,s,i,u,null);return Array.from(o)}function x(){return a.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,x as supportsCurves};
5
+ import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{a as r,d as n,c as s}from"../../../chunks/Geometry.js";import{p as i}from"../../../chunks/SpatialReference.js";import{Envelope2D as u}from"../../../chunks/Envelope2D.js";import{B as o}from"../../../chunks/Bufferer-Dw9Qi4T1.js";class m{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,Number.NaN,96,n,s)}execute(t,s,i,u){Number.isFinite(i)||r("Invalid distance for buffer operation");const o=new e([t]),m=[i],a=this.executeMany(o,s,m,!1,u).next();return a||n("null buffer output"),a}executeManyEx(e,t,n,s,u,o,m){if(void 0!==n.find(e=>!Number.isFinite(e))&&r("Invalid distance for buffer operation"),o){const r=new a(e,t,n,s,u,!1,m);return(new i).executeMany(r,t,m,2)}return new a(e,t,n,s,u,!1,m)}}class a extends t{constructor(e,t,r,n,s,i,m){super(),this.m_currentUnionEnvelope2D=new u,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new o(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return s(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const c=new m;function f(e,t,r){return c.execute(e,t,r,null)}function h(t,r,n,s){const i=c.executeMany(new e(t),r,n,s,null);return Array.from(i)}function l(t,r,n,s,i,u){const o=c.executeManyEx(new e(t),r,n,s,i,u,null);return Array.from(o)}function x(){return c.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,x as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import{K as r}from"../../../chunks/UnitFactory.js";import"../../../chunks/Point2D.js";import"../../../chunks/MultiPathImpl.js";import"../../../chunks/Envelope2D.js";import"../../../chunks/Envelope.js";const t=new r;function o(n,r,o){return t.execute(n,r,o,null)}function e(r,o,e){const s=t.executeMany(new n(r),new n([o]),e,null);return Array.from(s)}function s(){return t.supportsCurves()}export{o as execute,e as executeMany,s as supportsCurves};
5
+ import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import{o as e}from"../../../chunks/SpatialReference.js";import"../../../chunks/Point2D.js";import"../../../chunks/MultiPathImpl.js";import"../../../chunks/Envelope2D.js";import"../../../chunks/Envelope.js";const r=new e;function t(n,e,t){return r.execute(n,e,t,null)}function o(e,t,o){const s=r.executeMany(new n(e),new n([t]),o,null);return Array.from(s)}function s(){return r.supportsCurves()}export{t as execute,o as executeMany,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{l as r,p as n,i as t}from"../../../chunks/pe.js";let o;function s(){return!!o&&t()}async function u(){if(!s()){const[e,t]=await Promise.all([import("../../../chunks/OperatorGeodesicBuffer.js"),import("../../../chunks/SpatialReference.js").then(({injectPe:e})=>e),r()]);o=new e.OperatorGeodesicBuffer,t(n)}}function c(e,r,n,t,s){return o.execute(e,r,n,t,s,!1,null)}function i(r,n,t,s,u,c){const i=o.executeMany(new e(r),n,t,s,u,!1,c,null);return Array.from(i)}function a(){return o.supportsCurves()}export{c as execute,i as executeMany,s as isLoaded,u as load,a as supportsCurves};
5
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{l as r,p as n,i as t}from"../../../chunks/pe.js";let o;function s(){return!!o&&t()}async function u(){if(!s()){const[e,t]=await Promise.all([import("../../../chunks/OperatorGeodesicBuffer.js"),import("../../../chunks/SpatialReference.js").then(e=>e.aP).then(({injectPe:e})=>e),r()]);o=new e.OperatorGeodesicBuffer,t(n)}}function c(e,r,n,t,s){return o.execute(e,r,n,t,s,!1,null)}function i(r,n,t,s,u,c){const i=o.executeMany(new e(r),n,t,s,u,!1,c,null);return Array.from(i)}function a(){return o.supportsCurves()}export{c as execute,i as executeMany,s as isLoaded,u as load,a as supportsCurves};