@arcgis/core 4.24.0-next.20220521 → 4.24.0-next.20220525
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/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0ad179f4332d5242cc5f.js +1 -0
- package/assets/esri/core/workers/chunks/{d63f736b3560c577a8a4.js → 112b851bc61ae59fb558.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d738aab0d907cd09a9d.js → 1f4ba2fd71425b875eb4.js} +1 -1
- package/assets/esri/core/workers/chunks/{8cd8dad8bcd5c0ef445e.js → 222d51ad2b897188363c.js} +1 -1
- package/assets/esri/core/workers/chunks/4e982d988c343d71c35e.js +1 -0
- package/assets/esri/core/workers/chunks/{ab2a0480dc2b608deda3.js → 51b0bcd367a563512cbb.js} +1 -1
- package/assets/esri/core/workers/chunks/{18b4f015e1d6be7a8965.js → 5242c9badca17ba2ab25.js} +1 -1
- package/assets/esri/core/workers/chunks/525b24097af208a100da.js +1 -0
- package/assets/esri/core/workers/chunks/533d190f63c31246f3fb.js +1 -0
- package/assets/esri/core/workers/chunks/58b39f18cd0c6579e2fd.js +1 -0
- package/assets/esri/core/workers/chunks/5bfd11944c4bd19f50fb.js +1 -0
- package/assets/esri/core/workers/chunks/660abe7152e55e2bf39c.js +1 -0
- package/assets/esri/core/workers/chunks/{7391422fc51acb96a25d.js → 7727b55b4198eb5d5037.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c8c020d9e723888352b.js → 7f4c1c67551584bb9f0f.js} +1 -1
- package/assets/esri/core/workers/chunks/8bc3129cd2bd85dfd7e3.js +1 -0
- package/assets/esri/core/workers/chunks/{b597c04a4abb98e29d1c.js → 9391126baab105086d1d.js} +1 -1
- package/assets/esri/core/workers/chunks/9b4159f2e4150414b594.js +1 -0
- package/assets/esri/core/workers/chunks/a595e1026c3f7b905b00.js +1 -0
- package/assets/esri/core/workers/chunks/{b362d1ae9a87397ce2c5.js → aa40e324e59038c2f123.js} +1 -1
- package/assets/esri/core/workers/chunks/b86c18b188955aa7f48f.js +1 -0
- package/assets/esri/core/workers/chunks/be78dd8dbb8d8149d27a.js +1 -0
- package/assets/esri/core/workers/chunks/{7cf3cff7b28ff007dbad.js → d29751b88b6bd05e9c9b.js} +1 -1
- package/assets/esri/core/workers/chunks/d8a355386a75adb29980.js +1 -0
- package/assets/esri/core/workers/chunks/ddf3cbca19a02d085b1d.js +1 -0
- package/assets/esri/core/workers/chunks/e47d24c5b9ff34393dbf.js +1 -0
- package/assets/esri/core/workers/chunks/eb20148c756ff919bbbf.js +1 -0
- package/assets/esri/core/workers/chunks/{2f4a8eff11d263fa798a.js → f5d10ea7b8888f822b0c.js} +1 -1
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/base/widgets/_Editor.scss +4 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nb.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ar.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_bg.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_bs.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ca.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_cs.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_da.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_de.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_el.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_en.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_es.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_et.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_fi.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_fr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_he.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_hr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_hu.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_id.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_it.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ja.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ko.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_lt.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_lv.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_nb.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_nl.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_pl.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_pt-BR.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_pt-PT.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ro.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_ru.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sk.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sl.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_sv.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_th.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_tr.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_uk.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_vi.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_zh-CN.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_zh-HK.json +1 -1
- package/assets/esri/widgets/Daylight/t9n/Daylight_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
- package/chunks/Heatmap.glsl.js +7 -11
- package/chunks/HeatmapDensity.glsl.js +7 -20
- package/chunks/Terrain.glsl.js +38 -41
- package/chunks/geometryEngineBase.js +1 -1
- package/core/Identifiable.js +1 -1
- package/core/accessorSupport/originUtils.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/has.js +1 -1
- package/core/lang.js +1 -1
- package/core/maybe.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/watchUtils.js +1 -1
- package/geometry/projection.js +1 -1
- package/geometry/support/aaBoundingRect.js +1 -1
- package/interfaces.d.ts +762 -234
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/controllers/StreamController.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/LocalMediaElementSource.js +1 -1
- package/layers/support/VideoElement.d.ts +4 -0
- package/layers/support/VideoElement.js +5 -0
- package/layers/support/imageryRendererUtils.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/renderers/HeatmapRenderer.js +1 -1
- package/renderers/support/HeatmapColorStop.js +1 -1
- package/renderers/support/heatmapUtils.js +1 -1
- package/renderers/support/types.js +1 -1
- package/smartMapping/renderers/heatmap.js +1 -1
- package/smartMapping/statistics/heatmapStatistics.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/PaddedViewState.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/enums.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/techniques/heatmap/TechniqueHeatmap.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/support/pixelBuffering.js +1 -1
- package/views/2d/layers/features/support/rendererUtils.js +1 -1
- package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/HeatmapSource.js +1 -1
- package/views/2d/magnifier/MagnifierView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/SnowyWeather.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/SunnyWeather.js +1 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
- package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchGeometryLUT.js +5 -0
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/PlanarPatch.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainConst.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBlendInput.js +5 -0
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/sketch/SketchLabelOptions.d.ts +4 -0
- package/views/interactive/sketch/SketchLabelOptions.js +5 -0
- package/views/interactive/sketch/SketchTooltipOptions.d.ts +4 -0
- package/views/interactive/sketch/SketchTooltipOptions.js +5 -0
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/SceneSnappingManagerPool.js +5 -0
- package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/SnappingOperation.js +5 -0
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/support/viewUtils.js +1 -1
- package/views/interactive/tooltip/DrawTooltipInfos.js +1 -1
- package/views/interactive/tooltip/ExtentTooltipInfos.js +1 -1
- package/views/interactive/tooltip/ReshapeTooltipInfos.js +1 -1
- package/views/interactive/tooltip/SketchTooltipInfo.js +5 -0
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
- package/views/interactive/tooltip/TranslateTooltipInfos.js +5 -0
- package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentMoveZ.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentReshapeMoveGraphic.js +5 -0
- package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
- package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/lengthMeasurementUtils.js +1 -1
- package/webscene/Environment.js +1 -1
- package/webscene/Slide.js +1 -1
- package/webscene/SunLighting.d.ts +4 -0
- package/webscene/SunLighting.js +5 -0
- package/webscene/VirtualLighting.d.ts +4 -0
- package/webscene/VirtualLighting.js +5 -0
- package/webscene/lightingTypes.js +5 -0
- package/webscene/support/SlideEnvironment.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Daylight.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/FileLink.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/Swipe/SwipeViewModel.js +1 -1
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/tests.js +5 -0
- package/assets/esri/core/workers/chunks/1d109cd048170e2d529a.js +0 -1
- package/assets/esri/core/workers/chunks/38a752f8bd456c8912a8.js +0 -1
- package/assets/esri/core/workers/chunks/4487fb2d274e49bdb2b0.js +0 -1
- package/assets/esri/core/workers/chunks/55b2b80b9e3684feaa8e.js +0 -1
- package/assets/esri/core/workers/chunks/605202e3c29250650492.js +0 -1
- package/assets/esri/core/workers/chunks/7ea06c86adfc827fda08.js +0 -1
- package/assets/esri/core/workers/chunks/816ae3f0513ecf856f8f.js +0 -1
- package/assets/esri/core/workers/chunks/8417b3d5821b306a0fc4.js +0 -1
- package/assets/esri/core/workers/chunks/8793070d288878d6f49b.js +0 -1
- package/assets/esri/core/workers/chunks/88912dbc2b60623bc6a3.js +0 -1
- package/assets/esri/core/workers/chunks/b97a34d2e7cceef1ac41.js +0 -1
- package/assets/esri/core/workers/chunks/cd04bae81e5fc27ec97b.js +0 -1
- package/assets/esri/core/workers/chunks/f6aaee4db0bd5096164c.js +0 -1
- package/assets/esri/core/workers/chunks/f9d83a48b69c5728feba.js +0 -1
- package/assets/esri/core/workers/chunks/fc9b5f40c5179a8c90de.js +0 -1
- package/assets/esri/core/workers/chunks/fe18d2d251a5ad80eb54.js +0 -1
- package/assets/esri/images/search/search-symbol-32.svg +0 -1
- package/assets/esri/themes/base/widgets/_NumericalFeedbackControls.scss +0 -23
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ar.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bg.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bs.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ca.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_cs.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_da.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_de.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_el.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_en.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_es.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_et.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fi.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_he.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hu.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_id.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_it.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ja.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ko.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lt.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lv.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nb.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nl.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pl.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-BR.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-PT.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ro.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ru.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sk.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sl.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sv.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_th.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_tr.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_uk.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_vi.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-CN.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-HK.json +0 -1
- package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-TW.json +0 -1
- package/views/interactive/tooltip/NumericalFeedbackOptions.d.ts +0 -4
- package/views/interactive/tooltip/NumericalFeedbackOptions.js +0 -5
- package/views/interactive/tooltip/SegmentLabelOptions.js +0 -5
- package/views/interactive/tooltip/TooltipOptions.js +0 -5
- package/views/interactive/tooltip/content/TooltipContentExtentMoveXY.js +0 -5
- package/webscene/Lighting.d.ts +0 -4
- package/webscene/Lighting.js +0 -5
- package/widgets/support/NumericalFeedbackControls/NumericalFeedbackControlsViewModel.js +0 -5
- package/widgets/support/NumericalFeedbackControls/VisibleElements.js +0 -5
- package/widgets/support/NumericalFeedbackControls/css.js +0 -5
- package/widgets/support/NumericalFeedbackControls.js +0 -5
package/widgets/Popup.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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{eventKey as i}from"../core/events.js";import o from"../core/Handles.js";import{equalsShallow as n}from"../core/lang.js";import s from"../core/Logger.js";import{isNone as r}from"../core/maybe.js";import{watch as a,when as l,on as u,whenOnce as c,initial as d}from"../core/reactiveUtils.js";import{throttle as p}from"../core/throttle.js";import{aliasOf as h}from"../core/accessorSupport/decorators/aliasOf.js";import{cast as g}from"../core/accessorSupport/decorators/cast.js";import{property as _}from"../core/accessorSupport/decorators/property.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import v from"./Feature.js";import m from"./Spinner.js";import b from"./Widget.js";import{FeatureContentMixin as M}from"./Feature/support/FeatureContentMixin.js";import w from"./Popup/PopupViewModel.js";import{Heading as y}from"./support/Heading.js";import{accessibleHandler as k}from"./support/decorators/accessibleHandler.js";import{messageBundle as A}from"./support/decorators/messageBundle.js";import{vmEvent as C}from"./support/decorators/vmEvent.js";import{tsx as F}from"./support/jsxFactory.js";import{isRTL as I,storeNode as O,cssTransition as x}from"./support/widgetUtils.js";import{substitute as N}from"../intl/substitute.js";const T="selected-index",B=0,D="popup-spinner",E={iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconDockToTop:"esri-icon-maximize",iconDockToBottom:"esri-icon-dock-bottom",iconDockToLeft:"esri-icon-dock-left",iconDockToRight:"esri-icon-dock-right",iconClose:"esri-icon-close",iconUndock:"esri-icon-minimize",iconCheckMark:"esri-icon-check-mark",iconLoading:"esri-icon-loading-indicator",iconDefaultAction:"esri-icon-default-action",iconActionsMenu:"esri-icon-handle-horizontal",rotating:"esri-rotating",base:"esri-popup",widget:"esri-widget",main:"esri-popup__main-container",loadingContainer:"esri-popup__loading-container",isCollapsible:"esri-popup--is-collapsible",isCollapsed:"esri-popup--is-collapsed",shadow:"esri-popup--shadow",isDocked:"esri-popup--is-docked",isDockedTopLeft:"esri-popup--is-docked-top-left",isDockedTopCenter:"esri-popup--is-docked-top-center",isDockedTopRight:"esri-popup--is-docked-top-right",isDockedBottomLeft:"esri-popup--is-docked-bottom-left",isDockedBottomCenter:"esri-popup--is-docked-bottom-center",isDockedBottomRight:"esri-popup--is-docked-bottom-right",alignTopCenter:"esri-popup--aligned-top-center",alignBottomCenter:"esri-popup--aligned-bottom-center",alignTopLeft:"esri-popup--aligned-top-left",alignBottomLeft:"esri-popup--aligned-bottom-left",alignTopRight:"esri-popup--aligned-top-right",alignBottomRight:"esri-popup--aligned-bottom-right",isFeatureMenuOpen:"esri-popup--feature-menu-open",isActionsMenuOpen:"esri-popup--actions-menu-open",hasFeatureUpdated:"esri-popup--feature-updated",header:"esri-popup__header",headerButtons:"esri-popup__header-buttons",headerContainer:"esri-popup__header-container",headerContainerButton:"esri-popup__header-container--button",headerTitle:"esri-popup__header-title",content:"esri-popup__content",footer:"esri-popup__footer",footerHasPagination:"esri-popup__footer--has-pagination",footerHasActions:"esri-popup__footer--has-actions",footerHasActionsMenu:"esri-popup__footer--has-actions-menu",button:"esri-popup__button",buttonDisabled:"esri-popup__button--disabled",buttonDock:"esri-popup__button--dock",icon:"esri-popup__icon",iconDock:"esri-popup__icon--dock-icon",inlineActionsContainer:"esri-popup__inline-actions-container",actionsMenuButton:"esri-popup__actions-menu-button",actions:"esri-popup__actions",action:"esri-popup__action",actionImage:"esri-popup__action-image",actionText:"esri-popup__action-text",actionToggle:"esri-popup__action-toggle",actionToggleOn:"esri-popup__action-toggle--on",pointer:"esri-popup__pointer",pointerDirection:"esri-popup__pointer-direction",navigation:"esri-popup__navigation",paginationPrevious:"esri-popup__pagination-previous",paginationNext:"esri-popup__pagination-next",paginationPreviousIconLTR:"esri-popup__pagination-previous-icon",paginationPreviousIconRTL:"esri-popup__pagination-previous-icon--rtl",paginationNextIconLTR:"esri-popup__pagination-next-icon",paginationNextIconRTL:"esri-popup__pagination-next-icon--rtl",featureMenu:"esri-popup__feature-menu",featureMenuList:"esri-popup__feature-menu-list",featureMenuItem:"esri-popup__feature-menu-item",featureMenuViewport:"esri-popup__feature-menu-viewport",featureMenuHeader:"esri-popup__feature-menu-header",featureMenuNote:"esri-popup__feature-menu-note",featureMenuSelected:"esri-popup__feature-menu-item--selected",featureMenuButton:"esri-popup__feature-menu-button",featureMenuTitle:"esri-popup__feature-menu-title",featureMenuObserver:"esri-popup__feature-menu-observer",featureMenuLoader:"esri-popup__feature-menu-loader",collapseButton:"esri-popup__collapse-button"},P={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},L="esri-popup";function S(e,t){return void 0===t?`${L}__${e}`:`${L}__${e}-${t}`}const V="esri.widgets.Popup",R=s.getLogger(V),U={closeButton:!0,featureNavigation:!0};let j=class extends(M(b)){constructor(e,t){super(e,t),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new o,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=p((()=>this._displaySpinner()),B),this.actions=null,this.alignment="auto",this.autoCloseEnabled=null,this.autoOpenEnabled=null,this.defaultPopupTemplateEnabled=null,this.content=null,this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.featureCount=null,this.featureMenuOpen=!1,this.features=null,this.goToOverride=null,this.headingLevel=2,this.highlightEnabled=null,this.location=null,this.label=void 0,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.promises=null,this.selectedFeature=null,this.selectedFeatureIndex=null,this.spinnerEnabled=!0,this.title=null,this.updateLocationEnabled=null,this.view=null,this.viewModel=new w,this.visible=null,this.visibleElements={...U},this._addSelectedFeatureIndexHandle(),this.own([a((()=>this.viewModel?.screenLocation),(()=>this._positionContainer())),a((()=>[this.viewModel?.active,this.dockEnabled]),(()=>this._toggleScreenLocationEnabled()),{equals:n}),a((()=>this.viewModel?.screenLocation),((e,t)=>{!!e!=!!t&&this.reposition()})),a((()=>[this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment]),(()=>this.reposition()),{equals:n}),a((()=>this.spinnerEnabled),(e=>this._spinnerEnabledChange(e))),a((()=>this.viewModel?.view?.size),((e,t)=>this._updateDockEnabledForViewSize(e,t))),a((()=>this.viewModel?.view),((e,t)=>this._viewChange(e,t))),a((()=>this.viewModel?.view?.ready),((e,t)=>this._viewReadyChange(e,t))),a((()=>[this.viewModel?.waitingForResult,this.viewModel?.location]),(()=>{this._hideSpinner(),this._displaySpinnerThrottled()}),{equals:n}),a((()=>[this.selectedFeatureWidget?.viewModel?.title,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setTitleFromFeatureWidget()),{equals:n}),a((()=>[this.selectedFeatureWidget?.viewModel?.content,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setContentFromFeatureWidget()),{equals:n}),l((()=>!this.collapsed),(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),u((()=>this.viewModel?.allActions),"change",(()=>this._watchActions())),a((()=>this.viewModel?.allActions),(()=>this._watchActions()),d),a((()=>this.viewModel?.featureViewModels),(()=>this._featureMenuViewportScrollTop()))])}destroy(){this._destroySelectedFeatureWidget(),this._destroySpinner(),this._handles?.destroy(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect(),this._handles=null}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){return!!(this.selectedFeatureWidget?this.selectedFeatureWidget?.viewModel?.waitingForContent||"error"===this.selectedFeatureWidget?.viewModel?.state||this.selectedFeatureWidget?.viewModel?.content:this.viewModel?.content)}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||P}set dockOptions(e){const t={...P},i=this.get("viewModel.view.breakpoints"),o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;!0===r?n.breakpoint=s:"object"==typeof r&&(n.breakpoint={...s,...r}),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i}=this,{selectedFeatureViewModel:o}=this.viewModel,n={...t,title:!1};return o?(e?(e.viewModel=o,e.visibleElements=n):this._feature=new v({headingLevel:i+1,viewModel:o,visibleElements:n}),this._feature):null}castVisibleElements(e){return{...U,...e}}blur(){const{active:e}=this.viewModel;e||R.warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||R.warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this._handles.remove(T);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:a}=o,l=r&&a.length>1&&e,u=r&&t,c=r&&!t,d=this.selectedFeature?.layer?.title,p=this.selectedFeature?.layer?.id,h={[E.alignTopCenter]:"top-center"===n,[E.alignBottomCenter]:"bottom-center"===n,[E.alignTopLeft]:"top-left"===n,[E.alignBottomLeft]:"bottom-left"===n,[E.alignTopRight]:"top-right"===n,[E.alignBottomRight]:"bottom-right"===n,[E.isDocked]:u,[E.shadow]:c,[E.isDockedTopLeft]:"top-left"===s,[E.isDockedTopCenter]:"top-center"===s,[E.isDockedTopRight]:"top-right"===s,[E.isDockedBottomLeft]:"bottom-left"===s,[E.isDockedBottomCenter]:"bottom-center"===s,[E.isDockedBottomRight]:"bottom-right"===s,[E.isFeatureMenuOpen]:i,[E.isActionsMenuOpen]:l};return F("div",{class:this.classes(E.base,h),role:"presentation","data-layer-title":d,"data-layer-id":p,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return F("span",{"aria-hidden":"true",class:this.classes(E.icon,E.iconLoading,E.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?F("div",{key:S("loading-container"),role:"presentation",class:E.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousIcon(){const e=I(this.container),t={[E.iconRightTriangleArrow]:e,[E.paginationPreviousIconRTL]:e,[E.iconLeftTriangleArrow]:!e,[E.paginationPreviousIconLTR]:!e};return F("span",{"aria-hidden":"true",class:this.classes(E.icon,t)})}renderPreviousButton(){const{messages:e}=this;return F("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(E.button,E.paginationPrevious),"aria-label":e.previous,title:e.previous},this.renderPreviousIcon())}renderNextIcon(){const e=I(this.container),t={[E.iconLeftTriangleArrow]:e,[E.paginationNextIconRTL]:e,[E.iconRightTriangleArrow]:!e,[E.paginationNextIconLTR]:!e};return F("span",{"aria-hidden":"true",class:this.classes(E.icon,t)})}renderNextButton(){const{messages:e}=this;return F("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(E.button,E.paginationNext),"aria-label":e.next,title:e.next},this.renderNextIcon())}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return F("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:this.classes(E.button,E.featureMenuButton),"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton(),this.renderNextButton()]:null}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[E.iconUndock]:e,[E.iconDock]:!e,[E.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[E.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[E.iconDockToTop]:!e&&"top-center"===t,[E.iconDockToBottom]:!e&&"bottom-center"===t};return F("span",{"aria-hidden":"true",class:this.classes(i,E.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?F("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(E.button,E.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[E.headerContainerButton]:i},r=F(y,{level:this.headingLevel,class:E.headerTitle,innerHTML:e}),a=i?F("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(E.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r):F("div",{key:e,id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(E.headerContainer,s)},r);return e?a:null}renderCloseIcon(){return F("span",{"aria-hidden":"true",class:this.classes(E.icon,E.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?F("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:E.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return F("header",{class:E.header},this.renderTitle(),F("div",{class:E.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i}=this,{content:o}=this.viewModel;return t&&!i?F("article",{key:o,enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:E.content},this.renderContent()):null}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?F("div",{key:S("actions-menu-button"),class:this.classes(E.button,E.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},F("span",{"aria-hidden":"true",class:E.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?F("ul",{id:e,role:"menu","aria-labelledby":t,key:S("actions"),class:E.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return!!e.length&&e.toArray().map((e=>this.renderAction({action:e,type:"inline"})))}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?F("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:E.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?F("section",{key:S("navigation"),class:this.classes(E.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[E.footerHasPagination]:e,[E.footerHasActions]:n,[E.footerHasActionsMenu]:s};return e||n?F("div",{key:S("feature-buttons"),class:this.classes(E.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=N(e.selectedFeatures,{total:t.length});return F("section",{key:S("menu"),class:E.featureMenu},F("strong",{class:E.featureMenuHeader},o),F("nav",{bind:this,class:E.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:O},this.renderFeatureMenu(),F("div",{class:E.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?F("div",{class:E.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:F("div",{key:S("pointer"),class:E.pointer,role:"presentation"},F("div",{class:this.classes(E.pointerDirection,E.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:a,visibleElements:l}=this,{title:u}=this.viewModel,c="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,p={[E.shadow]:e,[E.isCollapsible]:s,[E.isCollapsed]:a};return F("div",{class:this.classes(E.main,E.widget,p),tabIndex:l.closeButton?null:-1,role:"dialog","aria-labelledby":u?o:"","aria-describedby":r&&!a?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},c?this.renderFooter():null,c?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?F("div",{key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return F("span",{key:"text",class:E.actionText},e)}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[E.iconLoading]:e.active,[E.rotating]:e.active,[E.icon]:!!t,[E.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),F("span",{key:"icon","aria-hidden":"true",class:this.classes(E.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[E.action]:"toggle"!==t.type,[E.actionToggle]:"toggle"===t.type,[E.actionToggleOn]:"toggle"===t.type&&t.value,[E.buttonDisabled]:t.disabled},s=[this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?F("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(E.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):F("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(E.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,a={[E.featureMenuSelected]:r},l=r?F("span",{key:S(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:E.iconCheckMark}):null,u=F("span",{innerHTML:e.title||o.untitled});return F("li",{role:"menuitem",tabIndex:-1,key:S(`feature-menu-feature-${n}`),class:this.classes(a,E.featureMenuItem),bind:this,"data-feature-index":t,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature,onmouseover:this._setActiveFeature,onmouseleave:this._removeActiveFeature},F("span",{class:E.featureMenuTitle},u,l))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?F("ol",{class:E.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r="zoom-to-feature"===n?N(e.title,{messages:t}):"remove-selected-feature"===n?N(e.title,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?N(e.title,{messages:t}):e.title;return r&&s?N(r,s):r}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:E.iconDefaultAction;return s&&i?N(s,i):s}_getActionImage(e){const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?N(o,i):o}_createFeatureUpdatedAnimation(){return x("enter",E.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach((e=>{this._handles.add(a((()=>[e.uid,e.active,e.className,e.disabled,e.id,e.title,e.image,e.visible]),(()=>this.scheduleRender()),{equals:n}),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_setActiveFeature(e){const{viewModel:t}=this,i=e.currentTarget["data-feature-index"];t.activeFeature=t.features[i]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_handleFeatureMenuItemKeyup(e){const t=i(e),{_featureMenuNode:o}=this,n=e.currentTarget["data-feature-index"];if(!o)return;const s=o.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=i(e),{_actionsMenuNode:o}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!o)return;const a=o.querySelectorAll("li"),l=a.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();a[a.length-1].focus()}else{e.stopPropagation();a[0].focus()}else{e.stopPropagation();a[(r+1+l)%l].focus()}else{e.stopPropagation();a[(r-1+l)%l].focus()}}_handleMainKeyup(e){const t=i(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e.shouldFocus&&(await c((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=a((()=>this.viewModel?.selectedFeatureIndex),((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this._handles.add(e,T)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this.actionsMenuOpen=!1,this.featureMenuOpen=!1)}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:s,view:a}=n;if(r(s)||!a||!i)return"top-center";if(!this._isScreenLocationWithinView(s,a))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replace(/[^-\d\.]/g,""),10)}const u=o?window.getComputedStyle(o,null):null,c=u?l(u.getPropertyValue("max-height")):0,d=u?l(u.getPropertyValue("height")):0,{height:p,width:h}=i.getBoundingClientRect(),g=h+t,_=Math.max(p,c,d)+t,f=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:s,side:"right",view:a}),v=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:s,side:"left",view:a}),m=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:s,side:"top",view:a}),b=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:s,side:"bottom",view:a});return v?m?"bottom-right":"top-right":f?m?"bottom-left":"top-left":m?b?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return I(this.container)&&t.reverse(),e.replace(/leading/gi,t[0]).replace(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=I(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!e)return;const{screenLocation:t}=this.viewModel,{width:i}=e.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&(e.style.top=o.top,e.style.left=o.left,e.style.bottom=o.bottom,e.style.right=o.right)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this,r=o/2,a=i.height-t,l=i.width-e,{padding:u}=this.view;return"bottom-center"===n?{top:t+s-u.top,left:e-r-u.left}:"top-left"===n?{bottom:a+s-u.bottom,right:l+s-u.right}:"bottom-left"===n?{top:t+s-u.top,right:l+s-u.right}:"top-right"===n?{bottom:a+s-u.bottom,left:e+s-u.left}:"bottom-right"===n?{top:t+s-u.top,left:e+s-u.left}:"top-center"===n?{bottom:a+s-u.bottom,left:e-r-u.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(r(e)||!t)return;const n=this._calculateFullWidth(t),s=this._calculateAlignmentPosition(e.x,e.y,o,n);return s?{top:void 0!==s.top?`${s.top}px`:"auto",left:void 0!==s.left?`${s.left}px`:"auto",bottom:void 0!==s.bottom?`${s.bottom}px`:"auto",right:void 0!==s.right?`${s.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:a,height:l}=i;return o<=a&&s>a||o>a&&s<=a||n<=l&&r>l||n>l&&r<=l}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:a}=this,l=a.breakpoint;this._dockingThresholdCrossed(s,r,l)&&this._setDockEnabledForViewSize(a),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;const s=t.hasOwnProperty("width")&&o<=t.width,r=t.hasOwnProperty("height")&&n<=t.height;return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?N(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t&&t.ui&&t.ui.remove(this._spinner,D),e.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new m({view:e}),e.ui.add(this._spinner,{key:D,position:"manual"}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.getItemAt(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=e.currentTarget["data-feature-index"];isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};e([_({readOnly:!0})],j.prototype,"actionsMenuId",null),e([_({readOnly:!0})],j.prototype,"actionsMenuButtonId",null),e([_({readOnly:!0})],j.prototype,"featureMenuId",null),e([_({readOnly:!0})],j.prototype,"titleId",null),e([_({readOnly:!0})],j.prototype,"contentId",null),e([_({readOnly:!0})],j.prototype,"hasContent",null),e([_({readOnly:!0})],j.prototype,"featureNavigationVisible",null),e([_({readOnly:!0})],j.prototype,"collapsible",null),e([_({readOnly:!0})],j.prototype,"featureMenuVisible",null),e([_({readOnly:!0})],j.prototype,"contentCollapsed",null),e([_({readOnly:!0})],j.prototype,"dividedActions",null),e([h("viewModel.actions")],j.prototype,"actions",void 0),e([_()],j.prototype,"actionsMenuOpen",null),e([_()],j.prototype,"alignment",void 0),e([h("viewModel.autoCloseEnabled")],j.prototype,"autoCloseEnabled",void 0),e([h("viewModel.autoOpenEnabled")],j.prototype,"autoOpenEnabled",void 0),e([h("viewModel.defaultPopupTemplateEnabled")],j.prototype,"defaultPopupTemplateEnabled",void 0),e([h("viewModel.content")],j.prototype,"content",void 0),e([_()],j.prototype,"collapsed",void 0),e([_()],j.prototype,"collapseEnabled",void 0),e([_({readOnly:!0})],j.prototype,"currentAlignment",null),e([_({readOnly:!0})],j.prototype,"currentDockPosition",null),e([_()],j.prototype,"dockOptions",null),e([_()],j.prototype,"dockEnabled",void 0),e([h("viewModel.featureCount")],j.prototype,"featureCount",void 0),e([_()],j.prototype,"featureMenuOpen",void 0),e([h("viewModel.features")],j.prototype,"features",void 0),e([h("viewModel.goToOverride")],j.prototype,"goToOverride",void 0),e([_()],j.prototype,"headingLevel",void 0),e([h("viewModel.highlightEnabled")],j.prototype,"highlightEnabled",void 0),e([h("viewModel.location")],j.prototype,"location",void 0),e([_({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],j.prototype,"label",void 0),e([_()],j.prototype,"maxInlineActions",void 0),e([_(),A("esri/widgets/Popup/t9n/Popup")],j.prototype,"messages",void 0),e([_(),A("esri/t9n/common")],j.prototype,"messagesCommon",void 0),e([h("viewModel.promises")],j.prototype,"promises",void 0),e([h("viewModel.selectedFeature")],j.prototype,"selectedFeature",void 0),e([h("viewModel.selectedFeatureIndex")],j.prototype,"selectedFeatureIndex",void 0),e([_({readOnly:!0})],j.prototype,"selectedFeatureWidget",null),e([_()],j.prototype,"spinnerEnabled",void 0),e([h("viewModel.title")],j.prototype,"title",void 0),e([h("viewModel.updateLocationEnabled")],j.prototype,"updateLocationEnabled",void 0),e([h("viewModel.view")],j.prototype,"view",void 0),e([_({type:w}),C(["triggerAction","trigger-action"])],j.prototype,"viewModel",void 0),e([h("viewModel.visible")],j.prototype,"visible",void 0),e([_()],j.prototype,"visibleElements",void 0),e([g("visibleElements")],j.prototype,"castVisibleElements",null),e([k()],j.prototype,"_close",null),e([k()],j.prototype,"_toggleDockEnabled",null),e([k()],j.prototype,"_toggleFeatureMenu",null),e([k()],j.prototype,"_toggleActionsMenu",null),e([k()],j.prototype,"_triggerAction",null),e([k()],j.prototype,"_selectFeature",null),e([k()],j.prototype,"_next",null),e([k()],j.prototype,"_previous",null),j=e([f(V)],j);const W=j;export{W as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{eventKey as i}from"../core/events.js";import o from"../core/Handles.js";import n from"../core/Logger.js";import{isNone as s}from"../core/maybe.js";import{watch as r,when as a,on as l,whenOnce as u,initial as c}from"../core/reactiveUtils.js";import{throttle as d}from"../core/throttle.js";import{aliasOf as p}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as h}from"../core/accessorSupport/decorators/cast.js";import{property as g}from"../core/accessorSupport/decorators/property.js";import{subclass as _}from"../core/accessorSupport/decorators/subclass.js";import f from"./Feature.js";import v from"./Spinner.js";import m from"./Widget.js";import{FeatureContentMixin as b}from"./Feature/support/FeatureContentMixin.js";import M from"./Popup/PopupViewModel.js";import{Heading as w}from"./support/Heading.js";import{accessibleHandler as y}from"./support/decorators/accessibleHandler.js";import{messageBundle as k}from"./support/decorators/messageBundle.js";import{vmEvent as A}from"./support/decorators/vmEvent.js";import{tsx as C}from"./support/jsxFactory.js";import{isRTL as F,storeNode as I,cssTransition as O}from"./support/widgetUtils.js";import{substitute as x}from"../intl/substitute.js";const N="selected-index",T=0,B="popup-spinner",D={iconLeftTriangleArrow:"esri-icon-left-triangle-arrow",iconRightTriangleArrow:"esri-icon-right-triangle-arrow",iconDockToTop:"esri-icon-maximize",iconDockToBottom:"esri-icon-dock-bottom",iconDockToLeft:"esri-icon-dock-left",iconDockToRight:"esri-icon-dock-right",iconClose:"esri-icon-close",iconUndock:"esri-icon-minimize",iconCheckMark:"esri-icon-check-mark",iconLoading:"esri-icon-loading-indicator",iconDefaultAction:"esri-icon-default-action",iconActionsMenu:"esri-icon-handle-horizontal",rotating:"esri-rotating",base:"esri-popup",widget:"esri-widget",main:"esri-popup__main-container",loadingContainer:"esri-popup__loading-container",isCollapsible:"esri-popup--is-collapsible",isCollapsed:"esri-popup--is-collapsed",shadow:"esri-popup--shadow",isDocked:"esri-popup--is-docked",isDockedTopLeft:"esri-popup--is-docked-top-left",isDockedTopCenter:"esri-popup--is-docked-top-center",isDockedTopRight:"esri-popup--is-docked-top-right",isDockedBottomLeft:"esri-popup--is-docked-bottom-left",isDockedBottomCenter:"esri-popup--is-docked-bottom-center",isDockedBottomRight:"esri-popup--is-docked-bottom-right",alignTopCenter:"esri-popup--aligned-top-center",alignBottomCenter:"esri-popup--aligned-bottom-center",alignTopLeft:"esri-popup--aligned-top-left",alignBottomLeft:"esri-popup--aligned-bottom-left",alignTopRight:"esri-popup--aligned-top-right",alignBottomRight:"esri-popup--aligned-bottom-right",isFeatureMenuOpen:"esri-popup--feature-menu-open",isActionsMenuOpen:"esri-popup--actions-menu-open",hasFeatureUpdated:"esri-popup--feature-updated",header:"esri-popup__header",headerButtons:"esri-popup__header-buttons",headerContainer:"esri-popup__header-container",headerContainerButton:"esri-popup__header-container--button",headerTitle:"esri-popup__header-title",content:"esri-popup__content",footer:"esri-popup__footer",footerHasPagination:"esri-popup__footer--has-pagination",footerHasActions:"esri-popup__footer--has-actions",footerHasActionsMenu:"esri-popup__footer--has-actions-menu",button:"esri-popup__button",buttonDisabled:"esri-popup__button--disabled",buttonDock:"esri-popup__button--dock",icon:"esri-popup__icon",iconDock:"esri-popup__icon--dock-icon",inlineActionsContainer:"esri-popup__inline-actions-container",actionsMenuButton:"esri-popup__actions-menu-button",actions:"esri-popup__actions",action:"esri-popup__action",actionImage:"esri-popup__action-image",actionText:"esri-popup__action-text",actionToggle:"esri-popup__action-toggle",actionToggleOn:"esri-popup__action-toggle--on",pointer:"esri-popup__pointer",pointerDirection:"esri-popup__pointer-direction",navigation:"esri-popup__navigation",paginationPrevious:"esri-popup__pagination-previous",paginationNext:"esri-popup__pagination-next",paginationPreviousIconLTR:"esri-popup__pagination-previous-icon",paginationPreviousIconRTL:"esri-popup__pagination-previous-icon--rtl",paginationNextIconLTR:"esri-popup__pagination-next-icon",paginationNextIconRTL:"esri-popup__pagination-next-icon--rtl",featureMenu:"esri-popup__feature-menu",featureMenuList:"esri-popup__feature-menu-list",featureMenuItem:"esri-popup__feature-menu-item",featureMenuViewport:"esri-popup__feature-menu-viewport",featureMenuHeader:"esri-popup__feature-menu-header",featureMenuNote:"esri-popup__feature-menu-note",featureMenuSelected:"esri-popup__feature-menu-item--selected",featureMenuButton:"esri-popup__feature-menu-button",featureMenuTitle:"esri-popup__feature-menu-title",featureMenuObserver:"esri-popup__feature-menu-observer",featureMenuLoader:"esri-popup__feature-menu-loader",collapseButton:"esri-popup__collapse-button"},E={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},P="esri-popup";function L(e,t){return void 0===t?`${P}__${e}`:`${P}__${e}-${t}`}const S="esri.widgets.Popup",V=n.getLogger(S),U={closeButton:!0,featureNavigation:!0};let R=class extends(b(m)){constructor(e,t){super(e,t),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new o,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=d((()=>this._displaySpinner()),T),this.actions=null,this.alignment="auto",this.autoCloseEnabled=null,this.autoOpenEnabled=null,this.defaultPopupTemplateEnabled=null,this.content=null,this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.featureCount=null,this.featureMenuOpen=!1,this.features=null,this.goToOverride=null,this.headingLevel=2,this.highlightEnabled=null,this.location=null,this.label=void 0,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.promises=null,this.selectedFeature=null,this.selectedFeatureIndex=null,this.spinnerEnabled=!0,this.title=null,this.updateLocationEnabled=null,this.view=null,this.viewModel=new M,this.visible=null,this.visibleElements={...U},this._addSelectedFeatureIndexHandle(),this.own([r((()=>this.viewModel?.screenLocation),(()=>this._positionContainer())),r((()=>[this.viewModel?.active,this.dockEnabled]),(()=>this._toggleScreenLocationEnabled())),r((()=>this.viewModel?.screenLocation),((e,t)=>{!!e!=!!t&&this.reposition()})),r((()=>[this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment]),(()=>this.reposition())),r((()=>this.spinnerEnabled),(e=>this._spinnerEnabledChange(e))),r((()=>this.viewModel?.view?.size),((e,t)=>this._updateDockEnabledForViewSize(e,t))),r((()=>this.viewModel?.view),((e,t)=>this._viewChange(e,t))),r((()=>this.viewModel?.view?.ready),((e,t)=>this._viewReadyChange(e,t))),r((()=>[this.viewModel?.waitingForResult,this.viewModel?.location]),(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),r((()=>[this.selectedFeatureWidget?.viewModel?.title,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setTitleFromFeatureWidget())),r((()=>[this.selectedFeatureWidget?.viewModel?.content,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setContentFromFeatureWidget())),a((()=>!this.collapsed),(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),l((()=>this.viewModel?.allActions),"change",(()=>this._watchActions())),r((()=>this.viewModel?.allActions),(()=>this._watchActions()),c),r((()=>this.viewModel?.featureViewModels),(()=>this._featureMenuViewportScrollTop()))])}destroy(){this._destroySelectedFeatureWidget(),this._destroySpinner(),this._handles?.destroy(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect(),this._handles=null}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){return!!(this.selectedFeatureWidget?this.selectedFeatureWidget?.viewModel?.waitingForContent||"error"===this.selectedFeatureWidget?.viewModel?.state||this.selectedFeatureWidget?.viewModel?.content:this.viewModel?.content)}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||E}set dockOptions(e){const t={...E},i=this.get("viewModel.view.breakpoints"),o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;!0===r?n.breakpoint=s:"object"==typeof r&&(n.breakpoint={...s,...r}),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i}=this,{selectedFeatureViewModel:o}=this.viewModel,n={...t,title:!1};return o?(e?(e.viewModel=o,e.visibleElements=n):this._feature=new f({headingLevel:i+1,viewModel:o,visibleElements:n}),this._feature):null}castVisibleElements(e){return{...U,...e}}blur(){const{active:e}=this.viewModel;e||V.warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||V.warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this._handles.remove(N);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:a}=o,l=r&&a.length>1&&e,u=r&&t,c=r&&!t,d=this.selectedFeature?.layer?.title,p=this.selectedFeature?.layer?.id,h={[D.alignTopCenter]:"top-center"===n,[D.alignBottomCenter]:"bottom-center"===n,[D.alignTopLeft]:"top-left"===n,[D.alignBottomLeft]:"bottom-left"===n,[D.alignTopRight]:"top-right"===n,[D.alignBottomRight]:"bottom-right"===n,[D.isDocked]:u,[D.shadow]:c,[D.isDockedTopLeft]:"top-left"===s,[D.isDockedTopCenter]:"top-center"===s,[D.isDockedTopRight]:"top-right"===s,[D.isDockedBottomLeft]:"bottom-left"===s,[D.isDockedBottomCenter]:"bottom-center"===s,[D.isDockedBottomRight]:"bottom-right"===s,[D.isFeatureMenuOpen]:i,[D.isActionsMenuOpen]:l};return C("div",{class:this.classes(D.base,h),role:"presentation","data-layer-title":d,"data-layer-id":p,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return C("span",{"aria-hidden":"true",class:this.classes(D.icon,D.iconLoading,D.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?C("div",{key:L("loading-container"),role:"presentation",class:D.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousIcon(){const e=F(this.container),t={[D.iconRightTriangleArrow]:e,[D.paginationPreviousIconRTL]:e,[D.iconLeftTriangleArrow]:!e,[D.paginationPreviousIconLTR]:!e};return C("span",{"aria-hidden":"true",class:this.classes(D.icon,t)})}renderPreviousButton(){const{messages:e}=this;return C("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(D.button,D.paginationPrevious),"aria-label":e.previous,title:e.previous},this.renderPreviousIcon())}renderNextIcon(){const e=F(this.container),t={[D.iconLeftTriangleArrow]:e,[D.paginationNextIconRTL]:e,[D.iconRightTriangleArrow]:!e,[D.paginationNextIconLTR]:!e};return C("span",{"aria-hidden":"true",class:this.classes(D.icon,t)})}renderNextButton(){const{messages:e}=this;return C("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(D.button,D.paginationNext),"aria-label":e.next,title:e.next},this.renderNextIcon())}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return C("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:this.classes(D.button,D.featureMenuButton),"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton(),this.renderNextButton()]:null}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[D.iconUndock]:e,[D.iconDock]:!e,[D.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[D.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[D.iconDockToTop]:!e&&"top-center"===t,[D.iconDockToBottom]:!e&&"bottom-center"===t};return C("span",{"aria-hidden":"true",class:this.classes(i,D.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?C("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(D.button,D.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[D.headerContainerButton]:i},r=C(w,{level:this.headingLevel,class:D.headerTitle,innerHTML:e}),a=i?C("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(D.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r):C("div",{key:e,id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(D.headerContainer,s)},r);return e?a:null}renderCloseIcon(){return C("span",{"aria-hidden":"true",class:this.classes(D.icon,D.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?C("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:D.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return C("header",{class:D.header},this.renderTitle(),C("div",{class:D.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i}=this,{content:o}=this.viewModel;return t&&!i?C("article",{key:o,enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:D.content},this.renderContent()):null}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?C("div",{key:L("actions-menu-button"),class:this.classes(D.button,D.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},C("span",{"aria-hidden":"true",class:D.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?C("ul",{id:e,role:"menu","aria-labelledby":t,key:L("actions"),class:D.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return!!e.length&&e.toArray().map((e=>this.renderAction({action:e,type:"inline"})))}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?C("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:D.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?C("section",{key:L("navigation"),class:this.classes(D.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[D.footerHasPagination]:e,[D.footerHasActions]:n,[D.footerHasActionsMenu]:s};return e||n?C("div",{key:L("feature-buttons"),class:this.classes(D.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=x(e.selectedFeatures,{total:t.length});return C("section",{key:L("menu"),class:D.featureMenu},C("strong",{class:D.featureMenuHeader},o),C("nav",{bind:this,class:D.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:I},this.renderFeatureMenu(),C("div",{class:D.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?C("div",{class:D.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:C("div",{key:L("pointer"),class:D.pointer,role:"presentation"},C("div",{class:this.classes(D.pointerDirection,D.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:a,visibleElements:l}=this,{title:u}=this.viewModel,c="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,p={[D.shadow]:e,[D.isCollapsible]:s,[D.isCollapsed]:a};return C("div",{class:this.classes(D.main,D.widget,p),tabIndex:l.closeButton?null:-1,role:"dialog","aria-labelledby":u?o:"","aria-describedby":r&&!a?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},c?this.renderFooter():null,c?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?C("div",{key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return C("span",{key:"text",class:D.actionText},e)}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[D.iconLoading]:e.active,[D.rotating]:e.active,[D.icon]:!!t,[D.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),C("span",{key:"icon","aria-hidden":"true",class:this.classes(D.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[D.action]:"toggle"!==t.type,[D.actionToggle]:"toggle"===t.type,[D.actionToggleOn]:"toggle"===t.type&&t.value,[D.buttonDisabled]:t.disabled},s=[this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?C("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(D.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):C("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(D.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,a={[D.featureMenuSelected]:r},l=r?C("span",{key:L(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:D.iconCheckMark}):null,u=C("span",{innerHTML:e.title||o.untitled});return C("li",{role:"menuitem",tabIndex:-1,key:L(`feature-menu-feature-${n}`),class:this.classes(a,D.featureMenuItem),bind:this,"data-feature-index":t,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature,onmouseover:this._setActiveFeature,onmouseleave:this._removeActiveFeature},C("span",{class:D.featureMenuTitle},u,l))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?C("ol",{class:D.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r="zoom-to-feature"===n?x(e.title,{messages:t}):"remove-selected-feature"===n?x(e.title,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?x(e.title,{messages:t}):e.title;return r&&s?x(r,s):r}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:D.iconDefaultAction;return s&&i?x(s,i):s}_getActionImage(e){const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?x(o,i):o}_createFeatureUpdatedAnimation(){return O("enter",D.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach((e=>{this._handles.add(r((()=>[e.uid,e.active,e.className,e.disabled,e.id,e.title,e.image,e.visible]),(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===i(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_setActiveFeature(e){const{viewModel:t}=this,i=e.currentTarget["data-feature-index"];t.activeFeature=t.features[i]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_handleFeatureMenuItemKeyup(e){const t=i(e),{_featureMenuNode:o}=this,n=e.currentTarget["data-feature-index"];if(!o)return;const s=o.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=i(e),{_actionsMenuNode:o}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!o)return;const a=o.querySelectorAll("li"),l=a.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();a[a.length-1].focus()}else{e.stopPropagation();a[0].focus()}else{e.stopPropagation();a[(r+1+l)%l].focus()}else{e.stopPropagation();a[(r-1+l)%l].focus()}}_handleMainKeyup(e){const t=i(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e.shouldFocus&&(await u((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=r((()=>this.viewModel?.selectedFeatureIndex),((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this._handles.add(e,N)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this.actionsMenuOpen=!1,this.featureMenuOpen=!1)}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:r,view:a}=n;if(s(r)||!a||!i)return"top-center";if(!this._isScreenLocationWithinView(r,a))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replace(/[^-\d\.]/g,""),10)}const u=o?window.getComputedStyle(o,null):null,c=u?l(u.getPropertyValue("max-height")):0,d=u?l(u.getPropertyValue("height")):0,{height:p,width:h}=i.getBoundingClientRect(),g=h+t,_=Math.max(p,c,d)+t,f=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"right",view:a}),v=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"left",view:a}),m=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"top",view:a}),b=this._isOutsideView({popupHeight:_,popupWidth:g,screenLocation:r,side:"bottom",view:a});return v?m?"bottom-right":"top-right":f?m?"bottom-left":"top-left":m?b?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return F(this.container)&&t.reverse(),e.replace(/leading/gi,t[0]).replace(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=F(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!e)return;const{screenLocation:t}=this.viewModel,{width:i}=e.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&(e.style.top=o.top,e.style.left=o.left,e.style.bottom=o.bottom,e.style.right=o.right)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this,r=o/2,a=i.height-t,l=i.width-e,{padding:u}=this.view;return"bottom-center"===n?{top:t+s-u.top,left:e-r-u.left}:"top-left"===n?{bottom:a+s-u.bottom,right:l+s-u.right}:"bottom-left"===n?{top:t+s-u.top,right:l+s-u.right}:"top-right"===n?{bottom:a+s-u.bottom,left:e+s-u.left}:"bottom-right"===n?{top:t+s-u.top,left:e+s-u.left}:"top-center"===n?{bottom:a+s-u.bottom,left:e-r-u.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(s(e)||!t)return;const n=this._calculateFullWidth(t),r=this._calculateAlignmentPosition(e.x,e.y,o,n);return r?{top:void 0!==r.top?`${r.top}px`:"auto",left:void 0!==r.left?`${r.left}px`:"auto",bottom:void 0!==r.bottom?`${r.bottom}px`:"auto",right:void 0!==r.right?`${r.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:a,height:l}=i;return o<=a&&s>a||o>a&&s<=a||n<=l&&r>l||n>l&&r<=l}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:a}=this,l=a.breakpoint;this._dockingThresholdCrossed(s,r,l)&&this._setDockEnabledForViewSize(a),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;const s=t.hasOwnProperty("width")&&o<=t.width,r=t.hasOwnProperty("height")&&n<=t.height;return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?x(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t&&t.ui&&t.ui.remove(this._spinner,B),e.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new v({view:e}),e.ui.add(this._spinner,{key:B,position:"manual"}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.getItemAt(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=e.currentTarget["data-feature-index"];isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};e([g({readOnly:!0})],R.prototype,"actionsMenuId",null),e([g({readOnly:!0})],R.prototype,"actionsMenuButtonId",null),e([g({readOnly:!0})],R.prototype,"featureMenuId",null),e([g({readOnly:!0})],R.prototype,"titleId",null),e([g({readOnly:!0})],R.prototype,"contentId",null),e([g({readOnly:!0})],R.prototype,"hasContent",null),e([g({readOnly:!0})],R.prototype,"featureNavigationVisible",null),e([g({readOnly:!0})],R.prototype,"collapsible",null),e([g({readOnly:!0})],R.prototype,"featureMenuVisible",null),e([g({readOnly:!0})],R.prototype,"contentCollapsed",null),e([g({readOnly:!0})],R.prototype,"dividedActions",null),e([p("viewModel.actions")],R.prototype,"actions",void 0),e([g()],R.prototype,"actionsMenuOpen",null),e([g()],R.prototype,"alignment",void 0),e([p("viewModel.autoCloseEnabled")],R.prototype,"autoCloseEnabled",void 0),e([p("viewModel.autoOpenEnabled")],R.prototype,"autoOpenEnabled",void 0),e([p("viewModel.defaultPopupTemplateEnabled")],R.prototype,"defaultPopupTemplateEnabled",void 0),e([p("viewModel.content")],R.prototype,"content",void 0),e([g()],R.prototype,"collapsed",void 0),e([g()],R.prototype,"collapseEnabled",void 0),e([g({readOnly:!0})],R.prototype,"currentAlignment",null),e([g({readOnly:!0})],R.prototype,"currentDockPosition",null),e([g()],R.prototype,"dockOptions",null),e([g()],R.prototype,"dockEnabled",void 0),e([p("viewModel.featureCount")],R.prototype,"featureCount",void 0),e([g()],R.prototype,"featureMenuOpen",void 0),e([p("viewModel.features")],R.prototype,"features",void 0),e([p("viewModel.goToOverride")],R.prototype,"goToOverride",void 0),e([g()],R.prototype,"headingLevel",void 0),e([p("viewModel.highlightEnabled")],R.prototype,"highlightEnabled",void 0),e([p("viewModel.location")],R.prototype,"location",void 0),e([g({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],R.prototype,"label",void 0),e([g()],R.prototype,"maxInlineActions",void 0),e([g(),k("esri/widgets/Popup/t9n/Popup")],R.prototype,"messages",void 0),e([g(),k("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([p("viewModel.promises")],R.prototype,"promises",void 0),e([p("viewModel.selectedFeature")],R.prototype,"selectedFeature",void 0),e([p("viewModel.selectedFeatureIndex")],R.prototype,"selectedFeatureIndex",void 0),e([g({readOnly:!0})],R.prototype,"selectedFeatureWidget",null),e([g()],R.prototype,"spinnerEnabled",void 0),e([p("viewModel.title")],R.prototype,"title",void 0),e([p("viewModel.updateLocationEnabled")],R.prototype,"updateLocationEnabled",void 0),e([p("viewModel.view")],R.prototype,"view",void 0),e([g({type:M}),A(["triggerAction","trigger-action"])],R.prototype,"viewModel",void 0),e([p("viewModel.visible")],R.prototype,"visible",void 0),e([g()],R.prototype,"visibleElements",void 0),e([h("visibleElements")],R.prototype,"castVisibleElements",null),e([y()],R.prototype,"_close",null),e([y()],R.prototype,"_toggleDockEnabled",null),e([y()],R.prototype,"_toggleFeatureMenu",null),e([y()],R.prototype,"_toggleActionsMenu",null),e([y()],R.prototype,"_triggerAction",null),e([y()],R.prototype,"_selectFeature",null),e([y()],R.prototype,"_next",null),e([y()],R.prototype,"_previous",null),R=e([_(S)],R);const j=R;export{j 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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import o from"../../core/Handles.js";import{
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import o from"../../core/Handles.js";import{watch as s,initial as r}from"../../core/reactiveUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";let a=class extends e{constructor(t){super(t),this._handles=new o,this.state="pending",this.url=""}initialize(){this._handles.add([s((()=>[this.extension,this.name]),(()=>this._setFormattedFileName()),r)])}destroy(){this._handles.destroy()}_setFormattedFileName(){if(!this.name||!this.extension)return;let t=this.name+"."+this.extension;this.count&&(t=this.name+"("+this.count+")."+this.extension),this.formattedName=t}};t([i()],a.prototype,"count",void 0),t([i()],a.prototype,"error",void 0),t([i()],a.prototype,"extension",void 0),t([i()],a.prototype,"formattedName",void 0),t([i()],a.prototype,"name",void 0),t([i()],a.prototype,"state",void 0),t([i()],a.prototype,"url",void 0),a=t([p("esri.widgets.print.FileLink")],a);const n=a;export{n as default};
|
package/widgets/ScaleBar.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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import{
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import{watch as r}from"../core/reactiveUtils.js";import{createScreenPoint as t}from"../core/screenUtils.js";import{aliasOf as s}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as a}from"../core/accessorSupport/decorators/cast.js";import{property as i}from"../core/accessorSupport/decorators/property.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import o from"./Widget.js";import n from"./ScaleBar/ScaleBarViewModel.js";import"./support/widgetUtils.js";import{messageBundle as c}from"./support/decorators/messageBundle.js";import{tsx as d}from"./support/jsxFactory.js";const u={base:"esri-scale-bar esri-widget",labelContainer:"esri-scale-bar__label-container",rulerLabelContainer:"esri-scale-bar__label-container--ruler",lineLabelContainer:"esri-scale-bar__label-container--line",topLabelContainer:"esri-scale-bar__label-container--top",bottomLabelContainer:"esri-scale-bar__label-container--bottom",label:"esri-scale-bar__label",line:"esri-scale-bar__line",topLine:"esri-scale-bar__line--top",bottomLine:"esri-scale-bar__line--bottom",ruler:"esri-scale-bar__ruler",rulerBlock:"esri-scale-bar__ruler-block",barContainer:"esri-scale-bar__bar-container",rulerBarContainer:"esri-scale-bar__bar-container--ruler",lineBarContainer:"esri-scale-bar__bar-container--line",disabled:"esri-disabled"};function p(e){return 2*e}let b=class extends o{constructor(e,r){super(e,r),this.label=void 0,this.messages=null,this.unit="non-metric",this.view=null,this.viewModel=new n}initialize(){this.own([r((()=>{const{view:e}=this;return[e?.stationary,e?.center,e?.scale,e?.zoom]}),(([e])=>{e&&this.scheduleRender()}))])}set style(e){const r="dual"===this.unit?"line":e;this._set("style",r)}castStyle(e){return"line"===e?e:"ruler"}castUnit(e){return"metric"===e||"dual"===e?e:"non-metric"}render(){const e="disabled"===this.get("viewModel.state"),r={[u.disabled]:e};let t,s;if(!e){const{unit:e,style:r}=this,a="metric"===e||"dual"===e,i=50;if("non-metric"===e||"dual"===e){const e=this.viewModel.getScaleBarProperties(i,"non-metric");e&&(s="ruler"===r?this._renderRuler(e):this._renderLine(e,"bottom"))}if(a){const e=this.viewModel.getScaleBarProperties(i,"metric");e&&(t="ruler"===r?this._renderRuler(e):this._renderLine(e,"top"))}}return d("div",{afterCreate:this._handleRootCreateOrUpdate,afterUpdate:this._handleRootCreateOrUpdate,bind:this,class:this.classes(u.base,r)},t,s)}_renderRuler(e){const r=p(Math.round(e.length)),{messages:t}=this,s=t[e.unit]||t.unknownUnit,a=`${p(e.value)} ${s}`;return d("div",{class:this.classes(u.barContainer,u.rulerBarContainer),key:"esri-scale-bar__ruler"},d("div",{class:u.ruler,styles:{width:`${r}px`}},d("div",{class:u.rulerBlock}),d("div",{class:u.rulerBlock}),d("div",{class:u.rulerBlock}),d("div",{class:u.rulerBlock})),d("div",{class:this.classes(u.labelContainer,u.rulerLabelContainer)},d("div",{class:u.label},"0"),d("div",{class:u.label},a)))}_renderLine(e,r){const{messages:t}=this,s=t[e.unit]||t.unknownUnit,a=`${p(e.value)} ${s}`,i={[u.topLabelContainer]:"top"===r,[u.bottomLabelContainer]:"bottom"===r},l=d("div",{class:this.classes(u.labelContainer,u.lineLabelContainer,i),key:"esri-scale-bar__label"},d("div",{class:u.label},a)),o={[u.topLine]:"top"===r,[u.bottomLine]:"bottom"===r},n=p(Math.round(e.length)),c=d("div",{class:this.classes(u.line,o),key:"esri-scale-bar__line",styles:{width:`${n}px`}});return d("div",{class:this.classes(u.barContainer,u.lineBarContainer),key:"esri-scale-bar__line-container"},[c,l])}_handleRootCreateOrUpdate(e){const r=this.viewModel;if(!r)return;const s=e.getBoundingClientRect(),a=s.left+window.pageXOffset,i=s.top+window.pageYOffset,l=t(a,i);(l.x!==r.scaleComputedFrom.x||l.y!==r.scaleComputedFrom.y)&&(r.scaleComputedFrom=l)}};e([i({aliasOf:{source:"messages.widgetLabel",overridable:!0}})],b.prototype,"label",void 0),e([i(),c("esri/widgets/ScaleBar/t9n/ScaleBar")],b.prototype,"messages",void 0),e([i()],b.prototype,"style",null),e([a("style")],b.prototype,"castStyle",null),e([i()],b.prototype,"unit",void 0),e([a("unit")],b.prototype,"castUnit",null),e([s("viewModel.view")],b.prototype,"view",void 0),e([i()],b.prototype,"viewModel",void 0),b=e([l("esri.widgets.ScaleBar")],b);const m=b;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.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{getAssetUrl as t}from"../../assets.js";import r from"../../config.js";import s from"../../Graphic.js";import o from"../../PopupTemplate.js";import"../../symbols.js";import i from"../../core/Accessor.js";import l from"../../core/Collection.js";import{deprecatedProperty as a}from"../../core/deprecate.js";import n from"../../core/Error.js";import u from"../../core/Evented.js";import c from"../../core/Handles.js";import h from"../../core/has.js";import p from"../../core/Logger.js";import{unwrap as d,isSome as g,isNone as m}from"../../core/maybe.js";import{eachAlways as y,after as f}from"../../core/promiseUtils.js";import{watch as S,whenOnce as _,initial as v}from"../../core/reactiveUtils.js";import{property as b}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as w}from"../../core/accessorSupport/decorators/subclass.js";import x from"../../geometry/Point.js";import I from"../../geometry/SpatialReference.js";import{onLocaleChange as L}from"../../intl/locale.js";import{fetchMessageBundle as T}from"../../intl/messages.js";import j from"../../portal/Portal.js";import{highlightsSupported as R}from"../../views/support/layerViewUtils.js";import P from"./LayerSearchSource.js";import E from"./LocatorSearchSource.js";import F from"./SearchSource.js";import{getPointFromGeometry as A,getPointWithElevation as C}from"./support/geometryUtils.js";import{isArcGISWorldGeocoder as G,meteredArcGISLocatorUrl as O,isProxiedArcGISWorldGeocoder as N,isMeteredArcGISWorldGeocoder as D}from"./support/locatorUtils.js";import{supported as M,getCurrentPosition as V,positionToPoint as k}from"../support/geolocationUtils.js";import{GoToMixin as B}from"../support/GoTo.js";import J from"../../symbols/PictureMarkerSymbol.js";import U from"../../symbols/SimpleLineSymbol.js";import H from"../../symbols/SimpleFillSymbol.js";import Q from"../../symbols/TextSymbol.js";function Z(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const q=()=>T("esri/widgets/Search/t9n/Search"),z="esri.widgets.Search.SearchViewModel",K=p.getLogger(z),W="highlight",X=l.ofType({key:e=>e.layer?"layer":"locator",base:F,typeMap:{layer:P,locator:E}}),Y=I.WGS84,$="esri/images/search/search-symbol-32.svg",ee="esri/images/search/search-symbol-32.png",te=/<(?:.|\s)*?>/g,re=-1;let se=class extends(B(u.EventedMixin(i))){constructor(e){super(e),this._handles=new c,this._gotoController=null,this._searching=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new X,this.defaultSymbols={point:new J({url:t(h("trident")?ee:$),size:24,width:24,height:24}),polyline:new U({color:[130,130,130,1],width:2}),polygon:new H({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=j.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new X,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await q();this.messages=e,this.defaultPopupTemplate=new o({title:e.searchResult,content:"{Match_addr}"})};e(),this._handles.add([S((()=>[this.includeDefaultSources,this.view,this.portal]),(()=>this._update()),v),L(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics(),this._handles.destroy(),this._handles=null}get activeSource(){return this.allSources.getItemAt(this.activeSourceIndex)||null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:re}set activeSourceIndex(e){void 0!==e?this._override("activeSourceIndex",e):this._clearOverride("activeSourceIndex")}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){e?this._override("allPlaceholder",e):this._clearOverride("allPlaceholder")}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new X;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get defaultSymbol(){return a(K,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._get("defaultSymbol")}set defaultSymbol(e){a(K,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._set("defaultSymbol",e)}get locationEnabled(){return this._get("locationEnabled")||M()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=M();if(e&&!t){const e=new n("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});K.error(e)}this._override("locationEnabled",e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===re)return r;const s=e.getItemAt(t);return s?s.placeholder:""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup(),this.view&&this.view.graphics.remove(this.resultGraphic),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=this.when().then((()=>this._getResultsFromSources(r,t).then((e=>{if(d(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text,numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=(r.location&&o?o.name:r.text).replace(te,"");return this._set("searchTerm",i),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("search-complete",s),this._selectFirstResult(o).then((()=>s))})))).then((e=>(this._clearSearching(),e)),(e=>{throw this._clearSearching(),e}));return this._searching=s,s}searchNearby(e){if(!this.locationEnabled){const e=new n("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});return K.error(e),Promise.reject(e)}const t=V().then((t=>k({position:t,view:this.view},e))).then((t=>this.search(t,e)));return this._searching=t,t.catch((()=>{})).then((()=>this._clearSearching())),t}select(e){if(this.clearGraphics(),!e){const t=new n("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});return K.error(t),Promise.reject(t)}const{view:t}=this,r=Z(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=this.allSources.getItemAt(r);if(!o){const e=new n("select:missing-source","Cannot select without a source.",{source:o});return K.error(e),Promise.reject(e)}const i=o instanceof P?this._getLayerSourcePopupTemplate(o):o.popupTemplate,l=o.resultSymbol||this._getDefaultSymbol(e),a=Z(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,u=Z(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,c=Z(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,h=c?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:p}=e;if(!p){const e=new n("select:missing-feature","Cannot select without a feature.",{feature:p});return K.error(e),Promise.reject(e)}const{attributes:d,geometry:m,layer:f,sourceLayer:S}=p,_=A(m),v={layerViewQuery:this._getLayerView(p),elevationQuery:t&&g(_)?C(_,t).catch((()=>_)):Promise.resolve(_)};return y(v).then((i=>{const n=i.layerViewQuery.value,y=i.elevationQuery.value;l instanceof Q&&(l.text=e.name);const _=t&&u?e.target||e.extent:null;return(g(_)?this._goToSearchResult(_):Promise.resolve()).then((()=>{const i=n?p:new s({geometry:m,symbol:l,attributes:d,layer:f,sourceLayer:S,popupTemplate:h}),u=c&&this.view?.popup,g=u&&i.getEffectivePopupTemplate(u.defaultPopupTemplateEnabled);return g&&t.popup.open({features:[i],location:y}),n&&R(n)&&!g&&this._highlightFeature({graphic:i,layerView:n}),!n&&a&&t&&t.graphics.push(i),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",i),this.emit("select-result",{result:e,source:o,sourceIndex:r}),e}))}))}suggest(e,t,r){const s=e||this.searchTerm;return this.emit("suggest-start",{searchTerm:s}),this._suggestTimer(t,r).then((()=>this._suggestImmediate(s,r).then((e=>(this._set("suggestions",e.results),this._set("suggestionCount",e.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("suggest-complete",e),e)))))}async when(){await _((()=>!this.updating))}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=y([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await _((()=>this.messages)),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map((e=>{if(!1===e.placefinding)return;const t=r.apiKey&&G(e.url)?{url:O}:null,s=E.fromJSON({...e,...t}),o=s.url;if(G(o)||N(o)||D(o)){const e=s.outFields||["Addr_type","Match_addr","StAddr","City"],t=s.placeholder||this.messages.placeholder,r="number"==typeof s.defaultZoomScale?s.defaultZoomScale:2500;s.set({singleLineFieldName:"SingleLine",outFields:e,placeholder:t,defaultZoomScale:r})}return s.singleLineFieldName?s:void 0})).filter(Boolean)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach((e=>e?.destroy())),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=P.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=P.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find((e=>e.id===t.subLayer));if(!r)throw new Error;const s=await r.createFeatureLayer();return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find((e=>e.id===t.subLayer));if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}_getLayer(e,t){return"feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type?Promise.resolve(e):"map-image"===e.type?this._getSubLayer(e,t).catch((()=>{const t=new n("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return K.error(t),null})):"building-scene"===e.type?this._getBuildingSubLayer(e,t):Promise.resolve(null)}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const{selectedFeature:r}=e;r&&r===t&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return f(r,null,t&&t.signal)}_createLocationForSearch(e){return e instanceof s?A(e.geometry):e instanceof x?e:Array.isArray(e)&&2===e.length?new x({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&Z(e,"key")&&Z(e,"text")&&Z(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:d(t),text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){let t=null;return e&&e.some((e=>{const{results:r}=e,s=r[0],o=!!s;return o&&(t=s),o})),t}_selectFirstResult(e){return this.autoSelect&&e?this.select(e):Promise.resolve(null)}_suggestImmediate(e,t){return this.when().then((()=>this._getSuggestionsFromSources(e,t))).then((r=>{if(d(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e,numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}))}_formatSourceResponse(e,t,r){const s=t&&t.value||[],o=t&&t.error,i=this.allSources.getItemAt(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),K.error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===re){const s=r&&Z(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach(((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)}))}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}_getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&Z(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new n("search:no-sources-defined","At least one source is required.",{allSources:r});return K.error(e),Promise.reject(e)}return s===re?r.forEach(((r,s)=>{o.push(this._getResultsFromSource(e,s,t))})):o.push(this._getResultsFromSource(e,s,t)),y(o)}_getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new n("suggest:no-sources-defined","At least one source is required.",{allSources:r});return K.error(e),Promise.reject(e)}return s===re?r.forEach(((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))})):o.push(this._getSuggestionsFromSource(e,s,t)),y(o)}_getResultsFromSource(e,t,r){const s=this.allSources.getItemAt(t),{location:o=null}=e,i=this.view?.spatialReference||Y,l=Z(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof P&&Z(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults({view:n,sourceIndex:t,location:o,suggestResult:e,spatialReference:i,exactMatch:a,maxResults:l},r)}_getSuggestionsFromSource(e,t,r){const s=this.allSources.getItemAt(t),o=Z(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e.length,l=Z(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||Y,i=Z(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof P&&Z(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return Promise.resolve(null)}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return Z(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){const t=this.results;let r=null;return t.some((t=>t.results.some((s=>s===e&&(r=t.sourceIndex,!0))))),r}async _goToSearchResult(e){const t=!!e;this._abortGoTo();const r=new AbortController;this._gotoController=r;const s={target:{target:e},options:{animate:t,signal:r.signal}};await this.callGoTo(s),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(m(r))return null;const s=this._get("defaultSymbol");if(s&&("point"===r.type||"multipoint"===r.type))return s;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this._handles.remove(W)}async _getLayerView(e){const{view:t}=this;if(!e||!t||"building-component"===e.layer.type||"subtype-sublayer"===e.layer.type)return null;const{layer:r}=e;return await t.when(),t.whenLayerView(r)}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o}=t,{objectIdField:i}=o,l=s&&s[i],a=r.highlight(l||t);this._handles.add(a,W)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t.emit("select-result-floor",e)}}};se.ALL_INDEX=re,e([b()],se.prototype,"_searching",void 0),e([b()],se.prototype,"_updatingPromise",void 0),e([b({readOnly:!0,value:null})],se.prototype,"activeSource",null),e([b()],se.prototype,"activeSourceIndex",null),e([b()],se.prototype,"allPlaceholder",null),e([b({readOnly:!0})],se.prototype,"allSources",null),e([b()],se.prototype,"autoNavigate",void 0),e([b()],se.prototype,"autoSelect",void 0),e([b()],se.prototype,"defaultPopupTemplate",void 0),e([b({readOnly:!0})],se.prototype,"defaultSources",void 0),e([b()],se.prototype,"defaultSymbol",null),e([b()],se.prototype,"defaultSymbols",void 0),e([b()],se.prototype,"includeDefaultSources",void 0),e([b()],se.prototype,"locationEnabled",null),e([b()],se.prototype,"maxInputLength",void 0),e([b()],se.prototype,"maxResults",void 0),e([b()],se.prototype,"maxSuggestions",void 0),e([b()],se.prototype,"messages",void 0),e([b()],se.prototype,"minSuggestCharacters",void 0),e([b({readOnly:!0})],se.prototype,"placeholder",null),e([b()],se.prototype,"popupEnabled",void 0),e([b({type:o})],se.prototype,"popupTemplate",void 0),e([b({type:j})],se.prototype,"portal",void 0),e([b()],se.prototype,"resultCount",void 0),e([b()],se.prototype,"resultGraphicEnabled",void 0),e([b({readOnly:!0})],se.prototype,"resultGraphic",void 0),e([b({readOnly:!0})],se.prototype,"results",void 0),e([b({readOnly:!0})],se.prototype,"selectedSuggestion",void 0),e([b()],se.prototype,"searchAllEnabled",void 0),e([b({readOnly:!0})],se.prototype,"selectedResult",void 0),e([b()],se.prototype,"searchTerm",null),e([b({type:X})],se.prototype,"sources",void 0),e([b({readOnly:!0})],se.prototype,"state",null),e([b()],se.prototype,"suggestionDelay",void 0),e([b()],se.prototype,"suggestionCount",void 0),e([b({readOnly:!0})],se.prototype,"suggestions",void 0),e([b()],se.prototype,"suggestionsEnabled",void 0),e([b({readOnly:!0})],se.prototype,"updating",null),e([b()],se.prototype,"view",void 0),e([b()],se.prototype,"clear",null),se=e([w(z)],se);const oe=se;export{oe as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{getAssetUrl as t}from"../../assets.js";import r from"../../config.js";import s from"../../Graphic.js";import o from"../../PopupTemplate.js";import"../../symbols.js";import i from"../../core/Accessor.js";import l from"../../core/Collection.js";import{deprecatedProperty as a}from"../../core/deprecate.js";import n from"../../core/Error.js";import u from"../../core/Evented.js";import c from"../../core/Handles.js";import h from"../../core/Logger.js";import{unwrap as p,isSome as d,isNone as g}from"../../core/maybe.js";import{eachAlways as m,after as y}from"../../core/promiseUtils.js";import{watch as f,whenOnce as S,initial as _}from"../../core/reactiveUtils.js";import{property as v}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as b}from"../../core/accessorSupport/decorators/subclass.js";import w from"../../geometry/Point.js";import x from"../../geometry/SpatialReference.js";import{onLocaleChange as I}from"../../intl/locale.js";import{fetchMessageBundle as L}from"../../intl/messages.js";import T from"../../portal/Portal.js";import{highlightsSupported as j}from"../../views/support/layerViewUtils.js";import R from"./LayerSearchSource.js";import P from"./LocatorSearchSource.js";import E from"./SearchSource.js";import{getPointFromGeometry as F,getPointWithElevation as A}from"./support/geometryUtils.js";import{isArcGISWorldGeocoder as C,meteredArcGISLocatorUrl as G,isProxiedArcGISWorldGeocoder as O,isMeteredArcGISWorldGeocoder as N}from"./support/locatorUtils.js";import{supported as D,getCurrentPosition as M,positionToPoint as V}from"../support/geolocationUtils.js";import{GoToMixin as k}from"../support/GoTo.js";import B from"../../symbols/PictureMarkerSymbol.js";import J from"../../symbols/SimpleLineSymbol.js";import U from"../../symbols/SimpleFillSymbol.js";import H from"../../symbols/TextSymbol.js";function Q(e,t){return e.hasOwnProperty(t)&&null!=e[t]&&""!==e[t]}const Z=()=>L("esri/widgets/Search/t9n/Search"),q="esri.widgets.Search.SearchViewModel",z=h.getLogger(q),K="highlight",W=l.ofType({key:e=>e.layer?"layer":"locator",base:E,typeMap:{layer:R,locator:P}}),X=x.WGS84,Y="esri/images/search/search-symbol-32.png",$=/<(?:.|\s)*?>/g,ee=-1;let te=class extends(k(u.EventedMixin(i))){constructor(e){super(e),this._handles=new c,this._gotoController=null,this._searching=null,this._createdFeatureLayers=[],this.autoNavigate=!0,this.autoSelect=!0,this.defaultPopupTemplate=null,this.defaultSources=new W,this.defaultSymbols={point:new B({url:t(Y),size:24,width:24,height:24}),polyline:new J({color:[130,130,130,1],width:2}),polygon:new U({color:[235,235,235,.4],outline:{color:[130,130,130,1],width:2}})},this.includeDefaultSources=!0,this.maxInputLength=128,this.maxResults=6,this.maxSuggestions=6,this.messages=null,this.minSuggestCharacters=3,this.popupEnabled=!0,this.popupTemplate=null,this.portal=T.getDefault(),this.resultCount=null,this.resultGraphicEnabled=!0,this.resultGraphic=null,this.results=null,this.selectedSuggestion=null,this.searchAllEnabled=!0,this.selectedResult=null,this.sources=new W,this.suggestionDelay=350,this.suggestionCount=null,this.suggestions=null,this.suggestionsEnabled=!0,this.view=null}initialize(){const e=async()=>{const e=await Z();this.messages=e,this.defaultPopupTemplate=new o({title:e.searchResult,content:"{Match_addr}"})};e(),this._handles.add([f((()=>[this.includeDefaultSources,this.view,this.portal]),(()=>this._update()),_),I(e)])}destroy(){this._destroyFeatureLayers(),this._abortGoTo(),this.clearGraphics(),this._handles.destroy(),this._handles=null}get activeSource(){return this.allSources.getItemAt(this.activeSourceIndex)||null}get activeSourceIndex(){return 1===this.allSources.length||!this.searchAllEnabled?0:ee}set activeSourceIndex(e){void 0!==e?this._override("activeSourceIndex",e):this._clearOverride("activeSourceIndex")}get allPlaceholder(){return this.messages?.allPlaceholder}set allPlaceholder(e){e?this._override("allPlaceholder",e):this._clearOverride("allPlaceholder")}get allSources(){const{sources:e,defaultSources:t,includeDefaultSources:r}=this,s="function"==typeof r?r.call(null,{sources:e,defaultSources:t}):r?t.concat(e):e,o=this._get("allSources")||new W;return o.removeAll(),o.addMany(s.filter(Boolean)),o}get defaultSymbol(){return a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._get("defaultSymbol")}set defaultSymbol(e){a(z,"defaultSymbol",{replacement:"defaultSymbols",version:"4.22"}),this._set("defaultSymbol",e)}get locationEnabled(){return this._get("locationEnabled")||D()}set locationEnabled(e){if(void 0===e)return void this._clearOverride("locationEnabled");const t=D();if(e&&!t){const e=new n("locationEnabled:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});z.error(e)}this._override("locationEnabled",e&&t)}get placeholder(){const{allSources:e,activeSourceIndex:t,allPlaceholder:r}=this;if(t===ee)return r;const s=e.getItemAt(t);return s?s.placeholder:""}set searchTerm(e){this._set("searchTerm",e||""),this.clearGraphics(),this.selectedSuggestion&&this.selectedSuggestion.text!==e&&this._set("selectedSuggestion",null),""===e&&this._clear()}get searchTerm(){return this._get("searchTerm")||""}get state(){return this._searching?"searching":this.updating?"loading":0===this.allSources.length?"disabled":"ready"}get updating(){return null!=this._updatingPromise}clear(){this.searchTerm=""}clearGraphics(){this._removeHighlight(),this._closePopup(),this.view&&this.view.graphics.remove(this.resultGraphic),this._set("resultGraphic",null)}search(e,t){this.emit("search-start"),this.clearGraphics();const r=this._createSuggestionForSearch(e),s=this.when().then((()=>this._getResultsFromSources(r,t).then((e=>{if(p(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:r.text,numResults:0,numErrors:0,errors:[],results:[]};this._formatResponse(s,e,r);const o=this._getFirstResult(s.results),i=(r.location&&o?o.name:r.text).replace($,"");return this._set("searchTerm",i),(r.key&&"number"==typeof r.sourceIndex||r.location)&&this._set("selectedSuggestion",r),this._set("results",s.results),this._set("resultCount",s.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("search-complete",s),this._selectFirstResult(o).then((()=>s))})))).then((e=>(this._clearSearching(),e)),(e=>{throw this._clearSearching(),e}));return this._searching=s,s}searchNearby(e){if(!this.locationEnabled){const e=new n("searchNearby:geolocation-unsupported","Geolocation API is unsupported.",{geolocation:navigator.geolocation});return z.error(e),Promise.reject(e)}const t=M().then((t=>V({position:t,view:this.view},e))).then((t=>this.search(t,e)));return this._searching=t,t.catch((()=>{})).then((()=>this._clearSearching())),t}select(e){if(this.clearGraphics(),!e){const t=new n("select:missing-parameter","Cannot select without a searchResult.",{searchResult:e});return z.error(t),Promise.reject(t)}const{view:t}=this,r=Q(e,"sourceIndex")?e.sourceIndex:this._getSourceIndexOfResult(e),o=this.allSources.getItemAt(r);if(!o){const e=new n("select:missing-source","Cannot select without a source.",{source:o});return z.error(e),Promise.reject(e)}const i=o instanceof R?this._getLayerSourcePopupTemplate(o):o.popupTemplate,l=o.resultSymbol||this._getDefaultSymbol(e),a=Q(o,"resultGraphicEnabled")?o.resultGraphicEnabled:this.resultGraphicEnabled,u=Q(o,"autoNavigate")?o.autoNavigate:this.autoNavigate,c=Q(o,"popupEnabled")?o.popupEnabled:this.popupEnabled,h=c?i||this.popupTemplate||this.defaultPopupTemplate:null,{feature:p}=e;if(!p){const e=new n("select:missing-feature","Cannot select without a feature.",{feature:p});return z.error(e),Promise.reject(e)}const{attributes:g,geometry:y,layer:f,sourceLayer:S}=p,_=F(y),v={layerViewQuery:this._getLayerView(p),elevationQuery:t&&d(_)?A(_,t).catch((()=>_)):Promise.resolve(_)};return m(v).then((i=>{const n=i.layerViewQuery.value,m=i.elevationQuery.value;l instanceof H&&(l.text=e.name);const _=t&&u?e.target||e.extent:null;return(d(_)?this._goToSearchResult(_):Promise.resolve()).then((()=>{const i=n?p:new s({geometry:y,symbol:l,attributes:g,layer:f,sourceLayer:S,popupTemplate:h}),u=c&&this.view?.popup,d=u&&i.getEffectivePopupTemplate(u.defaultPopupTemplateEnabled);return d&&t.popup.open({features:[i],location:m}),n&&j(n)&&!d&&this._highlightFeature({graphic:i,layerView:n}),!n&&a&&t&&t.graphics.push(i),this._setResultFloor(e),this._set("selectedResult",e),this._set("resultGraphic",i),this.emit("select-result",{result:e,source:o,sourceIndex:r}),e}))}))}suggest(e,t,r){const s=e||this.searchTerm;return this.emit("suggest-start",{searchTerm:s}),this._suggestTimer(t,r).then((()=>this._suggestImmediate(s,r).then((e=>(this._set("suggestions",e.results),this._set("suggestionCount",e.results.reduce(((e,t)=>e+t.results.length),0)),this.emit("suggest-complete",e),e)))))}async when(){await S((()=>!this.updating))}async _update(){const{portal:e,view:t}=this;if(this.includeDefaultSources){const r=this._updatingPromise=m([e?.load(),t?.when()]);if(this.destroyed)return;if(await r,r!==this._updatingPromise)return}await S((()=>this.messages)),this.destroyed||this._updateDefaultSources(),this._updatingPromise=null}_clearSearching(){this._searching=null}_convertHelperServices(){const e=this.portal?.helperServices?.geocode;if(!e)return[];return e.map((e=>{if(!1===e.placefinding)return;const t=r.apiKey&&C(e.url)?{url:G}:null,s=P.fromJSON({...e,...t}),o=s.url;if(C(o)||O(o)||N(o)){const e=s.outFields||["Addr_type","Match_addr","StAddr","City"],t=s.placeholder||this.messages.placeholder,r="number"==typeof s.defaultZoomScale?s.defaultZoomScale:2500;s.set({singleLineFieldName:"SingleLine",outFields:e,placeholder:t,defaultZoomScale:r})}return s.singleLineFieldName?s:void 0})).filter(Boolean)}_destroyFeatureLayers(){this._createdFeatureLayers.forEach((e=>e?.destroy())),this._createdFeatureLayers=[]}_getLayerSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findLayerById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=R.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_getTableSources(e,t){const r=this.view?.map;return e.map((e=>{const s=r.findTableById(e.id);if(!s)return;const o=this._getLayerJSON(e),i=R.fromJSON(o);return i.placeholder=t,this._getLayer(s,o).then((e=>{i.layer=e})),i})).filter(Boolean).toArray()}_convertApplicationProperties(){const e=this.view?.map,t=e?.applicationProperties?.viewing?.search;if(!t)return[];const{enabled:r,hintText:s,layers:o,tables:i}=t;if(!r)return[];return[...this._getLayerSources(o,s),...this._getTableSources(i,s)]}async _getSubLayer(e,t){if(await e.load(),!e.allSublayers)throw new Error;const r=e.allSublayers.find((e=>e.id===t.subLayer));if(!r)throw new Error;const s=await r.createFeatureLayer();return this._createdFeatureLayers.push(s),s}async _getBuildingSubLayer(e,t){await e.load();const r=e.allSublayers.find((e=>e.id===t.subLayer));if("building-component"!==r?.type)throw new Error;if(await r.load(),null==r.associatedLayer)throw new Error;return await r.associatedLayer.load(),r}_getLayer(e,t){return"feature"===e.type||"scene"===e.type||"csv"===e.type||"geojson"===e.type||"ogc-feature"===e.type?Promise.resolve(e):"map-image"===e.type?this._getSubLayer(e,t).catch((()=>{const t=new n("search:create-featurelayer","Could not create a FeatureLayer from the MapImageLayer",{layer:e});return z.error(t),null})):"building-scene"===e.type?this._getBuildingSubLayer(e,t):Promise.resolve(null)}_getLayerJSON(e){return"function"==typeof e.toJSON?e.toJSON():e}_updateDefaultSources(){const{defaultSources:e,includeDefaultSources:t}=this;this._destroyFeatureLayers(),e.removeAll(),t&&e.addMany([...this._convertApplicationProperties(),...this._convertHelperServices()])}_abortGoTo(){this._gotoController&&this._gotoController.abort(),this._gotoController=null}_clear(){this._abortGoTo(),this._set("resultCount",null),this._set("results",null),this._set("suggestions",null),this._set("suggestionCount",null),this._set("selectedResult",null),this._set("selectedSuggestion",null),this.emit("search-clear")}_closePopup(){const e=this.view?.popup,{resultGraphic:t}=this;if(!e||!t)return;const{selectedFeature:r}=e;r&&r===t&&e.close()}_suggestTimer(e,t){const r=null!=e?e:this.suggestionDelay;return y(r,null,t&&t.signal)}_createLocationForSearch(e){return e instanceof s?F(e.geometry):e instanceof w?e:Array.isArray(e)&&2===e.length?new w({longitude:e[0],latitude:e[1]}):null}_createSuggestionForSearch(e){if(e&&Q(e,"key")&&Q(e,"text")&&Q(e,"sourceIndex"))return e;const t=this._createLocationForSearch(e),r="string"==typeof e?e:this.searchTerm,{selectedSuggestion:s,selectedResult:o}=this,i=!e&&s&&o,l=i&&s.key===o.key&&s.sourceIndex===o.sourceIndex,a=i&&s.location;return l||a?s:{location:p(t),text:t?"":r,sourceIndex:null,key:null}}_getFirstResult(e){let t=null;return e&&e.some((e=>{const{results:r}=e,s=r[0],o=!!s;return o&&(t=s),o})),t}_selectFirstResult(e){return this.autoSelect&&e?this.select(e):Promise.resolve(null)}_suggestImmediate(e,t){return this.when().then((()=>this._getSuggestionsFromSources(e,t))).then((r=>{if(p(t?.signal)?.aborted)return null;const s={activeSourceIndex:this.activeSourceIndex,searchTerm:e,numResults:0,numErrors:0,errors:[],results:[]};return this._formatResponse(s,r),s}))}_formatSourceResponse(e,t,r){const s=t&&t.value||[],o=t&&t.error,i=this.allSources.getItemAt(r);if(o){const t={sourceIndex:r,source:i,error:o};e.errors.push(t),z.error(o),e.numErrors++}else{const t={sourceIndex:r,source:i,results:s};e.results.push(t),e.numResults+=s.length}}_formatResponse(e,t,r){if(t)if(e.activeSourceIndex===ee){const s=r&&Q(r,"sourceIndex")&&-1!==r.sourceIndex?r.sourceIndex:void 0;t.forEach(((t,r)=>{const o=void 0!==s?s:r;this._formatSourceResponse(e,t,o)}))}else this._formatSourceResponse(e,t[0],e.activeSourceIndex)}_getResultsFromSources(e,t){const{allSources:r}=this,s=!e.location&&Q(e,"sourceIndex")?e.sourceIndex:this.activeSourceIndex,o=[];if(!r.length){const e=new n("search:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===ee?r.forEach(((r,s)=>{o.push(this._getResultsFromSource(e,s,t))})):o.push(this._getResultsFromSource(e,s,t)),m(o)}_getSuggestionsFromSources(e,t){const{allSources:r,activeSourceIndex:s}=this,o=[];if(!r.length){const e=new n("suggest:no-sources-defined","At least one source is required.",{allSources:r});return z.error(e),Promise.reject(e)}return s===ee?r.forEach(((r,s)=>{o.push(this._getSuggestionsFromSource(e,s,t))})):o.push(this._getSuggestionsFromSource(e,s,t)),m(o)}_getResultsFromSource(e,t,r){const s=this.allSources.getItemAt(t),{location:o=null}=e,i=this.view?.spatialReference||X,l=Q(s,"maxResults")?s.maxResults:this.maxResults,a=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch,{view:n}=this;return s.getResults({view:n,sourceIndex:t,location:o,suggestResult:e,spatialReference:i,exactMatch:a,maxResults:l},r)}_getSuggestionsFromSource(e,t,r){const s=this.allSources.getItemAt(t),o=Q(s,"suggestionsEnabled")?s.suggestionsEnabled:this.suggestionsEnabled,i=e.length,l=Q(s,"minSuggestCharacters")?s.minSuggestCharacters:this.minSuggestCharacters;if(o&&e.trim()&&i>=l){const o=this.view?.spatialReference||X,i=Q(s,"maxSuggestions")?s.maxSuggestions:this.maxSuggestions,{view:l}=this,a=!!(s instanceof R&&Q(s,"exactMatch"))&&s.exactMatch;return s.getSuggestions({view:l,sourceIndex:t,suggestTerm:e,spatialReference:o,maxSuggestions:i,exactMatch:a},r)}return Promise.resolve(null)}_getLayerSourcePopupTemplate(e){const{layer:t}=e;if(t)return Q(e,"popupTemplate")?e.popupTemplate:t.popupTemplate}_getSourceIndexOfResult(e){const t=this.results;let r=null;return t.some((t=>t.results.some((s=>s===e&&(r=t.sourceIndex,!0))))),r}async _goToSearchResult(e){const t=!!e;this._abortGoTo();const r=new AbortController;this._gotoController=r;const s={target:{target:e},options:{animate:t,signal:r.signal}};await this.callGoTo(s),this._gotoController=null}_getDefaultSymbol(e){const{defaultSymbols:t}=this,r=e.feature?.geometry;if(g(r))return null;const s=this._get("defaultSymbol");if(s&&("point"===r.type||"multipoint"===r.type))return s;switch(r.type){case"point":case"multipoint":return t.point;case"polyline":return t.polyline;case"extent":case"polygon":return t.polygon;default:return null}}_removeHighlight(){this._handles.remove(K)}async _getLayerView(e){const{view:t}=this;if(!e||!t||"building-component"===e.layer.type||"subtype-sublayer"===e.layer.type)return null;const{layer:r}=e;return await t.when(),t.whenLayerView(r)}_highlightFeature(e){const{graphic:t,layerView:r}=e,{attributes:s,layer:o}=t,{objectIdField:i}=o,l=s&&s[i],a=r.highlight(l||t);this._handles.add(a,K)}_setResultFloor(e){const{view:t}=this,r=e.feature?.attributes,s=e.feature?.sourceLayer;if(s&&"floorInfo"in s&&s?.floorInfo?.floorField&&r){const e=r[s.floorInfo.floorField];t.emit("select-result-floor",e)}}};te.ALL_INDEX=ee,e([v()],te.prototype,"_searching",void 0),e([v()],te.prototype,"_updatingPromise",void 0),e([v({readOnly:!0,value:null})],te.prototype,"activeSource",null),e([v()],te.prototype,"activeSourceIndex",null),e([v()],te.prototype,"allPlaceholder",null),e([v({readOnly:!0})],te.prototype,"allSources",null),e([v()],te.prototype,"autoNavigate",void 0),e([v()],te.prototype,"autoSelect",void 0),e([v()],te.prototype,"defaultPopupTemplate",void 0),e([v({readOnly:!0})],te.prototype,"defaultSources",void 0),e([v()],te.prototype,"defaultSymbol",null),e([v()],te.prototype,"defaultSymbols",void 0),e([v()],te.prototype,"includeDefaultSources",void 0),e([v()],te.prototype,"locationEnabled",null),e([v()],te.prototype,"maxInputLength",void 0),e([v()],te.prototype,"maxResults",void 0),e([v()],te.prototype,"maxSuggestions",void 0),e([v()],te.prototype,"messages",void 0),e([v()],te.prototype,"minSuggestCharacters",void 0),e([v({readOnly:!0})],te.prototype,"placeholder",null),e([v()],te.prototype,"popupEnabled",void 0),e([v({type:o})],te.prototype,"popupTemplate",void 0),e([v({type:T})],te.prototype,"portal",void 0),e([v()],te.prototype,"resultCount",void 0),e([v()],te.prototype,"resultGraphicEnabled",void 0),e([v({readOnly:!0})],te.prototype,"resultGraphic",void 0),e([v({readOnly:!0})],te.prototype,"results",void 0),e([v({readOnly:!0})],te.prototype,"selectedSuggestion",void 0),e([v()],te.prototype,"searchAllEnabled",void 0),e([v({readOnly:!0})],te.prototype,"selectedResult",void 0),e([v()],te.prototype,"searchTerm",null),e([v({type:W})],te.prototype,"sources",void 0),e([v({readOnly:!0})],te.prototype,"state",null),e([v()],te.prototype,"suggestionDelay",void 0),e([v()],te.prototype,"suggestionCount",void 0),e([v({readOnly:!0})],te.prototype,"suggestions",void 0),e([v()],te.prototype,"suggestionsEnabled",void 0),e([v({readOnly:!0})],te.prototype,"updating",null),e([v()],te.prototype,"view",void 0),e([v()],te.prototype,"clear",null),te=e([b(q)],te);const re=te;export{re as default};
|