@arcgis/core 4.33.0-next.20250508 → 4.33.0-next.20250509

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 (380) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.d.ts +2 -0
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
  4. package/arcade/functions/aiServices.js +1 -1
  5. package/arcade.js +1 -1
  6. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  7. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  8. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  9. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  10. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  11. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  12. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  13. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  14. package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
  15. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  16. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  17. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  18. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  19. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  20. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  21. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  22. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  23. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  24. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  25. package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
  26. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  27. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  28. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  29. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  30. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  31. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  32. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  33. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  34. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  35. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  36. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  37. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  38. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  39. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  40. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  41. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  42. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  43. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  44. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  45. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  46. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  47. package/assets/esri/core/workers/RemoteClient.js +1 -1
  48. package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js +2 -0
  49. package/assets/esri/core/workers/chunks/{543eb46b55cacd6e1dbc.js.LICENSE.txt → 0766ecb677d667e5fb83.js.LICENSE.txt} +1 -1
  50. package/assets/esri/core/workers/chunks/{c607d618b64d3accecc4.js → 0aca29f7156b2b412f2e.js} +1 -1
  51. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +1 -0
  52. package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js +2 -0
  53. package/assets/esri/core/workers/chunks/{d8dc922f7466300b668f.js.LICENSE.txt → 218a66d53f7cf4f285aa.js.LICENSE.txt} +2 -2
  54. package/assets/esri/core/workers/chunks/{037af6379f3e9278633b.js → 243dc74ec62891ba1ef7.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{f74b5659b6496a5c4c0c.js → 2e0af748eba93f3ea6cb.js} +1 -1
  56. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +2 -0
  57. package/assets/esri/core/workers/chunks/{7b4523ab392966624d97.js.LICENSE.txt → 3596540ef49e5330ceb2.js.LICENSE.txt} +1 -7
  58. package/assets/esri/core/workers/chunks/{a22c88b0a525e602dce0.js → 3d0e09ef78dc2fd6957a.js} +1 -1
  59. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +1 -0
  60. package/assets/esri/core/workers/chunks/{ee1d104e2bcc5d808fa4.js → 5228fc7fcdf57f44781e.js} +1 -1
  61. package/assets/esri/core/workers/chunks/5371df31553626528c69.js +1 -0
  62. package/assets/esri/core/workers/chunks/54f4a1131f99468db076.js +1 -0
  63. package/assets/esri/core/workers/chunks/{49c968e91c3c48aaa110.js → 5583d18032ed8bc17c74.js} +1 -1
  64. package/assets/esri/core/workers/chunks/5e7f35bf1aab93cb1c52.js +1 -0
  65. package/assets/esri/core/workers/chunks/61c74a733718d667b071.js +1 -0
  66. package/assets/esri/core/workers/chunks/{69f7fe6c58e4931597f6.js → 631205dc4d73d49ec9ed.js} +1 -1
  67. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +1 -0
  68. package/assets/esri/core/workers/chunks/7e8f78b96d43c224c7b6.js +1 -0
  69. package/assets/esri/core/workers/chunks/7ed9a9c33a08ebba5570.js +346 -0
  70. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  71. package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js +2 -0
  72. package/assets/esri/core/workers/chunks/{ac9c6779771ec855da79.js.LICENSE.txt → 90ae15ce22a49bd84876.js.LICENSE.txt} +3 -3
  73. package/assets/esri/core/workers/chunks/{9aedd7874da7c63865d6.js → 93cc26e5636040fdc0b8.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{77c7b7c4426c2b1a5b42.js → 9fc35ec8185beba96715.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{4f627eb62caee760215a.js → a1f27c4f4b5ef3e359f7.js} +1 -1
  76. package/assets/esri/core/workers/chunks/a31658f544ac6e1801d6.js +1 -0
  77. package/assets/esri/core/workers/chunks/{3a205f87f100832ef9f5.js → a5e746e10239a3bfe237.js} +1 -1
  78. package/assets/esri/core/workers/chunks/a6bcae413e62cd879b46.js +1 -0
  79. package/assets/esri/core/workers/chunks/{59d4c41172e921922cac.js → a8b42d8c0b76c234c09f.js} +100 -62
  80. package/assets/esri/core/workers/chunks/{3a517393619af3639b83.js → ad9bcd9dae45cdf90cbb.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{e46c05ef7272c7f1f70c.js → b1035bf4a016b1199236.js} +1 -1
  82. package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js +2 -0
  83. package/assets/esri/core/workers/chunks/{ce9de24cb96b56d20562.js.LICENSE.txt → b4f38fe9cc948a39ad87.js.LICENSE.txt} +1 -1
  84. package/assets/esri/core/workers/chunks/{752ef63d910852b7be44.js → c16e0da7a19310c71e8b.js} +1 -1
  85. package/assets/esri/core/workers/chunks/c28d4717ed588c0d8bf1.js +1 -0
  86. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +1 -0
  87. package/assets/esri/core/workers/chunks/d7b640f7a181bd26c7c7.js +1 -0
  88. package/assets/esri/core/workers/chunks/{2bdbf678d4f013543dbb.js → d971571a957de70d5a8d.js} +1 -1
  89. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +1 -0
  90. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +2 -0
  91. package/assets/esri/core/workers/chunks/{670a66617249f2d15a62.js.LICENSE.txt → e0dc8794343c2a949ffb.js.LICENSE.txt} +1 -1
  92. package/assets/esri/core/workers/chunks/e3c1aea34ece8336dae1.js +1 -0
  93. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +1 -0
  94. package/assets/esri/core/workers/chunks/{a50cb1fc8c4c585c0e11.js → ec8e8048b3df2c92008d.js} +1 -1
  95. package/assets/esri/core/workers/chunks/f7ab3511f6627f467796.js +1 -0
  96. package/assets/esri/core/workers/chunks/{1eef9cf19634c038b59b.js → f98689562017583f73ee.js} +1 -1
  97. package/assets/esri/core/workers/chunks/fb2e28e6a87956267d1c.js +66 -0
  98. package/assets/esri/core/workers/chunks/fbcd94f60f92257a7303.js +2 -0
  99. package/assets/esri/core/workers/chunks/{c2594024d72133d3ed7b.js.LICENSE.txt → fbcd94f60f92257a7303.js.LICENSE.txt} +1 -1
  100. package/assets/esri/core/workers/chunks/fda48126f67e80034404.js +1 -0
  101. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
  102. package/assets/esri/themes/dark/main.css +1 -1
  103. package/assets/esri/themes/light/main.css +1 -1
  104. package/assets/esri/themes/light/view.css +1 -1
  105. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  106. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  107. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  108. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  109. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  110. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  111. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  112. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  113. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  114. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  115. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  116. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  117. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  118. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  119. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  120. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  121. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  122. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  123. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  124. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  125. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  126. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  127. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  128. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  129. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  130. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  131. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  132. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  133. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  134. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  135. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  136. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  137. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  138. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  139. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  140. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  141. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  142. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  143. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  144. package/chunks/HUDMaterial.glsl.js +1 -1
  145. package/chunks/Laserlines.glsl.js +2 -2
  146. package/chunks/aiServices.js +1 -1
  147. package/chunks/boundedPlane.js +1 -1
  148. package/chunks/cameraUtilsSpherical.js +1 -1
  149. package/chunks/vec32.js +1 -1
  150. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  151. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  152. package/core/mapCollectionUtils.js +1 -1
  153. package/core/perspectiveUtils.js +1 -1
  154. package/geometry/support/axisAngleDegrees.js +1 -1
  155. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  156. package/geometry/support/curves/circleUtils.js +1 -1
  157. package/geometry/support/curves/curveExtent.js +5 -0
  158. package/geometry/support/curves/curveLength.js +5 -0
  159. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  160. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  161. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  162. package/geometry/support/curves/mathUtils.js +1 -1
  163. package/geometry/support/curves/splitCurveAtPoint.js +1 -1
  164. package/geometry/support/frustum.js +1 -1
  165. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  166. package/geometry/support/meshUtils/primitives.js +1 -1
  167. package/geometry/support/meshUtils/projection.js +1 -1
  168. package/geometry/support/meshUtils/rotate.js +1 -1
  169. package/geometry/support/meshUtils/scale.js +1 -1
  170. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  171. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  172. package/geometry/support/plane.js +1 -1
  173. package/interfaces.d.ts +61 -3
  174. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  175. package/layers/LinkChartLayer.js +1 -1
  176. package/layers/VoxelWasmPerSceneView.js +1 -1
  177. package/layers/graphics/sources/MemorySource.js +1 -1
  178. package/layers/video/VideoCameraSensorModel.js +1 -1
  179. package/layers/voxel/VoxelVolume.js +1 -1
  180. package/layers/voxel/voxelPlaneUtils.js +1 -1
  181. package/package.json +1 -1
  182. package/support/revision.js +1 -1
  183. package/symbols/cim/cimAnalyzer.js +1 -1
  184. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  185. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  186. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  187. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  191. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  192. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  193. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  194. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  195. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  196. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  197. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  198. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  199. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  200. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  201. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  202. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  203. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  204. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  205. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  206. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  207. package/views/3d/camera/constraintUtils/distance.js +1 -1
  208. package/views/3d/camera/intersectionUtils.js +1 -1
  209. package/views/3d/interactive/Manipulator3D.js +1 -1
  210. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  211. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  212. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  213. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  214. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  215. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  216. package/views/3d/layers/I3SMeshView3D.js +1 -1
  217. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  218. package/views/3d/layers/PointCloudWorker.js +1 -1
  219. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  220. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  221. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  225. package/views/3d/layers/graphics/Labeler.js +1 -1
  226. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  227. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  228. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  229. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  230. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  231. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  232. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  233. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  234. package/views/3d/layers/i3s/Intersector.js +1 -1
  235. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  236. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  237. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  238. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  239. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  240. package/views/3d/state/Frustum.js +1 -1
  241. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  242. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  243. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  244. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  245. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  246. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  247. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  248. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  249. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  250. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  251. package/views/3d/support/hitTest.js +1 -1
  252. package/views/3d/support/orientedBoundingBox.js +1 -1
  253. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  254. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  255. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  256. package/views/3d/support/viewpointUtils.js +1 -1
  257. package/views/3d/terrain/Intersector.js +1 -1
  258. package/views/3d/terrain/OverlayManager.js +1 -1
  259. package/views/3d/terrain/TerrainRenderer.js +1 -1
  260. package/views/3d/terrain/TerrainSurface.js +1 -1
  261. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  262. package/views/3d/webgl/RenderCamera.js +1 -1
  263. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  264. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  265. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  266. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  267. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  268. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  269. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  270. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  271. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  272. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  273. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  274. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  275. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  276. package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +5 -0
  277. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  278. package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
  279. package/views/3d/webgl-engine/lib/IntersectorResult.js +5 -0
  280. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  281. package/views/3d/webgl-engine/lib/IntersectorType.js +5 -0
  282. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  283. package/views/3d/webgl-engine/lib/Material.js +1 -1
  284. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  285. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  286. package/views/3d/webgl-engine/lib/ObjectIntersectorResult.js +5 -0
  287. package/views/3d/webgl-engine/lib/ObjectTarget.js +5 -0
  288. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  289. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  290. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  291. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  292. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  293. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  294. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  295. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  296. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  297. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  298. package/views/3d/webgl-engine/lib/lodRendering/Intersector.js +1 -1
  299. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  300. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  301. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  302. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  303. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  304. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  305. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  306. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  307. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  308. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  309. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  310. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  311. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  312. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  313. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  314. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  315. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  316. package/views/FocusArea.js +1 -1
  317. package/views/FocusAreaOutline.js +5 -0
  318. package/views/FocusAreaOutlineItem.js +5 -0
  319. package/views/FocusAreas.js +1 -1
  320. package/views/FocusAreasUtils.js +5 -0
  321. package/views/FocusAreasView.js +5 -0
  322. package/views/SceneView.js +1 -1
  323. package/views/analysis/DimensionAnalysisView.js +1 -1
  324. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  325. package/views/interactive/ToolIntersector.js +1 -1
  326. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  327. package/views/interactive/sketch/constraints.js +1 -1
  328. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  329. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  330. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  331. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  332. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  333. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  334. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  335. package/views/layers/DimensionLayerView.js +1 -1
  336. package/views/support/angularMeasurementUtils.js +1 -1
  337. package/views/support/geometry3dUtils.js +1 -1
  338. package/widgets/BasemapLayerList.js +1 -1
  339. package/widgets/BatchAttributeForm.js +1 -1
  340. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  341. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  342. package/widgets/FeatureForm.js +1 -1
  343. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  344. package/widgets/FeatureTable.js +1 -1
  345. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  346. package/widgets/UtilityNetworkTrace.js +1 -1
  347. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  348. package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
  349. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  350. package/widgets/support/FilterBuilder.js +1 -1
  351. package/widgets/support/SketchTooltipControls.js +1 -1
  352. package/widgets/support/SnappingControls.js +1 -1
  353. package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +0 -1
  354. package/assets/esri/core/workers/chunks/0c338364cb55afdbd580.js +0 -1
  355. package/assets/esri/core/workers/chunks/2da01fe20200b6d74851.js +0 -1
  356. package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +0 -1
  357. package/assets/esri/core/workers/chunks/45d64b72b7e93e9c64d7.js +0 -1
  358. package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js +0 -2
  359. package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +0 -319
  360. package/assets/esri/core/workers/chunks/670a66617249f2d15a62.js +0 -2
  361. package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +0 -39
  362. package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +0 -1
  363. package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +0 -2
  364. package/assets/esri/core/workers/chunks/7c2ec96749972e0b8a13.js +0 -1
  365. package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +0 -1
  366. package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +0 -1
  367. package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +0 -1
  368. package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js +0 -2
  369. package/assets/esri/core/workers/chunks/bbff052a991a2dc36960.js +0 -1
  370. package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +0 -1
  371. package/assets/esri/core/workers/chunks/bf190d672dcbaedc1a41.js +0 -1
  372. package/assets/esri/core/workers/chunks/c255c9279815359fdce5.js +0 -1
  373. package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +0 -2
  374. package/assets/esri/core/workers/chunks/ce9de24cb96b56d20562.js +0 -2
  375. package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js +0 -2
  376. package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +0 -1
  377. package/assets/esri/core/workers/chunks/dbf6011dd7933f02d41d.js +0 -66
  378. package/assets/esri/core/workers/chunks/e4e9dd635bdef18d0bd5.js +0 -1
  379. package/assets/esri/core/workers/chunks/e69f2e3c2d5e71fbb42f.js +0 -1
  380. package/assets/esri/core/workers/chunks/f61632c06c05b72e7017.js +0 -1
package/chunks/vec32.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function r(t){const n=t[0],a=t[1],r=t[2];return Math.sqrt(n*n+a*a+r*r)}function s(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,r){return t[0]=n,t[1]=a,t[2]=r,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function c(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function e(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function d(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function b(t,n=0,a=1){return t[0]=Math.min(Math.max(t[0],n),a),t[1]=Math.min(Math.max(t[1],n),a),t[2]=Math.min(Math.max(t[2],n),a),t}function x(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t}function p(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return Math.sqrt(a*a+r*r+s*s)}function v(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return a*a+r*r+s*s}function j(t){const n=t[0],a=t[1],r=t[2];return n*n+a*a+r*r}function y(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function z(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n){const a=n[0],r=n[1],s=n[2];let o=a*a+r*r+s*s;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2];return t[0]=s*e-o*c,t[1]=o*u-r*e,t[2]=r*c-s*u,t}function D(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2],i=s*e-o*c,h=o*u-r*e,M=r*c-s*u,f=Math.sqrt(i*i+h*h+M*M);return t[0]=i/f,t[1]=h/f,t[2]=M/f,t}function I(t,n,a,r){const s=n[0],o=n[1],u=n[2];return t[0]=s+r*(a[0]-s),t[1]=o+r*(a[1]-o),t[2]=u+r*(a[2]-u),t}function L(t,n,a,r,s,o){const u=o*o,c=u*(2*o-3)+1,e=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*c+a[0]*e+r[0]*i+s[0]*h,t[1]=n[1]*c+a[1]*e+r[1]*i+s[1]*h,t[2]=n[2]*c+a[2]*e+r[2]*i+s[2]*h,t}function O(t,n,a,r,s,o){const u=1-o,c=u*u,e=o*o,i=c*u,h=3*o*c,M=3*e*u,f=e*o;return t[0]=n[0]*i+a[0]*h+r[0]*M+s[0]*f,t[1]=n[1]*i+a[1]*h+r[1]*M+s[1]*f,t[2]=n[2]*i+a[2]*h+r[2]*M+s[2]*f,t}function S(t,n=1){const r=a,s=2*r()*Math.PI,o=2*r()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(s)*u,t[1]=Math.sin(s)*u,t[2]=o*n,t}function E(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=a[0]*r+a[4]*s+a[8]*o+a[12],t[1]=a[1]*r+a[5]*s+a[9]*o+a[13],t[2]=a[2]*r+a[6]*s+a[10]*o+a[14],t}function N(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=r*a[0]+s*a[3]+o*a[6],t[1]=r*a[1]+s*a[4]+o*a[7],t[2]=r*a[2]+s*a[5]+o*a[8],t}function Q(t,n,a){const r=a[0],s=a[1],o=a[2],u=a[3],c=n[0],e=n[1],i=n[2],h=s*i-o*e,M=o*c-r*i,f=r*e-s*c,m=s*f-o*M,l=o*h-r*f,d=r*M-s*h,b=2*u;return t[0]=c+h*b+2*m,t[1]=e+M*b+2*l,t[2]=i+f*b+2*d,t}function T(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0],o[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),o[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),o[1]=s[1],o[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),o[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),o[2]=s[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function B(t,n){A(C,t),A(F,n);const a=P(C,F);return a>1?0:a<-1?Math.PI:Math.acos(a)}const C=t(),F=t();function G(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function H(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function J(t,a){if(t===a)return!0;const r=t[0],s=t[1],o=t[2],u=a[0],c=a[1],e=a[2],i=n();return Math.abs(r-u)<=i*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(s-c)<=i*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(o-e)<=i*Math.max(1,Math.abs(o),Math.abs(e))}function K(t,n,a){const r=a[0]-n[0],s=a[1]-n[1],o=a[2]-n[2];let u=r*r+s*s+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=r*u,t[1]=s*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const R=c,U=e,V=i,W=p,X=v,Y=r,Z=j,$=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:B,bezier:O,ceil:h,clamp:b,copy:s,cross:_,crossAndNormalize:D,direction:K,dist:W,distance:p,div:V,divide:i,dot:P,equals:J,exactEquals:H,floor:M,hermite:L,inverse:z,len:Y,length:r,lerp:I,max:d,min:l,mul:U,multiply:e,negate:y,normalize:A,random:S,rotateX:T,rotateY:k,rotateZ:w,round:x,scale:g,scaleAndAdd:q,set:o,sign:m,sqrDist:X,sqrLen:Z,squaredDistance:v,squaredLength:j,str:G,sub:R,subtract:c,transformMat3:N,transformMat4:E,transformQuat:Q},Symbol.toStringTag,{value:"Module"}));export{d as A,l as B,m as C,e as D,i as E,W as F,J as G,Y as H,$ as I,M as J,w as K,h as L,b as M,x as N,D as O,L as P,O as Q,S as R,T as S,k as T,G as U,U as V,V as W,R as a,q as b,s as c,c as d,P as e,u as f,g,_ as h,o as i,p as j,j as k,r as l,I as m,A as n,K as o,H as p,N as q,B as r,v as s,E as t,z as u,y as v,Q as w,f as x,X as y,Z as z};
5
+ import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function r(t){const n=t[0],a=t[1],r=t[2];return Math.sqrt(n*n+a*a+r*r)}function s(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,r){return t[0]=n,t[1]=a,t[2]=r,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function c(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function e(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function m(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function l(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function d(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function b(t,n=0,a=1){return t[0]=Math.min(Math.max(t[0],n),a),t[1]=Math.min(Math.max(t[1],n),a),t[2]=Math.min(Math.max(t[2],n),a),t}function x(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,r){return t[0]=n[0]+a[0]*r,t[1]=n[1]+a[1]*r,t[2]=n[2]+a[2]*r,t}function p(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return Math.sqrt(a*a+r*r+s*s)}function v(t,n){const a=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];return a*a+r*r+s*s}function j(t){const n=t[0],a=t[1],r=t[2];return n*n+a*a+r*r}function y(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function z(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function A(t,n){const a=n[0],r=n[1],s=n[2];let o=a*a+r*r+s*s;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2];return t[0]=s*e-o*c,t[1]=o*u-r*e,t[2]=r*c-s*u,t}function D(t,n,a){const r=n[0],s=n[1],o=n[2],u=a[0],c=a[1],e=a[2],i=s*e-o*c,h=o*u-r*e,M=r*c-s*u,f=Math.sqrt(i*i+h*h+M*M);return t[0]=i/f,t[1]=h/f,t[2]=M/f,t}function I(t,n,a,r){const s=n[0],o=n[1],u=n[2];return t[0]=s+r*(a[0]-s),t[1]=o+r*(a[1]-o),t[2]=u+r*(a[2]-u),t}function L(t,n,a,r,s,o){const u=o*o,c=u*(2*o-3)+1,e=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*c+a[0]*e+r[0]*i+s[0]*h,t[1]=n[1]*c+a[1]*e+r[1]*i+s[1]*h,t[2]=n[2]*c+a[2]*e+r[2]*i+s[2]*h,t}function O(t,n,a,r,s,o){const u=1-o,c=u*u,e=o*o,i=c*u,h=3*o*c,M=3*e*u,f=e*o;return t[0]=n[0]*i+a[0]*h+r[0]*M+s[0]*f,t[1]=n[1]*i+a[1]*h+r[1]*M+s[1]*f,t[2]=n[2]*i+a[2]*h+r[2]*M+s[2]*f,t}function S(t,n=1){const r=a,s=2*r()*Math.PI,o=2*r()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(s)*u,t[1]=Math.sin(s)*u,t[2]=o*n,t}function E(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=a[0]*r+a[4]*s+a[8]*o+a[12],t[1]=a[1]*r+a[5]*s+a[9]*o+a[13],t[2]=a[2]*r+a[6]*s+a[10]*o+a[14],t}function N(t,n,a){const r=n[0],s=n[1],o=n[2];return t[0]=r*a[0]+s*a[3]+o*a[6],t[1]=r*a[1]+s*a[4]+o*a[7],t[2]=r*a[2]+s*a[5]+o*a[8],t}function Q(t,n,a){const r=a[0],s=a[1],o=a[2],u=a[3],c=n[0],e=n[1],i=n[2],h=s*i-o*e,M=o*c-r*i,f=r*e-s*c,m=s*f-o*M,l=o*h-r*f,d=r*M-s*h,b=2*u;return t[0]=c+h*b+2*m,t[1]=e+M*b+2*l,t[2]=i+f*b+2*d,t}function T(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0],o[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),o[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),o[1]=s[1],o[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n,a,r){const s=[],o=[];return s[0]=n[0]-a[0],s[1]=n[1]-a[1],s[2]=n[2]-a[2],o[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),o[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),o[2]=s[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function B(t,n){A(C,t),A(F,n);const a=P(C,F);return a>1?0:a<-1?Math.PI:Math.acos(a)}const C=t(),F=t();function G(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function H(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function J(t,a){if(t===a)return!0;const r=t[0],s=t[1],o=t[2],u=a[0],c=a[1],e=a[2],i=n();return Math.abs(r-u)<=i*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(s-c)<=i*Math.max(1,Math.abs(s),Math.abs(c))&&Math.abs(o-e)<=i*Math.max(1,Math.abs(o),Math.abs(e))}function K(t,n,a){const r=a[0]-n[0],s=a[1]-n[1],o=a[2]-n[2];let u=r*r+s*s+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=r*u,t[1]=s*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const R=c,U=e,V=i,W=p,X=v,Y=r,Z=j,$=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:B,bezier:O,ceil:h,clamp:b,copy:s,cross:_,crossAndNormalize:D,direction:K,dist:W,distance:p,div:V,divide:i,dot:P,equals:J,exactEquals:H,floor:M,hermite:L,inverse:z,len:Y,length:r,lerp:I,max:d,min:l,mul:U,multiply:e,negate:y,normalize:A,random:S,rotateX:T,rotateY:k,rotateZ:w,round:x,scale:g,scaleAndAdd:q,set:o,sign:m,sqrDist:X,sqrLen:Z,squaredDistance:v,squaredLength:j,str:G,sub:R,subtract:c,transformMat3:N,transformMat4:E,transformQuat:Q},Symbol.toStringTag,{value:"Module"}));export{l as A,m as B,e as C,i as D,K as E,W as F,J as G,Y as H,$ as I,M as J,w as K,h as L,b as M,x as N,D as O,L as P,O as Q,S as R,T as S,k as T,G as U,U as V,V as W,R as a,q as b,s as c,c as d,P as e,u as f,g,_ as h,o as i,p as j,j as k,r as l,I as m,A as n,N as o,B as p,H as q,z as r,v as s,E as t,y as u,Q as v,f as w,X as x,Z as y,d as z};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{create as t}from"../factories/vec3f64.js";import{getEpsilon as a}from"./common.js";function n(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[8]=a[8],t[9]=a[9],t[10]=a[10],t[11]=a[11],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t}function r(t,a,n,r,o,s,e,h,u,M,c,i,f,b,l,m,x){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=e,t[6]=h,t[7]=u,t[8]=M,t[9]=c,t[10]=i,t[11]=f,t[12]=b,t[13]=l,t[14]=m,t[15]=x,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function s(t,a){if(t===a){const n=a[1],r=a[2],o=a[3],s=a[6],e=a[7],h=a[11];t[1]=a[4],t[2]=a[8],t[3]=a[12],t[4]=n,t[6]=a[9],t[7]=a[13],t[8]=r,t[9]=s,t[11]=a[14],t[12]=o,t[13]=e,t[14]=h}else t[0]=a[0],t[1]=a[4],t[2]=a[8],t[3]=a[12],t[4]=a[1],t[5]=a[5],t[6]=a[9],t[7]=a[13],t[8]=a[2],t[9]=a[6],t[10]=a[10],t[11]=a[14],t[12]=a[3],t[13]=a[7],t[14]=a[11],t[15]=a[15];return t}function e(t,a){return h(t,a)||o(t),t}function h(t,a){const n=a[0],r=a[1],o=a[2],s=a[3],e=a[4],h=a[5],u=a[6],M=a[7],c=a[8],i=a[9],f=a[10],b=a[11],l=a[12],m=a[13],x=a[14],q=a[15],d=n*h-r*e,p=n*u-o*e,g=n*M-s*e,y=r*u-o*h,R=r*M-s*h,v=o*M-s*u,S=c*m-i*l,T=c*x-f*l,I=c*q-b*l,O=i*x-f*m,j=i*q-b*m,P=f*q-b*x;let D=d*P-p*j+g*O+y*I-R*T+v*S;return D?(D=1/D,t[0]=(h*P-u*j+M*O)*D,t[1]=(o*j-r*P-s*O)*D,t[2]=(m*v-x*R+q*y)*D,t[3]=(f*R-i*v-b*y)*D,t[4]=(u*I-e*P-M*T)*D,t[5]=(n*P-o*I+s*T)*D,t[6]=(x*g-l*v-q*p)*D,t[7]=(c*v-f*g+b*p)*D,t[8]=(e*j-h*I+M*S)*D,t[9]=(r*I-n*j-s*S)*D,t[10]=(l*R-m*g+q*d)*D,t[11]=(i*g-c*R-b*d)*D,t[12]=(h*T-e*O-u*S)*D,t[13]=(n*O-r*T+o*S)*D,t[14]=(m*p-l*y-x*d)*D,t[15]=(c*y-i*p+f*d)*D,t):null}function u(t,a){const n=a[0],r=a[1],o=a[2],s=a[3],e=a[4],h=a[5],u=a[6],M=a[7],c=a[8],i=a[9],f=a[10],b=a[11],l=a[12],m=a[13],x=a[14],q=a[15];return t[0]=h*(f*q-b*x)-i*(u*q-M*x)+m*(u*b-M*f),t[1]=-(r*(f*q-b*x)-i*(o*q-s*x)+m*(o*b-s*f)),t[2]=r*(u*q-M*x)-h*(o*q-s*x)+m*(o*M-s*u),t[3]=-(r*(u*b-M*f)-h*(o*b-s*f)+i*(o*M-s*u)),t[4]=-(e*(f*q-b*x)-c*(u*q-M*x)+l*(u*b-M*f)),t[5]=n*(f*q-b*x)-c*(o*q-s*x)+l*(o*b-s*f),t[6]=-(n*(u*q-M*x)-e*(o*q-s*x)+l*(o*M-s*u)),t[7]=n*(u*b-M*f)-e*(o*b-s*f)+c*(o*M-s*u),t[8]=e*(i*q-b*m)-c*(h*q-M*m)+l*(h*b-M*i),t[9]=-(n*(i*q-b*m)-c*(r*q-s*m)+l*(r*b-s*i)),t[10]=n*(h*q-M*m)-e*(r*q-s*m)+l*(r*M-s*h),t[11]=-(n*(h*b-M*i)-e*(r*b-s*i)+c*(r*M-s*h)),t[12]=-(e*(i*x-f*m)-c*(h*x-u*m)+l*(h*f-u*i)),t[13]=n*(i*x-f*m)-c*(r*x-o*m)+l*(r*f-o*i),t[14]=-(n*(h*x-u*m)-e*(r*x-o*m)+l*(r*u-o*h)),t[15]=n*(h*f-u*i)-e*(r*f-o*i)+c*(r*u-o*h),t}function M(t){const a=t[0],n=t[1],r=t[2],o=t[3],s=t[4],e=t[5],h=t[6],u=t[7],M=t[8],c=t[9],i=t[10],f=t[11],b=t[12],l=t[13],m=t[14],x=t[15];return(a*e-n*s)*(i*x-f*m)-(a*h-r*s)*(c*x-f*l)+(a*u-o*s)*(c*m-i*l)+(n*h-r*e)*(M*x-f*b)-(n*u-o*e)*(M*m-i*b)+(r*u-o*h)*(M*l-c*b)}function c(t,a,n){const r=a[0],o=a[1],s=a[2],e=a[3],h=a[4],u=a[5],M=a[6],c=a[7],i=a[8],f=a[9],b=a[10],l=a[11],m=a[12],x=a[13],q=a[14],d=a[15];let p=n[0],g=n[1],y=n[2],R=n[3];return t[0]=p*r+g*h+y*i+R*m,t[1]=p*o+g*u+y*f+R*x,t[2]=p*s+g*M+y*b+R*q,t[3]=p*e+g*c+y*l+R*d,p=n[4],g=n[5],y=n[6],R=n[7],t[4]=p*r+g*h+y*i+R*m,t[5]=p*o+g*u+y*f+R*x,t[6]=p*s+g*M+y*b+R*q,t[7]=p*e+g*c+y*l+R*d,p=n[8],g=n[9],y=n[10],R=n[11],t[8]=p*r+g*h+y*i+R*m,t[9]=p*o+g*u+y*f+R*x,t[10]=p*s+g*M+y*b+R*q,t[11]=p*e+g*c+y*l+R*d,p=n[12],g=n[13],y=n[14],R=n[15],t[12]=p*r+g*h+y*i+R*m,t[13]=p*o+g*u+y*f+R*x,t[14]=p*s+g*M+y*b+R*q,t[15]=p*e+g*c+y*l+R*d,t}function i(t,a,n){const r=n[0],o=n[1],s=n[2];if(a===t)t[12]=a[0]*r+a[4]*o+a[8]*s+a[12],t[13]=a[1]*r+a[5]*o+a[9]*s+a[13],t[14]=a[2]*r+a[6]*o+a[10]*s+a[14],t[15]=a[3]*r+a[7]*o+a[11]*s+a[15];else{const n=a[0],e=a[1],h=a[2],u=a[3],M=a[4],c=a[5],i=a[6],f=a[7],b=a[8],l=a[9],m=a[10],x=a[11];t[0]=n,t[1]=e,t[2]=h,t[3]=u,t[4]=M,t[5]=c,t[6]=i,t[7]=f,t[8]=b,t[9]=l,t[10]=m,t[11]=x,t[12]=n*r+M*o+b*s+a[12],t[13]=e*r+c*o+l*s+a[13],t[14]=h*r+i*o+m*s+a[14],t[15]=u*r+f*o+x*s+a[15]}return t}function f(t,a,n){const r=n[0],o=n[1],s=n[2];return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t[4]=a[4]*o,t[5]=a[5]*o,t[6]=a[6]*o,t[7]=a[7]*o,t[8]=a[8]*s,t[9]=a[9]*s,t[10]=a[10]*s,t[11]=a[11]*s,t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t}function b(t,r,o,s){let e=s[0],h=s[1],u=s[2],M=Math.sqrt(e*e+h*h+u*u);if(M<=a())return void n(t,r);M=1/M,e*=M,h*=M,u*=M;const c=Math.sin(o),i=Math.cos(o),f=1-i,b=r[0],l=r[1],m=r[2],x=r[3],q=r[4],d=r[5],p=r[6],g=r[7],y=r[8],R=r[9],v=r[10],S=r[11],T=e*e*f+i,I=h*e*f+u*c,O=u*e*f-h*c,j=e*h*f-u*c,P=h*h*f+i,D=u*h*f+e*c,_=e*u*f+h*c,A=h*u*f-e*c,w=u*u*f+i;t[0]=b*T+q*I+y*O,t[1]=l*T+d*I+R*O,t[2]=m*T+p*I+v*O,t[3]=x*T+g*I+S*O,t[4]=b*j+q*P+y*D,t[5]=l*j+d*P+R*D,t[6]=m*j+p*P+v*D,t[7]=x*j+g*P+S*D,t[8]=b*_+q*A+y*w,t[9]=l*_+d*A+R*w,t[10]=m*_+p*A+v*w,t[11]=x*_+g*A+S*w,r!==t&&(t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15])}function l(t,a,n){const r=Math.sin(n),o=Math.cos(n),s=a[4],e=a[5],h=a[6],u=a[7],M=a[8],c=a[9],i=a[10],f=a[11];return a!==t&&(t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15]),t[4]=s*o+M*r,t[5]=e*o+c*r,t[6]=h*o+i*r,t[7]=u*o+f*r,t[8]=M*o-s*r,t[9]=c*o-e*r,t[10]=i*o-h*r,t[11]=f*o-u*r,t}function m(t,a,n){const r=Math.sin(n),o=Math.cos(n),s=a[0],e=a[1],h=a[2],u=a[3],M=a[8],c=a[9],i=a[10],f=a[11];return a!==t&&(t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15]),t[0]=s*o-M*r,t[1]=e*o-c*r,t[2]=h*o-i*r,t[3]=u*o-f*r,t[8]=s*r+M*o,t[9]=e*r+c*o,t[10]=h*r+i*o,t[11]=u*r+f*o,t}function x(t,a,n){const r=Math.sin(n),o=Math.cos(n),s=a[0],e=a[1],h=a[2],u=a[3],M=a[4],c=a[5],i=a[6],f=a[7];return a!==t&&(t[8]=a[8],t[9]=a[9],t[10]=a[10],t[11]=a[11],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15]),t[0]=s*o+M*r,t[1]=e*o+c*r,t[2]=h*o+i*r,t[3]=u*o+f*r,t[4]=M*o-s*r,t[5]=c*o-e*r,t[6]=i*o-h*r,t[7]=f*o-u*r,t}function q(t,a){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}function d(t,a){return t[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=a[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,n,r){if(0===n)return o(t);let s=r[0],e=r[1],h=r[2],u=Math.sqrt(s*s+e*e+h*h);if(u<=a())return null;u=1/u,s*=u,e*=u,h*=u;const M=Math.sin(n),c=Math.cos(n),i=1-c;return t[0]=s*s*i+c,t[1]=e*s*i+h*M,t[2]=h*s*i-e*M,t[3]=0,t[4]=s*e*i-h*M,t[5]=e*e*i+c,t[6]=h*e*i+s*M,t[7]=0,t[8]=s*h*i+e*M,t[9]=e*h*i-s*M,t[10]=h*h*i+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,a){const n=Math.sin(a),r=Math.cos(a);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,a){const n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function R(t,a){const n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,a,n){const r=a[0],o=a[1],s=a[2],e=a[3],h=r+r,u=o+o,M=s+s,c=r*h,i=r*u,f=r*M,b=o*u,l=o*M,m=s*M,x=e*h,q=e*u,d=e*M;return t[0]=1-(b+m),t[1]=i+d,t[2]=f-q,t[3]=0,t[4]=i-d,t[5]=1-(c+m),t[6]=l+x,t[7]=0,t[8]=f+q,t[9]=l-x,t[10]=1-(c+b),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function S(t,a){const n=T,r=-a[0],o=-a[1],s=-a[2],e=a[3],h=a[4],u=a[5],M=a[6],c=a[7],i=r*r+o*o+s*s+e*e;return i>0?(n[0]=2*(h*e+c*r+u*s-M*o)/i,n[1]=2*(u*e+c*o+M*r-h*s)/i,n[2]=2*(M*e+c*s+h*o-u*r)/i):(n[0]=2*(h*e+c*r+u*s-M*o),n[1]=2*(u*e+c*o+M*r-h*s),n[2]=2*(M*e+c*s+h*o-u*r)),v(t,a,n),t}const T=t();function I(t,a){return t[0]=a[12],t[1]=a[13],t[2]=a[14],t}function O(t,a){const n=a[0],r=a[1],o=a[2],s=a[4],e=a[5],h=a[6],u=a[8],M=a[9],c=a[10];return t[0]=Math.sqrt(n*n+r*r+o*o),t[1]=Math.sqrt(s*s+e*e+h*h),t[2]=Math.sqrt(u*u+M*M+c*c),t}function j(t,a){const n=a[0]+a[5]+a[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(a[6]-a[9])/r,t[1]=(a[8]-a[2])/r,t[2]=(a[1]-a[4])/r):a[0]>a[5]&&a[0]>a[10]?(r=2*Math.sqrt(1+a[0]-a[5]-a[10]),t[3]=(a[6]-a[9])/r,t[0]=.25*r,t[1]=(a[1]+a[4])/r,t[2]=(a[8]+a[2])/r):a[5]>a[10]?(r=2*Math.sqrt(1+a[5]-a[0]-a[10]),t[3]=(a[8]-a[2])/r,t[0]=(a[1]+a[4])/r,t[1]=.25*r,t[2]=(a[6]+a[9])/r):(r=2*Math.sqrt(1+a[10]-a[0]-a[5]),t[3]=(a[1]-a[4])/r,t[0]=(a[8]+a[2])/r,t[1]=(a[6]+a[9])/r,t[2]=.25*r),t}function P(t,a,n,r){const o=a[0],s=a[1],e=a[2],h=a[3],u=o+o,M=s+s,c=e+e,i=o*u,f=o*M,b=o*c,l=s*M,m=s*c,x=e*c,q=h*u,d=h*M,p=h*c,g=r[0],y=r[1],R=r[2];return t[0]=(1-(l+x))*g,t[1]=(f+p)*g,t[2]=(b-d)*g,t[3]=0,t[4]=(f-p)*y,t[5]=(1-(i+x))*y,t[6]=(m+q)*y,t[7]=0,t[8]=(b+d)*R,t[9]=(m-q)*R,t[10]=(1-(i+l))*R,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function D(t,a,n,r,o){const s=a[0],e=a[1],h=a[2],u=a[3],M=s+s,c=e+e,i=h+h,f=s*M,b=s*c,l=s*i,m=e*c,x=e*i,q=h*i,d=u*M,p=u*c,g=u*i,y=r[0],R=r[1],v=r[2],S=o[0],T=o[1],I=o[2],O=(1-(m+q))*y,j=(b+g)*y,P=(l-p)*y,D=(b-g)*R,_=(1-(f+q))*R,A=(x+d)*R,w=(l+p)*v,F=(x-d)*v,Q=(1-(f+m))*v;return t[0]=O,t[1]=j,t[2]=P,t[3]=0,t[4]=D,t[5]=_,t[6]=A,t[7]=0,t[8]=w,t[9]=F,t[10]=Q,t[11]=0,t[12]=n[0]+S-(O*S+D*T+w*I),t[13]=n[1]+T-(j*S+_*T+F*I),t[14]=n[2]+I-(P*S+A*T+Q*I),t[15]=1,t}function _(t,a){const n=a[0],r=a[1],o=a[2],s=a[3],e=n+n,h=r+r,u=o+o,M=n*e,c=r*e,i=r*h,f=o*e,b=o*h,l=o*u,m=s*e,x=s*h,q=s*u;return t[0]=1-i-l,t[1]=c+q,t[2]=f-x,t[3]=0,t[4]=c-q,t[5]=1-M-l,t[6]=b+m,t[7]=0,t[8]=f+x,t[9]=b-m,t[10]=1-M-i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function A(t,a,n,r,o,s,e){const h=1/(n-a),u=1/(o-r),M=1/(s-e);return t[0]=2*s*h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*u,t[6]=0,t[7]=0,t[8]=(n+a)*h,t[9]=(o+r)*u,t[10]=(e+s)*M,t[11]=-1,t[12]=0,t[13]=0,t[14]=e*s*2*M,t[15]=0,t}function w(t,a,n,r,o){const s=1/Math.tan(a/2);let e;return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(e=1/(r-o),t[10]=(o+r)*e,t[14]=2*o*r*e):(t[10]=-1,t[14]=-2*r),t}function F(t,a,n,r){const o=Math.tan(a.upDegrees*Math.PI/180),s=Math.tan(a.downDegrees*Math.PI/180),e=Math.tan(a.leftDegrees*Math.PI/180),h=Math.tan(a.rightDegrees*Math.PI/180),u=2/(e+h),M=2/(o+s);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=M,t[6]=0,t[7]=0,t[8]=-(e-h)*u*.5,t[9]=(o-s)*M*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Q(t,a,n,r,o,s,e){const h=1/(a-n),u=1/(r-o),M=1/(s-e);return t[0]=-2*h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*M,t[11]=0,t[12]=(a+n)*h,t[13]=(o+r)*u,t[14]=(e+s)*M,t[15]=1,t}function X(t,n,r,s){const e=n[0],h=n[1],u=n[2];let M=e-r[0],c=h-r[1],i=u-r[2];const f=a();if(Math.abs(M)<f&&Math.abs(c)<f&&Math.abs(i)<f)return void o(t);let b=1/Math.sqrt(M*M+c*c+i*i);M*=b,c*=b,i*=b;const l=s[0],m=s[1],x=s[2];let q=m*i-x*c,d=x*M-l*i,p=l*c-m*M;b=Math.sqrt(q*q+d*d+p*p),b?(b=1/b,q*=b,d*=b,p*=b):(q=0,d=0,p=0);let g=c*p-i*d,y=i*q-M*p,R=M*d-c*q;b=Math.sqrt(g*g+y*y+R*R),b?(b=1/b,g*=b,y*=b,R*=b):(g=0,y=0,R=0),t[0]=q,t[1]=g,t[2]=M,t[3]=0,t[4]=d,t[5]=y,t[6]=c,t[7]=0,t[8]=p,t[9]=R,t[10]=i,t[11]=0,t[12]=-(q*e+d*h+p*u),t[13]=-(g*e+y*h+R*u),t[14]=-(M*e+c*h+i*u),t[15]=1}function Y(t,a,n,r){const o=a[0],s=a[1],e=a[2],h=r[0],u=r[1],M=r[2];let c=o-n[0],i=s-n[1],f=e-n[2],b=c*c+i*i+f*f;b>0&&(b=1/Math.sqrt(b),c*=b,i*=b,f*=b);let l=u*f-M*i,m=M*c-h*f,x=h*i-u*c;return b=l*l+m*m+x*x,b>0&&(b=1/Math.sqrt(b),l*=b,m*=b,x*=b),t[0]=l,t[1]=m,t[2]=x,t[3]=0,t[4]=i*x-f*m,t[5]=f*l-c*x,t[6]=c*m-i*l,t[7]=0,t[8]=c,t[9]=i,t[10]=f,t[11]=0,t[12]=o,t[13]=s,t[14]=e,t[15]=1,t}function Z(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function k(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)}function z(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t[4]=a[4]+n[4],t[5]=a[5]+n[5],t[6]=a[6]+n[6],t[7]=a[7]+n[7],t[8]=a[8]+n[8],t[9]=a[9]+n[9],t[10]=a[10]+n[10],t[11]=a[11]+n[11],t[12]=a[12]+n[12],t[13]=a[13]+n[13],t[14]=a[14]+n[14],t[15]=a[15]+n[15],t}function E(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t[4]=a[4]-n[4],t[5]=a[5]-n[5],t[6]=a[6]-n[6],t[7]=a[7]-n[7],t[8]=a[8]-n[8],t[9]=a[9]-n[9],t[10]=a[10]-n[10],t[11]=a[11]-n[11],t[12]=a[12]-n[12],t[13]=a[13]-n[13],t[14]=a[14]-n[14],t[15]=a[15]-n[15],t}function N(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t[4]=a[4]*n,t[5]=a[5]*n,t[6]=a[6]*n,t[7]=a[7]*n,t[8]=a[8]*n,t[9]=a[9]*n,t[10]=a[10]*n,t[11]=a[11]*n,t[12]=a[12]*n,t[13]=a[13]*n,t[14]=a[14]*n,t[15]=a[15]*n,t}function V(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t[3]=a[3]+n[3]*r,t[4]=a[4]+n[4]*r,t[5]=a[5]+n[5]*r,t[6]=a[6]+n[6]*r,t[7]=a[7]+n[7]*r,t[8]=a[8]+n[8]*r,t[9]=a[9]+n[9]*r,t[10]=a[10]+n[10]*r,t[11]=a[11]+n[11]*r,t[12]=a[12]+n[12]*r,t[13]=a[13]+n[13]*r,t[14]=a[14]+n[14]*r,t[15]=a[15]+n[15]*r,t}function B(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]&&t[4]===a[4]&&t[5]===a[5]&&t[6]===a[6]&&t[7]===a[7]&&t[8]===a[8]&&t[9]===a[9]&&t[10]===a[10]&&t[11]===a[11]&&t[12]===a[12]&&t[13]===a[13]&&t[14]===a[14]&&t[15]===a[15]}function C(t,n){if(t===n)return!0;const r=t[0],o=t[1],s=t[2],e=t[3],h=t[4],u=t[5],M=t[6],c=t[7],i=t[8],f=t[9],b=t[10],l=t[11],m=t[12],x=t[13],q=t[14],d=t[15],p=n[0],g=n[1],y=n[2],R=n[3],v=n[4],S=n[5],T=n[6],I=n[7],O=n[8],j=n[9],P=n[10],D=n[11],_=n[12],A=n[13],w=n[14],F=n[15],Q=a();return Math.abs(r-p)<=Q*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-g)<=Q*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-y)<=Q*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(e-R)<=Q*Math.max(1,Math.abs(e),Math.abs(R))&&Math.abs(h-v)<=Q*Math.max(1,Math.abs(h),Math.abs(v))&&Math.abs(u-S)<=Q*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(M-T)<=Q*Math.max(1,Math.abs(M),Math.abs(T))&&Math.abs(c-I)<=Q*Math.max(1,Math.abs(c),Math.abs(I))&&Math.abs(i-O)<=Q*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(f-j)<=Q*Math.max(1,Math.abs(f),Math.abs(j))&&Math.abs(b-P)<=Q*Math.max(1,Math.abs(b),Math.abs(P))&&Math.abs(l-D)<=Q*Math.max(1,Math.abs(l),Math.abs(D))&&Math.abs(m-_)<=Q*Math.max(1,Math.abs(m),Math.abs(_))&&Math.abs(x-A)<=Q*Math.max(1,Math.abs(x),Math.abs(A))&&Math.abs(q-w)<=Q*Math.max(1,Math.abs(q),Math.abs(w))&&Math.abs(d-F)<=Q*Math.max(1,Math.abs(d),Math.abs(F))}function G(t){const n=a(),r=t[0],o=t[1],s=t[2],e=t[4],h=t[5],u=t[6],M=t[8],c=t[9],i=t[10];return Math.abs(1-(r*r+e*e+M*M))<=n&&Math.abs(1-(o*o+h*h+c*c))<=n&&Math.abs(1-(s*s+u*u+i*i))<=n}function H(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const J=c,K=E,L=Object.freeze(Object.defineProperty({__proto__:null,add:z,adjoint:u,copy:n,determinant:M,equals:C,exactEquals:B,frob:k,fromQuat:_,fromQuat2:S,fromRotation:p,fromRotationTranslation:v,fromRotationTranslationScale:P,fromRotationTranslationScaleOrigin:D,fromScaling:d,fromTranslation:q,fromXRotation:g,fromYRotation:y,fromZRotation:R,frustum:A,getRotation:j,getScaling:O,getTranslation:I,hasIdentityRotation:H,identity:o,invert:h,invertOrIdentity:e,isOrthoNormal:G,lookAt:X,mul:J,multiply:c,multiplyScalar:N,multiplyScalarAndAdd:V,ortho:Q,perspective:w,perspectiveFromFieldOfView:F,rotate:b,rotateX:l,rotateY:m,rotateZ:x,scale:f,set:r,str:Z,sub:K,subtract:E,targetTo:Y,translate:i,transpose:s},Symbol.toStringTag,{value:"Module"}));export{z as add,u as adjoint,n as copy,M as determinant,C as equals,B as exactEquals,k as frob,_ as fromQuat,S as fromQuat2,p as fromRotation,v as fromRotationTranslation,P as fromRotationTranslationScale,D as fromRotationTranslationScaleOrigin,d as fromScaling,q as fromTranslation,g as fromXRotation,y as fromYRotation,R as fromZRotation,A as frustum,j as getRotation,O as getScaling,I as getTranslation,H as hasIdentityRotation,o as identity,h as invert,e as invertOrIdentity,G as isOrthoNormal,X as lookAt,L as m,J as mul,c as multiply,N as multiplyScalar,V as multiplyScalarAndAdd,Q as ortho,w as perspective,F as perspectiveFromFieldOfView,b as rotate,l as rotateX,m as rotateY,x as rotateZ,f as scale,r as set,Z as str,K as sub,E as subtract,Y as targetTo,i as translate,s as transpose};
5
+ import{create as t}from"../factories/vec3f64.js";import{getEpsilon as a}from"./common.js";function n(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[8]=a[8],t[9]=a[9],t[10]=a[10],t[11]=a[11],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t}function r(t,a,n,r,o,s,e,h,u,M,c,i,f,b,l,m,x){return t[0]=a,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=e,t[6]=h,t[7]=u,t[8]=M,t[9]=c,t[10]=i,t[11]=f,t[12]=b,t[13]=l,t[14]=m,t[15]=x,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function s(t,a){if(t===a){const n=a[1],r=a[2],o=a[3],s=a[6],e=a[7],h=a[11];t[1]=a[4],t[2]=a[8],t[3]=a[12],t[4]=n,t[6]=a[9],t[7]=a[13],t[8]=r,t[9]=s,t[11]=a[14],t[12]=o,t[13]=e,t[14]=h}else t[0]=a[0],t[1]=a[4],t[2]=a[8],t[3]=a[12],t[4]=a[1],t[5]=a[5],t[6]=a[9],t[7]=a[13],t[8]=a[2],t[9]=a[6],t[10]=a[10],t[11]=a[14],t[12]=a[3],t[13]=a[7],t[14]=a[11],t[15]=a[15];return t}function e(t,a){return h(t,a)||o(t),t}function h(t,a){const n=a[0],r=a[1],o=a[2],s=a[3],e=a[4],h=a[5],u=a[6],M=a[7],c=a[8],i=a[9],f=a[10],b=a[11],l=a[12],m=a[13],x=a[14],q=a[15],d=n*h-r*e,p=n*u-o*e,g=n*M-s*e,y=r*u-o*h,R=r*M-s*h,v=o*M-s*u,S=c*m-i*l,T=c*x-f*l,I=c*q-b*l,O=i*x-f*m,j=i*q-b*m,P=f*q-b*x;let D=d*P-p*j+g*O+y*I-R*T+v*S;return D?(D=1/D,t[0]=(h*P-u*j+M*O)*D,t[1]=(o*j-r*P-s*O)*D,t[2]=(m*v-x*R+q*y)*D,t[3]=(f*R-i*v-b*y)*D,t[4]=(u*I-e*P-M*T)*D,t[5]=(n*P-o*I+s*T)*D,t[6]=(x*g-l*v-q*p)*D,t[7]=(c*v-f*g+b*p)*D,t[8]=(e*j-h*I+M*S)*D,t[9]=(r*I-n*j-s*S)*D,t[10]=(l*R-m*g+q*d)*D,t[11]=(i*g-c*R-b*d)*D,t[12]=(h*T-e*O-u*S)*D,t[13]=(n*O-r*T+o*S)*D,t[14]=(m*p-l*y-x*d)*D,t[15]=(c*y-i*p+f*d)*D,t):null}function u(t,a){const n=a[0],r=a[1],o=a[2],s=a[3],e=a[4],h=a[5],u=a[6],M=a[7],c=a[8],i=a[9],f=a[10],b=a[11],l=a[12],m=a[13],x=a[14],q=a[15];return t[0]=h*(f*q-b*x)-i*(u*q-M*x)+m*(u*b-M*f),t[1]=-(r*(f*q-b*x)-i*(o*q-s*x)+m*(o*b-s*f)),t[2]=r*(u*q-M*x)-h*(o*q-s*x)+m*(o*M-s*u),t[3]=-(r*(u*b-M*f)-h*(o*b-s*f)+i*(o*M-s*u)),t[4]=-(e*(f*q-b*x)-c*(u*q-M*x)+l*(u*b-M*f)),t[5]=n*(f*q-b*x)-c*(o*q-s*x)+l*(o*b-s*f),t[6]=-(n*(u*q-M*x)-e*(o*q-s*x)+l*(o*M-s*u)),t[7]=n*(u*b-M*f)-e*(o*b-s*f)+c*(o*M-s*u),t[8]=e*(i*q-b*m)-c*(h*q-M*m)+l*(h*b-M*i),t[9]=-(n*(i*q-b*m)-c*(r*q-s*m)+l*(r*b-s*i)),t[10]=n*(h*q-M*m)-e*(r*q-s*m)+l*(r*M-s*h),t[11]=-(n*(h*b-M*i)-e*(r*b-s*i)+c*(r*M-s*h)),t[12]=-(e*(i*x-f*m)-c*(h*x-u*m)+l*(h*f-u*i)),t[13]=n*(i*x-f*m)-c*(r*x-o*m)+l*(r*f-o*i),t[14]=-(n*(h*x-u*m)-e*(r*x-o*m)+l*(r*u-o*h)),t[15]=n*(h*f-u*i)-e*(r*f-o*i)+c*(r*u-o*h),t}function M(t){const a=t[0],n=t[1],r=t[2],o=t[3],s=t[4],e=t[5],h=t[6],u=t[7],M=t[8],c=t[9],i=t[10],f=t[11],b=t[12],l=t[13],m=t[14],x=t[15];return(a*e-n*s)*(i*x-f*m)-(a*h-r*s)*(c*x-f*l)+(a*u-o*s)*(c*m-i*l)+(n*h-r*e)*(M*x-f*b)-(n*u-o*e)*(M*m-i*b)+(r*u-o*h)*(M*l-c*b)}function c(t,a,n){const r=a[0],o=a[1],s=a[2],e=a[3],h=a[4],u=a[5],M=a[6],c=a[7],i=a[8],f=a[9],b=a[10],l=a[11],m=a[12],x=a[13],q=a[14],d=a[15];let p=n[0],g=n[1],y=n[2],R=n[3];return t[0]=p*r+g*h+y*i+R*m,t[1]=p*o+g*u+y*f+R*x,t[2]=p*s+g*M+y*b+R*q,t[3]=p*e+g*c+y*l+R*d,p=n[4],g=n[5],y=n[6],R=n[7],t[4]=p*r+g*h+y*i+R*m,t[5]=p*o+g*u+y*f+R*x,t[6]=p*s+g*M+y*b+R*q,t[7]=p*e+g*c+y*l+R*d,p=n[8],g=n[9],y=n[10],R=n[11],t[8]=p*r+g*h+y*i+R*m,t[9]=p*o+g*u+y*f+R*x,t[10]=p*s+g*M+y*b+R*q,t[11]=p*e+g*c+y*l+R*d,p=n[12],g=n[13],y=n[14],R=n[15],t[12]=p*r+g*h+y*i+R*m,t[13]=p*o+g*u+y*f+R*x,t[14]=p*s+g*M+y*b+R*q,t[15]=p*e+g*c+y*l+R*d,t}function i(t,a,n){const r=n[0],o=n[1],s=n[2];if(a===t)t[12]=a[0]*r+a[4]*o+a[8]*s+a[12],t[13]=a[1]*r+a[5]*o+a[9]*s+a[13],t[14]=a[2]*r+a[6]*o+a[10]*s+a[14],t[15]=a[3]*r+a[7]*o+a[11]*s+a[15];else{const n=a[0],e=a[1],h=a[2],u=a[3],M=a[4],c=a[5],i=a[6],f=a[7],b=a[8],l=a[9],m=a[10],x=a[11];t[0]=n,t[1]=e,t[2]=h,t[3]=u,t[4]=M,t[5]=c,t[6]=i,t[7]=f,t[8]=b,t[9]=l,t[10]=m,t[11]=x,t[12]=n*r+M*o+b*s+a[12],t[13]=e*r+c*o+l*s+a[13],t[14]=h*r+i*o+m*s+a[14],t[15]=u*r+f*o+x*s+a[15]}return t}function f(t,a,n){const r=n[0],o=n[1],s=n[2];return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t[4]=a[4]*o,t[5]=a[5]*o,t[6]=a[6]*o,t[7]=a[7]*o,t[8]=a[8]*s,t[9]=a[9]*s,t[10]=a[10]*s,t[11]=a[11]*s,t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t}function b(t,r,o,s){let e=s[0],h=s[1],u=s[2],M=Math.sqrt(e*e+h*h+u*u);if(M<=a())return void n(t,r);M=1/M,e*=M,h*=M,u*=M;const c=Math.sin(o),i=Math.cos(o),f=1-i,b=r[0],l=r[1],m=r[2],x=r[3],q=r[4],d=r[5],p=r[6],g=r[7],y=r[8],R=r[9],v=r[10],S=r[11],T=e*e*f+i,I=h*e*f+u*c,O=u*e*f-h*c,j=e*h*f-u*c,P=h*h*f+i,D=u*h*f+e*c,_=e*u*f+h*c,A=h*u*f-e*c,w=u*u*f+i;t[0]=b*T+q*I+y*O,t[1]=l*T+d*I+R*O,t[2]=m*T+p*I+v*O,t[3]=x*T+g*I+S*O,t[4]=b*j+q*P+y*D,t[5]=l*j+d*P+R*D,t[6]=m*j+p*P+v*D,t[7]=x*j+g*P+S*D,t[8]=b*_+q*A+y*w,t[9]=l*_+d*A+R*w,t[10]=m*_+p*A+v*w,t[11]=x*_+g*A+S*w,r!==t&&(t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15])}function l(t,a,n){const r=Math.sin(n),o=Math.cos(n),s=a[4],e=a[5],h=a[6],u=a[7],M=a[8],c=a[9],i=a[10],f=a[11];return a!==t&&(t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15]),t[4]=s*o+M*r,t[5]=e*o+c*r,t[6]=h*o+i*r,t[7]=u*o+f*r,t[8]=M*o-s*r,t[9]=c*o-e*r,t[10]=i*o-h*r,t[11]=f*o-u*r,t}function m(t,a,n){const r=Math.sin(n),o=Math.cos(n),s=a[0],e=a[1],h=a[2],u=a[3],M=a[8],c=a[9],i=a[10],f=a[11];return a!==t&&(t[4]=a[4],t[5]=a[5],t[6]=a[6],t[7]=a[7],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15]),t[0]=s*o-M*r,t[1]=e*o-c*r,t[2]=h*o-i*r,t[3]=u*o-f*r,t[8]=s*r+M*o,t[9]=e*r+c*o,t[10]=h*r+i*o,t[11]=u*r+f*o,t}function x(t,a,n){const r=Math.sin(n),o=Math.cos(n),s=a[0],e=a[1],h=a[2],u=a[3],M=a[4],c=a[5],i=a[6],f=a[7];return a!==t&&(t[8]=a[8],t[9]=a[9],t[10]=a[10],t[11]=a[11],t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15]),t[0]=s*o+M*r,t[1]=e*o+c*r,t[2]=h*o+i*r,t[3]=u*o+f*r,t[4]=M*o-s*r,t[5]=c*o-e*r,t[6]=i*o-h*r,t[7]=f*o-u*r,t}function q(t,a){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=a[0],t[13]=a[1],t[14]=a[2],t[15]=1,t}function d(t,a){return t[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=a[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,n,r){if(0===n)return o(t);let s=r[0],e=r[1],h=r[2],u=Math.sqrt(s*s+e*e+h*h);if(u<=a())return null;u=1/u,s*=u,e*=u,h*=u;const M=Math.sin(n),c=Math.cos(n),i=1-c;return t[0]=s*s*i+c,t[1]=e*s*i+h*M,t[2]=h*s*i-e*M,t[3]=0,t[4]=s*e*i-h*M,t[5]=e*e*i+c,t[6]=h*e*i+s*M,t[7]=0,t[8]=s*h*i+e*M,t[9]=e*h*i-s*M,t[10]=h*h*i+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,a){const n=Math.sin(a),r=Math.cos(a);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,a){const n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function R(t,a){const n=Math.sin(a),r=Math.cos(a);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,a,n){const r=a[0],o=a[1],s=a[2],e=a[3],h=r+r,u=o+o,M=s+s,c=r*h,i=r*u,f=r*M,b=o*u,l=o*M,m=s*M,x=e*h,q=e*u,d=e*M;return t[0]=1-(b+m),t[1]=i+d,t[2]=f-q,t[3]=0,t[4]=i-d,t[5]=1-(c+m),t[6]=l+x,t[7]=0,t[8]=f+q,t[9]=l-x,t[10]=1-(c+b),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function S(t,a){const n=T,r=-a[0],o=-a[1],s=-a[2],e=a[3],h=a[4],u=a[5],M=a[6],c=a[7],i=r*r+o*o+s*s+e*e;return i>0?(n[0]=2*(h*e+c*r+u*s-M*o)/i,n[1]=2*(u*e+c*o+M*r-h*s)/i,n[2]=2*(M*e+c*s+h*o-u*r)/i):(n[0]=2*(h*e+c*r+u*s-M*o),n[1]=2*(u*e+c*o+M*r-h*s),n[2]=2*(M*e+c*s+h*o-u*r)),v(t,a,n),t}const T=t();function I(t,a){return t[0]=a[12],t[1]=a[13],t[2]=a[14],t}function O(t,a){const n=a[0],r=a[1],o=a[2],s=a[4],e=a[5],h=a[6],u=a[8],M=a[9],c=a[10];return t[0]=Math.sqrt(n*n+r*r+o*o),t[1]=Math.sqrt(s*s+e*e+h*h),t[2]=Math.sqrt(u*u+M*M+c*c),t}function j(t,a){const n=a[0]+a[5]+a[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(a[6]-a[9])/r,t[1]=(a[8]-a[2])/r,t[2]=(a[1]-a[4])/r):a[0]>a[5]&&a[0]>a[10]?(r=2*Math.sqrt(1+a[0]-a[5]-a[10]),t[3]=(a[6]-a[9])/r,t[0]=.25*r,t[1]=(a[1]+a[4])/r,t[2]=(a[8]+a[2])/r):a[5]>a[10]?(r=2*Math.sqrt(1+a[5]-a[0]-a[10]),t[3]=(a[8]-a[2])/r,t[0]=(a[1]+a[4])/r,t[1]=.25*r,t[2]=(a[6]+a[9])/r):(r=2*Math.sqrt(1+a[10]-a[0]-a[5]),t[3]=(a[1]-a[4])/r,t[0]=(a[8]+a[2])/r,t[1]=(a[6]+a[9])/r,t[2]=.25*r),t}function P(t,a,n,r){const o=a[0],s=a[1],e=a[2],h=a[3],u=o+o,M=s+s,c=e+e,i=o*u,f=o*M,b=o*c,l=s*M,m=s*c,x=e*c,q=h*u,d=h*M,p=h*c,g=r[0],y=r[1],R=r[2];return t[0]=(1-(l+x))*g,t[1]=(f+p)*g,t[2]=(b-d)*g,t[3]=0,t[4]=(f-p)*y,t[5]=(1-(i+x))*y,t[6]=(m+q)*y,t[7]=0,t[8]=(b+d)*R,t[9]=(m-q)*R,t[10]=(1-(i+l))*R,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function D(t,a,n,r,o){const s=a[0],e=a[1],h=a[2],u=a[3],M=s+s,c=e+e,i=h+h,f=s*M,b=s*c,l=s*i,m=e*c,x=e*i,q=h*i,d=u*M,p=u*c,g=u*i,y=r[0],R=r[1],v=r[2],S=o[0],T=o[1],I=o[2],O=(1-(m+q))*y,j=(b+g)*y,P=(l-p)*y,D=(b-g)*R,_=(1-(f+q))*R,A=(x+d)*R,w=(l+p)*v,F=(x-d)*v,Q=(1-(f+m))*v;return t[0]=O,t[1]=j,t[2]=P,t[3]=0,t[4]=D,t[5]=_,t[6]=A,t[7]=0,t[8]=w,t[9]=F,t[10]=Q,t[11]=0,t[12]=n[0]+S-(O*S+D*T+w*I),t[13]=n[1]+T-(j*S+_*T+F*I),t[14]=n[2]+I-(P*S+A*T+Q*I),t[15]=1,t}function _(t,a){const n=a[0],r=a[1],o=a[2],s=a[3],e=n+n,h=r+r,u=o+o,M=n*e,c=r*e,i=r*h,f=o*e,b=o*h,l=o*u,m=s*e,x=s*h,q=s*u;return t[0]=1-i-l,t[1]=c+q,t[2]=f-x,t[3]=0,t[4]=c-q,t[5]=1-M-l,t[6]=b+m,t[7]=0,t[8]=f+x,t[9]=b-m,t[10]=1-M-i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function A(t,a,n,r,o,s,e){const h=1/(n-a),u=1/(o-r),M=1/(s-e);return t[0]=2*s*h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*u,t[6]=0,t[7]=0,t[8]=(n+a)*h,t[9]=(o+r)*u,t[10]=(e+s)*M,t[11]=-1,t[12]=0,t[13]=0,t[14]=e*s*2*M,t[15]=0,t}function w(t,a,n,r,o){const s=1/Math.tan(a/2);let e;return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(e=1/(r-o),t[10]=(o+r)*e,t[14]=2*o*r*e):(t[10]=-1,t[14]=-2*r),t}function F(t,a,n,r){const o=Math.tan(a.upDegrees*Math.PI/180),s=Math.tan(a.downDegrees*Math.PI/180),e=Math.tan(a.leftDegrees*Math.PI/180),h=Math.tan(a.rightDegrees*Math.PI/180),u=2/(e+h),M=2/(o+s);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=M,t[6]=0,t[7]=0,t[8]=-(e-h)*u*.5,t[9]=(o-s)*M*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Q(t,a,n,r,o,s,e){const h=1/(a-n),u=1/(r-o),M=1/(s-e);return t[0]=-2*h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*M,t[11]=0,t[12]=(a+n)*h,t[13]=(o+r)*u,t[14]=(e+s)*M,t[15]=1,t}function X(t,n,r,s){const e=n[0],h=n[1],u=n[2];let M=e-r[0],c=h-r[1],i=u-r[2];const f=a();if(Math.abs(M)<f&&Math.abs(c)<f&&Math.abs(i)<f)return void o(t);let b=1/Math.sqrt(M*M+c*c+i*i);M*=b,c*=b,i*=b;const l=s[0],m=s[1],x=s[2];let q=m*i-x*c,d=x*M-l*i,p=l*c-m*M;b=Math.sqrt(q*q+d*d+p*p),b?(b=1/b,q*=b,d*=b,p*=b):(q=0,d=0,p=0);let g=c*p-i*d,y=i*q-M*p,R=M*d-c*q;b=Math.sqrt(g*g+y*y+R*R),b?(b=1/b,g*=b,y*=b,R*=b):(g=0,y=0,R=0),t[0]=q,t[1]=g,t[2]=M,t[3]=0,t[4]=d,t[5]=y,t[6]=c,t[7]=0,t[8]=p,t[9]=R,t[10]=i,t[11]=0,t[12]=-(q*e+d*h+p*u),t[13]=-(g*e+y*h+R*u),t[14]=-(M*e+c*h+i*u),t[15]=1}function Y(t,a,n,r){const o=a[0],s=a[1],e=a[2],h=r[0],u=r[1],M=r[2];let c=o-n[0],i=s-n[1],f=e-n[2],b=c*c+i*i+f*f;b>0&&(b=1/Math.sqrt(b),c*=b,i*=b,f*=b);let l=u*f-M*i,m=M*c-h*f,x=h*i-u*c;return b=l*l+m*m+x*x,b>0&&(b=1/Math.sqrt(b),l*=b,m*=b,x*=b),t[0]=l,t[1]=m,t[2]=x,t[3]=0,t[4]=i*x-f*m,t[5]=f*l-c*x,t[6]=c*m-i*l,t[7]=0,t[8]=c,t[9]=i,t[10]=f,t[11]=0,t[12]=o,t[13]=s,t[14]=e,t[15]=1,t}function Z(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function k(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)}function z(t,a,n){return t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t[3]=a[3]+n[3],t[4]=a[4]+n[4],t[5]=a[5]+n[5],t[6]=a[6]+n[6],t[7]=a[7]+n[7],t[8]=a[8]+n[8],t[9]=a[9]+n[9],t[10]=a[10]+n[10],t[11]=a[11]+n[11],t[12]=a[12]+n[12],t[13]=a[13]+n[13],t[14]=a[14]+n[14],t[15]=a[15]+n[15],t}function E(t,a,n){return t[0]=a[0]-n[0],t[1]=a[1]-n[1],t[2]=a[2]-n[2],t[3]=a[3]-n[3],t[4]=a[4]-n[4],t[5]=a[5]-n[5],t[6]=a[6]-n[6],t[7]=a[7]-n[7],t[8]=a[8]-n[8],t[9]=a[9]-n[9],t[10]=a[10]-n[10],t[11]=a[11]-n[11],t[12]=a[12]-n[12],t[13]=a[13]-n[13],t[14]=a[14]-n[14],t[15]=a[15]-n[15],t}function N(t,a,n){return t[0]=a[0]*n,t[1]=a[1]*n,t[2]=a[2]*n,t[3]=a[3]*n,t[4]=a[4]*n,t[5]=a[5]*n,t[6]=a[6]*n,t[7]=a[7]*n,t[8]=a[8]*n,t[9]=a[9]*n,t[10]=a[10]*n,t[11]=a[11]*n,t[12]=a[12]*n,t[13]=a[13]*n,t[14]=a[14]*n,t[15]=a[15]*n,t}function V(t,a,n,r){return t[0]=a[0]+n[0]*r,t[1]=a[1]+n[1]*r,t[2]=a[2]+n[2]*r,t[3]=a[3]+n[3]*r,t[4]=a[4]+n[4]*r,t[5]=a[5]+n[5]*r,t[6]=a[6]+n[6]*r,t[7]=a[7]+n[7]*r,t[8]=a[8]+n[8]*r,t[9]=a[9]+n[9]*r,t[10]=a[10]+n[10]*r,t[11]=a[11]+n[11]*r,t[12]=a[12]+n[12]*r,t[13]=a[13]+n[13]*r,t[14]=a[14]+n[14]*r,t[15]=a[15]+n[15]*r,t}function B(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]&&t[3]===a[3]&&t[4]===a[4]&&t[5]===a[5]&&t[6]===a[6]&&t[7]===a[7]&&t[8]===a[8]&&t[9]===a[9]&&t[10]===a[10]&&t[11]===a[11]&&t[12]===a[12]&&t[13]===a[13]&&t[14]===a[14]&&t[15]===a[15]}function C(t,n){if(t===n)return!0;const r=t[0],o=t[1],s=t[2],e=t[3],h=t[4],u=t[5],M=t[6],c=t[7],i=t[8],f=t[9],b=t[10],l=t[11],m=t[12],x=t[13],q=t[14],d=t[15],p=n[0],g=n[1],y=n[2],R=n[3],v=n[4],S=n[5],T=n[6],I=n[7],O=n[8],j=n[9],P=n[10],D=n[11],_=n[12],A=n[13],w=n[14],F=n[15],Q=a();return Math.abs(r-p)<=Q*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-g)<=Q*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-y)<=Q*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(e-R)<=Q*Math.max(1,Math.abs(e),Math.abs(R))&&Math.abs(h-v)<=Q*Math.max(1,Math.abs(h),Math.abs(v))&&Math.abs(u-S)<=Q*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(M-T)<=Q*Math.max(1,Math.abs(M),Math.abs(T))&&Math.abs(c-I)<=Q*Math.max(1,Math.abs(c),Math.abs(I))&&Math.abs(i-O)<=Q*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(f-j)<=Q*Math.max(1,Math.abs(f),Math.abs(j))&&Math.abs(b-P)<=Q*Math.max(1,Math.abs(b),Math.abs(P))&&Math.abs(l-D)<=Q*Math.max(1,Math.abs(l),Math.abs(D))&&Math.abs(m-_)<=Q*Math.max(1,Math.abs(m),Math.abs(_))&&Math.abs(x-A)<=Q*Math.max(1,Math.abs(x),Math.abs(A))&&Math.abs(q-w)<=Q*Math.max(1,Math.abs(q),Math.abs(w))&&Math.abs(d-F)<=Q*Math.max(1,Math.abs(d),Math.abs(F))}function G(t){const n=a(),r=t[0],o=t[1],s=t[2],e=t[4],h=t[5],u=t[6],M=t[8],c=t[9],i=t[10];return Math.abs(1-(r*r+e*e+M*M))<=n&&Math.abs(1-(o*o+h*h+c*c))<=n&&Math.abs(1-(s*s+u*u+i*i))<=n}function H(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const J=c,K=E,L=Object.freeze(Object.defineProperty({__proto__:null,add:z,adjoint:u,copy:n,determinant:M,equals:C,exactEquals:B,frob:k,fromQuat:_,fromQuat2:S,fromRotation:p,fromRotationTranslation:v,fromRotationTranslationScale:P,fromRotationTranslationScaleOrigin:D,fromScaling:d,fromTranslation:q,fromXRotation:g,fromYRotation:y,fromZRotation:R,frustum:A,getRotation:j,getScale:O,getTranslation:I,hasIdentityRotation:H,identity:o,invert:h,invertOrIdentity:e,isOrthoNormal:G,lookAt:X,mul:J,multiply:c,multiplyScalar:N,multiplyScalarAndAdd:V,ortho:Q,perspective:w,perspectiveFromFieldOfView:F,rotate:b,rotateX:l,rotateY:m,rotateZ:x,scale:f,set:r,str:Z,sub:K,subtract:E,targetTo:Y,translate:i,transpose:s},Symbol.toStringTag,{value:"Module"}));export{z as add,u as adjoint,n as copy,M as determinant,C as equals,B as exactEquals,k as frob,_ as fromQuat,S as fromQuat2,p as fromRotation,v as fromRotationTranslation,P as fromRotationTranslationScale,D as fromRotationTranslationScaleOrigin,d as fromScaling,q as fromTranslation,g as fromXRotation,y as fromYRotation,R as fromZRotation,A as frustum,j as getRotation,O as getScale,I as getTranslation,H as hasIdentityRotation,o as identity,h as invert,e as invertOrIdentity,G as isOrthoNormal,X as lookAt,L as m,J as mul,c as multiply,N as multiplyScalar,V as multiplyScalarAndAdd,Q as ortho,w as perspective,F as perspectiveFromFieldOfView,b as rotate,l as rotateX,m as rotateY,x as rotateZ,f as scale,r as set,Z as str,K as sub,E as subtract,Y as targetTo,i as translate,s as transpose};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import"../factories/vec3f64.js";import"./common.js";export{x as abs,f as add,r as angle,Q as bezier,L as ceil,M as clamp,c as copy,h as cross,O as crossAndNormalize,o as direction,F as dist,j as distance,W as div,E as divide,e as dot,G as equals,p as exactEquals,J as floor,P as hermite,u as inverse,H as len,l as length,m as lerp,A as max,B as min,V as mul,D as multiply,v as negate,n as normalize,R as random,S as rotateX,T as rotateY,K as rotateZ,N as round,g as scale,b as scaleAndAdd,i as set,C as sign,y as sqrDist,z as sqrLen,s as squaredDistance,k as squaredLength,U as str,a as sub,d as subtract,q as transformMat3,t as transformMat4,w as transformQuat}from"../../../../chunks/vec32.js";
5
+ import"../factories/vec3f64.js";import"./common.js";export{w as abs,f as add,p as angle,Q as bezier,L as ceil,M as clamp,c as copy,h as cross,O as crossAndNormalize,E as direction,F as dist,j as distance,W as div,D as divide,e as dot,G as equals,q as exactEquals,J as floor,P as hermite,r as inverse,H as len,l as length,m as lerp,z as max,A as min,V as mul,C as multiply,u as negate,n as normalize,R as random,S as rotateX,T as rotateY,K as rotateZ,N as round,g as scale,b as scaleAndAdd,i as set,B as sign,x as sqrDist,y as sqrLen,s as squaredDistance,k as squaredLength,U as str,a as sub,d as subtract,o as transformMat3,t as transformMat4,v as transformQuat}from"../../../../chunks/vec32.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{createTask as e}from"./asyncUtils.js";import t from"./Collection.js";import{destroyHandle as o,removeIfHandle as s}from"./handleUtils.js";import{ignoreAbortErrors as r,isAborted as n,createAbortError as i}from"./promiseUtils.js";import{on as a}from"./reactiveUtils.js";function c(e,o,s){const r=s?.createCollection?.()??new t,n=!!s?.recycleItems?new d:null,i=(e,t=0)=>{if(!e?.length)return;const o=r.splice(t,e.length);n?n.processRemoved(e):o.forEach(m)},c=(e,t=0)=>{if(!e?.length)return;const s=[];for(const r of e){const e=n?.use(r);if(e)s.push(e);else{const e=o(r);n?.register(r,e),s.push(e)}}r.addMany(s,t)},l=a(e,"after-splice",(({added:e,start:t,removed:o})=>{i(o,t),c(e,t)}),{sync:!0,onListenerRemove:e=>i(e.items),onListenerAdd:e=>c(e.items)});return r.addHandles(l),r}class d{constructor(){this._originalToMapped=new Map,this._removedItemCandidates=new Set,this._garbageCollectionQueued=!1}processRemoved(e){if(!e?.length)return;const{_removedItemCandidates:t}=this;for(const o of e)this._getItem(o)?.markRemoved()&&(t.add(o),this._queueGarbageCollection())}use(e){const t=this._getItem(e);return t&&(t.removed=!1),t?.item}register(e,t){this._originalToMapped.set(e,new l(t))}_getItem(e){return this._originalToMapped.get(e)}_queueGarbageCollection(){this._garbageCollectionQueued||(this._garbageCollectionQueued=!0,queueMicrotask((()=>this._garbageCollectCandidates())))}_garbageCollectCandidates(){this._garbageCollectionQueued=!1;const{_removedItemCandidates:e}=this,t=Array.from(e);e.clear(),t.forEach((e=>this._garbageCollectIfRemoved(e)))}_garbageCollectIfRemoved(e){const{_originalToMapped:t}=this,o=this._getItem(e);o?.removed&&(m(o.item),t.delete(e))}}class l{constructor(e){this.item=e,this.removed=!1}markRemoved(){return this.removed=!0,!0}}function m(e){"object"==typeof e&&e&&("destroy"in e&&"function"==typeof e.destroy?e.destroy():s(e))}function u(s,a,d){const l=new t,u=c(s,(t=>e((async e=>{const o=await a(t,e);if(n(e))throw m(o),i();return o}))),d),f=()=>null,g=async e=>{const t=await e.promise,o=u.indexOf(e);o<0||l.splice(o,1,t)};l.addMany(u.items.map(f));for(const e of u)r(g(e));const h=u.on("after-splice",(({added:e,start:t,deleteCount:o})=>{const s=l.splice(t,o);for(const r of s)m(r);if(e?.length){l.addMany(e.map(f),t);for(const t of e)r(g(t))}}));return l.addHandles([o(u),h]),l}export{c as mapCollection,u as mapCollectionAsync};
5
+ import{createTask as e}from"./asyncUtils.js";import t from"./Collection.js";import{removeIfHandle as o,destroyHandle as s}from"./handleUtils.js";import{isAborted as r,createAbortError as n,ignoreAbortErrors as i}from"./promiseUtils.js";import{on as a}from"./reactiveUtils.js";function c(e,o,s){const r=s?.createCollection?.()??new t,n=!!s?.recycleItems?new d:null,i=(e,t=0)=>{if(!e?.length)return;const o=r.splice(t,e.length);n?n.processRemoved(e):o.forEach(m)},c=(e,t=0)=>{if(!e?.length)return;const s=[];for(const r of e){const e=n?.use(r);if(e)s.push(e);else{const e=o(r);n?.register(r,e),s.push(e)}}r.addMany(s,t)},l=a(e,"after-splice",(({added:e,start:t,removed:o})=>{i(o,t),c(e,t)}),{sync:!0,onListenerRemove:e=>i(e.items),onListenerAdd:e=>c(e.items)});return r.addHandles(l),r}class d{constructor(){this._originalToMapped=new Map,this._removedItemCandidates=new Set,this._garbageCollectionQueued=!1}processRemoved(e){if(!e?.length)return;const{_removedItemCandidates:t}=this;for(const o of e)this._getItem(o)?.markRemoved()&&(t.add(o),this._queueGarbageCollection())}use(e){const t=this._getItem(e);return t&&(t.removed=!1),t?.item}register(e,t){this._originalToMapped.set(e,new l(t))}_getItem(e){return this._originalToMapped.get(e)}_queueGarbageCollection(){this._garbageCollectionQueued||(this._garbageCollectionQueued=!0,queueMicrotask((()=>this._garbageCollectCandidates())))}_garbageCollectCandidates(){this._garbageCollectionQueued=!1;const{_removedItemCandidates:e}=this,t=Array.from(e);e.clear(),t.forEach((e=>this._garbageCollectIfRemoved(e)))}_garbageCollectIfRemoved(e){const{_originalToMapped:t}=this,o=this._getItem(e);o?.removed&&(m(o.item),t.delete(e))}}class l{constructor(e){this.item=e,this.removed=!1}markRemoved(){return this.removed=!0,!0}}function m(e){"object"==typeof e&&e&&("destroy"in e&&"function"==typeof e.destroy?e.destroy():o(e))}function u(o,a,d){const l=new t,u=c(o,(t=>e((async e=>{const o=await a(t,e);if(r(e))throw m(o),n();return o}))),d),f=()=>null,g=async e=>{const t=await e.promise,o=u.indexOf(e);o<0||l.splice(o,1,t)};l.addMany(u.items.map(f));for(const e of u)i(g(e));const h=u.on("after-splice",(({added:e,start:t,deleteCount:o})=>{const s=l.splice(t,o);for(const r of s)m(r);if(e?.length){l.addMany(e.map(f),t);for(const t of e)i(g(t))}}));return l.addHandles([s(u),h]),l}export{c as mapCollection,u as mapCollectionAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{transpose as t,multiply as r,adjoint as s,set as i}from"./libs/gl-matrix-2/math/mat3.js";import{create as m}from"./libs/gl-matrix-2/factories/mat3f64.js";import{set as o}from"./libs/gl-matrix-2/math/vec2.js";import{i as a,q as e}from"../chunks/vec32.js";import{create as c}from"./libs/gl-matrix-2/factories/vec3f64.js";const f=c(),n=m(),l=m(),u=m();function p(r,s,i){return a(f,s[0],s[1],1),e(f,f,t(n,i)),0===f[2]?o(r,f[0],f[1]):o(r,f[0]/f[2],f[1]/f[2])}function j(t,i,m){return x(l,i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]),x(u,m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7]),r(t,s(l,l),u),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function x(m,o,c,l,u,p,j,x,b){i(m,o,l,p,c,u,j,1,1,1),a(f,x,b,1),s(n,m);const[g,h,v]=e(f,f,t(n,n));return i(n,g,0,0,0,h,0,0,0,v),r(m,n,m)}export{j as getProjectiveTransform,p as transformProjective};
5
+ import{transpose as t,multiply as r,adjoint as s,set as i}from"./libs/gl-matrix-2/math/mat3.js";import{create as o}from"./libs/gl-matrix-2/factories/mat3f64.js";import{set as m}from"./libs/gl-matrix-2/math/vec2.js";import{i as a,o as e}from"../chunks/vec32.js";import{create as c}from"./libs/gl-matrix-2/factories/vec3f64.js";const f=c(),n=o(),l=o(),u=o();function p(r,s,i){return a(f,s[0],s[1],1),e(f,f,t(n,i)),0===f[2]?m(r,f[0],f[1]):m(r,f[0]/f[2],f[1]/f[2])}function j(t,i,o){return x(l,i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]),x(u,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]),r(t,s(l,l),u),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function x(o,m,c,l,u,p,j,x,b){i(o,m,l,p,c,u,j,1,1,1),a(f,x,b,1),s(n,o);const[g,h,v]=e(f,f,t(n,n));return i(n,g,0,0,0,h,0,0,0,v),r(o,n,o)}export{j as getProjectiveTransform,p as transformProjective};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{deg2rad as r,rad2deg as t}from"../../core/mathUtils.js";import{getRotation as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{setAxisAngle as o,multiply as i,getAxisAngle as u}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{c as e,h as f,n as s,r as m}from"../../chunks/vec32.js";import{UNIT_X as a,UNIT_Y as l,UNIT_Z as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";function j(r=B){return[r[0],r[1],r[2],r[3]]}function h(r,t,n,o){return g(r,t,n,o,E)}function x(r,t){return g(r[0],r[1],r[2],t,E)}function b(r,t=j()){return g(r[0],r[1],r[2],r[3],t)}function g(r,t,n,o,i=j()){return i[0]=r,i[1]=t,i[2]=n,i[3]=o,i}function q(r,t,n=j()){return e(w(n),r),n[3]=t,n}function v(r,t,n){return f(n,r,t),s(n,n),n[3]=-m(r,t),n}function k(r,o=j()){const i=n(C,r);return A(o,t(u(o,i))),o}function U(r,n,c=j()){return o(C,w(r),z(r)),o(D,w(n),z(n)),i(C,D,C),A(c,t(u(w(c),C)))}function d(r,t,n,o=j()){return q(a,r,F),q(l,t,G),q(p,n,H),U(F,G,F),U(F,H,o),o}function w(r){return r}function y(r){return r[3]}function z(t){return r(t[3])}function A(r,t){return r[3]=t,r}const B=[0,0,1,0],C=c(),D=c(),E=j(),F=j(),G=j(),H=j();export{y as angle,z as angleRad,w as axis,U as compose,d as composeAxes,b as copy,j as create,q as fromAxisAndAngle,k as fromMatrix,v as fromPoints,g as fromValues,A as setAngle,B as up,h as wrap,x as wrapAxisAngle};
5
+ import{deg2rad as r,rad2deg as t}from"../../core/mathUtils.js";import{getRotation as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{setAxisAngle as o,multiply as i,getAxisAngle as u}from"../../core/libs/gl-matrix-2/math/quat.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/quatf64.js";import{c as e,h as f,n as s,p as m}from"../../chunks/vec32.js";import{UNIT_X as a,UNIT_Y as l,UNIT_Z as p}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";function j(r=B){return[r[0],r[1],r[2],r[3]]}function h(r,t,n,o){return g(r,t,n,o,E)}function x(r,t){return g(r[0],r[1],r[2],t,E)}function b(r,t=j()){return g(r[0],r[1],r[2],r[3],t)}function g(r,t,n,o,i=j()){return i[0]=r,i[1]=t,i[2]=n,i[3]=o,i}function q(r,t,n=j()){return e(w(n),r),n[3]=t,n}function v(r,t,n){return f(n,r,t),s(n,n),n[3]=-m(r,t),n}function k(r,o=j()){const i=n(C,r);return A(o,t(u(o,i))),o}function U(r,n,c=j()){return o(C,w(r),z(r)),o(D,w(n),z(n)),i(C,D,C),A(c,t(u(w(c),C)))}function d(r,t,n,o=j()){return q(a,r,F),q(l,t,G),q(p,n,H),U(F,G,F),U(F,H,o),o}function w(r){return r}function y(r){return r[3]}function z(t){return r(t[3])}function A(r,t){return r[3]=t,r}const B=[0,0,1,0],C=c(),D=c(),E=j(),F=j(),G=j(),H=j();export{y as angle,z as angleRad,w as axis,U as compose,d as composeAxes,b as copy,j as create,q as fromAxisAndAngle,k as fromMatrix,v as fromPoints,g as fromValues,A as setAngle,B as up,h as wrap,x as wrapAxisAngle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{floatEqualRelative as t,floatEqualAbsolute as n}from"../../../core/mathUtils.js";import{interpolateSegment as o,findClosestAndFurthestCurveParametersToPoint as r}from"./mathUtils.js";const s=[0,0];function c(t,n,o,r,s){const c=1-s,e=c*c,i=s*s,u=e*c,m=3*s*e,a=3*i*c,f=i*s;return[t[0]*u+n[0]*m+o[0]*a+r[0]*f,t[1]*u+n[1]*m+o[1]*a+r[1]*f]}function e(t,n,o){const r=t,[s,e,i]=n.b;return c(r,e,i,s,o)}function i(t,n,r){const c=t,[e,i,u]=n.b,m=o([0,0],c,i,r),a=o(s,i,u,r),f=o([0,0],u,e,r),h=o([0,0],m,a,r),p=o([0,0],a,f,r);return[{b:[o([],h,p,r),m,h]},{b:[[...e],p,f]}]}function u(o,s,e){const i=o,[u,m,a]=s.b,f=r(e,[.1,.5,.9],(t=>{const n=1-t,[o,r]=c(i,m,a,u,t);return[o,r,3*n*n*(m[0]-i[0])+6*n*t*(a[0]-m[0])+3*t*t*(u[0]-a[0]),3*n*n*(m[1]-i[1])+6*n*t*(a[1]-m[1])+3*t*t*(u[1]-a[1]),6*n*(a[0]-2*m[0]+i[0])+6*t*(u[0]-2*a[0]+m[0]),6*n*(a[1]-2*m[1]+i[1])+6*t*(u[1]-2*a[1]+m[1])]})).map((t=>Math.min(1,Math.max(0,t))));f.push(0,1);let h=1/0;const p=f.map((t=>{const n=c(i,m,a,u,t),[o,r]=n,s=e[0]-o,f=e[1]-r,p=Math.sqrt(s*s+f*f);return h=Math.min(p,h),{t,curvePoint:n,distance:p}})),b=[];for(const r of p){const{t:o,distance:s}=r;t(s,h)&&!b.some((({t})=>n(t,o)))&&b.push(r)}return b}export{u as closestPointsOnBezierCurve,e as interpolateBezierCurve,c as interpolateCubicBezier,i as splitBezierCurve};
5
+ import{floatEqualRelative as t,floatEqualAbsolute as n}from"../../../core/mathUtils.js";import{expandPointInPlace as o}from"../aaBoundingRect.js";import{interpolateSegment as r,findClosestAndFurthestCurveParametersToPoint as s,distance2 as c}from"./mathUtils.js";const e=[0,0];function u(t,n,o,r,s){const c=1-s,e=c*c,u=s*s,i=e*c,a=3*s*e,f=3*u*c,m=u*s;return[t[0]*i+n[0]*a+o[0]*f+r[0]*m,t[1]*i+n[1]*a+o[1]*f+r[1]*m]}function i(t,n,o){const r=t,[s,c,e]=n.b;return u(r,c,e,s,o)}function a(t,n,o){const s=t,[c,u,i]=n.b,a=r([0,0],s,u,o),f=r(e,u,i,o),m=r([0,0],i,c,o),h=r([0,0],a,f,o),p=r([0,0],f,m,o);return[{b:[r([],h,p,o),a,h]},{b:[[...c],p,m]}]}function f(o,r,c){const e=o,[i,a,f]=r.b,m=s(c,[.1,.5,.9],(t=>{const n=1-t,[o,r]=u(e,a,f,i,t);return[o,r,3*n*n*(a[0]-e[0])+6*n*t*(f[0]-a[0])+3*t*t*(i[0]-f[0]),3*n*n*(a[1]-e[1])+6*n*t*(f[1]-a[1])+3*t*t*(i[1]-f[1]),6*n*(f[0]-2*a[0]+e[0])+6*t*(i[0]-2*f[0]+a[0]),6*n*(f[1]-2*a[1]+e[1])+6*t*(i[1]-2*f[1]+a[1])]})).map((t=>Math.min(1,Math.max(0,t))));m.push(0,1);let h=1/0;const p=m.map((t=>{const n=u(e,a,f,i,t),[o,r]=n,s=c[0]-o,m=c[1]-r,p=Math.sqrt(s*s+m*m);return h=Math.min(p,h),{t,curvePoint:n,distance:p}})),b=[];for(const s of p){const{t:o,distance:r}=s;t(r,h)&&!b.some((({t})=>n(t,o)))&&b.push(s)}return b}function m(t,n,r){const s=n,[c,e,u]=r.b;return o(t,s),o(t,e),o(t,u),o(t,c),t}function h(t,n,o){const r=16;let s=0,e=[n];for(let u=0;u<r;u++){let n=t;const r=[];for(const t of e)r.push(...a(n,t,.5)),n=t.b[0];e=r,n=t,s=0;let u=0;for(const t of e){const[o,r,e]=t.b,i=Math.sqrt(c(n,o));s+=(i+(Math.sqrt(c(n,r))+Math.sqrt(c(r,e))+Math.sqrt(c(e,o))))/2,u+=i,n=o}if(s-u<o)return s}return s}export{m as bezierCurveExtent,h as bezierCurveLength,f as closestPointsOnBezierCurve,i as interpolateBezierCurve,u as interpolateCubicBezier,a as splitBezierCurve};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{distance2 as t,wrapAtan2 as s,matchWindingAndWrap as a}from"./mathUtils.js";const n=2*Math.PI;class h{constructor(t,s,a,n,h,c){this.cx=t,this.cy=s,this.radius=a,this.thetaStart=n,this.thetaEnd=h,this.isInvalid=c}}function c(t,s){const{cx:a,cy:n,radius:h,thetaStart:c,thetaEnd:i}=t,r=c*(1-s)+i*s;return[a+h*Math.cos(r),n+h*Math.sin(r)]}function i(h,i){const{cx:r,cy:o,thetaStart:e,thetaEnd:u}=h,[M,d]=i;let l=s(d-o,M-r);l=a(l,e,u);const m=l-e;let f=m/(u-e);if(f<0||f>1){const t=Math.abs(m)%n,s=Math.abs(l-u)%n;f=Math.min(s,n-s)<Math.min(t,n-t)?1:0}const x=c(h,f);return{t:f,curvePoint:x,distance:Math.sqrt(t(i,x))}}export{h as DerivedCircle,i as closestPointOnCircle,c as interpolateCircle};
5
+ import{expandPointInPlace as t}from"../aaBoundingRect.js";import{distance2 as n,wrapAtan2 as a,matchWindingAndWrap as s}from"./mathUtils.js";const c=2*Math.PI;class r{constructor(t,n,a,s,c,r){this.cx=t,this.cy=n,this.radius=a,this.thetaStart=s,this.thetaEnd=c,this.isInvalid=r}}function h(t,n){const{cx:a,cy:s,radius:c}=t;return[a+c*Math.cos(n),s+c*Math.sin(n)]}function i(t,n){const{thetaStart:a,thetaEnd:s}=t;return h(t,a*(1-n)+s*n)}function o(t,r){const{cx:h,cy:o,thetaStart:e,thetaEnd:u}=t,[d,M]=r;let f=a(M-o,d-h);f=s(f,e,u);const l=f-e;let m=l/(u-e);if(m<0||m>1){const t=Math.abs(l)%c,n=Math.abs(f-u)%c;m=Math.min(n,c-n)<Math.min(t,c-t)?1:0}const E=i(t,m);return{t:m,curvePoint:E,distance:Math.sqrt(n(r,E))}}function e(n,a){const{thetaStart:c,thetaEnd:r}=a,i=r-c;t(n,h(a,c)),t(n,h(a,r));for(let o=0;o<4;o++){let e=o*(Math.PI/2);e=s(e,c,r);const u=(e-c)/i;u>0&&u<1&&t(n,h(a,e))}return n}function u(t){const{radius:n,thetaStart:a,thetaEnd:s}=t;return n*Math.abs(s-a)}export{r as DerivedCircle,e as circularCurveExtent,u as circularCurveLength,o as closestPointOnCircle,i as interpolateCircle};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{expandPointInPlace as r}from"../aaBoundingRect.js";import{bezierCurveExtent as i}from"./bezierCurveUtils.js";import{circularCurveExtent as t}from"./circleUtils.js";import{deriveCircleFromCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as s,isCircularArc as c,isEllipticArc as n,isEllipticArc4 as e}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as f}from"./ellipticArc4Utils.js";import{ellipticArcExtent as l}from"./ellipticArc7Utils.js";function m(m,u,p){if(s(p))return i(m,u,p);if(c(p)){const i=o(u,p);if(i.isInvalid){const[i,t]=p.c;return r(m,u),r(m,i),r(m,t),m}return t(m,i)}if(n(p)){if(e(p)){const i=f(u,p);if(i.isInvalid){const[i,t]=p.a;return r(m,u),r(m,i),m}return t(m,i)}return l(m,u,p)}return m}export{m as curveExtent};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{bezierCurveLength as r}from"./bezierCurveUtils.js";import{circularCurveLength as i}from"./circleUtils.js";import{deriveCircleFromCircularArc as t}from"./circularArcUtils.js";import{isBezierCurve as s,isCircularArc as o,isEllipticArc as l,isEllipticArc4 as m}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as c}from"./ellipticArc4Utils.js";import{ellipticArcLength as e}from"./ellipticArc7Utils.js";import{distance2 as f}from"./mathUtils.js";function n(n,p,u=1){if(s(p))return r(n,p,u);if(o(p)){const r=t(n,p);return r.isInvalid?Math.sqrt(f(n,p.c[0])):i(r)}if(l(p)){if(m(p)){const r=c(n,p);return r.isInvalid?Math.sqrt(f(n,p.a[0])):i(r)}return e(n,p,u)}return 0}export{n as curveLength};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{interpolateCubicBezier as t}from"./bezierCurveUtils.js";import{deriveCircleFromCircularArc as s}from"./circularArcUtils.js";import{isCurvedGeometry as i,getCurves as n,getEndpoint as r,isCoordinate as e,isBezierCurve as a,isCircularArc as h,isEllipticArc as c,isEllipticArc4 as o,isEllipticArc7 as u}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as p}from"./ellipticArc4Utils.js";import{deriveEllipse as d,interpolateEllipse as l}from"./ellipticArc7Utils.js";import{interpolateSegment as S,pointToSegmentDistance2 as m,distance2 as E}from"./mathUtils.js";const f={maxSegmentLength:1/0,maxDeviation:1/0,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1},v=1e-6,g=[0,0];class P{constructor(t,s){this.curveStart=t,this.curveEnd=s,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,s){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(s)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:s,maxSegmentLength:i,maxSegmentsPerCurve:n,minSegmentsPerCurve:r}){const e=i*i,a=s*s,h=1/n,c=this.interpolate(0),o=this.interpolate(1);E(this.curveStart,c)>v&&t.push(c),this.initialize(c,o);const u=1/r;for(let p=r-1;p>0;p--){const t=p*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<h||(0===e||!isFinite(e)||E(this.arcStart,this.arcEnd)<e)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return E(this.curveEnd,o)>v&&t.push([...this.curveEnd]),t}}class x extends P{constructor(t,s){const[i,n,r]=s.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[n,r],this._arcControlPoints=[n,r],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:s,arcEnd:i,tStart:n,tEnd:r}=this,[e,a]=this._arcControlPoints,h=(t-n)/(r-n),c=S([],s,e,h),o=S(g,e,a,h),u=S([],a,i,h),p=S([],c,o,h),d=S([],o,u,h),l=S([],p,d,h);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,u]),this.tEndStack.push(t),this.arcEndStack.push(l),this._arcControlPoints[0]=c,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(s){const{curveStart:i,curveEnd:n}=this,[r,e]=this._curveControlPoints;return t(i,r,e,n,s)}getDeviation2(){const{arcStart:t,arcEnd:s}=this,[i,n]=this._arcControlPoints;return Math.max(m(i,t,s),m(n,t,s))}}class k extends P{constructor(t,s){const[i]=s.a;super(t,i),this._derivedEllipse=d(t,s)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return l(this._derivedEllipse,t)}getDeviation2(){return m(this._arcMid,this.arcStart,this.arcEnd)}}function C(t,s,i,{cx:n,cy:r,radius:e,thetaStart:a,thetaEnd:h},{maxDeviation:c,maxSegmentLength:o,maxSegmentsPerCurve:u,minSegmentsPerCurve:p}){const d=2*e,l=[n+e*Math.cos(a),r+e*Math.sin(a)],S=[n+e*Math.cos(h),r+e*Math.sin(h)];E(s,l)>v&&t.push(l);const m=Math.abs(h-a),f=o<d?2*Math.asin(o/d):m,g=c<=e?2*Math.acos(1-c/e):m,P=Math.min(f,g),x=Math.min(u,Math.max(p,Math.ceil(Math.abs(m/P)))),k=1/x;for(let E=1;E<x;E++){const s=E*k,i=a*(1-s)+h*s;t.push([n+e*Math.cos(i),r+e*Math.sin(i)])}return t.push(S),E(i,S)>v&&t.push([...i]),t}function _(t,s,i,n){return new x(s,i).densify(t,n)}function M(t,i,n,r){const e=s(i,n),[a]=n.c;return e.isInvalid?(t.push([...a]),t):C(t,i,a,e,r)}function D(t,s,i,n){const r=p(s,i),[e]=i.a;return C(t,s,e,r,n)}function A(t,s,i,n){return new k(s,i).densify(t,n)}function j(t,s,i,n){if(e(i))return t.push([...i]),t;if(a(i))return _(t,s,i,n);if(h(i))return M(t,s,i,n);if(c(i)){if(o(i))return D(t,s,i,n);if(u(i))return A(t,s,i,n)}return t}function L(t,s){if(!i(t))return t;const e=n(t),a=[];for(const i of e){const t=[];for(let n=0,e=1;e<i.length;n=e++){const a=r(i[n]);0===n&&t.push(a);j(t,a,i[e],{maxSegmentLength:s.maxSegmentLength??f.maxSegmentLength,maxDeviation:s.maxDeviation??f.maxDeviation,maxSegmentsPerCurve:s.maxSegmentsPerCurve??f.maxSegmentsPerCurve,minSegmentsPerCurve:Math.max(s.minSegmentsPerCurve??f.minSegmentsPerCurve,1)})}a.push(t)}return"curvePaths"in t?{paths:a,spatialReference:t.spatialReference}:{rings:a,spatialReference:t.spatialReference}}export{L as densifyCurvedGeometry};
5
+ import{interpolateCubicBezier as t}from"./bezierCurveUtils.js";import{deriveCircleFromCircularArc as s}from"./circularArcUtils.js";import{isCurvedGeometry as i,getCurves as n,getEndpoint as r,isCoordinate as e,isBezierCurve as a,isCircularArc as h,isEllipticArc as c,isEllipticArc4 as o,isEllipticArc7 as u}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as p}from"./ellipticArc4Utils.js";import{deriveEllipse as d,interpolateEllipse as l}from"./ellipticArc7Utils.js";import{interpolateSegment as S,pointToSegmentDistance2 as m,distance2 as E}from"./mathUtils.js";const f={maxSegmentLength:1/0,maxDeviation:1/0,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1},v=1e-6,g=[0,0];class P{constructor(t,s){this.curveStart=t,this.curveEnd=s,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,s){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(s)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:s,maxSegmentLength:i,maxSegmentsPerCurve:n,minSegmentsPerCurve:r}){const e=i*i,a=s*s,h=1/n,c=this.interpolate(0),o=this.interpolate(1);E(this.curveStart,c)>v&&t.push(c),this.initialize(c,o);const u=1/r;for(let p=r-1;p>0;p--){const t=p*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<h||(0===e||!isFinite(e)||E(this.arcStart,this.arcEnd)<e)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return E(this.curveEnd,o)>v&&t.push([...this.curveEnd]),t}}class x extends P{constructor(t,s){const[i,n,r]=s.b;super(t,i),this._controlPointsStack=[],this._curveControlPoints=[n,r],this._arcControlPoints=[n,r],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:s,arcEnd:i,tStart:n,tEnd:r}=this,[e,a]=this._arcControlPoints,h=(t-n)/(r-n),c=S([],s,e,h),o=S(g,e,a,h),u=S([],a,i,h),p=S([],c,o,h),d=S([],o,u,h),l=S([],p,d,h);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([d,u]),this.tEndStack.push(t),this.arcEndStack.push(l),this._arcControlPoints[0]=c,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(s){const{curveStart:i,curveEnd:n}=this,[r,e]=this._curveControlPoints;return t(i,r,e,n,s)}getDeviation2(){const{arcStart:t,arcEnd:s}=this,[i,n]=this._arcControlPoints;return Math.max(m(i,t,s),m(n,t,s))}}class k extends P{constructor(t,s){const[i]=s.a;super(t,i),this._derivedEllipse=d(t,s)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return l(this._derivedEllipse,t)}getDeviation2(){return m(this._arcMid,this.arcStart,this.arcEnd)}}function C(t,s,i,{cx:n,cy:r,radius:e,thetaStart:a,thetaEnd:h,isInvalid:c},{maxDeviation:o,maxSegmentLength:u,maxSegmentsPerCurve:p,minSegmentsPerCurve:d}){if(c)return t.push([...i]),t;const l=2*e,S=[n+e*Math.cos(a),r+e*Math.sin(a)],m=[n+e*Math.cos(h),r+e*Math.sin(h)];E(s,S)>v&&t.push(S);const f=Math.abs(h-a),g=u<l?2*Math.asin(u/l):f,P=o<=e?2*Math.acos(1-o/e):f,x=Math.min(g,P),k=Math.min(p,Math.max(d,Math.ceil(Math.abs(f/x)))),C=1/k;for(let E=1;E<k;E++){const s=E*C,i=a*(1-s)+h*s;t.push([n+e*Math.cos(i),r+e*Math.sin(i)])}return t.push(m),E(i,m)>v&&t.push([...i]),t}function _(t,s,i,n){return new x(s,i).densify(t,n)}function M(t,i,n,r){const e=s(i,n),[a]=n.c;return C(t,i,a,e,r)}function D(t,s,i,n){const r=p(s,i),[e]=i.a;return C(t,s,e,r,n)}function A(t,s,i,n){const[r,e,a,h,c,o,u]=i.a;return 0===o||0===u?(t.push([...r]),t):new k(s,i).densify(t,n)}function j(t,s,i,n){if(e(i))return t.push([...i]),t;if(a(i))return _(t,s,i,n);if(h(i))return M(t,s,i,n);if(c(i)){if(o(i))return D(t,s,i,n);if(u(i))return A(t,s,i,n)}return t}function L(t,s){if(!i(t))return t;const e=n(t),a=[];for(const i of e){const t=[];for(let n=0,e=1;e<i.length;n=e++){const a=r(i[n]);0===n&&t.push(a);j(t,a,i[e],{maxSegmentLength:s.maxSegmentLength??f.maxSegmentLength,maxDeviation:s.maxDeviation??f.maxDeviation,maxSegmentsPerCurve:s.maxSegmentsPerCurve??f.maxSegmentsPerCurve,minSegmentsPerCurve:Math.max(s.minSegmentsPerCurve??f.minSegmentsPerCurve,1)})}a.push(t)}return"curvePaths"in t?{paths:a,spatialReference:t.spatialReference}:{rings:a,spatialReference:t.spatialReference}}export{L as densifyCurvedGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{DerivedCircle as t,interpolateCircle as a}from"./circleUtils.js";import{correctSweepAndWinding as r,wrapAtan2 as n}from"./mathUtils.js";function o(a,o){const[s,c]=o.a,[h,e]=a,[i,m]=s,[M,f]=c,u=h-M,l=e-f,p=Math.sqrt(u*u+l*l),b=n(e-f,h-M),j=r(n(m-f,i-M),b,o);return new t(M,f,p,b,j,!1)}function s(t,r,n){const{cx:o,cy:s,thetaStart:c,thetaEnd:h}=t,[e,i,m,M]=r.a,f=c*(1-n)+h*n;return[{a:[a(t,n),[o,s],Math.abs(f-c)<Math.PI?1:0,M]},{a:[[...e],[o,s],Math.abs(h-f)<Math.PI?1:0,M]}]}export{o as deriveCircleFromEllipticArc4,s as splitEllipticArc4};
5
+ import{floatEqualRelative as t}from"../../../core/mathUtils.js";import{DerivedCircle as a,interpolateCircle as r}from"./circleUtils.js";import{correctSweepAndWinding as o,wrapAtan2 as s}from"./mathUtils.js";function h(r,h){const[n,c]=h.a,[i,e]=r,[m,M]=n,[f,l]=c,p=i-f,u=e-l,j=Math.sqrt(p*p+u*u),U=m-f,b=M-l,q=Math.sqrt(U*U+b*b),x=0===j||0===q||!t(j,q),I=j,P=s(e-l,i-f),d=o(s(M-l,m-f),P,h);return new a(f,l,I,P,d,x)}function n(t,a,o){const{cx:s,cy:h,thetaStart:n,thetaEnd:c}=t,[i,e,m,M]=a.a,f=n*(1-o)+c*o;return[{a:[r(t,o),[s,h],Math.abs(f-n)<Math.PI?1:0,M]},{a:[[...i],[s,h],Math.abs(c-f)<Math.PI?1:0,M]}]}export{h as deriveCircleFromEllipticArc4,n as splitEllipticArc4};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{cloneCurve as t}from"./curveUtils.js";import{correctSweepAndWinding as s,wrapAtan2 as n,findClosestAndFurthestCurveParametersToPoint as c,matchWindingAndWrap as o}from"./mathUtils.js";class i{constructor(t,s,n,c,o,i,r,u){this.cx=t,this.cy=s,this.a=n,this.b=c,this.cosR=o,this.sinR=i,this.u1=r,this.u2=u}}function r(t,c){const[o,r,u,a,h,e,f]=c.a,[M,m]=t,[R,b]=o,[p,l]=r,P=e*f,x=Math.cos(h),I=Math.sin(h),j=n(1/P*(m-l)*x-1/P*(M-p)*I,1/e*(m-l)*I+1/e*(M-p)*x),v=s(n(1/P*(b-l)*x-1/P*(R-p)*I,1/e*(b-l)*I+1/e*(R-p)*x),j,c);return new i(p,l,e,P,x,I,j,v)}function u(t,s){const{a:n,b:c,cosR:o,sinR:i,cx:r,cy:u}=t,a=Math.cos(s),h=Math.sin(s);return[n*a*o-c*h*i+r,n*a*i+c*h*o+u]}function a(t,s){const{u1:n,u2:c}=t;return u(t,n*(1-s)+c*s)}function h(s,n,c){if(c<0||c>1)return[];if(0===c||1===c)return[t(n)];const[o,[i,r],u,h,e,f,M]=n.a,{u1:m,u2:R}=s,b=m*(1-c)+R*c;return[{a:[[...a(s,c)],[i,r],Math.abs(b-m)<Math.PI?1:0,h,e,f,M]},{a:[[...o],[i,r],Math.abs(R-b)<Math.PI?1:0,h,e,f,M]}]}function e(t,s){const{a:n,b:i,cosR:r,sinR:a,u1:h,u2:e}=t,f=Math.PI/6,M=c(s,[1*f,2*f,4*f,5*f,7*f,8*f,10*f,11*f],(s=>{const c=Math.cos(s),o=Math.sin(s),[h,e]=u(t,s);return[h,e,-n*r*o-i*a*c,-n*a*o+i*r*c,-n*r*c+i*a*o,-n*a*c-i*r*o]})).map((t=>o(t,h,e)));M.push(h,e);let m,R,b=1/0;for(const c of M){const n=(c-h)/(e-h);if(n<0||n>1)continue;const o=u(t,c),[i,r]=o,a=s[0]-i,f=s[1]-r,M=a*a+f*f;M<b&&(m=n,R=o,b=M)}return{t:m,curvePoint:R,distance:Math.sqrt(b)}}export{i as DerivedEllipse,e as closestPointOnEllipse,r as deriveEllipse,a as interpolateEllipse,h as splitEllipticArc7};
5
+ import{set as t,invert as s,transpose as n,multiply as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{transformMat3 as a}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as c}from"../aaBoundingRect.js";import{cloneCurve as i}from"./curveUtils.js";import{correctSweepAndWinding as u,wrapAtan2 as h,findClosestAndFurthestCurveParametersToPoint as e,matchWindingAndWrap as f,distance2 as M,intersectLineLine as l}from"./mathUtils.js";class m{constructor(t,s,n,o,r,a,c,i,u){this.cx=t,this.cy=s,this.a=n,this.b=o,this.cosR=r,this.sinR=a,this.u1=c,this.u2=i,this.isInvalid=u}}function b(t,s){const[n,o,r,a,c,i,e]=s.a,[f,M]=t,[l,b]=n,[p,R]=o,q=i*e,I=Math.cos(c),g=Math.sin(c),x=h(1/q*(M-R)*I-1/q*(f-p)*g,1/i*(M-R)*g+1/i*(f-p)*I),j=u(h(1/q*(b-R)*I-1/q*(l-p)*g,1/i*(b-R)*g+1/i*(l-p)*I),x,s);return new m(p,R,i,q,I,g,x,j,0===i||0===q)}function p(t,s){const{a:n,b:o,cosR:r,sinR:a,cx:c,cy:i}=t,u=Math.cos(s),h=Math.sin(s);return[n*u*r-o*h*a+c,n*u*a+o*h*r+i]}function R(t,s){const{u1:n,u2:o}=t;return p(t,n*(1-s)+o*s)}function q(t,s,n){if(n<0||n>1)return[];if(0===n||1===n)return[i(s)];const[o,[r,a],c,u,h,e,f]=s.a,{u1:M,u2:l}=t,m=M*(1-n)+l*n;return[{a:[[...R(t,n)],[r,a],Math.abs(m-M)<Math.PI?1:0,u,h,e,f]},{a:[[...o],[r,a],Math.abs(l-m)<Math.PI?1:0,u,h,e,f]}]}function I(t,s){const{a:n,b:o,cosR:r,sinR:a,u1:c,u2:i}=t,u=Math.PI/6,h=e(s,[1*u,2*u,4*u,5*u,7*u,8*u,10*u,11*u],(s=>{const c=Math.cos(s),i=Math.sin(s),[u,h]=p(t,s);return[u,h,-n*r*i-o*a*c,-n*a*i+o*r*c,-n*r*c+o*a*i,-n*a*c-o*r*i]})).map((t=>f(t,c,i)));h.push(c,i);let M,l,m=1/0;for(const e of h){const n=(e-c)/(i-c);if(n<0||n>1)continue;const o=p(t,e),[r,a]=o,u=s[0]-r,h=s[1]-a,f=u*u+h*h;f<m&&(M=n,l=o,m=f)}return{t:M,curvePoint:l,distance:Math.sqrt(m)}}function g(t,s,n){const o=b(s,n),{a:r,b:a,u1:i,u2:u,cosR:h,sinR:e,isInvalid:M}=o,l=u-i,m=n.a[0];if(c(t,s),c(t,m),M)return t;const R=Math.atan2(-a*e,r*h),q=R+Math.PI,I=Math.atan2(a*h,r*e),g=I+Math.PI;for(const b of[R,q,I,g]){const s=f(b,i,u),n=(s-i)/l;n>0&&n<1&&c(t,p(o,s))}return t}function x(t,s,n){const[o,r,a,c,i,u,h]=s.a,e=b(t,s),{u1:f,u2:m,isInvalid:q}=e,I=m-f;if(q)return Math.sqrt(M(t,o));const g=14,x=[0,0];let j=0,v=[R(e,0),R(e,.25),R(e,.5),R(e,.75),R(e,1)];for(let b=0;b<g;b++){const t=v.length-1,s=I/(2*t),o=[];for(let n=0;n<t;n++)o.push(v[n]),o.push(p(e,f+(2*n+1)*s));o.push(v[v.length-1]),v=o,j=0;let a=0;for(let n=1;n<v.length;n++){const t=v[n-1],s=v[n];if(j+=Math.sqrt(M(t,s)),n>1){const o=v[n-2],c=l(x,o,t,r,s);a+=c?Math.sqrt(M(t,c)):Math.abs(s[0]-t[0])+Math.abs(s[1]-t[1])}else a+=j}if(a-j<n)return j}return j}const j=r(),v=r(),P=r(),d=r();function y(r,c,i){const[u,e,f,l,m,p,R]=c.a,q=b(r,c),{cosR:I,sinR:g,a:x,b:y,cx:U,cy:w}=q,B=a([0,0],u,i),k=a([0,0],e,i),z=i[0]*i[4]<0?1-l:l;{const s=x*x*g*g+y*y*I*I,n=2*(y*y-x*x)*g*I,o=x*x*I*I+y*y*g*g,r=-2*s*U-n*w,a=-n*U-2*o*w;t(j,s,n/2,r/2,n/2,o,a/2,r/2,a/2,s*U*U+n*U*w+o*w*w-x*x*y*y)}if(s(v,i),null==v){const t=a([0,0],r,i);return{a:[B,k,f,l,h(B[1],B[0]),Math.sqrt(M(B,t))/2,0]}}n(P,v),o(d,o(d,P,j),v);{const t=d[0],s=2*d[1],n=d[4],o=2*d[2],r=2*d[5],a=s*s-4*t*n,c=2*(t*r*r+n*o*o-s*o*r+a*d[8]),i=Math.sqrt((t-n)**2+s*s),u=-Math.sqrt(c*(t+n+i))/a,e=-Math.sqrt(c*(t+n-i))/a;return{a:[B,k,f,z,.5*h(-s,n-t),u,e/u]}}}export{m as DerivedEllipse,I as closestPointOnEllipse,b as deriveEllipse,g as ellipticArcExtent,x as ellipticArcLength,R as interpolateEllipse,q as splitEllipticArc7,y as transformEllipticArc};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{squaredDistance as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";function r(t,n,r,o){return t[0]=n[0]*(1-o)+r[0]*o,t[1]=n[1]*(1-o)+r[1]*o,t}function o(t,r){return n(t,r)}function a(t,n,r){const a=o(n,r);if(0===a)return o(n,t);const c=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return c*c/a}function c(t,n){const r=Math.atan2(t,n);return r<0?r+2*Math.PI:r}function u(n,r,o){const[a,c,u,e]=o.a,i=Math.abs(n-r),h=i>Math.PI,s=i<Math.PI,M=t(i,Math.PI);return(!M&&(h&&u||s&&!u)||M&&(n>r&&e||n<r&&!e))&&(n+=2*(Math.sign(r-n)||1)*Math.PI),n}function e(t,n,r){const o=2*Math.PI,a=t-n;return(r-n)*a<0?t-=(Math.trunc(a/o)+Math.sign(a))*o:a>=o&&(t-=Math.trunc(a/o)*o),t}function i(t,n,r,o=10){return n.map((n=>{let a=n;for(let c=0;c<o;c++){const[n,o,c,u,e,i]=r(a),h=t[0]-n,s=t[1]-o,M=-c,f=-u;a+=-(2*h*M+2*s*f)/(2*M*M+2*h*-e+2*f*f+2*s*-i||1e-6)}return a}))}export{u as correctSweepAndWinding,o as distance2,i as findClosestAndFurthestCurveParametersToPoint,r as interpolateSegment,e as matchWindingAndWrap,a as pointToSegmentDistance2,c as wrapAtan2};
5
+ import{floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{squaredDistance as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";function r(t,n,r,o){return t[0]=n[0]*(1-o)+r[0]*o,t[1]=n[1]*(1-o)+r[1]*o,t}function o(t,r){return n(t,r)}function u(t,n,r){const u=o(n,r);if(0===u)return o(n,t);const c=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return c*c/u}function c(t,n,r,o,u){const[c,a]=n,[e,i]=r,[s,h]=o,[f,M]=u,m=(c-e)*(h-M)-(a-i)*(s-f);if(0===m)return null;const l=(c*i-a*e)*(s-f)-(c-e)*(s*M-h*f),I=(c*i-a*e)*(h-M)-(a-i)*(s*M-h*f);return t[0]=l/m,t[1]=I/m,t}function a(t,n){const r=Math.atan2(t,n);return r<0?r+2*Math.PI:r}function e(n,r,o){const[u,c,a,e]=o.a,i=Math.abs(n-r),s=i>Math.PI,h=i<Math.PI,f=t(i,Math.PI);return(!f&&(s&&a||h&&!a)||f&&(n>r&&e||n<r&&!e))&&(n+=2*(Math.sign(r-n)||1)*Math.PI),n}function i(t,n,r){const o=2*Math.PI,u=t-n;return(r-n)*u<0?t-=(Math.trunc(u/o)+Math.sign(u))*o:u>=o&&(t-=Math.trunc(u/o)*o),t}function s(t,n,r,o=10){return n.map((n=>{let u=n;for(let c=0;c<o;c++){const[n,o,c,a,e,i]=r(u),s=t[0]-n,h=t[1]-o,f=-c,M=-a;u+=-(2*s*f+2*h*M)/(2*f*f+2*s*-e+2*M*M+2*h*-i||1e-6)}return u}))}export{e as correctSweepAndWinding,o as distance2,s as findClosestAndFurthestCurveParametersToPoint,r as interpolateSegment,c as intersectLineLine,i as matchWindingAndWrap,u as pointToSegmentDistance2,a as wrapAtan2};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{closestPointsOnBezierCurve as t,splitBezierCurve as r}from"./bezierCurveUtils.js";import{closestPointOnCircle as i}from"./circleUtils.js";import{deriveCircleFromCircularArc as n,splitCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as c,isCircularArc as s,isEllipticArc as e,isEllipticArc4 as u,cloneCurve as f}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as l,splitEllipticArc4 as m}from"./ellipticArc4Utils.js";import{deriveEllipse as p,closestPointOnEllipse as a,splitEllipticArc7 as j}from"./ellipticArc7Utils.js";const U=1e-6;function d(i,n,o,c){const s=t(i,n,o).filter((({distance:t})=>t<=c)),e=[];let u=0,f=n;for(const{t}of s){const n=(t-u)/(1-u);if(n<U||1-n<U)continue;const[o,c]=r(i,f,t);e.push(o),f=c,u=t}return e.push(f),e}function v(t,r,c,s){const e=n(t,r);if(e.isInvalid)return[f(r)];const{t:u,distance:l}=i(e,c);return l<=s?o(e,r,u):[f(r)]}function A(t,r,n,o){const c=l(t,r),{t:s,distance:e}=i(c,n);return e<=o?m(c,r,s):[f(r)]}function h(t,r,i,n){const o=p(t,r),{t:c,distance:s}=a(o,i);return s<=n?j(o,r,c):[f(r)]}function b(t,r,i,n){return c(r)?d(t,r,i,n):s(r)?v(t,r,i,n):e(r)?u(r)?A(t,r,i,n):h(t,r,i,n):[f(r)]}export{b as splitCurveAtPoint};
5
+ import{closestPointsOnBezierCurve as t,splitBezierCurve as i}from"./bezierCurveUtils.js";import{closestPointOnCircle as r}from"./circleUtils.js";import{deriveCircleFromCircularArc as n,splitCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as s,isCircularArc as c,isEllipticArc as e,isEllipticArc4 as u,cloneCurve as f}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as l,splitEllipticArc4 as m}from"./ellipticArc4Utils.js";import{deriveEllipse as p,closestPointOnEllipse as a,splitEllipticArc7 as d}from"./ellipticArc7Utils.js";const j=1e-6;function U(r,n,o,s){const c=t(r,n,o).filter((({distance:t})=>t<=s)),e=[];let u=0,f=n;for(const{t}of c){const n=(t-u)/(1-u);if(n<j||1-n<j)continue;const[o,s]=i(r,f,t);e.push(o),f=s,u=t}return e.push(f),e}function v(t,i,s,c){const e=n(t,i);if(e.isInvalid)return[f(i)];const{t:u,distance:l}=r(e,s);return l<=c?o(e,i,u):[f(i)]}function A(t,i,n,o){const s=l(t,i);if(s.isInvalid)return[f(i)];const{t:c,distance:e}=r(s,n);return e<=o?m(s,i,c):[f(i)]}function I(t,i,r,n){const o=p(t,i);if(o.isInvalid)return[f(i)];const{t:s,distance:c}=a(o,r);return c<=n?d(o,i,s):[f(i)]}function h(t,i,r,n){return s(i)?U(t,i,r,n):c(i)?v(t,i,r,n):e(i)?u(i)?A(t,i,r,n):I(t,i,r,n):[f(i)]}export{h as splitCurveAtPoint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ObjectStack as T}from"../../core/ObjectStack.js";import{multiply as _,invert as O}from"../../core/libs/gl-matrix-2/math/mat4.js";import{i as R}from"../../chunks/vec32.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as r}from"../../chunks/vec42.js";import{fromValues as A}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as E,fromLineSegmentAndDirection as F,create as o}from"./clipRay.js";import{create as n,fromPoints as e,signedDistance as c,clip as f,copy as i,clipInfinite as B}from"./plane.js";import{sm4d as M,sv4d as G}from"./vectorStacks.js";function H(T){return T?[n(T[0]),n(T[1]),n(T[2]),n(T[3]),n(T[4]),n(T[5])]:[n(),n(),n(),n(),n(),n()]}function I(){return[t(),t(),t(),t(),t(),t(),t(),t()]}function N(T,_){for(let O=0;O<b;O++)i(T[O],_[O]);return T}function L(T,t,A,E=y){const F=_(M.get(),t,T);O(F,F);for(let _=0;_<h;++_){const T=r(G.get(),k[_],F);R(E[_],T[0]/T[3],T[1]/T[3],T[2]/T[3])}P(A,E)}function P(T,_){e(_[g.FAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_TOP_LEFT],T[j.LEFT]),e(_[g.NEAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_RIGHT],_[g.FAR_TOP_RIGHT],T[j.RIGHT]),e(_[g.FAR_BOTTOM_LEFT],_[g.FAR_BOTTOM_RIGHT],_[g.NEAR_BOTTOM_RIGHT],T[j.BOTTOM]),e(_[g.NEAR_TOP_LEFT],_[g.NEAR_TOP_RIGHT],_[g.FAR_TOP_RIGHT],T[j.TOP]),e(_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_RIGHT],_[g.NEAR_TOP_RIGHT],T[j.NEAR]),e(_[g.FAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_LEFT],_[g.FAR_TOP_LEFT],T[j.FAR])}function s(T,_){for(let O=0;O<b;O++){const R=T[O];if(R[0]*_[0]+R[1]*_[1]+R[2]*_[2]+R[3]>=_[3])return!1}return!0}function u(T,_){return p(T,E(_,x.get()))}function m(T,_){for(let O=0;O<b;O++){const R=T[O];if(!B(R,_))return!1}return!0}function a(T,_,O){return p(T,F(_,O,x.get()))}function l(T,_){for(let O=0;O<b;O++){if(c(T[O],_)>0)return!1}return!0}function p(T,_){for(let O=0;O<b;O++)if(!f(T[O],_))return!1;return!0}var j,g;!function(T){T[T.LEFT=0]="LEFT",T[T.RIGHT=1]="RIGHT",T[T.BOTTOM=2]="BOTTOM",T[T.TOP=3]="TOP",T[T.NEAR=4]="NEAR",T[T.FAR=5]="FAR"}(j||(j={})),function(T){T[T.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",T[T.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",T[T.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",T[T.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",T[T.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",T[T.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",T[T.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",T[T.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(g||(g={}));const v={bottom:[g.FAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_LEFT,g.FAR_BOTTOM_LEFT],near:[g.NEAR_BOTTOM_LEFT,g.NEAR_BOTTOM_RIGHT,g.NEAR_TOP_RIGHT,g.NEAR_TOP_LEFT],far:[g.FAR_BOTTOM_RIGHT,g.FAR_BOTTOM_LEFT,g.FAR_TOP_LEFT,g.FAR_TOP_RIGHT],right:[g.NEAR_BOTTOM_RIGHT,g.FAR_BOTTOM_RIGHT,g.FAR_TOP_RIGHT,g.NEAR_TOP_RIGHT],left:[g.FAR_BOTTOM_LEFT,g.NEAR_BOTTOM_LEFT,g.NEAR_TOP_LEFT,g.FAR_TOP_LEFT],top:[g.FAR_TOP_LEFT,g.NEAR_TOP_LEFT,g.NEAR_TOP_RIGHT,g.FAR_TOP_RIGHT]},b=6,h=8,k=[A(-1,-1,-1,1),A(1,-1,-1,1),A(1,1,-1,1),A(-1,1,-1,1),A(-1,-1,1,1),A(1,-1,1,1),A(1,1,1,1),A(-1,1,1,1)],x=new T(o),y=I();export{j as PlaneIndex,g as PointIndex,P as computePlanes,N as copy,H as create,I as createPoints,L as fromMatrix,m as intersectClipRay,a as intersectsLineSegment,l as intersectsPoint,u as intersectsRay,s as intersectsSphere,b as numPlanes,h as numPoints,v as planePointIndices};
5
+ import{ObjectStack as T}from"../../core/ObjectStack.js";import{multiply as _,invert as O}from"../../core/libs/gl-matrix-2/math/mat4.js";import{i as R}from"../../chunks/vec32.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as r}from"../../chunks/vec42.js";import{fromValues as A}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as E,fromLineSegmentAndDirection as F,create as o}from"./clipRay.js";import{create as n,fromPoints as e,signedDistance as c,clip as f,clipInfinite as i,copy as B}from"./plane.js";import{sm4d as M,sv4d as G}from"./vectorStacks.js";function H(T){return T?[n(T[0]),n(T[1]),n(T[2]),n(T[3]),n(T[4]),n(T[5])]:[n(),n(),n(),n(),n(),n()]}function I(){return[t(),t(),t(),t(),t(),t(),t(),t()]}function N(T,_){for(let O=0;O<b;O++)B(T[O],_[O]);return T}function L(T,t,A,E=y){const F=_(M.get(),t,T);O(F,F);for(let _=0;_<h;++_){const T=r(G.get(),k[_],F);R(E[_],T[0]/T[3],T[1]/T[3],T[2]/T[3])}P(A,E)}function P(T,_){e(_[g.FAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_TOP_LEFT],T[j.LEFT]),e(_[g.NEAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_RIGHT],_[g.FAR_TOP_RIGHT],T[j.RIGHT]),e(_[g.FAR_BOTTOM_LEFT],_[g.FAR_BOTTOM_RIGHT],_[g.NEAR_BOTTOM_RIGHT],T[j.BOTTOM]),e(_[g.NEAR_TOP_LEFT],_[g.NEAR_TOP_RIGHT],_[g.FAR_TOP_RIGHT],T[j.TOP]),e(_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_RIGHT],_[g.NEAR_TOP_RIGHT],T[j.NEAR]),e(_[g.FAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_LEFT],_[g.FAR_TOP_LEFT],T[j.FAR])}function s(T,_){for(let O=0;O<b;O++){const R=T[O];if(R[0]*_[0]+R[1]*_[1]+R[2]*_[2]+R[3]>=_[3])return!1}return!0}function u(T,_){return p(T,E(_,x.get()))}function m(T,_){for(let O=0;O<b;O++){const R=T[O];if(!i(R,_))return!1}return!0}function a(T,_,O){return p(T,F(_,O,x.get()))}function l(T,_){for(let O=0;O<b;O++){if(c(T[O],_)>0)return!1}return!0}function p(T,_){for(let O=0;O<b;O++)if(!f(T[O],_))return!1;return!0}var j,g;!function(T){T[T.LEFT=0]="LEFT",T[T.RIGHT=1]="RIGHT",T[T.BOTTOM=2]="BOTTOM",T[T.TOP=3]="TOP",T[T.NEAR=4]="NEAR",T[T.FAR=5]="FAR"}(j||(j={})),function(T){T[T.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",T[T.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",T[T.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",T[T.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",T[T.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",T[T.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",T[T.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",T[T.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(g||(g={}));const v={bottom:[g.FAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_LEFT,g.FAR_BOTTOM_LEFT],near:[g.NEAR_BOTTOM_LEFT,g.NEAR_BOTTOM_RIGHT,g.NEAR_TOP_RIGHT,g.NEAR_TOP_LEFT],far:[g.FAR_BOTTOM_RIGHT,g.FAR_BOTTOM_LEFT,g.FAR_TOP_LEFT,g.FAR_TOP_RIGHT],right:[g.NEAR_BOTTOM_RIGHT,g.FAR_BOTTOM_RIGHT,g.FAR_TOP_RIGHT,g.NEAR_TOP_RIGHT],left:[g.FAR_BOTTOM_LEFT,g.NEAR_BOTTOM_LEFT,g.NEAR_TOP_LEFT,g.FAR_TOP_LEFT],top:[g.FAR_TOP_LEFT,g.NEAR_TOP_LEFT,g.NEAR_TOP_RIGHT,g.FAR_TOP_RIGHT]},b=6,h=8,k=[A(-1,-1,-1,1),A(1,-1,-1,1),A(1,1,-1,1),A(-1,1,-1,1),A(-1,-1,1,1),A(1,-1,1,1),A(1,1,1,1),A(-1,1,1,1)],x=new T(o),y=I();export{j as PlaneIndex,g as PointIndex,P as computePlanes,N as copy,H as create,I as createPoints,L as fromMatrix,m as intersectClipRay,a as intersectsLineSegment,l as intersectsPoint,u as intersectsRay,s as intersectsSphere,b as numPlanes,h as numPoints,v as planePointIndices};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{p as n}from"../../../../../chunks/vec32.js";import{ZEROS as l,clone as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{BufferOutputType as d,ImageOutputType as g,AttributeType as x,TargetBuffer as _,AlphaMode as T}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as A}from"./imageutils.js";import{isEncodedMeshTexture as b}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as M,TextureWrapMode as E}from"../../../../../views/webgl/enums.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class w{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===d.GLB||t.output.image===g.GLB;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,l)||(t.translation=c(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=c(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===d.GLB;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),v(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,g=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER);let T,R,A,b;l&&(T=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER)),u&&(R=r.addBufferView(M.FLOAT,x.VEC2,_.ARRAY_BUFFER)),c&&(A=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),h&&(b=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),g.startAccessor("POSITION"),T&&T.startAccessor("NORMAL"),R&&R.startAccessor("TEXCOORD_0"),A&&A.startAccessor("TANGENT"),b&&b.startAccessor("COLOR_0");const E=a.position.length/3;for(let f=0;f<E;++f)g.push(n[3*f]),g.push(n[3*f+1]),g.push(n[3*f+2]),T&&null!=l&&(T.push(l[3*f]),T.push(l[3*f+1]),T.push(l[3*f+2])),R&&null!=u&&(R.push(u[2*f]),R.push(u[2*f+1])),A&&null!=c&&(A.push(c[4*f]),A.push(c[4*f+1]),A.push(c[4*f+2]),A.push(c[4*f+3])),b&&null!=h&&(b.push(I(h[4*f]/255)),b.push(I(h[4*f+1]/255)),b.push(I(h[4*f+2]/255)),b.push(h[4*f+3]/255));const O=g.endAccessor(),w=this._addAccessor(g.index,O);let C,N,L,S,B;if(T){const e=T.endAccessor();C=this._addAccessor(T.index,e)}if(R){const e=R.endAccessor();N=this._addAccessor(R.index,e)}if(A){const e=A.endAccessor();L=this._addAccessor(A.index,e)}if(b){const e=b.endAccessor();S=this._addAccessor(b.index,e)}const F=[];return e.components&&e.components.length>0&&e.components[0].faces?(B=r.addBufferView(M.UNSIGNED_INT,x.SCALAR,_.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(B,e.components,F,w,C,N,L,S)):this._addMeshVertexNonIndexed(e.components,F,w,C,N,L,S),g.finalize(),T&&T.finalize(),R&&R.finalize(),A&&A.finalize(),B&&B.finalize(),b&&b.finalize(),s||r.finalize(),F}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=T.MASK;break;case"auto":case"blend":s.alphaMode=T.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=I(t[0]/255),t[1]=I(t[1]/255),t[2]=I(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,O().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case g.GLB:{const e=r.binChunkBuffer.addBufferView(M.UNSIGNED_BYTE,x.SCALAR);if(b(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=R(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));r.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case g.DataURI:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}s.uri=A(t);break;default:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(R(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=E.REPEAT,s=E.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=E.CLAMP_TO_EDGE,s=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT,s=E.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=E.CLAMP_TO_EDGE;break;case"mirror":s=E.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function v({position:e,normal:t,tangent:s}){C(e,3),C(t,3),C(s,4)}function C(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function I(t){return t**e}export{w as GLTF};
5
+ import{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{q as n}from"../../../../../chunks/vec32.js";import{ZEROS as l,clone as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{BufferOutputType as d,ImageOutputType as g,AttributeType as x,TargetBuffer as _,AlphaMode as T}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as A}from"./imageutils.js";import{isEncodedMeshTexture as b}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as M,TextureWrapMode as E}from"../../../../../views/webgl/enums.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class w{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===d.GLB||t.output.image===g.GLB;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,l)||(t.translation=c(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=c(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===d.GLB;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),v(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,g=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER);let T,R,A,b;l&&(T=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER)),u&&(R=r.addBufferView(M.FLOAT,x.VEC2,_.ARRAY_BUFFER)),c&&(A=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),h&&(b=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),g.startAccessor("POSITION"),T&&T.startAccessor("NORMAL"),R&&R.startAccessor("TEXCOORD_0"),A&&A.startAccessor("TANGENT"),b&&b.startAccessor("COLOR_0");const E=a.position.length/3;for(let f=0;f<E;++f)g.push(n[3*f]),g.push(n[3*f+1]),g.push(n[3*f+2]),T&&null!=l&&(T.push(l[3*f]),T.push(l[3*f+1]),T.push(l[3*f+2])),R&&null!=u&&(R.push(u[2*f]),R.push(u[2*f+1])),A&&null!=c&&(A.push(c[4*f]),A.push(c[4*f+1]),A.push(c[4*f+2]),A.push(c[4*f+3])),b&&null!=h&&(b.push(I(h[4*f]/255)),b.push(I(h[4*f+1]/255)),b.push(I(h[4*f+2]/255)),b.push(h[4*f+3]/255));const O=g.endAccessor(),w=this._addAccessor(g.index,O);let C,N,L,S,B;if(T){const e=T.endAccessor();C=this._addAccessor(T.index,e)}if(R){const e=R.endAccessor();N=this._addAccessor(R.index,e)}if(A){const e=A.endAccessor();L=this._addAccessor(A.index,e)}if(b){const e=b.endAccessor();S=this._addAccessor(b.index,e)}const F=[];return e.components&&e.components.length>0&&e.components[0].faces?(B=r.addBufferView(M.UNSIGNED_INT,x.SCALAR,_.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(B,e.components,F,w,C,N,L,S)):this._addMeshVertexNonIndexed(e.components,F,w,C,N,L,S),g.finalize(),T&&T.finalize(),R&&R.finalize(),A&&A.finalize(),B&&B.finalize(),b&&b.finalize(),s||r.finalize(),F}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=T.MASK;break;case"auto":case"blend":s.alphaMode=T.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=I(t[0]/255),t[1]=I(t[1]/255),t[2]=I(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,O().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case g.GLB:{const e=r.binChunkBuffer.addBufferView(M.UNSIGNED_BYTE,x.SCALAR);if(b(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=R(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));r.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case g.DataURI:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}s.uri=A(t);break;default:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(R(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=E.REPEAT,s=E.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=E.CLAMP_TO_EDGE,s=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT,s=E.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=E.CLAMP_TO_EDGE;break;case"mirror":s=E.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function v({position:e,normal:t,tangent:s}){C(e,3),C(t,3),C(s,4)}function C(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function I(t){return t**e}export{w as GLTF};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as e,n as r}from"../../../chunks/vec32.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import o from"../MeshComponent.js";import{MeshVertexAttributes as s}from"../MeshVertexAttributes.js";import{selectVertexSpace as a}from"../meshVertexSpaceUtils.js";import{convertVertexSpace as i,getUnitToSpatialReferenceScaleConversion as l}from"./vertexSpaceConversion.js";function c(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:r}=F,n=4*t.length,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(2*t.length*3);let l=0,c=0,f=0,u=0;for(let h=0;h<t.length;h++){const n=t[h],p=l/3;for(const t of e)i[u++]=p+t;const m=n.corners;for(let t=0;t<4;t++){const e=m[t];let i=0;a[f++]=.25*r[t][0]+n.uvOrigin[0],a[f++]=n.uvOrigin[1]-.25*r[t][1];for(let t=0;t<3;t++)0!==n.axis[t]?(o[l++]=.5*n.axis[t],s[c++]=n.axis[t]):(o[l++]=.5*e[i++],s[c++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function f(t,e){const r=t.components[0],n=r.faces,s=b[e],a=6*s,i=new Array(6),l=new Array(n.length-6);let c=0,f=0;for(let o=0;o<n.length;o++)o>=a&&o<a+6?i[c++]=n[o]:l[f++]=n[o];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),r=4*s*2,n=[0,1,1,1,1,0,0,0];for(let t=0;t<n.length;t++)e[r+t]=n[t];t.vertexAttributes.uv=e}return t.components=[new o({faces:i,material:r.material}),new o({faces:l})],t}function u(t=0){const e=Math.round(8*2**t),r=2*e,n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*((e-1)*r*2));let l=0,c=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,n=Math.cos(t),p=Math.sin(t);O[2]=p;const m=0===h||h===e,w=m?r-1:r;for(let v=0;v<=w;v++){const t=v/w*2*Math.PI;O[0]=-Math.sin(t)*n,O[1]=Math.cos(t)*n;for(let e=0;e<3;e++)o[l]=.5*O[e],s[l]=O[e],++l;a[c++]=(v+(m?.5:0))/r,a[c++]=h/e,0!==h&&v!==r&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-r),1!==h&&(i[f++]=u,i[f++]=u-r,i[f++]=u-r-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function h(t=0){const e=5,r=Math.round(16*2**t),n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*(4*r));let l=0,c=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,n=p<=1||p>=e-1,m=2===p||4===p,w=t?r-1:r;for(let v=0;v<=w;v++){const g=v/w*2*Math.PI,A=t?0:.5;O[0]=A*Math.sin(g),O[1]=A*-Math.cos(g),O[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[l++]=O[t],s[c++]=n?2===t?p<=1?1:-1:0:2===t?0:O[t]/A;a[f++]=(v+(t?.5:0))/r,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,m||0===p||v===r||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-r),1!==p&&(i[u++]=h,i[u++]=h-r,i[u++]=h-r-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function p(t,e){const r="number"==typeof e?e:null!=e?e.width:1,n="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}function m(t){const e=A.facingAxisOrderSwap[t],r=A.position,n=A.normal,o=new Float64Array(r.length),s=new Float32Array(n.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const l=e[i],c=Math.abs(l)-1,f=l>=0?1:-1;o[a]=r[t+c]*f,s[a]=n[t+c]*f,a++}}return{position:o,normal:s,uv:new Float32Array(A.uv),faces:new Uint32Array(A.faces),isPlane:!0}}const w=1,v=2,g=3,A={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[g,w,v],west:[-3,-1,v],north:[-1,g,v],south:[w,-3,v],up:[w,v,g],down:[w,-2,-3]}};function x(t,e,r){t.isPlane||y(t),M(t,d(r?.size,r?.unit,e.spatialReference));const n=a(e,r),l=e.spatialReference.isGeographic?a(e):n,c=i({vertexAttributes:t,vertexSpace:l,spatialReference:e.spatialReference},n,{allowBufferReuse:!0});return{vertexAttributes:new s({...c,uv:t.uv}),vertexSpace:n,components:[new o({faces:t.faces,material:r?.material||null})],spatialReference:e.spatialReference}}function y(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function d(t,e,r){const n=l(e,r);if(null==t&&1===n)return null;if(null==t)return[n,n,n];if("number"==typeof t){const e=t*n;return[e,e,e]}return[null!=t.width?t.width*n:n,null!=t.depth?t.depth*n:n,null!=t.height?t.height*n:n]}function M(t,n){if(null!=n){S[0]=n[0],S[4]=n[1],S[8]=n[2];for(let r=0;r<t.position.length;r+=3){for(let e=0;e<3;e++)O[e]=t.position[r+e];e(O,O,S);for(let e=0;e<3;e++)t.position[r+e]=O[e]}if(n[0]!==n[1]||n[1]!==n[2]){S[0]=1/n[0],S[4]=1/n[1],S[8]=1/n[2];for(let n=0;n<t.normal.length;n+=3){for(let e=0;e<3;e++)O[e]=t.normal[n+e];e(O,O,S),r(O,O);for(let e=0;e<3;e++)t.normal[n+e]=O[e]}}}}const F={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},b={south:0,east:1,north:2,west:3,up:4,down:5},O=n(),S=t();export{b as boxFaceOrder,p as convertPlaneSizeParameter,x as convertUnitGeometry,c as createUnitSizeBox,h as createUnitSizeCylinder,m as createUnitSizePlane,u as createUnitSizeSphere,f as extractSingleFaceOfBox};
5
+ import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{o as e,n as r}from"../../../chunks/vec32.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import o from"../MeshComponent.js";import{MeshVertexAttributes as s}from"../MeshVertexAttributes.js";import{selectVertexSpace as a}from"../meshVertexSpaceUtils.js";import{convertVertexSpace as i,getUnitToSpatialReferenceScaleConversion as l}from"./vertexSpaceConversion.js";function c(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:r}=F,n=4*t.length,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(2*t.length*3);let l=0,c=0,f=0,u=0;for(let h=0;h<t.length;h++){const n=t[h],p=l/3;for(const t of e)i[u++]=p+t;const m=n.corners;for(let t=0;t<4;t++){const e=m[t];let i=0;a[f++]=.25*r[t][0]+n.uvOrigin[0],a[f++]=n.uvOrigin[1]-.25*r[t][1];for(let t=0;t<3;t++)0!==n.axis[t]?(o[l++]=.5*n.axis[t],s[c++]=n.axis[t]):(o[l++]=.5*e[i++],s[c++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function f(t,e){const r=t.components[0],n=r.faces,s=b[e],a=6*s,i=new Array(6),l=new Array(n.length-6);let c=0,f=0;for(let o=0;o<n.length;o++)o>=a&&o<a+6?i[c++]=n[o]:l[f++]=n[o];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),r=4*s*2,n=[0,1,1,1,1,0,0,0];for(let t=0;t<n.length;t++)e[r+t]=n[t];t.vertexAttributes.uv=e}return t.components=[new o({faces:i,material:r.material}),new o({faces:l})],t}function u(t=0){const e=Math.round(8*2**t),r=2*e,n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*((e-1)*r*2));let l=0,c=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,n=Math.cos(t),p=Math.sin(t);O[2]=p;const m=0===h||h===e,w=m?r-1:r;for(let v=0;v<=w;v++){const t=v/w*2*Math.PI;O[0]=-Math.sin(t)*n,O[1]=Math.cos(t)*n;for(let e=0;e<3;e++)o[l]=.5*O[e],s[l]=O[e],++l;a[c++]=(v+(m?.5:0))/r,a[c++]=h/e,0!==h&&v!==r&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-r),1!==h&&(i[f++]=u,i[f++]=u-r,i[f++]=u-r-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function h(t=0){const e=5,r=Math.round(16*2**t),n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*(4*r));let l=0,c=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,n=p<=1||p>=e-1,m=2===p||4===p,w=t?r-1:r;for(let v=0;v<=w;v++){const g=v/w*2*Math.PI,A=t?0:.5;O[0]=A*Math.sin(g),O[1]=A*-Math.cos(g),O[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[l++]=O[t],s[c++]=n?2===t?p<=1?1:-1:0:2===t?0:O[t]/A;a[f++]=(v+(t?.5:0))/r,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,m||0===p||v===r||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-r),1!==p&&(i[u++]=h,i[u++]=h-r,i[u++]=h-r-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function p(t,e){const r="number"==typeof e?e:null!=e?e.width:1,n="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}function m(t){const e=A.facingAxisOrderSwap[t],r=A.position,n=A.normal,o=new Float64Array(r.length),s=new Float32Array(n.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const l=e[i],c=Math.abs(l)-1,f=l>=0?1:-1;o[a]=r[t+c]*f,s[a]=n[t+c]*f,a++}}return{position:o,normal:s,uv:new Float32Array(A.uv),faces:new Uint32Array(A.faces),isPlane:!0}}const w=1,v=2,g=3,A={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[g,w,v],west:[-3,-1,v],north:[-1,g,v],south:[w,-3,v],up:[w,v,g],down:[w,-2,-3]}};function x(t,e,r){t.isPlane||y(t),M(t,d(r?.size,r?.unit,e.spatialReference));const n=a(e,r),l=e.spatialReference.isGeographic?a(e):n,c=i({vertexAttributes:t,vertexSpace:l,spatialReference:e.spatialReference},n,{allowBufferReuse:!0});return{vertexAttributes:new s({...c,uv:t.uv}),vertexSpace:n,components:[new o({faces:t.faces,material:r?.material||null})],spatialReference:e.spatialReference}}function y(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function d(t,e,r){const n=l(e,r);if(null==t&&1===n)return null;if(null==t)return[n,n,n];if("number"==typeof t){const e=t*n;return[e,e,e]}return[null!=t.width?t.width*n:n,null!=t.depth?t.depth*n:n,null!=t.height?t.height*n:n]}function M(t,n){if(null!=n){S[0]=n[0],S[4]=n[1],S[8]=n[2];for(let r=0;r<t.position.length;r+=3){for(let e=0;e<3;e++)O[e]=t.position[r+e];e(O,O,S);for(let e=0;e<3;e++)t.position[r+e]=O[e]}if(n[0]!==n[1]||n[1]!==n[2]){S[0]=1/n[0],S[4]=1/n[1],S[8]=1/n[2];for(let n=0;n<t.normal.length;n+=3){for(let e=0;e<3;e++)O[e]=t.normal[n+e];e(O,O,S),r(O,O);for(let e=0;e<3;e++)t.normal[n+e]=O[e]}}}}const F={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},b={south:0,east:1,north:2,west:3,up:4,down:5},O=n(),S=t();export{b as boxFaceOrder,p as convertPlaneSizeParameter,x as convertUnitGeometry,c as createUnitSizeBox,h as createUnitSizeCylinder,m as createUnitSizePlane,u as createUnitSizeSphere,f as extractSingleFaceOfBox};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{hasScaling as r,deg2rad as t}from"../../../core/mathUtils.js";import{normalFromMat4 as o,fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as i}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{q as c,n as a}from"../../../chunks/vec32.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as m}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as u}from"../../projection/projectBuffer.js";import{earth as l}from"../Ellipsoid.js";import{isCGCS2000 as p,isMars as T,isMoon as y}from"../spatialReferenceUtils.js";import{y2lat as A}from"../webMercatorUtils.js";import{BufferViewVec3f as d,BufferViewVec3f64 as P}from"../buffer/BufferView.js";import{b as N,n as j}from"../../../chunks/vec3.js";import{t as M}from"../../../chunks/vec4.js";const O="Projection may be possible after calling projection.load().";function F(r,t,o,e){r.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${o.wkid}).${e?" ":""}${e}`)}function E(r,t,o,e,n,i){return B(x.TO_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function R(r,t,o,e,n,i){return B(x.FROM_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function g(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function h(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function _(t,e,n){return o(Y,n),N(e,t,Y),r(Y)&&j(e,e),e}function C(t,o,n){return e(Y,n),M(o,t,Y),r(Y)&&j(o,o,4),o}function b(r,o,e,n){const i=o===V.NORMAL;return k(r,o,e,((r,o)=>{const e=Math.cos(t(r));o[0]=i?e:1/e,o[1]=1}),n)}function L(r,t,o,e){const n=t===V.NORMAL;return k(r,t,o,((r,t)=>{const o=Math.cosh(-r/l.radius);t[0]=1,t[1]=n?o:1/o}),e)}function k(r,t,o,e,n){const i=t===V.NORMAL?3:4,f=[0,0];for(let c=0,a=1;c<r.length;c+=i,a+=3){e(o[a],f);const t=r[c]*f[0],s=r[c+1]*f[1],m=r[c+2],u=1/Math.sqrt(t*t+s*s+m*m);n[c]=t*u,n[c+1]=s*u,n[c+2]=m*u,4===i&&(n[c+3]=r[c+3])}return n}function w(r,t,o,e,n,i){if(!B(x.TO_PCPF,d.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}function G(r,t,o,e,n,i){if(!B(x.FROM_PCPF,d.fromTypedArray(r,16),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,16)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}var V,x;function v(r,t,n,f,c){switch(m(f,n,q,f),r===x.FROM_PCPF&&i(q,q),t){case V.NORMAL:return o(c,q);case V.TANGENT:return e(c,q)}}function B(r,t,o,e,n,i,f,s){if(!t)return;const m=e.count;if($(n))for(let a=0;a<m;a++)i.getVec(a,S),t.getVec(a,U),c(U,U,v(r,o,S,f,Y)),s.setVec(a,U);else for(let u=0;u<m;u++){i.getVec(u,S),t.getVec(u,U);const n=A(e.get(u,1));let m=Math.cos(n);o===V.TANGENT!=(r===x.TO_PCPF)&&(m=1/m),v(r,o,S,f,Y),r===x.TO_PCPF?(Y[0]*=m,Y[1]*=m,Y[2]*=m,Y[3]*=m,Y[4]*=m,Y[5]*=m):(Y[0]*=m,Y[3]*=m,Y[6]*=m,Y[1]*=m,Y[4]*=m,Y[7]*=m),c(U,U,Y),a(U,U),s.setVec(u,U)}return s}function $(r){return r.isWGS84||p(r)||T(r)||y(r)}!function(r){r[r.NORMAL=0]="NORMAL",r[r.TANGENT=1]="TANGENT"}(V||(V={})),function(r){r[r.TO_PCPF=0]="TO_PCPF",r[r.FROM_PCPF=1]="FROM_PCPF"}(x||(x={}));const S=s(),U=s(),q=f(),Y=n();export{V as VectorType,O as loadProjectErrorMessage,F as logProjectionError,h as projectFromPCPF,R as projectNormalFromPCPF,E as projectNormalToPCPF,G as projectTangentFromPCPF,w as projectTangentToPCPF,g as projectToPCPF,_ as transformNormal,C as transformTangent,b as transformVectorENUPlateCarree,L as transformVectorWMPlateCarree};
5
+ import{hasScaling as r,deg2rad as t}from"../../../core/mathUtils.js";import{normalFromMat4 as o,fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as i}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{o as c,n as a}from"../../../chunks/vec32.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as m}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as u}from"../../projection/projectBuffer.js";import{earth as l}from"../Ellipsoid.js";import{isCGCS2000 as p,isMars as T,isMoon as y}from"../spatialReferenceUtils.js";import{y2lat as A}from"../webMercatorUtils.js";import{BufferViewVec3f as d,BufferViewVec3f64 as P}from"../buffer/BufferView.js";import{b as N,n as j}from"../../../chunks/vec3.js";import{t as M}from"../../../chunks/vec4.js";const O="Projection may be possible after calling projection.load().";function F(r,t,o,e){r.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${o.wkid}).${e?" ":""}${e}`)}function E(r,t,o,e,n,i){return B(x.TO_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function R(r,t,o,e,n,i){return B(x.FROM_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function g(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function h(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function _(t,e,n){return o(q,n),N(e,t,q),r(q)&&j(e,e),e}function C(t,o,n){return e(q,n),M(o,t,q),r(q)&&j(o,o,4),o}function b(r,o,e,n){const i=o===V.NORMAL;return k(r,o,e,((r,o)=>{const e=Math.cos(t(r));o[0]=i?e:1/e,o[1]=1}),n)}function L(r,t,o,e){const n=t===V.NORMAL;return k(r,t,o,((r,t)=>{const o=Math.cosh(-r/l.radius);t[0]=1,t[1]=n?o:1/o}),e)}function k(r,t,o,e,n){const i=t===V.NORMAL?3:4,f=[0,0];for(let c=0,a=1;c<r.length;c+=i,a+=3){e(o[a],f);const t=r[c]*f[0],s=r[c+1]*f[1],m=r[c+2],u=1/Math.sqrt(t*t+s*s+m*m);n[c]=t*u,n[c+1]=s*u,n[c+2]=m*u,4===i&&(n[c+3]=r[c+3])}return n}function w(r,t,o,e,n,i){if(!B(x.TO_PCPF,d.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}function G(r,t,o,e,n,i){if(!B(x.FROM_PCPF,d.fromTypedArray(r,16),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,16)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}var V,x;function v(r,t,n,f,c){switch(m(f,n,Y,f),r===x.FROM_PCPF&&i(Y,Y),t){case V.NORMAL:return o(c,Y);case V.TANGENT:return e(c,Y)}}function B(r,t,o,e,n,i,f,s){if(!t)return;const m=e.count;if($(n))for(let a=0;a<m;a++)i.getVec(a,S),t.getVec(a,U),c(U,U,v(r,o,S,f,q)),s.setVec(a,U);else for(let u=0;u<m;u++){i.getVec(u,S),t.getVec(u,U);const n=A(e.get(u,1));let m=Math.cos(n);o===V.TANGENT!=(r===x.TO_PCPF)&&(m=1/m),v(r,o,S,f,q),r===x.TO_PCPF?(q[0]*=m,q[1]*=m,q[2]*=m,q[3]*=m,q[4]*=m,q[5]*=m):(q[0]*=m,q[3]*=m,q[6]*=m,q[1]*=m,q[4]*=m,q[7]*=m),c(U,U,q),a(U,U),s.setVec(u,U)}return s}function $(r){return r.isWGS84||p(r)||T(r)||y(r)}!function(r){r[r.NORMAL=0]="NORMAL",r[r.TANGENT=1]="TANGENT"}(V||(V={})),function(r){r[r.TO_PCPF=0]="TO_PCPF",r[r.FROM_PCPF=1]="FROM_PCPF"}(x||(x={}));const S=s(),U=s(),Y=f(),q=n();export{V as VectorType,O as loadProjectErrorMessage,F as logProjectionError,h as projectFromPCPF,R as projectNormalFromPCPF,E as projectNormalToPCPF,G as projectTangentFromPCPF,w as projectTangentToPCPF,g as projectToPCPF,_ as transformNormal,C as transformTangent,b as transformVectorENUPlateCarree,L as transformVectorWMPlateCarree};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScaling as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as p,u,q as g,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as q,create as F}from"../axisAngleDegrees.js";import S from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as T}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as U}from"./geographicUtils.js";import{logProjectionError as C,loadProjectErrorMessage as k,projectToPCPF as z,projectNormalToPCPF as L,projectTangentToPCPF as M,projectFromPCPF as P,projectNormalFromPCPF as V,projectTangentFromPCPF as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=U(O,i,o,s);T(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new S;const{vertexSpace:l,transform:c,spatialReference:f}=t,[g,x,h]=l.origin,R=new A({x:g,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,k);m(Z,w(e),y(e));const F=o(N,Z,v,b,d),{localMatrix:T}=c,U=i(N,F,T);c.scale=n(j(),U),s(U,U,u(K,c.scale));const z=c.rotationAxis;c.rotation=q(U),0===c.rotationAngle&&(c.rotationAxis=z),c.translation=a(j(),U)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const u=Q;g(w(Q),w(r),X),u[3]=r[3],z(a,i,m,n)&&(null==l||null==f||L(l,a,i,m,n,f))&&(null==c||null==p||M(c,a,i,m,n,p))?(J(m,u,3,s),P(m,n,a,i)&&(null==l||null==f||(J(f,u,3),V(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,u,4),D(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,k)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=F(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
5
+ import t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScale as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as p,r as g,o as u,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as F,create as S}from"../axisAngleDegrees.js";import T from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as U}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as q}from"./geographicUtils.js";import{logProjectionError as C,loadProjectErrorMessage as k,projectToPCPF as z,projectNormalToPCPF as L,projectTangentToPCPF as M,projectFromPCPF as P,projectNormalFromPCPF as V,projectTangentFromPCPF as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=q(O,i,o,s);U(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new T;const{vertexSpace:l,transform:c,spatialReference:f}=t,[u,x,h]=l.origin,R=new A({x:u,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,k);m(Z,w(e),y(e));const S=o(N,Z,v,b,d),{localMatrix:U}=c,q=i(N,S,U);c.scale=n(j(),q),s(q,q,g(K,c.scale));const z=c.rotationAxis;c.rotation=F(q),0===c.rotationAngle&&(c.rotationAxis=z),c.translation=a(j(),q)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const g=Q;u(w(Q),w(r),X),g[3]=r[3],z(a,i,m,n)&&(null==l||null==f||L(l,a,i,m,n,f))&&(null==c||null==p||M(c,a,i,m,n,p))?(J(m,g,3,s),P(m,n,a,i)&&(null==l||null==f||(J(f,g,3),V(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,g,4),D(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,k)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=S(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScaling as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as l,u as c,g as f}from"../../../chunks/vec32.js";import{create as m,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,loadProjectErrorMessage as R,projectToPCPF as d,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as F,projectNormalFromPCPF as S,projectTangentFromPCPF as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,d,y]=u.origin,w=new g({x:A,y:d,z:y,spatialReference:h}),F=T;if(w.equals(f))l(F,0,0,0);else if(!C(F,f,e))return void b(k(),f.spatialReference,h,R);const S=l(V,s,s,s),U=t(D,a,p,S,F),{localMatrix:q}=x,z=r(D,U,q);x.scale=o(m(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(m(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;d(s,o,c,i)&&(null==a||null==f||y(a,s,o,c,i,f))&&(null==l||null==m||w(l,s,o,c,i,m))?(P(c,t,n),F(c,i,s,o)&&(null==a||null==f||S(f,s,o,c,i,a))&&(null==l||null==m||U(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,R)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=p){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=m(),V=m(),D=s(),E=m();export{q as scale};
5
+ import e from"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScale as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as l,r as c,g as f}from"../../../chunks/vec32.js";import{create as m,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,loadProjectErrorMessage as R,projectToPCPF as d,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as F,projectNormalFromPCPF as S,projectTangentFromPCPF as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,d,y]=u.origin,w=new g({x:A,y:d,z:y,spatialReference:h}),F=T;if(w.equals(f))l(F,0,0,0);else if(!C(F,f,e))return void b(k(),f.spatialReference,h,R);const S=l(V,s,s,s),U=t(D,a,p,S,F),{localMatrix:q}=x,z=r(D,U,q);x.scale=o(m(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(m(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;d(s,o,c,i)&&(null==a||null==f||y(a,s,o,c,i,f))&&(null==l||null==m||w(l,s,o,c,i,m))?(P(c,t,n),F(c,i,s,o)&&(null==a||null==f||S(f,s,o,c,i,a))&&(null==l||null==m||U(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,R)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=p){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=m(),V=m(),D=s(),E=m();export{q as scale};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{v as p,d as g,t as A}from"../../../chunks/vec32.js";import{create as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReference as x,getSphericalPCPF as E}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as v}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as T}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as h,vertexSpaceEquals as j}from"../meshVertexSpaceUtils.js";import{isEarth as S}from"../spatialReferenceUtils.js";import{a as w,t as y,b as U}from"../../../chunks/vec3.js";import{logProjectionError as F,projectToPCPF as O,projectNormalToPCPF as _,projectTangentToPCPF as b,transformNormal as C,transformTangent as d,projectFromPCPF as G,projectNormalFromPCPF as N,projectTangentFromPCPF as D}from"./projection.js";const M=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function k(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!T(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=E(e),i=t;if(!T(n,i,o))return!1;const{origin:l}=r,a=lt;if(!v(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(A(t,i,c),!0)}function B(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=h(e)?o:null,s=X(t.spatialReference,r,at.SOURCE_AND_TARGET);if(j(e,n)&&(!a||l(a.localMatrix,m))&&Y(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):P(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?q(t,t.vertexSpace,n.origin,r):L(t,t.vertexSpace,n.origin,r)}}function L({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=X(r,i,at.SOURCE_AND_TARGET),a=e||!Y(l)?c(rt,n?.localMatrix??m):null;a&&W(a,r,i,at.SOURCE_AND_TARGET);const{position:s,normal:u,tangent:f}=a?I(t,a):t,g=i?.allowBufferReuse,A=g?s:new Float64Array(s.length);let R=s;if(e&&(R=w(A,R,e)),o){const t=p(it,o);R=w(A,R,t)}return{position:R!==t.position||g?R:R.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function V(t,n){return n?.useEllipsoid&&S(t)?x:E(t)}function P({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=V(t,i);if(!v(t,e,rt,l))return F(M(),t,l),null;r&&u(rt,rt,r.localMatrix),W(rt,t,i,at.SOURCE);const a=new Float64Array(n.position.length),s=J(n.position,rt,t,a,l);if(!s)return null;const c=K(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=Q(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);w(s,s,t)}return{position:s,normal:c,tangent:f}}function q({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=V(n,l);if(!v(n,i,rt,c))return F(M(),n,c),null;const u=1/X(n,l,at.TARGET);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=z(t,e,r),A=new Float64Array(m.length),R=Z(m,n,f,A,c);if(!R)return null;const x=o(ot,f),E=$(p,m,n,A,c,x,p!==t.normal?p:void 0);if(!E&&p)return null;const T=tt(g,m,n,A,c,x,g!==t.tangent?g:void 0);return!T&&g?null:{position:R,normal:E,tangent:T}}function z(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:w(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=I(t,r.localMatrix);return w(e.position,e.position,n),e}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=V(n,i);if(!v(n,e,rt,l))return F(M(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!v(n,o,et,l))return F(M(),l,n),null;s(et,et);const a=u(rt,et,rt);return W(a,n,i,at.SOURCE_AND_TARGET),I(t,a)}function I(t,n){const r=new Float64Array(t.position.length);y(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&C(t.normal,e,n),o&&t.tangent&&d(t.tangent,o,n),{position:r,normal:e,tangent:o}}function J(t,n,r,e,o){y(e,t,n);const i=new Float64Array(t.length);return G(e,o,i,r)?i:(F(M(),o,r),null)}function K(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return C(o,l,i),N(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return d(o,l,i),D(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function W(t,n,r,e){const o=X(n,r,e);Y(o)||a(t,t,[o,o,o])}function X(t,n,r){const e=!!(r&at.SOURCE),o=!!(r&at.TARGET),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Y(a)||(M().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Y(s)||(M().warn("target unit conversion not supported"),s=1),a*s}function Y(t){return n(t,1)}function Z(t,n,r,e,o){const i=O(t,n,e,o);if(!i)return F(M(),n,o),null;const l=new Float64Array(i.length);return y(l,i,r),l}function $(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return _(t,n,r,e,o,a)?(U(a,a,i),a):(F(M(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return b(t,n,r,e,o,a)?(U(a,a,i,4),a):(F(M(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=R(),lt=f();var at;!function(t){t[t.NONE=0]="NONE",t[t.SOURCE=1]="SOURCE",t[t.TARGET=2]="TARGET",t[t.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"}(at||(at={}));export{B as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,k as projectPointToVertexSpace};
5
+ import t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{u as p,d as g,t as A}from"../../../chunks/vec32.js";import{create as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReference as x,getSphericalPCPF as E}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as T}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as v}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as h,vertexSpaceEquals as j}from"../meshVertexSpaceUtils.js";import{isEarth as S}from"../spatialReferenceUtils.js";import{a as w,t as y,b as U}from"../../../chunks/vec3.js";import{logProjectionError as F,projectToPCPF as O,projectNormalToPCPF as _,projectTangentToPCPF as b,transformNormal as C,transformTangent as d,projectFromPCPF as G,projectNormalFromPCPF as N,projectTangentFromPCPF as D}from"./projection.js";const M=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function k(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!v(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=E(e),i=t;if(!v(n,i,o))return!1;const{origin:l}=r,a=lt;if(!T(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(A(t,i,c),!0)}function B(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=h(e)?o:null,s=X(t.spatialReference,r,at.SOURCE_AND_TARGET);if(j(e,n)&&(!a||l(a.localMatrix,m))&&Y(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):P(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?q(t,t.vertexSpace,n.origin,r):L(t,t.vertexSpace,n.origin,r)}}function L({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=X(r,i,at.SOURCE_AND_TARGET),a=e||!Y(l)?c(rt,n?.localMatrix??m):null;a&&W(a,r,i,at.SOURCE_AND_TARGET);const{position:s,normal:u,tangent:f}=a?I(t,a):t,g=i?.allowBufferReuse,A=g?s:new Float64Array(s.length);let R=s;if(e&&(R=w(A,R,e)),o){const t=p(it,o);R=w(A,R,t)}return{position:R!==t.position||g?R:R.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function V(t,n){return n?.useEllipsoid&&S(t)?x:E(t)}function P({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=V(t,i);if(!T(t,e,rt,l))return F(M(),t,l),null;r&&u(rt,rt,r.localMatrix),W(rt,t,i,at.SOURCE);const a=new Float64Array(n.position.length),s=J(n.position,rt,t,a,l);if(!s)return null;const c=K(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=Q(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);w(s,s,t)}return{position:s,normal:c,tangent:f}}function q({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=V(n,l);if(!T(n,i,rt,c))return F(M(),n,c),null;const u=1/X(n,l,at.TARGET);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=z(t,e,r),A=new Float64Array(m.length),R=Z(m,n,f,A,c);if(!R)return null;const x=o(ot,f),E=$(p,m,n,A,c,x,p!==t.normal?p:void 0);if(!E&&p)return null;const v=tt(g,m,n,A,c,x,g!==t.tangent?g:void 0);return!v&&g?null:{position:R,normal:E,tangent:v}}function z(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:w(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=I(t,r.localMatrix);return w(e.position,e.position,n),e}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=V(n,i);if(!T(n,e,rt,l))return F(M(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!T(n,o,et,l))return F(M(),l,n),null;s(et,et);const a=u(rt,et,rt);return W(a,n,i,at.SOURCE_AND_TARGET),I(t,a)}function I(t,n){const r=new Float64Array(t.position.length);y(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&C(t.normal,e,n),o&&t.tangent&&d(t.tangent,o,n),{position:r,normal:e,tangent:o}}function J(t,n,r,e,o){y(e,t,n);const i=new Float64Array(t.length);return G(e,o,i,r)?i:(F(M(),o,r),null)}function K(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return C(o,l,i),N(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return d(o,l,i),D(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function W(t,n,r,e){const o=X(n,r,e);Y(o)||a(t,t,[o,o,o])}function X(t,n,r){const e=!!(r&at.SOURCE),o=!!(r&at.TARGET),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Y(a)||(M().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Y(s)||(M().warn("target unit conversion not supported"),s=1),a*s}function Y(t){return n(t,1)}function Z(t,n,r,e,o){const i=O(t,n,e,o);if(!i)return F(M(),n,o),null;const l=new Float64Array(i.length);return y(l,i,r),l}function $(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return _(t,n,r,e,o,a)?(U(a,a,i),a):(F(M(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return b(t,n,r,e,o,a)?(U(a,a,i,4),a):(F(M(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=R(),lt=f();var at;!function(t){t[t.NONE=0]="NONE",t[t.SOURCE=1]="SOURCE",t[t.TARGET=2]="TARGET",t[t.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"}(at||(at={}));export{B as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,k as projectPointToVertexSpace};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{p as e}from"../../chunks/vec32.js";import n from"../Point.js";import r from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";function o(e){return null==e.origin}function t(e){return null!=e.origin}function c(e){return t(e.vertexSpace)}function u(e,r){if(!t(e))return null;const[i,o,c]=e.origin;return new n({x:i,y:o,z:c,spatialReference:r})}function l(e,n){const{x:o,y:t,z:c,spatialReference:u}=e,l=[o,t,c??0];return"local"===(n?.vertexSpace??f(u))?new i({origin:l}):new r({origin:l})}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function p(n,r){return n.type===r.type&&(n.origin===r.origin||null!=n.origin&&null!=r.origin&&e(n.origin,r.origin))}export{o as isAbsoluteVertexSpace,c as isMeshWithRelativeVertexSpace,t as isRelativeVertexSpace,l as selectVertexSpace,p as vertexSpaceEquals,u as vertexSpaceOriginToPoint};
5
+ import{q as e}from"../../chunks/vec32.js";import n from"../Point.js";import r from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";function o(e){return null==e.origin}function t(e){return null!=e.origin}function c(e){return t(e.vertexSpace)}function u(e,r){if(!t(e))return null;const[i,o,c]=e.origin;return new n({x:i,y:o,z:c,spatialReference:r})}function l(e,n){const{x:o,y:t,z:c,spatialReference:u}=e,l=[o,t,c??0];return"local"===(n?.vertexSpace??f(u))?new i({origin:l}):new r({origin:l})}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function a(n,r){return n.type===r.type&&(n.origin===r.origin||null!=n.origin&&null!=r.origin&&e(n.origin,r.origin))}export{o as isAbsoluteVertexSpace,c as isMeshWithRelativeVertexSpace,t as isRelativeVertexSpace,l as selectVertexSpace,a as vertexSpaceEquals,u as vertexSpaceOriginToPoint};