@arcgis/core 4.32.0-next.20250121 → 4.32.0-next.20250122
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.
- package/WebLinkChart.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/assets/esri/core/t9n/Units_ar.json +1 -1
- package/assets/esri/core/t9n/Units_bg.json +1 -1
- package/assets/esri/core/t9n/Units_bs.json +1 -1
- package/assets/esri/core/t9n/Units_ca.json +1 -1
- package/assets/esri/core/t9n/Units_cs.json +1 -1
- package/assets/esri/core/t9n/Units_da.json +1 -1
- package/assets/esri/core/t9n/Units_de.json +1 -1
- package/assets/esri/core/t9n/Units_el.json +1 -1
- package/assets/esri/core/t9n/Units_es.json +1 -1
- package/assets/esri/core/t9n/Units_et.json +1 -1
- package/assets/esri/core/t9n/Units_fi.json +1 -1
- package/assets/esri/core/t9n/Units_fr.json +1 -1
- package/assets/esri/core/t9n/Units_he.json +1 -1
- package/assets/esri/core/t9n/Units_hr.json +1 -1
- package/assets/esri/core/t9n/Units_hu.json +1 -1
- package/assets/esri/core/t9n/Units_id.json +1 -1
- package/assets/esri/core/t9n/Units_it.json +1 -1
- package/assets/esri/core/t9n/Units_ja.json +1 -1
- package/assets/esri/core/t9n/Units_ko.json +1 -1
- package/assets/esri/core/t9n/Units_lt.json +1 -1
- package/assets/esri/core/t9n/Units_lv.json +1 -1
- package/assets/esri/core/t9n/Units_nl.json +1 -1
- package/assets/esri/core/t9n/Units_no.json +1 -1
- package/assets/esri/core/t9n/Units_pl.json +1 -1
- package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
- package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
- package/assets/esri/core/t9n/Units_ro.json +1 -1
- package/assets/esri/core/t9n/Units_ru.json +1 -1
- package/assets/esri/core/t9n/Units_sk.json +1 -1
- package/assets/esri/core/t9n/Units_sl.json +1 -1
- package/assets/esri/core/t9n/Units_sr.json +1 -1
- package/assets/esri/core/t9n/Units_sv.json +1 -1
- package/assets/esri/core/t9n/Units_th.json +1 -1
- package/assets/esri/core/t9n/Units_tr.json +1 -1
- package/assets/esri/core/t9n/Units_uk.json +1 -1
- package/assets/esri/core/t9n/Units_vi.json +1 -1
- package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
- package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
- package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/03b94362ed2a45ee5ea3.js +1 -0
- package/assets/esri/core/workers/chunks/0446f2ffad255cd40272.js +1 -0
- package/assets/esri/core/workers/chunks/059119f1731c2103c91c.js +1 -0
- package/assets/esri/core/workers/chunks/05e58286f8015dba6768.js +1 -0
- package/assets/esri/core/workers/chunks/060414956bf316529c48.js +1 -0
- package/assets/esri/core/workers/chunks/{f8e188af5608293d5b2b.js → 07bff9e742f3e5877f3f.js} +1 -1
- package/assets/esri/core/workers/chunks/{6400f39a965900f66ce7.js → 083c73428945fb3d4558.js} +1 -1
- package/assets/esri/core/workers/chunks/0d3154b90bc3fd7e6b4c.js +1 -0
- package/assets/esri/core/workers/chunks/0ec2ae595fa22998ffea.js +1 -0
- package/assets/esri/core/workers/chunks/{105dcc7b7284b1e965b7.js → 15c5b1dd8f398f641f6e.js} +1 -1
- package/assets/esri/core/workers/chunks/163451124c66a7a0bcdc.js +1 -0
- package/assets/esri/core/workers/chunks/17cc6638a510da164f58.js +1 -0
- package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +1 -0
- package/assets/esri/core/workers/chunks/1e9349411af082ec03d0.js +1 -0
- package/assets/esri/core/workers/chunks/1eb47cfca815ac432cf5.js +1 -0
- package/assets/esri/core/workers/chunks/{82266ca8002554198208.js → 20e7fae0c173807ba9a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{af0b0a7eedebcf99d05d.js → 2118e9ffb24178ed7f59.js} +1 -1
- package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +1 -0
- package/assets/esri/core/workers/chunks/21c3882a282a4755e032.js +1 -0
- package/assets/esri/core/workers/chunks/{435c037ccba71f1e22d3.js → 2488a0da3be64b0a26f4.js} +1 -1
- package/assets/esri/core/workers/chunks/254fbd8055ae7a0bb393.js +1 -0
- package/assets/esri/core/workers/chunks/2d55eb8059a532ffcc56.js +1 -0
- package/assets/esri/core/workers/chunks/3034df78da56fe1c0535.js +1 -0
- package/assets/esri/core/workers/chunks/32a96ef30f4608f377d6.js +1 -0
- package/assets/esri/core/workers/chunks/{97d66b0d0ff1132966de.js → 33b2f59c2ec10b2a1034.js} +1 -1
- package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +1 -0
- package/assets/esri/core/workers/chunks/{17726b0ab1bf66185d66.js → 40efcdf03c5224e6c4f7.js} +1 -1
- package/assets/esri/core/workers/chunks/424c7788a708abbf9299.js +1 -0
- package/assets/esri/core/workers/chunks/484d99910d110830df76.js +1 -0
- package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js → 486969dba1dc99402172.js} +2 -2
- package/assets/esri/core/workers/chunks/{02b2175132c9720bc756.js → 48f4ba1a5bb692903d06.js} +1 -1
- package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +1 -0
- package/assets/esri/core/workers/chunks/{decd316936df1ad3fa65.js → 50b538c93696de5eda97.js} +1 -1
- package/assets/esri/core/workers/chunks/{de00150030003de05146.js → 52aea8a4f292a66f5cfa.js} +1 -1
- package/assets/esri/core/workers/chunks/56f0eb9802f5cf9ad0d9.js +1 -0
- package/assets/esri/core/workers/chunks/57ddd64f0c22274d87e0.js +1 -0
- package/assets/esri/core/workers/chunks/5b5be7eb139b153934f5.js +1 -0
- package/assets/esri/core/workers/chunks/{4af0674fabfc965f1660.js → 5b876743865ef91b5648.js} +1 -1
- package/assets/esri/core/workers/chunks/62b88350892198de5055.js +1 -0
- package/assets/esri/core/workers/chunks/{206194cf069ad4bcc3ad.js → 6adf4f3d807f1af1c7c1.js} +1 -1
- package/assets/esri/core/workers/chunks/6b1285db2d6695a87553.js +1 -0
- package/assets/esri/core/workers/chunks/6c425e1041bdeef32832.js +1 -0
- package/assets/esri/core/workers/chunks/6eb829a7959df2269b0e.js +1 -0
- package/assets/esri/core/workers/chunks/765b4aefce7c11bbcb1f.js +1 -0
- package/assets/esri/core/workers/chunks/{6d17488396583d83d9be.js → 79a265dc21e29d3fd888.js} +1 -1
- package/assets/esri/core/workers/chunks/7a9e1696dc6120df15b0.js +1 -0
- package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +1 -0
- package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +1 -0
- package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +1 -0
- package/assets/esri/core/workers/chunks/{ee5f43fbe4c2cc199e64.js → 8434cd16effc5efbf1bd.js} +1 -1
- package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +1 -0
- package/assets/esri/core/workers/chunks/{2779cf112299b612a73a.js → 875cb81f143ff8fe03b5.js} +1 -1
- package/assets/esri/core/workers/chunks/885814ef0e34c01a589f.js +1 -0
- package/assets/esri/core/workers/chunks/{e610dd938d30f75778bc.js → 8be2d16663a238de9438.js} +1 -1
- package/assets/esri/core/workers/chunks/91d5cb094a7051abb6c5.js +1 -0
- package/assets/esri/core/workers/chunks/93ba76749746871357e7.js +314 -0
- package/assets/esri/core/workers/chunks/991c597f27daa67158c5.js +1 -0
- package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +1 -0
- package/assets/esri/core/workers/chunks/{33eebe5cb22a03ae90c8.js → 9c88ce9b0020b6f9a37a.js} +1 -1
- package/assets/esri/core/workers/chunks/9df7bffadbe0b4aad442.js +1 -0
- package/assets/esri/core/workers/chunks/a0a056698f8227210f49.js +1 -0
- package/assets/esri/core/workers/chunks/a1cdd09968e11d95c701.js +1 -0
- package/assets/esri/core/workers/chunks/a28cb975974b99540432.js +1 -0
- package/assets/esri/core/workers/chunks/a29958273958c3e3e932.js +1 -0
- package/assets/esri/core/workers/chunks/{98da074899c82f0ded0b.js → af224962edae72b002fa.js} +1 -1
- package/assets/esri/core/workers/chunks/af2ed4c8ac238b932d89.js +1 -0
- package/assets/esri/core/workers/chunks/af75107f207b2ba01bb4.js +1 -0
- package/assets/esri/core/workers/chunks/b1661e6c76ef0800ffd6.js +1 -0
- package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +1 -0
- package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +1 -0
- package/assets/esri/core/workers/chunks/b846052b6f80ad6ada89.js +1 -0
- package/assets/esri/core/workers/chunks/{399e67ccb69a5b206354.js → c1fd87af3129873369fd.js} +1 -1
- package/assets/esri/core/workers/chunks/c473756f8785ab868ba5.js +1 -0
- package/assets/esri/core/workers/chunks/c5368ca97b7f7261967a.js +1 -0
- package/assets/esri/core/workers/chunks/c685991c9a30f7435933.js +1 -0
- package/assets/esri/core/workers/chunks/ca5bd71bc2c1b1b3f9d9.js +1 -0
- package/assets/esri/core/workers/chunks/ce1c89b5a10fb5a7bb49.js +1 -0
- package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +1 -0
- package/assets/esri/core/workers/chunks/d4760e583dfac95dc8a1.js +1 -0
- package/assets/esri/core/workers/chunks/de2ca2dc1b5d62c0d82e.js +1 -0
- package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +1 -0
- package/assets/esri/core/workers/chunks/e067cef3b3ac3af49b88.js +1 -0
- package/assets/esri/core/workers/chunks/e2775bcceb62fd0df41b.js +1 -0
- package/assets/esri/core/workers/chunks/{c81204ae663e58c7b689.js → e63ff8d57fd771413488.js} +1 -1
- package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +1 -0
- package/assets/esri/core/workers/chunks/{54c149f90bf94b797b36.js → ed30f46236da29c15430.js} +1 -1
- package/assets/esri/core/workers/chunks/f016205a8f1fb665d6dd.js +1 -0
- package/assets/esri/core/workers/chunks/f02119812ec852edda57.js +1 -0
- package/assets/esri/core/workers/chunks/f272070f0878cd3e39a4.js +1 -0
- package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +1 -0
- package/assets/esri/core/workers/chunks/{e4f4ad67d778dea5b956.js → f4f6f4933ca58438d7bc.js} +1 -1
- package/assets/esri/core/workers/chunks/fdc3d97510c6d43a8882.js +1 -0
- package/assets/esri/core/workers/chunks/fef135e55706d84d1947.js +1 -0
- package/assets/esri/core/workers/chunks/ff4107b4fd3d3ce24e84.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +24 -0
- package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +49 -24
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +4 -0
- package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
- package/editing/templateUtils.js +5 -0
- package/geometry/operators/projectOperator.d.ts +4 -0
- package/geometry/operators/shapePreservingProjectOperator.d.ts +4 -0
- package/geometry/operators/support/GeographicTransformation.d.ts +4 -0
- package/geometry/operators/support/GeographicTransformation.js +1 -1
- package/geometry/operators/support/GeographicTransformationStep.d.ts +4 -0
- package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
- package/geometry/support/GeographicTransformation.d.ts +2 -2
- package/geometry/support/GeographicTransformationStep.d.ts +2 -2
- package/interfaces.d.ts +522 -53
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/networks/support/utils.js +1 -1
- package/package.json +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +5 -0
- package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.d.ts +4 -0
- package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.js +5 -0
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates/featureTemplatesUtils.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/Locate.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageAreaMeasurement.js +5 -0
- package/widgets/OrientedImageryViewer/components/ImageDistanceMeasurement.js +5 -0
- package/widgets/OrientedImageryViewer/components/ImageMeasurement.js +5 -0
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +5 -0
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +5 -0
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0651586dc7bd2e8b34db.js +0 -1
- package/assets/esri/core/workers/chunks/077070295499b9bfabb6.js +0 -1
- package/assets/esri/core/workers/chunks/090cfc7f088a729afd47.js +0 -1
- package/assets/esri/core/workers/chunks/0d387baa64a89f88b1de.js +0 -1
- package/assets/esri/core/workers/chunks/134de9fa142129a43b1e.js +0 -1
- package/assets/esri/core/workers/chunks/16fa0a5f73ab67a8d3e4.js +0 -1
- package/assets/esri/core/workers/chunks/1797f62e9bf8f1ac8d13.js +0 -1
- package/assets/esri/core/workers/chunks/182722e2fe0a35c4d8db.js +0 -1
- package/assets/esri/core/workers/chunks/1b3215f3290fb2f07ab8.js +0 -1
- package/assets/esri/core/workers/chunks/1f4dd96aacf8c40a1120.js +0 -1
- package/assets/esri/core/workers/chunks/22748779ca94eda44de5.js +0 -1
- package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +0 -1
- package/assets/esri/core/workers/chunks/33a13544b9e5f4f20bce.js +0 -1
- package/assets/esri/core/workers/chunks/423329432fbf007c620b.js +0 -1
- package/assets/esri/core/workers/chunks/467bd3c0da9518a0058b.js +0 -1
- package/assets/esri/core/workers/chunks/4c1d11a91291b28a73be.js +0 -1
- package/assets/esri/core/workers/chunks/51fbbd082ca78e4417d9.js +0 -1
- package/assets/esri/core/workers/chunks/5c05c899f7e6f764fedd.js +0 -1
- package/assets/esri/core/workers/chunks/6c1470dc0bd4389d1a2d.js +0 -1
- package/assets/esri/core/workers/chunks/6e804ee2d96d4de85a5f.js +0 -1
- package/assets/esri/core/workers/chunks/712f0dd46932c544df68.js +0 -1
- package/assets/esri/core/workers/chunks/71e88c90e9f9a9bddcd8.js +0 -1
- package/assets/esri/core/workers/chunks/74ba752dfab8ea5b6d2a.js +0 -314
- package/assets/esri/core/workers/chunks/79903647d4ed16d9a402.js +0 -1
- package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +0 -1
- package/assets/esri/core/workers/chunks/7c98e4fcba1dc24eb788.js +0 -1
- package/assets/esri/core/workers/chunks/7d0fc25ce1f74adcfeb6.js +0 -1
- package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +0 -1
- package/assets/esri/core/workers/chunks/87ddc3d5d751d565cd97.js +0 -1
- package/assets/esri/core/workers/chunks/88bb55bca76f978c0aa3.js +0 -1
- package/assets/esri/core/workers/chunks/89198ca24466d939e4e8.js +0 -1
- package/assets/esri/core/workers/chunks/8cda8dbd95f0a78063a8.js +0 -1
- package/assets/esri/core/workers/chunks/8e0e5183c88a45fbfd8e.js +0 -1
- package/assets/esri/core/workers/chunks/90eea0c2435bb5d10460.js +0 -1
- package/assets/esri/core/workers/chunks/93c1541241f92fc07eaa.js +0 -1
- package/assets/esri/core/workers/chunks/964f2897794d8d71dcb7.js +0 -1
- package/assets/esri/core/workers/chunks/976daa00d35ee7f27a26.js +0 -1
- package/assets/esri/core/workers/chunks/99b4f146d0f1661a217c.js +0 -1
- package/assets/esri/core/workers/chunks/aa96a05b94ae642c1c9f.js +0 -1
- package/assets/esri/core/workers/chunks/b0055e7b2e840d478de8.js +0 -1
- package/assets/esri/core/workers/chunks/b1bf8ad629a6b8f4489a.js +0 -1
- package/assets/esri/core/workers/chunks/b1e3448ba51557ff6c13.js +0 -1
- package/assets/esri/core/workers/chunks/b30046a40bcfbec8abe4.js +0 -1
- package/assets/esri/core/workers/chunks/b538d02706a25bbbe2d0.js +0 -1
- package/assets/esri/core/workers/chunks/c436a112a3119ceabebf.js +0 -1
- package/assets/esri/core/workers/chunks/c690268f48bc84778b23.js +0 -1
- package/assets/esri/core/workers/chunks/c8a09db652389f0d254d.js +0 -1
- package/assets/esri/core/workers/chunks/c8a645601d041f411060.js +0 -1
- package/assets/esri/core/workers/chunks/cb3b7f83b3efb315bd14.js +0 -1
- package/assets/esri/core/workers/chunks/cdc5e4cd1214362e752a.js +0 -1
- package/assets/esri/core/workers/chunks/da5fc368eb5b3592d05e.js +0 -1
- package/assets/esri/core/workers/chunks/dae7e8357936466482fe.js +0 -1
- package/assets/esri/core/workers/chunks/dd935b6335c674b6f596.js +0 -1
- package/assets/esri/core/workers/chunks/ddd20894b5107b76b815.js +0 -1
- package/assets/esri/core/workers/chunks/df4d7f100222ea671730.js +0 -1
- package/assets/esri/core/workers/chunks/eb256e8488e341c4a6f2.js +0 -1
- package/assets/esri/core/workers/chunks/ebc0094355504ec09fb8.js +0 -1
- package/assets/esri/core/workers/chunks/f1b63f092e239f84b849.js +0 -1
- package/assets/esri/core/workers/chunks/f2126b79f41dc62cc576.js +0 -1
- package/assets/esri/core/workers/chunks/f3e0b0f07a622fcdd6ae.js +0 -1
- package/assets/esri/core/workers/chunks/f581aec77accce7411e0.js +0 -1
- package/assets/esri/core/workers/chunks/f877bcbd277a28154d82.js +0 -1
- package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +0 -1
- package/assets/esri/core/workers/chunks/feeb36ffdffb227c4353.js +0 -1
- package/widgets/support/templateUtils.js +0 -5
- /package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js.LICENSE.txt → 486969dba1dc99402172.js.LICENSE.txt} +0 -0
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5347],{52106:(e,t,i)=>{i.d(t,{A:()=>y});var r,s=i(90237),n=i(59456),o=i(13874),a=i(61147),l=i(69540),c=i(51447),h=i(25482),d=i(53966),u=i(36708),f=i(24326),p=i(10107),_=(i(44208),i(87811),i(40608)),m=i(65864);function g(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let v=r=class extends(l.A.ClonableMixin(h.A)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,f.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,c.eF)(d.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:h.A.isSerializable(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,u.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,u.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,s._)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,m.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,s._)([(0,p.MZ)({value:null})],v.prototype,"attributes",null),(0,s._)([(0,p.MZ)({value:null,types:n.yR,json:{read:m.rS}})],v.prototype,"geometry",null),(0,s._)([(0,p.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,s._)([(0,p.MZ)({type:o.A})],v.prototype,"popupTemplate",void 0),(0,s._)([(0,p.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,s._)([(0,p.MZ)({value:null,types:a.Es})],v.prototype,"symbol",null),(0,s._)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,s._)([(0,p.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=r=(0,s._)([(0,_.$)("esri.Graphic")],v);const y=v},13259:(e,t,i)=>{i.d(t,{H:()=>P,b:()=>E,c:()=>D,s:()=>C});var r=i(37585),s=i(48163),n=i(91829),o=i(79258),a=i(49255),l=i(76591),c=i(36782),h=i(47522),d=i(40268),u=i(63578),f=i(13755),p=i(93904),_=i(42398),m=i(35093),g=i(63365),v=i(26835),y=i(52587),x=i(20693),b=i(47286),w=i(81961),A=i(71988),T=i(20304),O=i(2597),R=i(85977),M=i(63761),S=i(59643),I=i(46540);const C={occludedFadeFactor:1};function E(e){const t=new R.N5,i=e.signedDistanceFieldEnabled;t.include(d.Q,e),t.vertex.include(l.rA,e);const{occlusionPass:s,output:E,oitPass:P}=e;if(s)return t.include(u.I,e),t;const{vertex:z,fragment:N}=t;t.include(y.Y6),t.include(_.A,e),t.include(c.g,e),t.include(f.y),N.include(v.W),N.include(g.a),t.varyings.add("vcolor","vec4"),t.varyings.add("vtc","vec2"),t.varyings.add("vsize","vec2");const B=E===a.V.Highlight,H=B&&e.occlusionTestEnabled;H&&t.varyings.add("voccluded","float"),z.uniforms.add(new A.E("viewport",((e,t)=>t.camera.fullViewport)),new b.G("screenOffset",((e,t)=>(0,r.hZ)(L,2*e.screenOffset[0]*t.camera.pixelRatio,2*e.screenOffset[1]*t.camera.pixelRatio))),new b.G("anchorPosition",(e=>D(e))),new A.E("materialColor",(e=>e.color)),new T.m("materialRotation",(e=>e.rotation))),(0,x.Nz)(z),i&&(z.uniforms.add(new A.E("outlineColor",(e=>e.outlineColor))),N.uniforms.add(new A.E("outlineColor",(e=>F(e)?e.outlineColor:n.uY)),new T.m("outlineSize",(e=>F(e)?e.outlineSize:0)))),e.horizonCullingEnabled&&z.uniforms.add(new w.V("pointDistanceSphere",((e,t)=>{const i=t.camera.eye,r=e.origin;return(0,n.fA)(r[0]-i[0],r[1]-i[1],r[2]-i[2],o.$O.radius)}))),e.pixelSnappingEnabled&&z.include(h.K),e.hasScreenSizePerspective&&((0,y.pM)(z),(0,y.OH)(z)),e.debugDrawLabelBorder&&t.varyings.add("debugBorderCoords","vec4"),t.attributes.add(I.r.UV0,"vec2"),t.attributes.add(I.r.COLOR,"vec4"),t.attributes.add(I.r.SIZE,"vec2"),t.attributes.add(I.r.ROTATION,"float"),t.attributes.add(I.r.FEATUREATTRIBUTE,"vec4"),z.code.add(e.horizonCullingEnabled?O.H`bool behindHorizon(vec3 posModel) {
|
|
2
|
-
vec3 camToEarthCenter = pointDistanceSphere.xyz - localOrigin;
|
|
3
|
-
vec3 camToPos = pointDistanceSphere.xyz + posModel;
|
|
4
|
-
float earthRadius = pointDistanceSphere.w;
|
|
5
|
-
float a = dot(camToPos, camToPos);
|
|
6
|
-
float b = dot(camToPos, camToEarthCenter);
|
|
7
|
-
float c = dot(camToEarthCenter, camToEarthCenter) - earthRadius * earthRadius;
|
|
8
|
-
return b > 0.0 && b < a && b * b > a * c;
|
|
9
|
-
}`:O.H`bool behindHorizon(vec3 posModel) { return false; }`),z.main.add(O.H`
|
|
10
|
-
ProjectHUDAux projectAux;
|
|
11
|
-
vec4 posProj = projectPositionHUD(projectAux);
|
|
12
|
-
forwardObjectAndLayerIdColor();
|
|
13
|
-
|
|
14
|
-
if (rejectBySlice(projectAux.posModel)) {
|
|
15
|
-
// Project outside of clip plane
|
|
16
|
-
gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (behindHorizon(projectAux.posModel)) {
|
|
21
|
-
// Project outside of clip plane
|
|
22
|
-
gl_Position = vec4(1e038, 1e038, 1e038, 1.0);
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
vec2 inputSize;
|
|
27
|
-
${(0,O.If)(e.hasScreenSizePerspective,O.H`
|
|
28
|
-
inputSize = screenSizePerspectiveScaleVec2(size, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspective);
|
|
29
|
-
vec2 screenOffsetScaled = screenSizePerspectiveScaleVec2(screenOffset, projectAux.absCosAngle, projectAux.distanceToCamera, screenSizePerspectiveAlignment);`,O.H`
|
|
30
|
-
inputSize = size;
|
|
31
|
-
vec2 screenOffsetScaled = screenOffset;`)}
|
|
32
|
-
${(0,O.If)(e.vvSize,O.H`inputSize *= vvScale(featureAttribute).xx;`)}
|
|
33
|
-
|
|
34
|
-
vec2 combinedSize = inputSize * pixelRatio;
|
|
35
|
-
vec4 quadOffset = vec4(0.0);
|
|
36
|
-
|
|
37
|
-
${(0,O.If)(e.occlusionTestEnabled,O.H`
|
|
38
|
-
bool visible = testHUDVisibility(posProj);
|
|
39
|
-
if (!visible) {
|
|
40
|
-
vtc = vec2(0.0);
|
|
41
|
-
${(0,O.If)(e.debugDrawLabelBorder,"debugBorderCoords = vec4(0.5, 0.5, 1.5 / combinedSize);")}
|
|
42
|
-
return;
|
|
43
|
-
}`)}
|
|
44
|
-
${(0,O.If)(H,O.H`voccluded = visible ? 0.0 : 1.0;`)}
|
|
45
|
-
`);const j=O.H`
|
|
46
|
-
vec2 uv01 = floor(uv0);
|
|
47
|
-
vec2 uv = uv0 - uv01;
|
|
48
|
-
quadOffset.xy = (uv01 - anchorPosition) * 2.0 * combinedSize;
|
|
49
|
-
|
|
50
|
-
${(0,O.If)(e.hasRotation,O.H`
|
|
51
|
-
float angle = radians(materialRotation + rotation);
|
|
52
|
-
float cosAngle = cos(angle);
|
|
53
|
-
float sinAngle = sin(angle);
|
|
54
|
-
mat2 rotate = mat2(cosAngle, -sinAngle, sinAngle, cosAngle);
|
|
55
|
-
|
|
56
|
-
quadOffset.xy = rotate * quadOffset.xy;
|
|
57
|
-
`)}
|
|
58
|
-
|
|
59
|
-
quadOffset.xy = (quadOffset.xy + screenOffsetScaled) / viewport.zw * posProj.w;
|
|
60
|
-
`,V=e.pixelSnappingEnabled?i?O.H`posProj = alignToPixelOrigin(posProj, viewport.zw) + quadOffset;`:O.H`posProj += quadOffset;
|
|
61
|
-
if (inputSize.x == size.x) {
|
|
62
|
-
posProj = alignToPixelOrigin(posProj, viewport.zw);
|
|
63
|
-
}`:O.H`posProj += quadOffset;`;z.main.add(O.H`
|
|
64
|
-
${j}
|
|
65
|
-
${e.vvColor?"vcolor = interpolateVVColor(featureAttribute.y) * materialColor;":"vcolor = color / 255.0 * materialColor;"}
|
|
66
|
-
|
|
67
|
-
${(0,O.If)(E===a.V.ObjectAndLayerIdColor,O.H`vcolor.a = 1.0;`)}
|
|
68
|
-
|
|
69
|
-
bool alphaDiscard = vcolor.a < ${O.H.float(m.Q)};
|
|
70
|
-
${(0,O.If)(i,`alphaDiscard = alphaDiscard && outlineColor.a < ${O.H.float(m.Q)};`)}
|
|
71
|
-
if (alphaDiscard) {
|
|
72
|
-
// "early discard" if both symbol color (= fill) and outline color (if applicable) are transparent
|
|
73
|
-
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
74
|
-
return;
|
|
75
|
-
} else {
|
|
76
|
-
${V}
|
|
77
|
-
gl_Position = posProj;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
vtc = uv;
|
|
81
|
-
|
|
82
|
-
${(0,O.If)(e.debugDrawLabelBorder,O.H`debugBorderCoords = vec4(uv01, 1.5 / combinedSize);`)}
|
|
83
|
-
vsize = inputSize;
|
|
84
|
-
`),N.uniforms.add(new M.N("tex",(e=>e.texture))),e.occludedFragmentFade&&(N.uniforms.add(new M.N("depthMap",((e,t)=>t.mainDepth))),N.uniforms.add(new T.m("fadeFactor",(()=>C.occludedFadeFactor))));const U=e.debugDrawLabelBorder?O.H`(isBorder > 0.0 ? 0.0 : ${O.H.float(m.Q)})`:O.H.float(m.Q),G=O.H`
|
|
85
|
-
${(0,O.If)(e.debugDrawLabelBorder,O.H`float isBorder = float(any(lessThan(debugBorderCoords.xy, debugBorderCoords.zw)) || any(greaterThan(debugBorderCoords.xy, 1.0 - debugBorderCoords.zw)));`)}
|
|
86
|
-
|
|
87
|
-
${(0,O.If)(e.sampleSignedDistanceFieldTexelCenter,O.H`
|
|
88
|
-
float txSize = float(textureSize(tex, 0).x);
|
|
89
|
-
float texelSize = 1.0 / txSize;
|
|
90
|
-
|
|
91
|
-
// Calculate how much we have to add/subtract to/from each texel to reach the size of an onscreen pixel
|
|
92
|
-
vec2 scaleFactor = (vsize - txSize) * texelSize;
|
|
93
|
-
vec2 samplePos = vtc + (vec2(1.0, -1.0) * texelSize) * scaleFactor;`,O.H`vec2 samplePos = vtc;`)}
|
|
94
|
-
|
|
95
|
-
${i?O.H`
|
|
96
|
-
vec4 fillPixelColor = vcolor;
|
|
97
|
-
|
|
98
|
-
// Get distance and map it into [-0.5, 0.5]
|
|
99
|
-
float d = rgbaTofloat(texture(tex, samplePos)) - 0.5;
|
|
100
|
-
|
|
101
|
-
// Distance in output units (i.e. pixels)
|
|
102
|
-
float dist = d * vsize.x;
|
|
103
|
-
|
|
104
|
-
// Create smooth transition from the icon into its outline
|
|
105
|
-
float fillAlphaFactor = clamp(0.5 - dist, 0.0, 1.0);
|
|
106
|
-
fillPixelColor.a *= fillAlphaFactor;
|
|
107
|
-
|
|
108
|
-
if (outlineSize > 0.25) {
|
|
109
|
-
vec4 outlinePixelColor = outlineColor;
|
|
110
|
-
float clampedOutlineSize = min(outlineSize, 0.5*vsize.x);
|
|
111
|
-
|
|
112
|
-
// Create smooth transition around outline
|
|
113
|
-
float outlineAlphaFactor = clamp(0.5 - (abs(dist) - 0.5*clampedOutlineSize), 0.0, 1.0);
|
|
114
|
-
outlinePixelColor.a *= outlineAlphaFactor;
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
outlineAlphaFactor + fillAlphaFactor < ${U} ||
|
|
118
|
-
fillPixelColor.a + outlinePixelColor.a < ${O.H.float(m.Q)}
|
|
119
|
-
) {
|
|
120
|
-
discard;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// perform un-premultiplied over operator (see https://en.wikipedia.org/wiki/Alpha_compositing#Description)
|
|
124
|
-
float compositeAlpha = outlinePixelColor.a + fillPixelColor.a * (1.0 - outlinePixelColor.a);
|
|
125
|
-
vec3 compositeColor = vec3(outlinePixelColor) * outlinePixelColor.a +
|
|
126
|
-
vec3(fillPixelColor) * fillPixelColor.a * (1.0 - outlinePixelColor.a);
|
|
127
|
-
|
|
128
|
-
${(0,O.If)(!B,O.H`fragColor = vec4(compositeColor, compositeAlpha);`)}
|
|
129
|
-
} else {
|
|
130
|
-
if (fillAlphaFactor < ${U}) {
|
|
131
|
-
discard;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
${(0,O.If)(!B,O.H`fragColor = premultiplyAlpha(fillPixelColor);`)}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// visualize SDF:
|
|
138
|
-
// fragColor = vec4(clamp(-dist/vsize.x*2.0, 0.0, 1.0), clamp(dist/vsize.x*2.0, 0.0, 1.0), 0.0, 1.0);
|
|
139
|
-
`:O.H`
|
|
140
|
-
vec4 texColor = texture(tex, vtc, -0.5);
|
|
141
|
-
if (texColor.a < ${U}) {
|
|
142
|
-
discard;
|
|
143
|
-
}
|
|
144
|
-
${(0,O.If)(!B,O.H`fragColor = texColor * premultiplyAlpha(vcolor);`)}
|
|
145
|
-
`}
|
|
146
|
-
|
|
147
|
-
${(0,O.If)(e.occludedFragmentFade&&!B,O.H`
|
|
148
|
-
float zSample = texelFetch(depthMap, ivec2(gl_FragCoord.xy), 0).x;
|
|
149
|
-
if (zSample < gl_FragCoord.z) {
|
|
150
|
-
fragColor *= fadeFactor;
|
|
151
|
-
}
|
|
152
|
-
`)}
|
|
153
|
-
|
|
154
|
-
${(0,O.If)(!B&&e.debugDrawLabelBorder,O.H`fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), isBorder * 0.5);`)}
|
|
155
|
-
`;switch(E){case a.V.Color:case a.V.ColorEmission:t.outputs.add("fragColor","vec4",0),E===a.V.ColorEmission&&t.outputs.add("fragEmission","vec4",1),P===S.Y.ColorAlpha&&t.outputs.add("fragAlpha","float",E===a.V.ColorEmission?2:1),N.main.add(O.H`
|
|
156
|
-
${G}
|
|
157
|
-
${(0,O.If)(P===S.Y.FrontFace,O.H`fragColor.rgb /= fragColor.a;`)}
|
|
158
|
-
${(0,O.If)(E===a.V.ColorEmission,O.H`fragEmission = vec4(0.0);`)}
|
|
159
|
-
${(0,O.If)(P===S.Y.ColorAlpha,O.H`fragAlpha = fragColor.a;`)}`);break;case a.V.ObjectAndLayerIdColor:N.main.add(O.H`
|
|
160
|
-
${G}
|
|
161
|
-
outputObjectAndLayerIdColor();`);break;case a.V.Highlight:t.include(p.Q,e),N.main.add(O.H`
|
|
162
|
-
${G}
|
|
163
|
-
outputHighlight(${(0,O.If)(H,O.H`voccluded == 1.0`,O.H`false`)});`)}return t}function F(e){return e.outlineColor[3]>0&&e.outlineSize>0}function D(e,t=L){return e.textureIsSignedDistanceField?function(e,t,i){null!=t?(0,r.hZ)(i,e[0]*(t[2]-t[0])+t[0],e[1]*(t[3]-t[1])+t[1]):(0,r.hZ)(i,0,0)}(e.anchorPosition,e.distanceFieldBoundingBox,t):(0,r.C)(t,e.anchorPosition),t}const L=(0,s.vt)(),P=Object.freeze(Object.defineProperty({__proto__:null,build:E,calculateAnchorPosForRendering:D,shaderSettings:C},Symbol.toStringTag,{value:"Module"}))},4902:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(90237),s=i(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};var c;l=(0,r._)([(0,s.$)("esri.core.Identifiable")],l),(c=l||(l={})).IdentifiableMixin=o,c.NumericIdentifiableMixin=a;const h=l},66344:(e,t,i)=>{i.d(t,{q:()=>l});var r,s,n=i(3694);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.A,this._users=new n.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear()}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,s,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,r.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new a(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){let s;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,r,i);return"number"==typeof e&&(s=e),!0}return!1})),s}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const i=e?.id;let r=!0;for(;r;){r=!1;for(const[s,n]of this._db)if(0===n.lifetime&&(!i||s.startsWith(i))){if(this._purgeItem(s,n,e),t.size<=.9*t.maxSize)return;r||=this._db.has(s)}}for(const[r,s]of this._db)if((!i||r.startsWith(i))&&(this._purgeItem(r,s,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}class l{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999:(e,t,i)=>{i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>h,UT:()=>_,jJ:()=>c});var r=i(90237),s=i(69622),n=i(97768),o=i(74887),a=i(10107),l=i(40608);function c(e,t,i){return(0,o.Lx)(e.map(((e,r)=>t.apply(i,[e,r]))))}async function h(e,t,i){return(await(0,o.Lx)(e.map(((e,r)=>t.apply(i,[e,r]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function u(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return u(e)}}async function p(e){try{return d(await e)}catch(e){return(0,o.QP)(e),u(e)}}function _(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=u(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r._)([(0,a.MZ)()],m.prototype,"value",null),(0,r._)([(0,a.MZ)()],m.prototype,"error",null),(0,r._)([(0,a.MZ)()],m.prototype,"finished",null),(0,r._)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,r._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},72385:(e,t,i)=>{function r(){return new Float32Array(3)}function s(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function n(e,t,i){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=i,r}function o(){return r()}function a(){return n(1,1,1)}function l(){return n(1,0,0)}function c(){return n(0,1,0)}function h(){return n(0,0,1)}i.d(t,{fA:()=>n,o8:()=>s,vt:()=>r});const d=o(),u=a(),f=l(),p=c(),_=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:f,UNIT_Y:p,UNIT_Z:_,ZEROS:d,clone:s,create:r,createView:function(e,t){return new Float32Array(e,t,3)},fromValues:n,ones:a,unitX:l,unitY:c,unitZ:h,zeros:o},Symbol.toStringTag,{value:"Module"}))},75503:(e,t,i)=>{i.d(t,{E:()=>O,w:()=>a});var r=i(4576),s=i(21818),n=(i(44208),i(3694)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=u,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),A.prune(),T.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const r=this._toBBox;if(y(e,i))for(b.clear();i;){for(let s=0,n=i.children.length;s<n;s++){const n=i.children[s],o=i.leaf?r(n):n;y(e,o)&&(i.leaf?t(n):v(e,o)?l(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!y(e,t))return!1;for(b.clear();t;){for(let r=0,s=t.children.length;r<s;r++){const s=t.children[r],n=t.leaf?i(s):s;if(y(e,n)){if(t.leaf||v(e,n))return!0;b.push(s)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new M([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(A.clear(),T.clear();i||A.length>0;){if(i||(i=A.pop(),n=A.data[A.length-1],o=T.pop()??0,a=!0),i.leaf&&(t=(0,r.qh)(i.children,(0,s.zI)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),A.push(i),this._condense(A),this;a||i.leaf||!v(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(A.push(i),T.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,r){const s=i-t+1;let n=this._maxEntries;if(s<=n){const r=new M(e.slice(t,i+1));return c(r,this._toBBox),r}r||(r=Math.ceil(Math.log(s)/Math.log(n)),n=Math.ceil(s/n**(r-1)));const o=new S([]);o.height=r;const a=Math.ceil(s/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,i,l,this._compareMinX);for(let s=t;s<=i;s+=l){const t=Math.min(s+l-1,i);x(e,s,t,a,this._compareMinY);for(let i=s;i<=t;i+=a){const s=Math.min(i+a-1,t);o.children.push(this._build(e,i,s,r-1))}}return c(o,this._toBBox),o}_insert(e,t,i){const r=this._toBBox,s=i?e:r(e);A.clear();const n=function(e,t,i,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==i;){let i,r=1/0,s=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=m(e,o)-a;l<s?(s=l,r=a<r?a:r,i=o):l===s&&a<r&&(r=a,i=o)}t=i||t.children[0]}return t}(s,this._data,t,A);for(n.children.push(e),d(n,s);t>=0&&A.data[t].children.length>this._maxEntries;)this._split(A,t),t--;!function(e,t,i){for(let r=i;r>=0;r--)d(t.data[r],e)}(s,A,t)}_split(e,t){const i=e.data[t],r=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,r);const n=this._chooseSplitIndex(i,s,r);if(!n)return;const o=i.children.splice(n,i.children.length-n),a=i.leaf?new M(o):new S(o);a.height=i.height,c(i,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let r,s,n;r=s=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=g(t,a),c=p(t)+p(a);l<r?(r=l,n=o,s=c<s?c:s):l===r&&c<s&&(s=c,n=o)}return n}_chooseSplitAxis(e,t,i){const r=e.leaf?this._compareMinX:u,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,r)<this._allDistMargin(e,t,i,s)&&e.children.sort(r)}_allDistMargin(e,t,i,r){e.children.sort(r);const s=this._toBBox,n=h(e,0,t,s),o=h(e,i-t,i,s);let a=_(n)+_(o);for(let r=t;r<i-t;r++){const t=e.children[r];d(n,e.leaf?s(t):t),a+=_(n)}for(let r=i-t-1;r>=t;r--){const t=e.children[r];d(o,e.leaf?s(t):t),a+=_(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const s=e.data[t-1],n=s.children;n.splice((0,r.qh)(n,i,n.length,s.indexHint),1)}else this.clear();else c(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(w.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,s.zI)(e));else w.pushArray(i.children);i=w.pop()??null}}function c(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,r,s){s||(s=new M([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],d(s,e.leaf?r(n):n);return s}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,s-i)*Math.max(0,n-r)}function v(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,r,s){const n=[t,i];for(;n.length;){const t=n.pop(),i=n.pop();if(t-i<=r)continue;const a=i+Math.ceil((t-i)/r/2)*r;(0,o.q)(e,a,i,t,s),n.push(i,a,a,t)}}const b=new n.A,w=new n.A,A=new n.A,T=new n.A({deallocator:void 0});class O{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class R extends O{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class M extends R{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends R{constructor(e){super(),this.children=e,this.leaf=!1}}},95696:(e,t,i)=>{i.d(t,{A:()=>d});var r,s=i(90237),n=i(69540),o=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(93223)),c=i(40608);let h=r=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};h.absolute=new r,(0,s._)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],h.prototype,"type",void 0),(0,s._)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],h.prototype,"origin",void 0),h=r=(0,s._)([(0,c.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],h);const d=h},18251:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69540),n=i(25482),o=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),l=i(40608),c=i(51850);let h=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.type="local",this.origin=(0,c.vt)()}};(0,r._)([(0,a.e)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,o.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.$)("esri.geometry.support.MeshLocalVertexSpace")],h);const d=h},82919:(e,t,i)=>{i.d(t,{C:()=>g,vt:()=>m,ui:()=>v,m7:()=>y});var r=i(4341),s=i(58083),n=i(38954),o=i(51850),a=i(87317),l=i(91829),c=i(71351);function h(e){return e?{ray:(0,c.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I((()=>h()));var d,u,f,p=i(27921),_=i(32114);function m(e){return e?[(0,p.vt)(e[0]),(0,p.vt)(e[1]),(0,p.vt)(e[2]),(0,p.vt)(e[3]),(0,p.vt)(e[4]),(0,p.vt)(e[5])]:[(0,p.vt)(),(0,p.vt)(),(0,p.vt)(),(0,p.vt)(),(0,p.vt)(),(0,p.vt)()]}function g(e,t){for(let i=0;i<x;i++)(0,p.C)(e[i],t[i]);return e}function v(e,t,i,r=A){const o=(0,s.lw)(_.Rc.get(),t,e);(0,s.B8)(o,o);for(let e=0;e<b;++e){const t=(0,a.t)(_.Km.get(),w[e],o);(0,n.i)(r[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}!function(e,t){(0,p.Cr)(t[u.FAR_BOTTOM_LEFT],t[u.NEAR_BOTTOM_LEFT],t[u.NEAR_TOP_LEFT],e[d.LEFT]),(0,p.Cr)(t[u.NEAR_BOTTOM_RIGHT],t[u.FAR_BOTTOM_RIGHT],t[u.FAR_TOP_RIGHT],e[d.RIGHT]),(0,p.Cr)(t[u.FAR_BOTTOM_LEFT],t[u.FAR_BOTTOM_RIGHT],t[u.NEAR_BOTTOM_RIGHT],e[d.BOTTOM]),(0,p.Cr)(t[u.NEAR_TOP_LEFT],t[u.NEAR_TOP_RIGHT],t[u.FAR_TOP_RIGHT],e[d.TOP]),(0,p.Cr)(t[u.NEAR_BOTTOM_LEFT],t[u.NEAR_BOTTOM_RIGHT],t[u.NEAR_TOP_RIGHT],e[d.NEAR]),(0,p.Cr)(t[u.FAR_BOTTOM_RIGHT],t[u.FAR_BOTTOM_LEFT],t[u.FAR_TOP_LEFT],e[d.FAR])}(i,r)}function y(e,t){for(let i=0;i<x;i++){const r=e[i];if(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]>=t[3])return!1}return!0}(f=d||(d={}))[f.LEFT=0]="LEFT",f[f.RIGHT=1]="RIGHT",f[f.BOTTOM=2]="BOTTOM",f[f.TOP=3]="TOP",f[f.NEAR=4]="NEAR",f[f.FAR=5]="FAR",function(e){e[e.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",e[e.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",e[e.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",e[e.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",e[e.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",e[e.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",e[e.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",e[e.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(u||(u={})),u.FAR_BOTTOM_RIGHT,u.NEAR_BOTTOM_RIGHT,u.NEAR_BOTTOM_LEFT,u.FAR_BOTTOM_LEFT,u.NEAR_BOTTOM_LEFT,u.NEAR_BOTTOM_RIGHT,u.NEAR_TOP_RIGHT,u.NEAR_TOP_LEFT,u.FAR_BOTTOM_RIGHT,u.FAR_BOTTOM_LEFT,u.FAR_TOP_LEFT,u.FAR_TOP_RIGHT,u.NEAR_BOTTOM_RIGHT,u.FAR_BOTTOM_RIGHT,u.FAR_TOP_RIGHT,u.NEAR_TOP_RIGHT,u.FAR_BOTTOM_LEFT,u.NEAR_BOTTOM_LEFT,u.NEAR_TOP_LEFT,u.FAR_TOP_LEFT,u.FAR_TOP_LEFT,u.NEAR_TOP_LEFT,u.NEAR_TOP_RIGHT,u.FAR_TOP_RIGHT;const x=6,b=8,w=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],A=(new r.I(h),[(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,o.vt)()])},27615:(e,t,i)=>{i.d(t,{CK:()=>d,Hq:()=>h,MW:()=>u,TE:()=>f,yJ:()=>p});var r=i(51447),s=i(53966),n=i(38954),o=i(86738),a=i(95696),l=i(18251);function c(){return s.A.getLogger("esri.geometry.Mesh")}function h(e){return null!=e.origin}function d(e){return h(e.vertexSpace)}function u(e,t){if(!h(e))return null;const[i,r,s]=e.origin;return new o.A({x:i,y:r,z:s,spatialReference:t})}function f(e,t){const{x:i,y:s,z:n,spatialReference:o}=e,h=[i,s,n??0];return void 0!==t?.geographic&&((0,r.io)(c(),"option: geographic",{replacement:"Use the `vertexSpace` option instead.",version:"4.29",warnOnce:!0}),t.vertexSpace&&c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")),"local"===(t?.vertexSpace??(d=t?.geographic,null==d?void 0:d?"local":"georeferenced")??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(o))?new l.A({origin:h}):new a.A({origin:h});var d}function p(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,n.p)(e.origin,t.origin))}},47566:(e,t,i)=>{i(97770),i(18047),i(71754),i(73444);var r=i(10838),s=i(78888),n=i(49186);async function o(e){if(null!=l.fetchBundleAsset)return l.fetchBundleAsset(e);const t=await(0,s.A)(e,{responseType:"text"});return JSON.parse(t.data)}class a{constructor({base:e="",pattern:t,location:i=new URL(window.location.href)}){let r;r="string"==typeof i?e=>new URL(e,new URL(i,window.location.href)).href:i instanceof URL?e=>new URL(e,i).href:i,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=r,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,i,s){const a=t.exec(i);if(!a)throw new n.A("esri-intl:invalid-bundle",`Bundle id "${i}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],h=(0,r.xO)(s),d=`${l}${c}.json`,u=h?`${l}${c}_${h}.json`:d;let f;try{f=await o(e(u))}catch(t){if(u===d)throw new n.A("intl:unknown-bundle",`Bundle "${i}" cannot be loaded`,{error:t});try{f=await o(e(d))}catch(e){throw new n.A("intl:unknown-bundle",`Bundle "${i}" cannot be loaded`,{error:e})}}return f}(this.getAssetUrl,this.matcher,e,t)}}const l={};var c,h=i(2741);(0,r.ao)((c={pattern:"esri/",location:h.s},new a(c)))},18047:(e,t,i)=>{i.d(t,{ZV:()=>a});var r=i(73444);const s={ar:"ar-u-nu-latn"};let n=new WeakMap,o={};function a(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const i=(0,r.JK)(),o=s[(0,r.JK)()]||i;n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,r.Ml)((()=>{n=new WeakMap,o={}})),new Map},71754:(e,t,i)=>{i.d(t,{V:()=>c});var r=i(53966),s=i(93637),n=i(799),o=i(97770),a=i(18047);const l=()=>r.A.getLogger("esri.intl.substitute");function c(e,t,i={}){const{format:r={}}=i;return(0,n.HC)(e,(e=>function(e,t,i){let r,n;const o=e.indexOf(":");if(-1===o?r=e.trim():(r=e.slice(0,o).trim(),n=e.slice(o+1).trim()),!r)return"";const a=(0,s.wc)(r,t);if(null==a)return"";const l=(n?i?.[n]:null)??i?.[r];return l?h(a,l):n?d(a,n):u(a)}(e,t,r)))}function h(e,t){switch(t.type){case"date":return(0,o.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return l().warn("missing format descriptor for key {key}"),u(e)}}function d(e,t){switch(t.toLowerCase()){case"dateformat":return(0,o.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return l().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,o.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):u(e)}}function u(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,o.Yq)(e):""}}},31756:(e,t,i)=>{i.d(t,{j:()=>n});var r=i(83047),s=i(79258);const n={unknown:1,inches:(0,r.oU)(1,"meters","inches"),feet:(0,r.oU)(1,"meters","feet"),"us-feet":(0,r.oU)(1,"meters","us-feet"),yards:(0,r.oU)(1,"meters","yards"),miles:(0,r.oU)(1,"meters","miles"),"nautical-miles":(0,r.oU)(1,"meters","nautical-miles"),millimeters:(0,r.oU)(1,"meters","millimeters"),centimeters:(0,r.oU)(1,"meters","centimeters"),decimeters:(0,r.oU)(1,"meters","decimeters"),meters:(0,r.oU)(1,"meters","meters"),kilometers:(0,r.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.vl)(1,"meters",s.$O.radius)}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},83237:(e,t,i)=>{i.r(t),i.d(t,{default:()=>is});var r=i(90237),s=i(65529),n=i(74887),o=i(36708),a=i(10107),l=i(44208),c=i(53966),h=(i(87811),i(40608)),d=i(16930),u=i(19730),f=i(61956),p=i(69622),_=i(4576),m=i(60999),g=i(32587);let v=class extends p.A{constructor(e){super(e),this._removing=0,this._tiles=new g.A,this._wanted=new g.A}destroy(){for(const e of this._tiles.values())e.abort();this._tiles.clear(),this._wanted.clear()}get updating(){return this._removing>0||this._loadingCount>0}get _loadingCount(){let e=0;for(const t of this._tiles.values())t.isLoaded||++e;return e}async onTileTreeChange(e){const{added:t,removed:i}=e,r=this._tiles,s=this._wanted,n=[];for(const e of i){const{id:i}=e;if(s.delete(i),t.some((t=>y(t,e)||y(e,t))))continue;const o=r.get(i);null!=o&&(o.abort(),o.isLoaded&&n.push(i),r.delete(i))}for(const e of t){const{id:t}=e;s.set(t,e),r.has(t)||r.set(t,this._loadTile(e))}await this._removeTiles(n)}async _addTile(e,t){const i=await this.addTile(e,t);return(0,n.Te)(t),i}async _removeTiles(e){this._removing++,await this.removeTiles(e),this._removing--}_loadTile(e){const t=(0,m.UT)((t=>this._addTile(e,t))),i=new x(e,t);return(0,n.QZ)(this._onTileLoad(t.promise)),i}async _onTileLoad(e){await e;const t=this._tiles,i=this._wanted,r=new Map(i),s=Array.from(this._tiles.values()).map((e=>e.data)).filter(_.Ru);for(const e of s)r.delete(e.descriptor.id);const n=Array.from(r.values()),o=new Array;for(const e of t.values()){const{descriptor:t}=e;i.has(t.id)||n.some((e=>y(e,t)||y(t,e)))||o.push(t.id)}if(0!==o.length){for(const e of o)t.delete(e);await this._removeTiles(o)}}};function y({lij:[e,t,i]},{lij:[r,s,n]}){const o=r-e;return o>=0&&t===s>>o&&i===n>>o}(0,r._)([(0,a.MZ)()],v.prototype,"updating",null),(0,r._)([(0,a.MZ)({constructOnly:!0})],v.prototype,"addTile",void 0),(0,r._)([(0,a.MZ)({constructOnly:!0})],v.prototype,"removeTiles",void 0),(0,r._)([(0,a.MZ)()],v.prototype,"_removing",void 0),(0,r._)([(0,a.MZ)()],v.prototype,"_loadingCount",null),v=(0,r._)([(0,h.$)("esri.views.3d.layers.graphics.pipeline.Tile3DManager")],v);class x{constructor(e,t){this.descriptor=e,this._task=t}get id(){return this.descriptor.id}get data(){return this._task.value}get isLoaded(){return null!=this.data}abort(){this._task.abort()}}var b=i(69397);class w{constructor(e,t){this._tile=e,this._tileIndices=t}get id(){return this._tile.id}get featureCount(){return this._tileIndices?.length??this._tile.featureCount}get usedMemory(){return b.qK+(this._tileIndices?.byteLength??0)}get extent(){return this._tile.descriptor.extent}readObjectIds(e,t){const{_tileIndices:i,_tile:r}=this;return r.readObjectIds(e,i,t)}readCoordinates(e,t){const{_tileIndices:i,_tile:r}=this;return r.readCoordinates(e,i,t)}subset(e){const{_tileIndices:t,_tile:i}=this;if(null==t)return new w(i,e);const r=new Uint32Array(e.length);for(let i=0;i<r.length;++i)r[i]=t[e[i]];return new w(i,r)}}class A{constructor(){this._tileIdToFeatureData=new Map}add(e){this._tileIdToFeatureData.set(e.id,e)}remove(e){this._tileIdToFeatureData.delete(e)}get(e){return this._tileIdToFeatureData.get(e)}pop(e){const{_tileIdToFeatureData:t}=this,i=t.get(e);return t.delete(e),i}}var T=i(75503),O=i(27647),R=i(92722);class M{constructor(e,t){this._index=e,this._view=t}get usedMemory(){return b.qK+b.RS}getObjectId(){return this._view.getObjectId(this._index)}getAttribute(e){return this._view.getAttribute(this._index,e)}getAttributeAsTimestamp(e){return this._view.getAttributeAsTimestamp(this._index,e)}getAttributes(){return this._view.getAttributes(this._index)}getOptimizedGeometry(){return this._view.getOptimizedGeometry(this._index)}getCentroid(e){return this._view.getCentroid(this._index,e)}getBounds(){return this._view.getBounds(this._index)}getBoundingBox(){return this._view.getBoundingBox(this._index)}cloneWithGeometry(e){return new S(this._index,this._view,e)}}class S extends M{constructor(e,t,i){super(e,t),this._geometryOverride=i}getOptimizedGeometry(){return this._geometryOverride}getCentroid(e){return(0,O.Q)(new R.A,this._geometryOverride,e.hasZ,e.hasM)}}class I{constructor(){this._storedTiles=new Map,this._tileBounds=new Map,this.events=new s.A,this.featureAdapter=C.shared}get usedMemory(){return b.qK+b.qK*this._storedTiles.size+(b.qK+b.qK*this._tileBounds.size)}addTile(e){this._storedTiles.set(e.descriptor.id,e);const{featureCount:t}=e;if(0===t)return;const i=new T.w(9,(t=>e.getBounds(t))),r=new Array;for(let e=0;e<t;++e)r[e]=e;i.load(r),this._tileBounds.set(e,i),this.events.emit("changed")}removeTile(e){const t=this._storedTiles,i=t.get(e);null!=i&&(t.delete(e),this._tileBounds.delete(i),this.events.emit("changed"))}clear(){this._storedTiles.clear(),this._tileBounds.clear(),this.events.emit("changed")}forEach(e){for(const[t,i]of this._tileBounds)i.all((i=>e(new M(i,t))))}forEachInBounds(e,t){E.minX=e[0],E.minY=e[1],E.maxX=e[2],E.maxY=e[3];for(const[e,i]of this._tileBounds)i.search(E,(i=>t(new M(i,e))))}forEachBounds(e,t){for(const i of e)t(i.getBoundingBox())}getFullExtent(e){let t=1/0,i=1/0,r=-1/0,s=-1/0;for(const e of this._tileBounds.values()){const{minX:n,minY:o,maxX:a,maxY:l}=e.toJSON();t=Math.min(t,n),i=Math.min(i,o),r=Math.min(r,a),s=Math.min(s,l)}return{xmin:t,ymin:i,xmax:r,ymax:s,spatialReference:e}}}class C{getObjectId(e){return e.getObjectId()}getAttribute(e,t){return e.getAttribute(t)}getAttributeAsTimestamp(e,t){return e.getAttributeAsTimestamp(t)}getAttributes(e){return e.getAttributes()}getGeometry(e){return e.getOptimizedGeometry()}getCentroid(e,t){return e.getCentroid(t)}cloneWithGeometry(e,t){return e.cloneWithGeometry(t)}}C.shared=new C;const E=new T.E;var F=i(19419),D=i(80893);class L{constructor(e,t,i){this.descriptor=e,this._pageSize=t,this._pages=i,this.featureCount=i.reduce(((e,{featureCount:t})=>e+t),0);const r=b.ez+i.reduce(((e,{usedMemory:t})=>e+t),0),s=3*b.RS;this.usedMemory=b.qK+r+s}get id(){return this.descriptor.id}getObjectId(e){const{pageIndex:t,featurePageIndex:i}=this._translateIndex(e);return this._pages[t].getObjectId(i)}getAttribute(e,t){const{pageIndex:i,featurePageIndex:r}=this._translateIndex(e);return this._pages[i].getAttribute(r,t)}getAttributeAsTimestamp(e,t){const{pageIndex:i,featurePageIndex:r}=this._translateIndex(e);return this._pages[i].getAttributeAsTimestamp(r,t)}getAttributes(e){const{pageIndex:t,featurePageIndex:i}=this._translateIndex(e);return this._pages[t].getAttributes(i)}getCoordinates(e,t,i){const{pageIndex:r,featurePageIndex:s}=this._translateIndex(e);this._pages[r].getCoordinates(s,t,i)}getOptimizedGeometry(e){const{pageIndex:t,featurePageIndex:i}=this._translateIndex(e);return this._pages[t].getOptimizedGeometry(i)}getCentroid(e,t){const{pageIndex:i,featurePageIndex:r}=this._translateIndex(e);return this._pages[i].getCentroid(r,t)}getBounds(e){const{pageIndex:t,featurePageIndex:i}=this._translateIndex(e);return this._pages[t].getBounds(i)}getBoundingBox(e){const{pageIndex:t,featurePageIndex:i}=this._translateIndex(e);return this._pages[t].getBoundingBox(i)}readObjectIds(e,t,i=0){let r=i;if(null==t)for(const t of this._pages)r=t.readObjectIds(e,void 0,r);else this._readIndexed(t,((t,i)=>{r=t.readObjectIds(e,i,r)}));return r}readCoordinates(e,t,i=0){let r=i;if(null==t)for(const t of this._pages)r=t.readCoordinates(e,void 0,r);else this._readIndexed(t,((t,i)=>{r=t.readCoordinates(e,i,r)}));return r}_translateIndex(e){const{_pageSize:t}=this;return{pageIndex:Math.floor(e/t),featurePageIndex:e%t}}_readIndexed(e,t){const i=new Array;{let t=0,r=new Array;for(const s of e){const{pageIndex:e,featurePageIndex:n}=this._translateIndex(s);t!==e&&(0!==r.length&&i.push({pageIndex:t,indices:r}),t=e,r=[]),r.push(n)}0!==r.length&&i.push({pageIndex:t,indices:r})}const{_pages:r}=this;for(const{pageIndex:e,indices:s}of i)t(r[e],s)}}var P=i(49186),z=i(51624),N=i(51850),B=i(70328),H=i(62577),j=i(95466),V=i(53655);class U{constructor(e){this._reader=new z.A(new Uint8Array(e),new DataView(e)),this._index=function(e){for(;e.next();){if(2===e.tag())return G(e.getMessage());e.skip()}q()}(this._reader)}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}get usedMemory(){return this._reader.usedMemory}getObjectId(e){return this.getAttribute(e,this._index.objectIdFieldName)}getAttribute(e,t){const{_index:{fieldsIndex:i,attributeIndices:r}}=this,s=i.get(t)?.index;if(null==s)return;const n=r[e*i.fields.length+s],o=this._reader;return o.move(n),k(o)}getAttributeAsTimestamp(e,t){const i=this.getAttribute(e,t);return"string"==typeof i?new Date(i).getTime():"number"==typeof i||null==i?i:null}getAttributes(e){const{_index:{fieldsIndex:t,attributeIndices:i}}=this,r=e*t.fields.length,s=this._reader,n={};for(const e of t.fields){const t=i[r+e.index];s.move(t),n[e.name]=k(s)}return n}getCoordinates(e,t,i=0){const r=this._reader,{transform:s,featureIndices:n}=this._index,{scale:o,translate:a}=s;r.move(n[e]),this._readCoordinates(o,a,t,i)}getOptimizedGeometry(e){const t=(0,N.vt)();return this.getCoordinates(e,t),new R.A([],t)}getCentroid(e,{hasZ:t,hasM:i}){this.getCoordinates(e,Y);const[r,s,n]=Y,o=[r,s];return t&&(o[3]=n),i&&(o[t?4:3]=0),new R.A([],o)}getBounds(e){this.getCoordinates(e,Y);const[t,i]=Y,r=new T.E;return r.minX=t,r.minY=i,r.maxX=t,r.maxY=i,r}getBoundingBox(e){this.getCoordinates(e,Y);const[t,i,r]=Y;return(0,B.fA)(t,i,r,t,i,r)}readObjectIds(e,t=this._allFeatureIndices(),i=0){const r=this._reader,{objectIdFieldName:s,attributeIndices:n,fieldsIndex:o}=this._index,a=o.get(s).index,l=o.fields.length;for(const s of t){const t=n[s*l+a];r.move(t),e[i++]=k(r)}return i}readCoordinates(e,t=this._allFeatureIndices(),i=0){const r=this._reader,{transform:s,featureIndices:n}=this._index,{scale:o,translate:a}=s;for(const s of t){const t=n[s];r.move(t),i=this._readCoordinates(o,a,e,i)}return i}*_allFeatureIndices(){const{featureCount:e}=this;for(let t=0;t<e;++t)yield t}_readCoordinates([e,t,i],[r,s,n],o,a){const l=this._reader,c=l.getLength(),h=l.pos()+c;for(;l.pos()<h&&l.next();)switch(l.tag()){case 2:{const c=l.getLength(),h=l.pos()+c;for(;l.pos()<h&&l.next();)3===l.tag()?(l.getUInt32(),o[a++]=r+e*l.getSInt64(),o[a++]=s+t*l.getSInt64(),o[a++]=n+i*l.getSInt64()):l.skip();break}default:l.skip()}return a}}function G(e){for(;e.next();){if(1===e.tag())return Z(e.getMessage());e.skip()}q()}function Z(e){let t,i,r=!1,s=!1,n=0;const o=new Array,a=new Array,l=new Array;for(;e.next();)switch(e.tag()){case 1:i=e.getString();break;case 7:0!==e.getEnum()&&q();break;case 9:r=e.getBool()??!1;break;case 12:t=(0,H.Q1)(e.processMessage(V.ae));break;case 13:{const t=e.processMessage(V.cn);t.index=n++,o.push(t);break}case 15:{a.push(e.pos());const t=e.getUInt32(),i=e.pos()+t;for(;e.pos()<i&&e.next();)1===e.tag()?(l.push(e.pos()),e.skip()):e.skip();break}case 10:s=e.getBool()??!1;break;default:e.skip()}const c=new j.A(o);return null!=t&&s&&null!=i&&c.has(i)||q(),{transform:t,exceededTransferLimit:r,fieldsIndex:c,objectIdFieldName:i,featureIndices:a,attributeIndices:l}}function q(){const e=new P.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}function k(e){const t=e.getLength(),i=e.pos()+t;for(;e.pos()<i&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}const Y=(0,N.vt)();class W{constructor(e,t,i,r,s){this.spatialReference=e,this.url=i,this.objectIdField=r,this.capabilities=s;const{supportsMaxRecordCountFactor:n,maxRecordCount:o}=this.capabilities.query,a=n?4:1,l=(o??8e3)*a;this._pageSize=Math.min(8e3,l);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=a,c.num=this._pageSize,c.outFields=[r],this._baseQuery=c}async fetch(e,t){const{spatialReference:i}=this,r=(0,F.w1)(e.extent,i),s=this._baseQuery.clone();s.geometry=r;const o=new Array;let a=0,l=!1,c=1;for(;!l;){const e=[];for(let i=0;i<c;++i)e.push(this._fetchPage(s,a++,t));const i=await Promise.all(e);(0,n.Te)(t);for(const e of i){const t=0!==e.featureCount;l||=!e.exceededTransferLimit||!t,t&&o.push(e)}c=Math.min(c+1,4)}return new L(e,this._pageSize,o)}async _fetchPage(e,t,i){const r=e.clone();r.start=t*this._pageSize;const s=(await(0,D.kS)(this.url,r,{signal:i})).data;return(0,n.Te)(i),new U(s)}}var $=i(24151),X=i(97146),J=i(36563),Q=i(97768),K=i(91829),ee=i(37585),te=i(48163),ie=i(34727),re=i(26857);new Map,(()=>{let e="";for(let t=32;t<127;t++)e+=String.fromCharCode(t)})();const se=[];{const e=16;for(let t=0;t<360;t+=360/e)se.push([Math.cos(Math.PI*t/180),Math.sin(Math.PI*t/180)])}var ne,oe;(oe=ne||(ne={}))[oe.Left=0]="Left",oe[oe.Center=1]="Center",oe[oe.Right=2]="Right",Object.freeze({left:0,center:.5,right:1});const ae=Object.freeze({"bottom-left":(0,te.fA)(0,0),bottom:(0,te.fA)(.5,0),"bottom-right":(0,te.fA)(1,0),left:(0,te.fA)(0,.5),center:(0,te.fA)(.5,.5),right:(0,te.fA)(1,.5),"top-left":(0,te.fA)(0,1),top:(0,te.fA)(.5,1),"top-right":(0,te.fA)(1,1)});var le=i(4431),ce=i(49255);const he={required:[]};ce.V.Depth;class de extends p.A{precompile(e){const t=this.acquireTechniques(e);return function(e){Array.isArray(e)?e.forEach((e=>e?.release())):e?.release()}(t),null!=t}consumes(){return he}get usedMemory(){return 0}get isDecoration(){return!1}get running(){return!1}modify(e){}get numGeometries(){return 0}get hasOccludees(){return!1}get hasEmissions(){return!1}forEachGeometry(e){}queryRenderOccludedState(e){return!1}}class ue extends de{}class fe extends de{}var pe=i(89192);class _e{constructor(e,t){this._material=e,this._repository=t,this._map=new Map}dispose(){this._map.forEach(((e,t)=>{null!=e&&this._repository.release(this._material,t)}))}load(e,t,i){const r=this._material.produces.get(t);if(!r?.(i))return null;this._map.has(i)||this._map.set(i,this._repository.acquire(this._material,t,i));const s=this._map.get(i);if(null!=s){if(s.ensureResources(e)===pe.Am.LOADED)return s;this._repository.requestRender()}return null}}var me=i(13464),ge=i(72824);class ve extends ge.gy{constructor(e=(0,N.vt)()){super(),this.origin=e}get slicePlaneLocalOrigin(){return this.origin}}let ye=class extends ue{constructor(e){super(e),this._hasHighlights=!1,this._glMaterials=null,this._produces=new Map,this._renderGeometries=new Map,this._vaoCache=null,this._drawParameters=new ve,this._bufferWriter=null}get produces(){return this._produces}get numFeatures(){let e=0;return this._renderGeometries.forEach((t=>e+=t.numElements/6)),e}get usedMemory(){let e=0;return this._renderGeometries.forEach((t=>{e+=t.vao.usedMemory})),e}initialize(){this._bufferWriter=this.material.createBufferWriter(),this.material.produces.forEach(((e,t)=>{this._produces.set(t,(t=>!!(t!==ce.V.Highlight&&t!==ce.V.ShadowHighlight||this._hasHighlights)&&e(t)))}))}destroy(){this._glMaterials.dispose();const e=this._renderGeometries.keys();for(const t of e)this.removeRenderGeometry(t)}acquireTechniques(e){const t=this.material;if(!t.shouldRender(e))return null;const{output:i,bind:r}=e,s=t.produces.get(r.slot);if(!s?.(i))return null;if((i===ce.V.Highlight||i===ce.V.ShadowHighlight)&&!this._hasHighlights)return null;const n=this._glMaterials.load(e.rctx,r.slot,i);return n?.beginSlot(r)}render(e,t){const i=this._renderGeometries;if(0===i.size)return;const{bind:r}=e,s=r.slot===me.N.OCCLUDER_MATERIAL||r.slot===me.N.TRANSPARENT_OCCLUDER_MATERIAL?r.slot:null,n=e.rctx;n.runAppleAmdDriverHelper(),n.bindTechnique(t,r,this.material.parameters);const o=t.program;for(const[e,a]of i)this._drawParameters.origin=a.localOrigin,o.bindDraw(r,this.material.parameters,this._drawParameters),t.ensureAttributeLocations(a.vao),n.bindVAO(a.vao),n.setPipelineState(t.getPipeline(!1,s)),n.drawArrays(t.primitiveType,0,a.numElements)}initializeRenderContext(e,t){this._glMaterials=new _e(this.material,e.materials),this._vaoCache=e.renderContext.rctx.getVaoCache(this.material.vertexAttributeLocations,(0,le.U)(this._bufferWriter.vertexBufferLayout))}uninitializeRenderContext(){}addRenderGeometry(e,t,i){this.removeRenderGeometry(e);const r=this._vaoCache.newVao(t.data.byteLength);r.vertexBuffers.get("geometry").setSubData(new Uint8Array(t.data),0,0,t.data.byteLength);const s={localOrigin:i,vao:r,numElements:t.elementCount};return this._renderGeometries.set(e,s),s}removeRenderGeometry(e){const t=this._renderGeometries.get(e);null!=t&&(this._vaoCache.deleteVao(t.vao),this._renderGeometries.delete(e))}hasHighlightOptions(e){return!1}};(0,r._)([(0,a.MZ)({constructOnly:!0})],ye.prototype,"material",void 0),ye=(0,r._)([(0,h.$)("esri.views.3d.layers.graphics.pipeline.rendering.DirectRenderer")],ye);var xe,be,we,Ae,Te=i(69720),Oe=i(46540),Re=i(91869),Me=i(9093),Se=i(38954),Ie=i(1843),Ce=i(90629),Ee=i(58083),Fe=i(87317),De=i(82919),Le=i(71351),Pe=i(44280);i(3694),(Ae=xe||(xe={}))[Ae.Default=0]="Default",Ae[Ae.Screenshot=1]="Screenshot",Ae[Ae.ObjectAndLayerID=2]="ObjectAndLayerID",function(e){e[e.TOP=0]="TOP",e[e.RIGHT=1]="RIGHT",e[e.BOTTOM=2]="BOTTOM",e[e.LEFT=3]="LEFT"}(be||(be={}));let ze=we=class extends p.A{constructor(e){super(e),this._ray=(0,Le.vt)(),this._viewport=(0,K.fA)(0,0,1,1),this._padding=(0,K.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,te.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,Me.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,Me.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,Me.vt)(),this._frustumDirty=!0,this._frustum=(0,De.vt)(),this._fullViewport=(0,K.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,N.vt)(),this._up=(0,N.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,Se.d)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,Ee.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,Se.i)((0,N.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,Se.i)((0,N.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,Se.i)((0,N.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,Fe.b)((0,K.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,Fe.e)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,Fe.b)((0,K.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,Fe.e)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[be.LEFT],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[be.BOTTOM],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[be.RIGHT]+this._padding[be.LEFT]}set fullWidth(e){this.width=e-(this._padding[be.RIGHT]+this._padding[be.LEFT])}get fullHeight(){return this._viewport[3]+this._padding[be.TOP]+this._padding[be.BOTTOM]}set fullHeight(e){this.height=e-(this._padding[be.TOP]+this._padding[be.BOTTOM])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[be.LEFT],this._fullViewport[1]=this._viewport[1]-this._padding[be.BOTTOM],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,Fe.a)(this._padding,e)||(this._viewport[0]+=e[be.LEFT]-this._padding[be.LEFT],this._viewport[1]+=e[be.BOTTOM]-this._padding[be.BOTTOM],this._viewport[2]-=e[be.RIGHT]+e[be.LEFT]-(this._padding[be.RIGHT]+this._padding[be.LEFT]),this._viewport[3]-=e[be.TOP]+e[be.BOTTOM]-(this._padding[be.TOP]+this._padding[be.BOTTOM]),(0,Fe.c)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,Ee.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,Ee.B8)((0,Me.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,Me.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return function(e,t,i){return 2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+i*i))}(this._fov,this.width,this.height)}set fovX(e){this._fov=function(e,t,i){return 2*Math.atan(Math.sqrt(t*t+i*i)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return function(e,t,i){return 2*Math.atan(i*Math.tan(.5*e)/Math.sqrt(t*t+i*i))}(this._fov,this.width,this.height)}set fovY(e){this._fov=function(e,t,i){return 2*Math.atan(Math.sqrt(t*t+i*i)*Math.tan(.5*e)/i)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,Se.j)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,Ee.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,Ee.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:i}=this;return 2*t*i/(i+t-e*(i-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,i=this.near*Math.tan(this.fovY/2)*2,r=i*this._aspect,s=i/this.rows,n=r/this.columns,o=-r/2+this.column*n,a=o+n,l=-i/2+this.row*s,c=l+s,h=(0,Ee.$h)((0,Me.vt)(),o*(1+2*this._padding[be.LEFT]/e),a*(1+2*this._padding[be.RIGHT]/e),l*(1+2*this._padding[be.BOTTOM]/t),c*(1+2*this._padding[be.TOP]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,Ee.aI)(d,h)?d:h}copyFrom(e){(0,Se.c)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,Fe.c)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,Fe.c)(this._padding,e.padding),this.notifyChange("_padding"),(0,ee.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,Ee.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,De.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,Ee.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,Fe.c)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new we).copyFrom(this)}equals(e){return(0,Se.p)(this.eye,e.eye)&&(0,Se.p)(this.center,e.center)&&(0,Se.p)(this.up,e.up)&&(0,Fe.a)(this._viewport,e.viewport)&&(0,Fe.a)(this._padding,e.padding)&&(0,ee.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,Fe.d)(e.screenPadding,this.screenPadding)>=t||(0,Fe.d)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,Se.a)(je,e.eye,e.center),(0,Se.a)(Ve,this.eye,this.center);const i=(0,Se.f)(je,Ve),r=(0,Se.z)(je),s=(0,Se.z)(Ve),n=5e-4;return i*i>=(1-1e-10)*r*s&&(0,Se.y)(e.eye,this.eye)<Math.max(r,s)*n*n}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,Pe.gr)(this.viewForward,(0,Se.d)(je,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,Ce.gs)()){return e[0]=(this.padding[be.LEFT]+this.width/2)/this.pixelRatio,e[1]=(this.padding[be.TOP]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,i=.5){return e[0]=this.padding[be.LEFT]+this.width*t,e[1]=this.padding[be.BOTTOM]+this.height*i,e[2]=.5,e}setGLViewport(e){const t=this.viewport,i=this.padding;e.setViewport(t[0]-i[3],t[1]-i[2],t[2]+i[1]+i[3],t[3]+i[0]+i[2])}applyProjection(e,t){e!==Be&&(0,Se.c)(Be,e),Be[3]=1,(0,Fe.t)(Be,Be,this.projectionMatrix);const i=Math.abs(Be[3]);(0,Se.h)(Be,Be,1/i);const r=this.fullViewport;t[0]=(0,ie.Cc)(0,r[0]+r[2],.5+.5*Be[0]),t[1]=(0,ie.Cc)(0,r[1]+r[3],.5+.5*Be[1]),t[2]=.5*(Be[2]+1),t[3]=i}unapplyProjection(e,t){const i=this.fullViewport;Be[0]=(e[0]/(i[0]+i[2])*2-1)*e[3],Be[1]=(e[1]/(i[1]+i[3])*2-1)*e[3],Be[2]=(2*e[2]-1)*e[3],Be[3]=e[3],null!=this.inverseProjectionMatrix&&((0,Fe.t)(Be,Be,this.inverseProjectionMatrix),t[0]=Be[0],t[1]=Be[1],t[2]=Be[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,Ue),this.renderToScreen(Ue,t),t}projectToRenderScreen(e,t){if(Be[0]=e[0],Be[1]=e[1],Be[2]=e[2],Be[3]=1,(0,Fe.t)(Be,Be,this.viewProjectionMatrix),0===Be[3])return null;const i=Be;(0,Se.h)(i,i,1/Math.abs(Be[3]));const r=this.fullViewport,s=(0,ie.Cc)(0,r[0]+r[2],.5+.5*i[0]),n=(0,ie.Cc)(0,r[1]+r[3],.5+.5*i[1]);return"x"in t?(t.x=s,t.y=n):(t[0]=s,t[1]=n,t.length>2&&(t[2]=.5*(i[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,Ue),t)}unprojectFromRenderScreen(e,t){if((0,Ee.lw)(He,this.projectionMatrix,this.viewMatrix),!(0,Ee.B8)(He,He))return null;const i=this.fullViewport;return Be[0]=2*(e[0]-i[0])/i[2]-1,Be[1]=2*(e[1]-i[1])/i[3]-1,Be[2]=2*e[2]-1,Be[3]=1,(0,Fe.t)(Be,Be,He),0===Be[3]?null:(t[0]=Be[0]/Be[3],t[1]=Be[1]/Be[3],t[2]=Be[2]/Be[3],t)}constrainWindowSize(e,t,i,r){const s=e*this.pixelRatio,n=t*this.pixelRatio,o=Math.max(s-i/2,0),a=Math.max(this.fullHeight-n-r/2,0),l=-Math.min(s-i/2,0),c=-Math.min(this.fullHeight-n-r/2,0),h=i-l- -Math.min(this.fullWidth-s-i/2,0),d=r-c- -Math.min(n-r/2,0);return[Math.round(o),Math.round(a),Math.round(h),Math.round(d)]}computeUp(e){e===$.RT.Global?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const i=e[0]*this.pixelRatio,r=this.fullHeight-e[1]*this.pixelRatio;return t[0]=i,t[1]=r,t}renderToScreen(e,t){const i=e[0]/this.pixelRatio,r=(this.fullHeight-e[1])/this.pixelRatio;t[0]=i,t[1]=r}_computeUpGlobal(){(0,Se.d)(je,this.center,this.eye);const e=(0,Se.l)(this.center);e<1?((0,Se.i)(this._up,0,0,1),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,Se.f)(je,this.center))>.9999*(0,Se.l)(je)*e||((0,Se.e)(this._up,je,this.center),(0,Se.e)(this._up,this._up,je),(0,Se.n)(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_computeUpLocal(){(0,Se.o)(je,this.eye,this.center),Math.abs(je[2])<=.9999&&((0,Se.h)(je,je,je[2]),(0,Se.i)(this._up,-je[0],-je[1],1-je[2]),(0,Se.n)(this._up,this._up),this.notifyChange("_up"),this._markViewDirty())}_compareAndSetView(e,t,i=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,Se.p)(e,t)||((0,Se.c)(t,e),this._markViewDirty(),i.length&&this.notifyChange(i)):c.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,De.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,Ee.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,r._)([(0,a.MZ)()],ze.prototype,"_viewport",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_padding",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_fov",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_nearFar",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_viewDirty",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_viewMatrix",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_pixelRatio",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"pixelRatio",null),(0,r._)([(0,a.MZ)()],ze.prototype,"row",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"column",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"_rows",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"rows",null),(0,r._)([(0,a.MZ)()],ze.prototype,"_columns",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"columns",null),(0,r._)([(0,a.MZ)()],ze.prototype,"eye",null),(0,r._)([(0,a.MZ)()],ze.prototype,"center",null),(0,r._)([(0,a.MZ)()],ze.prototype,"_center",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"up",null),(0,r._)([(0,a.MZ)()],ze.prototype,"_up",void 0),(0,r._)([(0,a.MZ)()],ze.prototype,"viewMatrix",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"viewForward",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"viewUp",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"viewRight",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"nearFar",null),(0,r._)([(0,a.MZ)()],ze.prototype,"near",null),(0,r._)([(0,a.MZ)()],ze.prototype,"far",null),(0,r._)([(0,a.MZ)()],ze.prototype,"viewport",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"screenViewport",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"screenPadding",null),(0,r._)([(0,a.MZ)()],ze.prototype,"x",null),(0,r._)([(0,a.MZ)()],ze.prototype,"y",null),(0,r._)([(0,a.MZ)()],ze.prototype,"width",null),(0,r._)([(0,a.MZ)()],ze.prototype,"height",null),(0,r._)([(0,a.MZ)()],ze.prototype,"fullWidth",null),(0,r._)([(0,a.MZ)()],ze.prototype,"fullHeight",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"_aspect",null),(0,r._)([(0,a.MZ)()],ze.prototype,"padding",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"projectionMatrix",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"inverseProjectionMatrix",null),(0,r._)([(0,a.MZ)()],ze.prototype,"fov",null),(0,r._)([(0,a.MZ)()],ze.prototype,"fovX",null),(0,r._)([(0,a.MZ)()],ze.prototype,"fovY",null),(0,r._)([(0,a.MZ)()],ze.prototype,"viewInverseTransposeMatrix",null),(0,r._)([(0,a.MZ)({readOnly:!0})],ze.prototype,"_projectionMatrixInternal",null),(0,r._)([(0,a.MZ)()],ze.prototype,"relativeElevation",void 0),ze=we=(0,r._)([(0,h.$)("esri.views.3d.webgl.RenderCamera")],ze);const Ne=ze,Be=(0,K.vt)(),He=(0,Me.vt)(),je=(0,N.vt)(),Ve=(0,N.vt)(),Ue=(0,Ce.r_)();var Ge=i(39341);class Ze{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far))}within(e){return this.near<=e&&e<=this.far}}Ze.zero=new Ze(0,0);var qe=i(62258),ke=i(78230),Ye=i(620),We=i(77690),$e=i(29242),Xe=i(13030),Je=i(32728),Qe=i(48852),Ke=i(63907);class et{constructor(e,t,i){this._elementSize=t,this._buffer=Qe.g.createVertex(e,Ke._U.STATIC_DRAW),this.resize(i)}destroy(){this._buffer.dispose()}get elementSize(){return this._elementSize}get capacity(){return this._capacity}get array(){return this._array}get buffer(){return this._buffer}get usedMemory(){return this._array.byteLength+this._buffer.usedMemory}copyRange(e,t,i,r=0){const s=new Uint8Array(this.array,e*this.elementSize,(t-e)*this.elementSize);new Uint8Array(i.array,r*this.elementSize).set(s)}transferAll(){this._buffer.setData(this._array)}transferRange(e,t){const i=e*this._elementSize,r=t*this._elementSize;this._buffer.setSubData(new Uint8Array(this._array),i,i,r)}resize(e){const t=e*this._elementSize,i=new ArrayBuffer(t);this._array&&(e>=this._capacity?new Uint8Array(i).set(new Uint8Array(this._array)):new Uint8Array(i).set(new Uint8Array(this._array).subarray(0,e*this._elementSize))),this._array=i,this._buffer.setSize(t),this._capacity=e}}class tt{constructor(e){this.modelOriginHi=e.getField(Oe.r.INSTANCEMODELORIGINHI,Xe.xs),this.modelOriginLo=e.getField(Oe.r.INSTANCEMODELORIGINLO,Xe.xs),this.model=e.getField(Oe.r.INSTANCEMODEL,Xe.jZ),this.modelNormal=e.getField(Oe.r.INSTANCEMODELNORMAL,Xe.jZ),this.featureAttribute=e.getField(Oe.r.INSTANCEFEATUREATTRIBUTE,Xe.Eq),this.color=e.getField(Oe.r.INSTANCECOLOR,Xe.XP),this.objectAndLayerIdColor=e.getField(Oe.r.INSTANCEOBJECTANDLAYERIDCOLOR,Xe.XP)}}class it{constructor(e,t){this._rctx=e,this._instanceBufferLayout=t,this._headIndex=0,this._tailIndex=0,this._firstIndex=null,this._captureFirstIndex=!0,this._updating=!1,this._prevHeadIndex=0,this._resized=!1,this._capacity=1}destroy(){this._buffer&&this._buffer.destroy()}get buffer(){return this._buffer.buffer}get view(){return this._view}get capacity(){return this._capacity}get size(){const e=this._headIndex,t=this._tailIndex;return e>=t?e-t:e+this._capacity-t}get isEmpty(){return this._headIndex===this._tailIndex}get isFull(){return this._tailIndex===(this._headIndex+1)%this._capacity}get headIndex(){return this._headIndex}get tailIndex(){return this._tailIndex}get firstIndex(){return this._firstIndex}get usedMemory(){return this._buffer?.usedMemory??0}reset(){this._headIndex=0,this._tailIndex=0,this._firstIndex=null}startUpdateCycle(){this._captureFirstIndex=!0}beginUpdate(){(0,Ye.vA)(!this._updating,"already updating"),this._updating=!0,this._prevHeadIndex=this._headIndex}endUpdate(){(0,Ye.vA)(this._updating,"not updating"),this.size<_.$U*this.capacity&&this._shrink(),this._resized?(this._buffer.transferAll(),this._resized=!1):this._transferRange(this._prevHeadIndex,this._headIndex),this._updating=!1}allocateHead(){(0,Ye.vA)(this._updating,"not updating"),this.isFull&&this._grow();const e=this.headIndex;return this._captureFirstIndex&&(this._firstIndex=e,this._captureFirstIndex=!1),this._incrementHead(),(0,Ye.vA)(this._headIndex!==this._tailIndex,"invalid pointers"),e}freeTail(){(0,Ye.vA)(this._updating,"not updating"),(0,Ye.vA)(this.size>0,"invalid size");const e=this._tailIndex===this._firstIndex;this._incrementTail(),e&&(this._firstIndex=this._tailIndex)}_grow(){const e=Math.max(rt,Math.floor(this._capacity*_.Ji));this._resize(e)}_shrink(){const e=Math.max(rt,Math.floor(this._capacity*_.He));this._resize(e)}_resize(e){if((0,Ye.vA)(this._updating,"not updating"),e===this._capacity)return;const t=new et(this._rctx,this._instanceBufferLayout.stride,e);if(this._buffer){this._firstIndex&&(this._firstIndex=(this._firstIndex+this._capacity-this._tailIndex)%this._capacity);const e=this.size,i=this._compactInstances(t);(0,Ye.vA)(i===e,"invalid compaction"),this._buffer.destroy(),this._tailIndex=0,this._headIndex=i,this._prevHeadIndex=0}this._resized=!0,this._capacity=e,this._buffer=t,this._view=new tt(this._instanceBufferLayout.createView(this._buffer.array))}_compactInstances(e){const t=this._headIndex,i=this._tailIndex;return i<t?(this._buffer.copyRange(i,t,e),t-i):i>t?(this._buffer.copyRange(i,this._capacity,e),t>0&&this._buffer.copyRange(0,t,e,this._capacity-i),t+(this._capacity-i)):0}_incrementHead(e=1){this._headIndex=(this._headIndex+e)%this._capacity}_incrementTail(e=1){this._tailIndex=(this._tailIndex+e)%this._capacity}_transferRange(e,t){e<t?this._buffer.transferRange(e,t):e>t&&(t>0&&this._buffer.transferRange(0,t),this._buffer.transferRange(e,this._capacity))}}const rt=64;var st;!function(e){e[e.ALLOCATED=1]="ALLOCATED",e[e.DEFAULT_ACTIVE=2]="DEFAULT_ACTIVE",e[e.VISIBLE=4]="VISIBLE",e[e.HIGHLIGHT=8]="HIGHLIGHT",e[e.HIGHLIGHT_ACTIVE=16]="HIGHLIGHT_ACTIVE",e[e.REMOVE=32]="REMOVE",e[e.TRANSFORM_CHANGED=64]="TRANSFORM_CHANGED",e[e.ACTIVE=18]="ACTIVE"}(st||(st={}));class nt{constructor(e){this.localTransform=e.getField(Oe.r.LOCALTRANSFORM,Xe.E$),this.globalTransform=e.getField(Oe.r.GLOBALTRANSFORM,Xe.E$),this.modelOrigin=e.getField(Oe.r.MODELORIGIN,Xe.Xm),this.model=e.getField(Oe.r.INSTANCEMODEL,Xe.jZ),this.modelNormal=e.getField(Oe.r.INSTANCEMODELNORMAL,Xe.jZ),this.modelScaleFactors=e.getField(Oe.r.MODELSCALEFACTORS,Xe.gH),this.boundingSphere=e.getField(Oe.r.BOUNDINGSPHERE,Xe.Aj),this.featureAttribute=e.getField(Oe.r.FEATUREATTRIBUTE,Xe.Eq),this.color=e.getField(Oe.r.COLOR,Xe.XP),this.objectAndLayerIdColor=e.getField(Oe.r.OBJECTANDLAYERIDCOLOR,Xe.XP),this.state=e.getField(Oe.r.STATE,Xe.SL),this.lodLevel=e.getField(Oe.r.LODLEVEL,Xe.SL)}}let ot=class extends p.A{constructor(e,t){super(e),this.events=new s.A,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){let t=(0,Ie.BP)().mat4f64(Oe.r.LOCALTRANSFORM).mat4f64(Oe.r.GLOBALTRANSFORM).vec4f64(Oe.r.BOUNDINGSPHERE).vec3f64(Oe.r.MODELORIGIN).mat3f(Oe.r.INSTANCEMODEL).mat3f(Oe.r.INSTANCEMODELNORMAL).vec2f(Oe.r.MODELSCALEFACTORS);return e.includes(Oe.r.FEATUREATTRIBUTE)&&(t=t.vec4f(Oe.r.FEATUREATTRIBUTE)),e.includes(Oe.r.COLOR)&&(t=t.vec4u8(Oe.r.COLOR)),e.includes(Oe.r.OBJECTANDLAYERIDCOLOR)&&(t=t.vec4u8(Oe.r.OBJECTANDLAYERIDCOLOR)),t=t.u8(Oe.r.STATE).u8(Oe.r.LODLEVEL),t}(t),this._capacity=rt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new nt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,st.ALLOCATED),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Ye.vA)(e>=0&&e<this._capacity&&!!(t.get(e)&st.ALLOCATED),"invalid instance handle"),this._getStateFlag(e,st.ACTIVE)?this._setStateFlags(e,st.REMOVE):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Ye.vA)(e>=0&&e<this._capacity&&!!(t.get(e)&st.ALLOCATED),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,i=!0){this._view.localTransform.setMat(e,t),i&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,i=!0){this._view.globalTransform.setMat(e,t),i&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,i=at,r=lt;t.localTransform.getMat(e,ct),t.globalTransform.getMat(e,ht);const s=(0,Ee.lw)(ht,ht,ct);(0,Se.i)(i,s[12],s[13],s[14]),t.modelOrigin.setVec(e,i),(0,We.z0)(r,s),t.model.setMat(e,r);const n=(0,Je.wp)(at,s);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,We.B8)(r,r),(0,We.mg)(r,r),t.modelNormal.setMat(e,r),this._setStateFlags(e,st.TRANSFORM_CHANGED),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const i=this._view;i.model.getMat(e,lt),i.modelOrigin.getVec(e,at),t[0]=lt[0],t[1]=lt[1],t[2]=lt[2],t[3]=0,t[4]=lt[3],t[5]=lt[4],t[6]=lt[5],t[7]=0,t[8]=lt[6],t[9]=lt[7],t[10]=lt[8],t[11]=0,t[12]=at[0],t[13]=at[1],t[14]=at[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(at,this,e),t*=Math.max(at[0],at[1],at[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(at,this,e),t*=function(e,t,i){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),i))}(at[0],at[1],at[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute.getVec(e,t)}setColor(e,t){this._view.color.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.objectAndLayerIdColor.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,st.VISIBLE,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,st.VISIBLE)}setHighlight(e,t){const{_highlightOptionsMap:i}=this,r=i.get(e);t?t!==r&&(i.set(e,t),this._setStateFlag(e,st.HIGHLIGHT,!0),this.events.emit("instance-highlight-changed")):r&&(i.delete(e),this._setStateFlag(e,st.HIGHLIGHT,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,st.HIGHLIGHT)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let i=0;i<this._capacity;++i)this.getState(i)&e&&++t;return t}_setStateFlags(e,t){const i=this._view.state;t=i.get(e)|t,i.set(e,t)}_clearStateFlags(e,t){const i=this._view.state;t=i.get(e)&~t,i.set(e,t)}_setStateFlag(e,t,i){i?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(rt,Math.floor(this._capacity*_.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new nt(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;e.get(t)&st.ALLOCATED;)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,r._)([(0,a.MZ)({constructOnly:!0})],ot.prototype,"shaderTransformation",void 0),(0,r._)([(0,a.MZ)()],ot.prototype,"_size",void 0),(0,r._)([(0,a.MZ)({readOnly:!0})],ot.prototype,"size",null),ot=(0,r._)([(0,h.$)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],ot);const at=(0,N.vt)(),lt=(0,$e.vt)(),ct=(0,Me.vt)(),ht=(0,Me.vt)();var dt=i(97937);class ut extends ke.A{constructor(e,t){super((e=>(0,dt.w)(this._instanceData.view.boundingSphere.getVec(e,this._tmpSphere))),{maximumDepth:25}),this._instanceData=e,this._boundingSphere=t,this._tmpSphere=(0,dt.c)(),this._tmpMat4=(0,Me.vt)()}addInstance(e){const t=this._instanceData.view.boundingSphere,i=this._instanceData.getCombinedModelTransform(e,this._tmpMat4);(0,Se.t)((0,dt.a)(this._tmpSphere),this._boundingSphere.center,i),this._tmpSphere[3]=this._boundingSphere.radius*(0,Je.hG)(i),t.setVec(e,this._tmpSphere),this.add([e])}removeInstance(e){this.remove([e])}}class ft{constructor(e,t){this._worldSpaceRadius=e,this._minScreenSpaceRadii=t}selectLevel(e,t,i){const r=i.computeScreenPixelSizeAt(e),s=this._worldSpaceRadius*t/r;let n=0;for(let e=1;e<this._minScreenSpaceRadii.length;++e)s>=this._minScreenSpaceRadii[e]&&(n=e);return n}}i(65215);var pt=i(86305);i(16396);class _t{get ray(){return this._ray}get distanceInRenderSpace(){return null!=this.dist?((0,Se.h)(mt,this.ray.direction,this.dist),(0,Se.l)(mt)):null}withinDistance(e){return!!(0,pt.i3)(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!(0,pt.i3)(this)&&((0,Se.h)(mt,this.ray.direction,this.dist),(0,Se.g)(e,this.ray.origin,mt),!0)}getTransformedNormal(e){return(0,Se.c)(gt,this.normal),gt[3]=0,(0,Fe.t)(gt,gt,this.transformation),(0,Se.c)(e,gt),(0,Se.n)(e,e)}constructor(e){this.intersector=qe.dz.OBJECT,this.normal=(0,N.vt)(),this.transformation=(0,Me.vt)(),this._ray=(0,Le.vt)(),this.init(e)}init(e){this.dist=null,this.target=null,this.drapedLayerOrder=null,this.drapedLayerGraphicOrder=null,this.intersector=qe.dz.OBJECT,(0,Le.C)(e,this._ray)}set(e,t,i,r,s,n,o){this.intersector=e,this.dist=i,(0,Se.c)(this.normal,r??N.Cb),(0,Ee.C)(this.transformation,s??Me.zK),this.target=t,this.drapedLayerOrder=n,this.drapedLayerGraphicOrder=o}copy(e){(0,Le.C)(e.ray,this._ray),this.intersector=e.intersector,this.dist=e.dist,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.drapedLayerGraphicOrder=e.drapedLayerGraphicOrder,(0,Se.c)(this.normal,e.normal),(0,Ee.C)(this.transformation,e.transformation)}}const mt=(0,N.vt)(),gt=(0,K.vt)();var vt=i(42293);const yt=()=>c.A.getLogger("esri.views.webgl.VertexArrayObject");let xt=class{constructor(e,t,i,r,s=null){this._context=e,this._locations=t,this._layout=i,this._buffers=r,this._indexBuffer=s,this._glName=null,this._initialized=!1}get glName(){return this._glName}get context(){return this._context}get vertexBuffers(){return this._buffers}get indexBuffer(){return this._indexBuffer}get byteSize(){return Array.from(this._buffers.values()).reduce(((e,t)=>e+t.usedMemory),null!=this._indexBuffer?this._indexBuffer.usedMemory:0)}get layout(){return this._layout}get locations(){return this._locations}get usedMemory(){return this.byteSize+(this._buffers.size+(this._indexBuffer?1:0))*b.i5}get cachedMemory(){return this.usedMemory}dispose(){this._context?(this._context.getBoundVAO()===this&&this._context.bindVAO(null),this._buffers.forEach((e=>e.dispose())),this._buffers.clear(),this._indexBuffer=(0,Q.WD)(this._indexBuffer),this.disposeVAOOnly()):(this._glName||this._buffers.size>0)&&yt().warn("Leaked WebGL VAO")}disposeVAOOnly(){this._glName&&(this._context.gl.deleteVertexArray(this._glName),this._glName=null,this._context.instanceCounter.decrement(Ke.vt.VertexArrayObject,this)),this._context=null}initialize(){if(this._initialized)return;const{gl:e}=this._context,t=e.createVertexArray();e.bindVertexArray(t),this._bindLayout(),e.bindVertexArray(null),this._glName=t,this._context.instanceCounter.increment(Ke.vt.VertexArrayObject,this),this._initialized=!0}bind(){this.initialize(),this._context.gl.bindVertexArray(this.glName)}_bindLayout(){const{_buffers:e,_layout:t,_indexBuffer:i}=this;e||yt().error("Vertex buffer dictionary is empty!");const r=this._context.gl;this._buffers.forEach(((e,i)=>{const r=t.get(i);r?(0,vt.yu)(this._context,this._locations,e,r):yt().error("Vertex element descriptor is empty!")})),null!=i&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,i.glName)}unbind(){this.initialize(),this._context.gl.bindVertexArray(null)}};class bt extends xt{}var wt=i(87582);class At{constructor(e,t){const i=e.renderContext.rctx,r=t.geometry;let s=null;s=r instanceof Te.J?function(e,t,i,r=null){const s=e.createBufferWriter(),n=s.vertexBufferLayout,o=s.elementCount(t),a=n.createBuffer(o);return s.write(null,null,t,r,a,0),{material:e,vertexBufferLayout:n,buffer:a.buffer,elementCount:o,boundingInfo:i}}(r.material,r.attributes,r.boundingInfo):r;const n=s.material;this._materials=e.materials,n.setParameters({instancedDoublePrecision:!0}),this.geometry=r,this.material=n,this.glMaterials=new _e(n,this._materials),this.vertexBufferLayout=s.vertexBufferLayout,this.vbo=Qe.g.createVertex(i,Ke._U.STATIC_DRAW,s.buffer),this.vao=new bt(i,Ge.D,new Map([["geometry",(0,le.U)(s.vertexBufferLayout)]]),new Map([["geometry",this.vbo]])),this.vertexCount=s.elementCount}destroy(){this.glMaterials.dispose(),this.vbo.dispose(),this.vao.dispose()}get boundingInfo(){return this.geometry.boundingInfo}get triangleCount(){return this.vertexCount/3}get usedMemory(){return 128+this.vbo.usedMemory+this.vao.usedMemory}intersect(e,t,i,r,s,n,o,a){if(!(this.geometry instanceof Te.J))return;const l=this.geometry.id;this.material.intersect(this.geometry,e.transform.transform,e,i,r,((i,r,c,h,d)=>{if(i>=0){if(null!=t&&!t(e.rayBegin,e.rayEnd,i))return;const h=new wt.h(n.layerUid,n.graphicUid(s),l,c,o,a);if((null==e.results.min.drapedLayerOrder||d>=e.results.min.drapedLayerOrder)&&(null==e.results.min.dist||i<e.results.min.dist)&&e.results.min.set(qe.dz.LOD,h,i,r,e.transform.transform,d),e.options.store!==qe.oH.MIN&&(null==e.results.max.drapedLayerOrder||d>=e.results.max.drapedLayerOrder)&&(null==e.results.max.dist||i>e.results.max.dist)&&e.results.max.set(qe.dz.LOD,h,i,r,e.transform.transform,d),e.options.store===qe.oH.ALL){const t=function(e){return new _t(e)}(e.results.min.ray);t.set(qe.dz.LOD,h,i,r,e.transform.transform,d),e.results.all.push(t)}}}))}}class Tt{static async create(e,t,i){const r=await Promise.allSettled(t.components.map((t=>e.controller.schedule((()=>new At(e,t)),i)))),s=r.map((e=>"fulfilled"===e.status?e.value:null)).filter(_.Ru);if((0,n.G4)(i)||s.length!==r.length){s.forEach((e=>e.destroy())),(0,n.Te)(i);for(const e of r)if("rejected"===e.status)throw e.reason}return new Tt(t.minScreenSpaceRadius,s)}constructor(e,t){this.minScreenSpaceRadius=e,this.components=t}destroy(){this.components.forEach((e=>e.destroy()))}intersect(e,t,i,r,s,n,o){this.components.forEach((a=>a.intersect(e,t,i,r,s,n,this.boundingSphere,o)))}get boundingBox(){if(null==this._boundingBox){const e=(0,B.Ie)();this.components.forEach((t=>{null!=t.boundingInfo&&((0,B.iT)(e,t.boundingInfo.bbMin),(0,B.iT)(e,t.boundingInfo.bbMax))})),this._boundingBox=e}return this._boundingBox}get boundingSphere(){if(null==this._boundingSphere){const e=this.boundingBox,t=(0,N.vt)();(0,B.gX)(e,t),this._boundingSphere={center:t,radius:.5*(0,B._F)(e)}}return this._boundingSphere}get triangleCount(){return this.components.reduce(((e,t)=>e+t.triangleCount),0)}}var Ot=i(43616),Rt=i(28449);const Mt=(0,N.vt)(),St=new Float32Array(6);var It=i(97225),Ct=i(63076);let Et=class extends fe{constructor(e,t){super(e),this.type=qe.dz.LOD,this.isGround=!1,this._levels=[],this._defaultRenderInstanceData=new Array,this._highlightRenderInstanceDataMap=new Map,this._instanceIndex=0,this._cycleStartIndex=0,this._slicePlane=!1,this._camera=new Ne,this._updateCyclesWithStaticCamera=-1,this._needFullCycle=!1,this.produces=new Map([[me.N.OPAQUE_MATERIAL,e=>this._produces(e)],[me.N.TRANSPARENT_MATERIAL,e=>!!this._hasTransparentLevels()&&this._produces(e)]]),this._instanceData=new ot({shaderTransformation:e.shaderTransformation},e.optionalFields),this.addHandles(t.registerTask(Ct.W6.LOD_RENDERER,this))}initialize(){this._instanceBufferLayout=function(e){let t=(0,Ie.BP)().vec3f(Oe.r.INSTANCEMODELORIGINHI).vec3f(Oe.r.INSTANCEMODELORIGINLO).mat3f(Oe.r.INSTANCEMODEL).mat3f(Oe.r.INSTANCEMODELNORMAL);return null!=e&&e.includes("featureAttribute")&&(t=t.vec4f(Oe.r.INSTANCEFEATUREATTRIBUTE)),null!=e&&e.includes("color")&&(t=t.vec4u8(Oe.r.INSTANCECOLOR)),null!=e&&e.includes("objectAndLayerIdColor")&&(t=t.vec4u8(Oe.r.INSTANCEOBJECTANDLAYERIDCOLOR)),t}(this.optionalFields),this._glInstanceBufferLayout=(0,le.U)(this._instanceBufferLayout,1),this.addHandles([this._instanceData.events.on("instances-changed",(()=>this._requestUpdateCycle())),this._instanceData.events.on("instance-transform-changed",(({index:e})=>{this._requestUpdateCycle(),this.metadata.notifyGraphicGeometryChanged(e)})),this._instanceData.events.on("instance-visibility-changed",(({index:e})=>{this._requestUpdateCycle(!0),this.metadata.notifyGraphicVisibilityChanged(e)})),this._instanceData.events.on("instance-highlight-changed",(()=>this._requestUpdateCycle(!0)))])}get _allRenderInstanceData(){const e=[this._defaultRenderInstanceData];for(const t of this._highlightRenderInstanceDataMap)e.push(t[1]);return e}hasHighlightOptions(e){return this._highlightRenderInstanceDataMap.has(e)}get _enableLevelSelection(){return this.symbol.levels.length>1}get levels(){return this._levels}get baseBoundingBox(){return this._levels[this._levels.length-1].boundingBox}get baseBoundingSphere(){return this._levels[this._levels.length-1].boundingSphere}get baseMaterial(){return this._levels[this._levels.length-1].components[0].material}get slicePlaneEnabled(){return this._slicePlane}set slicePlaneEnabled(e){this._slicePlane=e}get layerUid(){return this.metadata.layerUid}get instanceData(){return this._instanceData}get hasEmissions(){return this._levels.some((e=>e.components.some((e=>e.material.hasEmissions))))}get usedMemory(){return this._allRenderInstanceData.reduce(((e,t)=>t.reduce(((e,t)=>e+t.usedMemory),e)),this._levels.reduce(((e,t)=>e+t.components.reduce(((e,t)=>e+t.usedMemory),0)),0))}get renderStats(){const e=this._instanceData.size,t=[];return this._levels.forEach(((e,i)=>{const r=this._allRenderInstanceData[0][i].size+this._allRenderInstanceData[1][i].size,s=e.triangleCount;t.push({renderedInstances:r,renderedTriangles:r*s,trianglesPerInstance:s})})),{totalInstances:e,renderedInstances:t.reduce(((e,t)=>e+t.renderedInstances),0),renderedTriangles:t.reduce(((e,t)=>e+t.renderedTriangles),0),levels:t}}_createRenderInstanceDataArray(e=[]){const{rctx:t}=this._context.renderContext;return this.symbol.levels.map((i=>{e.push(new it(t,this._instanceBufferLayout))})),e}async initializeRenderContext(e,t){this._context=e,this._createRenderInstanceDataArray(this._defaultRenderInstanceData);const i=await Promise.allSettled(this.symbol.levels.map((i=>Tt.create(e,i,t)))),r=i.map((e=>"fulfilled"===e.status?e.value:null)).filter(_.Ru);if((0,n.G4)(t)||r.length!==i.length){r.forEach((e=>e.destroy())),(0,n.Te)(t);for(const e of i)if("rejected"===e.status)throw e.reason}this._levels=r,this._levelSelector=(e=>{const t=e.baseBoundingSphere.radius,i=e.levels.map((e=>e.minScreenSpaceRadius));return new ft(t,i)})(this)}uninitializeRenderContext(){this._invalidateOctree(),this._levels.forEach((e=>e.destroy())),this._defaultRenderInstanceData.forEach((e=>e.destroy())),this._highlightRenderInstanceDataMap.forEach((e=>e.forEach((e=>e.destroy()))))}_hasTransparentLevels(){return this._levels.some((e=>e.components.some((e=>{const t=e.material.produces.get(me.N.TRANSPARENT_MATERIAL);return t?.(ce.V.Color)}))))}hasHighlights(){return(0,Re.Bs)(this._highlightRenderInstanceDataMap,(e=>e.some((e=>e.size>0))))}_produces(e){return e!==ce.V.Highlight&&e!==ce.V.ShadowHighlight||this.hasHighlights()}prepareRender(e){if(!re.b.LOD_INSTANCE_RENDERER_DISABLE_UPDATES){if(this._enableLevelSelection){const t=e.bind.contentCamera.equals(this._camera);this._camera.copyFrom(e.bind.contentCamera),t||this._requestUpdateCycle()}this._needFullCycle&&(this.runTask(Ct.Bb),this._needFullCycle=!1)}}acquireTechniques(e){if(!this.baseMaterial.visible||!this.baseMaterial.isVisibleForOutput(e.output))return null;const t=this._getInstanceDatas(e);if(!t)return null;const i=new Array,r=this.levels;return t.forEach((t=>r.forEach((({components:r},s)=>r.forEach((r=>i.push(this._beginComponent(e,t[s],r)))))))),i}render(e,t){const i=this._getInstanceDatas(e);if(!i||null==t)return;let r=0;e.rctx.bindVAO();const s=this.levels;i.forEach((i=>s.forEach((({components:s},n)=>s.forEach((s=>this._renderComponent(e,t[r++],i[n],s,n)))))))}_getInstanceDatas(e){const{output:t,bind:i}=e,r=t===ce.V.Highlight,s=!r&&t!==ce.V.ShadowHighlight,n=t!==ce.V.ShadowExcludeHighlight;if(s)return n?this._allRenderInstanceData:[this._defaultRenderInstanceData];if(n){if(r){const e=i.highlight?.name;if(!e)return null;const t=this._highlightRenderInstanceDataMap.get(e);return t?[t]:null}return Array.from(this._highlightRenderInstanceDataMap.values())}return null}intersect(e,t,i,r){if(!this.baseMaterial.visible||null==this._octree)return;const s=(0,N.vt)();(0,Se.d)(s,r,i);const n=s=>{this._instanceData.getCombinedModelTransform(s,Pt),e.transform.set(Pt),(0,Se.t)(zt,i,e.transform.inverse),(0,Se.t)(Nt,r,e.transform.inverse);const n=this._instanceData.getState(s),o=this._instanceData.getLodLevel(s),a=this._levels.length;(0,Ye.vA)(!!(n&st.ACTIVE),"invalid instance state"),(0,Ye.vA)(o>=0&&o<a,"invaid lod level"),this._levels[o].intersect(e,t,zt,Nt,s,this.metadata,a)};this.baseMaterial.parameters.verticalOffset?this._octree.forEach(n):this._octree.forEachAlongRay(i,s,n)}notifyShaderTransformationChanged(){this._invalidateOctree(),this._requestUpdateCycle()}get _octree(){if(null==this._octreeCached){const e=this._instanceData,t=e.view?.state;if(!t)return null;this._octreeCached=new ut(e,this.baseBoundingSphere);for(let i=0;i<e.capacity;++i)t.get(i)&st.ACTIVE&&this._octreeCached.addInstance(i)}return this._octreeCached}_invalidateOctree(){this._octreeCached=(0,Q.pR)(this._octreeCached)}queryDepthRange(e){if(null==this._octree)return new Ze;const t=e.viewForward,i=this._octree.findClosest(t,ke.A.DepthOrder.FRONT_TO_BACK,e.frustum),r=this._octree.findClosest(t,ke.A.DepthOrder.BACK_TO_FRONT,e.frustum);if(null==i||null==r)return new Ze;const s=e.eye,n=this._instanceData.view;n.boundingSphere.getVec(i,Lt),(0,Se.d)(Lt,Lt,s);const o=(0,Se.f)(Lt,t)-Lt[3];n.boundingSphere.getVec(r,Lt),(0,Se.d)(Lt,Lt,s);const a=(0,Se.f)(Lt,t)+Lt[3];return new Ze(o,a)}_requestUpdateCycle(e=!1){this._updateCyclesWithStaticCamera=-1,this._cycleStartIndex=this._instanceIndex,e&&(this._needFullCycle=!0,this._context.requestRender())}_startUpdateCycle(){this._updateCyclesWithStaticCamera++,this._allRenderInstanceData.forEach((e=>e.forEach((e=>e.startUpdateCycle()))))}get running(){return this._instanceData.size>0&&this._updateCyclesWithStaticCamera<1}runTask(e){const{_enableLevelSelection:t,_camera:i,_levelSelector:r}=this;this._allRenderInstanceData.forEach((e=>e.forEach((e=>e.beginUpdate()))));const s=this._instanceData,n=s.view;let o=s.size;const a=s.capacity;let l=this._instanceIndex;const c=Math.ceil(a/500);for(let h=0;h<o&&!e.done;++h){l===this._cycleStartIndex&&this._startUpdateCycle();const h=n.state.get(l);let d=0;if(!(h&st.ALLOCATED)){l=l+1===a?0:l+1,o++;continue}const u=n.lodLevel.get(l);if(h&st.DEFAULT_ACTIVE&&this._defaultRenderInstanceData[u].freeTail(),h&st.HIGHLIGHT_ACTIVE){const e=s.geHighlightOptionsPrev(l);if(e){const t=this._highlightRenderInstanceDataMap.get(e);if(!t)throw new P.A("Internal error in lodRenderer");t[u].freeTail()}}if(h&st.REMOVE)s.freeInstance(l);else if(h&st.VISIBLE){let e=0;if(t&&(n.modelOrigin.getVec(l,Dt),e=r.selectLevel(Dt,s.getCombinedMedianScaleFactor(l),i)),d=h&~(st.ACTIVE|st.TRANSFORM_CHANGED),e>=0)if(h&st.HIGHLIGHT){const t=s.getHighlightName(l);if(t){const i=()=>{const e=this._createRenderInstanceDataArray();return e.forEach((e=>e.beginUpdate())),e},r=(0,Re.tE)(this._highlightRenderInstanceDataMap,t,i);if(e>=r.length)throw new P.A(`LodRenderer internal error - missing lodLevel ${e}`);Ft(r[e],n,l)}d|=st.HIGHLIGHT_ACTIVE}else Ft(this._defaultRenderInstanceData[e],n,l),d|=st.DEFAULT_ACTIVE;n.state.set(l,d),n.lodLevel.set(l,e)}else d=h&~(st.ACTIVE|st.TRANSFORM_CHANGED),n.state.set(l,d);if(null!=this._octreeCached){const e=!!(h&st.ACTIVE),t=!!(d&st.ACTIVE);!e&&t?this._octreeCached.addInstance(l):e&&!t?this._octreeCached.removeInstance(l):e&&t&&h&st.TRANSFORM_CHANGED&&(this._octreeCached.removeInstance(l),this._octreeCached.addInstance(l))}l=l+1===a?0:l+1,l%c==0&&e.madeProgress()}this._instanceIndex=l,this._allRenderInstanceData.forEach((e=>e.forEach((e=>e.endUpdate())))),this._context.requestRender()}_beginComponent(e,t,i){if(0===t.size)return null;const r=i.glMaterials.load(e.rctx,e.bind.slot,e.output);return r?.beginSlot(e.bind)}_renderComponent(e,t,i,r,s){if(!t)return;const{bind:n,rctx:o}=e;o.runAppleAmdDriverHelper();const a=o.bindTechnique(t,n,r.material.parameters,Ht);o.bindVAO(r.vao),t.ensureAttributeLocations(r.vao),re.b.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL&&e.output===ce.V.Color&&(a.setUniform4fv("externalColor",Bt[Math.min(s,Bt.length-1)]),a.setUniform1i("colorMixMode",Ot.Um.replace));const l=i.capacity,c=i.headIndex,h=i.tailIndex,d=i.firstIndex,u=this._glInstanceBufferLayout,f=(e,s)=>{(0,vt.yu)(o,Ge.D,i.buffer,u,e),o.drawArraysInstanced(t.primitiveType,0,r.vertexCount,s-e),(0,vt.Hi)(o,Ge.D,i.buffer,u)};r.material.parameters.transparent&&null!=d?c>h?((0,Ye.vA)(d>=h&&d<=c,"invalid firstIndex"),f(d,c),f(h,d)):c<h&&(d<=c?((0,Ye.vA)(d>=0&&d<=c,"invalid firstIndex"),f(d,c),f(h,l),f(0,d)):((0,Ye.vA)(d>=h&&d<=l,"invalid firstIndex"),f(d,l),f(0,c),f(h,d))):c>h?f(h,c):c<h&&(f(0,c),f(h,l)),o.bindVAO(null)}};function Ft(e,t,i){const r=e.allocateHead();!function(e,t,i,r){(function(e,t,i,r,s){Mt[0]=e.get(t,0),Mt[1]=e.get(t,1),Mt[2]=e.get(t,2),(0,Rt.jS)(Mt,St,3),i.set(s,0,St[0]),r.set(s,0,St[1]),i.set(s,1,St[2]),r.set(s,1,St[3]),i.set(s,2,St[4]),r.set(s,2,St[5])})(e.modelOrigin,t,i.modelOriginHi,i.modelOriginLo,r),i.model.copyFrom(r,e.model,t),i.modelNormal.copyFrom(r,e.modelNormal,t),e.color&&i.color&&i.color.copyFrom(r,e.color,t),e.objectAndLayerIdColor&&i.objectAndLayerIdColor&&i.objectAndLayerIdColor.copyFrom(r,e.objectAndLayerIdColor,t),e.featureAttribute&&i.featureAttribute&&i.featureAttribute.copyFrom(r,e.featureAttribute,t)}(t,i,e.view,r)}(0,r._)([(0,a.MZ)({constructOnly:!0})],Et.prototype,"symbol",void 0),(0,r._)([(0,a.MZ)({constructOnly:!0})],Et.prototype,"optionalFields",void 0),(0,r._)([(0,a.MZ)({constructOnly:!0})],Et.prototype,"metadata",void 0),(0,r._)([(0,a.MZ)({constructOnly:!0})],Et.prototype,"shaderTransformation",void 0),(0,r._)([(0,a.MZ)()],Et.prototype,"_instanceData",void 0),(0,r._)([(0,a.MZ)()],Et.prototype,"_cycleStartIndex",void 0),(0,r._)([(0,a.MZ)({readOnly:!0})],Et.prototype,"_enableLevelSelection",null),(0,r._)([(0,a.MZ)()],Et.prototype,"_updateCyclesWithStaticCamera",void 0),(0,r._)([(0,a.MZ)({readOnly:!0})],Et.prototype,"running",null),Et=(0,r._)([(0,h.$)("esri.views.3d.webgl-engine.lib.lodRendering.LodRenderer")],Et);const Dt=(0,N.vt)(),Lt=(0,K.vt)(),Pt=(0,Me.vt)(),zt=(0,N.vt)(),Nt=(0,N.vt)(),Bt=[(0,K.fA)(1,0,1,1),(0,K.fA)(0,0,1,1),(0,K.fA)(0,1,0,1),(0,K.fA)(1,1,0,1),(0,K.fA)(1,0,0,1)],Ht=new It.V;class jt{constructor(e,t=null){this.geometry=e,this.textures=t}get material(){return this.geometry.material}get numTriangles(){return this.geometry instanceof Te.J?this.geometry.indexCount/3:this.geometry.elementCount/3}}class Vt{constructor(e,t,i){this.components=e,this.minScreenSpaceRadius=t,this.pivotOffset=i;const r=(0,_.Am)(this.components.map((e=>e.geometry)));this.numVertices=r.reduce(((e,t)=>e+function(e){return e instanceof Te.J?e.attributes.get(Oe.r.POSITION).indices.length:e.elementCount}(t)),0)}}class Ut{constructor(e){this.levels=e,this.levels.sort(((e,t)=>e.minScreenSpaceRadius===t.minScreenSpaceRadius?e.numVertices-t.numVertices:e.minScreenSpaceRadius-t.minScreenSpaceRadius))}}let Gt=class{constructor(e){this._optionalFields=new Array,this._featureIdToInstanceIndex=new Map,this._disposeResourceHandles=new Array,this._lodRendererResources=null,this.layerUid=e.layerUid,this.view=e.view,this.sharedResources=this.view.sharedSymbolResources,this.scheduler=this.view.resourceController.scheduler}get numFeatures(){return this._featureIdToInstanceIndex.size}get usedMemory(){const e=this._lodRendererResources?.lodRenderer,t=e?.symbol;let i=0;if(t){const e=[],r=[];t.levels.forEach((t=>t.components.forEach((t=>{t.geometry instanceof Te.J||e.push(t.geometry),t.textures&&r.push(...t.textures)}))));const s=(0,_.Am)(e).reduce(((e,t)=>e+t.buffer.byteLength+b.i5),0);i=(0,_.Am)(r).reduce(((e,t)=>e+t.memoryEstimate),0)+s}return i+16*this._featureIdToInstanceIndex.size}destroy(){this._disposeResourceHandles.forEach((e=>e()))}async doLoad(e,t,i){(0,l.A)("enable-feature:objectAndLayerId-rendering")&&this._optionalFields.push(Oe.r.OBJECTANDLAYERIDCOLOR);const r=function(e,t){const i=t.levels.map((t=>{const i=t.components.map((t=>{const i=e(t.materialId);if(!function(e){return null!=e&&"materialType"in e&&"default"===e.materialType}(i))throw new Error("LodRenderer only supports DefaultMaterial");const r=i.createBufferWriter(),s={material:i,vertexBufferLayout:r.vertexBufferLayout,buffer:t.renderGeometryBuffer.data,elementCount:t.renderGeometryBuffer.elementCount,boundingInfo:t.boundingInfo};return new jt(s)}));return new Vt(i,t.minScreenSpaceRadius)}));return new Ut(i)}((e=>t(e)),e),s=this.view._stage,o=function(e){const t=[];return e.levels.forEach((e=>e.components.forEach((e=>t.push(e.geometry.material))))),(0,_.Am)(t)}(r);s.addMany(o),this._addDisposeResource((()=>s.removeMany(o)));const a=function(e){const t=new Array;return e.levels.forEach((e=>e.components.forEach((e=>{null!=e.textures&&t.push(...e.textures)})))),(0,_.Am)(t)}(r);s.addMany(a),this._addDisposeResource((()=>{a.forEach((e=>e.unload())),s.removeMany(a)})),await Promise.all(a.map((e=>this.view._stage.schedule((()=>e.load(s.renderView.renderingContext)),i)))),(0,n.Te)(i);const c=await this._createLodRenderer(r,i);this._lodRendererResources={lodRenderer:c,materials:o,textures:a}}addInstances(e){const t=this._lodRendererResources;if(null==t)return;const{featureIds:i,localTransforms:r,globalTransforms:s}=e,n=t.lodRenderer;if(null==n)return;const o=n.instanceData,a=i.length;for(let e=0;e<a;++e){const t=i[e],n=o.addInstance(),a=o.view,l=16*e;a.localTransform.copyFromTypedBuffer(n,r,l),a.globalTransform.copyFromTypedBuffer(n,s,l),o.updateModelTransform(n),o.setVisible(n,!0),this._featureIdToInstanceIndex.set(t,n)}}removeInstances(e){const t=this._lodRendererResources;if(null==t)return;const i=t.lodRenderer.instanceData,r=this._featureIdToInstanceIndex,s=e.length;for(let t=0;t<s;++t){const s=e[t],n=r.get(s);null!=n&&(i.removeInstance(n),r.delete(s))}}_addDisposeResource(e){this._disposeResourceHandles.push(e)}async _createLodRenderer(e,t){const i=this.view._stage,r={layerUid:this.layerUid,graphicUid:e=>1,notifyGraphicGeometryChanged:e=>1,notifyGraphicVisibilityChanged:e=>1},s=new Et({symbol:e,optionalFields:this._optionalFields,metadata:r,shaderTransformation:null},this.scheduler);return s.slicePlaneEnabled=!1,this._addDisposeResource((()=>{i.removeRenderPlugin(s),s.destroy()})),await i.addRenderPlugin(s,t),s}};Gt=(0,r._)([(0,h.$)("esri.views.3d.layers.graphics.pipeline.rendering.LodRenderer")],Gt);var Zt=i(40804),qt=i(48833);function kt(e,t,i){return i&&(t/=Math.SQRT2),Xt(e,((r,s)=>{let n=r-.5*e+.25,o=.5*e-s-.75;if(i){const e=(n+o)/Math.SQRT2;o=(o-n)/Math.SQRT2,n=e}return Math.max(Math.abs(n),Math.abs(o))-.5*t}))}function Yt(e,t,i,r=0){t-=r,i&&(t*=Math.SQRT2);const s=.5*t;return Xt(e,((t,n)=>{let o,a=t-.5*e,l=.5*e-n-1;if(i){const e=(a+l)/Math.SQRT2;l=(l-a)/Math.SQRT2,a=e}return a=Math.abs(a),l=Math.abs(l),o=a>l?a>s?Math.sqrt((a-s)*(a-s)+l*l):l:l>s?Math.sqrt(a*a+(l-s)*(l-s)):a,o-=r/2,o}))}function Wt(e,t,i){return(r,s)=>{const n=r-e,o=s-t;return Math.sqrt(n*n+o*o)-i}}function $t(e,t,i){const r=Math.sqrt(t*t+i*i);return(s,n)=>{const o=Math.abs(s-e)-i,a=n-e+t/2+.75,l=(t*o+i*a)/r,c=-a;return Math.max(l,c)}}function Xt(e,t){const i=new Uint8Array(4*e*e);for(let r=0;r<e;r++)for(let s=0;s<e;s++){const n=s+e*r;let o=t(s,r);o=o/e+.5,(0,Zt.U)(o,i,4*n)}return i}var Jt=i(11787);var Qt=i(78662),Kt=i(40268),ei=i(35093),ti=i(16943),ii=i(25634),ri=i(11725),si=i(77194);class ni{constructor(){this.scale=0,this.factor=0,this.minScaleFactor=0}}var oi=i(59907),ai=i(13259),li=i(97220),ci=i(98958),hi=i(59643),di=i(33524),ui=i(90644);class fi extends ci.w{constructor(e,t,r){super(e,t,new li.$(ai.H,(()=>i.e(8241).then(i.bind(i,48241)))),r),this.primitiveType=t.occlusionPass?Ke.WR.POINTS:Ke.WR.TRIANGLES}initializePipeline(e){const{oitPass:t,hasPolygonOffset:i,draped:r,output:s,depthTestEnabled:n,occlusionPass:o}=e,a=t===hi.Y.NONE,l=t===hi.Y.ColorAlpha,c=s===ce.V.Highlight,h=n&&!r&&!l&&!o&&!c;return(0,ui.Ey)({blending:(0,ce.RN)(s)?a?ui.Os:(0,di.ez)(t):null,depthTest:n&&!r?{func:Ke.MT.LEQUAL}:null,depthWrite:h?ui.Uy:null,drawBuffers:(0,di.m6)(t,s),colorWrite:ui.kn,polygonOffset:i?pi:null})}}const pi={factor:0,units:-4};var _i=i(53466),mi=i(22911),gi=i(51976),vi=i(35256);class yi extends vi.E{constructor(e){super(),this.spherical=e,this.screenCenterOffsetUnitsEnabled=!1,this.occlusionTestEnabled=!0,this.signedDistanceFieldEnabled=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.vvSize=!1,this.vvColor=!1,this.hasVerticalOffset=!1,this.hasScreenSizePerspective=!1,this.hasRotation=!1,this.debugDrawLabelBorder=!1,this.hasPolygonOffset=!1,this.depthTestEnabled=!0,this.pixelSnappingEnabled=!0,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.occlusionPass=!1,this.occludedFragmentFade=!1,this.objectAndLayerIdColorInstanced=!1,this.horizonCullingEnabled=!0,this.isFocused=!0,this.textureCoordinateType=_i.I.None,this.emissionSource=mi.ZX.None,this.discardInvisibleFragments=!0,this.hasVvInstancing=!1}}(0,r._)([(0,gi.W)()],yi.prototype,"screenCenterOffsetUnitsEnabled",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"occlusionTestEnabled",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"signedDistanceFieldEnabled",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"sampleSignedDistanceFieldTexelCenter",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"vvSize",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"vvColor",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"hasVerticalOffset",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"hasScreenSizePerspective",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"hasRotation",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"debugDrawLabelBorder",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"hasPolygonOffset",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"depthTestEnabled",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"pixelSnappingEnabled",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"draped",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"terrainDepthTest",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"cullAboveTerrain",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"occlusionPass",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"occludedFragmentFade",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"objectAndLayerIdColorInstanced",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"horizonCullingEnabled",void 0),(0,r._)([(0,gi.W)()],yi.prototype,"isFocused",void 0);class xi extends ri.im{constructor(e,t){super(e,Gi),this.produces=new Map([[me.N.HUD_MATERIAL,e=>(0,ce.Mb)(e)&&!this.parameters.drawAsLabel],[me.N.LABEL_MATERIAL,e=>(0,ce.Mb)(e)&&this.parameters.drawAsLabel],[me.N.OCCLUSION_PIXELS,()=>this.parameters.occlusionTest],[me.N.DRAPED_MATERIAL,e=>this.parameters.draped&&(0,ce.Mb)(e)]]),this._visible=!0,this._configuration=new yi(t)}getConfiguration(e,t){return this._configuration.output=e,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.hasVerticalOffset=!!this.parameters.verticalOffset,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective,this._configuration.screenCenterOffsetUnitsEnabled="screen"===this.parameters.centerOffsetUnits,this._configuration.hasPolygonOffset=this.parameters.polygonOffset,this._configuration.draped=this.parameters.draped,this._configuration.occlusionTestEnabled=this.parameters.occlusionTest,this._configuration.pixelSnappingEnabled=this.parameters.pixelSnappingEnabled,this._configuration.signedDistanceFieldEnabled=this.parameters.textureIsSignedDistanceField,this._configuration.sampleSignedDistanceFieldTexelCenter=this.parameters.sampleSignedDistanceFieldTexelCenter,this._configuration.hasRotation=this.parameters.hasRotation,this._configuration.vvSize=!!this.parameters.vvSize,this._configuration.vvColor=!!this.parameters.vvColor,this._configuration.occlusionPass=t.slot===me.N.OCCLUSION_PIXELS,this._configuration.occludedFragmentFade=this.parameters.occludedFragmentFade,this._configuration.horizonCullingEnabled=this.parameters.horizonCullingEnabled,this._configuration.isFocused=this.parameters.isFocused,this._configuration.depthTestEnabled=this.parameters.depthEnabled||t.slot===me.N.OCCLUSION_PIXELS,(0,ce.RN)(e)&&(this._configuration.debugDrawLabelBorder=!!re.b.LABELS_SHOW_BORDER),this._configuration.oitPass=t.oitPass,this._configuration.terrainDepthTest=t.terrainDepthTest,this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration}intersect(e,t,i,r,s,n){const{options:{selectionMode:o,hud:a,excludeLabels:l},point:c,camera:h}=i,{parameters:d}=this;if(!o||!a||l&&d.isLabel||!e.visible||!c)return;const{scaleX:u,scaleY:f}=this._getScreenScale(e,h.pixelRatio);(0,We.z0)(Fi,t),e.attributes.has(Oe.r.FEATUREATTRIBUTE)&&function(e){const t=e[0],i=e[1],r=e[2],s=e[3],n=e[4],o=e[5],a=e[6],l=e[7],c=e[8],h=1/Math.sqrt(t*t+i*i+r*r),d=1/Math.sqrt(s*s+n*n+o*o),u=1/Math.sqrt(a*a+l*l+c*c);e[0]=t*h,e[1]=i*h,e[2]=r*h,e[3]=s*d,e[4]=n*d,e[5]=o*d,e[6]=a*u,e[7]=l*u,e[8]=c*u}(Fi);const p=e.attributes.get(Oe.r.POSITION),_=e.attributes.get(Oe.r.SIZE),m=e.attributes.get(Oe.r.NORMAL),g=e.attributes.get(Oe.r.ROTATION),v=e.attributes.get(Oe.r.CENTEROFFSETANDDISTANCE);(0,Ye.vA)(p.size>=3);const y=(0,ai.c)(d),x="screen"===this.parameters.centerOffsetUnits;for(let e=0;e<p.data.length/p.size;e++){const r=e*p.size;(0,Se.i)(Oi,p.data[r],p.data[r+1],p.data[r+2]),(0,Se.t)(Oi,Oi,t),(0,Se.t)(Oi,Oi,h.viewMatrix);const s=e*v.size;if((0,Se.i)(Pi,v.data[s],v.data[s+1],v.data[s+2]),!x&&(Oi[0]+=Pi[0],Oi[1]+=Pi[1],0!==Pi[2])){const e=Pi[2];(0,Se.n)(Pi,Oi),(0,Se.d)(Oi,Oi,(0,Se.h)(Pi,Pi,e))}const o=e*m.size;if((0,Se.i)(Ri,m.data[o],m.data[o+1],m.data[o+2]),wi(Ri,Fi,h,Bi),this._applyVerticalOffsetTransformationView(Oi,Bi,h,Ti),h.applyProjection(Oi,Mi),Mi[0]>-1){x&&(Pi[0]||Pi[1])&&(Mi[0]+=Pi[0]*h.pixelRatio,0!==Pi[1]&&(Mi[1]+=(0,si.m0)(Pi[1],Ti.factorAlignment)*h.pixelRatio),h.unapplyProjection(Mi,Oi)),Mi[0]+=this.parameters.screenOffset[0]*h.pixelRatio,Mi[1]+=this.parameters.screenOffset[1]*h.pixelRatio,Mi[0]=Math.floor(Mi[0]),Mi[1]=Math.floor(Mi[1]);const t=e*_.size;Vi[0]=_.data[t],Vi[1]=_.data[t+1],(0,si.MD)(Vi,Ti.factor,Vi);const r=Hi*h.pixelRatio;let s=0;d.textureIsSignedDistanceField&&(s=Math.min(d.outlineSize,.5*Vi[0])*h.pixelRatio/2),Vi[0]*=u,Vi[1]*=f;const o=e*g.size,a=d.rotation+g.data[o];if(Ai(c,Mi[0],Mi[1],Vi,r,s,a,d,y)){const e=i.ray;if((0,Se.t)(Ii,Oi,(0,Ee.B8)(Li,h.viewMatrix)),Mi[0]=c[0],Mi[1]=c[1],h.unprojectFromRenderScreen(Mi,Oi)){const t=(0,N.vt)();(0,Se.c)(t,e.direction);const i=1/(0,Se.l)(t);(0,Se.h)(t,t,i),n((0,Se.j)(e.origin,Oi)*i,t,-1,!0,1,Ii)}}}}}intersectDraped(e,t,i,r,s,n){const o=e.attributes.get(Oe.r.POSITION),a=e.attributes.get(Oe.r.SIZE),l=e.attributes.get(Oe.r.ROTATION),c=this.parameters,h=(0,ai.c)(c),{scaleX:d,scaleY:u}=this._getScreenScale(e,e.screenToWorldRatio),f=ji*e.screenToWorldRatio;for(let t=0;t<o.data.length/o.size;t++){const i=t*o.size,p=o.data[i],_=o.data[i+1],m=t*a.size;Vi[0]=a.data[m],Vi[1]=a.data[m+1];let g=0;c.textureIsSignedDistanceField&&(g=Math.min(c.outlineSize,.5*Vi[0])*e.screenToWorldRatio/2),Vi[0]*=d,Vi[1]*=u;const v=t*l.size,y=c.rotation+l.data[v];Ai(r,p,_,Vi,f,g,y,c,h)&&s(n.dist,n.normal,-1,!1)}}createBufferWriter(){return new ki}_updateScaleInfo(e,t,i){const r=this.parameters;null!=r.screenSizePerspective?(0,si.cJ)(i,t,r.screenSizePerspective,e.factor):(e.factor.scale=1,e.factor.factor=0,e.factor.minScaleFactor=0),null!=r.screenSizePerspectiveAlignment?(0,si.cJ)(i,t,r.screenSizePerspectiveAlignment,e.factorAlignment):(e.factorAlignment.factor=e.factor.factor,e.factorAlignment.scale=e.factor.scale,e.factorAlignment.minScaleFactor=e.factor.minScaleFactor)}applyShaderOffsetsView(e,t,i,r,s,n,o){const a=wi(t,i,s,Bi);return this._applyVerticalGroundOffsetView(e,a,s,o),this._applyVerticalOffsetTransformationView(o,a,s,n),this._applyPolygonOffsetView(o,a,r[3],s,o),this._applyCenterOffsetView(o,r,o),o}applyShaderOffsetsNDC(e,t,i,r,s){return this._applyCenterOffsetNDC(e,t,i,r),null!=s&&(0,Se.c)(s,r),this._applyPolygonOffsetNDC(r,t,i,r),r}_applyPolygonOffsetView(e,t,i,r,s){const n=r.aboveGround?1:-1;let o=Math.sign(i);0===o&&(o=n);const a=n*o;if(this.parameters.shaderPolygonOffset<=0)return(0,Se.c)(s,e);const l=(0,ie.qE)(Math.abs(t.cosAngle),.01,1),c=1-Math.sqrt(1-l*l)/l/r.viewport[2];return(0,Se.h)(s,e,a>0?c:1/c),s}_applyVerticalGroundOffsetView(e,t,i,r){const s=(0,Se.l)(e),n=i.aboveGround?1:-1,o=i.computeRenderPixelSizeAtDist(s)*Kt.R,a=(0,Se.h)(Oi,t.normal,n*o);return(0,Se.g)(r,e,a),r}_applyVerticalOffsetTransformationView(e,t,i,r){const s=this.parameters;if(!s.verticalOffset?.screenLength){if(s.screenSizePerspective||s.screenSizePerspectiveAlignment){const i=(0,Se.l)(e);this._updateScaleInfo(r,i,t.cosAngle)}else r.factor.scale=1,r.factorAlignment.scale=1;return e}const n=(0,Se.l)(e),o=s.screenSizePerspectiveAlignment??s.screenSizePerspective,a=(0,Ot.kE)(i,n,s.verticalOffset,t.cosAngle,o);return this._updateScaleInfo(r,n,t.cosAngle),(0,Se.h)(t.normal,t.normal,a),(0,Se.g)(e,e,t.normal)}_applyCenterOffsetView(e,t,i){const r="screen"!==this.parameters.centerOffsetUnits;return i!==e&&(0,Se.c)(i,e),r&&(i[0]+=t[0],i[1]+=t[1],t[2]&&((0,Se.n)(Ri,i),(0,Se.g)(i,i,(0,Se.h)(Ri,Ri,t[2])))),i}_applyCenterOffsetNDC(e,t,i,r){const s="screen"!==this.parameters.centerOffsetUnits;return r!==e&&(0,Se.c)(r,e),s||(r[0]+=t[0]/i.fullWidth*2,r[1]+=t[1]/i.fullHeight*2),r}_applyPolygonOffsetNDC(e,t,i,r){const s=this.parameters.shaderPolygonOffset;if(e!==r&&(0,Se.c)(r,e),s){const e=i.aboveGround?1:-1,n=e*Math.sign(t[3]);r[2]-=(n||e)*s}return r}set visible(e){this._visible=e}get visible(){const{color:e,outlineSize:t,outlineColor:i}=this.parameters,r=e[3]>=ei.Q||t>=ei.Q&&i[3]>=ei.Q;return this._visible&&r}createGLMaterial(e){return new bi(e)}calculateRelativeScreenBounds(e,t,i=(0,F.vt)()){return function(e,t,i,r){r[0]=e.anchorPosition[0]*-t[0]+e.screenOffset[0]*i,r[1]=e.anchorPosition[1]*-t[1]+e.screenOffset[1]*i}(this.parameters,e,t,i),i[2]=i[0]+e[0],i[3]=i[1]+e[1],i}_getScreenScale(e,t){const i=e.attributes.get(Oe.r.FEATUREATTRIBUTE);if(null==i)return{scaleX:t,scaleY:t};const r=(0,K.ci)(i.data,Ni);return(0,Qt.VC)(zi,this.parameters,r),{scaleX:zi[0]*t,scaleY:zi[1]*t}}}class bi extends ii.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){return this.updateTexture(this._material.parameters.textureId),this._material.setParameters(this.textureBindParameters),this.acquireTechnique(fi,e)}}function wi(e,t,i,r){return function(e){return(t=e)instanceof Float32Array&&t.length>=16||function(e){return Array.isArray(e)&&e.length>=16}(e);var t}(t)&&(t=(0,We.z0)(Di,t)),(0,Se.q)(r.normal,e,t),(0,Se.t)(r.normal,r.normal,i.viewInverseTransposeMatrix),r.cosAngle=(0,Se.f)(Si,Ui),r}function Ai(e,t,i,r,s,n,o,a,l){let c=t-s-r[0]*l[0],h=c+r[0]+2*s,d=i-s-r[1]*l[1],u=d+r[1]+2*s;const f=a.distanceFieldBoundingBox;return a.textureIsSignedDistanceField&&null!=f&&(c+=r[0]*f[0],d+=r[1]*f[1],h-=r[0]*(1-f[2]),u-=r[1]*(1-f[3]),c-=n,h+=n,d-=n,u+=n),(0,ee.hZ)(Ei,t,i),(0,ee.e$)(Ci,e,Ei,(0,ie.kU)(o)),Ci[0]>c&&Ci[0]<h&&Ci[1]>d&&Ci[1]<u}const Ti=new class{constructor(){this.factor=new ni,this.factorAlignment=new ni}},Oi=(0,N.vt)(),Ri=(0,N.vt)(),Mi=(0,K.vt)(),Si=(0,N.vt)(),Ii=(0,N.vt)(),Ci=(0,te.vt)(),Ei=(0,te.vt)(),Fi=(0,$e.vt)(),Di=(0,$e.vt)(),Li=(0,Me.vt)(),Pi=(0,N.vt)(),zi=(0,N.vt)(),Ni=(0,K.vt)(),Bi={normal:Si,cosAngle:0},Hi=1,ji=2,Vi=[0,0],Ui=(0,N.fA)(0,0,1);class Gi extends ii.NV{constructor(){super(...arguments),this.renderOccluded=ri.m$.Occlude,this.isDecoration=!1,this.color=(0,K.CN)(1,1,1,1),this.polygonOffset=!1,this.anchorPosition=(0,te.fA)(.5,.5),this.screenOffset=[0,0],this.shaderPolygonOffset=1e-5,this.textureIsSignedDistanceField=!1,this.sampleSignedDistanceFieldTexelCenter=!1,this.outlineColor=(0,K.CN)(1,1,1,1),this.outlineSize=0,this.rotation=0,this.hasRotation=!1,this.vvSizeEnabled=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.hasSlicePlane=!1,this.pixelSnappingEnabled=!0,this.occlusionTest=!0,this.occludedFragmentFade=!1,this.horizonCullingEnabled=!1,this.centerOffsetUnits="world",this.drawAsLabel=!1,this.depthEnabled=!0,this.isFocused=!0,this.focusEffect="none",this.draped=!1,this.isLabel=!1}}const Zi=(0,Ie.BP)().vec3f(Oe.r.POSITION).vec3f(Oe.r.NORMAL).vec2f(Oe.r.UV0).vec4u8(Oe.r.COLOR).vec2f(Oe.r.SIZE).f32(Oe.r.ROTATION).vec4f(Oe.r.CENTEROFFSETANDDISTANCE).vec4f(Oe.r.FEATUREATTRIBUTE),qi=Zi.clone().vec4u8(Oe.r.OBJECTANDLAYERIDCOLOR);class ki{constructor(){this.vertexBufferLayout=(0,ti.E)()?qi:Zi}elementCount(e){return 6*e.get(Oe.r.POSITION).indices.length}write(e,t,i,r,s,n){(0,oi.Hk)(i.get(Oe.r.POSITION),e,s.position,n,6),(0,oi.p1)(i.get(Oe.r.NORMAL),t,s.normal,n,6);const o=i.get(Oe.r.UV0)?.data;let a=0,l=0,c=1,h=1;o&&o.length>=4&&(a=o[0],l=o[1],c=o[2],h=o[3]),c=Math.min(1.99999,c+1),h=Math.min(1.99999,h+1);let d=i.get(Oe.r.POSITION).indices.length,u=n;const f=s.uv0;for(let e=0;e<d;++e)f.set(u,0,a),f.set(u,1,l),u++,f.set(u,0,c),f.set(u,1,l),u++,f.set(u,0,c),f.set(u,1,h),u++,f.set(u,0,c),f.set(u,1,h),u++,f.set(u,0,a),f.set(u,1,h),u++,f.set(u,0,a),f.set(u,1,l),u++;(0,oi.tb)(i.get(Oe.r.COLOR),4,s.color,n,6);const{data:p,indices:_}=i.get(Oe.r.SIZE);d=_.length;const m=s.size;u=n;for(let e=0;e<d;++e){const t=p[2*_[e]],i=p[2*_[e]+1];for(let e=0;e<6;++e)m.set(u,0,t),m.set(u,1,i),u++}if((0,oi.uO)(i.get(Oe.r.ROTATION),s.rotation,n,6),i.get(Oe.r.CENTEROFFSETANDDISTANCE)?(0,oi.Ut)(i.get(Oe.r.CENTEROFFSETANDDISTANCE),s.centerOffsetAndDistance,n,6):(0,oi.Pq)(s.centerOffsetAndDistance,n,6*d),i.get(Oe.r.FEATUREATTRIBUTE)?(0,oi.Ut)(i.get(Oe.r.FEATUREATTRIBUTE),s.featureAttribute,n,6):(0,oi.Pq)(s.featureAttribute,n,6*d),null!=r){const e=i.get(Oe.r.POSITION)?.indices;if(e){const t=e.length,i=s.getField(Oe.r.OBJECTANDLAYERIDCOLOR,Xe.XP);(0,oi.tH)(r,i,t,n,6)}}}}var Yi=i(74810);let Wi=class extends p.A{constructor(e){super(),this.view=null,this.layerUid=null,this._renderGeometries=new Map,this._materials=new Map,this._directRenderers=new Map,this._lodRenderers=new Map,this.totalFeatures=0,this.view=e.view,this.layerUid=e.layerUid}initialize(){}destroy(){this.removeAllHandles(),this._lodRenderers.forEach((e=>e.destroy()))}async executeRenderCommands(e){for(const t of e)switch(t.id){case"create-material":await this._createMaterial(t);break;case"create-direct-renderer":await this._createDirectRenderer(t);break;case"add-direct-renderer-geometry":await this._addDirectRendererGeometry(t),this._updateFeatureCount();break;case"remove-direct-renderer-geometry":await this._removeDirectRendererGeometry(t),this._updateFeatureCount();break;case"create-lod-renderer":await this._createLodRenderer(t);break;case"add-lod-instances":await this._addLodInstances(t),this._updateFeatureCount();break;case"remove-lod-instances":await this._removeLodInstances(t),this._updateFeatureCount()}}_updateFeatureCount(){let e=0;for(const t of this._directRenderers.values())e+=t.numFeatures;for(const t of this._lodRenderers.values())e+=t.numFeatures;this._set("totalFeatures",e)}get usedMemory(){let e=0;for(const t of this._directRenderers.values())e+=t.usedMemory;for(const t of this._lodRenderers.values())e+=t.usedMemory;return e}async _createMaterial(e){const{view:t}=this,{sharedSymbolResources:i}=t;if(null==i)throw new Error("No shared symbol resources found!");const{textures:r}=i,s=t.state.viewingMode===$.RT.Global;let n=null;switch(e.type){case"default":n=function(e,t,i){const r={usePBR:t.physicalBasedRenderingEnabled,isSchematic:!0,mrrFactors:Yi.Bt,ambient:N.Un,diffuse:N.Un,hasSlicePlane:t.slicePlaneEnabled,castShadows:t.castShadows,offsetTransparentBackfaces:!t.isPrimitive};return function(e){const t=e.opacity??1,i=t<1;e.transparent=i,e.opacity=t,e.cullFace=i?pe.s2.None:pe.s2.Back}(r),t.screenSizePerspectiveEnabled&&(r.screenSizePerspective=e.screenSizePerspectiveSettings),r.externalColor=K.Un,r.isInstanced=!0,new Jt.$U(r,{spherical:i,doublePrecisionRequiresObfuscation:!0})}(i,{physicalBasedRenderingEnabled:!0,slicePlaneEnabled:!1,castShadows:!0,isPrimitive:!0,screenSizePerspectiveEnabled:!0,doublePrecisionRequiresObfuscation:t._stage.renderView.renderingContext.driverTest.doublePrecisionRequiresObfuscation.result},s);break;case"hud":{const[e,t]=$i(r,s);this.addHandles([(0,J.hA)((()=>(0,Q.Gz)(t)))]),n=e}break;default:throw new Error(`unable to create unknown material type ${e.type}`)}this._materials.set(e.materialId,n)}_getMaterial(e){return this._materials.get(e)}async _createDirectRenderer(e){const t=e.materialId,i=this._getMaterial(t);if(null==i)throw new Error(`material not found ${t}`);const{view:r}=this,s=new ye({material:i});this._directRenderers.set(t,s),r._stage.addRenderPlugin(s),r._stage.renderView.renderer.updateHasFlags()}async _addDirectRendererGeometry(e){const t=e.renderGeometryId,i=e.materialId;await this._removeDirectRendererGeometry({renderGeometryId:t});const r=this._directRenderers.get(i);if(null==r)return void console.error("no renderer assigned to provided material");const s=r.addRenderGeometry(t,e.renderGeometryBuffer,e.localOrigin);this._renderGeometries.set(t,{renderGeometry:s,materialId:i}),this.view._stage.renderView.requestRender()}async _removeDirectRendererGeometry(e){const t=e.renderGeometryId,i=this._renderGeometries.get(t);if(null==i)return;const r=i.materialId,s=this._directRenderers.get(r);null!=s?s.removeRenderGeometry(e.renderGeometryId):console.error("no renderer assigned to provided material")}async _createLodRenderer(e){const t=new Gt({view:this.view,layerUid:this.layerUid}),i=new AbortController;await t.doLoad(e.lodRenderGeometry,(e=>this._getMaterial(e)),i.signal),this._lodRenderers.set(e.lodRendererId,t)}async _addLodInstances(e){const t=this._lodRenderers.get(e.lodRendererId);if(null==t)throw new Error("no lod renderer assigned to provided lod renderer Id");t.addInstances(e.data)}async _removeLodInstances(e){const t=this._lodRenderers.get(e.lodRendererId);if(null==t)throw new Error("no lod renderer assigned to provided lod renderer Id");t.removeInstances(e.featureIds)}};function $i(e,t){const i={anchorPosition:ae.center,occlusionTest:!0,hasSlicePlane:!1,color:[1,0,0,1],outlineColor:[0,0,0,1],outlineSize:1,distanceFieldBoundingBox:Xi};if(null!=e){const t=e.fromData("circle-icon",(()=>function(e,t=128,i=.5*t,r=0){const s=function(e,t=128,i=.5*t,r=0){switch(e){case"circle":default:return function(e,t){const i=e/2-.5;return Xt(e,Wt(i,i,t/2))}(t,i);case"square":return function(e,t){return kt(e,t,!1)}(t,i);case"cross":return function(e,t,i=0){return Yt(e,t,!1,i)}(t,i,r);case"x":return function(e,t,i=0){return Yt(e,t,!0,i)}(t,i,r);case"kite":return function(e,t){return kt(e,t,!0)}(t,i);case"triangle":return function(e,t){return Xt(e,$t(e/2,t,t/2))}(t,i);case"arrow":return function(e,t){const i=t,r=t/2,s=e/2,n=.8*i,o=Wt(s,(e-t)/2-n,Math.sqrt(n*n+r*r)),a=$t(s,i,r);return Xt(e,((e,t)=>Math.max(a(e,t),-o(e,t))))}(t,i)}}(e,t,i,r);return new qt.g(s,{mipmap:!1,wrap:{s:Ke.pF.CLAMP_TO_EDGE,t:Ke.pF.CLAMP_TO_EDGE},width:t,height:t,components:4,noUnpackFlip:!0,reloadable:!0})}("circle")));i.textureId=t.texture.id,i.textureIsSignedDistanceField=!0,i.sampleSignedDistanceFieldTexelCenter=!1}return[new xi(i,t),null]}(0,r._)([(0,a.MZ)({readOnly:!0})],Wi.prototype,"totalFeatures",void 0),Wi=(0,r._)([(0,h.$)("esri.views.3d.layers.graphics.pipeline.rendering.FeaturePipelineRenderManager")],Wi);const Xi=[.25,.25,.75,.75];class Ji{constructor(e){this._bufferWriter=null,this._bufferWriter=e.createBufferWriter()}createBuffer(e,t){const i=this._bufferWriter;let r=null;if(e.transformation&&t)(0,Ee.C)(Qi,e.transformation),Qi[12]-=t[0],Qi[13]-=t[1],Qi[14]-=t[2],r=Qi;else{if(t)throw new Error("not implemented");e.transformation&&(r=e.transformation)}let s=null;r&&((0,Ee.B8)(Ki,Qi),(0,Ee.mg)(Ki,Ki),s=Ki);const n=e.attributes,o=i.elementCount(n),a=i.vertexBufferLayout.stride/4;o>Math.floor(er/a)&&console.warn("geometry with very large number of elements encountered");const l=i.vertexBufferLayout.createBuffer(o);return i.write(r,s,n,e.objectAndLayerIdColor,l,0),{data:l.buffer,elementCount:o}}}const Qi=(0,Me.vt)(),Ki=(0,Me.vt)(),er=4194304;var tr=i(29920);class ir{constructor(e){this._context=e,this._commands=[],this._transferables=new Set}createMaterial(e){const t=this._context,i=t.generateId("material");switch(e){case"default":{const e=new Jt.$U({},{spherical:this._context.globalViewingMode,doublePrecisionRequiresObfuscation:!0}),r=new Ji(e);t.registerRenderGeometryBufferWriter(i,r)}break;case"hud":{const e=$i(null,this._context.globalViewingMode)[0],r=new Ji(e);t.registerRenderGeometryBufferWriter(i,r)}}return this._commands.push({id:"create-material",type:e,materialId:i}),i}createDirectRenderer(e){const t=this._context.generateId("material-renderer");return this._commands.push({id:"create-direct-renderer",materialRendererId:t,materialId:e}),t}addDirectRendererGeometry(e,t,i){const r=t.materialId,s=this._context.getRenderGeometryBufferWriter(r);if(null==s)throw new Error(`no bufferwriter found for material ${r}`);const n=s.createBuffer(t,i);this._transferables.add(n.data),this._commands.push({id:"add-direct-renderer-geometry",renderGeometryId:e,materialId:r,renderGeometryBuffer:n,localOrigin:i})}removeDirectRendererGeometry(e){this._commands.push({id:"remove-direct-renderer-geometry",renderGeometryId:e})}createLodRenderer(e){const t=this._context.generateId("lod-renderer"),i={levels:e.levels.map((e=>({components:e.components.map((e=>{const t=e.attributes.get(Oe.r.POSITION);if(!t||0===t.indices.length)throw new Error("positions attribute expected");const i=(0,X.tM)(t.indices.length/3),r=new tr.j(i,3,t),s=this._context.getRenderGeometryBufferWriter(e.materialId);if(null==s)throw new Error("writer not found");const n=s.createBuffer(e,null);return this._transferables.add(n.data),{materialId:e.materialId,renderGeometryBuffer:n,boundingInfo:{bbMax:r.bbMax,bbMin:r.bbMin}}})),minScreenSpaceRadius:e.minScreenSpaceRadius})))};return this._commands.push({id:"create-lod-renderer",lodRendererId:t,lodRenderGeometry:i}),t}addLodInstances(e,t){this._commands.push({id:"add-lod-instances",lodRendererId:e,data:t}),this._transferables.add(t.featureIds.buffer),this._transferables.add(t.globalTransforms.buffer),this._transferables.add(t.localTransforms.buffer)}removeLodInstances(e,t){this._commands.push({id:"remove-lod-instances",lodRendererId:e,featureIds:t}),this._transferables.add(t.buffer)}append(e){if(e._context!==this._context)throw new Error("Cannot append encoders from different contexts");const{_commands:t,_transferables:i}=this;for(const i of e._commands)t.push(i);for(const t of e._transferables)i.add(t)}async dispatch(){const e=this._commands,t=Array.from(this._transferables);this._clearCommandBuffer(),await this._context.dispatchRenderCommands(e,t)}_clearCommandBuffer(){this._commands=[],this._transferables.clear()}}class rr{constructor(e){this._idCounter=0,this._bufferWriters=new Map,this._dispatchRenderCommandsCallback=async()=>{},this.globalViewingMode=!1,this.globalViewingMode=e.viewingMode===$.RT.Global,this._dispatchRenderCommandsCallback=e.dispatchRenderCommandsCallback}generateId(e=""){return`${e}${this._idCounter++}`}createEncoder(){return new ir(this)}async dispatchRenderCommands(e,t){0!==e.length&&await this._dispatchRenderCommandsCallback(e,t)}registerRenderGeometryBufferWriter(e,t){this._bufferWriters.set(e,t)}getRenderGeometryBufferWriter(e){return this._bufferWriters.get(e)}}class sr{constructor(e,t){this._renderCommands=e,this._pipelineStateCommands=t}append(e){this.appendRenderCommands(e._renderCommands),this.appendPipelineStateCommands(e._pipelineStateCommands)}appendRenderCommands(e){this._renderCommands.append(e)}appendPipelineStateCommand(e){this._pipelineStateCommands.push(e)}appendPipelineStateCommands(e){const{_pipelineStateCommands:t}=this;for(const i of e)t.push(i)}execute(){for(const e of this._pipelineStateCommands)e();this._renderCommands.dispatch()}}var nr=i(9762),or=i(27993);function ar(e,t){const{featureCount:i}=e;if(0===i)return new Uint32Array;const r=new Uint32Array(i);return e.readObjectIds(r),r}function lr(e,t){const{featureCount:i}=e;if(0===i)return new Float64Array;const r=new Float64Array(3*i);return e.readCoordinates(r),r}var cr=i(48353),hr=i(8887),dr=i(83047);function ur(e){const t=new Map;for(const[i,r]of e)t.set(i,{...r,indices:(0,X.Dg)(r.indices)});return t}i(57251),i(12359),i(95108),i(27615),i(59456),i(52106),i(4718),i(34275),i(65864);var fr,pr,_r=i(57917),mr=i(72385),gr=(i(4197),i(11868)),vr=i(27921),yr=i(46610);(pr=fr||(fr={})).length=function(e,t){const i=e[t],r=e[t+1],s=e[t+2];return Math.sqrt(i*i+r*r+s*s)},pr.normalize=function(e,t){const i=e[t],r=e[t+1],s=e[t+2],n=1/Math.sqrt(i*i+r*r+s*s);e[t]*=n,e[t+1]*=n,e[t+2]*=n},pr.scale=function(e,t,i){e[t]*=i,e[t+1]*=i,e[t+2]*=i},pr.add=function(e,t,i,r,s,n=t){(s=s||e)[n]=e[t]+i[r],s[n+1]=e[t+1]+i[r+1],s[n+2]=e[t+2]+i[r+2]},pr.subtract=function(e,t,i,r,s,n=t){(s=s||e)[n]=e[t]-i[r],s[n+1]=e[t+1]-i[r+1],s[n+2]=e[t+2]-i[r+2]},i(96672),i(87170);const xr=new Array(36);for(let e=0;e<6;e++)for(let t=0;t<6;t++)xr[6*e+t]=e;const br=new Array(36);for(let e=0;e<6;e++)br[6*e]=0,br[6*e+1]=1,br[6*e+2]=2,br[6*e+3]=2,br[6*e+4]=3,br[6*e+5]=0;const wr=(0,mr.fA)(-.5,0,-.5),Ar=(0,mr.fA)(.5,0,-.5),Tr=(0,mr.fA)(0,0,.5),Or=(0,mr.fA)(0,.5,0),Rr=(0,mr.vt)(),Mr=(0,mr.vt)(),Sr=(0,mr.vt)(),Ir=(0,mr.vt)(),Cr=(0,mr.vt)();function Er(e,t){switch(e){case"cone":return((e,i,r=!1)=>({levels:e.map((e=>{const s=ur(i(e.tesselation));return r&&function(e){const t=e,i=t.get(Oe.r.POSITION).data,r=t.get(Oe.r.NORMAL).data;if(r){const t=Fr(e,Oe.r.NORMAL).data;for(let e=0;e<r.length;e+=3){const i=r[e+1];t[e+1]=-r[e+2],t[e+2]=i}}if(i){const t=Fr(e,Oe.r.POSITION).data;for(let e=0;e<i.length;e+=3){const r=i[e+1];t[e+1]=-i[e+2],t[e+2]=r}}}(s),{components:[{attributes:s,objectAndLayerIdColor:void 0,transformation:null,materialId:t}],minScreenSpaceRadius:e.minScreenSpaceRadius}}))}))(Dr,(e=>function(e,t,i,r,s=!0,n=!0){let o=0;const a=t,l=e;let c=(0,mr.fA)(0,o,0),h=(0,mr.fA)(0,o+l,0),d=(0,mr.fA)(0,-1,0),u=(0,mr.fA)(0,1,0);r&&(o=l,h=(0,mr.fA)(0,0,0),c=(0,mr.fA)(0,o,0),d=(0,mr.fA)(0,1,0),u=(0,mr.fA)(0,-1,0));const f=[h,c],p=[d,u],_=i+2,m=Math.sqrt(l*l+a*a);if(r)for(let e=i-1;e>=0;e--){const t=e*(2*Math.PI/i),r=(0,mr.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(r);const s=(0,mr.fA)(l*Math.cos(t)/m,-a/m,l*Math.sin(t)/m);p.push(s)}else for(let e=0;e<i;e++){const t=e*(2*Math.PI/i),r=(0,mr.fA)(Math.cos(t)*a,o,Math.sin(t)*a);f.push(r);const s=(0,mr.fA)(l*Math.cos(t)/m,a/m,l*Math.sin(t)/m);p.push(s)}const g=new Array,v=new Array;if(s){for(let e=3;e<f.length;e++)g.push(1),g.push(e-1),g.push(e),v.push(0),v.push(0),v.push(0);g.push(f.length-1),g.push(2),g.push(1),v.push(0),v.push(0),v.push(0)}if(n){for(let e=3;e<f.length;e++)g.push(e),g.push(e-1),g.push(0),v.push(e),v.push(e-1),v.push(1);g.push(0),g.push(2),g.push(f.length-1),v.push(1),v.push(2),v.push(p.length-1)}const y=(0,gr.oe)(3*_);for(let e=0;e<_;e++)y[3*e]=f[e][0],y[3*e+1]=f[e][1],y[3*e+2]=f[e][2];const x=(0,gr.oe)(3*_);for(let e=0;e<_;e++)x[3*e]=p[e][0],x[3*e+1]=p[e][1],x[3*e+2]=p[e][2];return[[Oe.r.POSITION,new yr.n(y,g,3,!0)],[Oe.r.NORMAL,new yr.n(x,v,3,!0)]]}(1,.5,e,!1)),!0);case"sphere":case"cube":case"inverted-cone":case"cylinder":case"tetrahedron":case"diamond":throw new Error("not implemented");default:return}}function Fr(e,t){let i=e.get(t);return i&&!i.exclusive&&(i={...i,exclusive:!0,data:(0,_r.S)(i.data)},e.set(t,i)),i}(0,Se.d)(Rr,wr,Or),(0,Se.d)(Mr,wr,Ar),(0,Se.e)(Sr,Rr,Mr),(0,Se.n)(Sr,Sr),(0,Se.d)(Rr,Ar,Or),(0,Se.d)(Mr,Ar,Tr),(0,Se.e)(Ir,Rr,Mr),(0,Se.n)(Ir,Ir),(0,Se.d)(Rr,Tr,Or),(0,Se.d)(Mr,Tr,wr),(0,Se.e)(Cr,Rr,Mr),(0,Se.n)(Cr,Cr),Sr[0],Sr[1],Sr[2],Ir[0],Ir[1],Ir[2],Cr[0],Cr[1],Cr[2],(0,N.vt)();const Dr=[{tesselation:6,minScreenSpaceRadius:0},{tesselation:18,minScreenSpaceRadius:7},{tesselation:64,minScreenSpaceRadius:65}];class Lr{constructor(e){this._context=e,this.lodRendererId=null,this._loaded=!1,this._loadingPromise=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext.createEncoder(),t=Er("cone",e.createMaterial("default"));this.lodRendererId=e.createLodRenderer(t),await e.dispatch(),this._loaded=!0}async createAddCommand(e){const t=this._context.renderCommandContext.createEncoder();if(null==this.lodRendererId)throw new Error("expected lod renderer id to not be null");const{featureCount:i}=e;if(0===i)return t;const r=(0,B.vt)((0,hr.Fq)("cone")),s=(0,N.ci)((0,B.Ej)(r)),n=(0,N.ci)((0,hr.Bb)(s,{isPrimitive:!0,width:100,depth:null,height:null})),o=new Float64Array(16*i),a=new Float64Array(16*i),l=lr(e,this._context);for(let e=0;e<i;++e){const t=e,i=l[3*e+0],r=l[3*e+1],c=l[3*e+2],h=this._computeGlobalTransform(i,r,c,this._context.viewSpatialReference,Nr),d=this._computeLocalTransform(n,s,zr);this._writeMatrixToTypedBuffer(o,t,d),this._writeMatrixToTypedBuffer(a,t,h)}const c=ar(e,this._context),h={featureIds:new Uint32Array(c),localTransforms:o,globalTransforms:a};return t.addLodInstances(this.lodRendererId,h),t}async createRemoveCommand(e){const t=this._context.renderCommandContext.createEncoder();if(null==this.lodRendererId)return t;const i=ar(e,this._context);return t.removeLodInstances(this.lodRendererId,i),t}_writeMatrixToTypedBuffer(e,t,i){let r=16*t;for(let t=0;t<16;t++)e[r++]=i[t]}_computeGlobalTransform(e,t,i,r,s){return Pr[0]=e,Pr[1]=t,Pr[2]=i,(0,cr.l)(r,Pr,s,this._context.renderSpatialReference),s}_computeLocalTransform(e,t,i){return(0,Ee.D_)(i),this._applyObjectScale(e,t,i),i}_applyObjectScale(e,t,i){const r=function(e=N.Un,t,i,r=1){const s=new Array(3);if(null==t||null==i)s[0]=1,s[1]=1,s[2]=1;else{let r,n=0;for(let o=2;o>=0;o--){const a=e[o],l=null!=a,c=0===o&&!r&&!l,h=i[o];let d;"symbol-value"===a||c?d=0!==h?t[o]/h:1:l&&"proportional"!==a&&isFinite(a)&&(d=0!==h?a/h:1),null!=d&&(s[o]=d,r=d,n=Math.max(n,Math.abs(d)))}for(let e=2;e>=0;e--)null==s[e]?s[e]=r:0===s[e]&&(s[e]=.001*n)}for(let e=2;e>=0;e--)s[e]/=r;return(0,N.ci)(s)}(e,e,t,this._context.renderCoordsHelper.unitInMeters);1===r[0]&&1===r[1]&&1===r[2]||(0,Ee.hs)(i,i,r)}}const Pr=(0,N.vt)(),zr=(0,Me.vt)(),Nr=(0,Me.vt)();class Br{constructor(e){this._context=e,this.materialId=null,this._loaded=!1,this._loadingPromise=null}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const e=this._context.renderCommandContext.createEncoder();this.materialId=e.createMaterial("hud"),e.createDirectRenderer(this.materialId),await e.dispatch(),this._loaded=!0}async createAddCommand(e){const t=this._context.renderCommandContext.createEncoder();if(null==this.materialId)throw new Error("expected material not to be null");const{featureCount:i,id:r}=e;if(0===i)return t;const s=function(e,t){const{featureCount:i}=e;if(0===i)return new Float64Array;const r=lr(e),s=t.viewSpatialReference,n=t.renderSpatialReference,o=new Float64Array(3*i);if(!(0,nr.projectBuffer)(r,s,0,o,n,0,i))throw new Error("Failed to project coordinates");return o}(e,this._context),n=function(e,t){const i=t.viewSpatialReference,r=t.renderSpatialReference,{extent:s}=e,n=(0,F.gX)(s),o=(0,N.vt)();return(0,or.F)([n[0],n[1],0],i,o,r),o}(e,this._context),o=new Float64Array([0,0,1]),a=new Float64Array([255,255,255,255]),l=new Float64Array([24,24]),c=new Float64Array([0,0,0,1]),h=new Float64Array([0,0]),d=new Float64Array([0]),u=new Uint32Array(i);for(let e=0;e<i;++e)u[e]=e;const f=new Uint32Array(i);for(let e=0;e<i;++e)f[e]=0;const p=new yr.n(s,u,3,!0),_=new yr.n(o,f,3,!0),m=new yr.n(h,f,2,!0),g=new yr.n(a,f,4,!0),v=new yr.n(d,f,1,!0),y=new yr.n(l,f,2,!0),x=new yr.n(c,f,4,!0),b={attributes:ur([[Oe.r.POSITION,p],[Oe.r.NORMAL,_],[Oe.r.UV0,m],[Oe.r.COLOR,g],[Oe.r.ROTATION,v],[Oe.r.SIZE,y],[Oe.r.CENTEROFFSETANDDISTANCE,x]]),objectAndLayerIdColor:void 0,transformation:(0,Me.vt)(),materialId:this.materialId};return t.addDirectRendererGeometry(r,b,n),t}async createRemoveCommand(e){const t=this._context.renderCommandContext.createEncoder();return t.removeDirectRendererGeometry(e.id),t}}class Hr{constructor(e){this._symbols=new Array,this._featureDataPartitioning=new Map,this._context=e}async load(){this._symbols[0]=new Br(this._context),this._symbols[1]=new Lr(this._context)}async createAddCommand(e){const t=this._partition(e),i=await Promise.all(t.map((async({index:e,features:t})=>{const i=await this._provisionSymbol(e);return await(i?.createAddCommand(t))}))),r=this._context.renderCommandContext.createEncoder();for(const e of i)null!=e&&r.append(e);return new sr(r,[()=>{this._featureDataPartitioning.set(e,t)}])}async createRemoveCommand(e){const{_featureDataPartitioning:t}=this,i=t.get(e),r=this._context.renderCommandContext.createEncoder();if(null==i)return new sr(this._context.renderCommandContext.createEncoder(),[]);const s=await Promise.all(i.map((async({index:e,features:t})=>{const i=this._getLoadedSymbol(e);return await(i?.createRemoveCommand(t))})));for(const e of s)null!=e&&r.append(e);return new sr(r,[()=>{t.delete(e)}])}async _provisionSymbol(e){if(null==e)return null;const t=this._symbols[e];return t?(t.loaded||await t.load(),t):null}_getLoadedSymbol(e){if(null==e)return null;const t=this._symbols[e];return null!=t&&t.loaded?t:null}_partition(e){const t=ar(e,this._context);if(null==t)throw new Error("unable to fetch objectIds");const{featureCount:i}=e,r=[[],[]];for(let e=0;e<i;++e)r[t[e]%2].push(e);return r.map(((t,i)=>new jr(i,e.subset(new Uint32Array(t))))).filter((e=>e.features.featureCount>0))}}class jr{constructor(e,t){this.index=e,this.features=t}}var Vr=i(73941),Ur=i(98764),Gr=i(65806);const Zr=(0,N.vt)();var qr=i(88582),kr=i(17352);function Yr(e,t,i=function(e){return{operations:e,value:e.create()}}(e)){return i.operations=e,e.copy(t,i.value),i}const Wr=2**50;function $r(e,t,i,r){return e.operations.setAltitudeAt(e.value,t,i,r)}function Xr(e,t,i){return e.operations.elevate(e.value,t,i.value)}const Jr=(0,N.vt)();(0,N.vt)();var Qr=i(32114);function Kr(e){return"point"===e.type}class es{constructor(e,t,i,r){this.viewingMode=e,this.spatialReference=t,this.unitInMeters=i,this._coordinateSystem=r,this._tmpCoordinateSystem=function(e){const{value:t,operations:i}=e;return{operations:i,value:i.create(t)}}(r),this.referenceEllipsoid=(0,Vr.tO)(t),this.sphericalPCPF=(0,Ur.lO)(t)}set extent(e){e&&function(e,t,i){e.operations.setExtent(e.value,t,i.value)}(this._coordinateSystem,e,this._coordinateSystem)}get extent(){return function(e,t){return e.operations.getExtent(e.value,t),t}(this._coordinateSystem,(0,F.vt)())}getAltitude(e){return function(e,t){return e.operations.altitudeAt(e.value,t)}(this._coordinateSystem,e)}setAltitude(e,t,i=e){return $r(this._coordinateSystem,i,t,e)}setAltitudeOfTransformation(e,t){!function(e,t,i,r){t!==r&&(0,Ee.C)(r,t),(0,Se.i)(Jr,r[12],r[13],r[14]),$r(e,Jr,i,Jr),r[12]=Jr[0],r[13]=Jr[1],r[14]=Jr[2]}(this._coordinateSystem,t,e,t)}worldUpAtPosition(e,t){return function(e,t,i){return e.operations.axisAt(e.value,t,qr._.Z,i)}(this._coordinateSystem,e,t)}worldBasisAtPosition(e,t,i){return function(e,t,i,r){return e.operations.axisAt(e.value,t,i,r)}(this._coordinateSystem,e,t,i)}basisMatrixAtPosition(e,t){const i=this.worldBasisAtPosition(e,qr._.X,Qr.rq.get()),r=this.worldBasisAtPosition(e,qr._.Y,Qr.rq.get()),s=this.worldBasisAtPosition(e,qr._.Z,Qr.rq.get());return(0,Ee.hZ)(t,i[0],i[1],i[2],0,r[0],r[1],r[2],0,s[0],s[1],s[2],0,0,0,0,1),t}headingAtPosition(e,t){const i=this.worldUpAtPosition(e,Qr.rq.get()),r=this.worldBasisAtPosition(e,qr._.Y,Qr.rq.get()),s=(0,Pe.EJ)(t,r,i);return(0,ie.KJ)(s)}intersectManifoldClosestSilhouette(e,t,i){return Xr(this._coordinateSystem,t,this._tmpCoordinateSystem),function(e,t,i){e.operations.intersectRayClosestSilhouette(e.value,t,i)}(this._tmpCoordinateSystem,e,i),i}intersectManifold(e,t,i){Xr(this._coordinateSystem,t,this._tmpCoordinateSystem);const r=Qr.rq.get();return function(e,t,i){return e.operations.intersectRay(e.value,t,i)}(this._tmpCoordinateSystem,e,r)?(0,Se.c)(i,r):null}intersectInfiniteManifold(e,t,i){if(this.viewingMode===$.RT.Global)return this.intersectManifold(e,t,i);Xr(this._coordinateSystem,t,this._tmpCoordinateSystem);const r=this._tmpCoordinateSystem.value,s=Qr.rq.get();return(0,vr.Ui)(r.plane,e,s)?(0,Se.c)(i,s):null}toRenderCoords(e,t,i){return Kr(e)?(0,Gr.g)(e,t,this.spatialReference):(0,or.F)(e,t,i,this.spatialReference)}fromRenderCoords(e,t,i=null){return Kr(t)?(null!=i&&(t.spatialReference=i),function(e,t,i){return!!(0,or.F)(e,t,Zr,i.spatialReference)&&(i.x=Zr[0],i.y=Zr[1],i.z=Zr[2],!0)}(e,this.spatialReference,t)?t:null):(0,or.F)(e,this.spatialReference,t,i)?t:null}static create(e,t){switch(e){case $.RT.Local:return new es($.RT.Local,t,(0,dr.GA)(t),Yr(kr.b,(0,kr.f)([0,0,0],[Wr,0,0],[0,Wr,0])));case $.RT.Global:return new es($.RT.Global,t,1,function(e){return Yr(dt.s,(0,dt.f)(0,0,0,(0,Vr.tO)(e).radius))}(t))}}static renderUnitScaleFactor(e,t){return(0,dr.KX)(e)/(0,dr.KX)(t)}}let ts=class extends s.A.EventedAccessor{constructor(){super(...arguments),this.remoteClient=null,this._featureDataStore=new A,this._featureStore=new I,this._tileManager=new v({addTile:(e,t)=>this._addTile(e,t),removeTiles:e=>this._removeTiles(e)}),this._renderer=null,this._fetcher=null,this._queryEngine=null,this._defaultQueryJSON=null}get updating(){return this._tileManager.updating}destroy(){this._featureStore.clear(),this._tileManager.destroy()}async setup({viewSpatialReference:e,renderSpatialReference:t,viewingMode:i,baseQuery:r,url:s,objectIdField:n,capabilities:a,fieldsIndex:l,timeInfo:c}){const h=d.A.fromJSON(e),p=d.A.fromJSON(t);return this._fetcher=new W(h,f.A.fromJSON(r),s,n,a),this._queryEngine=new u.do({hasZ:!0,hasM:!1,geometryType:"esriGeometryPoint",objectIdField:n,fieldsIndex:l,availableFields:[n],spatialReference:e,featureStore:this._featureStore,timeInfo:c}),this._renderer=new Hr({viewSpatialReference:h,renderSpatialReference:p,renderCoordsHelper:es.create(i,p),renderCommandContext:new rr({viewingMode:i,dispatchRenderCommandsCallback:(e,t)=>this.remoteClient.invoke("dispatchRenderCommands",e,{transferList:t})})}),this._defaultQueryJSON=new f.A({outSpatialReference:h}).toJSON(),this.addHandles((0,o.wB)((()=>this.updating),(async e=>{this.emit("notify-updating",{updating:e})})),o.Vh),await this._renderer.load(),rs}async executeQuery(e,t){return{result:await this._queryEngine.executeQuery(this._ensureQuery(e),t)}}async executeQueryForIds(e,t){const i=await this._queryEngine.executeQueryForIdSet(this._ensureQuery(e),t);return{result:Array.from(i)}}async executeQueryForCount(e,t){return{result:await this._queryEngine.executeQueryForCount(this._ensureQuery(e),t)}}async executeQueryForExtent(e,t){return{result:await this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t)}}async executeQueryForLatestObservations(e,t){return{result:await this._queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),t)}}async onTileTreeChange(e){return await this._tileManager.onTileTreeChange(e),rs}async _addTile(e,t){const i=await this._fetcher.fetch(e,t);(0,n.Te)(t);const r=new w(i),s=await this._renderer.createAddCommand(r);return(0,n.Te)(t),s.appendPipelineStateCommand((()=>{this._featureDataStore.add(r),this._featureStore.addTile(i)})),s.execute(),i}async _removeTiles(e){const t=this._featureStore,i=this._featureDataStore,r=this._renderer;await Promise.all(e.map((async e=>{const s=i.get(e);if(null==s)return;const n=await r.createRemoveCommand(s);n.appendPipelineStateCommand((()=>{i.remove(e),t.removeTile(e)})),n.execute()})))}_ensureQuery(e){return e??this._defaultQueryJSON}};(0,r._)([(0,a.MZ)()],ts.prototype,"updating",null),ts=(0,r._)([(0,h.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],ts);const is=ts,rs={result:void 0}},4431:(e,t,i)=>{i.d(t,{U:()=>n});var r=i(63907),s=i(74038);function n(e,t=0){const i=e.stride;return Array.from(e.fields.keys()).map((r=>{const n=e.fields.get(r),a=n.constructor.ElementCount,l=o(n.constructor.ElementType),c=n.offset,h=n.optional?.glNormalized??!1;return new s._(r,a,l,c,i,h,t)}))}function o(e){const t=a[e];if(t)return t;throw new Error("BufferType not supported in WebGL")}const a={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,f32:r.pe.FLOAT}},47522:(e,t,i)=>{i.d(t,{K:()=>n});var r=i(95250),s=i(2597);function n(e){e.uniforms.add(new r.e("alignPixelEnabled",((e,t)=>t.alignPixelEnabled))),e.code.add(s.H`vec4 alignToPixelCenter(vec4 clipCoord, vec2 widthHeight) {
|
|
164
|
-
if (!alignPixelEnabled)
|
|
165
|
-
return clipCoord;
|
|
166
|
-
vec2 xy = vec2(0.500123) + 0.5 * clipCoord.xy / clipCoord.w;
|
|
167
|
-
vec2 pixelSz = vec2(1.0) / widthHeight;
|
|
168
|
-
vec2 ij = (floor(xy * widthHeight) + vec2(0.5)) * pixelSz;
|
|
169
|
-
vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
|
|
170
|
-
return vec4(result, clipCoord.zw);
|
|
171
|
-
}`),e.code.add(s.H`vec4 alignToPixelOrigin(vec4 clipCoord, vec2 widthHeight) {
|
|
172
|
-
if (!alignPixelEnabled)
|
|
173
|
-
return clipCoord;
|
|
174
|
-
vec2 xy = vec2(0.5) + 0.5 * clipCoord.xy / clipCoord.w;
|
|
175
|
-
vec2 pixelSz = vec2(1.0) / widthHeight;
|
|
176
|
-
vec2 ij = floor((xy + 0.5 * pixelSz) * widthHeight) * pixelSz;
|
|
177
|
-
vec2 result = (ij * 2.0 - vec2(1.0)) * clipCoord.w;
|
|
178
|
-
return vec4(result, clipCoord.zw);
|
|
179
|
-
}`)}},40268:(e,t,i)=>{i.d(t,{Q:()=>d,R:()=>h});var r=i(35640),s=i(52587),n=i(20693),o=i(71988),a=i(20304),l=i(2597),c=i(46540);const h=.5;function d(e,t){e.include(s.Y6),e.attributes.add(c.r.POSITION,"vec3"),e.attributes.add(c.r.NORMAL,"vec3"),e.attributes.add(c.r.CENTEROFFSETANDDISTANCE,"vec4");const i=e.vertex;(0,n.NB)(i,t),(0,n.yu)(i,t),i.uniforms.add(new o.E("viewport",((e,t)=>t.camera.fullViewport)),new a.m("polygonOffset",(e=>e.shaderPolygonOffset)),new a.m("cameraGroundRelative",((e,t)=>t.camera.aboveGround?1:-1))),t.hasVerticalOffset&&(0,r.V)(i),i.constants.add("smallOffsetAngle","float",.984807753012208),i.code.add(l.H`struct ProjectHUDAux {
|
|
180
|
-
vec3 posModel;
|
|
181
|
-
vec3 posView;
|
|
182
|
-
vec3 vnormal;
|
|
183
|
-
float distanceToCamera;
|
|
184
|
-
float absCosAngle;
|
|
185
|
-
};`),i.code.add(l.H`
|
|
186
|
-
float applyHUDViewDependentPolygonOffset(float pointGroundDistance, float absCosAngle, inout vec3 posView) {
|
|
187
|
-
float pointGroundSign = ${t.terrainDepthTest?l.H.float(0):l.H`sign(pointGroundDistance)`};
|
|
188
|
-
if (pointGroundSign == 0.0) {
|
|
189
|
-
pointGroundSign = cameraGroundRelative;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// cameraGroundRelative is -1 if camera is below ground, 1 if above ground
|
|
193
|
-
// groundRelative is 1 if both camera and symbol are on the same side of the ground, -1 otherwise
|
|
194
|
-
float groundRelative = cameraGroundRelative * pointGroundSign;
|
|
195
|
-
|
|
196
|
-
// view angle dependent part of polygon offset emulation: we take the absolute value because the sign that is
|
|
197
|
-
// dropped is instead introduced using the ground-relative position of the symbol and the camera
|
|
198
|
-
if (polygonOffset > .0) {
|
|
199
|
-
float cosAlpha = clamp(absCosAngle, 0.01, 1.0);
|
|
200
|
-
float tanAlpha = sqrt(1.0 - cosAlpha * cosAlpha) / cosAlpha;
|
|
201
|
-
float factor = (1.0 - tanAlpha / viewport[2]);
|
|
202
|
-
|
|
203
|
-
// same side of the terrain
|
|
204
|
-
if (groundRelative > 0.0) {
|
|
205
|
-
posView *= factor;
|
|
206
|
-
}
|
|
207
|
-
// opposite sides of the terrain
|
|
208
|
-
else {
|
|
209
|
-
posView /= factor;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
return groundRelative;
|
|
214
|
-
}
|
|
215
|
-
`),t.draped&&!t.hasVerticalOffset||(0,n.S7)(i),t.draped||(i.uniforms.add(new a.m("perDistancePixelRatio",((e,t)=>Math.tan(t.camera.fovY/2)/(t.camera.fullViewport[2]/2)))),i.code.add(l.H`
|
|
216
|
-
void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {
|
|
217
|
-
float distanceToCamera = length(posView);
|
|
218
|
-
|
|
219
|
-
// Compute offset in world units for a half pixel shift
|
|
220
|
-
float pixelOffset = distanceToCamera * perDistancePixelRatio * ${l.H.float(h)};
|
|
221
|
-
|
|
222
|
-
// Apply offset along normal in the direction away from the ground surface
|
|
223
|
-
vec3 modelOffset = normalModel * cameraGroundRelative * pixelOffset;
|
|
224
|
-
|
|
225
|
-
// Apply the same offset also on the view space position
|
|
226
|
-
vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;
|
|
227
|
-
|
|
228
|
-
posModel += modelOffset;
|
|
229
|
-
posView += viewOffset;
|
|
230
|
-
}
|
|
231
|
-
`)),t.screenCenterOffsetUnitsEnabled&&(0,n.Nz)(i),t.hasScreenSizePerspective&&(0,s.OH)(i),i.code.add(l.H`
|
|
232
|
-
vec4 projectPositionHUD(out ProjectHUDAux aux) {
|
|
233
|
-
vec3 centerOffset = centerOffsetAndDistance.xyz;
|
|
234
|
-
float pointGroundDistance = centerOffsetAndDistance.w;
|
|
235
|
-
|
|
236
|
-
aux.posModel = position;
|
|
237
|
-
aux.posView = (view * vec4(aux.posModel, 1.0)).xyz;
|
|
238
|
-
aux.vnormal = normal;
|
|
239
|
-
${t.draped?"":"applyHUDVerticalGroundOffset(aux.vnormal, aux.posModel, aux.posView);"}
|
|
240
|
-
|
|
241
|
-
// Screen sized offset in world space, used for example for line callouts
|
|
242
|
-
// Note: keep this implementation in sync with the CPU implementation, see
|
|
243
|
-
// - MaterialUtil.verticalOffsetAtDistance
|
|
244
|
-
// - HUDMaterial.applyVerticalOffsetTransformation
|
|
245
|
-
|
|
246
|
-
aux.distanceToCamera = length(aux.posView);
|
|
247
|
-
|
|
248
|
-
vec3 viewDirObjSpace = normalize(cameraPosition - aux.posModel);
|
|
249
|
-
float cosAngle = dot(aux.vnormal, viewDirObjSpace);
|
|
250
|
-
|
|
251
|
-
aux.absCosAngle = abs(cosAngle);
|
|
252
|
-
|
|
253
|
-
${t.hasScreenSizePerspective&&(t.hasVerticalOffset||t.screenCenterOffsetUnitsEnabled)?"vec3 perspectiveFactor = screenSizePerspectiveScaleFactor(aux.absCosAngle, aux.distanceToCamera, screenSizePerspectiveAlignment);":""}
|
|
254
|
-
|
|
255
|
-
${t.hasVerticalOffset?t.hasScreenSizePerspective?"float verticalOffsetScreenHeight = applyScreenSizePerspectiveScaleFactorFloat(verticalOffset.x, perspectiveFactor);":"float verticalOffsetScreenHeight = verticalOffset.x;":""}
|
|
256
|
-
|
|
257
|
-
${t.hasVerticalOffset?l.H`
|
|
258
|
-
float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * aux.distanceToCamera, verticalOffset.z, verticalOffset.w);
|
|
259
|
-
vec3 modelOffset = aux.vnormal * worldOffset;
|
|
260
|
-
aux.posModel += modelOffset;
|
|
261
|
-
vec3 viewOffset = (viewNormal * vec4(modelOffset, 1.0)).xyz;
|
|
262
|
-
aux.posView += viewOffset;
|
|
263
|
-
// Since we elevate the object, we need to take that into account
|
|
264
|
-
// in the distance to ground
|
|
265
|
-
pointGroundDistance += worldOffset;`:""}
|
|
266
|
-
|
|
267
|
-
float groundRelative = applyHUDViewDependentPolygonOffset(pointGroundDistance, aux.absCosAngle, aux.posView);
|
|
268
|
-
|
|
269
|
-
${t.screenCenterOffsetUnitsEnabled?"":l.H`
|
|
270
|
-
// Apply x/y in view space, but z in screen space (i.e. along posView direction)
|
|
271
|
-
aux.posView += vec3(centerOffset.x, centerOffset.y, 0.0);
|
|
272
|
-
|
|
273
|
-
// Same material all have same z != 0.0 condition so should not lead to
|
|
274
|
-
// branch fragmentation and will save a normalization if it's not needed
|
|
275
|
-
if (centerOffset.z != 0.0) {
|
|
276
|
-
aux.posView -= normalize(aux.posView) * centerOffset.z;
|
|
277
|
-
}
|
|
278
|
-
`}
|
|
279
|
-
|
|
280
|
-
vec4 posProj = proj * vec4(aux.posView, 1.0);
|
|
281
|
-
|
|
282
|
-
${t.screenCenterOffsetUnitsEnabled?t.hasScreenSizePerspective?"float centerOffsetY = applyScreenSizePerspectiveScaleFactorFloat(centerOffset.y, perspectiveFactor);":"float centerOffsetY = centerOffset.y;":""}
|
|
283
|
-
|
|
284
|
-
${t.screenCenterOffsetUnitsEnabled?"posProj.xy += vec2(centerOffset.x, centerOffsetY) * pixelRatio * 2.0 / viewport.zw * posProj.w;":""}
|
|
285
|
-
|
|
286
|
-
// constant part of polygon offset emulation
|
|
287
|
-
posProj.z -= groundRelative * polygonOffset * posProj.w;
|
|
288
|
-
return posProj;
|
|
289
|
-
}
|
|
290
|
-
`)}},63578:(e,t,i)=>{i.d(t,{I:()=>o});var r=i(47522),s=i(96598),n=i(2597);function o(e,t){const{vertex:i,fragment:o}=e;e.include(s.Z,t),i.include(r.K),i.main.add(n.H`vec4 posProjCenter;
|
|
291
|
-
if (dot(position, position) > 0.0) {
|
|
292
|
-
ProjectHUDAux projectAux;
|
|
293
|
-
vec4 posProj = projectPositionHUD(projectAux);
|
|
294
|
-
posProjCenter = alignToPixelCenter(posProj, viewport.zw);
|
|
295
|
-
forwardViewPosDepth(projectAux.posView);
|
|
296
|
-
vec3 vpos = projectAux.posModel;
|
|
297
|
-
if (rejectBySlice(vpos)) {
|
|
298
|
-
posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);
|
|
299
|
-
}
|
|
300
|
-
} else {
|
|
301
|
-
posProjCenter = vec4(1e038, 1e038, 1e038, 1.0);
|
|
302
|
-
}
|
|
303
|
-
gl_Position = posProjCenter;
|
|
304
|
-
gl_PointSize = 1.0;`),o.main.add(n.H`fragColor = vec4(1);
|
|
305
|
-
if(discardByTerrainDepth()) {
|
|
306
|
-
fragColor.g = 0.5;
|
|
307
|
-
}`)}},13755:(e,t,i)=>{i.d(t,{y:()=>c});var r,s=i(47522);!function(e){e[e.Occluded=0]="Occluded",e[e.NotOccluded=1]="NotOccluded",e[e.Both=2]="Both",e[e.COUNT=3]="COUNT"}(r||(r={}));var n=i(71988),o=i(20304),a=i(2597),l=i(63761);function c(e){e.vertex.uniforms.add(new o.m("renderTransparentlyOccludedHUD",((e,t)=>t.hudRenderStyle===r.Occluded?1:t.hudRenderStyle===r.NotOccluded?0:.75)),new n.E("viewport",((e,t)=>t.camera.fullViewport)),new l.N("hudVisibilityTexture",((e,t)=>t.hudVisibility?.getTexture()))),e.vertex.include(s.K),e.vertex.code.add(a.H`bool testHUDVisibility(vec4 posProj) {
|
|
308
|
-
vec4 posProjCenter = alignToPixelCenter(posProj, viewport.zw);
|
|
309
|
-
vec4 occlusionPixel = texture(hudVisibilityTexture, .5 + .5 * posProjCenter.xy / posProjCenter.w);
|
|
310
|
-
if (renderTransparentlyOccludedHUD > 0.5) {
|
|
311
|
-
return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g * renderTransparentlyOccludedHUD < 1.0;
|
|
312
|
-
}
|
|
313
|
-
return occlusionPixel.r * occlusionPixel.g > 0.0 && occlusionPixel.g == 1.0;
|
|
314
|
-
}`)}},62258:(e,t,i)=>{var r,s;i.d(t,{dz:()=>r,oH:()=>s}),function(e){e[e.OBJECT=0]="OBJECT",e[e.HUD=1]="HUD",e[e.TERRAIN=2]="TERRAIN",e[e.OVERLAY=3]="OVERLAY",e[e.I3S=4]="I3S",e[e.PCL=5]="PCL",e[e.LOD=6]="LOD",e[e.VOXEL=7]="VOXEL",e[e.TILES3D=8]="TILES3D"}(r||(r={})),function(e){e[e.MIN=0]="MIN",e[e.MINMAX=1]="MINMAX",e[e.ALL=2]="ALL"}(s||(s={}))},65215:(e,t,i)=>{i.d(t,{HE:()=>r,R6:()=>s}),i(51850);class r{constructor(e){this.layerUid=e}}class s extends r{constructor(e,t){super(e),this.graphicUid=t}}},78230:(e,t,i)=>{i.d(t,{A:()=>f});var r,s,n=i(93687),o=i(3694),a=i(38954),l=i(51850),c=i(82919),h=i(71351),d=i(97937),u=i(620);class f{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(e,t){this.objectToBoundingSphere=e,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new p,this._objectCount=0,t&&(void 0!==t.maximumObjectsPerNode&&(this._maximumObjectsPerNode=t.maximumObjectsPerNode),void 0!==t.maximumDepth&&(this._maximumDepth=t.maximumDepth))}destroy(){this._degenerateObjects.clear(),p.clearPool(),C[0]=null,P.prune(),V.prune()}add(e,t=e.length){this._objectCount+=t,this._grow(e,t);const i=p.acquire();for(let r=0;r<t;r++){const t=e[r];this._isDegenerate(t)?this._degenerateObjects.add(t):(i.init(this._root),this._add(t,i))}p.release(i)}remove(e,t=null){this._objectCount-=e.length;const i=p.acquire();for(const r of e){const e=t??(0,d.e)(this.objectToBoundingSphere(r),z);R(e[3])?(i.init(this._root),g(r,e,i)):this._degenerateObjects.delete(r)}p.release(i),this._shrink()}update(e,t){if(!R(t[3])&&this._isDegenerate(e))return;const i=function(e){return C[0]=e,C}(e);this.remove(i,t),this.add(i)}forEachAlongRay(e,t,i){const r=(0,h.LV)(e,t);_(this._root,(e=>{if(!function(e,t){return w((0,d.a)(t.bounds),2*-t.halfSize,D),w((0,d.a)(t.bounds),2*t.halfSize,L),(0,u.O_)(e.origin,e.direction,D,L)}(r,e))return!1;const t=e.node;return t.terminals.forAll((e=>{this._intersectsObject(r,e)&&i(e)})),null!==t.residents&&t.residents.forAll((e=>{this._intersectsObject(r,e)&&i(e)})),!0}))}forEachAlongRayWithVerticalOffset(e,t,i,r){const s=(0,h.LV)(e,t);_(this._root,(e=>{if(!function(e,t,i){return w((0,d.a)(t.bounds),2*-t.halfSize,D),w((0,d.a)(t.bounds),2*t.halfSize,L),i.applyToMinMax(D,L),(0,u.O_)(e.origin,e.direction,D,L)}(s,e,r))return!1;const t=e.node;return t.terminals.forAll((e=>{this._intersectsObjectWithOffset(s,e,r)&&i(e)})),null!==t.residents&&t.residents.forAll((e=>{this._intersectsObjectWithOffset(s,e,r)&&i(e)})),!0}))}forEach(e){_(this._root,(t=>{const i=t.node;return i.terminals.forAll(e),null!==i.residents&&i.residents.forAll(e),!0})),this._degenerateObjects.forEach(e)}forEachDegenerateObject(e){this._degenerateObjects.forEach(e)}findClosest(e,t,i,r=()=>!0,s=1/0){let n=1/0,o=1/0,l=null;const h=T(e,t),u=a=>{if(--s,!r(a))return;const h=this.objectToBoundingSphere(a);if(!(0,c.m7)(i,h))return;const u=O(e,t,(0,d.a)(h)),f=u-h[3],p=u+h[3];f<n&&(n=f,o=p,l=a)};return m(this._root,(r=>{if(s<=0||!(0,c.m7)(i,r.bounds))return!1;if((0,a.h)(F,h,r.halfSize),(0,a.g)(F,F,(0,d.a)(r.bounds)),O(e,t,F)>o)return!1;const n=r.node;return n.terminals.forAll((e=>u(e))),null!==n.residents&&n.residents.forAll((e=>u(e))),!0}),e,t),l}forEachInDepthRange(e,t,i,r,s,n,o){let l=-1/0,h=1/0;const u={setRange:e=>{i===f.DepthOrder.FRONT_TO_BACK?(l=Math.max(l,e.near),h=Math.min(h,e.far)):(l=Math.max(l,-e.far),h=Math.min(h,-e.near))}};u.setRange(r);const p=O(t,i,e),_=T(t,i),g=T(t,-i),v=e=>{if(!o(e))return;const r=this.objectToBoundingSphere(e),a=(0,d.a)(r),f=O(t,i,a)-p,_=f-r[3],m=f+r[3];_>h||m<l||!(0,c.m7)(n,r)||s(e,u)};m(this._root,(e=>{if(!(0,c.m7)(n,e.bounds))return!1;if((0,a.h)(F,_,e.halfSize),(0,a.g)(F,F,(0,d.a)(e.bounds)),O(t,i,F)-p>h)return!1;if((0,a.h)(F,g,e.halfSize),(0,a.g)(F,F,(0,d.a)(e.bounds)),O(t,i,F)-p<l)return!1;const r=e.node;return r.terminals.forAll((e=>v(e))),null!==r.residents&&r.residents.forAll((e=>v(e))),!0}),t,i)}forEachNode(e){_(this._root,(t=>e(t.node,t.bounds,t.halfSize,t.depth)))}forEachNeighbor(e,t){const i=(0,d.g)(t),r=(0,d.a)(t),s=t=>{const s=this.objectToBoundingSphere(t),n=(0,d.g)(s),o=i+n;return!((0,a.s)((0,d.a)(s),r)-o*o<=0)||e(t)};let n=!0;const o=e=>{n&&(n=s(e))};_(this._root,(e=>{const t=(0,d.g)(e.bounds),s=i+t;if((0,a.s)((0,d.a)(e.bounds),r)-s*s>0)return!1;const l=e.node;return l.terminals.forAll(o),n&&null!==l.residents&&l.residents.forAll(o),n})),n&&this.forEachDegenerateObject(o)}_intersectsObject(e,t){const i=this.objectToBoundingSphere(t);return!(i[3]>0)||(0,d.i)(i,e)}_intersectsObjectWithOffset(e,t,i){const r=this.objectToBoundingSphere(t);return!(r[3]>0)||(0,d.i)(i.applyToBoundingSphere(r),e)}_add(e,t){t.advanceTo(this.objectToBoundingSphere(e))?t.node.terminals.push(e):(t.node.residents.push(e),t.node.residents.length>this._maximumObjectsPerNode&&t.depth<this._maximumDepth&&this._split(t))}_split(e){const t=e.node.residents;e.node.residents=null;for(let i=0;i<t.length;i++){const r=p.acquire().init(e);this._add(t.at(i),r),p.release(r)}}_grow(e,t){if(0!==t&&(A(e,t,(e=>this.objectToBoundingSphere(e)),N),R(N[3])&&!this._fitsInsideTree(N)))if(y(this._root.node))(0,d.e)(N,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const e=this._rootBoundsForRootAsSubNode(N);this._placingRootViolatesMaxDepth(e)?this._rebuildTree(N,e):this._growRootAsSubNode(e),p.release(e)}}_rebuildTree(e,t){(0,a.c)((0,d.a)(B),(0,d.a)(t.bounds)),B[3]=t.halfSize,A([e,B],2,(e=>e),H);const i=p.acquire().init(this._root);this._root.initFrom(null,H,H[3]),this._root.increaseHalfSize(1.25),_(i,(e=>(this.add(e.node.terminals.data,e.node.terminals.length),null!==e.node.residents&&this.add(e.node.residents.data,e.node.residents.length),!0))),p.release(i)}_placingRootViolatesMaxDepth(e){const t=Math.log(e.halfSize/this._root.halfSize)*Math.LOG2E;let i=0;return _(this._root,(e=>(i=Math.max(i,e.depth),i+t<=this._maximumDepth))),i+t>this._maximumDepth}_rootBoundsForRootAsSubNode(e){const t=e[3],i=e;let r=-1/0;const s=this._root.bounds,n=this._root.halfSize;for(let e=0;e<3;e++){const o=s[e]-n-(i[e]-t),a=i[e]+t-(s[e]+n),l=Math.max(0,Math.ceil(o/(2*n))),c=Math.max(0,Math.ceil(a/(2*n)))+1,h=2**Math.ceil(Math.log(l+c)*Math.LOG2E);r=Math.max(r,h),j[e].min=l,j[e].max=c}for(let e=0;e<3;e++){let t=j[e].min,i=j[e].max;const o=(r-(t+i))/2;t+=Math.ceil(o),i+=Math.floor(o);const a=s[e]-n-t*n*2;E[e]=a+(i+t)*n}const o=r*n;return E[3]=o*I,p.acquire().initFrom(null,E,o,0)}_growRootAsSubNode(e){const t=this._root.node;(0,a.c)((0,d.a)(N),(0,d.a)(this._root.bounds)),N[3]=this._root.halfSize,this._root.init(e),e.advanceTo(N,null,!0),e.node.children=t.children,e.node.residents=t.residents,e.node.terminals=t.terminals}_shrink(){for(;;){const e=this._findShrinkIndex();if(-1===e)break;this._root.advance(e),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let e=null;const t=this._root.node.children;let i=0,r=0;for(;r<t.length&&null==e;)i=r++,e=t[i];for(;r<t.length;)if(t[r++])return-1;return i}_isDegenerate(e){return!R(this.objectToBoundingSphere(e)[3])}_fitsInsideTree(e){const t=this._root.bounds,i=this._root.halfSize;return e[3]<=i&&e[0]>=t[0]-i&&e[0]<=t[0]+i&&e[1]>=t[1]-i&&e[1]<=t[1]+i&&e[2]>=t[2]-i&&e[2]<=t[2]+i}toJSON(){const{maximumDepth:e,maximumObjectsPerNode:t,_objectCount:i}=this,r=this._nodeToJSON(this._root.node);return{maximumDepth:e,maximumObjectsPerNode:t,objectCount:i,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:r}}}_nodeToJSON(e){const t=e.children.map((e=>e?this._nodeToJSON(e):null)),i=e.residents?.map((e=>this.objectToBoundingSphere(e))),r=e.terminals?.map((e=>this.objectToBoundingSphere(e)));return{children:t,residents:i,terminals:r}}static fromJSON(e){const t=new f((e=>e),{maximumDepth:e.maximumDepth,maximumObjectsPerNode:e.maximumObjectsPerNode});return t._objectCount=e.objectCount,t._root.initFrom(e.root.node,e.root.bounds,e.root.halfSize,e.root.depth),t}}class p{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(e){return this.initFrom(e.node,e.bounds,e.halfSize,e.depth)}initFrom(e,t,i,r=this.depth){return this.node=null!=e?e:p.createEmptyNode(),t&&(0,d.e)(t,this.bounds),this.halfSize=i,this.depth=r,this}increaseHalfSize(e){this.halfSize*=e,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*I}advance(e){let t=this.node.children[e];t||(t=p.createEmptyNode(),this.node.children[e]=t),this.node=t,this.halfSize/=2,this.depth++;const i=M[e];return this.bounds[0]+=i[0]*this.halfSize,this.bounds[1]+=i[1]*this.halfSize,this.bounds[2]+=i[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(e,t,i=!1){for(;;){if(this.isTerminalFor(e))return t&&t(this,-1),!0;if(this.isLeaf()){if(!i)return t&&t(this,-1),!1;this.node.residents=null}const r=this._childIndex(e);t&&t(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(e){return e[3]>this.halfSize/2}_childIndex(e){const t=this.bounds;return(t[0]<e[0]?1:0)+(t[1]<e[1]?2:0)+(t[2]<e[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new o.A({shrink:!0}),residents:new o.A({shrink:!0})}}static acquire(){return p._pool.acquire()}static release(e){p._pool.release(e)}static clearPool(){p._pool.prune()}}function _(e,t){let i=p.acquire().init(e);const r=[i];for(;0!==r.length;){if(i=r.pop(),t(i)&&!i.isLeaf())for(let e=0;e<i.node.children.length;e++)i.node.children[e]&&r.push(p.acquire().init(i).advance(e));p.release(i)}}function m(e,t,i,r=f.DepthOrder.FRONT_TO_BACK){let s=p.acquire().init(e);const n=[s];for(function(e,t,i){if(!V.length)for(let e=0;e<8;++e)V.push({index:0,distance:0});for(let i=0;i<8;++i){const r=M[i];V.data[i].index=i,V.data[i].distance=O(e,t,r)}V.sort(((e,t)=>e.distance-t.distance));for(let e=0;e<8;++e)i[e]=V.data[e].index}(i,r,U);0!==n.length;){if(s=n.pop(),t(s)&&!s.isLeaf())for(let e=7;e>=0;--e){const t=U[e];s.node.children[t]&&n.push(p.acquire().init(s).advance(t))}p.release(s)}}function g(e,t,i){P.clear();const r=i.advanceTo(t,((e,t)=>{P.push(e.node),P.push(t)}))?i.node.terminals:i.node.residents;if(r.removeUnordered(e),0===r.length)for(let e=P.length-2;e>=0&&v(P.data[e],P.data[e+1]);e-=2);}function v(e,t){return t>=0&&(e.children[t]=null),!!y(e)&&(null===e.residents&&(e.residents=new o.A({shrink:!0})),!0)}function y(e){if(0!==e.terminals.length)return!1;if(null!==e.residents)return 0===e.residents.length;for(let t=0;t<e.children.length;t++)if(e.children[t])return!1;return!0}function x(e,t){e[0]=Math.min(e[0],t[0]-t[3]),e[1]=Math.min(e[1],t[1]-t[3]),e[2]=Math.min(e[2],t[2]-t[3])}function b(e,t){e[0]=Math.max(e[0],t[0]+t[3]),e[1]=Math.max(e[1],t[1]+t[3]),e[2]=Math.max(e[2],t[2]+t[3])}function w(e,t,i){i[0]=e[0]+t,i[1]=e[1]+t,i[2]=e[2]+t}function A(e,t,i,r){if(1===t){const t=i(e[0]);(0,d.e)(t,r)}else{D[0]=1/0,D[1]=1/0,D[2]=1/0,L[0]=-1/0,L[1]=-1/0,L[2]=-1/0;for(let r=0;r<t;r++){const t=i(e[r]);R(t[3])&&(x(D,t),b(L,t))}(0,a.m)((0,d.a)(r),D,L,.5),r[3]=Math.max(L[0]-D[0],L[1]-D[1],L[2]-D[2])/2}}function T(e,t){let i,r=1/0;for(let s=0;s<8;++s){const n=O(e,t,S[s]);n<r&&(r=n,i=S[s])}return i}function O(e,t,i){return t*(e[0]*i[0]+e[1]*i[1]+e[2]*i[2])}function R(e){return!isNaN(e)&&e!==-1/0&&e!==1/0&&e>0}p._pool=new n.A(p),(s=(r=f).DepthOrder||(r.DepthOrder={}))[s.FRONT_TO_BACK=1]="FRONT_TO_BACK",s[s.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const M=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],S=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],I=Math.sqrt(3),C=[null],E=(0,d.c)(),F=(0,l.vt)(),D=(0,l.vt)(),L=(0,l.vt)(),P=new o.A,z=(0,d.c)(),N=(0,d.c)(),B=(0,d.c)(),H=(0,d.c)(),j=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],V=new o.A,U=[0,0,0,0,0,0,0,0]},86305:(e,t,i)=>{i.d(t,{i3:()=>s}),i(38954);var r=i(51850);function s(e){return null!=e?.dist}i(17352),i(62258),(0,r.vt)()},87582:(e,t,i)=>{i.d(t,{h:()=>s}),i(62258);var r=i(65215);i(86305);class s extends r.R6{constructor(e,t,i,r,s,n){super(e,t),this.layerUid=e,this.graphicUid=t,this.geometryId=i,this.triangleNr=r,this.baseBoundingSphere=s,this.numLodLevels=n}}},48852:(e,t,i)=>{i.d(t,{g:()=>c});var r=i(4576),s=(i(44208),i(53966)),n=i(34275),o=i(94656),a=i(63907);const l=()=>s.A.getLogger("esri.views.webgl.BufferObject");class c{static createIndex(e,t,i){return new c(e,a.NZ.ELEMENT_ARRAY_BUFFER,t,i)}static createVertex(e,t,i){return new c(e,a.NZ.ARRAY_BUFFER,t,i)}static createUniform(e,t,i){return new c(e,a.NZ.UNIFORM_BUFFER,t,i)}static createPixelPack(e,t=a._U.STREAM_READ,i){const r=new c(e,a.NZ.PIXEL_PACK_BUFFER,t);return i&&r.setSize(i),r}static createPixelUnpack(e,t=a._U.STREAM_DRAW,i){return new c(e,a.NZ.PIXEL_UNPACK_BUFFER,t,i)}static createTransformFeedback(e,t=a._U.STATIC_DRAW,i){const r=new c(e,a.NZ.TRANSFORM_FEEDBACK_BUFFER,t);return r.setSize(i),r}constructor(e,t,i,r){this._context=e,this.bufferType=t,this.usage=i,this._glName=null,this._size=-1,this._indexType=void 0,e.instanceCounter.increment(a.vt.BufferObject,this),this._glName=this._context.gl.createBuffer(),(0,o.Y2)(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get usedMemory(){if(this.bufferType===a.NZ.ELEMENT_ARRAY_BUFFER){if(this._indexType===a.pe.UNSIGNED_INT)return 4*this._size;if(this._indexType===a.pe.UNSIGNED_SHORT)return 2*this._size}return this._size}get _isVAOAware(){return this.bufferType===a.NZ.ELEMENT_ARRAY_BUFFER||this.bufferType===a.NZ.ARRAY_BUFFER}dispose(){this._context?.gl?(this._glName&&(this._context.gl.deleteBuffer(this._glName),this._glName=null),this._context.instanceCounter.decrement(a.vt.BufferObject,this),this._context=null):this._glName&&l().warn("Leaked WebGL buffer object")}setSize(e,t=null){if(this.bufferType===a.NZ.ELEMENT_ARRAY_BUFFER&&null!=t)switch(this._indexType=t,t){case a.pe.UNSIGNED_SHORT:e*=2;break;case a.pe.UNSIGNED_INT:e*=4}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===a.NZ.ELEMENT_ARRAY_BUFFER&&((0,n.mg)(e)?this._indexType=a.pe.UNSIGNED_BYTE:(0,n.jq)(e)?(t/=2,this._indexType=a.pe.UNSIGNED_SHORT):(0,n.XJ)(e)&&(t/=4,this._indexType=a.pe.UNSIGNED_INT)),this._setBufferData(t,e)}_setBufferData(e,t=null){this._size=e;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const r=this._context.gl;null!=t?r.bufferData(this.bufferType,t,this.usage):r.bufferData(this.bufferType,e,this.usage),(0,o.Y2)(r),this._isVAOAware&&this._context.bindVAO(i)}setSubData(e,t,i,r){if(!e)return;const s=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:n}=this._context;n.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,i,r-i),(0,o.Y2)(n),this._isVAOAware&&this._context.bindVAO(s)}getSubData(e,t=0,i,s){if(i<0||s<0)return;const n=function(e){return(0,r.Xj)(e)}(e)?e.BYTES_PER_ELEMENT:1;if(n*((i??0)+(s??0))>e.byteLength)return;t+n*(s??0)>this.usedMemory&&l().warn("Potential problem getting subdata: requested data exceeds buffer size!");const o=this._context.gl;this.bufferType===a.NZ.TRANSFORM_FEEDBACK_BUFFER?(this._context.bindBuffer(this,a.NZ.TRANSFORM_FEEDBACK_BUFFER),o.getBufferSubData(a.NZ.TRANSFORM_FEEDBACK_BUFFER,t,e,i,s),this._context.unbindBuffer(a.NZ.TRANSFORM_FEEDBACK_BUFFER)):(this._context.bindBuffer(this,a.NZ.COPY_READ_BUFFER),o.getBufferSubData(a.NZ.COPY_READ_BUFFER,t,e,i,s),this._context.unbindBuffer(a.NZ.COPY_READ_BUFFER))}async getSubDataAsync(e,t=0,i,r){await this._context.clientWaitAsync(),this.getSubData(e,t,i,r)}}},74038:(e,t,i)=>{i.d(t,{_:()=>r});class r{constructor(e,t,i,r,s,n=!1,o=0){this.name=e,this.count=t,this.type=i,this.offset=r,this.stride=s,this.normalized=n,this.divisor=o}}},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|