@arcgis/core 4.34.0-next.1 → 4.34.0-next.10
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/Map.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/DimensionAnalysis.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/analysis/ViewshedAnalysis.js +1 -1
- package/applications/ExperienceBuilder/sketchUtils.d.ts +1 -0
- package/applications/ExperienceBuilder/sketchUtils.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0039dee1337160366112.js +1 -0
- package/assets/esri/core/workers/chunks/074498a4d685223ec058.js +1 -0
- package/assets/esri/core/workers/chunks/{54ea93f416ab52b413c1.js → 076f830d6d0337dfce9d.js} +1 -1
- package/assets/esri/core/workers/chunks/09907c9ff597df9bc954.js +1 -0
- package/assets/esri/core/workers/chunks/0dbb350ce651bc236ec8.js +1 -0
- package/assets/esri/core/workers/chunks/0ed4ec00ef16aa58a33d.js +1 -0
- package/assets/esri/core/workers/chunks/{ead5d4e271effc04def3.js → 1415d4e2f5f3193be004.js} +1 -1
- package/assets/esri/core/workers/chunks/{0624ae07d3af8d5f1ac8.js → 15b3eb60f86954783fab.js} +1 -1
- package/assets/esri/core/workers/chunks/18011c691e0aca4144dd.js +1 -0
- package/assets/esri/core/workers/chunks/1dc1084eb34748a35d35.js +1 -0
- package/assets/esri/core/workers/chunks/1f315f0eeb26dad1addd.js +1 -0
- package/assets/esri/core/workers/chunks/2254989ca3ff3960f2fe.js +1 -0
- package/assets/esri/core/workers/chunks/2dc54925d473a959119c.js +1 -0
- package/assets/esri/core/workers/chunks/2e1ceff3f88a6c78dfa2.js +1 -0
- package/assets/esri/core/workers/chunks/{847e88e1d6da1e74cdc8.js → 2ecc1057d53e0b4a60b7.js} +1 -1
- package/assets/esri/core/workers/chunks/3025e420e13e2bc8c0a1.js +1 -0
- package/assets/esri/core/workers/chunks/{ece68a25651ef03fc95d.js → 342f61e784c9364a493b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0d23610475c85385fbff.js → 355e6bcdb401ada71f39.js} +1 -1
- package/assets/esri/core/workers/chunks/{bba6d7615d8f3862fe70.js → 36f0046ff6b46adce7b7.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c86aa3802d9ae0230ae.js → 3916879b9ca8c6979011.js} +1 -1
- package/assets/esri/core/workers/chunks/3a74654fa539f78ceb86.js +1 -0
- package/assets/esri/core/workers/chunks/3adcf78ed1e7cd82666d.js +1 -0
- package/assets/esri/core/workers/chunks/3b63edcd34f832ac7bd8.js +1 -0
- package/assets/esri/core/workers/chunks/{b0522dffa5600345c07e.js → 3e85e63148b5e93d3074.js} +1 -1
- package/assets/esri/core/workers/chunks/4088f4c25a09932a3eb1.js +1 -0
- package/assets/esri/core/workers/chunks/427318722815bef1496b.js +1 -0
- package/assets/esri/core/workers/chunks/464c15b2779f9b803a06.js +1 -0
- package/assets/esri/core/workers/chunks/49089731ecfe7e8bb2f6.js +1 -0
- package/assets/esri/core/workers/chunks/4c3bd6cc0badb78c7112.js +1 -0
- package/assets/esri/core/workers/chunks/4e0bae3671fe1c7efa76.js +1 -0
- package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +1 -0
- package/assets/esri/core/workers/chunks/52c34d6ecd9d45a33e69.js +1 -0
- package/assets/esri/core/workers/chunks/539541dec5fcf3b657aa.js +1 -0
- package/assets/esri/core/workers/chunks/{fa63b0f7fa799cb2f81d.js → 562800b0af52a38a311b.js} +1 -1
- package/assets/esri/core/workers/chunks/{b87fec1753f164c845c5.js → 58f403f956b7b3467344.js} +1 -1
- package/assets/esri/core/workers/chunks/5bfcb3d87380e7f85b08.js +1 -0
- package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +1 -0
- package/assets/esri/core/workers/chunks/5e539ce4751bcfa57145.js +1 -0
- package/assets/esri/core/workers/chunks/{6ee41e9c92ed8ba4c763.js → 5ef1095842e21090f1f4.js} +1 -1
- package/assets/esri/core/workers/chunks/6194636638b0439fccd8.js +1 -0
- package/assets/esri/core/workers/chunks/{9fc35ec8185beba96715.js → 632d1a1287dde980479e.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d043965dcdc11b3aeaa.js → 63852887b3f07d50f7c9.js} +1 -1
- package/assets/esri/core/workers/chunks/6a86fee4e945e61d9639.js +1 -0
- package/assets/esri/core/workers/chunks/6b0ae9ccdd1acef5b5b4.js +1 -0
- package/assets/esri/core/workers/chunks/6d90887dc605261dd7b3.js +1 -0
- package/assets/esri/core/workers/chunks/72ea996b03932c0f004f.js +1 -0
- package/assets/esri/core/workers/chunks/7317346ed8d7c5bb859d.js +1 -0
- package/assets/esri/core/workers/chunks/74276044cb75b51967f2.js +1 -0
- package/assets/esri/core/workers/chunks/766e08d0c56b2b31b63b.js +1 -0
- package/assets/esri/core/workers/chunks/{bd7b54db7fd278b15500.js → 7a2189614f2dad49ffcd.js} +1 -1
- package/assets/esri/core/workers/chunks/7ae88c141a5d85e5bb88.js +1 -0
- package/assets/esri/core/workers/chunks/7aef81778155be373d3e.js +1 -0
- package/assets/esri/core/workers/chunks/7e1906d35a764f7f10b0.js +1 -0
- package/assets/esri/core/workers/chunks/7fa46d1e9fcd8c0c6302.js +1 -0
- package/assets/esri/core/workers/chunks/{06eb4832b6c86744e52e.js → 8008f5479f4d16964088.js} +1 -1
- package/assets/esri/core/workers/chunks/80777a9db53bee2ad8a8.js +1 -0
- package/assets/esri/core/workers/chunks/81614beb51405d064a6c.js +1 -0
- package/assets/esri/core/workers/chunks/83db8bd42f94f97c7cf1.js +1 -0
- package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +1 -0
- package/assets/esri/core/workers/chunks/91d484960df25ec9554b.js +1 -0
- package/assets/esri/core/workers/chunks/92a5dccb328229a9336b.js +1 -0
- package/assets/esri/core/workers/chunks/948c5454881e661c3bdc.js +1 -0
- package/assets/esri/core/workers/chunks/{631205dc4d73d49ec9ed.js → 95507ff0a243e451b99e.js} +1 -1
- package/assets/esri/core/workers/chunks/9cb242dfc3765b590f51.js +1 -0
- package/assets/esri/core/workers/chunks/{1051a5a57b2fb843a555.js → 9cd55043f3d789f41815.js} +1 -1
- package/assets/esri/core/workers/chunks/9ddb0b07be31c3747238.js +1 -0
- package/assets/esri/core/workers/chunks/9f0f1472f36b42c507d1.js +1 -0
- package/assets/esri/core/workers/chunks/{ac2607f1e8cd2e99907c.js → 9f964467f7353039dd9c.js} +3 -3
- package/assets/esri/core/workers/chunks/9fe62638dc7dce466612.js +1 -0
- package/assets/esri/core/workers/chunks/a2e9141ff4efd13413a1.js +66 -0
- package/assets/esri/core/workers/chunks/a693cd3af2e995972252.js +1 -0
- package/assets/esri/core/workers/chunks/a6fb75929e456f87f804.js +1 -0
- package/assets/esri/core/workers/chunks/aaa564c84ee8ea36fbb4.js +1 -0
- package/assets/esri/core/workers/chunks/ad4f65d764654c70a117.js +1 -0
- package/assets/esri/core/workers/chunks/adf6982e2d8102669cdf.js +1 -0
- package/assets/esri/core/workers/chunks/af0d7a7cbbaad47a49c6.js +1 -0
- package/assets/esri/core/workers/chunks/af2f2df3c43b49ad1a70.js +1 -0
- package/assets/esri/core/workers/chunks/b09539a4b491a90a6bbe.js +1 -0
- package/assets/esri/core/workers/chunks/{d9b2263e0a9f9068ab62.js → b6c3a2d93a59df9a1418.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7b640f7a181bd26c7c7.js → bac5e1d50b69f0d94694.js} +1 -1
- package/assets/esri/core/workers/chunks/bbbd58b02a3ee8fe595e.js +1 -0
- package/assets/esri/core/workers/chunks/{9ca480eb8b2312381ccf.js → bcadcb709e622f2aaaf9.js} +1 -1
- package/assets/esri/core/workers/chunks/{6993a59cbb78bc26f029.js → c45a314ace9725aa250e.js} +1 -1
- package/assets/esri/core/workers/chunks/{c16e0da7a19310c71e8b.js → c6cd8784a3e222eb2d4a.js} +1 -1
- package/assets/esri/core/workers/chunks/{571252c9822d73cf7b01.js → c6fa79ce324122e08dbb.js} +1 -1
- package/assets/esri/core/workers/chunks/c8856370bae65d9eeb2b.js +1 -0
- package/assets/esri/core/workers/chunks/{97c148adf0347c69a79c.js → c9604f8df909ec4fad46.js} +1 -1
- package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +1 -0
- package/assets/esri/core/workers/chunks/{faa40ef04604c7cce706.js → cb63ea6a53d3c2fc3179.js} +1 -1
- package/assets/esri/core/workers/chunks/cc37bfa72c34bc2ef993.js +1 -0
- package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +1 -0
- package/assets/esri/core/workers/chunks/{9a06476b834584d00d5c.js → d0372bac0c5f4fbed468.js} +1 -1
- package/assets/esri/core/workers/chunks/d28d874c1337b69fedc0.js +1 -0
- package/assets/esri/core/workers/chunks/{54f4a1131f99468db076.js → d33a5d79f2163ad62b1d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bbb38f59f37c51c72f0.js → d45a4e5806a80b69ceec.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a23dc625a812a562c21.js → d5f770302dc686e55ba7.js} +1 -1
- package/assets/esri/core/workers/chunks/d942cb9cf82b1c056979.js +1 -0
- package/assets/esri/core/workers/chunks/dc14507cfc052faa5890.js +1 -0
- package/assets/esri/core/workers/chunks/{ca60b34c3e1ed2ff5934.js → dd2b316baae02bbdddac.js} +1 -1
- package/assets/esri/core/workers/chunks/dea3e131bbd48cc48e1a.js +346 -0
- package/assets/esri/core/workers/chunks/df84863cb0600f658541.js +1 -0
- package/assets/esri/core/workers/chunks/e0ae33206f519b159b49.js +1 -0
- package/assets/esri/core/workers/chunks/e7589c39b13295af8f1d.js +1 -0
- package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +1 -0
- package/assets/esri/core/workers/chunks/{e3c1aea34ece8336dae1.js → e9aa1d9ded8a52a40c57.js} +1 -1
- package/assets/esri/core/workers/chunks/eb23ce385b0d18959c7c.js +1 -0
- package/assets/esri/core/workers/chunks/{80b596496800e8d60eb8.js → ed75e0962358523f4439.js} +1 -1
- package/assets/esri/core/workers/chunks/ede9738ac20e7dd5ce63.js +1 -0
- package/assets/esri/core/workers/chunks/eec034d88db320880133.js +1 -0
- package/assets/esri/core/workers/chunks/f2aa8090827086c62dde.js +1 -0
- package/assets/esri/core/workers/chunks/f48eb59b94ba8b7d4d72.js +1 -0
- package/assets/esri/core/workers/chunks/f5741d09fd4e1809f580.js +1 -0
- package/assets/esri/core/workers/chunks/fe3832107278244dc04d.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +1 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor.json +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_en.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_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.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/FeatureTable/t9n/FeatureTable.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/FocusAreaColor.glsl.js +10 -8
- package/chunks/FocusAreaMask.glsl.js +1 -1
- package/chunks/Laserlines.glsl.js +2 -2
- package/chunks/aiServices.js +1 -1
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/sphere.js +1 -1
- package/chunks/vec42.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/core/libs/gl-matrix-2/math/vec4.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/effects/FocusArea.d.ts +4 -0
- package/effects/FocusArea.js +5 -0
- package/effects/FocusAreaOutline.d.ts +4 -0
- package/effects/FocusAreaOutline.js +5 -0
- package/effects/FocusAreas.d.ts +4 -0
- package/effects/FocusAreas.js +5 -0
- package/form/elements/GroupElement.js +1 -1
- package/form/elements/inputs.js +1 -1
- package/form/elements.js +1 -1
- package/geometry/projection/projectPointToVector.js +1 -1
- package/geometry/projection/projectVectorToPoint.js +1 -1
- package/geometry/projection/projectVectorToVector.js +1 -1
- package/geometry/projection.js +1 -1
- package/geometry/projectionUtils.js +5 -0
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/meshUtils/elevation.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/geometry.js +1 -1
- package/interfaces.d.ts +745 -567
- package/kernel.js +1 -1
- package/layers/BuildingSceneLayer.js +1 -1
- package/layers/CatalogLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/GroupLayer.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/RouteLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/WFSLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.js +1 -1
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/projectionSupport.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/operationalLayerModuleMap.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/BuildingSummaryStatistics.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/CornersGeoreference.js +1 -1
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/ExtentAndRotationGeoreference.js +1 -1
- package/layers/support/GeoreferenceBase.js +1 -1
- package/layers/support/LocalMediaElementSource.js +1 -1
- package/layers/support/MediaElementView.js +1 -1
- package/layers/support/PolygonCollection.js +1 -1
- package/layers/support/PromiseQueue.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/TelemetryDisplay.js +1 -1
- package/layers/support/TitleCreator.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/featurePopupQueryUtils.js +5 -0
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/multiLayerServiceUtils.js +5 -0
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/networks/CircuitManager.js +1 -1
- package/networks/UnitIdentifierManager.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/networks/support/UNTraceConfiguration.js +1 -1
- package/networks/support/typeUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/rasterRenderers.js +1 -1
- package/renderers/RasterStretchRenderer.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/renderers/support/rasterRendererHelper.js +1 -1
- package/renderers.js +1 -1
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/knowledgeGraph/GraphAddFieldIndexResult.js +5 -0
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddPropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/locator/locationToAddress.js +1 -1
- package/rest/networks/circuits/queryCircuits.js +1 -1
- package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
- package/rest/networks/queryAssociations.js +1 -1
- package/rest/networks/support/CircuitPath.js +5 -0
- package/rest/networks/support/CircuitPathConnectivityElement.js +5 -0
- package/rest/networks/support/CircuitTraceResult.js +5 -0
- package/rest/networks/support/TraceLocation.js +1 -1
- package/rest/networks/support/TraceResult.js +1 -1
- package/rest/networks/unitIdentifiers/support/{QueryUnitIdentifiersParamters.js → QueryUnitIdentifiersParameters.js} +1 -1
- package/rest/support/LocationToAddressParameters.js +1 -1
- package/rest/support/geocodeEnums.js +5 -0
- package/smartMapping/renderers/pieChart.js +1 -1
- package/smartMapping/renderers/predominance.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.d.ts +4 -0
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/smartMapping/statistics/histogram.js +1 -1
- package/smartMapping/statistics/summaryStatistics.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/animationUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/ElevationInfo.d.ts +4 -0
- package/symbols/support/ElevationInfo.js +1 -1
- package/symbols/support/FeatureExpressionInfo.d.ts +4 -0
- package/symbols/support/FeatureExpressionInfo.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/ViewStateManager.js +1 -1
- package/views/2d/constraints/GeometryConstraint.js +1 -1
- package/views/2d/engine/Bitmap.js +1 -1
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/vectorTiles/GlyphMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
- package/views/2d/engine/webgl/animations/infos.js +1 -1
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/animations/utils.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/Colorize.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/Opacity.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedPolyShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechniques.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/enums.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/createGraphicSymbolMeshSchemas.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/grid/GridView2D.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/utils.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/support/projectionUtils.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/LocalAtmosphere.js +1 -1
- package/views/3d/environment/MarsAtmosphere.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/support/Segment.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/SubView3D.js +1 -1
- package/views/3d/layers/TileLayerView3D.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/Graphics3DFeatureStore.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/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/focusAreaStyle.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
- package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl/RenderNode.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaEffect.js +5 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaOutlineItem.js +5 -0
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/FocusAreaColor.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/support/GraphicMover.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/snapping/GridSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
- package/views/layers/CatalogFootprintLayerView.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/layers/PointCloudLayerView.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/TextureCompressionTracker.js +5 -0
- package/views/support/imageReprojection.js +1 -1
- package/views/support/projectionUtils.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/webdoc/support/writeUtils.js +1 -1
- package/webmap/utils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Directions/DirectionsVisibleElements.js +1 -1
- package/widgets/Directions/css.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/VisibleElements.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +5 -0
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Search/LocatorSearchSource.js +1 -1
- package/widgets/Search/SearchSource.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/ShadowCast/DiscreteOptions.js +1 -1
- package/widgets/ShadowCast/DurationOptions.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ShadowCastVisibleElements.js +1 -1
- package/widgets/ShadowCast/ThresholdOptions.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/SelectionToolbar.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utils/isFromElement.js +1 -1
- package/widgets/support/tests.js +1 -1
- package/assets/esri/core/workers/chunks/003ddb190a5cc56f7925.js +0 -1
- package/assets/esri/core/workers/chunks/094e8aae6dada24c8115.js +0 -1
- package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +0 -1
- package/assets/esri/core/workers/chunks/0b70b2ee62904318a12c.js +0 -1
- package/assets/esri/core/workers/chunks/0c2dccec20c0994366fe.js +0 -1
- package/assets/esri/core/workers/chunks/0cf979a093e9744d1e80.js +0 -1
- package/assets/esri/core/workers/chunks/0fb5de3f8a4d69b2d514.js +0 -1
- package/assets/esri/core/workers/chunks/1d7f2abfccc54659d6f2.js +0 -1
- package/assets/esri/core/workers/chunks/1f9c6fbcd4d0eae1e574.js +0 -1
- package/assets/esri/core/workers/chunks/24327d01cb2c5c55a4b7.js +0 -1
- package/assets/esri/core/workers/chunks/253bcc3cc7bc4c2dc6ea.js +0 -1
- package/assets/esri/core/workers/chunks/2b1486a466760d2152f5.js +0 -1
- package/assets/esri/core/workers/chunks/2cf82d3645c75d311e99.js +0 -1
- package/assets/esri/core/workers/chunks/2d90806faa4269828948.js +0 -1
- package/assets/esri/core/workers/chunks/306e262f148b3057b11b.js +0 -1
- package/assets/esri/core/workers/chunks/32ee2708edd307954125.js +0 -1
- package/assets/esri/core/workers/chunks/36b0d6b4089a96475201.js +0 -1
- package/assets/esri/core/workers/chunks/377a7f0f7d304ff9fe5b.js +0 -1
- package/assets/esri/core/workers/chunks/3a743653b786b010a57f.js +0 -1
- package/assets/esri/core/workers/chunks/3bf1cf6c3cba172e2f6d.js +0 -1
- package/assets/esri/core/workers/chunks/3d7eedb787c1e3b9fbfc.js +0 -1
- package/assets/esri/core/workers/chunks/3fe7be535affae31de7e.js +0 -1
- package/assets/esri/core/workers/chunks/40f54c4f8ae63c6f3df9.js +0 -1
- package/assets/esri/core/workers/chunks/417293f00b2c21cc3175.js +0 -1
- package/assets/esri/core/workers/chunks/41cbba9b286cf5558a9c.js +0 -1
- package/assets/esri/core/workers/chunks/42d9989b2aad3ac28d4d.js +0 -1
- package/assets/esri/core/workers/chunks/465f2db4ab8aa9c9f907.js +0 -1
- package/assets/esri/core/workers/chunks/4ca0738ed38c15b68a77.js +0 -1
- package/assets/esri/core/workers/chunks/515e3295495d0958db7e.js +0 -1
- package/assets/esri/core/workers/chunks/51c31e6d014005107d42.js +0 -1
- package/assets/esri/core/workers/chunks/523046e04679e301797d.js +0 -1
- package/assets/esri/core/workers/chunks/536d7986ebb710a8a452.js +0 -1
- package/assets/esri/core/workers/chunks/55f087bca75c3f2a4515.js +0 -1
- package/assets/esri/core/workers/chunks/5617532299f73d186968.js +0 -1
- package/assets/esri/core/workers/chunks/56d2a20c1b143697aa19.js +0 -1
- package/assets/esri/core/workers/chunks/585c7b485c42555ec554.js +0 -346
- package/assets/esri/core/workers/chunks/5890740d5a761b038560.js +0 -1
- package/assets/esri/core/workers/chunks/5dbd8d81d94cfda5bb32.js +0 -1
- package/assets/esri/core/workers/chunks/5e1f7fe6bbc5754efee1.js +0 -1
- package/assets/esri/core/workers/chunks/62b2d3720693c93a60f2.js +0 -1
- package/assets/esri/core/workers/chunks/66e79aa02b3aa12b3778.js +0 -1
- package/assets/esri/core/workers/chunks/67338948e470c1251d8a.js +0 -66
- package/assets/esri/core/workers/chunks/6b23ca6570357f9fb724.js +0 -1
- package/assets/esri/core/workers/chunks/6d1e1a4fcb90ea8b6848.js +0 -1
- package/assets/esri/core/workers/chunks/6ecc3a3737ae8622dfa4.js +0 -1
- package/assets/esri/core/workers/chunks/85efb318cda7260221ae.js +0 -1
- package/assets/esri/core/workers/chunks/86023cc5ccbc7ac43479.js +0 -1
- package/assets/esri/core/workers/chunks/87eca6de502d18d8b7eb.js +0 -1
- package/assets/esri/core/workers/chunks/87fc7b6c3e2d4f7775e2.js +0 -1
- package/assets/esri/core/workers/chunks/937b653b10e8704b38bf.js +0 -1
- package/assets/esri/core/workers/chunks/98ef17d15517368d2383.js +0 -1
- package/assets/esri/core/workers/chunks/9cac00d4bfac14aaae12.js +0 -1
- package/assets/esri/core/workers/chunks/a036503087baa1f9fd00.js +0 -1
- package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +0 -1
- package/assets/esri/core/workers/chunks/aaa6d45316a7d3466d0f.js +0 -1
- package/assets/esri/core/workers/chunks/ae733c963d61065faa54.js +0 -1
- package/assets/esri/core/workers/chunks/b06cb23048c32940f5de.js +0 -1
- package/assets/esri/core/workers/chunks/b5d68d8460b7c15001dd.js +0 -1
- package/assets/esri/core/workers/chunks/bf3555f91492a1a3b613.js +0 -1
- package/assets/esri/core/workers/chunks/bf9b6b74654d303a6dae.js +0 -1
- package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +0 -1
- package/assets/esri/core/workers/chunks/c779335f5d5455c77a62.js +0 -1
- package/assets/esri/core/workers/chunks/c9ab067b07d1eab974d1.js +0 -1
- package/assets/esri/core/workers/chunks/d2ebb72a43d995ed368a.js +0 -1
- package/assets/esri/core/workers/chunks/d3d98ea5b5e56fc60a31.js +0 -1
- package/assets/esri/core/workers/chunks/d52f5214a0330ed2e05e.js +0 -1
- package/assets/esri/core/workers/chunks/d839a237d5edc243d645.js +0 -1
- package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +0 -1
- package/assets/esri/core/workers/chunks/df7ca2fe12e22ccfde17.js +0 -1
- package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +0 -1
- package/assets/esri/core/workers/chunks/e04bcc98a557f77cc6fa.js +0 -1
- package/assets/esri/core/workers/chunks/e77371ddbaf4b2d9be8d.js +0 -1
- package/assets/esri/core/workers/chunks/e89345c7af9d3d4d8452.js +0 -1
- package/assets/esri/core/workers/chunks/ee6240636d04d7d37b7b.js +0 -1
- package/assets/esri/core/workers/chunks/f00f8609bf0d14b488b8.js +0 -1
- package/assets/esri/core/workers/chunks/fc0a3db3d6d26c763fb9.js +0 -1
- package/assets/esri/core/workers/chunks/fc61d02286b6ff5447cc.js +0 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerTechnique.js +0 -5
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedShader.js +0 -5
- package/views/FocusArea.js +0 -5
- package/views/FocusAreaOutline.js +0 -5
- package/views/FocusAreaOutlineItem.js +0 -5
- package/views/FocusAreas.js +0 -5
- package/views/support/TextureCompressionHandle.js +0 -5
package/layers/VideoLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import r from"../request.js";import{deprecatedProperty as o}from"../core/deprecate.js";import l from"../core/Error.js";import i from"../core/Logger.js";import{clamp as s}from"../core/mathUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{watch as a,initial as p,whenOnce as u}from"../core/reactiveUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../core/accessorSupport/decorators/subclass.js";import c from"../geometry/Extent.js";import h from"../geometry/Polyline.js";import f from"../geometry/SpatialReference.js";import v from"./Layer.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{parse as j}from"./support/arcgisLayerUrl.js";import{url as b}from"./support/commonProperties.js";import T from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as C}from"./support/serviceCapabilitiesUtils.js";import w from"./support/TelemetryData.js";import x from"./support/TelemetryDisplay.js";import I from"./support/VideoFrame.js";import L from"./support/VideoTimeExtent.js";import U from"./video/VideoController.js";import{getFrameHorizonPoints as E,getGroundControlPoints as N,getTelemetryData as P,getServiceLayersInfo as J,getSensorTrailPoints as M,readVideoTimeExtent as R}from"./video/videoUtils.js";import k from"../symbols/SimpleFillSymbol.js";import H from"../symbols/SimpleLineSymbol.js";import V from"../symbols/SimpleMarkerSymbol.js";let z=[];const F=new t([255,127,0]),q=new t([0,0,0,.05]),D=new V({angle:0,color:F,size:10,style:"cross"}),G=new k({color:q,outline:new H({color:F,width:2})}),_=new H({color:F,width:1}),B=new V({angle:0,color:F,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"}),W=new H({color:F,width:1});let A=class extends(g(O(n(S(v))))){constructor(e){super(e),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new U,this.copyright=null,this.created=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCenterSymbol=D.clone(),this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.frameOutlineSymbol=G.clone(),this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=B.clone(),this.sensorSightLineSymbol=_.clone(),this.sensorTrailSymbol=W.clone(),this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=f.WGS84,this.start=0,this.telemetryDisplay=null,this.telemetryColor=F,this.title=null,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.telemetryDisplay=new x({frame:!1,frameCenter:!1,frameOutline:!0,lineOfSight:!0,sensorLocation:!0,sensorTrail:!0}),this.addHandles([a((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),a((()=>this.telemetry?.sensorLocation),(e=>this._setSensorTrail(e)),p)]),u((()=>this.loaded&&"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}destroy(){this.removeAllHandles(),this.controller&&this.controller.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(e){this.controller.autoplay=e}get buffered(){return this.controller.buffered}readCapabilitiesFromService(e,t){return C(t)}readConnectionInfo(e,t){const r=Object.values(t.connectionUrl);return r?.length&&(this.controller.playerUrl=r[0]),t.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return E(this.metadata)}get groundControlPoints(){return N(this.metadata)}get isLive(){return this.controller?.isLive??!1}get livestreamStatus(){return this.controller?.livestreamStatus}get loop(){return this.controller.loop}set loop(e){this.controller.loop=e}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(e){this.controller.muted=e}get playbackRate(){return this.controller.rate}set playbackRate(e){this.controller.rate=e}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get state(){return this.controller.state}get telemetry(){return P(this.metadata)}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return J(t)}get videoTimeExtent(){return o(i.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get volume(){return this.controller?.volume??0}set volume(e){this.controller.volume=e}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(e){if(this.duration<0)return;const t=s(e,0,this.duration);this.controller.setCurrentTime(t)}toGround(e,t){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(e,t):null}toVideo(e){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const t=this.controller.sensorModel.transformGeoToImage(e.x,e.y,e.z);return{x:t[0],y:t[1]}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const t=j(this.parsedUrl?.path);if(null==t)throw new l("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");let o=null;const{data:i,ssl:s}=await r(t.url.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e}),n=i;if(this.url=t.url.path,s&&(this.url=this.url.replace(/^http:/i,"https:")),!n?.currentVersion)return n.currentVersion="11.2",this.sourceJSON=n,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});let a=t?.sublayer;if(null==a&&n.layers?.length&&(a=n.layers[0].id),null==a)throw new l("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");this.url=`${t.url.path}/${a}`,o=await r(this.url,{query:{f:"json",...this.customParameters},signal:e});const p={...n,...o.data};this.sourceJSON=p,this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=M(e,z);z=[...t];const r=z.map((e=>e.toArray())),o=new h({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([y()],A.prototype,"autoplay",null),e([y({readOnly:!0})],A.prototype,"buffered",null),e([y({readOnly:!0,json:{read:!1}})],A.prototype,"capabilities",void 0),e([m("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],A.prototype,"readCapabilitiesFromService",null),e([y({readOnly:!0})],A.prototype,"codecs",void 0),e([y({readOnly:!0})],A.prototype,"connectionInfo",void 0),e([m("connectionInfo",["connectionUrl"])],A.prototype,"readConnectionInfo",null),e([y()],A.prototype,"controller",void 0),e([y({type:String})],A.prototype,"copyright",void 0),e([y({readOnly:!0,type:Date})],A.prototype,"created",void 0),e([y({type:Number})],A.prototype,"currentTime",null),e([y({type:String})],A.prototype,"description",void 0),e([y({type:Number})],A.prototype,"duration",null),e([y({readOnly:!0})],A.prototype,"elevationSource",void 0),e([y({type:Boolean})],A.prototype,"ended",null),e([y({type:I})],A.prototype,"frame",void 0),e([y()],A.prototype,"frameCenterSymbol",void 0),e([y({readOnly:!0,type:Number})],A.prototype,"frameCount",void 0),e([y()],A.prototype,"frameEffect",void 0),e([y()],A.prototype,"frameOpacity",void 0),e([y()],A.prototype,"frameOutlineSymbol",void 0),e([y({type:c})],A.prototype,"fullExtent",void 0),e([y({readOnly:!0})],A.prototype,"frameHorizonPoints",null),e([y({readOnly:!0,nonNullable:!1,json:{read:{reader:R,source:"time"}},type:L})],A.prototype,"fullTimeExtent",void 0),e([y({readOnly:!0})],A.prototype,"groundControlPoints",null),e([y({type:c})],A.prototype,"initialExtent",void 0),e([y({readOnly:!0})],A.prototype,"isLive",null),e([y({readOnly:!0,json:{read:{source:"id"}}})],A.prototype,"layerId",void 0),e([y({readOnly:!0})],A.prototype,"livestreamStatus",null),e([y({type:Boolean})],A.prototype,"loop",null),e([y({readOnly:!0})],A.prototype,"metadata",null),e([y({readOnly:!0})],A.prototype,"mimeType",null),e([y({type:Boolean})],A.prototype,"muted",null),e([y({type:T})],A.prototype,"playbackInfo",void 0),e([y({type:Number})],A.prototype,"playbackRate",null),e([y({type:String})],A.prototype,"playerUrl",null),e([y({readOnly:!0})],A.prototype,"playing",null),e([y({readOnly:!0,json:{read:{source:"poster"}}})],A.prototype,"posterUrl",void 0),e([y({readOnly:!0})],A.prototype,"qualities",void 0),e([y()],A.prototype,"sensorSymbol",void 0),e([y()],A.prototype,"sensorSightLineSymbol",void 0),e([y()],A.prototype,"sensorTrailSymbol",void 0),e([y({readOnly:!0})],A.prototype,"serviceItemId",void 0),e([y()],A.prototype,"sourceJSON",void 0),e([y({readOnly:!0})],A.prototype,"sourceQuality",void 0),e([y({readOnly:!0,json:{name:"serviceType"}})],A.prototype,"sourceType",void 0),e([y()],A.prototype,"spatialReference",void 0),e([y()],A.prototype,"start",void 0),e([y({readOnly:!0,type:String})],A.prototype,"state",null),e([y({readOnly:!0,type:w})],A.prototype,"telemetry",null),e([y({type:x})],A.prototype,"telemetryDisplay",void 0),e([y({type:t})],A.prototype,"telemetryColor",void 0),e([y({readOnly:!1,json:{read:{source:"name"}}})],A.prototype,"title",void 0),e([y({readOnly:!0})],A.prototype,"type",void 0),e([y(b)],A.prototype,"url",void 0),e([y({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],A.prototype,"version",void 0),e([y({readOnly:!0})],A.prototype,"videoElement",null),e([y({readOnly:!0})],A.prototype,"videoHeight",null),e([y({readOnly:!0,json:{read:!1}})],A.prototype,"videoLayersInfo",void 0),e([m("service","videoLayersInfo",["id","name","poster","serviceType","type"])],A.prototype,"readLayerInfosFromService",null),e([y({type:L,nonNullable:!1,readOnly:!0})],A.prototype,"videoTimeExtent",null),e([y({readOnly:!0})],A.prototype,"videoWidth",null),e([y()],A.prototype,"volume",null),e([y({readOnly:!0})],A.prototype,"waiting",null),A=e([d("esri.layers.VideoLayer")],A);const Q=A;export{Q as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import r from"../request.js";import{deprecatedProperty as o}from"../core/deprecate.js";import i from"../core/Error.js";import s from"../core/Logger.js";import{clamp as l}from"../core/mathUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as p}from"../core/promiseUtils.js";import{watch as a,initial as y,whenOnce as m}from"../core/reactiveUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import{Integer as d}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as f}from"../core/accessorSupport/PropertyOrigin.js";import v from"../geometry/Extent.js";import g from"../geometry/Polyline.js";import S from"../geometry/SpatialReference.js";import b from"./Layer.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as O,effectProperty as T}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{titleFromUrlAndName as x}from"./support/arcgisLayerUrl.js";import{opacity as U,id as P}from"./support/commonProperties.js";import{normalizeParsedUrlObject as E,urlProperty as N}from"./support/multiLayerServiceUtils.js";import M from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as k}from"./support/serviceCapabilitiesUtils.js";import V from"./support/TelemetryData.js";import F from"./support/TelemetryDisplay.js";import R from"./support/VideoFrame.js";import G from"./support/VideoTimeExtent.js";import J from"./video/VideoController.js";import{getFrameHorizonPoints as A,getGroundControlPoints as H,getTelemetryData as z,getServiceLayersInfo as q,getStyledTelemetrySymbol as D,getSensorTrailPoints as _,readVideoTimeExtent as B}from"./video/videoUtils.js";import W from"../symbols/CIMSymbol.js";import Q from"../symbols/PictureMarkerSymbol.js";import $ from"../symbols/SimpleFillSymbol.js";import Z from"../symbols/SimpleLineSymbol.js";import K from"../symbols/SimpleMarkerSymbol.js";import X from"../symbols/Symbol.js";import{write as Y}from"../symbols/support/jsonUtils.js";function ee(e,t){return{ignoreOrigin:this.originIdOf(t)<f.PORTAL_ITEM}}let te=[];const re=new t([255,127,0]),oe=new t([0,0,0,.05]),ie=new K({angle:0,color:re,size:10,style:"cross"}),se=new $({color:oe,outline:new Z({color:re,width:2})}),le=new Z({color:re,width:1}),ne=new K({angle:0,color:re,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"}),pe=new Z({color:re,width:1}),ae={types:{base:X,key:"type",typeMap:{"simple-marker":K,"picture-marker":Q,cim:W}},json:{write:{writer:Y,overridePolicy:ee}}};let ye=class extends(O(C(j(I(L(n(w(b)))))))){constructor(e){super(e),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new J,this.copyright=null,this.created=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCenterSymbol=ie.clone(),this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.frameOutlineSymbol=se.clone(),this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.operationalLayerType="ArcGISVideoLayer",this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=ne.clone(),this.sensorSightLineSymbol=le.clone(),this.sensorTrailSymbol=pe.clone(),this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=S.WGS84,this.start=0,this.telemetryDisplay=new F,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.addHandles([a((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),a((()=>this.telemetry?.sensorLocation),(e=>this._setSensorTrail(e)),y)]),m((()=>this.loaded&&"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}destroy(){this.removeAllHandles(),this.controller&&this.controller.destroy()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Video Service"],supportsData:!1},e).catch(p).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(e){this.controller.autoplay=e}get buffered(){return this.controller.buffered}readCapabilitiesFromService(e,t){return k(t)}readConnectionInfo(e,t){const r=Object.values(t.connectionUrl);return r?.length&&(this.controller.playerUrl=r[0]),t.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return A(this.metadata)}get groundControlPoints(){return H(this.metadata)}get isLive(){return this.controller?.isLive??!1}get livestreamStatus(){return this.controller?.livestreamStatus}get loop(){return this.controller.loop}set loop(e){this.controller.loop=e}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(e){this.controller.muted=e}get parsedUrl(){return E(this)}get playbackRate(){return this.controller.rate}set playbackRate(e){this.controller.rate=e}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get started(){return this.controller?.started??!1}get state(){return this.controller.state}get telemetry(){return z(this.metadata)}readTitleFromService(e,{name:t}){return this.url?x(this.url,t):t}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return q(t)}get videoTimeExtent(){return o(s.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get volume(){return this.controller?.volume??0}set volume(e){this.controller.volume=e}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(e){if(this.duration<0)return;const t=l(e,0,this.duration);this.controller.setCurrentTime(t)}toGround(e,t){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(e,t):null}toVideo(e){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const t=this.controller.sensorModel.transformGeoToImage(e.x,e.y,e.z);return{x:t[0],y:t[1]}}updateTelemetryColor(e){this.frameCenterSymbol=D(this.frameCenterSymbol,e)??ie,this.frameOutlineSymbol=D(this.frameOutlineSymbol,e,oe)??se,this.sensorSightLineSymbol=D(this.sensorSightLineSymbol,e)??le,this.sensorTrailSymbol=D(this.sensorTrailSymbol,e)??pe,this.sensorSymbol=D(this.sensorSymbol,e)??ne}write(e,t){return null==this.layerId?(t?.messages?.push(new i("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' cannot be saved to a web map, web scene, or portal item. The ArcGIS server version must be greater than 11.2.`)),null):super.write(e,t)}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.url,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e});if(o&&(this.url=this.url.replace(/^http:/i,"https:")),!t?.currentVersion)return t.currentVersion="11.2",this.sourceJSON=t,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});if(this.layerId??=t.layers?.[0]?.id??null,null==this.layerId)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");const{data:s}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters},signal:e});this.sourceJSON={...t,...s},this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=_(e,te);te=[...t];const r=te.map((e=>e.toArray())),o=new g({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],ye.prototype,"autoplay",null),e([u({readOnly:!0})],ye.prototype,"buffered",null),e([u({readOnly:!0,json:{read:!1}})],ye.prototype,"capabilities",void 0),e([c("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],ye.prototype,"readCapabilitiesFromService",null),e([u({readOnly:!0})],ye.prototype,"codecs",void 0),e([u({readOnly:!0})],ye.prototype,"connectionInfo",void 0),e([c("connectionInfo",["connectionUrl"])],ye.prototype,"readConnectionInfo",null),e([u()],ye.prototype,"controller",void 0),e([u({type:String})],ye.prototype,"copyright",void 0),e([u({readOnly:!0,type:Date})],ye.prototype,"created",void 0),e([u({type:Number})],ye.prototype,"currentTime",null),e([u({type:String})],ye.prototype,"description",void 0),e([u({type:Number})],ye.prototype,"duration",null),e([u({readOnly:!0})],ye.prototype,"elevationSource",void 0),e([u({type:Boolean})],ye.prototype,"ended",null),e([u({type:R})],ye.prototype,"frame",void 0),e([u()],ye.prototype,"frameCenterSymbol",void 0),e([u({readOnly:!0,type:d})],ye.prototype,"frameCount",void 0),e([u(T)],ye.prototype,"frameEffect",void 0),e([u(U)],ye.prototype,"frameOpacity",void 0),e([u()],ye.prototype,"frameOutlineSymbol",void 0),e([u({type:v})],ye.prototype,"fullExtent",void 0),e([u({readOnly:!0})],ye.prototype,"frameHorizonPoints",null),e([u({readOnly:!0,json:{read:{reader:B,source:"time"}},type:G})],ye.prototype,"fullTimeExtent",void 0),e([u({readOnly:!0})],ye.prototype,"groundControlPoints",null),e([u(P)],ye.prototype,"id",void 0),e([u({type:v})],ye.prototype,"initialExtent",void 0),e([u({readOnly:!0})],ye.prototype,"isLive",null),e([u({type:d,json:{read:!1,origins:{service:{read:{source:"id"}}}}})],ye.prototype,"layerId",void 0),e([u({readOnly:!0})],ye.prototype,"livestreamStatus",null),e([u({type:Boolean})],ye.prototype,"loop",null),e([u({readOnly:!0})],ye.prototype,"metadata",null),e([u({readOnly:!0})],ye.prototype,"mimeType",null),e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],ye.prototype,"muted",null),e([u({type:["ArcGISVideoLayer"]})],ye.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],ye.prototype,"parsedUrl",null),e([u({type:M})],ye.prototype,"playbackInfo",void 0),e([u({type:Number})],ye.prototype,"playbackRate",null),e([u({readOnly:!0,type:String})],ye.prototype,"playerUrl",null),e([u({readOnly:!0})],ye.prototype,"playing",null),e([u({readOnly:!0,json:{read:{source:"poster"}}})],ye.prototype,"posterUrl",void 0),e([u({readOnly:!0})],ye.prototype,"qualities",void 0),e([u(ae)],ye.prototype,"sensorSymbol",void 0),e([u()],ye.prototype,"sensorSightLineSymbol",void 0),e([u()],ye.prototype,"sensorTrailSymbol",void 0),e([u({readOnly:!0})],ye.prototype,"serviceItemId",void 0),e([u()],ye.prototype,"sourceJSON",void 0),e([u({readOnly:!0})],ye.prototype,"sourceQuality",void 0),e([u({readOnly:!0,json:{name:"serviceType"}})],ye.prototype,"sourceType",void 0),e([u()],ye.prototype,"spatialReference",void 0),e([u({json:{write:!0}})],ye.prototype,"start",void 0),e([u({readOnly:!0})],ye.prototype,"started",null),e([u({readOnly:!0,type:String})],ye.prototype,"state",null),e([u({readOnly:!0,type:V})],ye.prototype,"telemetry",null),e([u({type:F,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],ye.prototype,"telemetryDisplay",void 0),e([c("service","title",["name"])],ye.prototype,"readTitleFromService",null),e([u({readOnly:!0})],ye.prototype,"type",void 0),e([u(N())],ye.prototype,"url",void 0),e([u({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],ye.prototype,"version",void 0),e([u({readOnly:!0})],ye.prototype,"videoElement",null),e([u({readOnly:!0})],ye.prototype,"videoHeight",null),e([u({readOnly:!0,json:{read:!1}})],ye.prototype,"videoLayersInfo",void 0),e([c("service","videoLayersInfo",["id","name","poster","serviceType","type"])],ye.prototype,"readLayerInfosFromService",null),e([u({type:G,readOnly:!0})],ye.prototype,"videoTimeExtent",null),e([u({readOnly:!0})],ye.prototype,"videoWidth",null),e([u()],ye.prototype,"volume",null),e([u({readOnly:!0})],ye.prototype,"waiting",null),ye=e([h("esri.layers.VideoLayer")],ye);const me=ye;export{me as default};
|
package/layers/WFSLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import{MultiOriginJSONMixin as t}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as i}from"../core/object.js";import{urlToObject as o}from"../core/urlUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import{Integer as n}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as p}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";import l from"../geometry/Extent.js";import m from"../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as d}from"../geometry/support/typeUtils.js";import u from"./Layer.js";import{WFSSource as y}from"./graphics/sources/WFSSource.js";import{BlendLayer as f}from"./mixins/BlendLayer.js";import{CustomParametersMixin as c}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as w}from"./mixins/OrderedLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as I}from"./mixins/TemporalLayer.js";import{TrackableLayer as O}from"./mixins/TrackableLayer.js";import{wfsOidFieldName as R}from"./ogc/wfsUtils.js";import{elevationInfo as S,labelsVisible as P,legendEnabled as T,opacityDrawingInfo as C,popupEnabled as E,screenSizePerspectiveEnabled as q,url as L}from"./support/commonProperties.js";import U from"./support/Field.js";import{defineFieldProperties as D}from"./support/fieldProperties.js";import{fixRendererFields as Q,fixTimeInfoFields as W}from"./support/fieldUtils.js";import N from"./support/LabelClass.js";import{reader as V}from"./support/labelingInfo.js";import{webSceneRendererTypes as X,rendererTypes as Y}from"../renderers/support/typeUtils.js";import k from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";import{timeZoneProperty as J}from"../time/timeZoneUtils.js";var M;const Z=D();let _=M=class extends(w(h(c(j(g(f(I(O(b(F(v(x(t(u)))))))))))))){static fromWFSLayerInfo(e){const{customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:m,wfsCapabilities:d}=e;return new M({customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:m,wfsCapabilities:d})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new y({layer:this}),this.spatialReference=m.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),Q(this.renderer,this.fieldsIndex),W(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,t){const o=e.filter((e=>e.name!==R));this.geometryField&&o.unshift(new U({name:this.geometryField,alias:this.geometryField,type:"geometry"})),i(t,o.map((e=>e.toJSON())),r)}get parsedUrl(){return o(this.url)}set renderer(e){Q(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new k({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:r,timeExtent:t}=this;return e.timeExtent=null!=r&&null!=t?t.offset(-r.value,r.unit):t||null,e}getFieldDomain(e,r){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,r){return this.load().then((()=>this.source.queryFeatures(k.from(e)||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this.load().then((()=>this.source.queryObjectIds(k.from(e)||this.createQuery(),r)))}queryFeatureCount(e,r){return this.load().then((()=>this.source.queryFeatureCount(k.from(e)||this.createQuery(),r)))}queryExtent(e,r){return this.load().then((()=>this.source.queryExtent(k.from(e)||this.createQuery(),r)))}async hasDataChanged(){try{const{dataChanged:e,updates:r}=await this.source.refresh();return null!=r&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([s({readOnly:!0})],_.prototype,"capabilities",null),e([s({type:String})],_.prototype,"copyright",void 0),e([s({readOnly:!0})],_.prototype,"createQueryVersion",null),e([s({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],_.prototype,"customParameters",void 0),e([s(J("dateFieldsTimeReference"))],_.prototype,"dateFieldsTimeZone",void 0),e([s({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([s({type:String})],_.prototype,"displayField",void 0),e([s(S)],_.prototype,"elevationInfo",void 0),e([s({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"featureUrl",void 0),e([s({type:[U],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([a("fields")],_.prototype,"writeFields",null),e([s(Z.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([s({type:l,json:{name:"extent"}})],_.prototype,"fullExtent",void 0),e([s()],_.prototype,"geometryField",void 0),e([s({type:String,json:{read:{source:"layerDefinition.geometryType",reader:d.read},write:{target:"layerDefinition.geometryType",writer:d.write,ignoreOrigin:!0},origins:{service:{read:d.read}}}})],_.prototype,"geometryType",void 0),e([s({type:String})],_.prototype,"id",void 0),e([s(P)],_.prototype,"labelsVisible",void 0),e([s({type:[N],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:V},write:!0}})],_.prototype,"labelingInfo",void 0),e([s(T)],_.prototype,"legendEnabled",void 0),e([s({type:["show","hide"]})],_.prototype,"listMode",void 0),e([s({type:String})],_.prototype,"objectIdField",void 0),e([s({type:["WFS"]})],_.prototype,"operationalLayerType",void 0),e([s({type:n,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"maxRecordCount",void 0),e([s({type:n})],_.prototype,"maxPageCount",void 0),e([s({type:n})],_.prototype,"maxTotalRecordCount",void 0),e([s({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],_.prototype,"mode",void 0),e([s({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"name",void 0),e([s({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"namespaceUri",void 0),e([s(C)],_.prototype,"opacity",void 0),e([s(Z.outFields)],_.prototype,"outFields",void 0),e([s({readOnly:!0})],_.prototype,"parsedUrl",null),e([s(E)],_.prototype,"popupEnabled",void 0),e([s({type:r,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([s({types:Y,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],_.prototype,"renderer",null),e([s(q)],_.prototype,"screenSizePerspectiveEnabled",void 0),e([s({readOnly:!0})],_.prototype,"source",void 0),e([s({type:m,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],_.prototype,"spatialReference",void 0),e([s({readOnly:!0,type:[n],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"spatialReferences",void 0),e([s({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"swapXY",void 0),e([s({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],_.prototype,"title",void 0),e([s({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([s(L)],_.prototype,"url",void 0),e([s({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"version",void 0),e([s()],_.prototype,"wfsCapabilities",null),_=M=e([p("esri.layers.WFSLayer")],_);const z=_;export{z as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../PopupTemplate.js";import t from"../core/Error.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as o}from"../core/object.js";import{urlToObject as s}from"../core/urlUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{Integer as p}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{subclass as a}from"../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../core/accessorSupport/decorators/writer.js";import m from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as u}from"../geometry/support/typeUtils.js";import y from"./Layer.js";import{WFSSource as f}from"./graphics/sources/WFSSource.js";import{BlendLayer as c}from"./mixins/BlendLayer.js";import{CustomParametersMixin as h}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as g}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as j}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as w}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as b}from"./mixins/OrderedLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{RefreshableLayer as F}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as I}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as O}from"./mixins/TemporalLayer.js";import{TrackableLayer as S}from"./mixins/TrackableLayer.js";import{wfsOidFieldName as R}from"./ogc/wfsUtils.js";import{elevationInfo as P,labelsVisible as T,legendEnabled as q,opacityDrawingInfo as L,popupEnabled as E,screenSizePerspectiveEnabled as C,url as U}from"./support/commonProperties.js";import{validateBinsQuery as D}from"./support/featureLayerUtils.js";import Q from"./support/Field.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import{fixRendererFields as B,fixTimeInfoFields as A}from"./support/fieldUtils.js";import N from"./support/LabelClass.js";import{reader as V}from"./support/labelingInfo.js";import{webSceneRendererTypes as X,rendererTypes as Y}from"../renderers/support/typeUtils.js";import k from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";import{timeZoneProperty as J}from"../time/timeZoneUtils.js";var M;const Z=W();let _=M=class extends(b(g(h(w(j(c(O(S(F(I(v(x(i(y)))))))))))))){static fromWFSLayerInfo(e){const{customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:m,wfsCapabilities:d}=e;return new M({customParameters:r,fields:t,geometryField:i,geometryType:o,name:s,namespaceUri:n,objectIdField:p,spatialReference:a,swapXY:l,url:m,wfsCapabilities:d})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxRecordCount=3e3,this.maxPageCount=10,this.maxTotalRecordCount=2e5,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new f({layer:this}),this.spatialReference=d.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),B(this.renderer,this.fieldsIndex),A(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,r,t){const i=e.filter((e=>e.name!==R));this.geometryField&&i.unshift(new Q({name:this.geometryField,alias:this.geometryField,type:"geometry"})),o(t,i.map((e=>e.toJSON())),r)}get parsedUrl(){return s(this.url)}set renderer(e){B(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new k({returnGeometry:!0,outFields:["*"],where:this.definitionExpression||"1=1"}),{timeOffset:r,timeExtent:t}=this;return e.timeExtent=null!=r&&null!=t?t.offset(-r.value,r.unit):t||null,e}getFieldDomain(e,r){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,r){return this.load().then((()=>this.source.queryFeatures(k.from(e)||this.createQuery(),r))).then((e=>{if(e?.features)for(const r of e.features)r.layer=r.sourceLayer=this;return e}))}queryObjectIds(e,r){return this.load().then((()=>this.source.queryObjectIds(k.from(e)||this.createQuery(),r)))}queryFeatureCount(e,r){return this.load().then((()=>this.source.queryFeatureCount(k.from(e)||this.createQuery(),r)))}queryExtent(e,r){return this.load().then((()=>this.source.queryExtent(k.from(e)||this.createQuery(),r)))}async queryAttributeBins(e,r){const{source:i,capabilities:o}=await this.load(),s="WFSLayer";if(!i.queryAttributeBins||!o?.operations?.supportsQueryBins)throw new t(s,"Layer source does not support queryAttributeBins capability");D(e,o,s);const n=await import("../rest/support/AttributeBinsQuery.js"),p=await i.queryAttributeBins(n.default.from(e),r);if(p.features)for(const t of p.features)t.layer=t.sourceLayer=this;return p}async hasDataChanged(){try{const{dataChanged:e,updates:r}=await this.source.refresh();return null!=r&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};e([n({readOnly:!0})],_.prototype,"capabilities",null),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"createQueryVersion",null),e([n({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],_.prototype,"customParameters",void 0),e([n(J("dateFieldsTimeReference"))],_.prototype,"dateFieldsTimeZone",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([n({type:String})],_.prototype,"displayField",void 0),e([n(P)],_.prototype,"elevationInfo",void 0),e([n({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"featureUrl",void 0),e([n({type:[Q],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([l("fields")],_.prototype,"writeFields",null),e([n(Z.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n({type:m,json:{name:"extent"}})],_.prototype,"fullExtent",void 0),e([n()],_.prototype,"geometryField",void 0),e([n({type:String,json:{read:{source:"layerDefinition.geometryType",reader:u.read},write:{target:"layerDefinition.geometryType",writer:u.write,ignoreOrigin:!0},origins:{service:{read:u.read}}}})],_.prototype,"geometryType",void 0),e([n({type:String})],_.prototype,"id",void 0),e([n(T)],_.prototype,"labelsVisible",void 0),e([n({type:[N],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:V},write:!0}})],_.prototype,"labelingInfo",void 0),e([n(q)],_.prototype,"legendEnabled",void 0),e([n({type:["show","hide"]})],_.prototype,"listMode",void 0),e([n({type:String})],_.prototype,"objectIdField",void 0),e([n({type:["WFS"]})],_.prototype,"operationalLayerType",void 0),e([n({type:p,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"maxRecordCount",void 0),e([n({type:p})],_.prototype,"maxPageCount",void 0),e([n({type:p})],_.prototype,"maxTotalRecordCount",void 0),e([n({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],_.prototype,"mode",void 0),e([n({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"name",void 0),e([n({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"namespaceUri",void 0),e([n(L)],_.prototype,"opacity",void 0),e([n(Z.outFields)],_.prototype,"outFields",void 0),e([n({readOnly:!0})],_.prototype,"parsedUrl",null),e([n(E)],_.prototype,"popupEnabled",void 0),e([n({type:r,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:Y,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],_.prototype,"renderer",null),e([n(C)],_.prototype,"screenSizePerspectiveEnabled",void 0),e([n({readOnly:!0})],_.prototype,"source",void 0),e([n({type:d,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],_.prototype,"spatialReference",void 0),e([n({readOnly:!0,type:[p],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"spatialReferences",void 0),e([n({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"swapXY",void 0),e([n({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n(U)],_.prototype,"url",void 0),e([n({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],_.prototype,"version",void 0),e([n()],_.prototype,"wfsCapabilities",null),_=M=e([a("esri.layers.WFSLayer")],_);const z=_;export{z as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import a from"../../core/Loadable.js";import n from"../../core/Logger.js";import p from"../../core/Promise.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../geometry/Extent.js";import m from"../../geometry/SpatialReference.js";import h from"../FeatureLayer.js";import f from"./BuildingSublayer.js";import{zeroCapabilities as g}from"../support/capabilities.js";import{popupEnabled as j}from"../support/commonProperties.js";import{getFieldDomain as v}from"../support/featureLayerUtils.js";import{defineFieldProperties as L}from"../support/fieldProperties.js";import b from"../support/FieldsIndex.js";import{unpackFieldNames as I}from"../support/fieldUtils.js";import{fetchIndexInfo as S}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as F,I3SMaterialDefinition as w,I3STextureSetDefinition as O,I3SGeometryDefinition as x}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as P}from"../../renderers/support/typeUtils.js";import q from"../../rest/support/Query.js";import{isNumber as T}from"../../support/guards.js";import{createPopupTemplate as Q}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as E}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as D,getFetchPopupTemplate as R}from"../../views/layers/support/popupUtils.js";const A=L();let _=class extends(a.LoadableMixin(p.EsriPromiseMixin(f))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new b(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=S(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return Q(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?v(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:g,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}}createQuery(){const e=new q;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(T)}async queryCachedAttributes(e,t){const r=I(this.fieldsIndex,await D(this,R(this)));return E(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new s("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],_.prototype,"parsedUrl",null),e([l({type:F,readOnly:!0})],_.prototype,"nodePages",void 0),e([l({type:[w],readOnly:!0})],_.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],_.prototype,"textureSetDefinitions",void 0),e([l({type:[x],readOnly:!0})],_.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],_.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],_.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],_.prototype,"rootNode",void 0),e([l({readOnly:!0})],_.prototype,"attributeStorageInfo",void 0),e([l(A.fields)],_.prototype,"fields",void 0),e([l({readOnly:!0})],_.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],_.prototype,"associatedLayer",void 0),e([y("service","associatedLayer",["associatedLayerID"])],_.prototype,"readAssociatedLayer",null),e([l(A.outFields)],_.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],_.prototype,"objectIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],_.prototype,"displayField",null),e([l({readOnly:!0,type:String})],_.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],_.prototype,"customParameters",null),e([l({readOnly:!0,type:c})],_.prototype,"fullExtent",null),e([l({readOnly:!0,type:m})],_.prototype,"spatialReference",null),e([l({readOnly:!0})],_.prototype,"version",null),e([l({readOnly:!0,type:U})],_.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],_.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],_.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],_.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],_.prototype,"listMode",void 0),e([l({types:P,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],_.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([l(j)],_.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],_.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],_.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],_.prototype,"defaultPopupTemplate",null),e([l()],_.prototype,"types",null),e([l()],_.prototype,"typeIdField",null),e([l({json:{write:!1}}),u(new i({"3DObject":"3d-object",Point:"point"}))],_.prototype,"layerType",void 0),e([l()],_.prototype,"geometryType",null),e([l()],_.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],_.prototype,"capabilities",null),e([l({readOnly:!0})],_.prototype,"statisticsInfo",void 0),_=e([d("esri.layers.buildingSublayers.BuildingComponentSublayer")],_);const C=_;export{C as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../PopupTemplate.js";import o from"../../request.js";import s from"../../core/Error.js";import{JSONMap as i}from"../../core/jsonMap.js";import a from"../../core/Loadable.js";import n from"../../core/Logger.js";import p from"../../core/Promise.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as u}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as y}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../geometry/Extent.js";import m from"../../geometry/SpatialReference.js";import h from"../FeatureLayer.js";import f from"./BuildingSublayer.js";import{zeroCapabilities as g}from"../support/capabilities.js";import{popupEnabled as j}from"../support/commonProperties.js";import{getFieldDomain as b}from"../support/featureLayerUtils.js";import{defineFieldProperties as v}from"../support/fieldProperties.js";import L from"../support/FieldsIndex.js";import{unpackFieldNames as I}from"../support/fieldUtils.js";import{fetchIndexInfo as S}from"../support/I3SIndexInfo.js";import{I3SNodePageDefinition as F,I3SMaterialDefinition as w,I3STextureSetDefinition as O,I3SGeometryDefinition as x}from"../support/I3SLayerDefinitions.js";import{webSceneRendererTypes as P}from"../../renderers/support/typeUtils.js";import q from"../../rest/support/Query.js";import{isNumber as T}from"../../support/guards.js";import{createPopupTemplate as Q}from"../../support/popupUtils.js";import U from"../../symbols/support/ElevationInfo.js";import{queryAttributesFromCachedAttributesId as E}from"../../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as D,getFetchPopupTemplate as R}from"../../views/layers/support/popupUtils.js";const A=v();let _=class extends(a.LoadableMixin(p.EsriPromiseMixin(f))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=[],this.textureSetDefinitions=[],this.geometryDefinitions=[],this.indexInfo=null,this.serviceUpdateTimeStamp=null,this.store=null,this.attributeStorageInfo=[],this.fields=[],this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl?.path}/sublayers/${this.id}`,query:this.layer.parsedUrl?.query}:{path:""}}get fieldsIndex(){return new L(this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,o=t.associatedLayerID;return null!=r&&"number"==typeof o?new h({portalItem:r,customParameters:this.customParameters,layerId:o}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return""}get globalIdField(){if(null!=this.fields)for(const e of this.fields)if("global-id"===e.type)return e.name;return""}get displayField(){return null!=this.associatedLayer?this.associatedLayer.displayField:void 0}get apiKey(){return this.layer.apiKey}get customParameters(){return this.layer.customParameters}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=null!=e?e.signal:null,r=this._fetchService(t).then((()=>{this.indexInfo=S(this.parsedUrl.path,this.rootNode,this.nodePages,this.customParameters,this.apiKey,n.getLogger(this),t)}));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return Q(this,e)}async _fetchService(e){const t=(await o(this.parsedUrl.path,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?b(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&null!=this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return null!=this.associatedLayer?this.associatedLayer.types??[]:[]}get typeIdField(){return null!=this.associatedLayer?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=null!=this.associatedLayer&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:g,{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}=e;return{query:t,operations:{supportsQuery:r},data:{supportsZ:o,supportsM:s,isVersioned:i}}}createQuery(){const e=new q;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e}))}async queryObjectIds(e,t){const r=await this._getAssociatedLayerForQuery();return(await r.queryObjectIds(e||this.createQuery(),t)).filter(T)}async queryCachedAttributes(e,t){const r=I(this.fieldsIndex,await D(this,R(this)));return E(this.parsedUrl.path,this.attributeStorageInfo,e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new s("scenelayer:feature-not-in-cached-data","Feature not found in cached data");return new t({attributes:o[0],layer:this,sourceLayer:this})}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:null!=this.associatedLayer}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return null!=e&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),null==this.associatedLayer)throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new s("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};e([l({readOnly:!0})],_.prototype,"parsedUrl",null),e([l({type:F,readOnly:!0})],_.prototype,"nodePages",void 0),e([l({type:[w],readOnly:!0})],_.prototype,"materialDefinitions",void 0),e([l({type:[O],readOnly:!0})],_.prototype,"textureSetDefinitions",void 0),e([l({type:[x],readOnly:!0})],_.prototype,"geometryDefinitions",void 0),e([l({readOnly:!0})],_.prototype,"serviceUpdateTimeStamp",void 0),e([l({readOnly:!0})],_.prototype,"store",void 0),e([l({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],_.prototype,"rootNode",void 0),e([l({readOnly:!0})],_.prototype,"attributeStorageInfo",void 0),e([l(A.fields)],_.prototype,"fields",void 0),e([l({readOnly:!0})],_.prototype,"fieldsIndex",null),e([l({readOnly:!0,type:h})],_.prototype,"associatedLayer",void 0),e([y("service","associatedLayer",["associatedLayerID"])],_.prototype,"readAssociatedLayer",null),e([l(A.outFields)],_.prototype,"outFields",void 0),e([l({type:String,readOnly:!0})],_.prototype,"objectIdField",null),e([l({type:String,readOnly:!0})],_.prototype,"globalIdField",null),e([l({readOnly:!0,type:String,json:{read:!1}})],_.prototype,"displayField",null),e([l({readOnly:!0,type:String})],_.prototype,"apiKey",null),e([l({readOnly:!0,type:String})],_.prototype,"customParameters",null),e([l({readOnly:!0,type:c})],_.prototype,"fullExtent",null),e([l({readOnly:!0,type:m})],_.prototype,"spatialReference",null),e([l({readOnly:!0})],_.prototype,"version",null),e([l({readOnly:!0,type:U})],_.prototype,"elevationInfo",null),e([l({readOnly:!0,type:Number})],_.prototype,"minScale",null),e([l({readOnly:!0,type:Number})],_.prototype,"maxScale",null),e([l({readOnly:!0,type:Number})],_.prototype,"effectiveScaleRange",null),e([l({type:["hide","show"],json:{write:!0}})],_.prototype,"listMode",void 0),e([l({types:P,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],_.prototype,"renderer",void 0),e([l({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_.prototype,"definitionExpression",void 0),e([l(j)],_.prototype,"popupEnabled",void 0),e([l({type:r,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],_.prototype,"popupTemplate",void 0),e([l({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],_.prototype,"normalReferenceFrame",void 0),e([l({readOnly:!0,json:{read:!1}})],_.prototype,"defaultPopupTemplate",null),e([l()],_.prototype,"types",null),e([l()],_.prototype,"typeIdField",null),e([l({json:{write:!1}}),u(new i({"3DObject":"3d-object",Point:"point"}))],_.prototype,"layerType",void 0),e([l()],_.prototype,"geometryType",null),e([l()],_.prototype,"profile",null),e([l({readOnly:!0,json:{read:!1}})],_.prototype,"capabilities",null),e([l({readOnly:!0})],_.prototype,"statisticsInfo",void 0),_=e([d("esri.layers.buildingSublayers.BuildingComponentSublayer")],_);const C=_;export{C as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{clone as r}from"../../core/lang.js";import{MultiOriginJSONMixin as i}from"../../core/MultiOriginJSONSupport.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{OriginId as l}from"../../core/accessorSupport/PropertyOrigin.js";import
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{clone as r}from"../../core/lang.js";import{MultiOriginJSONMixin as i}from"../../core/MultiOriginJSONSupport.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{OriginId as l}from"../../core/accessorSupport/PropertyOrigin.js";import s from"../../form/FormTemplate.js";import p from"../Layer.js";import{BlendLayer as a}from"../mixins/BlendLayer.js";import{FeatureEffectLayer as d}from"../mixins/FeatureEffectLayer.js";import{ScaleRangeLayer as u}from"../mixins/ScaleRangeLayer.js";import{attributeTableTemplate as y,elevationInfo as m,labelsVisible as h,legendEnabled as g,maxScale as f,minScale as c,opacity as b,popupEnabled as O}from"../support/commonProperties.js";import{fixRendererFields as I}from"../support/fieldUtils.js";import j from"../support/LabelClass.js";import{reader as F}from"../support/labelingInfo.js";import v from"../../renderers/SimpleRenderer.js";import{webSceneRendererTypes as w,rendererTypes as T}from"../../renderers/support/typeUtils.js";import{createPopupTemplate as E}from"../../support/popupUtils.js";import x from"../../symbols/SimpleFillSymbol.js";function S(){const e=new x({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new v({symbol:e})}let P=class extends(u(d(a(i(p))))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),I(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",(e=>this.emit("apply-edits",e))),this.parent.on("edits",(e=>this.emit("edits",e))),this.parent.on("refresh",(e=>this.emit("refresh",e)))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get displayFilterEnabled(){return this.parent?.displayFilterEnabled??!0}get displayFilterInfo(){return this.parent?.displayFilterInfo??null}get effectiveEditingEnabled(){return!1}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){I(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):S()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createPopupTemplate(e){const t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return E(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}async queryAttributeBins(e,t){return await this.load(),this.parent.queryAttributeBins(e,t)}};e([n(y)],P.prototype,"attributeTableTemplate",void 0),e([n({readOnly:!0})],P.prototype,"apiKey",null),e([n({readOnly:!0})],P.prototype,"capabilities",null),e([n({readOnly:!0})],P.prototype,"customParameters",null),e([n()],P.prototype,"dateFieldsTimeZone",null),e([n({readOnly:!0})],P.prototype,"datesInUnknownTimezone",null),e([n({readOnly:!0})],P.prototype,"definitionExpression",null),e([n({readOnly:!0})],P.prototype,"editingInfo",null),e([n({readOnly:!0})],P.prototype,"effectiveCapabilities",null),e([n({json:{origins:{"web-scene":{write:!1}},write:!0}})],P.prototype,"charts",void 0),e([n({readOnly:!0})],P.prototype,"createQueryVersion",null),e([n({readOnly:!0})],P.prototype,"defaultPopupTemplate",null),e([n({readOnly:!0})],P.prototype,"displayField",null),e([n({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],P.prototype,"editingEnabled",void 0),e([n({readOnly:!0})],P.prototype,"effectiveEditingEnabled",null),e([n((()=>{const e=r(m);return e.json.origins["web-map"]={read:!1,write:!1},e})())],P.prototype,"elevationInfo",void 0),e([n({readOnly:!0})],P.prototype,"fields",null),e([n({readOnly:!0})],P.prototype,"fieldsIndex",null),e([n({type:s,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],P.prototype,"formTemplate",void 0),e([n({readOnly:!0})],P.prototype,"fullExtent",null),e([n({readOnly:!0})],P.prototype,"geometryFieldsInfo",null),e([n({readOnly:!0})],P.prototype,"geometryType",null),e([n({readOnly:!0})],P.prototype,"globalIdField",null),e([n({readOnly:!0})],P.prototype,"hasM",null),e([n({readOnly:!0})],P.prototype,"hasZ",null),e([n({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],P.prototype,"id",void 0),e([n({type:[j],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:F,write:!0}})],P.prototype,"labelingInfo",void 0),e([n(h)],P.prototype,"labelsVisible",void 0),e([n(g)],P.prototype,"legendEnabled",void 0),e([n({type:["show","hide"],json:{write:!0}})],P.prototype,"listMode",void 0),e([n((()=>{const e=r(f);return e.json.origins.service.read=!1,e})())],P.prototype,"maxScale",void 0),e([n((()=>{const e=r(c);return e.json.origins.service.read=!1,e})())],P.prototype,"minScale",void 0),e([n({readOnly:!0})],P.prototype,"objectIdField",null),e([n(b)],P.prototype,"opacity",void 0),e([n({readOnly:!0})],P.prototype,"orderBy",null),e([n({readOnly:!0})],P.prototype,"outFields",null),e([n({clonable:!1})],P.prototype,"parent",void 0),e([n({readOnly:!0})],P.prototype,"parsedUrl",null),e([n(O)],P.prototype,"popupEnabled",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],P.prototype,"popupTemplate",void 0),e([n({readOnly:!0})],P.prototype,"preferredTimeZone",null),e([n({types:T,json:{origins:{"web-scene":{types:w}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<l.PORTAL_ITEM}}}}})],P.prototype,"renderer",null),e([n({readOnly:!0})],P.prototype,"returnM",null),e([n({readOnly:!0})],P.prototype,"returnZ",null),e([n({readOnly:!0})],P.prototype,"source",null),e([n({readOnly:!0})],P.prototype,"timeExtent",null),e([n({readOnly:!0})],P.prototype,"timeInfo",null),e([n({readOnly:!0})],P.prototype,"timeOffset",null),e([n({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],P.prototype,"title",void 0),e([n({json:{read:!1}})],P.prototype,"type",void 0),e([n({readOnly:!0})],P.prototype,"typeIdField",null),e([n({readOnly:!0})],P.prototype,"types",null),e([n({readOnly:!0})],P.prototype,"useViewTime",null),e([n({type:Boolean,json:{name:"visibility",write:!0}})],P.prototype,"visible",void 0),P=e([o("esri.layers.catalog.CatalogFootprintLayer")],P);export{P as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Graphic.js";import t from"../../core/Error.js";import r from"../../core/Logger.js";import{getMetersPerCartesianUnitForSR as a}from"../../core/unitUtils.js";import{parseData as s}from"../../core/urlUtils.js";import{isEqualBaseGCS as o,canProjectWithoutEngine as n,projectWithoutEngine as l}from"../../geometry/
|
|
5
|
+
import e from"../../Graphic.js";import t from"../../core/Error.js";import r from"../../core/Logger.js";import{getMetersPerCartesianUnitForSR as a}from"../../core/unitUtils.js";import{parseData as s}from"../../core/urlUtils.js";import{isEqualBaseGCS as o,canProjectWithoutEngine as n,projectWithoutEngine as l}from"../../geometry/projectionUtils.js";import{fromJSON as i}from"../../geometry/support/jsonUtils.js";import u from"../../geometry/support/MeshTransform.js";import{equals as d}from"../../geometry/support/spatialReferenceUtils.js";import{isFeatureIdentifierArrayWithGlobalId as c,isFeatureIdentifierArrayWithObjectId as p}from"./editingSupport.js";async function m(e,t,r){const{geometry:s}=t,i={...t.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:t}=r,{origin:c,spatialReference:p,vertexSpace:m}=s,f=s.transform??new u,g="local"===m.type,b=e.spatialReference,y=b.isGeographic,R=d(b,p),h=o(p,b)&&n(p,b);if(!(g&&y&&h||!g&&!y&&R))return null;const I=l(c,p,b);if(null==I)return null;if(i[t.originX]=I.x,i[t.originY]=I.y,i[t.originZ]=I.z??0,null!=f){const{translation:e,scale:r,rotation:s}=f,o=g?1:a(p)/a(b);i[t.translationX]=e[0]*o,i[t.translationY]=e[2]*o,i[t.translationZ]=-e[1]*o,i[t.scaleX]=r[0],i[t.scaleY]=r[2],i[t.scaleZ]=r[1],i[t.rotationX]=s[0],i[t.rotationY]=s[2],i[t.rotationZ]=-s[1],i[t.rotationDeg]=s[3]}return{attributes:i}}return null==s?{attributes:i}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:i}}async function f(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>g(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>g(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function g(e,t){const{feature:r,attachment:a}=t,{globalId:o,name:n,contentType:l,data:i,uploadId:u}=a,d={globalId:o};if(r&&("attributes"in r?d.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(d.parentGlobalId=r.globalId)),u)d.uploadId=u;else if(i){const e=await s(i);e&&(d.contentType=e.mediaType,d.data=e.data),i instanceof File&&(d.name=i.name)}return n&&(d.name=n),l&&(d.contentType=l),d}function b(e,t,r){if(!t||0===t.length)return[];if(r&&c(t))return t.map((e=>e.globalId));if(p(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}function y(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||r.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||r.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const a=e?.attachments,s={addFeatureResults:e?.addResults?.map(R)??[],updateFeatureResults:e?.updateResults?.map(R)??[],deleteFeatureResults:e?.deleteResults?.map(R)??[],addAttachmentResults:a?.addResults?a.addResults.map(R):[],updateAttachmentResults:a?.updateResults?a.updateResults.map(R):[],deleteAttachmentResults:a?.deleteResults?a.deleteResults.map(R):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}function R(e){const r=!0===e.success?null:e.error||{code:void 0,description:"Feature edit failed"};return{objectId:e.objectId,globalId:e.globalId,error:r?new t("feature-layer-source:edit-failure",r.description,{code:r.code}):null}}function h(t,r){return new e({attributes:t.attributes,geometry:i({...t.geometry,spatialReference:r})})}function I(e,t){return{adds:e?.adds?.map((e=>h(e,t)))||[],updates:e?.updates?.map((e=>({original:h(e[0],t),current:h(e[1],t)})))||[],deletes:e?.deletes?.map((e=>h(e,t)))||[],spatialReference:t}}function j(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}export{I as createEditedFeatures,R as createFeatureEditResult,f as getAttachmentEditsJSON,b as getFeatureIds,m as getFeatureJSON,j as isProtectedOrPrivateVersionError,y as unpackEditResultData};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import has from"../../../core/has.js";import s from"../../../core/Error.js";import{clone as a}from"../../../core/lang.js";import o from"../../../core/Logger.js";import{destroyMaybe as l,removeMaybe as n,abortMaybe as u}from"../../../core/maybe.js";import h from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,whenOnce as m,watch as f,syncAndInitial as y,sync as _}from"../../../core/reactiveUtils.js";import{sqlAnd as g}from"../../../core/sql.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import{subclass as x}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as v}from"../../../core/support/UpdatingHandles.js";import{projectWithZConversion as D}from"../../../geometry/projection.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as C}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as b}from"../../support/layerUtils.js";import S from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as E}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as T}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as V}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as H}from"../../../views/3d/support/debugFlags.js";let L=class extends(h.EsriPromiseMixin(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void o.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===N.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===N.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>N.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new E(0,0,0,this.layerView.view.featureTiles.tilingScheme,"dummy-tile-full-extent");return new r([e])}const e=this.layerView.view.featureTiles;return e?e.tiles:new r}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new v,this.serviceDataExtent=null,this.serviceDataCount=N.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add((()=>this.displayFeatureLimit),(e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal)))),this._updatingHandles.add((()=>this.mode),(()=>this._modeChanged()),p),this._updatingHandles.add((()=>this.mode),((e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)}),p),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!b(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=l(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=u(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=m((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._updatingHandles.addPromise(t),t.then((()=>{const{layerView:e,tileDescriptors:t}=this,i=e.layer,r=new T({context:this.context,filterExtent:this.extent,tileDescriptors:t,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume();const s=this.layerView.view;s&&this.addHandles(f((()=>s.quality),(e=>r.memoryFactor=e),y));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(f((()=>this.layerView.view?.qualitySettings?.graphics3D?.[a]),(e=>r.lodFactor=e||1),p));const o=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},n=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==i.type&&this._updatingHandles.add((()=>i.createQueryVersion),(()=>this._dataFilterChanged())),this._updatingHandles.add((()=>this.context.effectiveDisplayFilter),(()=>this._effectiveDisplayFilterChanged())),this._updatingHandles.add((()=>e.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._updatingHandles.add((()=>e.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),"customParameters"in i&&this._updatingHandles.add((()=>i.customParameters),(()=>this.restart())),this.addHandles([i.on("apply-edits",(e=>this._applyEdits(e))),f((()=>this.extent),(e=>r.filterExtent=e),_),f((()=>this.tileDescriptors),(e=>r.tileDescriptors=e),_),f((()=>this.maximumNumberOfFeatures),o,y),f((()=>this.serviceDataCount),n,y),f((()=>H.FEATURE_TILE_FETCH_SHOW_TILES),(e=>{e&&r?r.debugger??=new V(r,s.featureTiles.tilingScheme.toTileInfo(),s):!e&&this._tileFetcher&&r.debugger&&(r.debugger=l(r.debugger))}),p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add((()=>this.maxTotalSnapshotVertices),(()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:o.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!d(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new S({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=g(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),o=i.fullExtent,l=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=N.maxFeatureCountForExtent&&(!s||!l)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=o){const e=o.spatialReference?await D(o,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",N.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",N.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:o,verticesPerCoordinate:l}=a,n=o<=0,u=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!u)return void(this._snapshotLimitExceeded=!1);0!==o&&null!=t&&await t;const h=Math.min(s,I),c=this.serviceDataCount,p=c!==N.noServiceDataCount;let m=p?Math.ceil((h-c*o)/(l||1)):Math.ceil(h/(l||1));if(u&&(m=Math.min(m,q)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:N.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await C(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{d(e)||o.getLogger(this).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([F({readOnly:!0})],L.prototype,"type",void 0),e([F({constructOnly:!0})],L.prototype,"graphics",void 0),e([F({constructOnly:!0})],L.prototype,"layerView",void 0),e([F({constructOnly:!0})],L.prototype,"context",void 0),e([F({readOnly:!0})],L.prototype,"dataUpdating",null),e([F()],L.prototype,"extent",null),e([F()],L.prototype,"updating",null),e([F({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([F()],L.prototype,"updatingTotal",null),e([F()],L.prototype,"updatingRemaining",null),e([F()],L.prototype,"expectedFeatureDiff",null),e([F()],L.prototype,"memoryForUnusedFeatures",null),e([F()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([F()],L.prototype,"_snapshotLimitExceeded",void 0),e([F()],L.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([F({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([F({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([F()],L.prototype,"_forceTilesMode",void 0),e([F({readOnly:!0})],L.prototype,"mode",null),e([F({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0})],L.prototype,"tileDescriptors",null),e([F()],L.prototype,"_tileFetcher",void 0),e([F()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([x("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,I=1e6,A=12e3,j=1e4,q=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var N;!function(e){function t(){e.maxFeatureCountForExtent=O,e.queryStatisticsTimeout=A,e.queryExtentTimeout=j}e.noServiceDataCount=1/0,e.maxSnapshotMinScaleFactor=5,e.reset=t}(N||(N={})),N.reset();export{L as FeatureTileController3D,N as FeatureTileController3DConstants};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import has from"../../../core/has.js";import s from"../../../core/Error.js";import{clone as a}from"../../../core/lang.js";import o from"../../../core/Logger.js";import{destroyMaybe as l,removeMaybe as n,abortMaybe as u}from"../../../core/maybe.js";import h from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,whenOnce as m,watch as f,syncAndInitial as y,sync as _}from"../../../core/reactiveUtils.js";import{sqlAnd as g}from"../../../core/sql.js";import{property as F}from"../../../core/accessorSupport/decorators/property.js";import{subclass as x}from"../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as v}from"../../../core/support/UpdatingHandles.js";import{projectWithZConversion as D}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as C}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as b}from"../../support/layerUtils.js";import S from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as E}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as T}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as V}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as H}from"../../../views/3d/support/debugFlags.js";let L=class extends(h.EsriPromiseMixin(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void o.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===N.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===N.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i&&i.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>N.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new E(0,0,0,this.layerView.view.featureTiles.tilingScheme,"dummy-tile-full-extent");return new r([e])}const e=this.layerView.view.featureTiles;return e?e.tiles:new r}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new v,this.serviceDataExtent=null,this.serviceDataCount=N.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add((()=>this.displayFeatureLimit),(e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal)))),this._updatingHandles.add((()=>this.mode),(()=>this._modeChanged()),p),this._updatingHandles.add((()=>this.mode),((e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)}),p),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!b(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=l(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=u(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.addPromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=m((()=>e.featureTiles?.tilingScheme),this._lifeCycleAbortController.signal);this._updatingHandles.addPromise(t),t.then((()=>{const{layerView:e,tileDescriptors:t}=this,i=e.layer,r=new T({context:this.context,filterExtent:this.extent,tileDescriptors:t,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume();const s=this.layerView.view;s&&this.addHandles(f((()=>s.quality),(e=>r.memoryFactor=e),y));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(f((()=>this.layerView.view?.qualitySettings?.graphics3D?.[a]),(e=>r.lodFactor=e||1),p));const o=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},n=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==i.type&&this._updatingHandles.add((()=>i.createQueryVersion),(()=>this._dataFilterChanged())),this._updatingHandles.add((()=>this.context.effectiveDisplayFilter),(()=>this._effectiveDisplayFilterChanged())),this._updatingHandles.add((()=>e.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this._updatingHandles.add((()=>e.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),"customParameters"in i&&this._updatingHandles.add((()=>i.customParameters),(()=>this.restart())),this.addHandles([i.on("apply-edits",(e=>this._applyEdits(e))),f((()=>this.extent),(e=>r.filterExtent=e),_),f((()=>this.tileDescriptors),(e=>r.tileDescriptors=e),_),f((()=>this.maximumNumberOfFeatures),o,y),f((()=>this.serviceDataCount),n,y),f((()=>H.FEATURE_TILE_FETCH_SHOW_TILES),(e=>{e&&r?r.debugger??=new V(r,s.featureTiles.tilingScheme.toTileInfo(),s):!e&&this._tileFetcher&&r.debugger&&(r.debugger=l(r.debugger))}),p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add((()=>this.maxTotalSnapshotVertices),(()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.featureTiles.addClient());break;default:o.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then((e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.addPromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}})).catch((e=>{if(!d(e))throw e}))}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new S({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=g(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),o=i.fullExtent,l=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=N.maxFeatureCountForExtent&&(!s||!l)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=o){const e=o.spatialReference?await D(o,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",N.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",N.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:o,verticesPerCoordinate:l}=a,n=o<=0,u=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!u)return void(this._snapshotLimitExceeded=!1);0!==o&&null!=t&&await t;const h=Math.min(s,I),c=this.serviceDataCount,p=c!==N.noServiceDataCount;let m=p?Math.ceil((h-c*o)/(l||1)):Math.ceil(h/(l||1));if(u&&(m=Math.min(m,q)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:N.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await C(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{d(e)||o.getLogger(this).error("#fetchServiceDataInfo()",e)})).then((()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null}));return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([F({readOnly:!0})],L.prototype,"type",void 0),e([F({constructOnly:!0})],L.prototype,"graphics",void 0),e([F({constructOnly:!0})],L.prototype,"layerView",void 0),e([F({constructOnly:!0})],L.prototype,"context",void 0),e([F({readOnly:!0})],L.prototype,"dataUpdating",null),e([F()],L.prototype,"extent",null),e([F()],L.prototype,"updating",null),e([F({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([F()],L.prototype,"updatingTotal",null),e([F()],L.prototype,"updatingRemaining",null),e([F()],L.prototype,"expectedFeatureDiff",null),e([F()],L.prototype,"memoryForUnusedFeatures",null),e([F()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([F({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([F({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([F()],L.prototype,"_snapshotLimitExceeded",void 0),e([F()],L.prototype,"displayFeatureLimit",void 0),e([F({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([F({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([F({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([F({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([F()],L.prototype,"_forceTilesMode",void 0),e([F({readOnly:!0})],L.prototype,"mode",null),e([F({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([F({readOnly:!0})],L.prototype,"tileDescriptors",null),e([F()],L.prototype,"_tileFetcher",void 0),e([F()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([x("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,I=1e6,A=12e3,j=1e4,q=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var N;!function(e){function t(){e.maxFeatureCountForExtent=O,e.queryStatisticsTimeout=A,e.queryExtentTimeout=j}e.noServiceDataCount=1/0,e.maxSnapshotMinScaleFactor=5,e.reset=t}(N||(N={})),N.reset();export{L as FeatureTileController3D,N as FeatureTileController3DConstants};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import s from"../../../core/PooledArray.js";import r from"../../../core/Promise.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{watch as d,initial as o,sync as n}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{projectBoundingRect as u}from"../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../geometry/support/aaBoundingRect.js";import{PromiseQueue as c}from"../../support/PromiseQueue.js";import{viewingModeFromString as p}from"../../../views/ViewingMode.js";import{I3SClientNodeLoader as g}from"../../../views/3d/layers/i3s/I3SClientNodeLoader.js";import{addCallback as m}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as y}from"../../../views/3d/layers/i3s/I3SIndex.js";import f from"../../../views/3d/layers/i3s/I3SLodHandling.js";import{NodeState as x,CacheState as N}from"../../../views/3d/layers/i3s/I3SNode.js";import b from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{I3SStreamDataController as w}from"../../../views/3d/layers/i3s/I3SStreamDataController.js";import{getVertexCrs as v,getIndexCrs as C,findIntersectingNodes as L}from"../../../views/3d/layers/i3s/I3SUtil.js";import D from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{FadeDirection as V}from"../../../views/3d/layers/support/I3SLayerView.js";import{toBoundingRect as I}from"../../../views/3d/support/extentUtils.js";import{ClientType as A,maxDownloadSlots as S}from"../../../views/3d/support/index.js";import{minQuality as M}from"../../../views/3d/support/MemoryController.js";import{noBudget as F}from"../../../views/support/Scheduler.js";const O=100,P=2,U=1e4,q=1e-4,G=1.2,Q=500,j=1.5;let T=class extends(r.EsriPromiseMixin(t)){get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store?.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(null==this.layer.priority||"High"===this.layer.priority)}get indexStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(A.I3S_INDEX);return new w(e,this.layer.customParameters,this.layer.apiKey)}get dataStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(A.I3S_DATA);return new w(e,this.layer.customParameters,this.layer.apiKey)}get crsVertex(){return v(this.layer)}get crsIndex(){return C(this.layer)}get layer(){return this.layerView.i3slayer}get running(){return this.updating}get rootNodeVisible(){if(this._index){const e=this._index.rootNode;if(e)return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0}get index(){return this._index}get requiredAttributes(){return this._requiredAttributes}constructor(e){super(e),this.featureTarget=5e4,this.fixedFeatureTarget=!1,this.updating=!0,this.updatingProgress=1,this.leavesReached=!1,this.worker=null,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._idleStateCallbacks=null,this._newLoadingNodes=new s({deallocator:null}),this._modificationsNodeFilteringArray=new s,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._idleQueue=new c,this._elevationUpdateNodes=new s({deallocator:null}),this._errorCount=0}initialize(){const{layerView:e,layer:t}=this;this._disableMemCache=!e.loadCachedGPUData||!e.addCachedGPUData,this._lodHandling=new f(e),this._defaultGeometrySchema=t.store.defaultGeometrySchema,this.disableIDBCache=!!has("disable-feature:idb-cache"),"fields"in t&&(this._fields=t.fields,this._attributeStorageInfo=t.attributeStorageInfo),this.addResolvingPromise(Promise.all([t.indexInfo,t.when(),e.when()]).then((([s])=>{if(this.destroyed||!e||e.destroyed||!s)return;const{view:r,clientGeometry:a}=e,{resourceController:l}=r;if(this._setClippingArea(r.clippingArea),this.addHandles([d((()=>r?.pointsOfInterest?.focus?.renderLocation),(e=>this._pointOfInterestChanged(e)),o),d((()=>r.quality),(()=>this._setCameraDirty()),n),d((()=>e.contentVisible),(e=>{const t=e?()=>this._updateIdleState(!0):()=>this._updateViewData(),i=e?()=>this._updateIdleState(!1):()=>{};e&&null!=this._index&&this._index.invalidateAllElevationRanges(),this._idleStateCallbacks?(e||this.cancelNodeLoading(),this.restartNodeLoading(),this._idleStateCallbacks.idleBegin=t,this._idleStateCallbacks.idleEnd=i):this._idleStateCallbacks=l.scheduler.registerIdleStateCallbacks(t,i)}),o),m(e.view.resourceController.scheduler,this),d((()=>[this.featureTarget,this.fixedFeatureTarget]),(()=>{this._setCameraDirty(),this._stableFeatureLOD=!1})),d((()=>r.state?.contentCamera),(()=>this._setCameraDirty())),d((()=>t.elevationInfo),(e=>this._elevationInfoChanged(e))),d((()=>e.lodFactor),(()=>this._setCameraDirty())),d((()=>e.availableFields),(()=>this._requiredFieldsChange())),d((()=>e.holeFilling),(e=>null!=this._index&&(this._index.holeFilling=e)))]),this._viewportQueries=new D(this.crsIndex,r.renderCoordsHelper,r.state.contentCamera,!r.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,this.isMeshPyramid?r.basemapTerrain:r.elevationProvider,p(r.viewingMode),this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this._lod,angleDependentLoD:this._lod<.5}),this._clientNodeLoader=new g(this.layer.uid,{indexSR:this.crsIndex,vertexSR:this.crsVertex,renderSR:r.renderCoordsHelper.spatialReference},r.resourceController.memoryController,this.worker),this._index=new y(p(r.viewingMode),t,s,this.indexStreamController,this._clientNodeLoader,this._viewportQueries,i.getLogger(this),e.holeFilling,(t=>e.isNodeLoaded(t)),(t=>e.isNodeReloading(t)),(e=>this._shouldLoadNode(e)),(e=>this._enableFromGPUCache(e,x.Leaf)),(e=>this._needsUpdate(e)),(()=>!this.indexStreamController.busy),(t=>e.computeVisibilityObb?.(t)??null),e?.computeNodeFiltering?t=>e.computeNodeFiltering(t):void 0),this._index.updateElevationInfo(this.layer.elevationInfo,this.isMeshPyramid||this.isGraphics3D),this._index.imModificationsChanged(!!e.hasModifications),this._index.layerFilterChanged(!!e.hasGeometryFilter),null!=a){for(const e of a)this._addMesh(e.mesh,e.oid);this.addHandles(a.on("change",(e=>{for(const t of e.removed)this._removeMesh(t.oid);for(const t of e.added)this._addMesh(t.mesh,t.oid)})))}this._startNodeLoading()})))}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;null!=t&&i?.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll((e=>{const i=t.getNode(e);null!=i&&this._modificationsNodeFilteringArray.push(i)})),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._idleStateCallbacks&&(this._isIdle=!1,this._idleStateCallbacks.remove(),this._idleStateCallbacks=null),this._nodeLoader=null,k.prune()}get viewportQueries(){return this._viewportQueries}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map((i=>{const s=R(e,i),r=R(t,i);return s>=0&&r>=0?{index:s,name:t[r].name,field:t[r],attributeStorageInfo:e[s]}:null})).filter((e=>null!=e&&e.name!==i))}_requiredFieldsChange(){const e=this._getRequiredAttributes();E(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=_();I(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){null!=this._viewportQueries&&(this._viewportQueries.setPointOfInterest(e),null!=this._index&&(this._index.progressiveLoadPenalty=H.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate()))}updateClippingArea(e){this._setClippingArea(e),null!=this._viewportQueries&&null!=this._index&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}_addMesh(e,t){if(null==this._index)return;const i=this._clientNodeLoader.createMeshNodeInfo(e,t),s=this._index.addClientNodeToIndex(i.id,i.mbs);this._clientNodeLoader.addMeshNode(s,i),this._evaluateUpdating(),this.notifyChange("rootNodeVisible")}_removeMesh(e){const t=this._clientNodeLoader.getMeshNodeIndex(e);if(null!=t){if(null==this._index)throw new Error("delayed removal of client side i3s node geometry not supported yet.");{const e=(e,t)=>{this.layerView.removeNode(t),this._clientNodeLoader.removeNode(e),this.layerView.deleteCachedNodeData&&null!=e&&this.layerView.deleteCachedNodeData(e),this.layerView.deleteCachedGPUData?.(this.layerView.loadCachedGPUData?.(t))},i=(e,t,i)=>{this._clientNodeLoader.updateNodeIndex(e,t,i),this.layerView.updateNodeIndex&&this.layerView.updateNodeIndex(t,i)};this._index.removeClientNodeFromIndex(t,e,i),this.notifyChange("rootNodeVisible")}}}updateElevationChanged(e,t){const i=this._index;if(null==i?.rootNode||null==t)return null;this.crsIndex.equals(t)||(u(e,t,B,this.crsIndex),e=B);const s=this._elevationUpdateNodes;return s.clear(),L(e,i.rootNode,i,(e=>s.push(e.index))),s.length&&(s.forAll((e=>i.updateElevationChanged(e))),this._setCameraDirty()),s}removeAllGeometryObbs(){null!=this._index&&this._index.removeAllGeometryObbs()}getRenderMbs(e){return null!=this._viewportQueries?this._viewportQueries.getServiceMbsInRenderSR(e):null}_elevationInfoChanged(e){null!=this._index&&(this._index.updateElevationInfo(e,this.isMeshPyramid||this.isGraphics3D),this._setCameraDirty())}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateUpdating()}schedule(e,t){return this._idleQueue.push(e,t)}reschedule(e,t){return this._idleQueue.unshift(e,t)}get _isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get unloadedMemoryEstimate(){return null!=this._index&&this.layerView.contentVisible?this._index.unloadedMemoryEstimate*this._lodDropFactor:0}async _loadNodeData(e,t){return e.index<0?this._clientNodeLoader.loadNodeData(e.id,t):this._nodeLoader.loadNodeData(e,t)}async _loadAttributes(e,t,i){return(e.index<0?this._clientNodeLoader:this._nodeLoader).loadAttributes(e,t,i)}get indexDepth(){return null!=this._index?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData?this._disableMemCache=e:this._disableMemCache=!0}runTask(e,t){return this.layerView.contentVisible?this.layerView.visible&&null!=this._index?(this._processWithErrorLogging(e,t),this._index.maxPriority):-1/0:(this._updateViewData(),this._evaluateUpdating(),-1/0)}_processWithErrorLogging(e,t){try{this._process(e,t)}catch(s){this._errorCount<50?i.getLogger(this).error(`Error during processing: ${s} at ${s.stack}`):50===this._errorCount&&i.getLogger(this).error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null!=this._nodeLoader&&null!=this._index&&(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this._isIntegratedMesh&&(e.enabled=!1),e.run((()=>this._processIndex(e))),this._updateFeatureLOD(),e.run((()=>this._processCache(e))),this._isIntegratedMesh&&(e.enabled=!0),e.run((()=>this._processNodes(e,t))),this._idleQueue.runTask(e),e.run((()=>this._prefetchIndex())),t.numIndexLoading+=this._index.indexLoading,t.numNodesLoading+=this._downloadingCount,e.run((()=>this._lodHandling.lodGlobalHandling(e))),this._evaluateUpdating())}_processIndex(e){if(null==this._index)return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update(Array.from(this._loadingNodes.keys()),e,(e=>this.updateNodeModificationStatus(e))),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushArray(this._index.updates.missing.data,this._index.updates.missing.length));const t=this._index.featureEstimate.leavesReached;this._index.isLoading||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(null==this._index||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||null==this._index||null==this._viewportQueries)return;const e=!this._index.isLoading,t=this.featureTarget*this._baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.indexMissing>Q){if(this._featureLOD<=q)return;this._featureLOD/=j,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=U||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this._lod,r=this._index.checkFeatureTarget(t,s);r!==s&&(this._featureLOD=r/this._baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*G||e&&i.estimate>t))return;if(this._featureLOD<=q)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(U,Math.max(q,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(null==t)return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);null!=s&&!this.layerView.isNodeLoaded(s.index);s=t.getParent(s.index))if(this._enableFromGPUCache(s,x.Hole)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(null==this._index)return!1;let i=(this._isIdle?O:P)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());null!=t&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const r=this._index.getNode(s.add.back());if(null==r||r.cacheState!==N.Cached&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(r),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach((e=>e.abort())),this._loadingNodes.clear(),this._updatingNodes.forEach((e=>e.abort())),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=P)&&(this._downloadingCount<S&&!this.dataStreamController.busy)}_evaluateUpdating(){let e=!1,t=0;if(this.layerView){if(this.layerView.contentVisible){const i=(this._index?.indexMissing??0)+3*(this._index?.updates.add.length??0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.running||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling||null!=this._index&&this._index.isPrefetching),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}else e=this._cameraDirty,t=e?0:1;this.updating=e,this.updatingProgress=t}}_updateViewData(){if(!this._cameraDirty||null==this._index||null==this._viewportQueries)return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.invalidateVisibilityCache(),this._index.progressiveLoadPenalty=H.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.quality<1?1:this.layerView.progressiveLoadFactor}get _lod(){return this._featureLOD*this._baseLOD}get _baseLOD(){const e=this.layerView.lodFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*this.layerView.view.quality}get _lodDropFactor(){if(this.fixedFeatureTarget)return 1;return(Math.min(this.layerView.view.quality,.5)-M)/(.5-M)}isGeometryVisible(e){return!!this._index?.isGeometryVisible(e.index)}updateVisibility(e){this._index?.invalidateNodeVisibilityCache(e)}invalidateGeometryVisibility(e){this._index?.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){this._index?.invalidateVisibilityObbs()}modificationsChanged(){this._index?.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&!(null==this._index||!this._index.isGeometryVisible(e.index))}_shouldDropNode(e){if(null==this._viewportQueries)return!1;const t=this._lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenter(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||null==e||null==this._viewportQueries)return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new b(this.layer,this.dataStreamController,i.getLogger(this),this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading(((e,t)=>this._removeNodes(e,t,z.fadeout)),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateUpdating()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexStreamController.cancelAll(),this.dataStreamController.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateUpdating())}_removeInvisibleNodes(e){const t=this._index;if(null==t||null==this._viewportQueries)return!1;k.clear(),this.layerView.getLoadedNodeIndices(k);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return k.filterInPlace((e=>{const i=t.getNode(e);return null==i||!t.isGeometryVisible(e)||s(i)})),k.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(k,e,z.pop),!(i&&this._lodDropFactor<1)&&(0===k.length||(k.clear(),!1))}markNodeToRemove(e){k.push(e)}removeMarkedNodes(){this._removeNodes(k,F,z.pop)}_removeNodes(e,t,i){if(0!==e.length&&!t.done)for(null!=this._index&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),r=this._index;i===z.fadeout&&this.layerView.nodeFadeoutEnabled&&null!=r&&r.isGeometryVisible(s)?this.layerView.fadeNode(s,V.FadeOut,!0):this.layerView.removeNode(s),t.madeProgress()}}_needsUpdate(e){if(e.resources.isEmpty||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}async _updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t),this._evaluateUpdating();try{const i=this.layerView.getLoadedAttributes(e.index),s=E(i,this._requiredAttributes)?this.layerView.getAttributeData(e.index):await this._loadAttributes(e,this._requiredAttributes,t.signal);await this.schedule((()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:s},t.signal)),t.signal)}catch(i){if(!a(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)}this._updatingNodes.delete(e.index),this._evaluateUpdating()}_loadNode(e){if(this._loadingNodes.has(e.index))return void i.getLogger(this).error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateUpdating(),this._loadAndAddNode(e,t.signal).then((i=>{i&&null!=this._index&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())})).catch((e=>{if(!a(e))throw e})).finally((()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateUpdating()}))}_loadAndAddNode(e,t){return e.cacheState===N.Uncached?this._loadUncached(e,t).then((()=>!1)):this._loadCached(e,t).then((t=>!t&&(e.cacheState=N.Uncached,!0))).catch((t=>!a(t)&&(e.cacheState=N.Uncached,!0)))}_enableFromGPUCache(e,t){if(this._disableMemCache||null==this._index)return!1;if(t===x.Hole&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e.index);return null!=t?.attributeInfo&&E(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){null!=this._index&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateLoadStatus(e,t){const i=this._index;null!=i&&i.updateChildrenLoaded(e,t?1:-1)}async _loadCached(e,t){if(this._enableFromGPUCache(e,x.Leaf))return!0;const i=this.layerView;if(this.disableIDBCache||!i.loadCachedNodeData||!i.addCachedNodeData)return!1;const s=(t,i)=>this._nodeLoader.loadTextures(e,t,i),r=(t,i)=>this._clientNodeLoader.loadTextures(e,t,i),a=e.index>=0?s:r,d=await this.schedule((()=>i.loadCachedNodeData(e,t,a)),t);if(null==d)return!1;const o=this._requiredAttributes,n=await this.reschedule((()=>this._loadAttributes(e,o,t)),t);return await this.reschedule((()=>i.addCachedNodeData(e,d,{loadedAttributes:o,attributeData:n},t)),t),this._nodeAdded(),!0}_loadUncached(e,t){return this._downloadingCount++,this._loadNodeData(e,t).catch((e=>{throw this._downloadingCount--,e})).then((i=>(this._downloadingCount--,this.schedule((()=>this.layerView.addNode(e,i,t)),t)))).then((()=>{this._nodeAdded(),e.cacheState=N.Cached})).catch((t=>{if(!a(t))throw i.getLogger(this).error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,null!=this._index&&this._index.requestUpdate(),t}))}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateUpdating(),e&&this._index&&null!=this._index&&this._index.resetFailedNodes())}get test(){}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating(),null!=this._index&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;null!=t&&t.layerFilterChanged(e),this._setCameraDirty()}};e([l({readOnly:!0})],T.prototype,"isMeshPyramid",null),e([l({readOnly:!0})],T.prototype,"isGraphics3D",null),e([l({readOnly:!0})],T.prototype,"useMaximumNumberOfFeatures",null),e([l({readOnly:!0})],T.prototype,"indexStreamController",null),e([l({readOnly:!0})],T.prototype,"dataStreamController",null),e([l({readOnly:!0})],T.prototype,"crsVertex",null),e([l({readOnly:!0})],T.prototype,"crsIndex",null),e([l()],T.prototype,"featureTarget",void 0),e([l()],T.prototype,"fixedFeatureTarget",void 0),e([l()],T.prototype,"layerView",void 0),e([l()],T.prototype,"layer",null),e([l()],T.prototype,"updating",void 0),e([l({readOnly:!0})],T.prototype,"running",null),e([l()],T.prototype,"updatingProgress",void 0),e([l({readOnly:!0})],T.prototype,"leavesReached",void 0),e([l({constructOnly:!0})],T.prototype,"worker",void 0),e([l({readOnly:!0,dependsOn:[]})],T.prototype,"rootNodeVisible",null),T=e([h("esri.layers.graphics.controllers.I3SOnDemandController")],T);const k=new s({deallocator:null});function E(e,t){return null!=e&&e.length===t.length&&e.every((e=>R(t,e.name)>=0))}function R(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const H={distancePenalty:10},B=_();var z;!function(e){e[e.pop=0]="pop",e[e.fadeout=1]="fadeout"}(z||(z={}));export{T as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import s from"../../../core/PooledArray.js";import r from"../../../core/Promise.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{watch as d,initial as o,sync as n}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{projectBoundingRect as u}from"../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../geometry/support/aaBoundingRect.js";import{PromiseQueue as c}from"../../support/PromiseQueue.js";import{viewingModeFromString as p}from"../../../views/ViewingMode.js";import{I3SClientNodeLoader as g}from"../../../views/3d/layers/i3s/I3SClientNodeLoader.js";import{addCallback as m}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as y}from"../../../views/3d/layers/i3s/I3SIndex.js";import f from"../../../views/3d/layers/i3s/I3SLodHandling.js";import{NodeState as x,CacheState as N}from"../../../views/3d/layers/i3s/I3SNode.js";import b from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{I3SStreamDataController as w}from"../../../views/3d/layers/i3s/I3SStreamDataController.js";import{getVertexCrs as v,getIndexCrs as C,findIntersectingNodes as L}from"../../../views/3d/layers/i3s/I3SUtil.js";import D from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{FadeDirection as V}from"../../../views/3d/layers/support/I3SLayerView.js";import{toBoundingRect as I}from"../../../views/3d/support/extentUtils.js";import{ClientType as A,maxDownloadSlots as S}from"../../../views/3d/support/index.js";import{minQuality as M}from"../../../views/3d/support/MemoryController.js";import{noBudget as F}from"../../../views/support/Scheduler.js";const O=100,P=2,U=1e4,q=1e-4,G=1.2,Q=500,j=1.5;let T=class extends(r.EsriPromiseMixin(t)){get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store?.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(null==this.layer.priority||"High"===this.layer.priority)}get indexStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(A.I3S_INDEX);return new w(e,this.layer.customParameters,this.layer.apiKey)}get dataStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(A.I3S_DATA);return new w(e,this.layer.customParameters,this.layer.apiKey)}get crsVertex(){return v(this.layer)}get crsIndex(){return C(this.layer)}get layer(){return this.layerView.i3slayer}get running(){return this.updating}get rootNodeVisible(){if(this._index){const e=this._index.rootNode;if(e)return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0}get index(){return this._index}get requiredAttributes(){return this._requiredAttributes}constructor(e){super(e),this.featureTarget=5e4,this.fixedFeatureTarget=!1,this.updating=!0,this.updatingProgress=1,this.leavesReached=!1,this.worker=null,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._idleStateCallbacks=null,this._newLoadingNodes=new s({deallocator:null}),this._modificationsNodeFilteringArray=new s,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._idleQueue=new c,this._elevationUpdateNodes=new s({deallocator:null}),this._errorCount=0}initialize(){const{layerView:e,layer:t}=this;this._disableMemCache=!e.loadCachedGPUData||!e.addCachedGPUData,this._lodHandling=new f(e),this._defaultGeometrySchema=t.store.defaultGeometrySchema,this.disableIDBCache=!!has("disable-feature:idb-cache"),"fields"in t&&(this._fields=t.fields,this._attributeStorageInfo=t.attributeStorageInfo),this.addResolvingPromise(Promise.all([t.indexInfo,t.when(),e.when()]).then((([s])=>{if(this.destroyed||!e||e.destroyed||!s)return;const{view:r,clientGeometry:a}=e,{resourceController:l}=r;if(this._setClippingArea(r.clippingArea),this.addHandles([d((()=>r?.pointsOfInterest?.focus?.renderLocation),(e=>this._pointOfInterestChanged(e)),o),d((()=>r.quality),(()=>this._setCameraDirty()),n),d((()=>e.contentVisible),(e=>{const t=e?()=>this._updateIdleState(!0):()=>this._updateViewData(),i=e?()=>this._updateIdleState(!1):()=>{};e&&null!=this._index&&this._index.invalidateAllElevationRanges(),this._idleStateCallbacks?(e||this.cancelNodeLoading(),this.restartNodeLoading(),this._idleStateCallbacks.idleBegin=t,this._idleStateCallbacks.idleEnd=i):this._idleStateCallbacks=l.scheduler.registerIdleStateCallbacks(t,i)}),o),m(e.view.resourceController.scheduler,this),d((()=>[this.featureTarget,this.fixedFeatureTarget]),(()=>{this._setCameraDirty(),this._stableFeatureLOD=!1})),d((()=>r.state?.contentCamera),(()=>this._setCameraDirty())),d((()=>t.elevationInfo),(e=>this._elevationInfoChanged(e))),d((()=>e.lodFactor),(()=>this._setCameraDirty())),d((()=>e.availableFields),(()=>this._requiredFieldsChange())),d((()=>e.holeFilling),(e=>null!=this._index&&(this._index.holeFilling=e)))]),this._viewportQueries=new D(this.crsIndex,r.renderCoordsHelper,r.state.contentCamera,!r.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,this.isMeshPyramid?r.basemapTerrain:r.elevationProvider,p(r.viewingMode),this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this._lod,angleDependentLoD:this._lod<.5}),this._clientNodeLoader=new g(this.layer.uid,{indexSR:this.crsIndex,vertexSR:this.crsVertex,renderSR:r.renderCoordsHelper.spatialReference},r.resourceController.memoryController,this.worker),this._index=new y(p(r.viewingMode),t,s,this.indexStreamController,this._clientNodeLoader,this._viewportQueries,i.getLogger(this),e.holeFilling,(t=>e.isNodeLoaded(t)),(t=>e.isNodeReloading(t)),(e=>this._shouldLoadNode(e)),(e=>this._enableFromGPUCache(e,x.Leaf)),(e=>this._needsUpdate(e)),(()=>!this.indexStreamController.busy),(t=>e.computeVisibilityObb?.(t)??null),e?.computeNodeFiltering?t=>e.computeNodeFiltering(t):void 0),this._index.updateElevationInfo(this.layer.elevationInfo,this.isMeshPyramid||this.isGraphics3D),this._index.imModificationsChanged(!!e.hasModifications),this._index.layerFilterChanged(!!e.hasGeometryFilter),null!=a){for(const e of a)this._addMesh(e.mesh,e.oid);this.addHandles(a.on("change",(e=>{for(const t of e.removed)this._removeMesh(t.oid);for(const t of e.added)this._addMesh(t.mesh,t.oid)})))}this._startNodeLoading()})))}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;null!=t&&i?.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll((e=>{const i=t.getNode(e);null!=i&&this._modificationsNodeFilteringArray.push(i)})),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._idleStateCallbacks&&(this._isIdle=!1,this._idleStateCallbacks.remove(),this._idleStateCallbacks=null),this._nodeLoader=null,k.prune()}get viewportQueries(){return this._viewportQueries}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map((i=>{const s=R(e,i),r=R(t,i);return s>=0&&r>=0?{index:s,name:t[r].name,field:t[r],attributeStorageInfo:e[s]}:null})).filter((e=>null!=e&&e.name!==i))}_requiredFieldsChange(){const e=this._getRequiredAttributes();E(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=_();I(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){null!=this._viewportQueries&&(this._viewportQueries.setPointOfInterest(e),null!=this._index&&(this._index.progressiveLoadPenalty=H.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate()))}updateClippingArea(e){this._setClippingArea(e),null!=this._viewportQueries&&null!=this._index&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}_addMesh(e,t){if(null==this._index)return;const i=this._clientNodeLoader.createMeshNodeInfo(e,t),s=this._index.addClientNodeToIndex(i.id,i.mbs);this._clientNodeLoader.addMeshNode(s,i),this._evaluateUpdating(),this.notifyChange("rootNodeVisible")}_removeMesh(e){const t=this._clientNodeLoader.getMeshNodeIndex(e);if(null!=t){if(null==this._index)throw new Error("delayed removal of client side i3s node geometry not supported yet.");{const e=(e,t)=>{this.layerView.removeNode(t),this._clientNodeLoader.removeNode(e),this.layerView.deleteCachedNodeData&&null!=e&&this.layerView.deleteCachedNodeData(e),this.layerView.deleteCachedGPUData?.(this.layerView.loadCachedGPUData?.(t))},i=(e,t,i)=>{this._clientNodeLoader.updateNodeIndex(e,t,i),this.layerView.updateNodeIndex&&this.layerView.updateNodeIndex(t,i)};this._index.removeClientNodeFromIndex(t,e,i),this.notifyChange("rootNodeVisible")}}}updateElevationChanged(e,t){const i=this._index;if(null==i?.rootNode||null==t)return null;this.crsIndex.equals(t)||(u(e,t,B,this.crsIndex),e=B);const s=this._elevationUpdateNodes;return s.clear(),L(e,i.rootNode,i,(e=>s.push(e.index))),s.length&&(s.forAll((e=>i.updateElevationChanged(e))),this._setCameraDirty()),s}removeAllGeometryObbs(){null!=this._index&&this._index.removeAllGeometryObbs()}getRenderMbs(e){return null!=this._viewportQueries?this._viewportQueries.getServiceMbsInRenderSR(e):null}_elevationInfoChanged(e){null!=this._index&&(this._index.updateElevationInfo(e,this.isMeshPyramid||this.isGraphics3D),this._setCameraDirty())}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateUpdating()}schedule(e,t){return this._idleQueue.push(e,t)}reschedule(e,t){return this._idleQueue.unshift(e,t)}get _isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get unloadedMemoryEstimate(){return null!=this._index&&this.layerView.contentVisible?this._index.unloadedMemoryEstimate*this._lodDropFactor:0}async _loadNodeData(e,t){return e.index<0?this._clientNodeLoader.loadNodeData(e.id,t):this._nodeLoader.loadNodeData(e,t)}async _loadAttributes(e,t,i){return(e.index<0?this._clientNodeLoader:this._nodeLoader).loadAttributes(e,t,i)}get indexDepth(){return null!=this._index?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData?this._disableMemCache=e:this._disableMemCache=!0}runTask(e,t){return this.layerView.contentVisible?this.layerView.visible&&null!=this._index?(this._processWithErrorLogging(e,t),this._index.maxPriority):-1/0:(this._updateViewData(),this._evaluateUpdating(),-1/0)}_processWithErrorLogging(e,t){try{this._process(e,t)}catch(s){this._errorCount<50?i.getLogger(this).error(`Error during processing: ${s} at ${s.stack}`):50===this._errorCount&&i.getLogger(this).error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null!=this._nodeLoader&&null!=this._index&&(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this._isIntegratedMesh&&(e.enabled=!1),e.run((()=>this._processIndex(e))),this._updateFeatureLOD(),e.run((()=>this._processCache(e))),this._isIntegratedMesh&&(e.enabled=!0),e.run((()=>this._processNodes(e,t))),this._idleQueue.runTask(e),e.run((()=>this._prefetchIndex())),t.numIndexLoading+=this._index.indexLoading,t.numNodesLoading+=this._downloadingCount,e.run((()=>this._lodHandling.lodGlobalHandling(e))),this._evaluateUpdating())}_processIndex(e){if(null==this._index)return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update(Array.from(this._loadingNodes.keys()),e,(e=>this.updateNodeModificationStatus(e))),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushArray(this._index.updates.missing.data,this._index.updates.missing.length));const t=this._index.featureEstimate.leavesReached;this._index.isLoading||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(null==this._index||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||null==this._index||null==this._viewportQueries)return;const e=!this._index.isLoading,t=this.featureTarget*this._baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.indexMissing>Q){if(this._featureLOD<=q)return;this._featureLOD/=j,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=U||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this._lod,r=this._index.checkFeatureTarget(t,s);r!==s&&(this._featureLOD=r/this._baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*G||e&&i.estimate>t))return;if(this._featureLOD<=q)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(U,Math.max(q,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(null==t)return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);null!=s&&!this.layerView.isNodeLoaded(s.index);s=t.getParent(s.index))if(this._enableFromGPUCache(s,x.Hole)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(null==this._index)return!1;let i=(this._isIdle?O:P)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());null!=t&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const r=this._index.getNode(s.add.back());if(null==r||r.cacheState!==N.Cached&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(r),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach((e=>e.abort())),this._loadingNodes.clear(),this._updatingNodes.forEach((e=>e.abort())),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=P)&&(this._downloadingCount<S&&!this.dataStreamController.busy)}_evaluateUpdating(){let e=!1,t=0;if(this.layerView){if(this.layerView.contentVisible){const i=(this._index?.indexMissing??0)+3*(this._index?.updates.add.length??0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.updating||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling||null!=this._index&&this._index.isPrefetching),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}else e=this._cameraDirty,t=e?0:1;this.updating=e,this.updatingProgress=t}}_updateViewData(){if(!this._cameraDirty||null==this._index||null==this._viewportQueries)return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.invalidateVisibilityCache(),this._index.progressiveLoadPenalty=H.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.quality<1?1:this.layerView.progressiveLoadFactor}get _lod(){return this._featureLOD*this._baseLOD}get _baseLOD(){const e=this.layerView.lodFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*this.layerView.view.quality}get _lodDropFactor(){if(this.fixedFeatureTarget)return 1;return(Math.min(this.layerView.view.quality,.5)-M)/(.5-M)}isGeometryVisible(e){return!!this._index?.isGeometryVisible(e.index)}updateVisibility(e){this._index?.invalidateNodeVisibilityCache(e)}invalidateGeometryVisibility(e){this._index?.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){this._index?.invalidateVisibilityObbs()}modificationsChanged(){this._index?.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&!(null==this._index||!this._index.isGeometryVisible(e.index))}_shouldDropNode(e){if(null==this._viewportQueries)return!1;const t=this._lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenter(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||null==e||null==this._viewportQueries)return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new b(this.layer,this.dataStreamController,i.getLogger(this),this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading(((e,t)=>this._removeNodes(e,t,z.fadeout)),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateUpdating()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexStreamController.cancelAll(),this.dataStreamController.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateUpdating())}_removeInvisibleNodes(e){const t=this._index;if(null==t||null==this._viewportQueries)return!1;k.clear(),this.layerView.getLoadedNodeIndices(k);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return k.filterInPlace((e=>{const i=t.getNode(e);return null==i||!t.isGeometryVisible(e)||s(i)})),k.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(k,e,z.pop),!(i&&this._lodDropFactor<1)&&(0===k.length||(k.clear(),!1))}markNodeToRemove(e){k.push(e)}removeMarkedNodes(){this._removeNodes(k,F,z.pop)}_removeNodes(e,t,i){if(0!==e.length&&!t.done)for(null!=this._index&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),r=this._index;i===z.fadeout&&this.layerView.nodeFadeoutEnabled&&null!=r&&r.isGeometryVisible(s)?this.layerView.fadeNode(s,V.FadeOut,!0):this.layerView.removeNode(s),t.madeProgress()}}_needsUpdate(e){if(e.resources.isEmpty||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}async _updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t),this._evaluateUpdating();try{const i=this.layerView.getLoadedAttributes(e.index),s=E(i,this._requiredAttributes)?this.layerView.getAttributeData(e.index):await this._loadAttributes(e,this._requiredAttributes,t.signal);await this.schedule((()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:s},t.signal)),t.signal)}catch(i){if(!a(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)}this._updatingNodes.delete(e.index),this._evaluateUpdating()}_loadNode(e){if(this._loadingNodes.has(e.index))return void i.getLogger(this).error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateUpdating(),this._loadAndAddNode(e,t.signal).then((i=>{i&&null!=this._index&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())})).catch((e=>{if(!a(e))throw e})).finally((()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateUpdating()}))}_loadAndAddNode(e,t){return e.cacheState===N.Uncached?this._loadUncached(e,t).then((()=>!1)):this._loadCached(e,t).then((t=>!t&&(e.cacheState=N.Uncached,!0))).catch((t=>!a(t)&&(e.cacheState=N.Uncached,!0)))}_enableFromGPUCache(e,t){if(this._disableMemCache||null==this._index)return!1;if(t===x.Hole&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e.index);return null!=t?.attributeInfo&&E(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){null!=this._index&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateLoadStatus(e,t){const i=this._index;null!=i&&i.updateChildrenLoaded(e,t?1:-1)}async _loadCached(e,t){if(this._enableFromGPUCache(e,x.Leaf))return!0;const i=this.layerView;if(this.disableIDBCache||!i.loadCachedNodeData||!i.addCachedNodeData)return!1;const s=(t,i)=>this._nodeLoader.loadTextures(e,t,i),r=(t,i)=>this._clientNodeLoader.loadTextures(e,t,i),a=e.index>=0?s:r,d=await this.schedule((()=>i.loadCachedNodeData(e,t,a)),t);if(null==d)return!1;const o=this._requiredAttributes,n=await this.reschedule((()=>this._loadAttributes(e,o,t)),t);return await this.reschedule((()=>i.addCachedNodeData(e,d,{loadedAttributes:o,attributeData:n},t)),t),this._nodeAdded(),!0}_loadUncached(e,t){return this._downloadingCount++,this._loadNodeData(e,t).catch((e=>{throw this._downloadingCount--,e})).then((i=>(this._downloadingCount--,this.schedule((()=>this.layerView.addNode(e,i,t)),t)))).then((()=>{this._nodeAdded(),e.cacheState=N.Cached})).catch((t=>{if(!a(t))throw i.getLogger(this).error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,null!=this._index&&this._index.requestUpdate(),t}))}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateUpdating(),e&&this._index&&null!=this._index&&this._index.resetFailedNodes())}get test(){}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating(),null!=this._index&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;null!=t&&t.layerFilterChanged(e),this._setCameraDirty()}};e([l({readOnly:!0})],T.prototype,"isMeshPyramid",null),e([l({readOnly:!0})],T.prototype,"isGraphics3D",null),e([l({readOnly:!0})],T.prototype,"useMaximumNumberOfFeatures",null),e([l({readOnly:!0})],T.prototype,"indexStreamController",null),e([l({readOnly:!0})],T.prototype,"dataStreamController",null),e([l({readOnly:!0})],T.prototype,"crsVertex",null),e([l({readOnly:!0})],T.prototype,"crsIndex",null),e([l()],T.prototype,"featureTarget",void 0),e([l()],T.prototype,"fixedFeatureTarget",void 0),e([l()],T.prototype,"layerView",void 0),e([l()],T.prototype,"layer",null),e([l()],T.prototype,"updating",void 0),e([l({readOnly:!0})],T.prototype,"running",null),e([l()],T.prototype,"updatingProgress",void 0),e([l({readOnly:!0})],T.prototype,"leavesReached",void 0),e([l({constructOnly:!0})],T.prototype,"worker",void 0),e([l({readOnly:!0,dependsOn:[]})],T.prototype,"rootNodeVisible",null),T=e([h("esri.layers.graphics.controllers.I3SOnDemandController")],T);const k=new s({deallocator:null});function E(e,t){return null!=e&&e.length===t.length&&e.every((e=>R(t,e.name)>=0))}function R(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const H={distancePenalty:10},B=_();var z;!function(e){e[e.pop=0]="pop",e[e.fadeout=1]="fadeout"}(z||(z={}));export{T as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as s}from"../../../core/compilerUtils.js";import i from"../../../core/Error.js";import"../../../core/has.js";import{clone as r}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as u,throwIfAborted as l}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as o}from"../../../core/unitUtils.js";import{isSerializable as h}from"../../../core/support/jsonUtils.js";import{getTransformation as c}from"../../../geometry/projection.js";import{set as m,create as f,expandWithAABB as d,negativeInfinity as y}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as g}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as x}from"../../../geometry/support/boundsUtils.js";import{isExtent as w,isPolygon as F}from"../../../geometry/support/jsonUtils.js";import{equals as _,isValid as S}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as R}from"../featureConversionUtils.js";import{getWhereClause as I}from"./attributeSupport.js";import{cleanFromGeometryEngine as Q,getGeometry as j}from"./geometryUtils.js";import{project as E,projectMany as b}from"./projectionSupport.js";import{QueryEngineCache as A}from"./QueryEngineCache.js";import{queryCapabilities as T}from"./QueryEngineCapabilities.js";import{QueryEngineResult as v}from"./QueryEngineResult.js";import{queryEngineEmptyResult as C,normalizeAttributeBinsQuery as P,normalizeQuery as M}from"./queryUtils.js";import{validateAttributeBinsQuery as z,validateQuery as G,validateStatisticsQuery as O}from"./queryValidationUtils.js";import{getSpatialQueryOperator as U,canQueryWithRBush as q}from"./spatialQuerySupport.js";import{getTimeExtent as k,getTimeOperator as B}from"./timeSupport.js";import Z from"../../support/FieldsIndex.js";import{noBudget as H}from"../../../views/support/Scheduler.js";const N="unsupported-query";class J{constructor(e,t=null,s,i,r){this.attributes=e,this.geometry=s,this.centroid=i,this.filterFlags=r,this.groupId=-1,this.displayId=t}}class L{constructor(e){this._changeHandle=null,this.capabilities={query:T},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new A,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=h(e.fieldsIndex)?e.fieldsIndex:Z.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=u(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(i){if(i!==C)throw i;return new v([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=u(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(i){if(i!==C)throw i;return 0}}async executeQueryForExtent(e,t){const s=u(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;if(!r)return{count:0,extent:null};return{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}}catch(r){if(r===C)return{count:0,extent:null};throw r}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=u(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(i){if(i===C)return new Set;throw i}}async executeQueryForLatestObservations(e,t){const s=u(t);if(!this.timeInfo?.trackIdField)throw new i(N,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(r){if(r!==C)throw r;return new v([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=u(t);let i;e=r(e);try{e=await this.schedule((()=>P(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>z(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(a){if(a!==C)throw a;i=new v([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=u(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=u(s),{field:r,field2:a,field3:n,valueExpression:l}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:a,field3:n,valueExpression:l},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=u(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=u(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=u(e);this._timeExtentPromise||=k(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return l(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=m(f(),y);await this.featureStore.forEachBounds(e,(e=>d(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:Q(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const a=E(r,t,s);if(a.spatialReference=Q(s),a.xmax-a.xmin===0){const e=o(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=o(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=o(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(H)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(H)}async _getAllFeaturesQueryEngineResult(e){return new v(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>s(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=r(e),e=await this.schedule((()=>M(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>G(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),a=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(a)),s),await this.reschedule((()=>this.executeObjectIdsQuery(a)),s),await this.reschedule((()=>this.executeTimeQuery(a)),s),await this.reschedule((()=>this.executeAttributesQuery(a)),s),a}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,u=null==a||_(a,n.spatialReference)?n:E(n,a);if(!u)return null;const l=i||r,o=S(s)&&!_(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,h=this.featureAdapter,c=await this.reschedule((()=>this.searchFeatures(V(u))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const s=new Set;for(const e of c)s.add(h.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await U("esriSpatialRelDisjoint",u,this.geometryType,this.hasZ,this.hasM),a=e=>!s.has(h.getObjectId(e))||r(h.getGeometry(e)),n=await this.runSpatialFilter(i,a,t);return new v(n,e,this)}),t);return o(r)}if(!c.length)return new v([],e,this);if(this._canExecuteSinglePass(u,e))return o(new v(c,e,this));const m=await U("esriSpatialRelContains",u,this.geometryType,this.hasZ,this.hasM),f=await this.runSpatialFilter(c,(e=>m(h.getGeometry(e))),t);return o(new v(f,e,this))}async _executeGeometryQuery(s,i,r){if(null!=i&&0===i.items.length)return i;const{geometry:a,outSR:n,returnGeometry:u,returnCentroid:l}=s,o=i?null:this._getCacheKey(s),h=o?this._cache.get(o):null;if(h)return new v(h,s,this);const c=S(n)&&!_(this.spatialReference,n),m=u||l,f=async e=>(c&&m&&await this._project(e,n),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,y=!a||null==d||_(d,a.spatialReference)?a:E(a,d);if(!y)return f(null!=i?i:await this._getAllFeaturesQueryEngineResult(s));const p=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(V(a))),r);const x=s.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!g.length)return f(null!=i?i:await this._getAllFeaturesQueryEngineResult(s));const e=new Set;for(const s of g)e.add(p.getObjectId(s));const t=null!=i?i.items:await this.reschedule((()=>this._getAllFeatures()),r),a=await this.reschedule((async()=>{const i=await U(x,y,this.geometryType,this.hasZ,this.hasM),a=t=>!e.has(p.getObjectId(t))||i(p.getGeometry(t)),n=await this.runSpatialFilter(t,a,r);return new v(n,s,this)}),r);return f(a)}if(null!=i){const s=new t;g=g.filter((t=>e(i.items,t,i.items.length,s)>=0))}if(!g.length){const e=new v([],s,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(y,s))return f(new v(g,s,this));const w=await U(x,y,this.geometryType,this.hasZ,this.hasM),F=await this.runSpatialFilter(g,(e=>w(p.getGeometry(e))),r);return f(new v(F,s,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)))}const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=B(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=I(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),n.madeProgress()),n.done&&await this.reschedule((e=>a(e)),s)}};return this.reschedule((e=>a(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,a=new Map,n=this.featureAdapter.getAttribute;for(const u of e.items){const e=n(u,t),s=n(u,r),i=a.get(e);(!i||s>n(i,r))&&a.set(e,u)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:a,resultType:n,cacheHint:u}=e;if("tile"!==n&&!u)return null;const l=i||r;return S(a)&&!_(this.spatialReference,a)&&l?JSON.stringify([t,s,a]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return q(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||_(this.spatialReference,t))return e;const i=this.featureAdapter;let r;try{const e=await this._getFullExtent();r=c(this.spatialReference,t,e)}catch{}const a=await b(e.items.map((e=>j(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,r);return e.items=s(a.map(((t,s)=>i.cloneWithGeometry(e.items[s],R(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=r(e);try{e=await this.schedule((()=>M(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>O(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(i){if(i!==C)throw i;return new v([],e,this)}}get test(){}}function V(e){if(q(e)){if(w(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map((e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[x(g(),e)]}export{J as Feature,L as QueryEngine,V as getQueryBBoxes};
|
|
5
|
+
import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as s}from"../../../core/compilerUtils.js";import i from"../../../core/Error.js";import"../../../core/has.js";import{clone as r}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as u,throwIfAborted as l}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as o}from"../../../core/unitUtils.js";import{isSerializable as h}from"../../../core/support/jsonUtils.js";import{getTransformation as c}from"../../../geometry/projectionUtils.js";import{set as m,create as f,expandWithAABB as d,negativeInfinity as y}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as g}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as x}from"../../../geometry/support/boundsUtils.js";import{isExtent as w,isPolygon as F}from"../../../geometry/support/jsonUtils.js";import{equals as _,isValid as S}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as R}from"../featureConversionUtils.js";import{getWhereClause as I}from"./attributeSupport.js";import{cleanFromGeometryEngine as Q,getGeometry as j}from"./geometryUtils.js";import{project as E,projectMany as b}from"./projectionSupport.js";import{QueryEngineCache as A}from"./QueryEngineCache.js";import{queryCapabilities as T}from"./QueryEngineCapabilities.js";import{QueryEngineResult as v}from"./QueryEngineResult.js";import{queryEngineEmptyResult as C,normalizeAttributeBinsQuery as P,normalizeQuery as M}from"./queryUtils.js";import{validateAttributeBinsQuery as z,validateQuery as G,validateStatisticsQuery as O}from"./queryValidationUtils.js";import{getSpatialQueryOperator as U,canQueryWithRBush as q}from"./spatialQuerySupport.js";import{getTimeExtent as k,getTimeOperator as B}from"./timeSupport.js";import Z from"../../support/FieldsIndex.js";import{noBudget as H}from"../../../views/support/Scheduler.js";const N="unsupported-query";class J{constructor(e,t=null,s,i,r){this.attributes=e,this.geometry=s,this.centroid=i,this.filterFlags=r,this.groupId=-1,this.displayId=t}}class L{constructor(e){this._changeHandle=null,this.capabilities={query:T},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new A,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,"object-id"===e.featureIdInfo.type&&(this.objectIdField=e.featureIdInfo.fieldName),this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=h(e.fieldsIndex)?e.fieldsIndex:Z.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=u(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(i){if(i!==C)throw i;return new v([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=u(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(i){if(i!==C)throw i;return 0}}async executeQueryForExtent(e,t){const s=u(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;if(!r)return{count:0,extent:null};return{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}}catch(r){if(r===C)return{count:0,extent:null};throw r}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=u(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(i){if(i===C)return new Set;throw i}}async executeQueryForLatestObservations(e,t){const s=u(t);if(!this.timeInfo?.trackIdField)throw new i(N,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(r){if(r!==C)throw r;return new v([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=u(t);let i;e=r(e);try{e=await this.schedule((()=>P(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>z(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(a){if(a!==C)throw a;i=new v([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=u(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=u(s),{field:r,field2:a,field3:n,valueExpression:l}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:a,field3:n,valueExpression:l},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=u(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=u(s),{field:r,normalizationField:a,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:a,valueExpression:n},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=u(e);this._timeExtentPromise||=k(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return l(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=m(f(),y);await this.featureStore.forEachBounds(e,(e=>d(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:Q(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const a=E(r,t,s);if(a.spatialReference=Q(s),a.xmax-a.xmin===0){const e=o(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin===0){const e=o(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin===0){const e=o(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(H)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(H)}async _getAllFeaturesQueryEngineResult(e){return new v(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>s(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=r(e),e=await this.schedule((()=>M(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>G(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),a=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(a)),s),await this.reschedule((()=>this.executeObjectIdsQuery(a)),s),await this.reschedule((()=>this.executeTimeQuery(a)),s),await this.reschedule((()=>this.executeAttributesQuery(a)),s),a}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,u=null==a||_(a,n.spatialReference)?n:E(n,a);if(!u)return null;const l=i||r,o=S(s)&&!_(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,h=this.featureAdapter,c=await this.reschedule((()=>this.searchFeatures(V(u))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const s=new Set;for(const e of c)s.add(h.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await U("esriSpatialRelDisjoint",u,this.geometryType,this.hasZ,this.hasM),a=e=>!s.has(h.getObjectId(e))||r(h.getGeometry(e)),n=await this.runSpatialFilter(i,a,t);return new v(n,e,this)}),t);return o(r)}if(!c.length)return new v([],e,this);if(this._canExecuteSinglePass(u,e))return o(new v(c,e,this));const m=await U("esriSpatialRelContains",u,this.geometryType,this.hasZ,this.hasM),f=await this.runSpatialFilter(c,(e=>m(h.getGeometry(e))),t);return o(new v(f,e,this))}async _executeGeometryQuery(s,i,r){if(null!=i&&0===i.items.length)return i;const{geometry:a,outSR:n,returnGeometry:u,returnCentroid:l}=s,o=i?null:this._getCacheKey(s),h=o?this._cache.get(o):null;if(h)return new v(h,s,this);const c=S(n)&&!_(this.spatialReference,n),m=u||l,f=async e=>(c&&m&&await this._project(e,n),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,y=!a||null==d||_(d,a.spatialReference)?a:E(a,d);if(!y)return f(null!=i?i:await this._getAllFeaturesQueryEngineResult(s));const p=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(V(a))),r);const x=s.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!g.length)return f(null!=i?i:await this._getAllFeaturesQueryEngineResult(s));const e=new Set;for(const s of g)e.add(p.getObjectId(s));const t=null!=i?i.items:await this.reschedule((()=>this._getAllFeatures()),r),a=await this.reschedule((async()=>{const i=await U(x,y,this.geometryType,this.hasZ,this.hasM),a=t=>!e.has(p.getObjectId(t))||i(p.getGeometry(t)),n=await this.runSpatialFilter(t,a,r);return new v(n,s,this)}),r);return f(a)}if(null!=i){const s=new t;g=g.filter((t=>e(i.items,t,i.items.length,s)>=0))}if(!g.length){const e=new v([],s,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(y,s))return f(new v(g,s,this));const w=await U(x,y,this.geometryType,this.hasZ,this.hasM),F=await this.runSpatialFilter(g,(e=>w(p.getGeometry(e))),r);return f(new v(F,s,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const i of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(i).forEach((e=>t.add(e)))}const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=B(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=I(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),n.madeProgress()),n.done&&await this.reschedule((e=>a(e)),s)}};return this.reschedule((e=>a(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,a=new Map,n=this.featureAdapter.getAttribute;for(const u of e.items){const e=n(u,t),s=n(u,r),i=a.get(e);(!i||s>n(i,r))&&a.set(e,u)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:a,resultType:n,cacheHint:u}=e;if("tile"!==n&&!u)return null;const l=i||r;return S(a)&&!_(this.spatialReference,a)&&l?JSON.stringify([t,s,a]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return q(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||_(this.spatialReference,t))return e;const i=this.featureAdapter;let r;try{const e=await this._getFullExtent();r=c(this.spatialReference,t,e)}catch{}const a=await b(e.items.map((e=>j(this.geometryType,this.hasZ,this.hasM,i.getGeometry(e)))),this.spatialReference,t,r);return e.items=s(a.map(((t,s)=>i.cloneWithGeometry(e.items[s],R(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=r(e);try{e=await this.schedule((()=>M(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>O(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(i){if(i!==C)throw i;return new v([],e,this)}}get test(){}}function V(e){if(q(e)){if(w(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map((e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[x(g(),e)]}export{J as Feature,L as QueryEngine,V as getQueryBBoxes};
|