@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
package/Graphic.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"./chunks/tslib.es6.js";import e from"./PopupTemplate.js";import r from"./core/Clonable.js";import{deprecatedConstructorSignature as s}from"./core/deprecate.js";import i from"./core/JSONSupport.js";import o from"./core/Logger.js";import{when as a}from"./core/reactiveUtils.js";import{generateUID as l}from"./core/uid.js";import{property as n}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import"./core/RandomLCG.js";import{subclass as p}from"./core/accessorSupport/decorators/subclass.js";import{isSerializable as h}from"./core/support/jsonUtils.js";import{fromJSON as u}from"./geometry/support/jsonUtils.js";import{geometryTypes as
|
|
5
|
+
import{_ as t}from"./chunks/tslib.es6.js";import e from"./PopupTemplate.js";import r from"./core/Clonable.js";import{deprecatedConstructorSignature as s}from"./core/deprecate.js";import i from"./core/JSONSupport.js";import o from"./core/Logger.js";import{when as a}from"./core/reactiveUtils.js";import{generateUID as l}from"./core/uid.js";import{property as n}from"./core/accessorSupport/decorators/property.js";import"./core/has.js";import"./core/RandomLCG.js";import{subclass as p}from"./core/accessorSupport/decorators/subclass.js";import{isSerializable as h}from"./core/support/jsonUtils.js";import{fromJSON as u}from"./geometry/support/jsonUtils.js";import{geometryTypes as m}from"./geometry/support/typeUtils.js";import{createFeatureIdFromLayer as g}from"./layers/graphics/data/createFeatureId.js";import{symbolTypes as y}from"./symbols/support/typeUtils.js";var c;function f(t){if(!t)return null;const e={};for(const r in t){const s=u(t[r]);s&&(e[r]=s)}return 0!==Object.keys(e).length?e:null}function b(t){if(null==t)return null;const e={};for(const r in t){const s=t[r];s&&(e[r]=s.toJSON())}return 0!==Object.keys(e).length?e:null}let d=class extends(r.ClonableMixin(i)){static{c=this}constructor(t){super(t),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:l(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&s(o.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(t){const e=this._get("aggregateGeometries");JSON.stringify(e)!==JSON.stringify(t)&&this._set("aggregateGeometries",t)}set attributes(t){const e=this._get("attributes");e!==t&&(this._set("attributes",t),this._notifyLayer("attributes",e,t))}set geometry(t){const e=this._get("geometry");e!==t&&(this._set("geometry",t),"mesh"!==t?.type&&this._notifyLayer("geometry",e,t))}set popupTemplate(t){const e=this._get("popupTemplate");e!==t&&(this._set("popupTemplate",t),this._notifyLayer("popupTemplate",e,t))}set symbol(t){const e=this._get("symbol");e!==t&&(this._set("symbol",t),this._notifyLayer("symbol",e,t))}get version(){return this._version}set visible(t){const e=this._get("visible");e!==t&&(this._set("visible",t),this._notifyLayer("visible",e,t))}cloneShallow(){return new c({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(t=!1){if(this.popupTemplate)return this.popupTemplate;const e=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[e,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(t&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(t){return this.attributes?.[t]}setAttribute(t,e){if(this.attributes){const r=this.getAttribute(t);this.attributes[t]=e,this._notifyLayer("attributes",r,e,t)}else this.attributes={[t]:e}}getObjectId(){const t=this.sourceLayer??this.layer;return t?g(this,t):null}getGlobalId(){const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:h(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(t={}){const{geometry:e}=this;if("mesh"===e?.type){const r={origin:e.origin,transform:e.transform};this._notifyLayer("origin-transform",r,r,t.action)}}_notifyLayer(t,e,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:t,oldValue:e,newValue:r};"origin-transform"===t&&(i.action=s),"attributes"===t&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([a((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:t,origin:e})=>{this._lastMeshTransform.localMatrix===t&&this._lastMeshTransform.origin===e||(this._lastMeshTransform.localMatrix=t,this._lastMeshTransform.origin=e,this.notifyMeshTransformChanged())})),a((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const t=this.geometry;"mesh"===t?.type&&t.vertexSpace.origin?(this._lastMeshTransform.localMatrix=t.transform?.localMatrix,this._lastMeshTransform.origin=t.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(t,e)=>t===e,sync:!0})])}};t([n({value:null,json:{read:f}})],d.prototype,"aggregateGeometries",null),t([n({value:null})],d.prototype,"attributes",null),t([n({value:null,types:m,json:{read:u}})],d.prototype,"geometry",null),t([n({type:Boolean})],d.prototype,"isAggregate",void 0),t([n({clonable:!1})],d.prototype,"layer",void 0),t([n({clonable:"reference"})],d.prototype,"origin",void 0),t([n({type:e,value:null})],d.prototype,"popupTemplate",null),t([n({clonable:"reference"})],d.prototype,"sourceLayer",void 0),t([n({value:null,types:y})],d.prototype,"symbol",null),t([n({clonable:!1,json:{read:!1,write:!1}})],d.prototype,"_version",void 0),t([n({type:Boolean,value:!0})],d.prototype,"visible",null),d=c=t([p("esri.Graphic")],d);export{d as default};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import "../../interfaces";
|
|
2
2
|
|
|
3
3
|
export const forceInteractive: __esri.analysisUtils["forceInteractive"];
|
|
4
|
+
export const hasValidAreaResult: __esri.analysisUtils["hasValidAreaResult"];
|
|
5
|
+
export const isAboveGeodesicDistanceThreshold: __esri.analysisUtils["isAboveGeodesicDistanceThreshold"];
|
|
@@ -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
|
-
function
|
|
5
|
+
import{toUnit as e}from"../../core/quantityUtils.js";import{geodesicDistanceThreshold as t}from"../../views/support/geodesicMeasurementUtils.js";function r(e){return e.forceInteractive()}function i(r){return e(r,"meters").value>t}function n(e){return 0===e.viewData.intersectingSegments.size}export{r as forceInteractive,n as hasValidAreaResult,i as isAboveGeodesicDistanceThreshold};
|
package/arcade/Feature.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ArcadeDate as e}from"./ArcadeDate.js";import{configureDeepClone as t}from"./deepClone.js";import i from"./Dictionary.js";import{ArcadeExecutionError as s,ExecutionErrorCodes as r}from"./executionError.js";import{p as o,c as n,s as a,k as l,j as u,g as d,d as m,a as f}from"../chunks/languageUtils.js";import{constructGeometryFromDictionary as y}from"./geometry/constructors.js";import{DateOnly as h}from"../core/sql/DateOnly.js";import{TimeOnly as c}from"../core/sql/TimeOnly.js";import p from"../geometry/Geometry.js";import{fromJSON as _}from"../geometry/support/jsonUtils.js";import{convertToGeometry as b}from"../layers/graphics/featureConversionUtils.js";import T from"../layers/support/FieldsIndex.js";import{isString as g,isNumber as F,isBoolean as x}from"../support/guards.js";class D{constructor(){this.arcadeDeclaredClass="esri.arcade.Feature",this._optimizedGeomDefinition=null,this._geometry=null,this.attributes=null,this._layer=null,this._fieldTypesFixed=!0,this.fieldsIndex=null,this.contextTimeZone=null,this.immutable=!0,this._fieldsToFixDataTypes=null,this.immutable=!0}static createFromGraphic(e,t){const i=new D;return i.contextTimeZone=t??null,i._geometry=null!=e.geometry?e.geometry:null,void 0===e.attributes||null===e.attributes?i.attributes={}:i.attributes=e.attributes,e._sourceLayer?(i._layer=e._sourceLayer,i._fieldTypesFixed=!1):e._layer?(i._layer=e._layer,i._fieldTypesFixed=!1):e.layer&&"fields"in e.layer?(i._layer=e.layer,i._fieldTypesFixed=!1):e.sourceLayer&&"fields"in e.sourceLayer&&(i._layer=e.sourceLayer,i._fieldTypesFixed=!1),i._layer&&!i._fieldTypesFixed&&(i.fieldsIndex=this.hydrateFieldsIndex(i._layer)),i}static createFromArcadeFeature(e){if(e instanceof D){const t=new D;return t._fieldTypesFixed=e._fieldTypesFixed,t.attributes=e.attributes,t._geometry=e._geometry,t._optimizedGeomDefinition=e._optimizedGeomDefinition,e._layer&&(t._layer=e._layer),t.fieldsIndex=e.fieldsIndex,t.contextTimeZone=e.contextTimeZone,t}const t={};for(const i of e.keys())t[i]=e.field(i);return D.createFromGraphicLikeObject(e.geometry(),t,e.fullSchema(),e.contextTimeZone)}static createFromOptimisedFeature(e,t,i){const s=new D;return s._geometry=e.geometry?{geometry:e.geometry}:null,s._optimizedGeomDefinition=i,s.attributes=e.attributes||{},s._layer=t,s._fieldTypesFixed=!1,s}static createFromArcadeDictionary(e,t){const s=new D;return s.attributes=e.field("attributes"),null!==s.attributes&&s.attributes instanceof i?(s.attributes=s.attributes.attributes,null===s.attributes&&(s.attributes={})):s.attributes={},s._geometry=e.field("geometry"),null!==s._geometry&&(s._geometry instanceof i?s._geometry=y(s._geometry,t):s._geometry instanceof p||(s._geometry=null)),s}static createFromGraphicLikeObject(e,t,i=null,s){const r=new D;return r.contextTimeZone=s??null,null===t&&(t={}),r.attributes=t,r._geometry=null!=e?e:null,r._layer=i,r._layer&&(r._fieldTypesFixed=!1,r.fieldsIndex=this.hydrateFieldsIndex(r._layer)),r}static hydrateFieldsIndex(e){return null===e?null:o(e)?e.getFieldsIndex():e.fieldsIndex?e.fieldsIndex:T.fromLayerJSON({datesInUnknownTimezone:e.datesInUnknownTimezone,fields:e.fields,timeInfo:e.timeInfo,editFieldsInfo:e.editFieldsInfo,dateFieldsTimeReference:e.dateFieldsTimeReference??{timeZone:"UTC",respectsDaylightSaving:!1}})}repurposeFromGraphicLikeObject(e,t,i=null){null===t&&(t={}),this.attributes=t,this._geometry=e??null,this._layer=i,this._layer?this._fieldTypesFixed=!1:this._fieldTypesFixed=!0}castToText(e=!1){!1===this._fieldTypesFixed&&this._fixFieldTypes();const t=n(this.attributes,{useNumbersForDates:e});return'{"geometry":'+(null===this.geometry()?"null":a(this.geometry()))+',"attributes":'+t+"}"}_fixFieldTypes(){if(this._fieldsToFixDataTypes&&this._fieldsToFixDataTypes?.length>0)return this._fixAllFields(this._fieldsToFixDataTypes),void(this._fieldTypesFixed=!0);const e=[],t=this._layer.fields;for(let i=0;i<t.length;i++){const s=t[i],{name:r,type:o}=s;switch(o){case"date":case"esriFieldTypeDate":e.push({field:r,dataType:"date"});break;case"date-only":case"esriFieldTypeDateOnly":e.push({field:r,dataType:"date-only"});break;case"time-only":case"esriFieldTypeTimeOnly":e.push({field:r,dataType:"time-only"});break;case"timestamp-offset":case"esriFieldTypeTimestampOffset":e.push({field:r,dataType:"timestamp-offset"})}}this._fieldsToFixDataTypes=e,e.length>0&&this._fixAllFields(e),this._fieldTypesFixed=!0}isUnknownDateTimeField(e){return"unknown"===this.fieldsIndex?.getTimeZone(e)}_fixAllFields(t){this.attributes={...this.attributes};const i=this.contextTimeZone??"system";for(let s=0;s<t.length;s++){const r=t[s].field,o=t[s].dataType;let n=this.attributes[r];if(void 0===n){for(const t in this.attributes)if(t.toLowerCase()===r.toLowerCase()){if(n=this.attributes[t],null!==n){if("time-only"===o){l(n)||(this.attributes[t]=c.fromReader(n.toString()));break}if("date-only"===o){u(n)||(this.attributes[t]=h.fromReader(n.toString()));break}if("timestamp-offset"===o){d(n)||(this.attributes[t]=e.fromReaderAsTimeStampOffset(n.toString()));break}const s=this.isUnknownDateTimeField(t);n instanceof Date?this.attributes[t]=s?e.unknownDateJSToArcadeDate(n):e.dateJSAndZoneToArcadeDate(n,i):d(n)||(this.attributes[t]=s?e.unknownEpochToArcadeDate(n):e.epochToArcadeDate(n,i))}break}}else if(null!==n){if("time-only"===o){l(n)?this.attributes[r]=n:this.attributes[r]=c.fromReader(n.toString());continue}if("date-only"===o){u(n)?this.attributes[r]=n:this.attributes[r]=h.fromReader(n.toString());continue}if("timestamp-offset"===o){d(n)?this.attributes[r]=n:this.attributes[r]=e.fromReaderAsTimeStampOffset(n.toString());continue}const t=this.isUnknownDateTimeField(r);d(n)?this.attributes[r]=n:n instanceof Date?this.attributes[r]=t?e.unknownDateJSToArcadeDate(n):e.dateJSAndZoneToArcadeDate(n,i):this.attributes[r]=t?e.unknownEpochToArcadeDate(n):e.epochToArcadeDate(n,i)}}}geometry(){return null===this._geometry||this._geometry instanceof p||(this._optimizedGeomDefinition?(this._geometry=_(b(this._geometry,this._optimizedGeomDefinition.geometryType,this._optimizedGeomDefinition.hasZ,this._optimizedGeomDefinition.hasM)),this._geometry.spatialReference=this._optimizedGeomDefinition.spatialReference):this._geometry=_(this._geometry)),this._geometry}field(e){this._fieldTypesFixed||this._fixFieldTypes();const t=this.attributes[e];if(void 0!==t)return t;const i=e.toLowerCase();for(const s in this.attributes)if(s.toLowerCase()===i)return this.attributes[s];if(this._hasFieldDefinition(i))return null;throw new s(null,r.FieldNotFound,null,{key:e})}_hasFieldDefinition(e){if(null===this._layer)return!1;for(let t=0;t<this._layer.fields.length;t++){if(this._layer.fields[t].name.toLowerCase()===e)return!0}return!1}setField(t,i){if(this.immutable)throw new s(null,r.Immutable,null);if(i instanceof Date&&(i=this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(i):e.dateJSToArcadeDate(i)),!1===m(i))throw new s(null,r.TypeNotAllowedInFeature,null);const o=t.toLowerCase();if(void 0===this.attributes[t]){for(const e in this.attributes)if(e.toLowerCase()===o)return void(this.attributes[e]=i);this.attributes[t]=i}else this.attributes[t]=i}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const i in this.attributes)if(i.toLowerCase()===t)return!0;return!!this._hasFieldDefinition(t)}keys(){let e=[];const t={};for(const i in this.attributes)e.push(i),t[i.toLowerCase()]=1;if(null!==this._layer)for(let i=0;i<this._layer.fields.length;i++){const s=this._layer.fields[i];1!==t[s.name.toLowerCase()]&&e.push(s.name)}return e=e.sort(),e}static parseAttributesFromDictionary(e){const t={};for(const i in e.attributes){const o=e.attributes[i];if(!m(o))throw new s(null,r.InvalidParameter,null);t[i]=o}return t}static fromJson(e,t){let i=null;null!==e.geometry&&void 0!==e.geometry&&(i=_(e.geometry));const o={};if(null!==e.attributes&&void 0!==e.attributes)for(const n in e.attributes){const t=e.attributes[n];if(null===t)o[n]=t;else{if(!(g(t)||F(t)||x(t)||d(t)||l(t)||u(t)))throw new s(null,r.InvalidParameter,null);o[n]=t}}return D.createFromGraphicLikeObject(i,o,null,t??null)}fullSchema(){return this._layer}gdbVersion(){if(null===this._layer)return"";const e=this._layer.gdbVersion;return void 0===e?"":""===e&&this._layer.capabilities?.isVersioned?"SDE.DEFAULT":e}castAsJson(e){const t={attributes:{},geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null};for(const i in this.attributes){const s=this.attributes[i];void 0!==s&&(t.attributes[i]=f(s,e))}return t}async castAsJsonAsync(e=null,t){return this.castAsJson(t)}}t(D);export{D as default};
|
|
5
|
+
import{ArcadeDate as e}from"./ArcadeDate.js";import{configureDeepClone as t}from"./deepClone.js";import i from"./Dictionary.js";import{ArcadeExecutionError as s,ExecutionErrorCodes as r}from"./executionError.js";import{p as o,c as n,s as a,k as l,j as u,g as d,d as m,a as f}from"../chunks/languageUtils.js";import{constructGeometryFromDictionary as y}from"./geometry/constructors.js";import{DateOnly as h}from"../core/sql/DateOnly.js";import{TimeOnly as c}from"../core/sql/TimeOnly.js";import p from"../geometry/Geometry.js";import{fromJSON as _}from"../geometry/support/jsonUtils.js";import{convertToGeometry as b}from"../layers/graphics/featureConversionUtils.js";import T from"../layers/support/FieldsIndex.js";import{isString as g,isNumber as F,isBoolean as x}from"../support/guards.js";class D{constructor(){this.arcadeDeclaredClass="esri.arcade.Feature",this._optimizedGeomDefinition=null,this._geometry=null,this.attributes=null,this._layer=null,this._fieldTypesFixed=!0,this.fieldsIndex=null,this.contextTimeZone=null,this.immutable=!0,this._fieldsToFixDataTypes=null,this.immutable=!0}static createFromGraphic(e,t){const i=new D;return i.contextTimeZone=t??null,i._geometry=null!=e.geometry?e.geometry:null,void 0===e.attributes||null===e.attributes?i.attributes={}:i.attributes=e.attributes,e._sourceLayer?(i._layer=e._sourceLayer,i._fieldTypesFixed=!1):e._layer?(i._layer=e._layer,i._fieldTypesFixed=!1):e.layer&&"fields"in e.layer?(i._layer=e.layer,i._fieldTypesFixed=!1):e.sourceLayer&&"fields"in e.sourceLayer&&(i._layer=e.sourceLayer,i._fieldTypesFixed=!1),i._layer&&!i._fieldTypesFixed&&(i.fieldsIndex=this.hydrateFieldsIndex(i._layer)),i}static createFromArcadeFeature(e){if(e instanceof D){const t=new D;return t._fieldTypesFixed=e._fieldTypesFixed,t.attributes=e.attributes,t._geometry=e._geometry,t._optimizedGeomDefinition=e._optimizedGeomDefinition,e._layer&&(t._layer=e._layer),t.fieldsIndex=e.fieldsIndex,t.contextTimeZone=e.contextTimeZone,t}const t={};for(const i of e.keys())t[i]=e.field(i);return D.createFromGraphicLikeObject(e.geometry(),t,e.fullSchema(),e.contextTimeZone)}static createFromOptimisedFeature(e,t,i){const s=new D;return s._geometry=e.geometry?{geometry:e.geometry}:null,s._optimizedGeomDefinition=i,s.attributes=e.attributes||{},s._layer=t,s._fieldTypesFixed=!1,s}static createFromArcadeDictionary(e,t){const s=new D;return s.attributes=e.field("attributes"),null!==s.attributes&&s.attributes instanceof i?(s.attributes=s.attributes.attributes,null===s.attributes&&(s.attributes={})):s.attributes={},s._geometry=e.field("geometry"),null!==s._geometry&&(s._geometry instanceof i?s._geometry=y(s._geometry,t):s._geometry instanceof p||(s._geometry=null)),s}static createFromGraphicLikeObject(e,t,i=null,s){const r=new D;return r.contextTimeZone=s??null,null===t&&(t={}),r.attributes=t,r._geometry=null!=e?e:null,r._layer=i,r._layer&&(r._fieldTypesFixed=!1,r.fieldsIndex=this.hydrateFieldsIndex(r._layer)),r}static hydrateFieldsIndex(e){return null===e?null:o(e)?e.getFieldsIndex():e.fieldsIndex?e.fieldsIndex:T.fromLayerJSON({datesInUnknownTimezone:e.datesInUnknownTimezone,fields:e.fields,timeInfo:e.timeInfo,editFieldsInfo:e.editFieldsInfo,dateFieldsTimeReference:e.dateFieldsTimeReference??{timeZone:"UTC",respectsDaylightSaving:!1}})}repurposeFromGraphicLikeObject(e,t,i=null){null===t&&(t={}),this.attributes=t,this._geometry=e??null,this._layer=i,this._layer?this._fieldTypesFixed=!1:this._fieldTypesFixed=!0}castToText(e=!1){!1===this._fieldTypesFixed&&this._fixFieldTypes();const t=n(this.attributes,{useNumbersForDates:e});return'{"geometry":'+(null===this.geometry()?"null":a(this.geometry()))+',"attributes":'+t+"}"}_fixFieldTypes(){if(this._fieldsToFixDataTypes&&this._fieldsToFixDataTypes?.length>0)return this._fixAllFields(this._fieldsToFixDataTypes),void(this._fieldTypesFixed=!0);const e=[],t=this._layer.fields;for(let i=0;i<t.length;i++){const s=t[i],{name:r,type:o}=s;switch(o){case"date":case"esriFieldTypeDate":e.push({field:r,dataType:"date"});break;case"date-only":case"esriFieldTypeDateOnly":e.push({field:r,dataType:"date-only"});break;case"time-only":case"esriFieldTypeTimeOnly":e.push({field:r,dataType:"time-only"});break;case"timestamp-offset":case"esriFieldTypeTimestampOffset":e.push({field:r,dataType:"timestamp-offset"});break;case"geometry":case"esriFieldTypeGeometry":e.push({field:r,dataType:"geometry"})}}this._fieldsToFixDataTypes=e,e.length>0&&this._fixAllFields(e),this._fieldTypesFixed=!0}isUnknownDateTimeField(e){return"unknown"===this.fieldsIndex?.getTimeZone(e)}_fixAllFields(t){this.attributes={...this.attributes};const i=this.contextTimeZone??"system";for(let s=0;s<t.length;s++){const r=t[s].field,o=t[s].dataType;let n=this.attributes[r];if(void 0===n){for(const t in this.attributes)if(t.toLowerCase()===r.toLowerCase()){if(n=this.attributes[t],null!==n){if("time-only"===o){l(n)||(this.attributes[t]=c.fromReader(n.toString()));break}if("date-only"===o){u(n)||(this.attributes[t]=h.fromReader(n.toString()));break}if("timestamp-offset"===o){d(n)||(this.attributes[t]=e.fromReaderAsTimeStampOffset(n.toString()));break}if("date"===o){const s=this.isUnknownDateTimeField(t);n instanceof Date?this.attributes[t]=s?e.unknownDateJSToArcadeDate(n):e.dateJSAndZoneToArcadeDate(n,i):d(n)||(this.attributes[t]=s?e.unknownEpochToArcadeDate(n):e.epochToArcadeDate(n,i))}"geometry"===o&&(this.attributes[t]=null)}break}}else if(null!==n){if("time-only"===o){l(n)?this.attributes[r]=n:this.attributes[r]=c.fromReader(n.toString());continue}if("date-only"===o){u(n)?this.attributes[r]=n:this.attributes[r]=h.fromReader(n.toString());continue}if("timestamp-offset"===o){d(n)?this.attributes[r]=n:this.attributes[r]=e.fromReaderAsTimeStampOffset(n.toString());continue}if("date"===o){const t=this.isUnknownDateTimeField(r);d(n)?this.attributes[r]=n:n instanceof Date?this.attributes[r]=t?e.unknownDateJSToArcadeDate(n):e.dateJSAndZoneToArcadeDate(n,i):this.attributes[r]=t?e.unknownEpochToArcadeDate(n):e.epochToArcadeDate(n,i);continue}if("geometry"===o){this.attributes[r]=null;continue}}}}geometry(){return null===this._geometry||this._geometry instanceof p||(this._optimizedGeomDefinition?(this._geometry=_(b(this._geometry,this._optimizedGeomDefinition.geometryType,this._optimizedGeomDefinition.hasZ,this._optimizedGeomDefinition.hasM)),this._geometry.spatialReference=this._optimizedGeomDefinition.spatialReference):this._geometry=_(this._geometry)),this._geometry}field(e){this._fieldTypesFixed||this._fixFieldTypes();const t=this.attributes[e];if(void 0!==t)return t;const i=e.toLowerCase();for(const s in this.attributes)if(s.toLowerCase()===i)return this.attributes[s];if(this._hasFieldDefinition(i))return null;throw new s(null,r.FieldNotFound,null,{key:e})}_hasFieldDefinition(e){if(null===this._layer)return!1;for(let t=0;t<this._layer.fields.length;t++){if(this._layer.fields[t].name.toLowerCase()===e)return!0}return!1}setField(t,i){if(this.immutable)throw new s(null,r.Immutable,null);if(i instanceof Date&&(i=this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(i):e.dateJSToArcadeDate(i)),!1===m(i))throw new s(null,r.TypeNotAllowedInFeature,null);const o=t.toLowerCase();if(void 0===this.attributes[t]){for(const e in this.attributes)if(e.toLowerCase()===o)return void(this.attributes[e]=i);this.attributes[t]=i}else this.attributes[t]=i}hasField(e){const t=e.toLowerCase();if(void 0!==this.attributes[e])return!0;for(const i in this.attributes)if(i.toLowerCase()===t)return!0;return!!this._hasFieldDefinition(t)}keys(){let e=[];const t={};for(const i in this.attributes)e.push(i),t[i.toLowerCase()]=1;if(null!==this._layer)for(let i=0;i<this._layer.fields.length;i++){const s=this._layer.fields[i];1!==t[s.name.toLowerCase()]&&e.push(s.name)}return e=e.sort(),e}static parseAttributesFromDictionary(e){const t={};for(const i in e.attributes){const o=e.attributes[i];if(!m(o))throw new s(null,r.InvalidParameter,null);t[i]=o}return t}static fromJson(e,t){let i=null;null!==e.geometry&&void 0!==e.geometry&&(i=_(e.geometry));const o={};if(null!==e.attributes&&void 0!==e.attributes)for(const n in e.attributes){const t=e.attributes[n];if(null===t)o[n]=t;else{if(!(g(t)||F(t)||x(t)||d(t)||l(t)||u(t)))throw new s(null,r.InvalidParameter,null);o[n]=t}}return D.createFromGraphicLikeObject(i,o,null,t??null)}fullSchema(){return this._layer}gdbVersion(){if(null===this._layer)return"";const e=this._layer.gdbVersion;return void 0===e?"":""===e&&this._layer.capabilities?.isVersioned?"SDE.DEFAULT":e}castAsJson(e){const t={attributes:{},geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null};for(const i in this.attributes){const s=this.attributes[i];void 0!==s&&(t.attributes[i]=f(s,e))}return t}async castAsJsonAsync(e=null,t){return this.castAsJson(t)}}t(D);export{D 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 e from"../../../Graphic.js";import{StringEnum as t}from"../../enum.js";import{a0 as i}from"../../../chunks/languageUtils.js";import{SqlExpressionAdapted as s,OriginalField as n,AdaptedFeatureSet as r}from"./Adapted.js";import a from"./AttributeFilter.js";import o from"./OrderBy.js";import{FeatureSetError as l,FeatureSetErrorCodes as d}from"../support/errorsupport.js";import u from"../support/FeatureSet.js";import f from"../support/IdSet.js";import p from"../support/OrderbyClause.js";import{IdState as h,layerGeometryEsriConstants as c,FeatureServiceDatabaseType as g}from"../support/shared.js";import{isSingleField as _,toWhereClause as m,predictType as y,scanForField as b,reformulateWithoutField as w}from"../support/sqlUtils.js";import F from"../support/StatsField.js";import{createMD5Hash as I,outputTypes as S}from"../../../core/MD5.js";import{aggregateFunction as x}from"../../../core/sql/AggregateFunctions.js";import{DateOnly as D}from"../../../core/sql/DateOnly.js";import{SqlTimeStampOffset as A}from"../../../core/sql/SqlTimestampOffset.js";import{TimeOnly as j}from"../../../core/sql/TimeOnly.js";import k from"../../../core/sql/WhereClause.js";import C from"../../../geometry/SpatialReference.js";import T from"../../../layers/support/Field.js";import G from"../../../layers/support/FieldsIndex.js";const R=new t(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class q extends u{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return h.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new G([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const s of this._config.statsfields){const e=new F;e.field=s.name,e.tofieldname=s.name,e.workingexpr=s.expression instanceof k?s.expression:k.create(s.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),e.typeofstat=R.lookup(s.statistic)??"COUNT",this._decodedStatsfield.push(e)}this._decodedGroupbyfield=[];for(const s of this._config.groupbyfields){const e={name:s.name,singlefield:null,tofieldname:s.name,expression:s.expression instanceof k?s.expression:k.create(s.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(e)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=c.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new C({wkid:4326});this.fields=[];const a=new F;a.field=this._nextUniqueName(e),a.tofieldname=this.objectIdField,a.workingexpr=k.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),a.typeofstat="MIN",this._decodedStatsfield.push(a);for(const n of this._decodedGroupbyfield){const t=new T;if(n.name=this._nextUniqueName(e),t.name=n.tofieldname,t.alias=t.name,_(n.expression)){const e=this._parent.getField(m(n.expression,g.Standardised));if(!e)throw new l(d.AggregationFieldNotFound);n.name=e.name,n.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),t.type=e.type,n.sqlType=e.type}else{t.type=this._convertToEsriFieldType(y(n.expression,this._parent.fields));const e=new T;e.name=n.name,e.alias=e.name,this.phsyicalgroupbyfields.push(n.name),this._adaptedFields.push(new s(e,n.expression)),this._candosimplegroupby=!1,n.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const s of this._parent.fields)this._adaptedFields.push(new n(s));for(let s=0;s<this._decodedStatsfield.length;s++){const t=new T;let i=null;const n=this._decodedStatsfield[s];n.field=this._nextUniqueName(e),n.tofieldname===this.objectIdField&&(this._internalObjectIdField=n.field),t.name=n.tofieldname,t.alias=t.name;const r=null!==n.workingexpr&&_(n.workingexpr)?m(n.workingexpr,g.Standardised):"";switch(this._decodedStatsfield[s].typeofstat){case"SUM":if(""!==r){if(i=this._parent.getField(r),!i)throw new l(d.AggregationFieldNotFound);t.type=i.type}else t.type="double";break;case"MIN":case"MAX":if(""!==r){if(i=this._parent.getField(r),!i)throw new l(d.AggregationFieldNotFound);t.type=i.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==r&&(i=this._parent.getField(r),!i))throw new l(d.AggregationFieldNotFound);t.type="double"}this.fields.push(t)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,s){-1!==t&&this._featureCache[t];const n=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,n)?(await this._expandPagedSet(e,n,0,0,s),this._getFeatures(e,t,i,s)):"success"}async _getFilteredSet(e,t,i,s,n){if(""!==e)return new f([],[],!0,null);let l=null;const d={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let r=0;r<this._decodedStatsfield.length;r++)if(!0===b(i,this._decodedStatsfield[r].tofieldname)){d.nowhereclause=!0,i=null;break}if(null!==s){d.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===s.scanForField(this._decodedStatsfield[e].tofieldname)){s=null,d.ordered=!1;break}if(null!==s)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===s.scanForField(e.tofieldname)){s=null,d.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;s&&(t=this._reformulateOrderClauseWithoutGroupByFields(s));const r=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(n),l=!0===d.nowhereclause?new f(r._candidates.slice().concat(r._known.slice()),[],!0===d.ordered&&r._ordered,this._clonePageDefinition(r.pagesDefinition)):new f(r._candidates.slice(),r._known.slice(),!0===d.ordered&&r._ordered,this._clonePageDefinition(r.pagesDefinition)),l}let u=this._parent;if(this._adaptedFields.length>0&&(u=new r({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===d.nowhereclause)l=new f(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new o({parentfeatureset:u,orderbyclause:new p(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=u;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a({parentfeatureset:e,whereclause:t})}l=new f(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new o({parentfeatureset:e,orderbyclause:new p(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return l}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=w(e,t.tofieldname,m(t.workingexpr,g.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=w(e,t.tofieldname,m(t.expression,g.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const i of this._decodedGroupbyfield)i.tofieldname!==i.name&&t.push({field:i.tofieldname,newfield:i.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery))return await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i);this._checkCancelled(i);const s=e._candidates.length;this._refineKnowns(e,t);e._candidates.length;return e._candidates.length,e}_expandPagedSet(e,t,i,s,n){return this._expandPagedSetFeatureSet(e,t,i,s,n)}async _getPhysicalPage(t,i,s){if(!0===t.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(t,t.pagesDefinition.resultRecordCount,s,[]);const n=await this._getAgregagtePhysicalPage(t,i,s);for(const r of n){const t={geometry:r.geometry,attributes:{}},i={};for(const e in r.attributes)i[e.toLowerCase()]=r.attributes[e];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];this._featureCache[t.attributes[this.objectIdField]]=new e(t)}return n.length}_sequentialGetPhysicalItem(e,t,i,s){return new Promise(((n,r)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?n(s.length):this._nextAggregateItem(e,t,i,s,(r=>{null===r?n(s.length):(t-=1,n(this._sequentialGetPhysicalItem(e,t,i,s)))}),r)}))}_nextAggregateItem(e,t,s,n,r,a){try{i(e.pagesDefinition.internal.iterator.next()).then((i=>{if(null===i)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);n.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,r(null)}else e.pagesDefinition.internal.fullyResolved=!0,r(null);else{const o=this._generateAggregateHash(i);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[i],id:o};else{if(o!==e.pagesDefinition.internal.workingItem.id){const s=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return n.push(s),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(s.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[i],id:o},void r(s)}e.pagesDefinition.internal.workingItem.features.push(i)}this._nextAggregateItem(e,t,s,n,r,a)}}),a)}catch(o){a(o)}}_calculateFieldStat(e,t,i){const s=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof D||e instanceof j?s.push(e.toNumber()):e instanceof A?s.push(e.toMilliseconds()):s.push(e))}else s.push(null);i.attributes[t.tofieldname]=x(t.typeofstat,[s])}_calculateAndAppendAggregateItem(t){const i={attributes:{},geometry:null};for(const e of this._decodedGroupbyfield){const s=e.singlefield?t.features[0].attributes[e.singlefield]:k.convertValueToStorageFormat(e.expression.calculateValue(t.features[0]),e.sqlType);i.attributes[e.tofieldname]=s}for(const e of this._decodedStatsfield)this._calculateFieldStat(t,e,i);const s=[];for(let e=0;e<this._decodedStatsfield.length;e++)s.push(this._calculateFieldStat(t,this._decodedStatsfield[e],i));return this._featureCache[i.attributes[this.objectIdField]]=new e({attributes:i.attributes,geometry:i.geometry}),i}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const s=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==s?":":":"+s.toString()}return I(t,S.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){u._featuresetFunctions.groupby=function(e,t){return new q({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}export{q as default};
|
|
5
|
+
import e from"../../../Graphic.js";import{StringEnum as t}from"../../enum.js";import{a0 as i}from"../../../chunks/languageUtils.js";import{SqlExpressionAdapted as s,OriginalField as n,AdaptedFeatureSet as r}from"./Adapted.js";import a from"./AttributeFilter.js";import o from"./OrderBy.js";import{FeatureSetError as l,FeatureSetErrorCodes as d}from"../support/errorsupport.js";import u from"../support/FeatureSet.js";import f from"../support/IdSet.js";import h from"../support/OrderbyClause.js";import{IdState as p,layerGeometryEsriConstants as c,FeatureServiceDatabaseType as g}from"../support/shared.js";import{isSingleField as _,toWhereClause as m,predictType as y,scanForField as b,reformulateWithoutField as w}from"../support/sqlUtils.js";import F from"../support/StatsField.js";import I from"../../../core/Logger.js";import{createMD5Hash as S,outputTypes as x}from"../../../core/MD5.js";import{aggregateFunction as j}from"../../../core/sql/AggregateFunctions.js";import{DateOnly as D}from"../../../core/sql/DateOnly.js";import{SqlTimeStampOffset as A}from"../../../core/sql/SqlTimestampOffset.js";import{TimeOnly as k}from"../../../core/sql/TimeOnly.js";import C from"../../../core/sql/WhereClause.js";import T from"../../../geometry/SpatialReference.js";import G from"../../../layers/support/Field.js";import R from"../../../layers/support/FieldsIndex.js";const q=new t(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class O extends u{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return p.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new R([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const s of this._config.statsfields){const e=new F;e.field=s.name,e.tofieldname=s.name,e.workingexpr=s.expression instanceof C?s.expression:C.create(s.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),e.typeofstat=q.lookup(s.statistic)??"COUNT",this._decodedStatsfield.push(e)}this._decodedGroupbyfield=[];for(const s of this._config.groupbyfields){const e={name:s.name,singlefield:null,tofieldname:s.name,expression:s.expression instanceof C?s.expression:C.create(s.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(e)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=c.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new T({wkid:4326});this.fields=[];const a=new F;a.field=this._nextUniqueName(e),a.tofieldname=this.objectIdField,a.workingexpr=C.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),a.typeofstat="MIN",this._decodedStatsfield.push(a);for(const n of this._decodedGroupbyfield){const t=new G;if(n.name=this._nextUniqueName(e),t.name=n.tofieldname,t.alias=t.name,_(n.expression)){const e=this._parent.getField(m(n.expression,g.Standardised));if(!e)throw new l(d.AggregationFieldNotFound);n.name=e.name,n.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),t.type=e.type,n.sqlType=e.type}else{t.type=this._convertToEsriFieldType(y(n.expression,this._parent.fields));const e=new G;e.name=n.name,e.alias=e.name,this.phsyicalgroupbyfields.push(n.name),this._adaptedFields.push(new s(e,n.expression)),this._candosimplegroupby=!1,n.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const s of this._parent.fields)this._adaptedFields.push(new n(s));for(let s=0;s<this._decodedStatsfield.length;s++){const t=new G;let i=null;const n=this._decodedStatsfield[s];n.field=this._nextUniqueName(e),n.tofieldname===this.objectIdField&&(this._internalObjectIdField=n.field),t.name=n.tofieldname,t.alias=t.name;const r=null!==n.workingexpr&&_(n.workingexpr)?m(n.workingexpr,g.Standardised):"";switch(this._decodedStatsfield[s].typeofstat){case"SUM":if(""!==r){if(i=this._parent.getField(r),!i)throw new l(d.AggregationFieldNotFound);t.type=i.type}else t.type="double";break;case"MIN":case"MAX":if(""!==r){if(i=this._parent.getField(r),!i)throw new l(d.AggregationFieldNotFound);t.type=i.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==r&&(i=this._parent.getField(r),!i))throw new l(d.AggregationFieldNotFound);t.type="double"}this.fields.push(t)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,s){-1!==t&&this._featureCache[t];const n=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,n)?(await this._expandPagedSet(e,n,0,0,s),this._getFeatures(e,t,i,s)):"success"}async _getFilteredSet(e,t,i,s,n){if(""!==e)return new f([],[],!0,null);let l=null;const d={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let r=0;r<this._decodedStatsfield.length;r++)if(!0===b(i,this._decodedStatsfield[r].tofieldname)){d.nowhereclause=!0,i=null;break}if(null!==s){d.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===s.scanForField(this._decodedStatsfield[e].tofieldname)){s=null,d.ordered=!1;break}if(null!==s)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===s.scanForField(e.tofieldname)){s=null,d.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;s&&(t=this._reformulateOrderClauseWithoutGroupByFields(s));const r=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(n),l=!0===d.nowhereclause?new f(r._candidates.slice().concat(r._known.slice()),[],!0===d.ordered&&r._ordered,this._clonePageDefinition(r.pagesDefinition)):new f(r._candidates.slice(),r._known.slice(),!0===d.ordered&&r._ordered,this._clonePageDefinition(r.pagesDefinition)),l}let u=this._parent;if(this._adaptedFields.length>0&&(u=new r({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===d.nowhereclause)l=new f(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new o({parentfeatureset:u,orderbyclause:new h(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=u;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a({parentfeatureset:e,whereclause:t})}l=new f(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new o({parentfeatureset:e,orderbyclause:new h(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return l}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=w(e,t.tofieldname,m(t.workingexpr,g.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=w(e,t.tofieldname,m(t.expression,g.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const i of this._decodedGroupbyfield)i.tofieldname!==i.name&&t.push({field:i.tofieldname,newfield:i.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery))return await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i);this._checkCancelled(i);const s=e._candidates.length;this._refineKnowns(e,t);e._candidates.length;return e._candidates.length,e}_expandPagedSet(e,t,i,s,n){return this._expandPagedSetFeatureSet(e,t,i,s,n)}async _getPhysicalPage(t,i,s){if(!0===t.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(t,t.pagesDefinition.resultRecordCount,s,[]);const n=await this._getAgregagtePhysicalPage(t,i,s);for(const r of n){const t={geometry:r.geometry,attributes:{}},i={};for(const e in r.attributes)i[e.toLowerCase()]=r.attributes[e];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];if(null!=this._featureCache[t.attributes[this.objectIdField]])throw I.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new l(d.NeverReach);this._featureCache[t.attributes[this.objectIdField]]=new e(t)}return n.length}_sequentialGetPhysicalItem(e,t,i,s){return new Promise(((n,r)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?n(s.length):this._nextAggregateItem(e,t,i,s,(r=>{null===r?n(s.length):(t-=1,n(this._sequentialGetPhysicalItem(e,t,i,s)))}),r)}))}_nextAggregateItem(e,t,s,n,r,a){try{i(e.pagesDefinition.internal.iterator.next()).then((i=>{if(null===i)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);n.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,r(null)}else e.pagesDefinition.internal.fullyResolved=!0,r(null);else{const o=this._generateAggregateHash(i);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[i],id:o};else{if(o!==e.pagesDefinition.internal.workingItem.id){const s=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return n.push(s),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(s.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[i],id:o},void r(s)}e.pagesDefinition.internal.workingItem.features.push(i)}this._nextAggregateItem(e,t,s,n,r,a)}}),a)}catch(o){a(o)}}_calculateFieldStat(e,t,i){const s=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof D||e instanceof k?s.push(e.toNumber()):e instanceof A?s.push(e.toMilliseconds()):s.push(e))}else s.push(null);i.attributes[t.tofieldname]=j(t.typeofstat,[s])}_calculateAndAppendAggregateItem(t){const i={attributes:{},geometry:null};for(const e of this._decodedGroupbyfield){const s=e.singlefield?t.features[0].attributes[e.singlefield]:C.convertValueToStorageFormat(e.expression.calculateValue(t.features[0]),e.sqlType);i.attributes[e.tofieldname]=s}for(const e of this._decodedStatsfield)this._calculateFieldStat(t,e,i);const s=[];for(let e=0;e<this._decodedStatsfield.length;e++)s.push(this._calculateFieldStat(t,this._decodedStatsfield[e],i));if(null!=this._featureCache[i.attributes[this.objectIdField]])throw I.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${i.attributes[this.objectIdField]}`),new l(d.NeverReach);return this._featureCache[i.attributes[this.objectIdField]]=new e({attributes:i.attributes,geometry:i.geometry}),i}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const s=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==s?":":":"+s.toString()}return S(t,x.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){u._featuresetFunctions.groupby=function(e,t){return new O({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}export{O 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 e from"../../../Graphic.js";import{id as t}from"../../../kernel.js";import r from"../../../request.js";import i from"../../Attachment.js";import s from"../../Dictionary.js";import{FeatureSetError as a,FeatureSetErrorCodes as n}from"../support/errorsupport.js";import l from"../support/FeatureSet.js";import o from"../support/IdSet.js";import{defaultMaxRecords as u,stableStringify as d,FeatureServiceDatabaseType as c,IdState as h,extractServiceUrl as p}from"../support/shared.js";import{toWhereClause as y,isSingleField as f}from"../support/sqlUtils.js";import{decodeStatType as _}from"../support/stats.js";import{createMD5Hash as g,outputTypes as m}from"../../../core/MD5.js";import{sqlAnd as R}from"../../../core/sql.js";import{fromJSON as w}from"../../../geometry/support/jsonUtils.js";import{srToRESTValue as b}from"../../../geometry/support/spatialReferenceUtils.js";import S from"../../../layers/FeatureLayer.js";import F from"../../../rest/support/AttachmentQuery.js";import I from"../../../rest/support/Query.js";import D from"../../../rest/support/StatisticDefinition.js";class P extends l{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return u}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+d(e.toJSON());return g(t,m.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=c.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=c.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=c.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=c.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return h.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new I;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(r){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this.recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this.recentlyUsedQueries.addToCache(t,i),i=i.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}async _getFilteredSet(e,t,r,i,s){const a=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e){return new o([],[],!0,null)}if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,r,i,s);let n="",l=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=i.constructClause(),l=!0);const u=this._createQuery();u.where=R(u.where,null===r?null===t?"1=1":"":y(r,a)),u.spatialRelationship=this._makeRelationshipEnum(e),u.outSpatialReference=this.spatialReference,u.orderByFields=""!==n?n.split(","):null,u.geometry=null===t?null:t,u.relationParameter=this._makeRelationshipParam(e);let d=await this.executeQuery(u,"executeForIds");null===d&&(d=[]),this._checkCancelled(s);return new o([],d,l,null)}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}async _getFilteredSetUsingPaging(e,t,r,i,s){let a="",n=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=i.constructClause(),n=!0);const l=await this.databaseType(),u=null===r?null===t?"1=1":"":y(r,l);let d=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<d&&(d=c);let h=null;if(!0===this._pageJustIds)h=new o([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:d,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:a,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let r=!0;!0===this._removeGeometry&&(r=!1);const i=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new o([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:i.join(","),resultRecordCount:d,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:a,returnGeometry:r,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,d,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,r){const i=e.pagesDefinition.internal.lastRetrieved,s=i,a=e.pagesDefinition.internal.lastPage,n=this._createQuery();n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=R(n.where,e.pagesDefinition.where),n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==a)return"done";const o=this._layer.objectIdField;for(let u=0;u<l.features.length;u++)e.pagesDefinition.internal.set[s+u]=l.features[u].attributes[o];if(!1===this._pageJustIds)for(let u=0;u<l.features.length;u++)this._featureCache[l.features[u].attributes[o]]=l.features[u];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const i of t)if(i.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}async _getFeatures(e,t,r,i){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,i),this._getFeatures(e,t,r,i);let l=0;for(let a=e._lastFetchedIndex;a<e._known.length;a++){if(e._lastFetchedIndex+=1,l++,void 0===this._featureCache[e._known[a]]){let r=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[a]]){const i=t._featureMap[e._known[a]];null!==i&&(r=!0,this._featureCache[e._known[a]]=i)}}if(!1===r&&(e._known[a]!==t&&s.push(e._known[a]),s.length>=this._maxProcessingRate()-1))break}if(l>=r&&0===s.length)break}if(0===s.length)return"success";const o=this._createQuery();o.objectIds=s,o.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),o.returnGeometry=!0,!0===this._removeGeometry&&(o.returnGeometry=!1),o.outSpatialReference=this.spatialReference;const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),void 0!==u.error)throw new a(n.RequestFailed,{reason:u.error});const d=this._layer.objectIdField;for(let a=0;a<u.features.length;a++)this._featureCache[u.features[a].attributes[d]]=u.features[a];return"success"}async _getDistinctPages(e,t,r,i,s,l,o,u,d){await this._ensureLoaded();const c=await this.databaseType();let h=r.parseTree.column;const p=this._layer.fields??[];for(let a=0;a<p.length;a++)if(p[a].name.toLowerCase()===h.toLowerCase()){h=p[a].name;break}const f=this._createQuery();f.where=R(f.where,null===l?null===s?"1=1":"":y(l,c)),f.spatialRelationship=this._makeRelationshipEnum(i),f.relationParameter=this._makeRelationshipParam(i),f.geometry=null===s?null:s,f.returnDistinctValues=!0,f.returnGeometry=!1,f.outFields=[h];const _=await this.executeQuery(f,"execute");if(this._checkCancelled(d),!_.hasOwnProperty("features"))throw new a(n.InvalidStatResponse);let g=!1;for(let a=0;a<p.length;a++)if(p[a].name===h){"date"===p[a].type&&(g=!0);break}for(let a=0;a<_.features.length;a++){if(g){const e=_.features[a].attributes[h];null!==e?u.push(new Date(e)):u.push(e)}else u.push(_.features[a].attributes[h]);if(u.length>=o)break}if(0===_.features.length)return u;if(_.features.length===this._layer.capabilities?.query.maxRecordCount&&u.length<o){return{calculated:!0,result:await this._getDistinctPages(e+_.features.length,t,r,i,s,l,o,u,d)}}return u}async _distinctStat(e,t,r,i,s,a,n){return{calculated:!0,result:await this._getDistinctPages(0,e,t,r,i,s,a,[],n)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,r,i){const s=await this.databaseType();if(this.isTable()&&r&&null!==t&&""!==t)return{calculated:!0,result:0};const a=this._createQuery();a.where=R(a.where,null===i?null===r?"1=1":"":y(i,s)),a.spatialRelationship=this._makeRelationshipEnum(t),a.relationParameter=this._makeRelationshipParam(t),a.geometry=null===r?null:r,a.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(a,"executeForCount")}}async _stats(e,t,r,i,s,l,o){await this._ensureLoaded();const u=this._layer.capabilities?.query,d=!!u?.supportsSqlExpression,c=!!u?.supportsStatistics,h=!!u?.supportsDistinct;if("count"===e)return h?this._countstat(e,r,i,s):{calculated:!1};if(!1===c||!1===f(t)&&!1===d||!1===t.isStandardized)return""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,l,o);if("distinct"===e)return!1===h?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,l,o):this._distinctStat(e,t,r,i,s,l,o);const p=await this.databaseType();if(this.isTable()&&i&&null!==r&&""!==r)return{calculated:!0,result:null};const g=this._createQuery();g.where=R(g.where,null===s?null===i?"1=1":"":y(s,p)),g.spatialRelationship=this._makeRelationshipEnum(r),g.relationParameter=this._makeRelationshipParam(r),g.geometry=null===i?null:i;const m=new D;m.statisticType=_(e),m.onStatisticField=y(t,p),m.outStatisticFieldName="ARCADE_STAT_RESULT",g.returnGeometry=!1;let w="ARCADE_STAT_RESULT";g.outStatistics=[m];const b=await this.executeQuery(g,"execute");if(!b.hasOwnProperty("features")||0===b.features.length)throw new a(n.InvalidStatResponse);let S=!1;const F=b.fields??[];for(let a=0;a<F.length;a++)if("ARCADE_STAT_RESULT"===F[a].name.toUpperCase()){w=F[a].name,"date"===F[a].type&&(S=!0);break}if(S){let e=b.features[0].attributes[w];return null!==e&&(e=new Date(b.features[0].attributes[w])),{calculated:!0,result:e}}return{calculated:!0,result:b.features[0].attributes[w]}}_stat(e,t,r,i,s,a,n){return this._stats(e,t,r,i,s,a,n)}async _canDoAggregates(e,t){await this._ensureLoaded();let r=!1;const i=this._layer.capabilities?.query,s=!0===i?.supportsSqlExpression;if(null!=i&&!0===i.supportsStatistics&&!0===i.supportsOrderBy&&(r=!0),r)for(let a=0;a<t.length-1;a++)(!1===t[a].workingexpr?.isStandardized||!1===f(t[a].workingexpr)&&!1===s)&&(r=!1);return!1!==r}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,r,i,s,a,n){await this._ensureLoaded();const l=await this.databaseType();let u="",d=!1,c=!1;null!==a&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(u=a.constructClause(),c=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(c=!1,d=!0,u=this._layer.objectIdField);const h=[];for(let o=0;o<t.length;o++){const e=new D;e.onStatisticField=null!==t[o].workingexpr?y(t[o].workingexpr,l):"",e.outStatisticFieldName=t[o].field,e.statisticType=t[o].toStatisticsName(),h.push(e)}""===u&&(u=e.join(","));let p=this._maxQueryRate();const f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<p&&(p=f);const _=null===s?null===i?"1=1":"":y(s,l);return new o([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(r),relationParam:this._makeRelationshipParam(r),outFields:["*"],useOIDpagination:d,generatedOid:n,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===i?null:i,where:_,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(t,r,i){let s=t.pagesDefinition.where;!0===t.pagesDefinition.useOIDpagination&&(s=R(s,t.pagesDefinition.generatedOid+">"+t.pagesDefinition.internal.lastMaxId.toString()));const l=t.pagesDefinition.internal.lastRetrieved,o=l,u=t.pagesDefinition.internal.lastPage,d=this._createQuery();if(d.where=R(d.where,s),d.spatialRelationship=t.pagesDefinition.spatialRel,d.relationParameter=t.pagesDefinition.relationParam,d.outFields=t.pagesDefinition.outFields,d.outStatistics=t.pagesDefinition.outStatistics,d.geometry=t.pagesDefinition.geometry,d.groupByFieldsForStatistics=t.pagesDefinition.groupByFieldsForStatistics,d.num=t.pagesDefinition.resultRecordCount,d.start=t.pagesDefinition.internal.lastPage,d.returnGeometry=t.pagesDefinition.returnGeometry,d.orderByFields=""!==t.pagesDefinition.orderByFields?t.pagesDefinition.orderByFields.split(","):null,this.isTable()&&d.geometry&&d.spatialRelationship)return[];const c=await this.executeQuery(d,"execute");if(this._checkCancelled(i),!c.hasOwnProperty("features"))throw new a(n.InvalidStatResponse);const h=[];if(t.pagesDefinition.internal.lastPage!==u)return[];c.features.length>0&&void 0===c.features[0].attributes[t.pagesDefinition.generatedOid]&&(t.pagesDefinition.generatedOid=t.pagesDefinition.generatedOid.toLowerCase());for(let e=0;e<c.features.length;e++)t.pagesDefinition.internal.set[o+e]=c.features[e].attributes[t.pagesDefinition.generatedOid];for(let a=0;a<c.features.length;a++)h.push(new e({attributes:c.features[a].attributes,geometry:null}));return!0===t.pagesDefinition.useOIDpagination?0===c.features.length?t.pagesDefinition.internal.fullyResolved=!0:t.pagesDefinition.internal.lastMaxId=c.features[c.features.length-1].attributes[t.pagesDefinition.generatedOid]:(void 0===c.exceededTransferLimit&&c.features.length!==t.pagesDefinition.resultRecordCount||!1===c.exceededTransferLimit)&&(t.pagesDefinition.internal.fullyResolved=!0),t.pagesDefinition.internal.lastRetrieved=l+c.features.length,t.pagesDefinition.internal.lastPage+=t.pagesDefinition.resultRecordCount,h}static create(e,t,r,i,s){const a=new S({url:e,outFields:null===t?["*"]:t});return new P({layer:a,spatialReference:r,lrucache:i,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return p(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,n){function l(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}const o=this._layer;if(l(o)){const l={objectIds:[e],returnMetadata:n};(t&&t>0||r&&r>0)&&(l.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(l.attachmentTypes=a),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:o,query:l,method:"attachments"});const u=await o.queryAttachments(new F(l)),d=[];return u&&u[e]&&u[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let a=null;n&&t.exifInfo&&(a=s.convertJsonToArcade(t.exifInfo,"system",!0)),d.push(new i(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null))})),d}return[]}async queryRelatedFeatures(t){const i={f:"json",relationshipId:t.relationshipId.toString(),definitionExpression:t.where,outFields:t.outFields?.join(","),returnGeometry:t.returnGeometry.toString()};void 0!==t.resultOffset&&null!==t.resultOffset&&(i.resultOffset=t.resultOffset.toString()),void 0!==t.resultRecordCount&&null!==t.resultRecordCount&&(i.resultRecordCount=t.resultRecordCount.toString()),t.orderByFields&&(i.orderByFields=t.orderByFields.join(",")),t.objectIds&&t.objectIds.length>0&&(i.objectIds=t.objectIds.join(",")),t.outSpatialReference&&(i.outSR=b(t.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:i,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const s=await r(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:i});if(s.data){const t={},r=s.data;if(r?.relatedRecordGroups){const i=r.spatialReference;for(const s of r.relatedRecordGroups){const a=s.objectId,n=[];for(const t of s.relatedRecords){t.geometry&&(t.geometry.spatialReference=i);const r=new e({geometry:t.geometry?w(t.geometry):null,attributes:t.attributes});n.push(r)}t[a]={features:n,exceededTransferLimit:!0===r.exceededTransferLimit}}}return t}throw new a(n.InvalidRequest)}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=R(r.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.queryFeatures(r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=t?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=t?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let i=this._layer.url;const s=i.toLowerCase().indexOf("/rest/services");if(i=s>-1?i.slice(0,s):i,i){i+="/rest/info";try{const e=await r(i,{query:{f:"json"}});let t="";return e.data?.owningSystemUrl&&(t=e.data.owningSystemUrl),t}catch(a){return""}}return""}getDataSourceFeatureSet(){const e=new P({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const s=await r(i,{responseType:"json",query:{f:"json"}});e=s?.data?.name??null,t=s?.data?.serviceItemId??null}const s=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}export{P as default};
|
|
5
|
+
import e from"../../../Graphic.js";import{id as t}from"../../../kernel.js";import r from"../../../request.js";import i from"../../Attachment.js";import s from"../../Dictionary.js";import{FeatureSetError as a,FeatureSetErrorCodes as n}from"../support/errorsupport.js";import l from"../support/FeatureSet.js";import o from"../support/IdSet.js";import{defaultMaxRecords as u,stableStringify as d,FeatureServiceDatabaseType as c,IdState as h,extractServiceUrl as p}from"../support/shared.js";import{toWhereClause as y,isSingleField as f}from"../support/sqlUtils.js";import{decodeStatType as g}from"../support/stats.js";import{sliceEquals as _}from"../../../core/arrayUtils.js";import{createMD5Hash as m,outputTypes as w}from"../../../core/MD5.js";import{sqlAnd as R}from"../../../core/sql.js";import F from"../../../core/sql/WhereClause.js";import{fromJSON as S}from"../../../geometry/support/jsonUtils.js";import{srToRESTValue as b}from"../../../geometry/support/spatialReferenceUtils.js";import I from"../../../layers/FeatureLayer.js";import D from"../../../rest/support/AttachmentQuery.js";import P from"../../../rest/support/Query.js";import C from"../../../rest/support/StatisticDefinition.js";function v(e){if(0===e.length)throw new a(n.NeverReach);const t=[];for(let i=0;i<e.length;i++){const r=e[i],s=[`"${r.name.replace('"','""')}" ${r.asc?">":"<"} @last_${i}`];for(let t=0;t<i;t++){const r=e[t];s.push(`"${r.name.replace('"','""')}" = @last_${t}`)}t.push(s.join(" AND "))}const r=t.join(" OR ");return F.create(r)}function T(e,t){null==e.clause&&(e.clause=v(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const i=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[i]}}class k extends l{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return u}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+d(e.toJSON());return m(t,w.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const r of this.fields)if("oid"===r.type)e.push(r),t.push(r.name);else for(const i of this._overrideFields)if(i.toLowerCase()===r.name.toLowerCase()){e.push(r),t.push(r.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=c.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=c.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=c.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=c.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return h.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new P;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(r){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let i=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);i=this.recentlyUsedQueries.getFromCache(t),null===i&&(i=r(e),this.recentlyUsedQueries.addToCache(t,i),i=i.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===i&&(i=r(e)),i}async _getFilteredSet(e,t,r,i,s){const a=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e){return new o([],[],!0,null)}if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,r,i,s);let n="",l=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=i.constructClause(),l=!0);const u=this._createQuery();u.where=R(u.where,null===r?null===t?"1=1":"":y(r,a)),u.spatialRelationship=this._makeRelationshipEnum(e),u.outSpatialReference=this.spatialReference,u.orderByFields=""!==n?n.split(","):null,u.geometry=null===t?null:t,u.relationParameter=this._makeRelationshipParam(e);let d=await this.executeQuery(u,"executeForIds");null===d&&(d=[]),this._checkCancelled(s);return new o([],d,l,null)}_expandPagedSet(e,t,r,i,s){return this._expandPagedSetFeatureSet(e,t,r,i,s)}async _getFilteredSetUsingPaging(e,t,r,i,s){let a="",n=!1;null!==i&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=i.constructClause(),n=!0);const l=await this.databaseType(),u=null===r?null===t?"1=1":"":y(r,l);let d=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<d&&(d=c);let h=null;if(!0===this._pageJustIds)h=new o([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:d,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:a,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let r=!0;!0===this._removeGeometry&&(r=!1);const i=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new o([],["GETPAGES"],n,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:i.join(","),resultRecordCount:d,resultOffset:0,geometry:null===t?null:t,where:u,orderByFields:a,returnGeometry:r,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,d,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,r){const i=e.pagesDefinition.internal.lastRetrieved,s=i,a=e.pagesDefinition.internal.lastPage,n=this._createQuery();n.spatialRelationship=e.pagesDefinition.spatialRel,n.relationParameter=e.pagesDefinition.relationParam,n.outFields=e.pagesDefinition.outFields.split(","),n.num=e.pagesDefinition.resultRecordCount,n.start=e.pagesDefinition.internal.lastPage,n.geometry=e.pagesDefinition.geometry,n.where=R(n.where,e.pagesDefinition.where),n.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,n.returnGeometry=e.pagesDefinition.returnGeometry,n.outSpatialReference=this.spatialReference;const l=await this.executeQuery(n,"execute");if(this._checkCancelled(r),e.pagesDefinition.internal.lastPage!==a)return"done";const o=this._layer.objectIdField;for(let u=0;u<l.features.length;u++)e.pagesDefinition.internal.set[s+u]=l.features[u].attributes[o];if(!1===this._pageJustIds)for(let u=0;u<l.features.length;u++)this._featureCache[l.features[u].attributes[o]]=l.features[u];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=i+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const i of t)if(i.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return!1===r&&t.push(this.objectIdField),t}async _getFeatures(e,t,r,i){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,i),this._getFeatures(e,t,r,i);let l=0;for(let a=e._lastFetchedIndex;a<e._known.length;a++){if(e._lastFetchedIndex+=1,l++,void 0===this._featureCache[e._known[a]]){let r=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[a]]){const i=t._featureMap[e._known[a]];null!==i&&(r=!0,this._featureCache[e._known[a]]=i)}}if(!1===r&&(e._known[a]!==t&&s.push(e._known[a]),s.length>=this._maxProcessingRate()-1))break}if(l>=r&&0===s.length)break}if(0===s.length)return"success";const o=this._createQuery();o.objectIds=s,o.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),o.returnGeometry=!0,!0===this._removeGeometry&&(o.returnGeometry=!1),o.outSpatialReference=this.spatialReference;const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),void 0!==u.error)throw new a(n.RequestFailed,{reason:u.error});const d=this._layer.objectIdField;for(let a=0;a<u.features.length;a++)this._featureCache[u.features[a].attributes[d]]=u.features[a];return"success"}async _getDistinctPages(e,t,r,i,s,l,o,u,d){await this._ensureLoaded();const c=await this.databaseType();let h=r.parseTree.column;const p=this._layer.fields??[];for(let a=0;a<p.length;a++)if(p[a].name.toLowerCase()===h.toLowerCase()){h=p[a].name;break}const f=this._createQuery();f.where=R(f.where,null===l?null===s?"1=1":"":y(l,c)),f.spatialRelationship=this._makeRelationshipEnum(i),f.relationParameter=this._makeRelationshipParam(i),f.geometry=null===s?null:s,f.returnDistinctValues=!0,f.returnGeometry=!1,f.outFields=[h];const g=await this.executeQuery(f,"execute");if(this._checkCancelled(d),!g.hasOwnProperty("features"))throw new a(n.InvalidStatResponse);let _=!1;for(let a=0;a<p.length;a++)if(p[a].name===h){"date"===p[a].type&&(_=!0);break}for(let a=0;a<g.features.length;a++){if(_){const e=g.features[a].attributes[h];null!==e?u.push(new Date(e)):u.push(e)}else u.push(g.features[a].attributes[h]);if(u.length>=o)break}if(0===g.features.length)return u;if(g.features.length===this._layer.capabilities?.query.maxRecordCount&&u.length<o){return{calculated:!0,result:await this._getDistinctPages(e+g.features.length,t,r,i,s,l,o,u,d)}}return u}async _distinctStat(e,t,r,i,s,a,n){return{calculated:!0,result:await this._getDistinctPages(0,e,t,r,i,s,a,[],n)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,r,i){const s=await this.databaseType();if(this.isTable()&&r&&null!==t&&""!==t)return{calculated:!0,result:0};const a=this._createQuery();a.where=R(a.where,null===i?null===r?"1=1":"":y(i,s)),a.spatialRelationship=this._makeRelationshipEnum(t),a.relationParameter=this._makeRelationshipParam(t),a.geometry=null===r?null:r,a.returnGeometry=!1;return{calculated:!0,result:await this.executeQuery(a,"executeForCount")}}async _stats(e,t,r,i,s,l,o){await this._ensureLoaded();const u=this._layer.capabilities?.query,d=!!u?.supportsSqlExpression,c=!!u?.supportsStatistics,h=!!u?.supportsDistinct;if("count"===e)return h?this._countstat(e,r,i,s):{calculated:!1};if(!1===c||!1===f(t)&&!1===d||!1===t.isStandardized)return""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,l,o);if("distinct"===e)return!1===h?""!==r||null!==s?{calculated:!1}:this._manualStat(e,t,l,o):this._distinctStat(e,t,r,i,s,l,o);const p=await this.databaseType();if(this.isTable()&&i&&null!==r&&""!==r)return{calculated:!0,result:null};const _=this._createQuery();_.where=R(_.where,null===s?null===i?"1=1":"":y(s,p)),_.spatialRelationship=this._makeRelationshipEnum(r),_.relationParameter=this._makeRelationshipParam(r),_.geometry=null===i?null:i;const m=new C;m.statisticType=g(e),m.onStatisticField=y(t,p),m.outStatisticFieldName="ARCADE_STAT_RESULT",_.returnGeometry=!1;let w="ARCADE_STAT_RESULT";_.outStatistics=[m];const F=await this.executeQuery(_,"execute");if(!F.hasOwnProperty("features")||0===F.features.length)throw new a(n.InvalidStatResponse);let S=!1;const b=F.fields??[];for(let a=0;a<b.length;a++)if("ARCADE_STAT_RESULT"===b[a].name.toUpperCase()){w=b[a].name,"date"===b[a].type&&(S=!0);break}if(S){let e=F.features[0].attributes[w];return null!==e&&(e=new Date(F.features[0].attributes[w])),{calculated:!0,result:e}}return{calculated:!0,result:F.features[0].attributes[w]}}_stat(e,t,r,i,s,a,n){return this._stats(e,t,r,i,s,a,n)}async _canDoAggregates(e,t){await this._ensureLoaded();let r=!1;const i=this._layer.capabilities?.query,s=!0===i?.supportsSqlExpression;if(null!=i&&!0===i.supportsStatistics&&!0===i.supportsOrderBy&&(r=!0),r)for(let a=0;a<t.length-1;a++)(!1===t[a].workingexpr?.isStandardized||!1===f(t[a].workingexpr)&&!1===s)&&(r=!1);return!1!==r}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,r,i,s,a,n){await this._ensureLoaded();const l=await this.databaseType();let u=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();u={keyFields:e.map(((e,r)=>({name:t.normalizeFieldName(e)??e,asc:null==a||1===a._directions[r]})))}}let d="",c=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==u||_(e,0,e.length,a._fields,0,Math.min(a._fields.length,e.length),((e,t)=>e.toLowerCase()===t.toLowerCase())))&&(d=a.constructClause(),c=!0),""===d&&(d=e.join(","));const h=[];for(let o=0;o<t.length;o++){const e=new C;e.onStatisticField=null!==t[o].workingexpr?y(t[o].workingexpr,l):"",e.outStatisticFieldName=t[o].field,e.statisticType=t[o].toStatisticsName(),h.push(e)}let p=this._maxQueryRate();const f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<p&&(p=f);const g=null===s?null===i?"1=1":"":y(s,l);return new o([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(r),relationParam:this._makeRelationshipParam(r),outFields:["*"],useOIDpagination:!1,generatedOid:n,resultRecordCount:p,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===i?null:i,where:g,orderByFields:d,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:u}})}async _getAgregagtePhysicalPage(t,r,i){let s=t.pagesDefinition.where;if(!0===t.pagesDefinition.useOIDpagination&&(s=R(s,t.pagesDefinition.generatedOid+">"+t.pagesDefinition.internal.lastMaxId.toString())),null!=t.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new a(n.NotImplemented);s=R(s,y(t.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const l=t.pagesDefinition.internal.lastRetrieved,o=l,u=t.pagesDefinition.internal.lastPage,d=this._createQuery();if(d.where=R(d.where,s),d.spatialRelationship=t.pagesDefinition.spatialRel,d.relationParameter=t.pagesDefinition.relationParam,d.outFields=t.pagesDefinition.outFields,d.outStatistics=t.pagesDefinition.outStatistics,d.geometry=t.pagesDefinition.geometry,d.groupByFieldsForStatistics=t.pagesDefinition.groupByFieldsForStatistics,d.num=t.pagesDefinition.resultRecordCount,d.start=t.pagesDefinition.internal.lastPage,d.returnGeometry=t.pagesDefinition.returnGeometry,d.orderByFields=""!==t.pagesDefinition.orderByFields?t.pagesDefinition.orderByFields.split(","):null,this.isTable()&&d.geometry&&d.spatialRelationship)return[];const c=await this.executeQuery(d,"execute");if(this._checkCancelled(i),!c.hasOwnProperty("features"))throw new a(n.InvalidStatResponse);const h=[];if(t.pagesDefinition.internal.lastPage!==u)return[];c.features.length>0&&void 0===c.features[0].attributes[t.pagesDefinition.generatedOid]&&(t.pagesDefinition.generatedOid=t.pagesDefinition.generatedOid.toLowerCase());for(let e=0;e<c.features.length;e++)t.pagesDefinition.internal.set[o+e]=c.features[e].attributes[t.pagesDefinition.generatedOid];for(let a=0;a<c.features.length;a++)h.push(new e({attributes:c.features[a].attributes,geometry:null}));return t.pagesDefinition.internal.keysetPagination?0!==c.features.length&&c.exceededTransferLimit?T(t.pagesDefinition.internal.keysetPagination,h.at(-1)):t.pagesDefinition.internal.fullyResolved=!0:!0===t.pagesDefinition.useOIDpagination?0===c.features.length?t.pagesDefinition.internal.fullyResolved=!0:t.pagesDefinition.internal.lastMaxId=c.features[c.features.length-1].attributes[t.pagesDefinition.generatedOid]:(void 0===c.exceededTransferLimit&&c.features.length!==t.pagesDefinition.resultRecordCount||!1===c.exceededTransferLimit)&&(t.pagesDefinition.internal.fullyResolved=!0),t.pagesDefinition.internal.lastRetrieved=l+c.features.length,t.pagesDefinition.internal.lastPage+=t.pagesDefinition.resultRecordCount,h}static create(e,t,r,i,s){const a=new I({url:e,outFields:null===t?["*"]:t});return new k({layer:a,spatialReference:r,lrucache:i,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return p(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,n){function l(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}const o=this._layer;if(l(o)){const l={objectIds:[e],returnMetadata:n};(t&&t>0||r&&r>0)&&(l.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(l.attachmentTypes=a),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:o,query:l,method:"attachments"});const u=await o.queryAttachments(new D(l)),d=[];return u&&u[e]&&u[e].forEach((t=>{const r=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let a=null;n&&t.exifInfo&&(a=s.convertJsonToArcade(t.exifInfo,"system",!0)),d.push(new i(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null))})),d}return[]}async queryRelatedFeatures(t){const i={f:"json",relationshipId:t.relationshipId.toString(),definitionExpression:t.where,outFields:t.outFields?.join(","),returnGeometry:t.returnGeometry.toString()};void 0!==t.resultOffset&&null!==t.resultOffset&&(i.resultOffset=t.resultOffset.toString()),void 0!==t.resultRecordCount&&null!==t.resultRecordCount&&(i.resultRecordCount=t.resultRecordCount.toString()),t.orderByFields&&(i.orderByFields=t.orderByFields.join(",")),t.objectIds&&t.objectIds.length>0&&(i.objectIds=t.objectIds.join(",")),t.outSpatialReference&&(i.outSR=b(t.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:i,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const s=await r(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:i});if(s.data){const t={},r=s.data;if(r?.relatedRecordGroups){const i=r.spatialReference;for(const s of r.relatedRecordGroups){const a=s.objectId,n=[];for(const t of s.relatedRecords){t.geometry&&(t.geometry.spatialReference=i);const r=new e({geometry:t.geometry?S(t.geometry):null,attributes:t.attributes});n.push(r)}t[a]={features:n,exceededTransferLimit:!0===r.exceededTransferLimit}}}return t}throw new a(n.InvalidRequest)}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=R(r.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const i=await this._layer.queryFeatures(r);return 1===i.features.length?i.features[0]:null}async getIdentityUser(){await this.load();const e=t?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=t?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let i=this._layer.url;const s=i.toLowerCase().indexOf("/rest/services");if(i=s>-1?i.slice(0,s):i,i){i+="/rest/info";try{const e=await r(i,{query:{f:"json"}});let t="";return e.data?.owningSystemUrl&&(t=e.data.owningSystemUrl),t}catch(a){return""}}return""}getDataSourceFeatureSet(){const e=new k({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const s=await r(i,{responseType:"json",query:{f:"json"}});e=s?.data?.name??null,t=s?.data?.serviceItemId??null}const s=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}export{k as default};
|