@arcgis/core 4.28.0-rc.0 → 4.28.0-rc.1
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/assets/components/assets/icon/addConstant16.json +1 -0
- package/assets/components/assets/icon/addConstant24.json +1 -0
- package/assets/components/assets/icon/addConstant32.json +1 -0
- package/assets/components/assets/icon/addRasterVariable16.json +1 -0
- package/assets/components/assets/icon/addRasterVariable24.json +1 -0
- package/assets/components/assets/icon/addRasterVariable32.json +1 -0
- package/assets/components/assets/icon/addRasters16.json +1 -0
- package/assets/components/assets/icon/addRasters24.json +1 -0
- package/assets/components/assets/icon/addRasters32.json +1 -0
- package/assets/components/assets/icon/alertOffCircle16F.json +1 -0
- package/assets/components/assets/icon/alertOffCircle24F.json +1 -0
- package/assets/components/assets/icon/alertOffCircle32F.json +1 -0
- package/assets/components/assets/icon/boxChartSeries16.json +1 -0
- package/assets/components/assets/icon/boxChartSeries24.json +1 -0
- package/assets/components/assets/icon/boxChartSeries32.json +1 -0
- package/assets/components/assets/icon/breakRecurrence16.json +1 -0
- package/assets/components/assets/icon/breakRecurrence24.json +1 -0
- package/assets/components/assets/icon/breakRecurrence32.json +1 -0
- package/assets/components/assets/icon/bulletPoint16.json +1 -1
- package/assets/components/assets/icon/bulletPoint24.json +1 -1
- package/assets/components/assets/icon/bulletPoint32.json +1 -1
- package/assets/components/assets/icon/bulletPointLarge16.json +1 -0
- package/assets/components/assets/icon/bulletPointLarge24.json +1 -0
- package/assets/components/assets/icon/bulletPointLarge32.json +1 -0
- package/assets/components/assets/icon/chevronEnd16.json +1 -0
- package/assets/components/assets/icon/chevronEnd24.json +1 -0
- package/assets/components/assets/icon/chevronEnd32.json +1 -0
- package/assets/components/assets/icon/chevronStart16.json +1 -0
- package/assets/components/assets/icon/chevronStart24.json +1 -0
- package/assets/components/assets/icon/chevronStart32.json +1 -0
- package/assets/components/assets/icon/configureGridUnit16.json +1 -0
- package/assets/components/assets/icon/configureGridUnit24.json +1 -0
- package/assets/components/assets/icon/configureGridUnit32.json +1 -0
- package/assets/components/assets/icon/dimensionsUnit16.json +1 -0
- package/assets/components/assets/icon/dimensionsUnit24.json +1 -0
- package/assets/components/assets/icon/dimensionsUnit32.json +1 -0
- package/assets/components/assets/icon/dimensionsWall16.json +1 -0
- package/assets/components/assets/icon/dimensionsWall24.json +1 -0
- package/assets/components/assets/icon/dimensionsWall32.json +1 -0
- package/assets/components/assets/icon/flipVertical16.json +1 -0
- package/assets/components/assets/icon/flipVertical24.json +1 -0
- package/assets/components/assets/icon/flipVertical32.json +1 -0
- package/assets/components/assets/icon/imageCollectionExplorer16.json +1 -0
- package/assets/components/assets/icon/imageCollectionExplorer24.json +1 -0
- package/assets/components/assets/icon/imageCollectionExplorer32.json +1 -0
- package/assets/components/assets/icon/imageMagnifyingGlass16.json +1 -0
- package/assets/components/assets/icon/imageMagnifyingGlass24.json +1 -0
- package/assets/components/assets/icon/imageMagnifyingGlass32.json +1 -0
- package/assets/components/assets/icon/launch216.json +1 -0
- package/assets/components/assets/icon/launch224.json +1 -0
- package/assets/components/assets/icon/launch232.json +1 -0
- package/assets/components/assets/icon/mergeDetails16.json +1 -0
- package/assets/components/assets/icon/mergeDetails24.json +1 -0
- package/assets/components/assets/icon/mergeDetails32.json +1 -0
- package/assets/components/assets/icon/mergeUnits16.json +1 -0
- package/assets/components/assets/icon/mergeUnits24.json +1 -0
- package/assets/components/assets/icon/mergeUnits32.json +1 -0
- package/assets/components/assets/icon/minusCircle16F.json +1 -0
- package/assets/components/assets/icon/minusCircle24F.json +1 -0
- package/assets/components/assets/icon/minusCircle32F.json +1 -0
- package/assets/components/assets/icon/polygonSelect16.json +1 -0
- package/assets/components/assets/icon/polygonSelect24.json +1 -0
- package/assets/components/assets/icon/polygonSelect32.json +1 -0
- package/assets/components/assets/icon/projectMission16.json +1 -0
- package/assets/components/assets/icon/projectMission24.json +1 -0
- package/assets/components/assets/icon/projectMission32.json +1 -0
- package/assets/components/assets/icon/projectTemplate16.json +1 -0
- package/assets/components/assets/icon/projectTemplate24.json +1 -0
- package/assets/components/assets/icon/projectTemplate32.json +1 -0
- package/assets/components/assets/icon/properties16.json +1 -0
- package/assets/components/assets/icon/properties24.json +1 -0
- package/assets/components/assets/icon/properties32.json +1 -0
- package/assets/components/assets/icon/saveAs16.json +1 -0
- package/assets/components/assets/icon/saveAs24.json +1 -0
- package/assets/components/assets/icon/saveAs32.json +1 -0
- package/assets/components/assets/icon/splitUnits16.json +1 -0
- package/assets/components/assets/icon/splitUnits24.json +1 -0
- package/assets/components/assets/icon/splitUnits32.json +1 -0
- package/assets/components/assets/icon/storage16.json +1 -0
- package/assets/components/assets/icon/storage24.json +1 -0
- package/assets/components/assets/icon/storage32.json +1 -0
- package/assets/components/assets/panel/t9n/messages.json +3 -1
- package/assets/components/assets/panel/t9n/messages_ar.json +3 -1
- package/assets/components/assets/panel/t9n/messages_bg.json +3 -1
- package/assets/components/assets/panel/t9n/messages_bs.json +3 -1
- package/assets/components/assets/panel/t9n/messages_ca.json +3 -1
- package/assets/components/assets/panel/t9n/messages_cs.json +3 -1
- package/assets/components/assets/panel/t9n/messages_da.json +3 -1
- package/assets/components/assets/panel/t9n/messages_de.json +3 -1
- package/assets/components/assets/panel/t9n/messages_el.json +3 -1
- package/assets/components/assets/panel/t9n/messages_en.json +3 -1
- package/assets/components/assets/panel/t9n/messages_es.json +3 -1
- package/assets/components/assets/panel/t9n/messages_et.json +3 -1
- package/assets/components/assets/panel/t9n/messages_fi.json +3 -1
- package/assets/components/assets/panel/t9n/messages_fr.json +3 -1
- package/assets/components/assets/panel/t9n/messages_he.json +3 -1
- package/assets/components/assets/panel/t9n/messages_hr.json +3 -1
- package/assets/components/assets/panel/t9n/messages_hu.json +3 -1
- package/assets/components/assets/panel/t9n/messages_id.json +3 -1
- package/assets/components/assets/panel/t9n/messages_it.json +3 -1
- package/assets/components/assets/panel/t9n/messages_ja.json +3 -1
- package/assets/components/assets/panel/t9n/messages_ko.json +3 -1
- package/assets/components/assets/panel/t9n/messages_lt.json +3 -1
- package/assets/components/assets/panel/t9n/messages_lv.json +3 -1
- package/assets/components/assets/panel/t9n/messages_nl.json +3 -1
- package/assets/components/assets/panel/t9n/messages_no.json +3 -1
- package/assets/components/assets/panel/t9n/messages_pl.json +3 -1
- package/assets/components/assets/panel/t9n/messages_pt-BR.json +3 -1
- package/assets/components/assets/panel/t9n/messages_pt-PT.json +3 -1
- package/assets/components/assets/panel/t9n/messages_ro.json +3 -1
- package/assets/components/assets/panel/t9n/messages_ru.json +3 -1
- package/assets/components/assets/panel/t9n/messages_sk.json +3 -1
- package/assets/components/assets/panel/t9n/messages_sl.json +3 -1
- package/assets/components/assets/panel/t9n/messages_sr.json +3 -1
- package/assets/components/assets/panel/t9n/messages_sv.json +3 -1
- package/assets/components/assets/panel/t9n/messages_th.json +3 -1
- package/assets/components/assets/panel/t9n/messages_tr.json +3 -1
- package/assets/components/assets/panel/t9n/messages_uk.json +3 -1
- package/assets/components/assets/panel/t9n/messages_vi.json +3 -1
- package/assets/components/assets/panel/t9n/messages_zh-CN.json +3 -1
- package/assets/components/assets/panel/t9n/messages_zh-HK.json +3 -1
- package/assets/components/assets/panel/t9n/messages_zh-TW.json +3 -1
- package/assets/components/assets/table/t9n/messages_ar.json +5 -5
- package/assets/components/assets/table/t9n/messages_bg.json +5 -5
- package/assets/components/assets/table/t9n/messages_bs.json +5 -5
- package/assets/components/assets/table/t9n/messages_ca.json +5 -5
- package/assets/components/assets/table/t9n/messages_cs.json +5 -5
- package/assets/components/assets/table/t9n/messages_da.json +5 -5
- package/assets/components/assets/table/t9n/messages_de.json +5 -5
- package/assets/components/assets/table/t9n/messages_el.json +5 -5
- package/assets/components/assets/table/t9n/messages_es.json +5 -5
- package/assets/components/assets/table/t9n/messages_et.json +5 -5
- package/assets/components/assets/table/t9n/messages_fi.json +5 -5
- package/assets/components/assets/table/t9n/messages_fr.json +4 -4
- package/assets/components/assets/table/t9n/messages_he.json +5 -5
- package/assets/components/assets/table/t9n/messages_hr.json +5 -5
- package/assets/components/assets/table/t9n/messages_hu.json +5 -5
- package/assets/components/assets/table/t9n/messages_id.json +5 -5
- package/assets/components/assets/table/t9n/messages_it.json +5 -5
- package/assets/components/assets/table/t9n/messages_ja.json +5 -5
- package/assets/components/assets/table/t9n/messages_ko.json +5 -5
- package/assets/components/assets/table/t9n/messages_lt.json +5 -5
- package/assets/components/assets/table/t9n/messages_lv.json +5 -5
- package/assets/components/assets/table/t9n/messages_nl.json +5 -5
- package/assets/components/assets/table/t9n/messages_no.json +5 -5
- package/assets/components/assets/table/t9n/messages_pl.json +5 -5
- package/assets/components/assets/table/t9n/messages_pt-BR.json +5 -5
- package/assets/components/assets/table/t9n/messages_pt-PT.json +5 -5
- package/assets/components/assets/table/t9n/messages_ro.json +5 -5
- package/assets/components/assets/table/t9n/messages_ru.json +5 -5
- package/assets/components/assets/table/t9n/messages_sk.json +5 -5
- package/assets/components/assets/table/t9n/messages_sl.json +5 -5
- package/assets/components/assets/table/t9n/messages_sr.json +5 -5
- package/assets/components/assets/table/t9n/messages_sv.json +5 -5
- package/assets/components/assets/table/t9n/messages_th.json +5 -5
- package/assets/components/assets/table/t9n/messages_tr.json +5 -5
- package/assets/components/assets/table/t9n/messages_uk.json +5 -5
- package/assets/components/assets/table/t9n/messages_vi.json +5 -5
- package/assets/components/assets/table/t9n/messages_zh-CN.json +5 -5
- package/assets/components/assets/table/t9n/messages_zh-HK.json +5 -5
- package/assets/components/assets/table/t9n/messages_zh-TW.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_ar.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_bg.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_bs.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_ca.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_cs.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_da.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_de.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_el.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_es.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_et.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_fi.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_fr.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_he.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_hr.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_hu.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_id.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_it.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_ja.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_ko.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_lt.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_lv.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_nl.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_no.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_pl.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_pt-BR.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_pt-PT.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_ro.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_ru.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_sk.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_sl.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_sr.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_sv.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_th.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_tr.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_uk.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_vi.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_zh-CN.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_zh-HK.json +5 -5
- package/assets/components/assets/table-cell/t9n/messages_zh-TW.json +5 -5
- package/assets/components/assets/table-header/t9n/messages_ar.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_bg.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_bs.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_ca.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_cs.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_da.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_de.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_el.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_es.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_et.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_fi.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_fr.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_he.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_hr.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_hu.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_id.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_it.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_ja.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_ko.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_lt.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_lv.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_nl.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_no.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_pl.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_pt-BR.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_pt-PT.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_ro.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_ru.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_sk.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_sl.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_sr.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_sv.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_th.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_tr.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_uk.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_vi.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_zh-CN.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_zh-HK.json +6 -6
- package/assets/components/assets/table-header/t9n/messages_zh-TW.json +6 -6
- package/assets/components/assets/time-picker/t9n/messages_ar.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_bg.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_bs.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_ca.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_cs.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_da.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_de.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_el.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_es.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_et.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_fi.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_fr.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_he.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_hr.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_hu.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_id.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_it.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_ja.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_ko.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_lt.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_lv.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_nl.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_no.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_pl.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_pt-BR.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_pt-PT.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_ro.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_ru.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_sk.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_sl.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_sr.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_sv.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_th.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_tr.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_uk.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_vi.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_zh-CN.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_zh-HK.json +3 -0
- package/assets/components/assets/time-picker/t9n/messages_zh-TW.json +3 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{02120d192eafd7612475.js → 0036b6df93a17e57e3b9.js} +1 -1
- package/assets/esri/core/workers/chunks/09886c56427c4b3f18b5.js +1 -0
- package/assets/esri/core/workers/chunks/{24a0cf405195421c0d06.js → 1461910bd37aea28948b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d60d5f006375f7fcc88c.js → 16d45f439b89da3ec835.js} +1 -1
- package/assets/esri/core/workers/chunks/1ef3533abdd937ae2794.js +1 -0
- package/assets/esri/core/workers/chunks/31cb4c73764555b40328.js +1 -0
- package/assets/esri/core/workers/chunks/{40633064c290dc2af9ea.js → 369f2ef414498c17a05a.js} +1 -1
- package/assets/esri/core/workers/chunks/435f04e3964b1c6d4880.js +1 -0
- package/assets/esri/core/workers/chunks/4781e2011a32d7724889.js +1 -0
- package/assets/esri/core/workers/chunks/{18ab9cc85a1a7988fdfd.js → 4c3345ffbe79ee0167fb.js} +1 -1
- package/assets/esri/core/workers/chunks/4e60ac00b15b34a3b5f5.js +1 -0
- package/assets/esri/core/workers/chunks/505132c47dbdf5fdeacc.js +1 -0
- package/assets/esri/core/workers/chunks/{a5a7bbdd8298016535bc.js → 7f6840c53a456524b74c.js} +1 -1
- package/assets/esri/core/workers/chunks/{36ab90fb34b9716a9983.js → 8634d6a62f4de973e39b.js} +1 -1
- package/assets/esri/core/workers/chunks/a9a0194120ec65a00f6d.js +1 -0
- package/assets/esri/core/workers/chunks/adf6bcf2447c95aeb440.js +1 -0
- package/assets/esri/core/workers/chunks/aeb3efa91165dd3d2493.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/b3243695e0edfcbca276.js +1 -0
- package/assets/esri/core/workers/chunks/{e8c7cc974420c0b92d0e.js → b98a2191cb997d632438.js} +1 -1
- package/assets/esri/core/workers/chunks/c0061d993e1ede22b1dc.js +1 -0
- package/assets/esri/core/workers/chunks/{f2718e260f594537f7fd.js → c2be3b9aa28e454cf931.js} +1 -1
- package/assets/esri/core/workers/chunks/c4df42fe859a9115a6e4.js +1 -0
- package/assets/esri/core/workers/chunks/{52cef7cd3aaaa4f45c94.js → c607fe4df3ca054f9aa8.js} +1 -1
- package/assets/esri/core/workers/chunks/{e93442c6d92229f3a4b0.js → ca023e409bb7de9a69ab.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f3680fee85a05839489.js → e52b9e423c0ba4134309.js} +1 -1
- package/assets/esri/core/workers/chunks/{c92e75b79aff7b505b31.js → e53df0f018a82e3a35bd.js} +1 -1
- package/assets/esri/core/workers/chunks/ea953f5a0a975f7bd7b9.js +1 -0
- package/assets/esri/core/workers/chunks/f183a4b52095e4c498b4.js +1 -0
- package/assets/esri/core/workers/chunks/{8e4c4ba900a90373217f.js → f221b9c6ae6c7eb4ca01.js} +1 -1
- package/assets/esri/core/workers/chunks/{0beebbb0c6dad0e742d7.js → f72a5af2a7ca1536f10a.js} +1 -1
- package/assets/esri/core/workers/chunks/{adfbc168be8c49b51e1b.js → f99deed4120f605b6cd6.js} +1 -1
- package/assets/esri/t9n/common.json +1 -1
- package/assets/esri/t9n/common_ar.json +1 -1
- package/assets/esri/t9n/common_bg.json +1 -1
- package/assets/esri/t9n/common_bs.json +1 -1
- package/assets/esri/t9n/common_ca.json +1 -1
- package/assets/esri/t9n/common_cs.json +1 -1
- package/assets/esri/t9n/common_da.json +1 -1
- package/assets/esri/t9n/common_de.json +1 -1
- package/assets/esri/t9n/common_el.json +1 -1
- package/assets/esri/t9n/common_en.json +1 -1
- package/assets/esri/t9n/common_es.json +1 -1
- package/assets/esri/t9n/common_et.json +1 -1
- package/assets/esri/t9n/common_fi.json +1 -1
- package/assets/esri/t9n/common_fr.json +1 -1
- package/assets/esri/t9n/common_he.json +1 -1
- package/assets/esri/t9n/common_hr.json +1 -1
- package/assets/esri/t9n/common_hu.json +1 -1
- package/assets/esri/t9n/common_id.json +1 -1
- package/assets/esri/t9n/common_it.json +1 -1
- package/assets/esri/t9n/common_ja.json +1 -1
- package/assets/esri/t9n/common_ko.json +1 -1
- package/assets/esri/t9n/common_lt.json +1 -1
- package/assets/esri/t9n/common_lv.json +1 -1
- package/assets/esri/t9n/common_nb.json +1 -1
- package/assets/esri/t9n/common_nl.json +1 -1
- package/assets/esri/t9n/common_pl.json +1 -1
- package/assets/esri/t9n/common_pt-BR.json +1 -1
- package/assets/esri/t9n/common_pt-PT.json +1 -1
- package/assets/esri/t9n/common_ro.json +1 -1
- package/assets/esri/t9n/common_ru.json +1 -1
- package/assets/esri/t9n/common_sk.json +1 -1
- package/assets/esri/t9n/common_sl.json +1 -1
- package/assets/esri/t9n/common_sr.json +1 -1
- package/assets/esri/t9n/common_sv.json +1 -1
- package/assets/esri/t9n/common_th.json +1 -1
- package/assets/esri/t9n/common_tr.json +1 -1
- package/assets/esri/t9n/common_uk.json +1 -1
- package/assets/esri/t9n/common_vi.json +1 -1
- package/assets/esri/t9n/common_zh-CN.json +1 -1
- package/assets/esri/t9n/common_zh-HK.json +1 -1
- package/assets/esri/t9n/common_zh-TW.json +1 -1
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +10 -14
- 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/chunks/ComponentShader.glsl.js +27 -27
- package/core/sql/WhereClauseCache.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/interfaces.d.ts +3 -19
- package/kernel.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/FeatureStore.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/data/geometryUtils.js +5 -0
- package/layers/graphics/data/queryUtils.js +5 -0
- package/layers/graphics/data/queryValidationUtils.js +5 -0
- package/layers/graphics/data/spatialQuerySupport.js +1 -1
- package/layers/support/fieldProperties.js +1 -1
- package/layers/support/rasterFormats/Lerc.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/views/2d/engine/BitmapContainer.js +1 -1
- package/views/2d/engine/BitmapTile.js +1 -1
- package/views/2d/engine/Container.js +1 -1
- package/views/2d/engine/DisplayObject.js +1 -1
- package/views/2d/engine/FeatureContainer.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
- package/views/2d/engine/webgl/OverlayContainer.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/TileContainer.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/layers/GroupLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/support/FeatureFilter.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +54 -33
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +1 -2
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/webdoc/webdocLoadUtils.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/InputBase.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +0 -1
- package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +0 -1
- package/assets/esri/core/workers/chunks/1a36703ebe934749646e.js +0 -1
- package/assets/esri/core/workers/chunks/3e40c8402ff7a8fe48b9.js +0 -1
- package/assets/esri/core/workers/chunks/3ea0b872436fce84b927.js +0 -1
- package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +0 -1
- package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +0 -1
- package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +0 -1
- package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +0 -1
- package/assets/esri/core/workers/chunks/b4f31d291c05b5f8ddac.js +0 -1
- package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +0 -1
- package/assets/esri/core/workers/chunks/dca925a0d73f967f6897.js +0 -1
- package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +0 -1
- package/assets/esri/core/workers/chunks/eda86faa708cfe4c9f9a.js +0 -1
- package/layers/graphics/data/utils.js +0 -5
- package/views/2d/engine/webgl/GroupContainer.js +0 -5
- package/views/3d/analysis/DimensionAnalysisView3D.d.ts +0 -4
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{OverlayContent as a}from"../views/3d/terrain/OverlayContent.js";import{IntegratedMeshMode as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js";import{ComponentData as l,ComponentDataType as t}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardByOpacity as d}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js";import{ForwardLinearDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as s}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as c}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{NormalType as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as h}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as p}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as C}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadLinearDepth as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import{ComputeMaterialColor as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{ComputeShadingNormal as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js";import{EvaluateSceneLighting as x,addLightingGlobalFactor as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as O,PhysicallyBasedRenderingParameters as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayIM as W,getIMColorTexture as A}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{symbolAlphaCutoff as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaDraw as B}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{EllipsoidMode as R}from"../views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{glsl as D}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as $}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{TransparencyPassType as E}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";function
|
|
6
|
-
const float invEllipsoidRadius = ${D.float(1/(
|
|
5
|
+
import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";import{OverlayContent as a}from"../views/3d/terrain/OverlayContent.js";import{IntegratedMeshMode as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js";import{ComponentData as l,ComponentDataType as t}from"../views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js";import{VertexDiscardByOpacity as d}from"../views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js";import{ForwardLinearDepth as n}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as s}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as c}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{NormalType as m}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as v}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as u}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as h}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as p}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as C}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{ReadLinearDepth as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import{ComputeMaterialColor as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{ComputeShadingNormal as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js";import{EvaluateSceneLighting as x,addLightingGlobalFactor as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as M}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{PBRMode as O,PhysicallyBasedRenderingParameters as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadBaseColorTexture as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as N}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayIM as W,getIMColorTexture as A}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{symbolAlphaCutoff as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{DiscardOrAdjustAlphaDraw as B}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaDiscard.glsl.js";import{EllipsoidMode as R}from"../views/3d/webgl-engine/core/shaderLibrary/util/EllipsoidMode.js";import{glsl as D}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as $}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{Texture2DPassUniform as z}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{TransparencyPassType as E}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";function I(I){const V=new $;V.include(h,I),V.include(u,I),V.include(g,I),V.include(v,I),V.include(n,I),V.include(l,I),V.include(B,I),V.include(c,I),V.include(T,I),V.include(d,I);const{vertex:_,fragment:G}=V;I.pbrMode!==O.Normal&&I.pbrMode!==O.Schematic||(V.include(S,I),I.hasNormalTexture&&V.include(f,I));const F=I.output===s.Shadow||I.output===s.ShadowHighlight||I.output===s.ShadowExcludeHighlight;F&&I.componentData===t.Varying?_.code.add(D`#define discardShadows(castShadows) { if(!castShadows) { gl_Position = vec4(1e38, 1e38, 1e38, 1.0); return; } }`):_.code.add(D`#define discardShadows(castShadows) {}`);const H=I.integratedMeshMode===i.ColorOverlay||I.integratedMeshMode===i.ColorOverlayWithWater,k=H&&I.output===s.Color&&I.pbrMode===O.WaterOnIntegratedMesh;return H&&(V.include(x,I),V.include(W,I),I.spherical?_.code.add(D`
|
|
6
|
+
const float invEllipsoidRadius = ${D.float(1/(I.ellipsoidMode===R.Earth?e.radius:I.ellipsoidMode===R.Mars?o.radius:r.radius))};
|
|
7
7
|
vec2 projectOverlay(vec3 pos) {
|
|
8
8
|
return pos.xy / (1.0 + invEllipsoidRadius * pos.z);
|
|
9
9
|
}
|
|
10
|
-
`):
|
|
10
|
+
`):_.code.add(D`vec2 projectOverlay(vec3 pos) { return pos.xy; }`)),k&&(V.varyings.add("tbnTangent","vec3"),V.varyings.add("tbnBiTangent","vec3"),V.varyings.add("groundNormal","vec3")),_.code.add(D`
|
|
11
11
|
void main() {
|
|
12
12
|
bool castShadows;
|
|
13
13
|
vec4 externalColor = forwardExternalColor(castShadows);
|
|
@@ -15,7 +15,7 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
15
15
|
|
|
16
16
|
vertexDiscardByOpacity(externalColor.a);
|
|
17
17
|
|
|
18
|
-
${
|
|
18
|
+
${I.output===s.ObjectAndLayerIdColor?D`externalColor.a = 1.0;`:""}
|
|
19
19
|
|
|
20
20
|
if (externalColor.a < ${D.float(P)}) {
|
|
21
21
|
// Discard this vertex
|
|
@@ -28,8 +28,8 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
28
28
|
forwardTextureCoordinates();
|
|
29
29
|
forwardVertexColor();
|
|
30
30
|
forwardLinearDepth();
|
|
31
|
-
${
|
|
32
|
-
${k?
|
|
31
|
+
${I.output===s.ObjectAndLayerIdColor?D`forwardObjectAndLayerIdColor();`:""}
|
|
32
|
+
${k?I.spherical?D`
|
|
33
33
|
groundNormal = normalize(positionWorld());
|
|
34
34
|
tbnTangent = normalize(cross(vec3(0.0, 0.0, 1.0), groundNormal));
|
|
35
35
|
tbnBiTangent = normalize(cross(groundNormal, tbnTangent));`:D`
|
|
@@ -38,10 +38,10 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
38
38
|
tbnBiTangent = vec3(0.0, 1.0, 0.0);`:""}
|
|
39
39
|
${H?D`setOverlayVTC(projectOverlay(position));`:""}
|
|
40
40
|
}
|
|
41
|
-
`),
|
|
41
|
+
`),I.output===s.Alpha&&(G.include(w),V.include(M,I),V.include(b,I),H&&G.uniforms.add(new z("ovColorTex",((e,o)=>A(e,o)))),G.code.add(D`
|
|
42
42
|
void main() {
|
|
43
43
|
discardBySlice(vPositionWorldCameraRelative);
|
|
44
|
-
${
|
|
44
|
+
${I.multipassEnabled?D`terrainDepthTest(vPosition_view.z);`:""}
|
|
45
45
|
|
|
46
46
|
vec4 textureColor = readBaseColorTexture();
|
|
47
47
|
discardOrAdjustAlpha(textureColor);
|
|
@@ -61,12 +61,12 @@ import{earth as e,mars as o,moon as r}from"../geometry/support/Ellipsoid.js";imp
|
|
|
61
61
|
|
|
62
62
|
fragColor = vec4(materialColor.a);
|
|
63
63
|
}
|
|
64
|
-
`)),
|
|
64
|
+
`)),I.output===s.Color&&(G.include(w),V.include(M,I),V.include(b,I),V.include(y,I),V.include(x,I),I.receiveShadows?(V.include(N,I),G.code.add(D`float evaluateShadow() {
|
|
65
65
|
return readShadowMap(vPositionWorldCameraRelative, linearDepth);
|
|
66
66
|
}`)):G.code.add(D`float evaluateShadow() { return 0.0; }`),H&&G.uniforms.add(new z("ovColorTex",((e,o)=>A(e,o)))),G.code.add(D`
|
|
67
67
|
void main() {
|
|
68
68
|
discardBySlice(vPositionWorldCameraRelative);
|
|
69
|
-
${
|
|
69
|
+
${I.multipassEnabled?D`terrainDepthTest(vPosition_view.z);`:""}
|
|
70
70
|
|
|
71
71
|
vec4 textureColor = readBaseColorTexture();
|
|
72
72
|
discardOrAdjustAlpha(textureColor);
|
|
@@ -81,21 +81,21 @@ return readShadowMap(vPositionWorldCameraRelative, linearDepth);
|
|
|
81
81
|
externalColorMixMode
|
|
82
82
|
);
|
|
83
83
|
${H?D`vec4 overlayColor = getOverlayColor(ovColorTex, vtcOverlay);`:""}
|
|
84
|
-
`),
|
|
85
|
-
${
|
|
84
|
+
`),I.pbrMode===O.Normal||I.pbrMode===O.Schematic?(j(G),G.code.add(D`
|
|
85
|
+
${I.pbrMode===O.Normal?D`
|
|
86
86
|
applyPBRFactors();
|
|
87
87
|
if (int(externalColorMixMode) == 3) {
|
|
88
88
|
mrr = vec3(0.0, 0.6, 0.2);
|
|
89
89
|
}`:""}
|
|
90
90
|
vec3 normalVertex = shadingNormalWorld();
|
|
91
91
|
float additionalIrradiance = 0.02 * mainLightIntensity[2];
|
|
92
|
-
`),
|
|
93
|
-
vec3 shadingNormal = computeTextureNormal(tangentSpace, vuv0);`):G.code.add(D`vec3 shadingNormal = normalVertex;`),G.code.add(D`${
|
|
92
|
+
`),I.hasNormalTexture?G.code.add(D`mat3 tangentSpace = computeTangentSpace(normalVertex, vPositionWorldCameraRelative, vuv0);
|
|
93
|
+
vec3 shadingNormal = computeTextureNormal(tangentSpace, vuv0);`):G.code.add(D`vec3 shadingNormal = normalVertex;`),G.code.add(D`${I.spherical?D`vec3 normalGround = normalize(positionWorld());`:D`vec3 normalGround = vec3(0.0, 0.0, 1.0);`}
|
|
94
94
|
`),G.code.add(D`
|
|
95
95
|
vec3 viewDir = normalize(vPositionWorldCameraRelative);
|
|
96
|
-
float ssao = 1.0 - occlusion * (
|
|
96
|
+
float ssao = 1.0 - occlusion * evaluateAmbientOcclusionInverse();
|
|
97
97
|
|
|
98
|
-
${
|
|
98
|
+
${I.snowCover?D`
|
|
99
99
|
vec3 surfaceNormal = normalize(shadingNormalWorld());
|
|
100
100
|
float snow = smoothstep(0.5, 0.55, dot(surfaceNormal, normalize(positionWorld())));
|
|
101
101
|
materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);
|
|
@@ -109,8 +109,8 @@ vec3 shadingNormal = computeTextureNormal(tangentSpace, vuv0);`):G.code.add(D`ve
|
|
|
109
109
|
|
|
110
110
|
vec3 additionalLight = evaluateAdditionalLighting(ssao, positionWorld());
|
|
111
111
|
vec4 shadedColor = vec4(evaluateSceneLightingPBR(shadingNormal, materialColor.rgb, evaluateShadow(), ssao, additionalLight, viewDir, normalGround, mrr, emission, additionalIrradiance), materialColor.a);
|
|
112
|
-
`)):(
|
|
113
|
-
float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);`)):G.code.add(D`float shadow = 0.0;`),k&&G.uniforms.add(new z("ovNormalTex",((e,o)=>o.overlay?.getTexture(a.WaterNormal)))),
|
|
112
|
+
`)):(I.receiveShadows?G.code.add(D`float shadow = evaluateShadow();`):I.spherical?(L(G),G.code.add(D`float additionalAmbientScale = additionalDirectedAmbientLight(positionWorld());
|
|
113
|
+
float shadow = lightingGlobalFactor * (1.0 - additionalAmbientScale);`)):G.code.add(D`float shadow = 0.0;`),k&&G.uniforms.add(new z("ovNormalTex",((e,o)=>o.overlay?.getTexture(a.WaterNormal)))),I.snowCover&&G.code.add(D`vec3 surfaceNormal = normalize(cross(dFdx(vPositionWorldCameraRelative), dFdy(vPositionWorldCameraRelative)));
|
|
114
114
|
float snow = smoothstep(0.5, 0.55, dot(surfaceNormal, normalize(positionWorld())));
|
|
115
115
|
materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);`),G.code.add(D`
|
|
116
116
|
float ambientOcclusion = evaluateAmbientOcclusion();
|
|
@@ -131,26 +131,26 @@ materialColor.rgb = mix(materialColor.rgb, vec3(1), snow);`),G.code.add(D`
|
|
|
131
131
|
}`:""}
|
|
132
132
|
`)),G.code.add(D`
|
|
133
133
|
fragColor = highlightSlice(shadedColor, vPositionWorldCameraRelative);
|
|
134
|
-
${
|
|
134
|
+
${I.transparencyPassType===E.Color?"fragColor = premultiplyAlpha(fragColor);":""}
|
|
135
135
|
}
|
|
136
|
-
`)),(
|
|
136
|
+
`)),(I.output===s.Depth||F)&&(V.include(p,I),G.code.add(D`void main() {
|
|
137
137
|
discardBySlice(vPositionWorldCameraRelative);
|
|
138
138
|
vec4 textureColor = readBaseColorTexture();
|
|
139
139
|
discardOrAdjustAlpha(textureColor);
|
|
140
140
|
outputDepth(linearDepth);
|
|
141
|
-
}`)),
|
|
141
|
+
}`)),I.output===s.Normal&&(V.include(y,I),G.code.add(D`
|
|
142
142
|
void main() {
|
|
143
143
|
discardBySlice(vPositionWorldCameraRelative);
|
|
144
144
|
|
|
145
145
|
vec4 textureColor = readBaseColorTexture();
|
|
146
146
|
discardOrAdjustAlpha(textureColor);
|
|
147
147
|
|
|
148
|
-
// note: the alpha component needs to be 1.0 in order for this material
|
|
149
|
-
//
|
|
150
|
-
float alpha = ${
|
|
148
|
+
// note: the alpha component needs to be 1.0 in order for this material to influence ambient occlusion,
|
|
149
|
+
// see the ssao fragment shader
|
|
150
|
+
float alpha = ${I.normalType===m.Ground?"0.0":"1.0"};
|
|
151
151
|
fragColor = vec4(vec3(.5) + .5 * shadingNormal_view(), alpha);
|
|
152
152
|
}
|
|
153
|
-
`)),
|
|
153
|
+
`)),I.output===s.ObjectAndLayerIdColor&&V.fragment.code.add(D`
|
|
154
154
|
void main() {
|
|
155
155
|
discardBySlice(vPositionWorldCameraRelative);
|
|
156
156
|
|
|
@@ -159,7 +159,7 @@ outputDepth(linearDepth);
|
|
|
159
159
|
|
|
160
160
|
${H?D`fragColor = getOverlayColorTexel(vtcOverlay);`:"outputObjectAndLayerIdColor();"}
|
|
161
161
|
}
|
|
162
|
-
`),
|
|
162
|
+
`),I.output===s.Highlight&&(V.include(C),G.code.add(D`
|
|
163
163
|
void main() {
|
|
164
164
|
discardBySlice(vPositionWorldCameraRelative);
|
|
165
165
|
|
|
@@ -175,4 +175,4 @@ outputDepth(linearDepth);
|
|
|
175
175
|
|
|
176
176
|
outputHighlight();
|
|
177
177
|
}
|
|
178
|
-
`)),
|
|
178
|
+
`)),V}const V=Object.freeze(Object.defineProperty({__proto__:null,build:I},Symbol.toStringTag,{value:"Module"}));export{V as C,I as b};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{LRUCache as t}from"../LRUCache.js";import{WhereClause as e}from"./WhereClause.js";class
|
|
5
|
+
import{LRUCache as t}from"../LRUCache.js";import{WhereClause as e}from"./WhereClause.js";class r{constructor(e,r){this._cache=new t(e),this._invalidCache=new t(r)}get(t,r){const i=`${r.uid}:${t}`,c=this._cache.get(i);if(c)return c;if(null!=this._invalidCache.get(i))return null;try{const c=e.create(t,r);return this._cache.put(i,c),c}catch(n){return this._invalidCache.put(i,n),null}}getError(t,e){const r=`${e.uid}:${t}`;return this._invalidCache.get(r)??null}}export{r as WhereClauseCache};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../assets.js";import"../../../request.js";import e from"../../../core/Error.js";import"../../../core/has.js";import{whenOrAbort as t,throwIfAborted as s,allSettledValues as r,isAborted as o,createAbortError as n}from"../../../core/promiseUtils.js";import{removeFile as i,makeRelative as a}from"../../../core/urlUtils.js";import l from"../../Point.js";import"../../../views/3d/webgl-engine/lib/basicInterfaces.js";async function c(e,r,o){const{source:n}=r,{loadGLTFMesh:i}=await t(import("./loadGLTFMesh.js"),o),a=await m(n,o);s(o);const c=i(new l({x:0,y:0,z:0,spatialReference:e.spatialReference}),a.url,{resolveFile:u(a),requestFile:void 0,useTransform:!0,signal:o?.signal});c.then((()=>a.dispose()),(()=>a.dispose()));const{vertexAttributes:f,components:p}=await c;e.vertexAttributes=f,e.components=p}function u(e){const t=i(e.url);return s=>{const r=a(s,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??s}}async function m(t,s){if(Array.isArray(t)){if(!t.length)throw new e("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?h(t):w(t,s)}return p(t)}async function f(e,t){const{parts:r}=e;if(1===r.length)return new
|
|
5
|
+
import"../../../assets.js";import"../../../request.js";import e from"../../../core/Error.js";import"../../../core/has.js";import{whenOrAbort as t,throwIfAborted as s,allSettledValues as r,isAborted as o,createAbortError as n}from"../../../core/promiseUtils.js";import{removeFile as i,makeRelative as a}from"../../../core/urlUtils.js";import l from"../../Point.js";import"../../../views/3d/webgl-engine/lib/basicInterfaces.js";async function c(e,r,o){const{source:n}=r,{loadGLTFMesh:i}=await t(import("./loadGLTFMesh.js"),o),a=await m(n,o);s(o);const c=i(new l({x:0,y:0,z:0,spatialReference:e.spatialReference}),a.url,{resolveFile:u(a),requestFile:void 0,useTransform:!0,signal:o?.signal,expectedType:a.type});c.then((()=>a.dispose()),(()=>a.dispose()));const{vertexAttributes:f,components:p}=await c;e.vertexAttributes=f,e.components=p}function u(e){const t=i(e.url);return s=>{const r=a(s,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??s}}async function m(t,s){if(Array.isArray(t)){if(!t.length)throw new e("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?h(t):w(t,s)}return p(t)}async function f(e,t){const{parts:r,assetMimeType:o,assetName:n}=e;if(1===r.length)return new T(r[0].partUrl);const i=await e.toBlob(t);return s(t),T.fromBlob(i,v(n,o))}function p(e){return T.fromBlob(e,v(e.name,e.type))}function h(e){return j(e.map((e=>({name:e.name,mimeType:e.type,source:p(e)}))))}async function w(e,t){const i=await r(e.map((async e=>{const r=await f(e);return s(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if(o(t))throw i.forEach((e=>e.source.dispose())),n();return j(i)}const y=/^model\/gltf\+json$/,d=/^model\/gltf-binary$/,g=/\.gltf$/i,b=/\.glb$/i;function j(t){const s=new Map;let r,o=null;for(const{name:e,mimeType:n,source:i}of t)null===o&&(y.test(n)||g.test(e)?(o=i.url,r="gltf"):(d.test(n)||b.test(e))&&(o=i.url,r="glb")),s.set(e,i.url),i.files.forEach(((e,t)=>s.set(t,e)));if(null==o)throw new e("mesh-load-external:missing-files","Missing files to load external mesh source");return new T(o,(()=>t.forEach((({source:e})=>e.dispose()))),s,r)}class T{constructor(e,t=(()=>{}),s=new Map,r){this.url=e,this.dispose=t,this.files=s,this.type=r}static fromBlob(e,t){const s=URL.createObjectURL(e);return new T(s,(()=>URL.revokeObjectURL(s)),void 0,t)}}function v(e,t){return y.test(t)||g.test(e)?"gltf":d.test(t)||g.test(e)?"glb":void 0}export{c as loadExternal};
|
package/interfaces.d.ts
CHANGED
|
@@ -1393,7 +1393,7 @@ declare namespace __esri {
|
|
|
1393
1393
|
*/
|
|
1394
1394
|
loadAll(): Promise<Basemap>;
|
|
1395
1395
|
/**
|
|
1396
|
-
* Creates a new basemap instance from a [
|
|
1396
|
+
* Creates a new basemap instance from a [basemap id](esri-Map.html#basemap-id).
|
|
1397
1397
|
*
|
|
1398
1398
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#fromId)
|
|
1399
1399
|
*/
|
|
@@ -23220,7 +23220,7 @@ declare namespace __esri {
|
|
|
23220
23220
|
*/
|
|
23221
23221
|
get(fieldName: string): Field;
|
|
23222
23222
|
/**
|
|
23223
|
-
* Returns
|
|
23223
|
+
* Returns a [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a field.
|
|
23224
23224
|
*
|
|
23225
23225
|
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-FieldsIndex.html#getTimeZone)
|
|
23226
23226
|
*/
|
|
@@ -78045,22 +78045,6 @@ declare namespace __esri {
|
|
|
78045
78045
|
pathLength: Length;
|
|
78046
78046
|
}
|
|
78047
78047
|
|
|
78048
|
-
export class DimensionAnalysisView3D {
|
|
78049
|
-
/**
|
|
78050
|
-
* The analysis view type.
|
|
78051
|
-
*
|
|
78052
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-DimensionAnalysisView3D.html#type)
|
|
78053
|
-
*/
|
|
78054
|
-
readonly type: "dimension-view-3d";
|
|
78055
|
-
constructor(properties?: any);
|
|
78056
|
-
/**
|
|
78057
|
-
* Starts the interactive creation of new dimensions.
|
|
78058
|
-
*
|
|
78059
|
-
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-DimensionAnalysisView3D.html#createLengthDimensions)
|
|
78060
|
-
*/
|
|
78061
|
-
createLengthDimensions(): void;
|
|
78062
|
-
}
|
|
78063
|
-
|
|
78064
78048
|
export class DirectLineMeasurementAnalysisView3D {
|
|
78065
78049
|
/**
|
|
78066
78050
|
* The direct line measurement analysis object associated with the analysis view.
|
|
@@ -82349,7 +82333,7 @@ declare namespace __esri {
|
|
|
82349
82333
|
| LineOfSightAnalysis
|
|
82350
82334
|
| SliceAnalysis): Promise<
|
|
82351
82335
|
| AreaMeasurementAnalysisView3D
|
|
82352
|
-
|
|
|
82336
|
+
| DimensionAnalysisView
|
|
82353
82337
|
| DirectLineMeasurementAnalysisView3D
|
|
82354
82338
|
| LineOfSightAnalysisView3D
|
|
82355
82339
|
| SliceAnalysisView3D
|
package/kernel.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.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as r}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.28";let t,i=e;i="4.28.0-rc.
|
|
5
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";import{buildDate as s,commitHash as r}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.28";let t,i=e;i="4.28.0-rc.1";function n(o){t=o}function m(s){const r=t?.findCredential(s);return r?.token?o(s,"token",r.token):s}has("host-webworker");export{m as addTokenParameter,s as buildDate,i as fullVersion,t as id,r as revision,n as setId,e as version};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getExpressionFromFieldName as t,getWhereClause as e,getAliasFromFieldName as i}from"./attributeSupport.js";import{getGeometry as s}from"./
|
|
5
|
+
import{getExpressionFromFieldName as t,getWhereClause as e,getAliasFromFieldName as i}from"./attributeSupport.js";import{getGeometry as s}from"./geometryUtils.js";import{processNullValue as a,getNormalizedValue as l}from"../../../statistics/utils.js";import{loadArcade as r}from"../../../support/arcadeOnDemand.js";class n{constructor(s,a,l){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=s.returnDistinctValues??!1,this.fieldsIndex=l,this.featureAdapter=a;const r=s.outFields;if(r&&!r.includes("*")){this.outFields=r;let s=0;for(const a of r){const r=t(a),n=this.fieldsIndex.get(r),u=n?null:e(r,l),d=n?n.name:i(a)||"FIELD_EXP_"+s++;this._fieldDataCache.set(a,{alias:d,clause:u})}}}countDistinctValues(t){return this.returnDistinctValues?(t.forEach((t=>this.getAttributes(t))),this._returnDistinctMap.size):t.length}getAttributes(t){const e=this._processAttributesForOutFields(t);return this._processAttributesForDistinctValues(e)}getFieldValue(t,i,s){const a=s?s.name:i;let l=null;return this._fieldDataCache.has(a)?l=this._fieldDataCache.get(a)?.clause:s||(l=e(i,this.fieldsIndex),this._fieldDataCache.set(a,{alias:a,clause:l})),s?this.featureAdapter.getAttribute(t,a):l?.calculateValue(t,this.featureAdapter)}getDataValues(t,e){const i=e.normalizationType,s=e.normalizationTotal,r=this.fieldsIndex.isDateField(e.field);return t.map((t=>{let n=e.field&&this.getFieldValue(t,e.field,this.fieldsIndex.get(e.field));if(e.field2?(n=`${a(n)}${e.fieldDelimiter}${a(this.getFieldValue(t,e.field2,this.fieldsIndex.get(e.field2)))}`,e.field3&&(n=`${n}${e.fieldDelimiter}${a(this.getFieldValue(t,e.field3,this.fieldsIndex.get(e.field3)))}`)):r&&"string"==typeof n&&(n=n?new Date(n).getTime():null),i&&Number.isFinite(n)){const a="field"===i&&e.normalizationField?this.getFieldValue(t,e.normalizationField,this.fieldsIndex.get(e.normalizationField)):null;n=l(n,i,a,s)}return n}))}async getExpressionValues(t,e,i,a,l){const{arcadeUtils:n}=await r(),u=n.hasGeometryOperations(e);u&&await n.enableGeometryOperations();const d=n.createFunction(e),o=n.getViewInfo(i),c={fields:this.fieldsIndex.fields};return t.map((t=>{const e={attributes:this.featureAdapter.getAttributes(t),layer:c,geometry:u?{...s(a.geometryType,a.hasZ,a.hasM,this.featureAdapter.getGeometry(t)),spatialReference:i?.spatialReference}:null},r=n.createExecContext(e,o,l);return n.executeFunction(d,r)}))}validateItem(t,i){return this._fieldDataCache.has(i)||this._fieldDataCache.set(i,{alias:i,clause:e(i,this.fieldsIndex)}),this._fieldDataCache.get(i)?.clause?.testFeature(t,this.featureAdapter)??!1}validateItems(t,i){return this._fieldDataCache.has(i)||this._fieldDataCache.set(i,{alias:i,clause:e(i,this.fieldsIndex)}),this._fieldDataCache.get(i)?.clause?.testSet(t,this.featureAdapter)??!1}_processAttributesForOutFields(t){const e=this.outFields;if(!e?.length)return this.featureAdapter.getAttributes(t);const i={};for(const s of e){const{alias:e,clause:a}=this._fieldDataCache.get(s);i[e]=a?a.calculateValue(t,this.featureAdapter):this.featureAdapter.getAttribute(t,e)}return i}_processAttributesForDistinctValues(t){if(null==t||!this.returnDistinctValues)return t;const e=this.outFields,i=[];if(e)for(const l of e){const{alias:e}=this._fieldDataCache.get(l);i.push(t[e])}else for(const l in t)i.push(t[l]);const s=`${(e||["*"]).join(",")}=${i.join(",")}`;let a=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++a),a>1?null:t}}export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import r from"../../../core/Evented.js";import s from"../../../core/Logger.js";import{create as o,fromRect as i}from"../../../geometry/support/aaBoundingBox.js";import{create as n}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as a}from"../featureConversionUtils.js";import{BoundsStore as d}from"./BoundsStore.js";import{
|
|
5
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import r from"../../../core/Evented.js";import s from"../../../core/Logger.js";import{create as o,fromRect as i}from"../../../geometry/support/aaBoundingBox.js";import{create as n}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsOptimizedGeometry as a}from"../featureConversionUtils.js";import{BoundsStore as d}from"./BoundsStore.js";import{cleanFromGeometryEngine as u}from"./geometryUtils.js";import{optimizedFeatureQueryEngineAdapter as h}from"./optimizedFeatureQueryEngineAdapter.js";const f=o();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new d,this._featuresById=new Map,this._markedIds=new Set,this.events=new r,this.featureAdapter=h}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,s,o]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:o,spatialReference:u(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(t){const r=t.map((e=>this._upsert(e)));return this._emitChanged(),r.filter(e)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t(i(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const r=e.objectId;if(null==r)return void s.getLogger("esri.layers.graphics.data.FeatureStore").error(new t("featurestore:invalid-feature","feature id is missing",{feature:e}));const o=this._featuresById.get(r);let i;if(this._markedIds.add(r),o?(e.displayId=o.displayId,i=this._boundsStore.get(r),this._boundsStore.delete(r)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(r,null),void this._featuresById.set(r,e);i=a(null!=i?i:n(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(r,i),this._featuresById.set(r,e)}_upsert(e){const r=e?.objectId;if(null==r)return s.getLogger("esri.layers.graphics.data.FeatureStore").error(new t("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const o=this._featuresById.get(r);if(!o)return this._add(e),e;this._markedIds.add(r);const{geometry:i,attributes:d}=e;for(const t in d)o.attributes[t]=d[t];return i&&(o.geometry=i,this._boundsStore.set(r,a(n(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),o}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}export{m 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.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{PositionHint as e,indexOf as t}from"../../../core/arrayUtils.js";import i from"../../../core/Error.js";import{isSerializable as s}from"../../../core/JSONSupport.js";import{clone as r}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{MemCacheStorage as o,MemCache as u}from"../../../core/MemCache.js";import{throwIfAborted as l}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as c}from"../../../core/unitUtils.js";import{getTransformation as h}from"../../../geometry/projection.js";import{set as m,negativeInfinity as p,create as f,expandWithAABB as y}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as d,create as g}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as x}from"../../../geometry/support/boundsUtils.js";import{fromJSON as _,isExtent as w,isPolygon as S}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as F}from"../../../geometry/support/normalizeUtils.js";import{equals as R,isValid as Q}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as E,validateFields as j,validateFieldTypes as A,validateWhere as b,validateHaving as P,validNumericTypesKebabDict as q,validDateTypesKebabDict as T,hasInvalidFieldType as C}from"./attributeSupport.js";import{checkProjectionSupport as B,project as k,projectMany as v}from"./projectionSupport.js";import{queryCapabilities as M}from"./QueryEngineCapabilities.js";import{QueryEngineResult as z}from"./QueryEngineResult.js";import{getSpatialQueryOperator as O,canQueryWithRBush as G,checkSpatialQuerySupport as N}from"./spatialQuerySupport.js";import{getTimeExtent as U,getTimeOperator as Z}from"./timeSupport.js";import{queryEngineEmptyResult as V,normalizeQueryLike as H,cleanFromGeometryEngine as J,normalizeQuery as L,getGeometry as D}from"./utils.js";import $ from"../../support/FieldsIndex.js";import{loadArcade as W}from"../../../support/arcadeOnDemand.js";import{noBudget as K}from"../../../views/support/Scheduler.js";function X(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}const Y="feature-store:unsupported-query";class ee{constructor(e,t=null,i,s,r){this.attributes=e,this.geometry=i,this.centroid=s,this.filterFlags=r,this.groupId=-1,this.displayId=t}}const te=new o(2e6);let ie=0;class se{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:M},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u(ie+++"$$",te)),this.fieldsIndex=s(e.fieldsIndex)?e.fieldsIndex:$.fromJSON(e.fieldsIndex),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=a(this._frameTask),this.clearCache(),n(this._geometryQueryCache),this._changeHandle=a(this._changeHandle)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(i){if(i!==V)throw i;return new z([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(i){if(i!==V)throw i;return 0}}async executeQueryForExtent(e,t){const i=e.outSR;try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=s.size;if(!r)return{count:0,extent:null};return{count:r,extent:await this._getBounds(s.items,s.spatialReference,i||this.spatialReference)}}catch(s){if(s===V)return{count:0,extent:null};throw s}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),s=i.items,r=new Set;return await this._reschedule((()=>{for(const e of s)r.add(i.featureAdapter.getObjectId(e))}),t),r}catch(i){if(i===V)return new Set;throw i}}async executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let o=r(e.query);o=await this._schedule((()=>H(o,this.definitionExpression,this.spatialReference)),t),o=await this._reschedule((()=>this._checkQuerySupport(o)),t);const u=!R(i.spatialReference,this.spatialReference);u&&await B(i.spatialReference,this.spatialReference);const l="number"==typeof s?s:s.x,c="number"==typeof s?s:s.y,h={xmin:i.x-l,xmax:i.x+l,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},m=u?k(h,this.spatialReference):h;if(!m)return{candidates:[]};const p=(await F(_(i),null,{signal:t}))[0],f=(await F(_(m),null,{signal:t}))[0];if(null==p||null==f)return{candidates:[]};const y=new z(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(f.toJSON()))),t),o,this);await this._reschedule((()=>this._executeObjectIdsQuery(y)),t),await this._reschedule((()=>this._executeTimeQuery(y)),t),await this._reschedule((()=>this._executeAttributesQuery(y)),t),await this._reschedule((()=>this._executeGeometryQueryForSnapping(y,t)),t);const d=p.toJSON(),g=u?k(d,this.spatialReference):d,x=u?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:s;return y.createSnappingResponse({...e,point:g,distance:x},i.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo?.trackIdField)throw new i(Y,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const i=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(i)),t),i.createQueryResponse()}catch(s){if(s!==V)throw s;return new z([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,i){const{field:s,normalizationField:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:r,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const{field:s,field2:r,field3:a,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:s,field2:r,field3:a,valueExpression:n},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const{field:s,normalizationField:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:r,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const{field:s,normalizationField:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:s,normalizationField:r,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){this._timeExtentPromise||=U(this.timeInfo,this.featureStore);const[t,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return l(e),{fullExtent:t,timeExtent:i}}async _getBounds(e,t,i){const s=m(f(),p);await this.featureStore.forEachBounds(e,(e=>y(s,e)));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:J(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5]);const a=k(r,t,i);if(a.spatialReference=J(i),a.xmax-a.xmin==0){const e=c(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=c(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=c(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(K)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(K)}async _getAllFeaturesQueryEngineResult(e){return new z(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=r(e),e=await this._schedule((()=>L(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>this._checkQuerySupport(e)),i),e={...e,...t};const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),a=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(a)),i),await this._reschedule((()=>this._executeObjectIdsQuery(a)),i),await this._reschedule((()=>this._executeTimeQuery(a)),i),await this._reschedule((()=>this._executeAttributesQuery(a)),i),a}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,o=null==a||R(a,n.spatialReference)?n:k(n,a);if(!o)return null;const u=s||r,l=Q(i)&&!R(this.spatialReference,i)&&u?async e=>this._project(e,i):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const i=new Set;for(const e of h)i.add(c.getObjectId(e));const s=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await O("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),a=e=>!i.has(c.getObjectId(e))||r(c.getGeometry(e)),n=await this._runSpatialFilter(s,a,t);return new z(n,e,this)}),t);return l(r)}if(!h.length)return new z([],e,this);if(this._canExecuteSinglePass(o,e))return l(new z(h,e,this));const m=await O("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this._runSpatialFilter(h,(e=>m(c.getGeometry(e))),t);return l(new z(p,e,this))}async _executeGeometryQuery(i,s,r){if(null!=s&&0===s.items.length)return s;i=null!=s?s.query:i;const{geometry:a,outSR:n,spatialRel:o,returnGeometry:u,returnCentroid:l}=i,c=this.featureStore.featureSpatialReference,h=!a||null==c||R(c,a.spatialReference)?a:k(a,c),m=u||l,p=Q(n)&&!R(this.spatialReference,n),f=this._geometryQueryCache&&null==s?p&&m?JSON.stringify({originalFilterGeometry:a,spatialRelationship:o,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:a,spatialRelationship:o}):null,y=f?this._geometryQueryCache.get(f):null;if(null!=y)return new z(y,i,this);const d=async e=>(p&&m&&await this._project(e,n),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!h)return d(null!=s?s:await this._getAllFeaturesQueryEngineResult(i));const g=this.featureAdapter;let x=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(a))),r);if("esriSpatialRelDisjoint"===o){if(!x.length)return d(null!=s?s:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of x)e.add(g.getObjectId(i));const t=null!=s?s.items:await this._reschedule((()=>this._getAllFeatures()),r),a=await this._reschedule((async()=>{const s=await O(o,h,this.geometryType,this.hasZ,this.hasM),a=t=>!e.has(g.getObjectId(t))||s(g.getGeometry(t)),n=await this._runSpatialFilter(t,a,r);return new z(n,i,this)}),r);return d(a)}if(null!=s){const i=new e;x=x.filter((e=>t(s.items,e,s.items.length,i)>=0))}if(!x.length){const e=new z([],i,this);return f&&this._geometryQueryCache.put(f,e.items,1),e}if(this._canExecuteSinglePass(h,i))return d(new z(x,i,this));const _=await O(o,h,this.geometryType,this.hasZ,this.hasM),w=await this._runSpatialFilter(x,(e=>_(g.getGeometry(e))),r);return d(new z(w,i,this))}async _executeGeometryQueryForSnapping(e,t){const{query:i}=e,{spatialRel:s}=i;if(!e?.items?.length||!i.geometry||!s)return;const r=await O(s,i.geometry,this.geometryType,this.hasZ,this.hasM),a=await this._runSpatialFilter(e.items,(e=>r(e.geometry)),t);e.items=a}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=Z(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=E(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const r=new Array,a=async n=>{for(;s<e.length;){const o=e[s++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),i)}};return this._reschedule((e=>a(e)),i).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,a=new Map,n=this.featureAdapter.getAttribute;for(const o of e.items){const e=n(o,t),i=n(o,r),s=a.get(e);(!s||i>n(s,r))&&a.set(e,o)}e.items=Array.from(a.values())}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return G(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||R(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=h(this.spatialReference,t,e)}catch{}const r=await v(e.items.map((e=>D(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=r.map(((t,s)=>i.cloneWithGeometry(e.items[s],I(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if(G(e)){if(w(e))return[d(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(S(e))return e.rings.map((e=>d(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[x(g(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const i=Array.from(t.values());return t.clear(),i}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i(Y,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t,e),N(e,this.geometryType,this.spatialReference),B(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e,t){let s=[];if(e.valueExpression){const{arcadeUtils:t}=await W();s=t.extractFieldNames(e.valueExpression)}if(e.field&&s.push(e.field),e.field2&&s.push(e.field2),e.field3&&s.push(e.field3),e.normalizationField&&s.push(e.normalizationField),!s.length&&!e.valueExpression)throw new i(Y,"field or valueExpression is required",{params:e});j(this.fieldsIndex,s,{errorMessage:"Cannot calculate statistics for missing fields",query:t}),A(this.fieldsIndex,s,{expressionName:"statistics",query:t})}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i(Y,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([N(e,this.geometryType,this.spatialReference),B(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:r,outStatistics:a}=e,n=a?a.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const t=" asc",i=" desc",r=s.map((e=>{const s=e.toLowerCase();return s.includes(t)?s.split(t)[0]:s.includes(i)?s.split(i)[0]:e})).filter((e=>!n.includes(e)));j(this.fieldsIndex,r,{expressionName:"orderByFields",query:e})}if(t&&t.length>0)j(this.fieldsIndex,t,{expressionName:"outFields",query:e});else if(r)throw new i(Y,"outFields should be specified for returnDistinctValues",{query:e});b(this.fieldsIndex,e.where,e)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:r}=e,a=s?.length,n=t?.length;if(r){if(!a||!n)throw new i(Y,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});P(this.fieldsIndex,r,t,e)}if(n){if(!X(t))return;const r=t.map((e=>e.onStatisticField)).filter(Boolean);j(this.fieldsIndex,r,{expressionName:"onStatisticFields",query:e}),a&&j(this.fieldsIndex,s,{expressionName:"groupByFieldsForStatistics",query:e});const n=new Set([...q.jsonValues,...T.jsonValues]),o=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...q.apiValues,...T.apiValues]);for(const s of t){const{onStatisticField:t,statisticType:r}=s;if(("percentile_disc"===r||"percentile_cont"===r)&&"statisticParameters"in s){const{statisticParameters:t}=s;if(!t)throw new i(Y,"statisticParameters should be set for percentile type",{definition:s,query:e})}else if("count"!==r&&"min"!==r&&"max"!==r&&t&&C(t,this.fieldsIndex,n))throw new i(Y,`outStatistics with '${r}' statistic type, only supports ${o} field types`,{definition:s,query:e})}}}async _getQueryEngineResultForStats(e,t,i){e=r(e);try{e=await this._schedule((()=>L(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),i);const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this._reschedule((()=>this._executeObjectIdsQuery(r)),i),await this._reschedule((()=>this._executeTimeQuery(r)),i),await this._reschedule((()=>this._executeAttributesQuery(r)),i),r}catch(s){if(s!==V)throw s;return new z([],e,this)}}}export{ee as Feature,se as QueryEngine};
|
|
5
|
+
import{PositionHint as e,indexOf as t}from"../../../core/arrayUtils.js";import i from"../../../core/Error.js";import{isSerializable as s}from"../../../core/JSONSupport.js";import{clone as r}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{MemCacheStorage as u,MemCache as l}from"../../../core/MemCache.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as h}from"../../../core/unitUtils.js";import{getTransformation as c}from"../../../geometry/projection.js";import{set as m,negativeInfinity as y,create as f,expandWithAABB as p}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as d,create as g}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as x}from"../../../geometry/support/boundsUtils.js";import{fromJSON as _,isExtent as w,isPolygon as F}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as S}from"../../../geometry/support/normalizeUtils.js";import{equals as R,isValid as Q}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{cleanFromGeometryEngine as E,getGeometry as b}from"./geometryUtils.js";import{checkProjectionSupport as A,project as T,projectMany as v}from"./projectionSupport.js";import{queryCapabilities as C}from"./QueryEngineCapabilities.js";import{QueryEngineResult as M}from"./QueryEngineResult.js";import{queryEngineEmptyResult as G,normalizeQueryLike as O,normalizeQuery as P}from"./queryUtils.js";import{validateQuery as z,validateStatisticsQuery as B}from"./queryValidationUtils.js";import{getSpatialQueryOperator as q,canQueryWithRBush as k}from"./spatialQuerySupport.js";import{getTimeExtent as U,getTimeOperator as Z}from"./timeSupport.js";import H from"../../support/FieldsIndex.js";import{noBudget as J}from"../../../views/support/Scheduler.js";const N="unsupported-query";class L{constructor(e,t=null,i,s,r){this.attributes=e,this.geometry=i,this.centroid=s,this.filterFlags=r,this.groupId=-1,this.displayId=t}}const V=new u(2e6);let D=0;class W{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:C},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new l(D+++"$$",V)),this.fieldsIndex=s(e.fieldsIndex)?e.fieldsIndex:H.fromJSON(e.fieldsIndex),this.availableFields=null==e.availableFields?new Set(this.fieldsIndex.fields.map((e=>e.name))):new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=a(this._frameTask),this.clearCache(),n(this._geometryQueryCache),this._changeHandle=a(this._changeHandle)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(i){if(i!==G)throw i;return new M([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(i){if(i!==G)throw i;return 0}}async executeQueryForExtent(e,t){const i=e.outSR;try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=s.size;if(!r)return{count:0,extent:null};return{count:r,extent:await this._getBounds(s.items,s.spatialReference,i||this.spatialReference)}}catch(s){if(s===G)return{count:0,extent:null};throw s}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),s=i.items,r=new Set;return await this._reschedule((()=>{for(const e of s)r.add(i.featureAdapter.getObjectId(e))}),t),r}catch(i){if(i===G)return new Set;throw i}}async executeQueryForSnapping(e,t){const{point:i,distance:s,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let u=r(e.query);u=await this._schedule((()=>O(u,this.definitionExpression,this.spatialReference)),t),u=await this._reschedule((()=>z(u,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),t);const l=!R(i.spatialReference,this.spatialReference);l&&await A(i.spatialReference,this.spatialReference);const o="number"==typeof s?s:s.x,h="number"==typeof s?s:s.y,c={xmin:i.x-o,xmax:i.x+o,ymin:i.y-h,ymax:i.y+h,spatialReference:i.spatialReference},m=l?T(c,this.spatialReference):c;if(!m)return{candidates:[]};const y=(await S(_(i),null,{signal:t}))[0],f=(await S(_(m),null,{signal:t}))[0];if(null==y||null==f)return{candidates:[]};const p=new M(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(f.toJSON()))),t),u,this);await this._reschedule((()=>this._executeObjectIdsQuery(p)),t),await this._reschedule((()=>this._executeTimeQuery(p)),t),await this._reschedule((()=>this._executeAttributesQuery(p)),t),await this._reschedule((()=>this._executeGeometryQueryForSnapping(p,t)),t);const d=y.toJSON(),g=l?T(d,this.spatialReference):d,x=l?Math.max(m.xmax-m.xmin,m.ymax-m.ymin)/2:s;return p.createSnappingResponse({...e,point:g,distance:x},i.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo?.trackIdField)throw new i(N,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const i=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(i)),t),i.createQueryResponse()}catch(s){if(s!==G)throw s;return new M([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,i){const{field:s,normalizationField:r,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:s,normalizationField:r,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,i){const{field:s,field2:r,field3:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:s,field2:r,field3:a,valueExpression:n},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,i){const{field:s,normalizationField:r,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:s,normalizationField:r,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,i){const{field:s,normalizationField:r,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:s,normalizationField:r,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){this._timeExtentPromise||=U(this.timeInfo,this.featureStore);const[t,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return o(e),{fullExtent:t,timeExtent:i}}async _getBounds(e,t,i){const s=m(f(),y);await this.featureStore.forEachBounds(e,(e=>p(s,e)));const r={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:E(this.spatialReference)};this.hasZ&&isFinite(s[2])&&isFinite(s[5])&&(r.zmin=s[2],r.zmax=s[5]);const a=T(r,t,i);if(a.spatialReference=E(i),a.xmax-a.xmin==0){const e=h(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=h(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=h(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(J)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(J)}async _getAllFeaturesQueryEngineResult(e){return new M(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,i){e=r(e),e=await this._schedule((()=>P(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>z(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i),e={...e,...t};const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),a=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(a)),i),await this._reschedule((()=>this._executeObjectIdsQuery(a)),i),await this._reschedule((()=>this._executeTimeQuery(a)),i),await this._reschedule((()=>this._executeAttributesQuery(a)),i),a}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:i,returnGeometry:s,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,u=null==a||R(a,n.spatialReference)?n:T(n,a);if(!u)return null;const l=s||r,o=Q(i)&&!R(this.spatialReference,i)&&l?async e=>this._project(e,i):e=>e,h=this.featureAdapter,c=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(u))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const i=new Set;for(const e of c)i.add(h.getObjectId(e));const s=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await q("esriSpatialRelDisjoint",u,this.geometryType,this.hasZ,this.hasM),a=e=>!i.has(h.getObjectId(e))||r(h.getGeometry(e)),n=await this._runSpatialFilter(s,a,t);return new M(n,e,this)}),t);return o(r)}if(!c.length)return new M([],e,this);if(this._canExecuteSinglePass(u,e))return o(new M(c,e,this));const m=await q("esriSpatialRelContains",u,this.geometryType,this.hasZ,this.hasM),y=await this._runSpatialFilter(c,(e=>m(h.getGeometry(e))),t);return o(new M(y,e,this))}async _executeGeometryQuery(i,s,r){if(null!=s&&0===s.items.length)return s;i=null!=s?s.query:i;const{geometry:a,outSR:n,spatialRel:u,returnGeometry:l,returnCentroid:o}=i,h=this.featureStore.featureSpatialReference,c=!a||null==h||R(h,a.spatialReference)?a:T(a,h),m=l||o,y=Q(n)&&!R(this.spatialReference,n),f=this._geometryQueryCache&&null==s?y&&m?JSON.stringify({originalFilterGeometry:a,spatialRelationship:u,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:a,spatialRelationship:u}):null,p=f?this._geometryQueryCache.get(f):null;if(null!=p)return new M(p,i,this);const d=async e=>(y&&m&&await this._project(e,n),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return d(null!=s?s:await this._getAllFeaturesQueryEngineResult(i));const g=this.featureAdapter;let x=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(a))),r);if("esriSpatialRelDisjoint"===u){if(!x.length)return d(null!=s?s:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of x)e.add(g.getObjectId(i));const t=null!=s?s.items:await this._reschedule((()=>this._getAllFeatures()),r),a=await this._reschedule((async()=>{const s=await q(u,c,this.geometryType,this.hasZ,this.hasM),a=t=>!e.has(g.getObjectId(t))||s(g.getGeometry(t)),n=await this._runSpatialFilter(t,a,r);return new M(n,i,this)}),r);return d(a)}if(null!=s){const i=new e;x=x.filter((e=>t(s.items,e,s.items.length,i)>=0))}if(!x.length){const e=new M([],i,this);return f&&this._geometryQueryCache.put(f,e.items,1),e}if(this._canExecuteSinglePass(c,i))return d(new M(x,i,this));const _=await q(u,c,this.geometryType,this.hasZ,this.hasM),w=await this._runSpatialFilter(x,(e=>_(g.getGeometry(e))),r);return d(new M(w,i,this))}async _executeGeometryQueryForSnapping(e,t){const{query:i}=e,{spatialRel:s}=i;if(!e?.items?.length||!i.geometry||!s)return;const r=await q(s,i.geometry,this.geometryType,this.hasZ,this.hasM),a=await this._runSpatialFilter(e.items,(e=>r(e.geometry)),t);e.items=a}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(i(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=Z(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,i){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let s=0;const r=new Array,a=async n=>{for(;s<e.length;){const u=e[s++];t(u)&&(r.push(u),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),i)}};return this._reschedule((e=>a(e)),i).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:s}=this.timeInfo,r=s||i,a=new Map,n=this.featureAdapter.getAttribute;for(const u of e.items){const e=n(u,t),i=n(u,r),s=a.get(e);(!s||i>n(s,r))&&a.set(e,u)}e.items=Array.from(a.values())}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return k(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||R(this.spatialReference,t))return e;const i=this.featureAdapter;let s;try{const e=await this._getFullExtent();s=c(this.spatialReference,t,e)}catch{}const r=await v(e.items.map((e=>b(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,s);return e.items=r.map(((t,s)=>i.cloneWithGeometry(e.items[s],I(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if(k(e)){if(w(e))return[d(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map((e=>d(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[x(g(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const i=Array.from(t.values());return t.clear(),i}async _executeQueryForStatistics(e,t,i){e=r(e);try{e=await this._schedule((()=>P(e,this.definitionExpression,this.spatialReference)),i),e=await this._reschedule((()=>B(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),i);const s=await this._reschedule((()=>this._executeSceneFilterQuery(e,i)),i),r=await this._reschedule((()=>this._executeGeometryQuery(e,s,i)),i);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),i),await this._reschedule((()=>this._executeObjectIdsQuery(r)),i),await this._reschedule((()=>this._executeTimeQuery(r)),i),await this._reschedule((()=>this._executeAttributesQuery(r)),i),r}catch(s){if(s!==G)throw s;return new M([],e,this)}}}export{L as Feature,W as QueryEngine};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{polygonCentroid as e,extentCentroid as t}from"../../../geometry/support/centroid.js";import{getPolygonExtent as s,getGeometryExtent as i}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as a}from"../../../geometry/support/quantizationUtils.js";import{isValid as r,equals as n}from"../../../geometry/support/spatialReferenceUtils.js";import o from"./AttributesBuilder.js";import{project as l}from"./projectionSupport.js";import{makeEdgeCandidate as u,makeVertexCandidate as c}from"./SnappingCandidate.js";import{cleanFromGeometryEngine as d,getGeometry as m,transformCentroid as h}from"./utils.js";import{isStringField as f}from"../../support/fieldUtils.js";import{isNullCountSupported as g,calculateStringStatistics as p,calculateStatistics as y,processSummaryStatisticsResult as x,calculateUniqueValuesCount as I,createUVResult as T,calculateClassBreaks as V,resolveCBResult as F,calculateHistogram as S,getAttributeComparator as v,calculatePercentile as _}from"../../../statistics/utils.js";class z{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new o(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,l=new Set;for(const o of i){const{statisticType:i}=o,a="exceedslimit"!==i?o.onStatisticField:void 0;if(!n.has(a)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,r);s.push(t)}n.set(a,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:i,items:a}=u[t],r=i.join(",");s&&!e.validateItems(a,s)||l.add(r)}}return l.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;r(this.query.outSR)&&!n(t.spatialReference,this.query.outSR)?e.queryGeometry=d({spatialReference:this.query.outSR,...l(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=d({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=R(this.hasZ,this.hasM),{point:a,mode:r}=e,n="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},d="esriGeometryPolygon"===this.geometryType,m=this._getPointCreator(r,this.spatialReference,t),h=new A(null,0),f=new A(null,0),g={x:0,y:0,z:0};for(const p of this.items){const t=s.getGeometry(p);if(null==t)continue;const{coords:r,lengths:y}=t;if(h.coords=r,f.coords=r,e.returnEdge){let e=0;for(let t=0;t<y.length;t++){const r=y[t];for(let t=0;t<r;t++,e+=i){const c=h;if(c.coordsIndex=e,t!==r-1){const t=f;t.coordsIndex=e+i;const r=g;b(g,a,c,t);const d=(a.x-r.x)/n,h=(a.y-r.y)/o,y=d*d+h*h;y<=1&&l.candidates.push(u(s.getObjectId(p),m(r),Math.sqrt(y),m(c),m(t)))}}}}if("none"!==e.vertexMode){const t=d?r.length-i:r.length;if("all"===e.vertexMode)for(let e=0;e<t;e+=i){const t=h;t.coordsIndex=e;const i=(a.x-t.x)/n,r=(a.y-t.y)/o,u=i*i+r*r;u<=1&&l.candidates.push(c(s.getObjectId(p),m(t),Math.sqrt(u)))}else if("ends"===e.vertexMode){const e=[0];d||e.push(r.length-i);for(const t of e){const e=h;e.coordsIndex=t;const i=(a.x-e.x)/n,r=(a.y-e.y)/o,u=i*i+r*r;u<=1&&l.candidates.push(c(s.getObjectId(p),m(e),Math.sqrt(u)))}}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||n(t,s)?e=>e:e=>l(e,t,s),{hasZ:a}=this,r=0;return"3d"===e?a?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:r}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u}=e,c=this.fieldsIndex.isDateField(t),d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u}),m=g({normalizationType:a,normalizationField:i,minValue:n,maxValue:o}),h=this.fieldsIndex.get(t),I={value:.5,fieldType:h?.type},T=f(h)?p({values:d,supportsNullCount:m,percentileParams:I}):y({values:d,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:m,percentileParams:I});return x(T,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:r,timeZone:n}),l=I(o);return T(l,i,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:m}=e,h=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:d,timeZone:m}),f=V(h,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return F(f,n)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:m}=e,h=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:d,timeZone:m});return S(h,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.reverse()){const t=i.split(" "),a=t[0],r=this.fieldsIndex.get(a),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=v(r?.type,n);e.sort(((e,t)=>{const i=s(e,a,r),n=s(t,a,r);return o(i,n)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:m,resultOffset:h,returnZ:f,returnM:g}=e,p=null!=m&&t.length>(h||0)+m,y=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:p,features:this._createFeatures(e,t),fields:y,geometryType:s,hasM:i&&g,hasZ:r&&f,objectIdFieldName:n,spatialReference:d(u||o),transform:c&&a(c)||null}}_createFeatures(e,t){const s=new o(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:l,returnGeometry:u,returnCentroid:c,maxAllowableOffset:d,resultOffset:f,resultRecordCount:g,returnZ:p=!1,returnM:y=!1}=e,x=r&&p,I=i&&y;let T=[],V=0;const F=[...t];if(this._sortFeatures(F,n,((e,t,i)=>s.getFieldValue(e,t,i))),u||c){const e=a(l)??void 0;if(u&&!c)for(const t of F)T[V++]={attributes:s.getAttributes(t),geometry:m(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,x,I)};else if(!u&&c)for(const t of F)T[V++]={attributes:s.getAttributes(t),centroid:h(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of F)T[V++]={attributes:s.getAttributes(t),centroid:h(this,this.featureAdapter.getCentroid(t,this),e),geometry:m(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),d,e,x,I)}}else for(const a of F){const e=s.getAttributes(a);e&&(T[V++]={attributes:e})}const S=f||0;if(null!=g){const e=S+g;T=T.slice(S,Math.min(T.length,e))}return T}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;for(const r of e.outStatistics??[])if("exceedslimit"===r.statisticType){s=null!=r.maxPointCount?r.maxPointCount:Number.POSITIVE_INFINITY,i=null!=r.maxRecordCount?r.maxRecordCount:Number.POSITIVE_INFINITY,a=null!=r.maxVertexCount?r.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=R(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/e>a}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,a=new Map,r=new Map,n=new Map,l=new o(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:m}=e,h=c?.length,f=!!h,g=f?c[0]:null,p=f&&!this.fieldsIndex.get(g);for(const o of u??[]){const{outStatisticFieldName:e,statisticType:u}=o,m=o,y="exceedslimit"!==u?o.onStatisticField:void 0,x="percentile_disc"===u||"percentile_cont"===u,I="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,T=f&&1===h&&(y===g||p)&&"count"===u;if(f){if(!r.has(y)){const e=[];for(const t of c){const s=this._getAttributeValues(l,t,i);e.push(s)}r.set(y,this._calculateUniqueValues(e,!I&&l.returnDistinctValues))}const t=r.get(y);for(const s in t){const{count:a,data:r,items:o,itemPositions:u}=t[s],h=r.join(",");if(!d||l.validateItems(o,d)){const t=n.get(h)||{attributes:{}};if(I){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,o);t.aggregateGeometries[s]=e}else{let s=null;if(T)s=a;else{const e=this._getAttributeValues(l,y,i),t=u.map((t=>e[t]));s=x&&"statisticParameters"in m?this._getPercentileValue(m,t):this._getStatisticValue(m,t,null,l.returnDistinctValues)}t.attributes[e]=s}let s=0;c.forEach(((e,i)=>t.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++s]=r[i])),n.set(h,t)}}}else if(I){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,this.items);t.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,y,i);t.attributes[e]=x&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,a,l.returnDistinctValues)}s.push({name:e,alias:e,type:"esriFieldTypeDouble"})}const y=f?Array.from(n.values()):[t];return this._sortFeatures(y,m,((e,t)=>e.attributes[t])),{fields:s,features:y}}async _getAggregateGeometry(a,r){const{convexHull:n,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=a,{featureAdapter:c,spatialReference:d,geometryType:h,hasZ:f,hasM:g}=this,p=r.map((e=>m(h,f,g,c.getGeometry(e)))),y=n(d,p,!0)[0],x={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=y?s(y):i(o(d,p));x.aggregateGeometries={...e,spatialReference:d},x.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const s=y?e(y):t(i(o(d,p)));x.aggregateGeometries={x:s[0],y:s[1],spatialReference:d},x.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(x.aggregateGeometries=y,x.outStatisticFieldName=u||"convexHull");return x}_getStatisticValue(e,t,s,i){const{onStatisticField:a,statisticType:r}=e;let n=null;n=s?.has(a)?s.get(a):f(this.fieldsIndex.get(a))?p({values:t,returnDistinct:i}):y({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:a}=e,{value:r,orderBy:n}=i,o=this.fieldsIndex.get(s);return _(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),a=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,a),a}_calculateUniqueValues(e,t){const s={},i=this.items,a=i.length;for(let r=0;r<a;r++){const a=i[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(t||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(e){const t=new o(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,scale:i,timeZone:a}=e;return s?t.getExpressionValues(this.items,s,{viewingMode:"map",scale:i,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},a):t.getDataValues(this.items,{field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal})}}function b(e,t,s,i){const a=i.x-s.x,r=i.y-s.y,n=a*a+r*r,o=(t.x-s.x)*a+(t.y-s.y)*r,l=Math.min(1,Math.max(0,o/n));e.x=s.x+a*l,e.y=s.y+r*l}function R(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}export{z as QueryEngineResult};
|
|
5
|
+
import{polygonCentroid as e,extentCentroid as t}from"../../../geometry/support/centroid.js";import{getPolygonExtent as s,getGeometryExtent as i}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as a}from"../../../geometry/support/quantizationUtils.js";import{isValid as r,equals as n}from"../../../geometry/support/spatialReferenceUtils.js";import o from"./AttributesBuilder.js";import{cleanFromGeometryEngine as l,getGeometry as u,transformCentroid as c}from"./geometryUtils.js";import{project as d}from"./projectionSupport.js";import{makeEdgeCandidate as m,makeVertexCandidate as h}from"./SnappingCandidate.js";import{isStringField as g}from"../../support/fieldUtils.js";import{isNullCountSupported as f,calculateStringStatistics as p,calculateStatistics as y,processSummaryStatisticsResult as x,calculateUniqueValuesCount as I,createUVResult as T,calculateClassBreaks as V,resolveCBResult as F,calculateHistogram as S,getAttributeComparator as v,calculatePercentile as _}from"../../../statistics/utils.js";class z{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new o(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,l=new Set;for(const o of i){const{statisticType:i}=o,a="exceedslimit"!==i?o.onStatisticField:void 0;if(!n.has(a)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,r);s.push(t)}n.set(a,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:i,items:a}=u[t],r=i.join(",");s&&!e.validateItems(a,s)||l.add(r)}}return l.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;r(this.query.outSR)&&!n(t.spatialReference,this.query.outSR)?e.queryGeometry=l({spatialReference:this.query.outSR,...d(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=l({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=R(this.hasZ,this.hasM),{point:a,mode:r}=e,n="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(r,this.spatialReference,t),d=new A(null,0),g=new A(null,0),f={x:0,y:0,z:0};for(const p of this.items){const t=s.getGeometry(p);if(null==t)continue;const{coords:r,lengths:y}=t;if(d.coords=r,g.coords=r,e.returnEdge){let e=0;for(let t=0;t<y.length;t++){const r=y[t];for(let t=0;t<r;t++,e+=i){const u=d;if(u.coordsIndex=e,t!==r-1){const t=g;t.coordsIndex=e+i;const r=f;b(f,a,u,t);const d=(a.x-r.x)/n,h=(a.y-r.y)/o,y=d*d+h*h;y<=1&&l.candidates.push(m(s.getObjectId(p),c(r),Math.sqrt(y),c(u),c(t)))}}}}if("none"!==e.vertexMode){const t=u?r.length-i:r.length;if("all"===e.vertexMode)for(let e=0;e<t;e+=i){const t=d;t.coordsIndex=e;const i=(a.x-t.x)/n,r=(a.y-t.y)/o,u=i*i+r*r;u<=1&&l.candidates.push(h(s.getObjectId(p),c(t),Math.sqrt(u)))}else if("ends"===e.vertexMode){const e=[0];u||e.push(r.length-i);for(const t of e){const e=d;e.coordsIndex=t;const i=(a.x-e.x)/n,r=(a.y-e.y)/o,u=i*i+r*r;u<=1&&l.candidates.push(h(s.getObjectId(p),c(e),Math.sqrt(u)))}}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||n(t,s)?e=>e:e=>d(e,t,s),{hasZ:a}=this,r=0;return"3d"===e?a?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:r}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u}=e,c=this.fieldsIndex.isDateField(t),d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u}),m=f({normalizationType:a,normalizationField:i,minValue:n,maxValue:o}),h=this.fieldsIndex.get(t),I={value:.5,fieldType:h?.type},T=g(h)?p({values:d,supportsNullCount:m,percentileParams:I}):y({values:d,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:m,percentileParams:I});return x(T,c)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:r,timeZone:n}),l=I(o);return T(l,i,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:d,timeZone:m}=e,h=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:d,timeZone:m}),g=V(h,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return F(g,n)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:d,timeZone:m}=e,h=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:d,timeZone:m});return S(h,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.reverse()){const t=i.split(" "),a=t[0],r=this.fieldsIndex.get(a),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=v(r?.type,n);e.sort(((e,t)=>{const i=s(e,a,r),n=s(t,a,r);return o(i,n)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:o}=this,{outFields:u,outSR:c,quantizationParameters:d,resultRecordCount:m,resultOffset:h,returnZ:g,returnM:f}=e,p=null!=m&&t.length>(h||0)+m,y=u&&(u.includes("*")?[...this.fieldsIndex.fields]:u.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:p,features:this._createFeatures(e,t),fields:y,geometryType:s,hasM:i&&f,hasZ:r&&g,objectIdFieldName:n,spatialReference:l(c||o),transform:d&&a(d)||null}}_createFeatures(e,t){const s=new o(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:l,returnGeometry:d,returnCentroid:m,maxAllowableOffset:h,resultOffset:g,resultRecordCount:f,returnZ:p=!1,returnM:y=!1}=e,x=r&&p,I=i&&y;let T=[],V=0;const F=[...t];if(this._sortFeatures(F,n,((e,t,i)=>s.getFieldValue(e,t,i))),d||m){const e=a(l)??void 0;if(d&&!m)for(const t of F)T[V++]={attributes:s.getAttributes(t),geometry:u(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,x,I)};else if(!d&&m)for(const t of F)T[V++]={attributes:s.getAttributes(t),centroid:c(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of F)T[V++]={attributes:s.getAttributes(t),centroid:c(this,this.featureAdapter.getCentroid(t,this),e),geometry:u(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,x,I)}}else for(const a of F){const e=s.getAttributes(a);e&&(T[V++]={attributes:e})}const S=g||0;if(null!=f){const e=S+f;T=T.slice(S,Math.min(T.length,e))}return T}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY;for(const r of e.outStatistics??[])if("exceedslimit"===r.statisticType){s=null!=r.maxPointCount?r.maxPointCount:Number.POSITIVE_INFINITY,i=null!=r.maxRecordCount?r.maxRecordCount:Number.POSITIVE_INFINITY,a=null!=r.maxVertexCount?r.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=R(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/e>a}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,a=new Map,r=new Map,n=new Map,l=new o(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:m}=e,h=c?.length,g=!!h,f=g?c[0]:null,p=g&&!this.fieldsIndex.get(f);for(const o of u??[]){const{outStatisticFieldName:e,statisticType:u}=o,m=o,y="exceedslimit"!==u?o.onStatisticField:void 0,x="percentile_disc"===u||"percentile_cont"===u,I="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,T=g&&1===h&&(y===f||p)&&"count"===u;if(g){if(!r.has(y)){const e=[];for(const t of c){const s=this._getAttributeValues(l,t,i);e.push(s)}r.set(y,this._calculateUniqueValues(e,!I&&l.returnDistinctValues))}const t=r.get(y);for(const s in t){const{count:a,data:r,items:o,itemPositions:u}=t[s],h=r.join(",");if(!d||l.validateItems(o,d)){const t=n.get(h)||{attributes:{}};if(I){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,o);t.aggregateGeometries[s]=e}else{let s=null;if(T)s=a;else{const e=this._getAttributeValues(l,y,i),t=u.map((t=>e[t]));s=x&&"statisticParameters"in m?this._getPercentileValue(m,t):this._getStatisticValue(m,t,null,l.returnDistinctValues)}t.attributes[e]=s}let s=0;c.forEach(((e,i)=>t.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++s]=r[i])),n.set(h,t)}}}else if(I){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(m,this.items);t.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,y,i);t.attributes[e]=x&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,a,l.returnDistinctValues)}s.push({name:e,alias:e,type:"esriFieldTypeDouble"})}const y=g?Array.from(n.values()):[t];return this._sortFeatures(y,m,((e,t)=>e.attributes[t])),{fields:s,features:y}}async _getAggregateGeometry(a,r){const{convexHull:n,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:c}=a,{featureAdapter:d,spatialReference:m,geometryType:h,hasZ:g,hasM:f}=this,p=r.map((e=>u(h,g,f,d.getGeometry(e)))),y=n(m,p,!0)[0],x={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=y?s(y):i(o(m,p));x.aggregateGeometries={...e,spatialReference:m},x.outStatisticFieldName=c||"extent"}else if("CentroidAggregate"===l){const s=y?e(y):t(i(o(m,p)));x.aggregateGeometries={x:s[0],y:s[1],spatialReference:m},x.outStatisticFieldName=c||"centroid"}else"ConvexHullAggregate"===l&&(x.aggregateGeometries=y,x.outStatisticFieldName=c||"convexHull");return x}_getStatisticValue(e,t,s,i){const{onStatisticField:a,statisticType:r}=e;let n=null;n=s?.has(a)?s.get(a):g(this.fieldsIndex.get(a))?p({values:t,returnDistinct:i}):y({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:a}=e,{value:r,orderBy:n}=i,o=this.fieldsIndex.get(s);return _(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),a=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,a),a}_calculateUniqueValues(e,t){const s={},i=this.items,a=i.length;for(let r=0;r<a;r++){const a=i[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(t||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(e){const t=new o(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,scale:i,timeZone:a}=e;return s?t.getExpressionValues(this.items,s,{viewingMode:"map",scale:i,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},a):t.getDataValues(this.items,{field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal})}}function b(e,t,s,i){const a=i.x-s.x,r=i.y-s.y,n=a*a+r*r,o=(t.x-s.x)*a+(t.y-s.y)*r,l=Math.min(1,Math.max(0,o/n));e.x=s.x+a*l,e.y=s.y+r*l}function R(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}export{z as QueryEngineResult};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Error.js";import{
|
|
5
|
+
import e from"../../../core/Error.js";import{WhereClauseCache as i}from"../../../core/sql/WhereClauseCache.js";import{kebabDict as r}from"../../support/fieldType.js";const t=new i(50,500),s="unsupported-query",n=" as ",o=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),a=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),l=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...o,...a]);function d(i,r,n={}){const o=c(r,i);if(!o){const n=t.getError(r,i);throw new e(s,"invalid SQL expression",{expression:r,error:n})}const a=n.expressionName||"expression";if(n.validateStandardized&&!o.isStandardized)throw new e(s,`${a} is not standard`,{expression:r});if(n.validateAggregate&&!o.isAggregate)throw new e(s,`${a} does not contain a valid aggregate function`,{expression:r});return o.fieldNames}function p(e,i,r,t){if(!r)return!0;const s="where clause";return g(e,i,d(e,r,{validateStandardized:!0,expressionName:s}),{expressionName:s,query:t}),!0}function f(i,r,t,n,o){if(!t)return!0;const a="having clause",l=d(i,t,{validateAggregate:!0,expressionName:a});g(i,r,l,{expressionName:a,query:o});const p=c(t,i),f=p?.getExpressions().every((e=>{const{aggregateType:r,field:t}=e,s=i.get(t)?.name;return n.some((e=>{const{onStatisticField:t,statisticType:n}=e,o=i.get(t)?.name;return o===s&&n.toLowerCase().trim()===r}))}));if(!f)throw new e(s,"expressions in having clause should also exist in outStatistics",{having:t});return!0}function c(e,i){return e?t.get(e,i):null}function u(e){return/\((.*?)\)/.test(e)?e:e.split(n)[0]}function y(e){return e.split(n)[1]}function g(i,r,t,n={}){const o=new Map;if(m(o,i,r,n.allowedFieldTypes??l,t),o.size){const i=n.expressionName??"expression";throw new e(s,`${i} contains invalid or missing fields`,{errors:Array.from(o.values()),query:n.query})}}function m(e,i,r,t,s){for(const o of s){if("*"===o)continue;if(i.get(o))T(e,i,r,t,o);else try{const s=d(i,u(o),{validateStandardized:!0});for(const n of s)T(e,i,r,t,n)}catch(n){e.set(o,{type:"expression-error",expression:o,error:n})}}}function T(e,i,t,s,n){if("*"===n)return;const o=i.get(n);o?t.has(o.name)?!1===s?.has(o.type)&&e.set(n,{type:"invalid-type",fieldName:o.name,fieldType:r.fromJSON(o.type),allowedFieldTypes:Array.from(s,(e=>r.fromJSON(e)))}):e.set(n,{type:"missing-field",fieldName:o.name}):e.set(n,{type:"invalid-field",fieldName:n})}export{a as allDateAndTimeFieldTypes,y as getAliasFromFieldName,u as getExpressionFromFieldName,c as getWhereClause,o as numericFieldTypes,g as validateFields,f as validateHaving,p as validateWhere};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{quantizeOptimizedGeometry as n,convertToPoint as e,generalizeOptimizedGeometry as r,removeZMValues as t,convertToPolyline as o,convertToPolygon as i,convertToMultipoint as s}from"../featureConversionUtils.js";import l from"../OptimizedGeometry.js";const u=new l,f=new l,m=new l,c={esriGeometryPoint:e,esriGeometryPolyline:o,esriGeometryPolygon:i,esriGeometryMultipoint:s};function y(r,t,o,i=r.hasZ,s=r.hasM){if(null==t)return null;const l=r.hasZ&&i,u=r.hasM&&s;if(o){const f=n(m,t,r.hasZ,r.hasM,"esriGeometryPoint",o,i,s);return e(f,l,u)}return e(t,l,u)}function a(e,o,i,s,l,y,a=o,h=i){const p=o&&a,G=i&&h,g=null!=s?"coords"in s?s:s.geometry:null;if(null==g)return null;if(l){let t=r(f,g,o,i,e,l,a,h);return y&&(t=n(m,t,p,G,e,y)),c[e]?.(t,p,G)??null}if(y){const r=n(m,g,o,i,e,y,a,h);return c[e]?.(r,p,G)??null}return t(u,g,o,i,a,h),c[e]?.(u,p,G)??null}function h(n){return n&&p in n?JSON.parse(JSON.stringify(n,G)):n}const p="_geVersion",G=(n,e)=>n!==p?e:void 0;export{h as cleanFromGeometryEngine,a as getGeometry,y as transformCentroid};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{JSONMap as e}from"../../../core/jsonMap.js";import{getUnitString as t}from"../../../core/unitUtils.js";import{canProjectWithoutEngine as i}from"../../../geometry/projection.js";import{getGeometryExtent as r}from"../../../geometry/support/extentUtils.js";import{fromJSON as n,isExtent as o,isPolygon as s,isPolyline as a}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as l}from"../../../geometry/support/normalizeUtils.js";import{equals as m,isGeographic as f,isWebMercator as c,WGS84 as u}from"../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as p,project as y}from"./projectionSupport.js";const R=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),g=Object.freeze({});async function S(e,t,i){const{outFields:r,orderByFields:n,groupByFieldsForStatistics:o,outStatistics:s}=e;if(r)for(let a=0;a<r.length;a++)r[a]=r[a].trim();if(n)for(let a=0;a<n.length;a++)n[a]=n[a].trim();if(o)for(let a=0;a<o.length;a++)o[a]=o[a].trim();if(s)for(let a=0;a<s.length;a++)s[a].onStatisticField&&(s[a].onStatisticField=s[a].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),j(e,t,i)}async function j(e,t,i){if(!e)return null;let{where:o}=e;if(e.where=o=o?.trim(),(!o||/^1 *= *1$/.test(o)||t&&t===o)&&(e.where=null),!e.geometry)return e;let s=await d(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;s=r(s),s.spatialReference=t}if(s){await p(s.spatialReference,i),s=x(s,i);const t=(await l(n(s)))[0];if(null==t)throw g;const r="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,o=r&&w(s,i)?{densificationStep:8*r}:void 0,a=t.toJSON(),m=y(a,a.spatialReference,i,o);if(!m)throw g;m.spatialReference=i,e.geometry=m}return e}function w(e,t){if(!e)return!1;const r=e.spatialReference;return(o(e)||s(e)||a(e))&&!m(r,t)&&!i(r,t)}function x(e,t){const i=e.spatialReference;return w(e,t)&&o(e)?{spatialReference:i,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}async function d(e){const{distance:i,units:r}=e,n=e.geometry;if(null==i||"vertexAttributes"in n)return n;const o=n.spatialReference,s=r?R.fromJSON(r):t(o),a=o&&(f(o)||c(o))?n:await p(o,u).then((()=>y(n,u)));return(await U())(a.spatialReference,a,i,s)}async function U(){return(await import("../../../geometry/geometryEngineJSON.js")).geodesicBuffer}export{S as normalizeQuery,j as normalizeQueryLike,g as queryEngineEmptyResult,R as unitsKebabDict};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../../../core/Error.js";import{numericFieldTypes as t,allDateAndTimeFieldTypes as i,validateFields as s,validateWhere as r,validateHaving as o}from"./attributeSupport.js";import{checkProjectionSupport as n}from"./projectionSupport.js";import{checkSpatialQuerySupport as a}from"./spatialQuerySupport.js";import{loadArcade as l}from"../../../support/arcadeOnDemand.js";const u="unsupported-query";async function c(t,{fieldsIndex:i,geometryType:s,spatialReference:r,availableFields:o}){if((t.distance??0)<0||null!=t.geometryPrecision||t.multipatchOption||t.pixelSize||t.relationParam||t.text)throw new e(u,"Unsupported query options",{query:t});return p(i,o,t),f(i,o,t),Promise.all([a(t,s,r),n(r,t.outSR)]).then((()=>t))}function p(t,i,o){const{outFields:n,orderByFields:a,returnDistinctValues:l,outStatistics:c}=o,p=c?c.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const e=" asc",r=" desc",n=a.map((t=>{const i=t.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(r)?i.split(r)[0]:t})).filter((e=>!p.includes(e)));s(t,i,n,{expressionName:"orderByFields",query:o})}if(n&&n.length>0)s(t,i,n,{expressionName:"outFields",query:o});else if(l)throw new e(u,"outFields should be specified for returnDistinctValues",{query:o});r(t,i,o.where,o)}const d=new Set([...t,...i]);function f(t,i,r){const{outStatistics:n,groupByFieldsForStatistics:a,having:l}=r,c=a?.length,p=n?.length;if(l){if(!c||!p)throw new e(u,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:r});o(t,i,l,n,r)}if(p){if(!h(n))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);s(t,i,o,{expressionName:"onStatisticFields",query:r}),c&&s(t,i,a,{expressionName:"groupByFieldsForStatistics",query:r});for(const a of n){const{onStatisticField:o,statisticType:n}=a;if(("percentile_disc"===n||"percentile_cont"===n)&&"statisticParameters"in a){const{statisticParameters:t}=a;if(!t)throw new e(u,"statisticParameters should be set for percentile type",{definition:a,query:r})}else t.get(o)&&"count"!==n&&"min"!==n&&"max"!==n&&s(t,i,[o],{expressionName:`outStatistics with '${n}' statistic type`,allowedFieldTypes:d,query:r})}}}async function m(t,i,{fieldsIndex:s,geometryType:r,spatialReference:o,availableFields:l}){if((t.distance??0)<0||null!=t.geometryPrecision||t.multipatchOption||t.pixelSize||t.relationParam||t.text||t.outStatistics||t.groupByFieldsForStatistics||t.having||t.orderByFields)throw new e(u,"Unsupported query options",{query:t});return p(s,l,t),Promise.all([y(s,l,i,t),a(t,r,o),n(o,t.outSR)]).then((()=>t))}async function y(t,i,r,o){let n=[];if(r.valueExpression){const{arcadeUtils:e}=await l();n=e.extractFieldNames(r.valueExpression)}if(r.field&&n.push(r.field),r.field2&&n.push(r.field2),r.field3&&n.push(r.field3),r.normalizationField&&n.push(r.normalizationField),!n.length&&!r.valueExpression)throw new e(u,"field or valueExpression is required",{params:r});s(t,i,n,{expressionName:"statistics",query:o})}function h(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}export{c as validateQuery,m as validateStatisticsQuery};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../core/Error.js";import{extentContainsPoint as r,extentContainsMultipoint as t}from"../../../geometry/support/contains.js";import{getExtentIntersector as i}from"../../../geometry/support/intersects.js";import{isPolygon as s,isExtent as o,getJsonType as n}from"../../../geometry/support/jsonUtils.js";import{isValid as l}from"../../../geometry/support/spatialReferenceUtils.js";import{polygonContainsPoint as a,polygonContainsMultipoint as p}from"../contains.js";import{convertFromPolygon as u}from"../featureConversionUtils.js";import m from"../OptimizedGeometry.js";import{
|
|
5
|
+
import e from"../../../core/Error.js";import{extentContainsPoint as r,extentContainsMultipoint as t}from"../../../geometry/support/contains.js";import{getExtentIntersector as i}from"../../../geometry/support/intersects.js";import{isPolygon as s,isExtent as o,getJsonType as n}from"../../../geometry/support/jsonUtils.js";import{isValid as l}from"../../../geometry/support/spatialReferenceUtils.js";import{polygonContainsPoint as a,polygonContainsMultipoint as p}from"../contains.js";import{convertFromPolygon as u}from"../featureConversionUtils.js";import m from"../OptimizedGeometry.js";import{getGeometry as y}from"./geometryUtils.js";import{checkProjectionSupport as c}from"./projectionSupport.js";const f="unsupported-query",R={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},S={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function G(e){return null!=e&&!0===S.spatialRelationship[e]}function g(e){return null!=e&&!0===S.queryGeometry[n(e)]}function j(e){return null!=e&&!0===S.layerGeometry[e]}function h(){return import("../../../geometry/geometryEngineJSON.js")}function v(e,n,l,c,f){if(s(n)&&"esriGeometryPoint"===l&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=u(new m,n,!1,!1);return Promise.resolve((r=>a(e,!1,!1,r)))}if(s(n)&&"esriGeometryMultipoint"===l){const r=u(new m,n,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>p(r,!1,!1,e,c,f)))}if(o(n)&&"esriGeometryPoint"===l&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>r(n,y(l,c,f,e))));if(o(n)&&"esriGeometryMultipoint"===l&&"esriSpatialRelContains"===e)return Promise.resolve((e=>t(n,y(l,c,f,e))));if(o(n)&&"esriSpatialRelIntersects"===e){const e=i(l);return Promise.resolve((r=>e(n,y(l,c,f,r))))}return h().then((r=>{const t=r[R[e]].bind(null,n.spatialReference,n);return e=>t(y(l,c,f,e))}))}async function P(r,t,i){const{spatialRel:s,geometry:o}=r;if(o){if(!G(s))throw new e(f,"Unsupported query spatial relationship",{query:r});if(l(o.spatialReference)&&l(i)){if(!g(o))throw new e(f,"Unsupported query geometry type",{query:r});if(!j(t))throw new e(f,"Unsupported layer geometry type",{query:r});if(r.outSR)return c(r.geometry?.spatialReference,r.outSR)}}}function I(e){if(o(e))return!0;if(s(e)){for(const r of e.rings){if(5!==r.length)return!1;if(r[0][0]!==r[1][0]||r[0][0]!==r[4][0]||r[2][0]!==r[3][0]||r[0][1]!==r[3][1]||r[0][1]!==r[4][1]||r[1][1]!==r[2][1])return!1}return!0}return!1}export{I as canQueryWithRBush,P as checkSpatialQuerySupport,v as getSpatialQueryOperator};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.28/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import has from"../../core/has.js";import e from"../../core/Logger.js";import i from"./Field.js";import
|
|
5
|
+
import has from"../../core/has.js";import e from"../../core/Logger.js";import i from"./Field.js";import t from"./FieldsIndex.js";import{fixFields as r}from"./fieldUtils.js";function s(){return{fields:{type:[i],value:null,set:function(i){if(i&&has("big-integer-warning-enabled")){const t=i.filter((e=>"big-integer"===e.type||"oid"===e.type&&e.length>=8));if(t.length){const i=t.map((e=>`'${e.name}'`)).join(", ");e.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${i}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",i)}},fieldsIndex:{readOnly:!0,get(){return t.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const i=this._userOutFields;if(!i?.length)return null;if(i.includes("*"))return["*"];if(!this.fields)return i;for(const t of i){const r=this.fieldsIndex?.has(t);r||e.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:i})}return r(this.fieldsIndex,i)}}}}export{s as defineFieldProperties};
|