@arcgis/core 5.2.0-next.5 → 5.2.0-next.6

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 (849) hide show
  1. package/analysis/SliceAnalysis.d.ts +1 -1
  2. package/applications/Components/analysisUtils.d.ts +24 -0
  3. package/applications/Components/analysisUtils.js +1 -1
  4. package/arcade/Dictionary.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/Pixel.js +1 -1
  7. package/arcade/Voxel.js +1 -1
  8. package/arcade/arcade.js +1 -1
  9. package/arcade/arcadeAsyncRuntime.js +1 -1
  10. package/arcade/arcadeCompiler.js +1 -1
  11. package/arcade/arcadeRuntime.js +1 -1
  12. package/arcade/containerUtils.js +1 -1
  13. package/arcade/debug.js +1 -1
  14. package/arcade/deepClone.js +1 -1
  15. package/arcade/featureSetUtils.js +1 -1
  16. package/arcade/featureset/actions/GroupBy.js +1 -1
  17. package/arcade/featureset/actions/OrderBy.js +1 -1
  18. package/arcade/functions/convertdirection.js +1 -1
  19. package/arcade/functions/date.js +1 -1
  20. package/arcade/functions/feature.js +1 -1
  21. package/arcade/functions/featuresetbase.js +1 -1
  22. package/arcade/functions/featuresetgeom.js +1 -1
  23. package/arcade/functions/featuresetstats.js +1 -1
  24. package/arcade/functions/featuresetstring.js +1 -1
  25. package/arcade/functions/fieldStats.js +1 -1
  26. package/arcade/functions/geomasync.js +1 -1
  27. package/arcade/functions/geometry.js +1 -1
  28. package/arcade/functions/geomsync.js +1 -1
  29. package/arcade/functions/knowledgegraph.js +1 -1
  30. package/arcade/functions/maths.js +1 -1
  31. package/arcade/functions/stats.js +1 -1
  32. package/arcade/functions/string.js +1 -1
  33. package/arcade/functions/track.js +1 -1
  34. package/arcade/geometry/constructors.js +1 -1
  35. package/arcade/geometry/functions.js +1 -1
  36. package/arcade/geometry/operators.js +1 -1
  37. package/arcade/languageUtils.js +1 -1
  38. package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +1 -0
  39. package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +1 -0
  40. package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +1 -0
  41. package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +1 -0
  42. package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +1 -0
  43. package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +1 -0
  44. package/assets/components/assets/icon/orientedImagerySceneOnly16.json +1 -0
  45. package/assets/components/assets/icon/orientedImagerySceneOnly24.json +1 -0
  46. package/assets/components/assets/icon/orientedImagerySceneOnly32.json +1 -0
  47. package/assets/components/assets/icon/parquetFeatureLayer16.json +1 -0
  48. package/assets/components/assets/icon/parquetFeatureLayer24.json +1 -0
  49. package/assets/components/assets/icon/parquetFeatureLayer32.json +1 -0
  50. package/assets/esri/core/workers/RemoteClient.js +1 -1
  51. package/assets/esri/core/workers/chunks/013708f40f811158d42c.js +1 -0
  52. package/assets/esri/core/workers/chunks/{544174c33628846284a1.js → 07a242ea908aa8e2ba28.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{7e0daf0864005cdd63c5.js → 0a780a883abfcdf0b900.js} +1 -1
  54. package/assets/esri/core/workers/chunks/0d9d33f29124d464a4cb.js +1 -0
  55. package/assets/esri/core/workers/chunks/{325bfac7cfa28a6d568f.js → 0e774f14ba274832f390.js} +1 -1
  56. package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8cbaaea72f4ca2f023be.js → 129fdd1636e67997337c.js} +1 -1
  58. package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +1 -0
  59. package/assets/esri/core/workers/chunks/{942e527b9b92999886c7.js → 145364aa20b4435294c2.js} +1 -1
  60. package/assets/esri/core/workers/chunks/14c6419568d8a7a15cd6.js +1 -0
  61. package/assets/esri/core/workers/chunks/153dc2a0b08a0e44a881.js +1 -0
  62. package/assets/esri/core/workers/chunks/{9a3344f1dd22c425b8cc.js → 1595dc499a06b23b6a96.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{6c97b5bc408f051606d2.js → 166a0df6e37627e18976.js} +1 -1
  64. package/assets/esri/core/workers/chunks/168be2eac0fa3c67ae27.js +1 -0
  65. package/assets/esri/core/workers/chunks/{cf3036711bbe6095eaed.js → 16b90d8f628a412ba4ba.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{aea8e0577fb48d5c9577.js → 181e948d076a9a7aae8a.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{176e676879666f784599.js → 18e7784f13a57a75585a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{d66f68a811c90739951a.js → 1c029b03ed836f393a50.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{e6e15e9e890b864fb395.js → 1c1515e020e32e177b54.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{0aaee272520c6e5bb617.js → 1c64e10f966e26af6fed.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{b5d0898406c7d6e6a717.js → 1dacc0b64bd27ce2de3a.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{a0b6eef4890cc61609dc.js → 1ddbf5f507ac153234be.js} +1 -1
  73. package/assets/esri/core/workers/chunks/1eeb1edca0ad5db6917c.js +1 -0
  74. package/assets/esri/core/workers/chunks/1f55d60d3adc31283296.js +1 -0
  75. package/assets/esri/core/workers/chunks/{425c04b26a6ec6d04b08.js → 201007cf1a91e2b126fc.js} +1 -1
  76. package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +1 -0
  77. package/assets/esri/core/workers/chunks/20e2d11f6de438ee883e.js +1 -0
  78. package/assets/esri/core/workers/chunks/{696967c8c6f53b94f851.js → 227eff8aa4a6f5f03bc2.js} +1 -1
  79. package/assets/esri/core/workers/chunks/24646a1176ce34039155.js +1 -0
  80. package/assets/esri/core/workers/chunks/24647e7424798dccdaf5.js +1 -0
  81. package/assets/esri/core/workers/chunks/{7601408e242dca1d25bd.js → 249616ea2d90d40a8299.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{55d168c13491fcdfb284.js → 24eaf1349ffe10e616e6.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{9250615c78f8570a9cda.js → 29615df388a0df022d8c.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{a320c69bc7528ff0d0cf.js → 2c8584ec1c3c9fd5aba2.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{6ca81e34854ce7ec6f6e.js → 2ce845c990bb4d701362.js} +1 -1
  86. package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +1 -0
  87. package/assets/esri/core/workers/chunks/{0bd2b035c6ee89c725f9.js → 31442f25d550ead58fc4.js} +1 -1
  88. package/assets/esri/core/workers/chunks/319ff04282dc8ae38b56.js +2 -0
  89. package/assets/esri/core/workers/chunks/{8b8b63be961eb73250a0.js → 32323b0e0fcecd8f640e.js} +1 -1
  90. package/assets/esri/core/workers/chunks/33b4f5dfe1a16b59b010.js +1 -0
  91. package/assets/esri/core/workers/chunks/3402fb9c596b582311c7.js +1 -0
  92. package/assets/esri/core/workers/chunks/359d3acb3953e64e5a78.js +1 -0
  93. package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +1 -0
  94. package/assets/esri/core/workers/chunks/{dd58bc675b85b4d90afa.js → 39974d1e5d3820ef1680.js} +1 -1
  95. package/assets/esri/core/workers/chunks/3a6678ee9990d7e83e15.js +1 -0
  96. package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +1 -0
  97. package/assets/esri/core/workers/chunks/{2562d8905bd05ef6fd07.js → 3b3986276e70297d573b.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{d19600336cb6023d3e34.js → 3b765a8cac9e92f644f2.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{b7a0a5b895ddd2d3d038.js → 3df5394b17e9659ecb8f.js} +1 -1
  100. package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +1 -0
  101. package/assets/esri/core/workers/chunks/3e3134e4bc34d4e07179.js +30 -0
  102. package/assets/esri/core/workers/chunks/{c06ae3a6ecc4a4fc67b2.js → 40910c69307e2d2d3f28.js} +1 -1
  103. package/assets/esri/core/workers/chunks/428561df7ba6f02e2d80.js +1 -0
  104. package/assets/esri/core/workers/chunks/{0881929a4a457f94f317.js → 4301cb9670fa7c907460.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{299b4eecd0288348c971.js → 45323491f9005629c602.js} +1 -1
  106. package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +1 -0
  107. package/assets/esri/core/workers/chunks/46d3ddf62fa7a76dd57d.js +1 -0
  108. package/assets/esri/core/workers/chunks/{51816d79c6be15e4bfcf.js → 46fbd519cc1a37923bfc.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{d9d716bfd0aab30b6caf.js → 47656ec12401e53f4bd3.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{c0d7e4afbad0b20e2502.js → 47dd2bfecc5c4b5f10f0.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{f7698c855800e0af3038.js → 4845df00f6ebcce6ea3e.js} +1 -1
  112. package/assets/esri/core/workers/chunks/49f6c9e9980b8c624fd7.js +1 -0
  113. package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +1 -0
  114. package/assets/esri/core/workers/chunks/{8b5ee6be52e892fbd325.js → 4a9dd9f8aa98882218f3.js} +1 -1
  115. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +1 -0
  116. package/assets/esri/core/workers/chunks/{7c292f7b181f3b93352b.js → 4ef53455c8bc6efee80e.js} +1 -1
  117. package/assets/esri/core/workers/chunks/50dc9893e13396f5e35d.js +2 -0
  118. package/assets/esri/core/workers/chunks/{169c9eb6cd000e067c4b.js → 51ee6102f5f4840a5b47.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{a0296e6d6c37b861c5fb.js → 5359ff9492383c5bd9b1.js} +1 -1
  120. package/assets/esri/core/workers/chunks/{728ad5bbbcbf88d6249f.js → 537c5dd4cd0a067199d1.js} +1 -1
  121. package/assets/esri/core/workers/chunks/54d7f07e3348ddb6d9a2.js +1 -0
  122. package/assets/esri/core/workers/chunks/{48440a071a37590846ff.js → 54dad475dc806a38c287.js} +1 -1
  123. package/assets/esri/core/workers/chunks/5500dc39e11a0057ae16.js +1 -0
  124. package/assets/esri/core/workers/chunks/{2b2a09ce14d00b4b1187.js → 58155f24f8ed6aca7a21.js} +1 -1
  125. package/assets/esri/core/workers/chunks/{224a9f39876aa426a9bc.js → 5838f46d341d2fde42ee.js} +1 -1
  126. package/assets/esri/core/workers/chunks/{47d49777a3b3cd8e18bd.js → 58994b6bfcda5f2ada80.js} +1 -1
  127. package/assets/esri/core/workers/chunks/592a599f514de373dead.js +1 -0
  128. package/assets/esri/core/workers/chunks/{1ff61d8a8ea060e78b83.js → 5aba23584e0b230c75f5.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{566c36032b456ec5b5d7.js → 5abe34bb0110694f7b42.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{7dc2c21d61ba66a3f461.js → 5b238f9c345f10c5c2fa.js} +1 -1
  131. package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +1 -0
  132. package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +1 -0
  133. package/assets/esri/core/workers/chunks/62206d5d497b95fc4caf.js +1 -0
  134. package/assets/esri/core/workers/chunks/{69a1cbf0af059548f96a.js → 64daa2a714e59d22bbd4.js} +1 -1
  135. package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +1 -0
  136. package/assets/esri/core/workers/chunks/6637f19b82555738a1d5.js +1 -0
  137. package/assets/esri/core/workers/chunks/{7c86099ed17f420b0489.js → 67ebde34377f98d17cda.js} +1 -1
  138. package/assets/esri/core/workers/chunks/6af77529c977d034d287.js +1 -0
  139. package/assets/esri/core/workers/chunks/{cdef9c3f80588ae45a04.js → 6c9933f948efd7923aa1.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{fe2325efd0d8ad8369ed.js → 6cab67fc7044ee9b863b.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{f239a8ecad8b692d5eaa.js → 6db274f6767102a39021.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{aea384f4d88121da8f54.js → 6f0341cfa4c68e6e60b3.js} +1 -1
  143. package/assets/esri/core/workers/chunks/737de87bfb9b5f5a9c6c.js +1 -0
  144. package/assets/esri/core/workers/chunks/{558606a1af22e4a0d536.js → 73c355b895fd6a34fcb8.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{85bba0db8a7a5fc1be44.js → 7601278ebced0c0c31cf.js} +1 -1
  146. package/assets/esri/core/workers/chunks/{b09ae8eb5e97fb27382f.js → 76589434d573111a8fb4.js} +1 -1
  147. package/assets/esri/core/workers/chunks/{1f3a676e7a4eae5ad566.js → 767ea5b455b3823afd09.js} +1 -1
  148. package/assets/esri/core/workers/chunks/79f2d4b3af5776ec2045.js +1 -0
  149. package/assets/esri/core/workers/chunks/{c8dedc010fcc2382af24.js → 7b564226def99fcf79d8.js} +1 -1
  150. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +1 -0
  151. package/assets/esri/core/workers/chunks/7ed3d6c72f23c628df3b.js +1 -0
  152. package/assets/esri/core/workers/chunks/{ed939fd5d3827a3f70e0.js → 81e3bd1a0634ddc2b833.js} +1 -1
  153. package/assets/esri/core/workers/chunks/8244b74e9c3a30d8d2f6.js +2 -0
  154. package/assets/esri/core/workers/chunks/{062aadf426fe97a76bbb.js → 8351012ceb466f01b8fd.js} +1 -1
  155. package/assets/esri/core/workers/chunks/8407c91cce31e087b41b.js +1 -0
  156. package/assets/esri/core/workers/chunks/{24acf3dd541347c2b297.js → 882ee7ed8a3a0215f9b9.js} +1 -1
  157. package/assets/esri/core/workers/chunks/{98b4408e12684e37b395.js → 8a48a6760c33ed50b650.js} +1 -1
  158. package/assets/esri/core/workers/chunks/8bdca6f06c8b5fedd917.js +1 -0
  159. package/assets/esri/core/workers/chunks/8c5a41ae68775bac3446.js +1 -0
  160. package/assets/esri/core/workers/chunks/8e1865392681d390ab2e.js +1 -0
  161. package/assets/esri/core/workers/chunks/{7a823bb1b72764897dd5.js → 8f94c90fdb0333da2d0f.js} +1 -1
  162. package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
  163. package/assets/esri/core/workers/chunks/94fac056e14caed09682.js +1 -0
  164. package/assets/esri/core/workers/chunks/{f931d560f3f14598f454.js → 9dcfaca1f4fa8c8026ac.js} +1 -1
  165. package/assets/esri/core/workers/chunks/{5570d47533efab56c732.js → 9f4681713f03365a2a53.js} +1 -1
  166. package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +1 -0
  167. package/assets/esri/core/workers/chunks/{b32a13972cb3de652339.js → a320998f18922a35899f.js} +1 -1
  168. package/assets/esri/core/workers/chunks/{aa55923ca939a0d4606c.js → a3a28c4887f802e8d96d.js} +1 -1
  169. package/assets/esri/core/workers/chunks/a806ac351ef5da04c250.js +1 -0
  170. package/assets/esri/core/workers/chunks/{8795c4895df229cb471c.js → ab94c9f62462d7a98f6a.js} +1 -1
  171. package/assets/esri/core/workers/chunks/{2a8f198f6c272f92bad5.js → abdb05754c50776c3edd.js} +1 -1
  172. package/assets/esri/core/workers/chunks/{988e91cc6cf88c34c2de.js → ace1899a8e5162b4018d.js} +1 -1
  173. package/assets/esri/core/workers/chunks/ad488985824fbb830ed6.js +1 -0
  174. package/assets/esri/core/workers/chunks/af8ef6701631ed5e5b80.js +1 -0
  175. package/assets/esri/core/workers/chunks/{a95398214e530f896a2d.js → af96cbc4fb7bef726635.js} +1 -1
  176. package/assets/esri/core/workers/chunks/b08a1255dacf6cfcf139.js +640 -0
  177. package/assets/esri/core/workers/chunks/b098469e0010a6b44df9.js +1 -0
  178. package/assets/esri/core/workers/chunks/{170f8dc97614e9609443.js → b0ac4b0b7aec70cfe6eb.js} +1 -1
  179. package/assets/esri/core/workers/chunks/{4e97c01698ef36cc5e0e.js → b1f1271434af302938e8.js} +1 -1
  180. package/assets/esri/core/workers/chunks/{2f925a424b60b4a5e8e5.js → b803e7b0d489bb628d72.js} +1 -1
  181. package/assets/esri/core/workers/chunks/bb24972603fb35dd8dcf.js +1 -0
  182. package/assets/esri/core/workers/chunks/bca6abc185dedec0f41b.js +1 -0
  183. package/assets/esri/core/workers/chunks/{79b64a52ff57c40c7800.js → bf706a5d065a357de51b.js} +1 -1
  184. package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +1 -0
  185. package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
  186. package/assets/esri/core/workers/chunks/c216cd5d6b5d4fe4bab3.js +2 -0
  187. package/assets/esri/core/workers/chunks/{d21bf107698fef03125e.js → c27cb2a83a1d2e004501.js} +1 -1
  188. package/assets/esri/core/workers/chunks/c44be4aaba829e6d149d.js +1 -0
  189. package/assets/esri/core/workers/chunks/c83fea0d0ebd0d8e43fd.js +1 -0
  190. package/assets/esri/core/workers/chunks/ca4245414d8ecd217f9d.js +1 -0
  191. package/assets/esri/core/workers/chunks/ca7d4d76a6bf5a3046cd.js +1 -0
  192. package/assets/esri/core/workers/chunks/cb8c4d8334fab9bd9a04.js +1 -0
  193. package/assets/esri/core/workers/chunks/{7a3b05e25de2ff150f38.js → cc479daacd2cf715baa8.js} +1 -1
  194. package/assets/esri/core/workers/chunks/{c1ffb879e0283fb2815f.js → cc62e5095e328bed3e01.js} +1 -1
  195. package/assets/esri/core/workers/chunks/{8d4881c879c86b353e08.js → cda99b543a0e1979346c.js} +1 -1
  196. package/assets/esri/core/workers/chunks/{a53a3e5548fef65a2710.js → cf826787ab8d4b27ad80.js} +1 -1
  197. package/assets/esri/core/workers/chunks/{d6d87bfa9e6d233385a9.js → d1ac98f48bb6d43d97c8.js} +2 -2
  198. package/assets/esri/core/workers/chunks/{1252da05832e576d4def.js → d1ccc5f2d8892328ab01.js} +2 -2
  199. package/assets/esri/core/workers/chunks/d1d135a54233092ad637.js +1 -0
  200. package/assets/esri/core/workers/chunks/d35c475f004367e333eb.js +1 -0
  201. package/assets/esri/core/workers/chunks/{b44f1d08784f2e50c853.js → d3af51a6d9014ff46170.js} +1 -1
  202. package/assets/esri/core/workers/chunks/d561dc933d8fe1672d85.js +1 -0
  203. package/assets/esri/core/workers/chunks/d56780290e0218d3e9de.js +1 -0
  204. package/assets/esri/core/workers/chunks/{bbaf8baa3ca6195467e4.js → d64613209a9eb1eafb11.js} +1 -1
  205. package/assets/esri/core/workers/chunks/{cb26966cc205bd338c76.js → d81291dac1932350eccd.js} +1 -1
  206. package/assets/esri/core/workers/chunks/dddb57ff637643ccfc87.js +1 -0
  207. package/assets/esri/core/workers/chunks/{0ded5c114cbb7574f2f4.js → dfeddb7b17fa9eaae64c.js} +1 -1
  208. package/assets/esri/core/workers/chunks/e178cd0e9178d6716410.js +1 -0
  209. package/assets/esri/core/workers/chunks/{7f54d3835c0ce573a942.js → e25bcfdd8f20f8a08b19.js} +1 -1
  210. package/assets/esri/core/workers/chunks/{e0bd550b10dd402c48f1.js → e38836bfcc7a15a2fd1f.js} +1 -1
  211. package/assets/esri/core/workers/chunks/e3b713a590cce6245ee2.js +1 -0
  212. package/assets/esri/core/workers/chunks/{a40003dfe3c081d1a1d2.js → e638391801ad83fe4a68.js} +1 -1
  213. package/assets/esri/core/workers/chunks/{0b76534b60014d74ecb9.js → e7712467db46e1385cf4.js} +1 -1
  214. package/assets/esri/core/workers/chunks/e785f76c1a75cb1d1e1f.js +1 -0
  215. package/assets/esri/core/workers/chunks/{76a9b64fd573775bf6cd.js → e82488b9b3bb0c1dedb4.js} +1 -1
  216. package/assets/esri/core/workers/chunks/{15fa8b5b472131aaa68e.js → e92698f50089484c4901.js} +1 -1
  217. package/assets/esri/core/workers/chunks/e9dcc3e9dbafe9bbed84.js +1 -0
  218. package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +1 -0
  219. package/assets/esri/core/workers/chunks/edcde00495727d506c46.js +1 -0
  220. package/assets/esri/core/workers/chunks/{86a767c2b0b1e37ff493.js → eedee0af459e6b8a6116.js} +1 -1
  221. package/assets/esri/core/workers/chunks/{009250a7bded12099dd1.js → f1fb2f12371f4c562079.js} +1 -1
  222. package/assets/esri/core/workers/chunks/{466c250537415f12eb59.js → f31a8e76f1dde23c0900.js} +1 -1
  223. package/assets/esri/core/workers/chunks/f3dfe1bd1146a6927407.js +1 -0
  224. package/assets/esri/core/workers/chunks/{6b5d2df9123dfe7e00b3.js → f563dd6cace047108b3c.js} +1 -1
  225. package/assets/esri/core/workers/chunks/{6a53c8db554be55c5885.js → f5a2c28dc26c065ea355.js} +31 -21
  226. package/assets/esri/core/workers/chunks/f60292d97bcdbf19165b.js +1 -0
  227. package/assets/esri/core/workers/chunks/f79bd469b25099a31274.js +1 -0
  228. package/assets/esri/core/workers/chunks/f9e22cf59e2e2782d70f.js +1 -0
  229. package/assets/esri/core/workers/chunks/fce7995c26953bfd8d3d.js +1 -0
  230. package/assets/esri/core/workers/chunks/{e227ae2c1a63e30e62d9.js → ff48334528d2554db4fe.js} +1 -1
  231. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +18 -14
  232. package/assets/esri/themes/base/widgets/_Grid.scss +3 -3
  233. package/assets/esri/themes/dark/main.css +1 -1
  234. package/assets/esri/themes/light/main.css +1 -1
  235. package/assets/esri/themes/light/view.css +1 -1
  236. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  237. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  238. package/chunks/Centroid-DZi-eb9F.js +1 -1
  239. package/chunks/Clouds.glsl.js +1 -1
  240. package/chunks/Compositing.glsl.js +1 -1
  241. package/chunks/CutFillComposition.glsl.js +1 -1
  242. package/chunks/CutFillDepth.glsl.js +1 -1
  243. package/chunks/CutFillMask.glsl.js +1 -1
  244. package/chunks/CutFillReduction.glsl.js +1 -1
  245. package/chunks/CutFillTargetDepth.glsl.js +1 -1
  246. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  247. package/chunks/Envelope.js +1 -1
  248. package/chunks/Envelope2D.js +1 -1
  249. package/chunks/FlatGeometry.js +1 -1
  250. package/chunks/FocusAreaColor.glsl.js +1 -1
  251. package/chunks/FocusAreaMask.glsl.js +1 -1
  252. package/chunks/Fog.glsl.js +1 -1
  253. package/chunks/GaussianSplat.glsl.js +1 -1
  254. package/chunks/GaussianSplatShadow.glsl.js +1 -1
  255. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  256. package/chunks/GeodeticUtils.js +1 -1
  257. package/chunks/Geometry.js +1 -1
  258. package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
  259. package/chunks/GlobalIllumination.glsl.js +20 -19
  260. package/chunks/GlobalIlluminationBlur.glsl.js +15 -12
  261. package/chunks/GlobalIlluminationUpscale.glsl.js +4 -3
  262. package/chunks/GlowBlur.glsl.js +1 -1
  263. package/chunks/GlowComposition.glsl.js +1 -1
  264. package/chunks/HazeCompositing.glsl.js +1 -1
  265. package/chunks/HighlightBlur.glsl.js +1 -1
  266. package/chunks/HighlightDownsample.glsl.js +1 -1
  267. package/chunks/Magnifier.glsl.js +1 -1
  268. package/chunks/MultiPathImpl.js +1 -1
  269. package/chunks/NoiseTextureAtlas.glsl.js +1 -1
  270. package/chunks/OITBlend.glsl.js +2 -2
  271. package/chunks/OITBlendEmission.glsl.js +1 -1
  272. package/chunks/OITDimOpaque.glsl.js +1 -1
  273. package/chunks/OperatorClip.js +1 -1
  274. package/chunks/OperatorCrosses.js +1 -1
  275. package/chunks/OperatorCut.js +1 -1
  276. package/chunks/OperatorDensify.js +1 -1
  277. package/chunks/OperatorGeneralize.js +1 -1
  278. package/chunks/OperatorGeodesicBuffer.js +1 -1
  279. package/chunks/OperatorGeodeticArea.js +1 -1
  280. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  281. package/chunks/OperatorGeodeticDistance.js +1 -1
  282. package/chunks/OperatorGeodeticLength.js +1 -1
  283. package/chunks/OperatorIntegrate.js +1 -1
  284. package/chunks/OperatorIntersects.js +1 -1
  285. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  286. package/chunks/OperatorOverlaps.js +1 -1
  287. package/chunks/OperatorProject.js +1 -1
  288. package/chunks/OperatorProximity.js +1 -1
  289. package/chunks/OperatorProximityGeodesic.js +1 -1
  290. package/chunks/OperatorShapePreservingDensify.js +1 -1
  291. package/chunks/OperatorShapePreservingLength.js +1 -1
  292. package/chunks/OperatorShapePreservingProject.js +1 -1
  293. package/chunks/OperatorSimplifyOGC.js +1 -1
  294. package/chunks/OperatorTouches.js +1 -1
  295. package/chunks/OperatorWithin.js +1 -1
  296. package/chunks/OverlayCompositing.glsl.js +1 -1
  297. package/chunks/Point2D.js +1 -1
  298. package/chunks/PointRenderer.glsl.js +1 -1
  299. package/chunks/ProjectionTransformation.js +1 -1
  300. package/chunks/RasterColorizer.glsl.js +1 -1
  301. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  302. package/chunks/ShadowCastVisualize.glsl.js +2 -2
  303. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  304. package/chunks/SimpleAtmosphere.glsl.js +1 -1
  305. package/chunks/SpatialReference.js +1 -1
  306. package/chunks/Terrain.glsl.js +1 -1
  307. package/chunks/Texture.glsl.js +1 -1
  308. package/chunks/Transformation2D.js +1 -1
  309. package/chunks/Viewshed.glsl.js +1 -1
  310. package/chunks/aiServices.js +1 -1
  311. package/chunks/arcade.js +1 -1
  312. package/chunks/array.js +1 -1
  313. package/chunks/boundedPlane.js +1 -1
  314. package/chunks/bundle.js +1 -1
  315. package/chunks/bundle2.js +1 -1
  316. package/chunks/constants.js +1 -1
  317. package/chunks/containsOperator.js +1 -1
  318. package/chunks/disjointOperator.js +1 -1
  319. package/chunks/distanceOperator.js +1 -1
  320. package/chunks/equalsOperator.js +1 -1
  321. package/chunks/languageUtils.js +1 -1
  322. package/chunks/pe.js +1 -1
  323. package/chunks/persistableUrlUtils.js +1 -1
  324. package/chunks/relateOperator.js +1 -1
  325. package/chunks/symmetricDifferenceOperator.js +1 -1
  326. package/chunks/unionOperator.js +1 -1
  327. package/chunks/vec2.js +1 -1
  328. package/chunks/vec3.js +1 -1
  329. package/chunks/vec4.js +1 -1
  330. package/config.js +1 -1
  331. package/core/accessorSupport/decorators/persistable.js +1 -1
  332. package/core/mapCollectionUtils.js +1 -1
  333. package/core/quantityFormatUtils.js +1 -1
  334. package/core/unitFormatUtils.js +1 -1
  335. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  336. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  337. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  338. package/effects/FocusArea.js +1 -1
  339. package/geometry/Circle.js +1 -1
  340. package/geometry/coordinateFormatter.js +1 -1
  341. package/geometry/geodesicUtils.js +1 -1
  342. package/geometry/operators/extendOperator.js +1 -1
  343. package/geometry/operators/gx/geodeticUtils.js +1 -1
  344. package/geometry/operators/gx/operatorAffineTransform.js +1 -1
  345. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  346. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  347. package/geometry/operators/gx/operatorBoundary.js +1 -1
  348. package/geometry/operators/gx/operatorBuffer.js +1 -1
  349. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  350. package/geometry/operators/gx/operatorDifference.js +1 -1
  351. package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
  352. package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
  353. package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
  354. package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
  355. package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
  356. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  357. package/geometry/operators/gx/operatorIntersection.js +1 -1
  358. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  359. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  360. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  361. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  362. package/geometry/operators/gx/operatorOffset.js +1 -1
  363. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  364. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  365. package/geometry/operators/gx/operatorProject.js +1 -1
  366. package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
  367. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  368. package/geometry/operators/gx/operatorSimplify.js +1 -1
  369. package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
  370. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  371. package/geometry/operators/gx/operatorUnion.js +1 -1
  372. package/geometry/operators/isNearOperator.js +1 -1
  373. package/geometry/operators/json/containsOperator.js +1 -1
  374. package/geometry/operators/json/disjointOperator.js +1 -1
  375. package/geometry/operators/locateBetweenOperator.js +1 -1
  376. package/geometry/operators/offsetOperator.js +1 -1
  377. package/geometry/operators/reshapeOperator.js +1 -1
  378. package/geometry/operators/support/apiConverter.js +1 -1
  379. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  380. package/geometry/operators/support/initNoPeFactory.js +1 -1
  381. package/geometry/operators/support/jsonConverter.js +1 -1
  382. package/geometry/operators/support/projectionTransformation.js +1 -1
  383. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  384. package/geometry/operators/unionOperator.js +1 -1
  385. package/geometry/pe.js +1 -1
  386. package/geometry/support/MeshTexture.js +1 -1
  387. package/geometry/support/boundedPlane.js +1 -1
  388. package/geometry/support/buffer/math/vec3.js +1 -1
  389. package/geometry/support/buffer/math/vec4.js +1 -1
  390. package/geometry/support/buffer/utils/vec2.js +1 -1
  391. package/geometry/support/coordinateSystem.js +1 -1
  392. package/geometry/support/frustum.js +1 -1
  393. package/geometry/support/meshUtils/extent.js +1 -1
  394. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  395. package/geometry/support/meshUtils/projection.js +1 -1
  396. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  397. package/geometry/support/spatialReferenceUtils.js +1 -1
  398. package/kernel.js +1 -1
  399. package/layers/FeatureLayer.d.ts +1 -1
  400. package/layers/FeatureLayer.js +1 -1
  401. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  402. package/layers/IntegratedMeshLayer.js +1 -1
  403. package/layers/KnowledgeGraphLayer.js +1 -1
  404. package/layers/MediaLayer.d.ts +1 -1
  405. package/layers/SceneLayer.d.ts +2 -2
  406. package/layers/UnsupportedLayer.d.ts +10 -2
  407. package/layers/VectorTileLayer.d.ts +2 -2
  408. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  409. package/layers/mixins/ArcGISImageService.js +1 -1
  410. package/layers/mixins/BlendLayer.d.ts +1 -1
  411. package/layers/orientedImagery/transformations/utils.js +1 -1
  412. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  413. package/layers/save/featureLayerUtils.js +1 -1
  414. package/layers/support/FeatureFilter.d.ts +1 -1
  415. package/layers/support/FeatureReductionSelection.d.ts +1 -1
  416. package/layers/support/ImageElement.js +1 -1
  417. package/layers/support/ParquetFilesData.js +1 -1
  418. package/layers/support/RasterJobHandler.js +1 -1
  419. package/layers/support/RasterWorker.js +1 -1
  420. package/layers/support/SceneFilter.js +1 -1
  421. package/layers/support/arcgisLayers.js +1 -1
  422. package/layers/support/fetchService.js +1 -1
  423. package/layers/support/layerUtils.js +1 -1
  424. package/layers/support/layersLoader.js +1 -1
  425. package/libs/parquet/loadParquetModule.js +1 -1
  426. package/libs/text/loadTextModule.js +1 -1
  427. package/linkChart/LinkChartProperties.js +1 -1
  428. package/package.json +3 -3
  429. package/portal/PortalItem.js +1 -1
  430. package/renderers/FlowRenderer.d.ts +2 -2
  431. package/renderers/UniqueValueRenderer.js +1 -1
  432. package/rest/support/IdentifyParameters.js +1 -1
  433. package/rest/support/IdentifyResult.js +1 -1
  434. package/smartMapping/raster/renderers/flow.d.ts +2 -2
  435. package/smartMapping/renderers/type.js +1 -1
  436. package/smartMapping/renderers/univariateColorSize.js +1 -1
  437. package/smartMapping/symbology/flow.d.ts +2 -2
  438. package/smartMapping/symbology/types.d.ts +2 -2
  439. package/support/arcadeUtils.js +1 -1
  440. package/support/persistableUrlUtils.js +1 -1
  441. package/support/revision.js +1 -1
  442. package/symbols/Symbol3D.js +1 -1
  443. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  444. package/symbols/cim/CIMSymbolHelper.js +1 -1
  445. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  446. package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
  447. package/symbols/support/previewSymbol2D.js +1 -1
  448. package/symbols/support/urlUtils.js +1 -1
  449. package/symbols/support/webStyleSymbolUtils.js +1 -1
  450. package/views/2d/ViewStateManager.js +1 -1
  451. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  452. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  453. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +1 -1
  454. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  455. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  456. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  457. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  458. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  459. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  460. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  461. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  462. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  463. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +1 -1
  464. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  465. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +1 -1
  466. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ClipShader.js +1 -1
  467. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +1 -1
  468. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  469. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  470. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
  471. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  472. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  473. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  474. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GridShader.js +1 -1
  475. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  476. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  477. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  478. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  479. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  480. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  481. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  482. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  483. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
  484. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PostProcessingShader.js +1 -1
  485. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  486. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  487. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js +1 -1
  488. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +1 -1
  489. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
  490. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +1 -1
  491. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +1 -1
  492. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
  493. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  494. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  495. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  496. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vvUtils.js +1 -1
  497. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  498. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  499. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  500. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  501. package/views/2d/layers/BaseLayerView2D.d.ts +19 -3
  502. package/views/2d/layers/BaseLayerViewGL2D.d.ts +19 -3
  503. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  504. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  505. package/views/2d/layers/features/Processor.js +1 -1
  506. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  507. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  508. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  509. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  510. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  511. package/views/2d/navigation/ZoomBox.js +1 -1
  512. package/views/2d/navigation/actions/Pan.js +1 -1
  513. package/views/2d/navigation/actions/Pinch.js +1 -1
  514. package/views/2d/navigation/actions/Rotate.js +1 -1
  515. package/views/3d/analysis/AnalysisView3D.js +1 -1
  516. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  517. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  518. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  519. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  520. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  521. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  522. package/views/3d/analysis/LineOfSightAnalysisResult.js +1 -1
  523. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  524. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  525. package/views/3d/analysis/Slice/SliceController.js +1 -1
  526. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  527. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  528. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +1 -1
  529. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  530. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  531. package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +1 -1
  532. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  533. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  534. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  535. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  536. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  537. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  538. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  539. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  540. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  541. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  542. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  543. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
  544. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementResult.js +1 -1
  545. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  546. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  547. package/views/3d/focusAreaUtils.js +1 -1
  548. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  549. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  550. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  551. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  552. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  553. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  554. package/views/3d/layers/DrapedSubView3D.js +1 -1
  555. package/views/3d/layers/FlowSubView3D.js +1 -1
  556. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  557. package/views/3d/layers/I3SMeshView3D.js +1 -1
  558. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  559. package/views/3d/layers/ImagerySubView3D.js +1 -1
  560. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  561. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  562. package/views/3d/layers/PointCloudWorker.js +1 -1
  563. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  564. package/views/3d/layers/SceneLayerWorker.js +1 -1
  565. package/views/3d/layers/SubView3D.js +1 -1
  566. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  567. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  568. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  569. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  570. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  571. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  572. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  573. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  574. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  575. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  576. package/views/3d/layers/i3s/LoDUtil.js +1 -1
  577. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  578. package/views/3d/layers/i3s/meshUtils.js +1 -1
  579. package/views/3d/layers/support/FeatureTile.js +1 -1
  580. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  581. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  582. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  583. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  584. package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
  585. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.js +1 -1
  586. package/views/3d/layers/support/edgeUtils.js +1 -1
  587. package/views/3d/state/ScreenSizePerspective.js +1 -1
  588. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  589. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  590. package/views/3d/state/utils/navigationUtils.js +1 -1
  591. package/views/3d/support/ViewSlice.js +1 -1
  592. package/views/3d/support/dito.js +1 -1
  593. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  594. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  595. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  596. package/views/3d/support/orientedBoundingBox.js +1 -1
  597. package/views/3d/support/sunUtils.js +1 -1
  598. package/views/3d/terrain/OverlayRenderer.js +1 -1
  599. package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
  600. package/views/3d/terrain/RasterTile.js +1 -1
  601. package/views/3d/terrain/TerrainRenderer.js +1 -1
  602. package/views/3d/webgl/RenderCamera.js +1 -1
  603. package/views/3d/webgl/RenderNode.js +1 -1
  604. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  605. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  606. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  607. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  608. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  609. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  610. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  611. package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +1 -1
  612. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  613. package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
  614. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +1 -1
  615. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  616. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +1 -1
  617. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
  618. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  619. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  620. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +1 -1
  621. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  622. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  623. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  624. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  625. package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
  626. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  627. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  628. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  629. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
  630. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js +7 -0
  631. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
  632. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  633. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
  634. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +1 -1
  635. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  636. package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
  637. package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
  638. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  639. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  640. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  641. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  642. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  643. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  644. package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +1 -1
  645. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  646. package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
  647. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  648. package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +1 -1
  649. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  650. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  651. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  652. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  653. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  654. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  655. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  656. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  657. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  658. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  659. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  660. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
  661. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  662. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  663. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  664. package/views/3d/webgl-engine/lib/Texture.glsl.js +1 -1
  665. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  666. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  667. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  668. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  669. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  670. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  671. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  672. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  673. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  674. package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
  675. package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
  676. package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
  677. package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
  678. package/views/3d/webgl-engine/shaders/CutFillDepthTechniqueConfiguration.js +1 -1
  679. package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +1 -1
  680. package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
  681. package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +1 -1
  682. package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
  683. package/views/3d/webgl-engine/shaders/CutFillReductionTechniqueConfiguration.js +1 -1
  684. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
  685. package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
  686. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  687. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  688. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  689. package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
  690. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  691. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
  692. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  693. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  694. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  695. package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
  696. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  697. package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
  698. package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
  699. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  700. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  701. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  702. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  703. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  704. package/views/SceneView.d.ts +1 -1
  705. package/views/Theme.js +1 -1
  706. package/views/View.js +1 -1
  707. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  708. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +1 -1
  709. package/views/analysis/LengthDimensionResult.js +1 -1
  710. package/views/draw/drawSurfaces.js +1 -1
  711. package/views/interactive/Tooltip.js +1 -1
  712. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  713. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  714. package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
  715. package/views/interactive/sketch/constraints.js +1 -1
  716. package/views/interactive/sketch/normalizedPoint.js +1 -1
  717. package/views/interactive/snapping/SnappingOptions.d.ts +3 -3
  718. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  719. package/views/interactive/support/utils.js +1 -1
  720. package/views/interactive/tooltip/components/DrawHeaderActions.js +1 -1
  721. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  722. package/views/interactive/tooltip/fields/fields.js +1 -1
  723. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  724. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  725. package/views/layers/BuildingComponentSublayerView.js +1 -1
  726. package/views/layers/FeatureLikeLayerView.d.ts +1 -1
  727. package/views/layers/FeatureLikeLayerView.js +1 -1
  728. package/views/layers/GroupLayerView.js +1 -1
  729. package/views/layers/SceneLayerView.js +1 -1
  730. package/views/overlay/CrosshairOverlayItem.js +1 -1
  731. package/views/overlay/LineOverlayItem.js +1 -1
  732. package/views/support/angularMeasurementUtils.js +1 -1
  733. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  734. package/views/support/flow/dataUtils.js +1 -1
  735. package/views/support/geometry2dUtils.js +1 -1
  736. package/views/support/geometry3dUtils.js +1 -1
  737. package/views/webgl/RenderingContext.js +1 -1
  738. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +30 -2
  739. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  740. package/widgets/BatchAttributeForm/css.js +1 -1
  741. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +0 -5
  742. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  743. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  744. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
  745. package/widgets/BatchAttributeForm/types.d.ts +68 -1
  746. package/widgets/BatchAttributeForm.js +1 -1
  747. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  748. package/widgets/BuildingExplorer/BuildingLevelPicker/constants.js +1 -1
  749. package/widgets/Daylight.d.ts +1 -1
  750. package/widgets/Directions/DirectionsViewModel.js +1 -1
  751. package/widgets/Editor/components/Settings.js +1 -1
  752. package/widgets/Editor.d.ts +8 -8
  753. package/widgets/ElevationProfile.d.ts +1 -1
  754. package/widgets/FeatureTable/ActionColumn.d.ts +1 -1
  755. package/widgets/FeatureTable/FieldColumn.d.ts +14 -1
  756. package/widgets/Histogram/HistogramViewModel.js +1 -1
  757. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  758. package/widgets/Sketch/SketchViewModel.d.ts +38 -38
  759. package/widgets/Sketch.d.ts +39 -39
  760. package/widgets/Sketch.js +1 -1
  761. package/widgets/Slice.d.ts +1 -1
  762. package/widgets/UtilityNetworkTrace.d.ts +1 -1
  763. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
  764. package/widgets/support/ContingentValuesManager.js +1 -1
  765. package/assets/esri/core/workers/chunks/069459519477bb3dc91b.js +0 -1
  766. package/assets/esri/core/workers/chunks/0b445c1cf281f158c1f1.js +0 -1
  767. package/assets/esri/core/workers/chunks/0e9804ece1fd2d59751b.js +0 -1
  768. package/assets/esri/core/workers/chunks/115664cb7d7b22a315bb.js +0 -1
  769. package/assets/esri/core/workers/chunks/123a67e84ed68b96ac59.js +0 -1
  770. package/assets/esri/core/workers/chunks/163ce1be8bfe20e77f97.js +0 -1
  771. package/assets/esri/core/workers/chunks/18201119828664373165.js +0 -1
  772. package/assets/esri/core/workers/chunks/18ebf1d3ed05c8057f7d.js +0 -1
  773. package/assets/esri/core/workers/chunks/19f07c8d0f32ec889861.js +0 -1
  774. package/assets/esri/core/workers/chunks/1bd8a7f92a428eedb22e.js +0 -1
  775. package/assets/esri/core/workers/chunks/1f537c05c2f643acb5e7.js +0 -1
  776. package/assets/esri/core/workers/chunks/241aeff6afd074ce105b.js +0 -1
  777. package/assets/esri/core/workers/chunks/2855357a2c1f2ab03fb7.js +0 -1
  778. package/assets/esri/core/workers/chunks/2e8db0f05df2e38a14e1.js +0 -2
  779. package/assets/esri/core/workers/chunks/30e191d36aa95823c018.js +0 -1
  780. package/assets/esri/core/workers/chunks/315bf08dff4757ffbed3.js +0 -1
  781. package/assets/esri/core/workers/chunks/31c01885ee6d70a2bde2.js +0 -1
  782. package/assets/esri/core/workers/chunks/3292b3883f203637b5a7.js +0 -1
  783. package/assets/esri/core/workers/chunks/32f24a66f684de3c243d.js +0 -1
  784. package/assets/esri/core/workers/chunks/35527a01d61cabbfd33e.js +0 -1
  785. package/assets/esri/core/workers/chunks/3aebbed6d4fd1b993a35.js +0 -1
  786. package/assets/esri/core/workers/chunks/3f1d533efe4300d19e6a.js +0 -1
  787. package/assets/esri/core/workers/chunks/413d2fa54508e6f42c74.js +0 -1
  788. package/assets/esri/core/workers/chunks/4325fa92dafca465ae26.js +0 -1
  789. package/assets/esri/core/workers/chunks/4364a3e706294bb6ae41.js +0 -1
  790. package/assets/esri/core/workers/chunks/438f35d41c6851736818.js +0 -30
  791. package/assets/esri/core/workers/chunks/453c9e8d438d061e1736.js +0 -1
  792. package/assets/esri/core/workers/chunks/479e34b0abc10499bd3a.js +0 -1
  793. package/assets/esri/core/workers/chunks/49675e77a351abda2728.js +0 -1
  794. package/assets/esri/core/workers/chunks/4cdf80e2e60501dd4756.js +0 -1
  795. package/assets/esri/core/workers/chunks/51edfe21d4c6ee22c83d.js +0 -1
  796. package/assets/esri/core/workers/chunks/5524a71d1abc9568ce26.js +0 -1
  797. package/assets/esri/core/workers/chunks/557e39e5156b313597f9.js +0 -1
  798. package/assets/esri/core/workers/chunks/55b765c72d13b3b911f9.js +0 -1
  799. package/assets/esri/core/workers/chunks/5dc86a3a40d16b576bb5.js +0 -1
  800. package/assets/esri/core/workers/chunks/6182d39e2095d4460b88.js +0 -1
  801. package/assets/esri/core/workers/chunks/621d71d26bd20e296138.js +0 -1
  802. package/assets/esri/core/workers/chunks/67dffb896b6ef4b2038b.js +0 -1
  803. package/assets/esri/core/workers/chunks/694f9571e2723d3d4b02.js +0 -1
  804. package/assets/esri/core/workers/chunks/69ad5930ff6040c6c561.js +0 -1
  805. package/assets/esri/core/workers/chunks/6af88bb722bbb37db198.js +0 -2
  806. package/assets/esri/core/workers/chunks/70d8f5bdb452cee41536.js +0 -2
  807. package/assets/esri/core/workers/chunks/728151d24334027af635.js +0 -1
  808. package/assets/esri/core/workers/chunks/78af4b7a379c40f497a7.js +0 -1
  809. package/assets/esri/core/workers/chunks/7f1fcddc8dd42a1b67d9.js +0 -1
  810. package/assets/esri/core/workers/chunks/86443e47ad99e555753a.js +0 -1
  811. package/assets/esri/core/workers/chunks/86f2de7dda7992ae706c.js +0 -1
  812. package/assets/esri/core/workers/chunks/895114ccd2603830960f.js +0 -1
  813. package/assets/esri/core/workers/chunks/927c8ca7fd385b28a1b7.js +0 -640
  814. package/assets/esri/core/workers/chunks/95d82c619dcbec2e1050.js +0 -1
  815. package/assets/esri/core/workers/chunks/979bab62cad788180770.js +0 -1
  816. package/assets/esri/core/workers/chunks/9d70247d820085a2c190.js +0 -1
  817. package/assets/esri/core/workers/chunks/a0aaf14c8f9a007d88ac.js +0 -1
  818. package/assets/esri/core/workers/chunks/a0fce639319d59becd01.js +0 -2
  819. package/assets/esri/core/workers/chunks/aa03f770178693167aa0.js +0 -1
  820. package/assets/esri/core/workers/chunks/aea439d4c2308f88b295.js +0 -1
  821. package/assets/esri/core/workers/chunks/af45110f07e4b5162bae.js +0 -1
  822. package/assets/esri/core/workers/chunks/b0c647af49c9d563b852.js +0 -1
  823. package/assets/esri/core/workers/chunks/b640651c7d86cfe654bf.js +0 -1
  824. package/assets/esri/core/workers/chunks/b78fb24b47d9f31f18c6.js +0 -1
  825. package/assets/esri/core/workers/chunks/b8dda9e55caba0e2b4c2.js +0 -1
  826. package/assets/esri/core/workers/chunks/ba693317ed3939587f30.js +0 -1
  827. package/assets/esri/core/workers/chunks/c13c532fe38ddc5d7ca6.js +0 -1
  828. package/assets/esri/core/workers/chunks/c4872cf3b71d00f450e1.js +0 -1
  829. package/assets/esri/core/workers/chunks/c5b7ff8650235c464dbf.js +0 -1
  830. package/assets/esri/core/workers/chunks/caf80facb0322be054ab.js +0 -1
  831. package/assets/esri/core/workers/chunks/cc48354c54358777e996.js +0 -1
  832. package/assets/esri/core/workers/chunks/d5423df247be82fa085a.js +0 -1
  833. package/assets/esri/core/workers/chunks/d598d08dbf2796742e8c.js +0 -1
  834. package/assets/esri/core/workers/chunks/da4f7d7099ba88f31f45.js +0 -1
  835. package/assets/esri/core/workers/chunks/dbb1ac41fd5da4fd849b.js +0 -1
  836. package/assets/esri/core/workers/chunks/dc259eed58fde3f5cb5c.js +0 -1
  837. package/assets/esri/core/workers/chunks/e0036fa0324a96a88248.js +0 -1
  838. package/assets/esri/core/workers/chunks/e29d182460564c2a52ad.js +0 -1
  839. package/assets/esri/core/workers/chunks/eda083e9d12e45da0a7b.js +0 -1
  840. package/assets/esri/core/workers/chunks/f0b5c140a5ba174572b6.js +0 -1
  841. package/assets/esri/core/workers/chunks/f286680e363eefdf27df.js +0 -1
  842. package/assets/esri/core/workers/chunks/fa3138dd8139008b430d.js +0 -1
  843. package/assets/esri/core/workers/chunks/fb0afb41a3d87d59f574.js +0 -1
  844. package/assets/esri/core/workers/chunks/fc9fbc8e4e459edf4e37.js +0 -1
  845. /package/assets/esri/core/workers/chunks/{6af88bb722bbb37db198.js.LICENSE.txt → 319ff04282dc8ae38b56.js.LICENSE.txt} +0 -0
  846. /package/assets/esri/core/workers/chunks/{70d8f5bdb452cee41536.js.LICENSE.txt → 50dc9893e13396f5e35d.js.LICENSE.txt} +0 -0
  847. /package/assets/esri/core/workers/chunks/{2e8db0f05df2e38a14e1.js.LICENSE.txt → 8244b74e9c3a30d8d2f6.js.LICENSE.txt} +0 -0
  848. /package/assets/esri/core/workers/chunks/{a0fce639319d59becd01.js.LICENSE.txt → c216cd5d6b5d4fe4bab3.js.LICENSE.txt} +0 -0
  849. /package/assets/esri/core/workers/chunks/{1252da05832e576d4def.js.LICENSE.txt → d1ccc5f2d8892328ab01.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{G as e}from"../../../chunks/GeometryCursor.js";import{m as i,p as n,f as s,G as o,r,g as h}from"../../../chunks/Geometry.js";import{aa as d,P as g,O as a,ac as c,aJ as l,ab as u,aG as f,ak as m}from"../../../chunks/Point2D.js";import{P as p,d as E,a4 as x,_ as P}from"../../../chunks/MultiPathImpl.js";function _(t,e,i,n,s,o){const r=n-e;if(r<=o)return P(t,e,i,n,s),i;const h=w(t,e,n,s,Math.min(Math.max(r>>1,3),100)),d=t[h];t[e]=f(t[h],t[h]=t[e]);let g=e+1,a=!1;for(let c=e+1;c!==n;++c)s(t[c],d)&&(t[g]=f(t[c],t[c]=t[g]),++g,a=!0);if(!a)for(let c=e+1;c<i;++c)s(d,t[c])||(c!==g&&(t[g]=f(t[c],t[c]=t[g])),++g);return--g,t[g]=f(t[e],t[e]=t[g]),g}function F(t,e,i){const n=Math.trunc(e/2);let s=BigInt(n);const o=BigInt(e);for(let h=0;h<i;++h)t.push(Number(s%o)),s=6364136223846793005n*s+1442695040888963407n&0x7fffffffffffffffn,s=BigInt.asUintN(64,s);m(t);const r=l(t,(t,e)=>t===e);t.length=r}function w(t,e,i,n,s){const o=[];F(o,i-e,s);const r=[];for(let d=0,g=o.length;d<g;d++){const i=o[d];r.push(u(t[e+i],i))}const h=Math.trunc(r.length/2);return r.sort((t,e)=>n(t.first,e.first)?-1:1),e+r[h].second}function k(){return{p:new g,userData:Number.NaN,edge:null}}class T{constructor(){this.info=0,this.mask=!1,this.p=null,this.a=[null,null],this.twin=null}nextFreeEdge(){return this.twin}setIndex(t){this.info=t,this.mask=!1}getIndex(){return this.info}setMask(){this.mask=!0}getMask(){return this.mask}}function y(t,e){return{first:t,second:e}}function C(t,e){t.first=e.first,t.second=e.second}function b(){return this.i1-this.i0}function D(){return{i0:Number.NaN,i1:Number.NaN,nextFreeEdgeIndex:[-1],box:[y(null,null),y(null,null)],size:b}}function I(){return{k:0,pTask:null,pTask0:null,pTask1:null}}function X(){return{p:[new g,new g],points:[null,null]}}function Y(){return{p:[null,null,null]}}class N{constructor(){this.m_nextFreePairEdge=y(null,null),this.m_points=[],this.m_pointZero=null,this.m_edges=[],this.m_voronoiToEdge=[],this.m_nextFreeEdge=0}clear(){this.m_nextFreePairEdge=y(null,null),this.m_points.length=0,this.m_pointZero=null,this.m_edges.length=0,this.m_voronoiToEdge.length=0,this.m_nextFreeEdge=0}reservePoints(t){h(t>1)}prepare(t){{const e=k();e.p.x=Number.POSITIVE_INFINITY,e.p.y=Number.POSITIVE_INFINITY,e.userData=t,this.m_points.push(e)}}addVertex(t,e){const i=k();i.p.assign(t),i.userData=e,i.edge=null,this.m_points.push(i)}removeDuplicates(){const t=this.m_points.shift();this.m_points.sort((t,e)=>t.p.compareX(e.p));const e=l(this.m_points,(t,e)=>t.p.equals(e.p)),i=e!==this.m_points.length;return this.m_points.length=e,this.m_points.unshift(t),i}boundVoronoiCells(t,e){const i=this.m_points.length;if(i<2)return!1;const n=[this.m_points[1].p.clone(),this.m_points[1].p.clone()];for(let d=2;d<i;d++){const t=this.m_points[d].p;t.x<n[0].x&&(n[0].x=t.x),n[1].x<t.x&&(n[1].x=t.x),t.y<n[0].y&&(n[0].y=t.y),n[1].y<t.y&&(n[1].y=t.y)}const s=new g;s.x=.5*(n[0].x+n[1].x),s.y=.5*(n[0].y+n[1].y);let o=0;for(let d=1;d<i;d++){const t=this.m_points[d].p,e=g.sqrDistanceCoords(t.x,t.y,s.x,s.y);o<e&&(o=e)}const r=Math.sqrt(o),h=Math.max(r+2*t,1.5*r);{const t=.8660254037844386,i=.5;let n=1,o=0;for(let r=0;r<12;r++){const r=new g;r.x=s.x+h*n,r.y=s.y+h*o,this.addVertex(r,e);const d=n*i+o*t;n=n*t-o*i,o=d}}return!0}construct(){const t=D();return!!this.constructTask(t)&&(this.solveTask(t),!0)}constructTask(t){if(this.m_pointZero=this.createZeroHandle(),h(void 0!==this.m_pointZero),this.m_points.length<3)return!1;const e=6*(this.m_points.length-2);this.m_edges=d(T,e);for(let i=0;i<e;i++)this.m_edges[i].setIndex(i);return t.i0=1,t.i1=this.m_points.length,t.nextFreeEdgeIndex[0]=0,!0}splitTask(t,e,i,n){const s=t,o=e,r=i,h=n;s.k=this.findMaxSide(h.i0,h.i1);let d=h.i0+h.i1>>1;const g=1250;if(0===s.k){d=_(this.m_points,h.i0,d,h.i1,(t,e)=>t.p[0]!==e.p[0]?t.p[0]<e.p[0]:t.p[1]<e.p[1],g)}else{d=_(this.m_points,h.i0,d,h.i1,(t,e)=>t.p[1]!==e.p[1]?t.p[1]<e.p[1]:t.p[0]<e.p[0],g)}o.i0=h.i0,o.i1=d,o.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(o.i1-o.i0-1)+2,r.i0=d,r.i1=h.i1,r.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(r.i1-r.i0-1)+2,s.pTask=h,s.pTask0=o,s.pTask1=r}solveMergeTask(t){const e=this.newPairEdgeEx(t.pTask.nextFreeEdgeIndex,!1);if(t.pTask.box[t.k]=y(t.pTask0.box[t.k].first,t.pTask1.box[t.k].second),t.pTask.box[1-t.k]=y(A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].first),this.getPointXYFromEdge(t.pTask1.box[1-t.k].first),1-t.k)?t.pTask0.box[1-t.k].first:t.pTask1.box[1-t.k].first,A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].second),this.getPointXYFromEdge(t.pTask1.box[1-t.k].second),1-t.k)?t.pTask1.box[1-t.k].second:t.pTask0.box[1-t.k].second),t.pTask.i0+2===t.pTask.i1){const i=t.pTask0.box[t.k].second,n=i.twin,s=t.pTask1.box[t.k].first,o=s.twin;return this.joinEdges2(n,o),this.joinEdges2(o,n),void this.join(i,s,0,1,e)}const i=[new Array(2),new Array(2)];i[0][0]=i[1][0]=y(t.pTask0.box[t.k].second,t.pTask0.box[t.k].second.twin),i[0][1]=i[1][1]=y(t.pTask1.box[t.k].first,t.pTask1.box[t.k].first.twin);const n=[!1,!1];if(t.pTask0.i0+1===t.pTask0.i1?(this.findEdgeSide(i[0],n,1,0),this.findEdgeSide(i[1],n,1,1)):(this.findEdge(i[0],n,0),this.findEdge(i[1],n,1)),n[0]||n[1]){if(n[0]){const e=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1);this.insertEdge(i[0][0].first,e.first,0),this.insertEdge(i[0][0].second,e.second,1)}if(n[1]){const e=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1);this.insertEdge(i[0][1].first,e.first,1),this.insertEdge(i[0][1].second,e.second,0)}}else this.getNextDEdge(i[0][0].first,0)!==i[0][0].first&&(i[1][0]=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1),this.insertEdge(i[0][0].first,i[1][0].first,0),this.insertEdge(i[0][0].second,i[1][0].second,1)),this.getNextDEdge(i[0][1].first,0)!==i[0][1].first&&(i[1][1]=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1),this.insertEdge(i[0][1].first,i[1][1].first,1),this.insertEdge(i[0][1].second,i[1][1].second,0));this.merge(i[1][0],i[0][0],i[0][1],i[1][1],e)}solveTask(t){const e=t;switch(e.i1-e.i0){case 1:{this.insertPoint(e.i0,e.nextFreeEdgeIndex);const t=this.m_points[e.i0].edge;e.box[0]=e.box[1]=u(t,t)}break;case 2:{const t=e.i0,i=t+1;this.insertPoint(t,e.nextFreeEdgeIndex),this.insertPoint(i,e.nextFreeEdgeIndex);const n=this.m_points[t],s=this.m_points[i],o=n.edge,r=s.edge,h=o.twin,d=r.twin;this.joinEdges2(h,d),this.joinEdges2(d,h);const g=this.newPairEdgeEx(e.nextFreeEdgeIndex,!1);this.join(o,r,0,1,g);for(let a=0;a<2;a++)e.box[a]=A(this.getPointXY(n),this.getPointXY(s),a)?y(o,r):y(r,o)}break;case 3:{const t=[e.i0,e.i0+1,e.i0+2];this.insertPoint(t[0],e.nextFreeEdgeIndex),this.insertPoint(t[1],e.nextFreeEdgeIndex),this.insertPoint(t[2],e.nextFreeEdgeIndex);const i=[this.m_points[t[0]],this.m_points[t[1]],this.m_points[t[2]]],n=this.caseFromCompare(i[0].p,i[1].p,i[2].p),s=[i[0].edge,i[1].edge,i[2].edge],o=N.c_aTableDelaunayTriangulationSolution[n],r=v(19*v(1+(7&o))),h=v(19*v(1+(o>>5)));let d=v(o<<3)>>6;const g=3&r,a=r>>6,c=3&h,l=h>>6;e.box[0]=y(s[g],s[a]),e.box[1]=y(s[c],s[l]);const u=[s[0].twin,s[1].twin,s[2].twin],m=[this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1)];switch(3===d&&(d=this.orientation(i[0].p,i[1].p,i[2].p)+1),d){case 0:this.joinEdges2(u[0],u[2]),this.joinEdges2(u[2],u[1]),this.joinEdges2(u[1],u[0]),this.join(s[0],s[2],0,1,m[0]),this.join(s[2],s[1],0,1,m[1]),this.join(s[1],s[0],0,1,m[2]);break;case 1:{const t=[0,1,2];t[3-(g+a)]=f(t[1],t[1]=t[3-(g+a)]),this.joinEdges2(u[t[0]],u[t[1]]),this.joinEdges2(u[t[1]],u[t[2]]),this.joinEdges2(u[t[2]],u[t[0]]),this.join(s[t[0]],s[t[1]],0,1,m[0]),this.join(s[t[1]],s[t[2]],0,1,m[1]),this.join(m[1].first,u[t[2]],0,1,m[2])}break;case 2:this.joinEdges2(u[0],u[1]),this.joinEdges2(u[1],u[2]),this.joinEdges2(u[2],u[0]),this.join(s[0],s[1],0,1,m[0]),this.join(s[1],s[2],0,1,m[1]),this.join(s[2],s[0],0,1,m[2])}}break;default:{const e=I(),i=D(),n=D();this.splitTask(e,i,n,t),this.solveTask(i),this.solveTask(n),this.solveMergeTask(e)}}}getOutsideHull(){const t=[],e=this.m_points[0].edge;let i=e;do{t.push(this.getPointFromEdge(this.getTwinEdge(i))),i=this.getNextDEdge(i,0)}while(i!==e);return t}getConvexHull(){const t=[],e=this.m_points[0].edge;let i=e;do{const e=this.getPointFromEdge(this.getTwinEdge(i));t.length<2||!this.insideLine(this.getPointXY(t.at(-2)),this.getPointXY(t.at(-1)),this.getPointXY(e))?t.push(e):t[t.length-1]=e,i=this.getNextDEdge(i,0)}while(i!==e);return 2<t.length&&this.insideLine(this.getPointXY(t[0]),this.getPointXY(t.at(-1)),this.getPointXY(t.at(-2)))&&t.pop(),2<t.length&&this.insideLine(this.getPointXY(t[1]),this.getPointXY(t[0]),this.getPointXY(t.at(-1)))&&(t[0]=t.at(-1),t.pop()),t}getVoronoiPolygon(t,e){t.length=0;const i=this.getEdgeFromPoint(e);let n=i;for(;;){const e=this.calculateCircleCenter(n);t.push(e);const s=this.getNextDEdge(n,1);if(s===i)break;n=s}}getNearestPoint(t){this.isInfinitePointFromPoint(t)&&r("Not supported for the infinite point");const e=this.getPointXY(t);let i=this.m_pointZero,n=Number.MAX_VALUE;const s=this.getEdgeFromPoint(t);let o=s;do{const t=this.getPointFromEdge(this.getTwinEdge(o));if(!this.isInfinitePointFromPoint(t)){const s=g.sqrDistance(e,this.getPointXY(t));s<n&&(i=t,n=s)}o=this.getCounterClockwiseEdge(o)}while(o!==s);return i}addConstraint(t,e){const i=[null],n=[null];if(!this.constraintFindFirstEdge(i,n,t,e))return y(n[0],i[0]);i[0]=this.getTwinEdge(i[0]);const s=this.getPointXY(t),o=this.getPointXY(e),h=[new Array(0),new Array(0)],d=i[0];for(;;){const t=this.getClockwiseEdge(n[0]);t.getMask()&&r("add_constraint");const d=y(t,this.getTwinEdge(t));this.deleteTwinEdges(d,!0);const g=this.getCounterClockwiseEdge(this.getTwinEdge(i[0])),a=this.getTwinEdge(this.getClockwiseEdge(n[0])),c=this.getPointFromEdge(a);if(c===e){h[0].push(i[0]),i[0]=g,h[1].push(n[0]),n[0]=a;break}const l=this.orientation(s,o,this.getPointXY(c));0===l&&r("add_constraint - point on constraint"),0<l?(h[0].push(i[0]),i[0]=g):(h[1].push(n[0]),n[0]=a)}h[0].push(i[0]),h[1].push(n[0]);const g=this.newPairEdge();g.first.setMask(),g.second.setMask(),this.join(n[0],d,1,1,g),this.triangulateConstraint(h[0],1,h[0].length-1,g),h[1].reverse();const a=y(g.second,g.first);return this.triangulateConstraint(h[1],1,h[1].length-1,a),a}verify(){for(let t=0,e=this.m_edges.length;t<e;t++){const e=this.m_edges[t];if(!e.getMask()&&!this.testEdge(e))return!1}return!0}getDelaunayTriangleCount(){return this.m_points.length-2<<1}getVoronoiSegments(t=Number.MAX_VALUE){const e=[];for(let i=0,n=this.m_edges.length;i<n;i+=2){const n=y(null,null);if(n.first=this.m_edges[i],n.second=n.first.twin,this.isInfinitePointFromEdge(n.first)&&(n.second=f(n.first,n.first=n.second)),this.isInfinitePointFromEdge(n.second)){const i=d(g,3);i[0]=this.calculateCircleCenter(this.getNextDEdge(n.first,0).twin,1),i[2]=this.calculateCircleCenter(this.getNextDEdge(n.first,1),1);const s=d(g,2);s[0].assign(i[0]),s[1].assign(i[2]),s[0].rightPerpendicularThis(),s[1].leftPerpendicularThis(),i[1]=i[0].add(s[0]).add(i[2].add(s[1])),i[1].normalize();for(const e of i)e.mulThis(t);const o=X();o.points[0]=n.first.p,o.points[1]=n.second.p;for(let t=0;t<i.length-1;t++){for(let e=0;e<2;e++)o.p[e]=i[t+e];o.p[0].equals(o.p[1])||e.push(o)}}else if(this.isInfinitePointFromEdge(this.getNextDEdge(n.first,0).twin)&&this.isInfinitePointFromEdge(this.getNextDEdge(n.first,1).twin)){const t=d(g,3);t[0]=this.calculateCircleCenter(n.first),t[1]=this.getPointXY(this.getPointFromEdge(n.first)).add(this.getPointXY(this.getPointFromEdge(n.second))).mul(.5),t[2]=this.calculateCircleCenter(n.second);const i=X();i.points[0]=n.first.p,i.points[1]=n.second.p;for(let n=0;n<t.length-1;n++){for(let e=0;e<2;e++)i.p[e]=t[n+e];i.p[0].equals(i.p[1])||e.push(i)}}else{const t=X();t.p[0]=this.calculateCircleCenter(n.first),t.p[1]=this.calculateCircleCenter(n.second),t.points[0]=n.first.p,t.points[1]=n.second.p,t.p[0].equals(t.p[1])||e.push(t)}}return e}startDelaunayTriangles(){return-1}nextDelaunayTriangle(t,e){for(;;){if(++e[0],e[0]===this.m_edges.length)return!1;const i=this.m_edges[e[0]];if(t.p[0]=this.getPointFromEdge(i),this.isInfinitePointFromPoint(t.p[0]))continue;const n=this.getTwinEdge(i);if(t.p[1]=this.getPointFromEdge(n),this.isInfinitePointFromPoint(t.p[1]))continue;if(this.getPointXY(t.p[1]).lt(this.getPointXY(t.p[0])))continue;const s=this.getTwinEdge(this.getNextDEdge(i,1));if(t.p[2]=this.getPointFromEdge(s),!this.isInfinitePointFromPoint(t.p[2])&&!this.getPointXY(t.p[2]).lt(this.getPointXY(t.p[0])))return!0}}getPointCount(){return this.m_points.length-1}getPoint(t){return this.m_points[t+1]}getInfinitePoint(){return this.m_pointZero}isInfinitePointFromPoint(t){return t===this.m_pointZero}getPointXY(t){return t.p}getPointIndex(t){return t.userData}setPointIndex(t,e){t.userData=e}getEdgeFromPoint(t){return t.edge}isInfinitePointFromEdge(t){return t.p===this.m_pointZero}getEdgeCount(){return this.m_edges.length}getEdge(t){return this.m_edges[t]}getEdgeIndex(t){return t.getIndex()}getPointFromEdge(t){return t.p}getPointXYFromEdge(t){return t.p.p}getCounterClockwiseEdge(t){return t.a[0]}getClockwiseEdge(t){return t.a[1]}getTwinEdge(t){return t.twin}getPreviousEdge(t){return this.getTwinEdge(this.getCounterClockwiseEdge(t))}getNextEdge(t){return this.getClockwiseEdge(this.getTwinEdge(t))}getNextDEdge(t,e=1){return t.a[e]}newPairEdge(){const t=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second);return this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge(),t.first.twin=t.second,t.second.twin=t.first,t}newPairEdgeEx(t,e){let i;if(e&&null!==this.m_nextFreePairEdge.first)i=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second),this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge();else{const e=t[0]++,n=t[0]++;i=y(this.m_edges[e],this.m_edges[n])}return i.first.twin=i.second,i.second.twin=i.first,i}insertEdge(t,e,i){e.p=t.p;const n=t.a[i],s=e.a;s[i]=n,s[1-i]=t,t.a[i]=e,n.a[1-i]=e}insertPoint(t,e){const i=this.m_points[t],n=this.newPairEdgeEx(e,!1),s=n.first,o=n.second;i.edge=n.first,s.p=this.m_points[t],s.a[0]=n.first,s.a[1]=n.first,o.p=this.m_pointZero,o.a[0]=n.second,o.a[1]=n.second,null===this.m_points[0].edge&&(this.m_points[0].edge=n.second)}deleteTwinEdges(t,e){this.deleteEdge(t.first),this.deleteEdge(t.second),e&&(t.first.twin=this.m_nextFreePairEdge.first,t.second.twin=this.m_nextFreePairEdge.second,this.m_nextFreePairEdge=t)}join(t,e,i,n,s){this.insertEdge(t,s.first,i),this.insertEdge(e,s.second,n)}joinEdges2(t,e){t.a[1]=e,e.a[0]=t}checkEdge(t,e,i,n,s){for(;;){const o=y(null,null);if(o.first=this.getNextDEdge(t.first,n),o.second=o.first.twin,this.isInfinitePointFromEdge(o.second))return t;const r=this.getPointXYFromEdge(t.second),h=this.getPointXYFromEdge(o.second);if(this.inCircle(e,i,r,h)<=0)return t;if(this.deleteTwinEdges(t,s),!s){const e=this.getNextDEdge(t.second,n).twin;this.join(o.second,e,n,n,t)}t=o}}calculateCircleCenter(t,e=Number.MAX_VALUE){const i=this.getPointXYFromEdge(t),n=this.getPointXYFromEdge(t.twin),s=this.getNextDEdge(t,0);if(this.isInfinitePointFromEdge(s.twin)){const t=new g;if(Number.isNaN(e))t.setNAN();else{const s=n.sub(i);s.leftPerpendicularThis(),t.assign(s),t.divThis(Math.max(Math.abs(t.x),Math.abs(t.y))),t.normalize(),t.mulThis(e)}return t}const o=this.getPointXYFromEdge(s.twin);return this.calculateCircleCenterFromThreePoints(i,n,o)}createZeroHandle(){return this.m_points[0]}deleteEdge(t){const e=t,i=e.p;i.edge===t&&(i.edge=e.a[0]),e.a[0].a[1]=e.a[1],e.a[1].a[0]=e.a[0]}testEdge(t){if(this.isInfinitePointFromEdge(t))return!0;const e=t.twin;if(this.isInfinitePointFromEdge(e))return!0;const i=this.getNextDEdge(t,0).twin,n=this.getNextDEdge(e,0).twin;if(this.isInfinitePointFromEdge(i)||this.isInfinitePointFromEdge(n))return!0;const s=this.getPointXYFromEdge(t),o=this.getPointXYFromEdge(e),r=this.getPointXYFromEdge(i),h=this.getPointXYFromEdge(n);return!(this.orientation(s,o,r)<=0)&&(!(0<=this.orientation(s,o,h))&&this.inCircle(s,o,r,h)<=0)}findMaxSide(t,e){const i=[this.m_points[t].p.clone(),this.m_points[t].p.clone()];for(t++;t!==e;t++){const e=this.m_points[t].p;e.x<i[0].x&&(i[0].x=e.x),i[1].x<e.x&&(i[1].x=e.x),e.y<i[0].y&&(i[0].y=e.y),i[1].y<e.y&&(i[1].y=e.y)}return i[1].x-i[0].x<i[1].y-i[0].y?1:0}findEdge(t,e,i){let n=!1,s=0;for(;;){const o=y(null,null);if(o.second=this.getNextDEdge(t[s].second,i^s),o.first=o.second.twin,0===i&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first))<0||1===i&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first)))t[s]=o,e[s]=!0,n=!1;else{if(n)return;s^=1,n=!0}}}findEdgeSide(t,e,i,n){for(;;){const s=y(null,null);if(s.second=this.getNextDEdge(t[i].second,n^i),s.first=s.second.twin,!(0===n&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))<0||1===n&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))))return;t[i]=s,e[i]=!0}}merge(t,e,i,n,s){const o={...t},r={...n},h={...s};let d={...e},g={...i};const a=d.second,c=g.second;for(;;){if(this.join(d.first,g.first,0,1,h),d.first=this.getNextDEdge(h.first,0),g.first=this.getNextDEdge(h.second,1),d.first===o.first&&g.first===r.first){this.joinEdges2(a,c),this.joinEdges2(r.second,o.second);break}d.second=d.first.twin,g.second=g.first.twin;const t=this.getPointXYFromEdge(h.first),e=this.getPointXYFromEdge(h.second);if(d.first===o.first){let i=y(null,null);i.first=this.getNextDEdge(g.first,1),i.second=i.first.twin,i=this.checkEdge(i,t,e,1,!1),C(d,h),C(h,g),g=y(i.second,i.first)}else if(g.first===r.first){let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1),g=y(h.second,h.first),C(h,d),d=y(i.second,i.first)}else{let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1);let n=y(null,null);n.first=this.getNextDEdge(g.first,1),n.second=n.first.twin,n=this.checkEdge(n,t,e,1,!1);const s=this.getPointXYFromEdge(i.second),o=this.getPointXYFromEdge(n.second);let r=this.inCircle(t,e,s,o);0===r&&(r=this.orientation(t,e,o)),0<r?(C(d,h),C(h,g),g=y(n.second,n.first)):(g=y(h.second,h.first),C(h,d),d=y(i.second,i.first))}this.deleteTwinEdges(h,!1)}}findEdgeClockwise(t,e,i,n,s,o){for(t[0]=n;;){e[0]=t[0],++e[0]===i.length&&(e[0]=0);const n=this.orientation(s,o,this.getPointXYFromEdge(i[e[0]]));if(n<=0)return n<0;t[0]=e[0]}}findEdgeCounterClockwise(t,e,i,n,s,o){for(e[0]=n;;){t[0]=0!==e[0]?e[0]:i.length,t[0]--;const n=this.orientation(s,o,this.getPointXYFromEdge(i[t[0]]));if(0<=n)return 0<n;e[0]=t[0]}}constraintFindFirstEdge(t,e,i,n){const s=[];{const o=this.getEdgeFromPoint(i);let r=o;do{const i=this.getTwinEdge(r);if(this.getPointFromEdge(i)===n)return t[0]=i,e[0]=r,t[0].setMask(),e[0].setMask(),!1;s.push(i),r=this.getClockwiseEdge(r)}while(r!==o)}s.length<3&&r("add_constraint");let o=-1;for(let c=0,l=s.length;c<l;c++)this.isInfinitePointFromEdge(s[c])&&(-1!==o&&r("add_constraint"),o=c);const h=this.getPointXY(i),d=this.getPointXY(n);let g,a;if(-1!==o){x(s,0,o+1,s.length),s.pop();0===this.orientation(h,d,this.getPointXYFromEdge(s[0]))&&r("add_constraint - point on constraint");for(0===this.orientation(h,d,this.getPointXYFromEdge(s.at(-1)))&&r("add_constraint - point on constraint"),g=0,a=s.length-1;g+1!==a;){const t=g+a>>1,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));0===e&&r("add_constraint - point on constraint"),0<e?g=t:a=t}}else{let t=0,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));if(0!==e)if(0<e){const e=[0],i=[0];this.findEdgeClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{const e=[0],i=[0];this.findEdgeCounterClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{t++,e=this.orientation(h,d,this.getPointXYFromEdge(s[t])),e<=0&&r("add_constraint");const i=[0],n=[0];this.findEdgeClockwise(i,n,s,t,h,d)||r("add_constraint"),g=i[0],a=n[0]}}return t[0]=s[g],e[0]=s[a],!0}triangulateConstraint(t,e,i,n){if(e===i)return;let s=i;for(let o=e;o!==i;++o)this.inCircle(this.getPointXYFromEdge(n.first),this.getPointXYFromEdge(n.second),this.getPointXYFromEdge(t[s]),this.getPointXYFromEdge(t[o]))<0&&(s=o);if(s!==i){const e=this.newPairEdge();this.join(n.first,t[s],1,1,e),t[s]=e.second,this.triangulateConstraint(t,s+1,i,e)}if(s!==e){const i=this.newPairEdge();this.join(t[s],n.second,1,0,i),this.triangulateConstraint(t,e,s-1,i)}}insideLine(t,e,i){return 0===this.orientation(t,e,i)&&(e.x<t.x!=e.x<i.x||e.y<t.y!=e.y<i.y)}orientation(t,e,i){return g.orientationRobust(t,e,i)}inCircle(t,e,i,n){return g.inCircleRobust(t,e,i,n)}calculateCircleCenterFromThreePoints(t,e,i){return e.lt(t)&&(e=f(t,t=e)),i.lt(e)&&(i=f(e,e=i)),e.lt(t)&&(e=f(t,t=e)),g.calculateCircleCenterFromThreePoints(t,e,i)}compare(t,e){return 3*((j(t[0]<e[0])<<1)+j(t[0]>e[0]))+(j(t[1]<e[1])<<1)+j(t[1]>e[1])-1}caseFromCompare(t,e,i){return(this.compare(t,e)<<6)+(this.compare(t,i)<<3)+this.compare(e,i)}}function j(t){return t?1:0}function A(t,e,i){return t[i]!==e[i]?t[i]<e[i]:t[1-i]<e[1-i]}function v(t){return 255&t}N.c_aTableDelaunayTriangulationSolution=Uint8Array.from([41,74,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,33,33,65,0,0,0,0,0,0,0,193,0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,214,173,0,0,0,0,0,0,0,107,239,0,0,0,0,0,0,0,0,0,181,0,0,0,0,0,0,0,181,0,0,0,0,0,0,117,117,245,0,0,0,0,0,0,0,0,0,103,0,0,0,0,0,0,0,167,0,0,0,0,0,0,231,103,231,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,198,0,0,41,0,0,74,0,0,49,0,0,49,0,0,50,0,0,194,0,0,193,0,0,194,0,0,0,0,0,206,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,0,198,0,0,0,0,0,82,50,82,0,0,0,0,0,0,0,198,0,66,0,0,65,0,0,66,49,66,33,57,65,82,50,90,0,194,0,0,193,0,0,194,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,222,0,0,0,0,0,0,178,0,0,0,0,0,0,230,102,230,177,0,0,177,0,0,178,0,177,0,0,177,0,0,178,0,113,226,113,113,249,226,122,226,0,0,0,0,0,0,102,0,0,0,0,0,0,0,190,0,0,0,0,0,0,230,102,230,0,0,0,165,0,0,0,0,0,0,0,0,243,0,0,0,0,0,173,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,0,0,245,0,0,0,0,0,107,0,0,239,0,0,163,0,0,163,0,0,167,0,0,247,0,0,243,0,0,247,0,0,37,37,69,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,69,0,0,0,0,0,37,37,69,0,0,0,0,0,0,0,221,0,0,0,0,215,0,0,211,0,0,215,35,87,35,35,91,87,63,87,0,215,0,0,211,0,0,215,0,0,0,165,0,0,0,0,0,0,115,115,243,0,0,0,0,0,0,181,0,0,0,0,0,0,0,189,0,0,0,0,0,0,117,117,245,0,0,0,99,0,0,99,0,0,103,0,163,0,0,163,0,0,167,0,99,247,115,123,243,231,103,255]);class M{constructor(t){this.m_numberOfSets=t,this.m_elements=Array.from({length:t},(t,e)=>e),this.m_sizes=c(t,1)}getNumberOfSets(){return this.m_numberOfSets}connected(t,e){return this.findRoot(t)===this.findRoot(e)}connect(t,e){const i=this.findRoot(t),n=this.findRoot(e);return i!==n&&(this.m_sizes[i]<this.m_sizes[n]?(this.m_sizes[n]+=this.m_sizes[i],this.m_elements[i]=n):(this.m_sizes[i]+=this.m_sizes[n],this.m_elements[n]=i),--this.m_numberOfSets,!0)}connectRange(t,e,i){if(e!==i)for(let n=e;n<i;++n)this.connect(t[e],t[n])}size(){return this.m_elements.length}size1(t){return h(0),0}findRoot(t){let e=t;if(this.m_elements[e]!==e)do{this.m_elements[e]=this.m_elements[this.m_elements[e]],e=this.m_elements[e]}while(this.m_elements[e]!==e);return e}}function S(){return u(Number.NaN,u([0,0,0],[0,0,0]))}function G(t,e){if(t.first!==e.first)return t.first-e.first;let i=t.second.first,n=e.second.first;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];i=t.second.second,n=e.second.second;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];return 0}class q{getOperatorType(){return 10112}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(t,e,i,n){return new V(t,e,i,n)}execute(t,e,i,n=null){const s=new V(null,e,!1,i);s.addGeometry(t);return s.buildAlphaShape(n)}}class V extends e{alphaShapeConstruct(t,e){const i=t.getEdgeCount(),n=new p({vd:this.m_vertexDescription});if(!n)throw new Error("alphaShapeConstruct");for(let s=0;s<i;++s){if(2!==e[s])continue;const i=y(null,null);i.first=t.getEdge(s),i.second=t.getTwinEdge(i.first);if(1!==e[t.getEdgeIndex(i.second)])continue;t.getPointXYFromEdge(i.first),n.startPath(t.getPointXYFromEdge(i.first));let o=s,r=i.second;for(;;){for(e[o]=3,r=t.getCounterClockwiseEdge(r);1===e[t.getEdgeIndex(r)];)r=t.getCounterClockwiseEdge(r);if(r===i.first)break;n.lineTo(t.getPointXYFromEdge(r)),o=t.getEdgeIndex(r),r=t.getTwinEdge(r)}}return n}alphaShape(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i);for(let s=0;s<i;++s){if(0!==n[s])continue;const i=Y(),o=t.getEdge(s);i.p[0]=t.getPointFromEdge(o);const r=t.getClockwiseEdge(t.getTwinEdge(o));i.p[1]=t.getPointFromEdge(r);const h=t.getEdgeIndex(r),a=t.getClockwiseEdge(t.getTwinEdge(r));i.p[2]=t.getPointFromEdge(a);const c=t.getEdgeIndex(a);let l=1;for(let e=0;e<3;++e)if(t.isInfinitePointFromPoint(i.p[e])){l=2;break}if(1===l){const n=d(g,3);for(let e=0;e<3;++e)n[e]=t.getPointXY(i.p[e]);const s=g.sqrDistance(n[0],n[1]),o=g.sqrDistance(n[1],n[2]),r=g.sqrDistance(n[2],n[0]),h=2*n[1].sub(n[0]).crossProduct(n[2].sub(n[0]));e<s*o*r/(h*h)&&(l=2)}n[s]=n[h]=n[c]=l}return this.alphaShapeConstruct(t,n)}alphaShapeAlphaOut(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i),s=[],o=new M(t.getPointCount());for(let h=0;h<i;++h){if(0!==n[h])continue;const e=Y(),i=t.getEdge(h);e.p[0]=t.getPointFromEdge(i);const o=t.getClockwiseEdge(t.getTwinEdge(i));e.p[1]=t.getPointFromEdge(o);const r=t.getEdgeIndex(o),d=t.getClockwiseEdge(t.getTwinEdge(o));e.p[2]=t.getPointFromEdge(d);const a=t.getEdgeIndex(d);let c=1;for(let n=0;n<3;++n)if(t.isInfinitePointFromPoint(e.p[n])){c=2;break}if(1===c){const i=new Array(3);for(let s=0;s<3;++s)i[s]=t.getPointXY(e.p[s]);const n=g.sqrDistance(i[0],i[1]),o=g.sqrDistance(i[1],i[2]),d=g.sqrDistance(i[2],i[0]),l=i[1].sub(i[0]).crossProduct(i[2].sub(i[0])),u=S();u.first=n*o*d/(l*l),u.second.first[0]=h,u.second.first[1]=r,u.second.first[2]=a,u.second.second[0]=t.getPointIndex(e.p[0]),u.second.second[1]=t.getPointIndex(e.p[1]),u.second.second[2]=t.getPointIndex(e.p[2]),s.push(u),c=2}n[h]=n[r]=n[a]=c}s.sort((t,e)=>G(t,e));let r=0;for(const h of s){if(1===o.getNumberOfSets()&&h.first!==r)break;n[h.second.first[0]]=n[h.second.first[1]]=n[h.second.first[2]]=1;const t=[h.second.second[0],h.second.second[1],h.second.second[2]];o.connectRange(t,0,3),r=h.first}return e&&(e[0]=.25*r),this.alphaShapeConstruct(t,n)}constructor(t,e,i,n){super(),this.m_multiPointForAttributes=null,this.m_inputGeometryCursor=null,this.m_index=-1,this.m_nDelaunayPoints=0,this.m_cDelaunay=new N,this.m_vertexDescription=null,this.m_progressTracker=n,this.m_alpha=Number.isNaN(e)||!Number.isFinite(e)||e<0?-1:e<Number.MIN_VALUE?0:e,this.m_bMerge=i,this.m_bDone=!1,this.m_inputGeometryCursor=t,this.prepareDelaunay()}prepareDelaunay(){this.m_nDelaunayPoints=0,this.m_cDelaunay.clear(),0!==this.m_alpha&&this.m_cDelaunay.prepare(a())}next(){if(this.m_bMerge){if(!this.m_bDone){const t=this.calculateAlphaShapeMerging(this.m_inputGeometryCursor,this.m_progressTracker);return this.m_bDone=!0,t}return null}if(!this.m_bDone){const t=this.m_inputGeometryCursor.next();if(null!==t)return i(t),n(t),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.calculateAlphaShape(t,this.m_progressTracker);this.m_bDone=!0}return null}tock(){return!0}getRank(){return 1}getGeometryID(){return this.m_index}calculateAlphaShapeMerging(t,e){let s;for(;s=t.next();)i(s),n(s),this.addGeometry(s);return this.buildAlphaShape()}calculateAlphaShape(t,e){return t.isEmpty()?new p({vd:t.getDescription()}):(this.prepareDelaunay(),this.addGeometry(t),this.buildAlphaShape())}buildAlphaShape(t=null){if(t&&(t[0]=this.m_alpha),0===this.m_alpha)return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;if(this.m_cDelaunay.removeDuplicates())for(let e=0,i=this.m_cDelaunay.getPointCount();e<i;++e)this.m_cDelaunay.setPointIndex(this.m_cDelaunay.getPoint(e),e);if(!this.m_cDelaunay.construct())return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;return this.m_alpha<0?this.alphaShapeAlphaOut(this.m_cDelaunay,t):this.alphaShape(this.m_cDelaunay,this.m_alpha)}addGeometry(t){if(i(t),n(t),0===this.m_alpha)return;if(this.m_vertexDescription&&this.m_bMerge||(this.m_vertexDescription=t.getDescription(),this.m_vertexDescription.getAttributeCount()>1?this.m_multiPointForAttributes=new E({vd:this.m_vertexDescription}):this.m_multiPointForAttributes=null),t.isEmpty())return;const e=t.getGeometryType();if(s(e)){const e=t,i=new g;for(let t=0,n=e.getPointCount();t<n;t++)e.queryXY(t,i),this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++);this.m_multiPointForAttributes&&this.m_multiPointForAttributes.addPoints(e,0,-1)}else if(e===o.enumPoint){const e=t,i=e.getXY();this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++),this.m_multiPointForAttributes&&this.m_multiPointForAttributes.add(e)}else r("bad geometry type")}}const z=new q;function O(t,e,i){return z.execute(t,e,null,i)}function Z(e,i,n){const s=z.executeMany(new t(e),i,n,null);return Array.from(s)}function R(){return z.supportsCurves()}export{O as execute,Z as executeMany,R as supportsCurves};
2
+ import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{G as e}from"../../../chunks/GeometryCursor.js";import{p as i,c as n,i as s,G as o,a as r,g as h}from"../../../chunks/Geometry.js";import{m as d,P as g,i as c,d as a,u as l,n as u,c as f,v as m}from"../../../chunks/Point2D.js";import{P as p,M as E,r as x,h as P}from"../../../chunks/MultiPathImpl.js";function _(t,e,i,n,s,o){const r=n-e;if(r<=o)return P(t,e,i,n,s),i;const h=w(t,e,n,s,Math.min(Math.max(r>>1,3),100)),d=t[h];t[e]=f(t[h],t[h]=t[e]);let g=e+1,c=!1;for(let a=e+1;a!==n;++a)s(t[a],d)&&(t[g]=f(t[a],t[a]=t[g]),++g,c=!0);if(!c)for(let a=e+1;a<i;++a)s(d,t[a])||(a!==g&&(t[g]=f(t[a],t[a]=t[g])),++g);return--g,t[g]=f(t[e],t[e]=t[g]),g}function F(t,e,i){const n=Math.trunc(e/2);let s=BigInt(n);const o=BigInt(e);for(let h=0;h<i;++h)t.push(Number(s%o)),s=6364136223846793005n*s+1442695040888963407n&0x7fffffffffffffffn,s=BigInt.asUintN(64,s);m(t);const r=l(t,(t,e)=>t===e);t.length=r}function w(t,e,i,n,s){const o=[];F(o,i-e,s);const r=[];for(let d=0,g=o.length;d<g;d++){const i=o[d];r.push(u(t[e+i],i))}const h=Math.trunc(r.length/2);return r.sort((t,e)=>n(t.first,e.first)?-1:1),e+r[h].second}function k(){return{p:new g,userData:Number.NaN,edge:null}}class T{constructor(){this.info=0,this.mask=!1,this.p=null,this.a=[null,null],this.twin=null}nextFreeEdge(){return this.twin}setIndex(t){this.info=t,this.mask=!1}getIndex(){return this.info}setMask(){this.mask=!0}getMask(){return this.mask}}function y(t,e){return{first:t,second:e}}function C(t,e){t.first=e.first,t.second=e.second}function b(){return this.i1-this.i0}function D(){return{i0:Number.NaN,i1:Number.NaN,nextFreeEdgeIndex:[-1],box:[y(null,null),y(null,null)],size:b}}function I(){return{k:0,pTask:null,pTask0:null,pTask1:null}}function X(){return{p:[new g,new g],points:[null,null]}}function Y(){return{p:[null,null,null]}}class N{constructor(){this.m_nextFreePairEdge=y(null,null),this.m_points=[],this.m_pointZero=null,this.m_edges=[],this.m_voronoiToEdge=[],this.m_nextFreeEdge=0}clear(){this.m_nextFreePairEdge=y(null,null),this.m_points.length=0,this.m_pointZero=null,this.m_edges.length=0,this.m_voronoiToEdge.length=0,this.m_nextFreeEdge=0}reservePoints(t){h(t>1)}prepare(t){{const e=k();e.p.x=Number.POSITIVE_INFINITY,e.p.y=Number.POSITIVE_INFINITY,e.userData=t,this.m_points.push(e)}}addVertex(t,e){const i=k();i.p.assign(t),i.userData=e,i.edge=null,this.m_points.push(i)}removeDuplicates(){const t=this.m_points.shift();this.m_points.sort((t,e)=>t.p.compareX(e.p));const e=l(this.m_points,(t,e)=>t.p.equals(e.p)),i=e!==this.m_points.length;return this.m_points.length=e,this.m_points.unshift(t),i}boundVoronoiCells(t,e){const i=this.m_points.length;if(i<2)return!1;const n=[this.m_points[1].p.clone(),this.m_points[1].p.clone()];for(let d=2;d<i;d++){const t=this.m_points[d].p;t.x<n[0].x&&(n[0].x=t.x),n[1].x<t.x&&(n[1].x=t.x),t.y<n[0].y&&(n[0].y=t.y),n[1].y<t.y&&(n[1].y=t.y)}const s=new g;s.x=.5*(n[0].x+n[1].x),s.y=.5*(n[0].y+n[1].y);let o=0;for(let d=1;d<i;d++){const t=this.m_points[d].p,e=g.sqrDistanceCoords(t.x,t.y,s.x,s.y);o<e&&(o=e)}const r=Math.sqrt(o),h=Math.max(r+2*t,1.5*r);{const t=.8660254037844386,i=.5;let n=1,o=0;for(let r=0;r<12;r++){const r=new g;r.x=s.x+h*n,r.y=s.y+h*o,this.addVertex(r,e);const d=n*i+o*t;n=n*t-o*i,o=d}}return!0}construct(){const t=D();return!!this.constructTask(t)&&(this.solveTask(t),!0)}constructTask(t){if(this.m_pointZero=this.createZeroHandle(),h(void 0!==this.m_pointZero),this.m_points.length<3)return!1;const e=6*(this.m_points.length-2);this.m_edges=d(T,e);for(let i=0;i<e;i++)this.m_edges[i].setIndex(i);return t.i0=1,t.i1=this.m_points.length,t.nextFreeEdgeIndex[0]=0,!0}splitTask(t,e,i,n){const s=t,o=e,r=i,h=n;s.k=this.findMaxSide(h.i0,h.i1);let d=h.i0+h.i1>>1;const g=1250;if(0===s.k){d=_(this.m_points,h.i0,d,h.i1,(t,e)=>t.p[0]!==e.p[0]?t.p[0]<e.p[0]:t.p[1]<e.p[1],g)}else{d=_(this.m_points,h.i0,d,h.i1,(t,e)=>t.p[1]!==e.p[1]?t.p[1]<e.p[1]:t.p[0]<e.p[0],g)}o.i0=h.i0,o.i1=d,o.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(o.i1-o.i0-1)+2,r.i0=d,r.i1=h.i1,r.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(r.i1-r.i0-1)+2,s.pTask=h,s.pTask0=o,s.pTask1=r}solveMergeTask(t){const e=this.newPairEdgeEx(t.pTask.nextFreeEdgeIndex,!1);if(t.pTask.box[t.k]=y(t.pTask0.box[t.k].first,t.pTask1.box[t.k].second),t.pTask.box[1-t.k]=y(A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].first),this.getPointXYFromEdge(t.pTask1.box[1-t.k].first),1-t.k)?t.pTask0.box[1-t.k].first:t.pTask1.box[1-t.k].first,A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].second),this.getPointXYFromEdge(t.pTask1.box[1-t.k].second),1-t.k)?t.pTask1.box[1-t.k].second:t.pTask0.box[1-t.k].second),t.pTask.i0+2===t.pTask.i1){const i=t.pTask0.box[t.k].second,n=i.twin,s=t.pTask1.box[t.k].first,o=s.twin;return this.joinEdges2(n,o),this.joinEdges2(o,n),void this.join(i,s,0,1,e)}const i=[new Array(2),new Array(2)];i[0][0]=i[1][0]=y(t.pTask0.box[t.k].second,t.pTask0.box[t.k].second.twin),i[0][1]=i[1][1]=y(t.pTask1.box[t.k].first,t.pTask1.box[t.k].first.twin);const n=[!1,!1];if(t.pTask0.i0+1===t.pTask0.i1?(this.findEdgeSide(i[0],n,1,0),this.findEdgeSide(i[1],n,1,1)):(this.findEdge(i[0],n,0),this.findEdge(i[1],n,1)),n[0]||n[1]){if(n[0]){const e=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1);this.insertEdge(i[0][0].first,e.first,0),this.insertEdge(i[0][0].second,e.second,1)}if(n[1]){const e=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1);this.insertEdge(i[0][1].first,e.first,1),this.insertEdge(i[0][1].second,e.second,0)}}else this.getNextDEdge(i[0][0].first,0)!==i[0][0].first&&(i[1][0]=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1),this.insertEdge(i[0][0].first,i[1][0].first,0),this.insertEdge(i[0][0].second,i[1][0].second,1)),this.getNextDEdge(i[0][1].first,0)!==i[0][1].first&&(i[1][1]=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1),this.insertEdge(i[0][1].first,i[1][1].first,1),this.insertEdge(i[0][1].second,i[1][1].second,0));this.merge(i[1][0],i[0][0],i[0][1],i[1][1],e)}solveTask(t){const e=t;switch(e.i1-e.i0){case 1:{this.insertPoint(e.i0,e.nextFreeEdgeIndex);const t=this.m_points[e.i0].edge;e.box[0]=e.box[1]=u(t,t)}break;case 2:{const t=e.i0,i=t+1;this.insertPoint(t,e.nextFreeEdgeIndex),this.insertPoint(i,e.nextFreeEdgeIndex);const n=this.m_points[t],s=this.m_points[i],o=n.edge,r=s.edge,h=o.twin,d=r.twin;this.joinEdges2(h,d),this.joinEdges2(d,h);const g=this.newPairEdgeEx(e.nextFreeEdgeIndex,!1);this.join(o,r,0,1,g);for(let c=0;c<2;c++)e.box[c]=A(this.getPointXY(n),this.getPointXY(s),c)?y(o,r):y(r,o)}break;case 3:{const t=[e.i0,e.i0+1,e.i0+2];this.insertPoint(t[0],e.nextFreeEdgeIndex),this.insertPoint(t[1],e.nextFreeEdgeIndex),this.insertPoint(t[2],e.nextFreeEdgeIndex);const i=[this.m_points[t[0]],this.m_points[t[1]],this.m_points[t[2]]],n=this.caseFromCompare(i[0].p,i[1].p,i[2].p),s=[i[0].edge,i[1].edge,i[2].edge],o=N.c_aTableDelaunayTriangulationSolution[n],r=v(19*v(1+(7&o))),h=v(19*v(1+(o>>5)));let d=v(o<<3)>>6;const g=3&r,c=r>>6,a=3&h,l=h>>6;e.box[0]=y(s[g],s[c]),e.box[1]=y(s[a],s[l]);const u=[s[0].twin,s[1].twin,s[2].twin],m=[this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1)];switch(3===d&&(d=this.orientation(i[0].p,i[1].p,i[2].p)+1),d){case 0:this.joinEdges2(u[0],u[2]),this.joinEdges2(u[2],u[1]),this.joinEdges2(u[1],u[0]),this.join(s[0],s[2],0,1,m[0]),this.join(s[2],s[1],0,1,m[1]),this.join(s[1],s[0],0,1,m[2]);break;case 1:{const t=[0,1,2];t[3-(g+c)]=f(t[1],t[1]=t[3-(g+c)]),this.joinEdges2(u[t[0]],u[t[1]]),this.joinEdges2(u[t[1]],u[t[2]]),this.joinEdges2(u[t[2]],u[t[0]]),this.join(s[t[0]],s[t[1]],0,1,m[0]),this.join(s[t[1]],s[t[2]],0,1,m[1]),this.join(m[1].first,u[t[2]],0,1,m[2])}break;case 2:this.joinEdges2(u[0],u[1]),this.joinEdges2(u[1],u[2]),this.joinEdges2(u[2],u[0]),this.join(s[0],s[1],0,1,m[0]),this.join(s[1],s[2],0,1,m[1]),this.join(s[2],s[0],0,1,m[2])}}break;default:{const e=I(),i=D(),n=D();this.splitTask(e,i,n,t),this.solveTask(i),this.solveTask(n),this.solveMergeTask(e)}}}getOutsideHull(){const t=[],e=this.m_points[0].edge;let i=e;do{t.push(this.getPointFromEdge(this.getTwinEdge(i))),i=this.getNextDEdge(i,0)}while(i!==e);return t}getConvexHull(){const t=[],e=this.m_points[0].edge;let i=e;do{const e=this.getPointFromEdge(this.getTwinEdge(i));t.length<2||!this.insideLine(this.getPointXY(t.at(-2)),this.getPointXY(t.at(-1)),this.getPointXY(e))?t.push(e):t[t.length-1]=e,i=this.getNextDEdge(i,0)}while(i!==e);return 2<t.length&&this.insideLine(this.getPointXY(t[0]),this.getPointXY(t.at(-1)),this.getPointXY(t.at(-2)))&&t.pop(),2<t.length&&this.insideLine(this.getPointXY(t[1]),this.getPointXY(t[0]),this.getPointXY(t.at(-1)))&&(t[0]=t.at(-1),t.pop()),t}getVoronoiPolygon(t,e){t.length=0;const i=this.getEdgeFromPoint(e);let n=i;for(;;){const e=this.calculateCircleCenter(n);t.push(e);const s=this.getNextDEdge(n,1);if(s===i)break;n=s}}getNearestPoint(t){this.isInfinitePointFromPoint(t)&&r("Not supported for the infinite point");const e=this.getPointXY(t);let i=this.m_pointZero,n=Number.MAX_VALUE;const s=this.getEdgeFromPoint(t);let o=s;do{const t=this.getPointFromEdge(this.getTwinEdge(o));if(!this.isInfinitePointFromPoint(t)){const s=g.sqrDistance(e,this.getPointXY(t));s<n&&(i=t,n=s)}o=this.getCounterClockwiseEdge(o)}while(o!==s);return i}addConstraint(t,e){const i=[null],n=[null];if(!this.constraintFindFirstEdge(i,n,t,e))return y(n[0],i[0]);i[0]=this.getTwinEdge(i[0]);const s=this.getPointXY(t),o=this.getPointXY(e),h=[new Array(0),new Array(0)],d=i[0];for(;;){const t=this.getClockwiseEdge(n[0]);t.getMask()&&r("add_constraint");const d=y(t,this.getTwinEdge(t));this.deleteTwinEdges(d,!0);const g=this.getCounterClockwiseEdge(this.getTwinEdge(i[0])),c=this.getTwinEdge(this.getClockwiseEdge(n[0])),a=this.getPointFromEdge(c);if(a===e){h[0].push(i[0]),i[0]=g,h[1].push(n[0]),n[0]=c;break}const l=this.orientation(s,o,this.getPointXY(a));0===l&&r("add_constraint - point on constraint"),0<l?(h[0].push(i[0]),i[0]=g):(h[1].push(n[0]),n[0]=c)}h[0].push(i[0]),h[1].push(n[0]);const g=this.newPairEdge();g.first.setMask(),g.second.setMask(),this.join(n[0],d,1,1,g),this.triangulateConstraint(h[0],1,h[0].length-1,g),h[1].reverse();const c=y(g.second,g.first);return this.triangulateConstraint(h[1],1,h[1].length-1,c),c}verify(){for(let t=0,e=this.m_edges.length;t<e;t++){const e=this.m_edges[t];if(!e.getMask()&&!this.testEdge(e))return!1}return!0}getDelaunayTriangleCount(){return this.m_points.length-2<<1}getVoronoiSegments(t=Number.MAX_VALUE){const e=[];for(let i=0,n=this.m_edges.length;i<n;i+=2){const n=y(null,null);if(n.first=this.m_edges[i],n.second=n.first.twin,this.isInfinitePointFromEdge(n.first)&&(n.second=f(n.first,n.first=n.second)),this.isInfinitePointFromEdge(n.second)){const i=d(g,3);i[0]=this.calculateCircleCenter(this.getNextDEdge(n.first,0).twin,1),i[2]=this.calculateCircleCenter(this.getNextDEdge(n.first,1),1);const s=d(g,2);s[0].assign(i[0]),s[1].assign(i[2]),s[0].rightPerpendicularThis(),s[1].leftPerpendicularThis(),i[1]=i[0].add(s[0]).add(i[2].add(s[1])),i[1].normalize();for(const e of i)e.mulThis(t);const o=X();o.points[0]=n.first.p,o.points[1]=n.second.p;for(let t=0;t<i.length-1;t++){for(let e=0;e<2;e++)o.p[e]=i[t+e];o.p[0].equals(o.p[1])||e.push(o)}}else if(this.isInfinitePointFromEdge(this.getNextDEdge(n.first,0).twin)&&this.isInfinitePointFromEdge(this.getNextDEdge(n.first,1).twin)){const t=d(g,3);t[0]=this.calculateCircleCenter(n.first),t[1]=this.getPointXY(this.getPointFromEdge(n.first)).add(this.getPointXY(this.getPointFromEdge(n.second))).mul(.5),t[2]=this.calculateCircleCenter(n.second);const i=X();i.points[0]=n.first.p,i.points[1]=n.second.p;for(let n=0;n<t.length-1;n++){for(let e=0;e<2;e++)i.p[e]=t[n+e];i.p[0].equals(i.p[1])||e.push(i)}}else{const t=X();t.p[0]=this.calculateCircleCenter(n.first),t.p[1]=this.calculateCircleCenter(n.second),t.points[0]=n.first.p,t.points[1]=n.second.p,t.p[0].equals(t.p[1])||e.push(t)}}return e}startDelaunayTriangles(){return-1}nextDelaunayTriangle(t,e){for(;;){if(++e[0],e[0]===this.m_edges.length)return!1;const i=this.m_edges[e[0]];if(t.p[0]=this.getPointFromEdge(i),this.isInfinitePointFromPoint(t.p[0]))continue;const n=this.getTwinEdge(i);if(t.p[1]=this.getPointFromEdge(n),this.isInfinitePointFromPoint(t.p[1]))continue;if(this.getPointXY(t.p[1]).lt(this.getPointXY(t.p[0])))continue;const s=this.getTwinEdge(this.getNextDEdge(i,1));if(t.p[2]=this.getPointFromEdge(s),!this.isInfinitePointFromPoint(t.p[2])&&!this.getPointXY(t.p[2]).lt(this.getPointXY(t.p[0])))return!0}}getPointCount(){return this.m_points.length-1}getPoint(t){return this.m_points[t+1]}getInfinitePoint(){return this.m_pointZero}isInfinitePointFromPoint(t){return t===this.m_pointZero}getPointXY(t){return t.p}getPointIndex(t){return t.userData}setPointIndex(t,e){t.userData=e}getEdgeFromPoint(t){return t.edge}isInfinitePointFromEdge(t){return t.p===this.m_pointZero}getEdgeCount(){return this.m_edges.length}getEdge(t){return this.m_edges[t]}getEdgeIndex(t){return t.getIndex()}getPointFromEdge(t){return t.p}getPointXYFromEdge(t){return t.p.p}getCounterClockwiseEdge(t){return t.a[0]}getClockwiseEdge(t){return t.a[1]}getTwinEdge(t){return t.twin}getPreviousEdge(t){return this.getTwinEdge(this.getCounterClockwiseEdge(t))}getNextEdge(t){return this.getClockwiseEdge(this.getTwinEdge(t))}getNextDEdge(t,e=1){return t.a[e]}newPairEdge(){const t=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second);return this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge(),t.first.twin=t.second,t.second.twin=t.first,t}newPairEdgeEx(t,e){let i;if(e&&null!==this.m_nextFreePairEdge.first)i=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second),this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge();else{const e=t[0]++,n=t[0]++;i=y(this.m_edges[e],this.m_edges[n])}return i.first.twin=i.second,i.second.twin=i.first,i}insertEdge(t,e,i){e.p=t.p;const n=t.a[i],s=e.a;s[i]=n,s[1-i]=t,t.a[i]=e,n.a[1-i]=e}insertPoint(t,e){const i=this.m_points[t],n=this.newPairEdgeEx(e,!1),s=n.first,o=n.second;i.edge=n.first,s.p=this.m_points[t],s.a[0]=n.first,s.a[1]=n.first,o.p=this.m_pointZero,o.a[0]=n.second,o.a[1]=n.second,null===this.m_points[0].edge&&(this.m_points[0].edge=n.second)}deleteTwinEdges(t,e){this.deleteEdge(t.first),this.deleteEdge(t.second),e&&(t.first.twin=this.m_nextFreePairEdge.first,t.second.twin=this.m_nextFreePairEdge.second,this.m_nextFreePairEdge=t)}join(t,e,i,n,s){this.insertEdge(t,s.first,i),this.insertEdge(e,s.second,n)}joinEdges2(t,e){t.a[1]=e,e.a[0]=t}checkEdge(t,e,i,n,s){for(;;){const o=y(null,null);if(o.first=this.getNextDEdge(t.first,n),o.second=o.first.twin,this.isInfinitePointFromEdge(o.second))return t;const r=this.getPointXYFromEdge(t.second),h=this.getPointXYFromEdge(o.second);if(this.inCircle(e,i,r,h)<=0)return t;if(this.deleteTwinEdges(t,s),!s){const e=this.getNextDEdge(t.second,n).twin;this.join(o.second,e,n,n,t)}t=o}}calculateCircleCenter(t,e=Number.MAX_VALUE){const i=this.getPointXYFromEdge(t),n=this.getPointXYFromEdge(t.twin),s=this.getNextDEdge(t,0);if(this.isInfinitePointFromEdge(s.twin)){const t=new g;if(Number.isNaN(e))t.setNAN();else{const s=n.sub(i);s.leftPerpendicularThis(),t.assign(s),t.divThis(Math.max(Math.abs(t.x),Math.abs(t.y))),t.normalize(),t.mulThis(e)}return t}const o=this.getPointXYFromEdge(s.twin);return this.calculateCircleCenterFromThreePoints(i,n,o)}createZeroHandle(){return this.m_points[0]}deleteEdge(t){const e=t,i=e.p;i.edge===t&&(i.edge=e.a[0]),e.a[0].a[1]=e.a[1],e.a[1].a[0]=e.a[0]}testEdge(t){if(this.isInfinitePointFromEdge(t))return!0;const e=t.twin;if(this.isInfinitePointFromEdge(e))return!0;const i=this.getNextDEdge(t,0).twin,n=this.getNextDEdge(e,0).twin;if(this.isInfinitePointFromEdge(i)||this.isInfinitePointFromEdge(n))return!0;const s=this.getPointXYFromEdge(t),o=this.getPointXYFromEdge(e),r=this.getPointXYFromEdge(i),h=this.getPointXYFromEdge(n);return!(this.orientation(s,o,r)<=0)&&(!(0<=this.orientation(s,o,h))&&this.inCircle(s,o,r,h)<=0)}findMaxSide(t,e){const i=[this.m_points[t].p.clone(),this.m_points[t].p.clone()];for(t++;t!==e;t++){const e=this.m_points[t].p;e.x<i[0].x&&(i[0].x=e.x),i[1].x<e.x&&(i[1].x=e.x),e.y<i[0].y&&(i[0].y=e.y),i[1].y<e.y&&(i[1].y=e.y)}return i[1].x-i[0].x<i[1].y-i[0].y?1:0}findEdge(t,e,i){let n=!1,s=0;for(;;){const o=y(null,null);if(o.second=this.getNextDEdge(t[s].second,i^s),o.first=o.second.twin,0===i&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first))<0||1===i&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first)))t[s]=o,e[s]=!0,n=!1;else{if(n)return;s^=1,n=!0}}}findEdgeSide(t,e,i,n){for(;;){const s=y(null,null);if(s.second=this.getNextDEdge(t[i].second,n^i),s.first=s.second.twin,!(0===n&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))<0||1===n&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))))return;t[i]=s,e[i]=!0}}merge(t,e,i,n,s){const o={...t},r={...n},h={...s};let d={...e},g={...i};const c=d.second,a=g.second;for(;;){if(this.join(d.first,g.first,0,1,h),d.first=this.getNextDEdge(h.first,0),g.first=this.getNextDEdge(h.second,1),d.first===o.first&&g.first===r.first){this.joinEdges2(c,a),this.joinEdges2(r.second,o.second);break}d.second=d.first.twin,g.second=g.first.twin;const t=this.getPointXYFromEdge(h.first),e=this.getPointXYFromEdge(h.second);if(d.first===o.first){let i=y(null,null);i.first=this.getNextDEdge(g.first,1),i.second=i.first.twin,i=this.checkEdge(i,t,e,1,!1),C(d,h),C(h,g),g=y(i.second,i.first)}else if(g.first===r.first){let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1),g=y(h.second,h.first),C(h,d),d=y(i.second,i.first)}else{let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1);let n=y(null,null);n.first=this.getNextDEdge(g.first,1),n.second=n.first.twin,n=this.checkEdge(n,t,e,1,!1);const s=this.getPointXYFromEdge(i.second),o=this.getPointXYFromEdge(n.second);let r=this.inCircle(t,e,s,o);0===r&&(r=this.orientation(t,e,o)),0<r?(C(d,h),C(h,g),g=y(n.second,n.first)):(g=y(h.second,h.first),C(h,d),d=y(i.second,i.first))}this.deleteTwinEdges(h,!1)}}findEdgeClockwise(t,e,i,n,s,o){for(t[0]=n;;){e[0]=t[0],++e[0]===i.length&&(e[0]=0);const n=this.orientation(s,o,this.getPointXYFromEdge(i[e[0]]));if(n<=0)return n<0;t[0]=e[0]}}findEdgeCounterClockwise(t,e,i,n,s,o){for(e[0]=n;;){t[0]=0!==e[0]?e[0]:i.length,t[0]--;const n=this.orientation(s,o,this.getPointXYFromEdge(i[t[0]]));if(0<=n)return 0<n;e[0]=t[0]}}constraintFindFirstEdge(t,e,i,n){const s=[];{const o=this.getEdgeFromPoint(i);let r=o;do{const i=this.getTwinEdge(r);if(this.getPointFromEdge(i)===n)return t[0]=i,e[0]=r,t[0].setMask(),e[0].setMask(),!1;s.push(i),r=this.getClockwiseEdge(r)}while(r!==o)}s.length<3&&r("add_constraint");let o=-1;for(let a=0,l=s.length;a<l;a++)this.isInfinitePointFromEdge(s[a])&&(-1!==o&&r("add_constraint"),o=a);const h=this.getPointXY(i),d=this.getPointXY(n);let g,c;if(-1!==o){x(s,0,o+1,s.length),s.pop();0===this.orientation(h,d,this.getPointXYFromEdge(s[0]))&&r("add_constraint - point on constraint");for(0===this.orientation(h,d,this.getPointXYFromEdge(s.at(-1)))&&r("add_constraint - point on constraint"),g=0,c=s.length-1;g+1!==c;){const t=g+c>>1,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));0===e&&r("add_constraint - point on constraint"),0<e?g=t:c=t}}else{let t=0,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));if(0!==e)if(0<e){const e=[0],i=[0];this.findEdgeClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],c=i[0]}else{const e=[0],i=[0];this.findEdgeCounterClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],c=i[0]}else{t++,e=this.orientation(h,d,this.getPointXYFromEdge(s[t])),e<=0&&r("add_constraint");const i=[0],n=[0];this.findEdgeClockwise(i,n,s,t,h,d)||r("add_constraint"),g=i[0],c=n[0]}}return t[0]=s[g],e[0]=s[c],!0}triangulateConstraint(t,e,i,n){if(e===i)return;let s=i;for(let o=e;o!==i;++o)this.inCircle(this.getPointXYFromEdge(n.first),this.getPointXYFromEdge(n.second),this.getPointXYFromEdge(t[s]),this.getPointXYFromEdge(t[o]))<0&&(s=o);if(s!==i){const e=this.newPairEdge();this.join(n.first,t[s],1,1,e),t[s]=e.second,this.triangulateConstraint(t,s+1,i,e)}if(s!==e){const i=this.newPairEdge();this.join(t[s],n.second,1,0,i),this.triangulateConstraint(t,e,s-1,i)}}insideLine(t,e,i){return 0===this.orientation(t,e,i)&&(e.x<t.x!=e.x<i.x||e.y<t.y!=e.y<i.y)}orientation(t,e,i){return g.orientationRobust(t,e,i)}inCircle(t,e,i,n){return g.inCircleRobust(t,e,i,n)}calculateCircleCenterFromThreePoints(t,e,i){return e.lt(t)&&(e=f(t,t=e)),i.lt(e)&&(i=f(e,e=i)),e.lt(t)&&(e=f(t,t=e)),g.calculateCircleCenterFromThreePoints(t,e,i)}compare(t,e){return 3*((j(t[0]<e[0])<<1)+j(t[0]>e[0]))+(j(t[1]<e[1])<<1)+j(t[1]>e[1])-1}caseFromCompare(t,e,i){return(this.compare(t,e)<<6)+(this.compare(t,i)<<3)+this.compare(e,i)}}function j(t){return t?1:0}function A(t,e,i){return t[i]!==e[i]?t[i]<e[i]:t[1-i]<e[1-i]}function v(t){return 255&t}N.c_aTableDelaunayTriangulationSolution=Uint8Array.from([41,74,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,33,33,65,0,0,0,0,0,0,0,193,0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,214,173,0,0,0,0,0,0,0,107,239,0,0,0,0,0,0,0,0,0,181,0,0,0,0,0,0,0,181,0,0,0,0,0,0,117,117,245,0,0,0,0,0,0,0,0,0,103,0,0,0,0,0,0,0,167,0,0,0,0,0,0,231,103,231,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,198,0,0,41,0,0,74,0,0,49,0,0,49,0,0,50,0,0,194,0,0,193,0,0,194,0,0,0,0,0,206,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,0,198,0,0,0,0,0,82,50,82,0,0,0,0,0,0,0,198,0,66,0,0,65,0,0,66,49,66,33,57,65,82,50,90,0,194,0,0,193,0,0,194,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,222,0,0,0,0,0,0,178,0,0,0,0,0,0,230,102,230,177,0,0,177,0,0,178,0,177,0,0,177,0,0,178,0,113,226,113,113,249,226,122,226,0,0,0,0,0,0,102,0,0,0,0,0,0,0,190,0,0,0,0,0,0,230,102,230,0,0,0,165,0,0,0,0,0,0,0,0,243,0,0,0,0,0,173,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,0,0,245,0,0,0,0,0,107,0,0,239,0,0,163,0,0,163,0,0,167,0,0,247,0,0,243,0,0,247,0,0,37,37,69,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,69,0,0,0,0,0,37,37,69,0,0,0,0,0,0,0,221,0,0,0,0,215,0,0,211,0,0,215,35,87,35,35,91,87,63,87,0,215,0,0,211,0,0,215,0,0,0,165,0,0,0,0,0,0,115,115,243,0,0,0,0,0,0,181,0,0,0,0,0,0,0,189,0,0,0,0,0,0,117,117,245,0,0,0,99,0,0,99,0,0,103,0,163,0,0,163,0,0,167,0,99,247,115,123,243,231,103,255]);class M{constructor(t){this.m_numberOfSets=t,this.m_elements=Array.from({length:t},(t,e)=>e),this.m_sizes=a(t,1)}getNumberOfSets(){return this.m_numberOfSets}connected(t,e){return this.findRoot(t)===this.findRoot(e)}connect(t,e){const i=this.findRoot(t),n=this.findRoot(e);return i!==n&&(this.m_sizes[i]<this.m_sizes[n]?(this.m_sizes[n]+=this.m_sizes[i],this.m_elements[i]=n):(this.m_sizes[i]+=this.m_sizes[n],this.m_elements[n]=i),--this.m_numberOfSets,!0)}connectRange(t,e,i){if(e!==i)for(let n=e;n<i;++n)this.connect(t[e],t[n])}size(){return this.m_elements.length}size1(t){return h(0),0}findRoot(t){let e=t;if(this.m_elements[e]!==e)do{this.m_elements[e]=this.m_elements[this.m_elements[e]],e=this.m_elements[e]}while(this.m_elements[e]!==e);return e}}function S(){return u(Number.NaN,u([0,0,0],[0,0,0]))}function G(t,e){if(t.first!==e.first)return t.first-e.first;let i=t.second.first,n=e.second.first;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];i=t.second.second,n=e.second.second;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];return 0}class q{getOperatorType(){return 10112}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(t,e,i,n){return new V(t,e,i,n)}execute(t,e,i,n=null){const s=new V(null,e,!1,i);s.addGeometry(t);return s.buildAlphaShape(n)}}class V extends e{alphaShapeConstruct(t,e){const i=t.getEdgeCount(),n=new p({vd:this.m_vertexDescription});if(!n)throw new Error("alphaShapeConstruct");for(let s=0;s<i;++s){if(2!==e[s])continue;const i=y(null,null);i.first=t.getEdge(s),i.second=t.getTwinEdge(i.first);if(1!==e[t.getEdgeIndex(i.second)])continue;t.getPointXYFromEdge(i.first),n.startPath(t.getPointXYFromEdge(i.first));let o=s,r=i.second;for(;;){for(e[o]=3,r=t.getCounterClockwiseEdge(r);1===e[t.getEdgeIndex(r)];)r=t.getCounterClockwiseEdge(r);if(r===i.first)break;n.lineTo(t.getPointXYFromEdge(r)),o=t.getEdgeIndex(r),r=t.getTwinEdge(r)}}return n}alphaShape(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i);for(let s=0;s<i;++s){if(0!==n[s])continue;const i=Y(),o=t.getEdge(s);i.p[0]=t.getPointFromEdge(o);const r=t.getClockwiseEdge(t.getTwinEdge(o));i.p[1]=t.getPointFromEdge(r);const h=t.getEdgeIndex(r),c=t.getClockwiseEdge(t.getTwinEdge(r));i.p[2]=t.getPointFromEdge(c);const a=t.getEdgeIndex(c);let l=1;for(let e=0;e<3;++e)if(t.isInfinitePointFromPoint(i.p[e])){l=2;break}if(1===l){const n=d(g,3);for(let e=0;e<3;++e)n[e]=t.getPointXY(i.p[e]);const s=g.sqrDistance(n[0],n[1]),o=g.sqrDistance(n[1],n[2]),r=g.sqrDistance(n[2],n[0]),h=2*n[1].sub(n[0]).crossProduct(n[2].sub(n[0]));e<s*o*r/(h*h)&&(l=2)}n[s]=n[h]=n[a]=l}return this.alphaShapeConstruct(t,n)}alphaShapeAlphaOut(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i),s=[],o=new M(t.getPointCount());for(let h=0;h<i;++h){if(0!==n[h])continue;const e=Y(),i=t.getEdge(h);e.p[0]=t.getPointFromEdge(i);const o=t.getClockwiseEdge(t.getTwinEdge(i));e.p[1]=t.getPointFromEdge(o);const r=t.getEdgeIndex(o),d=t.getClockwiseEdge(t.getTwinEdge(o));e.p[2]=t.getPointFromEdge(d);const c=t.getEdgeIndex(d);let a=1;for(let n=0;n<3;++n)if(t.isInfinitePointFromPoint(e.p[n])){a=2;break}if(1===a){const i=new Array(3);for(let s=0;s<3;++s)i[s]=t.getPointXY(e.p[s]);const n=g.sqrDistance(i[0],i[1]),o=g.sqrDistance(i[1],i[2]),d=g.sqrDistance(i[2],i[0]),l=i[1].sub(i[0]).crossProduct(i[2].sub(i[0])),u=S();u.first=n*o*d/(l*l),u.second.first[0]=h,u.second.first[1]=r,u.second.first[2]=c,u.second.second[0]=t.getPointIndex(e.p[0]),u.second.second[1]=t.getPointIndex(e.p[1]),u.second.second[2]=t.getPointIndex(e.p[2]),s.push(u),a=2}n[h]=n[r]=n[c]=a}s.sort((t,e)=>G(t,e));let r=0;for(const h of s){if(1===o.getNumberOfSets()&&h.first!==r)break;n[h.second.first[0]]=n[h.second.first[1]]=n[h.second.first[2]]=1;const t=[h.second.second[0],h.second.second[1],h.second.second[2]];o.connectRange(t,0,3),r=h.first}return e&&(e[0]=.25*r),this.alphaShapeConstruct(t,n)}constructor(t,e,i,n){super(),this.m_multiPointForAttributes=null,this.m_inputGeometryCursor=null,this.m_index=-1,this.m_nDelaunayPoints=0,this.m_cDelaunay=new N,this.m_vertexDescription=null,this.m_progressTracker=n,this.m_alpha=Number.isNaN(e)||!Number.isFinite(e)||e<0?-1:e<Number.MIN_VALUE?0:e,this.m_bMerge=i,this.m_bDone=!1,this.m_inputGeometryCursor=t,this.prepareDelaunay()}prepareDelaunay(){this.m_nDelaunayPoints=0,this.m_cDelaunay.clear(),0!==this.m_alpha&&this.m_cDelaunay.prepare(c())}next(){if(this.m_bMerge){if(!this.m_bDone){const t=this.calculateAlphaShapeMerging(this.m_inputGeometryCursor,this.m_progressTracker);return this.m_bDone=!0,t}return null}if(!this.m_bDone){const t=this.m_inputGeometryCursor.next();if(null!==t)return i(t),n(t),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.calculateAlphaShape(t,this.m_progressTracker);this.m_bDone=!0}return null}tock(){return!0}getRank(){return 1}getGeometryID(){return this.m_index}calculateAlphaShapeMerging(t,e){let s;for(;s=t.next();)i(s),n(s),this.addGeometry(s);return this.buildAlphaShape()}calculateAlphaShape(t,e){return t.isEmpty()?new p({vd:t.getDescription()}):(this.prepareDelaunay(),this.addGeometry(t),this.buildAlphaShape())}buildAlphaShape(t=null){if(t&&(t[0]=this.m_alpha),0===this.m_alpha)return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;if(this.m_cDelaunay.removeDuplicates())for(let e=0,i=this.m_cDelaunay.getPointCount();e<i;++e)this.m_cDelaunay.setPointIndex(this.m_cDelaunay.getPoint(e),e);if(!this.m_cDelaunay.construct())return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;return this.m_alpha<0?this.alphaShapeAlphaOut(this.m_cDelaunay,t):this.alphaShape(this.m_cDelaunay,this.m_alpha)}addGeometry(t){if(i(t),n(t),0===this.m_alpha)return;if(this.m_vertexDescription&&this.m_bMerge||(this.m_vertexDescription=t.getDescription(),this.m_vertexDescription.getAttributeCount()>1?this.m_multiPointForAttributes=new E({vd:this.m_vertexDescription}):this.m_multiPointForAttributes=null),t.isEmpty())return;const e=t.getGeometryType();if(s(e)){const e=t,i=new g;for(let t=0,n=e.getPointCount();t<n;t++)e.queryXY(t,i),this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++);this.m_multiPointForAttributes&&this.m_multiPointForAttributes.addPoints(e,0,-1)}else if(e===o.enumPoint){const e=t,i=e.getXY();this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++),this.m_multiPointForAttributes&&this.m_multiPointForAttributes.add(e)}else r("bad geometry type")}}const z=new q;function O(t,e,i){return z.execute(t,e,null,i)}function Z(e,i,n){const s=z.executeMany(new t(e),i,n,null);return Array.from(s)}function R(){return z.supportsCurves()}export{O as execute,Z as executeMany,R as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{b as r,$ as s}from"../../../chunks/MultiPathImpl.js";import{G as o,i as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{p as u}from"../../../chunks/Envelope.js";import{h as i,t 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 o=(new i).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends t{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()!==o.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(!n(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(t,r,s){const o=y.execute(new e(t),new e(r),s,null);return Array.from(o)}function h(){return y.supportsCurves()}export{a as execute,h as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{E as r,n as s}from"../../../chunks/MultiPathImpl.js";import{G as o,l as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{c as u}from"../../../chunks/Envelope.js";import{z as i,ay 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 o=(new i).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends t{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()!==o.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(!n(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(t,r,s){const o=y.execute(new e(t),new e(r),s,null);return Array.from(o)}function h(){return y.supportsCurves()}export{a as execute,h as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as r}from"../../../chunks/GeometryCursor.js";import{P as t}from"../../../chunks/Envelope.js";import{p as n}from"../../../chunks/Geometry.js";import{k as s}from"../../../chunks/MultiPathImpl.js";class u{getOperatorType(){return 10109}supportsCurves(){return!0}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}executeMany(e,r){return new m(e,r)}execute(e,r){return o(e)}}function o(e,r){const n=s(e);return null===n?new t({vd:e.getDescription()}):n}class m extends r{constructor(e,r){super(),this.m_progressTracker=r,this.m_index=-1,this.m_bDone=!1,this.m_inputGeometryCursor=e}next(){if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return n(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),o(e);this.m_bDone=!0}return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}}const i=new u;function c(e){return i.execute(e,null)}function p(r){const t=i.executeMany(new e(r),null);return Array.from(t)}function a(){return i.supportsCurves()}export{c as execute,p as executeMany,a as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as r}from"../../../chunks/GeometryCursor.js";import{P as t}from"../../../chunks/Envelope.js";import{c as n}from"../../../chunks/Geometry.js";import{c as s}from"../../../chunks/MultiPathImpl.js";class u{getOperatorType(){return 10109}supportsCurves(){return!0}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}executeMany(e,r){return new m(e,r)}execute(e,r){return o(e)}}function o(e,r){const n=s(e);return null===n?new t({vd:e.getDescription()}):n}class m extends r{constructor(e,r){super(),this.m_progressTracker=r,this.m_index=-1,this.m_bDone=!1,this.m_inputGeometryCursor=e}next(){if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return n(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),o(e);this.m_bDone=!0}return null}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}}const c=new u;function i(e){return c.execute(e,null)}function p(r){const t=c.executeMany(new e(r),null);return Array.from(t)}function a(){return c.supportsCurves()}export{i as execute,p as executeMany,a as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{r,q as n,p as s}from"../../../chunks/Geometry.js";import{h 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],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 p(){return a.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,p as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{a as r,d as n,c as s}from"../../../chunks/Geometry.js";import{z 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],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};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{p as n,G as r,k as o,r as u,m as i,g as s,f as m}from"../../../chunks/Geometry.js";import{P as c}from"../../../chunks/Envelope.js";import{W as a,t as g,e as y,P as l,A as f,r as p,C as h}from"../../../chunks/MultiPathImpl.js";import{Envelope2D as C}from"../../../chunks/Envelope2D.js";class x{getOperatorType(){return 10102}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n){return new P(t,e,n)}execute(e,t){return d(e)}isConvex(e,t){if(n(e),e.isEmpty())return!0;const u=e.getGeometryType();if(u===r.enumPoint)return!0;if(u===r.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if(o(u)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(u===r.enumMultiPoint){return 1===e.getPointCount()}if(u===r.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(u===r.enumGeometryCollection){const n=e;return 1===n.getGeometryCount()&&this.isConvex(n.getGeometry(0),t)}const i=e;return!(1!==i.getPathCount()||i.getPointCount()<3)&&a(i,0)}constructOrientedMinimumBoundingBox(e,t,n,r,o){g(e,t,n,r,o)}}class P extends t{constructor(e,t,n){super(),t||u(""),this.m_progressTracker=n,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){const e=G(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return i(e),n(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),d(e);this.m_bDone=!0}return null}}function G(e,t){const r=new h;let o;for(;o=e.next();)i(o),n(o),r.addGeometry(o);return r.getBoundingGeometry()}function d(e,t){if(n(e),e.isEmpty())return e.createInstance();const u=e.getGeometryType();if(o(u)){const t=e;if(t.isDegenerate(0)){const e=new c;return t.queryStart(e),e}if(t.getGeometryType()===r.enumLine){const n=new c,r=new y({vd:e.getDescription()});return t.queryStart(n),r.startPathPoint(n),t.queryEnd(n),r.lineToPoint(n),r}{const n=new y({vd:e.getDescription()});return n.addSegment(t,!0),d(n)}}if(u===r.enumEnvelope){const t=e,n=new C;if(t.queryEnvelope(n),n.xmin===n.xmax&&n.ymin===n.ymax){const e=new c;return t.queryCornerByVal(0,e),e}if(n.xmin===n.xmax||n.ymin===n.ymax){const n=new c,r=new y({vd:e.getDescription()});return t.queryCornerByVal(0,n),r.startPathPoint(n),t.queryCornerByVal(1,n),r.lineToPoint(n),r}{const n=new l({vd:e.getDescription()});return n.addEnvelope(t,!1),n}}if(u===r.enumGeometryCollection)return G(f(e,-1));if(M(e)){if(u===r.enumMultiPoint){const t=e,n=new c;return t.getPointByVal(0,n),n}return e}s(m(u));return p(e)}function M(e,t){if(n(e),e.isEmpty())return!0;const u=e.getGeometryType();if(u===r.enumPoint)return!0;if(u===r.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if(o(u)){const t=e;if(t.isDegenerate(0))return!1;if(u===r.enumLine)return!0;const n=new y;return n.addSegment(t,!0),M(n)}if(u===r.enumMultiPoint){return 1===e.getPointCount()}if(u===r.enumPolyline){const t=e;return!t.hasNonLinearSegments()&&(1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1)))}if(u===r.enumGeometryCollection){const t=e;return 1===t.getGeometryCount()&&M(t.getGeometry(0))}const i=e;return!(1!==i.getPathCount()||i.getPointCount()<3)&&a(i,0)}const v=new x;function w(e){return v.execute(e,null)}function _(t,n){const r=v.executeMany(new e(t),n,null);return Array.from(r)}function D(e){return v.isConvex(e,null)}function E(e,t,n,r,o){return v.constructOrientedMinimumBoundingBox(e,t,n,r,o)}function k(){return v.supportsCurves()}export{E as constructOrientedMinimumBoundingBox,w as execute,_ as executeMany,D as isConvex,k as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{c as n,G as r,h as o,a as u,p as i,g as s,i as m}from"../../../chunks/Geometry.js";import{P as c}from"../../../chunks/Envelope.js";import{i as a,e as g,a as y,P as l,g as f,f as p,C as h}from"../../../chunks/MultiPathImpl.js";import{Envelope2D as C}from"../../../chunks/Envelope2D.js";class x{getOperatorType(){return 10102}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n){return new P(t,e,n)}execute(e,t){return d(e)}isConvex(e,t){if(n(e),e.isEmpty())return!0;const u=e.getGeometryType();if(u===r.enumPoint)return!0;if(u===r.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if(o(u)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(u===r.enumMultiPoint){return 1===e.getPointCount()}if(u===r.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(u===r.enumGeometryCollection){const n=e;return 1===n.getGeometryCount()&&this.isConvex(n.getGeometry(0),t)}const i=e;return!(1!==i.getPathCount()||i.getPointCount()<3)&&a(i,0)}constructOrientedMinimumBoundingBox(e,t,n,r,o){g(e,t,n,r,o)}}class P extends t{constructor(e,t,n){super(),t||u(""),this.m_progressTracker=n,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){const e=G(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return i(e),n(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),d(e);this.m_bDone=!0}return null}}function G(e,t){const r=new h;let o;for(;o=e.next();)i(o),n(o),r.addGeometry(o);return r.getBoundingGeometry()}function d(e,t){if(n(e),e.isEmpty())return e.createInstance();const u=e.getGeometryType();if(o(u)){const t=e;if(t.isDegenerate(0)){const e=new c;return t.queryStart(e),e}if(t.getGeometryType()===r.enumLine){const n=new c,r=new y({vd:e.getDescription()});return t.queryStart(n),r.startPathPoint(n),t.queryEnd(n),r.lineToPoint(n),r}{const n=new y({vd:e.getDescription()});return n.addSegment(t,!0),d(n)}}if(u===r.enumEnvelope){const t=e,n=new C;if(t.queryEnvelope(n),n.xmin===n.xmax&&n.ymin===n.ymax){const e=new c;return t.queryCornerByVal(0,e),e}if(n.xmin===n.xmax||n.ymin===n.ymax){const n=new c,r=new y({vd:e.getDescription()});return t.queryCornerByVal(0,n),r.startPathPoint(n),t.queryCornerByVal(1,n),r.lineToPoint(n),r}{const n=new l({vd:e.getDescription()});return n.addEnvelope(t,!1),n}}if(u===r.enumGeometryCollection)return G(f(e,-1));if(M(e)){if(u===r.enumMultiPoint){const t=e,n=new c;return t.getPointByVal(0,n),n}return e}s(m(u));return p(e)}function M(e,t){if(n(e),e.isEmpty())return!0;const u=e.getGeometryType();if(u===r.enumPoint)return!0;if(u===r.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if(o(u)){const t=e;if(t.isDegenerate(0))return!1;if(u===r.enumLine)return!0;const n=new y;return n.addSegment(t,!0),M(n)}if(u===r.enumMultiPoint){return 1===e.getPointCount()}if(u===r.enumPolyline){const t=e;return!t.hasNonLinearSegments()&&(1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1)))}if(u===r.enumGeometryCollection){const t=e;return 1===t.getGeometryCount()&&M(t.getGeometry(0))}const i=e;return!(1!==i.getPathCount()||i.getPointCount()<3)&&a(i,0)}const v=new x;function w(e){return v.execute(e,null)}function _(t,n){const r=v.executeMany(new e(t),n,null);return Array.from(r)}function D(e){return v.isConvex(e,null)}function E(e,t,n,r,o){return v.constructOrientedMinimumBoundingBox(e,t,n,r,o)}function q(){return v.supportsCurves()}export{E as constructOrientedMinimumBoundingBox,w as execute,_ as executeMany,D as isConvex,q as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import{b 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
+ import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import{x 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};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{s as r,t as n,q 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.S).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};
2
+ 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};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{s as e,t,q as n}from"../../../chunks/pe.js";let r;function o(){return!!r&&n()}async function s(){if(!o()){const[n,o]=await Promise.all([import("../../../chunks/OperatorGeodeticArea.js"),import("../../../chunks/SpatialReference.js").then(e=>e.S).then(({injectPe:e})=>e),e()]);r=new n.OperatorGeodeticArea,o(t)}}function c(e,t,n){return r.execute(e,t,n,null)}function i(){return r.supportsCurves()}export{c as execute,o as isLoaded,s as load,i as supportsCurves};
2
+ import{l as e,p as t,i as n}from"../../../chunks/pe.js";let r;function o(){return!!r&&n()}async function i(){if(!o()){const[n,o]=await Promise.all([import("../../../chunks/OperatorGeodeticArea.js"),import("../../../chunks/SpatialReference.js").then(e=>e.aP).then(({injectPe:e})=>e),e()]);r=new n.OperatorGeodeticArea,o(t)}}function s(e,t,n){return r.execute(e,t,n,null)}function a(){return r.supportsCurves()}export{s as execute,o as isLoaded,i as load,a as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{s as n,t,q as r}from"../../../chunks/pe.js";let o;function s(){return!!o&&r()}async function u(){if(!s()){const[e,r]=await Promise.all([import("../../../chunks/OperatorGeodeticDensifyByLength.js"),import("../../../chunks/SpatialReference.js").then(e=>e.S).then(({injectPe:e})=>e),n()]);o=new e.OperatorGeodeticDensifyByLength,r(t)}}function i(e,n,t,r){return o.execute(e,n,t,r,null)}function c(n,t,r,s){const u=o.executeMany(new e(n),t,r,s,null);return Array.from(u)}function a(){return o.supportsCurves()}export{i as execute,c as executeMany,s as isLoaded,u as load,a as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{l as n,p as t,i as r}from"../../../chunks/pe.js";let o;function s(){return!!o&&r()}async function i(){if(!s()){const[e,r]=await Promise.all([import("../../../chunks/OperatorGeodeticDensifyByLength.js"),import("../../../chunks/SpatialReference.js").then(e=>e.aP).then(({injectPe:e})=>e),n()]);o=new e.OperatorGeodeticDensifyByLength,r(t)}}function u(e,n,t,r){return o.execute(e,n,t,r,null)}function c(n,t,r,s){const i=o.executeMany(new e(n),t,r,s,null);return Array.from(i)}function a(){return o.supportsCurves()}export{u as execute,c as executeMany,s as isLoaded,i as load,a as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{s as e,t,q as n}from"../../../chunks/pe.js";let r;function s(){return!!r&&n()}async function c(){if(!s()){const[n,s]=await Promise.all([import("../../../chunks/OperatorGeodeticDistance.js"),import("../../../chunks/SpatialReference.js").then(e=>e.S).then(({injectPe:e})=>e),e()]);r=new n.OperatorGeodeticDistance,s(t)}}function i(e,t,n,s){return r.execute(e,t,n,s,null)}function o(){return r.supportsCurves()}export{i as execute,s as isLoaded,c as load,o as supportsCurves};
2
+ import{l as e,p as t,i as n}from"../../../chunks/pe.js";let r;function i(){return!!r&&n()}async function s(){if(!i()){const[n,i]=await Promise.all([import("../../../chunks/OperatorGeodeticDistance.js"),import("../../../chunks/SpatialReference.js").then(e=>e.aP).then(({injectPe:e})=>e),e()]);r=new n.OperatorGeodeticDistance,i(t)}}function c(e,t,n,i){return r.execute(e,t,n,i,null)}function o(){return r.supportsCurves()}export{c as execute,i as isLoaded,s as load,o as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{s as e,t,q as n}from"../../../chunks/pe.js";let r;function o(){return!!r&&n()}async function s(){if(!o()){const[n,o]=await Promise.all([import("../../../chunks/OperatorGeodeticLength.js"),import("../../../chunks/SpatialReference.js").then(e=>e.S).then(({injectPe:e})=>e),e()]);r=new n.OperatorGeodeticLength,o(t)}}function c(e,t,n){return r.execute(e,t,n,null)}function i(){return r.supportsCurves()}export{c as execute,o as isLoaded,s as load,i as supportsCurves};
2
+ import{l as e,p as t,i as n}from"../../../chunks/pe.js";let r;function o(){return!!r&&n()}async function i(){if(!o()){const[n,o]=await Promise.all([import("../../../chunks/OperatorGeodeticLength.js"),import("../../../chunks/SpatialReference.js").then(e=>e.aP).then(({injectPe:e})=>e),e()]);r=new n.OperatorGeodeticLength,o(t)}}function s(e,t,n){return r.execute(e,t,n,null)}function c(){return r.supportsCurves()}export{s as execute,o as isLoaded,i as load,c as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{p as r}from"../../../chunks/Geometry.js";import{h as s}from"../../../chunks/SpatialReference.js";import{Envelope2D as i}from"../../../chunks/Envelope2D.js";import{B as n}from"../../../chunks/Bufferer-Dw9Qi4T1.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,i,n,m,o,c,h,a,_){if(h){const h=new u(e,t,r,i,n,m,o,c,_);return(new s).executeMany(h,t,_,2)}return new u(e,t,r,i,n,m,o,c,_)}}class u extends t{constructor(e,t,r,s,m,u,o,c,h){super(),this.m_currentUnionEnvelope2D=new i,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new n(h),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=o,this.m_maxVerticesInFullCircle=c,this.m_joins=s,this.m_caps=m,this.m_miterLimit=u}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return r(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,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const o=new m;function c(t,r,s,i,n,m,u,c,h){const a=o.executeMany(new e(t),r,s,i,n,m,u,c,h,0,null);return Array.from(a)}function h(){return o.supportsCurves()}export{c as executeMany,h as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{c as r}from"../../../chunks/Geometry.js";import{z as s}from"../../../chunks/SpatialReference.js";import{Envelope2D as i}from"../../../chunks/Envelope2D.js";import{B as n}from"../../../chunks/Bufferer-Dw9Qi4T1.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,i,n,m,o,c,h,a,_){if(h){const h=new u(e,t,r,i,n,m,o,c,_);return(new s).executeMany(h,t,_,2)}return new u(e,t,r,i,n,m,o,c,_)}}class u extends t{constructor(e,t,r,s,m,u,o,c,h){super(),this.m_currentUnionEnvelope2D=new i,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new n(h),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=o,this.m_maxVerticesInFullCircle=c,this.m_joins=s,this.m_caps=m,this.m_miterLimit=u}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return r(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,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const o=new m;function c(t,r,s,i,n,m,u,c,h){const a=o.executeMany(new e(t),r,s,i,n,m,u,c,h,0,null);return Array.from(a)}function h(){return o.supportsCurves()}export{c as executeMany,h as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import{d as r}from"../../../chunks/SpatialReference.js";import"../../../chunks/MultiPathImpl.js";import"../../../chunks/Envelope.js";const n=new r;function t(e,r){return n.accelerateGeometry(e,r,1)}function o(e,r,t){return n.execute(e,r,t,null)}function u(r,t,o,u){const s=n.executeMany(new e(r),new e([t]),o,null,u);return Array.from(s)}function s(){return n.supportsCurves()}export{t as accelerateGeometry,o as execute,u as executeMany,s as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import{y as r}from"../../../chunks/SpatialReference.js";import"../../../chunks/MultiPathImpl.js";import"../../../chunks/Envelope.js";const n=new r;function t(e,r){return n.accelerateGeometry(e,r,1)}function o(e,r,t){return n.execute(e,r,t,null)}function u(r,t,o,u){const s=n.executeMany(new e(r),new e([t]),o,null,u);return Array.from(s)}function s(){return n.supportsCurves()}export{t as accelerateGeometry,o as execute,u as executeMany,s as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{p as n,r,G as o,g as s}from"../../../chunks/Geometry.js";import{P as a,p as i}from"../../../chunks/Envelope.js";import{P as l,L as u}from"../../../chunks/MultiPathImpl.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";import{P as m,Z as N,h,aa as g}from"../../../chunks/Point2D.js";import{ay as p,ag as y}from"../../../chunks/SpatialReference.js";import{a as P}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as f}from"../../../chunks/OperatorProximity.js";class x{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new d(e,t)}execute(e,t){return new d(null,t).labelPoint(e)}}class d extends t{progress_(){}tock(){return!0}getRank(){return 1}constructor(e,t){super(),this.m_index=-1,this.m_progressCounter=0,this.m_progressTracker=t,this.m_inputGeoms=e}next(){const e=this.m_inputGeoms.next();return e?(n(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.labelPoint(e)):null}getGeometryID(){return this.m_index}labelPoint(e){if(null===e&&r("null pointer is not allowed"),e.getGeometryType()===o.enumPoint)return e;if(e.isEmpty())return new a({vd:e.getDescription()});switch(e.getGeometryType()){case o.enumPolygon:return this.labelPointPolygon(e);case o.enumPolyline:return this.labelPointPolyline(e);case o.enumMultiPoint:return this.labelPointMultiPoint(e);case o.enumEnvelope:return this.labelPointEnvelope(e);default:r("geometry is not supported")}}labelPointPolygon(e){const t=new c;e.queryEnvelope(t);const n=i(null,t,!0).total();let r=null,o=e;if(e.hasNonLinearSegments()){const t=new l({copy:e}),a=p(t,.25*n,n);s(a!==e),r=a,o=r}let u=0,g=0;for(let s=0,a=o.getPathCount();s<a;++s){const e=Math.abs(o.calculateRingArea2D(s));e>g&&(g=e,u=s)}const x=new m;if(Math.abs(g)<=2*n*n?x.setNAN():x.assign(P(o,u)),Number.isNaN(x.x)){const e=new c;return o.queryPathEnvelope(u,e),new a({pt:e.getCenter()})}if(o.getPointCount()<4)return new a({x:x.x,y:x.y});const d=m.getNAN(),w=[d.clone(),d.clone(),d.clone(),d.clone()],b=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],C=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let _=!1,D=(new f).getNearestCoordinate(o,x,!0,!1);if(0===D.m_distance&&(_=!0,w[0]=x,D=(new f).getNearestCoordinate(o,x,!1,!1),D.m_distance>.25*t.minDimension()*1.66666666))return new a({x:x.x,y:x.y});b[0]=D.m_distance,C[0]=0;const k=new m;let A=!1,E=.25,q=-1;const v=new c;o.queryPathEnvelope(u,v);do{let e=Number.NaN;if(w[1]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[1].isNAN()||(D=(new f).getNearestCoordinate(o,w[1],!1,!1),e=D.m_distance),e>n&&1===y(o,w[1],n))A=!0,b[1]=e,C[1]=m.sqrDistance(w[1],x);else if(e>q&&(q=e,k.setCoordsPoint2D(w[1])),E-=.01,E<.1){if(!(q>=0))break;A=!0,b[1]=q,w[1]=k,C[1]=m.sqrDistance(w[1],x)}}while(!A);A=!1,E=.5,q=-1;let G=.01,M=1;do{let e=Number.NaN;if(w[2]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[2].isNAN()||(D=(new f).getNearestCoordinate(o,w[2],!1,!1),e=D.m_distance),e>n&&1===y(o,w[2],n))A=!0,b[2]=e,C[2]=m.sqrDistance(w[2],x);else if(e>q&&(q=e,k.setCoordsPoint2D(w[2])),E=.5+G*M,G+=.01,M*=-1,E<.3||E>.7){if(!(q>=0))break;A=!0,b[2]=q,w[2]=k,C[2]=m.sqrDistance(w[2],x)}}while(!A);A=!1,E=.75,q=-1;do{let e=Number.NaN;if(w[3]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[3].isNAN()||(D=(new f).getNearestCoordinate(o,w[3],!1,!1),e=D.m_distance),e>n&&1===y(o,w[3],n))A=!0,b[3]=e,C[3]=m.sqrDistance(w[3],x);else if(e>q&&(q=e,k.setCoordsPoint2D(w[3])),E+=.01,E>.9){if(!(q>=0))break;A=!0,b[3]=q,w[3]=k,C[3]=m.sqrDistance(w[3],x)}}while(!A);const S=[0,1,2,3],j=_?0:1;for(let s=j;s<4;s++)for(let e=j;e<3;e++){const t=C[e],n=C[e+1];if(h(t,n)>0){const r=S[e];S[e]=S[e+1],S[e+1]=r,C[e]=n,C[e+1]=t}}let X=j,L=0,T=0;for(let s=j;s<4;s++){switch(s){case 0:T=2*b[S[s]];break;case 1:T=1.66666666*b[S[s]];break;case 2:T=1.33333333*b[S[s]];break;case 3:T=b[S[s]]}T>L&&(L=T,X=S[s])}return s(!w[X].isNAN()),new a({x:w[X].x,y:w[X].y})}labelPointPolyline(e){const t=new m;if(e.getPointCount()>2*e.getPathCount()){let n=-1,r=-Number.MAX_VALUE;for(let t=0,i=e.getPathCount();t<i;t++)if(e.getPathSize(t)>2){const o=e.calculatePathLength2D(t);o>r&&(r=o,n=t)}const o=e.getPathStart(n),s=e.getPathEnd(n),a=Math.trunc((o+s)/2);t.assign(e.getXY(a))}else{let n=-Number.MAX_VALUE;const r=e.querySegmentIterator();for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment(),o=e.calculateLength2D();o>n&&(n=o,t.assign(e.getCoord2D(e.lengthToT(.5*o))))}}return new a({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new c;e.queryEnvelope(t);const n=t.getCenter(),r=(new f).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new a({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new a({x:t.x,y:t.y})}calculateParacentroid_(e,t,n){const r=new c;e.queryEnvelope(r);const o=new m(t,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,N=!1;const h=new u;h.setStartXYCoords(o.x,r.ymin-1),h.setEndXYCoords(o.x,r.ymax+1);const p=new c,y=new m,P=new m,f=g(m,2),x=e.querySegmentIterator();for(;x.nextPath();)for(;x.hasNextSegment();){const e=x.nextSegment();if(e.queryEnvelope(p),s(e.isMonotoneQuickAndDirty()),y.setCoordsPoint2D(h.getStartXY()),P.setCoordsPoint2D(h.getEndXY()),0===p.clipLine(y,P))continue;if(1!==h.intersect(e,f,null,null,n))continue;const t=f[0].y;a>i?t<a&&(a=t,l=!0):t<i&&(i=t,N=!0)}return l&&N?o.y=(a+i)/2:o.setNAN(),o}}const w=new x;function b(e){return w.execute(e,null)}function C(t){const n=w.executeMany(new e(t),null);return Array.from(n)}function _(){return w.supportsCurves()}export{b as execute,C as executeMany,_ as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{c as n,a as r,G as o,g as s}from"../../../chunks/Geometry.js";import{P as a,c as i}from"../../../chunks/Envelope.js";import{P as l,L as u}from"../../../chunks/MultiPathImpl.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";import{P as m,r as N,t as g,m as h}from"../../../chunks/Point2D.js";import{aw as y,g as p}from"../../../chunks/SpatialReference.js";import{a as P}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as f}from"../../../chunks/OperatorProximity.js";class x{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new d(e,t)}execute(e,t){return new d(null,t).labelPoint(e)}}class d extends t{progress_(){}tock(){return!0}getRank(){return 1}constructor(e,t){super(),this.m_index=-1,this.m_progressCounter=0,this.m_progressTracker=t,this.m_inputGeoms=e}next(){const e=this.m_inputGeoms.next();return e?(n(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.labelPoint(e)):null}getGeometryID(){return this.m_index}labelPoint(e){if(null===e&&r("null pointer is not allowed"),e.getGeometryType()===o.enumPoint)return e;if(e.isEmpty())return new a({vd:e.getDescription()});switch(e.getGeometryType()){case o.enumPolygon:return this.labelPointPolygon(e);case o.enumPolyline:return this.labelPointPolyline(e);case o.enumMultiPoint:return this.labelPointMultiPoint(e);case o.enumEnvelope:return this.labelPointEnvelope(e);default:r("geometry is not supported")}}labelPointPolygon(e){const t=new c;e.queryEnvelope(t);const n=i(null,t,!0).total();let r=null,o=e;if(e.hasNonLinearSegments()){const t=new l({copy:e}),a=y(t,.25*n,n);s(a!==e),r=a,o=r}let u=0,h=0;for(let s=0,a=o.getPathCount();s<a;++s){const e=Math.abs(o.calculateRingArea2D(s));e>h&&(h=e,u=s)}const x=new m;if(Math.abs(h)<=2*n*n?x.setNAN():x.assign(P(o,u)),Number.isNaN(x.x)){const e=new c;return o.queryPathEnvelope(u,e),new a({pt:e.getCenter()})}if(o.getPointCount()<4)return new a({x:x.x,y:x.y});const d=m.getNAN(),w=[d.clone(),d.clone(),d.clone(),d.clone()],b=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],C=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let _=!1,D=(new f).getNearestCoordinate(o,x,!0,!1);if(0===D.m_distance&&(_=!0,w[0]=x,D=(new f).getNearestCoordinate(o,x,!1,!1),D.m_distance>.25*t.minDimension()*1.66666666))return new a({x:x.x,y:x.y});b[0]=D.m_distance,C[0]=0;const k=new m;let A=!1,E=.25,q=-1;const v=new c;o.queryPathEnvelope(u,v);do{let e=Number.NaN;if(w[1]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[1].isNAN()||(D=(new f).getNearestCoordinate(o,w[1],!1,!1),e=D.m_distance),e>n&&1===p(o,w[1],n))A=!0,b[1]=e,C[1]=m.sqrDistance(w[1],x);else if(e>q&&(q=e,k.setCoordsPoint2D(w[1])),E-=.01,E<.1){if(!(q>=0))break;A=!0,b[1]=q,w[1]=k,C[1]=m.sqrDistance(w[1],x)}}while(!A);A=!1,E=.5,q=-1;let G=.01,M=1;do{let e=Number.NaN;if(w[2]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[2].isNAN()||(D=(new f).getNearestCoordinate(o,w[2],!1,!1),e=D.m_distance),e>n&&1===p(o,w[2],n))A=!0,b[2]=e,C[2]=m.sqrDistance(w[2],x);else if(e>q&&(q=e,k.setCoordsPoint2D(w[2])),E=.5+G*M,G+=.01,M*=-1,E<.3||E>.7){if(!(q>=0))break;A=!0,b[2]=q,w[2]=k,C[2]=m.sqrDistance(w[2],x)}}while(!A);A=!1,E=.75,q=-1;do{let e=Number.NaN;if(w[3]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[3].isNAN()||(D=(new f).getNearestCoordinate(o,w[3],!1,!1),e=D.m_distance),e>n&&1===p(o,w[3],n))A=!0,b[3]=e,C[3]=m.sqrDistance(w[3],x);else if(e>q&&(q=e,k.setCoordsPoint2D(w[3])),E+=.01,E>.9){if(!(q>=0))break;A=!0,b[3]=q,w[3]=k,C[3]=m.sqrDistance(w[3],x)}}while(!A);const S=[0,1,2,3],j=_?0:1;for(let s=j;s<4;s++)for(let e=j;e<3;e++){const t=C[e],n=C[e+1];if(g(t,n)>0){const r=S[e];S[e]=S[e+1],S[e+1]=r,C[e]=n,C[e+1]=t}}let X=j,L=0,T=0;for(let s=j;s<4;s++){switch(s){case 0:T=2*b[S[s]];break;case 1:T=1.66666666*b[S[s]];break;case 2:T=1.33333333*b[S[s]];break;case 3:T=b[S[s]]}T>L&&(L=T,X=S[s])}return s(!w[X].isNAN()),new a({x:w[X].x,y:w[X].y})}labelPointPolyline(e){const t=new m;if(e.getPointCount()>2*e.getPathCount()){let n=-1,r=-Number.MAX_VALUE;for(let t=0,i=e.getPathCount();t<i;t++)if(e.getPathSize(t)>2){const o=e.calculatePathLength2D(t);o>r&&(r=o,n=t)}const o=e.getPathStart(n),s=e.getPathEnd(n),a=Math.trunc((o+s)/2);t.assign(e.getXY(a))}else{let n=-Number.MAX_VALUE;const r=e.querySegmentIterator();for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment(),o=e.calculateLength2D();o>n&&(n=o,t.assign(e.getCoord2D(e.lengthToT(.5*o))))}}return new a({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new c;e.queryEnvelope(t);const n=t.getCenter(),r=(new f).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new a({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new a({x:t.x,y:t.y})}calculateParacentroid_(e,t,n){const r=new c;e.queryEnvelope(r);const o=new m(t,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,N=!1;const g=new u;g.setStartXYCoords(o.x,r.ymin-1),g.setEndXYCoords(o.x,r.ymax+1);const y=new c,p=new m,P=new m,f=h(m,2),x=e.querySegmentIterator();for(;x.nextPath();)for(;x.hasNextSegment();){const e=x.nextSegment();if(e.queryEnvelope(y),s(e.isMonotoneQuickAndDirty()),p.setCoordsPoint2D(g.getStartXY()),P.setCoordsPoint2D(g.getEndXY()),0===y.clipLine(p,P))continue;if(1!==g.intersect(e,f,null,null,n))continue;const t=f[0].y;a>i?t<a&&(a=t,l=!0):t<i&&(i=t,N=!0)}return l&&N?o.y=(a+i)/2:o.setNAN(),o}}const w=new x;function b(e){return w.execute(e,null)}function C(t){const n=w.executeMany(new e(t),null);return Array.from(n)}function _(){return w.supportsCurves()}export{b as execute,C as executeMany,_ as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as r}from"../../../chunks/GeometryCursor.js";import{b as t}from"../../../chunks/MultiPathImpl.js";import{d as s,p as n}from"../../../chunks/Geometry.js";import{p as o}from"../../../chunks/Envelope.js";import{al as m}from"../../../chunks/SpatialReference.js";class u{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new i(e,r,t)}}class i extends r{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),u=o(this.m_sr,r,!0);this.m_result=m(e,u,this.m_progressTracker)}}const p=new u;function a(r,t){const s=p.executeMany(new e(r),t,null);return Array.from(s)}function c(){return p.supportsCurves()}export{a as executeMany,c as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as r}from"../../../chunks/GeometryCursor.js";import{E as t}from"../../../chunks/MultiPathImpl.js";import{k as s,c as n}from"../../../chunks/Geometry.js";import{c as o}from"../../../chunks/Envelope.js";import{az as m}from"../../../chunks/SpatialReference.js";class u{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new i(e,r,t)}}class i extends r{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),u=o(this.m_sr,r,!0);this.m_result=m(e,u,this.m_progressTracker)}}const c=new u;function a(r,t){const s=c.executeMany(new e(r),t,null);return Array.from(s)}function p(){return c.supportsCurves()}export{a as executeMany,p as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{G as e}from"../../../chunks/GeometryCursor.js";import{p as n,G as r,r as s,i as o,k as i,q as u}from"../../../chunks/Geometry.js";import{a as l,aG as m}from"../../../chunks/Point2D.js";import{V as c,P as a}from"../../../chunks/Envelope.js";import{A as h,d as p,f as g,e as d,G as y}from"../../../chunks/MultiPathImpl.js";function _(t,e,n,r,s){return new f(e,n,r,s).processGeometry(t)}class f{constructor(t,e,n,r){this.m_interval=n,this.m_progressTracker=r,this.m_attribute=t,this.m_ord=e,(c.getComponentCount(this.m_attribute)<=e||e<0)&&s("LocateBetween: ordinate");2===c.getInterpolation(this.m_attribute)&&s("LocateBetween: angular interpolation")}processGeometry(t){const e=t.getGeometryType();if(e===r.enumGeometryCollection)return this.processGeometryCollection(t);if(o(e)&&s("LocateBetween does not support Polygons and Envelopes."),t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});if(i(e))return this.processSegment(t);switch(e){case r.enumPoint:return this.processPoint(t);case r.enumMultiPoint:return this.processMultiPoint(t);case r.enumPolyline:return this.processPolyline(t);default:u("LocateBetween")}}processPoint(t){const e=t.getAttributeAsDbl(this.m_attribute,this.m_ord);return this.m_interval.containsCoordinate(e)?new p({point:t}):new a({vd:t.getDescription()})}processMultiPoint(t){let e=null,n=-1;const r=t.getAttributeStreamRef(this.m_attribute),s=c.getComponentCount(this.m_attribute);for(let o=0,i=0,u=t.getPointCount();o<u;++o,i+=s){const s=r.readAsDbl(i);this.m_interval.containsCoordinate(s)?-1===n&&(n=o):n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,o),n=-1)}return n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,-1)),e||new a({vd:t.getDescription()})}processPolyline(t){const e=t.queryInterval(this.m_attribute,this.m_ord);if(this.m_interval.contains(e))return t;if(!this.m_interval.isIntersecting(e))return new a({vd:t.getDescription()});let n=null,s=null;const o=t.querySegmentIterator(),i=new g,u=new a,l=new a,m=new a;let c=!0,h=!1;for(;o.nextPath();)for(c=!0,h=!1;o.hasNextSegment();){const t=o.nextSegment(),e=[null],a=this.processSegmentHelper(t,i,e,u);if(a!==r.enumUnknown)if(a===r.enumPoint){if(!c&&(s.getPointByVal(s.getPointCount()-1,l),l.equals(u)))continue;if(c=!0,h&&(t.queryStart(l),u.equals(l)))continue;t.queryEnd(l),h=u.equals(l),n?n.add(u):n=new p({point:u})}else a===r.enumLine&&(h=!1,s||(s=new d),c&&(null===n||n.isEmpty()||(n.getPointByVal(n.getPointCount()-1,l),e[0].queryStart(u),l.equals(u)&&n.removePoint(n.getPointCount()-1))),s.addSegment(e[0],c),t.queryEnd(l),e[0].queryEnd(m),c=!l.equals(m));else c=!0,h=!1}if(null!==n&&n.isEmpty()&&(n=null),null!==n&&null!==s){const t=new y;return t.addGeometry(s),t.addGeometry(n),t}return null!==n?n:null!==s?s:new a({vd:t.getDescription()})}processSegment(t){const e=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),n=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),r=Number.isNaN(e)?n:e,s=Number.isNaN(n)?e:n,o=new l;o.setCoords(r,s);const i=o.clone();if(i.intersect(this.m_interval),i.isEmpty())return new a({vd:t.getDescription()});if(o.equals(i))return t;const u=s-r,c=t.calculateLength2D();if(0===i.width()){const e=new a({vd:t.getDescription()}),n=(i.vmin-r)/u,s=t.lengthToT(n*c);return t.queryCoord(s,e),e}let h=(i.vmin-r)/u,p=(i.vmax-r)/u;return h>p&&(p=m(h,h=p)),h=t.lengthToT(h*c),p=t.lengthToT(p*c),t.cut(h,p)}processGeometryCollection(t){if(t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});const e=h(t),n=new y;for(let r=e.next();null!==r;r=e.next()){const t=this.processGeometry(r);t.isEmpty()||n.addGeometry(t)}return n.isEmpty()?new a({vd:t.getDescription()}):n}processSegmentHelper(t,e,n,s){const o=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),i=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),u=Number.isNaN(o)?i:o,c=Number.isNaN(i)?o:i,a=new l;a.setCoords(u,c);const h=a.clone();if(h.intersect(this.m_interval),h.isEmpty())return r.enumUnknown;if(a.equals(h))return n[0]=t,r.enumLine;const p=c-u,g=t.calculateLength2D();if(0===h.width()){const e=(h.vmin-u)/p,n=1===e?1:t.lengthToT(e*g);return t.queryCoord(n,s),r.enumPoint}let d=(h.vmin-u)/p,y=(h.vmax-u)/p;return d>y&&(y=m(d,d=y)),d=1===d?1:t.lengthToT(d*g),y=1===y?1:t.lengthToT(y*g),t.queryCut(d,y,e),n[0]=e.get(),r.enumLine}}class w{getOperatorType(){return 10801}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,n){return new v(t,e,n)}}class v extends e{constructor(t,e,n){super(),this.m_collectionCursor=null,this.m_interval=e,this.m_progressTracker=n,this.m_inputGeoms=t,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){if(this.m_collectionCursor){const t=this.m_collectionCursor.next();if(t)return t;this.m_collectionCursor=null}const t=this.m_inputGeoms.next();if(null===t)return null;n(t),this.m_index=this.m_inputGeoms.getGeometryID();const e=_(t,2,0,this.m_interval,this.m_progressTracker);if(e.getGeometryType()===r.enumGeometryCollection){this.m_collectionCursor=h(e);return this.m_collectionCursor.next()}return e}getGeometryID(){return this.m_index}}const b=new w;function C(e,n){const r=b.executeMany(new t(e),n,null);return Array.from(r)}function G(){return b.supportsCurves()}export{C as executeMany,G as supportsCurves};
2
+ import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{G as e}from"../../../chunks/GeometryCursor.js";import{c as n,G as r,a as s,l as o,h as i,d as u}from"../../../chunks/Geometry.js";import{E as l,c as m}from"../../../chunks/Point2D.js";import{V as c,P as a}from"../../../chunks/Envelope.js";import{g as h,M as p,S as g,a as d,G as y}from"../../../chunks/MultiPathImpl.js";function _(t,e,n,r,s){return new f(e,n,r,s).processGeometry(t)}class f{constructor(t,e,n,r){this.m_interval=n,this.m_progressTracker=r,this.m_attribute=t,this.m_ord=e,(c.getComponentCount(this.m_attribute)<=e||e<0)&&s("LocateBetween: ordinate");2===c.getInterpolation(this.m_attribute)&&s("LocateBetween: angular interpolation")}processGeometry(t){const e=t.getGeometryType();if(e===r.enumGeometryCollection)return this.processGeometryCollection(t);if(o(e)&&s("LocateBetween does not support Polygons and Envelopes."),t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});if(i(e))return this.processSegment(t);switch(e){case r.enumPoint:return this.processPoint(t);case r.enumMultiPoint:return this.processMultiPoint(t);case r.enumPolyline:return this.processPolyline(t);default:u("LocateBetween")}}processPoint(t){const e=t.getAttributeAsDbl(this.m_attribute,this.m_ord);return this.m_interval.containsCoordinate(e)?new p({point:t}):new a({vd:t.getDescription()})}processMultiPoint(t){let e=null,n=-1;const r=t.getAttributeStreamRef(this.m_attribute),s=c.getComponentCount(this.m_attribute);for(let o=0,i=0,u=t.getPointCount();o<u;++o,i+=s){const s=r.readAsDbl(i);this.m_interval.containsCoordinate(s)?-1===n&&(n=o):n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,o),n=-1)}return n>=0&&(e||(e=new p({vd:t.getDescription()})),e.addPoints(t,n,-1)),e||new a({vd:t.getDescription()})}processPolyline(t){const e=t.queryInterval(this.m_attribute,this.m_ord);if(this.m_interval.contains(e))return t;if(!this.m_interval.isIntersecting(e))return new a({vd:t.getDescription()});let n=null,s=null;const o=t.querySegmentIterator(),i=new g,u=new a,l=new a,m=new a;let c=!0,h=!1;for(;o.nextPath();)for(c=!0,h=!1;o.hasNextSegment();){const t=o.nextSegment(),e=[null],a=this.processSegmentHelper(t,i,e,u);if(a!==r.enumUnknown)if(a===r.enumPoint){if(!c&&(s.getPointByVal(s.getPointCount()-1,l),l.equals(u)))continue;if(c=!0,h&&(t.queryStart(l),u.equals(l)))continue;t.queryEnd(l),h=u.equals(l),n?n.add(u):n=new p({point:u})}else a===r.enumLine&&(h=!1,s||(s=new d),c&&(null===n||n.isEmpty()||(n.getPointByVal(n.getPointCount()-1,l),e[0].queryStart(u),l.equals(u)&&n.removePoint(n.getPointCount()-1))),s.addSegment(e[0],c),t.queryEnd(l),e[0].queryEnd(m),c=!l.equals(m));else c=!0,h=!1}if(null!==n&&n.isEmpty()&&(n=null),null!==n&&null!==s){const t=new y;return t.addGeometry(s),t.addGeometry(n),t}return null!==n?n:null!==s?s:new a({vd:t.getDescription()})}processSegment(t){const e=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),n=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),r=Number.isNaN(e)?n:e,s=Number.isNaN(n)?e:n,o=new l;o.setCoords(r,s);const i=o.clone();if(i.intersect(this.m_interval),i.isEmpty())return new a({vd:t.getDescription()});if(o.equals(i))return t;const u=s-r,c=t.calculateLength2D();if(0===i.width()){const e=new a({vd:t.getDescription()}),n=(i.vmin-r)/u,s=t.lengthToT(n*c);return t.queryCoord(s,e),e}let h=(i.vmin-r)/u,p=(i.vmax-r)/u;return h>p&&(p=m(h,h=p)),h=t.lengthToT(h*c),p=t.lengthToT(p*c),t.cut(h,p)}processGeometryCollection(t){if(t.isEmpty()||!t.hasAttribute(this.m_attribute))return new a({vd:t.getDescription()});const e=h(t),n=new y;for(let r=e.next();null!==r;r=e.next()){const t=this.processGeometry(r);t.isEmpty()||n.addGeometry(t)}return n.isEmpty()?new a({vd:t.getDescription()}):n}processSegmentHelper(t,e,n,s){const o=t.getAttributeAsDbl(0,this.m_attribute,this.m_ord),i=t.getAttributeAsDbl(1,this.m_attribute,this.m_ord),u=Number.isNaN(o)?i:o,c=Number.isNaN(i)?o:i,a=new l;a.setCoords(u,c);const h=a.clone();if(h.intersect(this.m_interval),h.isEmpty())return r.enumUnknown;if(a.equals(h))return n[0]=t,r.enumLine;const p=c-u,g=t.calculateLength2D();if(0===h.width()){const e=(h.vmin-u)/p,n=1===e?1:t.lengthToT(e*g);return t.queryCoord(n,s),r.enumPoint}let d=(h.vmin-u)/p,y=(h.vmax-u)/p;return d>y&&(y=m(d,d=y)),d=1===d?1:t.lengthToT(d*g),y=1===y?1:t.lengthToT(y*g),t.queryCut(d,y,e),n[0]=e.get(),r.enumLine}}class w{getOperatorType(){return 10801}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,n){return new v(t,e,n)}}class v extends e{constructor(t,e,n){super(),this.m_collectionCursor=null,this.m_interval=e,this.m_progressTracker=n,this.m_inputGeoms=t,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){if(this.m_collectionCursor){const t=this.m_collectionCursor.next();if(t)return t;this.m_collectionCursor=null}const t=this.m_inputGeoms.next();if(null===t)return null;n(t),this.m_index=this.m_inputGeoms.getGeometryID();const e=_(t,2,0,this.m_interval,this.m_progressTracker);if(e.getGeometryType()===r.enumGeometryCollection){this.m_collectionCursor=h(e);return this.m_collectionCursor.next()}return e}getGeometryID(){return this.m_index}}const b=new w;function C(e,n){const r=b.executeMany(new t(e),n,null);return Array.from(r)}function G(){return b.supportsCurves()}export{C as executeMany,G as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as r}from"../../../chunks/GeometryCursor.js";import{q as t,m as n,p as s,G as o,f as i,r as u}from"../../../chunks/Geometry.js";import{Z as c,Y as m,P as a,c as l,d as g}from"../../../chunks/MultiPathImpl.js";import{aa as d,P as p}from"../../../chunks/Point2D.js";class h{getOperatorType(){return 10113}supportsCurves(){return!1}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}executeMany(e,r,t){return new y(e,r,t)}execute(r,n){const s=new e([r]),o=this.executeMany(s,!1,n).next();return o||t("null output"),o}minimumBoundingCircle(e,r,t,n){return c(e,r,t)}}class y extends r{constructor(e,r,t){super(),this.m_geometryCursor=e,this.m_bMerge=r,this.m_progressTracker=t}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge)return this.mergedMinimumBoundingCircle();const e=this.m_geometryCursor.next();return e?this.minimumBoundingCircle(e):null}getGeometryID(){return this.m_geometryCursor.getGeometryID()}minimumBoundingCircle(e){if(n(e),s(e),this.m_progressTracker?.checkProgress(),e.isEmpty())return e.clone();const r=e.getGeometryType();if(r===o.enumPoint)return this.makeCircle([e.getXY()],1);if(r===o.enumLine){const r=e,t=[r.getStartXY(),r.getEndXY()];return this.makeCircle(t,2)}if(r===o.enumEnvelope){const r=e,t=d(p,2);return r.queryCorner(0,t[0]),r.queryCorner(2,t[1]),this.makeCircle(t,2)}if(i(r)){const r=e,t=[0,0,0],n=m(r,t),s=new Array(n);for(let e=0;e<n;++e)s[e]=r.getXY(t[e]);return this.makeCircle(s,n)}u("Geometry type not supported.")}makeCircle(e,r){const t=new a,n=new l;if(1===r)n.constructCircleRadius(0,e[0],!1);else if(2===r){const r=p.lerp(e[0],e[1],.5),t=p.distance(e[0],r),s=p.distance(e[1],r);n.constructCircleRadius(Math.max(t,s),r,!1)}else if(3===r){const r=p.calculateCircleCenterFromThreePoints(e[0],e[1],e[2]),t=p.distance(e[0],r),s=p.distance(e[1],r),o=p.distance(e[2],r);n.constructCircleRadius(Math.max(t,s,o),r,!1)}return t.addPathFromClosedSegment(n,!1),t}mergedMinimumBoundingCircle(){let e=null,r=this.m_geometryCursor.next();if(!r)return null;e=new g;const t=e.getImpl();do{n(r),s(r),this.m_progressTracker?.checkProgress();switch(r.getGeometryType()){case o.enumPoint:t.addPoint2D(r.getXY());break;case o.enumLine:t.addPoint2D(r.getStartXY()),t.addPoint2D(r.getEndXY());break;case o.enumEnvelope:for(let e=0;e<4;++e){const n=new p;r.queryCorner(e,n),t.addPoint2D(n)}break;case o.enumMultiPoint:case o.enumPolyline:case o.enumPolygon:{const e=r.getImpl();for(let r=0,n=e.getPointCount();r<n;r++)t.addPoint2D(e.getXY(r));break}default:u("Geometry type not supported.")}}while(r=this.m_geometryCursor.next());return this.minimumBoundingCircle(e)}}const C=new h;function f(e){return C.execute(e,null)}function k(r,t){const n=C.executeMany(new e(r),t,null);return Array.from(n)}function P(){return C.supportsCurves()}export{f as execute,k as executeMany,P as supportsCurves};
2
+ import{S as e}from"../../../chunks/SimpleGeometryCursor.js";import{G as t}from"../../../chunks/GeometryCursor.js";import{d as r,p as n,c as s,G as o,i,a as u}from"../../../chunks/Geometry.js";import{m as c,k as m,P as a,l,M as g}from"../../../chunks/MultiPathImpl.js";import{m as d,P as p}from"../../../chunks/Point2D.js";class h{getOperatorType(){return 10113}supportsCurves(){return!1}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r){return new y(e,t,r)}execute(t,n){const s=new e([t]),o=this.executeMany(s,!1,n).next();return o||r("null output"),o}minimumBoundingCircle(e,t,r,n){return c(e,t,r)}}class y extends t{constructor(e,t,r){super(),this.m_geometryCursor=e,this.m_bMerge=t,this.m_progressTracker=r}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge)return this.mergedMinimumBoundingCircle();const e=this.m_geometryCursor.next();return e?this.minimumBoundingCircle(e):null}getGeometryID(){return this.m_geometryCursor.getGeometryID()}minimumBoundingCircle(e){if(n(e),s(e),this.m_progressTracker?.checkProgress(),e.isEmpty())return e.clone();const t=e.getGeometryType();if(t===o.enumPoint)return this.makeCircle([e.getXY()],1);if(t===o.enumLine){const t=e,r=[t.getStartXY(),t.getEndXY()];return this.makeCircle(r,2)}if(t===o.enumEnvelope){const t=e,r=d(p,2);return t.queryCorner(0,r[0]),t.queryCorner(2,r[1]),this.makeCircle(r,2)}if(i(t)){const t=e,r=[0,0,0],n=m(t,r),s=new Array(n);for(let e=0;e<n;++e)s[e]=t.getXY(r[e]);return this.makeCircle(s,n)}u("Geometry type not supported.")}makeCircle(e,t){const r=new a,n=new l;if(1===t)n.constructCircleRadius(0,e[0],!1);else if(2===t){const t=p.lerp(e[0],e[1],.5),r=p.distance(e[0],t),s=p.distance(e[1],t);n.constructCircleRadius(Math.max(r,s),t,!1)}else if(3===t){const t=p.calculateCircleCenterFromThreePoints(e[0],e[1],e[2]),r=p.distance(e[0],t),s=p.distance(e[1],t),o=p.distance(e[2],t);n.constructCircleRadius(Math.max(r,s,o),t,!1)}return r.addPathFromClosedSegment(n,!1),r}mergedMinimumBoundingCircle(){let e=null,t=this.m_geometryCursor.next();if(!t)return null;e=new g;const r=e.getImpl();do{n(t),s(t),this.m_progressTracker?.checkProgress();switch(t.getGeometryType()){case o.enumPoint:r.addPoint2D(t.getXY());break;case o.enumLine:r.addPoint2D(t.getStartXY()),r.addPoint2D(t.getEndXY());break;case o.enumEnvelope:for(let e=0;e<4;++e){const n=new p;t.queryCorner(e,n),r.addPoint2D(n)}break;case o.enumMultiPoint:case o.enumPolyline:case o.enumPolygon:{const e=t.getImpl();for(let t=0,n=e.getPointCount();t<n;t++)r.addPoint2D(e.getXY(t));break}default:u("Geometry type not supported.")}}while(t=this.m_geometryCursor.next());return this.minimumBoundingCircle(e)}}const C=new h;function f(e){return C.execute(e,null)}function k(t,r){const n=C.executeMany(new e(t),r,null);return Array.from(n)}function P(){return C.supportsCurves()}export{f as execute,k as executeMany,P as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{G as s}from"../../../chunks/GeometryCursor.js";import{q as e}from"../../../chunks/Envelope.js";import{p as i,r as n,G as o,k as h,A as r}from"../../../chunks/Geometry.js";import{e as m,P as a,x as f}from"../../../chunks/MultiPathImpl.js";import{P as c,x as _,w as u,i as P,ay as d}from"../../../chunks/Point2D.js";function l(t,s,e,o,h,r){if(null===t&&n(""),t.getDimension()<1&&n(""),h>0||n(""),i(t),0===s||t.isEmpty())return t;const m=new A(r);return m.m_bUseZ=t.hasAttribute(1),m.m_bUseM=t.hasAttribute(2),m.m_inputGeometry=t,m.m_distance=s,m.m_tolerance=h,m.m_joins=e,m.m_miterLimit=o>1?o:1,m.m_progressCounter=0,m.constructOffset()}const y=1.4142135623730951,x=.017453292519943295,p=256,b=512,M=1024;class g{static construct(t,s,e){const i=new g;return i.x=t.x,i.y=t.y,i.m_next=-1,i.m_prev=-1,i.z=s,i.m=e,i.type=0,i}clone(){const t=new g;return t.x=this.x,t.y=this.y,t.m_next=this.m_next,t.m_prev=this.m_prev,t.z=this.z,t.m=this.m,t.type=this.type,t}asPoint2D(){return new c(this.x,this.y)}}function C(){return{pt:new g,bAtExistingPt:!1}}class A{constructor(t){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=t}constructOffset(){const t=this.m_inputGeometry.getGeometryType();if(t===o.enumLine)return this.offsetLine();if(t===o.enumEnvelope)return this.offsetEnvelope();if(h(t)){const t=new m;return t.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=t,this.constructOffset()}if(t===o.enumPolyline){const t=new m;return this.offsetMultiPath(t),t}if(t===o.enumPolygon){const t=new a;return this.offsetMultiPath(t),t}r("")}offsetLine(){const t=this.m_inputGeometry,s=t.getStartXY(),e=t.getEndXY(),i=new c;i.setSub(e,s),i.normalize(),i.leftPerpendicularThis(),i.scale(this.m_distance),s.addThis(i),e.addThis(i);const n=t.clone();return n.setStartXY(s),n.setEndXY(e),n}offsetEnvelope(){const t=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const s=new a;return s.addEnvelope(t,!1),this.m_inputGeometry=s,this.constructOffset()}const s=t.clone();return s.inflateCoords(this.m_distance,this.m_distance),s}progress(){}static buildPoint(t,s,e,i){i.x=t.x+s*Math.cos(e),i.y=t.y+s*Math.sin(e),i.type=t.type,i.z=t.z,i.m=t.m,i.m_next=-1,i.m_prev=-1}addPoint(t){this.m_offsetPts.push(t.clone()),this.m_offsetPtCount++}addPointEx(t,s){if(0===this.m_offsetPtCount)return void this.addPoint(t);const e=this.m_srcPtCount,i=this.m_srcPts[0===s?e-1:s-1],n=this.m_srcPts[s],o=A.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(A.dotSign(i,n,n,this.m_offsetPts[this.m_offsetPtCount-1])>0){const n=new g;let o;o=0===s?e-2:1===s?e-1:s-2;const h=this.m_srcPts[o],r=Math.atan2(i.y-h.y,i.x-h.x);if(A.buildPoint(i,this.m_distance,r-_,n),this.m_offsetPts[this.m_offsetPtCount-1]=n.clone(),1===this.m_joins||2===this.m_joins){n.x=.5*(n.x+i.x),n.y=.5*(n.y+i.y),this.addPoint(n),A.buildPoint(i,this.m_distance,this.m_a1+_,n);const t=n.clone();t.x=.5*(t.x+i.x),t.y=.5*(t.y+i.y),t.type|=p,this.addPoint(t),this.addPoint(n)}else A.buildPoint(i,this.m_distance,this.m_a1+_,n),n.type|=p,this.addPoint(n);this.addPointEx(t,s)}else{const t=new g;if(A.buildPoint(n,this.m_distance,this.m_a1+_,t),this.addPoint(t),1===this.m_joins||2===this.m_joins){t.x=.5*(t.x+n.x),t.y=.5*(t.y+n.y),this.addPoint(t),A.buildPoint(n,this.m_distance,this.m_a2-_,t);const s=t.clone();s.x=.5*(s.x+n.x),s.y=.5*(s.y+n.y),s.type|=p,this.addPoint(s),this.addPoint(t)}else A.buildPoint(n,this.m_distance,this.m_a2-_,t),t.type|=p,this.addPoint(t)}}buildOffset(){const t=new g,s=this.m_srcPtCount;this.m_offsetPtCount=0;const e=.5*this.m_tolerance;let i=0,n=0;for(let o=0;o<s;o++){const h=this.m_srcPts[o],r=0===o?this.m_srcPts[s-1]:this.m_srcPts[o-1],m=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let a,f,P=0;{const t=r.x-h.x,s=r.y-h.y,e=m.x-h.x,_=m.y-h.y;a=Math.atan2(s,t),f=Math.atan2(_,e),this.m_a1=a,this.m_a2=f,0===o&&(i=a,n=f),P=c.orientationRobust(h.asPoint2D(),r.asPoint2D(),m.asPoint2D())}const d=f;if(f<a&&(f+=u),!(Math.abs(Math.abs(a-f)-Math.PI)<1e-8))if(P*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){A.buildPoint(h,this.m_distance,a+_,t),this.addPoint(t);const s=.001;t.x=h.x+(t.x-h.x)*s,t.y=h.y+(t.y-h.y)*s,this.addPoint(t),A.buildPoint(h,this.m_distance,f-_,t);const e=t.clone();e.x=h.x+(e.x-h.x)*s,e.y=h.y+(e.y-h.y)*s,e.type|=p,this.addPoint(e),this.addPoint(t)}else{const s=.5*(f-a),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));A.buildPoint(h,e,.5*(a+f),t),this.addPointEx(t,o)}else{if(h.type&b){const s=1-e/Math.abs(this.m_distance);let i=1,n=this.m_distance<0?-Math.PI:Math.PI;if(s>-1&&s<1){let t=2*Math.acos(s);t<x&&(t=x),i=Math.trunc(Math.PI/t+1.5),i>1&&(n/=i)}i<=1&&(i=2,n/=2);let r=a+_;A.buildPoint(h,this.m_distance,r,t),0===o&&(t.type|=M),this.addPointEx(t,o);const m=this.m_distance/Math.cos(n/2);for(r+=n/2,A.buildPoint(h,m,r,t),t.type|=M,this.addPoint(t);--i>0;)r+=n,A.buildPoint(h,m,r,t),t.type|=M,this.addPoint(t);A.buildPoint(h,this.m_distance,f-_,t),t.type|=M,this.addPoint(t);continue}if(1!==this.m_joins){if(0===this.m_joins){const s=1-e/Math.abs(this.m_distance);let i=1,n=f-_-(a+_);if(s>-1&&s<1){let t=2*Math.acos(s);t<x&&(t=x),i=Math.trunc(Math.abs(n)/t+1.5),i>1&&(n/=i)}const r=this.m_distance/Math.cos(.5*n);let m=a+_+.5*n;for(A.buildPoint(h,r,m,t),this.addPointEx(t,o);--i>0;)m+=n,A.buildPoint(h,r,m,t),this.addPoint(t);continue}if(2===this.m_joins){const s=r.x-h.x,e=r.y-h.y,i=m.x-h.x,n=m.y-h.y;let _=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(_=Math.max(_,-1),_>1-1e-8){A.buildPoint(h,y*this.m_distance,f-.25*Math.PI,t),this.addPointEx(t,o),A.buildPoint(h,y*this.m_distance,f+.25*Math.PI,t),this.addPoint(t);continue}const u=Math.abs(this.m_distance/Math.sin(.5*Math.acos(_))),P=Math.abs(this.m_miterLimit*this.m_distance);if(u>P){const s=.5*(f-a),e=this.m_distance/Math.abs(Math.sin(s));A.buildPoint(h,e,.5*(a+f),t);const i=c.construct(t.x,t.y),n=c.construct(h.x,h.y),r=new c;r.setSub(i,n);const m=new c;m.setScaleAdd(P/r.length(),r,n);const _=Math.sqrt(u*u-this.m_distance*this.m_distance),d=(u-P)*Math.abs(this.m_distance)/_;this.m_distance>0?r.rightPerpendicularThis():r.leftPerpendicularThis(),r.scale(d/r.length());const l=new c;l.setAdd(m,r);const y=new c;y.setSub(m,r),t.x=l.x,t.y=l.y,this.addPointEx(t,o),t.x=y.x,t.y=y.y,this.addPoint(t);continue}const d=.5*(f-a),l=this.m_distance/Math.abs(Math.sin(d));A.buildPoint(h,l,.5*(a+f),t),this.addPointEx(t,o);continue}{let s;if(f=d,this.m_distance>0?(f>a&&(f-=u),s=a-f<_):(f<a&&(f+=u),s=f-a<_),s){const s=this.m_distance*y;let e;e=s<0?a+.25*Math.PI:a+3*Math.PI*.25,A.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?f-.25*Math.PI:f-3*Math.PI*.25,A.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(f-a),e=this.m_distance/Math.abs(Math.sin(s));f<a&&(f+=u),A.buildPoint(h,e,(a+f)/2,t),this.addPointEx(t,o)}}}else A.buildPoint(h,this.m_distance,a+_,t),this.addPointEx(t,o),A.buildPoint(h,this.m_distance,f-_,t),this.addPoint(t)}}return this.m_a1=i,this.m_a2=n,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let t=!1;for(let e=0;e<this.m_offsetPtCount;e++){const t=this.m_offsetPts[e];t.m_next=e+1,t.m_prev=e-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let s=0;for(let e=0;e<this.m_offsetPtCount;e++)if(this.m_offsetPts[s].type&p){const e=this.deleteClosedSeg(s);if(-1===e){t=!0;break}s=e}else s=this.m_offsetPts[s].m_next;return!t&&(this.compressOffsetArray(s),!0)}deleteClosedSeg(t){const s=this.m_offsetPtCount-1;let e,i,n=t;for(let o=1;o<=s-2;o++){n=this.m_offsetPts[n].m_next,e=n,i=t;for(let t=1;t<=o;t++){if(i=this.m_offsetPts[i].m_prev,0===(this.m_offsetPts[i].type&p)&&0===(this.m_offsetPts[e].type&p)){const t=this.handleClosedIntersection(i,e);if(-1!==t)return t}e=this.m_offsetPts[e].m_prev}}return-1}handleClosedIntersection(t,s){const e=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t],n=this.m_offsetPts[this.m_offsetPts[s].m_prev],o=this.m_offsetPts[s];if(!this.sectGraphicRect(e,i,n,o))return-1;const h=C();if(((i.x-e.x)*(o.y-n.y)-(i.y-e.y)*(o.x-n.x))*this.m_distance<0){if(this.findIntersection(e,i,n,o,h)&&!h.bAtExistingPt){const r=1e-8,m=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),a=(i.x-e.x)/m,f=(i.y-e.y)/m,c=Math.sqrt((o.x-n.x)*(o.x-n.x)+(o.y-n.y)*(o.y-n.y)),_=(o.x-n.x)/c,u=(o.y-n.y)/c;let P=!1;const d=h.pt.clone();d.x+=(a+_)*r,d.y+=(f+u)*r;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>d.y!=l.y>d.y&&d.x<(l.x-y.x)*(d.y-y.y)/(l.y-y.y)+y.x&&(P=!P),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(P)return-1;const p=this.m_offsetPts[t].m_prev;return h.pt.type=i.type,h.pt.m_next=s,h.pt.m_prev=p,this.m_offsetPts[t]=h.pt,this.m_offsetPts[s].m_prev=t,s}}return-1}sectGraphicRect(t,s,e,i){return Math.max(t.x,s.x)>=Math.min(e.x,i.x)&&Math.max(e.x,i.x)>=Math.min(t.x,s.x)&&Math.max(t.y,s.y)>=Math.min(e.y,i.y)&&Math.max(e.y,i.y)>=Math.min(t.y,s.y)}findIntersection(t,s,e,i,n){let o,h,r,m;return n.bAtExistingPt=!1,o=(s.y-t.y)*(i.x-e.x)-(s.x-t.x)*(i.y-e.y),h=(e.y-t.y)*(s.x-t.x)-(e.x-t.x)*(s.y-t.y),r=0===o?2:h/o,r>=0&&r<=1&&(m=r,o=(i.y-e.y)*(s.x-t.x)-(i.x-e.x)*(s.y-t.y),h=(t.y-e.y)*(i.x-e.x)-(t.x-e.x)*(i.y-e.y),r=0===o?2:h/o,r>=0&&r<=1)&&(n.pt.x=t.x+r*(s.x-t.x),n.pt.y=t.y+r*(s.y-t.y),this.m_bUseZ&&(n.pt.z=e.z+m*(i.z-e.z)),this.m_bUseM&&(n.pt.m=e.m+m*(i.m-e.m)),0!==m&&1!==m||0!==r&&1!==r||(n.bAtExistingPt=!0),!((0===m||1===m)&&r>0&&r<1||(0===r||1===r)&&m>0&&m<1))}compressOffsetArray(t){for(;this.m_offsetPts[t].m_prev<t;)t=this.m_offsetPts[t].m_prev;let s=0,e=t;do{const t=this.m_offsetPts[e].clone();this.m_offsetPts[s]=t,e=t.m_next,s++}while(e!==t);this.m_offsetPts[s]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=s+1}addPart(t,s){if(!(s<2))for(let e=0;e<s;e++){const s=this.m_offsetPts[t+e];if(e?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(s.x,s.y,s.z):this.m_resultPath.lineToCoords(s.x,s.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(s.x,s.y,s.z):this.m_resultPath.startPathCoords(s.x,s.y),this.m_bUseM){const t=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,t,0,s.m)}}}offsetMultiPath(t){const s=f(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),e=s.querySegmentIterator();e.resetToFirstPath();let i=-1;for(;e.nextPath();)i++,this.offsetPath(s,i,t)}offsetPath(t,s,e){let i=t.getPathStart(s),n=t.getPathEnd(s);if(this.m_resultPath=e,t.isClosedPath(s)){const s=t.getXY(i);for(;n>i&&t.getXY(n-1).equals(s);)n--;if(n-i>=2){this.m_srcPtCount=n-i,this.m_srcPts.length=this.m_srcPtCount;for(let s=i;s<n;s++)this.progress(),this.m_srcPts[s-i]=g.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const s=t.getXY(i);for(;i<n-1&&t.getXY(i+1).equals(s);)i++;const e=t.getXY(n-1);for(;i<n-1&&t.getXY(n-2).equals(e);)n--;if(n-i>=2){this.m_srcPtCount=2*(n-i)-2,this.m_srcPts.length=this.m_srcPtCount;let e=g.construct(s,this.m_bUseZ?t.getAttributeAsDbl(1,i,0):0,this.m_bUseM?t.getAttributeAsDbl(2,i,0):0);e.type|=b+M,this.m_srcPts[0]=e;let o=1,h=this.m_srcPtCount-1;for(let s=i+1;s<n-1;s++,o++,h--)this.progress(),e=g.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0),this.m_srcPts[o]=e.clone(),e.type|=M,this.m_srcPts[h]=e.clone();if(e=g.construct(t.getXY(n-1),this.m_bUseZ?t.getAttributeAsDbl(1,n-1,0):0,this.m_bUseM?t.getAttributeAsDbl(2,n-1,0):0),e.type|=b,this.m_srcPts[o]=e.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let t=-1,s=-1,e=0!==(this.m_offsetPts[this.m_offsetPtCount-1].type&M);e||(t=0);for(let i=1;i<this.m_offsetPtCount;i++){this.progress();const n=0!==(this.m_offsetPts[i].type&M);n?e||(s=i-1,s-t+1>1&&this.addPart(t,s-t+1)):e&&(t=i-1),e=n}e||(s=this.m_offsetPtCount-1,s-t+1>1&&this.addPart(t,s-t+1))}else{const t=0,s=this.m_offsetPtCount-1;s-t>=1&&this.addPart(t,s-t+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(t,s,e,i){const n=s.x-t.x,o=s.y-t.y,h=i.x-e.x,r=i.y-e.y,m=P(n,o,h,r);return d(m)}}class E{getOperatorType(){return 10108}accelerateGeometry(t,s,e){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,s,e,i,n,o,h){return new v(t,s,e,i,n,o,h)}execute(t,s,e,i,n,o,h){return new v(null,s,e,i,n,o,h).offset(t)}}class v extends s{constructor(t,s,e,i,n,o,h){super(),this.m_progressTracker=h,this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=s,this.m_distance=e,this.m_joins=i,this.m_miterLimit=n,this.m_flattenError=o}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let t;for(;t=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(t);return null}getGeometryID(){return this.m_index}offset(t){let s;return i(t),s=this.m_flattenError<=0?e(this.m_spatialReference,t,!0).total():this.m_flattenError,l(t,this.m_distance,this.m_joins,this.m_miterLimit,s,this.m_progressTracker)}}const G=new E;function w(t,s,e,i,n,o){return G.execute(t,s,e,i,n,o,null)}function j(s,e,i,n,o,h){const r=G.executeMany(new t(s),e,i,n,o,h,null);return Array.from(r)}function D(){return G.supportsCurves()}export{w as execute,j as executeMany,D as supportsCurves};
2
+ import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{G as s}from"../../../chunks/GeometryCursor.js";import{e}from"../../../chunks/Envelope.js";import{c as i,a as n,G as o,h,t as r}from"../../../chunks/Geometry.js";import{a as m,P as a,d as f}from"../../../chunks/MultiPathImpl.js";import{P as c,k as _,l as u,q as P,e as d}from"../../../chunks/Point2D.js";function l(t,s,e,o,h,r){if(null===t&&n(""),t.getDimension()<1&&n(""),h>0||n(""),i(t),0===s||t.isEmpty())return t;const m=new A(r);return m.m_bUseZ=t.hasAttribute(1),m.m_bUseM=t.hasAttribute(2),m.m_inputGeometry=t,m.m_distance=s,m.m_tolerance=h,m.m_joins=e,m.m_miterLimit=o>1?o:1,m.m_progressCounter=0,m.constructOffset()}const y=1.4142135623730951,x=.017453292519943295,p=256,b=512,M=1024;class g{static construct(t,s,e){const i=new g;return i.x=t.x,i.y=t.y,i.m_next=-1,i.m_prev=-1,i.z=s,i.m=e,i.type=0,i}clone(){const t=new g;return t.x=this.x,t.y=this.y,t.m_next=this.m_next,t.m_prev=this.m_prev,t.z=this.z,t.m=this.m,t.type=this.type,t}asPoint2D(){return new c(this.x,this.y)}}function C(){return{pt:new g,bAtExistingPt:!1}}class A{constructor(t){this.m_distance=-1,this.m_tolerance=-1,this.m_miterLimit=10,this.m_joins=0,this.m_progressCounter=0,this.m_bUseZ=!1,this.m_bUseM=!1,this.m_srcPts=[],this.m_srcPtCount=0,this.m_offsetPts=[],this.m_offsetPtCount=0,this.m_a1=0,this.m_a2=0,this.m_progressTracker=t}constructOffset(){const t=this.m_inputGeometry.getGeometryType();if(t===o.enumLine)return this.offsetLine();if(t===o.enumEnvelope)return this.offsetEnvelope();if(h(t)){const t=new m;return t.addSegment(this.m_inputGeometry,!0),this.m_inputGeometry=t,this.constructOffset()}if(t===o.enumPolyline){const t=new m;return this.offsetMultiPath(t),t}if(t===o.enumPolygon){const t=new a;return this.offsetMultiPath(t),t}r("")}offsetLine(){const t=this.m_inputGeometry,s=t.getStartXY(),e=t.getEndXY(),i=new c;i.setSub(e,s),i.normalize(),i.leftPerpendicularThis(),i.scale(this.m_distance),s.addThis(i),e.addThis(i);const n=t.clone();return n.setStartXY(s),n.setEndXY(e),n}offsetEnvelope(){const t=this.m_inputGeometry;if(this.m_distance>0&&2!==this.m_joins){const s=new a;return s.addEnvelope(t,!1),this.m_inputGeometry=s,this.constructOffset()}const s=t.clone();return s.inflateCoords(this.m_distance,this.m_distance),s}progress(){}static buildPoint(t,s,e,i){i.x=t.x+s*Math.cos(e),i.y=t.y+s*Math.sin(e),i.type=t.type,i.z=t.z,i.m=t.m,i.m_next=-1,i.m_prev=-1}addPoint(t){this.m_offsetPts.push(t.clone()),this.m_offsetPtCount++}addPointEx(t,s){if(0===this.m_offsetPtCount)return void this.addPoint(t);const e=this.m_srcPtCount,i=this.m_srcPts[0===s?e-1:s-1],n=this.m_srcPts[s],o=A.dotSign(i,n,this.m_offsetPts[this.m_offsetPtCount-1],t);if(o>0)this.addPoint(t);else if(o<0)if(A.dotSign(i,n,n,this.m_offsetPts[this.m_offsetPtCount-1])>0){const n=new g;let o;o=0===s?e-2:1===s?e-1:s-2;const h=this.m_srcPts[o],r=Math.atan2(i.y-h.y,i.x-h.x);if(A.buildPoint(i,this.m_distance,r-_,n),this.m_offsetPts[this.m_offsetPtCount-1]=n.clone(),1===this.m_joins||2===this.m_joins){n.x=.5*(n.x+i.x),n.y=.5*(n.y+i.y),this.addPoint(n),A.buildPoint(i,this.m_distance,this.m_a1+_,n);const t=n.clone();t.x=.5*(t.x+i.x),t.y=.5*(t.y+i.y),t.type|=p,this.addPoint(t),this.addPoint(n)}else A.buildPoint(i,this.m_distance,this.m_a1+_,n),n.type|=p,this.addPoint(n);this.addPointEx(t,s)}else{const t=new g;if(A.buildPoint(n,this.m_distance,this.m_a1+_,t),this.addPoint(t),1===this.m_joins||2===this.m_joins){t.x=.5*(t.x+n.x),t.y=.5*(t.y+n.y),this.addPoint(t),A.buildPoint(n,this.m_distance,this.m_a2-_,t);const s=t.clone();s.x=.5*(s.x+n.x),s.y=.5*(s.y+n.y),s.type|=p,this.addPoint(s),this.addPoint(t)}else A.buildPoint(n,this.m_distance,this.m_a2-_,t),t.type|=p,this.addPoint(t)}}buildOffset(){const t=new g,s=this.m_srcPtCount;this.m_offsetPtCount=0;const e=.5*this.m_tolerance;let i=0,n=0;for(let o=0;o<s;o++){const h=this.m_srcPts[o],r=0===o?this.m_srcPts[s-1]:this.m_srcPts[o-1],m=o===s-1?this.m_srcPts[0]:this.m_srcPts[o+1];let a,f,P=0;{const t=r.x-h.x,s=r.y-h.y,e=m.x-h.x,_=m.y-h.y;a=Math.atan2(s,t),f=Math.atan2(_,e),this.m_a1=a,this.m_a2=f,0===o&&(i=a,n=f),P=c.orientationRobust(h.asPoint2D(),r.asPoint2D(),m.asPoint2D())}const d=f;if(f<a&&(f+=u),!(Math.abs(Math.abs(a-f)-Math.PI)<1e-8))if(P*this.m_distance>0)if(1===this.m_joins||2===this.m_joins){A.buildPoint(h,this.m_distance,a+_,t),this.addPoint(t);const s=.001;t.x=h.x+(t.x-h.x)*s,t.y=h.y+(t.y-h.y)*s,this.addPoint(t),A.buildPoint(h,this.m_distance,f-_,t);const e=t.clone();e.x=h.x+(e.x-h.x)*s,e.y=h.y+(e.y-h.y)*s,e.type|=p,this.addPoint(e),this.addPoint(t)}else{const s=.5*(f-a),e=0===s?this.m_distance:this.m_distance/Math.abs(Math.sin(s));A.buildPoint(h,e,.5*(a+f),t),this.addPointEx(t,o)}else{if(h.type&b){const s=1-e/Math.abs(this.m_distance);let i=1,n=this.m_distance<0?-Math.PI:Math.PI;if(s>-1&&s<1){let t=2*Math.acos(s);t<x&&(t=x),i=Math.trunc(Math.PI/t+1.5),i>1&&(n/=i)}i<=1&&(i=2,n/=2);let r=a+_;A.buildPoint(h,this.m_distance,r,t),0===o&&(t.type|=M),this.addPointEx(t,o);const m=this.m_distance/Math.cos(n/2);for(r+=n/2,A.buildPoint(h,m,r,t),t.type|=M,this.addPoint(t);--i>0;)r+=n,A.buildPoint(h,m,r,t),t.type|=M,this.addPoint(t);A.buildPoint(h,this.m_distance,f-_,t),t.type|=M,this.addPoint(t);continue}if(1!==this.m_joins){if(0===this.m_joins){const s=1-e/Math.abs(this.m_distance);let i=1,n=f-_-(a+_);if(s>-1&&s<1){let t=2*Math.acos(s);t<x&&(t=x),i=Math.trunc(Math.abs(n)/t+1.5),i>1&&(n/=i)}const r=this.m_distance/Math.cos(.5*n);let m=a+_+.5*n;for(A.buildPoint(h,r,m,t),this.addPointEx(t,o);--i>0;)m+=n,A.buildPoint(h,r,m,t),this.addPoint(t);continue}if(2===this.m_joins){const s=r.x-h.x,e=r.y-h.y,i=m.x-h.x,n=m.y-h.y;let _=(s*i+e*n)/Math.sqrt(s*s+e*e)/Math.sqrt(i*i+n*n);if(_=Math.max(_,-1),_>1-1e-8){A.buildPoint(h,y*this.m_distance,f-.25*Math.PI,t),this.addPointEx(t,o),A.buildPoint(h,y*this.m_distance,f+.25*Math.PI,t),this.addPoint(t);continue}const u=Math.abs(this.m_distance/Math.sin(.5*Math.acos(_))),P=Math.abs(this.m_miterLimit*this.m_distance);if(u>P){const s=.5*(f-a),e=this.m_distance/Math.abs(Math.sin(s));A.buildPoint(h,e,.5*(a+f),t);const i=c.construct(t.x,t.y),n=c.construct(h.x,h.y),r=new c;r.setSub(i,n);const m=new c;m.setScaleAdd(P/r.length(),r,n);const _=Math.sqrt(u*u-this.m_distance*this.m_distance),d=(u-P)*Math.abs(this.m_distance)/_;this.m_distance>0?r.rightPerpendicularThis():r.leftPerpendicularThis(),r.scale(d/r.length());const l=new c;l.setAdd(m,r);const y=new c;y.setSub(m,r),t.x=l.x,t.y=l.y,this.addPointEx(t,o),t.x=y.x,t.y=y.y,this.addPoint(t);continue}const d=.5*(f-a),l=this.m_distance/Math.abs(Math.sin(d));A.buildPoint(h,l,.5*(a+f),t),this.addPointEx(t,o);continue}{let s;if(f=d,this.m_distance>0?(f>a&&(f-=u),s=a-f<_):(f<a&&(f+=u),s=f-a<_),s){const s=this.m_distance*y;let e;e=s<0?a+.25*Math.PI:a+3*Math.PI*.25,A.buildPoint(h,s,e,t),this.addPointEx(t,o),e=s<0?f-.25*Math.PI:f-3*Math.PI*.25,A.buildPoint(h,s,e,t),this.addPoint(t)}else{const s=.5*(f-a),e=this.m_distance/Math.abs(Math.sin(s));f<a&&(f+=u),A.buildPoint(h,e,(a+f)/2,t),this.addPointEx(t,o)}}}else A.buildPoint(h,this.m_distance,a+_,t),this.addPointEx(t,o),A.buildPoint(h,this.m_distance,f-_,t),this.addPoint(t)}}return this.m_a1=i,this.m_a2=n,this.addPointEx(this.m_offsetPts[0],0),this.m_offsetPts[0]=this.m_offsetPts[this.m_offsetPtCount-1].clone(),this.removeBadSegsFast()}removeBadSegsFast(){let t=!1;for(let e=0;e<this.m_offsetPtCount;e++){const t=this.m_offsetPts[e];t.m_next=e+1,t.m_prev=e-1}this.m_offsetPts[0].m_prev=this.m_offsetPtCount-2,this.m_offsetPts[this.m_offsetPtCount-2].m_next=0;let s=0;for(let e=0;e<this.m_offsetPtCount;e++)if(this.m_offsetPts[s].type&p){const e=this.deleteClosedSeg(s);if(-1===e){t=!0;break}s=e}else s=this.m_offsetPts[s].m_next;return!t&&(this.compressOffsetArray(s),!0)}deleteClosedSeg(t){const s=this.m_offsetPtCount-1;let e,i,n=t;for(let o=1;o<=s-2;o++){n=this.m_offsetPts[n].m_next,e=n,i=t;for(let t=1;t<=o;t++){if(i=this.m_offsetPts[i].m_prev,0===(this.m_offsetPts[i].type&p)&&0===(this.m_offsetPts[e].type&p)){const t=this.handleClosedIntersection(i,e);if(-1!==t)return t}e=this.m_offsetPts[e].m_prev}}return-1}handleClosedIntersection(t,s){const e=this.m_offsetPts[this.m_offsetPts[t].m_prev],i=this.m_offsetPts[t],n=this.m_offsetPts[this.m_offsetPts[s].m_prev],o=this.m_offsetPts[s];if(!this.sectGraphicRect(e,i,n,o))return-1;const h=C();if(((i.x-e.x)*(o.y-n.y)-(i.y-e.y)*(o.x-n.x))*this.m_distance<0){if(this.findIntersection(e,i,n,o,h)&&!h.bAtExistingPt){const r=1e-8,m=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),a=(i.x-e.x)/m,f=(i.y-e.y)/m,c=Math.sqrt((o.x-n.x)*(o.x-n.x)+(o.y-n.y)*(o.y-n.y)),_=(o.x-n.x)/c,u=(o.y-n.y)/c;let P=!1;const d=h.pt.clone();d.x+=(a+_)*r,d.y+=(f+u)*r;let l=n,y=h.pt,x=this.m_offsetPts[t].m_prev;for(;y.y>d.y!=l.y>d.y&&d.x<(l.x-y.x)*(d.y-y.y)/(l.y-y.y)+y.x&&(P=!P),l=y,x=this.m_offsetPts[x].m_next,x!==s;)y=this.m_offsetPts[x];if(P)return-1;const p=this.m_offsetPts[t].m_prev;return h.pt.type=i.type,h.pt.m_next=s,h.pt.m_prev=p,this.m_offsetPts[t]=h.pt,this.m_offsetPts[s].m_prev=t,s}}return-1}sectGraphicRect(t,s,e,i){return Math.max(t.x,s.x)>=Math.min(e.x,i.x)&&Math.max(e.x,i.x)>=Math.min(t.x,s.x)&&Math.max(t.y,s.y)>=Math.min(e.y,i.y)&&Math.max(e.y,i.y)>=Math.min(t.y,s.y)}findIntersection(t,s,e,i,n){let o,h,r,m;return n.bAtExistingPt=!1,o=(s.y-t.y)*(i.x-e.x)-(s.x-t.x)*(i.y-e.y),h=(e.y-t.y)*(s.x-t.x)-(e.x-t.x)*(s.y-t.y),r=0===o?2:h/o,r>=0&&r<=1&&(m=r,o=(i.y-e.y)*(s.x-t.x)-(i.x-e.x)*(s.y-t.y),h=(t.y-e.y)*(i.x-e.x)-(t.x-e.x)*(i.y-e.y),r=0===o?2:h/o,r>=0&&r<=1)&&(n.pt.x=t.x+r*(s.x-t.x),n.pt.y=t.y+r*(s.y-t.y),this.m_bUseZ&&(n.pt.z=e.z+m*(i.z-e.z)),this.m_bUseM&&(n.pt.m=e.m+m*(i.m-e.m)),0!==m&&1!==m||0!==r&&1!==r||(n.bAtExistingPt=!0),!((0===m||1===m)&&r>0&&r<1||(0===r||1===r)&&m>0&&m<1))}compressOffsetArray(t){for(;this.m_offsetPts[t].m_prev<t;)t=this.m_offsetPts[t].m_prev;let s=0,e=t;do{const t=this.m_offsetPts[e].clone();this.m_offsetPts[s]=t,e=t.m_next,s++}while(e!==t);this.m_offsetPts[s]=this.m_offsetPts[0].clone(),this.m_offsetPtCount=s+1}addPart(t,s){if(!(s<2))for(let e=0;e<s;e++){const s=this.m_offsetPts[t+e];if(e?this.m_bUseZ?this.m_resultPath.lineTo3DCoords(s.x,s.y,s.z):this.m_resultPath.lineToCoords(s.x,s.y):this.m_bUseZ?this.m_resultPath.startPath3DCoords(s.x,s.y,s.z):this.m_resultPath.startPathCoords(s.x,s.y),this.m_bUseM){const t=this.m_resultPath.getPointCount()-1;this.m_resultPath.setAttribute(2,t,0,s.m)}}}offsetMultiPath(t){const s=f(this.m_inputGeometry,0,this.m_tolerance,0,this.m_progressTracker,12e3),e=s.querySegmentIterator();e.resetToFirstPath();let i=-1;for(;e.nextPath();)i++,this.offsetPath(s,i,t)}offsetPath(t,s,e){let i=t.getPathStart(s),n=t.getPathEnd(s);if(this.m_resultPath=e,t.isClosedPath(s)){const s=t.getXY(i);for(;n>i&&t.getXY(n-1).equals(s);)n--;if(n-i>=2){this.m_srcPtCount=n-i,this.m_srcPts.length=this.m_srcPtCount;for(let s=i;s<n;s++)this.progress(),this.m_srcPts[s-i]=g.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0);this.buildOffset()&&this.addPart(0,this.m_offsetPtCount-1)}}else{const s=t.getXY(i);for(;i<n-1&&t.getXY(i+1).equals(s);)i++;const e=t.getXY(n-1);for(;i<n-1&&t.getXY(n-2).equals(e);)n--;if(n-i>=2){this.m_srcPtCount=2*(n-i)-2,this.m_srcPts.length=this.m_srcPtCount;let e=g.construct(s,this.m_bUseZ?t.getAttributeAsDbl(1,i,0):0,this.m_bUseM?t.getAttributeAsDbl(2,i,0):0);e.type|=b+M,this.m_srcPts[0]=e;let o=1,h=this.m_srcPtCount-1;for(let s=i+1;s<n-1;s++,o++,h--)this.progress(),e=g.construct(t.getXY(s),this.m_bUseZ?t.getAttributeAsDbl(1,s,0):0,this.m_bUseM?t.getAttributeAsDbl(2,s,0):0),this.m_srcPts[o]=e.clone(),e.type|=M,this.m_srcPts[h]=e.clone();if(e=g.construct(t.getXY(n-1),this.m_bUseZ?t.getAttributeAsDbl(1,n-1,0):0,this.m_bUseM?t.getAttributeAsDbl(2,n-1,0):0),e.type|=b,this.m_srcPts[o]=e.clone(),this.buildOffset())if(this.m_offsetPts.length>=2){let t=-1,s=-1,e=0!==(this.m_offsetPts[this.m_offsetPtCount-1].type&M);e||(t=0);for(let i=1;i<this.m_offsetPtCount;i++){this.progress();const n=0!==(this.m_offsetPts[i].type&M);n?e||(s=i-1,s-t+1>1&&this.addPart(t,s-t+1)):e&&(t=i-1),e=n}e||(s=this.m_offsetPtCount-1,s-t+1>1&&this.addPart(t,s-t+1))}else{const t=0,s=this.m_offsetPtCount-1;s-t>=1&&this.addPart(t,s-t+1)}}}this.m_srcPts.length=0,this.m_srcPtCount=0,this.m_offsetPts.length=0,this.m_offsetPtCount=0}static dotSign(t,s,e,i){const n=s.x-t.x,o=s.y-t.y,h=i.x-e.x,r=i.y-e.y,m=P(n,o,h,r);return d(m)}}class E{getOperatorType(){return 10108}accelerateGeometry(t,s,e){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,s,e,i,n,o,h){return new v(t,s,e,i,n,o,h)}execute(t,s,e,i,n,o,h){return new v(null,s,e,i,n,o,h).offset(t)}}class v extends s{constructor(t,s,e,i,n,o,h){super(),this.m_progressTracker=h,this.m_index=-1,this.m_inputGeoms=t,this.m_spatialReference=s,this.m_distance=e,this.m_joins=i,this.m_miterLimit=n,this.m_flattenError=o}tock(){return!0}getRank(){return 1}next(){if(!this.m_inputGeoms)return null;let t;for(;t=this.m_inputGeoms.next();)return this.m_index=this.m_inputGeoms.getGeometryID(),this.offset(t);return null}getGeometryID(){return this.m_index}offset(t){let s;return i(t),s=this.m_flattenError<=0?e(this.m_spatialReference,t,!0).total():this.m_flattenError,l(t,this.m_distance,this.m_joins,this.m_miterLimit,s,this.m_progressTracker)}}const G=new E;function w(t,s,e,i,n,o){return G.execute(t,s,e,i,n,o,null)}function j(s,e,i,n,o,h){const r=G.executeMany(new t(s),e,i,n,o,h,null);return Array.from(r)}function D(){return G.supportsCurves()}export{w as execute,j as executeMany,D as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r as e,p as s,G as i,g as r}from"../../../chunks/Geometry.js";import{O as h}from"../../../chunks/GeometryCursor.js";import{Envelope2D as o}from"../../../chunks/Envelope2D.js";import{p as n}from"../../../chunks/Envelope.js";import{b as a,w as m,$ as p}from"../../../chunks/MultiPathImpl.js";import{a as _,a2 as c,aL as u,a7 as l,v as g,ap as d,a4 as G,a5 as C,T as y,I,U as f}from"../../../chunks/SpatialReference.js";import{ak as x}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class S{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new v(t,e,s,i)}}class v extends h{constructor(t,s,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||e(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&e("options"),this.m_inputGeometryCursor=t,this.m_sr=s}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new o;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let n=this.m_inputGeometryCursor.next();null!==n;n=this.m_inputGeometryCursor.next()){s(n);const r=this.m_shape.addGeometry(n);n.getGeometryType()!==i.enumPolygon&&e("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(r,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(r,h);const a=new o;n.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const r=n(this.m_sr,t,!0),h=n(this.m_sr,t,!1);t.inflate(10*r.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let f=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const e=c(r.total(),t);this.m_stitchMaxDeviation=u(r.total()),f=l(e,this.m_stitchMaxDeviation),g(this.m_shape,e,r.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,r.add(f),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===i.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const x=this.m_topoGraph.getFirstChain();for(let e=this.m_topoGraph.getChainFirstIsland(x);e!==p;e=this.m_topoGraph.getChainNextInParent(e))for(let t=this.m_topoGraph.getChainFirstIsland(e);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));x(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);r(i);const h=this.m_bitsetToChains.get(e);let o=p;for(let r=this.m_chainsLists.getFirst(h);r!==I.st_nullNode();r=this.m_chainsLists.getNext(r)){const t=this.m_chainsLists.getElement(r);o=this.m_topoGraph.extractPolygonFromChainAndIslands(s,o,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,o,this.m_stitchMaxDeviation,!1),s.getGeometry(o)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==f.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new S;function P(e,s,i){return F.executeMany(new t(e),s,i,null)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
2
+ import{S as t}from"../../../chunks/SimpleGeometryCursor.js";import{a as e,c as s,G as i,g as r}from"../../../chunks/Geometry.js";import{O as h}from"../../../chunks/GeometryCursor.js";import{Envelope2D as o}from"../../../chunks/Envelope2D.js";import{c as n}from"../../../chunks/Envelope.js";import{E as a,o as m,n as p}from"../../../chunks/MultiPathImpl.js";import{C as _,k as c,l as u,r as l,n as g,o as d,p as G,j as C,aA as y,aB as I,aC as f}from"../../../chunks/SpatialReference.js";import{v as x}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class S{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new v(t,e,s,i)}}class v extends h{constructor(t,s,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||e(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&e("options"),this.m_inputGeometryCursor=t,this.m_sr=s}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new o;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let n=this.m_inputGeometryCursor.next();null!==n;n=this.m_inputGeometryCursor.next()){s(n);const r=this.m_shape.addGeometry(n);n.getGeometryType()!==i.enumPolygon&&e("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(r,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(r,h);const a=new o;n.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const r=n(this.m_sr,t,!0),h=n(this.m_sr,t,!1);t.inflate(10*r.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let f=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const e=c(r.total(),t);this.m_stitchMaxDeviation=u(r.total()),f=l(e,this.m_stitchMaxDeviation),g(this.m_shape,e,r.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,r.add(f),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===i.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const x=this.m_topoGraph.getFirstChain();for(let e=this.m_topoGraph.getChainFirstIsland(x);e!==p;e=this.m_topoGraph.getChainNextInParent(e))for(let t=this.m_topoGraph.getChainFirstIsland(e);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));x(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);r(i);const h=this.m_bitsetToChains.get(e);let o=p;for(let r=this.m_chainsLists.getFirst(h);r!==I.st_nullNode();r=this.m_chainsLists.getNext(r)){const t=this.m_chainsLists.getElement(r);o=this.m_topoGraph.extractPolygonFromChainAndIslands(s,o,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,o,this.m_stitchMaxDeviation,!1),s.getGeometry(o)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==f.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new S;function P(e,s,i){return F.executeMany(new t(e),s,i,null)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{G as t}from"../../../chunks/GeometryCursor.js";import{r as e,g as s}from"../../../chunks/Geometry.js";import{S as r}from"../../../chunks/SimpleGeometryCursor.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{T as i}from"../../../chunks/Transformation2D.js";import{a3 as o,a2 as a,a8 as u,y as l,e as h,F as m,b as c,$ as p,P as _,B as g}from"../../../chunks/MultiPathImpl.js";import{K as f,ab as y,a as d,aa as x,P as T,aG as A,Z as E}from"../../../chunks/Point2D.js";import{P as v,q as N}from"../../../chunks/Envelope.js";import{O as S}from"../../../chunks/OperatorClip.js";import{O as w}from"../../../chunks/OperatorMultiPartToSinglePart.js";import{O as C}from"../../../chunks/OperatorCut.js";function k(t,e,s,r,n){return new j(n).findSlicesByArea(t,e,s,r)}function X(t,e,s,r,n){return new j(n).sliceIntoStrips(t,e,s,r)}function P(t,e,s,r){return new j(r).recursiveSliceEqualArea(t,e,s)}function b(t){this.currentX=this.calcX(t)}function H(t){if(null===this.curve){const e=(t-this.y0)/(this.y1-this.y0);return E(this.x0,this.x1,e)}return this.curve.intersectionOfYMonotonicWithAxisX(t,this.x0)}function Y(){return{x0:Number.NaN,y0:Number.NaN,x1:Number.NaN,y1:Number.NaN,currentX:Number.NaN,nextAET:null,prevAET:null,startNodeNext:null,nextInChain:null,curve:null,advance:b,calcX:H}}function I(t,e){const s=Y();return s.x0=t.getStartX(),s.y0=t.getStartY(),s.x1=t.getEndX(),s.y1=t.getEndY(),e&&(s.y0=A(s.x0,s.x0=s.y0),s.y1=A(s.x1,s.x1=s.y1)),s.y1<s.y0&&(s.y1=A(s.y0,s.y0=s.y1),s.x1=A(s.x0,s.x0=s.x1)),s.currentX=Number.NaN,s.nextAET=null,s.prevAET=null,s.startNodeNext=null,s.nextInChain=null,s.curve=null,s}function O(t){const e=Y();return e.x0=t.getStartX(),e.y0=t.getStartY(),e.x1=t.getEndX(),e.y1=t.getEndY(),e.curve=t,e.y1<e.y0&&(e.y1=A(e.y0,e.y0=e.y1),e.x1=A(e.x0,e.x0=e.x1)),e.currentX=Number.NaN,e.nextAET=null,e.prevAET=null,e.startNodeNext=null,e.nextInChain=null,e}function q(t){if(this.x===t.x&&this.y===t.y){const e=null!==this.endEdge,s=null!==t.startEdge;return e&&s?-1:1}return this.y!==t.y?this.y-t.y:this.x-t.x}function R(){return{x:Number.NaN,y:Number.NaN,startEdge:null,endEdge:null,compare:q}}function D(t,e){return{y:t,startingEdges:e}}class M{constructor(t,e,s,r,n,i){this.m_parent=t,this.m_y0=e,this.m_y1=s,this.m_t0=r,this.m_area=i}getMaxDerivative(){return 1}getValue(t,e){return 1===t?0:this.getArea(e)-this.m_area}getError(t){return s(0),0}getArea(t){const e=.5*(this.m_parent.m_sumBase-this.m_parent.m_sumA),s=this.m_y1-this.m_y0;let r=(this.m_parent.m_sumBase-e*(t+this.m_t0))*s*(t-this.m_t0),n=!1;for(let i=this.m_parent.m_AETHead;null!==i;i=i.nextAET)if(n=!n,n&&(null!==i.curve||null!==i.nextAET.curve)){const e=this.m_y0+s*this.m_t0,n=this.m_y0+s*t;i.curve&&(r+=V(i.curve,this.m_y0+s*this.m_t0,this.m_y0+s*t)),i.nextAET.curve&&(r-=V(i.nextAET.curve,this.m_y0+s*this.m_t0,this.m_y0+s*t));r+=(n-e)*(i.nextAET.calcX(e)-i.calcX(e)+(i.nextAET.calcX(n)-i.calcX(n)))*.5}return r}}function B(t,e,s){return{polygon:t,from:e,to:s}}function V(t,e,r){const n=[0,0],i=t.intersectionWithAxis2D(!0,e,null,n);s(1===i);const o=n[0],a=t.intersectionWithAxis2D(!0,r,null,n);s(1===a);const u=n[0],l=x(T,4);g(t,l,!0);const h=l[3],m=l[2],c=l[1],p=t.getCoordX(o)-t.getStartX(),_=t.getCoordY(o)-t.getStartY(),f=t=>{const e=t*t;return e*t*(10*(m.x*c.y-m.y*c.x)-15*t*(h.y*c.x-h.x*c.y)+6*e*(m.y*h.x-h.y*m.x))/60},y=t=>(-t*(c.y+t*(m.y+h.y*t))*p+t*(c.x+t*(m.x+h.x*t))*_)/2;return f(u)-f(o)-(y(u)-y(o))}class G extends t{constructor(t){super(),this.m_geoms=[],this.m_index=-1,this.m_id=-1,this.m_geoms=t}tock(){return!0}getRank(){return 1}next(){return this.m_index++,this.m_index>=this.m_geoms.length?null:(this.m_id=this.m_geoms[this.m_index].second,this.m_geoms[this.m_index].first)}getGeometryID(){return this.m_id}}class j{constructor(t){this.m_edges=[],this.m_curves=[],this.m_sortedNodes=[],this.m_sortHelper=[],this.m_cuts=[],this.m_cutAreas=[],this.m_totalAreaOfTraps=new f(0),this.m_areaTracking=0,this.m_splitArea=0,this.m_sumBase=0,this.m_sumA=0,this.m_numberOfCuts=0,this.m_currentScan=0,this.m_progressCounter=0,this.m_AETHead=null,this.m_bHorizontalSweep=!1,this.m_bPolygonHasCurves=!1,this.m_progressTracker=t}findSlicesByArea(t,s,r,n){n<0&&e("remainingArea");let i=t,a=null;i.hasNonLinearSegments()&&(this.m_bPolygonHasCurves=!0,a=o(t,1e-16,!0),z(a),i=a);const u=Math.abs(i.calculateArea2D());return 0===u||0===r||n>=u||1===r&&0===n?[]:(this.m_splitArea=(u-n)/r,this.m_numberOfCuts=r-1,n>0&&this.m_numberOfCuts++,this.m_edges.length=0,this.m_sortedNodes.length=0,this.m_cuts.length=0,this.m_areaTracking=0,this.m_totalAreaOfTraps.reset(),this.m_curves.length=0,this.buildEdges(i),this.buildScanNodes(),this.trapezoidation(),this.m_cuts)}sliceIntoStrips(t,e,s,i){if(0===i)return new r([t]);const o=new n;t.queryLooseEnvelope(o);const a=o.width()+o.height();return new G(this.splitPolygon(t,e,o.xmin-a-1+1,o.xmax+a+1,s,i))}recursiveSliceEqualArea(t,e,o){if(o<=1||t.isEmpty())return new r([t]);{const r=[],a=[];a.push(y(t.clone(),o));let u=0,l=0;for(;a.length>0;){s(l++<2*o);const t=a.at(-1);if(a.pop(),1===t.second){r.push(y(t.first,u++));continue}const h=new n;t.first.queryEnvelope(h);const m=h.width()+h.height(),c=new i;c.setIdentity(),h.width()>h.height()&&(c.setRotateCcw90(),t.first.applyTransformation(c),c.transformEnvInPlace(h));const p=t.first.calculateArea2D(),_=p/t.second,g=p-Math.trunc(t.second/2)*_,f=new j(this.m_progressTracker).findSlicesByArea(t.first,e,1,g),d=new j(this.m_progressTracker).splitPolygon(t.first,e,h.xmin-m-1+1,h.xmax+m+1,f,1),x=d.length;if(s(x>0&&x<=2),!c.isIdentity()){const t=new i;t.setRotateCw90(),d[0].first.applyTransformation(t),2===x&&d[1].first.applyTransformation(t)}2===x?(a.push(y(d[1].first,t.second-Math.trunc(t.second/2))),a.push(y(d[0].first,Math.trunc(t.second/2)))):a.push(y(d[0].first,t.second))}return new G(r)}}recursiveSliceEqualAreaImpl(t,e,r,n){return s(0),{}}processTraps(t,e,s){s?this.processTrapsCurves(t,e):this.processTrapsLinear(t,e)}processTrapsLinear(t,e){let s=0,r=1;const n=.5*(this.m_sumBase-this.m_sumA),i=e-t,o=(this.m_sumBase-n*(r+s))*i*(r-s);if(o+this.m_areaTracking<this.m_splitArea)return this.m_totalAreaOfTraps.pe(o),void(this.m_areaTracking+=o);const u=new f(o),l=new d(0,1);let h=!1;for(;s<1;){const e=this.m_splitArea-this.m_areaTracking,m=[Number.NaN,Number.NaN];if(!(a(-n*i,this.m_sumBase*i,(n*s-this.m_sumBase)*i*s-e,l,!1,m)>0)){h?this.m_areaTracking=u.getResult():this.m_areaTracking+=o;break}{h=!0,r=m[0],this.m_areaTracking=0,s=r,u.me(e);const n=r*i+t;if(this.m_cuts.push(n),this.m_cutAreas.push(this.m_totalAreaOfTraps.getResult()+o-u.getResult()),this.m_cuts.length===this.m_numberOfCuts)return void this.m_totalAreaOfTraps.pe(o-u.getResult())}}this.m_totalAreaOfTraps.pe(o)}processTrapsCurves(t,e){let s=0,r=1;const n=new M(this,t,e,0,1,0).getArea(1);if(n+this.m_areaTracking<this.m_splitArea)return this.m_totalAreaOfTraps.pe(n),void(this.m_areaTracking+=n);const i=e-t,o=new f(n);let a=!1;for(;s<1;){const l=this.m_splitArea-this.m_areaTracking,h=new M(this,t,e,s,1,l),m=[0],c=new d(s,1);if(!(u(h,c,1,m)>0)){a?this.m_areaTracking=o.getResult():this.m_areaTracking+=n;break}{a=!0,r=m[0],this.m_areaTracking=0,s=r,o.me(l);const e=r*i+t;if(this.m_cuts.push(e),this.m_cutAreas.push(this.m_totalAreaOfTraps.getResult()+n-o.getResult()),this.m_cuts.length===this.m_numberOfCuts)return void this.m_totalAreaOfTraps.pe(n-o.getResult())}}this.m_totalAreaOfTraps.pe(n)}advanceAET(){const t=this.m_sortedNodes[this.m_currentScan-1].y,e=this.m_sortedNodes[this.m_currentScan];let s=!1,r=!1;const n=new f(0);for(let a=this.m_AETHead;null!==a;a=a.nextAET){const t=a.prevAET;s=!s,null!==a.nextAET&&s&&(this.m_bPolygonHasCurves&&(a.curve||a.nextAET.curve)||n.pe(a.nextAET.currentX-a.currentX)),a.advance(e.y),null!==t&&a.currentX<t.currentX&&(r=!0)}this.m_sumBase=n.getResult(),r&&this.sortAET();const i=new f(0);s=!1;let o=!1;for(let a=this.m_AETHead;null!==a;a=a.nextAET){o=o||null!==a.curve;s=!s,null!==a.prevAET&&(s||this.m_bPolygonHasCurves&&(a.curve||a.prevAET.curve)||i.pe(a.currentX-a.prevAET.currentX))}this.m_sumA=i.getResult(),this.processTraps(t,e.y,o);for(let a=this.m_AETHead;null!=a;){const t=a.prevAET,s=a.nextAET;if(e.y===a.y1)if(a.prevAET=null,a.nextAET=null,null!==a.nextInChain){const e=a.currentX;a=a.nextInChain,a.currentX=e,a.prevAET=t,t?t.nextAET=a:this.m_AETHead=a,a.nextAET=s,s&&(s.prevAET=a)}else t?t.nextAET=s:this.m_AETHead=s,s&&(s.prevAET=t);a=s}}mergeNewEdgesToAET(){for(let r=this.m_sortedNodes[this.m_currentScan].startingEdges;null!==r;r=r.startNodeNext)Number.isNaN(r.currentX)&&(this.m_sortHelper.push(r),r.currentX=r.x0);if(!this.m_sortHelper.length)return;this.sortHelper();let t=this.m_AETHead,e=0,s=t;for(;null!==t&&e<this.m_sortHelper.length;)t.currentX>this.m_sortHelper[e].currentX?(this.m_sortHelper[e].prevAET=t.prevAET,t.prevAET?t.prevAET.nextAET=this.m_sortHelper[e]:this.m_AETHead=this.m_sortHelper[e],this.m_sortHelper[e].nextAET=t,t.prevAET=this.m_sortHelper[e],e++):(s=t,t=t.nextAET);for(;e<this.m_sortHelper.length;)this.m_sortHelper[e].prevAET=s,null!==s?s.nextAET=this.m_sortHelper[e]:this.m_AETHead=this.m_sortHelper[e],this.m_sortHelper[e].nextAET=null,s=this.m_sortHelper[e],e++;this.m_sortHelper.length=0}sortAET(){for(let e=this.m_AETHead;null!==e;e=e.nextAET)this.m_sortHelper.push(e);this.sortHelper(),this.m_AETHead=null;let t=null;for(const e of this.m_sortHelper)e.prevAET=t,t?t.nextAET=e:this.m_AETHead=e,e.nextAET=null,t=e;this.m_sortHelper.length=0}sortHelper(){this.m_sortHelper.sort((t,e)=>t.currentX-e.currentX)}trapezoidation(){for(this.m_currentScan=0,this.mergeNewEdgesToAET(),this.m_currentScan++;this.m_currentScan<this.m_sortedNodes.length&&(this.progress(),this.advanceAET(),this.m_cuts.length!==this.m_numberOfCuts);)this.mergeNewEdgesToAET(),this.m_currentScan++}buildEdges(t){const e=t.querySegmentIterator();for(e.stripAttributes();e.nextPath();)for(;e.hasNextSegment();){const t=e.nextSegment();if(t.isCurve()){const e=t;if(l(e),this.m_bHorizontalSweep){const t=x(T,4);e.queryControlPoints(t);for(const e of t)e.y=A(e.x,e.x=e.y);e.constructPoints(t)}const s=e.getStartY(),r=e.getEndY();if(r===s)continue;r<s&&e.reverse(),this.m_curves.push(e.clone()),this.m_edges.push(O(this.m_curves.at(-1)))}else{const e=this.m_bHorizontalSweep?t.getStartX():t.getStartY();if((this.m_bHorizontalSweep?t.getEndX():t.getEndY())===e)continue;this.m_edges.push(I(t,this.m_bHorizontalSweep))}}this.m_edges.sort((t,e)=>t.y0===e.y0?t.x0-e.x0:t.y0-e.y0)}buildScanNodes(){const t=[];for(const n of this.m_edges){const e=R();e.x=n.x0,e.y=n.y0,e.startEdge=n,e.endEdge=null,t.push(e);const s=R();s.x=n.x1,s.y=n.y1,s.startEdge=null,s.endEdge=n,t.push(s)}t.sort((t,e)=>t.compare(e));let e=0,s=t[e].y;this.m_sortedNodes.push(D(s,t[e].startEdge));let r=e;for(e++;e!==t.length;++e){t[e].y!==s&&(this.m_sortedNodes.push(D(t[e].y,null)),s=t[e].y);const n=t[e].startEdge;if(n){const t=this.m_sortedNodes.at(-1);n.startNodeNext=t.startingEdges,t.startingEdges=n}if(t[r].x!==t[e].x||t[r].y!==t[e].y){if(e-r===2){let e=r;e++,null!==t[r].endEdge&&null!==t[e].startEdge&&(t[r].endEdge.nextInChain=t[e].startEdge)}r=e}}}progress(){}splitPolygonLinear(t,e,i,o,a,u){const l=[];l.push([t,0,u]);const m=[],c=new h;for(c.startPathCoords(i,0),c.lineToCoords(o,0);l.length>0;){const h=l.at(-1);l.pop();const p=h[0],_=h[1],g=h[2],f=(new w).executeMany(new r([p]),e,this.m_progressTracker);for(let r=f.next();null!==r;r=f.next()){const h=r,p=new n;h.queryLooseEnvelope(p);let f=_,d=g;for(let t=_,e=g-1;t<g;++t,--e)p.ymin>=a[t]&&(f=t+1),p.ymax<=a[e]&&(d=e);if(f!==g)if(d!==_)if(f!==d)if(this.isYMonotone(h))this.splitYMonotone(m,h,e,a,f,d);else{const r=Math.trunc((f+d)/2);c.setXYCoords(0,i,a[r]),c.setXYCoords(1,o,a[r]);const _=(new C).execute(!1,h,c,null,this.m_progressTracker),g=_.next(),x=_.next(),T=_.next();if(null!==g){if(g.isEmpty()||(r===d-1?(m.push(y(g,r)),s(L(m.at(-1).first,e,t,m.at(-1).second,a,u))):l.push([g,r+1,d])),x.isEmpty()||(r===f?(m.push(y(x,r-1)),s(L(m.at(-1).first,e,t,m.at(-1).second,a,u))):l.push([x,f,r])),null!==T&&!T.isEmpty()){const t=new n;T.queryLooseEnvelope(t),t.ymin>=a[r]?l.push([T,r+1,d]):t.ymax<=a[r]?l.push([T,f,r]):l.push([T,f,d])}}else r+1===d?(a[r]-p.ymin<p.ymax-a[r]?m.push(y(h,r)):m.push(y(h,r+1)),s(L(m.at(-1).first,e,t,m.at(-1).second,a,u))):l.push([h,r+1,d])}else m.push(y(r,f-1));else m.push(y(r,_-1));else m.push(y(r,g-1))}}return m}splitPolygon(t,e,s,r,i,o){const a=new n;t.queryLooseEnvelope(a),a.inflateCoords(0,Math.max(a.width(),a.height()));const u=[],l=[];for(l.push(B(t,0,o));l.length;){const o={...l.at(-1)};if(l.pop(),o.polygon.hasNonLinearSegments()){const t=Math.trunc((o.to+o.from)/2),h=i[t],m=new n(s,a.ymin,r,h),c=(new S).execute(o.polygon,m,e,this.m_progressTracker);c.isEmpty()||(t-o.from===0?u.push(y(c,t-1)):l.push(B(c,o.from,t)));const p=new n(s,h,r,a.ymax),_=(new S).execute(o.polygon,p,e,this.m_progressTracker);_.isEmpty()||(o.to-t===1?u.push(y(_,t)):l.push(B(_,t+1,o.to)))}else{const n=this.splitPolygonLinear(t,e,s,r,i.slice(o.from),o.to-o.from);u.push(...n)}}u.sort((t,e)=>t.second-e.second);const h=[];return m(u,(t,e)=>t.second===e.second,(t,e)=>{const s=new _;for(let r=t;r!==e;++r)s.add(u[r].first,!1);h.push(y(s,u[t].second))}),h}isYMonotone(t){if(1!==t.getPathCount())return!1;const e=t.getXY(0);let s=0,r=0;const n=new T;for(let i=1,o=t.getPointCount();i<=o;i++){t.queryXY(i===o?0:i,n);const a=n.y>e.y?1:n.y<e.y?-1:0;if(e.setCoordsPoint2D(n),s!==a&&0!==a){if(0!==s&&(r++,r>2))return!1;s=a}}return!0}splitYMonotone(t,e,r,n,i,o){const a=new c;a.addGeometry(e);const u=a.getFirstPath(a.getFirstGeometry()),l=a.getFirstVertex(u),h=new T,m=new T;let _=l,g=l;{const t=a.getXY(l);h.setCoordsPoint2D(t),m.setCoordsPoint2D(t)}let f=a.getNextVertex(l);const d=new T;for(let s=0,c=a.getPathSize(u);s<c;s++,f=a.getNextVertex(f))a.queryXY(f,d),d.compare(h)<0?(_=f,h.setCoordsPoint2D(d)):d.compare(m)>0&&(g=f,m.setCoordsPoint2D(d));let x=_,A=_,E=x,v=A,N=!1,S=!1,w=i,C=h.y,k=h.y,X=!1;for(;w<o;)if(n[w]<=h.y)w++;else{if(n[w]>=m.y)break;if(!N){const t=a.getNextVertex(x),e=a.getY(t);if(e<C)break;const s=n[w];C<=s&&e>=s?N=!0:(C=e,x=t)}if(!S){const t=a.getPrevVertex(A),e=a.getY(t);if(e<k)break;const s=n[w];k<=s&&e>=s?S=!0:(k=e,A=t)}if(N&&S){X=!0;let e=a.getXY(x);const r=a.getNextVertex(x);let i=a.getXY(r),o=p;if(i.y===e.y)o=i.x<e.x?x:r;else{const t=(n[w]-e.y)/(i.y-e.y);if(0===t)o=x;else if(1===t)o=r;else{const e=a.splitSegmentAxisAware(x,[t],1,null,-1);s(1===e),o=a.getNextVertex(x),a.getY(o)!==n[w]&&a.setXYCoords(o,a.getX(o),n[w])}}const u=a.getPrevVertex(A);e=a.getXY(u),i=a.getXY(A);let l=p;if(i.y===e.y)l=i.x<e.x?A:u;else{const t=(n[w]-e.y)/(i.y-e.y);if(0===t)l=u;else if(1===t)l=A;else{const e=a.splitSegmentAxisAware(u,[t],1,null,-1);s(1===e),l=a.getNextVertex(u),a.getY(l)!==n[w]&&a.setXYCoords(l,a.getX(l),n[w])}}t.push(y(this.extractTrapezoid(a,E,o,v,l),w-1)),E=o,v=l,x=o,A=l,C=k=n[w],N=!1,S=!1,w++}}X?t.push(y(this.extractTrapezoid(a,E,g,v,g),w-1)):t.push(y(e,w))}extractTrapezoid(t,e,s,r,n){const i=new _({vd:t.getVertexDescription()}),o=new v;let a=!0;for(let u=e;;u=t.getNextVertex(u)){const e=t.getSegment(u);if(e?i.addSegment(e,a):(t.queryPoint(u,o),a?i.startPathPoint(o):i.lineToPoint(o)),a=!1,u===s)break}s!==n&&(t.queryPoint(n,o),i.lineToPoint(o)),a=!0;for(let u=n;;u=t.getNextVertex(u)){const s=t.getSegment(u);if(s?i.addSegment(s,a):a||u===e||(t.queryPoint(u,o),i.lineToPoint(o)),a=!1,u===r)break}return i}}function z(t){return t.getImpl().ensureXYMonotoneSegments()}function L(t,e,s,r,i,o){const a=new n;t.queryEnvelope(a);const u=4*N(e,s,!0).total();return(!(r>=0)||a.ymin+u>=i[r])&&!(r+1<o&&a.ymax>i[r+1]+u)}class F{getOperatorType(){return 10011}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}sliceIntoStrips(t,e,s,r,n,i){return new W(0,t,e,s,n,0,i)}findSlicesByArea(t,e,s,r,n,i){if(!n||n.isIdentity())return k(t,e,s,r,i);{const o=t.clone();return o.applyTransformation(n),k(o,e,s,r,i)}}recursiveSliceEqualArea(t,e,s,r,n){return new W(1,t,e,null,r,s,n)}}class W extends t{constructor(t,e,s,r,n,i,o){super(),this.m_resultCursor=null,this.m_method=t,this.m_polygon=e,this.m_sr=s,this.m_ySplits=r?.slice()??null,this.m_transform=n,this.m_bReversePaths=n?.isReflective()??!1,this.m_inverseTransform=n?n.clone().invertThis():null,this.m_partCount=i,this.m_tracker=o}tock(){return!0}getRank(){return 1}next(){this.m_resultCursor||(this.m_method?this.recursiveSliceEqualArea():this.sliceIntoStrips());const t=this.m_resultCursor.next();return t?(this.m_inverseTransform&&!this.m_inverseTransform.isIdentity()&&(t.applyTransformation(this.m_inverseTransform),this.m_bReversePaths&&t.reverseAllPaths()),t):t}getGeometryID(){return this.m_resultCursor?this.m_resultCursor.getGeometryID():-1}sliceIntoStrips(){if(!this.m_transform||this.m_transform.isIdentity())this.m_resultCursor=X(this.m_polygon,this.m_sr,this.m_ySplits,this.m_ySplits.length,this.m_tracker);else{const t=this.m_polygon.clone();t.applyTransformation(this.m_transform),this.m_bReversePaths&&t.reverseAllPaths(),this.m_resultCursor=X(t,this.m_sr,this.m_ySplits,this.m_ySplits.length,this.m_tracker)}}recursiveSliceEqualArea(){if(!this.m_transform||this.m_transform.isIdentity())this.m_resultCursor=P(this.m_polygon,this.m_sr,this.m_partCount,this.m_tracker);else{const t=this.m_polygon.clone();t.applyTransformation(this.m_transform),this.m_bReversePaths&&t.reverseAllPaths(),this.m_resultCursor=P(t,this.m_sr,this.m_partCount,this.m_tracker)}}}const K=new F;function Z(t,e,s,r,n){return K.findSlicesByArea(t,e,s,r,n,null)}function $(t,e,s,r){const n=K.recursiveSliceEqualArea(t,e,s,r,null);return Array.from(n)}function J(t,e,s,r){const n=K.sliceIntoStrips(t,e,s,0,r,null);return Array.from(n)}function Q(){return K.supportsCurves()}export{Z as findSlicesByArea,$ as recursiveSliceEqualArea,J as sliceIntoStrips,Q as supportsCurves};
2
+ import{G as t}from"../../../chunks/GeometryCursor.js";import{a as e,g as s}from"../../../chunks/Geometry.js";import{S as r}from"../../../chunks/SimpleGeometryCursor.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{T as i}from"../../../chunks/Transformation2D.js";import{p as o,q as a,t as u,u as l,a as h,v as m,E as c,n as p,P as _,w as g}from"../../../chunks/MultiPathImpl.js";import{K as f,n as y,E as d,m as x,P as T,c as A,r as E}from"../../../chunks/Point2D.js";import{P as v,e as N}from"../../../chunks/Envelope.js";import{O as S}from"../../../chunks/OperatorClip.js";import{O as w}from"../../../chunks/OperatorMultiPartToSinglePart.js";import{O as C}from"../../../chunks/OperatorCut.js";function k(t,e,s,r,n){return new z(n).findSlicesByArea(t,e,s,r)}function X(t,e,s,r,n){return new z(n).sliceIntoStrips(t,e,s,r)}function P(t,e,s,r){return new z(r).recursiveSliceEqualArea(t,e,s)}function H(t){this.currentX=this.calcX(t)}function b(t){if(null===this.curve){const e=(t-this.y0)/(this.y1-this.y0);return E(this.x0,this.x1,e)}return this.curve.intersectionOfYMonotonicWithAxisX(t,this.x0)}function Y(){return{x0:Number.NaN,y0:Number.NaN,x1:Number.NaN,y1:Number.NaN,currentX:Number.NaN,nextAET:null,prevAET:null,startNodeNext:null,nextInChain:null,curve:null,advance:H,calcX:b}}function I(t,e){const s=Y();return s.x0=t.getStartX(),s.y0=t.getStartY(),s.x1=t.getEndX(),s.y1=t.getEndY(),e&&(s.y0=A(s.x0,s.x0=s.y0),s.y1=A(s.x1,s.x1=s.y1)),s.y1<s.y0&&(s.y1=A(s.y0,s.y0=s.y1),s.x1=A(s.x0,s.x0=s.x1)),s.currentX=Number.NaN,s.nextAET=null,s.prevAET=null,s.startNodeNext=null,s.nextInChain=null,s.curve=null,s}function O(t){const e=Y();return e.x0=t.getStartX(),e.y0=t.getStartY(),e.x1=t.getEndX(),e.y1=t.getEndY(),e.curve=t,e.y1<e.y0&&(e.y1=A(e.y0,e.y0=e.y1),e.x1=A(e.x0,e.x0=e.x1)),e.currentX=Number.NaN,e.nextAET=null,e.prevAET=null,e.startNodeNext=null,e.nextInChain=null,e}function q(t){if(this.x===t.x&&this.y===t.y){const e=null!==this.endEdge,s=null!==t.startEdge;return e&&s?-1:1}return this.y!==t.y?this.y-t.y:this.x-t.x}function R(){return{x:Number.NaN,y:Number.NaN,startEdge:null,endEdge:null,compare:q}}function D(t,e){return{y:t,startingEdges:e}}class M{constructor(t,e,s,r,n,i){this.m_parent=t,this.m_y0=e,this.m_y1=s,this.m_t0=r,this.m_area=i}getMaxDerivative(){return 1}getValue(t,e){return 1===t?0:this.getArea(e)-this.m_area}getError(t){return s(0),0}getArea(t){const e=.5*(this.m_parent.m_sumBase-this.m_parent.m_sumA),s=this.m_y1-this.m_y0;let r=(this.m_parent.m_sumBase-e*(t+this.m_t0))*s*(t-this.m_t0),n=!1;for(let i=this.m_parent.m_AETHead;null!==i;i=i.nextAET)if(n=!n,n&&(null!==i.curve||null!==i.nextAET.curve)){const e=this.m_y0+s*this.m_t0,n=this.m_y0+s*t;i.curve&&(r+=V(i.curve,this.m_y0+s*this.m_t0,this.m_y0+s*t)),i.nextAET.curve&&(r-=V(i.nextAET.curve,this.m_y0+s*this.m_t0,this.m_y0+s*t));r+=(n-e)*(i.nextAET.calcX(e)-i.calcX(e)+(i.nextAET.calcX(n)-i.calcX(n)))*.5}return r}}function B(t,e,s){return{polygon:t,from:e,to:s}}function V(t,e,r){const n=[0,0],i=t.intersectionWithAxis2D(!0,e,null,n);s(1===i);const o=n[0],a=t.intersectionWithAxis2D(!0,r,null,n);s(1===a);const u=n[0],l=x(T,4);g(t,l,!0);const h=l[3],m=l[2],c=l[1],p=t.getCoordX(o)-t.getStartX(),_=t.getCoordY(o)-t.getStartY(),f=t=>{const e=t*t;return e*t*(10*(m.x*c.y-m.y*c.x)-15*t*(h.y*c.x-h.x*c.y)+6*e*(m.y*h.x-h.y*m.x))/60},y=t=>(-t*(c.y+t*(m.y+h.y*t))*p+t*(c.x+t*(m.x+h.x*t))*_)/2;return f(u)-f(o)-(y(u)-y(o))}class j extends t{constructor(t){super(),this.m_geoms=[],this.m_index=-1,this.m_id=-1,this.m_geoms=t}tock(){return!0}getRank(){return 1}next(){return this.m_index++,this.m_index>=this.m_geoms.length?null:(this.m_id=this.m_geoms[this.m_index].second,this.m_geoms[this.m_index].first)}getGeometryID(){return this.m_id}}class z{constructor(t){this.m_edges=[],this.m_curves=[],this.m_sortedNodes=[],this.m_sortHelper=[],this.m_cuts=[],this.m_cutAreas=[],this.m_totalAreaOfTraps=new f(0),this.m_areaTracking=0,this.m_splitArea=0,this.m_sumBase=0,this.m_sumA=0,this.m_numberOfCuts=0,this.m_currentScan=0,this.m_progressCounter=0,this.m_AETHead=null,this.m_bHorizontalSweep=!1,this.m_bPolygonHasCurves=!1,this.m_progressTracker=t}findSlicesByArea(t,s,r,n){n<0&&e("remainingArea");let i=t,a=null;i.hasNonLinearSegments()&&(this.m_bPolygonHasCurves=!0,a=o(t,1e-16,!0),G(a),i=a);const u=Math.abs(i.calculateArea2D());return 0===u||0===r||n>=u||1===r&&0===n?[]:(this.m_splitArea=(u-n)/r,this.m_numberOfCuts=r-1,n>0&&this.m_numberOfCuts++,this.m_edges.length=0,this.m_sortedNodes.length=0,this.m_cuts.length=0,this.m_areaTracking=0,this.m_totalAreaOfTraps.reset(),this.m_curves.length=0,this.buildEdges(i),this.buildScanNodes(),this.trapezoidation(),this.m_cuts)}sliceIntoStrips(t,e,s,i){if(0===i)return new r([t]);const o=new n;t.queryLooseEnvelope(o);const a=o.width()+o.height();return new j(this.splitPolygon(t,e,o.xmin-a-1+1,o.xmax+a+1,s,i))}recursiveSliceEqualArea(t,e,o){if(o<=1||t.isEmpty())return new r([t]);{const r=[],a=[];a.push(y(t.clone(),o));let u=0,l=0;for(;a.length>0;){s(l++<2*o);const t=a.at(-1);if(a.pop(),1===t.second){r.push(y(t.first,u++));continue}const h=new n;t.first.queryEnvelope(h);const m=h.width()+h.height(),c=new i;c.setIdentity(),h.width()>h.height()&&(c.setRotateCcw90(),t.first.applyTransformation(c),c.transformEnvInPlace(h));const p=t.first.calculateArea2D(),_=p/t.second,g=p-Math.trunc(t.second/2)*_,f=new z(this.m_progressTracker).findSlicesByArea(t.first,e,1,g),d=new z(this.m_progressTracker).splitPolygon(t.first,e,h.xmin-m-1+1,h.xmax+m+1,f,1),x=d.length;if(s(x>0&&x<=2),!c.isIdentity()){const t=new i;t.setRotateCw90(),d[0].first.applyTransformation(t),2===x&&d[1].first.applyTransformation(t)}2===x?(a.push(y(d[1].first,t.second-Math.trunc(t.second/2))),a.push(y(d[0].first,Math.trunc(t.second/2)))):a.push(y(d[0].first,t.second))}return new j(r)}}recursiveSliceEqualAreaImpl(t,e,r,n){return s(0),{}}processTraps(t,e,s){s?this.processTrapsCurves(t,e):this.processTrapsLinear(t,e)}processTrapsLinear(t,e){let s=0,r=1;const n=.5*(this.m_sumBase-this.m_sumA),i=e-t,o=(this.m_sumBase-n*(r+s))*i*(r-s);if(o+this.m_areaTracking<this.m_splitArea)return this.m_totalAreaOfTraps.pe(o),void(this.m_areaTracking+=o);const u=new f(o),l=new d(0,1);let h=!1;for(;s<1;){const e=this.m_splitArea-this.m_areaTracking,m=[Number.NaN,Number.NaN];if(!(a(-n*i,this.m_sumBase*i,(n*s-this.m_sumBase)*i*s-e,l,!1,m)>0)){h?this.m_areaTracking=u.getResult():this.m_areaTracking+=o;break}{h=!0,r=m[0],this.m_areaTracking=0,s=r,u.me(e);const n=r*i+t;if(this.m_cuts.push(n),this.m_cutAreas.push(this.m_totalAreaOfTraps.getResult()+o-u.getResult()),this.m_cuts.length===this.m_numberOfCuts)return void this.m_totalAreaOfTraps.pe(o-u.getResult())}}this.m_totalAreaOfTraps.pe(o)}processTrapsCurves(t,e){let s=0,r=1;const n=new M(this,t,e,0,1,0).getArea(1);if(n+this.m_areaTracking<this.m_splitArea)return this.m_totalAreaOfTraps.pe(n),void(this.m_areaTracking+=n);const i=e-t,o=new f(n);let a=!1;for(;s<1;){const l=this.m_splitArea-this.m_areaTracking,h=new M(this,t,e,s,1,l),m=[0],c=new d(s,1);if(!(u(h,c,1,m)>0)){a?this.m_areaTracking=o.getResult():this.m_areaTracking+=n;break}{a=!0,r=m[0],this.m_areaTracking=0,s=r,o.me(l);const e=r*i+t;if(this.m_cuts.push(e),this.m_cutAreas.push(this.m_totalAreaOfTraps.getResult()+n-o.getResult()),this.m_cuts.length===this.m_numberOfCuts)return void this.m_totalAreaOfTraps.pe(n-o.getResult())}}this.m_totalAreaOfTraps.pe(n)}advanceAET(){const t=this.m_sortedNodes[this.m_currentScan-1].y,e=this.m_sortedNodes[this.m_currentScan];let s=!1,r=!1;const n=new f(0);for(let a=this.m_AETHead;null!==a;a=a.nextAET){const t=a.prevAET;s=!s,null!==a.nextAET&&s&&(this.m_bPolygonHasCurves&&(a.curve||a.nextAET.curve)||n.pe(a.nextAET.currentX-a.currentX)),a.advance(e.y),null!==t&&a.currentX<t.currentX&&(r=!0)}this.m_sumBase=n.getResult(),r&&this.sortAET();const i=new f(0);s=!1;let o=!1;for(let a=this.m_AETHead;null!==a;a=a.nextAET){o=o||null!==a.curve;s=!s,null!==a.prevAET&&(s||this.m_bPolygonHasCurves&&(a.curve||a.prevAET.curve)||i.pe(a.currentX-a.prevAET.currentX))}this.m_sumA=i.getResult(),this.processTraps(t,e.y,o);for(let a=this.m_AETHead;null!=a;){const t=a.prevAET,s=a.nextAET;if(e.y===a.y1)if(a.prevAET=null,a.nextAET=null,null!==a.nextInChain){const e=a.currentX;a=a.nextInChain,a.currentX=e,a.prevAET=t,t?t.nextAET=a:this.m_AETHead=a,a.nextAET=s,s&&(s.prevAET=a)}else t?t.nextAET=s:this.m_AETHead=s,s&&(s.prevAET=t);a=s}}mergeNewEdgesToAET(){for(let r=this.m_sortedNodes[this.m_currentScan].startingEdges;null!==r;r=r.startNodeNext)Number.isNaN(r.currentX)&&(this.m_sortHelper.push(r),r.currentX=r.x0);if(!this.m_sortHelper.length)return;this.sortHelper();let t=this.m_AETHead,e=0,s=t;for(;null!==t&&e<this.m_sortHelper.length;)t.currentX>this.m_sortHelper[e].currentX?(this.m_sortHelper[e].prevAET=t.prevAET,t.prevAET?t.prevAET.nextAET=this.m_sortHelper[e]:this.m_AETHead=this.m_sortHelper[e],this.m_sortHelper[e].nextAET=t,t.prevAET=this.m_sortHelper[e],e++):(s=t,t=t.nextAET);for(;e<this.m_sortHelper.length;)this.m_sortHelper[e].prevAET=s,null!==s?s.nextAET=this.m_sortHelper[e]:this.m_AETHead=this.m_sortHelper[e],this.m_sortHelper[e].nextAET=null,s=this.m_sortHelper[e],e++;this.m_sortHelper.length=0}sortAET(){for(let e=this.m_AETHead;null!==e;e=e.nextAET)this.m_sortHelper.push(e);this.sortHelper(),this.m_AETHead=null;let t=null;for(const e of this.m_sortHelper)e.prevAET=t,t?t.nextAET=e:this.m_AETHead=e,e.nextAET=null,t=e;this.m_sortHelper.length=0}sortHelper(){this.m_sortHelper.sort((t,e)=>t.currentX-e.currentX)}trapezoidation(){for(this.m_currentScan=0,this.mergeNewEdgesToAET(),this.m_currentScan++;this.m_currentScan<this.m_sortedNodes.length&&(this.progress(),this.advanceAET(),this.m_cuts.length!==this.m_numberOfCuts);)this.mergeNewEdgesToAET(),this.m_currentScan++}buildEdges(t){const e=t.querySegmentIterator();for(e.stripAttributes();e.nextPath();)for(;e.hasNextSegment();){const t=e.nextSegment();if(t.isCurve()){const e=t;if(l(e),this.m_bHorizontalSweep){const t=x(T,4);e.queryControlPoints(t);for(const e of t)e.y=A(e.x,e.x=e.y);e.constructPoints(t)}const s=e.getStartY(),r=e.getEndY();if(r===s)continue;r<s&&e.reverse(),this.m_curves.push(e.clone()),this.m_edges.push(O(this.m_curves.at(-1)))}else{const e=this.m_bHorizontalSweep?t.getStartX():t.getStartY();if((this.m_bHorizontalSweep?t.getEndX():t.getEndY())===e)continue;this.m_edges.push(I(t,this.m_bHorizontalSweep))}}this.m_edges.sort((t,e)=>t.y0===e.y0?t.x0-e.x0:t.y0-e.y0)}buildScanNodes(){const t=[];for(const n of this.m_edges){const e=R();e.x=n.x0,e.y=n.y0,e.startEdge=n,e.endEdge=null,t.push(e);const s=R();s.x=n.x1,s.y=n.y1,s.startEdge=null,s.endEdge=n,t.push(s)}t.sort((t,e)=>t.compare(e));let e=0,s=t[e].y;this.m_sortedNodes.push(D(s,t[e].startEdge));let r=e;for(e++;e!==t.length;++e){t[e].y!==s&&(this.m_sortedNodes.push(D(t[e].y,null)),s=t[e].y);const n=t[e].startEdge;if(n){const t=this.m_sortedNodes.at(-1);n.startNodeNext=t.startingEdges,t.startingEdges=n}if(t[r].x!==t[e].x||t[r].y!==t[e].y){if(e-r===2){let e=r;e++,null!==t[r].endEdge&&null!==t[e].startEdge&&(t[r].endEdge.nextInChain=t[e].startEdge)}r=e}}}progress(){}splitPolygonLinear(t,e,i,o,a,u){const l=[];l.push([t,0,u]);const m=[],c=new h;for(c.startPathCoords(i,0),c.lineToCoords(o,0);l.length>0;){const h=l.at(-1);l.pop();const p=h[0],_=h[1],g=h[2],f=(new w).executeMany(new r([p]),e,this.m_progressTracker);for(let r=f.next();null!==r;r=f.next()){const h=r,p=new n;h.queryLooseEnvelope(p);let f=_,d=g;for(let t=_,e=g-1;t<g;++t,--e)p.ymin>=a[t]&&(f=t+1),p.ymax<=a[e]&&(d=e);if(f!==g)if(d!==_)if(f!==d)if(this.isYMonotone(h))this.splitYMonotone(m,h,e,a,f,d);else{const r=Math.trunc((f+d)/2);c.setXYCoords(0,i,a[r]),c.setXYCoords(1,o,a[r]);const _=(new C).execute(!1,h,c,null,this.m_progressTracker),g=_.next(),x=_.next(),T=_.next();if(null!==g){if(g.isEmpty()||(r===d-1?(m.push(y(g,r)),s(L(m.at(-1).first,e,t,m.at(-1).second,a,u))):l.push([g,r+1,d])),x.isEmpty()||(r===f?(m.push(y(x,r-1)),s(L(m.at(-1).first,e,t,m.at(-1).second,a,u))):l.push([x,f,r])),null!==T&&!T.isEmpty()){const t=new n;T.queryLooseEnvelope(t),t.ymin>=a[r]?l.push([T,r+1,d]):t.ymax<=a[r]?l.push([T,f,r]):l.push([T,f,d])}}else r+1===d?(a[r]-p.ymin<p.ymax-a[r]?m.push(y(h,r)):m.push(y(h,r+1)),s(L(m.at(-1).first,e,t,m.at(-1).second,a,u))):l.push([h,r+1,d])}else m.push(y(r,f-1));else m.push(y(r,_-1));else m.push(y(r,g-1))}}return m}splitPolygon(t,e,s,r,i,o){const a=new n;t.queryLooseEnvelope(a),a.inflateCoords(0,Math.max(a.width(),a.height()));const u=[],l=[];for(l.push(B(t,0,o));l.length;){const o={...l.at(-1)};if(l.pop(),o.polygon.hasNonLinearSegments()){const t=Math.trunc((o.to+o.from)/2),h=i[t],m=new n(s,a.ymin,r,h),c=(new S).execute(o.polygon,m,e,this.m_progressTracker);c.isEmpty()||(t-o.from===0?u.push(y(c,t-1)):l.push(B(c,o.from,t)));const p=new n(s,h,r,a.ymax),_=(new S).execute(o.polygon,p,e,this.m_progressTracker);_.isEmpty()||(o.to-t===1?u.push(y(_,t)):l.push(B(_,t+1,o.to)))}else{const n=this.splitPolygonLinear(t,e,s,r,i.slice(o.from),o.to-o.from);u.push(...n)}}u.sort((t,e)=>t.second-e.second);const h=[];return m(u,(t,e)=>t.second===e.second,(t,e)=>{const s=new _;for(let r=t;r!==e;++r)s.add(u[r].first,!1);h.push(y(s,u[t].second))}),h}isYMonotone(t){if(1!==t.getPathCount())return!1;const e=t.getXY(0);let s=0,r=0;const n=new T;for(let i=1,o=t.getPointCount();i<=o;i++){t.queryXY(i===o?0:i,n);const a=n.y>e.y?1:n.y<e.y?-1:0;if(e.setCoordsPoint2D(n),s!==a&&0!==a){if(0!==s&&(r++,r>2))return!1;s=a}}return!0}splitYMonotone(t,e,r,n,i,o){const a=new c;a.addGeometry(e);const u=a.getFirstPath(a.getFirstGeometry()),l=a.getFirstVertex(u),h=new T,m=new T;let _=l,g=l;{const t=a.getXY(l);h.setCoordsPoint2D(t),m.setCoordsPoint2D(t)}let f=a.getNextVertex(l);const d=new T;for(let s=0,c=a.getPathSize(u);s<c;s++,f=a.getNextVertex(f))a.queryXY(f,d),d.compare(h)<0?(_=f,h.setCoordsPoint2D(d)):d.compare(m)>0&&(g=f,m.setCoordsPoint2D(d));let x=_,A=_,E=x,v=A,N=!1,S=!1,w=i,C=h.y,k=h.y,X=!1;for(;w<o;)if(n[w]<=h.y)w++;else{if(n[w]>=m.y)break;if(!N){const t=a.getNextVertex(x),e=a.getY(t);if(e<C)break;const s=n[w];C<=s&&e>=s?N=!0:(C=e,x=t)}if(!S){const t=a.getPrevVertex(A),e=a.getY(t);if(e<k)break;const s=n[w];k<=s&&e>=s?S=!0:(k=e,A=t)}if(N&&S){X=!0;let e=a.getXY(x);const r=a.getNextVertex(x);let i=a.getXY(r),o=p;if(i.y===e.y)o=i.x<e.x?x:r;else{const t=(n[w]-e.y)/(i.y-e.y);if(0===t)o=x;else if(1===t)o=r;else{const e=a.splitSegmentAxisAware(x,[t],1,null,-1);s(1===e),o=a.getNextVertex(x),a.getY(o)!==n[w]&&a.setXYCoords(o,a.getX(o),n[w])}}const u=a.getPrevVertex(A);e=a.getXY(u),i=a.getXY(A);let l=p;if(i.y===e.y)l=i.x<e.x?A:u;else{const t=(n[w]-e.y)/(i.y-e.y);if(0===t)l=u;else if(1===t)l=A;else{const e=a.splitSegmentAxisAware(u,[t],1,null,-1);s(1===e),l=a.getNextVertex(u),a.getY(l)!==n[w]&&a.setXYCoords(l,a.getX(l),n[w])}}t.push(y(this.extractTrapezoid(a,E,o,v,l),w-1)),E=o,v=l,x=o,A=l,C=k=n[w],N=!1,S=!1,w++}}X?t.push(y(this.extractTrapezoid(a,E,g,v,g),w-1)):t.push(y(e,w))}extractTrapezoid(t,e,s,r,n){const i=new _({vd:t.getVertexDescription()}),o=new v;let a=!0;for(let u=e;;u=t.getNextVertex(u)){const e=t.getSegment(u);if(e?i.addSegment(e,a):(t.queryPoint(u,o),a?i.startPathPoint(o):i.lineToPoint(o)),a=!1,u===s)break}s!==n&&(t.queryPoint(n,o),i.lineToPoint(o)),a=!0;for(let u=n;;u=t.getNextVertex(u)){const s=t.getSegment(u);if(s?i.addSegment(s,a):a||u===e||(t.queryPoint(u,o),i.lineToPoint(o)),a=!1,u===r)break}return i}}function G(t){return t.getImpl().ensureXYMonotoneSegments()}function L(t,e,s,r,i,o){const a=new n;t.queryEnvelope(a);const u=4*N(e,s,!0).total();return(!(r>=0)||a.ymin+u>=i[r])&&!(r+1<o&&a.ymax>i[r+1]+u)}class F{getOperatorType(){return 10011}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}sliceIntoStrips(t,e,s,r,n,i){return new W(0,t,e,s,n,0,i)}findSlicesByArea(t,e,s,r,n,i){if(!n||n.isIdentity())return k(t,e,s,r,i);{const o=t.clone();return o.applyTransformation(n),k(o,e,s,r,i)}}recursiveSliceEqualArea(t,e,s,r,n){return new W(1,t,e,null,r,s,n)}}class W extends t{constructor(t,e,s,r,n,i,o){super(),this.m_resultCursor=null,this.m_method=t,this.m_polygon=e,this.m_sr=s,this.m_ySplits=r?.slice()??null,this.m_transform=n,this.m_bReversePaths=n?.isReflective()??!1,this.m_inverseTransform=n?n.clone().invertThis():null,this.m_partCount=i,this.m_tracker=o}tock(){return!0}getRank(){return 1}next(){this.m_resultCursor||(this.m_method?this.recursiveSliceEqualArea():this.sliceIntoStrips());const t=this.m_resultCursor.next();return t?(this.m_inverseTransform&&!this.m_inverseTransform.isIdentity()&&(t.applyTransformation(this.m_inverseTransform),this.m_bReversePaths&&t.reverseAllPaths()),t):t}getGeometryID(){return this.m_resultCursor?this.m_resultCursor.getGeometryID():-1}sliceIntoStrips(){if(!this.m_transform||this.m_transform.isIdentity())this.m_resultCursor=X(this.m_polygon,this.m_sr,this.m_ySplits,this.m_ySplits.length,this.m_tracker);else{const t=this.m_polygon.clone();t.applyTransformation(this.m_transform),this.m_bReversePaths&&t.reverseAllPaths(),this.m_resultCursor=X(t,this.m_sr,this.m_ySplits,this.m_ySplits.length,this.m_tracker)}}recursiveSliceEqualArea(){if(!this.m_transform||this.m_transform.isIdentity())this.m_resultCursor=P(this.m_polygon,this.m_sr,this.m_partCount,this.m_tracker);else{const t=this.m_polygon.clone();t.applyTransformation(this.m_transform),this.m_bReversePaths&&t.reverseAllPaths(),this.m_resultCursor=P(t,this.m_sr,this.m_partCount,this.m_tracker)}}}const K=new F;function J(t,e,s,r,n){return K.findSlicesByArea(t,e,s,r,n,null)}function Q(t,e,s,r){const n=K.recursiveSliceEqualArea(t,e,s,r,null);return Array.from(n)}function U(t,e,s,r){const n=K.sliceIntoStrips(t,e,s,0,r,null);return Array.from(n)}function Z(){return K.supportsCurves()}export{J as findSlicesByArea,Q as recursiveSliceEqualArea,U as sliceIntoStrips,Z as supportsCurves};