@arcgis/core 4.23.0-next.20220106 → 4.23.0-next.20220118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/components/assets/calcite-date-picker/nls/bg.json +31 -0
- package/assets/components/assets/calcite-icon/centerAlign16.json +1 -0
- package/assets/components/assets/calcite-icon/centerAlign24.json +1 -0
- package/assets/components/assets/calcite-icon/centerAlign32.json +1 -0
- package/assets/components/assets/calcite-icon/checkSquareF16.json +1 -0
- package/assets/components/assets/calcite-icon/checkSquareF24.json +1 -0
- package/assets/components/assets/calcite-icon/checkSquareF32.json +1 -0
- package/assets/components/assets/calcite-icon/convert16.json +1 -0
- package/assets/components/assets/calcite-icon/convert24.json +1 -0
- package/assets/components/assets/calcite-icon/convert32.json +1 -0
- package/assets/components/assets/calcite-icon/explore16.json +1 -0
- package/assets/components/assets/calcite-icon/explore24.json +1 -0
- package/assets/components/assets/calcite-icon/explore32.json +1 -0
- package/assets/components/assets/calcite-icon/formDropdown16.json +1 -0
- package/assets/components/assets/calcite-icon/formDropdown24.json +1 -0
- package/assets/components/assets/calcite-icon/formDropdown32.json +1 -0
- package/assets/components/assets/calcite-icon/language16.json +1 -0
- package/assets/components/assets/calcite-icon/language24.json +1 -0
- package/assets/components/assets/calcite-icon/language32.json +1 -0
- package/assets/components/assets/calcite-icon/languageTranslate16.json +1 -0
- package/assets/components/assets/calcite-icon/languageTranslate24.json +1 -0
- package/assets/components/assets/calcite-icon/languageTranslate32.json +1 -0
- package/assets/components/assets/calcite-icon/leftAlign16.json +1 -0
- package/assets/components/assets/calcite-icon/leftAlign24.json +1 -0
- package/assets/components/assets/calcite-icon/leftAlign32.json +1 -0
- package/assets/components/assets/calcite-icon/lineSolid4.json +1 -0
- package/assets/components/assets/calcite-icon/partlyCloudy16.json +1 -0
- package/assets/components/assets/calcite-icon/partlyCloudy24.json +1 -0
- package/assets/components/assets/calcite-icon/partlyCloudy32.json +1 -0
- package/assets/components/assets/calcite-icon/rightAlign16.json +1 -0
- package/assets/components/assets/calcite-icon/rightAlign24.json +1 -0
- package/assets/components/assets/calcite-icon/rightAlign32.json +1 -0
- package/assets/components/assets/calcite-icon/screenshotMode16.json +1 -0
- package/assets/components/assets/calcite-icon/screenshotMode24.json +1 -0
- package/assets/components/assets/calcite-icon/screenshotMode32.json +1 -0
- package/assets/components/assets/calcite-icon/squareF16.json +1 -0
- package/assets/components/assets/calcite-icon/squareF24.json +1 -0
- package/assets/components/assets/calcite-icon/squareF32.json +1 -0
- package/assets/components/assets/calcite-icon/terminal16.json +1 -0
- package/assets/components/assets/calcite-icon/terminal24.json +1 -0
- package/assets/components/assets/calcite-icon/terminal32.json +1 -0
- package/assets/components/assets/calcite-icon/touch16.json +1 -0
- package/assets/components/assets/calcite-icon/touch24.json +1 -0
- package/assets/components/assets/calcite-icon/touch32.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagon16.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagon24.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagon32.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagonF16.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagonF24.json +1 -0
- package/assets/components/assets/calcite-icon/xHexagonF32.json +1 -0
- package/assets/components/assets/calcite-icon/xOctagonF16.json +1 -0
- package/assets/components/assets/calcite-icon/xOctagonF24.json +1 -0
- package/assets/components/assets/calcite-icon/xOctagonF32.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +1 -0
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +1 -0
- package/assets/esri/core/workers/chunks/{2c9af2ebd72d9b55329b.js → 0f254c3e91e8fee55f28.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +1 -0
- package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +1 -0
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +1 -0
- package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +1 -0
- package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
- package/assets/esri/core/workers/chunks/2d947080a27db6ce0d75.js +1 -0
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +1 -0
- package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +1 -0
- package/assets/esri/core/workers/chunks/37a7bd30352b1309b8f8.js +1 -0
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +1 -0
- package/assets/esri/core/workers/chunks/{3d5169ea9810d10caf0d.js → 3a9740dccda6a733313c.js} +1 -1
- package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +1 -0
- package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +1 -0
- package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 47395d225229d237f0ac.js} +1 -1
- package/assets/esri/core/workers/chunks/4b69129c0557852d9b3d.js +1 -0
- package/assets/esri/core/workers/chunks/4c301ca9c493b96df746.js +1 -0
- package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
- package/assets/esri/core/workers/chunks/5ac4c1d54b94c7d87835.js +1 -0
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +1 -0
- package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +1 -0
- package/assets/esri/core/workers/chunks/{3a2b2dc3e938d53faa30.js → 64276aacaafa4c8a15bd.js} +1 -1
- package/assets/esri/core/workers/chunks/{75466e0c8c8da499b150.js → 662d13f68cf3ec92439b.js} +1 -1
- package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +1 -0
- package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
- package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +1 -0
- package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js → 7a8764ae8a0041e1151d.js} +2 -2
- package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js.LICENSE.txt → 7a8764ae8a0041e1151d.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{b4ed7856cd9c98434477.js → 7c9d2638693d5f798b23.js} +1 -1
- package/assets/esri/core/workers/chunks/7e596478507466953e65.js +1 -0
- package/assets/esri/core/workers/chunks/85b34d91cf07567d6873.js +1 -0
- package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +1 -0
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +1 -0
- package/assets/esri/core/workers/chunks/89de05207744149fb58b.js +1 -0
- package/assets/esri/core/workers/chunks/8cbb04a9065aa3756638.js +1 -0
- package/assets/esri/core/workers/chunks/{9846098704ee38bf6350.js → 8fdd5bca3716816d359b.js} +1 -1
- package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
- package/assets/esri/core/workers/chunks/987182b3a578fc7de251.js +1 -0
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
- package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
- package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 9d9dffc8884d66a258e4.js} +1 -1
- package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
- package/assets/esri/core/workers/chunks/{a721342a32541717324d.js → a28b53c61bddefb6616e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9b7c51ff3d2b42aa62f5.js → a7b1b75643ed31489495.js} +1 -1
- package/assets/esri/core/workers/chunks/a8b13fb804bb775e4967.js +1 -0
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +1 -0
- package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +1 -0
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +1 -0
- package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +1 -0
- package/assets/esri/core/workers/chunks/b10fcbe1393c812fc219.js +1 -0
- package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
- package/assets/esri/core/workers/chunks/{b51261a9a9ab62388839.js → b99e69302ea701fff0ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
- package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +1 -0
- package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +1 -0
- package/assets/esri/core/workers/chunks/{7c1b9ae141112a63b446.js → ba6654a885be4b7a43f0.js} +1 -1
- package/assets/esri/core/workers/chunks/bc790b2f964144d10abe.js +1 -0
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +1 -0
- package/assets/esri/core/workers/chunks/c36f84daa7736878418d.js +1 -0
- package/assets/esri/core/workers/chunks/{b58eba403bd517a7bb15.js → c3eca92d02958732e141.js} +1 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +1 -0
- package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
- package/assets/esri/core/workers/chunks/d1454155ee1b8a421cbb.js +1 -0
- package/assets/esri/core/workers/chunks/{0cd583c3233573cb8468.js → d24c4fbc567486b1188f.js} +1 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +1 -0
- package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +1 -0
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
- package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +1 -0
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
- package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6deac533bb455be4004b.js → ef8b75b92cf549e0507e.js} +1 -1
- package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +1 -0
- package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.svg +1 -0
- package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf +0 -0
- package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff +0 -0
- package/assets/esri/themes/base/icons/selection.json +1 -1
- package/assets/esri/themes/base/icons/style.css +4 -0
- package/assets/esri/themes/base/icons/style.scss +6 -0
- package/assets/esri/themes/base/icons/variables.scss +1 -0
- package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/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/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/ElevationProfile/t9n/ElevationProfile_ja.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ar.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bg.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bs.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ca.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_cs.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_da.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_de.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_el.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_es.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_et.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fi.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_he.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hu.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_id.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_it.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ko.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lt.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lv.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nb.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nl.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pl.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ro.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ru.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sk.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sl.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sv.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_th.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_tr.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_uk.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_vi.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-TW.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
- package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.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_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/Clouds.glsl.js +14 -14
- package/chunks/HUDMaterial.glsl.js +22 -21
- package/chunks/RibbonLine.glsl.js +10 -14
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vec42.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/urlUtils.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/geometry/support/buffer/math/common.js +1 -1
- package/interfaces.d.ts +99 -56
- package/layers/FeatureLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/ogc/crsUtils.js +5 -0
- package/layers/support/RasterFunction.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/package.json +5 -5
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/request.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/rest/support/StatisticDefinition.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/ExtrudeSymbol3DLayer.js +1 -1
- package/symbols/Font.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PathSymbol3DLayer.js +1 -1
- package/symbols/TextSymbol.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/constants.js +5 -0
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +5 -0
- package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
- package/views/2d/engine/webgl/MaterialManager.js +1 -1
- package/views/2d/engine/webgl/alignmentUtils.js +1 -1
- package/views/2d/engine/webgl/effects/BlendEffect.js +1 -1
- package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/BlendPrograms.js +1 -1
- package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/environment/CloudyWeather.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FoggyWeather.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MapImageLayerView3D.js +1 -1
- package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/WMSLayerView3D.js +1 -1
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/global/ZoomController.js +1 -1
- package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/support/debugFlags.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/Overlay.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/InstanceParameters.js +5 -0
- package/views/3d/webgl-engine/lib/{localOrigin.js → LocalOriginFactory.js} +0 -0
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/MapView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/layers/OGCFeatureLayerView.js +1 -1
- package/views/layers/RefreshableLayerView.js +1 -1
- package/views/overlay/ViewOverlay.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/ContextState.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/ProgramCache.js +1 -1
- package/views/webgl/ProgramTemplate.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/UniformBufferLayout.js +5 -0
- package/views/webgl/UniformBufferObject.js +5 -0
- package/views/webgl/enums.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/storageLayouts.js +5 -0
- package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/views/webgl/testSamplerPrecision.js +1 -1
- package/views/webgl/tests/SimpleDraw.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
- package/widgets/Editor/BatchCreateWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureForm/InputFieldGroup.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Weather/CoverageSlider.js +5 -0
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/assets/esri/core/workers/chunks/0881ce46b10362861f87.js +0 -1
- package/assets/esri/core/workers/chunks/0c0a02770eeeb3e28ea1.js +0 -1
- package/assets/esri/core/workers/chunks/0d2effbd84a9482eb639.js +0 -1
- package/assets/esri/core/workers/chunks/0f04246c1b591a3ac74d.js +0 -1
- package/assets/esri/core/workers/chunks/1ac6be0dc25e16c75d06.js +0 -1
- package/assets/esri/core/workers/chunks/1f8110ea12d65ca94b55.js +0 -1
- package/assets/esri/core/workers/chunks/2025d0fd61a64876c81b.js +0 -1
- package/assets/esri/core/workers/chunks/241859d74c0daac62e11.js +0 -1
- package/assets/esri/core/workers/chunks/331be347c1b1ca0be2d2.js +0 -1
- package/assets/esri/core/workers/chunks/39af317388ecebb4387d.js +0 -1
- package/assets/esri/core/workers/chunks/39be2893a7dbdecfd65a.js +0 -1
- package/assets/esri/core/workers/chunks/3a20f66b0b7d08064e34.js +0 -1
- package/assets/esri/core/workers/chunks/445099d037affd139ed0.js +0 -1
- package/assets/esri/core/workers/chunks/45848fecec88ed2da33d.js +0 -1
- package/assets/esri/core/workers/chunks/48d3a3abc53abe6a4017.js +0 -1
- package/assets/esri/core/workers/chunks/5005b8c1fdd5cb9a4c19.js +0 -1
- package/assets/esri/core/workers/chunks/52e4c367c72ea7cc3457.js +0 -1
- package/assets/esri/core/workers/chunks/5d8170f6207dbeb4de1b.js +0 -1
- package/assets/esri/core/workers/chunks/642c38ac00a962f35d44.js +0 -1
- package/assets/esri/core/workers/chunks/64459604505647e9c714.js +0 -1
- package/assets/esri/core/workers/chunks/653d1550dd1a4867a9fc.js +0 -1
- package/assets/esri/core/workers/chunks/65f73fbbc3c7c60c6d3d.js +0 -1
- package/assets/esri/core/workers/chunks/6db7081d344bea26ef64.js +0 -1
- package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
- package/assets/esri/core/workers/chunks/7bd4c3ee43fb038b88d8.js +0 -1
- package/assets/esri/core/workers/chunks/803de5097a8a2c4b58a8.js +0 -1
- package/assets/esri/core/workers/chunks/8298231a0fd0129b0d5c.js +0 -1
- package/assets/esri/core/workers/chunks/8500c6c011400af1b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/8b322a2a47dfdbb59b45.js +0 -1
- package/assets/esri/core/workers/chunks/8f83bebef9174c3f15da.js +0 -1
- package/assets/esri/core/workers/chunks/904332faa22bc0e876cb.js +0 -1
- package/assets/esri/core/workers/chunks/950565d1e682fc4072e1.js +0 -1
- package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
- package/assets/esri/core/workers/chunks/a9ffa806df20130ecfb6.js +0 -1
- package/assets/esri/core/workers/chunks/af13e534e4160636bd3d.js +0 -1
- package/assets/esri/core/workers/chunks/b2f62234ebb8b6158baa.js +0 -1
- package/assets/esri/core/workers/chunks/b5bb7cfa26b1f0cec67a.js +0 -1
- package/assets/esri/core/workers/chunks/b8666d1a4e4fff7a4703.js +0 -1
- package/assets/esri/core/workers/chunks/bea1da9e3f878e0e2c83.js +0 -1
- package/assets/esri/core/workers/chunks/c1b6c31fa3ec1542f996.js +0 -1
- package/assets/esri/core/workers/chunks/c32a4fbdc87225f84019.js +0 -1
- package/assets/esri/core/workers/chunks/c67fea81f69a60c0eaef.js +0 -1
- package/assets/esri/core/workers/chunks/d336afd5890dcdbf5341.js +0 -1
- package/assets/esri/core/workers/chunks/da69e3e5949fe1716e34.js +0 -1
- package/assets/esri/core/workers/chunks/daa9c450b2e2a5371249.js +0 -1
- package/assets/esri/core/workers/chunks/dd63ba77b7e4c3c9c594.js +0 -1
- package/assets/esri/core/workers/chunks/dfa57982d28c9aeb97b9.js +0 -1
- package/assets/esri/core/workers/chunks/e01812116b27874948f0.js +0 -1
- package/assets/esri/core/workers/chunks/e5c9d8482b913cf3580a.js +0 -1
- package/assets/esri/core/workers/chunks/eeadd92f0bede9fc8745.js +0 -1
- package/assets/esri/core/workers/chunks/fbb67cb6224aed2cce16.js +0 -1
- package/assets/esri/core/workers/chunks/feeaf61424336e9eac88.js +0 -1
- package/assets/esri/core/workers/chunks/ff02295329a8986d0568.js +0 -1
- package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{HandleOwner as t}from"../../../core/HandleOwner.js";import r from"../../../core/Handles.js";import{someMap as o}from"../../../core/MapUtils.js";import{isSome as i,unwrap as n,isNone as a}from"../../../core/maybe.js";import{eachAlwaysValues as s,throwIfAborted as c}from"../../../core/promiseUtils.js";import{
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{HandleOwner as t}from"../../../core/HandleOwner.js";import r from"../../../core/Handles.js";import{someMap as o}from"../../../core/MapUtils.js";import{isSome as i,unwrap as n,isNone as a}from"../../../core/maybe.js";import{eachAlwaysValues as s,throwIfAborted as c}from"../../../core/promiseUtils.js";import{sync as u}from"../../../core/reactiveUtils.js";import{init as l}from"../../../core/watchUtils.js";import{property as d}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";import{c as h}from"../../../chunks/vec3f64.js";import{SnappingTypes as g}from"../../../layers/graphics/data/QueryEngineResult.js";import{RayConstraint as y}from"./SnappingConstraint.js";import{sortCandidatesInPlace as f,anyMapPointToRender as S,anyMapPointToScreenPoint as m}from"./snappingUtils.js";import{EdgeSnappingCandidate as v}from"./candidates/EdgeSnappingCandidate.js";import{FeatureSnappingCandidate as w}from"./candidates/FeatureSnappingCandidate.js";import{RightAngleSnappingCandidate as _,OtherVertexType as j}from"./candidates/RightAngleSnappingCandidate.js";let x=class extends t{constructor(e){super(e),this.sourceModules={featureService:{module:null,loader:null},featureCollection:{module:null,loader:null},graphics:{module:null,loader:null}}}get updating(){return o(this.snappingSources,(({snappingSource:e})=>e.updating))||this.updatingHandles.updating}get snappingSources(){var e;const t=this._get("snappingSources")||new Map,r=new Map;if(null!=(e=this.options)&&e.featureSources)for(const o of this.options.featureSources.items){const e=o.layer.uid,n=t.get(e);if(n){t.delete(e),r.set(e,n);continue}if(!o.layer.loaded){this.updatingHandles.addPromise(o.layer.load());continue}const a=this._createSourceInfo(o);i(a)&&r.set(e,a)}for(const[,o]of t)o.destroy();return r}initialize(){this.updatingHandles.add((()=>this.snappingSources),(()=>this.notifyChange("updating")),u),i(this.view)&&this.handles.add([this.view.on("layerview-create",(e=>this._updateLayerView(e.layer,e.layerView))),this.view.on("layerview-destroy",(e=>this._updateLayerView(e.layer,null)))])}_updateLayerView(e,t){for(const[,r]of this.snappingSources)r.snappingSource.layerSource.layer===e&&(r.layerView=t)}destroy(){this._set("options",null);for(const[,e]of this.snappingSources)e.destroy()}async fetchCandidates(e,t,r){if(!this.options.effectiveFeatureEnabled)return[];const o=[],n=this._computeScreeenSizeDistanceParameters(e,t),a={distance:n,point:e,coordinateHelper:t.coordinateHelper,types:this.types,filter:null};for(const[,{snappingSource:s,layerView:c}]of this.snappingSources)!s.layerSource.enabled||i(c)&&c.suspended||o.push(s.fetchCandidates(a,r).then((e=>e.filter((e=>!this._candidateIsExcluded(s,e,t.excludeFeature))))));const u=(await s(o)).flat();return this._addRightAngleCandidates(u,e,n,t),c(r),f(e,u),u}_addRightAngleCandidates(e,t,r,o){var a,s,c,u,l,d,p,h;const g=i(o.vertexHandle)?null==(a=o.vertexHandle.rightEdge)||null==(s=a.rightVertex)?void 0:s.pos:i(o.editGeometryOperations)&&"polygon"===o.editGeometryOperations.data.type?null==(c=n(null==(u=o.editGeometryOperations.data.components[0])?void 0:u.getFirstVertex()))?void 0:c.pos:null,y=i(o.vertexHandle)?null==(l=o.vertexHandle.leftEdge)||null==(d=l.leftVertex)?void 0:d.pos:i(o.editGeometryOperations)?null==(p=n(null==(h=o.editGeometryOperations.data.components[0])?void 0:h.getLastVertex()))?void 0:p.pos:null,f=e.length;for(let i=0;i<f;i++)this._addRightAngleCandidate(e[i],y,t,r,o,e),this._addRightAngleCandidate(e[i],g,t,r,o,e)}_addRightAngleCandidate(e,t,r,o,i,n){if(a(t)||!(e instanceof v))return;const s=e.constraint.closestTo(t),c=(s[0]-r[0])/o.x,u=(s[1]-r[1])/o.y;if(c*c+u*u<=1){const r=i.coordinateHelper;n.push(new _({coordinateHelper:r,targetPoint:s,otherVertex:t,otherVertexType:j.NEXT,previousVertex:e.constraint.start,constraint:new y(r,t,s),objectId:e.objectId}))}}_computeScreeenSizeDistanceParameters(e,t){const r=this.options.distance*("touch"===t.pointer?this.options.touchSensitivityMultiplier:1);return a(this.view)?{x:r,y:r}:"2d"===this.view.type?{x:r*this.view.resolution,y:r*this.view.resolution}:this._computeScreeenSizeDistanceParameters3D(e,r,this.view,t)}_computeScreeenSizeDistanceParameters3D(e,t,r,o){const{coordinateHelper:i,elevationInfo:n}=o,a=r.state.camera.computeScreenPixelSizeAt(S(e,i,n,r,H))*r.renderCoordsHelper.unitInMeters/r.mapCoordsHelper.unitInMeters,s=t*a;return{x:s/this._computeScreenMagnitudeOfMapOffset(e,a,0,r,o),y:s/this._computeScreenMagnitudeOfMapOffset(e,0,a,r,o)}}_computeScreenMagnitudeOfMapOffset(e,t,r,o,{coordinateHelper:i,elevationInfo:n}){const a=i.clone(e);a[0]+=t,a[1]+=r;const s=m(e,i,n,o),c=m(a,i,n,o),u=c.x-s.x,l=c.y-s.y;return Math.sqrt(u*u+l*l)}get types(){return g.EDGE|g.VERTEX}_candidateIsExcluded(e,t,r){if(a(r))return!1;const o=this._getCandidateObjectId(t);if(a(o))return!1;const i=e.layerSource.layer;return"graphics"===i.type?r.uid===o:r.sourceLayer===i&&(!(!r.attributes||!("objectIdField"in i))&&r.attributes[i.objectIdField]===o)}_getCandidateObjectId(e){return e instanceof w?e.objectId:null}_createSourceInfo(e){const t=this._createFeatureSnappingSourceType(e);if(a(t))return null;if("loading"in t)return this.updatingHandles.addPromise(t.loading.then((()=>{this.destroyed||this.notifyChange("snappingSources")}))),null;const r=i(this.view)?this.view.allLayerViews.find((t=>t.layer===e.layer)):null;return new C(t.source,r)}_createFeatureSnappingSourceType(e){switch(e.layer.type){case"feature":case"geojson":case"csv":case"subtype-group":case"wfs":return this._createFeatureSnappingSourceFeatureLayer(e);case"graphics":return this._createFeatureSnappingSourceGraphicsLayer(e)}return null}_createFeatureSnappingSourceFeatureLayer(e){switch(e.layer.source.type){case"feature-layer":{const t=this._getSourceModule("featureService");return i(t.module)?{source:new t.module.FeatureServiceSnappingSource({spatialReference:this.spatialReference,view:this.view,layerSource:e})}:{loading:t.loader}}case"memory":case"csv":case"geojson":case"wfs":{if("mesh"===e.layer.geometryType)return null;const t=this._getSourceModule("featureCollection");return i(t.module)?{source:new t.module.FeatureCollectionSnappingSource({layerSource:e})}:{loading:t.loader}}}return null}_createFeatureSnappingSourceGraphicsLayer(e){const t=this._getSourceModule("graphics");return i(t.module)?{source:new t.module.GraphicsSnappingSource({spatialReference:this.spatialReference,view:this.view,layerSource:e})}:{loading:t.loader}}_getSourceModule(e){const t=this.sourceModules[e];if(a(t.loader)){const r=this._loadSourceModule(e).then((e=>{t.module=e}));return t.loader=r,{module:t.module,loader:r}}return{module:t.module,loader:t.loader}}_loadSourceModule(e){switch(e){case"featureService":return this.updatingHandles.addPromise(import("./featureSources/FeatureServiceSnappingSource.js"));case"featureCollection":return this.updatingHandles.addPromise(import("./featureSources/FeatureCollectionSnappingSource.js"));case"graphics":return this.updatingHandles.addPromise(import("./featureSources/GraphicsSnappingSource.js"))}return null}};e([d({constructOnly:!0})],x.prototype,"spatialReference",void 0),e([d({constructOnly:!0})],x.prototype,"view",void 0),e([d()],x.prototype,"options",void 0),e([d({readOnly:!0})],x.prototype,"updating",null),e([d({readOnly:!0})],x.prototype,"snappingSources",null),x=e([p("esri.views.interactive.snapping.FeatureSnappingEngine")],x);class C{constructor(e,t){this.snappingSource=e,this.layerView=t,this.handles=new r;const o=this.snappingSource.layerSource.layer;if("refresh"in o){const t=o;this.handles.add(t.on("refresh",(()=>e.refresh())))}this.handles.add([l(e,"updating",(t=>e.layerSource.updating=t),!0),l(e,"availability",(t=>e.layerSource.availability=t),!0)])}destroy(){this.snappingSource.destroy(),this.handles.destroy()}}const H=h();export{x as FeatureSnappingEngine};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import{HandleOwnerMixin as t}from"../../../../core/HandleOwner.js";import{destroyHandle as i}from"../../../../core/handleUtils.js";import{isSome as s}from"../../../../core/maybe.js";import{
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/Accessor.js";import{HandleOwnerMixin as t}from"../../../../core/HandleOwner.js";import{destroyHandle as i}from"../../../../core/handleUtils.js";import{isSome as s}from"../../../../core/maybe.js";import{initial as a,watch as o,sync as n}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{FeatureServiceTiles2D as c}from"../../../2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js";import{FeatureServiceTiles3D as d}from"../../../3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js";import{convertSnappingCandidate as p}from"./queryEngineUtils.js";import{WorkerTileTreeDebugger as h}from"./WorkerTileTreeDebugger.js";import{FeatureServiceSnappingSourceWorkerHandle as f}from"./featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js";import{FeatureServiceTilesSimple as m}from"./featureServiceSource/FeatureServiceTilesSimple.js";import y from"../../../support/debugFlags.js";let g=class extends(t(r)){constructor(e){super(e)}get updateTilesParameters(){return{tiles:this.tilesOfInterest.tiles,tileInfo:this.tilesOfInterest.tileInfo,tileSize:this.tilesOfInterest.tileSize}}get updating(){return this.workerHandle.updating||this.updatingHandles.updating}get configuration(){return{filter:this.layer.createQuery(),customParameters:this.layer.customParameters}}get availability(){return this.workerHandle.availability}get layer(){return this.layerSource.layer}initialize(){const e=this.view;if(s(e))switch(e.type){case"2d":this.tilesOfInterest=new c({view:e,layer:this.layer}),this.workerHandle=new f;break;case"3d":{const r=e.resourceController;this.tilesOfInterest=new d({view:e}),this.workerHandle=new f({schedule:e=>r.schedule(e)});break}}else this.tilesOfInterest=new m({layer:this.layer}),this.workerHandle=new f;this.handles.add([i(this.workerHandle)]),this.workerHandle.setup({layer:this.layer,spatialReference:this.spatialReference,configuration:this.configuration},null),this.updatingHandles.add((()=>this.updateTilesParameters),(()=>this.workerHandle.updateTiles(this.updateTilesParameters,null)),a),this.handles.add([o((()=>this.configuration),(e=>this.workerHandle.configure(e,null)),n)]),s(e)&&this.handles.add(o((()=>y.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES),(r=>{r&&!this.debug?(this.debug=new h({view:e,handle:this.workerHandle}),this.handles.add(i(this.debug),"debug")):!r&&this.debug&&this.handles.remove("debug")}),a)),this.handles.add(this.layerSource.layer.on("apply-edits",(e=>{this.workerHandle.applyEdits(e,null)})))}refresh(){this.workerHandle.refresh(null)}async fetchCandidates(e,r){return this.tilesOfInterest.pointOfInterest=e.coordinateHelper.vectorToPoint(e.point),(await this.workerHandle.fetchCandidates({...e,filter:null},r)).candidates.map((r=>p(r,e.coordinateHelper)))}getDebugInfo(e){return this.workerHandle.getDebugInfo(e)}};e([l({constructOnly:!0})],g.prototype,"spatialReference",void 0),e([l({constructOnly:!0})],g.prototype,"layerSource",void 0),e([l({constructOnly:!0})],g.prototype,"view",void 0),e([l()],g.prototype,"tilesOfInterest",void 0),e([l({readOnly:!0})],g.prototype,"updateTilesParameters",null),e([l({readOnly:!0})],g.prototype,"updating",null),e([l({readOnly:!0})],g.prototype,"configuration",null),e([l({readOnly:!0})],g.prototype,"availability",null),g=e([u("esri.views.interactive.snapping.featureSources.FeatureServiceSnappingSource")],g);export{g as FeatureServiceSnappingSource};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{removeUnordered as r}from"../../../../core/arrayUtils.js";import{HandleOwnerMixin as s}from"../../../../core/HandleOwner.js";import{isSome as o,isNone as i}from"../../../../core/maybe.js";import{eachAlwaysValues as a,createTask as n}from"../../../../core/promiseUtils.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../geometry/Polygon.js";import{canProjectWithoutEngine as l,project as u,initializeProjection as h}from"../../../../geometry/projection.js";import{normalizeCentralMeridianSync as m}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as y}from"../../../../geometry/support/typeUtils.js";import{convertFromGeometry as f}from"../../../../layers/graphics/featureConversionUtils.js";import g from"../../../../layers/graphics/OptimizedFeature.js";import S from"../../../../layers/graphics/data/FeatureStore.js";import _ from"../../../../layers/graphics/data/QueryEngine.js";import{sortCandidatesInPlace as j}from"../snappingUtils.js";import{convertSnappingCandidate as w}from"./queryEngineUtils.js";let v=class extends(s(t)){constructor(e){super(e),this.availability=1,this.sources={multipoint:null,point:null,polygon:null,polyline:null},this.loadedWkids=new Set,this.loadedWkts=new Set,this.pendingAdds=[]}get updating(){return this.updatingHandles.updating}get layer(){return this.layerSource.layer}destroy(){const e=this.pendingAdds;this.pendingAdds.length=0;for(const t of e)t.task.abort();this._mapSources((e=>this._destroySource(e)))}initialize(){this.handles.add([this.layer.on("graphic-update",(e=>this._onGraphicUpdate(e))),this.updatingHandles.addOnCollectionChange(this.layer.graphics,(e=>this._onGraphicsChanged(e)))]),this._addMany(this.layer.graphics.toArray())}async fetchCandidates(e,t){const r=await a(this._mapSources((r=>r.queryEngine.executeQueryForSnapping({point:e.coordinateHelper.vectorToPoint(e.point).toJSON(),distance:e.distance,types:e.types,query:o(e.filter)?e.filter.createQuery().toJSON():{where:"1=1"}},t).then((({candidates:e})=>e))))),s=r.flat().map((t=>w(t,e.coordinateHelper)));return j(e.point,s),s}refresh(){}_onGraphicUpdate(e){switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],r=new Map;for(const s of e)i(s.geometry)||(this._needsInitializeProjection(s.geometry.spatialReference)?(t.push(s.geometry.spatialReference),r.set(s.uid,s)):this._add(s));this._createPendingAdd(t,r)}_createPendingAdd(e,t){if(!e.length)return;const s=n((async r=>{await h(e.map((e=>({source:e,dest:this.spatialReference}))),{signal:r}),this._markLoadedSpatialReferences(e);for(const[,e]of t)this._add(e)}));this.updatingHandles.addPromise(s.promise);const o={task:s,graphics:t},i=()=>r(this.pendingAdds,o);s.promise.then(i,i),this.pendingAdds.push(o)}_markLoadedSpatialReferences(e){for(const t of e)null!=t.wkid&&this.loadedWkids.add(t.wkid),null!=t.wkt&&this.loadedWkts.add(t.wkt)}_add(e){if(i(e.geometry)||!e.visible)return;let t=e.geometry;if("mesh"===t.type)return;"extent"===t.type&&(t=c.fromExtent(t));const r=this._ensureSource(t.type);if(i(r))return;const s=this._createOptimizedFeature(e.uid,t);o(s)&&r.featureStore.add(s)}_needsInitializeProjection(e){return(null==e.wkid||!this.loadedWkids.has(e.wkid))&&((null==e.wkt||!this.loadedWkts.has(e.wkt))&&!l(e,this.spatialReference))}_createOptimizedFeature(e,t){const r=u(m(t),this.spatialReference);return r?new g(f(r,!1,!1),{[k]:e},null,e):null}_ensureSource(e){const t=this.sources[e];if(o(t))return t;const r=this._createSource(e);return this.sources[e]=r,r}_createSource(e){const t=y.toJSON(e),r=new S({geometryType:t,hasZ:!1,hasM:!1});return{featureStore:r,queryEngine:new _({featureStore:r,fields:[{name:k,type:"esriFieldTypeOID",alias:k}],geometryType:t,hasM:!1,hasZ:!1,objectIdField:k,spatialReference:this.spatialReference,scheduler:o(this.view)&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources((t=>this._removeFromSource(t,e)));for(const t of this.pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const r=t.uid;e.featureStore.has(r)&&e.featureStore.removeById(t.uid)}_destroySource(e){e.queryEngine.destroy(),this.sources[e.type]=null}_mapSources(e){const{point:t,polygon:r,polyline:s,multipoint:i}=this.sources,a=[];return o(t)&&a.push(e(t)),o(r)&&a.push(e(r)),o(s)&&a.push(e(s)),o(i)&&a.push(e(i)),a}};e([p({constructOnly:!0})],v.prototype,"spatialReference",void 0),e([p({constructOnly:!0})],v.prototype,"layerSource",void 0),e([p({constructOnly:!0})],v.prototype,"view",void 0),e([p({readOnly:!0})],v.prototype,"updating",null),e([p({readOnly:!0})],v.prototype,"availability",void 0),v=e([d("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],v);const k="OBJECTID";export{v as GraphicsSnappingSource};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{removeUnordered as r}from"../../../../core/arrayUtils.js";import{HandleOwnerMixin as s}from"../../../../core/HandleOwner.js";import{isSome as o,isNone as i}from"../../../../core/maybe.js";import{eachAlwaysValues as a,createTask as n}from"../../../../core/promiseUtils.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../geometry/Polygon.js";import{canProjectWithoutEngine as l,project as u,initializeProjection as h}from"../../../../geometry/projection.js";import{normalizeCentralMeridianSync as m}from"../../../../geometry/support/normalizeUtilsSync.js";import{featureGeometryTypeKebabDictionary as y}from"../../../../geometry/support/typeUtils.js";import{convertFromGeometry as f}from"../../../../layers/graphics/featureConversionUtils.js";import g from"../../../../layers/graphics/OptimizedFeature.js";import S from"../../../../layers/graphics/data/FeatureStore.js";import _ from"../../../../layers/graphics/data/QueryEngine.js";import{sortCandidatesInPlace as j}from"../snappingUtils.js";import{convertSnappingCandidate as w}from"./queryEngineUtils.js";let v=class extends(s(t)){constructor(e){super(e),this.availability=1,this.sources={multipoint:null,point:null,polygon:null,polyline:null},this.loadedWkids=new Set,this.loadedWkts=new Set,this.pendingAdds=[]}get updating(){return this.updatingHandles.updating}get layer(){return this.layerSource.layer}destroy(){const e=this.pendingAdds;this.pendingAdds.length=0;for(const t of e)t.task.abort();this._mapSources((e=>this._destroySource(e)))}initialize(){this.handles.add([this.layer.on("graphic-update",(e=>this._onGraphicUpdate(e))),this.updatingHandles.addOnCollectionChange((()=>this.layer.graphics),(e=>this._onGraphicsChanged(e)))]),this._addMany(this.layer.graphics.toArray())}async fetchCandidates(e,t){const r=await a(this._mapSources((r=>r.queryEngine.executeQueryForSnapping({point:e.coordinateHelper.vectorToPoint(e.point).toJSON(),distance:e.distance,types:e.types,query:o(e.filter)?e.filter.createQuery().toJSON():{where:"1=1"}},t).then((({candidates:e})=>e))))),s=r.flat().map((t=>w(t,e.coordinateHelper)));return j(e.point,s),s}refresh(){}_onGraphicUpdate(e){switch(e.property){case"geometry":case"visible":this._remove(e.graphic),this._addMany([e.graphic])}}_onGraphicsChanged(e){for(const t of e.removed)this._remove(t);this._addMany(e.added)}_addMany(e){const t=[],r=new Map;for(const s of e)i(s.geometry)||(this._needsInitializeProjection(s.geometry.spatialReference)?(t.push(s.geometry.spatialReference),r.set(s.uid,s)):this._add(s));this._createPendingAdd(t,r)}_createPendingAdd(e,t){if(!e.length)return;const s=n((async r=>{await h(e.map((e=>({source:e,dest:this.spatialReference}))),{signal:r}),this._markLoadedSpatialReferences(e);for(const[,e]of t)this._add(e)}));this.updatingHandles.addPromise(s.promise);const o={task:s,graphics:t},i=()=>r(this.pendingAdds,o);s.promise.then(i,i),this.pendingAdds.push(o)}_markLoadedSpatialReferences(e){for(const t of e)null!=t.wkid&&this.loadedWkids.add(t.wkid),null!=t.wkt&&this.loadedWkts.add(t.wkt)}_add(e){if(i(e.geometry)||!e.visible)return;let t=e.geometry;if("mesh"===t.type)return;"extent"===t.type&&(t=c.fromExtent(t));const r=this._ensureSource(t.type);if(i(r))return;const s=this._createOptimizedFeature(e.uid,t);o(s)&&r.featureStore.add(s)}_needsInitializeProjection(e){return(null==e.wkid||!this.loadedWkids.has(e.wkid))&&((null==e.wkt||!this.loadedWkts.has(e.wkt))&&!l(e,this.spatialReference))}_createOptimizedFeature(e,t){const r=u(m(t),this.spatialReference);return r?new g(f(r,!1,!1),{[k]:e},null,e):null}_ensureSource(e){const t=this.sources[e];if(o(t))return t;const r=this._createSource(e);return this.sources[e]=r,r}_createSource(e){const t=y.toJSON(e),r=new S({geometryType:t,hasZ:!1,hasM:!1});return{featureStore:r,queryEngine:new _({featureStore:r,fields:[{name:k,type:"esriFieldTypeOID",alias:k}],geometryType:t,hasM:!1,hasZ:!1,objectIdField:k,spatialReference:this.spatialReference,scheduler:o(this.view)&&"3d"===this.view.type?this.view.resourceController.scheduler:null}),type:e}}_remove(e){this._mapSources((t=>this._removeFromSource(t,e)));for(const t of this.pendingAdds)t.graphics.delete(e.uid),0===t.graphics.size&&t.task.abort()}_removeFromSource(e,t){const r=t.uid;e.featureStore.has(r)&&e.featureStore.removeById(t.uid)}_destroySource(e){e.queryEngine.destroy(),this.sources[e.type]=null}_mapSources(e){const{point:t,polygon:r,polyline:s,multipoint:i}=this.sources,a=[];return o(t)&&a.push(e(t)),o(r)&&a.push(e(r)),o(s)&&a.push(e(s)),o(i)&&a.push(e(i)),a}};e([p({constructOnly:!0})],v.prototype,"spatialReference",void 0),e([p({constructOnly:!0})],v.prototype,"layerSource",void 0),e([p({constructOnly:!0})],v.prototype,"view",void 0),e([p({readOnly:!0})],v.prototype,"updating",null),e([p({readOnly:!0})],v.prototype,"availability",void 0),v=e([d("esri.views.interactive.snapping.featureSources.GraphicsSnappingSource")],v);const k="OBJECTID";export{v as GraphicsSnappingSource};
|
package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.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.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{equals as t}from"../../../../../core/arrayUtils.js";import{AsyncSequence as i}from"../../../../../core/AsyncSequence.js";import{HandleOwner as s}from"../../../../../core/HandleOwner.js";import{makeHandle as r}from"../../../../../core/handleUtils.js";import o from"../../../../../core/Logger.js";import{isSome as n,isNone as a,unwrap as l}from"../../../../../core/maybe.js";import{createTask as u,throwIfAbortError as c}from"../../../../../core/promiseUtils.js";import{property as d}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import p from"../../../../../geometry/Extent.js";import{toExtent as f}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as y,convertFromFeatureSet as g}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeatureSetParserContext as m}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as _,executeQueryPBF as F,executeQuery as b}from"../../../../../rest/query/operations/query.js";import T from"../../../../../rest/support/Query.js";import{StateType as v,PendingFeatureTile as P}from"./PendingFeatureTile.js";import{WatchFlags as I}from"../../../../support/WatchUpdatingTracking.js";const S=o.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let O=class extends s{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new i,this.pendingEditsAbortController=new AbortController}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(n(e)&&n(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add(this,"configuration",(()=>this.refresh())),this.updatingHandles.add(this,"tilesOfInterest",((e,i)=>{t(e,i,(({id:e},{id:t})=>e===t))||this._process()}),I.SYNC)}destroy(){this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,i]of this.pendingTiles)i.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=u((async e=>{try{var t;const i=await _(this.url,new T({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=p.fromJSON(null==(t=i.data)?void 0:t.extent)}catch(i){c(i),S.warn("Failed to fetch data extent",i)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add(r((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(a(e)?1:e.coveredArea/e.fullArea),!a(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this._verifyTileComplexity(e,t)));a(e)?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<x}_verifyFeatureDensity(e,t){if(a(this.tileInfo))return!1;const i=this.tileSize*t;return e*(E/(i*i))<w}_ensureFetchAllCounts(e){let t=!0;for(const[,i]of this.pendingTiles)i.state.type<v.FETCHED_COUNT&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=v.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(a(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new P(e,t);return this.pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:j,signal:t})}async _fetchFeatures(e,t,i){let s,r=0,o=0,n=t;for(;;){const a=this._createFeaturesQuery(e),u=this._setPagingParameters(a,r,n),{features:c,exceededTransferLimit:d}=await this._queryFeatures(a,i);if(u&&(r+=l(a.num)),o+=c.length,s=s?s.concat(c):c,n=t-o,!u||!d||n<=0)return s}}_filterProperties(e){return a(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(a(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{var o;e===r.attributes[t]&&(s=null!=(o=r.objectId)?o:r.attributes[i])})),a(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery(null);return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await F(this.url,e,new m({sourceSpatialReference:i}),{query:this.configuration.customParameters,timeout:j,signal:t});return y(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await b(this.url,e,i,{query:this.configuration.customParameters,timeout:j,signal:t});return g(s,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,n(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T({returnZ:!1,returnM:!1,geometry:n(this.tileInfo)&&n(e)?f(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this.configuration.filter;return n(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?T.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||C);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([d({constructOnly:!0})],O.prototype,"url",void 0),e([d({constructOnly:!0})],O.prototype,"objectIdField",void 0),e([d({constructOnly:!0})],O.prototype,"globalIdField",void 0),e([d({constructOnly:!0})],O.prototype,"capabilities",void 0),e([d({constructOnly:!0})],O.prototype,"sourceSpatialReference",void 0),e([d({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([d({constructOnly:!0})],O.prototype,"store",void 0),e([d({readOnly:!0})],O.prototype,"minimumVerticesPerFeature",null),e([d()],O.prototype,"filter",null),e([d()],O.prototype,"customParameters",null),e([d({readOnly:!0})],O.prototype,"configuration",null),e([d()],O.prototype,"tileInfo",null),e([d()],O.prototype,"tileSize",null),e([d()],O.prototype,"tilesOfInterest",void 0),e([d({readOnly:!0})],O.prototype,"updating",null),e([d({readOnly:!0})],O.prototype,"availability",void 0),O=e([h("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],O);const C=2e3,j=6e5,x=1e6,E=25,w=1;export{O as FeatureServiceTiledFetcher};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{equals as t}from"../../../../../core/arrayUtils.js";import{AsyncSequence as i}from"../../../../../core/AsyncSequence.js";import{HandleOwner as s}from"../../../../../core/HandleOwner.js";import{makeHandle as r}from"../../../../../core/handleUtils.js";import o from"../../../../../core/Logger.js";import{isSome as n,isNone as a,unwrap as l}from"../../../../../core/maybe.js";import{createTask as u,throwIfAbortError as c}from"../../../../../core/promiseUtils.js";import{sync as d}from"../../../../../core/reactiveUtils.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import f from"../../../../../geometry/Extent.js";import{toExtent as y}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as g,convertFromFeatureSet as m}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeatureSetParserContext as _}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as F,executeQueryPBF as b,executeQuery as T}from"../../../../../rest/query/operations/query.js";import v from"../../../../../rest/support/Query.js";import{StateType as P,PendingFeatureTile as I}from"./PendingFeatureTile.js";const O=o.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let S=class extends s{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new i,this.pendingEditsAbortController=new AbortController}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(n(e)&&n(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this.configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,i)=>{t(e,i,(({id:e},{id:t})=>e===t))||this._process()}),d)}destroy(){this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,i]of this.pendingTiles)i.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=u((async e=>{try{var t;const i=await F(this.url,new v({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=f.fromJSON(null==(t=i.data)?void 0:t.extent)}catch(i){c(i),O.warn("Failed to fetch data extent",i)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add(r((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(a(e)?1:e.coveredArea/e.fullArea),!a(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this._verifyTileComplexity(e,t)));a(e)?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<x}_verifyFeatureDensity(e,t){if(a(this.tileInfo))return!1;const i=this.tileSize*t;return e*(E/(i*i))<w}_ensureFetchAllCounts(e){let t=!0;for(const[,i]of this.pendingTiles)i.state.type<P.FETCHED_COUNT&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=P.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(a(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new I(e,t);return this.pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:j,signal:t})}async _fetchFeatures(e,t,i){let s,r=0,o=0,n=t;for(;;){const a=this._createFeaturesQuery(e),u=this._setPagingParameters(a,r,n),{features:c,exceededTransferLimit:d}=await this._queryFeatures(a,i);if(u&&(r+=l(a.num)),o+=c.length,s=s?s.concat(c):c,n=t-o,!u||!d||n<=0)return s}}_filterProperties(e){return a(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(a(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{var o;e===r.attributes[t]&&(s=null!=(o=r.objectId)?o:r.attributes[i])})),a(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery(null);return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await b(this.url,e,new _({sourceSpatialReference:i}),{query:this.configuration.customParameters,timeout:j,signal:t});return g(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await T(this.url,e,i,{query:this.configuration.customParameters,timeout:j,signal:t});return m(s,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,n(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new v({returnZ:!1,returnM:!1,geometry:n(this.tileInfo)&&n(e)?y(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this.configuration.filter;return n(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?v.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||C);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([h({constructOnly:!0})],S.prototype,"url",void 0),e([h({constructOnly:!0})],S.prototype,"objectIdField",void 0),e([h({constructOnly:!0})],S.prototype,"globalIdField",void 0),e([h({constructOnly:!0})],S.prototype,"capabilities",void 0),e([h({constructOnly:!0})],S.prototype,"sourceSpatialReference",void 0),e([h({constructOnly:!0})],S.prototype,"spatialReference",void 0),e([h({constructOnly:!0})],S.prototype,"store",void 0),e([h({readOnly:!0})],S.prototype,"minimumVerticesPerFeature",null),e([h()],S.prototype,"filter",null),e([h()],S.prototype,"customParameters",null),e([h({readOnly:!0})],S.prototype,"configuration",null),e([h()],S.prototype,"tileInfo",null),e([h()],S.prototype,"tileSize",null),e([h()],S.prototype,"tilesOfInterest",void 0),e([h({readOnly:!0})],S.prototype,"updating",null),e([h({readOnly:!0})],S.prototype,"availability",void 0),S=e([p("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],S);const C=2e3,j=6e5,x=1e6,E=25,w=1;export{S as FeatureServiceTiledFetcher};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../core/Error.js";import{
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../core/Error.js";import{unwrap as i,isSome as o}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{combinedViewLayerTimeExtentProperty as n}from"../../layers/support/commonProperties.js";import{getDefaultDatumTransformationForDataset as l,projectExtent as u}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{getFetchPopupTemplate as p}from"./support/popupUtils.js";const m=m=>{let f=class extends m{constructor(){super(...arguments),this._rasterFieldPrefix="Raster.",this.layer=null,this.view=null,this.tileInfo=null}get fullExtent(){return this.projectFullExtent(this.view.spatialReference)}get hasTilingEffects(){return this.layer.renderer&&"dynamicRangeAdjustment"in this.layer.renderer&&this.layer.renderer.dynamicRangeAdjustment}get datumTransformation(){return l(i(this.layer.fullExtent),this.view.spatialReference,!0)}supportsSpatialReference(e){return!!this.projectFullExtent(e)}projectFullExtent(e){const t=i(this.layer.fullExtent),r=l(t,e,!1);return u(t,e,r)}async fetchPopupFeatures(e,i){const{layer:s}=this;if(!e)return Promise.reject(new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:s}));const{popupEnabled:a}=s,n=p(s,i);if(!a||!o(n))throw new r("imageryTileLayerView:fetchPopupFeatures","Missing required popupTemplate or popupEnabled",{popupEnabled:a,popupTemplate:n});const l=[],{value:u,magdirValue:m}=await s.identify(e,{timeExtent:this.timeExtent});let f="";if(u&&u.length){var c,d;f="imagery-tile"===s.type&&s.hasStandardTime()&&null!=u[0]?u.map((e=>s.getStandardTimeValue(e))).join(", "):u.join(", ");const e={ObjectId:0},r="Raster.ServicePixelValue";e[r]=this._formatAttributeValue(f,r);const i=null==(c=s.rasterInfo)||null==(d=c.attributeTable)?void 0:d.features;if(i&&i.length>0){const t=i.filter((e=>{const t=e.attributes.value||e.attributes.Value||e.attributes.VALUE;return String(t)===f}));if(t.length>0){const r=t[0];if(r)for(const t in r.attributes)if(r.attributes.hasOwnProperty(t)){const i=this._rasterFieldPrefix+t;e[i]=this._formatAttributeValue(r.attributes[t],i)}}}const o=s.rasterInfo.dataType;"vector-magdir"!==o&&"vector-uv"!==o||(e["Raster.Magnitude"]=null==m?void 0:m[0],e["Raster.Direction"]=null==m?void 0:m[1]);const a=new t(this.fullExtent.clone(),null,e);a.layer=s,a.sourceLayer=a.layer,l.push(a)}return l}_formatAttributeValue(e,t){if("string"==typeof e){const r=this.layer.popupTemplate&&this.layer.popupTemplate.fieldInfos,i=this._getFieldInfo(r,t),o=i&&i.format;if(o){let t,r;return e.trim().indexOf(",")>-1?(t=",",r=t+" ",this._formatDelimitedString(e,t,r,o)):e.trim().indexOf(" ")>-1?(t=r=" ",this._formatDelimitedString(e,t,r,o)):this._formatNumberFromString(e,o)}}return e}_getFieldInfo(e,t){if(!e||!e.length||!t)return;const r=t.toLowerCase();let i;return e.some((e=>!(!e.fieldName||e.fieldName.toLowerCase()!==r&&e.fieldName.toLowerCase()!==r.replace(/ /g,"_"))&&(i=e,!0))),i}_formatDelimitedString(e,t,r,i){return e&&t&&r&&i?e.trim().split(t).map((e=>this._formatNumberFromString(e,i))).join(r):e}_formatNumberFromString(e,t){if(!e||!t)return e;const r=Number(e);return isNaN(r)?e:t.format(r)}};return e([s()],f.prototype,"layer",void 0),e([s(n)],f.prototype,"timeExtent",void 0),e([s()],f.prototype,"view",void 0),e([s()],f.prototype,"fullExtent",null),e([s()],f.prototype,"tileInfo",void 0),e([s({readOnly:!0})],f.prototype,"hasTilingEffects",null),f=e([a("esri.views.layers.ImageryTileLayerView")],f),f};export{m as ImageryTileLayerView,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.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import t from"../../core/Evented.js";import{HandleOwnerMixin as s}from"../../core/HandleOwner.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import o from"../../core/Logger.js";import{unwrapOr as l}from"../../core/maybe.js";import{EsriPromiseMixin as n}from"../../core/Promise.js";import{property as a}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 d=class extends(s(i(n(t.EventedMixin(r))))){constructor(e){super(e),this.layer=null,this.parent=null}initialize(){this.when().catch((e=>{if("layerview:create-error"!==e.name){const r=this.layer&&this.layer.id||"no id",t=this.layer&&this.layer.title||"no title";throw o.getLogger(this.declaredClass).error("#resolve()",`Failed to resolve layer view (layer title: '${t}', id: '${r}')`,e),e}}))}get fullOpacity(){return l(this.get("layer.opacity"),1)*l(this.get("parent.fullOpacity"),1)}get suspended(){return!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&!0===this.layer.legendEnabled}get updating(){var e;return!!(null!=(e=this.updatingHandles)&&e.updating||this.isUpdating())}get updatingProgress(){return this.updating?0:1}get visible(){var e;return!0===(null==(e=this.layer)?void 0:e.visible)}set visible(e){void 0!==e?this._override("visible",e):this._clearOverride("visible")}canResume(){return
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import t from"../../core/Evented.js";import{HandleOwnerMixin as s}from"../../core/HandleOwner.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import o from"../../core/Logger.js";import{unwrapOr as l}from"../../core/maybe.js";import{EsriPromiseMixin as n}from"../../core/Promise.js";import{property as a}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 d=class extends(s(i(n(t.EventedMixin(r))))){constructor(e){super(e),this.layer=null,this.parent=null}initialize(){this.when().catch((e=>{if("layerview:create-error"!==e.name){const r=this.layer&&this.layer.id||"no id",t=this.layer&&this.layer.title||"no title";throw o.getLogger(this.declaredClass).error("#resolve()",`Failed to resolve layer view (layer title: '${t}', id: '${r}')`,e),e}}))}get fullOpacity(){return l(this.get("layer.opacity"),1)*l(this.get("parent.fullOpacity"),1)}get suspended(){return!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&!0===this.layer.legendEnabled}get updating(){var e;return!!(null!=(e=this.updatingHandles)&&e.updating||this.isUpdating())}get updatingProgress(){return this.updating?0:1}get visible(){var e;return!0===(null==(e=this.layer)?void 0:e.visible)}set visible(e){void 0!==e?this._override("visible",e):this._clearOverride("visible")}canResume(){var e,r,t;return this.visible&&(null==(e=this.layer)?void 0:e.loaded)&&!(null!=(r=this.parent)&&r.suspended)&&(null==(t=this.view)?void 0:t.ready)||!1}getSuspendInfo(){const e=this.parent&&this.parent.suspended?this.parent.suspendInfo:{},r=this;return r.view&&r.view.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0),this.visible||(e.layerInvisible=!0),e}isUpdating(){return!1}};e([a()],d.prototype,"fullOpacity",null),e([a()],d.prototype,"layer",void 0),e([a()],d.prototype,"parent",void 0),e([a({readOnly:!0})],d.prototype,"suspended",null),e([a({readOnly:!0})],d.prototype,"suspendInfo",null),e([a({readOnly:!0})],d.prototype,"legendEnabled",null),e([a({type:Boolean,readOnly:!0})],d.prototype,"updating",null),e([a({readOnly:!0})],d.prototype,"updatingProgress",null),e([a()],d.prototype,"visible",null),e([a()],d.prototype,"view",void 0),d=e([p("esri.views.layers.LayerView")],d);const u=d;export{u 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.23/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{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{let t=class extends o{supportsSpatialReference(e){return this.layer.source.supportsSpatialReference(e)}get availableFields(){return this.layer.fieldsIndex.fields.map((e=>e.name))}};return e([r()],t.prototype,"layer",void 0),e([r({readOnly:!0})],t.prototype,"availableFields",null),t=e([s("esri.views.layers.OGCFeatureLayerView")],t),t};export{o as OGCFeatureLayerView,o as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import e from"../../core/Logger.js";import{isAbortError as s}from"../../core/promiseUtils.js";import{on as o}from"../../core/
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import e from"../../core/Logger.js";import{isAbortError as s}from"../../core/promiseUtils.js";import{on as o}from"../../core/reactiveUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";const i=i=>{let c=class extends i{initialize(){this.handles.add(o((()=>this.layer),"refresh",(r=>{this.doRefresh(r.dataChanged).catch((r=>{s(r)||e.getLogger(this.declaredClass).error(r)}))})),"RefreshableLayerView")}};return r([t()],c.prototype,"layer",void 0),c=r([a("esri.layers.mixins.RefreshableLayerView")],c),c};export{i as RefreshableLayerView,i 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.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import r from"../../core/Collection.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import"../../libs/maquette/projection.js";import{createProjector as i}from"../../libs/maquette/projector.js";import{WatchUpdatingTracking as a}from"../support/WatchUpdatingTracking.js";let c=class extends e{constructor(){super(...arguments),this.items=new r,this._watchUpdatingTracking=new a,this._callbacks=new Map,this._projector=i(),this._hiddenProjector=i()}get needsRender(){return this.items.length>0}initialize(){const t=document.createElement("div");t.className="esri-overlay-surface",this._set("surface",t),this._hiddenSurface=document.createElement("div"),this._hiddenSurface.setAttribute("style","visibility: hidden;"),t.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange(this.items,(t=>{for(const e of t.added){const t=()=>e.render();this._callbacks.set(e,t),this._projector.append(this.surface,t)}for(const e of t.removed){const t=this._projector.detach(this._callbacks.get(e));this.surface.removeChild(t.domNode),this._callbacks.delete(e)}}))}addItem(t){this.items.add(t)}removeItem(t){this.items.remove(t)}destroy(){this.items.removeAll(),this._callbacks.forEach((t=>this._projector.detach(t))),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(t){const e=this._hiddenSurface,r=this._hiddenProjector;let o=null;const s=()=>(o=t.render(),o);r.append(e,s),r.renderNow();const i={left:0,top:0,right:0,bottom:0};if(o&&o.domNode){const t=o.domNode.getBoundingClientRect();i.left=t.left,i.top=t.top,i.right=t.right,i.bottom=t.bottom}for(r.detach(s);e.firstChild;)e.removeChild(e.firstChild);return i}overlaps(t,e){const r=this.computeBoundingRect(t),o=this.computeBoundingRect(e);return Math.max(r.left,o.left)<=Math.min(r.right,o.right)&&Math.max(r.top,o.top)<=Math.min(r.bottom,o.bottom)}get hasVisibleItems(){return this.items.some((t=>t.visible))}renderCanvas(t){if(!this.items.some((t=>t.visible)))return;const e=t.getContext("2d");e.save(),e.font=`10px ${getComputedStyle(this.surface).fontFamily}`,this.items.forEach((t=>{e.save(),t.renderCanvas(e),e.restore()})),e.restore()}};t([o({readOnly:!0})],c.prototype,"surface",void 0),t([o({readOnly:!0})],c.prototype,"items",void 0),t([o({readOnly:!0})],c.prototype,"needsRender",null),t([o({readOnly:!0})],c.prototype,"_watchUpdatingTracking",void 0),t([o({readOnly:!0,aliasOf:"_watchUpdatingTracking.updating"})],c.prototype,"updating",void 0),c=t([s("esri.views.overlay.ViewOverlay")],c);const n=c;export{n as default};
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import r from"../../core/Collection.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import"../../libs/maquette/projection.js";import{createProjector as i}from"../../libs/maquette/projector.js";import{WatchUpdatingTracking as a}from"../support/WatchUpdatingTracking.js";let c=class extends e{constructor(){super(...arguments),this.items=new r,this._watchUpdatingTracking=new a,this._callbacks=new Map,this._projector=i(),this._hiddenProjector=i()}get needsRender(){return this.items.length>0}initialize(){const t=document.createElement("div");t.className="esri-overlay-surface",this._set("surface",t),this._hiddenSurface=document.createElement("div"),this._hiddenSurface.setAttribute("style","visibility: hidden;"),t.appendChild(this._hiddenSurface),this._watchUpdatingTracking.addOnCollectionChange((()=>this.items),(t=>{for(const e of t.added){const t=()=>e.render();this._callbacks.set(e,t),this._projector.append(this.surface,t)}for(const e of t.removed){const t=this._projector.detach(this._callbacks.get(e));this.surface.removeChild(t.domNode),this._callbacks.delete(e)}}))}addItem(t){this.items.add(t)}removeItem(t){this.items.remove(t)}destroy(){this.items.removeAll(),this._callbacks.forEach((t=>this._projector.detach(t))),this._callbacks=null,this._projector=null,this._watchUpdatingTracking.destroy()}render(){this._projector.renderNow()}computeBoundingRect(t){const e=this._hiddenSurface,r=this._hiddenProjector;let o=null;const s=()=>(o=t.render(),o);r.append(e,s),r.renderNow();const i={left:0,top:0,right:0,bottom:0};if(o&&o.domNode){const t=o.domNode.getBoundingClientRect();i.left=t.left,i.top=t.top,i.right=t.right,i.bottom=t.bottom}for(r.detach(s);e.firstChild;)e.removeChild(e.firstChild);return i}overlaps(t,e){const r=this.computeBoundingRect(t),o=this.computeBoundingRect(e);return Math.max(r.left,o.left)<=Math.min(r.right,o.right)&&Math.max(r.top,o.top)<=Math.min(r.bottom,o.bottom)}get hasVisibleItems(){return this.items.some((t=>t.visible))}renderCanvas(t){if(!this.items.some((t=>t.visible)))return;const e=t.getContext("2d");e.save(),e.font=`10px ${getComputedStyle(this.surface).fontFamily}`,this.items.forEach((t=>{e.save(),t.renderCanvas(e),e.restore()})),e.restore()}};t([o({readOnly:!0})],c.prototype,"surface",void 0),t([o({readOnly:!0})],c.prototype,"items",void 0),t([o({readOnly:!0})],c.prototype,"needsRender",null),t([o({readOnly:!0})],c.prototype,"_watchUpdatingTracking",void 0),t([o({readOnly:!0,aliasOf:"_watchUpdatingTracking.updating"})],c.prototype,"updating",void 0),c=t([s("esri.views.overlay.ViewOverlay")],c);const n=c;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Handles.js";import{isNone as
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Handles.js";import{isNone as i}from"../../core/maybe.js";import{watch as n,on as d,sync as r}from"../../core/reactiveUtils.js";import{schedule as a}from"../../core/scheduling.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";let c=class extends s{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new t,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,s,t={}){const i=++this.handleId;t.sync||this._installSyncUpdatingWatch(e,i);const d=n(e,s,t);return this.handles.add(d,i),{remove:()=>this.handles.remove(i)}}addOnCollectionChange(e,s,{initial:t=!1}={}){const i=++this.handleId;return this.handles.add([d(e,"after-changes",this._createSyncUpdatingCallback(),r),d(e,"change",s,{onListenerAdd:t?e=>s({added:e.items,removed:[],moved:[],target:e}):void 0})],i),{remove:()=>this.handles.remove(i)}}addPromise(e){if(i(e))return e;const s=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(l)||this._set("updating",!1))}},s),this.pendingPromises.add(e),this._set("updating",!0);const t=()=>this.handles.remove(s);return e.then(t,t),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,s){const t=this._createSyncUpdatingCallback(),i=n(e,t,{sync:!0,equals:()=>!1});return this.handles.add(i,s),i}_createSyncUpdatingCallback(){return()=>{this.handles.remove(l),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add(a((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(l))})),l)}}};e([o({readOnly:!0})],c.prototype,"updating",void 0),c=e([h("esri.views.support.WatchUpdatingTracking")],c);const l=-42;var p;!function(e){e[e.NONE=0]="NONE",e[e.SYNC=1]="SYNC",e[e.INIT=2]="INIT"}(p||(p={}));export{p as WatchFlags,c as WatchUpdatingTracking};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../request.js";import e from"../../geometry/Point.js";import{project as r}from"../../geometry/projection.js";import{projectResolution as i,getProjectionOffsetGrid as a}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{isImageSource as s,rasterize as o}from"../2d/engine/Bitmap.js";import n from"../2d/engine/webgl/VertexStream.js";import{createProgramTemplate as m}from"../2d/engine/webgl/shaders/MaterialPrograms.js";import{PixelFormat as p,PixelType as h,TextureWrapMode as c,TextureSamplingMode as x,TargetType as d,DepthStencilTargetType as g,ColorAttachment as u}from"../webgl/enums.js";import{FramebufferObject as _}from"../webgl/FramebufferObject.js";import{
|
|
5
|
+
import t from"../../request.js";import e from"../../geometry/Point.js";import{project as r}from"../../geometry/projection.js";import{projectResolution as i,getProjectionOffsetGrid as a}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{isImageSource as s,rasterize as o}from"../2d/engine/Bitmap.js";import n from"../2d/engine/webgl/VertexStream.js";import{createProgramTemplate as m}from"../2d/engine/webgl/shaders/MaterialPrograms.js";import{PixelFormat as p,PixelType as h,TextureWrapMode as c,TextureSamplingMode as x,TargetType as d,DepthStencilTargetType as g,ColorAttachment as u}from"../webgl/enums.js";import{FramebufferObject as _}from"../webgl/FramebufferObject.js";import{createTransformTexture as f}from"../webgl/rasterUtils.js";import{RenderingContext as l}from"../webgl/RenderingContext.js";import{Texture as w}from"../webgl/Texture.js";class b{constructor(t){if(t)this._ownsRctx=!1,this._rctx=t;else{this._ownsRctx=!0;const t=document.createElement("canvas").getContext("webgl");t.getExtension("OES_texture_float"),this._rctx=new l(t,{})}const e={applyProjection:!0,bilinear:!1,bicubic:!1},r=m("raster/reproject","raster/reproject",new Map([["a_position",0]]),e);this._program=this._rctx.programCache.acquire(r.shaders.vertexShader,r.shaders.fragmentShader,r.attributes),this._rctx.useProgram(this._program),this._program.setUniform1f("u_opacity",1),this._program.setUniform1i("u_image",0),this._program.setUniform1i("u_flipY",0),this._program.setUniform1i("u_transformGrid",1),this._quad=new n(this._rctx,[0,0,1,0,0,1,1,1])}reprojectTexture(t,s,o=!1){const n=r(t.extent,s),m=new e({x:(t.extent.xmax-t.extent.xmin)/t.texture.descriptor.width,y:(t.extent.ymax-t.extent.ymin)/t.texture.descriptor.height,spatialReference:t.extent.spatialReference}),{x:l,y:b}=i(m,s,t.extent);let T=(l+b)/2;const j=Math.round((n.xmax-n.xmin)/T),D=Math.round((n.ymax-n.ymin)/T);T=(n.width/j+n.height/D)/2;const E=new e({x:T,y:T,spatialReference:n.spatialReference}),y=a({projectedExtent:n,srcBufferExtent:t.extent,pixelSize:E,hasWrapAround:!0,spacing:[16,16]}),R=f(this._rctx,y),M=new w(this._rctx,{width:j,height:D,pixelFormat:p.RGBA,dataType:h.UNSIGNED_BYTE,wrapMode:c.CLAMP_TO_EDGE,samplingMode:x.LINEAR,hasMipmap:!1}),A=new _(this._rctx,{colorTarget:d.TEXTURE,depthStencilTarget:g.NONE,width:j,height:D},M);if(this._rctx.bindFramebuffer(A),this._rctx.setViewport(0,0,j,D),this._rctx.useProgram(this._program),this._rctx.bindTexture(t.texture,0),this._rctx.bindTexture(R,1),this._quad.bind(),this._program.setUniform2f("u_srcImageSize",t.texture.descriptor.width,t.texture.descriptor.height),this._program.setUniform2fv("u_transformSpacing",y.spacing),this._program.setUniform2fv("u_transformGridSize",y.size),this._program.setUniform2f("u_targetImageSize",j,D),this._quad.draw(),this._quad.unbind(),this._rctx.useProgram(null),this._rctx.bindFramebuffer(null),R.dispose(),o){const t=new ImageData(A.descriptor.width,A.descriptor.height);return A.readPixels(0,0,A.descriptor.width,A.descriptor.height,p.RGBA,h.UNSIGNED_BYTE,t.data),A.detachColorTexture(u.COLOR_ATTACHMENT0),A.dispose(),{texture:M,extent:n,imageData:t}}return A.detachColorTexture(u.COLOR_ATTACHMENT0),A.dispose(),{texture:M,extent:n}}reprojectBitmapData(t,e){const r=s(t.bitmapData)?o(t.bitmapData):t.bitmapData,i=new w(this._rctx,{width:t.bitmapData.width,height:t.bitmapData.height,pixelFormat:p.RGBA,dataType:h.UNSIGNED_BYTE,wrapMode:c.CLAMP_TO_EDGE,samplingMode:x.LINEAR,hasMipmap:!1},r),a=this.reprojectTexture({texture:i,extent:t.extent},e,!0);a.texture.dispose();const n=document.createElement("canvas");n.width=a.imageData.width,n.height=a.imageData.height;return n.getContext("2d").putImageData(a.imageData,0,0),{bitmapData:n,extent:a.extent}}async loadAndReprojectBitmapData(e,r,i){const a=(await t(e,{responseType:"image"})).data,s=document.createElement("canvas");s.width=a.width,s.height=a.height;const o=s.getContext("2d");o.drawImage(a,0,0);const n=o.getImageData(0,0,s.width,s.height),m=this.reprojectBitmapData({bitmapData:n,extent:r},i);return{bitmapData:m.bitmapData,extent:m.extent}}destroy(){this._quad.dispose(),this._program.dispose(),this._ownsRctx&&this._rctx.dispose()}}export{b as ImageReprojector};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../core/Logger.js";import{isSome as e}from"../../core/maybe.js";import{isUint16Array as i,isUint32Array as s}from"../../core/typedArrayUtil.js";import{checkWebGLError as r}from"./checkWebGLError.js";import{BufferType as
|
|
5
|
+
import t from"../../core/Logger.js";import{isSome as e}from"../../core/maybe.js";import{isUint16Array as i,isUint32Array as s}from"../../core/typedArrayUtil.js";import{checkWebGLError as r}from"./checkWebGLError.js";import{ContextType as n}from"./context-util.js";import{BufferType as f,ResourceType as o,Usage as _,DataType as h}from"./enums.js";const a=t.getLogger("esri.views.webgl.BufferObject");class u{constructor(t,e,i,s){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._size=-1,this._indexType=void 0,t.instanceCounter.increment(o.Buffer,this),this._glName=this._context.gl.createBuffer(),r(this._context.gl),s&&this.setData(s)}static createIndex(t,e,i){return new u(t,f.ELEMENT_ARRAY_BUFFER,e,i)}static createVertex(t,e,i){return new u(t,f.ARRAY_BUFFER,e,i)}static createUniform(t,e,i){return new u(t,f.UNIFORM_BUFFER,e,i)}static createPixelPack(t,e=_.STREAM_READ,i){const s=new u(t,f.PIXEL_PACK_BUFFER,e);return i&&s.setSize(i),s}static createPixelUnpack(t,e=_.STREAM_DRAW,i){return new u(t,f.PIXEL_UNPACK_BUFFER,e,i)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteSize(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER?this._indexType===h.UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER||this.bufferType===f.ARRAY_BUFFER}dispose(){var t;if(null!=(t=this._context)&&t.gl){if(this._glName){this._context.gl.deleteBuffer(this._glName),this._glName=null}this._context.instanceCounter.decrement(o.Buffer,this),this._context=null}else this._glName&&a.warn("Leaked WebGL buffer object")}setSize(t,i=null){if(t<=0&&a.error("Buffer size needs to be positive!"),this.bufferType===f.ELEMENT_ARRAY_BUFFER&&e(i))switch(this._indexType=i,i){case h.UNSIGNED_SHORT:t*=2;break;case h.UNSIGNED_INT:t*=4}this._setBufferData(t)}setData(t){if(!t)return;let e=t.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(t)&&(e/=2,this._indexType=h.UNSIGNED_SHORT),s(t)&&(e/=4,this._indexType=h.UNSIGNED_INT)),this._setBufferData(e,t)}_setBufferData(t,i=null){this._size=t;const s=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const n=this._context.gl;e(i)?n.bufferData(this.bufferType,i,this.usage):n.bufferData(this.bufferType,t,this.usage),r(n),this._isVAOAware&&this._context.bindVAO(s)}setSubData(t,e=0,n=0,o=t.byteLength){if(!t)return;(e<0||e>=this._size)&&a.error("offset is out of range!");let _=e,h=n,u=o,c=t.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(t)?(c/=2,_*=2,h*=2,u*=2):s(t)&&(c/=4,_*=4,h*=4,u*=4)),void 0===o&&(o=c-1),n>=o&&a.error("end must be bigger than start!"),e+n-o>this._size&&a.error("An attempt to write beyond the end of the buffer!");const b=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const E=this._context.gl,A=ArrayBuffer.isView(t)?t.buffer:t,l=0===h&&u===t.byteLength?A:A.slice(h,u);E.bufferSubData(this.bufferType,_,l),r(E),this._isVAOAware&&this._context.bindVAO(b)}setSubDataFromView(t,e,i,s){if(!t)return;(e<0||e>=this._size)&&a.error("offset is out of range!"),i>=s&&a.error("end must be bigger than start!"),e+i-s>this._size&&a.error("An attempt to write beyond the end of the buffer!");const f=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const o=this._context.gl;if(this._context.type===n.WEBGL2)o.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,s-i);else{const r=0===i&&s===t.length?t:t.subarray(i,s);o.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,r)}r(o),this._isVAOAware&&this._context.bindVAO(f)}getSubData(t,e=0,i,s){if(this._context.type!==n.WEBGL2)return void a.error("Get buffer subdata is only supported in WebGL2!");const r=this._context.gl;this._context.bindBuffer(this,f.COPY_READ_BUFFER),r.getBufferSubData(f.COPY_READ_BUFFER,e,t,i,s),this._context.unbindBuffer(f.COPY_READ_BUFFER)}async getSubDataAsync(t,e=0,i,s){this._context.type===n.WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(t,e,i,s)):a.error("Get buffer subdata is only supported in WebGL2!")}}export{u as BufferObject};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{BlendFactor as t,BlendOperation as
|
|
5
|
+
import{BlendFactor as t,BlendOperation as i,Face as e,CullMode as s,CompareFunction as l,StencilOperation as r}from"./enums.js";class h{constructor(){this.blend=!1,this.blendColor={r:0,g:0,b:0,a:0},this.blendFunction={srcRGB:t.ONE,dstRGB:t.ZERO,srcAlpha:t.ONE,dstAlpha:t.ZERO},this.blendEquation={mode:i.ADD,modeAlpha:i.ADD},this.colorMask={r:!0,g:!0,b:!0,a:!0},this.faceCulling=!1,this.cullFace=e.BACK,this.frontFace=s.CCW,this.scissorTest=!1,this.scissorRect={x:0,y:0,width:0,height:0},this.depthTest=!1,this.depthFunction=l.LESS,this.clearDepth=1,this.depthWrite=!0,this.depthRange={zNear:0,zFar:1},this.viewport=null,this.stencilTest=!1,this.polygonOffsetFill=!1,this.polygonOffset=[0,0],this.stencilFunction={face:e.FRONT_AND_BACK,func:l.ALWAYS,ref:0,mask:1},this.clearStencil=0,this.stencilWriteMask=1,this.stencilOperation={face:e.FRONT_AND_BACK,fail:r.KEEP,zFail:r.KEEP,zPass:r.KEEP},this.clearColor={r:0,g:0,b:0,a:0},this.program=null,this.vertexBuffer=null,this.indexBuffer=null,this.uniformBuffer=null,this.pixelPackBuffer=null,this.pixelUnpackBuffer=null,this.copyReadBuffer=null,this.copyWriteBuffer=null,this.uniformBufferBindingPoints=new Array,this.framebuffer=null,this.renderbuffer=null,this.activeTexture=0,this.textureUnitMap=new Array}}export{h as ContextState};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../core/Logger.js";import{isSome as e,isNone as i}from"../../core/maybe.js";import{webglValidateShadersEnabled as r}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment as h,TargetType as n,DepthStencilTargetType as o,TextureType as c,PixelFormat as _,PixelType as a,DepthStencilAttachment as l,RenderbufferFormat as T,TextureSamplingMode as E,TextureWrapMode as d}from"./enums.js";import{Renderbuffer as u}from"./Renderbuffer.js";import{Texture as f}from"./Texture.js";import{getGpuMemoryUsage as m}from"./Util.js";const R=t.getLogger("esri.views.webgl.FrameBufferObject");class A{constructor(t,i,r=null,c=null){if(this._context=t,this._glName=null,this._depthAttachment=null,this._stencilAttachment=null,this._colorAttachments=new Map,this._initialized=!1,this._desc={...i},t.instanceCounter.increment(s.Framebuffer,this),e(r)){Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;++e){var _,a;const i=r[e];let s;p(i)?(s=i.descriptor,this._colorAttachments.set(h.COLOR_ATTACHMENT0+e,i)):(s=i,this._colorAttachments.set(h.COLOR_ATTACHMENT0+e,new f(t,i))),(null==(_=this._desc)?void 0:_.colorTarget)!==n.TEXTURE&&(null==(a=this._desc)?void 0:a.colorTarget)!==n.CUBEMAP&&console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),this._validateColorAttachmentPoint(h.COLOR_ATTACHMENT0+e),this._validateTextureDimensions(s,this._desc)}}if(c instanceof u){var l;const t=null!=(l=this._desc.depthStencilTarget)?l:o.DEPTH_STENCIL_RENDER_BUFFER;t===o.STENCIL_RENDER_BUFFER?this._stencilAttachment=c:t===o.DEPTH_RENDER_BUFFER||t===o.DEPTH_STENCIL_RENDER_BUFFER?this._depthAttachment=c:console.error('If a Renderbuffer is provided, "depthStencilTarget" must be one of STENCIL_RENDER_BUFFER, DEPTH_RENDER_BUFFER or DEPTH_STENCIL_RENDER_BUFFER'),N(c.descriptor,this._desc)}else if(e(c)){let t;this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),p(c)?(this._depthStencilTexture=c,t=c.descriptor):this._depthStencilTexture=new f(this._context,c),this._validateTextureDimensions(t,this._desc)}}dispose(){if(!this._desc)return;const t=this._context.getBoundFramebufferObject();if(this._disposeColorAttachments(),this._disposeDepthStencilAttachments(),this._glName){this._context.gl.deleteFramebuffer(this._glName),this._glName=null}this._context.bindFramebuffer(t),this._context.instanceCounter.decrement(s.Framebuffer,this),this._desc=null}get glName(){return this._glName}get descriptor(){return this._desc}get colorTexture(){const t=this._colorAttachments.get(h.COLOR_ATTACHMENT0);return t&&p(t)?t:null}get colorAttachment(){return this._colorAttachments.get(h.COLOR_ATTACHMENT0)}get depthStencilAttachment(){return this._depthStencilTexture||this._depthAttachment||this._stencilAttachment}get depthStencilTexture(){return this._depthStencilTexture}get width(){return this._desc.width}get height(){return this._desc.height}get gpuMemoryUsage(){return m(this.colorAttachment)+m(this.depthStencilAttachment)}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&p(e)?e:null}framebufferTexture2D(t,e,i=h.COLOR_ATTACHMENT0,r=c.TEXTURE_2D,s=0){e.framebufferTexture2D(e.FRAMEBUFFER,i,r,t,s)}attachColorTexture(t,e=h.COLOR_ATTACHMENT0){if(!t)return;this._validateColorAttachmentPoint(e);const i=t.descriptor;this._validateTextureDimensions(i,this._desc),this._disposeColorAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(t.glName,this._context.gl,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=h.COLOR_ATTACHMENT0){const e=this._colorAttachments.get(t);if(p(e)){const i=e;return this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,this._context.gl,t)),this._colorAttachments.delete(t),i}}attachDepthStencilTexture(t){if(i(t))return;const e=t.descriptor;e.pixelFormat!==_.DEPTH_STENCIL&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),e.dataType!==a.UNSIGNED_INT_24_8&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),this._validateTextureDimensions(e,this._desc),this._desc.depthStencilTarget&&this._desc.depthStencilTarget!==o.DEPTH_STENCIL_TEXTURE&&(this._desc.depthStencilTarget=o.DEPTH_STENCIL_TEXTURE),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(t.glName,this._context.gl,l)),this._depthStencilTexture=t}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,this._context.gl,l)),this._depthStencilTexture=null,t}attachDepthStencilBuffer(t){if(i(t))return;const e=t.descriptor;if(e.internalFormat!==T.DEPTH_STENCIL&&e.internalFormat!==T.DEPTH_COMPONENT16&&console.error("Depth/Stencil buffer must have correct internalFormat"),N(e,this._desc),this._disposeDepthStencilAttachments(),this._desc.depthStencilTarget=e.internalFormat===T.DEPTH_STENCIL?o.DEPTH_STENCIL_RENDER_BUFFER:o.DEPTH_RENDER_BUFFER,this._initialized){this._context.bindFramebuffer(this);const e=this._context.gl,i=this._desc.depthStencilTarget===o.DEPTH_RENDER_BUFFER?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT;e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,t.glName)}this._depthAttachment=t}detachDepthStencilBuffer(){const t=this._context.gl,e=this._depthAttachment;if(e&&this._initialized){this._context.bindFramebuffer(this);const e=this._desc.depthStencilTarget===o.DEPTH_RENDER_BUFFER?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}return this._depthAttachment=null,e}detachAll(){this.detachColorTexture(),this.detachDepthStencilBuffer(),this.detachDepthStencilTexture()}copyToTexture(t,e,i,r,s,h,n){(t<0||e<0||s<0||h<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const o=this._desc,_=n.descriptor;n.descriptor.target!==c.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(t+i>o.width||e+r>o.height||s+i>_.width||h+r>_.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const a=this._context,l=a.bindTexture(n,f.TEXTURE_UNIT_FOR_UPDATES);a.bindFramebuffer(this),a.gl.copyTexSubImage2D(c.TEXTURE_2D,0,s,h,t,e,i,r),a.bindTexture(l,f.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,s,h,n){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),n||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this);this._context.gl.readPixels(t,e,i,r,s,h,n)}resize(t,e){const i=this._desc;if(i.width!==t||i.height!==e){if(!this._initialized)return i.width=t,i.height=e,this._colorAttachments.forEach((i=>{i&&i.resize(t,e)})),void(this._depthStencilTexture&&this._depthStencilTexture.resize(t,e));i.width=t,i.height=e,this._colorAttachments.forEach((i=>{i&&i.resize(t,e)})),null!=this._depthStencilTexture?this._depthStencilTexture.resize(t,e):(this._depthAttachment||this._stencilAttachment)&&(this._depthAttachment&&this._depthAttachment.resize(t,e),this._stencilAttachment&&this._stencilAttachment.resize(t,e)),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1}}initializeAndBind(t=c.TEXTURE_2D){var e,i,s,l;const m=this._context.gl;if(this._initialized)return void m.bindFramebuffer(m.FRAMEBUFFER,this.glName);this._glName&&m.deleteFramebuffer(this._glName);const R=this._context,A=m.createFramebuffer(),N=this._desc,g=null!=(e=N.colorTarget)?e:n.RENDER_BUFFER,x=null!=(i=N.width)?i:1,D=null!=(s=N.height)?s:1;if(m.bindFramebuffer(m.FRAMEBUFFER,A),0===this._colorAttachments.size)if(g===n.TEXTURE)this._colorAttachments.set(h.COLOR_ATTACHMENT0,F(R,N,this.descriptor.colorTarget===n.CUBEMAP?c.TEXTURE_CUBE_MAP:c.TEXTURE_2D));else{const t=new u(R,{internalFormat:T.RGBA4,width:x,height:D});this._colorAttachments.set(h.COLOR_ATTACHMENT0,t)}this._colorAttachments.forEach(((e,i)=>{e&&(p(e)?this.framebufferTexture2D(e.glName,m,i,t):m.framebufferRenderbuffer(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.RENDERBUFFER,e.glName))}));const b=null!=(l=N.depthStencilTarget)?l:o.NONE;switch(b){case o.DEPTH_RENDER_BUFFER:case o.DEPTH_STENCIL_RENDER_BUFFER:{this._depthAttachment||(this._depthAttachment=new u(R,{internalFormat:N.depthStencilTarget===o.DEPTH_RENDER_BUFFER?T.DEPTH_COMPONENT16:T.DEPTH_STENCIL,width:x,height:D}));const t=b===o.DEPTH_RENDER_BUFFER?m.DEPTH_ATTACHMENT:m.DEPTH_STENCIL_ATTACHMENT;m.framebufferRenderbuffer(m.FRAMEBUFFER,t,m.RENDERBUFFER,this._depthAttachment.glName);break}case o.STENCIL_RENDER_BUFFER:this._stencilAttachment||(this._stencilAttachment=new u(R,{internalFormat:T.STENCIL_INDEX8,width:x,height:D})),m.framebufferRenderbuffer(m.FRAMEBUFFER,m.STENCIL_ATTACHMENT,m.RENDERBUFFER,this._stencilAttachment.glName);break;case o.DEPTH_STENCIL_TEXTURE:if(!this._depthStencilTexture){R.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!");const t={target:c.TEXTURE_2D,pixelFormat:_.DEPTH_STENCIL,dataType:a.UNSIGNED_INT_24_8,samplingMode:E.NEAREST,wrapMode:d.CLAMP_TO_EDGE,width:x,height:D};this._depthStencilTexture=new f(R,t)}this.framebufferTexture2D(this._depthStencilTexture.glName,m,m.DEPTH_STENCIL_ATTACHMENT,t)}if(r()){m.checkFramebufferStatus(m.FRAMEBUFFER)!==m.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=A,this._initialized=!0}_disposeColorAttachments(){this._colorAttachments.forEach(((t,e)=>{if(p(t))this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,this._context.gl,e)),t.dispose();else if(t instanceof WebGLRenderbuffer){const i=this._context.gl;this._initialized&&(this._context.bindFramebuffer(this),i.framebufferRenderbuffer(i.FRAMEBUFFER,e,i.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(t)}})),this._colorAttachments.clear()}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);const e=this._desc.depthStencilTarget===o.DEPTH_RENDER_BUFFER?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}this._depthAttachment.dispose(),this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.STENCIL_ATTACHMENT,t.RENDERBUFFER,null)),this._stencilAttachment.dispose(),this._stencilAttachment=null),this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,t,t.DEPTH_STENCIL_ATTACHMENT)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)}_validateTextureDimensions(t,e){t.target!==c.TEXTURE_2D&&t.target!==c.TEXTURE_CUBE_MAP&&console.error("Texture type must be TEXTURE_2D or TEXTURE_CUBE_MAP!"),void 0!==e.width&&e.width>=0&&void 0!==e.height&&e.height>=0?e.width===t.width&&e.height===t.height||console.error("Color attachment texture must match the framebuffer's!"):(e.width=t.width,e.height=t.height)}_validateColorAttachmentPoint(t){if(-1===A._MAX_COLOR_ATTACHMENTS){const t=this._context.capabilities.drawBuffers;if(t){const e=this._context.gl;A._MAX_COLOR_ATTACHMENTS=e.getParameter(t.MAX_COLOR_ATTACHMENTS)}else A._MAX_COLOR_ATTACHMENTS=1}const e=t-h.COLOR_ATTACHMENT0;e+1>A._MAX_COLOR_ATTACHMENTS&&R.error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${e+1}. Implementation supports up to ${A._MAX_COLOR_ATTACHMENTS} color attachments`)}}function p(t){return"type"in t&&"texture"===t.type}function F(t,e,i){return new f(t,{target:i,pixelFormat:_.RGBA,dataType:a.UNSIGNED_BYTE,samplingMode:E.NEAREST,wrapMode:d.CLAMP_TO_EDGE,width:e.width,height:e.height})}function N(t,e){void 0!==e.width&&e.width>=0&&void 0!==e.height&&e.height>=0?e.width===t.width&&e.height===t.height||console.error("Renderbuffer dimensions must match the framebuffer's!"):(e.width=t.width,e.height=t.height)}A._MAX_COLOR_ATTACHMENTS=-1;export{A as FramebufferObject};
|
|
5
|
+
import"../../core/has.js";import t from"../../core/Logger.js";import{isSome as e,isNone as i}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglValidateShadersEnabled as s}from"./checkWebGLError.js";import{ContextType as h}from"./context-util.js";import{ResourceType as n,ColorAttachment as o,TargetType as c,DepthStencilTargetType as _,TextureType as a,PixelFormat as l,PixelType as T,DepthStencilAttachment as E,RenderbufferFormat as d,Usage as u,BufferType as f,TextureSamplingMode as m,TextureWrapMode as R}from"./enums.js";import{Renderbuffer as A}from"./Renderbuffer.js";import{Texture as p}from"./Texture.js";import{getGpuMemoryUsage as F}from"./Util.js";const N=t.getLogger("esri.views.webgl.FrameBufferObject");class x{constructor(t,i,r=null,s=null){if(this._context=t,this._glName=null,this._depthAttachment=null,this._stencilAttachment=null,this._colorAttachments=new Map,this._initialized=!1,this._desc={...i},t.instanceCounter.increment(n.Framebuffer,this),e(r)){Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;++e){var h,a;const i=r[e];let s;g(i)?(s=i.descriptor,this._colorAttachments.set(o.COLOR_ATTACHMENT0+e,i)):(s=i,this._colorAttachments.set(o.COLOR_ATTACHMENT0+e,new p(t,i))),(null==(h=this._desc)?void 0:h.colorTarget)!==c.TEXTURE&&(null==(a=this._desc)?void 0:a.colorTarget)!==c.CUBEMAP&&console.error("Framebuffer is initialized with a texture however the descriptor indicates using a renderbuffer color attachment!"),this._validateColorAttachmentPoint(o.COLOR_ATTACHMENT0+e),this._validateTextureDimensions(s,this._desc)}}if(s instanceof A){var l;const t=null!=(l=this._desc.depthStencilTarget)?l:_.DEPTH_STENCIL_RENDER_BUFFER;t===_.STENCIL_RENDER_BUFFER?this._stencilAttachment=s:t===_.DEPTH_RENDER_BUFFER||t===_.DEPTH_STENCIL_RENDER_BUFFER?this._depthAttachment=s:console.error('If a Renderbuffer is provided, "depthStencilTarget" must be one of STENCIL_RENDER_BUFFER, DEPTH_RENDER_BUFFER or DEPTH_STENCIL_RENDER_BUFFER'),D(s.descriptor,this._desc)}else if(e(s)){let t;this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!"),g(s)?(this._depthStencilTexture=s,t=s.descriptor):this._depthStencilTexture=new p(this._context,s),this._validateTextureDimensions(t,this._desc)}}dispose(){if(!this._desc)return;const t=this._context.getBoundFramebufferObject();if(this._disposeColorAttachments(),this._disposeDepthStencilAttachments(),this._glName){this._context.gl.deleteFramebuffer(this._glName),this._glName=null}this._context.bindFramebuffer(t),this._context.instanceCounter.decrement(n.Framebuffer,this),this._desc=null}get glName(){return this._glName}get descriptor(){return this._desc}get colorTexture(){const t=this._colorAttachments.get(o.COLOR_ATTACHMENT0);return t&&g(t)?t:null}get colorAttachment(){return this._colorAttachments.get(o.COLOR_ATTACHMENT0)}get depthStencilAttachment(){return this._depthStencilTexture||this._depthAttachment||this._stencilAttachment}get depthStencilTexture(){return this._depthStencilTexture}get width(){return this._desc.width}get height(){return this._desc.height}get gpuMemoryUsage(){return F(this.colorAttachment)+F(this.depthStencilAttachment)}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&g(e)?e:null}framebufferTexture2D(t,e,i=o.COLOR_ATTACHMENT0,r=a.TEXTURE_2D,s=0){e.framebufferTexture2D(e.FRAMEBUFFER,i,r,t,s)}attachColorTexture(t,e=o.COLOR_ATTACHMENT0){if(!t)return;this._validateColorAttachmentPoint(e);const i=t.descriptor;this._validateTextureDimensions(i,this._desc),this._disposeColorAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(t.glName,this._context.gl,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=o.COLOR_ATTACHMENT0){const e=this._colorAttachments.get(t);if(g(e)){const i=e;return this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,this._context.gl,t)),this._colorAttachments.delete(t),i}}attachDepthStencilTexture(t){if(i(t))return;const e=t.descriptor;e.pixelFormat!==l.DEPTH_STENCIL&&console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!"),e.dataType!==T.UNSIGNED_INT_24_8&&console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"),this._context.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture!"),this._validateTextureDimensions(e,this._desc),this._desc.depthStencilTarget&&this._desc.depthStencilTarget!==_.DEPTH_STENCIL_TEXTURE&&(this._desc.depthStencilTarget=_.DEPTH_STENCIL_TEXTURE),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(t.glName,this._context.gl,E)),this._depthStencilTexture=t}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,this._context.gl,E)),this._depthStencilTexture=null,t}attachDepthStencilBuffer(t){if(i(t))return;const e=t.descriptor;if(e.internalFormat!==d.DEPTH_STENCIL&&e.internalFormat!==d.DEPTH_COMPONENT16&&console.error("Depth/Stencil buffer must have correct internalFormat"),D(e,this._desc),this._disposeDepthStencilAttachments(),this._desc.depthStencilTarget=e.internalFormat===d.DEPTH_STENCIL?_.DEPTH_STENCIL_RENDER_BUFFER:_.DEPTH_RENDER_BUFFER,this._initialized){this._context.bindFramebuffer(this);const e=this._context.gl,i=this._desc.depthStencilTarget===_.DEPTH_RENDER_BUFFER?e.DEPTH_ATTACHMENT:e.DEPTH_STENCIL_ATTACHMENT;e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,t.glName)}this._depthAttachment=t}detachDepthStencilBuffer(){const t=this._context.gl,e=this._depthAttachment;if(e&&this._initialized){this._context.bindFramebuffer(this);const e=this._desc.depthStencilTarget===_.DEPTH_RENDER_BUFFER?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}return this._depthAttachment=null,e}detachAll(){this.detachColorTexture(),this.detachDepthStencilBuffer(),this.detachDepthStencilTexture()}copyToTexture(t,e,i,r,s,h,n){(t<0||e<0||s<0||h<0)&&console.error("Offsets cannot be negative!"),(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!");const o=this._desc,c=n.descriptor;n.descriptor.target!==a.TEXTURE_2D&&console.error("Texture target must be TEXTURE_2D!"),(t+i>o.width||e+r>o.height||s+i>c.width||h+r>c.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const _=this._context,l=_.bindTexture(n,p.TEXTURE_UNIT_FOR_UPDATES);_.bindFramebuffer(this),_.gl.copyTexSubImage2D(a.TEXTURE_2D,0,s,h,t,e,i,r),_.bindTexture(l,p.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,i,r,s,h,n){(i<=0||r<=0)&&console.error("Copy width and height must be greater than zero!"),n||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this);this._context.gl.readPixels(t,e,i,r,s,h,n)}async readPixelsAsync(t,e,i,s,n,o,c){if(this._context.type!==h.WEBGL2)return void this.readPixels(t,e,i,s,n,o,c);const _=this._context.gl,a=r.createPixelPack(this._context,u.STREAM_READ,c.byteLength);this._context.bindBuffer(a),this._context.bindFramebuffer(this),_.readPixels(t,e,i,s,n,o,0),this._context.unbindBuffer(f.PIXEL_PACK_BUFFER),await a.getSubDataAsync(c),a.dispose()}resize(t,e){const i=this._desc;if(i.width!==t||i.height!==e){if(!this._initialized)return i.width=t,i.height=e,this._colorAttachments.forEach((i=>{i&&i.resize(t,e)})),void(this._depthStencilTexture&&this._depthStencilTexture.resize(t,e));i.width=t,i.height=e,this._colorAttachments.forEach((i=>{i&&i.resize(t,e)})),null!=this._depthStencilTexture?this._depthStencilTexture.resize(t,e):(this._depthAttachment||this._stencilAttachment)&&(this._depthAttachment&&this._depthAttachment.resize(t,e),this._stencilAttachment&&this._stencilAttachment.resize(t,e)),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1}}initializeAndBind(t=a.TEXTURE_2D){var e,i,r,h;const n=this._context.gl;if(this._initialized)return void n.bindFramebuffer(n.FRAMEBUFFER,this.glName);this._glName&&n.deleteFramebuffer(this._glName);const E=this._context,u=n.createFramebuffer(),f=this._desc,F=null!=(e=f.colorTarget)?e:c.RENDER_BUFFER,N=null!=(i=f.width)?i:1,x=null!=(r=f.height)?r:1;if(n.bindFramebuffer(n.FRAMEBUFFER,u),0===this._colorAttachments.size)if(F===c.TEXTURE)this._colorAttachments.set(o.COLOR_ATTACHMENT0,b(E,f,this.descriptor.colorTarget===c.CUBEMAP?a.TEXTURE_CUBE_MAP:a.TEXTURE_2D));else{const t=new A(E,{internalFormat:d.RGBA4,width:N,height:x});this._colorAttachments.set(o.COLOR_ATTACHMENT0,t)}this._colorAttachments.forEach(((e,i)=>{e&&(g(e)?this.framebufferTexture2D(e.glName,n,i,t):n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,e.glName))}));const D=null!=(h=f.depthStencilTarget)?h:_.NONE;switch(D){case _.DEPTH_RENDER_BUFFER:case _.DEPTH_STENCIL_RENDER_BUFFER:{this._depthAttachment||(this._depthAttachment=new A(E,{internalFormat:f.depthStencilTarget===_.DEPTH_RENDER_BUFFER?d.DEPTH_COMPONENT16:d.DEPTH_STENCIL,width:N,height:x}));const t=D===_.DEPTH_RENDER_BUFFER?n.DEPTH_ATTACHMENT:n.DEPTH_STENCIL_ATTACHMENT;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,this._depthAttachment.glName);break}case _.STENCIL_RENDER_BUFFER:this._stencilAttachment||(this._stencilAttachment=new A(E,{internalFormat:d.STENCIL_INDEX8,width:N,height:x})),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.STENCIL_ATTACHMENT,n.RENDERBUFFER,this._stencilAttachment.glName);break;case _.DEPTH_STENCIL_TEXTURE:if(!this._depthStencilTexture){E.capabilities.depthTexture||console.error("Extension WEBGL_depth_texture isn't supported therefore it is no possible to set the depth/stencil texture as an attachment!");const t={target:a.TEXTURE_2D,pixelFormat:l.DEPTH_STENCIL,dataType:T.UNSIGNED_INT_24_8,samplingMode:m.NEAREST,wrapMode:R.CLAMP_TO_EDGE,width:N,height:x};this._depthStencilTexture=new p(E,t)}this.framebufferTexture2D(this._depthStencilTexture.glName,n,n.DEPTH_STENCIL_ATTACHMENT,t)}if(s()){n.checkFramebufferStatus(n.FRAMEBUFFER)!==n.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=u,this._initialized=!0}_disposeColorAttachments(){this._colorAttachments.forEach(((t,e)=>{if(g(t))this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,this._context.gl,e)),t.dispose();else if(t instanceof WebGLRenderbuffer){const i=this._context.gl;this._initialized&&(this._context.bindFramebuffer(this),i.framebufferRenderbuffer(i.FRAMEBUFFER,e,i.RENDERBUFFER,null)),this._context.gl.deleteRenderbuffer(t)}})),this._colorAttachments.clear()}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthAttachment){if(this._initialized){this._context.bindFramebuffer(this);const e=this._desc.depthStencilTarget===_.DEPTH_RENDER_BUFFER?t.DEPTH_ATTACHMENT:t.DEPTH_STENCIL_ATTACHMENT;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}this._depthAttachment.dispose(),this._depthAttachment=null}this._stencilAttachment&&(this._initialized&&(this._context.bindFramebuffer(this),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.STENCIL_ATTACHMENT,t.RENDERBUFFER,null)),this._stencilAttachment.dispose(),this._stencilAttachment=null),this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this.framebufferTexture2D(null,t,t.DEPTH_STENCIL_ATTACHMENT)),this._depthStencilTexture.dispose(),this._depthStencilTexture=null)}_validateTextureDimensions(t,e){t.target!==a.TEXTURE_2D&&t.target!==a.TEXTURE_CUBE_MAP&&console.error("Texture type must be TEXTURE_2D or TEXTURE_CUBE_MAP!"),void 0!==e.width&&e.width>=0&&void 0!==e.height&&e.height>=0?e.width===t.width&&e.height===t.height||console.error("Color attachment texture must match the framebuffer's!"):(e.width=t.width,e.height=t.height)}_validateColorAttachmentPoint(t){if(-1===x._MAX_COLOR_ATTACHMENTS){const t=this._context.capabilities.drawBuffers;if(t){const e=this._context.gl;x._MAX_COLOR_ATTACHMENTS=e.getParameter(t.MAX_COLOR_ATTACHMENTS)}else x._MAX_COLOR_ATTACHMENTS=1}const e=t-o.COLOR_ATTACHMENT0;e+1>x._MAX_COLOR_ATTACHMENTS&&N.error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${e+1}. Implementation supports up to ${x._MAX_COLOR_ATTACHMENTS} color attachments`)}}function g(t){return"type"in t&&"texture"===t.type}function b(t,e,i){return new p(t,{target:i,pixelFormat:l.RGBA,dataType:T.UNSIGNED_BYTE,samplingMode:m.NEAREST,wrapMode:R.CLAMP_TO_EDGE,width:e.width,height:e.height})}function D(t,e){void 0!==e.width&&e.width>=0&&void 0!==e.height&&e.height>=0?e.width===t.width&&e.height===t.height||console.error("Renderbuffer dimensions must match the framebuffer's!"):(e.width=t.width,e.height=t.height)}x._MAX_COLOR_ATTACHMENTS=-1;export{x as FramebufferObject};
|
package/views/webgl/Program.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.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import{isSome as t,isNone as o}from"../../core/maybe.js";import{webglValidateShadersEnabled as i}from"./checkWebGLError.js";import{ContextType as
|
|
5
|
+
import"../../core/has.js";import{isSome as t,isNone as o}from"../../core/maybe.js";import{webglValidateShadersEnabled as i}from"./checkWebGLError.js";import{ContextType as n}from"./context-util.js";import{ShaderType as r,ResourceType as e}from"./enums.js";import{transpileShader as s}from"./ShaderTranspiler.js";const m=4294967295;class f{constructor(t,o,i,n,s=new Map){this._context=t,this._locations=n,this._uniformBlockBindings=s,this._refCount=1,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},t||console.error("RenderingContext isn't initialized!"),0===o.length&&console.error("Shaders source should not be empty!"),this._vShader=h(this._context,r.VERTEX_SHADER,o),this._fShader=h(this._context,r.FRAGMENT_SHADER,i),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(e.Shader,this)}get glName(){if(t(this._glName))return this._glName;if(o(this._vShader))return null;const r=this._context.gl,s=r.createProgram();if(r.attachShader(s,this._vShader),r.attachShader(s,this._fShader),this._locations.forEach(((t,o)=>r.bindAttribLocation(s,t,o))),r.linkProgram(s),i()&&!r.getProgramParameter(s,r.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${r.getProgramParameter(s,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(this._vShader,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(this._fShader,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(s)}`),this._context.type===n.WEBGL2){const t=r;for(const[o,i]of this._uniformBlockBindings){const n=t.getUniformBlockIndex(s,o);n<m&&t.uniformBlockBinding(s,n,i)}}return this._glName=s,this._context.instanceCounter.increment(e.Program,this),s}get hasGLName(){return t(this._glName)}dispose(){if(--this._refCount>0)return;const t=this._context.gl;this._vShader&&(t.deleteShader(this._vShader),this._vShader=null,this._context.instanceCounter.decrement(e.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(e.Program,this))}ref(){++this._refCount}_getUniformLocation(t){return void 0===this._nameToUniformLocation[t]&&(this._nameToUniformLocation[t]=this._context.gl.getUniformLocation(this.glName,t)),this._nameToUniformLocation[t]}hasUniform(t){return null!==this._getUniformLocation(t)}setUniform1i(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.gl.uniform1i(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1iv(t,o){const i=this._nameToUniform1v[t];if(a(i,o)){this._context.gl.uniform1iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):g(o,i)}}setUniform2iv(t,o){const i=this._nameToUniform2[t];if(a(i,o)){this._context.gl.uniform2iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):g(o,i)}}setUniform3iv(t,o){const i=this._nameToUniform3[t];if(a(i,o)){this._context.gl.uniform3iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):g(o,i)}}setUniform4iv(t,o){const i=this._nameToUniform4[t];if(a(i,o)){this._context.gl.uniform4iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):g(o,i)}}setUniform1f(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.gl.uniform1f(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1fv(t,o){const i=this._nameToUniform1v[t];if(a(i,o)){this._context.gl.uniform1fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):g(o,i)}}setUniform2f(t,o,i){const n=this._nameToUniform2[t];if(void 0===n||o!==n[0]||i!==n[1]){this._context.gl.uniform2f(this._getUniformLocation(t),o,i),void 0===n?this._nameToUniform2[t]=[o,i]:(n[0]=o,n[1]=i)}}setUniform2fv(t,o){const i=this._nameToUniform2[t];if(a(i,o)){this._context.gl.uniform2fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):g(o,i)}}setUniform3f(t,o,i,n){const r=this._nameToUniform3[t];if(void 0===r||o!==r[0]||i!==r[1]||n!==r[2]){this._context.gl.uniform3f(this._getUniformLocation(t),o,i,n),void 0===r?this._nameToUniform3[t]=[o,i,n]:(r[0]=o,r[1]=i,r[2]=n)}}setUniform3fv(t,o){const i=this._nameToUniform3[t];if(a(i,o)){this._context.gl.uniform3fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):g(o,i)}}setUniform4f(t,o,i,n,r){const e=this._nameToUniform4[t];if(void 0===e||o!==e[0]||i!==e[1]||n!==e[2]||r!==e[3]){this._context.gl.uniform4f(this._getUniformLocation(t),o,i,n,r),void 0===e?this._nameToUniform4[t]=[o,i,n,r]:(e[0]=o,e[1]=i,e[2]=n,e[3]=r)}}setUniform4fv(t,o){const i=this._nameToUniform4[t];if(a(i,o)){this._context.gl.uniform4fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):g(o,i)}}setUniformMatrix3fv(t,o,i=!1){const n=this._nameToUniformMatrix3[t];if(l(n,o)){this._context.gl.uniformMatrix3fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix3[t]=Array.from(o):g(o,n)}}setUniformMatrix4fv(t,o,i=!1){const n=this._nameToUniformMatrix4[t];if(U(n,o)){this._context.gl.uniformMatrix4fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix4[t]=Array.from(o):g(o,n)}}stop(){}}function a(t,i){if(o(t)||t.length!==i.length)return!0;for(let o=0;o<t.length;++o)if(t[o]!==i[o])return!0;return!1}function h(t,o,e){const m=t.type===n.WEBGL2?s(e,o):e,f=t.gl,a=f.createShader(o);return f.shaderSource(a,m),f.compileShader(a),i()&&!f.getShaderParameter(a,f.COMPILE_STATUS)&&(console.error("Compile error in ".concat(o===r.VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(f.getShaderInfoLog(a)),console.error(c(m)),t.type===n.WEBGL2&&(console.log("Shader source before transpilation:"),console.log(e))),a}function c(t){let o=2;return t.replace(/\n/g,(()=>"\n"+_(o++)+":"))}function _(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function g(t,o){for(let i=0;i<t.length;++i)o[i]=t[i]}function l(t,i){return!!o(t)||(9!==t.length?a(t,i):9!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8])}function U(t,i){return!!o(t)||(16!==t.length?a(t,i):16!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8]||t[9]!==i[9]||t[10]!==i[10]||t[11]!==i[11]||t[12]!==i[12]||t[13]!==i[13]||t[14]!==i[14]||t[15]!==i[15])}export{f as Program};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{isSome as r}from"../../core/maybe.js";import{NestedMap as t}from"../../core/NestedMap.js";import{Program as e}from"./Program.js";class s{constructor(r){this._rctx=r,this._store=new t}dispose(){this._store.forEach((r=>r.forEach((r=>r.dispose())))),this._store.clear()}acquire(t,s,o,c){const i=this._store.get(t,s);if(r(i))return i.ref(),i;const h=new e(this._rctx,t,s,o,c);return h.ref(),this._store.set(t,s,h),h}get test(){let r=0;return this._store.forEach((t=>t.forEach((t=>r+=t.hasGLName?2:1)))),{cachedWebGLObjects:r}}}export{s as ProgramCache};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Program as r}from"./Program.js";function e(e,t,
|
|
5
|
+
import{Program as r}from"./Program.js";function e(e,t,a=""){return new r(e,a+t.shaders.vertexShader,a+t.shaders.fragmentShader,t.attributes)}export{e as createProgram};
|