@arcgis/core 4.23.0-next.20220105 → 4.23.0-next.20220123
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/09da224052976e290828.js +1 -0
- package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +1 -0
- package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
- package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
- package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.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/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
- package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.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/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
- package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +1 -0
- package/assets/esri/core/workers/chunks/4c9084a04948b6924749.js +1 -0
- package/assets/esri/core/workers/chunks/{35961690afe9ea1f91b0.js → 5383a8f3e4ec1a8a4fcd.js} +1 -1
- package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 5538639a49c7cc2eca63.js} +1 -1
- package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
- package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.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/{ba6fdaed6c315dc13981.js → 625d2663daa8e0cf64b0.js} +1 -1
- 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/663ad15b86936eb06b69.js +1 -0
- package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +1 -0
- package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
- package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +1 -0
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +1 -0
- package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.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/7baf6b1f3f050aa67ae4.js +1 -0
- package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
- 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/8cbb04a9065aa3756638.js +1 -0
- package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
- package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
- package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
- package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +1 -0
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +1 -0
- package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
- package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
- package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
- 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/a96afc176041f698c7a1.js +1 -0
- package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.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/afa6912454f2a5ffadce.js +1 -0
- package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
- package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +1 -0
- package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
- 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/bab1cfd0a901181622af.js +1 -0
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
- package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
- package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → c080114a69fa95b88d22.js} +1 -1
- 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/c6f94b92e866b881d9b9.js +1 -0
- package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
- package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
- package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
- package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +1 -0
- package/assets/esri/core/workers/chunks/cef4af64860ebbfc1c47.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/d72488db62fcf39447b6.js +1 -0
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +1 -0
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
- package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +1 -0
- package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +1 -0
- package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -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/CloudsComposition.glsl.js +4 -4
- package/chunks/DefaultMaterial.glsl.js +2 -2
- 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/chunks/vxlLayer.js +1 -1
- package/core/has.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/form/elements/FieldElement.js +1 -1
- package/geometry/support/buffer/math/common.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +372 -126
- package/layers/FeatureLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/SubtypeGroupLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerScene.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/mixins/OperationalLayer.js +1 -1
- package/layers/ogc/crsUtils.js +5 -0
- package/layers/support/RasterFunction.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.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/libs/vxl/enums.js +1 -1
- package/package.json +5 -5
- package/portal/schemas/buildingSceneLayerItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/integratedMeshLayerItem.js +1 -1
- package/portal/schemas/pointCloudLayerItem.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/rasterRenderers.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/request.js +1 -1
- package/rest/find.js +1 -1
- package/rest/geometryService/generalize.js +1 -1
- package/rest/geometryService/lengths.js +1 -1
- package/rest/geometryService/offset.js +1 -1
- package/rest/geometryService/relation.js +1 -1
- package/rest/geometryService/trimExtend.js +1 -1
- package/rest/identify.js +1 -1
- package/{tasks → rest}/operations/find.js +0 -0
- package/{tasks → rest}/operations/generalize.js +0 -0
- package/rest/operations/identify.js +5 -0
- package/{tasks → rest}/operations/lengths.js +0 -0
- package/{tasks → rest}/operations/offset.js +0 -0
- package/{tasks → rest}/operations/relation.js +0 -0
- package/{tasks → rest}/operations/trimExtend.js +0 -0
- package/{tasks → rest}/operations/urlUtils.js +0 -0
- package/rest/print.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttachments.js +1 -1
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/route/utils.js +1 -1
- package/rest/support/ImageIdentifyParameters.js +1 -1
- package/rest/support/NetworkServiceDescription.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/RouteParameters.js +1 -1
- package/rest/support/RouteSettings.js +5 -0
- package/rest/support/StatisticDefinition.js +1 -1
- package/rest/support/Stop.js +1 -1
- package/rest/support/networkEnums.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/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/support/Symbol3DHalo.js +1 -1
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/textUtils.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/sources/BaseFeatureSource.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/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsGenerator.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/VoxelLayerView3D.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/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +5 -0
- package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +4 -0
- 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/Transform.glsl.js +7 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -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/OffscreenRendering.js +1 -1
- 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/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.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/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.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/DefaultsFromMap.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/Renderbuffer.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/UniformBufferLayout.js +5 -0
- package/views/webgl/UniformBufferObject.js +5 -0
- package/views/webgl/Util.js +1 -1
- 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/Editor/workflowUtils.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/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.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/LayerListViewModel.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/widgets/support/geolocationUtils.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/2c9af2ebd72d9b55329b.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/615aa2d3ecafe30c80c0.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/6deac533bb455be4004b.js +0 -1
- package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
- package/assets/esri/core/workers/chunks/722a10c65456844d72b9.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/9846098704ee38bf6350.js +0 -1
- package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
- package/assets/esri/core/workers/chunks/a721342a32541717324d.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/b51261a9a9ab62388839.js +0 -971
- package/assets/esri/core/workers/chunks/b58eba403bd517a7bb15.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/cb68db7169b9dfd1c3ff.js +0 -1
- package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
- package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.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/tasks/operations/identify.js +0 -5
- package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
- package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +0 -5
- package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8683],{53073:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),o=n(95330),l=n(8667);class u extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,o.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeSpatialRelationTest(e){if(null===e.geometry)return(0,o.DB)(!1);switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}_fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);return this._parent._getFeatures(r,-1,s,n).then((()=>{this._checkCancelled(n);const t=[];for(let n=0;n<s;n++){const r=this._parent._featureFromCache(e[n]);t.push(this.executeSpatialRelationTest(r))}return(0,o.$6)(t)})).then((n=>{for(let r=0;r<t;r++)!0===n[r]?this._idstates[e[r]]=i.dj.InFeatureSet:this._idstates[e[r]]=i.dj.NotInFeatureSet;return"success"}))}_getFilteredSet(e,t,n,r,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s))).then((e=>{let n;return this._checkCancelled(s),n=null!==t?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),n}))}_stat(e,t,n,r,s,a,i){return""!==n?(0,o.DB)({calculated:!1}):this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_canDoAggregates(e,t,n,r,s){return""!==n||null!==r||null===this._parent?(0,o.DB)(!1):this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}_getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){return null===this._parent?(0,o.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(91136),s=n(90961),a=n(90658),i=n(95330);class o extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}_getSet(){return(0,i.DB)(this._wset)}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}_getFeature(){return(0,i.d1)(new Error("No Feature Found in EmptySet"))}queryAttachments(){return(0,i.DB)([])}_getFeatures(){return(0,i.DB)("success")}_featureFromCache(){return null}_fetchAndRefineFeatures(){return(0,i.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(){return(0,i.DB)(new s.Z([],[],!1,null))}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}_canDoAggregates(){return(0,i.DB)(!1)}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(95330);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=(0,r.Ue)(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=(0,r.Ue)(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}count(){return-1!==this._parent._totalCount?(0,r.DB)(this._parent._totalCount):this._parent._getSet(this._progress).then((e=>this._refineAllSets(e))).then((e=>(this._parent._totalCount=e._known.length,(0,r.DB)(this._parent._totalCount))))}_refineAllSets(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):e._candidates.length>0?"GETPAGES"===e._known[e._candidates.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress).then((e=>e._candidates.length>0?this._refineAllSets(e):(0,r.DB)(e))):(0,r.DB)(e)}}var a=n(90961),i=n(90658),o=n(48039),l=n(95002),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=(0,r.Ue)(((e,t)=>{if(!0===this._parent.loaded)return this._initialiseFeatureSet(),void e(this);this._parent.load().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t)}))),this._loadPromise}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}_canDoAggregates(e,t,n,s,a){return null===this._parent?(0,r.DB)(!1):this._parent._canDoAggregates(e,t,n,s,a)}_getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o)}_getAgregagtePhysicalPage(e,t,n){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAgregagtePhysicalPage(e,t,n)}databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==o.Z.applicationCache){const e=o.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];let t=(0,r.Ue)(((t,n)=>{this._getDatabaseTypeImpl(e,0).then((e=>{this._databaseType=e,t(this._databaseType)}),(e=>{n(e)}))}));return null!==o.Z.applicationCache&&(o.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),t),t=t.catch((e=>{throw o.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}))),this._databaseTypeProbed=t,this._databaseTypeProbed}return(0,r.DB)(this._databaseType)}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}_getDatabaseTypeImpl(e,t){return t>=e.length?(0,r.DB)(i.Bj.StandardisedNoInterval):this._runDatabaseProbe(e[t].testwhere).then((n=>!0===n?e[t].thetype:this._getDatabaseTypeImpl(e,t+1)))}_runDatabaseProbe(e){return null!==this._parent?this._parent._runDatabaseProbe(e):(0,r.d1)(new Error("Not Implemented"))}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}_getFeature(e,t,n){try{return this._checkCancelled(n),void 0!==this._featureFromCache(t)?(0,r.DB)(this._featureFromCache(t)):this._getFeatures(e,t,this._maxProcessingRate(),n).then((()=>(this._checkCancelled(n),void 0!==this._featureFromCache(t)?this._featureFromCache(t):(0,r.d1)(new Error("Feature Not Found")))))}catch(e){return(0,r.d1)(e)}}_getFeatureBatch(e,t){try{this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];return this._getFeatures(n,-1,e.length,t).then((()=>{this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}))}catch(e){return(0,r.d1)(e)}}_getFeatures(e,t,n,s){return(0,r.DB)("success")}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}_refineSetBlock(e,t,n){try{if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return this._expandPagedSet(e,this._maxQueryRate(),0,0,n).then((()=>this._refineSetBlock(e,t,n)));this._checkCancelled(n);const s=e._candidates.length;this._refineKnowns(e,t);let a=s-e._candidates.length;return 0===e._candidates.length||a>=t?(0,r.DB)(e):this._refineIfParentKnown(e,t-a,n).then((()=>{if(this._checkCancelled(n),this._refineKnowns(e,t-a),a=s-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n).then((()=>(this._checkCancelled(n),this._refineKnowns(e,t-a),e)))}return e}))}catch(e){return(0,r.d1)(e)}}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let o=!1;const l=this._candidateIdTransform(e._candidates[a]);l!==e._candidates[a]&&(o=!0);const u=this._isInFeatureSet(l);if(u===i.dj.InFeatureSet)!0===o?e._known.indexOf(l)<0&&(e._known.push(l),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}_expandPagedSet(e,t,n,s,a){return null===this._parent?(0,r.d1)(new Error("Parent Paging not implemented")):this._parent._expandPagedSet(e,t,n,s,a)}_expandPagedSetFeatureSet(e,t,n,s,a){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(s=1),0===s&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(s=2),0===s?(0,r.DB)("finished"):this._getPage(e,s,a).then((r=>n+r<t?this._expandPagedSet(e,t,n+r,0,a):"success"))}_getPage(e,t,n){const s=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){s.length=s.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)s[s.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&s.push("GETPAGES"),(0,r.DB)(t)}return this._getPhysicalPage(e,t,n).then((()=>this._getPage(e,t,n)))}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}calculateStatistic(e,t,n,r){return this._ensureLoaded().then((()=>this._stat(e,t,"",null,null,n,r).then((s=>!1===s.calculated?this._manualStat(e,t,n,r).then((e=>e.result)):s.result))))}_manualStat(e,t,n,s){switch(e.toLowerCase()){case"count":return(0,l.QX)(this,s).then((e=>({calculated:!0,result:e})));case"distinct":return(0,l.EB)(this,t,n).then((e=>({calculated:!0,result:e})));case"avg":case"mean":return(0,l.J6)(this,t,s).then((e=>({calculated:!0,result:e})));case"stdev":return(0,l.m)(this,t,s).then((e=>({calculated:!0,result:e})));case"variance":return(0,l.CA)(this,t,s).then((e=>({calculated:!0,result:e})));case"sum":return(0,l.Sm)(this,t,s).then((e=>({calculated:!0,result:e})));case"min":return(0,l.VV)(this,t,s).then((e=>({calculated:!0,result:e})));case"max":return(0,l.Fp)(this,t,s).then((e=>({calculated:!0,result:e})));default:return(0,r.DB)({calculated:!0,result:0})}}_stat(e,t,n,r,s,a,i){return this._parent._stat(e,t,n,r,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return(0,r.Ue)(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return(0,r.Ue)(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return(0,r.Ue)(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,s,a,i,o){try{if(++o>1e3)return void setTimeout((()=>{o=0,this._reduceImpl(e,t,n,s,a,i,o)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,s,this);(0,r.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,s+1,a,i,o)}),i):this._reduceImpl(e,t,u,s+1,a,i,o)}}catch(e){i(e)}}),i)}catch(e){i(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}distinct(e,t=1e3,n=null,r){return this.load().then((()=>{const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}))}min(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}))}max(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}))}avg(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}))}sum(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}))}stdev(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}))}variance(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}))}count(e){return this.load().then((()=>this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return(0,r.Ue)(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._forEachImpl(e,t,n,s,a,i)}),0);e.next().then((o=>{try{if(null===o)s(n);else{const l=t(o);null==l?this._forEachImpl(e,t,n,s,a,i):(0,r.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,s,a,i)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}convertToText(e,t){return"schema"===e?this._ensureLoaded().then((()=>JSON.stringify(this.schema()))):"featureset"===e?this._ensureLoaded().then((()=>{const e=[];return this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t).then((()=>{const t=this.schema();return t.features=e,t.spatialReference=this.spatialReference.toJSON(),JSON.stringify(t)}))})):(0,r.DB)(this.castToText())}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===(null==e?void 0:e.featureset)?this:"none"===(null==e?void 0:e.featureset)?null:{type:"FeatureSet"}}castAsJsonAsync(e=null,t=null){return"keeptype"===(null==t?void 0:t.featureset)?(0,r.DB)(this):"schema"===(null==t?void 0:t.featureset)?this._ensureLoaded().then((()=>JSON.parse(JSON.stringify(this.schema())))):"none"===(null==t?void 0:t.featureset)?(0,r.DB)(null):this._ensureLoaded().then((()=>{const n=[];return this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===(null==t?void 0:t.keepGeometryType)?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==(null==t?void 0:t.keepGeometryType)&&delete s.geometry.spatialReference,n.push(s),1}),0,e).then((()=>{const e=this.schema();return e.features=n,e.spatialReference=!0===(null==t?void 0:t.keepGeometryType)?this.spatialReference:this.spatialReference.toJSON(),e}))}))}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,TE:()=>I,y5:()=>S,oX:()=>d,vR:()=>_,DT:()=>p,bB:()=>l,hq:()=>y,zR:()=>i,XF:()=>o,fz:()=>h});var r=n(90658),s=n(41534),a=n(99490);function i(e,t){return c(e.parseTree,t,e.parameters)}function o(e,t,n){return c(e,t,n)}function l(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,o,l;switch(e.type){case"interval":return I(c(e.value,t,n,r,s),e.qualifier,e.op);case"case_expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"param":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expr_list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary_expr":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+l+")) ");case"NOT IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+l+")) ");case"BETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"NOTBETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current_time":return _("date"===e.mode,t);case"column_ref":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=a.ou.fromJSDate(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function p(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(f(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function f(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case_expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.clauses[a].value,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.else,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}return m(s)}case"param":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expr_list":{const s=[];for(const a of t.value)s.push(f(e,a,n,r));return s}case"unary_expr":return"boolean";case"binary_expr":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([f(e,t.left,n,r),f(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"bool":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current_time":return"date";case"column_ref":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=f(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=f(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=f(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return b(e.parseTree,t)}function S(e){return"column_ref"===e.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when_clause":return b(e.operand,t)||b(e.value,t);case"case_expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"param":case"null":case"bool":case"date":case"timestamp":case"string":case"number":return!1;case"expr_list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary_expr":return b(e.expr,t);case"binary_expr":return b(e.left,t)||b(e.right,t);case"column_ref":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function w(e){let t="";return t+=e.period.toUpperCase(),t}function I(e,t,n){let r="";return r="interval-period"===t.type?w(t):w(t.start)+" TO "+w(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{tj:()=>d,QX:()=>S,g3:()=>h,EB:()=>I,Fp:()=>p,J6:()=>f,VV:()=>_,m:()=>m,Sm:()=>y,CA:()=>g});var r=n(61363),s=n(90658),a=n(36515),i=n(95330);function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function c(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function h(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function d(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,s.hj)(t)||(0,s.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,s.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return o(t);case"min":return Math.min.apply(Math,t);case"sum":return c(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}function _(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.min.apply(Math,e)))}function p(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.max.apply(Math,e)))}function f(e,t,n){let r="";return!1===(0,a.y5)(t)&&(r=(0,a.DT)(t,e.fields,null)),b(e,t,n,!0).then((e=>{if(0===e.length)return null;const t=o(e);return null===t?t:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(t):t}))}function g(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:u(e)))}function m(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.sqrt(u(e))))}function y(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:c(e)))}function S(e,t){try{return e.iterator(t).count()}catch(e){return(0,i.d1)(e)}}function b(e,t,n,r=!1){try{const s=e.iterator(n);return(0,i.Ue)(((e,n)=>{w(s,[],t,r,e,n)}))}catch(e){return(0,i.d1)(e)}}function w(e,t,n,s,a,i){(0,r.U)(e.next().then((r=>{try{if(null!==r){const o=n.calculateValue(r);return null===o?!1===s&&(t[t.length]=o):t[t.length]=o,w(e,t,n,s,a,i)}a(t)}catch(e){i(e)}}),i))}function I(e,t,n=1e3,r=null){return function(e,t,n,r){try{return E(e.iterator(r),{},[],t,n)}catch(e){return(0,i.d1)(e)}}(e,t,n,r)}function E(e,t,n,r,s){return e.next().then((a=>{if(null!==a){const i=r.calculateValue(a);return null!=i&&void 0===t[i]&&(n.push(i),t[i]=1),n.length>=s&&-1!==s?n:E(e,t,n,r,s)}return n}))}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),a=n(92604),i=n(17452);const o=a.Z.getLogger("esri.assets");function l(e){if(!r.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.Z.assetsPath,e)}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),s=n(92604),a=n(95330),i=n(25045);const o=s.Z.getLogger("esri.core.workers.Connection");class l{constructor(){this._clients=new Array,this._clientPromises=new Array,this._clientIdx=0}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const o=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length;for(let s=0;s<e.length;++s){const l=e[s];(0,a.y8)(l)?this._clientPromises[s]=l.then((e=>(this._clients[s]=new i.default(e,t),o(n),this._clients[s])),(()=>(o(r),null))):(this._clients[s]=new i.default(l,t),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r.invoke(e,t,n)))}return r}close(){for(const e of this._clientPromises)e.then((e=>e.close()));this._clients.length=0,this._clientPromises.length=0}getAvailableClient(){let e;for(let t=0;t<this._clients.length;++t){const n=this._clients[t];if(n){if(!n.isBusy())return Promise.resolve(n)}else e=e||[],e.push(this._clientPromises[t])}return e?Promise.race(e):(this._clientIdx=(this._clientIdx+1)%this._clients.length,Promise.resolve(this._clients[this._clientIdx]))}invoke(e,t,n){let r=null;return Array.isArray(n)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n,this.closed?Promise.reject(new Error("Connection closed")):this.getAvailableClient().then((n=>n.invoke(e,t,r)))}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{t[r]=s.openPort(),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},25045:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(40330),s=n(20102),a=n(91460),i=n(70586),o=n(95330),l=n(94362),u=n(17202);const c={statsWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(6841)]).then(n.bind(n,36841)),geometryEngineWorker:()=>Promise.all([n.e(5837),n.e(8227)]).then(n.bind(n,48227)),CSVSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(966)]).then(n.bind(n,27793)),EdgeProcessingWorker:()=>Promise.all([n.e(6481),n.e(8936)]).then(n.bind(n,18936)),ElevationSamplerWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(411),n.e(2781),n.e(6481),n.e(6459),n.e(3553)]).then(n.bind(n,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4588),n.e(411),n.e(1534),n.e(3485),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(5404)]).then(n.bind(n,2255)),GeoJSONSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(7845)]).then(n.bind(n,97845)),LercWorker:()=>n.e(3027).then(n.bind(n,23027)),MemorySourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(639)]).then(n.bind(n,30639)),PBFDecoderWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(8961),n.e(147)]).then(n.bind(n,61916)),Pipeline:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(5638),n.e(4588),n.e(411),n.e(1534),n.e(3485),n.e(3578),n.e(8961),n.e(7054),n.e(2730),n.e(7783)]).then(n.bind(n,97783)),PointCloudWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(411),n.e(9294),n.e(9474)]).then(n.bind(n,16583)),RasterWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(411),n.e(176),n.e(8034)]).then(n.bind(n,61576)),SceneLayerWorker:()=>n.e(1412).then(n.bind(n,31412)),WFSSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(4556),n.e(3230)]).then(n.bind(n,43230)),WorkerTileHandler:()=>Promise.all([n.e(2303),n.e(1785),n.e(6810),n.e(9872)]).then(n.bind(n,56456))},{CLOSE:h,ABORT:d,INVOKE:_,RESPONSE:p,OPEN_PORT:f,ON:g}=l.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===l.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const r=new y(t.port1,{channel:t,client:n});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=r),y.clients.set(r,n),t.port2}static loadWorker(e){const t=c[e];return t?t():Promise.resolve(null)}close(){this._post({type:h}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,n){const r=n&&n.signal,a=n&&n.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,l.jt)();return new Promise(((n,s)=>{const l=(0,o.$F)(r,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),s((0,o.zE)()))})),u={resolve:n,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:_,jobId:i,methodName:e,abortable:null!=r},t,a)}))}on(e,t){const n=new MessageChannel;function r(e){t(e.data)}return this._port.postMessage({type:l.Cs.ON,eventType:e,port:n.port2},[n.port2]),n.port1.addEventListener("message",r),n.port1.start(),{remove(){n.port1.postMessage({type:l.Cs.CLOSE}),n.port1.close(),n.port1.removeEventListener("message",r)}}}openPort(){const e=new MessageChannel;return this._post({type:f,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,o.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,l.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case _:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case h:this._onCloseMessage();break;case f:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);this._invokeQueue.push(e),r&&(r.controller&&r.controller.abort(),t.delete(n))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:s}=e,a=s?new AbortController:null,i=this._inJobs;let u,c=this._client,h=c[t];try{if(!h&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)c=c[e[t]],h=c[e[t+1]]}if("function"!=typeof h)throw new TypeError(`${t} is not a function`);u=h.call(c,r,{client:this,signal:a?a.signal:null})}catch(e){return void this._post({type:p,jobId:n,error:(0,l.AB)(e)})}(0,o.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:p,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),(0,o.D_)(e)||this._post({type:p,jobId:n,error:(0,l.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:n},u)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,n=this._client.on(e.eventType,(e=>{t.postMessage(e)})),r=(0,a.on)(e.port,"message",(e=>{(0,l.QM)(e).type===l.Cs.CLOSE&&(r.remove(),n.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:n,error:r,data:a}=e,i=this._outJobs;if(!i.has(n))return;const o=i.get(n);i.delete(n),null==(t=o.abortHandle)||t.remove(),r?o.reject(s.Z.fromJSON(JSON.parse(r))):o.resolve(a)}_post(e,t,n){return(0,l.oi)(this._port,e,t,n)}}y.kernelInfo={revision:u.$,version:r.i8,buildDate:u.r},y.clients=new Map},94362:(e,t,n)=>{n.d(t,{Cs:()=>r,jt:()=>o,oi:()=>u,QM:()=>c,AB:()=>l});var r,s,a=n(80442);(s=r||(r={}))[s.HANDSHAKE=0]="HANDSHAKE",s[s.OPEN=1]="OPEN",s[s.OPENED=2]="OPENED",s[s.RESPONSE=3]="RESPONSE",s[s.INVOKE=4]="INVOKE",s[s.ABORT=5]="ABORT",s[s.CLOSE=6]="CLOSE",s[s.OPEN_PORT=7]="OPEN_PORT",s[s.ON=8]="ON";let i=0;function o(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function u(e,t,n,s){if(t.type===r.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==r.INVOKE&&t.type!==r.RESPONSE)return void e.postMessage(t);let a;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(n)?(a=h(s),t.data=n):(a=h(n.transferList),t.data=n.result),a?e.postMessage(t,a):e.postMessage(t)}function c(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function h(e){if(!e||!e.length)return null;if((0,a.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},8667:(e,t,n)=>{n.d(t,{f3:()=>C,oq:()=>c,r3:()=>d,jU:()=>_,z7:()=>h,Cz:()=>R,e5:()=>v,ED:()=>S,TE:()=>p,fS:()=>f,D$:()=>A,Y4:()=>L,rd:()=>k,j2:()=>O,kQ:()=>M,wf:()=>F,kK:()=>g,Gg:()=>I,cv:()=>D,Nm:()=>b,CJ:()=>B,sz:()=>x,LV:()=>w,U1:()=>N,og:()=>E,Sp:()=>T,W4:()=>m,G0:()=>P,uh:()=>y}),n(66577);var r=n(78346),s=(n(13473),n(33955));function a(e){var t;return Array.isArray(e)?null==(t=e[0])?void 0:t.spatialReference:null==e?void 0:e.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function o(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let l;async function u(e,t){return(await async function(){return l||(l=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return o(await u("clip",[a(e),e,t]))}async function h(e,t){return o(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function p(e,t,n){return u("distance",[a(e),e,t,n])}function f(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function S(e,t){return u("disjoint",[a(e),e,t])}function b(e,t){return u("overlaps",[a(e),e,t])}function w(e,t,n){return u("relate",[a(e),e,t,n])}function I(e){return u("isSimple",[a(e),e])}async function E(e){return o(await u("simplify",[a(e),e]))}async function v(e,t){return o(await u("difference",[a(e),e,t]))}async function T(e,t){return o(await u("symmetricDifference",[a(e),e,t]))}async function F(e,t){return o(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return o(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return o(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return o(await u("buffer",s))}async function k(e,t,n,r,s,i){const l=[a(e),e,t,n,r,s,i];return o(await u("geodesicBuffer",l))}async function N(e,t,n){var r;if(null==e)throw new Error("Illegal Argument Exception");const s=e.spatialReference;n=null!=(r=n)?r:function(e){return"xmin"in e?e.center:"x"in e?e:e.extent.center}(e);const a=e.constructor.fromJSON(await u("rotate",[s,e,t,n]));return a.spatialReference=s,a}async function A(e,t,n,r){return o(await u("generalize",[a(e),e,t,n,r]))}async function R(e,t,n){return o(await u("densify",[a(e),e,t,n]))}async function O(e,t,n,r=0){return o(await u("geodesicDensify",[a(e),e,t,n,r]))}function B(e,t){return u("planarArea",[a(e),e,t])}function x(e,t){return u("planarLength",[a(e),e,t])}function L(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function M(e,t,n){return u("geodesicLength",[a(e),e,t,n])}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8683],{53073:(e,t,n)=>{n.d(t,{Z:()=>u});var r=n(75148),s=n(91136),a=n(90961),i=n(90658),o=n(95330),l=n(8667);class u extends s.Z{constructor(e){super(e),this._relation="",this._relationGeom=null,this._relationString="",this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._relationString=e.relationString,this._parent=e.parentfeatureset,this._maxProcessing=40,this._relation=e.relation,this._relationGeom=e.relationGeom}_getSet(e){return null===this._wset?this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,null,null,e))).then((t=>(this._checkCancelled(e),this._wset=new a.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset))):(0,o.DB)(this._wset)}_isInFeatureSet(e){let t=this._parent._isInFeatureSet(e);return t===i.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?i.dj.Unknown:t)}_getFeature(e,t,n){return this._parent._getFeature(e,t,n)}_getFeatures(e,t,n,r){return this._parent._getFeatures(e,t,n,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeSpatialRelationTest(e){if(null===e.geometry)return(0,o.DB)(!1);switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const t=(0,i.SV)(this._relationGeom),n=(0,i.SV)(e.geometry);return(0,l.kK)(t,n)}case"esriSpatialRelIntersects":return(0,l.kK)(this._relationGeom,e.geometry);case"esriSpatialRelContains":return(0,l.r3)(this._relationGeom,e.geometry);case"esriSpatialRelOverlaps":return(0,l.Nm)(this._relationGeom,e.geometry);case"esriSpatialRelWithin":return(0,l.uh)(this._relationGeom,e.geometry);case"esriSpatialRelTouches":return(0,l.W4)(this._relationGeom,e.geometry);case"esriSpatialRelCrosses":return(0,l.jU)(this._relationGeom,e.geometry);case"esriSpatialRelRelation":return(0,l.LV)(this._relationGeom,e.geometry,this._relationString)}}_fetchAndRefineFeatures(e,t,n){const r=new a.Z([],e,!1,null),s=Math.min(t,e.length);return this._parent._getFeatures(r,-1,s,n).then((()=>{this._checkCancelled(n);const t=[];for(let n=0;n<s;n++){const r=this._parent._featureFromCache(e[n]);t.push(this.executeSpatialRelationTest(r))}return(0,o.$6)(t)})).then((n=>{for(let r=0;r<t;r++)!0===n[r]?this._idstates[e[r]]=i.dj.InFeatureSet:this._idstates[e[r]]=i.dj.NotInFeatureSet;return"success"}))}_getFilteredSet(e,t,n,r,s){return this._ensureLoaded().then((()=>this._parent._getFilteredSet("esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,n,r,s))).then((e=>{let n;return this._checkCancelled(s),n=null!==t?new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)):new a.Z(e._candidates.slice(0),e._known.slice(0),e._ordered,this._clonePageDefinition(e.pagesDefinition)),n}))}_stat(e,t,n,r,s,a,i){return""!==n?(0,o.DB)({calculated:!1}):this._parent._stat(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_canDoAggregates(e,t,n,r,s){return""!==n||null!==r||null===this._parent?(0,o.DB)(!1):this._parent._canDoAggregates(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s)}_getAggregatePagesDataSourceDefinition(e,t,n,r,s,a,i){return null===this._parent?(0,o.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,"esriSpatialRelRelation"!==this._relation?this._relation:this._relation+":"+this._relationString,this._relationGeom,s,a,i)}static registerAction(){s.Z._featuresetFunctions.intersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelIntersects",relationGeom:e})},s.Z._featuresetFunctions.envelopeIntersects=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelEnvelopeIntersects",relationGeom:e})},s.Z._featuresetFunctions.contains=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelContains",relationGeom:e})},s.Z._featuresetFunctions.overlaps=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelOverlaps",relationGeom:e})},s.Z._featuresetFunctions.within=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelWithin",relationGeom:e})},s.Z._featuresetFunctions.touches=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelTouches",relationGeom:e})},s.Z._featuresetFunctions.crosses=function(e){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelCrosses",relationGeom:e})},s.Z._featuresetFunctions.relate=function(e,t){return null==e?new r.Z({parentfeatureset:this}):new u({parentfeatureset:this,relation:"esriSpatialRelRelation",relationGeom:e,relationString:t})}}}},75148:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(91136),s=n(90961),a=n(90658),i=n(95330);class o extends r.Z{constructor(e){super(e),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._wset=new s.Z([],[],!1,null),this._parent=e.parentfeatureset,this._databaseType=a.Bj.Standardised}_getSet(){return(0,i.DB)(this._wset)}optimisePagingFeatureQueries(){}_isInFeatureSet(){return a.dj.NotInFeatureSet}_getFeature(){return(0,i.d1)(new Error("No Feature Found in EmptySet"))}queryAttachments(){return(0,i.DB)([])}_getFeatures(){return(0,i.DB)("success")}_featureFromCache(){return null}_fetchAndRefineFeatures(){return(0,i.d1)(new Error("Fetch and Refine should not be called in this featureset"))}_getFilteredSet(){return(0,i.DB)(new s.Z([],[],!1,null))}_stat(e,t,n,r,s,a,i){return this._manualStat(e,t,a,i)}_canDoAggregates(){return(0,i.DB)(!1)}}},91136:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(95330);class s{constructor(e,t){this._lastId=-1,this._progress=t,this._parent=e}reset(){this._lastId=-1}nextBatch(e){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((t=>this.nextBatch(e)),(t=>this.nextBatch(e)));const t={returnpromise:null,hasset:!1},n=[];return t.returnpromise=(0,r.Ue)(((r,s)=>{this._parent._getSet(this._progress).then((a=>{let i=a._known.length-1;if("GETPAGES"===a._known[a._known.length-1]&&(i-=1),this._lastId+e>i&&a._known.length>0&&"GETPAGES"===a._known[a._known.length-1])this._parent._expandPagedSet(a,this._parent._maxQueryRate(),0,0,this._progress).then((n=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}));else{if(i>=this._lastId+e||0===a._candidates.length){for(let t=0;t<e;t++){const e=t+this._lastId+1;if(e>=a._known.length)break;n[t]=a._known[e]}return this._lastId+=n.length,0===n.length&&(t.hasset=!0,this._parent._mainSetInUse=null,r([])),void this._parent._getFeatureBatch(n,this._progress).then((e=>{t.hasset=!0,this._parent._mainSetInUse=null,r(e)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}this._parent._refineSetBlock(a,this._parent._maxProcessingRate(),this._progress).then((()=>{t.hasset=!0,this._parent._mainSetInUse=null,this.nextBatch(e).then(r,s)}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))}}),(e=>{t.hasset=!0,this._parent._mainSetInUse=null,s(e)}))})),!1===t.hasset&&(this._parent._mainSetInUse=t.returnpromise,t.hasset=!0),t.returnpromise}next(){if(null!==this._parent._mainSetInUse)return this._parent._mainSetInUse.then((e=>this.next()),(e=>this.next()));const e={returnpromise:null,hasset:!1};return e.returnpromise=(0,r.Ue)(((t,n)=>{this._parent._getSet(this._progress).then((r=>{this._lastId<r._known.length-1?"GETPAGES"===r._known[this._lastId+1]?this._parent._expandPagedSet(r,this._parent._maxQueryRate(),0,0,this._progress).then((t=>(e.hasset=!0,this._parent._mainSetInUse=null,this.next()))).then(t,n):(this._lastId+=1,this._parent._getFeature(r,r._known[this._lastId],this._progress).then((n=>{e.hasset=!0,this._parent._mainSetInUse=null,t(n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))):r._candidates.length>0?this._parent._refineSetBlock(r,this._parent._maxProcessingRate(),this._progress).then((()=>{e.hasset=!0,this._parent._mainSetInUse=null,this.next().then(t,n)}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)})):(e.hasset=!0,this._parent._mainSetInUse=null,t(null))}),(t=>{e.hasset=!0,this._parent._mainSetInUse=null,n(t)}))})),!1===e.hasset&&(this._parent._mainSetInUse=e.returnpromise,e.hasset=!0),e.returnpromise}count(){return-1!==this._parent._totalCount?(0,r.DB)(this._parent._totalCount):this._parent._getSet(this._progress).then((e=>this._refineAllSets(e))).then((e=>(this._parent._totalCount=e._known.length,(0,r.DB)(this._parent._totalCount))))}_refineAllSets(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,1,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):e._candidates.length>0?"GETPAGES"===e._known[e._candidates.length-1]?this._parent._expandPagedSet(e,this._parent._maxQueryRate(),0,2,this._progress).then((t=>this._refineAllSets(e))).then((e=>(0,r.DB)(e))):this._parent._refineSetBlock(e,this._parent._maxProcessingRate(),this._progress).then((e=>e._candidates.length>0?this._refineAllSets(e):(0,r.DB)(e))):(0,r.DB)(e)}}var a=n(90961),i=n(90658),o=n(48039),l=n(95002),u=n(41534),c=n(8667),h=n(82971),d=n(99514);class _{constructor(e){this.recentlyUsedQueries=null,this.featureSetQueryInterceptor=null,this._idstates=[],this._parent=null,this._wset=null,this._mainSetInUse=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=i.Bj.NotEvaluated,this._databaseTypeProbed=null,this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._featureCache=[],this.types=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1,this._transparent=!1,this.loaded=!1,this._loadPromise=null,this._fieldsIndex=null,e&&e.lrucache&&(this.recentlyUsedQueries=e.lrucache),e&&e.interceptor&&(this.featureSetQueryInterceptor=e.interceptor)}optimisePagingFeatureQueries(e){this._parent&&this._parent.optimisePagingFeatureQueries(e)}_hasMemorySource(){return!0}prop(e,t){return void 0===t?this[e]:(void 0!==this[e]&&(this[e]=t),this)}end(){return null!==this._parent&&!0===this._parent._transparent?this._parent.end():this._parent}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=(0,r.Ue)(((e,t)=>{if(!0===this._parent.loaded)return this._initialiseFeatureSet(),void e(this);this._parent.load().then((()=>{try{this._initialiseFeatureSet(),e(this)}catch(e){t(e)}}),t)}))),this._loadPromise}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new h.Z({wkid:4326}),this.geometryType=i.Qk.point)}getField(e,t){let n;return(t=t||this.fields)&&(e=e.toLowerCase(),t.some((t=>(t&&t.name.toLowerCase()===e&&(n=t),!!n)))),n}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=new d.Z(this.fields)),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}_checkCancelled(e){if(null!==e&&e.aborted)throw new Error("Operation has been cancelled.")}nativeCapabilities(){return this._parent.nativeCapabilities()}_canDoAggregates(e,t,n,s,a){return null===this._parent?(0,r.DB)(!1):this._parent._canDoAggregates(e,t,n,s,a)}_getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAggregatePagesDataSourceDefinition(e,t,n,s,a,i,o)}_getAgregagtePhysicalPage(e,t,n){return null===this._parent?(0,r.d1)(new Error("Should never be called")):this._parent._getAgregagtePhysicalPage(e,t,n)}databaseType(){if(this._databaseType===i.Bj.NotEvaluated){if(null!==o.Z.applicationCache){const e=o.Z.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;const e=[{thetype:i.Bj.SqlServer,testwhere:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{thetype:i.Bj.Oracle,testwhere:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{thetype:i.Bj.StandardisedNoInterval,testwhere:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];let t=(0,r.Ue)(((t,n)=>{this._getDatabaseTypeImpl(e,0).then((e=>{this._databaseType=e,t(this._databaseType)}),(e=>{n(e)}))}));return null!==o.Z.applicationCache&&(o.Z.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),t),t=t.catch((e=>{throw o.Z.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}))),this._databaseTypeProbed=t,this._databaseTypeProbed}return(0,r.DB)(this._databaseType)}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}_getDatabaseTypeImpl(e,t){return t>=e.length?(0,r.DB)(i.Bj.StandardisedNoInterval):this._runDatabaseProbe(e[t].testwhere).then((n=>!0===n?e[t].thetype:this._getDatabaseTypeImpl(e,t+1)))}_runDatabaseProbe(e){return null!==this._parent?this._parent._runDatabaseProbe(e):(0,r.d1)(new Error("Not Implemented"))}isTable(){return this._parent.isTable()}_featureFromCache(e){if(void 0!==this._featureCache[e])return this._featureCache[e]}_isInFeatureSet(e){return i.dj.Unknown}_getSet(e){throw new Error("Not implemented in abstract class")}_getFeature(e,t,n){try{return this._checkCancelled(n),void 0!==this._featureFromCache(t)?(0,r.DB)(this._featureFromCache(t)):this._getFeatures(e,t,this._maxProcessingRate(),n).then((()=>(this._checkCancelled(n),void 0!==this._featureFromCache(t)?this._featureFromCache(t):(0,r.d1)(new Error("Feature Not Found")))))}catch(e){return(0,r.d1)(e)}}_getFeatureBatch(e,t){try{this._checkCancelled(t);const n=new a.Z([],e,!1,null),r=[];return this._getFeatures(n,-1,e.length,t).then((()=>{this._checkCancelled(t);for(const t of e)void 0!==this._featureFromCache(t)&&r.push(this._featureFromCache(t));return r}))}catch(e){return(0,r.d1)(e)}}_getFeatures(e,t,n,s){return(0,r.DB)("success")}_getFilteredSet(e,t,n,r,s){throw new Error("Not implemented in abstract class")}_refineSetBlock(e,t,n){try{if(!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQueryRate()))return this._expandPagedSet(e,this._maxQueryRate(),0,0,n).then((()=>this._refineSetBlock(e,t,n)));this._checkCancelled(n);const s=e._candidates.length;this._refineKnowns(e,t);let a=s-e._candidates.length;return 0===e._candidates.length||a>=t?(0,r.DB)(e):this._refineIfParentKnown(e,t-a,n).then((()=>{if(this._checkCancelled(n),this._refineKnowns(e,t-a),a=s-e._candidates.length,a<t&&e._candidates.length>0){const r=t-a,s=this._prepareFetchAndRefineSet(e._candidates);return this._fetchAndRefineFeatures(s,s.length>r?r:e._candidates.length,n).then((()=>(this._checkCancelled(n),this._refineKnowns(e,t-a),e)))}return e}))}catch(e){return(0,r.d1)(e)}}_fetchAndRefineFeatures(e,t,n){return null}_prepareFetchAndRefineSet(e){const t=[];for(let n=0;n<e.length;n++)this._isPhysicalFeature(e[n])&&t.push(e[n]);return t}_isPhysicalFeature(e){return null===this._parent||this._parent._isPhysicalFeature(e)}_refineKnowns(e,t){let n=0,r=null;const s=[];t=this._maxQueryRate();for(let a=0;a<e._candidates.length&&"GETPAGES"!==e._candidates[a];a++){let o=!1;const l=this._candidateIdTransform(e._candidates[a]);l!==e._candidates[a]&&(o=!0);const u=this._isInFeatureSet(l);if(u===i.dj.InFeatureSet)!0===o?e._known.indexOf(l)<0&&(e._known.push(l),n+=1):(e._known.push(e._candidates[a]),n+=1),null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a});else if(u===i.dj.NotInFeatureSet)null===r?r={start:a,end:a}:r.end===a-1?r.end=a:(s.push(r),r={start:a,end:a}),n+=1;else if(u===i.dj.Unknown&&(n+=1,!0===e._ordered))break;if(n>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1)}_refineIfParentKnown(e,t,n){const r=new a.Z([],[],e._ordered,null);return r._candidates=e._candidates.slice(0),this._parent._refineSetBlock(r,t,n)}_candidateIdTransform(e){return this._parent._candidateIdTransform(e)}_checkIfNeedToExpandKnownPage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if("GETPAGES"===e._known[r])return!0;if(void 0===this._featureCache[e._known[r]]&&(n+=1,n>=t))break}return!1}_checkIfNeedToExpandCandidatePage(e,t){if(null===e.pagesDefinition)return!1;let n=0;for(let r=0;r<e._candidates.length;r++){if("GETPAGES"===e._candidates[r])return!0;if(n+=1,n>=t)break}return!1}_expandPagedSet(e,t,n,s,a){return null===this._parent?(0,r.d1)(new Error("Parent Paging not implemented")):this._parent._expandPagedSet(e,t,n,s,a)}_expandPagedSetFeatureSet(e,t,n,s,a){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]&&(s=1),0===s&&e._candidates.length>0&&"GETPAGES"===e._candidates[e._candidates.length-1]&&(s=2),0===s?(0,r.DB)("finished"):this._getPage(e,s,a).then((r=>n+r<t?this._expandPagedSet(e,t,n+r,0,a):"success"))}_getPage(e,t,n){const s=1===t?e._known:e._candidates;if(e.pagesDefinition.internal.set.length>e.pagesDefinition.resultOffset||!0===e.pagesDefinition.internal.fullyResolved){s.length=s.length-1;let t=0;for(let n=0;n<e.pagesDefinition.resultRecordCount&&!(e.pagesDefinition.resultOffset+n>=e.pagesDefinition.internal.set.length);n++)s[s.length]=e.pagesDefinition.internal.set[e.pagesDefinition.resultOffset+n],t++;e.pagesDefinition.resultOffset+=t;let n=!1;return!0===e.pagesDefinition.internal.fullyResolved&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset&&(n=!0),!1===n&&s.push("GETPAGES"),(0,r.DB)(t)}return this._getPhysicalPage(e,t,n).then((()=>this._getPage(e,t,n)))}_getPhysicalPage(e,t,n){return null}_clonePageDefinition(e){return null===this._parent?null:this._parent._clonePageDefinition(e)}_first(e){return this.iterator(e).next()}first(e){return this._first(e)}calculateStatistic(e,t,n,r){return this._ensureLoaded().then((()=>this._stat(e,t,"",null,null,n,r).then((s=>!1===s.calculated?this._manualStat(e,t,n,r).then((e=>e.result)):s.result))))}_manualStat(e,t,n,s){switch(e.toLowerCase()){case"count":return(0,l.QX)(this,s).then((e=>({calculated:!0,result:e})));case"distinct":return(0,l.EB)(this,t,n).then((e=>({calculated:!0,result:e})));case"avg":case"mean":return(0,l.J6)(this,t,s).then((e=>({calculated:!0,result:e})));case"stdev":return(0,l.m)(this,t,s).then((e=>({calculated:!0,result:e})));case"variance":return(0,l.CA)(this,t,s).then((e=>({calculated:!0,result:e})));case"sum":return(0,l.Sm)(this,t,s).then((e=>({calculated:!0,result:e})));case"min":return(0,l.VV)(this,t,s).then((e=>({calculated:!0,result:e})));case"max":return(0,l.Fp)(this,t,s).then((e=>({calculated:!0,result:e})));default:return(0,r.DB)({calculated:!0,result:0})}}_stat(e,t,n,r,s,a,i){return this._parent._stat(e,t,n,r,s,a,i).then((o=>!1===o.calculated?null===s&&""===n&&null===r?this._manualStat(e,t,a,i):{calculated:!1}:o))}_unionAllGeomSelf(e){const t=this.iterator(this._defaultTracker(e)),n=[];return(0,r.Ue)(((e,r)=>{this._unionShapeInBatches(n,t,e,r)}))}_unionAllGeom(e){return(0,r.Ue)(((t,n)=>{const r=this.iterator(this._defaultTracker(e));this._unionShapeInBatches([],r,t,n)}))}_unionShapeInBatches(e,t,n,r){t.next().then((s=>{try{null!==s&&null!==s.geometry&&e.push(s.geometry),e.length>30||null===s&&e.length>1?(0,c.G0)(e).then((a=>{try{null===s?n(a):(e=[a],this._unionShapeInBatches(e,t,n,r))}catch(e){r(e)}}),r):null===s?1===e.length?n(e[0]):n(null):this._unionShapeInBatches(e,t,n,r)}catch(e){r(e)}}),r)}iterator(e){return new s(this,e)}intersection(e,t=!1){return _._featuresetFunctions.intersection.bind(this)(e,t)}difference(e,t=!1,n=!0){return _._featuresetFunctions.difference.bind(this)(e,t,n)}symmetricDifference(e,t=!1,n=!0){return _._featuresetFunctions.symmetricDifference.bind(this)(e,t,n)}morphShape(e,t,n="unknown",r=null){return _._featuresetFunctions.morphShape.bind(this)(e,t,n,r)}morphShapeAndAttributes(e,t,n="unknown"){return _._featuresetFunctions.morphShapeAndAttributes.bind(this)(e,t,n)}union(e,t=!1){return _._featuresetFunctions.union.bind(this)(e,t)}intersects(e){return _._featuresetFunctions.intersects.bind(this)(e)}envelopeIntersects(e){return _._featuresetFunctions.envelopeIntersects.bind(this)(e)}contains(e){return _._featuresetFunctions.contains.bind(this)(e)}overlaps(e){return _._featuresetFunctions.overlaps.bind(this)(e)}relate(e,t){return _._featuresetFunctions.relate.bind(this)(e,t)}within(e){return _._featuresetFunctions.within.bind(this)(e)}touches(e){return _._featuresetFunctions.touches.bind(this)(e)}top(e){return _._featuresetFunctions.top.bind(this)(e)}crosses(e){return _._featuresetFunctions.crosses.bind(this)(e)}buffer(e,t,n,r=!0){return _._featuresetFunctions.buffer.bind(this)(e,t,n,r)}filter(e,t=null){return _._featuresetFunctions.filter.bind(this)(e,t)}orderBy(e){return _._featuresetFunctions.orderBy.bind(this)(e)}dissolve(e,t){return _._featuresetFunctions.dissolve.bind(this)(e,t)}groupby(e,t){return _._featuresetFunctions.groupby.bind(this)(e,t)}reduce(e,t=null,n){return(0,r.Ue)(((r,s)=>{this._reduceImpl(this.iterator(this._defaultTracker(n)),e,t,0,r,s,0)}))}_reduceImpl(e,t,n,s,a,i,o){try{if(++o>1e3)return void setTimeout((()=>{o=0,this._reduceImpl(e,t,n,s,a,i,o)}));e.next().then((l=>{try{if(null===l)a(n);else{const u=t(n,l,s,this);(0,r.y8)(u)?u.then((n=>{this._reduceImpl(e,t,n,s+1,a,i,o)}),i):this._reduceImpl(e,t,u,s+1,a,i,o)}}catch(e){i(e)}}),i)}catch(e){i(e)}}removeField(e){return _._featuresetFunctions.removeField.bind(this)(e)}addField(e,t,n=null){return _._featuresetFunctions.addField.bind(this)(e,t,n)}sumArea(e,t=!1,n){const r=(0,i.EI)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.Y4)(n.geometry,r).then((t=>e+t)):(0,c.CJ)(n.geometry,r).then((t=>e+t))),0,n)}sumLength(e,t=!1,n){const r=(0,i.Lz)(e);return this.reduce(((e,n)=>null===n.geometry?0:t?(0,c.kQ)(n.geometry,r).then((t=>e+t)):(0,c.sz)(n.geometry,r).then((t=>e+t))),0,n)}_substituteVars(e,t){if(null!==t){const n={};for(const e in t)n[e.toLowerCase()]=t[e];e.parameters=n}}distinct(e,t=1e3,n=null,r){return this.load().then((()=>{const s=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(s,n),this.calculateStatistic("distinct",s,t,this._defaultTracker(r))}))}min(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("min",r,-1,this._defaultTracker(n))}))}max(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("max",r,-1,this._defaultTracker(n))}))}avg(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("avg",r,-1,this._defaultTracker(n))}))}sum(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("sum",r,-1,this._defaultTracker(n))}))}stdev(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("stdev",r,-1,this._defaultTracker(n))}))}variance(e,t=null,n){return this.load().then((()=>{const r=u.WhereClause.create(e,this.getFieldsIndex());return this._substituteVars(r,t),this.calculateStatistic("variance",r,-1,this._defaultTracker(n))}))}count(e){return this.load().then((()=>this.calculateStatistic("count",u.WhereClause.create("1",this.getFieldsIndex()),-1,this._defaultTracker(e))))}_defaultTracker(e){return e||{aborted:!1}}forEach(e,t){return(0,r.Ue)(((n,r)=>{this._forEachImpl(this.iterator(this._defaultTracker(t)),e,this,n,r,0)}))}_forEachImpl(e,t,n,s,a,i){try{if(++i>1e3)return void setTimeout((()=>{i=0,this._forEachImpl(e,t,n,s,a,i)}),0);e.next().then((o=>{try{if(null===o)s(n);else{const l=t(o);null==l?this._forEachImpl(e,t,n,s,a,i):(0,r.y8)(l)?l.then((()=>{try{this._forEachImpl(e,t,n,s,a,i)}catch(e){a(e)}}),a):this._forEachImpl(e,t,n,s,a,i)}}catch(e){a(e)}}),a)}catch(e){a(e)}}convertToJSON(e){const t={layerDefinition:{geometryType:this.geometryType,fields:[]},featureSet:{features:[],geometryType:this.geometryType}};for(let e=0;e<this.fields.length;e++)t.layerDefinition.fields.push((0,i.Sh)(this.fields[e]));return this.reduce(((e,n)=>{const r={geometry:n.geometry&&n.geometry.toJSON(),attributes:{}};for(const e in n.attributes)r.attributes[e]=n.attributes[e];return t.featureSet.features.push(r),1}),0,e).then((()=>t))}castToText(){return"object, FeatureSet"}queryAttachments(e,t,n,r,s){return this._parent.queryAttachments(e,t,n,r,s)}serviceUrl(){return this._parent.serviceUrl()}subtypes(){return this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map((e=>({name:e.name,code:e.id}))):[]}:null}relationshipMetaData(){return this._parent.relationshipMetaData()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,i.Sh)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===i.q2[this.geometryType]?"":i.q2[this.geometryType],fields:e}}convertToText(e,t){return"schema"===e?this._ensureLoaded().then((()=>JSON.stringify(this.schema()))):"featureset"===e?this._ensureLoaded().then((()=>{const e=[];return this.reduce(((t,n)=>{const r={geometry:n.geometry?n.geometry.toJSON():null,attributes:n.attributes};return null!==r.geometry&&r.geometry.spatialReference&&delete r.geometry.spatialReference,e.push(r),1}),0,t).then((()=>{const t=this.schema();return t.features=e,t.spatialReference=this.spatialReference.toJSON(),JSON.stringify(t)}))})):(0,r.DB)(this.castToText())}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return null!==this._parent?this._parent.getRootFeatureSet():this}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(e=null){return"keeptype"===(null==e?void 0:e.featureset)?this:"none"===(null==e?void 0:e.featureset)?null:{type:"FeatureSet"}}castAsJsonAsync(e=null,t=null){return"keeptype"===(null==t?void 0:t.featureset)?(0,r.DB)(this):"schema"===(null==t?void 0:t.featureset)?this._ensureLoaded().then((()=>JSON.parse(JSON.stringify(this.schema())))):"none"===(null==t?void 0:t.featureset)?(0,r.DB)(null):this._ensureLoaded().then((()=>{const n=[];return this.reduce(((e,r)=>{const s={geometry:r.geometry?!0===(null==t?void 0:t.keepGeometryType)?r.geometry:r.geometry.toJSON():null,attributes:r.attributes};return null!==s.geometry&&s.geometry.spatialReference&&!0!==(null==t?void 0:t.keepGeometryType)&&delete s.geometry.spatialReference,n.push(s),1}),0,e).then((()=>{const e=this.schema();return e.features=n,e.spatialReference=!0===(null==t?void 0:t.keepGeometryType)?this.spatialReference:this.spatialReference.toJSON(),e}))}))}}_._featuresetFunctions={}},90961:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r){this._candidates=null,this._known=null,this._lastFetchedIndex=0,this._ordered=!1,this.pagesDefinition=null,this._candidates=e,this._known=t,this._ordered=n,this.pagesDefinition=r}}},48039:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}r.applicationCache=null},36515:(e,t,n)=>{n.d(t,{$e:()=>u,TE:()=>I,y5:()=>S,oX:()=>d,vR:()=>_,DT:()=>p,bB:()=>l,hq:()=>y,zR:()=>i,XF:()=>o,fz:()=>h});var r=n(90658),s=n(41534),a=n(99490);function i(e,t){return c(e.parseTree,t,e.parameters)}function o(e,t,n){return c(e,t,n)}function l(e,t,n,a){return s.WhereClause.create(c(e.parseTree,r.Bj.Standardised,e.parameters,t,n),a)}function u(e,t,n="AND"){return s.WhereClause.create("(("+i(e,r.Bj.Standardised)+")"+n+"("+i(t,r.Bj.Standardised)+"))",e.fieldsIndex)}function c(e,t,n,r=null,s=null){let a,i,o,l;switch(e.type){case"interval":return I(c(e.value,t,n,r,s),e.qualifier,e.op);case"case_expression":{let a=" CASE ";"simple"===e.format&&(a+=c(e.operand,t,n,r,s));for(let i=0;i<e.clauses.length;i++)a+=" WHEN "+c(e.clauses[i].operand,t,n,r,s)+" THEN "+c(e.clauses[i].value,t,n,r,s);return null!==e.else&&(a+=" ELSE "+c(e.else,t,n,r,s)),a+=" END ",a}case"param":{const r=n[e.value.toLowerCase()];if("string"==typeof r)return"'"+n[e.value.toLowerCase()].toString().replace(/'/g,"''")+"'";if(r instanceof Date)return d(r,t);if(r instanceof Array){const e=[];for(let n=0;n<r.length;n++)"string"==typeof r[n]?e.push("'"+r[n].toString().replace(/'/g,"''")+"'"):r[n]instanceof Date?e.push(d(r[n],t)):e.push(r[n].toString());return e}return r.toString()}case"expr_list":i=[];for(const a of e.value)i.push(c(a,t,n,r,s));return i;case"unary_expr":return" ( NOT "+c(e.expr,t,n,r,s)+" ) ";case"binary_expr":switch(e.operator){case"AND":return" ("+c(e.left,t,n,r,s)+" AND "+c(e.right,t,n,r,s)+") ";case"OR":return" ("+c(e.left,t,n,r,s)+" OR "+c(e.right,t,n,r,s)+") ";case"IS":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new Error("Unsupported RHS for IS");return" ("+c(e.left,t,n,r,s)+" IS NOT NULL )";case"IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" IN ("+l+")) ");case"NOT IN":return a=[],"expr_list"===e.right.type?(a=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT IN ("+a.join(",")+")) "):(l=c(e.right,t,n,r,s),l instanceof Array?" ("+c(e.left,t,n,r,s)+" NOT IN ("+l.join(",")+")) ":" ("+c(e.left,t,n,r,s)+" NOT IN ("+l+")) ");case"BETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"NOTBETWEEN":return o=c(e.right,t,n,r,s)," ("+c(e.left,t,n,r,s)+" NOT BETWEEN "+o[0]+" AND "+o[1]+" ) ";case"LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" LIKE "+c(e.right,t,n,r,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+" ESCAPE '"+e.escape+"') ":" ("+c(e.left,t,n,r,s)+" NOT LIKE "+c(e.right,t,n,r,s)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+c(e.left,t,n,r,s)+" "+e.operator+" "+c(e.right,t,n,r,s)+") "}throw new Error("Not Supported Operator "+e.operator);case"null":return"null";case"bool":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replace(/'/g,"''")+"'";case"timestamp":case"date":return d(e.value,t);case"number":return e.value.toString();case"current_time":return _("date"===e.mode,t);case"column_ref":return r&&r.toLowerCase()===e.column.toLowerCase()?"("+s+")":e.column;case"function":{const a=c(e.args,t,n,r,s);return h(e.name,a,t)}}throw new Error("Unsupported sql syntax "+e.type)}function h(e,t,n){switch(e.toLowerCase().trim()){case"abs":if(1!==t.length)throw new Error("Invalid Parameter for call to ABS");return"abs("+t[0]+")";case"ceiling":case"ceil":if(1!==t.length)throw new Error("Invalid Parameter for call to CEILING");switch(n){case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:}return"CEILING("+t[0]+")";case"floor":if(1!==t.length)throw new Error("Invalid Parameter for call to Floor");return"FLOOR("+t[0]+")";case"log":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG");return"LOG("+t[0]+")";case"log10":if(1!==t.length)throw new Error("Invalid Parameter for call to LOG10");return"LOG10("+t[0]+")";case"power":if(2!==t.length)throw new Error("Invalid Parameter for call to POWER");return"POWER("+t[0]+","+t[1]+")";case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new Error("Invalid Parameter for call to ROUND");case"truncate":if(t.length<1||t.length>2)throw new Error("Invalid Parameter for TRUNCATE function");return n===r.Bj.SqlServer?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new Error("Invalid Parameter for CHAR_LENGTH function");switch(n){case r.Bj.SqlServer:return"LEN("+t[0]+")";case r.Bj.Oracle:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"concat":if(t.length<1)throw new Error("Invalid Parameter for CONCAT function");{let e="CONCAT(";for(let n=0;n<t.length;n++)0!==n&&(e+=","),e+=t[n];return e+=")",e}case"lower":case"lcase":if(1!==t.length)throw new Error("Invalid Parameter for Lower function");return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new Error("Invalid Parameter for Upper function");return"UPPER("+t[0]+")";case"substring":{let e="";switch(n){case r.Bj.Oracle:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case r.Bj.SqlServer:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replace(/\'/g,"")+" FROM "+t[1]+")"}throw new Error("Function Not Recognised")}function d(e,t){const n=a.ou.fromJSDate(e),s=0===n.hour&&0===n.minute&&0===n.second&&0===n.millisecond;switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:return s?`date '${n.toFormat("yyyy-LL-dd")}'`:`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.Oracle:return s?`TO_DATE('${n.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${n.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case r.Bj.SqlServer:return`'${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case r.Bj.PGDB:return`#${n.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case r.Bj.Postgres:return`TIMESTAMP '${n.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`date '${n.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function _(e,t){switch(t){case r.Bj.FILEGDB:case r.Bj.Standardised:case r.Bj.StandardisedNoInterval:case r.Bj.Oracle:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP";case r.Bj.SqlServer:return e?"CAST(GETDATE() AS DATE)":"GETDATE()";case r.Bj.PGDB:case r.Bj.Postgres:default:return e?"CURRENT_DATE":"CURRENT_TIMESTAMP"}}function p(e,t,n={}){const r={},s={},a={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",oid:"integer",long:"integer","small-integer":"integer",integer:"integer",single:"double",double:"double",date:"date",string:"string"};for(const e of t){const t=a[e.type];r[e.name.toLowerCase()]=void 0===t?"":t}for(const e in n){const t=a[n[e]];s[e.toLowerCase()]=void 0===t?"":t}switch(f(r,e.parseTree,e.parameters,s)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"string":return"string"}return""}function f(e,t,n,r){let s;switch(t.type){case"interval":return"integer";case"case_expression":{const s=[];if("simple"===t.format){for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.clauses[a].value,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}else{for(let a=0;a<t.clauses.length;a++)s.push(f(e,t.else,n,r));null!==t.else&&s.push(f(e,t.else,n,r))}return m(s)}case"param":{const e=r[t.value.toLowerCase()];if(void 0===e&&n){const e=n[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if(e instanceof Date)return"date";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expr_list":{const s=[];for(const a of t.value)s.push(f(e,a,n,r));return s}case"unary_expr":return"boolean";case"binary_expr":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new Error("Unsupported RHS for IS");return"boolean";case"*":case"-":case"+":case"/":return m([f(e,t.left,n,r),f(e,t.right,n,r)]);default:throw new Error("Not Supported Operator "+t.operator)}case"null":return"";case"bool":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":case"timestamp":case"current_time":return"date";case"column_ref":{const n=e[t.column.toLowerCase()];return void 0===n?"":n}case"function":switch(t.name.toLowerCase()){case"position":case"extract":case"char_length":return"integer";case"round":return s=f(e,t.args,n,r),s instanceof Array?s.length>0?s[0]:"":s;case"sign":return s=f(e,t.args,n,r),s instanceof Array&&(s=m(s)),"integer"===s||"double"===s?s:"double";case"ceiling":case"floor":case"abs":{const s=f(e,t.args,n,r);return s instanceof Array?m(s):s}case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"power":case"truncate":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string"}return""}throw new Error("Unsupported sql syntax "+t.type)}const g={boolean:1,string:2,integer:3,double:4,date:5};function m(e){if(e){let t="";for(const n of e)""!==n&&(t=""===t||g[t]<g[n]?n:t);return t}return""}function y(e,t){return b(e.parseTree,t)}function S(e){return"column_ref"===e.parseTree.type}function b(e,t){if(null==e)return!1;switch(e.type){case"when_clause":return b(e.operand,t)||b(e.value,t);case"case_expression":for(const n of e.clauses)if(b(n,t))return!0;return!("simple"!==e.format||!b(e.operand,t))||!(null===e.else||!b(e.else,t));case"param":case"null":case"bool":case"date":case"timestamp":case"string":case"number":return!1;case"expr_list":for(const n of e.value)if(b(n,t))return!0;return!1;case"unary_expr":return b(e.expr,t);case"binary_expr":return b(e.left,t)||b(e.right,t);case"column_ref":return t.toLowerCase()===e.column.toLowerCase();case"function":return b(e.args,t)}return!1}function w(e){let t="";return t+=e.period.toUpperCase(),t}function I(e,t,n){let r="";return r="interval-period"===t.type?w(t):w(t.start)+" TO "+w(t.end),"INTERVAL "+n+" "+e+" "+r}},95002:(e,t,n)=>{n.d(t,{tj:()=>d,QX:()=>S,g3:()=>h,EB:()=>I,Fp:()=>p,J6:()=>f,VV:()=>_,m:()=>m,Sm:()=>y,CA:()=>g});var r=n(61363),s=n(90658),a=n(36515),i=n(95330);function o(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/e.length}function l(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/e.length}function u(e){const t=o(e);let n=0;for(let r=0;r<e.length;r++)n+=(t-e[r])**2;return n/(e.length-1)}function c(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function h(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return""}function d(e,t,n=1e3){switch(e.toLowerCase()){case"distinct":return function(e,t){const n=[],r={},a=[];for(let i=0;i<e.length;i++){if(void 0!==e[i]&&null!==e[i]){const t=e[i];if((0,s.hj)(t)||(0,s.HD)(t))void 0===r[t]&&(n.push(t),r[t]=1);else{let e=!1;for(let n=0;n<a.length;n++)!0===(0,s.tt)(a[n],t)&&(e=!0);!1===e&&(a.push(t),n.push(t))}}if(n.length>=t&&-1!==t)return n}return n}(t,n);case"avg":case"mean":return o(t);case"min":return Math.min.apply(Math,t);case"sum":return c(t);case"max":return Math.max.apply(Math,t);case"stdev":case"stddev":return Math.sqrt(l(t));case"var":case"variance":return l(t);case"count":return t.length}return 0}function _(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.min.apply(Math,e)))}function p(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.max.apply(Math,e)))}function f(e,t,n){let r="";return!1===(0,a.y5)(t)&&(r=(0,a.DT)(t,e.fields,null)),b(e,t,n,!0).then((e=>{if(0===e.length)return null;const t=o(e);return null===t?t:"integer"===r?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(t):t}))}function g(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:u(e)))}function m(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:Math.sqrt(u(e))))}function y(e,t,n){return b(e,t,n,!0).then((e=>0===e.length?null:c(e)))}function S(e,t){try{return e.iterator(t).count()}catch(e){return(0,i.d1)(e)}}function b(e,t,n,r=!1){try{const s=e.iterator(n);return(0,i.Ue)(((e,n)=>{w(s,[],t,r,e,n)}))}catch(e){return(0,i.d1)(e)}}function w(e,t,n,s,a,i){(0,r.U)(e.next().then((r=>{try{if(null!==r){const o=n.calculateValue(r);return null===o?!1===s&&(t[t.length]=o):t[t.length]=o,w(e,t,n,s,a,i)}a(t)}catch(e){i(e)}}),i))}function I(e,t,n=1e3,r=null){return function(e,t,n,r){try{return E(e.iterator(r),{},[],t,n)}catch(e){return(0,i.d1)(e)}}(e,t,n,r)}function E(e,t,n,r,s){return e.next().then((a=>{if(null!==a){const i=r.calculateValue(a);return null!=i&&void 0===t[i]&&(n.push(i),t[i]=1),n.length>=s&&-1!==s?n:E(e,t,n,r,s)}return n}))}},99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),a=n(92604),i=n(17452);const o=a.Z.getLogger("esri.assets");function l(e){if(!r.Z.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.Z.assetsPath,e)}},80903:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(50758),s=n(92604),a=n(95330),i=n(25045);const o=s.Z.getLogger("esri.core.workers.Connection");class l{constructor(){this._clients=new Array,this._clientPromises=new Array,this._clientIdx=0}destroy(){this.close()}get closed(){return!this._clients||!this._clients.length}open(e,t){return new Promise(((n,r)=>{let s=!0;const o=e=>{(0,a.k_)(t.signal),s&&(s=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length;for(let s=0;s<e.length;++s){const l=e[s];(0,a.y8)(l)?this._clientPromises[s]=l.then((e=>(this._clients[s]=new i.default(e,t),o(n),this._clients[s])),(()=>(o(r),null))):(this._clients[s]=new i.default(l,t),this._clientPromises[s]=Promise.resolve(this._clients[s]),o(n))}}))}broadcast(e,t,n){const r=new Array(this._clientPromises.length);for(let s=0;s<this._clientPromises.length;++s){const a=this._clientPromises[s];r[s]=a.then((r=>r.invoke(e,t,n)))}return r}close(){for(const e of this._clientPromises)e.then((e=>e.close()));this._clients.length=0,this._clientPromises.length=0}getAvailableClient(){let e;for(let t=0;t<this._clients.length;++t){const n=this._clients[t];if(n){if(!n.isBusy())return Promise.resolve(n)}else e=e||[],e.push(this._clientPromises[t])}return e?Promise.race(e):(this._clientIdx=(this._clientIdx+1)%this._clients.length,Promise.resolve(this._clients[this._clientIdx]))}invoke(e,t,n){let r=null;return Array.isArray(n)?(o.warn("invoke()","The transferList parameter is deprecated, use the options object instead"),r={transferList:n}):r=n,this.closed?Promise.reject(new Error("Connection closed")):this.getAvailableClient().then((n=>n.invoke(e,t,r)))}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.AL)(this._clients.map((n=>n.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let n=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((s=>{t[r]=s.openPort(),0==--n&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},25045:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(40330),s=n(20102),a=n(91460),i=n(70586),o=n(95330),l=n(94362),u=n(17202);const c={statsWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(6841)]).then(n.bind(n,36841)),geometryEngineWorker:()=>Promise.all([n.e(5837),n.e(8227)]).then(n.bind(n,48227)),CSVSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(966)]).then(n.bind(n,27793)),EdgeProcessingWorker:()=>Promise.all([n.e(6481),n.e(8936)]).then(n.bind(n,18936)),ElevationSamplerWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(411),n.e(2781),n.e(6481),n.e(6459),n.e(3553)]).then(n.bind(n,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(4588),n.e(411),n.e(1534),n.e(3485),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(5404)]).then(n.bind(n,2255)),GeoJSONSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(7845)]).then(n.bind(n,97845)),LercWorker:()=>n.e(3027).then(n.bind(n,23027)),MemorySourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(639)]).then(n.bind(n,30639)),PBFDecoderWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(8961),n.e(147)]).then(n.bind(n,61916)),Pipeline:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(5638),n.e(4588),n.e(411),n.e(1534),n.e(3485),n.e(3578),n.e(8961),n.e(7054),n.e(4325),n.e(2730),n.e(7783)]).then(n.bind(n,97783)),PointCloudWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(411),n.e(9294),n.e(9474)]).then(n.bind(n,16583)),RasterWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(411),n.e(176),n.e(8034)]).then(n.bind(n,61576)),SceneLayerWorker:()=>n.e(1412).then(n.bind(n,31412)),WFSSourceWorker:()=>Promise.all([n.e(2785),n.e(6570),n.e(9928),n.e(2303),n.e(7668),n.e(411),n.e(1534),n.e(3578),n.e(8961),n.e(7054),n.e(2781),n.e(6348),n.e(4556),n.e(3230)]).then(n.bind(n,43230)),WorkerTileHandler:()=>Promise.all([n.e(2303),n.e(4325),n.e(1785),n.e(6810),n.e(9872)]).then(n.bind(n,56456))},{CLOSE:h,ABORT:d,INVOKE:_,RESPONSE:p,OPEN_PORT:f,ON:g}=l.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===l.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let n;n="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const r=new y(t.port1,{channel:t,client:n});return"object"==typeof n&&"remoteClient"in n&&(n.remoteClient=r),y.clients.set(r,n),t.port2}static loadWorker(e){const t=c[e];return t?t():Promise.resolve(null)}close(){this._post({type:h}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,n){const r=n&&n.signal,a=n&&n.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const i=(0,l.jt)();return new Promise(((n,s)=>{const l=(0,o.$F)(r,(()=>{var e;const t=this._outJobs.get(i);t&&(this._outJobs.delete(i),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:i}),s((0,o.zE)()))})),u={resolve:n,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(i,u),this._post({type:_,jobId:i,methodName:e,abortable:null!=r},t,a)}))}on(e,t){const n=new MessageChannel;function r(e){t(e.data)}return this._port.postMessage({type:l.Cs.ON,eventType:e,port:n.port2},[n.port2]),n.port1.addEventListener("message",r),n.port1.start(),{remove(){n.port1.postMessage({type:l.Cs.CLOSE}),n.port1.close(),n.port1.removeEventListener("message",r)}}}openPort(){const e=new MessageChannel;return this._post({type:f,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,o.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,l.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case _:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case h:this._onCloseMessage();break;case f:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,n=e.jobId,r=t.get(n);this._invokeQueue.push(e),r&&(r.controller&&r.controller.abort(),t.delete(n))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:n,data:r,abortable:s}=e,a=s?new AbortController:null,i=this._inJobs;let u,c=this._client,h=c[t];try{if(!h&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)c=c[e[t]],h=c[e[t+1]]}if("function"!=typeof h)throw new TypeError(`${t} is not a function`);u=h.call(c,r,{client:this,signal:a?a.signal:null})}catch(e){return void this._post({type:p,jobId:n,error:(0,l.AB)(e)})}(0,o.y8)(u)?(i.set(n,{controller:a,promise:u}),u.then((e=>{i.has(n)&&(i.delete(n),this._post({type:p,jobId:n},e))}),(e=>{i.has(n)&&(i.delete(n),(0,o.D_)(e)||this._post({type:p,jobId:n,error:(0,l.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:n},u)}_onOpenPortMessage(e){new y(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,n=this._client.on(e.eventType,(e=>{t.postMessage(e)})),r=(0,a.on)(e.port,"message",(e=>{(0,l.QM)(e).type===l.Cs.CLOSE&&(r.remove(),n.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:n,error:r,data:a}=e,i=this._outJobs;if(!i.has(n))return;const o=i.get(n);i.delete(n),null==(t=o.abortHandle)||t.remove(),r?o.reject(s.Z.fromJSON(JSON.parse(r))):o.resolve(a)}_post(e,t,n){return(0,l.oi)(this._port,e,t,n)}}y.kernelInfo={revision:u.$,version:r.i8,buildDate:u.r},y.clients=new Map},94362:(e,t,n)=>{n.d(t,{Cs:()=>r,jt:()=>o,oi:()=>u,QM:()=>c,AB:()=>l});var r,s,a=n(80442);(s=r||(r={}))[s.HANDSHAKE=0]="HANDSHAKE",s[s.OPEN=1]="OPEN",s[s.OPENED=2]="OPENED",s[s.RESPONSE=3]="RESPONSE",s[s.INVOKE=4]="INVOKE",s[s.ABORT=5]="ABORT",s[s.CLOSE=6]="CLOSE",s[s.OPEN_PORT=7]="OPEN_PORT",s[s.ON=8]="ON";let i=0;function o(){return i++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function u(e,t,n,s){if(t.type===r.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==r.INVOKE&&t.type!==r.RESPONSE)return void e.postMessage(t);let a;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(n)?(a=h(s),t.data=n):(a=h(n.transferList),t.data=n.result),a?e.postMessage(t,a):e.postMessage(t)}function c(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function h(e){if(!e||!e.length)return null;if((0,a.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},8667:(e,t,n)=>{n.d(t,{f3:()=>C,oq:()=>c,r3:()=>d,jU:()=>_,z7:()=>h,Cz:()=>R,e5:()=>v,ED:()=>S,TE:()=>p,fS:()=>f,D$:()=>A,Y4:()=>L,rd:()=>k,j2:()=>O,kQ:()=>M,wf:()=>F,kK:()=>g,Gg:()=>I,cv:()=>D,Nm:()=>b,CJ:()=>B,sz:()=>x,LV:()=>w,U1:()=>N,og:()=>E,Sp:()=>T,W4:()=>m,G0:()=>P,uh:()=>y}),n(66577);var r=n(78346),s=(n(13473),n(33955));function a(e){var t;return Array.isArray(e)?null==(t=e[0])?void 0:t.spatialReference:null==e?void 0:e.spatialReference}function i(e){return e?Array.isArray(e)?e.map(i):e.toJSON?e.toJSON():e:e}function o(e){return Array.isArray(e)?e.map((e=>(0,s.im)(e))):(0,s.im)(e)}let l;async function u(e,t){return(await async function(){return l||(l=(0,r.bA)("geometryEngineWorker",{strategy:"distributed"})),l}()).invoke("executeGEOperation",{operation:e,parameters:i(t)})}async function c(e,t){return o(await u("clip",[a(e),e,t]))}async function h(e,t){return o(await u("cut",[a(e),e,t]))}function d(e,t){return u("contains",[a(e),e,t])}function _(e,t){return u("crosses",[a(e),e,t])}function p(e,t,n){return u("distance",[a(e),e,t,n])}function f(e,t){return u("equals",[a(e),e,t])}function g(e,t){return u("intersects",[a(e),e,t])}function m(e,t){return u("touches",[a(e),e,t])}function y(e,t){return u("within",[a(e),e,t])}function S(e,t){return u("disjoint",[a(e),e,t])}function b(e,t){return u("overlaps",[a(e),e,t])}function w(e,t,n){return u("relate",[a(e),e,t,n])}function I(e){return u("isSimple",[a(e),e])}async function E(e){return o(await u("simplify",[a(e),e]))}async function v(e,t){return o(await u("difference",[a(e),e,t]))}async function T(e,t){return o(await u("symmetricDifference",[a(e),e,t]))}async function F(e,t){return o(await u("intersect",[a(e),e,t]))}async function P(e,t=null){const n=function(e,t){let n;return Array.isArray(e)?n=e:(n=[],n.push(e),null!=t&&n.push(t)),n}(e,t);return o(await u("union",[a(n),n]))}async function D(e,t,n,r,s,i){return o(await u("offset",[a(e),e,t,n,r,s,i]))}async function C(e,t,n,r=!1){const s=[a(e),e,t,n,r];return o(await u("buffer",s))}async function k(e,t,n,r,s,i){const l=[a(e),e,t,n,r,s,i];return o(await u("geodesicBuffer",l))}async function N(e,t,n){var r;if(null==e)throw new Error("Illegal Argument Exception");const s=e.spatialReference;n=null!=(r=n)?r:function(e){return"xmin"in e?e.center:"x"in e?e:e.extent.center}(e);const a=e.constructor.fromJSON(await u("rotate",[s,e,t,n]));return a.spatialReference=s,a}async function A(e,t,n,r){return o(await u("generalize",[a(e),e,t,n,r]))}async function R(e,t,n){return o(await u("densify",[a(e),e,t,n]))}async function O(e,t,n,r=0){return o(await u("geodesicDensify",[a(e),e,t,n,r]))}function B(e,t){return u("planarArea",[a(e),e,t])}function x(e,t){return u("planarLength",[a(e),e,t])}function L(e,t,n){return u("geodesicArea",[a(e),e,t,n])}function M(e,t,n){return u("geodesicLength",[a(e),e,t,n])}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7622,6006],{3920:(e,t,r)=>{r.d(t,{r:()=>u,p:()=>c});var n=r(43697),i=r(15923),s=r(61247),a=r(5600),o=r(52011),l=r(89749);const c=e=>{let t=class extends e{destroy(){var e,t;this.destroyed||(null==(e=this._get("handles"))||e.destroy(),null==(t=this._get("updatingHandles"))||t.destroy())}get handles(){return this._get("handles")||new s.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,n._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,n._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,n._)([(0,o.j)("esri.core.HandleOwner")],t),t};let u=class extends(c(i.Z)){};u=(0,n._)([(0,o.j)("esri.core.HandleOwner")],u)},78346:(e,t,r)=>{r.d(t,{bA:()=>A});var n=r(20102),i=r(80442),s=r(95330),a=r(80903),o=r(25045),l=r(40330),c=r(92604),u=r(94362),f=r(99880),h=r(68773),d=(r(2587),r(17452));const p={};function m(e){var t;const r={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(r.async=!0),e.hasOwnProperty("isDebug")||(r.isDebug=!1),e.baseUrl||(r.baseUrl=p.baseUrl),null==(t=p.packages)||t.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(r.packages,e)})),r}var y=r(41213);class g{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class x{constructor(){this._dispatcher=new g,this._workerPostMessage({type:u.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,y.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,y.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,u.QM)(e);if(t&&t.type===u.Cs.OPEN){const{modulePath:e,jobId:r}=t;let n=await o.default.loadWorker(e);n||(n=await import(e));const i=o.default.connect(n);this._workerPostMessage({type:u.Cs.OPENED,jobId:r,data:i})}}}var w=r(70171),v=r(17202);const b=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:I}=u.Cs;let _,C;const R="Failed to create Worker. Fallback to execute module in main thread";async function S(e){return new Promise((t=>{function r(i){const s=(0,u.QM)(i);s&&s.type===I&&(e.removeEventListener("message",r),e.removeEventListener("error",n),t(e))}function n(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",n),b.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new x).addEventListener("message",r),e.addEventListener("error",n)}e.addEventListener("message",r),e.addEventListener("error",n)}))}let k=0;const T=c.Z.getLogger("esri.core.workers"),{ABORT:M,INVOKE:P,OPEN:O,OPENED:F,RESPONSE:E}=u.Cs;class Z{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),T.error(e)}))}static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers")||((0,i.Z)("mozilla"),0))return S(new x);if(!_&&!C)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=h.Z.default){const t={...h.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(h.Z));e.assetsPath=(0,d.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,w.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,i.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.hF)(e.workers.workerPath):e.workers.workerPath=(0,d.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=h.Z.workers.loaderConfig,r=m({baseUrl:null==t?void 0:t.baseUrl,locale:(0,w.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...null==t?void 0:t.has},map:{...null==t?void 0:t.map},paths:{...null==t?void 0:t.paths},packages:(null==t?void 0:t.packages)||[]}),n={version:l.i8,buildDate:v.r,revision:v.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:n})}()}'`);_=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){C=e||{}}let e;if(_)try{e=new Worker(_,{name:"esri-worker-"+k++})}catch(t){b.warn(R,C),e=new x}else b.warn(R,C),e=new x;return S(e)}();return new Z(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,n=(0,u.jt)();return new Promise(((t,i)=>{const a={resolve:t,reject:i,abortHandle:(0,s.$F)(r,(()=>{this._outJobs.delete(n),this._post({type:M,jobId:n})}))};this._outJobs.set(n,a),this._post({type:O,jobId:n,modulePath:e})}))}_onMessage(e){const t=(0,u.QM)(e);if(t)switch(t.type){case F:this._onOpenedMessage(t);break;case E:this._onResponseMessage(t);break;case M:this._onAbortMessage(t);break;case P:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);n&&(n.controller&&n.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:i}=e,a=i?new AbortController:null,o=this._inJobs,c=l.Nv[t];let f;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);f=c.call(null,n,{signal:a?a.signal:null})}catch(e){return void this._post({type:E,jobId:r,error:(0,u.AB)(e)})}(0,s.y8)(f)?(o.set(r,{controller:a,promise:f}),f.then((e=>{o.has(r)&&(o.delete(r),this._post({type:E,jobId:r},e))}),(e=>{o.has(r)&&(o.delete(r),e||(e={message:"Error encountered at method"+t}),(0,s.D_)(e)||this._post({type:E,jobId:r,error:(0,u.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:E,jobId:r},f)}_onOpenedMessage(e){var t;const{jobId:r,data:n}=e,i=this._outJobs.get(r);i&&(this._outJobs.delete(r),null==(t=i.abortHandle)||t.remove(),i.resolve(n))}_onResponseMessage(e){var t;const{jobId:r,error:i,data:s}=e,a=this._outJobs.get(r);a&&(this._outJobs.delete(r),null==(t=a.abortHandle)||t.remove(),i?a.reject(n.Z.fromJSON(JSON.parse(i))):a.resolve(s))}_post(e,t,r){return(0,u.oi)(this.worker,e,t,r)}}let N=(0,i.Z)("esri-workers-debug")?1:(0,i.Z)("host-browser")?navigator.hardwareConcurrency-1:0;N||(N=(0,i.Z)("safari")&&(0,i.Z)("mac")||(0,i.Z)("trident")?7:2);let B=0;const D=[];async function z(e,t){const r=new a.Z;return await r.open(e,t),r}async function A(e,t={}){if("string"!=typeof e)throw new n.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.Z)("esri-workers")&&(r="local"),"local"===r){let r=await o.default.loadWorker(e);r||(r=await import(e)),(0,s.k_)(t.signal);const n=t.client||r;return z([o.default.connect(r)],{...t,client:n})}if(await async function(){if(L)return L;H=new AbortController;const e=[];for(let t=0;t<N;t++){const r=Z.create(t).then((e=>(D[t]=e,e)));e.push(r)}return L=Promise.all(e),L}(),(0,s.k_)(t.signal),"dedicated"===r){const r=B++%N;return z([await D[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,N);if(r<N){const n=new Array(r);for(let i=0;i<r;++i){const r=B++%N;n[i]=D[r].open(e,t)}return z(n,t)}}return z(D.map((r=>r.open(e,t))),t)}let H,L=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var n=r(94443),i=r(3172),s=r(20102),a=r(70586);async function o(e){if((0,a.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,i.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let n;n="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=n,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,i){const a=t.exec(r);if(!a)throw new s.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],u=(0,n.Su)(i),f=`${l}${c}.json`,h=u?`${l}${c}_${u}.json`:f;let d;try{d=await o(e(h))}catch(t){if(h===f)throw new s.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{d=await o(e(f))}catch(e){throw new s.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}const c={};var u,f=r(99880);(0,n.tz)((u={pattern:"esri/",location:f.V},new l(u)))},94443:(e,t,r)=>{r.d(t,{ME:()=>d,Su:()=>p,tz:()=>h});var n=r(20102),i=r(95330),s=r(70171);const a=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,o={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){var t;return null!=(t=o[e])&&t}const c=[],u=new Map;function f(e){for(const t of u.keys())m(e.pattern,t)&&u.delete(t)}function h(e){return c.includes(e)||(f(e),c.unshift(e)),{remove(){const t=c.indexOf(e);t>-1&&(c.splice(t,1),f(e))}}}async function d(e){const t=(0,s.Kd)();u.has(e)||u.set(e,async function(e,t){const r=[];for(const n of c)if(m(n.pattern,e))try{return await n.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new n.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new n.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=u.get(e);return await y.add(r),r}function p(e){if(!a.test(e))return null;const[,t,r]=a.exec(e),n=t+(r?"-"+r.toUpperCase():"");return l(n)?n:l(t)?t:null}function m(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{u.clear()}));const y=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,i.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},940:(e,t,r)=>{r.d(t,{n:()=>c});var n=r(92604),i=r(78286),s=r(19153),a=r(90344),o=r(18848);const l=n.Z.getLogger("esri.intl");function c(e,t,r={}){const{format:n={}}=r;return(0,s.gx)(e,(e=>function(e,t,r){let n,s;const a=e.indexOf(":");if(-1===a?n=e.trim():(n=e.slice(0,a).trim(),s=e.slice(a+1).trim()),!n)return"";const o=(0,i.hS)(n,t);if(null==o)return"";const l=r[s]||r[n];return l?u(o,l):s?f(o,s):h(o)}(e,t,n)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,o.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),h(e)}}function f(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,o.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,o.uf)(e):h(e)}}function h(e){switch(typeof e){case"string":return e;case"number":return(0,o.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}},52294:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ve});var n=r(43697),i=r(51773),s=r(14746),a=r(20102),o=r(70586),l=r(16453),c=r(95330),u=r(5600),f=(r(67676),r(80442),r(75215)),h=r(36030),d=r(71715),p=r(52011),m=r(29600),y=r(71612),g=r(17017),x=(r(66577),r(3172)),w=r(92604),v=r(44422),b=r(8744),I=r(66677),_=r(21506),C=r(35956),R=r(88281),S=r(11145),k=r(80676),T=r(67058),M=r(91219),P=r(23808),O=r(6570),F=r(82971);const E=w.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),Z=e=>{let t=class extends e{constructor(){super(...arguments),this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.fullExtent=null,this.interpolation="nearest",this.multidimensionalDefinition=null,this.raster=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.tileInfo=null,this.symbolizer=null}set url(e){this._set("url",(0,I.Nm)(e,E))}set renderer(e){this._set("renderer",e),this.updateRenderer()}async convertVectorFieldData(e,t){if((0,o.Wi)(e))return null;const r=this._rasterJobHandler.instance,n=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:e,dataType:n},t):(0,k.KC)(e,n)}async createStreamlinesMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createStreamlinesMesh(e,t):(0,P.z_)(e.rendererSettings,e.flowData,(0,o.pC)(t.signal)?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return e;let r=e.multidimensionalDefinition||this.multidimensionalDefinition;!(0,o.Wi)(r)&&r.length||(r=this._getDefaultSlice());const n=e.timeExtent||this.timeExtent;if((0,o.pC)(r)&&(0,o.pC)(n)&&((0,o.pC)(n.start)||(0,o.pC)(n.end))){var i,s;r=r.map((e=>e.clone()));const a=null==(i=t.variables.find((({name:e})=>e===r[0].variableName)))||null==(s=i.dimensions)?void 0:s.find((({name:e})=>"StdTime"===e)),l=r.find((({dimensionName:e})=>"StdTime"===e));if(!a||!l)return{...e,multidimensionalDefinition:null};const{start:c,end:u}=n,f=(0,o.Wi)(c)?null:c.getTime(),h=(0,o.Wi)(u)?null:u.getTime(),d=null!=f?f:h,p=null!=h?h:f;if((0,o.pC)(a.values)){const e=a.values.filter((e=>{if(Array.isArray(e)){if(d===p)return e[0]<=d&&e[1]>=d;const t=e[0]<=d&&e[1]>d||e[0]<p&&e[1]>=p,r=e[0]>=d&&e[1]<=p||e[0]<d&&e[1]>p;return t||r}return d===p?e===d:e>=d&&e<=p}));if(e.length){const t=e.sort(((e,t)=>{var r,n,i,s;return d===p?(null!=(i=e[0])?i:e)-(null!=(s=t[0])?s:t):Math.abs((null!=(r=e[1])?r:e)-p)-Math.abs((null!=(n=t[1])?n:t)-p)}))[0];l.values=[t]}else r=null}else if(a.hasRegularIntervals&&a.extent){const[e,t]=a.extent;d>t||p<e?r=null:l.values=d===p?[d]:[Math.max(e,d),Math.min(t,p)]}}return{...e,multidimensionalDefinition:r}}async updateRenderer(){if(!this.loaded)return;if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(this.renderer))return;const e=this._rasterJobHandler.instance;e&&(this.symbolizer.rendererJSON=(0,T.ol)(this.renderer.toJSON()),this.symbolizer.bind(),await e.updateSymbolizer(this.symbolizer),this._cachedRendererJson=this.renderer.toJSON())}async applyRenderer(e,t){const r=e&&e.pixelBlock;if(!((0,o.pC)(r)&&r.pixels&&r.pixels.length>0))return null;let n;await this.updateRenderer();const i=this._rasterJobHandler.instance,{bandIds:s}=this;return n=i?await i.symbolize({...e,simpleStretchParams:t,bandIds:s}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:s}),n}getTileUrl(e,t,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${r}`:""}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||(0,o.Wi)(t))return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const n=(0,b.C5)(e);return S.Z.create({size:256,spatialReference:e,origin:n?{x:n.origin[0],y:n.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,r,n={}){if(n.requestAsImageElement){const i=this.getTileUrl(e,t,r);return(0,x.default)(i,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:n.signal}).then((e=>e.data))}if((0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(n=this.normalizeRasterFetchOptions(n),(0,o.Wi)(n.multidimensionalDefinition))){const i=n.tileInfo||this.rasterInfo.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,r,i),pixelBlock:null}}return await this._initJobHandler(),"raster-shaded-relief"===this.renderer.type&&(n={...n,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,r,n)}async fetchPixels(e,t,r,n={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(n=this.normalizeRasterFetchOptions(n),(0,o.Wi)(n.multidimensionalDefinition))?{extent:e,pixelBlock:null}:(await this._initJobHandler(),this.raster.fetchPixels(e,t,r,n))}async identify(e,t={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(t=this.normalizeRasterFetchOptions(t),(0,o.Wi)(t.multidimensionalDefinition))?{location:e,value:null}:this.raster.identify(e,t)}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){var e;const t=this.rasterInfo.multidimensionalInfo;if(!(0,o.pC)(t)||"standard-time"!==this.rasterInfo.dataType)return!1;const r=null==(e=this.multidimensionalDefinition[0])?void 0:e.variableName;return t.variables.some((e=>e.name===r&&e.dimensions.some((e=>"StdTime"===e.name))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=this._getDefaultSlice()),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new R.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,this.renderer&&this.updateRenderer()})).catch((()=>null)),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this.raster.rasterJobHandler=null}_configDefaultInterpolation(){if(null==this.interpolation){var e;const t=(0,T.In)(this.rasterInfo,this.raster.tileType,null==(e=this.sourceJSON)?void 0:e.defaultResamplingMethod);this._set("interpolation",t)}}_getDefaultSlice(){const{multidimensionalInfo:e}=this.raster.rasterInfo;if(!(0,o.pC)(e))return null;const t=e.variables[0];return t.dimensions.map((e=>{var r,n;return new C.Z({variableName:t.name,dimensionName:e.name,values:[null!=(r=null==(n=e.values)?void 0:n[0])?r:e.extent[0]],isSlice:!0})}))}_configDefaultRenderer(){const e=this.raster.rasterInfo;var t;this.bandIds||(this.bandIds=(0,T.YD)(e)),this.renderer||(this.renderer=(0,T.Ob)(e,{bandIds:this.bandIds,variableName:(0,o.pC)(this.multidimensionalDefinition)?null==(t=this.multidimensionalDefinition[0])?void 0:t.variableName:null})),this.symbolizer?(this.symbolizer.rendererJSON=(0,T.ol)(this.renderer.toJSON()),this.symbolizer.rasterInfo=e):this.symbolizer=new M.Z({rendererJSON:this.renderer.toJSON(),rasterInfo:e});const r=this.symbolizer.bind();r.success||E.warn("imagery-tile-mixin",r.error||"The given renderer is not supported by the layer.")}};return(0,n._)([(0,u.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"bandIds",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"copyright",void 0),(0,n._)([(0,u.Cb)({type:O.Z}),(0,v.B)("rasterInfo.extent")],t.prototype,"fullExtent",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"interpolation",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"ioConfig",void 0),(0,n._)([(0,u.Cb)({type:[C.Z]})],t.prototype,"multidimensionalDefinition",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,n._)([(0,u.Cb)({readOnly:!0}),(0,v.B)("raster.rasterInfo")],t.prototype,"rasterInfo",void 0),(0,n._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,n._)([(0,u.Cb)({type:F.Z}),(0,v.B)("rasterInfo.spatialReference")],t.prototype,"spatialReference",void 0),(0,n._)([(0,u.Cb)({type:S.Z}),(0,v.B)("rasterInfo.storageInfo.tileInfo")],t.prototype,"tileInfo",void 0),(0,n._)([(0,u.Cb)(_.HQ)],t.prototype,"url",null),(0,n._)([(0,u.Cb)({types:s.dr})],t.prototype,"renderer",null),(0,n._)([(0,u.Cb)()],t.prototype,"symbolizer",void 0),t=(0,n._)([(0,p.j)("esri.layers.ImageryTileMixin")],t),t};var N=r(38009),B=r(16859),D=r(34760),z=r(72965),A=r(28294),H=r(1231),L=r(69608),W=r(30547),J=r(48526),j=r(36679),q=r(96674),U=r(609),G=r(73506),$=r(13473);const V=new Map,Y=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const r=e+"/"+t,n=this._cachedBlocks;if(n.has(r)){const e=n.get(r);return e.refCount--,e.refCount<=0&&(n.delete(r),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const r=e+"/"+t,n=this._cachedBlocks;if(n.has(r)){const e=n.get(r);return e.ts=Date.now(),e.refCount++,n.delete(r),n.set(r,e),e.block}return null}putBlock(e,t,r,n=null){const i=this._cachedBlocks,s=e+"/"+t;if(i.has(s)){const e=i.get(s);e.ts=Date.now(),e.refCount++}else i.set(s,{block:r,ts:Date.now(),refCount:1,controller:n});this._trim(),this._updateTimer()}deleteBlock(e,t){const r=this._cachedBlocks,n=e+"/"+t;r.has(n)&&r.delete(n)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),r=Date.now();for(let n=0;n<t.length&&t[n][1].ts<=r-this._duration;n++)e.delete(t[n][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let r=0;r<t.length-this._size;r++)e.delete(t[r][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function X(e,t){return null==t?e:`${e}?sliceId=${t}`}function K(e,t,r){if(!V.has(e))return null==t?Y.decreaseRefCount(e,r):0;const n=V.get(e);if(null==n[t])return Y.decreaseRefCount(e,r);const i=n[t].cache;if(i.has(r)){const e=i.get(r);if(e.refCount--,0===e.refCount){i.delete(r);for(let e=0;e<n.length;e++)n[e]&&n[e].cache.has(r)&&n[e].cache.delete(r);e.controller&&e.controller.abort()}return e.refCount}return 0}function Q(e,t,r){if(!V.has(e))return null==t?Y.getBlock(e,r):null;const n=V.get(e);if(null==n[t]){for(let e=0;e<n.length;e++)if(n[e]&&n[e].cache.has(r)){const t=n[e].cache.get(r);return t.refCount++,t.block}return Y.getBlock(e,r)}const i=n[t].cache;if(i.has(r)){const e=i.get(r);return e.refCount++,e.block}for(let e=0;e<n.length;e++)if(e!==t&&n[e]&&n[e]&&n[e].cache.has(r)){const t=n[e].cache.get(r);return t.refCount++,i.set(r,t),t.block}return null}function ee(e,t,r,n,i=null){if(!V.has(e))return void(null==t&&Y.putBlock(e,r,n,i));const s=V.get(e);if(null==s[t])return void Y.putBlock(e,r,n,i);const a={refCount:1,block:n,isResolved:!1,isRejected:!1,controller:i};n.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),s[t].cache.set(r,a)}function te(e,t,r){if(!V.has(e))return void(null==t&&Y.deleteBlock(e,r));const n=V.get(e);null!=n[t]?n[t].cache.delete(r):Y.deleteBlock(e,r)}var re=r(75993),ne=r(55914);let ie=class extends((0,U.v)(q.wq)){constructor(){super(...arguments),this.rasterJobHandler=null,this.datasetName=null,this.datasetFormat=null,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,G.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:S.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,G.ut)(e.spatialReference);return(0,o.pC)(t)&&e.extent.width>=t/2}set url(e){this._set("url",(0,I.Nm)(e,w.Z.getLogger(this.declaredClass)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,r,n={}){const i=n.tileInfo||this.rasterInfo.storageInfo.tileInfo,s=this.getTileExtentFromTileInfo(e,t,r,i);return this.fetchPixels(s,i.size[0],i.size[1],n)}async identify(e,t={}){t=this._getRequestOptionsWithSliceId(t);const{spatialReference:r,extent:n}=this.rasterInfo,{datumTransformation:i}=t;let s=(0,G.nF)(e,r,i);if(!n.intersects(s))return{location:s,value:null};if((0,o.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(s);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};s=e}let a=0;if(t.srcResolution)a=(0,G.kr)(t.srcResolution,this.rasterInfo,this.ioConfig.sampling).pyramidLevel;else if(a=await this.computeBestPyramidLevelForLocation(e,t),null==a)return{location:s,value:null};const l=this.identifyPixelLocation(s,a,null);if(null===l)return{location:s,value:null};const{row:c,col:u,rowOffset:f,colOffset:h}=l,d=X(this.url,t.sliceId),p=`${a}/${c}/${u}`;let m=Q(d,null,p);(0,o.Wi)(m)&&(m=this.fetchRawTile(a,c,u,t),ee(d,null,p,m));const y=await m;if((0,o.Wi)(y)||!y.pixels||0===y.pixels.length)return{location:s,value:null};const g=f*this.rasterInfo.storageInfo.blockHeight+h,x=!y.mask||y.mask[g]?y.pixels.map((e=>e[g])):null,w=this.rasterInfo.dataType;return("vector-magdir"===w||"vector-uv"===w)&&(null==x?void 0:x.length)>1?{location:s,value:x,magdirValue:"vector-magdir"===w?[x[0],x[1]]:(0,k.Tg)([x[0],x[1]]),pyramidLevel:a}:{location:s,value:x,pyramidLevel:a}}async fetchPixels(e,t,r,n={}){if(e=(0,G.kZ)(e),(n=this._getRequestOptionsWithSliceId(n)).requestRawData)return this._fetchPixels(e,t,r,n);const i=(0,G.ut)(e.spatialReference),s=(0,G.Hq)(e);if((0,o.Wi)(i)||0===s||1===s&&this._isGlobalWrappableSource)return this._fetchPixels(e,t,r,n);if(s>=3)return{extent:e,pixelBlock:null};const a=[],{xmin:l,xmax:c}=e,u=Math.round(i/(c-l)*t),f=u-Math.round((i/2-l)/(c-l)*t);let h=0;const d=[];for(let o=0;o<=s;o++){const p=new O.Z({xmin:0===o?l:-i/2,xmax:o===s?c-i*o:i/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),m=0===o?u-f:o===s?t-h:u;h+=m,d.push(m);const y=n.disableWrapAround&&o>0?null:this._fetchPixels(p,m,r,n);a.push(y)}const p=(await Promise.all(a)).map((e=>null==e?void 0:e.pixelBlock));let m=null;const y={width:t,height:r};return m=this.rasterJobHandler?await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:d},n):(0,ne.us)(p,y,{blockWidths:d}),{extent:e,srcExtent:(0,G.tB)(e,this.rasterInfo.spatialReference,n.datumTransformation),pixelBlock:m}}async fetchRawPixels(e,t,r,n={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const i=await this._fetchRawTiles(e,t,r,n),{nativeExtent:s,nativePixelSize:a,storageInfo:l}=this.rasterInfo,c=2**e,u=a.x*c,f=a.y*c,h=new O.Z({xmin:s.xmin+u*t.x,xmax:s.xmin+u*(t.x+r.width-1),ymin:s.ymax-f*(t.y+r.height-1),ymax:s.ymax-f*t.y,spatialReference:s.spatialReference});if(!i)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:d}=i;if(1===d.length&&(0,o.pC)(d[0])&&d[0].width===r.width&&d[0].height===r.height)return{extent:h,srcExtent:h,pixelBlock:i.pixelBlocks[0]};const p=e>0?l.pyramidBlockWidth:l.blockWidth,m=e>0?l.pyramidBlockHeight:l.blockHeight,y={width:Math.ceil(r.width/p)*p,height:Math.ceil(r.height/m)*m},g={x:t.x%p,y:t.y%m};let x;return x=this.rasterJobHandler?await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:r,destDimension:r,clipOffset:g,clipSize:r,coefs:null,sampleSpacing:null,interpolation:n.interpolation,alignmentInfo:null,blockWidths:null},n):(0,ne.us)(d,y,{clipOffset:g,clipSize:r}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,r,n){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,G.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,re.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,r){var n,i;const{customFetchParameters:s}=this.ioConfig,{range:a,query:o,headers:l}=t;r=null!=(n=null!=(i=r)?i:t.retryCount)?n:this.ioConfig.retryCount;const c=a?{Range:`bytes=${a.from}-${a.to}`}:null;try{return await(0,x.default)(e,{...t,query:{...o,...s},headers:{...l,...c}})}catch(n){if(r>0)return r--,this.request(e,t,r);throw n}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;if(!(0,o.pC)(t))return null;if(!(0,o.pC)(e)||0===e.length)return null;let r=0;const n=e[0].variableName;for(let i=0;i<t.variables.length;i++){const s=t.variables[i],a=s.dimensions;if(s.name!==n){r+=a.map((e=>this._getDimensionValuesCount(e))).reduce(((e,t)=>e+t));break}const o=a.map((e=>this._getDimensionValuesCount(e))),l=a.length;for(let t=0;t<l;t++){const n=e.filter((e=>e.dimensionName===a[t].name))[0];if(null==n)return null;const i=Array.isArray(n.values[0])?n.values[0][0]:n.values[0],s=this._getIndexFromDimensions(i,a[t]);if(-1===s)return null;o.shift(),r+=t===l-1?s:s*o.reduce(((e,t)=>e+t))}}return r}getTileExtentFromTileInfo(e,t,r,n){const i=n.lodAt(e);return this.getTileExtent({x:i.resolution,y:i.resolution},t,r,n.origin,n.spatialReference,n.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:r,pixelSize:n}=this.rasterInfo;if(!e.tileInfo){const i=[],s=e.maximumPyramidLevel||0;let a=Math.max(n.x,n.y),o=1/.0254*96*a;for(let e=0;e<=s;e++)i.push({level:s-e,resolution:a,scale:o}),a*=2,o*=2;const l=new $.Z({x:r.xmin,y:r.ymax,spatialReference:t});e.tileInfo=new S.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:i}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,r=512,n){const{width:i,height:s,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new $.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==n&&(n=Math.max(0,Math.round(Math.log(Math.max(i,s))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],n);e.storageInfo=new j.Z({blockWidth:t,blockHeight:r,pyramidBlockWidth:t,pyramidBlockHeight:r,origin:c,firstPyramidLevel:1,maximumPyramidLevel:n,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,r,n,i,s=0,a=2){if(1===i.length&&s>0){i=[...i];let{x:e,y:t}=i[0];for(let r=0;r<s;r++)e*=a,t*=a,i.push({x:e,y:t})}const o=[],{x:l,y:c}=n;for(let n=0;n<i.length;n++){const{x:s,y:a}=i[n];o.push({minCol:Math.floor((e.xmin-l+.1*s)/t/s),maxCol:Math.floor((e.xmax-l-.1*s)/t/s),minRow:Math.floor((c-e.ymax+.1*a)/r/a),maxRow:Math.floor((c-e.ymin-.1*a)/r/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo;if(0===e)return t;if((0,o.pC)(r)&&r.length)return r[e-1];const i=n**e;return{x:t.x*i,y:t.y*i}}identifyPixelLocation(e,t,r){const{spatialReference:n,nativeExtent:i}=this.rasterInfo,{blockWidth:s,blockHeight:a,maximumPyramidLevel:o,origin:l}=this.rasterInfo.storageInfo,c=(0,G.nF)(e,n,r);if(!i.intersects(c))return null;if(t<0||t>o)return null;const u=this.getPyramidPixelSize(t),{x:f,y:h}=u,d=(l.y-c.y)/h/a,p=(c.x-l.x)/f/s,m=Math.min(a-1,Math.floor((d-Math.floor(d))*a)),y=Math.min(s-1,Math.floor((p-Math.floor(p))*s));return{pyramidLevel:t,row:Math.floor(d),col:Math.floor(p),rowOffset:m,colOffset:y,srcLocation:c}}getTileExtent(e,t,r,n,i,s){const[a,o]=s,l=n.x+r*a*e.x,c=l+a*e.x,u=n.y-t*o*e.y,f=u-o*e.y;return new O.Z({xmin:l,xmax:c,ymin:f,ymax:u,spatialReference:i})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,r){const n=this.rasterInfo.storageInfo.blockBoundary[e];return!n||n.maxRow<t||n.maxCol<r||n.minRow>t||n.minCol>r}async _fetchPixels(e,t,r,n={}){let i=(0,G.Hq)(e);if(i>=2)return{extent:e,pixelBlock:null};const s=this._getSourceDataInfo(e,t,r,n),{pyramidLevel:a,pyramidResolution:l,srcResolution:c,srcExtent:u,srcWidth:f,srcHeight:h}=s;if(0===f||0===h)return{extent:e,srcExtent:u,pixelBlock:null};const d=(0,o.Wg)(this.rasterInfo.transform);"gcs-shift"===(null==d?void 0:d.type)&&(i=(0,G.Hq)(s.srcExtent,!0));const p=this.rasterInfo.storageInfo,m={x:Math.floor((u.xmin-p.origin.x)/l.x+.1),y:Math.floor((p.origin.y-u.ymax)/l.y+.1)},y=await this._fetchRawTiles(a,m,{width:f,height:h,wrapCount:i},n);if(!y)return{extent:e,srcExtent:u,pixelBlock:null};const g=a>0?p.pyramidBlockWidth:p.blockWidth,x=a>0?p.pyramidBlockHeight:p.blockHeight,w=g===f&&x===h&&m.x%g==0&&m.y%x==0,v=new $.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference}),b=!e.spatialReference.equals(this.rasterInfo.spatialReference),{datumTransformation:I}=n;if(!b&&w&&1===y.pixelBlocks.length&&g===t&&x===r&&c.x===v.x&&c.y===v.y)return{extent:e,srcExtent:u,pixelBlock:y.pixelBlocks[0]};const _=(0,o.pC)((0,G.ut)(e.spatialReference))&&(0,o.pC)((0,G.ut)(u.spatialReference)),C=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:v.toJSON(),datumTransformation:I,rasterTransform:d,hasWrapAround:i>0||_,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy},n):(0,G.Qp)({projectedExtent:e,srcBufferExtent:y.extent,pixelSize:v,datumTransformation:I,rasterTransform:d,hasWrapAround:i>0||_,isAdaptive:!1});let R;const S=!n.requestRawData,k={rows:C.spacing[0],cols:C.spacing[1]},T=(0,o.Wg)(this._getRasterTileAlignmentInfo(a,y.extent.xmin)),{pixelBlocks:M,mosaicSize:P,isPartiallyFilled:O}=y;if(this.rasterJobHandler)R=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:M,srcMosaicSize:P,destDimension:S?{width:t,height:r}:null,coefs:S?C.coefficients:null,sampleSpacing:S?k:null,interpolation:n.interpolation,alignmentInfo:T,blockWidths:null},n);else{const e=(0,ne.us)(M,P,{alignmentInfo:T});R=S?(0,ne.Uk)(e,{width:t,height:r},C.coefficients,k,n.interpolation):e}return n.requestRawData?{srcExtent:u,pixelBlock:R,transformGrid:C,extent:e,isPartiallyFilled:O}:{srcExtent:u,extent:e,pixelBlock:R}}async _fetchRawTiles(e,t,r,n){const{origin:i,blockBoundary:s}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:l}=this.getBlockWidthHeight(e);let{x:c,y:u}=t,{width:f,height:h,wrapCount:d}=r;const p=this._getRasterTileAlignmentInfo(e,0);n.buffer&&(c-=n.buffer.cols,u-=n.buffer.rows,f+=2*n.buffer.cols,h+=2*n.buffer.rows);let m=0,y=0,g=0;d&&(0,o.pC)(p)&&(({worldColumnCountFromOrigin:y,originColumnOffset:g,rightPadding:m}=p),y*p.blockWidth-m>=c+f&&(m=0));const x=Math.floor(c/a),w=Math.floor(u/l),v=Math.floor((c+f+m-1)/a),b=Math.floor((u+h+m-1)/l),I=s[e];if(!I)return null;const{minRow:_,minCol:C,maxCol:R,maxRow:S}=I;if(0===d&&(b<_||v<C||w>S||x>R))return null;const k=new Array;let T=!1;const M=null==this.ioConfig.allowPartialFill?n.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=b;t++)for(let r=x;r<=v;r++){let i=r;if(!n.disableWrapAround&&d&&(0,o.pC)(p)&&y<=r&&(i=r-y-g),t>=_&&i>=C&&S>=t&&R>=i){const r=this._fetchRawTile(e,t,i,n);M?k.push(new Promise((e=>{r.then((t=>e(t))).catch((()=>{T=!0,e(null)}))}))):k.push(r)}else k.push(null)}if(0===k.length)return null;const P=await Promise.all(k),F={height:(b-w+1)*l,width:(v-x+1)*a},{spatialReference:E}=this.rasterInfo,Z=this.getPyramidPixelSize(e),{x:N,y:B}=Z;return{extent:new O.Z({xmin:i.x+x*a*N,xmax:i.x+(v+1)*a*N,ymin:i.y-(b+1)*l*B,ymax:i.y-w*l*B,spatialReference:E}),pixelBlocks:P,mosaicSize:F,isPartiallyFilled:T}}_fetchRawTile(e,t,r,n){const i=this.rasterInfo.storageInfo.blockBoundary[e];if(!i)return Promise.resolve(null);const{minRow:s,minCol:a,maxCol:l,maxRow:u}=i;if(t<s||r<a||t>u||r>l)return Promise.resolve(null);const f=X(this.url,n.sliceId),h=`${e}/${t}/${r}`;let d=Q(f,n.registryId,h);if((0,o.Wi)(d)){const i=new AbortController;d=this.fetchRawTile(e,t,r,{...n,signal:i.signal}),ee(f,n.registryId,h,d,i),d.catch((()=>te(f,n.registryId,h)))}return n.signal&&(0,c.fu)(n,(()=>{K(f,n.registryId,h)})),d}_getIndexFromDimensions(e,t){const{extent:r,interval:n,unit:i,values:s}=t;if(null!=s&&s.length)return Array.isArray(s[0])?s.findIndex((t=>t[0]<=e&&t[1]>=e)):s.indexOf(e);if(e>r[1])return-1;const a=r[0];let o=-1;if("ISO8601"===i){var l;switch((null==(l=t.intervalUnit)?void 0:l.toLowerCase())||"seconds"){case"seconds":o=Math.round((e-a)/1e3/n);break;case"minutes":o=Math.round((e-a)/6e4/n);break;case"hours":o=Math.round((e-a)/36e5/n);break;case"days":o=Math.round((e-a)/864e5/n);break;case"years":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/n);break;case"decades":o=Math.round((new Date(e).getUTCFullYear()-new Date(a).getUTCFullYear())/10/n)}return o}return Math.round((e-a)/n)}_getDimensionValuesCount(e){const{extent:t,interval:r,unit:n,values:i}=e;let s=(null==i?void 0:i.length)||0;if(s)return s;const a=t[0];if(0===s&&"ISO8601"===n){var o;switch((null==(o=e.intervalUnit)?void 0:o.toLowerCase())||"seconds"){case"seconds":s=Math.round((t[1]-t[0])/1e3/r);break;case"minutes":s=Math.round((t[1]-t[0])/6e4/r);break;case"hours":s=Math.round((t[1]-t[0])/36e5/r);break;case"days":s=Math.round((t[1]-t[0])/864e5/r);break;case"years":s=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/r);break;case"decades":s=Math.round((new Date(t[1]).getUTCFullYear()-new Date(a).getUTCFullYear())/10/r)}return s}return Math.round((t[1]-t[0])/r)}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,G.P_)(this.rasterInfo)),(0,o.pC)(this._rasterTileAlighmentInfo.pyramidsInfo)?{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}:null}_getSourceDataInfo(e,t,r,n={}){const i={datumTransformation:n.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0};n.srcResolution&&(i.srcResolution=n.srcResolution,this._updateSourceDataInfo(e,i));const s=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=i,c=a/t,u=o/r,f=l<s&&c*u>=16;if(f||l===s&&(c>8||u>8)||0===a||0===o){const a=new $.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference});let o=(0,G.VO)(a,this.rasterInfo.spatialReference,e,i.datumTransformation);const h=!o||n.srcResolution&&o.x+o.y<n.srcResolution.x+n.srcResolution.y;if(f&&n.srcResolution&&h){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(s-l+3>=e){const t=2**e;o={x:n.srcResolution.x*t,y:n.srcResolution.y*t}}}o&&(i.srcResolution=o,this._updateSourceDataInfo(e,i))}return(i.srcWidth/t>8||i.srcHeight/r>8)&&(i.srcWidth=0,i.srcHeight=0),i}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const r=this.rasterInfo.spatialReference,{srcResolution:n,datumTransformation:i}=t,{pyramidLevel:s,pyramidResolution:a,excessiveReading:l}=(0,G.kr)(n,this.rasterInfo,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,G.tB)(e,r,i);if(null==c)return;const u=(0,o.Wg)(this.rasterInfo.transform);u&&(c=u.inverseTransform(c)),t.srcExtent=c;const f=Math.ceil((c.xmax-c.xmin)/a.x-.1),h=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=s,t.pyramidResolution=a,t.srcWidth=f,t.srcHeight=h}_getRequestOptionsWithSliceId(e){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}};(0,n._)([(0,u.Cb)()],ie.prototype,"_rasterTileAlighmentInfo",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],ie.prototype,"_isGlobalWrappableSource",null),(0,n._)([(0,u.Cb)(_.HQ)],ie.prototype,"url",null),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],ie.prototype,"datasetName",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,n._)([(0,u.Cb)()],ie.prototype,"rasterInfo",void 0),(0,n._)([(0,u.Cb)()],ie.prototype,"ioConfig",void 0),(0,n._)([(0,u.Cb)()],ie.prototype,"sourceJSON",void 0),ie=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.BaseRaster")],ie);const se=ie;var ae=r(20095);function oe(e){const t=e.fields,r=e.records,n=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",i=[{name:n,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),s=i.map((e=>e.name)),a=[];let o=0,l=0;return r.forEach((e=>{const t={};for(t[n]=o++,l=1;l<s.length;l++)t[s[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:i,features:a}}var le=r(87521),ce=r(74889);const ue=new Map;ue.set("int16","esriFieldTypeSmallInteger"),ue.set("int32","esriFieldTypeInteger"),ue.set("int64","esriFieldTypeInteger"),ue.set("float32","esriFieldTypeSingle"),ue.set("float64","esriFieldTypeDouble"),ue.set("text","esriFieldTypeString");let fe=class extends se{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:null==e?void 0:e.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:r,rasterInfo:n}=this._parseHeader(t);if("thematic"===n.dataType){const e=await this._fetchAuxiliaryInformation();n.attributeTable=e}this._set("storageInfo",r),this._set("rasterInfo",n),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,r,n={}){const i=this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(i<0)return null;const s=this._buildCacheFilePath(i,t,r,n.multidimensionalDefinition),a=this._getIndexRecordFromBundle(t,r),o=await this.request(s,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:n.signal});if(!o)return null;const l=new Uint8Array(o.data),c=this._getTileEndAndContentType(l,a);if(0===c.recordSize)return null;const u=await this.request(s,{range:{from:c.position,to:c.position+c.recordSize},responseType:"array-buffer",signal:n.signal});return u?this.decodePixelBlock(u.data,{width:this.rasterInfo.storageInfo.tileInfo.size[0],height:this.rasterInfo.storageInfo.tileInfo.size[1],planes:null,pixelType:null}):null}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){var t,r;const n=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:i,histograms:s,colormap:a,blockWidth:o,blockHeight:l,firstPyramidLevel:c,maximumPyramidLevel:u}=e,f=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),h=e.extent.spatialReference,d=null==(t=e.geodataXform)?void 0:t.spatialReference,p=new F.Z(null!=h&&h.wkid||null!=h&&h.wkt?h:d);let m=new O.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:p});const y=new $.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:p}),g=Math.round((m.xmax-m.xmin)/y.x),x=Math.round((m.ymax-m.ymin)/y.y),w=this._parseTransform(e.geodataXform),v=w?m:null;w&&(m=w.forwardTransform(m),y.x=(m.xmax-m.xmin)/g,y.y=(m.ymax-m.ymin)/x);const b=null!=(r=e.properties)?r:{},I=e.format.toLowerCase().replace("cache/",""),_=new $.Z(e.origin.x,e.origin.y,p);let C,R,k,T;if(a&&a.colors)for(C=[],R=0;R<a.colors.length;R++)k=a.colors[R],T=a.values?a.values[R]:R,C.push([T,255&k,k<<16>>>24,k<<8>>>24,k>>>24]);const M=e.LODInfos,P=[];for(R=0;R<M.levels.length;R++)P.push({level:M.levels[R],resolution:M.resolutions[R],scale:96/.0254*M.resolutions[R]});const E=new S.Z({dpi:96,lods:P,format:I,origin:_,size:[o,l],spatialReference:p}),Z={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},N=[{maxCol:Math.ceil(g/o)-1,maxRow:Math.ceil(x/l)-1,minCol:0,minRow:0}];let B=2;if(u>0)for(R=0;R<u;R++)N.push({maxCol:Math.ceil(g/B/o)-1,maxRow:Math.ceil(x/B/l)-1,minCol:0,minRow:0}),B*=2;const D=e.mdInfo;return{storageInfo:Z,rasterInfo:new J.Z({width:g,height:x,pixelType:n,bandCount:i,extent:m,nativeExtent:v,transform:w,spatialReference:p,pixelSize:y,keyProperties:b,statistics:f,histograms:s,multidimensionalInfo:D,colormap:C,storageInfo:new j.Z({blockWidth:o,blockHeight:l,pyramidBlockWidth:o,pyramidBlockHeight:l,origin:_,tileInfo:E,firstPyramidLevel:c,maximumPyramidLevel:u,blockBoundary:N})})}}_parseTransform(e){var t,r;if(!(0,le.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const n=(0,le.c)(e);if("identity"===n.type)return null;if("polynomial"!==n.type||null==(t=n.forwardCoefficients)||!t.length||null==(r=n.inverseCoefficients)||!r.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return n}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),r=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),n=await Promise.all([t,r]);let i;if(n[0]){let e=n[0].fields;const t=n[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":ue.get(e.type),name:e.name,alias:e.alias||e.name})));const r=t.map((e=>({attributes:e})));e&&t&&(i={fields:e,features:r})}}return!i&&n[1]&&(i=class{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),r=3&t.getUint8(0);if(3!==r)return{header:{version:r},recordSet:null};const n=t.getUint32(4,!0),i=t.getUint16(8,!0),s=t.getUint16(10,!0),a={version:r,recordCount:n,headerByteCount:i,recordByteCount:s};let o=32;const l=[],c=[];let u;if(3===r){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,ae.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<n&&e.byteLength-o>s;){const r=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)r.push((0,ae.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)r.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)r.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const n=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();r.push(new Date(parseInt(n.substring(0,4),10),parseInt(n.substring(4,6),10)-1,parseInt(n.substring(6,8),10)))}o+=t.length})),c.push(r)):o+=s}}return{header:a,fields:l,records:c,recordSet:oe({fields:l,records:c})}}}.parse(n[1]).recordSet),ce.default.fromJSON(i)}_buildCacheFilePath(e,t,r,n){const i=this.storageInfo.packetSize,s=Math.floor(t/i)*i,a=Math.floor(r/i)*i,l="R"+this._toHexString4(s)+"C"+this._toHexString4(a);let c="L";c+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:u}=this.rasterInfo,f=null==n?void 0:n[0];if(!(0,o.pC)(u)||!f)return`${this.url}/_alllayers/${c}/${l}.bundle`;let h=u.variables.filter((e=>e.name===f.variableName))[0].dimensions[0].values.indexOf(f.values[0]).toString(16);const d=4-h.length;for(let e=0;e<d;e++)h="0"+h;return h="S"+h,`${this.url}/_alllayers/${f.variableName}/${h}/${c}/${l}.bundle`}_getIndexRecordFromBundle(e,t){const r=this.storageInfo.packetSize,n=r*(e%r)+t%r;if(n<0)throw"Invalid level / row / col";return 20+n*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const r=e.subarray(t,t+8);let n,i=0;for(n=0;n<5;n++)i|=(255&r[n])<<8*n;const s=0xffffffffff&i;for(i=0,n=5;n<8;n++)i|=(255&r[n])<<8*(n-5);return{position:s,recordSize:0xffffffffff&i}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,n._)([(0,u.Cb)({readOnly:!0})],fe.prototype,"storageInfo",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],fe.prototype,"datasetFormat",void 0),fe=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.CloudRaster")],fe);const he=fe;let de=class extends se{constructor(){super(...arguments),this.datasetFormat="MEMORY"}async open(e){var t;await this.init();const{pixelBlock:r,statistics:n,histograms:i,name:s,keyProperties:a,nativeExtent:o,transform:l}=this.data,{width:c,height:u,pixelType:f}=r,h=this.data.extent||new O.Z({xmin:-.5,ymin:.5,xmax:c-.5,ymax:u-.5,spatialReference:new F.Z({wkid:3857})}),d=null!=(t=this.data.isPseudoSpatialReference)?t:!this.data.extent,p={x:h.width/c,y:h.height/u},m=new J.Z({width:c,height:u,pixelType:f,extent:h,nativeExtent:o,transform:l,pixelSize:p,spatialReference:h.spatialReference,bandCount:3,keyProperties:a||{},statistics:n,isPseudoSpatialReference:d,histograms:i});this.createRemoteDatasetStorageInfo(m,512,512),this._set("rasterInfo",m),this.updateTileInfo(),await this._buildInMemoryRaster(r,{width:512,height:512},e),this.datasetName=s,this.url="/InMemory/"+s}fetchRawTile(e,t,r,n={}){const i=this._pixelBlockTiles.get(`${e}/${t}/${r}`);return Promise.resolve(i)}async _buildInMemoryRaster(e,t,r){const n=this.rasterInfo.storageInfo.maximumPyramidLevel,i=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:n},r):Promise.resolve((0,ne.Vl)(e,t,n)),s=(0,o.pC)(this.rasterInfo.statistics),l=(0,o.pC)(this.rasterInfo.histograms),u=s&&l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},r):Promise.resolve((0,ne.Hv)(e)),f=await(0,c.as)([i,u]);if(!f[0].value&&f[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");var h,d;this._pixelBlockTiles=f[0].value,s||(this.rasterInfo.statistics=null==(h=f[1].value)?void 0:h.statistics),l&&(this.rasterInfo.histograms=null==(d=f[1].value)?void 0:d.histograms)}};(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],de.prototype,"datasetFormat",void 0),(0,n._)([(0,u.Cb)()],de.prototype,"data",void 0),de=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],de);const pe=de;function me(e,t){if(!e||!t)return[];let r=t;t.indexOf("/")>-1?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=[];if(t){const i=me(e,r);for(let e=0;e<i.length;e++)me(i[e],t).forEach((e=>n.push(e)));return n}const i=e.getElementsByTagNameNS("*",r);if(!i||0===i.length)return[];for(let e=0;e<i.length;e++)n.push(i[e]||i.item[e]);return n}function ye(e,t){if(!e||!t)return null;let r=t;t.indexOf("/")>-1?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=me(e,r);return n.length>0?t?ye(n[0],t):n[0]:null}function ge(e,t=null){const r=t?ye(e,t):e;let n;return r?(n=r.textContent||r.nodeValue,n?n.trim():null):null}function xe(e,t){return function(e,t){const r=me(e,t),n=[];let i;for(let e=0;e<r.length;e++)i=r[e].textContent||r[e].nodeValue,i&&(i=i.trim(),""!==i&&n.push(i));return n}(e,t).map((e=>Number(e)))}function we(e,t){const r=ge(e,t);return Number(r)}function ve(e,t){var r;const n=null==e||null==(r=e.nodeName)?void 0:r.toLowerCase(),i=t.toLowerCase();return n.slice(n.lastIndexOf(":")+1)===i}var be=r(87390);function Ie(e,t){if(!e||!t)return null;const r=[];for(let n=0;n<e.length;n++)r.push(e[n]),r.push(t[n]);return r}function _e(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new F.Z({wkid:t});if((e=String(e)).startsWith("COMPD_CS")){if(!e.includes("VERTCS")||!e.includes("GEOGCS")&&!e.startsWith("PROJCS"))return null;const r=e.indexOf("VERTCS"),n=e.indexOf("PROJCS"),i=n>-1?n:e.indexOf("GEOGCS");if(-1===i)return null;const s=e.slice(i,e.lastIndexOf("]",r)+1).trim(),a=e.slice(r,e.lastIndexOf("]")).trim();t=Ce(s);const o=new F.Z(t?{wkid:t}:{wkt:s}),l=Ce(a);return l&&(o.vcsWkid=l),o}return e.startsWith("GEOGCS")||e.startsWith("PROJCS")?(t=Ce(e),new F.Z(0!==t?{wkid:t}:{wkt:e})):null}function Ce(e){var t;const r=e.replace(/\]/g,"[").replace(/\"/g,"").split("[").map((e=>e.trim())).filter((e=>""!==e)),n=r[r.length-1].split(","),i=null==(t=n[0])?void 0:t.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(n[1]);if(!isNaN(e)&&0!==e)return e}return 0}function Re(e){var t;if("pamdataset"!==(null==e||null==(t=e.documentElement.tagName)?void 0:t.toLowerCase()))return{};const r={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(ve(e,"SRS")){if(!r.spatialReference){const t=ge(e);r.spatialReference=_e(t)}}else if(ve(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:t,transform:n}=function(e){var t;const r=ye(e,"GeodataXform"),n=_e(we(r,"SpatialReference/WKID")||ge(r,"SpatialReference/WKT"));if("typens:PolynomialXform"!==r.getAttribute("xsi:type"))return{spatialReference:n,transform:null};const i=null!=(t=we(r,"PolynomialOrder"))?t:1,s=xe(r,"CoeffX/Double"),a=xe(r,"CoeffY/Double"),o=xe(r,"InverseCoeffX/Double"),l=xe(r,"InverseCoeffY/Double"),c=Ie(s,a),u=Ie(o,l);return{spatialReference:n,transform:new be.Z({spatialReference:n,polynomialOrder:i,forwardCoefficients:c,inverseCoefficients:u})}}(e);r.transform=n,r.spatialReference||(r.spatialReference=t)}else me(e,"MDI").forEach((e=>r.metadata[e.getAttribute("key")]=ge(e)));else if(ve(e,"PAMRasterBand")){const t=function(e){var t;const r=we(e,"NoDataValue"),n=ye(e,"Histograms/HistItem"),i=we(n,"HistMin"),s=we(n,"HistMax"),a=we(n,"BucketCount"),o=null==(t=ge(n,"HistCounts"))?void 0:t.split("|").map((e=>Number(e)));let l,c,u,f;me(e,"Metadata/MDI").forEach((e=>{var t;const r=Number(null!=(t=e.textContent)?t:e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":l=r;break;case"STATISTICS_MAXIMUM":c=r;break;case"STATISTICS_MEAN":u=r;break;case"STATISTICS_STDDEV":f=r}}));const h=we(e,"Metadata/SourceBandIndex");return{noDataValue:r,histogram:null!=o&&o.length&&null!=l&&null!=c?{min:i,max:s,size:a||o.length,counts:o}:null,sourceBandIndex:h,statistics:null!=l&&null!=c?{min:l,max:c,avg:u,stddev:f}:null}}(e);null!=t.sourceBandIndex&&null==r.rasterBands[t.sourceBandIndex]?r.rasterBands[t.sourceBandIndex]=t:r.rasterBands.push(t)}}));const n=r.rasterBands;if(n){const e=!!n[0].statistics;r.statistics=e?n.map((e=>e.statistics)):null;const t=!!n[0].histogram;r.histograms=t?n.map((e=>e.histogram)):null}return r}let Se=class extends se{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:r,statistics:n,histograms:i,transform:s}=await this._fetchAuxiliaryData(e);const a=!r;a&&(r=new F.Z({wkid:3857})),null!=i&&i.length&&null==n&&(n=(0,ne.Oh)(i));const{width:o,height:l}=t;let c=new O.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:r});const u=s?s.forwardTransform(c):c;let f=!0;if(s){const e=s.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(s=null,c=u)}const h=new pe({data:{extent:u,nativeExtent:c,transform:s,pixelBlock:t,statistics:n,histograms:i,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await h.open(),this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}fetchRawTile(e,t,r,n={}){return this._inMemoryRaster.fetchRawTile(e,t,r,n)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:null==e?void 0:e.signal}),r=(0,re.y)(t).toUpperCase();if("JPG"!==r&&"PNG"!==r&&"GIF"!==r&&"BMP"!==r)throw new a.Z("image-aux-raster:open","the data is not a supported format");return this._set("datasetFormat",r),await this.decodePixelBlock(t,{format:"jpg",width:1,height:1,useCanvas:!0})}async _fetchAuxiliaryData(e){var t,r;const n=(0,o.Wg)(null==e?void 0:e.signal),i=null!=(t=this.ioConfig.skipExtensions)?t:[],s=i.indexOf("aux.xml")>-1?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:n}),a=this.datasetFormat,l="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,u=i.indexOf(l)>-1?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+l,{responseType:"text",signal:n}),f=await(0,c.as)([s,u]);if(null!=n&&n.aborted)throw(0,c.zE)();const h=Re(null==(r=f[0].value)?void 0:r.data);if(!h.transform){const e=f[1].value?f[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;h.transform=6===(null==e?void 0:e.length)?new be.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return h}};(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],Se.prototype,"datasetFormat",void 0),Se=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Se);const ke=Se;var Te=r(17452),Me=r(45322),Pe=r(56608),Oe=r(29680);let Fe=class extends se{constructor(){super(...arguments),this._levelOffset=0,this._slices=null,this._tilemapCache=null,this.datasetFormat="RasterTileServer"}async open(e){await this.init();const t=e&&e.signal,r=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});r.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const n=r.data;if(this.sourceJSON=n,!n)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!n.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=n.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].indexOf(n.tileInfo.format.toLowerCase())>-1?this.tileType="Map":"lerc"===n.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=n.name.slice(n.name.indexOf("/")+1);const i=await this._fetchRasterInfo({signal:t});if(!(0,o.pC)(i))throw new a.Z("image-server-raster:open","cannot initialize image service");{const e="Map"===this.tileType?(0,Me.d)(n.tileInfo,n):S.Z.fromJSON(n.tileInfo),{extent:t,pixelSize:r}=i,s=.5/i.width*r.x;let a,o;const l=e.lodAt(Math.max.apply(null,e.lods.map((e=>e.level))));"Map"!==this.tileType&&0!==n.maxScale&&("Raster"===this.tileType?(a=e.lods.filter((e=>e.resolution===r.x))[0],a||(a=e.lods[e.lods.length-1])):(a=e.lods.filter((e=>Math.abs(e.scale-n.maxScale)<s))[0],a||(a=e.lods.filter((e=>e.scale>n.maxScale)).sort(((e,t)=>e.scale>t.scale?1:-1))[0])),r.x=r.y=a.resolution,i.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),i.height=Math.ceil((t.ymax-t.ymin)/r.y-.1)),a||(a=l);const c=e.lodAt(Math.min.apply(null,e.lods.map((e=>e.level))));"Map"===this.tileType?this._levelOffset=e.lods[0].level:0!==n.minScale&&"Elevation"===this.tileType&&(o=e.lods.filter((e=>Math.abs(e.scale-n.minScale)<s))[0],this._levelOffset=o.level-c.level),o||(o=c);const u=Math.max(r.x,r.y);(Math.abs(r.x-r.y)>s||!e.lods.some((e=>Math.abs(e.resolution-u)<s)))&&(r.x=r.y=a.resolution,i.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),i.height=Math.ceil((t.ymax-t.ymin)/r.y-.1));const f=a.level-o.level,[h,d]=e.size,p=[];e.lods.forEach((e=>{e.level>=o.level&&e.level<=a.level&&p.push({x:e.resolution,y:e.resolution})})),p.sort(((e,t)=>e.x-t.x));const m=this.computeBlockBoundary(t,h,d,e.origin,p,f),y=p.length>1?p.slice(1):null;i.storageInfo=new j.Z({blockWidth:e.size[0],blockHeight:e.size[1],pyramidBlockWidth:e.size[0],pyramidBlockHeight:e.size[1],pyramidResolutions:y,compression:e.format,origin:e.origin,firstPyramidLevel:1,maximumPyramidLevel:f,tileInfo:e,blockBoundary:m}),this._fixGCSShift(i),this._set("rasterInfo",i)}if(n.capabilities.toLowerCase().indexOf("tilemap")>-1){const e={tileInfo:i.storageInfo.tileInfo,parsedUrl:(0,Te.mN)(this.url),url:this.url,tileServers:[],type:"tile"};this._tilemapCache=new Pe.y({layer:e})}}async fetchRawTile(e,t,r,n={}){if(this._slices&&null==n.sliceId)return null;const{storageInfo:i,extent:s}=this.rasterInfo,a=i.maximumPyramidLevel-e+this._levelOffset,o=`${this.url}/tile/${a}/${t}/${r}`,l=this._slices?{sliceId:n.sliceId||0}:null,{data:c}=await this.request(o,{query:l,responseType:"array-buffer",signal:n.signal});if(!c)return null;const u=await this.decodePixelBlock(c,{width:i.tileInfo.size[0],height:i.tileInfo.size[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType}),f=i.blockBoundary[e];if("jpg"!==i.compression||r>f.minCol&&r<f.maxCol&&t>f.minRow&&t<f.maxRow)return u;const{origin:h,blockWidth:d,blockHeight:p}=i,{x:m,y}=this.getPyramidPixelSize(e),g=Math.round((s.xmin-h.x)/m)%d,x=Math.round((s.xmax-h.x)/m)%d,w=Math.round((h.y-s.ymax)/y)%p,v=Math.round((h.y-s.ymin)/y)%p,b=r===f.minCol?g:0,I=t===f.minRow?w:0,_=r===f.maxCol?x:d,C=t===f.maxRow?v:p;return(0,ne.pW)(u,{x:b,y:I},{width:_-b,height:C-I}),u}getSliceIndex(e){if(!this._slices||(0,o.Wi)(e)||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const r=this._slices[e].multidimensionalDefinition;if(r.length===t.length&&!r.some((e=>{const r=t.filter((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName))[0];return!r||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(r.values[0])?`${r.values[0][0]}-${r.values[0][1]}`:r.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const r=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.statistics})),n=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),i=await Promise.all([r,n]);return i[0]&&i[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:i[0]||null,histograms:i[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let r=this.identifyPixelLocation(e,0,(0,o.Wg)(t.datumTransformation));if(null===r)return null;let n=0;const{maximumPyramidLevel:i}=this.rasterInfo.storageInfo;let s=i-n+this._levelOffset;const a=r.srcLocation;for(;s>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(s,r.row,r.col,t))break}catch{}if(s--,n++,r=this.identifyPixelLocation(a,n,(0,o.Wg)(t.datumTransformation)),null===r)return null}return-1===s||null==r?null:n}async _fetchRasterInfo(e){const t=this.sourceJSON,r=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),n=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),i=F.Z.fromJSON(t.spatialReference||t.extent.spatialReference);if("Map"===this.tileType)return new J.Z({width:r,height:n,bandCount:3,extent:O.Z.fromJSON(t.extent),spatialReference:i,pixelSize:new $.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:i}),pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}});const{slice:s,signal:a}=e,o=!!t.hasRasterAttributeTable&&this.request(this.url+"/rasterAttributeTable",{query:{slice:s,f:"json"},signal:a}).then((e=>ce.default.fromJSON(e.data))).catch((()=>null)),l=!!t.hasColormap&&this.request(this.url+"/colormap",{query:{slice:s,f:"json"},signal:a}).then((e=>{var t;return null==(t=e.data)?void 0:t.colormap})),c=!!t.hasHistograms&&this.request(this.url+"/histograms",{query:{slice:s,f:"json"},signal:a}).then((e=>{var t;return null==(t=e.data)?void 0:t.histograms})),u=this.request(this.url+"/keyProperties",{query:{f:"json"},signal:a}).then((e=>e.data)).catch((()=>{})),f=!!t.hasMultidimensions&&this._fetchMultidimensionalInfo(),h=!!t.hasMultidimensions&&this.request(this.url+"/slices",{query:{f:"json"},signal:a}).then((e=>e.data&&e.data.slices)).catch((()=>{}));return Promise.all([o,l,c,u,f,h]).then((e=>{let s=null;if(t.minValues&&t.minValues.length===t.bandCount){s=[];for(let e=0;e<t.minValues.length;e++)s.push({min:t.minValues[e],max:t.maxValues[e],avg:t.meanValues[e],stddev:t.stdvValues[e]})}return this._slices=e[5]||null,new J.Z({width:r,height:n,bandCount:t.bandCount,extent:O.Z.fromJSON(t.extent),spatialReference:i,pixelSize:new $.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:i}),pixelType:t.pixelType.toLowerCase(),statistics:s,attributeTable:e[0]||null,colormap:e[1]||null,histograms:e[2]||null,keyProperties:e[3]||{},multidimensionalInfo:e[4]||null})}))}async _fetchMultidimensionalInfo(e){var t;const r=await this.request(this.url+"/multidimensionalInfo",{query:{f:"json"},signal:e}).then((e=>{var t;return null==(t=e.data)?void 0:t.multidimensionalInfo}));return null!=(t=r.variables)&&t.length&&r.variables.forEach((e=>{var t;null!=(t=e.statistics)&&t.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))})),r}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:r}=e;0===t.xmin&&360===t.xmax&&r.wkid&&r.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Oe.Z,e.extent=e.transform.forwardTransform(t))}};(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],Fe.prototype,"datasetFormat",void 0),(0,n._)([(0,u.Cb)()],Fe.prototype,"tileType",void 0),Fe=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],Fe);const Ee=Fe;var Ze=r(54163),Ne=r(48279);const Be=new Map;Be.set("Int8","s8"),Be.set("UInt8","u8"),Be.set("Int16","s16"),Be.set("UInt16","u16"),Be.set("Int32","s32"),Be.set("UInt32","u32"),Be.set("Float32","f32"),Be.set("Float64","f32"),Be.set("Double64","f32");const De=new Map;De.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),De.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),De.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),De.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let ze=class extends se{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){var t;await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const r=e?(0,o.Wg)(e.signal):null,n=await this.request(this.url,{responseType:"xml",signal:r}),{rasterInfo:i,files:s}=this._parseHeader(n.data);if(-1===(null==(t=this.ioConfig.skipExtensions)?void 0:t.indexOf("aux.xml"))){const t=await this._fetchAuxiliaryData(e);var a;null!=t&&(i.statistics=null!=(a=t.statistics)?a:i.statistics,i.histograms=t.histograms,t.histograms&&!(0,o.pC)(i.statistics)&&(i.statistics=(0,ne.Oh)(t.histograms)))}this._set("rasterInfo",i),this._files=s;const l=await this.request(s.index,{responseType:"array-buffer",signal:r});this._storageIndex=this._parseIndex(l.data);const{blockWidth:c,blockHeight:u}=this.rasterInfo.storageInfo,f=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:d}=this.rasterInfo,p=[],m=this._getBandSegmentCount();let y=0,g=-1;for(;y<this._storageIndex.length;){g++;const e=Math.ceil(h/c/f**g)-1,t=Math.ceil(d/u/f**g)-1;y+=(e+1)*(t+1)*m*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}async fetchRawTile(e,t,r,n={}){const{blockWidth:i,blockHeight:s,blockBoundary:a}=this.rasterInfo.storageInfo,l=a[e];if(!l||l.maxRow<t||l.maxCol<r||l.minRow>t||l.minCol>r)return null;const{bandCount:c,pixelType:u}=this.rasterInfo,{ranges:f,actualTileWidth:h,actualTileHeight:d}=this._getTileLocation(e,t,r);if(!f||0===f.length)return null;if(0===f[0].from&&0===f[0].to){const e=new Uint8Array(i*s);return new Ze.Z({width:i,height:s,pixels:null,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,m=this._getBandSegmentCount(),y=[];let g=0;for(g=0;g<m;g++)(!p||p.indexOf[g]>-1)&&y.push(this.request(this._files.data,{range:{from:f[g].from,to:f[g].to},responseType:"array-buffer",signal:n.signal}));const x=await Promise.all(y),w=x.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),v=new Uint8Array(w);let b=0;for(g=0;g<m;g++)v.set(new Uint8Array(x[g].data),b),b+=x[g].data.byteLength;const I=De.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(v.buffer,{width:i,height:s,format:I,planes:(null==p?void 0:p.length)||c,pixelType:u});if((0,o.pC)(this.rasterInfo.noDataValue)&&"lerc"!==I&&!_.mask){const e=this.rasterInfo.noDataValue[0];if(null!=e){const t=_.width*_.height,r=new Uint8Array(t);if(Math.abs(e)>1e24)for(g=0;g<t;g++)Math.abs((_.pixels[0][g]-e)/e)>1e-6&&(r[g]=1);else for(g=0;g<t;g++)_.pixels[0][g]!==e&&(r[g]=1);_.mask=r}}let C=0,R=0;if(h!==i||d!==s){let e=_.mask;if(e)for(g=0;g<s;g++)if(R=g*i,g<d)for(C=h;C<i;C++)e[R+C]=0;else for(C=0;C<i;C++)e[R+C]=0;else for(e=new Uint8Array(i*s),_.mask=e,g=0;g<d;g++)for(R=g*i,C=0;C<h;C++)e[R+C]=1}return _}_parseIndex(e){if(e.byteLength%16>0)throw"invalid array buffer must be multiples of 16";let t,r,n,i,s,a;if(Ne.f){for(r=new Uint8Array(e),i=new ArrayBuffer(e.byteLength),n=new Uint8Array(i),s=0;s<e.byteLength/4;s++)for(a=0;a<4;a++)n[4*s+a]=r[4*s+3-a];t=new Uint32Array(i)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return De.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,r){const{blockWidth:n,blockHeight:i,pyramidScalingFactor:s}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,d=0;for(f=0;f<e;f++)d=s**f,c=Math.ceil(a/n/d),u=Math.ceil(o/i/d),h+=c*u;d=s**e,c=Math.ceil(a/n/d),u=Math.ceil(o/i/d),h+=t*c+r,h*=4*l;const p=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=p[4*e+0]*2**32+p[4*e+1],y=m+p[4*e+2]*2**32+p[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:r<c-1?n:Math.ceil(a/d)-n*(c-1),actualTileHeight:t<u-1?i:Math.ceil(o/d)-i*(u-1)}}_parseHeader(e){const t=ye(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const r=ye(t,"Size"),n=parseInt(r.getAttribute("x"),10),i=parseInt(r.getAttribute("y"),10),s=parseInt(r.getAttribute("c"),10),o=(ge(t,"Compression")||"none").toLowerCase();if(!De.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=ge(t,"DataType")||"UInt8",c=Be.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=ye(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),d=ye(t,"DataValues");let p,m;if(d&&(m=d.getAttribute("NoData"),null!=m&&(p=m.trim().split(" ").map((e=>parseFloat(e))))),ye(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const y=ye(e,"MRF_META/GeoTags"),g=ye(y,"BoundingBox");let x,w=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),r=parseFloat(g.getAttribute("maxx")),n=parseFloat(g.getAttribute("maxy")),i=ge(y,"Projection")||"";let s;if("LOCAL_CS[]"!==i)if(i.toLowerCase().startsWith("epsg:")){const e=Number(i.slice(5));isNaN(e)||0===e||(s=new F.Z({wkid:e}))}else s=_e(i);else w=!0,s=new F.Z({wkid:3857});x=new O.Z(e,t,r,n),x.spatialReference=s}else w=!0,x=new O.Z({xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:new F.Z({wkid:3857})});const v=ye(e,"MRF_META/Rsets"),b=parseInt(v&&v.getAttribute("scale")||"2",10),I=x.spatialReference,_=new j.Z({origin:new $.Z({x:x.xmin,y:x.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),C=new $.Z({x:x.width/n,y:x.height/i,spatialReference:I}),R=new J.Z({width:n,height:i,extent:x,isPseudoSpatialReference:w,spatialReference:I,bandCount:s,pixelType:c,pixelSize:C,noDataValue:p,storageInfo:_}),S=ge(e,"datafile"),k=ge(e,"IndexFile");return{rasterInfo:R,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:S||this.url.replace(".mrf",De.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:null==e?void 0:e.signal});return Re(t)}catch{return null}}};(0,n._)([(0,u.Cb)()],ze.prototype,"_files",void 0),(0,n._)([(0,u.Cb)()],ze.prototype,"_storageIndex",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],ze.prototype,"datasetFormat",void 0),ze=(0,n._)([(0,p.j)("esri.layers.support.rasterIO.MRFRaster")],ze);const Ae=ze;var He=r(94793),Le=r(9832);const We=function(e,t){const r=e.get(t);return r&&r.values},Je=function(e,t){const r=e.get(t);return r&&r.values[0]};let je=class extends se{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){var t,r,n;await this.init();const i=e?(0,o.Wg)(e.signal):null,{data:s}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:i});if(!s)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{littleEndian:l,firstIFD:c,isBigTiff:u}=(0,He.cK)(s),f=[];await this._readIFDs(f,s,l,c,0,u?8:4,i);const h=(0,He.FI)(f),{width:d,height:p,tileWidth:m,tileHeight:y,planes:g,pixelType:x,compression:w,firstPyramidLevel:v,maximumPyramidLevel:b,pyramidBlockWidth:I,pyramidBlockHeight:_,tileBoundary:C,affine:R,metadata:S}=h;let k=_e((null==(t=h.extent.spatialReference)?void 0:t.wkt)||(null==(r=h.extent.spatialReference)?void 0:r.wkid)),T=!1;null==k&&(T=!0,k=new F.Z({wkid:3857}));const M=new O.Z({...h.extent,spatialReference:k}),P=new $.Z(M?{x:M.xmin,y:M.ymax,spatialReference:k}:{x:0,y:0}),E=new j.Z({blockWidth:m,blockHeight:y,pyramidBlockWidth:I,pyramidBlockHeight:_,compression:w,origin:P,firstPyramidLevel:v,maximumPyramidLevel:b,blockBoundary:C}),Z=new $.Z({x:(M.xmax-M.xmin)/d,y:(M.ymax-M.ymin)/p,spatialReference:k}),N=S?{BandProperties:S.bandProperties,DataType:S.dataType}:{},B=new J.Z({width:d,height:p,bandCount:g,pixelType:x,compression:w,pixelSize:Z,storageInfo:E,spatialReference:k,isPseudoSpatialReference:T,keyProperties:N,extent:M,statistics:S?S.statistics:null});if(null!=R&&R.length&&(B.nativeExtent=new O.Z({xmin:-.5,ymin:.5-p,xmax:d-.5,ymax:.5,spatialReference:k}),B.transform=new be.Z({polynomialOrder:1,forwardCoefficients:[R[2]+R[0]/2,R[5]-R[3]/2,R[0],R[3],-R[1],-R[4]]}),B.extent=B.transform.forwardTransform(B.nativeExtent),B.pixelSize=new $.Z({x:(M.xmax-M.xmin)/d,y:(M.ymax-M.ymin)/p,spatialReference:k}),E.origin.x=-.5,E.origin.y=.5),null==(n=this.ioConfig.skipExtensions)||!n.includes("aux.xml")){const t=await this._fetchAuxiliaryData(e);if(null!=t){var D;if(B.statistics=null!=(D=t.statistics)?D:B.statistics,B.histograms=t.histograms,t.histograms&&!(0,o.pC)(B.statistics)&&(B.statistics=(0,ne.Oh)(t.histograms)),t.transform&&!R){B.transform=t.transform,B.nativeExtent=B.extent;const e=B.transform.forwardTransform(B.nativeExtent);B.pixelSize=new $.Z({x:(e.xmax-e.xmin)/d,y:(e.ymax-e.ymin)/p,spatialReference:k}),B.extent=e}B.spatialReference||(B.spatialReference=t.spatialReference)}}if(this._set("rasterInfo",B),this._headerInfo={littleEndian:l,isBigTiff:u,ifds:f,...h},!this._headerInfo.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+this._headerInfo.message);this.updateTileInfo()}async fetchRawTile(e,t,r,n={}){var i;if(null==(i=this._headerInfo)||!i.isSupported||this.isBlockOutside(e,t,r))return null;const s=this._getTileLocation(e,t,r);if(!s)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=s,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:n.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),d=1===f.length?f[0].data:new ArrayBuffer(h),p=[0],m=[0];if(f.length>1){const e=new Uint8Array(d);for(let t=0,r=0;t<f.length;t++){const n=f[t].data;e.set(new Uint8Array(n),r),p[t]=r,r+=n.byteLength,m[t]=n.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(d,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:p,sizes:m},width:y,height:g,planes:null,pixelType:null});let w,v,b;if(o!==y||l!==g){let e=x.mask;if(e)for(w=0;w<g;w++)if(b=w*y,w<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),x.mask=e,w=0;w<l;w++)for(b=w*y,v=0;v<o;v++)e[b+v]=1}return x}async _readIFDs(e,t,r,n,i,s=4,a){if(!n)return null;(n>=t.byteLength||n<0)&&(t=(await this.request(this.url,{range:{from:n+i,to:n+i+this._bufferSize},responseType:"array-buffer",signal:a})).data,i=n+i,n=0);const o=await this._readIFD(t,r,n,i,Le.Z.TIFF_TAGS,s,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,r,o.nextIFD-i,i,s,a)}async _readIFD(e,t,r,n,i=Le.Z.TIFF_TAGS,s=4,a){if(!e)return null;const o=(0,He.vr)(e,t,r,n,i,s);if(o.success){const r=[];if(o.ifd.forEach((e=>{e.values||r.push(e)})),r.length>0){const i=r.map((e=>e.offlineOffsetSize)),s=Math.min.apply(null,i.map((e=>e[0])));if(Math.min.apply(null,i.map((e=>e[0]+e[1])))-s<=this._bufferSize){const{data:i}=await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:a});e=i,n=s,r.forEach((r=>(0,He.Dq)(e,t,r,n)))}}if(o.ifd.has("GEOKEYDIRECTORY")){const r=o.ifd.get("GEOKEYDIRECTORY"),i=r.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2],o=await this._readIFD(e,t,r.valueOffset+6-n,n,Le.Z.GEO_KEYS,2,a);r.data=o.ifd,r.data&&r.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const r=await this.request(this.url,{range:{from:n,to:n+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=r.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,n,Le.Z.TIFF_TAGS,4,a)}}_getTileLocation(e,t,r){const{firstPyramidLevel:n,blockBoundary:i}=this.rasterInfo.storageInfo,s=0===e?0:e-(n-1),a=this._headerInfo.ifds[s];if(!a)return null;const o=(0,He.If)(a,this._headerInfo),l=We(a,"TILEOFFSETS");if(void 0===l)return null;const c=We(a,"TILEBYTECOUNTS"),{minRow:u,minCol:f,maxRow:h,maxCol:d}=i[s];if(t>h||r>d||t<u||r<f)return null;const p=Je(a,"IMAGEWIDTH"),m=Je(a,"IMAGELENGTH"),y=Je(a,"TILEWIDTH"),g=Je(a,"TILELENGTH"),x=o?this.rasterInfo.bandCount:1,w=x*t*(d+1)+r,v=[{from:l[w],to:l[w+x-1]+c[w+x-1]-1}];if(o){let e=!0;for(let t=0;t<x;t++)if(l[w+t]+c[w+t]!==l[w+t+1]){e=!1;break}if(!e)for(let e=0;e<x;e++)v[e]={from:l[w+e],to:l[w+e]+c[w+e]-1}}const b=l[w],I=c[w];return null==b||null==I?null:{ranges:v,ifd:a,actualTileWidth:r===d?p%y:y,actualTileHeight:t===h?m%g:g}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:null==e?void 0:e.signal});return Re(t)}catch{return null}}};(0,n._)([(0,u.Cb)()],je.prototype,"_files",void 0),(0,n._)([(0,u.Cb)()],je.prototype,"_headerInfo",void 0),(0,n._)([(0,u.Cb)()],je.prototype,"_bufferSize",void 0),(0,n._)([(0,u.Cb)({type:String,json:{write:!0}})],je.prototype,"datasetFormat",void 0),je=(0,n._)([(0,p.j)("esri.layers.support.rasterDatasets.TIFFRaster")],je);const qe=je,Ue=new Map;Ue.set("CRF",{desc:"Cloud Raster Format",constructor:he}),Ue.set("MRF",{desc:"Meta Raster Format",constructor:Ae}),Ue.set("TIFF",{desc:"GeoTIFF",constructor:qe}),Ue.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ee}),Ue.set("JPG",{desc:"JPG Raster Format",constructor:ke}),Ue.set("PNG",{desc:"PNG Raster Format",constructor:ke}),Ue.set("GIF",{desc:"GIF Raster Format",constructor:ke}),Ue.set("BMP",{desc:"BMP Raster Format",constructor:ke});var Ge=r(32163);let $e=class extends((0,y.h)((0,z.M)((0,N.q)((0,B.I)((0,g.N)(Z((0,A.n)((0,D.Q)((0,l.R)(m.Z)))))))))){constructor(...e){super(...e),this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.title=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,o.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){var e,t;let r=[new H.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const n=null==(e=this.rasterInfo)||null==(t=e.attributeTable)?void 0:t.fields;if(n){const e=n.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));r=r.concat(e)}const i=this.rasterInfo.dataType;if(("vector-magdir"===i||"vector-uv"===i)&&(0,o.pC)(this.rasterInfo.multidimensionalInfo)){var s;const e=null==(s=this.rasterInfo.multidimensionalInfo.variables[0].unit)?void 0:s.trim(),t="Magnitude"+(e?` (${e})`:"");r.push(new H.Z({name:"Raster.Magnitude",alias:t,domain:null,editable:!1,type:"double"})),r.push(new H.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return r}set renderer(e){this._set("renderer",e),this.updateRenderer()}readRenderer(e,t,r){const n=t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,i=(0,s.ij)(n,r)||void 0;if(null!=i)return i}createPopupTemplate(e){return(0,Ge.eZ)({fields:this.rasterFields,title:this.title},e)}write(e,t){const{raster:r}=this;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){this.raster?(this.raster.rasterInfo||await this.raster.open(),this.url=this.raster.url):this.raster=await class{static get supportedFormats(){const e=new Set;return Ue.forEach(((t,r)=>e.add(r))),e}static async open(e){const{url:t,ioConfig:r,sourceJSON:n}=e;let i=e.datasetFormat;null==i&&t.lastIndexOf(".")&&(i=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===i||"TIF"===i?i="TIFF":"JPG"!==i&&"JPEG"!==i&&"JFIF"!==i||(i="JPG"),t.toLowerCase().indexOf("/imageserver")>-1&&-1===t.toLowerCase().indexOf("/wcsserver")&&(i="RasterTileServer");const s={url:t,sourceJSON:n,datasetFormat:i,ioConfig:r||{bandIds:null,sampling:null}};let o,l;if(this.supportedFormats.has(i))return o=Ue.get(i).constructor,l=new o(s),await l.open({signal:e.signal}),l;if(i)throw new a.Z("rasterfactory:open","not a supported format "+i);const c=Array.from(Ue.keys());let u=0;const f=function(){return i=c[u++],i?(o=Ue.get(i).constructor,l=new o(s),l.open({signal:e.signal}).then((()=>l)).catch((()=>f()))):null};return f()}static register(e,t,r){Ue.has(e.toUpperCase())||Ue.set(e.toUpperCase(),{desc:t,constructor:r})}}.open({url:this.url,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});const{rasterInfo:t}=this.raster;if(!t)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON&&(this._set("version",this.sourceJSON.currentVersion),this._set("copyright",this.sourceJSON.copyrightText),this.sourceJSON.timeInfo&&this._set("timeInfo",W.Z.fromJSON(this.sourceJSON.timeInfo))),null==this.title&&(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.watch("customParameters",(e=>this.raster.ioConfig.customFetchParameters=e))}};(0,n._)([(0,u.Cb)({type:[f.z8],json:{write:{overridePolicy(){var e;return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==(null==(e=this.bandIds)?void 0:e.join(","))}}}}})],$e.prototype,"bandIds",void 0),(0,n._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,h.J)(L.c)],$e.prototype,"interpolation",void 0),(0,n._)([(0,u.Cb)({json:{write:!0}})],$e.prototype,"multidimensionalDefinition",void 0),(0,n._)([(0,u.Cb)(_.rn)],$e.prototype,"legendEnabled",void 0),(0,n._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],$e.prototype,"isReference",void 0),(0,n._)([(0,u.Cb)({type:["show","hide"]})],$e.prototype,"listMode",void 0),(0,n._)([(0,u.Cb)()],$e.prototype,"sourceJSON",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],$e.prototype,"version",void 0),(0,n._)([(0,u.Cb)()],$e.prototype,"title",void 0),(0,n._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],$e.prototype,"type",void 0),(0,n._)([(0,u.Cb)({type:["ArcGISTiledImageServiceLayer"]})],$e.prototype,"operationalLayerType",void 0),(0,n._)([(0,u.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],$e.prototype,"popupEnabled",void 0),(0,n._)([(0,u.Cb)({type:i.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],$e.prototype,"popupTemplate",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],$e.prototype,"defaultPopupTemplate",null),(0,n._)([(0,u.Cb)({readOnly:!0,type:[H.Z]})],$e.prototype,"fields",void 0),(0,n._)([(0,u.Cb)({readOnly:!0,type:[H.Z]})],$e.prototype,"rasterFields",null),(0,n._)([(0,u.Cb)({types:s.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){var e;const t="raster-stretch"===(null==(e=this.renderer)?void 0:e.type)&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!t}}},origins:{"web-scene":{types:s.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"animated-flow"!==e.type})}}}}})],$e.prototype,"renderer",null),(0,n._)([(0,d.r)("renderer")],$e.prototype,"readRenderer",null),$e=(0,n._)([(0,p.j)("esri.layers.ImageryTileLayer")],$e);const Ve=$e},73506:(e,t,r)=>{r.d(t,{Qp:()=>R,P_:()=>C,ut:()=>v,Hq:()=>_,zD:()=>d,tB:()=>x,nF:()=>y,VO:()=>p,Mk:()=>c,kZ:()=>k,kr:()=>T}),r(66577);var n=r(20102),i=r(70586),s=r(67900),a=r(90411),o=r(6570),l=r(13473);function c(e,t,r){return!(0,a.Up)(e,t,r)}function u(e,t,r){const i=c(e,t,r);if(i&&!(0,a.kR)())throw new n.Z("rasterprojectionhelper-project","projection engine is not loaded");return i}const f=function(e,t,r){const n=(e[0]+e[4]+e[4*t.cols]+e[4*t.cols+4])/4,i=(e[1]+e[5]+e[4*t.rows+1]+e[4*t.rows+5])/4,s=(e[4*t.cols]-e[0]+e[4*t.cols+4]-e[4])/r[0]*.5,a=(e[4*t.cols+1]-e[1]+e[4*t.cols+5]-e[5])/r[1]*.5;return[0===s||isNaN(s)?0:Math.abs(n-e[2*t.rows+2])/Math.abs(s),0===a||isNaN(a)?0:Math.abs(i-e[2*t.rows+3])/Math.abs(a)]},h={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244};async function d(){if((0,a.kR)())return null;await(0,a.zD)()}function p(e,t,r,n=null){if(e.spatialReference.equals(t))return e;u(e.spatialReference,t,n);const s=r.center,l=new o.Z({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:e.spatialReference}),c=(0,a.iV)(l,t,n);return(0,i.Wi)(c)?null:{x:c.xmax-c.xmin,y:c.ymax-c.ymin}}function m(e,t=.01){return(0,s.c9)(e)?t/(0,s.c9)(e):0}function y(e,t,r=null,n=!0){const s=e.spatialReference;if(s.equals(t))return e;u(s,t,r);const o=(0,a.iV)(e,t,r);if(!n||!o)return o;const l=b(s,!0),c=b(t,!0),f=m(s);return f&&(0,i.pC)(l)&&(0,i.pC)(c)&&(o.x>0&&Math.abs(e.x-l[0])<f?o.x-=c[1]-c[0]:o.x<0&&Math.abs(e.x-l[1])<f&&(o.x+=c[1]-c[0])),o}function g(e){const t=v(e[0].spatialReference);if(e.length<2||!(0,i.pC)(t))return e[0];let{xmin:r,xmax:n,ymin:s,ymax:a}=e[0];for(let r=1;r<e.length;r++){const i=e[r];n=i.xmax+t*r,s=Math.min(s,i.ymin),a=Math.max(a,i.ymax)}return new o.Z({xmin:r,xmax:n,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function x(e,t,r=null,n=!0){if(e.spatialReference.equals(t))return e;const s=_(e),a=v(e.spatialReference,!0),l=v(t);if(0===s||(0,i.Wi)(a)||(0,i.Wi)(l))return w(e,t,r,n);const c=e.clone().normalize();if(1===c.length&&e.xmax<a&&e.xmax-a/2>m(e.spatialReference)){const{xmin:t,xmax:r}=e;for(let n=0;n<=s;n++){const i=0===n?t:-a/2,l=n===s?r-a*n:a/2;c[n]=new o.Z({xmin:i,xmax:l,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference})}}return g(c.map((e=>w(e,t,r,n))).filter((e=>!!e)))}function w(e,t,r=null,n=!0,s=!0){const o=e.spatialReference;if(o.equals(t))return e;u(o,t,r);const c=(0,a.iV)(e,t,r);if(s&&t.isWebMercator&&c&&(c.ymax=Math.min(20037508.342787,c.ymax),c.ymin=Math.max(-20037508.342787,c.ymin),c.ymin>=c.ymax))return null;if(!n||!c)return c;const f=b(o,!0),h=b(t,!0);if((0,i.Wi)(f)||(0,i.Wi)(h))return c;const d=m(o,.001),p=m(o,500),g=m(t,.001);if(Math.abs(c.xmin-h[0])<g&&Math.abs(c.xmax-h[1])<g){const n=Math.abs(e.xmin-f[0]),i=Math.abs(f[1]-e.xmax);if(n<d&&i>p){c.xmin=h[0];const n=[];n.push(new l.Z(e.xmax,e.ymin,o)),n.push(new l.Z(e.xmax,(e.ymin+e.ymax)/2,o)),n.push(new l.Z(e.xmax,e.ymax,o));const i=n.map((e=>y(e,t,r))).filter((e=>!isNaN(null==e?void 0:e.x))).map((e=>e.x));c.xmax=Math.max.apply(null,i)}if(i<d&&n>p){c.xmax=h[1];const n=[];n.push(new l.Z(e.xmin,e.ymin,o)),n.push(new l.Z(e.xmin,(e.ymin+e.ymax)/2,o)),n.push(new l.Z(e.xmin,e.ymax,o));const i=n.map((e=>y(e,t,r))).filter((e=>!isNaN(null==e?void 0:e.x))).map((e=>e.x));c.xmin=Math.min.apply(null,i)}}else{const e=m(t,.001);Math.abs(c.xmin-h[0])<e&&(c.xmin=h[0]),Math.abs(c.xmax-h[1])<e&&(c.xmax=h[1])}return c}function v(e,t=!1){const r=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*r:e.wkid&&e.isGeographic?360:2*h[e.wkid]||null}function b(e,t=!1){if(e.isGeographic)return[-180,180];const r=v(e,t);return(0,i.pC)(r)?[-r/2,r/2]:null}function I(e,t,r,n){let i=(e-t)/r;return i-Math.floor(i)!=0?i=Math.floor(i):n&&(i-=1),i}function _(e,t=!1){const r=v(e.spatialReference);if(!(0,i.pC)(r))return 0;const n=t?0:-r/2;return I(e.xmax,n,r,!0)-I(e.xmin,n,r,!1)}function C(e){const t=e.storageInfo.origin.x,r=v(e.spatialReference,!0);if(!(0,i.pC)(r))return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const n=r/2,{nativePixelSize:s,storageInfo:a,extent:o}=e,{maximumPyramidLevel:l,blockWidth:c,pyramidScalingFactor:u}=a;let f=s.x;const h=[],d=(0,i.pC)(e.transform)&&"gcs-shift"===e.transform.type,p=t+(d?0:n),m=d?r-t:n-t;for(let e=0;e<=l;e++){const e=(o.xmax-t)/f/c,r=e-Math.floor(e)==0?e:Math.ceil(e),n=m/f/c,i=n-Math.floor(n)==0?n:Math.ceil(n),s=Math.floor(p/f/c),a=Math.round(p/f)%c,l=(c-Math.round(m/f)%c)%c;h.push({resolutionX:f,blockWidth:c,datsetColumnCount:r,worldColumnCountFromOrigin:i,leftMargin:a,rightPadding:l,originColumnOffset:s}),f*=u}return{originX:t,halfWorldWidth:n,pyramidsInfo:h,hasGCSSShiftTransform:d}}function R(e){const t=e.isAdaptive&&null==e.spacing,r=e.spacing||[32,32];let n=S(e),i={cols:n.size[0]+1,rows:n.size[1]+1},s=f(n.offsets,i,r);const a=(s[0]+s[1])/2,o=n.outofBoundPointCount>0&&n.outofBoundPointCount<n.offsets.length/2;return t&&(o||a>4)&&(n=S({...e,spacing:[4,4]}),i={cols:n.size[0]+1,rows:n.size[1]+1},s=f(n.offsets,i,r)),n.error=s,n.coefficients=function(e,t,r){const{cols:n,rows:i}=t,s=new Float32Array((n-1)*(i-1)*2*6),a=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),o=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let t=0;t<n-1;t++){for(let r=0;r<i-1;r++){let l=t*i*2+2*r;const c=e[l],u=e[l+1],f=e[l+2],h=e[l+3];l+=2*i;const d=e[l],p=e[l+1],m=e[l+2],y=e[l+3];let g=0,x=12*(r*(n-1)+t);for(let e=0;e<3;e++)s[x++]=a[g++]*c+a[g++]*f+a[g++]*m;g=0;for(let e=0;e<3;e++)s[x++]=a[g++]*u+a[g++]*h+a[g++]*y;g=0;for(let e=0;e<3;e++)s[x++]=o[g++]*c+o[g++]*d+o[g++]*m;g=0;for(let e=0;e<3;e++)s[x++]=o[g++]*u+o[g++]*p+o[g++]*y}if(r)for(let e=0;e<s.length;e++)isNaN(s[e])&&(s[e]=-1)}return s}(n.offsets,i,o),n}function S(e){const{projectedExtent:t,srcBufferExtent:r,pixelSize:n,datumTransformation:s,rasterTransform:o}=e,c=t.spatialReference,f=r.spatialReference;u(c,f);const{xmin:h,ymin:d,xmax:p,ymax:m}=t,y=v(f),g=e.hasWrapAround||"gcs-shift"===(null==o?void 0:o.type),x=e.spacing||[32,32],w={x:x[0]*n.x,y:x[1]*n.y},b=Math.ceil((p-h)/w.x-.1/x[0])+1,I=Math.ceil((m-d)/w.y-.1/x[1])+1,_=w.x,C=w.y,R=[];let S,k=0;const T=[];for(let e=0;e<b;e++)for(let t=0;t<I;t++)T.push(new l.Z({x:h+_*e,y:m-C*t,spatialReference:c}));const M=function(e,t,r=null){const n=e[0].spatialReference;return n.equals(t)?e:(u(n,t,r),(0,a.iV)(e,t,r))}(T,f,s);for(let e=0;e<b;e++){const t=[];for(let n=0;n<I;n++){var P;let s=M[e*I+n];(0,i.pC)(y)&&(null==(P=s)?void 0:P.x)>r.xmax&&(s.x-=y),o&&(s=o.inverseTransform(s)),t.push(s),e>0&&g&&s&&S[n]&&(0,i.pC)(y)&&s.x<S[n].x&&(s.x+=y),s?(R.push((s.x-r.xmin)/(r.xmax-r.xmin)),R.push((r.ymax-s.y)/(r.ymax-r.ymin))):(R.push(NaN),R.push(NaN),k++)}S=t}return{offsets:R,error:null,coefficients:null,outofBoundPointCount:k,spacing:x,size:[b-1,I-1]}}function k(e){const t=e.clone().normalize();return 1===t.length?t[0]:g(t)}function T(e,t,r){const{storageInfo:n,pixelSize:s}=t;let a,o=!1;const{pyramidResolutions:c}=n;if((0,i.pC)(c)&&c.length){const n=(e.x+e.y)/2,i=c[c.length-1],u=(i.x+i.y)/2,f=(s.x+s.y)/2;if(n<=f)a=0;else if(n>=u)a=c.length,o=n/u>8;else{let e,t=f;for(let i=1;i<=c.length;i++){if(e=(c[i-1].x+c[i-1].y)/2,n<=e){n===e?a=i:"down"===r?(a=i-1,o=n/t>8):a="up"===r||n-t>e-n||n/t>2?i:i-1;break}t=e}}const h=0===a?s:c[a-1];return{pyramidLevel:a,pyramidResolution:new l.Z({x:h.x,y:h.y,spatialReference:t.spatialReference}),excessiveReading:o}}const u=Math.log(e.x/s.x)/Math.LN2,f=Math.log(e.y/s.y)/Math.LN2,h=t.storageInfo.maximumPyramidLevel||0;a="down"===r?Math.floor(Math.min(u,f)):"up"===r?Math.ceil(Math.max(u,f)):Math.round((u+f)/2),a<0?a=0:a>h&&(o=a>h+3,a=h);const d=2**a;return{pyramidLevel:a,pyramidResolution:new l.Z({x:d*t.nativePixelSize.x,y:d*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:o}}},48700:(e,t,r)=>{r.d(t,{Z:()=>l});var n=r(43697),i=r(96674),s=r(5600),a=(r(67676),r(80442),r(75215),r(52011));let o=class extends i.wq{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,n._)([(0,s.Cb)()],o.prototype,"affectsPixelSize",null),(0,n._)([(0,s.Cb)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,n._)([(0,a.j)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o},29680:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),i=r(5600),s=(r(67676),r(80442),r(75215),r(36030)),a=r(52011),o=r(48700);let l=class extends o.Z{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}};(0,n._)([(0,s.J)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,n._)([(0,i.Cb)()],l.prototype,"tolerance",void 0),l=(0,n._)([(0,a.j)("esri.layers.support.rasterTransforms.GCSShiftTransform")],l);const c=l},87390:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(43697),i=(r(66577),r(5600)),s=(r(67676),r(80442),r(75215),r(36030)),a=r(71715),o=r(52011),l=r(30556),c=r(48700),u=r(13473),f=r(6570);function h(e,t,r){const{x:n,y:i}=t;if(r<2)return{x:e[0]+n*e[2]+i*e[4],y:e[1]+n*e[3]+i*e[5]};if(2===r){const t=n*n,r=i*i,s=n*i;return{x:e[0]+n*e[2]+i*e[4]+t*e[6]+s*e[8]+r*e[10],y:e[1]+n*e[3]+i*e[5]+t*e[7]+s*e[9]+r*e[11]}}const s=n*n,a=i*i,o=n*i,l=s*n,c=s*i,u=n*a,f=i*a;return{x:e[0]+n*e[2]+i*e[4]+s*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+n*e[3]+i*e[5]+s*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,r){const{xmin:n,ymin:i,xmax:s,ymax:a,spatialReference:o}=t;let l=[];if(r<2)l.push({x:n,y:a}),l.push({x:s,y:a}),l.push({x:n,y:i}),l.push({x:s,y:i});else{let e=10;for(let t=0;t<e;t++)l.push({x:n,y:i+(a-i)*t/(e-1)}),l.push({x:s,y:i+(a-i)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:n+(s-n)*t/e,y:i}),l.push({x:n+(s-n)*t/e,y:a})}l=l.map((t=>h(e,t,r)));const c=l.map((e=>e.x)),u=l.map((e=>e.y));return new f.Z({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,u),ymax:Math.max.apply(null,u),spatialReference:o})}let p=class extends c.Z{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:r,coeffY:n}=t;if(null==r||!r.length||null==n||!n.length||r.length!==n.length)return null;const i=[];for(let e=0;e<r.length;e++)i.push(r[e]),i.push(n[e]);return i}writeForwardCoefficients(e,t,r){const n=[],i=[];for(let t=0;t<(null==e?void 0:e.length);t++)t%2==0?n.push(e[t]):i.push(e[t]);t.coeffX=n,t.coeffY=i}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,r,n,i,s,a]=e,o=n*a-s*i,l=s*i-n*a;return[(s*r-t*a)/o,(n*r-t*i)/l,a/o,i/l,-s/o,-n/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:r,inverseCoeffY:n}=t;if(null==r||!r.length||null==n||!n.length||r.length!==n.length)return null;const i=[];for(let e=0;e<r.length;e++)i.push(r[e]),i.push(n[e]);return i}writeInverseCoefficients(e,t,r){const n=[],i=[];for(let t=0;t<(null==e?void 0:e.length);t++)t%2==0?n.push(e[t]):i.push(e[t]);t.inverseCoeffX=n,t.inverseCoeffY=i}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=h(this.forwardCoefficients,e,this.polynomialOrder);return new u.Z({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=h(this.inverseCoefficients,e,this.polynomialOrder);return new u.Z({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}};(0,n._)([(0,i.Cb)({json:{write:!0}})],p.prototype,"polynomialOrder",void 0),(0,n._)([(0,i.Cb)()],p.prototype,"forwardCoefficients",void 0),(0,n._)([(0,a.r)("forwardCoefficients",["coeffX","coeffY"])],p.prototype,"readForwardCoefficients",null),(0,n._)([(0,l.c)("forwardCoefficients")],p.prototype,"writeForwardCoefficients",null),(0,n._)([(0,i.Cb)({json:{write:!0}})],p.prototype,"inverseCoefficients",null),(0,n._)([(0,a.r)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],p.prototype,"readInverseCoefficients",null),(0,n._)([(0,l.c)("inverseCoefficients")],p.prototype,"writeInverseCoefficients",null),(0,n._)([(0,i.Cb)()],p.prototype,"affectsPixelSize",null),(0,n._)([(0,s.J)({PolynomialXform:"polynomial"})],p.prototype,"type",void 0),p=(0,n._)([(0,o.j)("esri.layers.support.rasterTransforms.PolynomialTransform")],p);const m=p},87521:(e,t,r)=>{r.d(t,{j:()=>d,c:()=>p});var n=r(29680),i=r(43697),s=(r(92604),r(75215),r(67676),r(80442),r(37697),r(36030)),a=r(52011),o=r(48700);let l=class extends o.Z{constructor(){super(...arguments),this.type="identity"}};(0,i._)([(0,s.J)({IdentityXform:"identity"})],l.prototype,"type",void 0),l=(0,i._)([(0,a.j)("esri.layers.support.rasterTransforms.IdentityTransform")],l);const c=l;var u=r(87390);const f={GCSShiftXform:n.Z,IdentityXform:c,PolynomialXform:u.Z},h=Object.keys(f);function d(e){const t=null==e?void 0:e.type;return!e||h.includes(t)}function p(e){if(!(null==e?void 0:e.type))return null;const t=f[null==e?void 0:e.type];if(t){const r=new t;return r.read(e),r}return null}},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var n,i=r(43697),s=r(66577),a=r(1692),o=r(35454),l=r(96674),c=r(22974),u=r(70586),f=r(5600),h=(r(75215),r(71715)),d=r(52011),p=r(30556),m=r(82971),y=r(33955),g=r(1231);const x=new o.Xn({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const i=e[t],s=a.Z.fromJSON(i),o=i.geometry&&i.geometry.spatialReference;(0,u.pC)(s.geometry)&&!o&&(s.geometry.spatialReference=r),n.push(s)}return n}writeGeometryType(e,t,r,n){if(e)return void x.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry))return void x.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,y.im)(e);return!r&&t.spatialReference&&(n.spatialReference=m.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,c.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=s.length;e<t;e++)a((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[s,a]}=r,o=this._getHydrationFunction(e,(e=>e*s+n),(e=>i-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&o(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,i;const s=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];if(a>0){const e=t(o[0]),a=r(o[1]);e===n&&a===i||(s.push([e-n,a-i]),n=e,i=a)}else n=t(o[0]),i=r(o[1]),s.push([n,i])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths,i=[];for(let e=0,s=n.length;e<s;e++){const s=n[e],a=this._quantizePoints(s,t,r);a&&i.push(a)}return i.length>0?((0,y.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let i,s;for(let e=0,a=n.length;e<a;e++){const a=n[e];for(let e=0,n=a.length;e<n;e++){const n=a[e];e>0?(i+=n[0],s+=n[1]):(i=n[0],s=n[1]),n[0]=t(i),n[1]=r(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const n=e.points;let i,s;for(let e=0,a=n.length;e<a;e++){const a=n[e];e>0?(i+=a[0],s+=a[1]):(i=a[0],s=a[1]),a[0]=t(i),a[1]=r(s)}}:void 0}};(0,i._)([(0,f.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i._)([(0,f.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,f.Cb)({type:[a.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,i._)([(0,h.r)("features")],w.prototype,"readFeatures",null),(0,i._)([(0,f.Cb)({type:[g.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,i._)([(0,f.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:x.read}}})],w.prototype,"geometryType",void 0),(0,i._)([(0,p.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,i._)([(0,f.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i._)([(0,f.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i._)([(0,f.Cb)({types:s.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i._)([(0,h.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i._)([(0,f.Cb)({type:m.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i._)([(0,p.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i._)([(0,f.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const v=w},89749:(e,t,r)=>{r.d(t,{t:()=>f});var n=r(43697),i=r(15923),s=r(61247),a=r(70586),o=r(17445),l=r(1654),c=r(5600),u=r(52011);let f=class extends i.Z{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new s.Z,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,t,r={}){const n=++this.handleId;r.sync||this._installSyncUpdatingWatch(e,n);const i=(0,o.YP)(e,t,r);return this.handles.add(i,n),{remove:()=>this.handles.remove(n)}}addOnCollectionChange(e,t,{initial:r=!1}={}){const n=++this.handleId;return this.handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.items,removed:[],moved:[],target:e}):void 0})],n),{remove:()=>this.handles.remove(n)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(h)||this._set("updating",!1))}},t),this.pendingPromises.add(e),this._set("updating",!0);const r=()=>this.handles.remove(t);return e.then(r,r),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),n=(0,o.YP)(e,r,{sync:!0,equals:()=>!1});return this.handles.add(n,t),n}_createSyncUpdatingCallback(){return()=>{this.handles.remove(h),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add((0,l.Os)((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(h))})),h)}}};(0,n._)([(0,c.Cb)({readOnly:!0})],f.prototype,"updating",void 0),f=(0,n._)([(0,u.j)("esri.views.support.WatchUpdatingTracking")],f);const h=-42;var d,p;(p=d||(d={}))[p.NONE=0]="NONE",p[p.SYNC=1]="SYNC",p[p.INIT=2]="INIT"}}]);
|