@arcgis/core 4.34.0-next.20 → 4.34.0-next.22

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 (252) hide show
  1. package/analysis/VolumeMeasurement/CutFillOptions.js +5 -0
  2. package/analysis/VolumeMeasurement/volumeMeasurementUtils.js +5 -0
  3. package/analysis/VolumeMeasurementAnalysis.d.ts +4 -0
  4. package/analysis/VolumeMeasurementAnalysis.js +5 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/{bcaf6edf887e4afbbdd2.js → 02dc6e31b1244e5bb785.js} +1 -1
  7. package/assets/esri/core/workers/chunks/04c17957c15234ca0321.js +1 -0
  8. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +1 -0
  9. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +1 -0
  10. package/assets/esri/core/workers/chunks/{822b32aaeec05a347c84.js → 0ba6177ba118a0f032e2.js} +1 -1
  11. package/assets/esri/core/workers/chunks/12723e79b996969e304e.js +1 -0
  12. package/assets/esri/core/workers/chunks/{bd7b985f7962b1cc7b8a.js → 146520d263b910b5bdc7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{445ddf57d2f503a0b98b.js → 15064c3b21b325d5c2f6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +346 -0
  15. package/assets/esri/core/workers/chunks/{28b525963420f022fb0a.js → 1cc30073f8200b67cff6.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{82a5000296134834d1ac.js → 1d75cb1747ffb7b8b050.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{55ce214a10fb6fc2e901.js → 24fe862b607ec927e07f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/30fae1f066dc3cd781f1.js +1 -0
  19. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{7ec73f63929b1623de72.js → 3793f282ddaccd3465f2.js} +1 -1
  21. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +1 -0
  22. package/assets/esri/core/workers/chunks/41f487713c6278d389a1.js +1 -0
  23. package/assets/esri/core/workers/chunks/{5e7f35bf1aab93cb1c52.js → 4cea5170939c8d363ef7.js} +1 -1
  24. package/assets/esri/core/workers/chunks/5253cca467fe9bc0a210.js +1 -0
  25. package/assets/esri/core/workers/chunks/{735d96d2b951cc1df3a3.js → 576e408fb0834f3948e8.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{2a784da5fa3f502d1803.js → 58e74681ddef30ba9cb6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/5b276962c46c57155166.js +1 -0
  28. package/assets/esri/core/workers/chunks/5ce62d9fff80d014d186.js +1 -0
  29. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +1 -0
  30. package/assets/esri/core/workers/chunks/{27c9d3f6cebca087a123.js → 6136bf09950adc46bc33.js} +1 -1
  31. package/assets/esri/core/workers/chunks/66757fc16316a5c50e1e.js +1 -0
  32. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dfd9ac2e28c96900c53e.js → 6c33ecffbc783cb8f944.js} +1 -1
  34. package/assets/esri/core/workers/chunks/6ca764b4baadef5c1515.js +1 -0
  35. package/assets/esri/core/workers/chunks/{fcdf714339060731fe1c.js → 7051bcc178eb512819f6.js} +1 -1
  36. package/assets/esri/core/workers/chunks/7cfba5cec425221962e8.js +1 -0
  37. package/assets/esri/core/workers/chunks/{3a753ce4de2e6ad40f7b.js → 86d6007c45f2aa643ac8.js} +1 -1
  38. package/assets/esri/core/workers/chunks/8b19fe829a9dc26fb3fe.js +1 -0
  39. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +1 -0
  40. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +1 -0
  41. package/assets/esri/core/workers/chunks/919d2fd7ebc0c840a759.js +1 -0
  42. package/assets/esri/core/workers/chunks/92ad9098006568358550.js +1 -0
  43. package/assets/esri/core/workers/chunks/{2ed698579befe73caafd.js → 94d75f3b215e3bd1b4d7.js} +1 -1
  44. package/assets/esri/core/workers/chunks/97324f030738fc0d456b.js +1 -0
  45. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +1 -0
  46. package/assets/esri/core/workers/chunks/{15d1ab71aaf6bcf3145b.js → a7a5b89c2bb69f3af59c.js} +1 -1
  47. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +1 -0
  48. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +1 -0
  49. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +1 -0
  50. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +1 -0
  51. package/assets/esri/core/workers/chunks/b4512d62b6cb26fc6b25.js +1 -0
  52. package/assets/esri/core/workers/chunks/{63e984a65ee670449a4a.js → b4bb461955a4c2bce072.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{abc75c945f3cfb1629b0.js → ba5b24beebeb703b5919.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{51afd0e71df1825d7593.js → c64fa94cba71ba2794e2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/c94cc026c4ed330408fb.js +1 -0
  56. package/assets/esri/core/workers/chunks/cab1a1067f44ce374673.js +1 -0
  57. package/assets/esri/core/workers/chunks/{3f4a8c874c022dace9be.js → d1b363c418a67b087306.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +1 -0
  59. package/assets/esri/core/workers/chunks/{f806e9221dff7fcfc2f9.js → e2cb295104ed2f8cd2ff.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{9432a5466eec397710a4.js → e49a135a2933306a6105.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{d31fa648497b0af97dc1.js → e9a9174c4d1a0a9effb6.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +1 -0
  63. package/assets/esri/core/workers/chunks/f3e3c2340452c1d60c95.js +1 -0
  64. package/assets/esri/core/workers/chunks/{85b0e2a898251d048dda.js → f42155b7a4e6c5e80757.js} +1 -1
  65. package/assets/esri/core/workers/chunks/f43110391f124b8a179c.js +1009 -0
  66. package/assets/esri/core/workers/chunks/{080a8a1c6fe2d215142d.js → fb5e2b1ced03eef28e96.js} +1 -1
  67. package/assets/esri/core/workers/chunks/fe73e74e3e4278aedcc3.js +1 -0
  68. package/config.js +1 -1
  69. package/core/Clonable.js +1 -1
  70. package/core/lang.js +1 -1
  71. package/core/libs/rbush/PooledRBush.js +1 -1
  72. package/core/scheduling.js +1 -1
  73. package/geometry/Mesh.js +1 -1
  74. package/geometry/support/MeshComponent.js +1 -1
  75. package/geometry/support/MeshMaterial.js +1 -1
  76. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  77. package/geometry/support/MeshTexture.js +1 -1
  78. package/geometry/support/MeshTransform.js +1 -1
  79. package/geometry/support/MeshVertexAttributes.js +1 -1
  80. package/geometry/support/buffer/BufferView.js +1 -1
  81. package/geometry/support/float16.js +1 -1
  82. package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
  83. package/geometry/support/meshUtils/merge.js +1 -1
  84. package/geometry/support/meshUtils/meshCloneUtils.js +5 -0
  85. package/interfaces.d.ts +1134 -156
  86. package/kernel.js +1 -1
  87. package/layers/SubtypeGroupLayer.js +1 -1
  88. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  89. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  90. package/layers/mixins/ArcGISMapService.js +1 -1
  91. package/layers/save/mapImageLayerUtils.js +1 -1
  92. package/layers/support/TilemapCache.js +1 -1
  93. package/layers/support/TitleCreator.js +1 -1
  94. package/layers/support/arcgisLayerUrl.js +1 -1
  95. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  96. package/package.json +1 -1
  97. package/rest/knowledgeGraph/GraphAddFieldIndexResult.d.ts +4 -0
  98. package/rest/knowledgeGraph/GraphAddPropertyResult.d.ts +4 -0
  99. package/rest/knowledgeGraph/GraphDataModelOperationResult.d.ts +4 -0
  100. package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.d.ts +4 -0
  101. package/rest/knowledgeGraph/GraphDeletePropertyResult.d.ts +4 -0
  102. package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.d.ts +4 -0
  103. package/rest/knowledgeGraph/GraphUpdatePropertyResult.d.ts +4 -0
  104. package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.d.ts +4 -0
  105. package/rest/knowledgeGraphService.d.ts +7 -0
  106. package/support/requestUtils.js +1 -1
  107. package/support/revision.js +1 -1
  108. package/views/2d/engine/ManagedCanvas.js +1 -1
  109. package/views/2d/engine/ParentChildStage.js +5 -0
  110. package/views/2d/engine/Stage.js +1 -1
  111. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  112. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  113. package/views/2d/engine/webgl/Painter.js +1 -1
  114. package/views/2d/engine/webgl/VideoScreenRenderer.js +5 -0
  115. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +5 -0
  117. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +5 -0
  118. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  119. package/views/2d/layers/MediaLayerView2D.js +1 -1
  120. package/views/2d/layers/TileLayerView2D.js +1 -1
  121. package/views/2d/layers/features/Processor.js +1 -1
  122. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  123. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  124. package/views/2d/mapViewDeps.js +1 -1
  125. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  126. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +4 -0
  127. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +5 -0
  128. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  129. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  130. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  131. package/views/3d/layers/graphics/DeconflictAABR.js +1 -1
  132. package/views/3d/layers/graphics/ExtentSet.js +1 -1
  133. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  134. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  135. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  136. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  137. package/views/3d/layers/graphics/Labeler.js +1 -1
  138. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  139. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  140. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  141. package/views/3d/layers/i3s/I3SLodHandling.js +1 -1
  142. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  143. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  144. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  145. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  146. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  147. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  148. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  149. package/views/3d/state/GoToOperation.js +1 -1
  150. package/views/3d/state/ViewStateManager.js +1 -1
  151. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  152. package/views/3d/support/StreamDataLoader.js +1 -1
  153. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  154. package/views/3d/support/cameraUtils.js +1 -1
  155. package/views/3d/support/viewingModeUtils.js +5 -0
  156. package/views/3d/support/viewpointUtils.js +1 -1
  157. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  158. package/views/3d/terrain/OverlayManager.js +1 -1
  159. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  160. package/views/3d/terrain/OverlayRenderer.js +1 -1
  161. package/views/3d/terrain/TerrainSurface.js +1 -1
  162. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  163. package/views/3d/webgl-engine/Stage.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  165. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  166. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  167. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  168. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  169. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  170. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  171. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  172. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  173. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  174. package/views/3d/webgl.d.ts +2 -0
  175. package/views/3d/webgl.js +1 -1
  176. package/views/SceneView.js +1 -1
  177. package/views/VideoView.js +1 -1
  178. package/views/View2D.js +1 -1
  179. package/views/Viewport2DBaseMixin.js +5 -0
  180. package/views/Viewport2DMixin.js +1 -1
  181. package/views/layers/FeatureLayerView.js +1 -1
  182. package/views/support/Scheduler.js +1 -1
  183. package/views/support/layerViewUtils.js +1 -1
  184. package/views/video/VideoOperationalDataView.js +5 -0
  185. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  186. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +4 -0
  187. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  188. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +4 -0
  189. package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
  190. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +4 -0
  191. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  192. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +4 -0
  193. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  194. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +4 -0
  195. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  196. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  197. package/widgets/Directions.js +1 -1
  198. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  199. package/widgets/Editor/Edits.js +1 -1
  200. package/widgets/FeatureForm/EditableInput.d.ts +2 -2
  201. package/widgets/FeatureForm/FieldInput.d.ts +2 -2
  202. package/widgets/FeatureForm/GroupInput.d.ts +2 -2
  203. package/widgets/FeatureForm/InputBase.d.ts +2 -2
  204. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  205. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  206. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  207. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  208. package/widgets/OrientedImageryViewer.js +1 -1
  209. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  210. package/widgets/VideoPlayer.js +1 -1
  211. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  212. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  213. package/widgets/support/SelectionList/LayerItem.js +1 -1
  214. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  215. package/widgets/support/SelectionList.js +1 -1
  216. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  217. package/assets/esri/core/workers/chunks/034950f7d0596e77a7dd.js +0 -1
  218. package/assets/esri/core/workers/chunks/0808b7b2a18331ac0cf6.js +0 -1
  219. package/assets/esri/core/workers/chunks/093938edee5f0532d7da.js +0 -1
  220. package/assets/esri/core/workers/chunks/0f5643d5437f48c63225.js +0 -1
  221. package/assets/esri/core/workers/chunks/116bbff428cc2dc1832e.js +0 -1
  222. package/assets/esri/core/workers/chunks/1646699188ed0cd4ce24.js +0 -1
  223. package/assets/esri/core/workers/chunks/1c7393bcd6e85ba25e1b.js +0 -1
  224. package/assets/esri/core/workers/chunks/2999ae2a7d4d1ad6447b.js +0 -1
  225. package/assets/esri/core/workers/chunks/2e3f620c79ec04033a6e.js +0 -1
  226. package/assets/esri/core/workers/chunks/2e54be3094e41fd3026d.js +0 -346
  227. package/assets/esri/core/workers/chunks/3541714d448958c9bc38.js +0 -1
  228. package/assets/esri/core/workers/chunks/48953ddf0bbcf3d77e04.js +0 -1
  229. package/assets/esri/core/workers/chunks/5b7464137aacf1c5fd78.js +0 -1
  230. package/assets/esri/core/workers/chunks/629a257509b148ff38c0.js +0 -1
  231. package/assets/esri/core/workers/chunks/6b5fc9da8ae34c889b83.js +0 -1
  232. package/assets/esri/core/workers/chunks/707b34e15937c4f7902f.js +0 -1
  233. package/assets/esri/core/workers/chunks/770e609a6bd3533ceda9.js +0 -1
  234. package/assets/esri/core/workers/chunks/7925e8ffa8027b59410e.js +0 -1
  235. package/assets/esri/core/workers/chunks/8235a997acb45ab43173.js +0 -1
  236. package/assets/esri/core/workers/chunks/851baab753d9c8e967bd.js +0 -1
  237. package/assets/esri/core/workers/chunks/aa6c37f116c07ddca5fb.js +0 -1
  238. package/assets/esri/core/workers/chunks/bac5e1d50b69f0d94694.js +0 -1
  239. package/assets/esri/core/workers/chunks/bc0c3b5a5ab3fcb8f77a.js +0 -1
  240. package/assets/esri/core/workers/chunks/bcefb413d03d59506b5a.js +0 -1009
  241. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +0 -1
  242. package/assets/esri/core/workers/chunks/cac281604a41af9b1759.js +0 -1
  243. package/assets/esri/core/workers/chunks/cb4c49d5b70f9563bc46.js +0 -1
  244. package/assets/esri/core/workers/chunks/d25c8c30ce4058937d4f.js +0 -1
  245. package/assets/esri/core/workers/chunks/d638ae7814acf6c0fb8e.js +0 -1
  246. package/assets/esri/core/workers/chunks/d6ce99a713afdb03e332.js +0 -1
  247. package/assets/esri/core/workers/chunks/dc3816eef53d17074eab.js +0 -1
  248. package/assets/esri/core/workers/chunks/dd70b060ea4f632c2430.js +0 -1
  249. package/assets/esri/core/workers/chunks/e2e5e8bd3406609d8996.js +0 -1
  250. package/assets/esri/core/workers/chunks/e9aa1d9ded8a52a40c57.js +0 -1
  251. package/assets/esri/core/workers/chunks/f65ad6a41c0c69bf1b21.js +0 -1
  252. package/assets/esri/core/workers/chunks/f6c815f7d3ca072172ce.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7346],{431:(t,n,e)=>{e.d(n,{o6:()=>R,HY:()=>P,hx:()=>y,Jb:()=>U});var r=e(9318);function o(t,n,e){const r=n/3,o=new Uint32Array(e+1),i=new Uint32Array(e+1),a=(t,n)=>{t<n?o[t+1]++:i[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];a(e,r),a(r,o),a(o,e)}let s=0,c=0;for(let t=0;t<e;t++){const n=o[t+1],e=i[t+1];o[t+1]=s,i[t+1]=c,s+=n,c+=e}const u=new Uint32Array(6*r),l=o[e],h=(t,n,e)=>{if(t<n){const r=o[t+1]++;u[2*r]=n,u[2*r+1]=e}else{const r=i[n+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];h(e,r,n),h(r,o,n),h(o,e,n)}const f=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=u[e+2*t],r=u[e+2*t+1];let o=t-1;for(;o>=0&&u[e+2*o]>n;o--)u[e+2*o+2]=u[e+2*o],u[e+2*o+3]=u[e+2*o+1];u[e+2*o+2]=n,u[e+2*o+3]=r}};for(let t=0;t<e;t++)f(o[t],o[t+1]),f(l+i[t],l+i[t+1]);const d=new Int32Array(3*r),g=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,M=(t,n)=>{const e=g(t,n);d[3*n+e]=-1},p=(t,n,e,r)=>{const o=g(t,n);d[3*n+o]=r;const i=g(e,r);d[3*r+i]=n};for(let t=0;t<e;t++){let n=o[t];const e=o[t+1];let r=i[t];const a=i[t+1];for(;n<e&&r<a;){const e=u[2*n],o=u[2*l+2*r];e===o?(p(t,u[2*n+1],o,u[2*l+2*r+1]),n++,r++):e<o?(M(t,u[2*n+1]),n++):(M(o,u[2*l+2*r+1]),r++)}for(;n<e;)M(t,u[2*n+1]),n++;for(;r<a;)M(u[2*l+2*r],u[2*l+2*r+1]),r++}return d}var i=e(1843),a=e(46540),s=e(3055),c=e(87811),u=e(38954),l=e(51850),h=e(4431),f=e(34727);function d(t,n,e,r,o,i=2){const a=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),s=e*a,c=r*a,u=o<=0?(s>=0?1:-1)*(1-Math.abs(c)):s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(s)):c,h=n*i;t[h]=g(u),t[h+1]=g(l)}function g(t){return(0,f.qE)(Math.round(32767*t),-32767,32767)}e(11868),e(34275);class M{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:E}write(t,n,e){v.seed=this._edgeHashFunction(e);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,r),t.variantStroke.set(n,o),t.variantExtension.set(n,a)}}const p=new Float32Array(6),m=new Uint32Array(p.buffer),N=new Uint32Array(1);function E(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],N[0]=31*(31*(31*(31*(31*(166811+m[0])+m[1])+m[2])+m[3])+m[4])+m[5],N[0]}function A(t){const n=p;n[0]=O(t.position0[0]),n[1]=O(t.position0[1]),n[2]=O(t.position0[2]),n[3]=O(t.position1[0]),n[4]=O(t.position1[1]),n[5]=O(t.position1[2]),N[0]=5381;for(let t=0;t<m.length;t++)N[0]=31*N[0]+m[t];return N[0]}const I=1e4;function O(t){return Math.round(t*I)/I}class T{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.gr.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,u.f)(b,e.faceNormal0,e.faceNormal1),(0,u.n)(b,b);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,b[0],b[1],b[2],o)}static{this.Layout=s.gr}static{this.glLayout=(0,h.U)(s.gr,1)}}class S{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.In.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;d(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],o)}}static{this.Layout=s.In}static{this.glLayout=(0,h.U)(s.In,1)}}const b=(0,l.vt)(),v=new c.A;var _=e(93406);function R(t){const n=y(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return D.updateSettings(t.writerSettings),w.updateSettings(t.writerSettings),(0,_.K)(n,D,w)}function y(t,n,e,i){if(n){const n=o(e,i,t.count);return new L(e,i,n,t)}const a=(0,r.b)(t.buffer,t.stride/4,{originalIndices:e}),c=o(a.indices,i,a.uniqueCount);return{faces:a.indices,facesLength:a.indices.length,neighbors:c,vertices:s.I$.createView(a.buffer)}}class L{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const D=new T,w=new S,U=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1),P=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1).u16(a.r.COMPONENTINDEX)},3055:(t,n,e)=>{e.d(n,{I$:()=>a,In:()=>u,gr:()=>c});var r=e(4431),o=e(1843),i=e(46540);const a=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),s=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(s),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},3694:(t,n,e)=>{e.d(n,{A:()=>s});var r,o=e(4576),i=e(21818);!function(t){const n=(t,n,e,r)=>{let o=n,i=n;const a=e>>>1,s=t[o-1];for(;i<=a;){i=o<<1,i<e&&r(t[i-1],t[i])<0&&++i;const n=t[i-1];if(r(n,s)<=0)break;t[o-1]=n,o=i}t[o-1]=s},e=(t,n)=>t<n?-1:t>n?1:0;t.sort=function(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i);const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i)}},t.iterableSort=function*(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i),yield;const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i),yield}}}(r||(r={}));const a=r;class s{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new o.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const n=new Array;for(let e=0;e<this._length;e++){const r=this.data[e];t(r)&&n.push(r)}return n}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,n){const e=this.data.indexOf(t,n);return-1!==e&&e<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let n=t;n<this._length;++n)this.data[n]=this._deallocator(this.data[n]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,n=t.length){for(let e=0;e<n;e++)this.data[this._length++]=t[e]}fill(t,n){for(let e=0;e<n;e++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const n=(0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==n)return this.data.splice(n,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,n=t.length,e){this.length=(0,o.mW)(this.data,t,this.length,n,this._hint,e),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,n){if(t>=this.length||n>=this.length||t===n)return;const e=this.data[t];this.data[t]=this.data[n],this.data[n]=e}sort(t){a.sort(this.data,0,this.length,t)}iterableSort(t){return a.iterableSort(this.data,0,this.length,t)}some(t,n){for(let e=0;e<this.length;++e)if(t.call(n,this.data[e],e,this.data))return!0;return!1}find(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)if(t.call(n,e[o]))return e[o]}filterInPlace(t,n){let e=0;for(let r=0;r<this._length;++r){const o=this.data[r];t.call(n,o,r,this.data)&&(this.data[r]=this.data[e],this.data[e]=o,e++)}if(this._deallocator)for(let t=e;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=e,this._shrink(),this}forAll(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)t.call(n,e[o],o,e)}forEach(t,n){this.data.slice(0,this.length).forEach(t,n)}map(t,n){const e=new Array(this.length);for(let r=0;r<this.length;++r)e[r]=t.call(n,this.data[r],r,this.data);return e}reduce(t,n){let e=n;for(let n=0;n<this.length;++n)e=t(e,this.data[n],n,this.data);return e}has(t){const n=this.length,e=this.data;for(let r=0;r<n;++r)if(e[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},4431:(t,n,e)=>{e.d(n,{U:()=>i});var r=e(63907),o=e(74038);function i(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map(r=>{const i=t.fields.get(r),s=i.constructor.ElementCount,c=a(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,s,c,u,e,l,n)})}function a(t){const n=s[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const s={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f16:r.pe.HALF_FLOAT,f32:r.pe.FLOAT}},9318:(t,n,e)=>{e.d(n,{b:()=>i});var r=e(34727),o=e(97146);function i(t,n,e){const i=Array.isArray(t),l=i?t.length/n:t.byteLength/(4*n),h=i?t:new Uint32Array(t,0,l*n),f=e?.minReduction??0,d=e?.originalIndices||null,g=d?d.length:0,M=e?.componentOffsets||null;let p=0;if(M)for(let t=0;t<M.length-1;t++){const n=M[t+1]-M[t];n>p&&(p=n)}else p=l;const m=Math.floor(1.1*p)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,r.cU)(2*m)));for(let t=0;t<2*m;t++)u[t]=0;let N=0;const E=!!M&&!!d,A=E?g:l;let I=(0,o.my)(l);const O=new Uint32Array(g),T=1.96;let S=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):A,b=1,v=M?M[1]:A;for(let t=0;t<A;t++){if(t===S){const n=1-N/t;if(n+T*Math.sqrt(n*(1-n)/t)<f)return null;S*=2}if(t===v){for(let t=0;t<2*m;t++)u[t]=0;if(d)for(let t=M[b-1];t<M[b];t++)O[t]=I[d[t]];v=M[++b]}const e=E?d[t]:t,r=e*n,o=c(h,r,n);let i=o%m,s=N;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(a(h,r,t*n,n)){s=I[t];break}}i++,i>=m&&(i-=m)}s===N&&(u[2*i]=o,u[2*i+1]=e+1,N++),I[e]=s}if(0!==f&&1-N/l<f)return null;if(E){for(let t=M[b-1];t<O.length;t++)O[t]=I[d[t]];I=(0,o.uW)(O)}const _=i?new Array(N):new Uint32Array(N*n);N=0;for(let t=0;t<A;t++)I[t]===N&&(s(h,(E?d[t]:t)*n,_,N*n,n),N++);if(d&&!E){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=I[d[n]];I=(0,o.uW)(t)}return{buffer:Array.isArray(_)?_:_.buffer,indices:I,uniqueCount:N}}function a(t,n,e,r){for(let o=0;o<r;o++)if(t[n+o]!==t[e+o])return!1;return!0}function s(t,n,e,r,o){for(let i=0;i<o;i++)e[r+i]=t[n+i]}function c(t,n,e){let r=0;for(let o=0;o<e;o++)r=t[n+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},34304:(t,n,e)=>{e.d(n,{DF:()=>c,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,a=Math.PI/180,s=180/Math.PI;function c(t){return t*a}function u(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:u,toRadian:c},Symbol.toStringTag,{value:"Module"}))},34727:(t,n,e)=>{e.d(n,{$8:()=>O,Cc:()=>a,Hx:()=>M,Io:()=>I,KJ:()=>u,Sp:()=>f,XM:()=>l,YN:()=>h,ZH:()=>g,cU:()=>o,gg:()=>d,hs:()=>s,kU:()=>c,or:()=>S,pF:()=>v,pq:()=>b,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function a(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return a(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function f(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function d(t,n,e=1e-6){return!f(t,n,e)&&t>n}function g(t,n,e=1e-6){return!f(t,n,e)&&t<n}function M(t,n,e=1e-6){return f(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return p.setFloat64(0,t),p.getBigInt64(0)}const N=BigInt("1000000"),E=A(1);function A(t){const n=m(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=N?N:n-N);return Math.abs(t-e)}function I(t,n,e=E){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&A(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=m(t),o=m(n);return r<0==o<0&&!((r<o?o-r:r-o)>N)}function O(t){return T(Math.max(-b,Math.min(t,b)))}function T(t){return r[0]=t,r[0]}function S(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(f(n,1)&&f(e,1)&&f(r,1))}const b=T(34028234663852886e22);function v(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},38954:(t,n,e)=>{e.d(n,{A:()=>g,B:()=>d,C:()=>l,D:()=>h,E:()=>U,F:()=>F,H:()=>B,a:()=>P,b:()=>m,c:()=>a,d:()=>u,e:()=>S,f:()=>c,g:()=>p,h:()=>b,i:()=>s,j:()=>N,k:()=>A,l:()=>i,m:()=>v,n:()=>T,o:()=>R,q:()=>w,r:()=>O,s:()=>E,t:()=>_,u:()=>I,v:()=>y,w:()=>f,x:()=>V,y:()=>z,z:()=>M});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function c(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function g(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function m(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function N(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function E(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function A(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function I(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function O(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function T(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function b(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2];return t[0]=o*c-i*s,t[1]=i*a-r*c,t[2]=r*s-o*a,t}function v(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function _(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function R(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function y(t,n,e){const r=e[0],o=e[1],i=e[2],a=e[3],s=n[0],c=n[1],u=n[2],l=o*u-i*c,h=i*s-r*u,f=r*c-o*s,d=o*f-i*h,g=i*l-r*f,M=r*h-o*l,p=2*a;return t[0]=s+l*p+2*d,t[1]=c+h*p+2*g,t[2]=u+f*p+2*M,t}const L=(0,r.vt)(),D=(0,r.vt)();function w(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function U(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const P=u,C=l,x=h,F=N,V=E,B=i,z=A;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:c,angle:function(t,n){T(L,t),T(D,n);const e=S(L,D);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const a=1-i,s=a*a,c=i*i,u=s*a,l=3*i*s,h=3*c*a,f=c*i;return t[0]=n[0]*u+e[0]*l+r[0]*h+o[0]*f,t[1]=n[1]*u+e[1]*l+r[1]*h+o[1]*f,t[2]=n[2]*u+e[2]*l+r[2]*h+o[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:b,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=o*c-i*s,l=i*a-r*c,h=r*s-o*a,f=Math.sqrt(u*u+l*l+h*h);return t[0]=u/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:F,distance:N,div:x,divide:h,dot:S,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],s=n[1],c=n[2],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))},exactEquals:w,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const a=i*i,s=a*(2*i-3)+1,c=a*(i-2)+i,u=a*(i-1),l=a*(3-2*i);return t[0]=n[0]*s+e[0]*c+r[0]*u+o[0]*l,t[1]=n[1]*s+e[1]*c+r[1]*u+o[1]*l,t[2]=n[2]*s+e[2]*c+r[2]*u+o[2]*l,t},inverse:O,len:B,length:i,lerp:v,max:M,min:g,mul:C,multiply:l,negate:I,normalize:T,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:m,set:s,sign:d,sqrDist:V,sqrLen:z,squaredDistance:E,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:P,subtract:u,transformMat3:R,transformMat4:_,transformQuat:y},Symbol.toStringTag,{value:"Module"}))},46540:(t,n,e)=>{var r;e.d(n,{r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},48163:(t,n,e)=>{function r(){return[0,0]}function o(t,n){return[t,n]}function i(){return o(1,1)}function a(){return o(1,0)}function s(){return o(0,1)}e.d(n,{Un:()=>c,fA:()=>o,vt:()=>r});const c=i(),u=a(),l=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:l,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:o,ones:i,unitX:a,unitY:s,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,n,e)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function a(t,n,e){return[t,n,e]}function s(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}e.d(n,{CN:()=>a,Cb:()=>p,Cw:()=>g,JP:()=>M,Un:()=>d,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>f,vt:()=>r});const f=[0,0,0],d=c(),g=u(),M=l(),p=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:g,UNIT_Y:M,UNIT_Z:p,ZEROS:f,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},71936:(t,n,e)=>{e.r(n),e.d(n,{default:()=>c});var r=e(1843);function o(t,n){return n.push(t.buffer),{buffer:t.buffer,layout:new r.l5(t.layout)}}var i=e(3055),a=e(93406),s=e(431);class c{async extract(t){const n=u(t),e=(0,s.o6)(n),r=[n.data.buffer];return{result:l(e,r),transferList:r}}async extractComponentsEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,f).regular.instancesData,r),transferList:r}}async extractEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,h).regular.instancesData,r),transferList:r}}}function u(t){return{data:i.I$.createView(t.dataBuffer),indices:"Uint32Array"===t.indicesType?new Uint32Array(t.indices):"Uint16Array"===t.indicesType?new Uint16Array(t.indices):t.indices,indicesLength:t.indicesLength,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}function l(t,n){return n.push(t.regular.lodInfo.lengths.buffer),n.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:o(t.regular.instancesData,n),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:o(t.silhouette.instancesData,n),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}const h=new class{allocate(t){return s.Jb.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1)}},f=new class{allocate(t){return s.HY.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex)}}},74038:(t,n,e)=>{e.d(n,{_:()=>r});class r{constructor(t,n,e,r,o,i=!1,a=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=o,this.normalized=i,this.divisor=a}}},87317:(t,n,e)=>{e.d(n,{a:()=>E,b:()=>g,c:()=>o,d:()=>l,e:()=>A,g:()=>a,h:()=>p,j:()=>d,l:()=>m,n:()=>M,s:()=>i,t:()=>N});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function h(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+i*i)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function d(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function g(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function M(t,n){const e=n[0],r=n[1],o=n[2],i=n[3];let a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a),t}function p(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function m(t,n,e,r){const o=n[0],i=n[1],a=n[2],s=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=s+r*(e[3]-s),t}function N(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function A(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-s)<=h*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-l)<=h*Math.max(1,Math.abs(a),Math.abs(l))}const I=s,O=c,T=u,S=h,b=f,v=d,_=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:S,distance:h,div:T,divide:u,dot:p,equals:A,exactEquals:E,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:v,length:d,lerp:m,max:function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},mul:O,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:M,random:function(t,n=1){const e=r.Ov;let o,i,a,s,c,u;do{o=2*e()-1,i=2*e()-1,c=o*o+i*i}while(c>=1);do{a=2*e()-1,s=2*e()-1,u=a*a+s*s}while(u>=1);const l=Math.sqrt((1-c)/u);return t[0]=n*o,t[1]=n*i,t[2]=n*a*l,t[3]=n*s*l,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:l,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:b,sqrLen:_,squaredDistance:f,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:I,subtract:s,transformMat4:N,transformQuat:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=e[3],l=u*r+s*i-c*o,h=u*o+c*r-a*i,f=u*i+a*o-s*r,d=-a*r-s*o-c*i;return t[0]=l*u+d*-a+h*-c-f*-s,t[1]=h*u+d*-s+f*-a-l*-c,t[2]=f*u+d*-c+l*-s-h*-a,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},91829:(t,n,e)=>{function r(){return[0,0,0,0]}function o(t){return[t[0],t[1],t[2],t[3]]}function i(t,n,e,r){return[t,n,e,r]}function a(t,n,e,r){return[t,n,e,r]}function s(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1,1)}function u(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function h(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}e.d(n,{CN:()=>a,Un:()=>g,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0,0],g=c(),M=u(),p=l(),m=h(),N=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:N,UNIT_X:M,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitW:f,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,n,e)=>{e.d(n,{K:()=>c});var r=e(34727),o=e(3694),i=e(38954),a=e(51850);const s=-1;function c(t,n,e){const r=t.vertices.position,o=t.vertices.componentIndex,a=M.position0,c=M.position1,h=M.faceNormal0,d=M.faceNormal1,{edges:g,normals:p}=l(t),m=g.length/4,N=n.allocate(m);let E=0;const A=m,T=e?.allocate(A);let b=0,v=0,_=0;f.length=0;for(let t=0;t<m;++t){const n=4*t;r.getVec(g.data[n],a),r.getVec(g.data[n+1],c);const e=f.pushNew();e.index=4*t,e.length=(0,i.j)(a,c)}f.sort((t,n)=>n.length-t.length);const R=new Array,y=new Array;f.forAll(({length:t,index:l})=>{const f=g.data[l],m=g.data[l+1],A=g.data[l+2],L=g.data[l+3],D=L===s;if(r.getVec(f,a),r.getVec(m,c),D){const t=3*A;(0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),(0,i.c)(d,h),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d)}else{let t=3*A;if((0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),t=3*L,(0,i.i)(d,p.data[t],p.data[t+1],p.data[t+2]),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d),function(t,n){return t.cosAngle>n}(M,O))return;M.cosAngle<-.9999&&(0,i.c)(d,h)}v+=t,_++,D||function(t,n){return t.cosAngle<n}(M,S)?(n.write(N,E++,M),R.push(t)):u(M,I)&&(T&&e&&e.write(T,b++,M),y.push(t))});const L=new Float32Array(R.reverse()),D=new Float32Array(y.reverse()),w=T&&e?{instancesData:T.slice(0,b),lodInfo:{lengths:D}}:void 0;return{regular:{instancesData:N.slice(0,E),lodInfo:{lengths:L}},silhouette:w,averageEdgeLength:v/_}}function u(t,n){const e=(0,r.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),e*((0,i.e)((0,i.h)(p,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>n}function l(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors,o=t.vertices.position;d.length=g.length=0;for(let t=0;t<n;t++){const n=3*t,a=r[n],c=r[n+1],u=r[n+2],l=e[n],h=e[n+1],f=e[n+2];o.getVec(l,N),o.getVec(h,E),o.getVec(f,A),(0,i.d)(E,E,N),(0,i.d)(A,A,N),(0,i.h)(N,E,A),(0,i.n)(N,N),g.pushArray(N),(a===s||l<h)&&(d.push(l),d.push(h),d.push(t),d.push(a)),(c===s||h<f)&&(d.push(h),d.push(f),d.push(t),d.push(c)),(u===s||f<l)&&(d.push(f),d.push(l),d.push(t),d.push(u))}return{edges:d,normals:g}}class h{constructor(){this.index=0,this.length=0}}const f=new o.A({allocator:t=>t||new h,deallocator:null}),d=new o.A({deallocator:null}),g=new o.A({deallocator:null}),M=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},p=(0,a.vt)(),m=(0,a.vt)(),N=(0,a.vt)(),E=(0,a.vt)(),A=(0,a.vt)(),I=(0,r.kU)(4),O=Math.cos(I),T=(0,r.kU)(35),S=Math.cos(T)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7346],{431:(t,n,e)=>{e.d(n,{o6:()=>R,HY:()=>P,hx:()=>y,Jb:()=>U});var r=e(9318);function o(t,n,e){const r=n/3,o=new Uint32Array(e+1),i=new Uint32Array(e+1),a=(t,n)=>{t<n?o[t+1]++:i[n+1]++};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];a(e,r),a(r,o),a(o,e)}let s=0,c=0;for(let t=0;t<e;t++){const n=o[t+1],e=i[t+1];o[t+1]=s,i[t+1]=c,s+=n,c+=e}const u=new Uint32Array(6*r),l=o[e],h=(t,n,e)=>{if(t<n){const r=o[t+1]++;u[2*r]=n,u[2*r+1]=e}else{const r=i[n+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=e}};for(let n=0;n<r;n++){const e=t[3*n],r=t[3*n+1],o=t[3*n+2];h(e,r,n),h(r,o,n),h(o,e,n)}const f=(t,n)=>{const e=2*t,r=n-t;for(let t=1;t<r;t++){const n=u[e+2*t],r=u[e+2*t+1];let o=t-1;for(;o>=0&&u[e+2*o]>n;o--)u[e+2*o+2]=u[e+2*o],u[e+2*o+3]=u[e+2*o+1];u[e+2*o+2]=n,u[e+2*o+3]=r}};for(let t=0;t<e;t++)f(o[t],o[t+1]),f(l+i[t],l+i[t+1]);const d=new Int32Array(3*r),g=(n,e)=>n===t[3*e]?0:n===t[3*e+1]?1:n===t[3*e+2]?2:-1,M=(t,n)=>{const e=g(t,n);d[3*n+e]=-1},p=(t,n,e,r)=>{const o=g(t,n);d[3*n+o]=r;const i=g(e,r);d[3*r+i]=n};for(let t=0;t<e;t++){let n=o[t];const e=o[t+1];let r=i[t];const a=i[t+1];for(;n<e&&r<a;){const e=u[2*n],o=u[2*l+2*r];e===o?(p(t,u[2*n+1],o,u[2*l+2*r+1]),n++,r++):e<o?(M(t,u[2*n+1]),n++):(M(o,u[2*l+2*r+1]),r++)}for(;n<e;)M(t,u[2*n+1]),n++;for(;r<a;)M(u[2*l+2*r],u[2*l+2*r+1]),r++}return d}var i=e(1843),a=e(46540),s=e(3055),c=e(87811),u=e(38954),l=e(51850),h=e(4431),f=e(34727);function d(t,n,e,r,o,i=2){const a=1/(Math.abs(e)+Math.abs(r)+Math.abs(o)),s=e*a,c=r*a,u=o<=0?(s>=0?1:-1)*(1-Math.abs(c)):s,l=o<=0?(c>=0?1:-1)*(1-Math.abs(s)):c,h=n*i;t[h]=g(u),t[h+1]=g(l)}function g(t){return(0,f.qE)(Math.round(32767*t),-32767,32767)}e(11868),e(34275);class M{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:E}write(t,n,e){v.seed=this._edgeHashFunction(e);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex),t.variantOffset.set(n,r),t.variantStroke.set(n,o),t.variantExtension.set(n,a)}}const p=new Float32Array(6),m=new Uint32Array(p.buffer),N=new Uint32Array(1);function E(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],N[0]=31*(31*(31*(31*(31*(166811+m[0])+m[1])+m[2])+m[3])+m[4])+m[5],N[0]}function A(t){const n=p;n[0]=O(t.position0[0]),n[1]=O(t.position0[1]),n[2]=O(t.position0[2]),n[3]=O(t.position1[0]),n[4]=O(t.position1[1]),n[5]=O(t.position1[2]),N[0]=5381;for(let t=0;t<m.length;t++)N[0]=31*N[0]+m[t];return N[0]}const I=1e4;function O(t){return Math.round(t*I)/I}class T{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.gr.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e),(0,u.f)(b,e.faceNormal0,e.faceNormal1),(0,u.n)(b,b);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,b[0],b[1],b[2],o)}static{this.Layout=s.gr}static{this.glLayout=(0,h.U)(s.gr,1)}}class S{constructor(){this._commonWriter=new M}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return s.In.createBuffer(t)}write(t,n,e){this._commonWriter.write(t,n,e);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;d(r,n,e.faceNormal0[0],e.faceNormal0[1],e.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;d(r,n,e.faceNormal1[0],e.faceNormal1[1],e.faceNormal1[2],o)}}static{this.Layout=s.In}static{this.glLayout=(0,h.U)(s.In,1)}}const b=(0,l.vt)(),v=new c.A;var _=e(93406);function R(t){const n=y(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return D.updateSettings(t.writerSettings),w.updateSettings(t.writerSettings),(0,_.K)(n,D,w)}function y(t,n,e,i){if(n){const n=o(e,i,t.count);return new L(e,i,n,t)}const a=(0,r.b)(t.buffer,t.stride/4,{originalIndices:e}),c=o(a.indices,i,a.uniqueCount);return{faces:a.indices,facesLength:a.indices.length,neighbors:c,vertices:s.I$.createView(a.buffer)}}class L{constructor(t,n,e,r){this.faces=t,this.facesLength=n,this.neighbors=e,this.vertices=r}}const D=new T,w=new S,U=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1),P=(0,i.BP)().vec3f(a.r.POSITION0).vec3f(a.r.POSITION1).u16(a.r.COMPONENTINDEX)},3055:(t,n,e)=>{e.d(n,{I$:()=>a,In:()=>u,gr:()=>c});var r=e(4431),o=e(1843),i=e(46540);const a=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),s=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(s),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},3694:(t,n,e)=>{e.d(n,{A:()=>s});var r,o=e(4576),i=e(21818);!function(t){const n=(t,n,e,r)=>{let o=n,i=n;const a=e>>>1,s=t[o-1];for(;i<=a;){i=o<<1,i<e&&r(t[i-1],t[i])<0&&++i;const n=t[i-1];if(r(n,s)<=0)break;t[o-1]=n,o=i}t[o-1]=s},e=(t,n)=>t<n?-1:t>n?1:0;t.sort=function(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i);const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i)}},t.iterableSort=function*(t,r,o,i){void 0===r&&(r=0),void 0===o&&(o=t.length),void 0===i&&(i=e);for(let e=o>>>1;e>r;e--)n(t,e,o,i),yield;const a=r+1;for(let e=o-1;e>r;e--){const o=t[r];t[r]=t[e],t[e]=o,n(t,a,e,i),yield}}}(r||(r={}));const a=r;class s{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new o.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const n=new Array;for(let e=0;e<this._length;e++){const r=this.data[e];t(r)&&n.push(r)}return n}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,n){const e=this.data.indexOf(t,n);return-1!==e&&e<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let n=t;n<this._length;++n)this.data[n]=this._deallocator(this.data[n]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,n=t.length){for(let e=0;e<n;e++)this.data[this._length++]=t[e]}fill(t,n){for(let e=0;e<n;e++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const n=(0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==n)return this.data.splice(n,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,o.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,n=t.length,e){this.length=(0,o.mW)(this.data,t,this.length,n,this._hint,e),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,n){if(t>=this.length||n>=this.length||t===n)return;const e=this.data[t];this.data[t]=this.data[n],this.data[n]=e}sort(t){a.sort(this.data,0,this.length,t)}iterableSort(t){return a.iterableSort(this.data,0,this.length,t)}some(t,n){for(let e=0;e<this.length;++e)if(t.call(n,this.data[e],e,this.data))return!0;return!1}find(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)if(t.call(n,e[o]))return e[o]}filterInPlace(t,n){let e=0;for(let r=0;r<this._length;++r){const o=this.data[r];t.call(n,o,r,this.data)&&(this.data[r]=this.data[e],this.data[e]=o,e++)}if(this._deallocator)for(let t=e;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=e,this._shrink(),this}forAll(t,n){const{data:e,length:r}=this;for(let o=0;o<r;++o)t.call(n,e[o],o,e)}forEach(t,n){this.data.slice(0,this.length).forEach(t,n)}map(t,n){const e=new Array(this.length);for(let r=0;r<this.length;++r)e[r]=t.call(n,this.data[r],r,this.data);return e}reduce(t,n){let e=n;for(let n=0;n<this.length;++n)e=t(e,this.data[n],n,this.data);return e}has(t){const n=this.length,e=this.data;for(let r=0;r<n;++r)if(e[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},4431:(t,n,e)=>{e.d(n,{U:()=>i});var r=e(63907),o=e(74038);function i(t,n=0){const e=t.stride;return Array.from(t.fields.keys()).map(r=>{const i=t.fields.get(r),s=i.constructor.ElementCount,c=a(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,s,c,u,e,l,n)})}function a(t){const n=s[t];if(n)return n;throw new Error("BufferType not supported in WebGL")}const s={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f16:r.pe.HALF_FLOAT,f32:r.pe.FLOAT}},9318:(t,n,e)=>{e.d(n,{b:()=>i});var r=e(34727),o=e(97146);function i(t,n,e){const i=Array.isArray(t),l=i?t.length/n:t.byteLength/(4*n),h=i?t:new Uint32Array(t,0,l*n),f=e?.minReduction??0,d=e?.originalIndices||null,g=d?d.length:0,M=e?.componentOffsets||null;let p=0;if(M)for(let t=0;t<M.length-1;t++){const n=M[t+1]-M[t];n>p&&(p=n)}else p=l;const m=Math.floor(1.1*p)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,r.cU)(2*m)));for(let t=0;t<2*m;t++)u[t]=0;let N=0;const E=!!M&&!!d,A=E?g:l;let I=(0,o.my)(l);const O=new Uint32Array(g),T=1.96;let S=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):A,b=1,v=M?M[1]:A;for(let t=0;t<A;t++){if(t===S){const n=1-N/t;if(n+T*Math.sqrt(n*(1-n)/t)<f)return null;S*=2}if(t===v){for(let t=0;t<2*m;t++)u[t]=0;if(d)for(let t=M[b-1];t<M[b];t++)O[t]=I[d[t]];v=M[++b]}const e=E?d[t]:t,r=e*n,o=c(h,r,n);let i=o%m,s=N;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(a(h,r,t*n,n)){s=I[t];break}}i++,i>=m&&(i-=m)}s===N&&(u[2*i]=o,u[2*i+1]=e+1,N++),I[e]=s}if(0!==f&&1-N/l<f)return null;if(E){for(let t=M[b-1];t<O.length;t++)O[t]=I[d[t]];I=(0,o.uW)(O)}const _=i?new Array(N):new Uint32Array(N*n);N=0;for(let t=0;t<A;t++)I[t]===N&&(s(h,(E?d[t]:t)*n,_,N*n,n),N++);if(d&&!E){const t=new Uint32Array(g);for(let n=0;n<t.length;n++)t[n]=I[d[n]];I=(0,o.uW)(t)}return{buffer:Array.isArray(_)?_:_.buffer,indices:I,uniqueCount:N}}function a(t,n,e,r){for(let o=0;o<r;o++)if(t[n+o]!==t[e+o])return!1;return!0}function s(t,n,e,r,o){for(let i=0;i<o;i++)e[r+i]=t[n+i]}function c(t,n,e){let r=0;for(let o=0;o<e;o++)r=t[n+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},34304:(t,n,e)=>{e.d(n,{DF:()=>c,FD:()=>o,Ov:()=>i,ct:()=>u});let r=1e-6;function o(){return r}const i=Math.random,a=Math.PI/180,s=180/Math.PI;function c(t){return t*a}function u(t){return t*s}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:o,setEpsilon:function(t){r=t},toDegree:u,toRadian:c},Symbol.toStringTag,{value:"Module"}))},34727:(t,n,e)=>{e.d(n,{$8:()=>O,Cc:()=>a,Hx:()=>M,Io:()=>I,KJ:()=>u,Sp:()=>f,XM:()=>l,YN:()=>h,ZH:()=>g,cU:()=>o,gg:()=>d,hs:()=>s,kU:()=>c,or:()=>S,pF:()=>v,pq:()=>b,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function i(t,n,e){return Math.min(Math.max(t,n),e)}function a(t,n,e){return t+(n-t)*e}function s(t,n,e,r,o){return a(r,o,(t-n)/(e-n))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function f(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function d(t,n,e=1e-6){return!f(t,n,e)&&t>n}function g(t,n,e=1e-6){return!f(t,n,e)&&t<n}function M(t,n,e=1e-6){return f(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function m(t){return p.setFloat64(0,t),p.getBigInt64(0)}const N=BigInt("1000000"),E=A(1);function A(t){const n=m(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=N?N:n-N);return Math.abs(t-e)}function I(t,n,e=E){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&A(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;const r=m(t),o=m(n);return r<0==o<0&&!((r<o?o-r:r-o)>N)}function O(t){return T(Math.max(-b,Math.min(t,b)))}function T(t){return r[0]=t,r[0]}function S(t){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(f(n,1)&&f(e,1)&&f(r,1))}const b=T(34028234663852886e22);function v(t,n,e){if(void 0===e||0===+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}},38954:(t,n,e)=>{e.d(n,{A:()=>g,B:()=>d,C:()=>l,D:()=>h,E:()=>U,F:()=>F,H:()=>B,a:()=>P,b:()=>m,c:()=>a,d:()=>u,e:()=>S,f:()=>c,g:()=>p,h:()=>b,i:()=>s,j:()=>N,k:()=>A,l:()=>i,m:()=>v,n:()=>T,o:()=>R,q:()=>w,r:()=>O,s:()=>E,t:()=>_,u:()=>I,v:()=>y,w:()=>f,x:()=>V,y:()=>z,z:()=>M});var r=e(51850),o=e(34304);function i(t){const n=t[0],e=t[1],r=t[2];return Math.sqrt(n*n+e*e+r*r)}function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function s(t,n,e,r){return t[0]=n,t[1]=e,t[2]=r,t}function c(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t}function u(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t}function l(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t}function h(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function d(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function g(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t}function M(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t}function p(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t}function m(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t}function N(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(e*e+r*r+o*o)}function E(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2];return e*e+r*r+o*o}function A(t){const n=t[0],e=t[1],r=t[2];return n*n+e*e+r*r}function I(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function O(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function T(t,n){const e=n[0],r=n[1],o=n[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function S(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function b(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2];return t[0]=o*c-i*s,t[1]=i*a-r*c,t[2]=r*s-o*a,t}function v(t,n,e,r){const o=n[0],i=n[1],a=n[2];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t}function _(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12],t[1]=e[1]*r+e[5]*o+e[9]*i+e[13],t[2]=e[2]*r+e[6]*o+e[10]*i+e[14],t}function R(t,n,e){const r=n[0],o=n[1],i=n[2];return t[0]=r*e[0]+o*e[3]+i*e[6],t[1]=r*e[1]+o*e[4]+i*e[7],t[2]=r*e[2]+o*e[5]+i*e[8],t}function y(t,n,e){const r=e[0],o=e[1],i=e[2],a=e[3],s=n[0],c=n[1],u=n[2],l=o*u-i*c,h=i*s-r*u,f=r*c-o*s,d=o*f-i*h,g=i*l-r*f,M=r*h-o*l,p=2*a;return t[0]=s+l*p+2*d,t[1]=c+h*p+2*g,t[2]=u+f*p+2*M,t}const L=(0,r.vt)(),D=(0,r.vt)();function w(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function U(t,n,e){const r=e[0]-n[0],o=e[1]-n[1],i=e[2]-n[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const P=u,C=l,x=h,F=N,V=E,B=i,z=A;Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:c,angle:function(t,n){T(L,t),T(D,n);const e=S(L,D);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(t,n,e,r,o,i){const a=1-i,s=a*a,c=i*i,u=s*a,l=3*i*s,h=3*c*a,f=c*i;return t[0]=n[0]*u+e[0]*l+r[0]*h+o[0]*f,t[1]=n[1]*u+e[1]*l+r[1]*h+o[1]*f,t[2]=n[2]*u+e[2]*l+r[2]*h+o[2]*f,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,e=1){return t[0]=Math.min(Math.max(t[0],n),e),t[1]=Math.min(Math.max(t[1],n),e),t[2]=Math.min(Math.max(t[2],n),e),t},copy:a,cross:b,crossAndNormalize:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=o*c-i*s,l=i*a-r*c,h=r*s-o*a,f=Math.sqrt(u*u+l*l+h*h);return t[0]=u/f,t[1]=l/f,t[2]=h/f,t},direction:U,dist:F,distance:N,div:x,divide:h,dot:S,equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],i=t[2],a=n[0],s=n[1],c=n[2],u=(0,o.FD)();return Math.abs(e-a)<=u*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))},exactEquals:w,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,e,r,o,i){const a=i*i,s=a*(2*i-3)+1,c=a*(i-2)+i,u=a*(i-1),l=a*(3-2*i);return t[0]=n[0]*s+e[0]*c+r[0]*u+o[0]*l,t[1]=n[1]*s+e[1]*c+r[1]*u+o[1]*l,t[2]=n[2]*s+e[2]*c+r[2]*u+o[2]*l,t},inverse:O,len:B,length:i,lerp:v,max:M,min:g,mul:C,multiply:l,negate:I,normalize:T,random:function(t,n=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,a=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*n,t},rotateX:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateY:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},rotateZ:function(t,n,e,r){const o=[],i=[];return o[0]=n[0]-e[0],o[1]=n[1]-e[1],o[2]=n[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+e[0],t[1]=i[1]+e[1],t[2]=i[2]+e[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:p,scaleAndAdd:m,set:s,sign:d,sqrDist:V,sqrLen:z,squaredDistance:E,squaredLength:A,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:P,subtract:u,transformMat3:R,transformMat4:_,transformQuat:y},Symbol.toStringTag,{value:"Module"}))},46540:(t,n,e)=>{var r;e.d(n,{r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},48163:(t,n,e)=>{function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function a(){return i(1,1)}function s(){return i(1,0)}function c(){return i(0,1)}e.d(n,{Un:()=>u,fA:()=>i,o8:()=>o,vt:()=>r});const u=a(),l=s(),h=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:l,UNIT_Y:h,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,ones:a,unitX:s,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,n,e)=>{function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,n,e){return[t,n,e]}function a(t,n,e){return[t,n,e]}function s(t,n=[0,0,0]){const e=Math.min(3,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}e.d(n,{CN:()=>a,Cb:()=>p,Cw:()=>g,JP:()=>M,Un:()=>d,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>f,vt:()=>r});const f=[0,0,0],d=c(),g=u(),M=l(),p=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:g,UNIT_Y:M,UNIT_Z:p,ZEROS:f,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},71936:(t,n,e)=>{e.r(n),e.d(n,{default:()=>c});var r=e(1843);function o(t,n){return n.push(t.buffer),{buffer:t.buffer,layout:new r.l5(t.layout)}}var i=e(3055),a=e(93406),s=e(431);class c{async extract(t){const n=u(t),e=(0,s.o6)(n),r=[n.data.buffer];return{result:l(e,r),transferList:r}}async extractComponentsEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,f).regular.instancesData,r),transferList:r}}async extractEdgeLocations(t){const n=u(t),e=(0,s.hx)(n.data,n.skipDeduplicate,n.indices,n.indicesLength),r=[];return{result:o((0,a.K)(e,h).regular.instancesData,r),transferList:r}}}function u(t){return{data:i.I$.createView(t.dataBuffer),indices:"Uint32Array"===t.indicesType?new Uint32Array(t.indices):"Uint16Array"===t.indicesType?new Uint16Array(t.indices):t.indices,indicesLength:t.indicesLength,writerSettings:t.writerSettings,skipDeduplicate:t.skipDeduplicate}}function l(t,n){return n.push(t.regular.lodInfo.lengths.buffer),n.push(t.silhouette.lodInfo.lengths.buffer),{regular:{instancesData:o(t.regular.instancesData,n),lodInfo:{lengths:t.regular.lodInfo.lengths.buffer}},silhouette:{instancesData:o(t.silhouette.instancesData,n),lodInfo:{lengths:t.silhouette.lodInfo.lengths.buffer}},averageEdgeLength:t.averageEdgeLength}}const h=new class{allocate(t){return s.Jb.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1)}},f=new class{allocate(t){return s.HY.createBuffer(t)}trim(t,n){return t.slice(0,n)}write(t,n,e){t.position0.setVec(n,e.position0),t.position1.setVec(n,e.position1),t.componentIndex.set(n,e.componentIndex)}}},74038:(t,n,e)=>{e.d(n,{_:()=>r});class r{constructor(t,n,e,r,o,i=!1,a=0){this.name=t,this.count=n,this.type=e,this.offset=r,this.stride=o,this.normalized=i,this.divisor=a}}},87317:(t,n,e)=>{e.d(n,{a:()=>E,b:()=>g,c:()=>o,d:()=>l,e:()=>A,f:()=>f,g:()=>a,h:()=>p,j:()=>d,l:()=>m,n:()=>M,s:()=>i,t:()=>N});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}function i(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t}function a(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t}function s(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t}function c(t,n,e){return t[0]=n[0]*e[0],t[1]=n[1]*e[1],t[2]=n[2]*e[2],t[3]=n[3]*e[3],t}function u(t,n,e){return t[0]=n[0]/e[0],t[1]=n[1]/e[1],t[2]=n[2]/e[2],t[3]=n[3]/e[3],t}function l(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t}function h(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return Math.sqrt(e*e+r*r+o*o+i*i)}function f(t,n){const e=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],i=n[3]-t[3];return e*e+r*r+o*o+i*i}function d(t){const n=t[0],e=t[1],r=t[2],o=t[3];return Math.sqrt(n*n+e*e+r*r+o*o)}function g(t){const n=t[0],e=t[1],r=t[2],o=t[3];return n*n+e*e+r*r+o*o}function M(t,n){const e=n[0],r=n[1],o=n[2],i=n[3];let a=e*e+r*r+o*o+i*i;return a>0&&(a=1/Math.sqrt(a),t[0]=e*a,t[1]=r*a,t[2]=o*a,t[3]=i*a),t}function p(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}function m(t,n,e,r){const o=n[0],i=n[1],a=n[2],s=n[3];return t[0]=o+r*(e[0]-o),t[1]=i+r*(e[1]-i),t[2]=a+r*(e[2]-a),t[3]=s+r*(e[3]-s),t}function N(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3];return t[0]=e[0]*r+e[4]*o+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*o+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*o+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*o+e[11]*i+e[15]*a,t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]}function A(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],s=n[0],c=n[1],u=n[2],l=n[3],h=(0,r.FD)();return Math.abs(e-s)<=h*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(i-u)<=h*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(a-l)<=h*Math.max(1,Math.abs(a),Math.abs(l))}const I=s,O=c,T=u,S=h,b=f,v=d,_=g;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t[3]=Math.ceil(n[3]),t},copy:o,copyVec3:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},dist:S,distance:h,div:T,divide:u,dot:p,equals:A,exactEquals:E,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t[3]=Math.floor(n[3]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t},len:v,length:d,lerp:m,max:function(t,n,e){return t[0]=Math.max(n[0],e[0]),t[1]=Math.max(n[1],e[1]),t[2]=Math.max(n[2],e[2]),t[3]=Math.max(n[3],e[3]),t},min:function(t,n,e){return t[0]=Math.min(n[0],e[0]),t[1]=Math.min(n[1],e[1]),t[2]=Math.min(n[2],e[2]),t[3]=Math.min(n[3],e[3]),t},mul:O,multiply:c,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t},normalize:M,random:function(t,n=1){const e=r.Ov;let o,i,a,s,c,u;do{o=2*e()-1,i=2*e()-1,c=o*o+i*i}while(c>=1);do{a=2*e()-1,s=2*e()-1,u=a*a+s*s}while(u>=1);const l=Math.sqrt((1-c)/u);return t[0]=n*o,t[1]=n*i,t[2]=n*a*l,t[3]=n*s*l,t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t[3]=Math.round(n[3]),t},scale:l,scaleAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t},set:i,sqrDist:b,sqrLen:_,squaredDistance:f,squaredLength:g,str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},sub:I,subtract:s,transformMat4:N,transformQuat:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=e[0],s=e[1],c=e[2],u=e[3],l=u*r+s*i-c*o,h=u*o+c*r-a*i,f=u*i+a*o-s*r,d=-a*r-s*o-c*i;return t[0]=l*u+d*-a+h*-c-f*-s,t[1]=h*u+d*-s+f*-a-l*-c,t[2]=f*u+d*-c+l*-s-h*-a,t[3]=n[3],t}},Symbol.toStringTag,{value:"Module"}))},91829:(t,n,e)=>{function r(){return[0,0,0,0]}function o(t){return[t[0],t[1],t[2],t[3]]}function i(t,n,e,r){return[t,n,e,r]}function a(t,n,e,r){return[t,n,e,r]}function s(t,n=[0,0,0,0]){const e=Math.min(4,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n}function c(){return i(1,1,1,1)}function u(){return i(1,0,0,0)}function l(){return i(0,1,0,0)}function h(){return i(0,0,1,0)}function f(){return i(0,0,0,1)}e.d(n,{CN:()=>a,Un:()=>g,ci:()=>s,fA:()=>i,o8:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0,0],g=c(),M=u(),p=l(),m=h(),N=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:g,UNIT_W:N,UNIT_X:M,UNIT_Y:p,UNIT_Z:m,ZEROS:d,clone:o,create:r,freeze:a,fromArray:s,fromValues:i,ones:c,unitW:f,unitX:u,unitY:l,unitZ:h,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,n,e)=>{e.d(n,{K:()=>c});var r=e(34727),o=e(3694),i=e(38954),a=e(51850);const s=-1;function c(t,n,e){const r=t.vertices.position,o=t.vertices.componentIndex,a=M.position0,c=M.position1,h=M.faceNormal0,d=M.faceNormal1,{edges:g,normals:p}=l(t),m=g.length/4,N=n.allocate(m);let E=0;const A=m,T=e?.allocate(A);let b=0,v=0,_=0;f.length=0;for(let t=0;t<m;++t){const n=4*t;r.getVec(g.data[n],a),r.getVec(g.data[n+1],c);const e=f.pushNew();e.index=4*t,e.length=(0,i.j)(a,c)}f.sort((t,n)=>n.length-t.length);const R=new Array,y=new Array;f.forAll(({length:t,index:l})=>{const f=g.data[l],m=g.data[l+1],A=g.data[l+2],L=g.data[l+3],D=L===s;if(r.getVec(f,a),r.getVec(m,c),D){const t=3*A;(0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),(0,i.c)(d,h),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d)}else{let t=3*A;if((0,i.i)(h,p.data[t],p.data[t+1],p.data[t+2]),t=3*L,(0,i.i)(d,p.data[t],p.data[t+1],p.data[t+2]),M.componentIndex=o.get(f),M.cosAngle=(0,i.e)(h,d),function(t,n){return t.cosAngle>n}(M,O))return;M.cosAngle<-.9999&&(0,i.c)(d,h)}v+=t,_++,D||function(t,n){return t.cosAngle<n}(M,S)?(n.write(N,E++,M),R.push(t)):u(M,I)&&(T&&e&&e.write(T,b++,M),y.push(t))});const L=new Float32Array(R.reverse()),D=new Float32Array(y.reverse()),w=T&&e?{instancesData:T.slice(0,b),lodInfo:{lengths:D}}:void 0;return{regular:{instancesData:N.slice(0,E),lodInfo:{lengths:L}},silhouette:w,averageEdgeLength:v/_}}function u(t,n){const e=(0,r.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),e*((0,i.e)((0,i.h)(p,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>n}function l(t){const n=t.faces.length/3,e=t.faces,r=t.neighbors,o=t.vertices.position;d.length=g.length=0;for(let t=0;t<n;t++){const n=3*t,a=r[n],c=r[n+1],u=r[n+2],l=e[n],h=e[n+1],f=e[n+2];o.getVec(l,N),o.getVec(h,E),o.getVec(f,A),(0,i.d)(E,E,N),(0,i.d)(A,A,N),(0,i.h)(N,E,A),(0,i.n)(N,N),g.pushArray(N),(a===s||l<h)&&(d.push(l),d.push(h),d.push(t),d.push(a)),(c===s||h<f)&&(d.push(h),d.push(f),d.push(t),d.push(c)),(u===s||f<l)&&(d.push(f),d.push(l),d.push(t),d.push(u))}return{edges:d,normals:g}}class h{constructor(){this.index=0,this.length=0}}const f=new o.A({allocator:t=>t||new h,deallocator:null}),d=new o.A({deallocator:null}),g=new o.A({deallocator:null}),M=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},p=(0,a.vt)(),m=(0,a.vt)(),N=(0,a.vt)(),E=(0,a.vt)(),A=(0,a.vt)(),I=(0,r.kU)(4),O=Math.cos(I),T=(0,r.kU)(35),S=Math.cos(T)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(42837),l(89390),l(98619),l(22393),l(59469),l(39168),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(43616),l(60517),l(14113);var s=l(57323)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(24321),l(60864),l(43519),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(53802),l(89390),l(98619),l(22393),l(59469),l(39168),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(43616),l(60517),l(14113);var s=l(57323)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7937],{4341:(t,n,r)=>{r.d(n,{I:()=>o});var e=r(26390);class o{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,e.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},9093:(t,n,r)=>{function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[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]]}r.d(n,{o8:()=>o,vt:()=>e,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:e,fromValues:function(t,n,r,e,o,i,u,c,a,s,f,h,M,l,m,d){return[t,n,r,e,o,i,u,c,a,s,f,h,M,l,m,d]}},Symbol.toStringTag,{value:"Module"}))},29242:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,r,e,o,i,u,c,a){return[t,n,r,e,o,i,u,c,a]}r.d(n,{fA:()=>o,vt:()=>e,zK:()=>i});const i=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:o},Symbol.toStringTag,{value:"Module"}))},32114:(t,n,r)=>{r.d(n,{Rc:()=>l,J8:()=>m,rq:()=>h,Km:()=>M}),r(44208);var e=r(26390),o=r(29242),i=r(9093),u=r(82534),c=r(48163),a=r(51850),s=r(91829);class f{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,e.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new f(c.vt)}static createVec3f64(){return new f(a.vt)}static createVec4f64(){return new f(s.vt)}static createMat3f64(){return new f(o.vt)}static createMat4f64(){return new f(i.vt)}static createQuatf64(){return new f(u.vt)}get test(){}}f.createVec2f64();const h=f.createVec3f64(),M=f.createVec4f64(),l=(f.createMat3f64(),f.createMat4f64()),m=f.createQuatf64()},38954:(t,n,r)=>{r.d(n,{A:()=>m,B:()=>l,C:()=>f,D:()=>h,E:()=>I,F:()=>D,H:()=>k,a:()=>V,b:()=>b,c:()=>u,d:()=>s,e:()=>P,f:()=>a,g:()=>g,h:()=>S,i:()=>c,j:()=>_,k:()=>p,l:()=>i,m:()=>j,n:()=>x,o:()=>A,q:()=>C,r:()=>y,s:()=>v,t:()=>O,u:()=>q,v:()=>T,w:()=>M,x:()=>N,y:()=>F,z:()=>d});var e=r(51850),o=r(34304);function i(t){const n=t[0],r=t[1],e=t[2];return Math.sqrt(n*n+r*r+e*e)}function u(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function c(t,n,r,e){return t[0]=n,t[1]=r,t[2]=e,t}function a(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t}function s(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}function M(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t}function d(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t}function g(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t}function _(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+e*e+o*o)}function v(t,n){const r=n[0]-t[0],e=n[1]-t[1],o=n[2]-t[2];return r*r+e*e+o*o}function p(t){const n=t[0],r=t[1],e=t[2];return n*n+r*r+e*e}function q(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function x(t,n){const r=n[0],e=n[1],o=n[2];let i=r*r+e*e+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function S(t,n,r){const e=n[0],o=n[1],i=n[2],u=r[0],c=r[1],a=r[2];return t[0]=o*a-i*c,t[1]=i*u-e*a,t[2]=e*c-o*u,t}function j(t,n,r,e){const o=n[0],i=n[1],u=n[2];return t[0]=o+e*(r[0]-o),t[1]=i+e*(r[1]-i),t[2]=u+e*(r[2]-u),t}function O(t,n,r){const e=n[0],o=n[1],i=n[2];return t[0]=r[0]*e+r[4]*o+r[8]*i+r[12],t[1]=r[1]*e+r[5]*o+r[9]*i+r[13],t[2]=r[2]*e+r[6]*o+r[10]*i+r[14],t}function A(t,n,r){const e=n[0],o=n[1],i=n[2];return t[0]=e*r[0]+o*r[3]+i*r[6],t[1]=e*r[1]+o*r[4]+i*r[7],t[2]=e*r[2]+o*r[5]+i*r[8],t}function T(t,n,r){const e=r[0],o=r[1],i=r[2],u=r[3],c=n[0],a=n[1],s=n[2],f=o*s-i*a,h=i*c-e*s,M=e*a-o*c,l=o*M-i*h,m=i*f-e*M,d=e*h-o*f,g=2*u;return t[0]=c+f*g+2*l,t[1]=a+h*g+2*m,t[2]=s+M*g+2*d,t}const w=(0,e.vt)(),z=(0,e.vt)();function C(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function I(t,n,r){const e=r[0]-n[0],o=r[1]-n[1],i=r[2]-n[2];let u=e*e+o*o+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=e*u,t[1]=o*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const V=s,E=f,R=h,D=_,N=v,k=i,F=p;Object.freeze(Object.defineProperty({__proto__:null,abs:M,add:a,angle:function(t,n){x(w,t),x(z,n);const r=P(w,z);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,n,r,e,o,i){const u=1-i,c=u*u,a=i*i,s=c*u,f=3*i*c,h=3*a*u,M=a*i;return t[0]=n[0]*s+r[0]*f+e[0]*h+o[0]*M,t[1]=n[1]*s+r[1]*f+e[1]*h+o[1]*M,t[2]=n[2]*s+r[2]*f+e[2]*h+o[2]*M,t},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t},clamp:function(t,n=0,r=1){return t[0]=Math.min(Math.max(t[0],n),r),t[1]=Math.min(Math.max(t[1],n),r),t[2]=Math.min(Math.max(t[2],n),r),t},copy:u,cross:S,crossAndNormalize:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=r[0],c=r[1],a=r[2],s=o*a-i*c,f=i*u-e*a,h=e*c-o*u,M=Math.sqrt(s*s+f*f+h*h);return t[0]=s/M,t[1]=f/M,t[2]=h/M,t},direction:I,dist:D,distance:_,div:R,divide:h,dot:P,equals:function(t,n){if(t===n)return!0;const r=t[0],e=t[1],i=t[2],u=n[0],c=n[1],a=n[2],s=(0,o.FD)();return Math.abs(r-u)<=s*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-c)<=s*Math.max(1,Math.abs(e),Math.abs(c))&&Math.abs(i-a)<=s*Math.max(1,Math.abs(i),Math.abs(a))},exactEquals:C,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t},hermite:function(t,n,r,e,o,i){const u=i*i,c=u*(2*i-3)+1,a=u*(i-2)+i,s=u*(i-1),f=u*(3-2*i);return t[0]=n[0]*c+r[0]*a+e[0]*s+o[0]*f,t[1]=n[1]*c+r[1]*a+e[1]*s+o[1]*f,t[2]=n[2]*c+r[2]*a+e[2]*s+o[2]*f,t},inverse:y,len:k,length:i,lerp:j,max:d,min:m,mul:E,multiply:f,negate:q,normalize:x,random:function(t,n=1){const r=o.Ov,e=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*n;return t[0]=Math.cos(e)*u,t[1]=Math.sin(e)*u,t[2]=i*n,t},rotateX:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[0],i[1]=o[1]*Math.cos(e)-o[2]*Math.sin(e),i[2]=o[1]*Math.sin(e)+o[2]*Math.cos(e),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[2]*Math.sin(e)+o[0]*Math.cos(e),i[1]=o[1],i[2]=o[2]*Math.cos(e)-o[0]*Math.sin(e),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,n,r,e){const o=[],i=[];return o[0]=n[0]-r[0],o[1]=n[1]-r[1],o[2]=n[2]-r[2],i[0]=o[0]*Math.cos(e)-o[1]*Math.sin(e),i[1]=o[0]*Math.sin(e)+o[1]*Math.cos(e),i[2]=o[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t},scale:g,scaleAndAdd:b,set:c,sign:l,sqrDist:N,sqrLen:F,squaredDistance:v,squaredLength:p,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:V,subtract:s,transformMat3:A,transformMat4:O,transformQuat:T},Symbol.toStringTag,{value:"Module"}))},44280:(t,n,r)=>{r.d(n,{EJ:()=>a,g7:()=>c,gr:()=>u});var e=r(34727),o=r(38954),i=r(51850);function u(t,n){return(0,o.e)(t,n)/(0,o.l)(t)}function c(t,n){const r=(0,o.e)(t,n)/((0,o.l)(t)*(0,o.l)(n));return-(0,e.XM)(r)}function a(t,n,r){(0,o.n)(s,t),(0,o.n)(f,n);const i=(0,o.e)(s,f),u=(0,e.XM)(i),c=(0,o.h)(s,s,f);return(0,o.e)(c,r)<0?2*Math.PI-u:u}const s=(0,i.vt)(),f=(0,i.vt)()},48163:(t,n,r)=>{function e(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function u(){return i(1,1)}function c(){return i(1,0)}function a(){return i(0,1)}r.d(n,{Un:()=>s,fA:()=>i,o8:()=>o,vt:()=>e});const s=u(),f=c(),h=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:s,UNIT_X:f,UNIT_Y:h,ZEROS:[0,0],clone:o,create:e,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const r=Math.min(2,t.length);for(let e=0;e<r;++e)n[e]=t[e];return n},fromValues:i,ones:u,unitX:c,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},71351:(t,n,r)=>{r.d(n,{C:()=>h,Cr:()=>M,LV:()=>f,fA:()=>l,kb:()=>m,oC:()=>d,vt:()=>a}),r(4576);var e=r(4341),o=(r(77690),r(29242)),i=r(38954),u=r(51850),c=r(32114);function a(t){return t?s((0,u.o8)(t.origin),(0,u.o8)(t.direction)):s((0,u.vt)(),(0,u.vt)())}function s(t,n){return{origin:t,direction:n}}function f(t,n){const r=g.get();return r.origin=t,r.direction=n,r}function h(t,n=a()){return l(t.origin,t.direction,n)}function M(t,n,r=a()){return(0,i.c)(r.origin,t),(0,i.d)(r.direction,n,t),r}function l(t,n,r=a()){return(0,i.c)(r.origin,t),(0,i.c)(r.direction,n),r}function m(t,n){const r=(0,i.h)(c.rq.get(),(0,i.n)(c.rq.get(),t.direction),(0,i.d)(c.rq.get(),n,t.origin));return(0,i.e)(r,r)}function d(t,n,r){const e=(0,i.e)(t.direction,(0,i.d)(r,n,t.origin));return(0,i.f)(r,t.origin,(0,i.g)(r,t.direction,e)),r}const g=new e.I(()=>a());(0,u.vt)(),(0,u.vt)(),(0,u.vt)(),(0,o.vt)()},77690:(t,n,r)=>{r.d(n,{B8:()=>c,Ge:()=>M,I0:()=>h,KC:()=>a,hZ:()=>i,hs:()=>f,lw:()=>s,mg:()=>u,z0:()=>o});var e=r(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function i(t,n,r,e,o,i,u,c,a,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=i,t[5]=u,t[6]=c,t[7]=a,t[8]=s,t}function u(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function c(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8],h=f*u-c*s,M=-f*i+c*a,l=s*i-u*a;let m=r*h+e*M+o*l;return m?(m=1/m,t[0]=h*m,t[1]=(-f*e+o*s)*m,t[2]=(c*e-o*u)*m,t[3]=M*m,t[4]=(f*r-o*a)*m,t[5]=(-c*r+o*i)*m,t[6]=l*m,t[7]=(-s*r+e*a)*m,t[8]=(u*r-e*i)*m,t):null}function a(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8];return t[0]=u*f-c*s,t[1]=o*s-e*f,t[2]=e*c-o*u,t[3]=c*a-i*f,t[4]=r*f-o*a,t[5]=o*i-r*c,t[6]=i*s-u*a,t[7]=e*a-r*s,t[8]=r*u-e*i,t}function s(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=r[0],l=r[1],m=r[2],d=r[3],g=r[4],b=r[5],_=r[6],v=r[7],p=r[8];return t[0]=M*e+l*u+m*s,t[1]=M*o+l*c+m*f,t[2]=M*i+l*a+m*h,t[3]=d*e+g*u+b*s,t[4]=d*o+g*c+b*f,t[5]=d*i+g*a+b*h,t[6]=_*e+v*u+p*s,t[7]=_*o+v*c+p*f,t[8]=_*i+v*a+p*h,t}function f(t,n,r){const e=r[0],o=r[1],i=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function h(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=r+r,c=e+e,a=o+o,s=r*u,f=e*u,h=e*c,M=o*u,l=o*c,m=o*a,d=i*u,g=i*c,b=i*a;return t[0]=1-h-m,t[3]=f-b,t[6]=M+g,t[1]=f+b,t[4]=1-s-m,t[7]=l-d,t[2]=M-g,t[5]=l+d,t[8]=1-s-h,t}function M(t,n){const r=n[0],e=n[1],o=n[2],i=n[3],u=n[4],c=n[5],a=n[6],s=n[7],f=n[8],h=n[9],M=n[10],l=n[11],m=n[12],d=n[13],g=n[14],b=n[15],_=r*c-e*u,v=r*a-o*u,p=r*s-i*u,q=e*a-o*c,y=e*s-i*c,x=o*s-i*a,P=f*d-h*m,S=f*g-M*m,j=f*b-l*m,O=h*g-M*d,A=h*b-l*d,T=M*b-l*g;let w=_*T-v*A+p*O+q*j-y*S+x*P;return w?(w=1/w,t[0]=(c*T-a*A+s*O)*w,t[1]=(a*j-u*T-s*S)*w,t[2]=(u*A-c*j+s*P)*w,t[3]=(o*A-e*T-i*O)*w,t[4]=(r*T-o*j+i*S)*w,t[5]=(e*j-r*A-i*P)*w,t[6]=(d*x-g*y+b*q)*w,t[7]=(g*p-m*x-b*v)*w,t[8]=(m*y-d*p+b*_)*w,t):null}function l(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const m=s,d=l;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:a,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],i=t[4],u=t[5],c=t[6],a=t[7],s=t[8];return n*(s*i-u*a)+r*(-s*o+u*c)+e*(a*o-i*c)},equals:function(t,n){const r=t[0],o=t[1],i=t[2],u=t[3],c=t[4],a=t[5],s=t[6],f=t[7],h=t[8],M=n[0],l=n[1],m=n[2],d=n[3],g=n[4],b=n[5],_=n[6],v=n[7],p=n[8],q=(0,e.FD)();return Math.abs(r-M)<=q*Math.max(1,Math.abs(r),Math.abs(M))&&Math.abs(o-l)<=q*Math.max(1,Math.abs(o),Math.abs(l))&&Math.abs(i-m)<=q*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(u-d)<=q*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-g)<=q*Math.max(1,Math.abs(c),Math.abs(g))&&Math.abs(a-b)<=q*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(s-_)<=q*Math.max(1,Math.abs(s),Math.abs(_))&&Math.abs(f-v)<=q*Math.max(1,Math.abs(f),Math.abs(v))&&Math.abs(h-p)<=q*Math.max(1,Math.abs(h),Math.abs(p))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(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)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:h,fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:c,isOrthoNormal:function(t){const n=(0,e.FD)(),r=t[0],o=t[1],i=t[2],u=t[3],c=t[4],a=t[5],s=t[6],f=t[7],h=t[8];return Math.abs(1-(r*r+u*u+s*s))<=n&&Math.abs(1-(o*o+c*c+f*f))<=n&&Math.abs(1-(i*i+a*a+h*h))<=n},mul:m,multiply:s,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],i=n[4],u=n[5],c=n[6],a=n[8],s=n[9],f=n[10],h=f*u-c*s,M=-f*i+c*a,l=s*i-u*a,m=r*h+e*M+o*l;if(!m)return null;const d=1/m;return t[0]=h*d,t[1]=(-f*e+o*s)*d,t[2]=(c*e-o*u)*d,t[3]=M*d,t[4]=(f*r-o*a)*d,t[5]=(-c*r+o*i)*d,t[6]=l*d,t[7]=(-s*r+e*a)*d,t[8]=(u*r-e*i)*d,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=Math.sin(r),l=Math.cos(r);return t[0]=l*e+M*u,t[1]=l*o+M*c,t[2]=l*i+M*a,t[3]=l*u-M*e,t[4]=l*c-M*o,t[5]=l*a-M*i,t[6]=s,t[7]=f,t[8]=h,t},scale:f,scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:l,translate:function(t,n,r){const e=n[0],o=n[1],i=n[2],u=n[3],c=n[4],a=n[5],s=n[6],f=n[7],h=n[8],M=r[0],l=r[1];return t[0]=e,t[1]=o,t[2]=i,t[3]=u,t[4]=c,t[5]=a,t[6]=M*e+l*u+s,t[7]=M*o+l*c+f,t[8]=M*i+l*a+h,t},transpose:u},Symbol.toStringTag,{value:"Module"}))},82534:(t,n,r)=>{function e(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}r.d(n,{o8:()=>o,vt:()=>e,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:e,fromValues:function(t,n,r,e){return[t,n,r,e]}},Symbol.toStringTag,{value:"Module"}))},97937:(t,n,r)=>{r.d(n,{a:()=>y,b:()=>p,c:()=>g,d:()=>w,f:()=>x,g:()=>q,h:()=>v,k:()=>A,o:()=>R,s:()=>k}),r(44208),r(53966);var e=r(34727),o=r(58083),i=r(38954),u=r(51850),c=r(87317),a=r(91829),s=r(34304),f=r(88582),h=r(71351);function M(t,n){const r=(0,i.l)(t),o=(0,e.YN)(t[2]/r),u=Math.atan2(t[1]/r,t[0]/r);return(0,i.i)(n,r,o,u),n}var l=r(44280),m=r(32114);const d=g();function g(){return(0,a.vt)()}const b=c.e,_=c.e;function v(t,n){return(0,c.c)(n,t)}function p(t,n){return t[0]=t[1]=t[2]=0,t[3]=n,t}function q(t){return t[3]}function y(t){return t}function x(t,n,r,e){return(0,a.fA)(t,n,r,e)}function P(t,n,r){if(null==n)return!1;if(!j(t,n,S))return!1;let{t0:e,t1:o}=S;if((e<0||o<e&&o>0)&&(e=o),e<0)return!1;if(r){const{origin:t,direction:o}=n;r[0]=t[0]+o[0]*e,r[1]=t[1]+o[1]*e,r[2]=t[2]+o[2]*e}return!0}const S={t0:0,t1:0};function j(t,n,r){const{origin:e,direction:o}=n,i=O;i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2];const u=o[0]*o[0]+o[1]*o[1]+o[2]*o[2];if(0===u)return!1;const c=2*(o[0]*i[0]+o[1]*i[1]+o[2]*i[2]),a=c*c-4*u*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(a<0)return!1;const s=Math.sqrt(a);return r.t0=(-c-s)/(2*u),r.t1=(-c+s)/(2*u),!0}const O=(0,u.vt)();function A(t,n){return P(t,n,null)}function T(t,n,r){const e=m.rq.get(),u=m.Rc.get();(0,i.h)(e,n.origin,n.direction);const c=q(t);(0,i.h)(r,e,n.origin),(0,i.g)(r,r,1/(0,i.l)(r)*c);const a=C(t,n.origin),s=(0,l.g7)(n.origin,r);return(0,o.$0)(u,s+a,e),(0,i.t)(r,r,u),r}function w(t,n,r,e){const o=q(t),i=o*o,u=n+.5*Math.PI,c=r*r+i-2*Math.cos(u)*r*o,a=Math.sqrt(c),s=c-i;if(s<=0)return.5;const f=Math.sqrt(s),h=Math.acos(f/a)-Math.asin(o/(a/Math.sin(u)));return Math.min(1,(h+.5*e)/e)}function z(t,n,r){const e=(0,i.d)(m.rq.get(),n,t),o=(0,i.g)(m.rq.get(),e,t[3]/(0,i.l)(e));return(0,i.f)(r,o,t)}function C(t,n){const r=(0,i.d)(m.rq.get(),n,t),o=(0,i.l)(r),u=q(t),c=u+Math.abs(u-o);return(0,e.XM)(u/c)}const I=(0,u.vt)();function V(t,n,r,e){const o=(0,i.d)(I,n,t);switch(r){case f._.X:{const t=M(o,I)[2];return(0,i.i)(e,-Math.sin(t),Math.cos(t),0)}case f._.Y:{const t=M(o,I),n=t[1],r=t[2],u=Math.sin(n);return(0,i.i)(e,-u*Math.cos(r),-u*Math.sin(r),Math.cos(n))}case f._.Z:return(0,i.n)(e,o);default:return}}function E(t,n){const r=(0,i.d)(D,n,t);return(0,i.l)(r)-t[3]}function R(t,n){const r=(0,i.s)(t,n),e=q(t);return r<=e*e}const D=(0,u.vt)(),N=g(),k=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:d,altitudeAt:E,angleToSilhouette:C,axisAt:V,cameraFrustumCoverage:w,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,n,r){return P(t,n,r)?r:((0,h.oC)(n,t,r),z(t,r,r))},closestPointOnSilhouette:T,containsPoint:R,copy:v,create:g,distanceToSilhouette:function(t,n){const r=(0,i.d)(m.rq.get(),n,t),e=(0,i.k)(r),o=t[3]*t[3];return Math.sqrt(Math.abs(e-o))},elevate:function(t,n,r){return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=t[3]+n,r},equals:_,exactEquals:b,fromCenterAndRadius:function(t,n){return(0,a.fA)(t[0],t[1],t[2],n)},fromRadius:p,fromValues:x,getCenter:y,getExtent:function(t,n){return n},getRadius:q,intersectLine:function(t,n,r){const e=(0,h.Cr)(n,r);if(!j(t,e,S))return[];const{origin:o,direction:c}=e,{t0:a,t1:f}=S,M=n=>{const r=(0,u.vt)();return(0,i.b)(r,o,c,n),z(t,r,r)};return Math.abs(a-f)<(0,s.FD)()?[M(a)]:[M(a),M(f)]},intersectRay:P,intersectRayClosestSilhouette:function(t,n,r){if(P(t,n,r))return r;const e=T(t,n,m.rq.get());return(0,i.f)(r,n.origin,(0,i.g)(m.rq.get(),n.direction,(0,i.j)(n.origin,e)/(0,i.l)(n.direction))),r},intersectsRay:A,projectPoint:z,setAltitudeAt:function(t,n,r,e){const o=E(t,n),u=V(t,n,f._.Z,D),c=(0,i.g)(D,u,r-o);return(0,i.f)(e,n,c)},setExtent:function(t,n,r){return t!==r&&v(t,r),r},tmpSphere:N,union:function(t,n,r=(0,a.vt)()){const e=(0,i.j)(t,n),o=t[3],u=n[3];return e+u<o?((0,c.c)(r,t),r):e+o<u?((0,c.c)(r,n),r):((0,i.m)(r,t,n,(e+u-o)/(2*e)),r[3]=(e+o+u)/2,r)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186,9875],{17311:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69622),o=r(4576),n=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),p=r(30524),d=r(43668);let c=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),s=this.fieldsIndex.get(r.at(-1)??"");s&&e.add(s.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const s=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(s)??""}async getTitles(e,t,r){const s=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:a}=this,l=a&&n;t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],u=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";s.set(r,u)})}catch{}return s}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(o.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,p.Kl)(e,this.requiredFields))){const s=e.createQuery();s.where="1=1",s.outFields=[...this.requiredFields],s.objectIds=r;const i=await e.queryFeatures(s);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),s=e?.name??r.fieldName;r.fieldName=s,t.set(s.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const s=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:s,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,s._)([(0,l.MZ)({readOnly:!0})],c.prototype,"_arcadeTask",null),(0,s._)([(0,l.MZ)()],c.prototype,"_featureUtils",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],c.prototype,"featureUtilsPromise",null),(0,s._)([(0,l.MZ)({readOnly:!0})],c.prototype,"calculatedExpressions",null),(0,s._)([(0,l.MZ)()],c.prototype,"displayField",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"effectivePopupTemplate",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"expressionsUsedInTitle",null),(0,s._)([(0,l.MZ)()],c.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"fieldInfoMap",null),(0,s._)([(0,l.MZ)()],c.prototype,"fields",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"objectIdField",void 0),(0,s._)([(0,l.MZ)()],c.prototype,"requiredFields",null),c=(0,s._)([(0,u.$)("esri.layers.support.TitleCreator")],c)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),o=r(52106),n=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,h.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-s)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*o+s,e=>i-e*n,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],n=r.fromJSON(o),a=o.geometry?.spatialReference;null==n.geometry||a||(n.geometry.spatialReference=s);const l=o.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===s&&n===i||(o.push([e-s,n-i]),s=e,i=n)}else s=t(a[0]),i=r(a[1]),o.push([s,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){const o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,s=o.length;e<s;e++){const s=o[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}if(s&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=s=(0,i._)([(0,d.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>n,mj:()=>i});var s=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every((e,t)=>e.type===r[t].type)}function o(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,s.sK)(r[e]))}function n(e){const t=e[0];return!!t&&"type"in t}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>u});var s=r(90237),i=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const s=e.find(e=>!!e.field);if(!s)return null;const i=new a.A;return i.read(s,r),[i]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,s){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,o.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>c});var s=r(90237),i=r(69540),o=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),d=r(29005);let c=class extends(i.A.ClonableMixin(o.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,s._)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,s._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,s._)([(0,n.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,s._)([(0,l.$)("esri.layers.support.FeatureType")],c)},38961:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(90237),i=r(5503),o=r(36708),n=r(10107),a=r(40608),l=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const s of t)if(s){if(r(s)){const t=this.indexOf(s,e);t>=0?t!==e&&this.reorder(s,e):this.add(s,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(s);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,s._)([(0,n.MZ)()],u.prototype,"getCollections",void 0),(0,s._)([(0,n.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,s._)([(0,n.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,s._)([(0,a.$)("esri.core.CollectionFlattener")],u)},41560:(e,t,r)=>{r.d(t,{Ch:()=>n,mW:()=>o});var s=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:s}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(s));return t}(e);if(o&&((0,s.gg)(t,o[0])||(0,s.ZH)(r,o[1])))return"";const n=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),o=d(e.at(-1)?.maxScale);if((0,s.ZH)(i,t)||(0,s.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,s.ZH)(p(i.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const s of e.filters)l(s.minScale,s.maxScale,t,r)&&(yield s)}}function l(e,t,r,i){return e=p(e),r=p(r),t=d(t),!(!(0,s.Sp)(r,e)&&(i??r)>e||(0,s.Hx)(t,r)||void 0!==i&&(0,s.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},45671:(e,t,r)=>{r.d(t,{D8:()=>o,TO:()=>i});var s=r(30524);async function i(e,t=e.popupTemplate){if(null==t)return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:i}=t,{objectIdField:o,typeIdField:n,globalIdField:a,relationships:l}=e;if(r.includes("*"))return["*"];const u=i?(0,s.eX)(e):[],p=(0,s.DB)(e.fieldsIndex,[...r,...u]);return n&&p.push(n),p&&o&&e.fieldsIndex?.has(o)&&!p.includes(o)&&p.push(o),p&&a&&e.fieldsIndex?.has(a)&&!p.includes(a)&&p.push(a),l&&l.forEach(t=>{const{keyField:r}=t;p&&r&&e.fieldsIndex?.has(r)&&!p.includes(r)&&p.push(r)}),p}function o(e,t){return e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&null!=e.defaultPopupTemplate?e.defaultPopupTemplate:null}},58501:(e,t,r)=>{r.d(t,{q:()=>i});var s=r(62815);function i(e,t,r){if(!r?.features||!r.hasZ)return;const i=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(null!=i)for(const e of r.features)i(e.geometry)}},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>p,$b:()=>d,Nd:()=>c,jm:()=>y,sK:()=>m});var s=r(40876),i=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const n=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,s,i,o,n,a,l,u,p,d,c,y,h,f){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=s,m[4]=i,m[5]=o,m[6]=n,m[7]=a,m[8]=l,m[9]=u,m[10]=p,m[11]=d,m[12]=c,m[13]=y,m[14]=h,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=h(e.strength,t.strength,r),this.radius=h(e.radius,t.radius,r),this.threshold=h(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(h(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class p{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=h(e.amount,t.amount,r),this._updateMatrix()}clone(){return new p(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,s=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(s,s)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class d{constructor(e,t,r,s){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=h(e.offsetX,t.offsetX,r),this.offsetY=h(e.offsetY,t.offsetY,r),this.blurRadius=h(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(h(e.color[0],t.color[0],r)),this.color[1]=Math.round(h(e.color[1],t.color[1],r)),this.color[2]=Math.round(h(e.color[2],t.color[2],r)),this.color[3]=h(e.color[3],t.color[3],r)}clone(){return new d(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:e}}}class c{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=h(e.angle,t.angle,r),this._updateMatrix()}clone(){return new c(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),s=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class y{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=h(e.amount,t.amount,r)}clone(){return new y(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function h(e,t,r){return e+(t-e)*r}function f(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new p(e.type,0);case"saturate":case"brightness":case"contrast":return new p(e.type,1);case"opacity":return new y(1);case"hue-rotate":return new c(0);case"blur":return new u(0);case"drop-shadow":return new d(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>n});var s=r(60999),i=r(5503),o=r(92474);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.A.isCollection(t)?t.forEach(e=>n(e)):o.A.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,s.Tj)(r,async e=>{const t=await(0,s.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},88303:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var s=r(90237),i=r(5503),o=r(38961),n=r(49186),a=r(36563),l=r(4718),u=r(81583),p=r(53966),d=r(92071),c=r(74887),y=r(36708),h=r(84952),f=r(10107),m=(r(44208),r(36005)),g=r(40608),_=r(16930),b=r(4146),v=r(52106),M=r(13874),w=r(78888),x=r(66552),S=r(92474),Z=r(61893),A=(r(87811),r(93223)),F=r(5443),I=r(13600),T=r(4902),O=r(56507),j=r(10873);let P=class extends(T.A.IdentifiableMixin(d.L)){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.legendEnabled=!0,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:-1}};(0,s._)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],P.prototype,"title",void 0),(0,s._)([(0,m.w)("service","title",["alias","name"])],P.prototype,"readTitle",null),(0,s._)([(0,f.MZ)()],P.prototype,"layer",void 0),(0,s._)([(0,f.MZ)({type:O.jz,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,isRequired:!0}}})],P.prototype,"id",void 0),(0,s._)([(0,m.w)("service","id")],P.prototype,"readIdOnlyOnce",null),(0,s._)([(0,f.MZ)((0,j.Qo)(String))],P.prototype,"modelName",void 0),(0,s._)([(0,f.MZ)((0,j.Qo)(Boolean))],P.prototype,"isEmpty",void 0),(0,s._)([(0,f.MZ)({type:Boolean,nonNullable:!0})],P.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],P.prototype,"visible",void 0),(0,s._)([(0,f.MZ)({type:Number,json:{write:!0}})],P.prototype,"opacity",void 0),P=(0,s._)([(0,g.$)("esri.layers.buildingSublayers.BuildingSublayer")],P);var L=r(4071),E=r(15426),R=r(17036),N=r(95466),k=r(30524),q=r(83898),B=r(50805),$=r(41214),C=r(61956),U=r(54218),Q=r(30291),J=r(88625),D=r(584),K=r(45671);const G=(0,R.p)();let V=class extends(S.A.LoadableMixin(Z.A.EsriPromiseMixin(P))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new N.A(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,s=t.associatedLayerID;return null!=r&&"number"==typeof s?new I.default({portalItem:r,customParameters:this.customParameters,layerId:s}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=(0,q.F)(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,p.A.getLogger(this),t)});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return(0,Q.tn)(this,e)}async _fetchService(e){const t=(await(0,w.A)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?(0,E.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:L.P,{query:t,operations:{supportsQuery:r},data:{supportsZ:s,supportsM:i,isVersioned:o}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:s,supportsM:i,isVersioned:o}}}createQuery(){const e=new C.A;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e})}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(U.Et)}async queryCachedAttributes(e,t){const r=(0,k.hL)(this.fieldsIndex,await(0,K.TO)(this,(0,K.D8)(this)));return(0,D.s1)(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new n.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new v.A({attributes:r[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n.A("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"parsedUrl",null),(0,s._)([(0,f.MZ)({type:B.W4,readOnly:!0})],V.prototype,"nodePages",void 0),(0,s._)([(0,f.MZ)({type:[B.uV],readOnly:!0})],V.prototype,"materialDefinitions",void 0),(0,s._)([(0,f.MZ)({type:[B.Ot],readOnly:!0})],V.prototype,"textureSetDefinitions",void 0),(0,s._)([(0,f.MZ)({type:[B.L0],readOnly:!0})],V.prototype,"geometryDefinitions",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"serviceUpdateTimeStamp",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"store",void 0),(0,s._)([(0,f.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],V.prototype,"rootNode",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),(0,s._)([(0,f.MZ)(G.fields)],V.prototype,"fields",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"fieldsIndex",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:I.default})],V.prototype,"associatedLayer",void 0),(0,s._)([(0,m.w)("service","associatedLayer",["associatedLayerID"])],V.prototype,"readAssociatedLayer",null),(0,s._)([(0,f.MZ)(G.outFields)],V.prototype,"outFields",void 0),(0,s._)([(0,f.MZ)({type:String,readOnly:!0})],V.prototype,"objectIdField",null),(0,s._)([(0,f.MZ)({type:String,readOnly:!0})],V.prototype,"globalIdField",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:String,json:{read:!1}})],V.prototype,"displayField",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:String})],V.prototype,"apiKey",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:String})],V.prototype,"customParameters",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:F.A})],V.prototype,"fullExtent",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:_.A})],V.prototype,"spatialReference",null),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"version",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:J.A})],V.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:Number})],V.prototype,"minScale",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:Number})],V.prototype,"maxScale",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:Number})],V.prototype,"effectiveScaleRange",null),(0,s._)([(0,f.MZ)({type:["hide","show"],json:{write:!0}})],V.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)({types:$.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],V.prototype,"renderer",void 0),(0,s._)([(0,f.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],V.prototype,"definitionExpression",void 0),(0,s._)([(0,f.MZ)(j.M6)],V.prototype,"popupEnabled",void 0),(0,s._)([(0,f.MZ)({type:M.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],V.prototype,"popupTemplate",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],V.prototype,"normalReferenceFrame",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.MZ)()],V.prototype,"types",null),(0,s._)([(0,f.MZ)()],V.prototype,"typeIdField",null),(0,s._)([(0,f.MZ)({json:{write:!1}}),(0,A.e)(new x.J({"3DObject":"3d-object",Point:"point"}))],V.prototype,"layerType",void 0),(0,s._)([(0,f.MZ)()],V.prototype,"geometryType",null),(0,s._)([(0,f.MZ)()],V.prototype,"profile",null),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"capabilities",null),(0,s._)([(0,f.MZ)({readOnly:!0})],V.prototype,"statisticsInfo",void 0),V=(0,s._)([(0,g.$)("esri.layers.buildingSublayers.BuildingComponentSublayer")],V);const z=V;var X,H=r(67076);const Y={type:i.A,readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:W}}},read:!1}};function W(e,t,r){if(e&&Array.isArray(e))return new i.A(e.map(e=>{const t=function(e){return"group"===e.layerType?ee:z}(e);if(t){const s=new t;return s.read(e,r),s}return r?.messages&&e&&r.messages.push(new H.A("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null}))}let ee=X=class extends P{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return(0,u.L)(this,e=>X.forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}))}};var te;(0,s._)([(0,f.MZ)({type:["hide","show","hide-children"],json:{write:!0}})],ee.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)(Y)],ee.prototype,"sublayers",void 0),ee=X=(0,s._)([(0,g.$)("esri.layers.buildingSublayers.BuildingGroupSublayer")],ee),(te=ee||(ee={})).sublayersProperty=Y,te.readSublayers=W,te.forEachSublayer=function e(t,r){t.forEach(t=>{r(t),"building-group"===t.type&&e(t.sublayers,r)})};var re=r(52136),se=r(18768),ie=r(69208),oe=r(16131),ne=r(8303),ae=r(25036),le=r(58947),ue=r(92009),pe=r(25482),de=r(13069);let ce=class extends pe.A{constructor(){super(...arguments),this.type=null}};(0,s._)([(0,f.MZ)({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],ce.prototype,"type",void 0),ce=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfo")],ce);const ye=ce;var he;let fe=he=class extends pe.A{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new he({filterType:this.filterType,filterValues:(0,l.o8)(this.filterValues)})}};(0,s._)([(0,f.MZ)({type:String,json:{write:{isRequired:!0}}})],fe.prototype,"filterType",void 0),(0,s._)([(0,f.MZ)({type:[String],json:{write:{isRequired:!0}}})],fe.prototype,"filterValues",void 0),fe=he=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfoType")],fe);const me=fe;var ge;const _e=i.A.ofType(me);let be=ge=class extends pe.A{clone(){return new ge({filterTypes:(0,l.o8)(this.filterTypes)})}};(0,s._)([(0,f.MZ)({type:_e,json:{write:{isRequired:!0}}})],be.prototype,"filterTypes",void 0),be=ge=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfoBlock")],be);const ve=be;var Me;const we=i.A.ofType(ve);let xe=Me=class extends ye{constructor(){super(...arguments),this.type="checkbox"}clone(){return new Me({filterBlocks:(0,l.o8)(this.filterBlocks)})}};(0,s._)([(0,f.MZ)({type:["checkbox"]})],xe.prototype,"type",void 0),(0,s._)([(0,f.MZ)({type:we,json:{write:{isRequired:!0}}})],xe.prototype,"filterBlocks",void 0),xe=Me=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],xe);const Se=xe;let Ze=class extends pe.A{};(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],Ze.prototype,"type",void 0),Ze=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterMode")],Ze);const Ae=Ze;var Fe;let Ie=Fe=class extends Ae{constructor(){super(...arguments),this.type="solid"}clone(){return new Fe}};(0,s._)([(0,f.MZ)({type:["solid"],readOnly:!0,json:{write:{isRequired:!0}}})],Ie.prototype,"type",void 0),Ie=Fe=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterModeSolid")],Ie);const Te=Ie;var Oe,je=r(51734);let Pe=Oe=class extends Ae{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new Oe({edges:(0,l.o8)(this.edges)})}};(0,s._)([(0,A.e)({wireFrame:"wire-frame"})],Pe.prototype,"type",void 0),(0,s._)([(0,f.MZ)(je.J)],Pe.prototype,"edges",void 0),Pe=Oe=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterModeWireFrame")],Pe);const Le=Pe;var Ee;let Re=Ee=class extends Ae{constructor(){super(...arguments),this.type="x-ray"}clone(){return new Ee}};(0,s._)([(0,f.MZ)({type:["x-ray"],readOnly:!0,json:{write:{isRequired:!0}}})],Re.prototype,"type",void 0),Re=Ee=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterModeXRay")],Re);const Ne=Re;var ke;const qe={nonNullable:!0,types:{key:"type",base:Ae,typeMap:{solid:Te,"wire-frame":Le,"x-ray":Ne}},json:{read:e=>{switch(e?.type){case"solid":return Te.fromJSON(e);case"wireFrame":return Le.fromJSON(e);case"x-ray":return Ne.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let Be=ke=class extends pe.A{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new Te,this.title=""}clone(){return new ke({filterExpression:this.filterExpression,filterMode:(0,l.o8)(this.filterMode),title:this.title})}};(0,s._)([(0,f.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"filterExpression",void 0),(0,s._)([(0,f.MZ)(qe)],Be.prototype,"filterMode",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Be.prototype,"title",void 0),Be=ke=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilterBlock")],Be);const $e=Be;var Ce;const Ue=i.A.ofType($e);let Qe=Ce=class extends pe.A{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=(0,de.lk)(),this.name=null}clone(){return new Ce({description:this.description,filterBlocks:(0,l.o8)(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:(0,l.o8)(this.filterAuthoringInfo)})}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Qe.prototype,"description",void 0),(0,s._)([(0,f.MZ)({type:Ue,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"filterBlocks",void 0),(0,s._)([(0,f.MZ)({types:{key:"type",base:ye,typeMap:{checkbox:Se}},json:{read:e=>"checkbox"===e?.type?Se.fromJSON(e):null,write:!0}})],Qe.prototype,"filterAuthoringInfo",void 0),(0,s._)([(0,f.MZ)({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"id",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Qe.prototype,"name",void 0),Qe=Ce=(0,s._)([(0,g.$)("esri.layers.support.BuildingFilter")],Qe);let Je=class extends pe.A{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};(0,s._)([(0,f.MZ)({type:String})],Je.prototype,"fieldName",void 0),(0,s._)([(0,f.MZ)({type:String})],Je.prototype,"modelName",void 0),(0,s._)([(0,f.MZ)({type:String})],Je.prototype,"label",void 0),(0,s._)([(0,f.MZ)({type:Number})],Je.prototype,"min",void 0),(0,s._)([(0,f.MZ)({type:Number})],Je.prototype,"max",void 0),(0,s._)([(0,f.MZ)({json:{read:e=>Array.isArray(e)&&(e.every(e=>"string"==typeof e)||e.every(e=>"number"==typeof e))?e.slice():null}})],Je.prototype,"mostFrequentValues",void 0),(0,s._)([(0,f.MZ)({type:[Number]})],Je.prototype,"subLayerIds",void 0),Je=(0,s._)([(0,g.$)("esri.layers.support.BuildingSummaryStatistics.BuildingFieldStatistics")],Je);let De=class extends(S.A.LoadableMixin(Z.A.EsriPromiseMixin(pe.A))){constructor(e){super(e),this.url=null,this.customParameters=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(p.A.getLogger(this).error("building summary statistics are not loaded"),null)}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await(0,w.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};(0,s._)([(0,f.MZ)({constructOnly:!0,type:String})],De.prototype,"url",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],De.prototype,"customParameters",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],De.prototype,"apiKey",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:[Je],json:{read:{source:"summary"}}})],De.prototype,"fields",null),De=(0,s._)([(0,g.$)("esri.layers.support.BuildingSummaryStatistics")],De);var Ke=r(24212);const Ge=i.A.ofType(Qe),Ve=(0,l.o8)(ee.sublayersProperty),ze=Ve.json?.origins;ze&&(ze["web-scene"]={type:[z],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},ze["portal-item"]={type:[z],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}});let Xe=class extends((0,le.w6)((0,se.b)((0,oe.q)((0,ne.A)((0,ae.j)((0,d.P)((0,ie.d)((0,re.p)(b.A))))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this._allSublayerOverrides=null,this.filters=new Ge,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.legendEnabled=!0,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e??{}}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const s=ee.readSublayers(e,t,r);return ee.forEachSublayer(s,e=>e.layer=this),this._allSublayerOverrides&&(function(e,t){t.forEach(t=>He(e,t))}(s,this._allSublayerOverrides),this._allSublayerOverrides=null),s}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?function(e,t,r){const s=[];ee.forEachSublayer(e,e=>{const t=e.write({},r);Object.keys(t).length>1&&s.push(t)}),s.length>0&&(t.sublayers=s)}(this.sublayers,e,t):this._allSublayerOverrides&&function(e,t,r){const s=r?.origin&&e.get(r.origin);s&&(t.sublayers=[],s.overrides.forEach(e=>{t.sublayers.push((0,l.o8)(e))}))}(this._allSublayerOverrides,e,t)),e}read(e,t){if(super.read(e,t),("web-scene"===t?.origin||"portal-item"===t?.origin)&&Array.isArray(e?.sublayers)){const r=function(e,t){const r=new Map;for(const s of e)null!=s&&"object"==typeof s&&"number"==typeof s.id?r.set(s.id,s):t.messages?.push(new n.A("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:s}));return{overrides:r,context:t}}(e.sublayers,t);this.sublayers?He(this.sublayers,r):(this._allSublayerOverrides??=new Map,this._allSublayerOverrides.set(t.origin,r))}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef&&this.parsedUrl){const e=(0,h.fj)(this.parsedUrl.path,t.statisticsHRef);return new De({url:e,apiKey:this.apiKey,customParameters:this.customParameters})}return null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP).then(()=>this._fetchService(t)).then(()=>this._fetchAssociatedFeatureService(t));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return(0,u.g)(this,e=>{ee.forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}),this.summaryStatistics&&e(this.summaryStatistics)})}async saveAs(e,t){return this._debouncedSaveOperations(le.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(le.Xh.SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new n.A("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}async _fetchAssociatedFeatureService(e){try{const{portalItem:t}=await(0,ue.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e});this.associatedFeatureServiceItem=t}catch(e){(0,c.QZ)(this._logWarningOnPopupEnabled())}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles((0,a.rE)(e)),await(0,y.C_)(()=>this.allSublayers.filter(e=>"building-component"===e.type).some(e=>e.popupEnabled&&null!=e.popupTemplate),e.signal);const t=this.allSublayers.filter(e=>"building-component"===e.type).filter(e=>e.popupEnabled&&null!=e.popupTemplate),r=[],s=[];for(const e of t){const t=e.title??`untitled ${e.id}`;e.attributeStorageInfo?r.push(t):s.push(t)}const i="\n ",o=r.length>0?`\nThe following sublayers will fall back to binary attributes for Popups:${i}${r.join(i)}`:"",n=s.length>0?`\nThe following sublayers have no binary attributes and will not work with Popups:${i}${s.join(i)}`:"";p.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded for this BuildingSceneLayer: ${this.title}.`,o,n)}_validateElevationInfo(e){const t="Building scene layers";(0,Ke.XF)(p.A.getLogger(this),(0,Ke.B)(t,"absolute-height",e)),(0,Ke.XF)(p.A.getLogger(this),(0,Ke.tW)(t,e))}};function He(e,t){const{overrides:r,context:s}=t;ee.forEachSublayer(e,e=>e.read(r.get(e.id),s))}(0,s._)([(0,f.MZ)({type:["BuildingSceneLayer"]})],Xe.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],Xe.prototype,"allSublayers",void 0),(0,s._)([(0,f.MZ)(Ve)],Xe.prototype,"sublayers",void 0),(0,s._)([(0,m.w)("service","sublayers")],Xe.prototype,"readSublayers",null),(0,s._)([(0,f.MZ)({type:Ge,nonNullable:!0,json:{write:!0}})],Xe.prototype,"filters",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Xe.prototype,"activeFilterId",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:De})],Xe.prototype,"summaryStatistics",void 0),(0,s._)([(0,m.w)("summaryStatistics",["statisticsHRef"])],Xe.prototype,"readSummaryStatistics",null),(0,s._)([(0,f.MZ)({type:[String],json:{read:!1}})],Xe.prototype,"outFields",void 0),(0,s._)([(0,f.MZ)(j.Fm)],Xe.prototype,"fullExtent",void 0),(0,s._)([(0,f.MZ)(j.fV)],Xe.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:["show","hide","hide-children"]})],Xe.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)((0,j.Qo)(_.A))],Xe.prototype,"spatialReference",void 0),(0,s._)([(0,f.MZ)(j.Yj)],Xe.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)({json:{read:!1},readOnly:!0})],Xe.prototype,"type",void 0),(0,s._)([(0,f.MZ)()],Xe.prototype,"associatedFeatureServiceItem",void 0),Xe=(0,s._)([(0,g.$)("esri.layers.BuildingSceneLayer")],Xe);const Ye=Xe},91880:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),o=r(66552),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=class extends n.A{static{s=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],p)},92935:(e,t,r)=>{var s;r.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);