@arcgis/core 4.33.0-next.20250520 → 4.33.0-next.20250522
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/Graphic.js +1 -1
- package/applications/Components/analysisUtils.d.ts +2 -0
- package/applications/Components/analysisUtils.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +1 -0
- package/assets/esri/core/workers/chunks/0dcab04dd1feeb5521cf.js +1 -0
- package/assets/esri/core/workers/chunks/{8a2cee726b7843c7408a.js → 0fb5de3f8a4d69b2d514.js} +1 -1
- package/assets/esri/core/workers/chunks/{91cd29f53f07bc38fe75.js → 14b3c18581b31c93af82.js} +1 -1
- package/assets/esri/core/workers/chunks/{7c819b3e6d69c526f4b2.js → 1c86aa3802d9ae0230ae.js} +1 -1
- package/assets/esri/core/workers/chunks/{b53a7040a71b0f1f3854.js → 23f6e98ef22f099f846c.js} +1 -1
- package/assets/esri/core/workers/chunks/28b1819bf744ce957dfd.js +2 -0
- package/assets/esri/core/workers/chunks/28b1819bf744ce957dfd.js.LICENSE.txt +33 -0
- package/assets/esri/core/workers/chunks/{234117cc5cb7c6863313.js → 2d90806faa4269828948.js} +1 -1
- package/assets/esri/core/workers/chunks/{e2cada6644c49b1b6e79.js → 36b0d6b4089a96475201.js} +1 -1
- package/assets/esri/core/workers/chunks/40f54c4f8ae63c6f3df9.js +1 -0
- package/assets/esri/core/workers/chunks/4193c52799aa3b6337c9.js +2 -0
- package/assets/esri/core/workers/chunks/{9588328d4ed6b0f04166.js.LICENSE.txt → 4193c52799aa3b6337c9.js.LICENSE.txt} +0 -34
- package/assets/esri/core/workers/chunks/42d9989b2aad3ac28d4d.js +1 -0
- package/assets/esri/core/workers/chunks/{8a6aac37b3133de74cce.js → 51c31e6d014005107d42.js} +1 -1
- package/assets/esri/core/workers/chunks/{66a1b92358344dd28ee1.js → 571252c9822d73cf7b01.js} +1 -1
- package/assets/esri/core/workers/chunks/{5c8d52b72a3bea4202ac.js → 634a418310e44e2436e0.js} +1 -1
- package/assets/esri/core/workers/chunks/6ee41e9c92ed8ba4c763.js +1 -0
- package/assets/esri/core/workers/chunks/{2adf558cd8d8155d07d7.js → 80b596496800e8d60eb8.js} +1 -1
- package/assets/esri/core/workers/chunks/{83fcc6f770ad084b8ab9.js → 86023cc5ccbc7ac43479.js} +1 -1
- package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +1 -0
- package/assets/esri/core/workers/chunks/{2113da9429f6272339d7.js → ac2607f1e8cd2e99907c.js} +3 -3
- package/assets/esri/core/workers/chunks/{0a4cece5e96fb7e8a57b.js → b893012bff5dc55e542d.js} +1 -1
- package/assets/esri/core/workers/chunks/bf3555f91492a1a3b613.js +1 -0
- package/assets/esri/core/workers/chunks/d2ebb72a43d995ed368a.js +1 -0
- package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +1 -0
- package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +1 -0
- package/assets/esri/core/workers/chunks/e77371ddbaf4b2d9be8d.js +1 -0
- package/assets/esri/core/workers/chunks/{19a58adc75a34f84b0ef.js → ee6240636d04d7d37b7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{f74f8ed3f17713a208c3.js → fa63b0f7fa799cb2f81d.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c29a768f02dc7ce0ed6.js → fb9e9b9e567e32f37042.js} +1 -1
- package/assets/esri/core/workers/chunks/fc61d02286b6ff5447cc.js +1 -0
- package/assets/esri/themes/base/_core.scss +2 -0
- package/assets/esri/themes/base/widgets/_Editor.scss +40 -2
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +4 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
- package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationSettingsUI.scss +16 -0
- package/assets/esri/themes/base/widgets/_SelectionList.scss +21 -15
- package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +1 -0
- 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/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_no.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
- package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/Home/t9n/Home_pt-BR.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
- package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -1
- package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ar.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bg.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ca.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_cs.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_da.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_de.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_el.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_es.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_et.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_he.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hu.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_id.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_it.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ja.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ko.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lt.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_nl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-BR.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-PT.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ro.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ru.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sl.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sv.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_th.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_tr.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_uk.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_vi.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-CN.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-HK.json +1 -1
- package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +24 -15
- package/core/sanitizerUtils.js +5 -0
- package/editing/sharedTemplates/SharedTemplate.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/GroupTemplatePart.js +1 -1
- package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
- package/interfaces.d.ts +242 -4
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/rasterFunctions/clipUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/libs/maquette/projection.js +1 -1
- package/networks/CircuitManager.js +5 -0
- package/networks/UnitIdentifierManager.js +5 -0
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/package.json +2 -2
- package/request.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.d.ts +4 -0
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +4 -0
- package/rest/knowledgeGraphService.d.ts +2 -0
- package/rest/networks/circuits/exportCircuits.js +5 -0
- package/rest/networks/circuits/queryCircuits.js +1 -1
- package/rest/networks/circuits/support/ExportCircuitsParameters.js +5 -0
- package/rest/networks/circuits/support/ExportCircuitsResult.js +5 -0
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
- package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
- package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
- package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
- package/rest/query/executeQuery.js +1 -1
- package/rest/query/executeQueryJSON.js +1 -1
- package/rest/query/executeQueryPBF.js +1 -1
- package/rest/query.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/LabelManager.js +1 -1
- package/views/2d/engine/imagery/RasterBitmap.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/core.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/enums.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/FocusArea.js +1 -1
- package/views/FocusAreaOutline.js +1 -1
- package/views/FocusAreaOutlineItem.js +1 -1
- package/views/support/LayerLayerViewInfo.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/ui/UI.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/VisibleElements.js +1 -1
- package/widgets/Editor/components/FooterActions.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/css.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/TextElementInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTable/support/exportUtils.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/Alert.js +5 -0
- package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationActions.js +5 -0
- package/widgets/OrientedImageryViewer/components/NavigationSettings.js +5 -0
- package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +5 -0
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/VisibleElements.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0c50ee1f3cdd30d96479.js +0 -1
- package/assets/esri/core/workers/chunks/133e4bde346828d4510b.js +0 -1
- package/assets/esri/core/workers/chunks/47fe2379f2214bf50036.js +0 -1
- package/assets/esri/core/workers/chunks/5228d39c05d660a135b6.js +0 -1
- package/assets/esri/core/workers/chunks/5f4ca51b82daf0e51010.js +0 -1
- package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +0 -1
- package/assets/esri/core/workers/chunks/8fda0a5b247385e68dc0.js +0 -1
- package/assets/esri/core/workers/chunks/938f1eebc48871be64e9.js +0 -1
- package/assets/esri/core/workers/chunks/9588328d4ed6b0f04166.js +0 -2
- package/assets/esri/core/workers/chunks/9839309d0cd804fe52c2.js +0 -1
- package/assets/esri/core/workers/chunks/be2c8c0a8b2bce7979b6.js +0 -1
- package/assets/esri/core/workers/chunks/f218a190015de1444018.js +0 -1
- package/assets/esri/core/workers/chunks/f9567108862629f25c8b.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{initial as s,watch as o}from"../../../core/reactiveUtils.js";import{generateUID as a}from"../../../core/uid.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{i as d}from"../../../chunks/vec32.js";import{create as u,ZEROS as h}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as p}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as c}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as g}from"../../../geometry/support/contains.js";import{newDoubleArray as y,doubleArrayFrom as f}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as _}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as b}from"../../../layers/LayerConstants.js";import{estimateSize as v}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import I from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayerView as j}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as C}from"./I3SPointsWorkerHandle.js";import{LayerView3D as O}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as D}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as S}from"./graphics/QueryEngine.js";import{QueryEngineContext as F}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as G,normalizeEditResultsEvent as A,processAttributeEdits as V}from"./i3s/featureEditing.js";import{getCachedAttributeValue as P}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as L}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as R}from"./i3s/I3SOverrides.js";import{checkRecyclable as M,checkSpatialReferences as H,containsDraco as Q,whenGraphicAttributes as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as U}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as T}from"./support/fieldProperties.js";import{LayerViewPerformanceInfo as B}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as k}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as z}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as W}from"./support/TemporalSceneLayerView.js";import{debugFlags as K}from"../support/debugFlags.js";import{compute as Z}from"../support/orientedBoundingBox.js";import{updatingProgress as Y}from"../support/updatingProperties.js";import{Vertices as $}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as J}from"../webgl-engine/lib/UpdatePolicy.js";import X from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ee}from"../../layers/support/popupUtils.js";import{defaultHighlightName as te}from"../../support/HighlightDefaults.js";import{hasLayerBasedScaleVisibility as re,isInEffectiveScaleRange as ie}from"../../support/layerViewUtils.js";import{TaskPriority as se}from"../../support/Scheduler.js";const oe=T();class ae{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributes=r,this.node=i}get cachedMemory(){return this.graphics.reduce(((e,t)=>v(t)+e),i(this.featureIds)+1024)}}let ne=class extends(W(U(k(O(X))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new L(((e,t,r)=>he(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{M(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this._i3sOverrides=new R({view:this.view,layer:e,memoryController:t}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new R({view:this.view,layer:this.layer,memoryController:e}),H(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new z({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),s),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds]),(()=>this._filterChange())),this._set("processor",new D({owner:this,preferredUpdatePolicy:J.ASYNC,scaleVisibilityEnabled:!re,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t))),this.supportsHeightUnitConversion&&(this._verticalScale=_("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),Q(this.layer.geometryDefinitions)&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles([this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)})),o((()=>K.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&K.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||K.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),s)]),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),s),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._worker=r(this._worker),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return re?ie(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return q(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t?.attributes?.[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){return this.processor.highlight(e,this.layer.objectIdField,t?.name??te)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return G(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new C((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!ue(r)&&!de(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?ce(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ue(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;p(a,l,0,a,d,0,o.length);const u=ue(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),c=new ae(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(c.featureIds,r.attributeDataInfo,i),e.numFeatures=c.graphics.length,this._updateNodeMemory(e),pe(c),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(c);if(null!=this._verticalScale)for(const t of c.graphics)this._verticalScale(t.geometry);const m=this.view.stage.renderView.olidRenderHelper;if(m){const e=j(this.view,this.uid);for(let t=0;t<c.featureIds.length;t++){const r=c.featureIds[t];m.setUidToObjectAndLayerId(r,c.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&ee(this.layer,this.view.popup?.defaultPopupTemplateEnabled),c.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,c),this._controller.updateLoadStatus(e.index,!0),this._filterNode(c),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;p(t,r,0,t,s,0),e.serviceObbInIndexSR=Z(new $(t,3)),i.isGeographic&&(c(e.serviceObbInIndexSR.center,s,ge,i),e.serviceObbInIndexSR.center=ge)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=y(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?f(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=y(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??me[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;d(ge,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,ge):g(s,ge))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(ge[0],ge[1],ge[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,n=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[n]=s);const c=s??a(),m=h*o,g=isNaN(t[m+2])?void 0:t[m+2],y=x(t[m],t[m+1],g,u),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(ye.property="geometry",ye.graphic=f,ye.oldValue=f.geometry,ye.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(ye)),d.push(f);else{const e=a();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributes=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),pe(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributes)return t.attributes.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributes)return t.attributes.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributes&&(r.attributes.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributes=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){pe(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach((e=>e.nodeIndex===t&&i.push(e.uid))),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||b}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(ye.graphic=s,ye.property="visible",ye.oldValue=e,ye.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(ye))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new F(s,e,o,(()=>this.processor.featureStore),i,r);this._queryEngine=new S({context:a,priority:se.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await A(t,e);V(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new B(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([n()],ne.prototype,"processor",void 0),e([n({type:I})],ne.prototype,"filter",void 0),e([n()],ne.prototype,"loadedGraphics",void 0),e([n()],ne.prototype,"i3slayer",null),e([n()],ne.prototype,"layerViewUid",null),e([n()],ne.prototype,"_controller",void 0),e([n()],ne.prototype,"updating",void 0),e([n()],ne.prototype,"suspended",void 0),e([n(Y)],ne.prototype,"updatingProgress",void 0),e([n()],ne.prototype,"updatingProgressValue",null),e([n({readOnly:!0})],ne.prototype,"visibleAtCurrentScale",null),e([n(oe.requiredFields)],ne.prototype,"requiredFields",null),e([n(oe.availableFields)],ne.prototype,"availableFields",void 0),e([n()],ne.prototype,"_fieldsHelper",void 0),e([n({type:Number})],ne.prototype,"maximumNumberOfFeatures",null),e([n({readOnly:!0})],ne.prototype,"maximumNumberOfFeaturesExceeded",null),e([n()],ne.prototype,"_excludeObjectIds",null),e([n({readOnly:!0})],ne.prototype,"lodFactor",null),e([n({readOnly:!0})],ne.prototype,"hasM",null),e([n({readOnly:!0})],ne.prototype,"hasZ",null),e([n()],ne.prototype,"contentVisible",null),e([n({readOnly:!0})],ne.prototype,"legendEnabled",null),ne=e([l("esri.views.3d.layers.SceneLayerGraphicsView3D")],ne);const le=ne;function de(e){return"pointData"in e}function ue(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function he(e,t,r){const i=t.attributes;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=P(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function pe(e){const t=e.attributes;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=P(t.attributeData[e],i))}}}function ce(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const me={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ge=u(),ye={graphic:null,property:null,oldValue:null,newValue:null};export{le as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{i as u}from"../../../chunks/vec32.js";import{create as h,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as g,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{makeDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as w}from"../../../layers/graphics/hydratedFeatures.js";import I from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayerView as C}from"../../../support/basemapUtils.js";import{I3SPointsWorkerHandle as O}from"./I3SPointsWorkerHandle.js";import{LayerView3D as D}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as S}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as F}from"./graphics/QueryEngine.js";import{QueryEngineContext as G}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as A,normalizeEditResultsEvent as V,processAttributeEdits as P}from"./i3s/featureEditing.js";import{getCachedAttributeValue as L}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as R}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as M}from"./i3s/I3SOverrides.js";import{checkRecyclable as H,checkSpatialReferences as Q,containsDraco as U,whenGraphicAttributes as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as T}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as B}from"./support/fieldProperties.js";import{LayerViewPerformanceInfo as k}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as z}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as W}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as K}from"./support/TemporalSceneLayerView.js";import{debugFlags as Z}from"../support/debugFlags.js";import{compute as Y}from"../support/orientedBoundingBox.js";import{updatingProgress as $}from"../support/updatingProperties.js";import{Vertices as J}from"../webgl-engine/lib/Attribute.js";import{UpdatePolicy as X}from"../webgl-engine/lib/UpdatePolicy.js";import ee from"../../layers/SceneLayerView.js";import{hasPopupTemplate as te}from"../../layers/support/popupUtils.js";import{defaultHighlightName as re}from"../../support/HighlightDefaults.js";import{hasLayerBasedScaleVisibility as ie,isInEffectiveScaleRange as se}from"../../support/layerViewUtils.js";import{TaskPriority as oe}from"../../support/Scheduler.js";const ae=B();class ne{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributes=r,this.node=i}get cachedMemory(){return this.graphics.reduce(((e,t)=>x(t)+e),i(this.featureIds)+1024)}}let le=class extends(K(T(z(D(ee))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new R(((e,t,r)=>pe(e,t,r)),(e=>this.processor.graphicsCore.recreateGraphics(e))),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then((()=>{s(t),H(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()})):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:this.layer,memoryController:e}),Q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new W({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),o),this._updatingHandles.add((()=>this.layer.renderer),((e,t)=>this._rendererChange(e,t))),this._updatingHandles.add((()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds]),(()=>this._filterChange())),this._set("processor",new S({owner:this,preferredUpdatePolicy:X.ASYNC,scaleVisibilityEnabled:!ie,filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",(({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t))),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new I({layerView:this}),U(this.layer.geometryDefinitions)&&(this._worker=new O((e=>this.view.resourceController.immediate.schedule(e)))),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles([this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)})),a((()=>Z.I3S_TREE_SHOW_TILES),(e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then((({I3STreeDebugger:t})=>{!this._treeDebugger&&Z.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))}))}else e||!this._treeDebugger||Z.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)}),o)]),this.when((()=>{this._setupQueryEngine(),this._updatingHandles.add((()=>this.maximumNumberOfFeatures),(e=>this._controller.featureTarget=e),o),this._updatingHandles.add((()=>this.suspended),(e=>{e&&this._removeAllNodeData()}))}))}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._worker=r(this._worker),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return ie?se(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}async whenGraphicAttributes(e,t){return q(this.layer,e,this._getObjectIdField(),t,(()=>[...this.loadedGraphics.nodes()]))}getHit(e){if(!this.loadedGraphics)return null;const t=w(this.loadedGraphics.find((t=>t.uid===e)),this.layer),r=this._getObjectIdField();return t?.attributes?.[r]?(t.layer=this.layer,t.sourceLayer=this.layer,{type:"graphic",graphic:t,layer:t.layer}):null}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){return this.processor.highlight(e,this.layer.objectIdField,t?.name??re)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return A(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._worker&&(this._worker=new O((e=>this.view.resourceController.immediate.schedule(e))));const i=await this._worker.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!he(r)&&!ue(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?me(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=he(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=he(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new ne(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),ce(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const m=this.view.stage.renderView.olidRenderHelper;if(m){const e=C(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];m.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&te(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=Y(new J(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,ye,i),e.serviceObbInIndexSR.center=ye)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ge[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;u(ye,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?g(s,ye):y(s,ye))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(ye[0],ye[1],ye[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),m=h*o,g=isNaN(t[m+2])?void 0:t[m+2],y=E(t[m],t[m+1],g,u),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(fe.property="geometry",fe.graphic=f,fe.oldValue=f.geometry,fe.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(fe)),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode(((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)})),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributes=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),ce(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode((t=>e.push(t.node.id))),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode((t=>e.push(t.node))),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode(((t,r)=>e.push(r)))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributes)return t.attributes.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributes)return t.attributes.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributes&&(r.attributes.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributes=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){ce(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach((e=>e.nodeIndex===t&&i.push(e.uid))),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.associatedLayer?.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every(((e,t)=>s[t]===o[t]))||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode((e=>this._filterNode(e)))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(fe.graphic=s,fe.property="visible",fe.oldValue=e,fe.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(fe))}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new G(s,e,o,(()=>this.processor.featureStore),i,r);this._queryEngine=new F({context:a,priority:oe.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await V(t,e);P(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode((t=>e(t.node,t.featureIds))),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new k(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],le.prototype,"processor",void 0),e([l({type:j})],le.prototype,"filter",void 0),e([l()],le.prototype,"loadedGraphics",void 0),e([l()],le.prototype,"i3slayer",null),e([l()],le.prototype,"layerViewUid",null),e([l()],le.prototype,"_controller",void 0),e([l()],le.prototype,"updating",void 0),e([l()],le.prototype,"suspended",void 0),e([l($)],le.prototype,"updatingProgress",void 0),e([l()],le.prototype,"updatingProgressValue",null),e([l({readOnly:!0})],le.prototype,"visibleAtCurrentScale",null),e([l(ae.requiredFields)],le.prototype,"requiredFields",null),e([l(ae.availableFields)],le.prototype,"availableFields",void 0),e([l()],le.prototype,"_fieldsHelper",void 0),e([l({type:Number})],le.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],le.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],le.prototype,"_excludeObjectIds",null),e([l({readOnly:!0})],le.prototype,"lodFactor",null),e([l({readOnly:!0})],le.prototype,"hasM",null),e([l({readOnly:!0})],le.prototype,"hasZ",null),e([l()],le.prototype,"contentVisible",null),e([l({readOnly:!0})],le.prototype,"legendEnabled",null),le=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],le);const de=le;function ue(e){return"pointData"in e}function he(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function pe(e,t,r){const i=t.attributes;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=L(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function ce(e){const t=e.attributes;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=L(t.attributeData[e],i))}}}function me(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ge={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ye=h(),fe={graphic:null,property:null,oldValue:null,newValue:null};export{de as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import i from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import s from"../../../core/ReactiveSet.js";import{initial as l}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../core/sql/WhereClause.js";import d from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as u}from"../../../layers/support/floorFilterUtils.js";import h from"../../../rest/support/Query.js";import{isNumber as p}from"../../../support/guards.js";import{I3SMeshView3D as c}from"./I3SMeshView3D.js";import{ForAllFeaturesMode as y}from"./II3SMeshView3D.js";import{LayerView3D as g}from"./LayerView3D.js";import{createInteractiveEditSession as f,normalizeEditResultsEvent as m,processGeometryEdits as _,processAttributeEdits as F}from"./i3s/featureEditing.js";import{createGetFeatureExtent as v}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as w}from"./i3s/I3SMeshViewFilter.js";import{NodeFilterImpact as b}from"./i3s/I3SNode.js";import{I3SOverrides as j}from"./i3s/I3SOverrides.js";import{I3SQueryEngine as I}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as S,I3SQueryFeature as E}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as O}from"./i3s/I3SQueryFeatureStore.js";import{checkRecyclable as H,getIndexCrs as x,objectIdFilter as C}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as Q}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as V}from"./support/fieldProperties.js";import{PopupSceneLayerView as R}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as q}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as L}from"./support/TemporalSceneLayerView.js";import{updatingProgress as A}from"../support/updatingProperties.js";import D from"../../layers/SceneLayerView.js";import{hasPopupTemplate as G}from"../../layers/support/popupUtils.js";import{defaultHighlightName as U}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as P}from"../../support/layerViewUtils.js";import{TaskPriority as M}from"../../support/Scheduler.js";const T=V();let N=class extends(c(L(Q(R(g(D)))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.viewFilter=null,this._setVisibilityHiddenObjectIds=new s,this.progressiveLoadFactor=1,this._elevationContext="scene",this._supportsLabeling=!0,this._pendingEditsQueue=Promise.resolve(),this._interactiveEditingSessions=new Map,this._queryEngine=null}get i3slayer(){return this.layer}tryRecycleWith(e,t){return e.url===this.layer.url&&this.i3sOverrides.isEmpty?e.load(t).then((()=>{H(this.layer,e,this.i3sOverrides),this.layer=e,this.i3sOverrides.destroy();const t=this.view.resourceController?.memoryController;this.i3sOverrides=new j({view:this.view,layer:e,memoryController:t}),this.resetHighlights()})):null}get layerPopupEnabledAndHasTemplate(){return this.layer.popupEnabled&&G(this.layer,this.view.popup?.defaultPopupTemplateEnabled)}get filter(){return this._get("filter")}set filter(e){this._set("filter",w.checkSupport(e)?e:null)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=u(this);return null!=e?a.create(e,{fieldsIndex:this.layer.fieldsIndex}):null}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds.toArray();return e.length?e.sort(((e,t)=>e-t)):null}get _setVisibilityHiddenObjectIdsSorted(){return this._setVisibilityHiddenObjectIds.size?Array.from(this._setVisibilityHiddenObjectIds).sort(((e,t)=>e-t)):null}get lodFactor(){return this.view?.qualitySettings?.sceneService?.object?.lodFactor??1}get lodCrossfadeUncoveredDuration(){return this.view?.qualitySettings?.fadeDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}get visibleAtCurrentScale(){return P(this.i3slayer.effectiveScaleRange,this.view.scale)}initialize(){this._fieldsHelper=new q({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),l),this._updatingHandles.add((()=>this.layer.renderer),(e=>this._updatingHandles.addPromise(this._rendererChange(e))),l);const e=()=>this._filterChange();this._updatingHandles.add((()=>this.parsedDefinitionExpression),e),this._updatingHandles.add((()=>this.mergedFilter),e),this._updatingHandles.add((()=>this._floorFilterClause),e),this._updatingHandles.add((()=>this._excludeObjectIdsSorted),e),this._updatingHandles.add((()=>this._setVisibilityHiddenObjectIdsSorted),e),this._updatingHandles.add((()=>this.viewFilter?.sortedObjectIds),e),this._updatingHandles.add((()=>this.viewFilter?.parsedWhereClause),e),this._updatingHandles.add((()=>this.getTimeFilterDependencies()),e),this._updatingHandles.add((()=>[this.viewFilter?.parsedGeometry,this.mergedFilter?.spatialRelationship,this.layer.filter?.spatialRelationship]),(()=>this._geometryFilterChange())),this._updatingHandles.add((()=>({layerViewFilter:this.mergedFilter,layerFilter:this.layerFilter})),(({layerViewFilter:e,layerFilter:t})=>{if(null==e&&null==t)return void this._set("viewFilter",null);const i=this.viewFilter;if(i)return i.viewFilter=e,i.layerFilter=t,void this._filterChange();this._set("viewFilter",new w({layerFilter:t,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError),addTimeFilter:(e,t)=>this.addTimeFilter(e,t)}))}),l),this.i3sOverrides.is3DOFL&&this._updatingHandles.add((()=>this.i3sOverrides.sortedGeometryChangedObjectIds),e),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)})))}destroy(){this._fieldsHelper=r(this._fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!0,returnZ:!0,outSpatialReference:this.view.spatialReference};return this.mergedFilter?.createQuery(e)??new h(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then((e=>{if(!e?.features)return e;const t=this.layer;for(const i of e.features)i.layer=t,i.sourceLayer=t;return e}))}async queryObjectIds(e,t){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)).filter(p)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=v(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new I({layerView:this,priority:M.FEATURE_QUERY_ENGINE,spatialIndex:new O({featureAdapter:new S({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo??[],getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures(((t,i,r)=>e(new E(t,i,r))),t,y.QUERYABLE),getFeatureExtent:e,sourceSpatialReference:x(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e,t){const i=this._highlights,r=t?.name??U;if(e instanceof h){const{set:t,handle:s}=i.acquireSet(r);return this.queryObjectIds(e).then((e=>i.setFeatureIds(t,e))),s}return super.highlight(e,t)}createInteractiveEditSession(e){return f(this._attributeEditingContext,e)}_createLayerGraphic(e){return new t({attributes:e,layer:this.layer,sourceLayer:this.layer})}getFilters(){const e=super.getFilters();this.i3sOverrides.is3DOFL&&this.i3sOverrides.sortedGeometryChangedObjectIds.length>0&&e.push(((e,t)=>{t.node.index>=0&&C(this.i3sOverrides.sortedGeometryChangedObjectIds,!1,e)}));const t=this._setVisibilityHiddenObjectIdsSorted;null!=t&&e.push((e=>C(t,!1,e)));const i=this._excludeObjectIdsSorted;return null!=i&&e.push((e=>C(i,!1,e))),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),null!=this.viewFilter&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}setVisibility(e,t){t?this._setVisibilityHiddenObjectIds.delete(e):this._setVisibilityHiddenObjectIds.add(e)}isUpdating(){return super.isUpdating()||this.layerFilterUpdating||null!=this.viewFilter&&this.viewFilter.updating||null!=this.i3sOverrides&&this.i3sOverrides.updating}_ensureQuery(e){return this._validateQuery(this._addDefinitionExpressionToQuery(null==e?this.createQuery():h.from(e)))}_validateQuery(e){return e.outSpatialReference&&!e.outSpatialReference.equals(this.view.spatialReference)&&(i.getLogger(this).warn("query: outSpatialReference different from the view's spatial reference is not supported"),e.outSpatialReference=this.view.spatialReference),e.returnGeometry&&(e.returnZ=!0),e.returnCentroid=!1,e}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),globalIdField:this._getGlobalIdField(),forEachNode:e=>this._forAllNodes((t=>null!=t?e(t.node,t.featureIds):null)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this.i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}async _handleEdits(e){const t=this._attributeEditingContext,i=await m(t,e);_(t,i),F(t,i)}get hasGeometryFilter(){return null!=this.viewFilter?.parsedGeometry}computeNodeFiltering(e){const t=this.viewFilter;return null==t||!this.view.spatialReference||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?b.Unmodified:b.Culled}};e([n()],N.prototype,"i3slayer",null),e([n(A)],N.prototype,"updatingProgress",void 0),e([n({type:d})],N.prototype,"filter",null),e([n({readOnly:!0})],N.prototype,"viewFilter",void 0),e([n(T.requiredFields)],N.prototype,"requiredFields",null),e([n(T.availableFields)],N.prototype,"availableFields",void 0),e([n()],N.prototype,"_fieldsHelper",void 0),e([n()],N.prototype,"_floorFilterClause",null),e([n()],N.prototype,"_excludeObjectIdsSorted",null),e([n()],N.prototype,"_setVisibilityHiddenObjectIds",void 0),e([n()],N.prototype,"_setVisibilityHiddenObjectIdsSorted",null),e([n()],N.prototype,"lodFactor",null),e([n()],N.prototype,"updatingProgressValue",null),e([n({readOnly:!0})],N.prototype,"visibleAtCurrentScale",null),N=e([o("esri.views.3d.layers.SceneLayerView3D")],N);const z=N;export{z as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import i from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import l from"../../../core/ReactiveSet.js";import{initial as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import d from"../../../core/sql/WhereClause.js";import u from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as h}from"../../../layers/support/floorFilterUtils.js";import p from"../../../rest/support/Query.js";import{isNumber as c}from"../../../support/guards.js";import{I3SMeshView3D as y}from"./I3SMeshView3D.js";import{ForAllFeaturesMode as g}from"./II3SMeshView3D.js";import{LayerView3D as f}from"./LayerView3D.js";import{createInteractiveEditSession as m,normalizeEditResultsEvent as _,processGeometryEdits as F,processAttributeEdits as v}from"./i3s/featureEditing.js";import{createGetFeatureExtent as w}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as b}from"./i3s/I3SMeshViewFilter.js";import{NodeFilterImpact as j}from"./i3s/I3SNode.js";import{I3SOverrides as I}from"./i3s/I3SOverrides.js";import{I3SQueryEngine as S}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as E,I3SQueryFeature as O}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as H}from"./i3s/I3SQueryFeatureStore.js";import{checkRecyclable as x,getIndexCrs as C,objectIdFilter as Q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as V}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as R}from"./support/fieldProperties.js";import{PopupSceneLayerView as q}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as L}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as A}from"./support/TemporalSceneLayerView.js";import{updatingProgress as D}from"../support/updatingProperties.js";import U from"../../layers/SceneLayerView.js";import{hasPopupTemplate as G}from"../../layers/support/popupUtils.js";import{defaultHighlightName as P}from"../../support/HighlightDefaults.js";import{isInEffectiveScaleRange as M}from"../../support/layerViewUtils.js";import{TaskPriority as T}from"../../support/Scheduler.js";const N=R();let z=class extends(y(A(V(q(f(U)))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.viewFilter=null,this._setVisibilityHiddenObjectIds=new l,this.progressiveLoadFactor=1,this._elevationContext="scene",this._supportsLabeling=!0,this._pendingEditsQueue=Promise.resolve(),this._interactiveEditingSessions=new Map,this._queryEngine=null}get i3slayer(){return this.layer}tryRecycleWith(e,t){return e.url===this.layer.url&&this.i3sOverrides.isEmpty?e.load(t).then((()=>{s(t),x(this.layer,e,this.i3sOverrides),this.layer=e,this.i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this.i3sOverrides=new I({view:this.view,layer:e,memoryController:i}),this.resetHighlights()})):null}get layerPopupEnabledAndHasTemplate(){return this.layer.popupEnabled&&G(this.layer,this.view.popup?.defaultPopupTemplateEnabled)}get filter(){return this._get("filter")}set filter(e){this._set("filter",b.checkSupport(e)?e:null)}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get _floorFilterClause(){const e=h(this);return null!=e?d.create(e,{fieldsIndex:this.layer.fieldsIndex}):null}get _excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds.toArray();return e.length?e.sort(((e,t)=>e-t)):null}get _setVisibilityHiddenObjectIdsSorted(){return this._setVisibilityHiddenObjectIds.size?Array.from(this._setVisibilityHiddenObjectIds).sort(((e,t)=>e-t)):null}get lodFactor(){return this.view?.qualitySettings?.sceneService?.object?.lodFactor??1}get lodCrossfadeUncoveredDuration(){return this.view?.qualitySettings?.fadeDuration??0}get updatingProgressValue(){return this._controller?.updatingProgress??0}get visibleAtCurrentScale(){return M(this.i3slayer.effectiveScaleRange,this.view.scale)}initialize(){this._fieldsHelper=new L({layerView:this}),this._updatingHandles.add((()=>this.layer.rangeInfos),(e=>this._rangeInfosChanged(e)),n),this._updatingHandles.add((()=>this.layer.renderer),(e=>this._updatingHandles.addPromise(this._rendererChange(e))),n);const e=()=>this._filterChange();this._updatingHandles.add((()=>this.parsedDefinitionExpression),e),this._updatingHandles.add((()=>this.mergedFilter),e),this._updatingHandles.add((()=>this._floorFilterClause),e),this._updatingHandles.add((()=>this._excludeObjectIdsSorted),e),this._updatingHandles.add((()=>this._setVisibilityHiddenObjectIdsSorted),e),this._updatingHandles.add((()=>this.viewFilter?.sortedObjectIds),e),this._updatingHandles.add((()=>this.viewFilter?.parsedWhereClause),e),this._updatingHandles.add((()=>this.getTimeFilterDependencies()),e),this._updatingHandles.add((()=>[this.viewFilter?.parsedGeometry,this.mergedFilter?.spatialRelationship,this.layer.filter?.spatialRelationship]),(()=>this._geometryFilterChange())),this._updatingHandles.add((()=>({layerViewFilter:this.mergedFilter,layerFilter:this.layerFilter})),(({layerViewFilter:e,layerFilter:t})=>{if(null==e&&null==t)return void this._set("viewFilter",null);const i=this.viewFilter;if(i)return i.viewFilter=e,i.layerFilter=t,void this._filterChange();this._set("viewFilter",new b({layerFilter:t,viewFilter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError),addTimeFilter:(e,t)=>this.addTimeFilter(e,t)}))}),n),this.i3sOverrides.is3DOFL&&this._updatingHandles.add((()=>this.i3sOverrides.sortedGeometryChangedObjectIds),e),this.addHandles(this.layer.on("apply-edits",(e=>this._updatingHandles.addPromise(e.result)))),this.addHandles(this.layer.on("edits",(e=>{const t=this._pendingEditsQueue.then((()=>this._handleEdits(e))).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)})))}destroy(){this._fieldsHelper=r(this._fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&i.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!0,returnZ:!0,outSpatialReference:this.view.spatialReference};return this.mergedFilter?.createQuery(e)??new p(e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),t?.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),t?.signal).then((e=>{if(!e?.features)return e;const t=this.layer;for(const i of e.features)i.layer=t,i.sourceLayer=t;return e}))}async queryObjectIds(e,t){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),t?.signal)).filter(c)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=w(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new S({layerView:this,priority:T.FEATURE_QUERY_ENGINE,spatialIndex:new H({featureAdapter:new E({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo??[],getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures(((t,i,r)=>e(new O(t,i,r))),t,g.QUERYABLE),getFeatureExtent:e,sourceSpatialReference:C(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e,t){const i=this._highlights,r=t?.name??P;if(e instanceof p){const{set:t,handle:s}=i.acquireSet(r);return this.queryObjectIds(e).then((e=>i.setFeatureIds(t,e))),s}return super.highlight(e,t)}createInteractiveEditSession(e){return m(this._attributeEditingContext,e)}_createLayerGraphic(e){return new t({attributes:e,layer:this.layer,sourceLayer:this.layer})}getFilters(){const e=super.getFilters();this.i3sOverrides.is3DOFL&&this.i3sOverrides.sortedGeometryChangedObjectIds.length>0&&e.push(((e,t)=>{t.node.index>=0&&Q(this.i3sOverrides.sortedGeometryChangedObjectIds,!1,e)}));const t=this._setVisibilityHiddenObjectIdsSorted;null!=t&&e.push((e=>Q(t,!1,e)));const i=this._excludeObjectIdsSorted;return null!=i&&e.push((e=>Q(i,!1,e))),this._floorFilterClause&&this.addSqlFilter(e,this._floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),null!=this.viewFilter&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}setVisibility(e,t){t?this._setVisibilityHiddenObjectIds.delete(e):this._setVisibilityHiddenObjectIds.add(e)}isUpdating(){return super.isUpdating()||this.layerFilterUpdating||null!=this.viewFilter&&this.viewFilter.updating||null!=this.i3sOverrides&&this.i3sOverrides.updating}_ensureQuery(e){return this._validateQuery(this._addDefinitionExpressionToQuery(null==e?this.createQuery():p.from(e)))}_validateQuery(e){return e.outSpatialReference&&!e.outSpatialReference.equals(this.view.spatialReference)&&(i.getLogger(this).warn("query: outSpatialReference different from the view's spatial reference is not supported"),e.outSpatialReference=this.view.spatialReference),e.returnGeometry&&(e.returnZ=!0),e.returnCentroid=!1,e}get _attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),globalIdField:this._getGlobalIdField(),forEachNode:e=>this._forAllNodes((t=>null!=t?e(t.node,t.featureIds):null)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this.i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}async _handleEdits(e){const t=this._attributeEditingContext,i=await _(t,e);F(t,i),v(t,i)}get hasGeometryFilter(){return null!=this.viewFilter?.parsedGeometry}computeNodeFiltering(e){const t=this.viewFilter;return null==t||!this.view.spatialReference||t.isMBSGeometryVisible(e,this.view.spatialReference,this._controller.crsIndex)?j.Unmodified:j.Culled}};e([o()],z.prototype,"i3slayer",null),e([o(D)],z.prototype,"updatingProgress",void 0),e([o({type:u})],z.prototype,"filter",null),e([o({readOnly:!0})],z.prototype,"viewFilter",void 0),e([o(N.requiredFields)],z.prototype,"requiredFields",null),e([o(N.availableFields)],z.prototype,"availableFields",void 0),e([o()],z.prototype,"_fieldsHelper",void 0),e([o()],z.prototype,"_floorFilterClause",null),e([o()],z.prototype,"_excludeObjectIdsSorted",null),e([o()],z.prototype,"_setVisibilityHiddenObjectIds",void 0),e([o()],z.prototype,"_setVisibilityHiddenObjectIdsSorted",null),e([o()],z.prototype,"lodFactor",null),e([o()],z.prototype,"updatingProgressValue",null),e([o({readOnly:!0})],z.prototype,"visibleAtCurrentScale",null),z=e([a("esri.views.3d.layers.SceneLayerView3D")],z);const W=z;export{W as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import a from"../../../../core/Logger.js";import{findInMap as n}from"../../../../core/MapUtils.js";import{abortMaybe as o,removeMaybe as l,destroyMaybe as h,disposeMaybe as d}from"../../../../core/maybe.js";import{MinPriority as p}from"../../../../core/MemCache.js";import c from"../../../../core/PooledArray.js";import{throwIfAborted as y,ignoreAbortErrors as g,createResolver as u,isAbortError as m}from"../../../../core/promiseUtils.js";import{when as b,watch as _,on as f,syncAndInitial as v,whenOnce as C}from"../../../../core/reactiveUtils.js";import{schedule as S}from"../../../../core/scheduling.js";import{property as G}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as w}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as x,isEmpty as P}from"../../../../core/accessorSupport/diffUtils.js";import{i as R,f as D,g as E}from"../../../../chunks/vec32.js";import{create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import I from"../../../../geometry/Extent.js";import A from"../../../../geometry/Point.js";import{canProjectWithoutEngine as L}from"../../../../geometry/projection.js";import{projectBuffer as j}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as O}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as V}from"../../../../geometry/projection/projectXYZToVector.js";import{center as F,create as T,fromRect as M,equals as k}from"../../../../geometry/support/aaBoundingBox.js";import{create as z}from"../../../../geometry/support/aaBoundingRect.js";import{equals as H}from"../../../../geometry/support/spatialReferenceUtils.js";import W from"../../../../layers/Layer.js";import{getObjectId as N,computeAABB as B,hasGeometry as q}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Y}from"../../../../layers/graphics/hydratedFeatures.js";import{PromiseQueue as Q}from"../../../../layers/support/PromiseQueue.js";import $ from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as Z,validateTo3D as J}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as X}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as K}from"../../../../support/basemapUtils.js";import{loadArcade as ee}from"../../../../support/loadArcade.js";import te from"../../../../symbols/LabelSymbol3D.js";import ie from"../../../../symbols/TextSymbol.js";import re from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as se}from"../../../../symbols/support/defaults3D.js";import{to3D as ae}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as ne,defaultSymbolComplexity as oe}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as le}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as he}from"./ElevationQuery.js";import{VisibilityGroup as de,VisibilityFlag as pe}from"./enums.js";import{extractExpressionInfo as ce,createContext as ye}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ge}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ue}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as me}from"./Graphics3DSymbolCreationContext.js";import{make as be}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as _e}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as fe}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as ve}from"./GraphicStateTracking.js";import{computeCentroid as Ce}from"./graphicUtils.js";import{FastUpdateStatus as Se,ApplyRendererDiffResult as Ge}from"./interfaces.js";import{LoadStatus as we}from"./Loadable.js";import{SpatialIndex2D as xe}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as Pe}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Re}from"../../support/extentUtils.js";import{GridLocalOriginFactory as De}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{UpdatePolicy as Ee}from"../../webgl-engine/lib/UpdatePolicy.js";import{affectsGeometry as Ue}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Ie}from"../../webgl-engine/lib/WebGLLayer.js";import{hasPopupTemplate as Ae}from"../../../layers/support/popupUtils.js";import{PropertiesPool as Le}from"../../../support/PropertiesPool.js";import{ImmediateTask as je,noBudget as Oe,TaskPriority as Ve}from"../../../support/Scheduler.js";import{TextureCompressionHandle as Fe}from"../../../support/TextureCompressionHandle.js";import{Yield as Te}from"../../../support/Yield.js";import{alphaCutoff as Me}from"../../../../webscene/support/AlphaCutoff.js";var ke;const ze=U(),He=T();let We=class extends t{static{ke=this}static{this.tmpVec=U()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new xe({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?Ee.ASYNC:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this.running)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.running||this._loadingSymbols>0||this.compressionHandle.compressing)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.running||this._updateQueue.running}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new le(s,h,a)}get averageSymbolComplexity(){const e=ne(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce(((e,t)=>e+t.memory.resourceBytes),0);if(null==this._symbolMaterials){this._symbolMaterials=[];for(const e of this._symbols.values())if(null!=e)for(const t of e.symbolLayers)if(t)for(const e of t.materials)e&&this._symbolMaterials.push(e)}const i=this.owner.view.stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=this._symbolMaterials.reduce(((e,t)=>e+((i.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0)),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){const t=e;if("web-style"===t.type)return t.clone();const i=this._symbolConversionCache.get(t.id);if(null!=i)return i;const r=ae(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),s=r.symbol||null;return null==s&&r.error&&a.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,s),s}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.symbols,i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?oe(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((t=>{null!=t&&e.push(t.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new Le({computedExtent:I},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=je,this._dataUpdateQueue=new Q,this._updateQueue=new Q,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this._pendingUpdatesPool=new c({allocator:e=>e||new Be,deallocator:e=>(e.clear(),e)}),this.compressionHandle=new Fe,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new c,this.preferredUpdatePolicy=Ee.SYNC,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache("graphics-3d-unused-symbols",(e=>e.destroy())),this.symbolCreationContext=new me(e.owner.view.resourceController.scheduler,((e,t)=>this._updateQueue.push(e,t)),e.owner.layerViewUid,this.compressionHandle)}initialize(){this._featureStore=new ge({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e(N(t.graphic,this._objectIdField))))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.FILTER,!0)))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(b((()=>this.owner.view.state.highlights),(()=>{const{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach((t=>t.updateHighlights(e)))}))),this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new he(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,this._sharedSymbolResourcesOwnerHandle=i.addGraphicsOwner(this.owner),null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new De(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ye(r,this._viewSpatialReference,e,a.getLogger(this)),y(e),this.symbolCreationContext.screenSizePerspectiveEnabled=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this.addHandles(s((()=>t.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this.addHandles([_((()=>this.suspendedOrOutsideOfView),(()=>this._updateQueue.unshift((()=>this._updateLayerVisibility()),null).catch(g))),_((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view?.screenSizePerspectiveEnabled]),(()=>{const e=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),_((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),_((()=>this.owner.view.state?.rasterPixelRatio),(()=>this._pixelRatioChange())),_((()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),_((()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods),(e=>this._skipHighSymbolLoDsChange(e))),_((()=>this.owner.view.focusAreasView?.polygons),(()=>this._updateFocusedLabels())),_((()=>this.owner.view.map?.focusAreas.style),(()=>this.recreateAllGraphicsAndSymbols())),b((()=>t.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([f(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),_((()=>this.effectiveUpdatePolicy),(e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Ee.ASYNC,e===Ee.SYNC&&this.runTask(Oe)}),v)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(Ve.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(_((()=>this.layer.featureReduction),(()=>this._deconflictor?.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=o(this._initializeAbortController)}_updateFocusedLabels(){this.forEachGraphics3DSymbol(((e,t)=>{t&&e.updateFocus((({graphic:e})=>this.recreateGraphics([e])),t)}))}destroy(){this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=o(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=je,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=l(this._deconflictor),this._labeler=l(this._labeler),this._elevationAlignment=h(this._elevationAlignment),this._scaleVisibility=h(this._scaleVisibility),this._filterVisibility=h(this._filterVisibility),this._objectStates=h(this._objectStates),this.clear(),this._featureStore=h(this._featureStore),this._updatingPendingLoadedGraphicsChange=l(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=h(this._graphicStateTracking),this.stage&&(this.stageLayer=h(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=l(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=h(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=h(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(h),this._symbols.clear(),this._symbolMaterials=null,this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("dataUpdating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Ie(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("shaderTransformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.graphicUid))),i.on("geometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("geometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("attributesChanged",(e=>Ue(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid)))}notifyGraphicGeometryChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*qe,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){const e=this._visible&&(null==this.layer.opacity||this.layer.opacity>=Me);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return N(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)})),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){const t=this._deconflictor?.labelingInfoChange(e),i=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=!1,t=!1;for(const[i,r]of this._symbols)if(null!=r){switch(r.getFastUpdateStatus()){case Se.Loading:return"unknown";case Se.Fast:this._graphicsBySymbol.has(i)&&(t=!0);break;case Se.Slow:this._graphicsBySymbol.has(i)&&(e=!0);break;case Se.Mixed:this._graphicsBySymbol.has(i)&&(t=e=!0);case Se.Undefined:}}return t?e?"mixed":"fast":e?"slow":"mixed"}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("dataUpdating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Te}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return n(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(de.GRAPHIC,pe.USER,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=u();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>j(e,r,t,e,i,t,s),n=(e,t,r)=>j(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){F(h,ze);const t=e.getElevation(ze[0],ze[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await C((()=>this.owner?.loadedGraphics));const i=this.owner.layer?.objectIdField,s=this.owner.loadedGraphics.find((t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;R(Ye,0,0,0);let s=0;if(r.render.num>0){if(!O(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(R(Qe,e,i,a),!O(Qe,this._viewElevationProvider.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}return s>1&&E(Ye,Ye,1/s),new A({x:Ye[0],y:Ye[1],z:Ye[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t)){switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>!(null==t.newValue||null==e||!e.graphics3DSymbol.updateGeometry(e,t.newValue)||!(this._labeler?.updateGraphicGeometry(e)??1))&&(this._labeler?.setDirty(),!0)));const i=t.graphic.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action)))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.graphic.geometry)if(null!=e)i()||this._recreateGraphic(e.graphic);else{const e=t.graphic.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&t.loadStatus===we.LOADING)return}this._recreateGraphic(t.graphic)}else this._recreateGraphic(t.graphic)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=x(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!P(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i,!1);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Ee.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("dataUpdating"),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((t=>{null!=t&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=He,i=e.spatialReference;B(e,t);const r=this._viewSpatialReference,s=ke.tmpVec;if(H(i,r)||V(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],V(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ye(t,this._viewSpatialReference,e.signal,a.getLogger(this)),y(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t?.forEach((e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Pe({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);h(r),this._symbols.delete(e),this._symbolMaterials=null,h(this._unusedSymbolsCache.pop(e)),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===Ee.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("dataUpdating")):a.getLogger(this).error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Ee.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return Ee.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t),Ee.SYNC);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?i.state!==Ne.NEW&&i.abortController?.abort():this._pendingAdds++:(i=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}remove(e){this.effectiveUpdatePolicy===Ee.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("dataUpdating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),i.state===Ne.LOADING&&i.abortController?.abort(),this._pendingAdds--);else{const i=this._pendingUpdatesPool.pushNew();i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&a.getLogger(this).warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&i.state===Ne.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Ne.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=Ee.SYNC),i.add)switch(i.state){case Ne.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case Ne.REJECTED:i.add=null,this._pendingAdds--;case Ne.LOADING:}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("dataUpdating"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Ne.READY);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=Ne.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,m(t)?e.state=Ne.NEW:e.state=Ne.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add),void(e.state=Ne.READY);e.state=Ne.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(m(i)?e.state=Ne.NEW:e.state=Ne.REJECTED)}null==t?.symbol?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Ne.READY}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!q(e))return;const r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){const t=K(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.owner.layerViewUid,!!this.layer.popupEnabled&&!t&&Ae(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const s=t.symbol,a=this.getOrCreateGraphics3DSymbol(s,t.renderer);if(null==a)return;this._expandComputedExtent(e.geometry);const n=this._beginGraphicUpdate(e),o=new ue(e,t,this.layer);let l=!1;const h=e=>{e===a.symbol.id&&(l=!0)};this._whenSymbolRemoved.push(h);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(h);if(this._graphicsWaitingForSymbol.get(e.uid)!==n||l||a.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==a.symbol.id)--a.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(a,o);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(h),l||(m(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,i===Ee.ASYNC?a.load((()=>this._dataUpdateQueue.push(d,null).catch(g)),(e=>this._dataUpdateQueue.push((()=>p(e)),null).catch(g))):a.load(d,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating"))}_hasLabelingContext(e){if(e instanceof te||e instanceof ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof te&&!this._hasLabelingContext(e))||(a.getLogger(this).error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t=!0){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!L(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Y(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))s=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{const e=r.symbol||se(r.geometry);s=new X(null,e)}return null==s?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){if(null==e.geometry)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?Y(e,this.layer):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=ae(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&(r=e.symbol.symbolLayers)}const s=be(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);if(void 0===i){const r=this._unusedSymbolsCache.pop(e.id);i=null!=r?r:e instanceof re?new _e(e,(e=>this._dataUpdateQueue.push(e,null)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i),this._symbolMaterials=null}return null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new ve(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=Ce(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=o(this._rendererChangeAbortController),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),Z(e))if(e?.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();y(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),y(t)),this.effectiveUpdatePolicy===Ee.ASYNC?await this._updateQueue.push((()=>this._currentRendererChange(e,r)),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Ee.ASYNC){const t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push((()=>this._currentRendererChange(e,!1)),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await ee(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=x(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof W?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(Y(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){const s=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(s||a){const n=a?a.added.map((e=>e.symbol)).filter(i):[],o=a?a.removed.map((e=>e.symbol)).filter(i):[];if(a)for(let e=0;e<a.changed.length;e++)n.push(a.changed[e].newValue.symbol),o.push(a.changed[e].oldValue.symbol);return s?(r.defaultSymbol&&o.push(r.defaultSymbol),t.defaultSymbol&&n.push(t.defaultSymbol)):r.defaultSymbol&&n.length&&o.push(t.defaultSymbol),this._applySymbolSetDiff(n,o,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),this._symbolMaterials=null,null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,i){if(this._diffHasSymbolChange(e))return!1;if(t instanceof $&&i instanceof $&&this._applyUniqueValueRendererDiff(e,t,i)&&0===Object.keys(e.diff).length)return!0;for(const r of this._graphicsBySymbol.keys()){const i=this._symbols.get(r);if(null!=i)switch(i.applyRendererDiff(e,t)){case Ge.RecreateSymbol:this._recreateSymbol(r);break;case Ge.RecreateGraphics:this._recreateGraphicsForSymbol(r);case Ge.FastUpdate:}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t)))}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)}))}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)}))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=S((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=z();return Re(e,r,t)?this.symbolCreationContext.clippingExtent=M(T(),r):this.symbolCreationContext.clippingExtent=null,!k(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(const[i,r]of this._symbols){if(null==r)return;e(r,this._graphicsBySymbol.get(i)||$e,i)}if(!t?.excludeUnused)for(const i of this._unusedSymbolsCache)e(i,void 0,i.symbol.id)}updateGraphicsVisibilities(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=!!this._scaleVisibility?.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.USER,!1)))}_validateRenderer(e){const t=()=>`'${this.layer.title?`${this.layer.title}, `:""}id:${this.layer.id}'`,i=J(e,{geometryType:this.layer?.geometryType,logWarning:(e,i)=>a.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${i}`)});if(i){const e=`Renderer for layer ${t} is not supported in a SceneView`;a.getLogger(this).warn(e,i.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),this._symbolMaterials=null,this._unusedSymbolsCache.put(i,t,p),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){}get performanceInfo(){return new fe(this.graphics3DGraphics.size,Array.from(this.graphics3DGraphics.values()).reduce(((e,t)=>e+(t.isVisible()?1:0)),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};var Ne;e([G({readOnly:!0})],We.prototype,"computedExtent",void 0),e([G()],We.prototype,"currentRenderer",void 0),e([G()],We.prototype,"rendererHasGeometryOperations",void 0),e([G()],We.prototype,"_frameTaskHandle",void 0),e([G()],We.prototype,"_dataUpdateQueue",void 0),e([G()],We.prototype,"_updateQueue",void 0),e([G({readOnly:!0})],We.prototype,"_viewSpatialReference",null),e([G()],We.prototype,"_rendererChangeAbortController",void 0),e([G()],We.prototype,"_elevationInfoChangeAbortController",void 0),e([G()],We.prototype,"_initializeAbortController",void 0),e([G()],We.prototype,"_elevationAlignment",void 0),e([G()],We.prototype,"_scaleVisibility",void 0),e([G()],We.prototype,"_filterVisibility",void 0),e([G()],We.prototype,"_initializePromise",void 0),e([G()],We.prototype,"_spatialIndex",void 0),e([G({readOnly:!0})],We.prototype,"extentPadding",void 0),e([G()],We.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([G()],We.prototype,"_featureStore",void 0),e([G()],We.prototype,"_objectStates",void 0),e([G()],We.prototype,"_loadingSymbols",void 0),e([G({constructOnly:!0})],We.prototype,"compressionHandle",void 0),e([G()],We.prototype,"preferredUpdatePolicy",void 0),e([G()],We.prototype,"_forcedUpdatePolicy",void 0),e([G({readOnly:!0})],We.prototype,"effectiveUpdatePolicy",null),e([G({constructOnly:!0})],We.prototype,"elevationFeatureExpressionEnabled",void 0),e([G({constructOnly:!0})],We.prototype,"owner",void 0),e([G({constructOnly:!0})],We.prototype,"layer",void 0),e([G({constructOnly:!0})],We.prototype,"graphicSymbolSupported",void 0),e([G({constructOnly:!0})],We.prototype,"getRenderingInfoWithoutRenderer",void 0),e([G({constructOnly:!0})],We.prototype,"componentFactories",void 0),e([G({constructOnly:!0})],We.prototype,"setUidToIdOnAdd",void 0),e([G()],We.prototype,"featureStore",null),e([G()],We.prototype,"initializePromise",null),e([G()],We.prototype,"scaleVisibility",null),e([G()],We.prototype,"elevationAlignment",null),e([G()],We.prototype,"objectStates",null),e([G()],We.prototype,"filterVisibility",null),e([G({readOnly:!0})],We.prototype,"updating",null),e([G({readOnly:!0})],We.prototype,"dataUpdating",null),e([G({readOnly:!0})],We.prototype,"running",null),e([G({readOnly:!0})],We.prototype,"suspendedOrOutsideOfView",null),e([G({readOnly:!0,dependsOn:[]})],We.prototype,"updatingRemaining",null),e([G({readOnly:!0})],We.prototype,"displayFeatureLimit",null),e([G({readOnly:!0,dependsOn:[]})],We.prototype,"averageSymbolComplexity",null),e([G({constructOnly:!0})],We.prototype,"hasZ",void 0),e([G({constructOnly:!0})],We.prototype,"hasM",void 0),e([G()],We.prototype,"_objectIdField",null),We=ke=e([w("esri.views.3d.layers.graphics.Graphics3DCore")],We),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Ne||(Ne={}));class Be{constructor(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}}const qe=10,Ye=U(),Qe=U(),$e=new Map;export{We as Graphics3DCore};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import a from"../../../../core/Logger.js";import{findInMap as n}from"../../../../core/MapUtils.js";import{abortMaybe as o,removeMaybe as l,destroyMaybe as h,disposeMaybe as d}from"../../../../core/maybe.js";import{MinPriority as p}from"../../../../core/MemCache.js";import c from"../../../../core/PooledArray.js";import{throwIfAborted as y,ignoreAbortErrors as g,createResolver as u,isAbortError as m}from"../../../../core/promiseUtils.js";import{when as b,watch as _,on as f,syncAndInitial as v,whenOnce as C}from"../../../../core/reactiveUtils.js";import{schedule as S}from"../../../../core/scheduling.js";import{property as G}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as w}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as x,isEmpty as P}from"../../../../core/accessorSupport/diffUtils.js";import{i as R,f as D,g as E}from"../../../../chunks/vec32.js";import{create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import I from"../../../../geometry/Extent.js";import A from"../../../../geometry/Point.js";import{canProjectWithoutEngine as L}from"../../../../geometry/projection.js";import{projectBuffer as j}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as O}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as V}from"../../../../geometry/projection/projectXYZToVector.js";import{center as F,create as T,fromRect as M,equals as k}from"../../../../geometry/support/aaBoundingBox.js";import{create as z}from"../../../../geometry/support/aaBoundingRect.js";import{equals as H}from"../../../../geometry/support/spatialReferenceUtils.js";import W from"../../../../layers/Layer.js";import{getObjectId as N,computeAABB as B,hasGeometry as q}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Y}from"../../../../layers/graphics/hydratedFeatures.js";import{PromiseQueue as Q}from"../../../../layers/support/PromiseQueue.js";import $ from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as Z,validateTo3D as J}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as X}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as K}from"../../../../support/basemapUtils.js";import{loadArcade as ee}from"../../../../support/loadArcade.js";import te from"../../../../symbols/LabelSymbol3D.js";import ie from"../../../../symbols/TextSymbol.js";import re from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as se}from"../../../../symbols/support/defaults3D.js";import{to3D as ae}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as ne,defaultSymbolComplexity as oe}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as le}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as he}from"./ElevationQuery.js";import{VisibilityGroup as de,VisibilityFlag as pe}from"./enums.js";import{extractExpressionInfo as ce,createContext as ye}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ge}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ue}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as me}from"./Graphics3DSymbolCreationContext.js";import{make as be}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as _e}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as fe}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as ve}from"./GraphicStateTracking.js";import{computeCentroid as Ce}from"./graphicUtils.js";import{FastUpdateStatus as Se,ApplyRendererDiffResult as Ge}from"./interfaces.js";import{LoadStatus as we}from"./Loadable.js";import{SpatialIndex2D as xe}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as Pe}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Re}from"../../support/extentUtils.js";import{GridLocalOriginFactory as De}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{UpdatePolicy as Ee}from"../../webgl-engine/lib/UpdatePolicy.js";import{affectsGeometry as Ue}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Ie}from"../../webgl-engine/lib/WebGLLayer.js";import{hasPopupTemplate as Ae}from"../../../layers/support/popupUtils.js";import{PropertiesPool as Le}from"../../../support/PropertiesPool.js";import{ImmediateTask as je,noBudget as Oe,TaskPriority as Ve}from"../../../support/Scheduler.js";import{TextureCompressionHandle as Fe}from"../../../support/TextureCompressionHandle.js";import{Yield as Te}from"../../../support/Yield.js";import{alphaCutoff as Me}from"../../../../webscene/support/AlphaCutoff.js";var ke;const ze=U(),He=T();let We=class extends t{static{ke=this}static{this.tmpVec=U()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new xe({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?Ee.ASYNC:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this.running)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.running||this._loadingSymbols>0||this.compressionHandle.compressing)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.running||this._updateQueue.running}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new le(s,h,a)}get averageSymbolComplexity(){const e=ne(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce(((e,t)=>e+t.memory.resourceBytes),0);if(null==this._symbolMaterials){this._symbolMaterials=[];for(const e of this._symbols.values())if(null!=e)for(const t of e.symbolLayers)if(t)for(const e of t.materials)e&&this._symbolMaterials.push(e)}const i=this.owner.view.stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=this._symbolMaterials.reduce(((e,t)=>e+((i.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0)),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){const t=e;if("web-style"===t.type)return t.clone();const i=this._symbolConversionCache.get(t.id);if(null!=i)return i;const r=ae(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),s=r.symbol||null;return null==s&&r.error&&a.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,s),s}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.symbols,i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?oe(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((t=>{null!=t&&e.push(t.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new Le({computedExtent:I},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=je,this._dataUpdateQueue=new Q,this._updateQueue=new Q,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this._pendingUpdatesPool=new c({allocator:e=>e||new Be,deallocator:e=>(e.clear(),e)}),this.compressionHandle=new Fe,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new c,this.preferredUpdatePolicy=Ee.SYNC,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache("graphics-3d-unused-symbols",(e=>e.destroy())),this.symbolCreationContext=new me(e.owner.view.resourceController.scheduler,((e,t)=>this._updateQueue.push(e,t)),e.owner.layerViewUid,this.compressionHandle)}initialize(){this._featureStore=new ge({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e(N(t.graphic,this._objectIdField))))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.FILTER,!0)))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(b((()=>this.owner.view.state.highlights),(()=>{const{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach((t=>t.updateHighlights(e)))}))),this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new he(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,this._sharedSymbolResourcesOwnerHandle=i.addGraphicsOwner(this.owner),null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new De(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ye(r,this._viewSpatialReference,e,a.getLogger(this)),y(e),this.symbolCreationContext.screenSizePerspectiveEnabled=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this.addHandles(s((()=>t.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this.addHandles([_((()=>this.suspendedOrOutsideOfView),(()=>this._updateQueue.unshift((()=>this._updateLayerVisibility()),null).catch(g))),_((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view?.screenSizePerspectiveEnabled]),(()=>{const e=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),_((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),_((()=>this.owner.view.state?.rasterPixelRatio),(()=>this._pixelRatioChange())),_((()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),_((()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods),(e=>this._skipHighSymbolLoDsChange(e))),_((()=>this.owner.view.focusAreasView?.polygons),(()=>this._updateFocusedLabels())),_((()=>this.owner.view.map?.focusAreas.style),(()=>this.recreateAllGraphicsAndSymbols())),b((()=>t.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([f(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),_((()=>this.effectiveUpdatePolicy),(e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Ee.ASYNC,e===Ee.SYNC&&this.runTask(Oe)}),v)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(Ve.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(_((()=>this.layer.featureReduction),(()=>this._deconflictor?.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=o(this._initializeAbortController)}_updateFocusedLabels(){this.forEachGraphics3DSymbol(((e,t)=>{t&&e.updateFocus((({graphic:e})=>this.recreateGraphics([e])),t)}))}destroy(){this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=o(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=je,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=l(this._deconflictor),this._labeler=l(this._labeler),this._elevationAlignment=h(this._elevationAlignment),this._scaleVisibility=h(this._scaleVisibility),this._filterVisibility=h(this._filterVisibility),this._objectStates=h(this._objectStates),this.clear(),this._featureStore=h(this._featureStore),this._updatingPendingLoadedGraphicsChange=l(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=h(this._graphicStateTracking),this.stage&&(this.stageLayer=h(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=l(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=h(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=h(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(h),this._symbols.clear(),this._symbolMaterials=null,this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("dataUpdating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Ie(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("shaderTransformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.graphicUid))),i.on("geometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("geometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("attributesChanged",(e=>Ue(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid)))}notifyGraphicGeometryChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*qe,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){const e=this._visible&&(null==this.layer.opacity||this.layer.opacity>=Me);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return N(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)})),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){const t=this._deconflictor?.labelingInfoChange(e),i=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=!1,t=!1;for(const[i,r]of this._symbols)if(null!=r){switch(r.getFastUpdateStatus()){case Se.Loading:return"unknown";case Se.Fast:this._graphicsBySymbol.has(i)&&(t=!0);break;case Se.Slow:this._graphicsBySymbol.has(i)&&(e=!0);break;case Se.Mixed:this._graphicsBySymbol.has(i)&&(t=e=!0);case Se.Undefined:}}return t?e?"mixed":"fast":e?"slow":"mixed"}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("dataUpdating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Te}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return n(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(de.GRAPHIC,pe.USER,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=u();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>j(e,r,t,e,i,t,s),n=(e,t,r)=>j(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){F(h,ze);const t=e.getElevation(ze[0],ze[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await C((()=>this.owner?.loadedGraphics));const i=this.owner.layer?.objectIdField,s=this.owner.loadedGraphics.find((t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;R(Ye,0,0,0);let s=0;if(r.render.num>0){if(!O(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(R(Qe,e,i,a),!O(Qe,this._viewElevationProvider.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}return s>1&&E(Ye,Ye,1/s),new A({x:Ye[0],y:Ye[1],z:Ye[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t)){switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":case"popupTemplate":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>!(null==t.newValue||null==e||!e.graphics3DSymbol.updateGeometry(e,t.newValue)||!(this._labeler?.updateGraphicGeometry(e)??1))&&(this._labeler?.setDirty(),!0)));const i=t.graphic.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action)))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.graphic.geometry)if(null!=e)i()||this._recreateGraphic(e.graphic);else{const e=t.graphic.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&t.loadStatus===we.LOADING)return}this._recreateGraphic(t.graphic)}else this._recreateGraphic(t.graphic)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=x(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!P(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i,!1);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Ee.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("dataUpdating"),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((t=>{null!=t&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=He,i=e.spatialReference;B(e,t);const r=this._viewSpatialReference,s=ke.tmpVec;if(H(i,r)||V(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],V(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ye(t,this._viewSpatialReference,e.signal,a.getLogger(this)),y(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t?.forEach((e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Pe({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);h(r),this._symbols.delete(e),this._symbolMaterials=null,h(this._unusedSymbolsCache.pop(e)),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===Ee.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("dataUpdating")):a.getLogger(this).error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Ee.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return Ee.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t),Ee.SYNC);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?i.state!==Ne.NEW&&i.abortController?.abort():this._pendingAdds++:(i=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}remove(e){this.effectiveUpdatePolicy===Ee.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("dataUpdating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),i.state===Ne.LOADING&&i.abortController?.abort(),this._pendingAdds--);else{const i=this._pendingUpdatesPool.pushNew();i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&a.getLogger(this).warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&i.state===Ne.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Ne.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=Ee.SYNC),i.add)switch(i.state){case Ne.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case Ne.REJECTED:i.add=null,this._pendingAdds--;case Ne.LOADING:}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("dataUpdating"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Ne.READY);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=Ne.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,m(t)?e.state=Ne.NEW:e.state=Ne.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add),void(e.state=Ne.READY);e.state=Ne.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(m(i)?e.state=Ne.NEW:e.state=Ne.REJECTED)}null==t?.symbol?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Ne.READY}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!q(e))return;const r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){const t=K(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.owner.layerViewUid,!!this.layer.popupEnabled&&!t&&Ae(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const s=t.symbol,a=this.getOrCreateGraphics3DSymbol(s,t.renderer);if(null==a)return;this._expandComputedExtent(e.geometry);const n=this._beginGraphicUpdate(e),o=new ue(e,t,this.layer);let l=!1;const h=e=>{e===a.symbol.id&&(l=!0)};this._whenSymbolRemoved.push(h);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(h);if(this._graphicsWaitingForSymbol.get(e.uid)!==n||l||a.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==a.symbol.id)--a.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(a,o);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(h),l||(m(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,i===Ee.ASYNC?a.load((()=>this._dataUpdateQueue.push(d,null).catch(g)),(e=>this._dataUpdateQueue.push((()=>p(e)),null).catch(g))):a.load(d,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating"))}_hasLabelingContext(e){if(e instanceof te||e instanceof ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof te&&!this._hasLabelingContext(e))||(a.getLogger(this).error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t=!0){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!L(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Y(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))s=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{const e=r.symbol||se(r.geometry);s=new X(null,e)}return null==s?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){if(null==e.geometry)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?Y(e,this.layer):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=ae(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&(r=e.symbol.symbolLayers)}const s=be(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);if(void 0===i){const r=this._unusedSymbolsCache.pop(e.id);i=null!=r?r:e instanceof re?new _e(e,(e=>this._dataUpdateQueue.push(e,null)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i),this._symbolMaterials=null}return null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new ve(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=Ce(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=o(this._rendererChangeAbortController),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),Z(e))if(e?.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();y(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),y(t)),this.effectiveUpdatePolicy===Ee.ASYNC?await this._updateQueue.push((()=>this._currentRendererChange(e,r)),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Ee.ASYNC){const t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push((()=>this._currentRendererChange(e,!1)),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await ee(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=x(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof W?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(Y(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){const s=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(s||a){const n=a?a.added.map((e=>e.symbol)).filter(i):[],o=a?a.removed.map((e=>e.symbol)).filter(i):[];if(a)for(let e=0;e<a.changed.length;e++)n.push(a.changed[e].newValue.symbol),o.push(a.changed[e].oldValue.symbol);return s?(r.defaultSymbol&&o.push(r.defaultSymbol),t.defaultSymbol&&n.push(t.defaultSymbol)):r.defaultSymbol&&n.length&&o.push(t.defaultSymbol),this._applySymbolSetDiff(n,o,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),this._symbolMaterials=null,null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,i){if(this._diffHasSymbolChange(e))return!1;if(t instanceof $&&i instanceof $&&this._applyUniqueValueRendererDiff(e,t,i)&&0===Object.keys(e.diff).length)return!0;for(const r of this._graphicsBySymbol.keys()){const i=this._symbols.get(r);if(null!=i)switch(i.applyRendererDiff(e,t)){case Ge.RecreateSymbol:this._recreateSymbol(r);break;case Ge.RecreateGraphics:this._recreateGraphicsForSymbol(r);case Ge.FastUpdate:}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t)))}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)}))}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)}))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=S((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=z();return Re(e,r,t)?this.symbolCreationContext.clippingExtent=M(T(),r):this.symbolCreationContext.clippingExtent=null,!k(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(const[i,r]of this._symbols){if(null==r)return;e(r,this._graphicsBySymbol.get(i)||$e,i)}if(!t?.excludeUnused)for(const i of this._unusedSymbolsCache)e(i,void 0,i.symbol.id)}updateGraphicsVisibilities(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=!!this._scaleVisibility?.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.USER,!1)))}_validateRenderer(e){const t=()=>`'${this.layer.title?`${this.layer.title}, `:""}id:${this.layer.id}'`,i=J(e,{geometryType:this.layer?.geometryType,logWarning:(e,i)=>a.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${i}`)});if(i){const e=`Renderer for layer ${t} is not supported in a SceneView`;a.getLogger(this).warn(e,i.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),this._symbolMaterials=null,this._unusedSymbolsCache.put(i,t,p),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){}get performanceInfo(){return new fe(this.graphics3DGraphics.size,Array.from(this.graphics3DGraphics.values()).reduce(((e,t)=>e+(t.isVisible()?1:0)),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};var Ne;e([G({readOnly:!0})],We.prototype,"computedExtent",void 0),e([G()],We.prototype,"currentRenderer",void 0),e([G()],We.prototype,"rendererHasGeometryOperations",void 0),e([G()],We.prototype,"_frameTaskHandle",void 0),e([G()],We.prototype,"_dataUpdateQueue",void 0),e([G()],We.prototype,"_updateQueue",void 0),e([G({readOnly:!0})],We.prototype,"_viewSpatialReference",null),e([G()],We.prototype,"_rendererChangeAbortController",void 0),e([G()],We.prototype,"_elevationInfoChangeAbortController",void 0),e([G()],We.prototype,"_initializeAbortController",void 0),e([G()],We.prototype,"_elevationAlignment",void 0),e([G()],We.prototype,"_scaleVisibility",void 0),e([G()],We.prototype,"_filterVisibility",void 0),e([G()],We.prototype,"_initializePromise",void 0),e([G()],We.prototype,"_spatialIndex",void 0),e([G({readOnly:!0})],We.prototype,"extentPadding",void 0),e([G()],We.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([G()],We.prototype,"_featureStore",void 0),e([G()],We.prototype,"_objectStates",void 0),e([G()],We.prototype,"_loadingSymbols",void 0),e([G({constructOnly:!0})],We.prototype,"compressionHandle",void 0),e([G()],We.prototype,"preferredUpdatePolicy",void 0),e([G()],We.prototype,"_forcedUpdatePolicy",void 0),e([G({readOnly:!0})],We.prototype,"effectiveUpdatePolicy",null),e([G({constructOnly:!0})],We.prototype,"elevationFeatureExpressionEnabled",void 0),e([G({constructOnly:!0})],We.prototype,"owner",void 0),e([G({constructOnly:!0})],We.prototype,"layer",void 0),e([G({constructOnly:!0})],We.prototype,"graphicSymbolSupported",void 0),e([G({constructOnly:!0})],We.prototype,"getRenderingInfoWithoutRenderer",void 0),e([G({constructOnly:!0})],We.prototype,"componentFactories",void 0),e([G({constructOnly:!0})],We.prototype,"setUidToIdOnAdd",void 0),e([G()],We.prototype,"featureStore",null),e([G()],We.prototype,"initializePromise",null),e([G()],We.prototype,"scaleVisibility",null),e([G()],We.prototype,"elevationAlignment",null),e([G()],We.prototype,"objectStates",null),e([G()],We.prototype,"filterVisibility",null),e([G({readOnly:!0})],We.prototype,"updating",null),e([G({readOnly:!0})],We.prototype,"dataUpdating",null),e([G({readOnly:!0})],We.prototype,"running",null),e([G({readOnly:!0})],We.prototype,"suspendedOrOutsideOfView",null),e([G({readOnly:!0,dependsOn:[]})],We.prototype,"updatingRemaining",null),e([G({readOnly:!0})],We.prototype,"displayFeatureLimit",null),e([G({readOnly:!0,dependsOn:[]})],We.prototype,"averageSymbolComplexity",null),e([G({constructOnly:!0})],We.prototype,"hasZ",void 0),e([G({constructOnly:!0})],We.prototype,"hasM",void 0),e([G()],We.prototype,"_objectIdField",null),We=ke=e([w("esri.views.3d.layers.graphics.Graphics3DCore")],We),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Ne||(Ne={}));class Be{constructor(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}}const qe=10,Ye=U(),Qe=U(),$e=new Map;export{We as Graphics3DCore};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{validateColorAndOpacity as e,validateColor as o}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as r}from"../../../../core/mathUtils.js";import{EmissiveSourceMode as s}from"../../../../symbols/support/materialUtils.js";import{TextureUsage as a,TextureEncoding as t}from"./enums.js";import{RenderTexture as
|
|
5
|
+
import{validateColorAndOpacity as e,validateColor as o}from"../../../../core/colorUtils.js";import has from"../../../../core/has.js";import{clamp as r}from"../../../../core/mathUtils.js";import{EmissiveSourceMode as s}from"../../../../symbols/support/materialUtils.js";import{TextureUsage as a,TextureEncoding as t,uncompressedFormats as l,compressibleUsages as n}from"./enums.js";import{RenderTexture as i}from"../../webgl-engine/core/material/RenderTexture.js";import{getEllipsoidMode as u}from"../../webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{CullFaceOptions as c,AlphaDiscardMode as m,TextureEncodingMimeType as d}from"../../webgl-engine/lib/basicInterfaces.js";import{Texture as p}from"../../webgl-engine/lib/Texture.js";import{useSchematicPBRI3S as g,useSchematicPBR as f,schematicMRRFactors as h,advancedMRRFactors as T}from"../../webgl-engine/materials/pbrUtils.js";import{TextureWrapMode as x}from"../../../webgl/enums.js";import{alphaCutoff as F}from"../../../../webscene/support/AlphaCutoff.js";function b(o,r,s){const t=new Map,l=(e,o)=>{if(null==e)return-1;const r=t.get(e.id);if(r)return r.usage|=o,r.id;const s=t.size;return t.set(e.id,{id:s,usage:o}),s},n=r.pbrMetallicRoughness,i=n?.baseColorFactor?e(n.baseColorFactor):null,u=r.emissiveFactor,m=has("disable-feature:diffuse-rendering-i3s")||s?g({normalTexture:r.normalTexture,emissiveTexture:r.emissiveTexture,emissiveFactor:r.emissiveFactor,occlusionTexture:r.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}):f({normalTexture:r.normalTexture,emissiveTexture:r.emissiveTexture,emissiveFactor:r.emissiveFactor,occlusionTexture:r.occlusionTexture,metallicRoughnessTexture:n?.metallicRoughnessTexture,metallicFactor:n?.metallicFactor,roughnessFactor:n?.roughnessFactor}),d=m?h[0]:n?.metallicFactor??T[0],p=m?h[1]:n?.roughnessFactor??T[1],x="mask"===r.alphaMode?a.Color|a.AlphaMask:a.Color,F={baseColorFactor:i?[i[0],i[1],i[2],i[3]]:[1,1,1,1],baseColorTextureId:l(n?.baseColorTexture,x),metallicRoughnessTextureId:l(n?.metallicRoughnessTexture,a.MetallicRoughness),metallicFactor:d,roughnessFactor:p},b={alphaMode:r.alphaMode,alphaCutoff:r.alphaCutoff,doubleSided:r.doubleSided,cullFace:"none"===r.cullFace?c.None:"back"===r.cullFace?c.Back:"front"===r.cullFace?c.Front:c.None,normalTextureId:l(r.normalTexture,a.Normal),emissiveTextureId:l(r.emissiveTexture,a.Emissive),occlusionTextureId:l(r.occlusionTexture,a.Occlusion),emissiveFactor:u?[u[0],u[1],u[2]]:[0,0,0],metallicRoughness:F,wrapTextures:!1,hasParametersFromSource:m},M=[];return t.forEach((({usage:e},r)=>{const s=null!=o&&o[r]&&o[r].formats,a=s?C(s.map((({name:e,format:o})=>({name:e,encoding:S[o]})))):[];M.push({id:r,usage:e,encodings:a})})),{material:b,textures:M}}function C(e){return e.sort(((e,o)=>e.encoding-o.encoding))}const S={ktx2:t.KTX2,basis:t.Basis,dds:t.DDS_S3TC,png:t.PNG,jpg:t.JPG,"ktx-etc2":t.KTX_ETC2},M={[d.KTX2_ENCODING]:t.Basis,[d.BASIS_ENCODING]:t.Basis,[d.DDS_ENCODING]:t.DDS_S3TC,"image/png":t.PNG,"image/jpg":t.JPG,"image/jpeg":t.JPG,"image/ktx":t.KTX_ETC2};function P(e){const s=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,t=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,l=s?e.materialDefinitions?.[s]:null,n=t?e.textureDefinitions?.[t]:null,i=D();if(null!=l){const e=l.params;e.diffuse&&(o(e.diffuse),i.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(i.doubleSided=e.doubleSided,i.cullFace=e.doubleSided?c.None:c.Back),"none"!==e.cullFace&&"front"!==e.cullFace&&"back"!==e.cullFace||(i.cullFace="none"===e.cullFace?c.None:"back"===e.cullFace?c.Back:c.Front),e.transparency&&(i.metallicRoughness.baseColorFactor[3]=r(1-e.transparency,0,1)),(e.useVertexColorAlpha||i.metallicRoughness.baseColorFactor[3]<1)&&(i.alphaMode="blend")}const u=[];if(null!=n){const e=0;!n.wrap||"repeat"!==n.wrap[0]&&"repeat"!==n.wrap[1]||(i.wrapTextures=!0);let o=a.Color;"rgba"===n.channels&&(i.alphaMode="blend",o|=a.AlphaMask);const r=n.images.length-1,s=n.images[r],t=e=>e?.split("/").pop(),l=Array.isArray(n.encoding)?C(n.encoding.map(((e,o)=>({name:t(s.href[o]),encoding:M[e]||0})))):[{name:t(s.href),encoding:M[n.encoding]||0}];u.push({id:e,usage:o,encodings:l}),i.metallicRoughness.baseColorTextureId=e}return{material:i,textures:u}}const D=()=>({alphaMode:"opaque",alphaCutoff:F,doubleSided:!0,cullFace:c.None,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});function R(e,o,r,s,t,l){if(null==e?.data)return null;const n=e.data,i=s.renderingContext.parameters.maxMaxAnisotropy,u=i>1,c=r||!o.wrapTextures?w:E,m=G(e.encoding),d=e.usage&a.Color?"opaque"===o.alphaMode?3:4:3,g=has("enable-feature:esri-compress-IM-textures")&&j(e.encoding,e.usage);return new p(n,{mipmap:u,maxAnisotropy:i,encoding:m,wrap:c,components:d,compressionHandle:g?t:void 0,compressionCallback:g?l:void 0,noUnpackFlip:!0})}const w={s:x.CLAMP_TO_EDGE,t:x.CLAMP_TO_EDGE},E={s:x.REPEAT,t:x.REPEAT};function N(o,r,t,l,n,c){const d=c.rendererTextureUsage,p=e=>k(l,t,e&d),g=e(r.metallicRoughness.baseColorFactor);o.baseColor=[g[0],g[1],g[2],g[3]],o.hasParametersFromSource=!!r.hasParametersFromSource,o.usePBR=c.usePBR,o.mrrFactors=[r.metallicRoughness.metallicFactor,r.metallicRoughness.roughnessFactor,r.hasParametersFromSource?h[2]:T[2]],o.emissiveBaseColor=r.emissiveFactor,o.emissiveSource=s.Emissive,o.isIntegratedMesh=c.isIntegratedMesh,o.textureAlphaCutoff="mask"===r.alphaMode?r.alphaCutoff:F,o.alphaDiscardMode="opaque"===r.alphaMode?m.Opaque:"mask"===r.alphaMode?m.Mask:m.MaskBlend;const f=[],x=p(a.Color|a.AlphaMask);null!=x&&(o.baseColorTexture=new i(n,x),f.push(o.baseColorTexture.loadPromise));const b=p(a.MetallicRoughness);null!=b&&(o.metallicRoughnessTexture=new i(n,b),f.push(o.metallicRoughnessTexture.loadPromise));const C=p(a.Emissive);null!=C&&(o.emissionTexture=new i(n,C),f.push(o.emissionTexture.loadPromise));const S=p(a.Occlusion);null!=S&&(o.occlusionTexture=new i(n,S),f.push(o.occlusionTexture.loadPromise));const M=p(a.Normal);return null!=M&&(o.normalTexture=new i(n,M),f.push(o.normalTexture.loadPromise)),o.commonMaterialParameters.hasSlicePlane=c.slicePlaneEnabled,o.commonMaterialParameters.doubleSided=r.doubleSided,o.commonMaterialParameters.cullFace=r.cullFace,o.ellipsoidMode=u(c.viewSpatialReference),Promise.all(f)}function v(e){const o=!!e.compressedTextureS3TC,r=!!e.compressedTextureETC,s=has("disable-feature:i3s-basis")?0:t.Basis|t.KTX2,a=t.JPG|t.PNG,l=s|t.DDS_S3TC;return a|(o?l:0)|(r?s:0)}function I(e,o){if(null!=o)return e.find((e=>0!==(e.encoding&o)))}function k(e,o,r){if(null==e||r===a.None)return null;for(let s=0;s<e.length;s++){const a=e[s];if(null!=a&&0!==(a.usage&r)){const e=o[s];return null!=e?e.id:null}}return null}function j(e,o){return 0!==(e&l)&&!(o&~n)}function G(e){switch(e){case t.KTX2:return d.KTX2_ENCODING;case t.Basis:return d.BASIS_ENCODING;case t.DDS_S3TC:return d.DDS_ENCODING;case t.PNG:return"image/png";case t.JPG:return"image/jpeg";case t.KTX_ETC2:return"image/ktx";default:return""}}export{N as configureMaterial,R as createTexture,D as defaultMaterial,b as getMaterialAndTextures,P as getMaterialAndTexturesFromShared,v as getSupportedEncodings,I as selectEncoding};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
var e
|
|
5
|
+
var e;!function(e){e[e.KTX2=1]="KTX2",e[e.Basis=2]="Basis",e[e.DDS_S3TC=4]="DDS_S3TC",e[e.PNG=8]="PNG",e[e.JPG=16]="JPG",e[e.KTX_ETC2=32]="KTX_ETC2"}(e||(e={}));const s=e.PNG|e.JPG;var o;!function(e){e[e.None=0]="None",e[e.Color=1]="Color",e[e.MetallicRoughness=2]="MetallicRoughness",e[e.Normal=4]="Normal",e[e.Occlusion=8]="Occlusion",e[e.Emissive=16]="Emissive",e[e.AlphaMask=32]="AlphaMask",e[e.ColorTextures=19]="ColorTextures",e[e.GeometryTextures=36]="GeometryTextures",e[e.GeometryTexturesPBR=44]="GeometryTexturesPBR",e[e.AllTextures=37]="AllTextures",e[e.AllTexturesPBR=63]="AllTexturesPBR"}(o||(o={}));const l=o.Color|o.MetallicRoughness;export{e as TextureEncoding,o as TextureUsage,l as compressibleUsages,s as uncompressedFormats};
|