@arcgis/core 4.27.0-next.20230521 → 4.27.0-next.20230522

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 (173) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  5. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  6. package/arcade/functions/featuresetbase.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/0d02856e55d20b99fc8b.js +1 -0
  9. package/assets/esri/core/workers/chunks/{69242c66492717c7388c.js → 0fcb8d408696075338e2.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{1edc5c06874cb12c5478.js → 17f313e548281bb5db3e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b91c155de9a89e4e6971.js → 187c3b971ed0fc4363ef.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{85c6ce93aa41e6b65997.js → 18db07d739a713cc0465.js} +1 -1
  13. package/assets/esri/core/workers/chunks/28286014a575042619ee.js +1 -0
  14. package/assets/esri/core/workers/chunks/{692dfeb2e255fdc0ade2.js → 39288fa69561d21f04f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{2b9d3e60977934a6d471.js → 3bc6b5f0643364749ef8.js} +1 -1
  16. package/assets/esri/core/workers/chunks/45e5ad704d18dd0857ce.js +1 -0
  17. package/assets/esri/core/workers/chunks/{62d9d15f0d00a75da42c.js → 4670b17ae2ed3c13d344.js} +1 -1
  18. package/assets/esri/core/workers/chunks/4d24efa01d1accc5a5f0.js +1 -0
  19. package/assets/esri/core/workers/chunks/52575f021a14dd961de8.js +1 -0
  20. package/assets/esri/core/workers/chunks/{6312783626bacf52df7a.js → 55486c644e8b01326a0d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +1 -0
  22. package/assets/esri/core/workers/chunks/5a4c04bf4f57e74457c5.js +1 -0
  23. package/assets/esri/core/workers/chunks/70d6e5edf05ef7079fa8.js +1 -0
  24. package/assets/esri/core/workers/chunks/71bdf8f10aee0077f681.js +1 -0
  25. package/assets/esri/core/workers/chunks/72b2c3c8e76da699690c.js +1 -0
  26. package/assets/esri/core/workers/chunks/78ce0b1af62435d8ebf4.js +1 -0
  27. package/assets/esri/core/workers/chunks/791f529e90135398b3d5.js +1 -0
  28. package/assets/esri/core/workers/chunks/8d3abfe6fdc5ac8d6cb7.js +1 -0
  29. package/assets/esri/core/workers/chunks/96d339abcd917f1f0ae1.js +1 -0
  30. package/assets/esri/core/workers/chunks/97cdbec7532cfcdf9ad2.js +1 -0
  31. package/assets/esri/core/workers/chunks/{f3f6035a17f7dcd19675.js → 9ab400a89dd701778d2c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{1488b3d48232844b8bb4.js → 9fe349f43d5ff5a4ac2d.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{22396dd3717d17a5d235.js → a1c31bb8c12831539328.js} +1 -1
  34. package/assets/esri/core/workers/chunks/b4e2dc6b3d06b426e596.js +1 -0
  35. package/assets/esri/core/workers/chunks/{48abcb2d88f22e6e9fde.js → c2cb9fa18c77f0c5104e.js} +1 -1
  36. package/assets/esri/core/workers/chunks/cad7a2092ea7f51dbd8b.js +1 -0
  37. package/assets/esri/core/workers/chunks/d725dbbdeb05322e6d88.js +1 -0
  38. package/assets/esri/core/workers/chunks/df3e497d12ed77bae168.js +1 -0
  39. package/assets/esri/core/workers/chunks/{4d5f71d84c85f45c97ea.js → ed6f6e539a915ba9e64d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/fb080339bfaf32731ca6.js +1 -0
  41. package/assets/esri/themes/base/_core.scss +2 -0
  42. package/assets/esri/themes/base/widgets/_FloorFilter.scss +6 -0
  43. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +40 -0
  44. package/assets/esri/themes/dark/main.css +1 -1
  45. package/assets/esri/themes/light/main.css +1 -1
  46. package/assets/esri/themes/light/view.css +1 -1
  47. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  48. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  49. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  52. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  53. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  54. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  55. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  56. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  58. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  59. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  60. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  61. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  62. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  63. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  64. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  65. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  66. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  67. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  68. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  69. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  70. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  71. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  72. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  75. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  76. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  77. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  78. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  79. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  80. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  81. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  82. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  83. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  84. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  86. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology.json +1 -1
  87. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology_en.json +1 -1
  88. package/chunks/mat4.js +1 -1
  89. package/core/accessorSupport/write.js +1 -1
  90. package/core/fontUtils.js +1 -1
  91. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  92. package/geometry/Mesh.js +1 -1
  93. package/geometry/support/MeshGeoreferencedRelativeVertexSpace.d.ts +4 -0
  94. package/geometry/support/MeshGeoreferencedRelativeVertexSpace.js +5 -0
  95. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +4 -0
  96. package/geometry/support/MeshGeoreferencedVertexSpace.js +5 -0
  97. package/geometry/support/MeshLocalVertexSpace.d.ts +4 -0
  98. package/geometry/support/MeshLocalVertexSpace.js +5 -0
  99. package/geometry/support/MeshTransform.d.ts +4 -0
  100. package/geometry/support/MeshTransform.js +1 -1
  101. package/geometry/support/meshUtils/ElevationSamplerWorker.js +1 -1
  102. package/geometry/support/meshUtils/centerAt.js +1 -1
  103. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  104. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  105. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  106. package/geometry/support/meshUtils/georeference.js +1 -1
  107. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  108. package/geometry/support/meshUtils/merge.js +1 -1
  109. package/geometry/support/meshUtils/offset.js +1 -1
  110. package/geometry/support/meshUtils/primitives.js +1 -1
  111. package/geometry/support/meshUtils/rotate.js +1 -1
  112. package/geometry/support/meshUtils/scale.js +1 -1
  113. package/interfaces.d.ts +227 -1
  114. package/layers/VoxelWasmPerSceneView.js +1 -1
  115. package/layers/graphics/data/attributeSupport.js +1 -1
  116. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  117. package/networks/support/TopologyValidationJobInfo.js +1 -1
  118. package/package.json +1 -1
  119. package/popup/FieldInfo.js +1 -1
  120. package/portal/Portal.js +1 -1
  121. package/rest/support/FeatureSet.js +1 -1
  122. package/rest/support/meshFeatureSet.js +1 -1
  123. package/support/revision.js +1 -1
  124. package/symbols/cim/cimAnalyzer.js +1 -1
  125. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  126. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  127. package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
  128. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  129. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  130. package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
  131. package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +1 -1
  132. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  135. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  136. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  137. package/views/3d/state/utils/navigationUtils.js +1 -1
  138. package/views/3d/support/DisplayQualityProfile.js +1 -1
  139. package/views/3d/support/QualitySettings.js +1 -1
  140. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  141. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  142. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  143. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  144. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  145. package/views/interactive/dragEventPipeline.js +1 -1
  146. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  147. package/widgets/Editor/Edits.js +1 -1
  148. package/widgets/Editor/Upload.js +1 -1
  149. package/widgets/Editor/workflowUtils.js +1 -1
  150. package/widgets/Feature/support/featureUtils.js +1 -1
  151. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  152. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +5 -0
  153. package/widgets/UtilityNetworkValidateTopology.js +5 -0
  154. package/assets/esri/core/workers/chunks/163bf2e13abbdd298374.js +0 -1
  155. package/assets/esri/core/workers/chunks/23f73f81aea461c0c6e6.js +0 -1
  156. package/assets/esri/core/workers/chunks/2640204c4655aa535ccb.js +0 -1
  157. package/assets/esri/core/workers/chunks/2bf42d060f877566b989.js +0 -1
  158. package/assets/esri/core/workers/chunks/34ec9623a1bece86a82b.js +0 -1
  159. package/assets/esri/core/workers/chunks/3bf52139340827794c3b.js +0 -1
  160. package/assets/esri/core/workers/chunks/52d02021e858820bc4fa.js +0 -1
  161. package/assets/esri/core/workers/chunks/64b8f65e2ef6cbf08380.js +0 -1
  162. package/assets/esri/core/workers/chunks/78aede1e114deefacb54.js +0 -1
  163. package/assets/esri/core/workers/chunks/7ef100158ca28631fcaf.js +0 -1
  164. package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +0 -1
  165. package/assets/esri/core/workers/chunks/964795dfb57f0d0635d0.js +0 -1
  166. package/assets/esri/core/workers/chunks/99ce0a202dcd3d7dc290.js +0 -1
  167. package/assets/esri/core/workers/chunks/abe6c99a1a719543dbe8.js +0 -1
  168. package/assets/esri/core/workers/chunks/c3bf44146fddfe8990f7.js +0 -1
  169. package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +0 -1
  170. package/assets/esri/core/workers/chunks/e15b5d7e46a834eacc57.js +0 -1
  171. package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +0 -1
  172. package/assets/esri/core/workers/chunks/e305d20e4424451cab5b.js +0 -1
  173. package/assets/esri/core/workers/chunks/e6836c84470fb6bd25bf.js +0 -1
@@ -1 +1 @@
1
- {"add":"添加","addAttachment":"添加附件","addFeature":"添加要素","attachments":"附件","attachmentsButtonLabel":"附件","cancelAddTitle":"放弃要素","cancelAddWarningMessage":"此要素将丢失。","cancelEditTitle":"放弃编辑内容","cancelEditWarningMessage":"此要素的更新内容将丢失。","cancelRequestTitle":"取消工作流","cancelRequestWarningMessage":"已发出取消此工作流的请求。","cancelUploadTitle":"试_Cancel upload______________验","cancelUploadWarningMessage":"试_The current upload will be canceled and the model will be lost_________________________________验.","clickToFinishTemplate":"单击 {button} 完成设置。","continueAdding":"继续添加","continueEditing":"继续编辑","continueUpload":"试_Continue upload________________验","createFeature":"创建要素","createFeatures":"创建要素","createFeaturesTemplate":"创建({numFeatures})","deleteAttachmentWarningMessage":"此附件将永久移除。","deleteAttachmentWarningTitle":"删除附件","deleteWarningMessage":"此要素将永久移除。","deleteWarningTitle":"删除要素","discardEdits":"放弃编辑内容","discardFeature":"放弃要素","discardUpload":"试_Cancel upload______________验","edit":"编辑","editAttachment":"管理附件","editFeature":"编辑要素","editFeatures":"编辑要素","editing":"编辑","errorWarningMessageTemplate":"无法保存编辑内容:{errorMessage}","errorWarningTitle":"出错","featureAttachments":"要素附件","formFieldCreateError":"试_Features cannot be created. There is an issue with the form_______________________________验.","formFieldUpdateError":"试_Feature cannot be updated. There is an issue with the form_______________________________验.","helpMessages2d":{"select":"单击地图选择一个要素。","point":"单击地图以添加点。","polylineZeroVertices":"单击地图以开始绘制。","polylineOneVertex":"双击地图以完成操作。","polygonZeroVertices":"单击地图以开始绘制。","polygonOneVertex":"单击地图以继续绘制。","polygonTwoVertices":"双击地图以完成操作。","meshTooFar":"试_The model is very distant. You may need to zoom in to see it________________________________验.","meshTooClose":"试_The model is very close. You may need to zoom out to see it_______________________________验."},"helpMessages3d":{"select":"单击场景以选择要素 。","point":"单击场景以添加点。","polylineZeroVertices":"单击场景以开始绘制。","polylineOneVertex":"双击场景以完成操作。","polygonZeroVertices":"单击场景以开始绘制。","polygonOneVertex":"单击场景以继续绘制。","polygonTwoVertices":"双击场景以完成操作。","meshTooFar":"试_The model is very distant. You may need to zoom in to see it________________________________验.","meshTooClose":"试_The model is very close. You may need to zoom out to see it_______________________________验."},"ignore":"忽略","keepAttachment":"保存附件","keepFeature":"保留要素","multipleFeaturesTemplate":"多个要素 ({total})","noEditableLayers":"未找到可编辑的图层。","ownerAdminNotice":"编辑功能关闭,但是您拥有编辑该图层的特权。","placeFeature":"放置要素","placeFeatureOnMap":"在地图上放置要素。","retry":"重试","selectFeature":"选择要素","selectFeatureToEdit":"选择要编辑的要素。","selectTemplate":"选择要素类型","snapping":"捕捉","snappingSettings":"捕捉设置","untitledFeatureTemplate":"无标题要素 {id}","uploadError":"试_There was an error uploading the model_____________________验.","uploadPending":"试_Uploading_____________验...","warning":"通知","widgetLabel":"编辑器"}
1
+ {"add":"添加","addAttachment":"添加附件","addFeature":"添加要素","attachments":"附件","attachmentsButtonLabel":"附件","cancelAddTitle":"放弃要素","cancelAddWarningMessage":"此要素将丢失。","cancelEditTitle":"放弃编辑内容","cancelEditWarningMessage":"此要素的更新内容将丢失。","cancelRequestTitle":"取消工作流","cancelRequestWarningMessage":"已发出取消此工作流的请求。","cancelUploadTitle":"试_Cancel upload______________验","cancelUploadWarningMessage":"试_The current upload will be canceled and the model will be lost_________________________________验.","clickToFinishTemplate":"单击 {button} 完成设置。","continueAdding":"继续添加","continueEditing":"继续编辑","continueUpload":"试_Continue upload________________验","createFeature":"创建要素","createFeatures":"创建要素","createFeaturesTemplate":"创建({numFeatures})","deleteAttachmentWarningMessage":"此附件将永久移除。","deleteAttachmentWarningTitle":"删除附件","deleteWarningMessage":"此要素将永久移除。","deleteWarningTitle":"删除要素","discardEdits":"放弃编辑内容","discardFeature":"放弃要素","discardUpload":"试_Cancel upload______________验","edit":"编辑","editAttachment":"管理附件","editFeature":"编辑要素","editFeatures":"编辑要素","editing":"编辑","errorWarningMessageTemplate":"无法保存编辑内容:{errorMessage}","errorWarningTitle":"出错","featureAttachments":"要素附件","formFieldCreateError":"试_Features cannot be created. There is an issue with the form_______________________________验.","formFieldUpdateError":"试_Feature cannot be updated. There is an issue with the form_______________________________验.","formFieldUnsupportedCreateError":"试_Features cannot be created. Layer contains unsupported fields________________________________验.","formFieldUnsupportedUpdateError":"试_Feature cannot be updated. Layer contains unsupported fields________________________________验.","helpMessages2d":{"select":"单击地图选择一个要素。","point":"单击地图以添加点。","polylineZeroVertices":"单击地图以开始绘制。","polylineOneVertex":"双击地图以完成操作。","polygonZeroVertices":"单击地图以开始绘制。","polygonOneVertex":"单击地图以继续绘制。","polygonTwoVertices":"双击地图以完成操作。","meshTooFar":"试_The model is very distant. You may need to zoom in to see it________________________________验.","meshTooClose":"试_The model is very close. You may need to zoom out to see it_______________________________验."},"helpMessages3d":{"select":"单击场景以选择要素 。","point":"单击场景以添加点。","polylineZeroVertices":"单击场景以开始绘制。","polylineOneVertex":"双击场景以完成操作。","polygonZeroVertices":"单击场景以开始绘制。","polygonOneVertex":"单击场景以继续绘制。","polygonTwoVertices":"双击场景以完成操作。","meshTooFar":"试_The model is very distant. You may need to zoom in to see it________________________________验.","meshTooClose":"试_The model is very close. You may need to zoom out to see it_______________________________验."},"ignore":"忽略","keepAttachment":"保存附件","keepFeature":"保留要素","multipleFeaturesTemplate":"多个要素 ({total})","noEditableLayers":"未找到可编辑的图层。","ownerAdminNotice":"编辑功能关闭,但是您拥有编辑该图层的特权。","placeFeature":"放置要素","placeFeatureOnMap":"在地图上放置要素。","retry":"重试","selectFeature":"选择要素","selectFeatureToEdit":"选择要编辑的要素。","selectTemplate":"选择要素类型","snapping":"捕捉","snappingSettings":"捕捉设置","untitledFeatureTemplate":"无标题要素 {id}","uploadError":"试_There was an error uploading the model_____________________验.","uploadPending":"试_Uploading_____________验...","warning":"通知","widgetLabel":"编辑器"}
@@ -1 +1 @@
1
- {"add":"新增","addAttachment":"新增附件","addFeature":"新增圖徵","attachments":"附件","attachmentsButtonLabel":"附件","cancelAddTitle":"放棄圖徵","cancelAddWarningMessage":"此圖徵將遺失。","cancelEditTitle":"放棄編輯","cancelEditWarningMessage":"將遺失對此圖徵的更新。","cancelRequestTitle":"取消工作流程","cancelRequestWarningMessage":"已提出取消此工作流程的請求。","cancelUploadTitle":"試_Cancel upload______________驗","cancelUploadWarningMessage":"試_The current upload will be canceled and the model will be lost_________________________________驗.","clickToFinishTemplate":"按一下 {button} 以完成。","continueAdding":"正在繼續新增","continueEditing":"正在繼續編輯","continueUpload":"試_Continue upload________________驗","createFeature":"建立圖徵","createFeatures":"建立圖徽","createFeaturesTemplate":"建立 ({numFeatures})","deleteAttachmentWarningMessage":"將永久移除此附件。","deleteAttachmentWarningTitle":"刪除附件","deleteWarningMessage":"將永久移除此圖徵。","deleteWarningTitle":"刪除圖徵","discardEdits":"放棄編輯","discardFeature":"放棄圖徵","discardUpload":"試_Cancel upload______________驗","edit":"編輯","editAttachment":"管理附件","editFeature":"編輯圖徵","editFeatures":"編輯圖徵","editing":"編輯","errorWarningMessageTemplate":"無法儲存編輯: {errorMessage}","errorWarningTitle":"發生錯誤","featureAttachments":"圖徵附件","formFieldCreateError":"試_Features cannot be created. There is an issue with the form_______________________________驗.","formFieldUpdateError":"試_Feature cannot be updated. There is an issue with the form_______________________________驗.","helpMessages2d":{"select":"按一下地圖以選擇圖徵。","point":"按一下地圖以新增點。","polylineZeroVertices":"按一下地圖以開始繪製。","polylineOneVertex":"按兩下地圖完成操作。","polygonZeroVertices":"按一下地圖以開始繪製。","polygonOneVertex":"按一下地圖以繼續繪製。","polygonTwoVertices":"按兩下地圖完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"helpMessages3d":{"select":"按一下場景以選擇圖徵。","point":"按一下場景以新增一點。","polylineZeroVertices":"按一下場景以開始繪製。","polylineOneVertex":"按兩下場景完成操作。","polygonZeroVertices":"按一下場景以開始繪製。","polygonOneVertex":"按一下場景以繼續繪製。","polygonTwoVertices":"按兩下場景完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"ignore":"忽略","keepAttachment":"保留附件","keepFeature":"保留圖徵","multipleFeaturesTemplate":"多個圖徵 ({total})","noEditableLayers":"找不到可編輯的圖層。","ownerAdminNotice":"已停用編輯,但您有編輯此圖層的權限。","placeFeature":"放置圖徵","placeFeatureOnMap":"在地圖上放置圖徵。","retry":"重試","selectFeature":"選擇圖徵","selectFeatureToEdit":"選擇圖徵進行編輯。","selectTemplate":"選擇圖徵類型","snapping":"正在貼齊","snappingSettings":"貼齊設定","untitledFeatureTemplate":"無標題的圖徵 {id}","uploadError":"試_There was an error uploading the model_____________________驗.","uploadPending":"試_Uploading_____________驗...","warning":"通知","widgetLabel":"編輯器"}
1
+ {"add":"新增","addAttachment":"新增附件","addFeature":"新增圖徵","attachments":"附件","attachmentsButtonLabel":"附件","cancelAddTitle":"放棄圖徵","cancelAddWarningMessage":"此圖徵將遺失。","cancelEditTitle":"放棄編輯","cancelEditWarningMessage":"將遺失對此圖徵的更新。","cancelRequestTitle":"取消工作流程","cancelRequestWarningMessage":"已提出取消此工作流程的請求。","cancelUploadTitle":"試_Cancel upload______________驗","cancelUploadWarningMessage":"試_The current upload will be canceled and the model will be lost_________________________________驗.","clickToFinishTemplate":"按一下 {button} 以完成。","continueAdding":"正在繼續新增","continueEditing":"正在繼續編輯","continueUpload":"試_Continue upload________________驗","createFeature":"建立圖徵","createFeatures":"建立圖徽","createFeaturesTemplate":"建立 ({numFeatures})","deleteAttachmentWarningMessage":"將永久移除此附件。","deleteAttachmentWarningTitle":"刪除附件","deleteWarningMessage":"將永久移除此圖徵。","deleteWarningTitle":"刪除圖徵","discardEdits":"放棄編輯","discardFeature":"放棄圖徵","discardUpload":"試_Cancel upload______________驗","edit":"編輯","editAttachment":"管理附件","editFeature":"編輯圖徵","editFeatures":"編輯圖徵","editing":"編輯","errorWarningMessageTemplate":"無法儲存編輯: {errorMessage}","errorWarningTitle":"發生錯誤","featureAttachments":"圖徵附件","formFieldCreateError":"試_Features cannot be created. There is an issue with the form_______________________________驗.","formFieldUpdateError":"試_Feature cannot be updated. There is an issue with the form_______________________________驗.","formFieldUnsupportedCreateError":"試_Features cannot be created. Layer contains unsupported fields________________________________驗.","formFieldUnsupportedUpdateError":"試_Feature cannot be updated. Layer contains unsupported fields________________________________驗.","helpMessages2d":{"select":"按一下地圖以選擇圖徵。","point":"按一下地圖以新增點。","polylineZeroVertices":"按一下地圖以開始繪製。","polylineOneVertex":"按兩下地圖完成操作。","polygonZeroVertices":"按一下地圖以開始繪製。","polygonOneVertex":"按一下地圖以繼續繪製。","polygonTwoVertices":"按兩下地圖完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"helpMessages3d":{"select":"按一下場景以選擇圖徵。","point":"按一下場景以新增一點。","polylineZeroVertices":"按一下場景以開始繪製。","polylineOneVertex":"按兩下場景完成操作。","polygonZeroVertices":"按一下場景以開始繪製。","polygonOneVertex":"按一下場景以繼續繪製。","polygonTwoVertices":"按兩下場景完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"ignore":"忽略","keepAttachment":"保留附件","keepFeature":"保留圖徵","multipleFeaturesTemplate":"多個圖徵 ({total})","noEditableLayers":"找不到可編輯的圖層。","ownerAdminNotice":"已停用編輯,但您有編輯此圖層的權限。","placeFeature":"放置圖徵","placeFeatureOnMap":"在地圖上放置圖徵。","retry":"重試","selectFeature":"選擇圖徵","selectFeatureToEdit":"選擇圖徵進行編輯。","selectTemplate":"選擇圖徵類型","snapping":"正在貼齊","snappingSettings":"貼齊設定","untitledFeatureTemplate":"無標題的圖徵 {id}","uploadError":"試_There was an error uploading the model_____________________驗.","uploadPending":"試_Uploading_____________驗...","warning":"通知","widgetLabel":"編輯器"}
@@ -1 +1 @@
1
- {"add":"新增","addAttachment":"新增附件","addFeature":"新增圖徵","attachments":"附件","attachmentsButtonLabel":"附件","cancelAddTitle":"放棄圖徵","cancelAddWarningMessage":"此圖徵將遺失。","cancelEditTitle":"放棄編輯","cancelEditWarningMessage":"將遺失對此圖徵的更新。","cancelRequestTitle":"取消工作流程","cancelRequestWarningMessage":"已提出取消此工作流程的請求。","cancelUploadTitle":"試_Cancel upload______________驗","cancelUploadWarningMessage":"試_The current upload will be canceled and the model will be lost_________________________________驗.","clickToFinishTemplate":"按一下 {button} 以完成。","continueAdding":"正在繼續新增","continueEditing":"正在繼續編輯","continueUpload":"試_Continue upload________________驗","createFeature":"建立圖徵","createFeatures":"建立圖徽","createFeaturesTemplate":"建立 ({numFeatures})","deleteAttachmentWarningMessage":"將永久移除此附件。","deleteAttachmentWarningTitle":"刪除附件","deleteWarningMessage":"將永久移除此圖徵。","deleteWarningTitle":"刪除圖徵","discardEdits":"放棄編輯","discardFeature":"放棄圖徵","discardUpload":"試_Cancel upload______________驗","edit":"編輯","editAttachment":"管理附件","editFeature":"編輯圖徵","editFeatures":"編輯圖徵","editing":"編輯","errorWarningMessageTemplate":"無法儲存編輯: {errorMessage}","errorWarningTitle":"發生錯誤","featureAttachments":"圖徵附件","formFieldCreateError":"試_Features cannot be created. There is an issue with the form_______________________________驗.","formFieldUpdateError":"試_Feature cannot be updated. There is an issue with the form_______________________________驗.","helpMessages2d":{"select":"按一下地圖以選擇圖徵。","point":"按一下地圖以新增點。","polylineZeroVertices":"按一下地圖以開始繪製。","polylineOneVertex":"按兩下地圖完成操作。","polygonZeroVertices":"按一下地圖以開始繪製。","polygonOneVertex":"按一下地圖以繼續繪製。","polygonTwoVertices":"按兩下地圖完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"helpMessages3d":{"select":"按一下場景以選擇圖徵。","point":"按一下場景以新增一點。","polylineZeroVertices":"按一下場景以開始繪製。","polylineOneVertex":"按兩下場景完成操作。","polygonZeroVertices":"按一下場景以開始繪製。","polygonOneVertex":"按一下場景以繼續繪製。","polygonTwoVertices":"按兩下場景完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"ignore":"忽略","keepAttachment":"保留附件","keepFeature":"保留圖徵","multipleFeaturesTemplate":"多個圖徵 ({total})","noEditableLayers":"找不到可編輯的圖層。","ownerAdminNotice":"已停用編輯,但您有編輯此圖層的權限。","placeFeature":"放置圖徵","placeFeatureOnMap":"在地圖上放置圖徵。","retry":"重試","selectFeature":"選擇圖徵","selectFeatureToEdit":"選擇圖徵進行編輯。","selectTemplate":"選擇圖徵類型","snapping":"正在貼齊","snappingSettings":"貼齊設定","untitledFeatureTemplate":"無標題的圖徵 {id}","uploadError":"試_There was an error uploading the model_____________________驗.","uploadPending":"試_Uploading_____________驗...","warning":"通知","widgetLabel":"編輯器"}
1
+ {"add":"新增","addAttachment":"新增附件","addFeature":"新增圖徵","attachments":"附件","attachmentsButtonLabel":"附件","cancelAddTitle":"放棄圖徵","cancelAddWarningMessage":"此圖徵將遺失。","cancelEditTitle":"放棄編輯","cancelEditWarningMessage":"將遺失對此圖徵的更新。","cancelRequestTitle":"取消工作流程","cancelRequestWarningMessage":"已提出取消此工作流程的請求。","cancelUploadTitle":"試_Cancel upload______________驗","cancelUploadWarningMessage":"試_The current upload will be canceled and the model will be lost_________________________________驗.","clickToFinishTemplate":"按一下 {button} 以完成。","continueAdding":"正在繼續新增","continueEditing":"正在繼續編輯","continueUpload":"試_Continue upload________________驗","createFeature":"建立圖徵","createFeatures":"建立圖徽","createFeaturesTemplate":"建立 ({numFeatures})","deleteAttachmentWarningMessage":"將永久移除此附件。","deleteAttachmentWarningTitle":"刪除附件","deleteWarningMessage":"將永久移除此圖徵。","deleteWarningTitle":"刪除圖徵","discardEdits":"放棄編輯","discardFeature":"放棄圖徵","discardUpload":"試_Cancel upload______________驗","edit":"編輯","editAttachment":"管理附件","editFeature":"編輯圖徵","editFeatures":"編輯圖徵","editing":"編輯","errorWarningMessageTemplate":"無法儲存編輯: {errorMessage}","errorWarningTitle":"發生錯誤","featureAttachments":"圖徵附件","formFieldCreateError":"試_Features cannot be created. There is an issue with the form_______________________________驗.","formFieldUpdateError":"試_Feature cannot be updated. There is an issue with the form_______________________________驗.","formFieldUnsupportedCreateError":"試_Features cannot be created. Layer contains unsupported fields________________________________驗.","formFieldUnsupportedUpdateError":"試_Feature cannot be updated. Layer contains unsupported fields________________________________驗.","helpMessages2d":{"select":"按一下地圖以選擇圖徵。","point":"按一下地圖以新增點。","polylineZeroVertices":"按一下地圖以開始繪製。","polylineOneVertex":"按兩下地圖完成操作。","polygonZeroVertices":"按一下地圖以開始繪製。","polygonOneVertex":"按一下地圖以繼續繪製。","polygonTwoVertices":"按兩下地圖完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"helpMessages3d":{"select":"按一下場景以選擇圖徵。","point":"按一下場景以新增一點。","polylineZeroVertices":"按一下場景以開始繪製。","polylineOneVertex":"按兩下場景完成操作。","polygonZeroVertices":"按一下場景以開始繪製。","polygonOneVertex":"按一下場景以繼續繪製。","polygonTwoVertices":"按兩下場景完成操作。","meshTooFar":"試_The model is very distant. You may need to zoom in to see it________________________________驗.","meshTooClose":"試_The model is very close. You may need to zoom out to see it_______________________________驗."},"ignore":"忽略","keepAttachment":"保留附件","keepFeature":"保留圖徵","multipleFeaturesTemplate":"多個圖徵 ({total})","noEditableLayers":"找不到可編輯的圖層。","ownerAdminNotice":"已停用編輯,但您有編輯此圖層的權限。","placeFeature":"放置圖徵","placeFeatureOnMap":"在地圖上放置圖徵。","retry":"重試","selectFeature":"選擇圖徵","selectFeatureToEdit":"選擇圖徵進行編輯。","selectTemplate":"選擇圖徵類型","snapping":"正在貼齊","snappingSettings":"貼齊設定","untitledFeatureTemplate":"無標題的圖徵 {id}","uploadError":"試_There was an error uploading the model_____________________驗.","uploadPending":"試_Uploading_____________驗...","warning":"通知","widgetLabel":"編輯器"}
@@ -1 +1 @@
1
- {"widgetLabel":"Utility Network Validate Topology"}
1
+ {"label":"Validate network topology","input":{"currentExtent":"Current extent","entireExtent":"Entire extent","extentToValidate":"Extent to validate","validateTopology":"Validate"},"status":{"executing":"Executing","loading":"Loading","success":"Validate successful"},"info":{"cannotAcquireVersionLock":"Branch version is locked by another application.","noDirtyAreasInExtent":"No dirty area found during validate.","noDirtyAreasLayer":"Couldn't find the dirty areas layer. Add the dirty areas layer to the map.","noUtilityNetwork":"A utility network wasn't provided. The widget must be initialized with a utility network.","noUtilityNetworkServiceUserTypeExtension":"The account logged in is missing a license for the ArcGIS Utility Network user type extension."}}
@@ -1 +1 @@
1
- {"widgetLabel":"Utility Network Validate Topology"}
1
+ {"label":"Validate network topology","input":{"currentExtent":"Current extent","entireExtent":"Entire extent","extentToValidate":"Extent to validate","validateTopology":"Validate"},"status":{"executing":"Executing","loading":"Loading","success":"Validate successful"},"info":{"cannotAcquireVersionLock":"Branch version is locked by another application.","noDirtyAreasInExtent":"No dirty area found during validate.","noDirtyAreasLayer":"Couldn't find the dirty areas layer. Add the dirty areas layer to the map.","noUtilityNetwork":"A utility network wasn't provided. The widget must be initialized with a utility network.","noUtilityNetworkServiceUserTypeExtension":"The account logged in is missing a license for the ArcGIS Utility Network user type extension."}}
package/chunks/mat4.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.27/esri/copyright.txt for details.
4
4
  */
5
- import{c as t}from"./vec3f64.js";import{g 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 s(t,a,n,s,r,o,e,h,u,M,c,i,f,b,l,m,x){return t[0]=a,t[1]=n,t[2]=s,t[3]=r,t[4]=o,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 r(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 o(t,a){if(t===a){const n=a[1],s=a[2],r=a[3],o=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]=s,t[9]=o,t[11]=a[14],t[12]=r,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)||r(t),t}function h(t,a){const n=a[0],s=a[1],r=a[2],o=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-s*e,g=n*u-r*e,p=n*M-o*e,y=s*u-r*h,R=s*M-o*h,S=r*M-o*u,v=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-g*j+p*O+y*I-R*T+S*v;return D?(D=1/D,t[0]=(h*P-u*j+M*O)*D,t[1]=(r*j-s*P-o*O)*D,t[2]=(m*S-x*R+q*y)*D,t[3]=(f*R-i*S-b*y)*D,t[4]=(u*I-e*P-M*T)*D,t[5]=(n*P-r*I+o*T)*D,t[6]=(x*p-l*S-q*g)*D,t[7]=(c*S-f*p+b*g)*D,t[8]=(e*j-h*I+M*v)*D,t[9]=(s*I-n*j-o*v)*D,t[10]=(l*R-m*p+q*d)*D,t[11]=(i*p-c*R-b*d)*D,t[12]=(h*T-e*O-u*v)*D,t[13]=(n*O-s*T+r*v)*D,t[14]=(m*g-l*y-x*d)*D,t[15]=(c*y-i*g+f*d)*D,t):null}function u(t,a){const n=a[0],s=a[1],r=a[2],o=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]=-(s*(f*q-b*x)-i*(r*q-o*x)+m*(r*b-o*f)),t[2]=s*(u*q-M*x)-h*(r*q-o*x)+m*(r*M-o*u),t[3]=-(s*(u*b-M*f)-h*(r*b-o*f)+i*(r*M-o*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*(r*q-o*x)+l*(r*b-o*f),t[6]=-(n*(u*q-M*x)-e*(r*q-o*x)+l*(r*M-o*u)),t[7]=n*(u*b-M*f)-e*(r*b-o*f)+c*(r*M-o*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*(s*q-o*m)+l*(s*b-o*i)),t[10]=n*(h*q-M*m)-e*(s*q-o*m)+l*(s*M-o*h),t[11]=-(n*(h*b-M*i)-e*(s*b-o*i)+c*(s*M-o*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*(s*x-r*m)+l*(s*f-r*i),t[14]=-(n*(h*x-u*m)-e*(s*x-r*m)+l*(s*u-r*h)),t[15]=n*(h*f-u*i)-e*(s*f-r*i)+c*(s*u-r*h),t}function M(t){const a=t[0],n=t[1],s=t[2],r=t[3],o=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*o)*(i*x-f*m)-(a*h-s*o)*(c*x-f*l)+(a*u-r*o)*(c*m-i*l)+(n*h-s*e)*(M*x-f*b)-(n*u-r*e)*(M*m-i*b)+(s*u-r*h)*(M*l-c*b)}function c(t,a,n){const s=a[0],r=a[1],o=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 g=n[0],p=n[1],y=n[2],R=n[3];return t[0]=g*s+p*h+y*i+R*m,t[1]=g*r+p*u+y*f+R*x,t[2]=g*o+p*M+y*b+R*q,t[3]=g*e+p*c+y*l+R*d,g=n[4],p=n[5],y=n[6],R=n[7],t[4]=g*s+p*h+y*i+R*m,t[5]=g*r+p*u+y*f+R*x,t[6]=g*o+p*M+y*b+R*q,t[7]=g*e+p*c+y*l+R*d,g=n[8],p=n[9],y=n[10],R=n[11],t[8]=g*s+p*h+y*i+R*m,t[9]=g*r+p*u+y*f+R*x,t[10]=g*o+p*M+y*b+R*q,t[11]=g*e+p*c+y*l+R*d,g=n[12],p=n[13],y=n[14],R=n[15],t[12]=g*s+p*h+y*i+R*m,t[13]=g*r+p*u+y*f+R*x,t[14]=g*o+p*M+y*b+R*q,t[15]=g*e+p*c+y*l+R*d,t}function i(t,a,n){const s=n[0],r=n[1],o=n[2];if(a===t)t[12]=a[0]*s+a[4]*r+a[8]*o+a[12],t[13]=a[1]*s+a[5]*r+a[9]*o+a[13],t[14]=a[2]*s+a[6]*r+a[10]*o+a[14],t[15]=a[3]*s+a[7]*r+a[11]*o+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*s+M*r+b*o+a[12],t[13]=e*s+c*r+l*o+a[13],t[14]=h*s+i*r+m*o+a[14],t[15]=u*s+f*r+x*o+a[15]}return t}function f(t,a,n){const s=n[0],r=n[1],o=n[2];return t[0]=a[0]*s,t[1]=a[1]*s,t[2]=a[2]*s,t[3]=a[3]*s,t[4]=a[4]*r,t[5]=a[5]*r,t[6]=a[6]*r,t[7]=a[7]*r,t[8]=a[8]*o,t[9]=a[9]*o,t[10]=a[10]*o,t[11]=a[11]*o,t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t}function b(t,n,s,r){let o,e,h,u,M,c,i,f,b,l,m,x,q,d,g,p,y,R,S,v,T,I,O,j,P=r[0],D=r[1],A=r[2],_=Math.sqrt(P*P+D*D+A*A);return _<a()?null:(_=1/_,P*=_,D*=_,A*=_,o=Math.sin(s),e=Math.cos(s),h=1-e,u=n[0],M=n[1],c=n[2],i=n[3],f=n[4],b=n[5],l=n[6],m=n[7],x=n[8],q=n[9],d=n[10],g=n[11],p=P*P*h+e,y=D*P*h+A*o,R=A*P*h-D*o,S=P*D*h-A*o,v=D*D*h+e,T=A*D*h+P*o,I=P*A*h+D*o,O=D*A*h-P*o,j=A*A*h+e,t[0]=u*p+f*y+x*R,t[1]=M*p+b*y+q*R,t[2]=c*p+l*y+d*R,t[3]=i*p+m*y+g*R,t[4]=u*S+f*v+x*T,t[5]=M*S+b*v+q*T,t[6]=c*S+l*v+d*T,t[7]=i*S+m*v+g*T,t[8]=u*I+f*O+x*j,t[9]=M*I+b*O+q*j,t[10]=c*I+l*O+d*j,t[11]=i*I+m*O+g*j,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function l(t,a,n){const s=Math.sin(n),r=Math.cos(n),o=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]=o*r+M*s,t[5]=e*r+c*s,t[6]=h*r+i*s,t[7]=u*r+f*s,t[8]=M*r-o*s,t[9]=c*r-e*s,t[10]=i*r-h*s,t[11]=f*r-u*s,t}function m(t,a,n){const s=Math.sin(n),r=Math.cos(n),o=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]=o*r-M*s,t[1]=e*r-c*s,t[2]=h*r-i*s,t[3]=u*r-f*s,t[8]=o*s+M*r,t[9]=e*s+c*r,t[10]=h*s+i*r,t[11]=u*s+f*r,t}function x(t,a,n){const s=Math.sin(n),r=Math.cos(n),o=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]=o*r+M*s,t[1]=e*r+c*s,t[2]=h*r+i*s,t[3]=u*r+f*s,t[4]=M*r-o*s,t[5]=c*r-e*s,t[6]=i*r-h*s,t[7]=f*r-u*s,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 g(t,n,s){if(0===n)return r(t);let o,e,h,u=s[0],M=s[1],c=s[2],i=Math.sqrt(u*u+M*M+c*c);return i<a()?null:(i=1/i,u*=i,M*=i,c*=i,o=Math.sin(n),e=Math.cos(n),h=1-e,t[0]=u*u*h+e,t[1]=M*u*h+c*o,t[2]=c*u*h-M*o,t[3]=0,t[4]=u*M*h-c*o,t[5]=M*M*h+e,t[6]=c*M*h+u*o,t[7]=0,t[8]=u*c*h+M*o,t[9]=M*c*h-u*o,t[10]=c*c*h+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,a){const n=Math.sin(a),s=Math.cos(a);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=s,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),s=Math.cos(a);return t[0]=s,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]=s,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),s=Math.cos(a);return t[0]=s,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=s,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,n){const s=a[0],r=a[1],o=a[2],e=a[3],h=s+s,u=r+r,M=o+o,c=s*h,i=s*u,f=s*M,b=r*u,l=r*M,m=o*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 v(t,a){const n=T,s=-a[0],r=-a[1],o=-a[2],e=a[3],h=a[4],u=a[5],M=a[6],c=a[7],i=s*s+r*r+o*o+e*e;return i>0?(n[0]=2*(h*e+c*s+u*o-M*r)/i,n[1]=2*(u*e+c*r+M*s-h*o)/i,n[2]=2*(M*e+c*o+h*r-u*s)/i):(n[0]=2*(h*e+c*s+u*o-M*r),n[1]=2*(u*e+c*r+M*s-h*o),n[2]=2*(M*e+c*o+h*r-u*s)),S(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],s=a[1],r=a[2],o=a[4],e=a[5],h=a[6],u=a[8],M=a[9],c=a[10];return t[0]=Math.sqrt(n*n+s*s+r*r),t[1]=Math.sqrt(o*o+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 s=0;return n>0?(s=2*Math.sqrt(n+1),t[3]=.25*s,t[0]=(a[6]-a[9])/s,t[1]=(a[8]-a[2])/s,t[2]=(a[1]-a[4])/s):a[0]>a[5]&&a[0]>a[10]?(s=2*Math.sqrt(1+a[0]-a[5]-a[10]),t[3]=(a[6]-a[9])/s,t[0]=.25*s,t[1]=(a[1]+a[4])/s,t[2]=(a[8]+a[2])/s):a[5]>a[10]?(s=2*Math.sqrt(1+a[5]-a[0]-a[10]),t[3]=(a[8]-a[2])/s,t[0]=(a[1]+a[4])/s,t[1]=.25*s,t[2]=(a[6]+a[9])/s):(s=2*Math.sqrt(1+a[10]-a[0]-a[5]),t[3]=(a[1]-a[4])/s,t[0]=(a[8]+a[2])/s,t[1]=(a[6]+a[9])/s,t[2]=.25*s),t}function P(t,a,n,s){const r=a[0],o=a[1],e=a[2],h=a[3],u=r+r,M=o+o,c=e+e,i=r*u,f=r*M,b=r*c,l=o*M,m=o*c,x=e*c,q=h*u,d=h*M,g=h*c,p=s[0],y=s[1],R=s[2];return t[0]=(1-(l+x))*p,t[1]=(f+g)*p,t[2]=(b-d)*p,t[3]=0,t[4]=(f-g)*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,s,r){const o=a[0],e=a[1],h=a[2],u=a[3],M=o+o,c=e+e,i=h+h,f=o*M,b=o*c,l=o*i,m=e*c,x=e*i,q=h*i,d=u*M,g=u*c,p=u*i,y=s[0],R=s[1],S=s[2],v=r[0],T=r[1],I=r[2],O=(1-(m+q))*y,j=(b+p)*y,P=(l-g)*y,D=(b-p)*R,A=(1-(f+q))*R,_=(x+d)*R,w=(l+g)*S,F=(x-d)*S,Q=(1-(f+m))*S;return t[0]=O,t[1]=j,t[2]=P,t[3]=0,t[4]=D,t[5]=A,t[6]=_,t[7]=0,t[8]=w,t[9]=F,t[10]=Q,t[11]=0,t[12]=n[0]+v-(O*v+D*T+w*I),t[13]=n[1]+T-(j*v+A*T+F*I),t[14]=n[2]+I-(P*v+_*T+Q*I),t[15]=1,t}function A(t,a){const n=a[0],s=a[1],r=a[2],o=a[3],e=n+n,h=s+s,u=r+r,M=n*e,c=s*e,i=s*h,f=r*e,b=r*h,l=r*u,m=o*e,x=o*h,q=o*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 _(t,a,n,s,r,o,e){const h=1/(n-a),u=1/(r-s),M=1/(o-e);return t[0]=2*o*h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+a)*h,t[9]=(r+s)*u,t[10]=(e+o)*M,t[11]=-1,t[12]=0,t[13]=0,t[14]=e*o*2*M,t[15]=0,t}function w(t,a,n,s,r){const o=1/Math.tan(a/2);let e;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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!=r&&r!==1/0?(e=1/(s-r),t[10]=(r+s)*e,t[14]=2*r*s*e):(t[10]=-1,t[14]=-2*s),t}function F(t,a,n,s){const r=Math.tan(a.upDegrees*Math.PI/180),o=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/(r+o);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]=(r-o)*M*.5,t[10]=s/(n-s),t[11]=-1,t[12]=0,t[13]=0,t[14]=s*n/(n-s),t[15]=0,t}function Q(t,a,n,s,r,o,e){const h=1/(a-n),u=1/(s-r),M=1/(o-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]=(r+s)*u,t[14]=(e+o)*M,t[15]=1,t}function k(t,n,s,o){const e=n[0],h=n[1],u=n[2];let M=e-s[0],c=h-s[1],i=u-s[2];const f=a();if(Math.abs(M)<f&&Math.abs(c)<f&&Math.abs(i)<f)return void r(t);let b=1/Math.sqrt(M*M+c*c+i*i);M*=b,c*=b,i*=b;const l=o[0],m=o[1],x=o[2];let q=m*i-x*c,d=x*M-l*i,g=l*c-m*M;b=Math.sqrt(q*q+d*d+g*g),b?(b=1/b,q*=b,d*=b,g*=b):(q=0,d=0,g=0);let p=c*g-i*d,y=i*q-M*g,R=M*d-c*q;b=Math.sqrt(p*p+y*y+R*R),b?(b=1/b,p*=b,y*=b,R*=b):(p=0,y=0,R=0),t[0]=q,t[1]=p,t[2]=M,t[3]=0,t[4]=d,t[5]=y,t[6]=c,t[7]=0,t[8]=g,t[9]=R,t[10]=i,t[11]=0,t[12]=-(q*e+d*h+g*u),t[13]=-(p*e+y*h+R*u),t[14]=-(M*e+c*h+i*u),t[15]=1}function z(t,a,n,s){const r=a[0],o=a[1],e=a[2],h=s[0],u=s[1],M=s[2];let c=r-n[0],i=o-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]=r,t[13]=o,t[14]=e,t[15]=1,t}function E(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 N(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 V(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 X(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 Y(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 Z(t,a,n,s){return t[0]=a[0]+n[0]*s,t[1]=a[1]+n[1]*s,t[2]=a[2]+n[2]*s,t[3]=a[3]+n[3]*s,t[4]=a[4]+n[4]*s,t[5]=a[5]+n[5]*s,t[6]=a[6]+n[6]*s,t[7]=a[7]+n[7]*s,t[8]=a[8]+n[8]*s,t[9]=a[9]+n[9]*s,t[10]=a[10]+n[10]*s,t[11]=a[11]+n[11]*s,t[12]=a[12]+n[12]*s,t[13]=a[13]+n[13]*s,t[14]=a[14]+n[14]*s,t[15]=a[15]+n[15]*s,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 s=t[0],r=t[1],o=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],g=n[0],p=n[1],y=n[2],R=n[3],S=n[4],v=n[5],T=n[6],I=n[7],O=n[8],j=n[9],P=n[10],D=n[11],A=n[12],_=n[13],w=n[14],F=n[15],Q=a();return Math.abs(s-g)<=Q*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(r-p)<=Q*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-y)<=Q*Math.max(1,Math.abs(o),Math.abs(y))&&Math.abs(e-R)<=Q*Math.max(1,Math.abs(e),Math.abs(R))&&Math.abs(h-S)<=Q*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(u-v)<=Q*Math.max(1,Math.abs(u),Math.abs(v))&&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-A)<=Q*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(x-_)<=Q*Math.max(1,Math.abs(x),Math.abs(_))&&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(),s=t[0],r=t[1],o=t[2],e=t[4],h=t[5],u=t[6],M=t[8],c=t[9],i=t[10];return Math.abs(1-(s*s+e*e+M*M))<=n&&Math.abs(1-(r*r+h*h+c*c))<=n&&Math.abs(1-(o*o+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=X,L=Object.freeze(Object.defineProperty({__proto__:null,add:V,adjoint:u,copy:n,determinant:M,equals:C,exactEquals:B,frob:N,fromQuat:A,fromQuat2:v,fromRotation:g,fromRotationTranslation:S,fromRotationTranslationScale:P,fromRotationTranslationScaleOrigin:D,fromScaling:d,fromTranslation:q,fromXRotation:p,fromYRotation:y,fromZRotation:R,frustum:_,getRotation:j,getScaling:O,getTranslation:I,hasIdentityRotation:H,identity:r,invert:h,invertOrIdentity:e,isOrthoNormal:G,lookAt:k,mul:J,multiply:c,multiplyScalar:Y,multiplyScalarAndAdd:Z,ortho:Q,perspective:w,perspectiveFromFieldOfView:F,rotate:b,rotateX:l,rotateY:m,rotateZ:x,scale:f,set:s,str:E,sub:K,subtract:X,targetTo:z,translate:i,transpose:o},Symbol.toStringTag,{value:"Module"}));export{p as A,I as B,L as C,j as D,d as E,A as F,u as G,M as H,y as I,S as J,v as K,D as L,w as M,F as N,E as O,N as P,V as Q,X as R,Y as S,Z as T,J as U,K as V,h as a,R as b,n as c,g as d,b as e,q as f,P as g,C as h,r as i,B as j,f as k,O as l,c as m,m as n,x as o,e as p,_ as q,l as r,s,o as t,k as u,z as v,i as w,Q as x,H as y,G as z};
5
+ import{c as t}from"./vec3f64.js";import{g 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 s(t,a,n,s,r,o,e,h,u,M,c,i,f,b,l,m,x){return t[0]=a,t[1]=n,t[2]=s,t[3]=r,t[4]=o,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 r(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 o(t,a){if(t===a){const n=a[1],s=a[2],r=a[3],o=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]=s,t[9]=o,t[11]=a[14],t[12]=r,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)||r(t),t}function h(t,a){const n=a[0],s=a[1],r=a[2],o=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-s*e,g=n*u-r*e,p=n*M-o*e,y=s*u-r*h,R=s*M-o*h,S=r*M-o*u,v=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-g*j+p*O+y*I-R*T+S*v;return D?(D=1/D,t[0]=(h*P-u*j+M*O)*D,t[1]=(r*j-s*P-o*O)*D,t[2]=(m*S-x*R+q*y)*D,t[3]=(f*R-i*S-b*y)*D,t[4]=(u*I-e*P-M*T)*D,t[5]=(n*P-r*I+o*T)*D,t[6]=(x*p-l*S-q*g)*D,t[7]=(c*S-f*p+b*g)*D,t[8]=(e*j-h*I+M*v)*D,t[9]=(s*I-n*j-o*v)*D,t[10]=(l*R-m*p+q*d)*D,t[11]=(i*p-c*R-b*d)*D,t[12]=(h*T-e*O-u*v)*D,t[13]=(n*O-s*T+r*v)*D,t[14]=(m*g-l*y-x*d)*D,t[15]=(c*y-i*g+f*d)*D,t):null}function u(t,a){const n=a[0],s=a[1],r=a[2],o=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]=-(s*(f*q-b*x)-i*(r*q-o*x)+m*(r*b-o*f)),t[2]=s*(u*q-M*x)-h*(r*q-o*x)+m*(r*M-o*u),t[3]=-(s*(u*b-M*f)-h*(r*b-o*f)+i*(r*M-o*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*(r*q-o*x)+l*(r*b-o*f),t[6]=-(n*(u*q-M*x)-e*(r*q-o*x)+l*(r*M-o*u)),t[7]=n*(u*b-M*f)-e*(r*b-o*f)+c*(r*M-o*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*(s*q-o*m)+l*(s*b-o*i)),t[10]=n*(h*q-M*m)-e*(s*q-o*m)+l*(s*M-o*h),t[11]=-(n*(h*b-M*i)-e*(s*b-o*i)+c*(s*M-o*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*(s*x-r*m)+l*(s*f-r*i),t[14]=-(n*(h*x-u*m)-e*(s*x-r*m)+l*(s*u-r*h)),t[15]=n*(h*f-u*i)-e*(s*f-r*i)+c*(s*u-r*h),t}function M(t){const a=t[0],n=t[1],s=t[2],r=t[3],o=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*o)*(i*x-f*m)-(a*h-s*o)*(c*x-f*l)+(a*u-r*o)*(c*m-i*l)+(n*h-s*e)*(M*x-f*b)-(n*u-r*e)*(M*m-i*b)+(s*u-r*h)*(M*l-c*b)}function c(t,a,n){const s=a[0],r=a[1],o=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 g=n[0],p=n[1],y=n[2],R=n[3];return t[0]=g*s+p*h+y*i+R*m,t[1]=g*r+p*u+y*f+R*x,t[2]=g*o+p*M+y*b+R*q,t[3]=g*e+p*c+y*l+R*d,g=n[4],p=n[5],y=n[6],R=n[7],t[4]=g*s+p*h+y*i+R*m,t[5]=g*r+p*u+y*f+R*x,t[6]=g*o+p*M+y*b+R*q,t[7]=g*e+p*c+y*l+R*d,g=n[8],p=n[9],y=n[10],R=n[11],t[8]=g*s+p*h+y*i+R*m,t[9]=g*r+p*u+y*f+R*x,t[10]=g*o+p*M+y*b+R*q,t[11]=g*e+p*c+y*l+R*d,g=n[12],p=n[13],y=n[14],R=n[15],t[12]=g*s+p*h+y*i+R*m,t[13]=g*r+p*u+y*f+R*x,t[14]=g*o+p*M+y*b+R*q,t[15]=g*e+p*c+y*l+R*d,t}function i(t,a,n){const s=n[0],r=n[1],o=n[2];if(a===t)t[12]=a[0]*s+a[4]*r+a[8]*o+a[12],t[13]=a[1]*s+a[5]*r+a[9]*o+a[13],t[14]=a[2]*s+a[6]*r+a[10]*o+a[14],t[15]=a[3]*s+a[7]*r+a[11]*o+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*s+M*r+b*o+a[12],t[13]=e*s+c*r+l*o+a[13],t[14]=h*s+i*r+m*o+a[14],t[15]=u*s+f*r+x*o+a[15]}return t}function f(t,a,n){const s=n[0],r=n[1],o=n[2];return t[0]=a[0]*s,t[1]=a[1]*s,t[2]=a[2]*s,t[3]=a[3]*s,t[4]=a[4]*r,t[5]=a[5]*r,t[6]=a[6]*r,t[7]=a[7]*r,t[8]=a[8]*o,t[9]=a[9]*o,t[10]=a[10]*o,t[11]=a[11]*o,t[12]=a[12],t[13]=a[13],t[14]=a[14],t[15]=a[15],t}function b(t,n,s,r){let o,e,h,u,M,c,i,f,b,l,m,x,q,d,g,p,y,R,S,v,T,I,O,j,P=r[0],D=r[1],A=r[2],_=Math.sqrt(P*P+D*D+A*A);return _<a()?null:(_=1/_,P*=_,D*=_,A*=_,o=Math.sin(s),e=Math.cos(s),h=1-e,u=n[0],M=n[1],c=n[2],i=n[3],f=n[4],b=n[5],l=n[6],m=n[7],x=n[8],q=n[9],d=n[10],g=n[11],p=P*P*h+e,y=D*P*h+A*o,R=A*P*h-D*o,S=P*D*h-A*o,v=D*D*h+e,T=A*D*h+P*o,I=P*A*h+D*o,O=D*A*h-P*o,j=A*A*h+e,t[0]=u*p+f*y+x*R,t[1]=M*p+b*y+q*R,t[2]=c*p+l*y+d*R,t[3]=i*p+m*y+g*R,t[4]=u*S+f*v+x*T,t[5]=M*S+b*v+q*T,t[6]=c*S+l*v+d*T,t[7]=i*S+m*v+g*T,t[8]=u*I+f*O+x*j,t[9]=M*I+b*O+q*j,t[10]=c*I+l*O+d*j,t[11]=i*I+m*O+g*j,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)}function l(t,a,n){const s=Math.sin(n),r=Math.cos(n),o=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]=o*r+M*s,t[5]=e*r+c*s,t[6]=h*r+i*s,t[7]=u*r+f*s,t[8]=M*r-o*s,t[9]=c*r-e*s,t[10]=i*r-h*s,t[11]=f*r-u*s,t}function m(t,a,n){const s=Math.sin(n),r=Math.cos(n),o=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]=o*r-M*s,t[1]=e*r-c*s,t[2]=h*r-i*s,t[3]=u*r-f*s,t[8]=o*s+M*r,t[9]=e*s+c*r,t[10]=h*s+i*r,t[11]=u*s+f*r,t}function x(t,a,n){const s=Math.sin(n),r=Math.cos(n),o=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]=o*r+M*s,t[1]=e*r+c*s,t[2]=h*r+i*s,t[3]=u*r+f*s,t[4]=M*r-o*s,t[5]=c*r-e*s,t[6]=i*r-h*s,t[7]=f*r-u*s,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 g(t,n,s){if(0===n)return r(t);let o,e,h,u=s[0],M=s[1],c=s[2],i=Math.sqrt(u*u+M*M+c*c);return i<a()?null:(i=1/i,u*=i,M*=i,c*=i,o=Math.sin(n),e=Math.cos(n),h=1-e,t[0]=u*u*h+e,t[1]=M*u*h+c*o,t[2]=c*u*h-M*o,t[3]=0,t[4]=u*M*h-c*o,t[5]=M*M*h+e,t[6]=c*M*h+u*o,t[7]=0,t[8]=u*c*h+M*o,t[9]=M*c*h-u*o,t[10]=c*c*h+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,a){const n=Math.sin(a),s=Math.cos(a);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=s,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),s=Math.cos(a);return t[0]=s,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]=s,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),s=Math.cos(a);return t[0]=s,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=s,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,n){const s=a[0],r=a[1],o=a[2],e=a[3],h=s+s,u=r+r,M=o+o,c=s*h,i=s*u,f=s*M,b=r*u,l=r*M,m=o*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 v(t,a){const n=T,s=-a[0],r=-a[1],o=-a[2],e=a[3],h=a[4],u=a[5],M=a[6],c=a[7],i=s*s+r*r+o*o+e*e;return i>0?(n[0]=2*(h*e+c*s+u*o-M*r)/i,n[1]=2*(u*e+c*r+M*s-h*o)/i,n[2]=2*(M*e+c*o+h*r-u*s)/i):(n[0]=2*(h*e+c*s+u*o-M*r),n[1]=2*(u*e+c*r+M*s-h*o),n[2]=2*(M*e+c*o+h*r-u*s)),S(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],s=a[1],r=a[2],o=a[4],e=a[5],h=a[6],u=a[8],M=a[9],c=a[10];return t[0]=Math.sqrt(n*n+s*s+r*r),t[1]=Math.sqrt(o*o+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 s=0;return n>0?(s=2*Math.sqrt(n+1),t[3]=.25*s,t[0]=(a[6]-a[9])/s,t[1]=(a[8]-a[2])/s,t[2]=(a[1]-a[4])/s):a[0]>a[5]&&a[0]>a[10]?(s=2*Math.sqrt(1+a[0]-a[5]-a[10]),t[3]=(a[6]-a[9])/s,t[0]=.25*s,t[1]=(a[1]+a[4])/s,t[2]=(a[8]+a[2])/s):a[5]>a[10]?(s=2*Math.sqrt(1+a[5]-a[0]-a[10]),t[3]=(a[8]-a[2])/s,t[0]=(a[1]+a[4])/s,t[1]=.25*s,t[2]=(a[6]+a[9])/s):(s=2*Math.sqrt(1+a[10]-a[0]-a[5]),t[3]=(a[1]-a[4])/s,t[0]=(a[8]+a[2])/s,t[1]=(a[6]+a[9])/s,t[2]=.25*s),t}function P(t,a,n,s){const r=a[0],o=a[1],e=a[2],h=a[3],u=r+r,M=o+o,c=e+e,i=r*u,f=r*M,b=r*c,l=o*M,m=o*c,x=e*c,q=h*u,d=h*M,g=h*c,p=s[0],y=s[1],R=s[2];return t[0]=(1-(l+x))*p,t[1]=(f+g)*p,t[2]=(b-d)*p,t[3]=0,t[4]=(f-g)*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,s,r){const o=a[0],e=a[1],h=a[2],u=a[3],M=o+o,c=e+e,i=h+h,f=o*M,b=o*c,l=o*i,m=e*c,x=e*i,q=h*i,d=u*M,g=u*c,p=u*i,y=s[0],R=s[1],S=s[2],v=r[0],T=r[1],I=r[2],O=(1-(m+q))*y,j=(b+p)*y,P=(l-g)*y,D=(b-p)*R,A=(1-(f+q))*R,_=(x+d)*R,w=(l+g)*S,F=(x-d)*S,Q=(1-(f+m))*S;return t[0]=O,t[1]=j,t[2]=P,t[3]=0,t[4]=D,t[5]=A,t[6]=_,t[7]=0,t[8]=w,t[9]=F,t[10]=Q,t[11]=0,t[12]=n[0]+v-(O*v+D*T+w*I),t[13]=n[1]+T-(j*v+A*T+F*I),t[14]=n[2]+I-(P*v+_*T+Q*I),t[15]=1,t}function A(t,a){const n=a[0],s=a[1],r=a[2],o=a[3],e=n+n,h=s+s,u=r+r,M=n*e,c=s*e,i=s*h,f=r*e,b=r*h,l=r*u,m=o*e,x=o*h,q=o*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 _(t,a,n,s,r,o,e){const h=1/(n-a),u=1/(r-s),M=1/(o-e);return t[0]=2*o*h,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+a)*h,t[9]=(r+s)*u,t[10]=(e+o)*M,t[11]=-1,t[12]=0,t[13]=0,t[14]=e*o*2*M,t[15]=0,t}function w(t,a,n,s,r){const o=1/Math.tan(a/2);let e;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,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!=r&&r!==1/0?(e=1/(s-r),t[10]=(r+s)*e,t[14]=2*r*s*e):(t[10]=-1,t[14]=-2*s),t}function F(t,a,n,s){const r=Math.tan(a.upDegrees*Math.PI/180),o=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/(r+o);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]=(r-o)*M*.5,t[10]=s/(n-s),t[11]=-1,t[12]=0,t[13]=0,t[14]=s*n/(n-s),t[15]=0,t}function Q(t,a,n,s,r,o,e){const h=1/(a-n),u=1/(s-r),M=1/(o-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]=(r+s)*u,t[14]=(e+o)*M,t[15]=1,t}function k(t,n,s,o){const e=n[0],h=n[1],u=n[2];let M=e-s[0],c=h-s[1],i=u-s[2];const f=a();if(Math.abs(M)<f&&Math.abs(c)<f&&Math.abs(i)<f)return void r(t);let b=1/Math.sqrt(M*M+c*c+i*i);M*=b,c*=b,i*=b;const l=o[0],m=o[1],x=o[2];let q=m*i-x*c,d=x*M-l*i,g=l*c-m*M;b=Math.sqrt(q*q+d*d+g*g),b?(b=1/b,q*=b,d*=b,g*=b):(q=0,d=0,g=0);let p=c*g-i*d,y=i*q-M*g,R=M*d-c*q;b=Math.sqrt(p*p+y*y+R*R),b?(b=1/b,p*=b,y*=b,R*=b):(p=0,y=0,R=0),t[0]=q,t[1]=p,t[2]=M,t[3]=0,t[4]=d,t[5]=y,t[6]=c,t[7]=0,t[8]=g,t[9]=R,t[10]=i,t[11]=0,t[12]=-(q*e+d*h+g*u),t[13]=-(p*e+y*h+R*u),t[14]=-(M*e+c*h+i*u),t[15]=1}function z(t,a,n,s){const r=a[0],o=a[1],e=a[2],h=s[0],u=s[1],M=s[2];let c=r-n[0],i=o-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]=r,t[13]=o,t[14]=e,t[15]=1,t}function E(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 N(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 V(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 X(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 Y(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 Z(t,a,n,s){return t[0]=a[0]+n[0]*s,t[1]=a[1]+n[1]*s,t[2]=a[2]+n[2]*s,t[3]=a[3]+n[3]*s,t[4]=a[4]+n[4]*s,t[5]=a[5]+n[5]*s,t[6]=a[6]+n[6]*s,t[7]=a[7]+n[7]*s,t[8]=a[8]+n[8]*s,t[9]=a[9]+n[9]*s,t[10]=a[10]+n[10]*s,t[11]=a[11]+n[11]*s,t[12]=a[12]+n[12]*s,t[13]=a[13]+n[13]*s,t[14]=a[14]+n[14]*s,t[15]=a[15]+n[15]*s,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 s=t[0],r=t[1],o=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],g=n[0],p=n[1],y=n[2],R=n[3],S=n[4],v=n[5],T=n[6],I=n[7],O=n[8],j=n[9],P=n[10],D=n[11],A=n[12],_=n[13],w=n[14],F=n[15],Q=a();return Math.abs(s-g)<=Q*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(r-p)<=Q*Math.max(1,Math.abs(r),Math.abs(p))&&Math.abs(o-y)<=Q*Math.max(1,Math.abs(o),Math.abs(y))&&Math.abs(e-R)<=Q*Math.max(1,Math.abs(e),Math.abs(R))&&Math.abs(h-S)<=Q*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(u-v)<=Q*Math.max(1,Math.abs(u),Math.abs(v))&&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-A)<=Q*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(x-_)<=Q*Math.max(1,Math.abs(x),Math.abs(_))&&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(),s=t[0],r=t[1],o=t[2],e=t[4],h=t[5],u=t[6],M=t[8],c=t[9],i=t[10];return Math.abs(1-(s*s+e*e+M*M))<=n&&Math.abs(1-(r*r+h*h+c*c))<=n&&Math.abs(1-(o*o+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=X,L=Object.freeze(Object.defineProperty({__proto__:null,add:V,adjoint:u,copy:n,determinant:M,equals:C,exactEquals:B,frob:N,fromQuat:A,fromQuat2:v,fromRotation:g,fromRotationTranslation:S,fromRotationTranslationScale:P,fromRotationTranslationScaleOrigin:D,fromScaling:d,fromTranslation:q,fromXRotation:p,fromYRotation:y,fromZRotation:R,frustum:_,getRotation:j,getScaling:O,getTranslation:I,hasIdentityRotation:H,identity:r,invert:h,invertOrIdentity:e,isOrthoNormal:G,lookAt:k,mul:J,multiply:c,multiplyScalar:Y,multiplyScalarAndAdd:Z,ortho:Q,perspective:w,perspectiveFromFieldOfView:F,rotate:b,rotateX:l,rotateY:m,rotateZ:x,scale:f,set:s,str:E,sub:K,subtract:X,targetTo:z,translate:i,transpose:o},Symbol.toStringTag,{value:"Module"}));export{p as A,I as B,L as C,j as D,d as E,A as F,u as G,M as H,y as I,S as J,v as K,D as L,w as M,F as N,E as O,N as P,V as Q,X as R,Y as S,Z as T,J as U,K as V,h as a,R as b,n as c,g as d,b as e,q as f,P as g,B as h,r as i,C as j,f as k,O as l,c as m,m as n,x as o,e as p,_ as q,l as r,s,o as t,k as u,z as v,i as w,Q as x,H as y,G 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.27/esri/copyright.txt for details.
4
4
  */
5
- import{equals as r}from"../arrayUtils.js";import e from"../Error.js";import t from"../Logger.js";import{idToReadableName as i,OriginId as o,nameToId as n}from"./PropertyOrigin.js";import{getProperties as s,merge as u}from"./utils.js";import{originSpecificWritePropertyDefinition as l}from"./extensions/serializableProperty.js";function a(r,e,t,i,o){const n={};return e.write?.writer?.call(r,i,n,t,o),n}function f(r,i,s,u,l,a){if(!u||!u.write)return!1;const f=r.get(s);if(!l&&u.write.overridePolicy){const e=u.write.overridePolicy.call(r,f,s,a??void 0);void 0!==e&&(l=e)}if(l||(l=u.write),!l||!1===l.enabled)return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const i=new e("web-document-write:property-required",`Missing value for required property '${s}' on '${r.declaredClass}'`,{propertyName:s,target:r});return i&&a&&a.messages?a.messages.push(i):i&&!a&&t.getLogger("esri.core.accessorSupport.write").error(i.name,i.message),!1}if(void 0===f)return!1;if(null===f&&!l.allowNull&&!l.writerEnsuresNonNull)return!1;if((!i.store.multipleOriginsSupported||i.store.originOf(s)===o.DEFAULTS)&&p(r,s,a,u,f))return!1;if(!l.ignoreOrigin&&a&&a.origin&&i.store.multipleOriginsSupported){if(i.store.originOf(s)<n(a.origin))return!1}return!0}function p(e,t,i,o,n){const s=o.default;if(void 0===s)return!1;if(null!=o.defaultEquals)return o.defaultEquals(n);if("function"==typeof s){if(Array.isArray(n)){const o=s.call(e,t,i??void 0);return r(o,n)}return!1}return s===n}function c(r,e,t,i){const o=s(r),n=o.metadatas,u=l(n[e],i);return!!u&&f(r,o,e,u,t,i)}function g(r,e,t){if(r&&"function"==typeof r.toJSON&&(!r.toJSON.isDefaultToJSON||!r.write))return u(e,r.toJSON(t));const o=s(r),n=o.metadatas;for(const s in n){const p=l(n[s],t);if(!f(r,o,s,p,void 0,t))continue;const c=r.get(s),g=a(r,p,p.write&&"string"==typeof p.write.target?p.write.target:s,c,t);Object.keys(g).length>0&&(e=u(e,g),t?.resources?.pendingOperations?.length&&t.resources.pendingOperations.push(Promise.all(t.resources.pendingOperations).then((()=>u(e,g,(()=>"replace-arrays"))))),t&&t.writtenProperties&&t.writtenProperties.push({target:r,propName:s,oldOrigin:i(o.store.originOf(s)),newOrigin:t.origin}))}return e}export{c as willPropertyWrite,g as write};
5
+ import{equals as r}from"../arrayUtils.js";import e from"../Error.js";import t from"../Logger.js";import{idToReadableName as i,OriginId as o,nameToId as n}from"./PropertyOrigin.js";import{getProperties as s,merge as u}from"./utils.js";import{originSpecificWritePropertyDefinition as l}from"./extensions/serializableProperty.js";function a(r,e,t,i,o){const n={};return e.write?.writer?.call(r,i,n,t,o),n}function f(r,i,s,u,l,a){if(!u||!u.write)return!1;const f=r.get(s);if(!l&&u.write.overridePolicy){const e=u.write.overridePolicy.call(r,f,s,a??void 0);void 0!==e&&(l=e)}if(l||(l=u.write),!l||!1===l.enabled)return!1;if((null===f&&!l.allowNull&&!l.writerEnsuresNonNull||void 0===f)&&l.isRequired){const i=new e("web-document-write:property-required",`Missing value for required property '${s}' on '${r.declaredClass}'`,{propertyName:s,target:r});return i&&a&&a.messages?a.messages.push(i):i&&!a&&t.getLogger("esri.core.accessorSupport.write").error(i.name,i.message),!1}if(void 0===f)return!1;if(null===f&&!l.allowNull&&!l.writerEnsuresNonNull)return!1;if(!l.alwaysWriteDefaults&&(!i.store.multipleOriginsSupported||i.store.originOf(s)===o.DEFAULTS)&&p(r,s,a,u,f))return!1;if(!l.ignoreOrigin&&a&&a.origin&&i.store.multipleOriginsSupported){if(i.store.originOf(s)<n(a.origin))return!1}return!0}function p(e,t,i,o,n){const s=o.default;if(void 0===s)return!1;if(null!=o.defaultEquals)return o.defaultEquals(n);if("function"==typeof s){if(Array.isArray(n)){const o=s.call(e,t,i??void 0);return r(o,n)}return!1}return s===n}function c(r,e,t,i){const o=s(r),n=o.metadatas,u=l(n[e],i);return!!u&&f(r,o,e,u,t,i)}function g(r,e,t){if(r&&"function"==typeof r.toJSON&&(!r.toJSON.isDefaultToJSON||!r.write))return u(e,r.toJSON(t));const o=s(r),n=o.metadatas;for(const s in n){const p=l(n[s],t);if(!f(r,o,s,p,void 0,t))continue;const c=r.get(s),g=a(r,p,p.write&&"string"==typeof p.write.target?p.write.target:s,c,t);Object.keys(g).length>0&&(e=u(e,g),t?.resources?.pendingOperations?.length&&t.resources.pendingOperations.push(Promise.all(t.resources.pendingOperations).then((()=>u(e,g,(()=>"replace-arrays"))))),t&&t.writtenProperties&&t.writtenProperties.push({target:r,propName:s,oldOrigin:i(o.store.originOf(s)),newOrigin:t.origin}))}return e}export{c as willPropertyWrite,g as write};
package/core/fontUtils.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.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../config.js";const t="woff2",n=new Map;class r{constructor(e,t){this.fontFace=e,this.promise=t}}async function o(o){const s=a(o),c=n.get(s);if(c)return c.promise;const i=new FontFace(o.family,`url('${e.fontsUrl}/woff2/${s}.${t}') format('${t}')`),u=document.fonts;if(u.has(i)&&"loading"===i.status)return i.loaded;const f=i.load().then((()=>(u.add(i),i)));return n.set(s,new r(i,f)),f}function s(){const e=document.fonts;n.forEach((t=>{e.delete(t.fontFace)})),n.clear()}function c(e){if(!e)return"arial-unicode-ms";const t=e.toLowerCase().split(" ").join("-");switch(t){case"serif":return"noto-serif";case"sans-serif":return"arial-unicode-ms";case"monospace":return"ubuntu-mono";case"fantasy":return"cabin-sketch";case"cursive":return"redressed";default:return t}}function a(e){const t=i(e)+u(e);return c(e.family)+(t.length>0?t:"-regular")}function i(e){if(!e.weight)return"";switch(e.weight.toLowerCase()){case"bold":case"bolder":return"-bold"}return""}function u(e){if(!e.style)return"";switch(e.style.toLowerCase()){case"italic":case"oblique":return"-italic"}return""}export{s as clearFonts,c as getFontFamily,a as getFullyQualifiedFontName,o as loadFont};
5
+ import e from"../config.js";const t="woff2",n=new Map,r=new Set;class s{constructor(e,t){this.fontFace=e,this.promise=t}}async function o(o){const c=u(o),a=n.get(c);if(a)return a.promise;const i=new FontFace(o.family,`url('${e.fontsUrl}/woff2/${c}.${t}') format('${t}')`,{style:o.style,weight:o.weight}),f=document.fonts;if(f.has(i)&&"loading"===i.status)return i.loaded;const l=i.load().then((()=>(f.add(i),i)));return n.set(c,new s(i,l)),r.add(i),l}function c(){const e=document.fonts;n.forEach((t=>{e.delete(t.fontFace)})),n.clear(),r.clear()}function a(e){return r.has(e)}function i(e){if(!e)return"arial-unicode-ms";const t=e.toLowerCase().split(" ").join("-");switch(t){case"serif":return"noto-serif";case"sans-serif":return"arial-unicode-ms";case"monospace":return"ubuntu-mono";case"fantasy":return"cabin-sketch";case"cursive":return"redressed";default:return t}}function u(e){const t=f(e)+l(e);return i(e.family)+(t.length>0?t:"-regular")}function f(e){if(!e.weight)return"";switch(e.weight.toLowerCase()){case"bold":case"bolder":return"-bold"}return""}function l(e){if(!e.style)return"";switch(e.style.toLowerCase()){case"italic":case"oblique":return"-italic"}return""}export{c as clearFonts,i as getFontFamily,u as getFullyQualifiedFontName,a as isCachedFontFace,o as loadFont};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../chunks/vec3f64.js";import"../../../../chunks/common.js";export{Q as add,G as adjoint,c as copy,H as determinant,h as equals,j as exactEquals,P as frob,F as fromQuat,K as fromQuat2,d as fromRotation,J as fromRotationTranslation,g as fromRotationTranslationScale,L as fromRotationTranslationScaleOrigin,E as fromScaling,f as fromTranslation,A as fromXRotation,I as fromYRotation,b as fromZRotation,q as frustum,D as getRotation,l as getScaling,B as getTranslation,y as hasIdentityRotation,i as identity,a as invert,p as invertOrIdentity,z as isOrthoNormal,u as lookAt,U as mul,m as multiply,S as multiplyScalar,T as multiplyScalarAndAdd,x as ortho,M as perspective,N as perspectiveFromFieldOfView,e as rotate,r as rotateX,n as rotateY,o as rotateZ,k as scale,s as set,O as str,V as sub,R as subtract,v as targetTo,w as translate,t as transpose}from"../../../../chunks/mat4.js";
5
+ import"../../../../chunks/vec3f64.js";import"../../../../chunks/common.js";export{Q as add,G as adjoint,c as copy,H as determinant,j as equals,h as exactEquals,P as frob,F as fromQuat,K as fromQuat2,d as fromRotation,J as fromRotationTranslation,g as fromRotationTranslationScale,L as fromRotationTranslationScaleOrigin,E as fromScaling,f as fromTranslation,A as fromXRotation,I as fromYRotation,b as fromZRotation,q as frustum,D as getRotation,l as getScaling,B as getTranslation,y as hasIdentityRotation,i as identity,a as invert,p as invertOrIdentity,z as isOrthoNormal,u as lookAt,U as mul,m as multiply,S as multiplyScalar,T as multiplyScalarAndAdd,x as ortho,M as perspective,N as perspectiveFromFieldOfView,e as rotate,r as rotateX,n as rotateY,o as rotateZ,k as scale,s as set,O as str,V as sub,R as subtract,v as targetTo,w as translate,t as transpose}from"../../../../chunks/mat4.js";
package/geometry/Mesh.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.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{HandleOwnerMixin as o}from"../core/HandleOwner.js";import r from"../core/Loadable.js";import n from"../core/Logger.js";import{EsriPromiseMixin as s}from"../core/Promise.js";import{whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{c as p}from"../chunks/vec3f64.js";import m from"./Extent.js";import h from"./Geometry.js";import u from"./Point.js";import d from"./Polygon.js";import{composeAxes as f,create as g}from"./support/axisAngleDegrees.js";import x from"./support/MeshComponent.js";import y from"./support/MeshTransform.js";import{MeshVertexAttributes as b}from"./support/MeshVertexAttributes.js";import{triangulate as w}from"./support/triangulationUtils.js";import{centerAt as j}from"./support/meshUtils/centerAt.js";import{loadExternal as v}from"./support/meshUtils/loadExternal.js";import{Metadata as M}from"./support/meshUtils/Metadata.js";import{offset as L}from"./support/meshUtils/offset.js";import{convertUnitGeometry as P,createUnitSizeBox as S,extractSingleFaceOfBox as A,createUnitSizeSphere as R,createUnitSizeCylinder as F,convertPlaneSizeParameter as z,createUnitSizePlane as U}from"./support/meshUtils/primitives.js";import{rotate as C}from"./support/meshUtils/rotate.js";import{scale as O}from"./support/meshUtils/scale.js";var E;const T="esri.geometry.Mesh";let _=E=class extends(o(r.LoadableMixin(s(h)))){constructor(e){super(e),this.components=null,this.transform=null,this.metadata=new M,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new b,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add(a((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _boundingInfo(){const e=this.vertexAttributes.position,t=this.spatialReference;if(0===e.length||this.components&&0===this.components.length)return{extent:new m({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t}),center:new u({x:0,y:0,z:0,spatialReference:t})};const o=null!=this.transform?this.transform.project(e,t):e;let r=1/0,n=1/0,s=1/0,i=-1/0,a=-1/0,c=-1/0,l=0,p=0,h=0;const d=o.length,f=1/(d/3);let g=0;for(;g<d;){const e=o[g++],t=o[g++],m=o[g++];r=Math.min(r,e),n=Math.min(n,t),s=Math.min(s,m),i=Math.max(i,e),a=Math.max(a,t),c=Math.max(c,m),l+=f*e,p+=f*t,h+=f*m}return{extent:new m({xmin:r,ymin:n,zmin:s,xmax:i,ymax:a,zmax:c,spatialReference:t}),center:new u({x:l,y:p,z:h,spatialReference:t})}}get anchor(){if(null!=this.transform)return this.transform.getOriginPoint(this.spatialReference);const e=this._boundingInfo;return new u({x:e.center.x,y:e.center.y,z:e.extent.zmin,spatialReference:this.spatialReference})}get origin(){return null!=this.transform?this.transform.getOriginPoint(this.spatialReference):this._boundingInfo.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._boundingInfo.extent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(x.from(e)),this.notifyChange("components")):n.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}n.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else n.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,o,r){return f(e,t,o,I),C(this,I,r),this}offset(e,t,o,r){return this.loaded?(G[0]=e,G[1]=t,G[2]=o,L(this,G,r),this):(n.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(O(this,e,t),this):(n.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(j(this,e,t),this):(n.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(v(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){let e=null;if(this.components){const t=new Map,o=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,o)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),transform:null!=this.transform?this.transform.clone():null,metadata:this.metadata.clone()};return new E(t)}cloneShallow(){return new E({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=import("./support/meshUtils/exporters/gltf/gltfexport.js"),o=this.load(),r=await Promise.all([t,o]),{toBinaryGLTF:n}=r[0];return n(this,e)}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof u))return n.getLogger(T).error(".createBox()","expected location to be a Point instance"),null;const o=new E(P(S(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?A(o,t.imageFace):o}static createSphere(e,t){return e instanceof u?new E(P(R(t&&t.densificationFactor||0),e,t)):(n.getLogger(T).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof u?new E(P(F(t&&t.densificationFactor||0),e,t)):(n.getLogger(T).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof u))return n.getLogger(T).error(".createPlane()","expected location to be a Point instance"),null;const o=t?.facing??"up",r=z(o,t?.size);return new E(P(U(o),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof d))return n.getLogger(T).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const o=w(e);return new E({vertexAttributes:new b({position:o.position}),components:[new x({faces:o.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference})}static async createFromGLTF(e,o,r){if(!(e instanceof u))throw n.getLogger(T).error(".createfromGLTF()","expected location to be a Point instance"),new t("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:s}=await i(import("./support/meshUtils/loadGLTFMesh.js"),r);return new E(await s(e,o,r))}static async createFromFiles(e,o,r){if(!(e instanceof u)){const e="Expected location to be a Point instance";throw n.getLogger(T).error(".createFromFiles()",e),new t("invalid-input",e)}const s=E.createWithExternalSource(e,o),i=r?.layer;if(!i){const e="A layer is needed to convert the files";throw n.getLogger(T).error(".createFromFiles()",e),new t("invalid-input",e)}const[a]=await i.uploadAssets([s],r);return a}static createWithExternalSource(e,t,o){const r=o?.extent??null,n=o?.transform?.clone()??new y;n.origin=[e.x,e.y,e.z??0];const s=e.spatialReference,i={source:t,extent:r},a=new M;return a.externalSources.push(i),new E({metadata:a,transform:n,spatialReference:s})}static createIncomplete(e,o){const r=o?.transform?.clone()??new y;r.origin=[e.x,e.y,e.z??0];const n=e.spatialReference,s=new E({transform:r,spatialReference:n});return s.addResolvingPromise(Promise.reject(new t("mesh-incomplete","Mesh resources are not complete"))),s}};e([c({type:[x],json:{write:!0}})],_.prototype,"components",void 0),e([c({type:y,json:{write:!0}})],_.prototype,"transform",void 0),e([c({constructOnly:!0})],_.prototype,"metadata",void 0),e([c({readOnly:!0})],_.prototype,"hasExtent",null),e([c({readOnly:!0})],_.prototype,"_boundingInfo",null),e([c({readOnly:!0})],_.prototype,"anchor",null),e([c({readOnly:!0})],_.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],_.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],_.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],_.prototype,"hasM",void 0),e([c({type:b,nonNullable:!0,json:{write:!0}})],_.prototype,"vertexAttributes",void 0),_=E=e([l(T)],_);const G=p(),I=g(),B=_;export{B as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/Error.js";import{HandleOwnerMixin as r}from"../core/HandleOwner.js";import o from"../core/Loadable.js";import s from"../core/Logger.js";import{EsriPromiseMixin as n}from"../core/Promise.js";import{whenOrAbort as i}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{property as c}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{c as l}from"../chunks/vec3f64.js";import m from"./Extent.js";import h from"./Geometry.js";import u from"./Point.js";import d from"./Polygon.js";import{composeAxes as f,create as g}from"./support/axisAngleDegrees.js";import x from"./support/MeshComponent.js";import y from"./support/MeshGeoreferencedRelativeVertexSpace.js";import v from"./support/MeshGeoreferencedVertexSpace.js";import w from"./support/MeshLocalVertexSpace.js";import b from"./support/MeshTransform.js";import{MeshVertexAttributes as j}from"./support/MeshVertexAttributes.js";import{triangulate as S}from"./support/triangulationUtils.js";import{centerAt as M}from"./support/meshUtils/centerAt.js";import{project as R}from"./support/meshUtils/georeference.js";import{loadExternal as L}from"./support/meshUtils/loadExternal.js";import{Metadata as P}from"./support/meshUtils/Metadata.js";import{offset as A}from"./support/meshUtils/offset.js";import{convertUnitGeometry as F,createUnitSizeBox as U,extractSingleFaceOfBox as z,createUnitSizeSphere as O,createUnitSizeCylinder as C,convertPlaneSizeParameter as E,createUnitSizePlane as G}from"./support/meshUtils/primitives.js";import{rotate as T}from"./support/meshUtils/rotate.js";import{scale as _}from"./support/meshUtils/scale.js";var I;const V="esri.geometry.Mesh",B={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:v,"georeferenced-relative":y,local:w}};let k=I=class extends(r(o.LoadableMixin(n(h)))){constructor(e){super(e),this.components=null,this.vertexSpace=new v,this.transform=null,this.metadata=new P,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new j,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add(a((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _boundingInfo(){const e=this.vertexAttributes.position,t=this.spatialReference;if(0===e.length||this.components&&0===this.components.length)return{extent:new m({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t}),center:new u({x:0,y:0,z:0,spatialReference:t})};const{vertexSpace:r,transform:o}=this,s=r.isRelative?R(o,r,e,t):e;let n=1/0,i=1/0,a=1/0,c=-1/0,p=-1/0,l=-1/0,h=0,d=0,f=0;const g=s.length,x=1/(g/3);let y=0;for(;y<g;){const e=s[y++],t=s[y++],r=s[y++];n=Math.min(n,e),i=Math.min(i,t),a=Math.min(a,r),c=Math.max(c,e),p=Math.max(p,t),l=Math.max(l,r),h+=x*e,d+=x*t,f+=x*r}return{extent:new m({xmin:n,ymin:i,zmin:a,xmax:c,ymax:p,zmax:l,spatialReference:t}),center:new u({x:h,y:d,z:f,spatialReference:t})}}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const t=this._boundingInfo;return new u({x:t.center.x,y:t.center.y,z:t.extent.zmin,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._boundingInfo.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._boundingInfo.extent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(x.from(e)),this.notifyChange("components")):s.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,r,o){return f(e,t,r,W),T(this,W,o),this}offset(e,t,r,o){return this.loaded?(D[0]=e,D[1]=t,D[2]=r,A(this,D,o),this):(s.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(_(this,e,t),this):(s.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(M(this,e,t),this):(s.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(L(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){let e=null;if(this.components){const t=new Map,r=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,r)))}const t={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:this.vertexSpace.clone(),transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new I(t)}cloneShallow(){return new I({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=import("./support/meshUtils/exporters/gltf/gltfexport.js"),r=this.load(),o=await Promise.all([t,r]),{toBinaryGLTF:s}=o[0];return s(this,e)}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof u))return s.getLogger(V).error(".createBox()","expected location to be a Point instance"),null;const r=new I(F(U(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?z(r,t.imageFace):r}static createSphere(e,t){return e instanceof u?new I(F(O(t&&t.densificationFactor||0),e,t)):(s.getLogger(V).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof u?new I(F(C(t&&t.densificationFactor||0),e,t)):(s.getLogger(V).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof u))return s.getLogger(V).error(".createPlane()","expected location to be a Point instance"),null;const r=t?.facing??"up",o=E(r,t?.size);return new I(F(G(r),e,{...t,size:o}))}static createFromPolygon(e,t){if(!(e instanceof d))return s.getLogger(V).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const r=S(e);return new I({vertexAttributes:new j({position:r.position}),components:[new x({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new v})}static async createFromGLTF(e,r,o){if(!(e instanceof u))throw s.getLogger(V).error(".createfromGLTF()","expected location to be a Point instance"),new t("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:n}=await i(import("./support/meshUtils/loadGLTFMesh.js"),o);return new I(await n(e,r,o))}static async createFromFiles(e,r,o){if(!(e instanceof u)){const e="Expected location to be a Point instance";throw s.getLogger(V).error(".createFromFiles()",e),new t("invalid-input",e)}const n=I.createWithExternalSource(e,r),i=o?.layer;if(!i){const e="A layer is needed to convert the files";throw s.getLogger(V).error(".createFromFiles()",e),new t("invalid-input",e)}const[a]=await i.uploadAssets([n],o);return a}static createWithExternalSource(e,t,r){const o=r?.extent??null,{x:s,y:n,z:i,spatialReference:a}=e,c=r?.transform?.clone()??new b,p=r?.vertexSpace??new w({origin:[s,n,i??0]}),l={source:t,extent:o},m=new P;return m.externalSources.push(l),new I({metadata:m,transform:c,vertexSpace:p,spatialReference:a})}static createIncomplete(e,r){const{x:o,y:s,z:n,spatialReference:i}=e,a=r?.transform?.clone()??new b,c=r?.vertexSpace??new w({origin:[o,s,n??0]}),p=new I({transform:a,vertexSpace:c,spatialReference:i});return p.addResolvingPromise(Promise.reject(new t("mesh-incomplete","Mesh resources are not complete"))),p}};e([c({type:[x],json:{write:!0}})],k.prototype,"components",void 0),e([c({nonNullable:!0,types:B,constructOnly:!0,json:{write:!0}})],k.prototype,"vertexSpace",void 0),e([c({type:b,json:{write:!0}})],k.prototype,"transform",void 0),e([c({constructOnly:!0})],k.prototype,"metadata",void 0),e([c({readOnly:!0})],k.prototype,"hasExtent",null),e([c({readOnly:!0})],k.prototype,"_boundingInfo",null),e([c({readOnly:!0})],k.prototype,"anchor",null),e([c({readOnly:!0})],k.prototype,"origin",null),e([c({readOnly:!0,json:{read:!1}})],k.prototype,"extent",null),e([c({readOnly:!0,json:{read:!1,write:!0,default:!0}})],k.prototype,"hasZ",void 0),e([c({readOnly:!0,json:{read:!1,write:!0,default:!1}})],k.prototype,"hasM",void 0),e([c({type:j,nonNullable:!0,json:{write:!0}})],k.prototype,"vertexAttributes",void 0),k=I=e([p(V)],k);const D=l(),W=g(),N=k;export{N as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import MeshGeoreferencedRelativeVertexSpace = __esri.MeshGeoreferencedRelativeVertexSpace;
4
+ export default MeshGeoreferencedRelativeVertexSpace;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{c as p,f as c}from"../../chunks/vec3f64.js";import n from"../Point.js";let a=class extends(r(o)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=p()}getOriginPoint(e){const[r,o,t]=this.origin;return new n({x:r,y:o,z:t,spatialReference:e})}setOriginFormPoint({x:e,y:r,z:o}){this.origin=c(e,r,o??0)}};e([s({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],a.prototype,"type",void 0),e([t({type:[Number],nonNullable:!0,json:{write:!0}})],a.prototype,"origin",void 0),a=e([i("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],a);const m=a;export{m as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import MeshGeoreferencedVertexSpace = __esri.MeshGeoreferencedVertexSpace;
4
+ export default MeshGeoreferencedVertexSpace;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import"../../core/Logger.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/Error.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";let c=class extends(r(o)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};e([s({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),c=e([t("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const p=c;export{p as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import MeshLocalVertexSpace = __esri.MeshLocalVertexSpace;
4
+ export default MeshLocalVertexSpace;
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
+ */
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{enumeration as t}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{c as p,f as c}from"../../chunks/vec3f64.js";import a from"../Point.js";let n=class extends(r(e)){constructor(o){super(o),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=p()}getOriginPoint(o){const[r,e,s]=this.origin;return new a({x:r,y:e,z:s,spatialReference:o})}setOriginFormPoint({x:o,y:r,z:e}){this.origin=c(o,r,e??0)}};o([t({local:"local"},{readOnly:!0})],n.prototype,"type",void 0),o([s({type:[Number],nonNullable:!0,json:{write:!0}})],n.prototype,"origin",void 0),n=o([i("esri.geometry.support.MeshLocalVertexSpace")],n);const m=n;export{m as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import MeshTransform = __esri.MeshTransform;
4
+ export default MeshTransform;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{g as i,a as e,m as a,h as n,j as l}from"../../chunks/mat4.js";import{c,I as p}from"../../chunks/mat4f64.js";import{s as h}from"../../chunks/quat.js";import{a as m}from"../../chunks/quatf64.js";import{m as u,k as g}from"../../chunks/vec3.js";import{c as j,f,a as y}from"../../chunks/vec3f64.js";import x from"../Point.js";import{computeTranslationToOriginAndRotation as v,projectBuffer as b}from"../projection.js";import{getSphericalPCPF as M}from"../spatialReferenceEllipsoidUtils.js";import{create as d,angleRad as N,axis as k}from"./axisAngleDegrees.js";import{newDoubleArray as w,doubleArrayFrom as I}from"./DoubleArray.js";import{t as S}from"../../chunks/vec32.js";var q;let A=q=class extends r{constructor(t){super(t),this.origin=j(),this.translation=j(),this.rotation=d(),this.scale=f(1,1,1),this.geographic=!0}get localMatrix(){const t=c();return h(D,k(this.rotation),N(this.rotation)),i(t,D,this.translation,this.scale),t}get localMatrixInverse(){return e(c(),this.localMatrix)}applyLocal(t,r){return u(r,t,this.localMatrix)}applyLocalInverse(t,r){return u(r,t,this.localMatrixInverse)}project(t,r){if(this.geographic){const o=M(r),s=c();v(r,this.origin,s,o),a(s,s,this.localMatrix);const i=w(t.length);return S(i,t,s),b(i,o,0,i,r,0,i.length/3),i}const{localMatrix:o,origin:s}=this,i=n(o,p)?I(t):S(w(t.length),t,o);for(let e=0;e<i.length;e+=3)i[e]+=s[0],i[e+1]+=s[1],i[e+2]+=s[2];return i}getOriginPoint(t){const[r,o,s]=this.origin;return new x({x:r,y:o,z:s,spatialReference:t})}equals(t){return null!=t&&this.geographic===t.geographic&&g(this.origin,t.origin)&&l(this.localMatrix,t.localMatrix)}clone(){const t={origin:y(this.origin),translation:y(this.translation),rotation:d(this.rotation),scale:y(this.scale),geographic:this.geographic};return new q(t)}};t([o({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"origin",void 0),t([o({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"translation",void 0),t([o({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"rotation",void 0),t([o({type:[Number],nonNullable:!0,json:{write:!0}})],A.prototype,"scale",void 0),t([o({type:Boolean,nonNullable:!0,json:{write:!0}})],A.prototype,"geographic",void 0),t([o()],A.prototype,"localMatrix",null),t([o()],A.prototype,"localMatrixInverse",null),A=q=t([s("esri.geometry.support.MeshTransform")],A);const D=m(),L=A;export{L as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{g as a,a as e,h as i}from"../../chunks/mat4.js";import{c as n}from"../../chunks/mat4f64.js";import{s as l}from"../../chunks/quat.js";import{a as p}from"../../chunks/quatf64.js";import{m as c}from"../../chunks/vec3.js";import{c as u,g as m,f as h,a as j}from"../../chunks/vec3f64.js";import{UP as x,fromAxisAndAngle as f,axis as y,angle as g,angleRad as A}from"./axisAngleDegrees.js";var v;let b=v=class extends o{constructor(t){super(t),this.translation=u(),this.rotationAxis=m(x),this.rotationAngle=0,this.scale=h(1,1,1)}get rotation(){return f(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=j(y(t)),this.rotationAngle=g(t)}get localMatrix(){const t=n();return l(M,y(this.rotation),A(this.rotation)),a(t,M,this.translation,this.scale),t}get localMatrixInverse(){return e(n(),this.localMatrix)}applyLocal(t,o){return c(o,t,this.localMatrix)}applyLocalInverse(t,o){return c(o,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&i(this.localMatrix,t.localMatrix)}clone(){const t={translation:j(this.translation),rotationAxis:j(this.rotationAxis),rotationAngle:this.rotationAngle,scale:j(this.scale)};return new v(t)}};t([r({type:[Number],nonNullable:!0,json:{write:!0}})],b.prototype,"translation",void 0),t([r({type:[Number],nonNullable:!0,json:{write:!0}})],b.prototype,"rotationAxis",void 0),t([r({type:Number,nonNullable:!0,json:{write:!0}})],b.prototype,"rotationAngle",void 0),t([r({type:[Number],nonNullable:!0,json:{write:!0}})],b.prototype,"scale",void 0),t([r()],b.prototype,"rotation",null),t([r()],b.prototype,"localMatrix",null),t([r()],b.prototype,"localMatrixInverse",null),b=v=t([s("esri.geometry.support.MeshTransform")],b);const M=p(),N=b;export{N as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../core/has.js";import{PooledRBush as e}from"../../../core/libs/rbush/PooledRBush.js";import{georeferenceApplyTransform as t}from"./georeference.js";class r{async createIndex(t,r){const n=new Array;if(!t.vertexAttributes||!t.vertexAttributes.position)return new e;const o=this._createMeshData(t),s=null!=r?await r.invoke("createIndexThread",o,{transferList:n}):this.createIndexThread(o).result;return this._createPooledRBush().fromJSON(s)}createIndexThread(e){const t=new Float64Array(e.position),r=this._createPooledRBush();return e.components?this._createIndexComponentsThread(r,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(r,t)}_createIndexAllThread(e,t){const r=new Array(t.length/9);let o=0;for(let s=0;s<t.length;s+=9)r[o++]=n(t,s,s+3,s+6);return e.load(r),{result:e.toJSON()}}_createIndexComponentsThread(e,t,r){let o=0;for(const n of r)o+=n.length/3;const s=new Array(o);let a=0;for(const i of r)for(let e=0;e<i.length;e+=3)s[a++]=n(t,3*i[e],3*i[e+1],3*i[e+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const r=(e.transform?t({position:e.vertexAttributes.position,normal:null,tangent:null},e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:r}:{position:r,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new e(9,has("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function n(e,t,r,n){return{minX:Math.min(e[t],e[r],e[n]),maxX:Math.max(e[t],e[r],e[n]),minY:Math.min(e[t+1],e[r+1],e[n+1]),maxY:Math.max(e[t+1],e[r+1],e[n+1]),p0:[e[t],e[t+1],e[t+2]],p1:[e[r],e[r+1],e[r+2]],p2:[e[n],e[n+1],e[n+2]]}}export{r as default};
5
+ import has from"../../../core/has.js";import{PooledRBush as e}from"../../../core/libs/rbush/PooledRBush.js";import{georeferenceApplyTransform as t}from"./georeference.js";class r{async createIndex(t,r){const n=new Array;if(!t.vertexAttributes||!t.vertexAttributes.position)return new e;const o=this._createMeshData(t),s=null!=r?await r.invoke("createIndexThread",o,{transferList:n}):this.createIndexThread(o).result;return this._createPooledRBush().fromJSON(s)}createIndexThread(e){const t=new Float64Array(e.position),r=this._createPooledRBush();return e.components?this._createIndexComponentsThread(r,t,e.components.map((e=>new Uint32Array(e)))):this._createIndexAllThread(r,t)}_createIndexAllThread(e,t){const r=new Array(t.length/9);let o=0;for(let s=0;s<t.length;s+=9)r[o++]=n(t,s,s+3,s+6);return e.load(r),{result:e.toJSON()}}_createIndexComponentsThread(e,t,r){let o=0;for(const n of r)o+=n.length/3;const s=new Array(o);let a=0;for(const i of r)for(let e=0;e<i.length;e+=3)s[a++]=n(t,3*i[e],3*i[e+1],3*i[e+2]);return e.load(s),{result:e.toJSON()}}_createMeshData(e){const r=(e.vertexSpace.isRelative?t({position:e.vertexAttributes.position,normal:null,tangent:null},e.vertexSpace,e.transform,e.spatialReference).position:e.vertexAttributes.position).buffer;return!e.components||e.components.some((e=>!e.faces))?{position:r}:{position:r,components:e.components.map((e=>e.faces))}}_createPooledRBush(){return new e(9,has("esri-csp-restrictions")?e=>e:[".minX",".minY",".maxX",".maxY"])}}function n(e,t,r,n){return{minX:Math.min(e[t],e[r],e[n]),maxX:Math.max(e[t],e[r],e[n]),minY:Math.min(e[t+1],e[r+1],e[n+1]),maxY:Math.max(e[t+1],e[r+1],e[n+1]),p0:[e[t],e[t+1],e[t+2]],p1:[e[r],e[r+1],e[r+2]],p2:[e[n],e[n+1],e[n+2]]}}export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{c as t}from"../../../chunks/vec3f64.js";import{projectPointToVector as r}from"../../projection.js";import{isGeographicMesh as i}from"./geographicUtils.js";import{ungeoreference as o,georeference as n}from"./georeference.js";const s=e.getLogger("esri.geometry.support.meshUtils.centerAt");function a(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const o=r?.origin??e.origin;if(null!=e.transform)null!=r?.geographic&&r.geographic!==e.transform.geographic&&s.warn(`Specifying the 'geographic' parameter (${r.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),c(e.transform,t,o);else{i(e.spatialReference,r)?f(e,t,o):g(e,t,o)}}function c(e,t,r){const i=t.x-r.x,o=t.y-r.y,n=t.hasZ&&r.hasZ?t.z-r.z:0,s=e.origin;e.origin=[s[0]+i,s[1]+o,s[2]+n]}function f(e,t,r){const i=o(e.vertexAttributes,r,{geographic:!0}),{position:s,normal:a,tangent:c}=n(i,t,{geographic:!0});e.vertexAttributes.position=s,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=c,e.vertexAttributesChanged()}function g(e,t,i){const o=m,n=l;if(r(t,n,e.spatialReference)){if(!r(i,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.error(`Failed to project specified origin (wkid:${i.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}p(e.vertexAttributes.position,n,o),e.vertexAttributesChanged()}else s.error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid})`)}function p(e,t,r){if(e)for(let i=0;i<e.length;i+=3)for(let o=0;o<3;o++)e[i+o]+=t[o]-r[o]}const l=t(),m=t();export{a as centerAt};
5
+ import e from"../../../core/Logger.js";import{s as t,a as r}from"../../../chunks/vec3.js";import{c as i}from"../../../chunks/vec3f64.js";import{projectPointToVector as o}from"../../projection.js";import{validateGeographicFlag as n,isGeographicMesh as s}from"./geographicUtils.js";import{ungeoreference as c,georeference as a}from"./georeference.js";const f="esri.geometry.support.meshUtils.centerAt";function p(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:i}=e,o=r?.origin??e.origin;if(i.isRelative)n(i,f,r),g(i,t,o);else{s(e.spatialReference,r)?l(e,t,o):m(e,t,o)}}function g(e,o,n){const s=t(v,o.x-n.x,o.y-n.y,(o.z??0)-(n.z??0)),c=e.origin;e.origin=r(i(),c,s)}function l(e,t,r){const i=c(e.vertexAttributes,r,{geographic:!0}),{position:o,normal:n,tangent:s}=a(i,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=n,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}function m(t,r,i){const n=d,s=x;if(o(r,s,t.spatialReference)){if(!o(i,n,t.spatialReference)){const r=t.origin;n[0]=r.x,n[1]=r.y,n[2]=r.z,e.getLogger(f).error(`Failed to project specified origin (wkid:${i.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}).`)}u(t.vertexAttributes.position,s,n),t.vertexAttributesChanged()}else e.getLogger(f).error(`Failed to project centerAt location (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid})`)}function u(e,t,r){if(e)for(let i=0;i<e.length;i+=3)for(let o=0;o<3;o++)e[i+o]+=t[o]-r[o]}const x=i(),d=i(),v=i();export{p as centerAt};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{s as n,b as t,f as e,n as o}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import r from"../../../../Point.js";function a(n,t){if(n.components)for(const e of n.components)e.faces&&"smooth"===e.shading&&i(e,t)}function i(s,r){null==r.normal&&(r.normal=new Float32Array(r.position.length));const a=s.faces,{position:i,normal:f}=r,x=a.length/3;for(let o=0;o<x;++o){const s=3*a[3*o],r=3*a[3*o+1],p=3*a[3*o+2],x=n(c,i[s],i[s+1],i[s+2]),h=n(m,i[r],i[r+1],i[r+2]),u=n(l,i[p],i[p+1],i[p+2]),g=t(h,h,x),j=t(u,u,x),w=e(g,g,j);f[s]+=w[0],f[s+1]+=w[1],f[s+2]+=w[2],f[r]+=w[0],f[r+1]+=w[1],f[r+2]+=w[2],f[p]+=w[0],f[p+1]+=w[1],f[p+2]+=w[2]}for(let t=0;t<f.length;t+=3)n(p,f[t],f[t+1],f[t+2]),o(p,p),f[t]=p[0],f[t+1]=p[1],f[t+2]=p[2]}function f(n){if(null!=n.transform)return n.transform.getOriginPoint(n.spatialReference);const t=n.extent.xmax-n.extent.width/2,e=n.extent.ymax-n.extent.height/2,o=n.extent.zmin;return new r({x:t,y:e,z:o,spatialReference:n.extent.spatialReference})}const c=s(),m=s(),l=s(),p=s();export{f as computeOrigin,a as smoothNormals};
5
+ import{s as n,b as t,f as e,n as o}from"../../../../../chunks/vec3.js";import{c as s}from"../../../../../chunks/vec3f64.js";import i from"../../../../Point.js";function r(n,t){if(n.components)for(const e of n.components)e.faces&&"smooth"===e.shading&&a(e,t)}function a(s,i){null==i.normal&&(i.normal=new Float32Array(i.position.length));const r=s.faces,{position:a,normal:c}=i,h=r.length/3;for(let o=0;o<h;++o){const s=3*r[3*o],i=3*r[3*o+1],p=3*r[3*o+2],h=n(f,a[s],a[s+1],a[s+2]),u=n(l,a[i],a[i+1],a[i+2]),g=n(m,a[p],a[p+1],a[p+2]),x=t(u,u,h),v=t(g,g,h),R=e(x,x,v);c[s]+=R[0],c[s+1]+=R[1],c[s+2]+=R[2],c[i]+=R[0],c[i+1]+=R[1],c[i+2]+=R[2],c[p]+=R[0],c[p+1]+=R[1],c[p+2]+=R[2]}for(let t=0;t<c.length;t+=3)n(p,c[t],c[t+1],c[t+2]),o(p,p),c[t]=p[0],c[t+1]=p[1],c[t+2]=p[2]}function c(n){const{vertexSpace:t}=n;if(t.isRelative)return t.getOriginPoint(n.spatialReference);const{extent:e}=n,o=e.xmax-e.width/2,s=e.ymax-e.height/2,r=e.zmin;return new i({x:o,y:s,z:r,spatialReference:e.spatialReference})}const f=s(),l=s(),m=s(),p=s();export{c as computeOrigin,r as smoothNormals};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../core/Logger.js";import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import{deg2rad as s}from"../../../../../core/mathUtils.js";import{j as r}from"../../../../../chunks/quat.js";import{I as i,b as a}from"../../../../../chunks/quatf64.js";import{k as o}from"../../../../../chunks/vec3.js";import{Z as n,a as l,O as c}from"../../../../../chunks/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import u from"../../../MeshTransform.js";import{ungeoreferenceByTransform as f}from"../../georeference.js";import{Buffer as m}from"./buffer.js";import{computeOrigin as p,smoothNormals as d}from"./geometry.js";import{BufferOutputType as g,ImageOutputType as _,AttributeType as T,TargetBuffer as x,AlphaMode as A}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as b}from"./imageutils.js";import{isEncodedMeshTexture as E}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as M,TextureWrapMode as O}from"../../../../../views/webgl/enums.js";const w=e.getLogger("gltf");class I{constructor(e,t,s){this.params={},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:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===g.GLB||t.options.imageOutputType===_.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=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;o(s,n)||(t.translation=l(s));const h=e.rotation;r(h,i)||(t.rotation=a(h));const u=e.scale;o(u,c)||(t.scale=l(u)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const f=this.gltf.nodes.length;return this.gltf.nodes.push(t),f}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const t={primitives:[]},s=this.gltf.extras,r=s.options.bufferOutputType===g.GLB;let i;i=r?s.binChunkBuffer:new m(this.gltf),this.params.origin||(this.params.origin=p(e));const a=this.params.ignoreLocalTransform?e.transform?new u({origin:[e.transform.origin[0],e.transform.origin[1],e.transform.origin[2]],geographic:!1}):null:e.transform,o=f(e.vertexAttributes,a,this.params.origin,{geographic:this.params.geographic,unit:"meters"});d(e,o),this._flipYZAxis(o);const n=i.addBufferView(M.FLOAT,T.VEC3,x.ARRAY_BUFFER);let l,c,h,_;o.normal&&(l=i.addBufferView(M.FLOAT,T.VEC3,x.ARRAY_BUFFER)),e.vertexAttributes.uv&&(c=i.addBufferView(M.FLOAT,T.VEC2,x.ARRAY_BUFFER)),o.tangent&&(h=i.addBufferView(M.FLOAT,T.VEC4,x.ARRAY_BUFFER)),e.vertexAttributes.color&&(_=i.addBufferView(M.UNSIGNED_BYTE,T.VEC4,x.ARRAY_BUFFER)),n.startAccessor("POSITION"),l&&l.startAccessor("NORMAL"),c&&c.startAccessor("TEXCOORD_0"),h&&h.startAccessor("TANGENT"),_&&_.startAccessor("COLOR_0");const A=o.position.length/3,{position:R,normal:b,tangent:E}=o,{color:O,uv:w}=e.vertexAttributes;for(let u=0;u<A;++u)n.push(R[3*u]),n.push(R[3*u+1]),n.push(R[3*u+2]),l&&null!=b&&(l.push(b[3*u]),l.push(b[3*u+1]),l.push(b[3*u+2])),c&&null!=w&&(c.push(w[2*u]),c.push(w[2*u+1])),h&&null!=E&&(h.push(E[4*u]),h.push(E[4*u+1]),h.push(E[4*u+2]),h.push(E[4*u+3])),_&&null!=O&&(_.push(O[4*u]),_.push(O[4*u+1]),_.push(O[4*u+2]),_.push(O[4*u+3]));const I=n.endAccessor(),N=this._addAccessor(n.index,I);let B,C,L,v,F;if(l){const e=l.endAccessor();B=this._addAccessor(l.index,e)}if(c){const e=c.endAccessor();C=this._addAccessor(c.index,e)}if(h){const e=h.endAccessor();L=this._addAccessor(h.index,e)}if(_){const e=_.endAccessor();v=this._addAccessor(_.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(F=i.addBufferView(M.UNSIGNED_INT,T.SCALAR,x.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(F,e.components,t,N,B,C,L,v)):this._addMeshVertexNonIndexed(e.components,t,N,B,C,L,v),n.finalize(),l&&l.finalize(),c&&c.finalize(),h&&h.finalize(),F&&F.finalize(),_&&_.finalize(),r||i.finalize();const S=this.gltf.meshes.length;return this.gltf.meshes.push(t),S}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(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}}_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=A.MASK;break;case"auto":case"blend":s.alphaMode=A.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=r(t[0]/255),t[1]=r(t[1]/255),t[2]=r(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(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=i(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,w.warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const a=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),a}_createTextureInfo(e,t){const r={index:this._addTexture(e)};return t?(r.extensions||(r.extensions={}),r.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:s(t.rotation)},r):r}_addTexture(e){const s=this.gltf.textures??[];return this.gltf.textures=s,t(this._textureMap,e,(()=>{const t={sampler:this._addSampler(e),source:this._addImage(e)},r=s.length;return s.push(t),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.options.imageOutputType){case _.GLB:{const e=r.binChunkBuffer.addBufferView(M.UNSIGNED_BYTE,T.SCALAR);if(E(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const r=R(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(r).then((()=>{e.finalize()}))}s.bufferView=e.index;break}case _.DataURI:if(E(t)){w.warnOnce("Image export for basis compressed textures not available.");break}s.uri=b(t);break;default:if(E(t)){w.warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(R(t).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=O.REPEAT,s=O.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=O.CLAMP_TO_EDGE,s=O.CLAMP_TO_EDGE;break;case"mirror":t=O.MIRRORED_REPEAT,s=O.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=O.CLAMP_TO_EDGE;break;case"mirror":s=O.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=O.CLAMP_TO_EDGE;break;case"mirror":t=O.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let a=0;a<this.gltf.samplers.length;++a)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[a]))return a;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,a,o,n){for(const l of t){e.startAccessor("INDICES");for(let s=0;s<l.faces.length;++s)e.push(l.faces[s]);const t=e.endAccessor(),c={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(l.material)};i&&"flat"!==l.shading&&(c.attributes.NORMAL=i),a&&(c.attributes.TEXCOORD_0=a),o&&"flat"!==l.shading&&(c.attributes.TANGENT=o),n&&(c.attributes.COLOR_0=n),s.primitives.push(c)}}_addMeshVertexNonIndexed(e,t,s,r,i,a,o){const n={attributes:{POSITION:s}};r&&(n.attributes.NORMAL=r),i&&(n.attributes.TEXCOORD_0=i),a&&(n.attributes.TANGENT=a),o&&(n.attributes.COLOR_0=o),e&&(n.material=this._addMaterial(e[0].material)),t.primitives.push(n)}}export{I as GLTF};
5
+ import e from"../../../../../core/Logger.js";import{getOrCreateMapValue as t}from"../../../../../core/MapUtils.js";import{deg2rad as s}from"../../../../../core/mathUtils.js";import{j as r}from"../../../../../chunks/quat.js";import{I as i,b as a}from"../../../../../chunks/quatf64.js";import{k as o}from"../../../../../chunks/vec3.js";import{Z as n,a as l,O as c}from"../../../../../chunks/vec3f64.js";import h from"../../../MeshGeoreferencedRelativeVertexSpace.js";import u from"../../../MeshGeoreferencedVertexSpace.js";import f from"../../../MeshMaterialMetallicRoughness.js";import{ungeoreferenceByTransform as m}from"../../georeference.js";import{Buffer as p}from"./buffer.js";import{computeOrigin as d,smoothNormals as g}from"./geometry.js";import{BufferOutputType as _,ImageOutputType as x,AttributeType as T,TargetBuffer as R,AlphaMode as A}from"./types.js";import{imageToArrayBuffer as b,imageToDataURI as E}from"./imageutils.js";import{isEncodedMeshTexture as M}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as O,TextureWrapMode as w}from"../../../../../views/webgl/enums.js";const I=e.getLogger("gltf");class N{constructor(e,t,s){this.params={},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:{options:t,binChunkBuffer:null,promises:[]}},s&&(this.params=s),this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.options.bufferOutputType===_.GLB||t.options.imageOutputType===x.GLB;s&&(t.binChunkBuffer=new p(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=[]);const s=this._addNode(e);t.nodes.push(s)})),this.gltf.scenes.push(t)}_addNode(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;o(s,n)||(t.translation=l(s));const h=e.rotation;r(h,i)||(t.rotation=a(h));const u=e.scale;o(u,c)||(t.scale=l(u)),e.mesh&&e.mesh.vertexAttributes.position?t.mesh=this._addMesh(e.mesh):e.forEachNode((e=>{t.children||(t.children=[]);const s=this._addNode(e);t.children.push(s)}));const f=this.gltf.nodes.length;return this.gltf.nodes.push(t),f}_addMesh(e){this.gltf.meshes||(this.gltf.meshes=[]);const t={primitives:[]},s=this.gltf.extras,r=s.options.bufferOutputType===_.GLB;let i;i=r?s.binChunkBuffer:new p(this.gltf),this.params.origin||(this.params.origin=d(e));const{ignoreLocalTransform:a}=this.params,o=a?null:e.transform,{vertexSpace:n}=e,c=a?n.isRelative?new h({origin:l(n.origin)}):new u:n,f=m(e.vertexAttributes,c,o,this.params.origin,{geographic:this.params.geographic,unit:"meters"});g(e,f),this._flipYZAxis(f);const x=i.addBufferView(O.FLOAT,T.VEC3,R.ARRAY_BUFFER);let A,b,E,M;f.normal&&(A=i.addBufferView(O.FLOAT,T.VEC3,R.ARRAY_BUFFER)),e.vertexAttributes.uv&&(b=i.addBufferView(O.FLOAT,T.VEC2,R.ARRAY_BUFFER)),f.tangent&&(E=i.addBufferView(O.FLOAT,T.VEC4,R.ARRAY_BUFFER)),e.vertexAttributes.color&&(M=i.addBufferView(O.UNSIGNED_BYTE,T.VEC4,R.ARRAY_BUFFER)),x.startAccessor("POSITION"),A&&A.startAccessor("NORMAL"),b&&b.startAccessor("TEXCOORD_0"),E&&E.startAccessor("TANGENT"),M&&M.startAccessor("COLOR_0");const w=f.position.length/3,{position:I,normal:N,tangent:B}=f,{color:C,uv:v}=e.vertexAttributes;for(let l=0;l<w;++l)x.push(I[3*l]),x.push(I[3*l+1]),x.push(I[3*l+2]),A&&null!=N&&(A.push(N[3*l]),A.push(N[3*l+1]),A.push(N[3*l+2])),b&&null!=v&&(b.push(v[2*l]),b.push(v[2*l+1])),E&&null!=B&&(E.push(B[4*l]),E.push(B[4*l+1]),E.push(B[4*l+2]),E.push(B[4*l+3])),M&&null!=C&&(M.push(C[4*l]),M.push(C[4*l+1]),M.push(C[4*l+2]),M.push(C[4*l+3]));const S=x.endAccessor(),L=this._addAccessor(x.index,S);let F,y,k,V,j;if(A){const e=A.endAccessor();F=this._addAccessor(A.index,e)}if(b){const e=b.endAccessor();y=this._addAccessor(b.index,e)}if(E){const e=E.endAccessor();k=this._addAccessor(E.index,e)}if(M){const e=M.endAccessor();V=this._addAccessor(M.index,e)}e.components&&e.components.length>0&&e.components[0].faces?(j=i.addBufferView(O.UNSIGNED_INT,T.SCALAR,R.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(j,e.components,t,L,F,y,k,V)):this._addMeshVertexNonIndexed(e.components,t,L,F,y,k,V),x.finalize(),A&&A.finalize(),b&&b.finalize(),E&&E.finalize(),j&&j.finalize(),M&&M.finalize(),r||i.finalize();const D=this.gltf.meshes.length;return this.gltf.meshes.push(t),D}_flipYZAxis({position:e,normal:t,tangent:s}){this._flipYZBuffer(e,3),this._flipYZBuffer(t,3),this._flipYZBuffer(s,4)}_flipYZBuffer(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}}_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=A.MASK;break;case"auto":case"blend":s.alphaMode=A.BLEND}.5!==e.alphaCutoff&&(s.alphaCutoff=e.alphaCutoff),e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=r(t[0]/255),t[1]=r(t[1]/255),t[2]=r(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(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 f){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(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,I.warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const a=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),a}_createTextureInfo(e,t){const r={index:this._addTexture(e)};return t?(r.extensions||(r.extensions={}),r.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:s(t.rotation)},r):r}_addTexture(e){const s=this.gltf.textures??[];return this.gltf.textures=s,t(this._textureMap,e,(()=>{const t={sampler:this._addSampler(e),source:this._addImage(e)},r=s.length;return s.push(t),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.options.imageOutputType){case x.GLB:{const e=r.binChunkBuffer.addBufferView(O.UNSIGNED_BYTE,T.SCALAR);if(M(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const r=b(t).then((({data:e,type:t})=>(s.mimeType=t,e)));e.writeAsync(r).then((()=>{e.finalize()}))}s.bufferView=e.index;break}case x.DataURI:if(M(t)){I.warnOnce("Image export for basis compressed textures not available.");break}s.uri=E(t);break;default:if(M(t)){I.warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(b(t).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=w.REPEAT,s=w.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=w.CLAMP_TO_EDGE,s=w.CLAMP_TO_EDGE;break;case"mirror":t=w.MIRRORED_REPEAT,s=w.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=w.CLAMP_TO_EDGE;break;case"mirror":s=w.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=w.CLAMP_TO_EDGE;break;case"mirror":t=w.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let a=0;a<this.gltf.samplers.length;++a)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[a]))return a;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,a,o,n){for(const l of t){e.startAccessor("INDICES");for(let s=0;s<l.faces.length;++s)e.push(l.faces[s]);const t=e.endAccessor(),c={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(l.material)};i&&"flat"!==l.shading&&(c.attributes.NORMAL=i),a&&(c.attributes.TEXCOORD_0=a),o&&"flat"!==l.shading&&(c.attributes.TANGENT=o),n&&(c.attributes.COLOR_0=n),s.primitives.push(c)}}_addMeshVertexNonIndexed(e,t,s,r,i,a,o){const n={attributes:{POSITION:s}};r&&(n.attributes.NORMAL=r),i&&(n.attributes.TEXCOORD_0=i),a&&(n.attributes.TANGENT=a),o&&(n.attributes.COLOR_0=o),e&&(n.material=this._addMaterial(e[0].material)),t.primitives.push(n)}}export{N 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.27/esri/copyright.txt for details.
4
4
  */
5
- function r(r,e){return r.isGeographic||r.isWebMercator&&(e?.geographic??!0)}export{r as isGeographicMesh};
5
+ import e from"../../../core/Logger.js";function r(e,r){return e.isGeographic||e.isWebMercator&&(r?.geographic??!0)}function o(r,o,g){const i=!r.isGeoreferenced;null!=g?.geographic&&g.geographic!==i&&e.getLogger(o).warnOnce(`Specifying the 'geographic' parameter (${g.geographic}) for a Mesh vertex space of type "${r.type}" is not supported. This parameter will be ignored.`)}export{r as isGeographicMesh,o as validateGeographicFlag};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{getMetersPerUnitForSR as n,getMetersPerVerticalUnitForSR as t,convertUnit as r}from"../../../core/unitUtils.js";import{c as o}from"../../../chunks/mat3f64.js";import{a as e,k as i}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{b as a}from"../../../chunks/mat3.js";import{computeTranslationToOriginAndRotation as s}from"../../projection.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import c from"../MeshTransform.js";import{t as f,a as p}from"../../../chunks/vec32.js";import{isGeographicMesh as g}from"./geographicUtils.js";import{transformNormal as m,transformTangent as h,projectFromPCPF as y,projectNormalFromPCPF as A,projectTangentFromPCPF as w,projectToPCPF as j,projectNormalToPCPF as F,projectTangentToPCPF as R}from"./projection.js";function z(n,t,r){return g(t.spatialReference,r)?G(n,t,r):U(n,t,r)}function v(n,t,r){const{position:o,normal:e,tangent:i}=n;if(null==t)return{position:o,normal:e,tangent:i};const l=t.localMatrix;return z({position:f(new Float64Array(o.length),o,l),normal:null!=e?m(e,new Float32Array(e.length),l):null,tangent:null!=i?h(i,new Float32Array(i.length),l):null},t.getOriginPoint(r),{geographic:t.geographic})}function x(n,t,r){if(r?.useTransform){const{position:r,normal:o,tangent:e}=n;return{vertexAttributes:{position:r,normal:o,tangent:e},transform:new c({origin:[t.x,t.y,t.z??0],geographic:!0})}}return{vertexAttributes:z(n,t,r),transform:null}}function k(n,t,r){return g(t.spatialReference,r)?d(n,t,r):T(n,t,r)}function b(n,t,r,o){if(null==t)return k(n,r,o);const e=v(n,t,r.spatialReference);return r.equals(t.getOriginPoint(r.spatialReference))?T(e,r,o):k(e,r,o)}function U(n,t,r){const o=new Float64Array(n.position.length),e=n.position,i=t.x,l=t.y,a=t.z||0,{horizontal:s,vertical:u}=D(r?r.unit:null,t.spatialReference);for(let c=0;c<e.length;c+=3)o[c]=e[c]*s+i,o[c+1]=e[c+1]*s+l,o[c+2]=e[c+2]*u+a;return{position:o,normal:n.normal,tangent:n.tangent}}function G(n,t,r){const o=t.spatialReference,e=q(t,r,H),i=new Float64Array(n.position.length),l=M(n.position,e,o,i),s=a(J,e);return{position:l,normal:O(l,i,n.normal,s,o),tangent:P(l,i,n.tangent,s,o)}}function M(n,t,r,o){f(o,n,t);const e=new Float64Array(n.length);return y(o,e,r)}function O(n,t,r,o,e){if(null==r)return null;const i=new Float32Array(r.length);return p(i,r,o),A(i,n,t,e,i),i}function P(n,t,r,o,e){if(null==r)return null;const i=new Float32Array(r.length);p(i,r,o,4);for(let l=3;l<i.length;l+=4)i[l]=r[l];return w(i,n,t,e,i),i}function T(n,t,r){const o=new Float64Array(n.position.length),e=n.position,i=t.x,l=t.y,a=t.z||0,{horizontal:s,vertical:u}=D(r?r.unit:null,t.spatialReference);for(let c=0;c<e.length;c+=3)o[c]=(e[c]-i)/s,o[c+1]=(e[c+1]-l)/s,o[c+2]=(e[c+2]-a)/u;return{position:o,normal:n.normal,tangent:n.tangent}}function d(n,t,r){const o=t.spatialReference;q(t,r,H);const i=e(I,H),l=new Float64Array(n.position.length),s=E(n.position,o,i,l),u=a(J,i);return{position:s,normal:B(n.normal,n.position,l,o,u),tangent:C(n.tangent,n.position,l,o,u)}}function q(n,t,r){s(n.spatialReference,[n.x,n.y,n.z||0],r,u(n.spatialReference));const{horizontal:o,vertical:e}=D(t?t.unit:null,n.spatialReference);return i(r,r,[o,o,e]),r}function E(n,t,r,o){const e=j(n,t,o),i=new Float64Array(e.length);return f(i,e,r),i}function B(n,t,r,o,e){if(null==n)return null;const i=F(n,t,r,o,new Float32Array(n.length));return p(i,i,e),i}function C(n,t,r,o,e){if(null==n)return null;const i=R(n,t,r,o,new Float32Array(n.length));return p(i,i,e,4),i}function D(o,e){if(null==o)return K;const i=e.isGeographic?1:n(e),l=e.isGeographic?1:t(e),a=r(1,o,"meters");return{horizontal:a*i,vertical:a*l}}const H=l(),I=l(),J=o(),K={horizontal:1,vertical:1};export{z as georeference,v as georeferenceApplyTransform,x as georeferenceByTransform,k as ungeoreference,b as ungeoreferenceByTransform};
5
+ import{getMetersPerUnitForSR as n,getMetersPerVerticalUnitForSR as t,convertUnit as e}from"../../../core/unitUtils.js";import{c as r}from"../../../chunks/mat3f64.js";import{m as o,j as i,a,k as l}from"../../../chunks/mat4.js";import{I as s,c}from"../../../chunks/mat4f64.js";import{Z as u,f}from"../../../chunks/vec3f64.js";import{b as p}from"../../../chunks/mat3.js";import{computeTranslationToOriginAndRotation as m,projectBuffer as g}from"../../projection.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{newDoubleArray as j,doubleArrayFrom as y}from"../DoubleArray.js";import w from"../MeshGeoreferencedRelativeVertexSpace.js";import v from"../MeshGeoreferencedVertexSpace.js";import A from"../MeshLocalVertexSpace.js";import R from"../MeshTransform.js";import{t as x,a as F}from"../../../chunks/vec32.js";import{isGeographicMesh as z}from"./geographicUtils.js";import{transformNormal as k,transformTangent as G,projectFromPCPF as M,projectNormalFromPCPF as d,projectTangentFromPCPF as S,projectToPCPF as b,projectNormalToPCPF as U,projectTangentToPCPF as V}from"./projection.js";function O(n,t,e){return z(t.spatialReference,e)?L(n,t,e):I(n,t,e)}function P(n,t,e,r){const{position:o,normal:i,tangent:a}=n;if(!t.isRelative)return{position:o,normal:i,tangent:a};const l=e?.localMatrix??s;return O({position:x(new Float64Array(o.length),o,l),normal:null!=i?k(i,new Float32Array(i.length),l):null,tangent:null!=a?G(a,new Float32Array(a.length),l):null},t.getOriginPoint(r),{geographic:!t.isGeoreferenced})}function T(n,t,e){if(e?.useTransform){const{position:r,normal:o,tangent:i}=n,{x:a,y:l,z:s}=t,c=f(a,l,s??0);return{vertexAttributes:{position:r,normal:o,tangent:i},vertexSpace:e.geographic??1?new A({origin:c}):new w({origin:c}),transform:new R}}return{vertexAttributes:O(n,t,e),vertexSpace:new v,transform:null}}function q(n,t,e){return z(t.spatialReference,e)?J(n,t,e):H(n,t,e)}function D(n,t,e,r,o){if(!t.isRelative)return q(n,r,o);const{spatialReference:i}=r,a=P(n,t,e,i);return r.equals(t.getOriginPoint(i))?H(a,r,o):q(a,r,o)}function E(n,t,e,r){const a=t.isRelative?t.origin:u,l=t.isRelative?n?.localMatrix??s:s;if(!t.isGeoreferenced){const n=r,t=h(n);m(n,a,Y,t),o(Y,Y,l);const i=j(e.length);return x(i,e,Y),g(i,t,0,i,n,0,i.length/3),i}const c=i(l,s)?y(e):x(j(e.length),e,l);for(let o=0;o<c.length;o+=3)c[o]+=a[0],c[o+1]+=a[1],c[o+2]+=a[2];return c}function I(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,l=t.z??0,{horizontal:s,vertical:c}=X(e?e.unit:null,t.spatialReference);for(let u=0;u<o.length;u+=3)r[u]=o[u]*s+i,r[u+1]=o[u+1]*s+a,r[u+2]=o[u+2]*c+l;return{position:r,normal:n.normal,tangent:n.tangent}}function L(n,t,e){const r=t.spatialReference,o=K(t,e,Y),i=new Float64Array(n.position.length),a=Z(n.position,o,r,i),l=p(_,o);return{position:a,normal:B(a,i,n.normal,l,r),tangent:C(a,i,n.tangent,l,r)}}function Z(n,t,e,r){x(r,n,t);const o=new Float64Array(n.length);return M(r,o,e)}function B(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);return F(i,e,r),d(i,n,t,o,i),i}function C(n,t,e,r,o){if(null==e)return null;const i=new Float32Array(e.length);F(i,e,r,4);for(let a=3;a<i.length;a+=4)i[a]=e[a];return S(i,n,t,o,i),i}function H(n,t,e){const r=new Float64Array(n.position.length),o=n.position,i=t.x,a=t.y,l=t.z??0,{horizontal:s,vertical:c}=X(e?e.unit:null,t.spatialReference);for(let u=0;u<o.length;u+=3)r[u]=(o[u]-i)/s,r[u+1]=(o[u+1]-a)/s,r[u+2]=(o[u+2]-l)/c;return{position:r,normal:n.normal,tangent:n.tangent}}function J(n,t,e){const r=t.spatialReference;K(t,e,Y);const o=a($,Y),i=new Float64Array(n.position.length),l=N(n.position,r,o,i),s=p(_,o);return{position:l,normal:Q(n.normal,n.position,i,r,s),tangent:W(n.tangent,n.position,i,r,s)}}function K(n,t,e){m(n.spatialReference,[n.x,n.y,n.z??0],e,h(n.spatialReference));const{horizontal:r,vertical:o}=X(t?t.unit:null,n.spatialReference);return l(e,e,[r,r,o]),e}function N(n,t,e,r){const o=b(n,t,r),i=new Float64Array(o.length);return x(i,o,e),i}function Q(n,t,e,r,o){if(null==n)return null;const i=U(n,t,e,r,new Float32Array(n.length));return F(i,i,o),i}function W(n,t,e,r,o){if(null==n)return null;const i=V(n,t,e,r,new Float32Array(n.length));return F(i,i,o,4),i}function X(r,o){if(null==r)return nn;const i=o.isGeographic?1:n(o),a=o.isGeographic?1:t(o),l=e(1,r,"meters");return{horizontal:l*i,vertical:l*a}}const Y=c(),$=c(),_=r(),nn={horizontal:1,vertical:1};export{O as georeference,P as georeferenceApplyTransform,T as georeferenceByTransform,E as project,q as ungeoreference,D as ungeoreferenceByTransform};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o,rad2deg as n}from"../../../core/mathUtils.js";import{b as s}from"../../../chunks/mat3.js";import{c as l}from"../../../chunks/mat3f64.js";import{f as a}from"../../../chunks/vec3f64.js";import{f as i}from"../../../chunks/vec4f64.js";import u from"../MeshComponent.js";import c from"../MeshMaterialMetallicRoughness.js";import f from"../MeshTexture.js";import m from"../MeshTextureTransform.js";import{MeshVertexAttributes as p}from"../MeshVertexAttributes.js";import{BufferViewVec4f as d,BufferViewVec4u8 as g,BufferViewVec4u16 as x,BufferViewVec3u8 as T,BufferViewVec3f as h,BufferViewVec3u16 as v,BufferViewVec3f64 as w,BufferViewVec2f as j}from"../buffer/BufferView.js";import{c as b,b as y,d as M,e as C}from"../../../chunks/vec32.js";import{a as A,n as R,b as E}from"../../../chunks/vec42.js";import{createBuffer as k}from"../buffer/utils.js";import{georeferenceByTransform as B}from"./georeference.js";import{DefaultLoadingContext as F}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{loadGLTF as $}from"../../../views/3d/glTF/loader.js";import{convertPrimitiveToTriangles as O}from"../../../views/3d/glTF/internal/indexUtils.js";import{isEncodedMeshTexture as S}from"../../../views/3d/glTF/internal/resourceUtils.js";import{COLOR_GAMMA as U}from"../../../views/3d/webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{TextureWrapMode as D}from"../../../views/webgl/enums.js";import{f as L,a as _}from"../../../chunks/vec33.js";import{f as I,a as P}from"../../../chunks/vec43.js";import{a as V,f as q}from"../../../chunks/vec22.js";async function N(e,t,r){const o=new F(z(r)),n=(await $(o,t,r,!0)).model,s=n.lods.shift(),l=new Map,a=new Map;n.textures.forEach(((e,t)=>l.set(t,H(e)))),n.materials.forEach(((e,t)=>a.set(t,J(e,l))));const i=Q(s);for(const p of i.parts)W(i,p,a);const{position:u,normal:c,tangent:f,color:m,texCoord0:d}=i.vertexAttributes,g={position:u.typedBuffer,normal:null!=c?c.typedBuffer:null,tangent:null!=f?f.typedBuffer:null,uv:null!=d?d.typedBuffer:null,color:null!=m?m.typedBuffer:null},x=B(g,e,r);return{transform:x.transform,components:i.components,spatialReference:e.spatialReference,vertexAttributes:new p({position:x.vertexAttributes.position,normal:x.vertexAttributes.normal,tangent:x.vertexAttributes.tangent,color:g.color,uv:g.uv})}}function z(e){const r=e?.resolveFile;return r?{busy:!1,request:async(e,o,n)=>{const s=r(e),l="image"===o?"image":"binary"===o?"array-buffer":"json";return(await t(s,{responseType:l,signal:null!=n?n.signal:null})).data}}:null}function G(e,t){if(null==e)return"-";const o=e.typedBuffer;return`${r(t,o.buffer,(()=>t.size))}/${o.byteOffset}/${o.byteLength}`}function K(e){return null!=e?e.toString():"-"}function Q(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},o=new Map,n=new Map,s=[];for(const l of e.parts){const{attributes:{position:e,normal:a,color:i,tangent:u,texCoord0:c}}=l,f=`\n ${G(e,o)}/\n ${G(a,o)}/\n ${G(i,o)}/\n ${G(u,o)}/\n ${G(c,o)}/\n ${K(l.transform)}\n `;let m=!1;const p=r(n,f,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),a&&(has.normal=!0),i&&(has.color=!0),u&&(has.tangent=!0),c&&(has.texCoord0=!0),s.push({gltf:l,writeVertices:m,region:p})}return{vertexAttributes:{position:k(w,t),normal:has.normal?k(h,t):null,tangent:has.tangent?k(d,t):null,color:has.color?k(g,t):null,texCoord0:has.texCoord0?k(j,t):null},parts:s,components:[]}}function H(e){return new f({data:(S(e.data),e.data),wrap:Z(e.parameters.wrap)})}function J(t,r){const o=new e(re(t.color,t.opacity)),s=t.emissiveFactor?new e(oe(t.emissiveFactor)):null,l=e=>e?new m({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:n(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new c({color:o,colorTexture:r.get(t.textureColor),normalTexture:r.get(t.textureNormal),emissiveColor:s,emissiveTexture:r.get(t.textureEmissive),occlusionTexture:r.get(t.textureOcclusion),alphaMode:Y(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:r.get(t.textureMetallicRoughness),colorTextureTransform:l(t.colorTextureTransform),normalTextureTransform:l(t.normalTextureTransform),occlusionTextureTransform:l(t.occlusionTextureTransform),emissiveTextureTransform:l(t.emissiveTextureTransform),metallicRoughnessTextureTransform:l(t.metallicRoughnessTextureTransform)})}function W(e,t,r){t.writeVertices&&X(e,t);const{indices:o,attributes:n,primitiveType:s,material:l}=t.gltf;let a=O(o||n.position.count,s);const i=t.region.start;if(i){const e=new Uint32Array(a);for(let t=0;t<a.length;t++)e[t]+=i;a=e}e.components.push(new u({faces:a,material:r.get(l),trustSourceNormals:!0}))}function X(e,t){const{position:r,normal:n,tangent:a,color:i,texCoord0:u}=e.vertexAttributes,c=t.region.start,{attributes:f,transform:m}=t.gltf,p=f.position.count;if(b(r.slice(c,p),f.position,m),null!=f.normal&&null!=n){const e=s(l(),m),t=n.slice(c,p);y(t,f.normal,e),o(e)&&M(t,t)}else null!=n&&L(n,0,0,1,{dstIndex:c,count:p});if(null!=f.tangent&&null!=a){const e=s(l(),m),t=a.slice(c,p);A(t,f.tangent,e),o(e)&&R(t,t)}else null!=a&&I(a,0,0,1,1,{dstIndex:c,count:p});if(null!=f.texCoord0&&null!=u?V(u.slice(c,p),f.texCoord0):null!=u&&q(u,0,0,{dstIndex:c,count:p}),null!=f.color&&null!=i){const e=f.color,t=i.slice(c,p);if(4===e.elementCount)e instanceof d?E(t,e,255):e instanceof g?P(t,e):e instanceof x&&E(t,e,1/256);else{I(t,255,255,255,255);const r=T.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof h?C(r,e,255):e instanceof T?_(r,e):e instanceof v&&C(r,e,1/256)}}else null!=i&&I(i.slice(c,p),255,255,255,255)}function Y(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function Z(e){return{horizontal:ee(e.s),vertical:ee(e.t)}}function ee(e){switch(e){case D.CLAMP_TO_EDGE:return"clamp";case D.MIRRORED_REPEAT:return"mirror";case D.REPEAT:return"repeat"}}function te(e){return e**(1/U)*255}function re(e,t){return i(te(e[0]),te(e[1]),te(e[2]),t)}function oe(e){return a(te(e[0]),te(e[1]),te(e[2]))}export{N as loadGLTFMesh};
5
+ import e from"../../../Color.js";import t from"../../../request.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{hasScaling as o,rad2deg as n}from"../../../core/mathUtils.js";import{b as s}from"../../../chunks/mat3.js";import{c as l}from"../../../chunks/mat3f64.js";import{f as a}from"../../../chunks/vec3f64.js";import{f as i}from"../../../chunks/vec4f64.js";import u from"../MeshComponent.js";import c from"../MeshMaterialMetallicRoughness.js";import f from"../MeshTexture.js";import m from"../MeshTextureTransform.js";import{MeshVertexAttributes as p}from"../MeshVertexAttributes.js";import{BufferViewVec4f as d,BufferViewVec4u8 as g,BufferViewVec4u16 as x,BufferViewVec3u8 as T,BufferViewVec3f as h,BufferViewVec3u16 as v,BufferViewVec3f64 as w,BufferViewVec2f as j}from"../buffer/BufferView.js";import{c as b,b as y,d as M,e as C}from"../../../chunks/vec32.js";import{a as A,n as R,b as E}from"../../../chunks/vec42.js";import{createBuffer as k}from"../buffer/utils.js";import{georeferenceByTransform as B}from"./georeference.js";import{DefaultLoadingContext as F}from"../../../views/3d/glTF/DefaultLoadingContext.js";import{loadGLTF as $}from"../../../views/3d/glTF/loader.js";import{convertPrimitiveToTriangles as S}from"../../../views/3d/glTF/internal/indexUtils.js";import{isEncodedMeshTexture as O}from"../../../views/3d/glTF/internal/resourceUtils.js";import{COLOR_GAMMA as U}from"../../../views/3d/webgl-engine/materials/DefaultMaterial_COLOR_GAMMA.js";import{TextureWrapMode as D}from"../../../views/webgl/enums.js";import{f as L,a as _}from"../../../chunks/vec33.js";import{f as I,a as P}from"../../../chunks/vec43.js";import{a as V,f as q}from"../../../chunks/vec22.js";async function N(e,t,r){const o=new F(z(r)),n=(await $(o,t,r,!0)).model,s=n.lods.shift(),l=new Map,a=new Map;n.textures.forEach(((e,t)=>l.set(t,H(e)))),n.materials.forEach(((e,t)=>a.set(t,J(e,l))));const i=Q(s);for(const p of i.parts)W(i,p,a);const{position:u,normal:c,tangent:f,color:m,texCoord0:d}=i.vertexAttributes,g={position:u.typedBuffer,normal:null!=c?c.typedBuffer:null,tangent:null!=f?f.typedBuffer:null,uv:null!=d?d.typedBuffer:null,color:null!=m?m.typedBuffer:null},x=B(g,e,r);return{transform:x.transform,vertexSpace:x.vertexSpace,components:i.components,spatialReference:e.spatialReference,vertexAttributes:new p({position:x.vertexAttributes.position,normal:x.vertexAttributes.normal,tangent:x.vertexAttributes.tangent,color:g.color,uv:g.uv})}}function z(e){const r=e?.resolveFile;return r?{busy:!1,request:async(e,o,n)=>{const s=r(e),l="image"===o?"image":"binary"===o?"array-buffer":"json";return(await t(s,{responseType:l,signal:null!=n?n.signal:null})).data}}:null}function G(e,t){if(null==e)return"-";const o=e.typedBuffer;return`${r(t,o.buffer,(()=>t.size))}/${o.byteOffset}/${o.byteLength}`}function K(e){return null!=e?e.toString():"-"}function Q(e){let t=0;const has={color:!1,tangent:!1,normal:!1,texCoord0:!1},o=new Map,n=new Map,s=[];for(const l of e.parts){const{attributes:{position:e,normal:a,color:i,tangent:u,texCoord0:c}}=l,f=`\n ${G(e,o)}/\n ${G(a,o)}/\n ${G(i,o)}/\n ${G(u,o)}/\n ${G(c,o)}/\n ${K(l.transform)}\n `;let m=!1;const p=r(n,f,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),a&&(has.normal=!0),i&&(has.color=!0),u&&(has.tangent=!0),c&&(has.texCoord0=!0),s.push({gltf:l,writeVertices:m,region:p})}return{vertexAttributes:{position:k(w,t),normal:has.normal?k(h,t):null,tangent:has.tangent?k(d,t):null,color:has.color?k(g,t):null,texCoord0:has.texCoord0?k(j,t):null},parts:s,components:[]}}function H(e){return new f({data:(O(e.data),e.data),wrap:Z(e.parameters.wrap)})}function J(t,r){const o=new e(re(t.color,t.opacity)),s=t.emissiveFactor?new e(oe(t.emissiveFactor)):null,l=e=>e?new m({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:n(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new c({color:o,colorTexture:r.get(t.textureColor),normalTexture:r.get(t.textureNormal),emissiveColor:s,emissiveTexture:r.get(t.textureEmissive),occlusionTexture:r.get(t.textureOcclusion),alphaMode:Y(t.alphaMode),alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,metallic:t.metallicFactor,roughness:t.roughnessFactor,metallicRoughnessTexture:r.get(t.textureMetallicRoughness),colorTextureTransform:l(t.colorTextureTransform),normalTextureTransform:l(t.normalTextureTransform),occlusionTextureTransform:l(t.occlusionTextureTransform),emissiveTextureTransform:l(t.emissiveTextureTransform),metallicRoughnessTextureTransform:l(t.metallicRoughnessTextureTransform)})}function W(e,t,r){t.writeVertices&&X(e,t);const{indices:o,attributes:n,primitiveType:s,material:l}=t.gltf;let a=S(o||n.position.count,s);const i=t.region.start;if(i){const e=new Uint32Array(a);for(let t=0;t<a.length;t++)e[t]+=i;a=e}e.components.push(new u({faces:a,material:r.get(l),trustSourceNormals:!0}))}function X(e,t){const{position:r,normal:n,tangent:a,color:i,texCoord0:u}=e.vertexAttributes,c=t.region.start,{attributes:f,transform:m}=t.gltf,p=f.position.count;if(b(r.slice(c,p),f.position,m),null!=f.normal&&null!=n){const e=s(l(),m),t=n.slice(c,p);y(t,f.normal,e),o(e)&&M(t,t)}else null!=n&&L(n,0,0,1,{dstIndex:c,count:p});if(null!=f.tangent&&null!=a){const e=s(l(),m),t=a.slice(c,p);A(t,f.tangent,e),o(e)&&R(t,t)}else null!=a&&I(a,0,0,1,1,{dstIndex:c,count:p});if(null!=f.texCoord0&&null!=u?V(u.slice(c,p),f.texCoord0):null!=u&&q(u,0,0,{dstIndex:c,count:p}),null!=f.color&&null!=i){const e=f.color,t=i.slice(c,p);if(4===e.elementCount)e instanceof d?E(t,e,255):e instanceof g?P(t,e):e instanceof x&&E(t,e,1/256);else{I(t,255,255,255,255);const r=T.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof h?C(r,e,255):e instanceof T?_(r,e):e instanceof v&&C(r,e,1/256)}}else null!=i&&I(i.slice(c,p),255,255,255,255)}function Y(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function Z(e){return{horizontal:ee(e.s),vertical:ee(e.t)}}function ee(e){switch(e){case D.CLAMP_TO_EDGE:return"clamp";case D.MIRRORED_REPEAT:return"mirror";case D.REPEAT:return"repeat"}}function te(e){return e**(1/U)*255}function re(e,t){return i(te(e[0]),te(e[1]),te(e[2]),t)}function oe(e){return a(te(e[0]),te(e[1]),te(e[2]))}export{N as loadGLTFMesh};