@arcgis/core 5.1.0-next.19 → 5.1.0-next.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/components/assets/carousel/t9n/messages.ar.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.bg.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.bs.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ca.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.cs.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.da.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.de.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.el.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.es.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.et.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.fi.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.fr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.he.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.hr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.hu.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.id.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.it.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ja.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ko.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.lt.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.lv.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.nl.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.no.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.pl.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ro.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.ru.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sk.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sl.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.sv.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.th.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.tr.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.uk.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.vi.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/carousel/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0140dc583e20b031eac9.js +1 -0
- package/assets/esri/core/workers/chunks/018859b79f9ce7528ac7.js +1 -0
- package/assets/esri/core/workers/chunks/01dd849a2d335e9f3e16.js +1 -0
- package/assets/esri/core/workers/chunks/{6b3d8280a24f7a3aac40.js → 026c00ee272c64e53daf.js} +1 -1
- package/assets/esri/core/workers/chunks/02cab89336504e95ed99.js +1 -0
- package/assets/esri/core/workers/chunks/06df187a116709f69952.js +1 -0
- package/assets/esri/core/workers/chunks/0711c856144cd8700e7e.js +1 -0
- package/assets/esri/core/workers/chunks/0883c4e63424d6746ada.js +1 -0
- package/assets/esri/core/workers/chunks/0987cb20148f65222b44.js +1 -0
- package/assets/esri/core/workers/chunks/0a1f88cf16bcbb53b371.js +1 -0
- package/assets/esri/core/workers/chunks/0a66a2b4aaab0774c34f.js +1 -0
- package/assets/esri/core/workers/chunks/0bb3beedae1b73beb1fc.js +1 -0
- package/assets/esri/core/workers/chunks/0ca405ca26676137a4be.js +1 -0
- package/assets/esri/core/workers/chunks/0ce968c89c35535da63e.js +1 -0
- package/assets/esri/core/workers/chunks/0d56e3b3265a4470aaa6.js +1 -0
- package/assets/esri/core/workers/chunks/0debabe324c873066885.js +1 -0
- package/assets/esri/core/workers/chunks/0df585420c9cec6a7265.js +1 -0
- package/assets/esri/core/workers/chunks/0facd2c143a04cc7c4ff.js +1 -0
- package/assets/esri/core/workers/chunks/108d652a959e7de31cbf.js +1 -0
- package/assets/esri/core/workers/chunks/13d1cb50232ae761425b.js +2 -0
- package/assets/esri/core/workers/chunks/144c719d5ba9e3a30961.js +1 -0
- package/assets/esri/core/workers/chunks/1482262d0788ee65ddf7.js +1 -0
- package/assets/esri/core/workers/chunks/1503ca177e2466ec0e87.js +1 -0
- package/assets/esri/core/workers/chunks/1597d7b380d510ff5252.js +1 -0
- package/assets/esri/core/workers/chunks/15d7c9f5a55985ed00b4.js +1 -0
- package/assets/esri/core/workers/chunks/166652b7d69bf216d7a4.js +1 -0
- package/assets/esri/core/workers/chunks/179b3385c24ad8a05e1d.js +1 -0
- package/assets/esri/core/workers/chunks/{4f2c29168c9de0b08741.js → 1880c3b293cdfa804625.js} +1 -1
- package/assets/esri/core/workers/chunks/18a40606e4c39f244ecd.js +1 -0
- package/assets/esri/core/workers/chunks/190bc75254bc0542a6be.js +1 -0
- package/assets/esri/core/workers/chunks/1be4e308280149eae4fb.js +1 -0
- package/assets/esri/core/workers/chunks/1bea32b02d35ddb9b118.js +1 -0
- package/assets/esri/core/workers/chunks/1d0153c7d65bd9ea7d39.js +1 -0
- package/assets/esri/core/workers/chunks/1d697642fb2a6332b7f9.js +1 -0
- package/assets/esri/core/workers/chunks/1d78ec98eef7fef08f86.js +1 -0
- package/assets/esri/core/workers/chunks/1df8330823841b5bb6a5.js +1 -0
- package/assets/esri/core/workers/chunks/1e6062dc68c26fcf608f.js +1 -0
- package/assets/esri/core/workers/chunks/1e6271524602e159dbad.js +1 -0
- package/assets/esri/core/workers/chunks/1ee3d44e6d7add0b24cb.js +1 -0
- package/assets/esri/core/workers/chunks/1f54ed4a5238ba1a2551.js +1 -0
- package/assets/esri/core/workers/chunks/1f96d597ba736e088168.js +1 -0
- package/assets/esri/core/workers/chunks/1fa2bf0d6740092ec619.js +1 -0
- package/assets/esri/core/workers/chunks/210ef3f1cc6ef8a831bf.js +1 -0
- package/assets/esri/core/workers/chunks/23c856265dd24ce54fdb.js +1028 -0
- package/assets/esri/core/workers/chunks/241ef4a1bea20b49d812.js +1 -0
- package/assets/esri/core/workers/chunks/25bc7c7bc2793d209640.js +1 -0
- package/assets/esri/core/workers/chunks/2662750d5761ed2d0eb7.js +1 -0
- package/assets/esri/core/workers/chunks/26e41b08efe77d247409.js +1 -0
- package/assets/esri/core/workers/chunks/297b58f29c496923e1f3.js +1 -0
- package/assets/esri/core/workers/chunks/2a2a9fa62969644ea200.js +1 -0
- package/assets/esri/core/workers/chunks/2abb64323839367c9205.js +1 -0
- package/assets/esri/core/workers/chunks/2b296378d21e4e3c11d4.js +1 -0
- package/assets/esri/core/workers/chunks/2b76a8897ad7ba284d33.js +1 -0
- package/assets/esri/core/workers/chunks/2bd8bf6749d101d82d61.js +1 -0
- package/assets/esri/core/workers/chunks/2cbcf34cf896a438999b.js +1 -0
- package/assets/esri/core/workers/chunks/2ddb8bb00b3af83ebd7c.js +1 -0
- package/assets/esri/core/workers/chunks/2de299ff3a902d380be6.js +1 -0
- package/assets/esri/core/workers/chunks/2e06baf6469820697f17.js +1 -0
- package/assets/esri/core/workers/chunks/{531c55f3b8e708ccf767.js → 2f3aeaa25a76ab94b8e5.js} +1 -1
- package/assets/esri/core/workers/chunks/305b2a8dc6438c5fd4aa.js +1 -0
- package/assets/esri/core/workers/chunks/33de1d899a4fa9ab6ab1.js +1 -0
- package/assets/esri/core/workers/chunks/36da644678e6acf3bdb5.js +1 -0
- package/assets/esri/core/workers/chunks/3861644c06cfebe8f40c.js +2 -0
- package/assets/esri/core/workers/chunks/38d5dd4d457428244302.js +1 -0
- package/assets/esri/core/workers/chunks/394b645d51e7bf799382.js +1 -0
- package/assets/esri/core/workers/chunks/3a8320a40916c755c031.js +1 -0
- package/assets/esri/core/workers/chunks/3c2eb386c0165150e039.js +1 -0
- package/assets/esri/core/workers/chunks/3d0aa5f2db79c022243e.js +1 -0
- package/assets/esri/core/workers/chunks/3e26f9af6b8c75bad97a.js +1 -0
- package/assets/esri/core/workers/chunks/3ed7f19f77a11fa4d047.js +1 -0
- package/assets/esri/core/workers/chunks/3f812b0a28afb47aaaf0.js +2 -0
- package/assets/esri/core/workers/chunks/403060849a2573bbf110.js +1 -0
- package/assets/esri/core/workers/chunks/41a95ad470ec42ecd5a2.js +1 -0
- package/assets/esri/core/workers/chunks/43c8b1473695574c663e.js +2 -0
- package/assets/esri/core/workers/chunks/452d71789a1b77cff48d.js +1 -0
- package/assets/esri/core/workers/chunks/465cc0e00f03cdb640b2.js +1 -0
- package/assets/esri/core/workers/chunks/48a56b19bf825f05cc6e.js +1 -0
- package/assets/esri/core/workers/chunks/4d16b6ac52e25bd7e6aa.js +1 -0
- package/assets/esri/core/workers/chunks/4d7f7b1e7663cf6088d1.js +1 -0
- package/assets/esri/core/workers/chunks/50ab9a3f8bbb268fae59.js +1 -0
- package/assets/esri/core/workers/chunks/51ade971dda3ebe90f31.js +1 -0
- package/assets/esri/core/workers/chunks/{cbcb3530375e280bfeac.js → 53f8c1d56ef3b24d2226.js} +1 -1
- package/assets/esri/core/workers/chunks/544bfa97837770a8792f.js +1 -0
- package/assets/esri/core/workers/chunks/{ec63c0fa21cd3c872633.js → 54794b18edc584fd7515.js} +1 -1
- package/assets/esri/core/workers/chunks/561484ab6ed564e4b90f.js +1 -0
- package/assets/esri/core/workers/chunks/5690b49f355a5e2083a9.js +1 -0
- package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +1 -0
- package/assets/esri/core/workers/chunks/592f6bf0283152481f21.js +1 -0
- package/assets/esri/core/workers/chunks/5a6a6e7151085a3cd3dd.js +1 -0
- package/assets/esri/core/workers/chunks/5a6d6082c5bcb1a80eda.js +1 -0
- package/assets/esri/core/workers/chunks/5b2dd164dd84fd1ca4f7.js +1 -0
- package/assets/esri/core/workers/chunks/5b70ee8122262de5bbdf.js +1 -0
- package/assets/esri/core/workers/chunks/5b991b0d4ca257291cb0.js +1 -0
- package/assets/esri/core/workers/chunks/5e3019ba1b4c88977a19.js +1 -0
- package/assets/esri/core/workers/chunks/5e360f933da02d8d2455.js +1 -0
- package/assets/esri/core/workers/chunks/5e4ea6a2784eed1423f1.js +1 -0
- package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +1 -0
- package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +1 -0
- package/assets/esri/core/workers/chunks/601e44839fd46e449aa8.js +1 -0
- package/assets/esri/core/workers/chunks/62c228ca16fdc7a2c695.js +1 -0
- package/assets/esri/core/workers/chunks/639202a461b17840a13f.js +1 -0
- package/assets/esri/core/workers/chunks/63934843c9f4ef779a07.js +1 -0
- package/assets/esri/core/workers/chunks/63b5b57f27c7c6194d44.js +1 -0
- package/assets/esri/core/workers/chunks/{003019c2741aef2d1aa0.js → 65520a443e3811255bea.js} +1 -1
- package/assets/esri/core/workers/chunks/693d269637135047a0c4.js +1 -0
- package/assets/esri/core/workers/chunks/{36215b2c0b1020743458.js → 6a14ec2d2de6778a4e7a.js} +1 -1
- package/assets/esri/core/workers/chunks/6ac84e6d33104e74398d.js +1 -0
- package/assets/esri/core/workers/chunks/6cdda5aa35fa12ea9345.js +1 -0
- package/assets/esri/core/workers/chunks/6d3467997b5d01630b08.js +1 -0
- package/assets/esri/core/workers/chunks/6dfcb0c804e63e87e311.js +1 -0
- package/assets/esri/core/workers/chunks/6f079f1fd6d00d2d174c.js +1 -0
- package/assets/esri/core/workers/chunks/6fde745f3a62e7f5a97d.js +1 -0
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +1 -0
- package/assets/esri/core/workers/chunks/72cd450b24fdfcef6547.js +1 -0
- package/assets/esri/core/workers/chunks/7386a61f9610b8e5c608.js +1 -0
- package/assets/esri/core/workers/chunks/73e02f6c7ccc2013c812.js +1 -0
- package/assets/esri/core/workers/chunks/73e384fd93cf22503d84.js +1 -0
- package/assets/esri/core/workers/chunks/74a6d840813ac29b0bda.js +1 -0
- package/assets/esri/core/workers/chunks/{f6aa34577c5fab8cc1f5.js → 74e3c224e879edb37812.js} +1 -1
- package/assets/esri/core/workers/chunks/75664587bb80f4e187e1.js +1 -0
- package/assets/esri/core/workers/chunks/75fd96fd9557ac1f8e10.js +1 -0
- package/assets/esri/core/workers/chunks/7642905920e169a147f3.js +1 -0
- package/assets/esri/core/workers/chunks/764d080f77dec5e7a02c.js +1 -0
- package/assets/esri/core/workers/chunks/777b0e07f72c42470d36.js +1 -0
- package/assets/esri/core/workers/chunks/7873ee080c175d17a444.js +1 -0
- package/assets/esri/core/workers/chunks/7975abb2162a82c88edb.js +1 -0
- package/assets/esri/core/workers/chunks/7a2dd3d85d31dce29d94.js +1 -0
- package/assets/esri/core/workers/chunks/7b297a2f712361bfae2e.js +1 -0
- package/assets/esri/core/workers/chunks/7cec3252e3ee56424b9e.js +1 -0
- package/assets/esri/core/workers/chunks/7d274a077bdfa8c485e8.js +1 -0
- package/assets/esri/core/workers/chunks/7dd1e93469d0b1d652bc.js +1 -0
- package/assets/esri/core/workers/chunks/8012fdc49a7a10982f78.js +1 -0
- package/assets/esri/core/workers/chunks/835a929e37811d0f82cb.js +1 -0
- package/assets/esri/core/workers/chunks/835d6dd8c5a00682d879.js +1 -0
- package/assets/esri/core/workers/chunks/83d913dab3c2b0d6a7cc.js +1 -0
- package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +1 -0
- package/assets/esri/core/workers/chunks/85e0fd618625a639387f.js +1 -0
- package/assets/esri/core/workers/chunks/85f309c1888c1c8411b1.js +1 -0
- package/assets/esri/core/workers/chunks/86161025b53b916328ff.js +1 -0
- package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +1 -0
- package/assets/esri/core/workers/chunks/86465d4bb185d7460087.js +1 -0
- package/assets/esri/core/workers/chunks/87e7378b242debbfd575.js +1 -0
- package/assets/esri/core/workers/chunks/8838ff9668b472af16a1.js +1 -0
- package/assets/esri/core/workers/chunks/889835e61ea97f090082.js +1 -0
- package/assets/esri/core/workers/chunks/8aabc71d7f15c4407d7d.js +1 -0
- package/assets/esri/core/workers/chunks/8c2e5b116bac21e7d577.js +1 -0
- package/assets/esri/core/workers/chunks/8cf58806671ed491a456.js +1 -0
- package/assets/esri/core/workers/chunks/8d1d0c3f0532aa98487d.js +1 -0
- package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +1 -0
- package/assets/esri/core/workers/chunks/90b19e60c056f32623e7.js +1 -0
- package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +1 -0
- package/assets/esri/core/workers/chunks/91e56959b2fddf1a9743.js +1 -0
- package/assets/esri/core/workers/chunks/925980d26d71987ac80c.js +1 -0
- package/assets/esri/core/workers/chunks/93515f52d9b5fa12bd04.js +1 -0
- package/assets/esri/core/workers/chunks/9461f7225c42cf15a114.js +1 -0
- package/assets/esri/core/workers/chunks/946698d9cefffdb63082.js +1 -0
- package/assets/esri/core/workers/chunks/978649cb6df99ee728be.js +1 -0
- package/assets/esri/core/workers/chunks/99101789035f1787c630.js +1 -0
- package/assets/esri/core/workers/chunks/9a2b1f0ca66c1b87c830.js +1 -0
- package/assets/esri/core/workers/chunks/9c6e96b1c2b0418a4f1c.js +1 -0
- package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +1 -0
- package/assets/esri/core/workers/chunks/9f5f4da954228d876219.js +1 -0
- package/assets/esri/core/workers/chunks/a010fc1123bc0eeda478.js +1 -0
- package/assets/esri/core/workers/chunks/a1a12552d34ea9eea130.js +1 -0
- package/assets/esri/core/workers/chunks/a2323c957c8b2fe225b4.js +1 -0
- package/assets/esri/core/workers/chunks/a34e3c6da7d98569c052.js +1 -0
- package/assets/esri/core/workers/chunks/a36a33f43610c3cd985b.js +1 -0
- package/assets/esri/core/workers/chunks/a381932eef77f4d80292.js +1 -0
- package/assets/esri/core/workers/chunks/a495e60996a36ce19a32.js +1 -0
- package/assets/esri/core/workers/chunks/a53fa34681efff8fc024.js +1 -0
- package/assets/esri/core/workers/chunks/a7a9716582b256d76e5b.js +1 -0
- package/assets/esri/core/workers/chunks/a96c7432ca97cbeef4b8.js +1 -0
- package/assets/esri/core/workers/chunks/{ec0fcb1834c88090e7af.js → aa60f735ccd39cedef7e.js} +1 -1
- package/assets/esri/core/workers/chunks/aa9c11f25d95372998a3.js +1 -0
- package/assets/esri/core/workers/chunks/{128cdb4a02549abc68b5.js → aec33bdb355bd04f28ae.js} +1 -1
- package/assets/esri/core/workers/chunks/aece665144aed2065ffc.js +1 -0
- package/assets/esri/core/workers/chunks/af75e91b88e747aa76ac.js +1 -0
- package/assets/esri/core/workers/chunks/b089947c9a492c96ca27.js +1 -0
- package/assets/esri/core/workers/chunks/b35ea099334c867bde02.js +1 -0
- package/assets/esri/core/workers/chunks/b553264db0f10bb8c5f7.js +1 -0
- package/assets/esri/core/workers/chunks/b586f1021a27c5e1551a.js +2 -0
- package/assets/esri/core/workers/chunks/{236f8137ae505c8f0764.js → b65550b2f685ba760b2c.js} +1 -1
- package/assets/esri/core/workers/chunks/b6e4c35b76379088035c.js +1 -0
- package/assets/esri/core/workers/chunks/b730131e52f9220db031.js +1 -0
- package/assets/esri/core/workers/chunks/{9332db133a0925d522fe.js → b8b2f160518e3a225d99.js} +1 -1
- package/assets/esri/core/workers/chunks/bbf2afa05314e267893f.js +1 -0
- package/assets/esri/core/workers/chunks/bc982142e61598bd367c.js +1 -0
- package/assets/esri/core/workers/chunks/bcd701892ee120e13a18.js +1 -0
- package/assets/esri/core/workers/chunks/bd278f8081be8304be8d.js +1 -0
- package/assets/esri/core/workers/chunks/bd2f577cae61facdde4a.js +1 -0
- package/assets/esri/core/workers/chunks/c1a26956713262cb3cb3.js +1 -0
- package/assets/esri/core/workers/chunks/c1dc14b07282474a7c2d.js +1 -0
- package/assets/esri/core/workers/chunks/c327fe276238af60fda4.js +1 -0
- package/assets/esri/core/workers/chunks/c4a78ab84186c7be599a.js +1 -0
- package/assets/esri/core/workers/chunks/c4dc60617152d885f3da.js +1 -0
- package/assets/esri/core/workers/chunks/c6d5f6cfbb31a3fd11ff.js +1 -0
- package/assets/esri/core/workers/chunks/c7f27a84268a9b0d8cdb.js +1 -0
- package/assets/esri/core/workers/chunks/c80c6e60c87c3e5f5e62.js +1 -0
- package/assets/esri/core/workers/chunks/c91993503de5faa404f0.js +1 -0
- package/assets/esri/core/workers/chunks/c9a42d86185a0ad35dd1.js +1 -0
- package/assets/esri/core/workers/chunks/c9d600dc6b6b5aafff1c.js +1 -0
- package/assets/esri/core/workers/chunks/ca33847a997ccfe8ddc2.js +1 -0
- package/assets/esri/core/workers/chunks/ca64867bc322a354be8e.js +1 -0
- package/assets/esri/core/workers/chunks/cb6a7ca4ba2cf0b5ced7.js +1 -0
- package/assets/esri/core/workers/chunks/cc3939983cf6f78f7243.js +1 -0
- package/assets/esri/core/workers/chunks/cca19c9564be2d02a277.js +1 -0
- package/assets/esri/core/workers/chunks/ccc2f2b3db008d8a495f.js +1 -0
- package/assets/esri/core/workers/chunks/cce2ea441adb47d15a06.js +1 -0
- package/assets/esri/core/workers/chunks/ce063df750018024c9ed.js +1 -0
- package/assets/esri/core/workers/chunks/ce3e192fbb53a9c6eb3b.js +1 -0
- package/assets/esri/core/workers/chunks/d3734c8de029f1a65315.js +1 -0
- package/assets/esri/core/workers/chunks/d7229019876c0e4ff545.js +1 -0
- package/assets/esri/core/workers/chunks/d72d5031887373d35610.js +1 -0
- package/assets/esri/core/workers/chunks/d7840c3e792efcccee35.js +1 -0
- package/assets/esri/core/workers/chunks/d9f900975ac915a0f24f.js +1 -0
- package/assets/esri/core/workers/chunks/da780342f16e65b55ac8.js +1 -0
- package/assets/esri/core/workers/chunks/db005d9419bb718b3962.js +1 -0
- package/assets/esri/core/workers/chunks/db5bbc240a1b8cd5af52.js +1 -0
- package/assets/esri/core/workers/chunks/dcc8363faa22e6211351.js +1 -0
- package/assets/esri/core/workers/chunks/dcef87f7d06c45cd928b.js +1 -0
- package/assets/esri/core/workers/chunks/dd5d66f067e2386e0514.js +1 -0
- package/assets/esri/core/workers/chunks/dd6efa0afe879bd11a2e.js +1 -0
- package/assets/esri/core/workers/chunks/deaca3cd202851ecf9c2.js +1 -0
- package/assets/esri/core/workers/chunks/df321c37b61099f6e4c2.js +1 -0
- package/assets/esri/core/workers/chunks/e021b2f0e15aee5bf3ad.js +1 -0
- package/assets/esri/core/workers/chunks/e0344b45af88081fa186.js +1 -0
- package/assets/esri/core/workers/chunks/{77fc225259f1c5800095.js → e2661d39c48376163adf.js} +1 -1
- package/assets/esri/core/workers/chunks/e2bdb0e87422e222646e.js +1 -0
- package/assets/esri/core/workers/chunks/e3fe1db9380633292b27.js +1 -0
- package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +1 -0
- package/assets/esri/core/workers/chunks/e6f51f66b71e0d6525ec.js +1 -0
- package/assets/esri/core/workers/chunks/e7bee85f28d7ec03825a.js +1 -0
- package/assets/esri/core/workers/chunks/e8495c655a0a4f534636.js +1 -0
- package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +1 -0
- package/assets/esri/core/workers/chunks/ea245d3a6fd601fffd88.js +1 -0
- package/assets/esri/core/workers/chunks/eb4ffb72c9360062141c.js +1 -0
- package/assets/esri/core/workers/chunks/ebae903845643d60b44a.js +1 -0
- package/assets/esri/core/workers/chunks/ebb0372e8da0f75c09dd.js +1 -0
- package/assets/esri/core/workers/chunks/eef102e13fd8878eeb96.js +1 -0
- package/assets/esri/core/workers/chunks/ef267b938327c41727c1.js +1 -0
- package/assets/esri/core/workers/chunks/ef72f4822284bcad75d8.js +1 -0
- package/assets/esri/core/workers/chunks/efb2a8879011d2d77a81.js +1 -0
- package/assets/esri/core/workers/chunks/f0e6a26a3625068b08ab.js +1 -0
- package/assets/esri/core/workers/chunks/f12f96770a45ce6d1ed7.js +1 -0
- package/assets/esri/core/workers/chunks/f349f64f683620bdf9b5.js +30 -0
- package/assets/esri/core/workers/chunks/f379f94adbe79dc305a2.js +1 -0
- package/assets/esri/core/workers/chunks/f4301ea9a6cb3bcef906.js +1 -0
- package/assets/esri/core/workers/chunks/f5144e570952ca62a1b0.js +1 -0
- package/assets/esri/core/workers/chunks/f5cebeaad3e7d87d7997.js +1 -0
- package/assets/esri/core/workers/chunks/f6c9742691ccdaed44a2.js +1 -0
- package/assets/esri/core/workers/chunks/f76c2b09e6ba9d107898.js +1 -0
- package/assets/esri/core/workers/chunks/f7d67b7c9785a1955b17.js +1 -0
- package/assets/esri/core/workers/chunks/faad127dc07e54e7f6d1.js +1 -0
- package/assets/esri/core/workers/chunks/fcf962f3dec6b5440983.js +1 -0
- package/assets/esri/core/workers/chunks/feececf6809231f72c5a.js +1 -0
- package/chunks/Compositing.glsl.js +3 -4
- package/chunks/OITBlend.glsl.js +8 -7
- package/config.d.ts +94 -34
- package/config.js +1 -1
- package/core/SetUtils.js +1 -1
- package/geometry/support/curves/curveUtils.js +1 -1
- package/identity/IdentityManager.d.ts +11 -7
- package/identity/IdentityManagerBase.d.ts +13 -9
- package/kernel.js +1 -1
- package/layers/SubtypeGroupLayer.d.ts +0 -1
- package/layers/support/EditingCapabilities.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/package.json +4 -4
- package/rest/query/operations/pbfFlatFeatureSet.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.d.ts +1 -1
- package/smartMapping/raster/renderers/flow.d.ts +2 -1
- package/smartMapping/renderers/color.d.ts +19 -3
- package/smartMapping/renderers/dotDensity.d.ts +6 -1
- package/smartMapping/renderers/heatmap.d.ts +4 -1
- package/smartMapping/renderers/location.d.ts +2 -2
- package/smartMapping/renderers/opacity.d.ts +2 -2
- package/smartMapping/renderers/pieChart.d.ts +2 -2
- package/smartMapping/renderers/predominance.d.ts +2 -2
- package/smartMapping/renderers/relationship.d.ts +2 -2
- package/smartMapping/renderers/size.d.ts +7 -6
- package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
- package/smartMapping/renderers/type.d.ts +4 -3
- package/smartMapping/renderers/univariateColorSize.d.ts +2 -2
- package/smartMapping/statistics/support/ageUtils.d.ts +3 -2
- package/smartMapping/statistics/types.d.ts +8 -7
- package/smartMapping/support/adapters/types.d.ts +6 -0
- package/smartMapping/symbology/color.d.ts +1 -1
- package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
- package/smartMapping/symbology/support/colorRamps.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/OccludedVisibility.d.ts +1 -1
- package/symbols/support/OccludedVisibility.js +1 -1
- package/symbols/support/Symbol3DEmissive.d.ts +33 -17
- package/views/2d/engine/webgl/MaterialManager.js +1 -1
- package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/SnappingVisualizer2D.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/webglDeps.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsTechnique.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicStateTracking.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/terrain/BlendLayersTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +2 -0
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/View.d.ts +8 -0
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/PolygonPlugin.js +1 -1
- package/views/draw/support/InteractiveHandle.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/SnappingVisualizer.js +1 -1
- package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
- package/views/interactive/snapping/hints/CurveSnappingHint.js +2 -0
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/AllocationTracer.js +1 -1
- package/views/webgl/AppleAmdDriverHelper.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/ProgramCache.js +1 -1
- package/views/webgl/ProgramTemplate.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/WebGLDriverTestModule.js +1 -1
- package/views/webgl/testAppleAmdDrawArrays.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/webscene/Glow.d.ts +19 -14
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +15 -4
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflowData.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/Workflow.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
- package/widgets/Editor/support/EditorItem.js +1 -1
- package/widgets/Editor/support/SketchController.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +17 -5
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +17 -5
- package/widgets/FeatureTable.d.ts +16 -4
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +9 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.d.ts +9 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/assets/esri/core/workers/chunks/00bb90a3f0560800279b.js +0 -1
- package/assets/esri/core/workers/chunks/02d862fe58670c1f4722.js +0 -1
- package/assets/esri/core/workers/chunks/033b4f9ca08791e0c001.js +0 -1
- package/assets/esri/core/workers/chunks/045e4e520d6dffe06ba7.js +0 -1
- package/assets/esri/core/workers/chunks/04f82b740325e3388d23.js +0 -1
- package/assets/esri/core/workers/chunks/05d6cd51ca970705e46a.js +0 -1
- package/assets/esri/core/workers/chunks/08d73543c713984f6ecf.js +0 -1028
- package/assets/esri/core/workers/chunks/0b59e5be22139387bd84.js +0 -1
- package/assets/esri/core/workers/chunks/0e1d559d05229ef92e35.js +0 -1
- package/assets/esri/core/workers/chunks/0e6ffb02a929130ddb50.js +0 -1
- package/assets/esri/core/workers/chunks/112227b862b935123ddf.js +0 -2
- package/assets/esri/core/workers/chunks/11882cbb28710e5f9fc5.js +0 -1
- package/assets/esri/core/workers/chunks/12cfe900ce04af22f162.js +0 -1
- package/assets/esri/core/workers/chunks/1336f685bae5f1251558.js +0 -1
- package/assets/esri/core/workers/chunks/13512a23655258fa77f4.js +0 -1
- package/assets/esri/core/workers/chunks/13da9e3b96d8f653cbad.js +0 -1
- package/assets/esri/core/workers/chunks/1469e6d1d0d4e310b8f8.js +0 -1
- package/assets/esri/core/workers/chunks/15d46482ec096e3ce161.js +0 -1
- package/assets/esri/core/workers/chunks/1757133063fac226fdd4.js +0 -1
- package/assets/esri/core/workers/chunks/1794db88a2006711eff3.js +0 -1
- package/assets/esri/core/workers/chunks/189e22df73414a1a3989.js +0 -1
- package/assets/esri/core/workers/chunks/1951ff6789b9a598f122.js +0 -1
- package/assets/esri/core/workers/chunks/1ba756289468064f6204.js +0 -1
- package/assets/esri/core/workers/chunks/1cfa8d404d42b9eccf78.js +0 -1
- package/assets/esri/core/workers/chunks/1e916e552ce7d53692d2.js +0 -1
- package/assets/esri/core/workers/chunks/1fb6b65d8fd21fb9a21e.js +0 -1
- package/assets/esri/core/workers/chunks/2011da6dfc4bb89829c6.js +0 -1
- package/assets/esri/core/workers/chunks/203ef5459fc5dde12851.js +0 -1
- package/assets/esri/core/workers/chunks/215c54520d0da638fe57.js +0 -1
- package/assets/esri/core/workers/chunks/22045f85e503ae0ec8f4.js +0 -1
- package/assets/esri/core/workers/chunks/2351b713ba3d05de0728.js +0 -1
- package/assets/esri/core/workers/chunks/249630af2fb01257eb75.js +0 -1
- package/assets/esri/core/workers/chunks/24dd404612c35f6a3fc3.js +0 -1
- package/assets/esri/core/workers/chunks/25d34552bfb255af9467.js +0 -1
- package/assets/esri/core/workers/chunks/27c34a73fb380fc57f6e.js +0 -1
- package/assets/esri/core/workers/chunks/27d60fd727e9a68973f6.js +0 -1
- package/assets/esri/core/workers/chunks/27e14277128446e76b45.js +0 -1
- package/assets/esri/core/workers/chunks/2a3e82a230b7ee4dfd55.js +0 -1
- package/assets/esri/core/workers/chunks/2c69d8bb1c950b95278d.js +0 -1
- package/assets/esri/core/workers/chunks/2c6dbb9a8d7cc35f5093.js +0 -1
- package/assets/esri/core/workers/chunks/2d376f82cdf020e1fca9.js +0 -1
- package/assets/esri/core/workers/chunks/2d67ab4927a968d5c8d4.js +0 -1
- package/assets/esri/core/workers/chunks/2e50b7651f8c037bb3b0.js +0 -1
- package/assets/esri/core/workers/chunks/2e63e18df96e5a2461de.js +0 -1
- package/assets/esri/core/workers/chunks/2e82e284bbb3ff769a0b.js +0 -1
- package/assets/esri/core/workers/chunks/31184dc458281af654c7.js +0 -1
- package/assets/esri/core/workers/chunks/3214763f268622f09986.js +0 -1
- package/assets/esri/core/workers/chunks/32a1ccc145c9f6091e13.js +0 -1
- package/assets/esri/core/workers/chunks/34691b147318b2cfdd45.js +0 -1
- package/assets/esri/core/workers/chunks/34b367f617a7b3db55e0.js +0 -1
- package/assets/esri/core/workers/chunks/37d4a0b941bb2a7f113a.js +0 -1
- package/assets/esri/core/workers/chunks/3875b075ffaa1ed0089f.js +0 -1
- package/assets/esri/core/workers/chunks/3d3b1ce112be6ea31d93.js +0 -1
- package/assets/esri/core/workers/chunks/3dfc088a2c5289e6c79f.js +0 -1
- package/assets/esri/core/workers/chunks/3f3c63420644f9522ab1.js +0 -1
- package/assets/esri/core/workers/chunks/3fcab49eb215a477d8c4.js +0 -1
- package/assets/esri/core/workers/chunks/41108f58f0f439ebba3f.js +0 -1
- package/assets/esri/core/workers/chunks/415957a42e45eb21aa84.js +0 -1
- package/assets/esri/core/workers/chunks/4375d046b041a770c871.js +0 -1
- package/assets/esri/core/workers/chunks/43c797bfc2191b51875b.js +0 -1
- package/assets/esri/core/workers/chunks/460a82f3e4838b13e3b4.js +0 -1
- package/assets/esri/core/workers/chunks/473e43a74f56cb9bfe65.js +0 -1
- package/assets/esri/core/workers/chunks/4801e48cd4a14bacab78.js +0 -1
- package/assets/esri/core/workers/chunks/499d594dc0d282dfe777.js +0 -1
- package/assets/esri/core/workers/chunks/4ad6f80488aa218b95e3.js +0 -1
- package/assets/esri/core/workers/chunks/4db259316b193fcc4541.js +0 -1
- package/assets/esri/core/workers/chunks/4e9863a11d09900baf30.js +0 -1
- package/assets/esri/core/workers/chunks/4fe210314813ea1f7a26.js +0 -1
- package/assets/esri/core/workers/chunks/51603e99469847aa3ac4.js +0 -1
- package/assets/esri/core/workers/chunks/52705ccbb452a3edb064.js +0 -1
- package/assets/esri/core/workers/chunks/53e348f5585fa8c53fe8.js +0 -2
- package/assets/esri/core/workers/chunks/54c545f44b7ce21fb604.js +0 -1
- package/assets/esri/core/workers/chunks/54db2d2418721e92fbb0.js +0 -1
- package/assets/esri/core/workers/chunks/552e5c413828e181f89a.js +0 -1
- package/assets/esri/core/workers/chunks/558e9fed2e58cbbf9947.js +0 -1
- package/assets/esri/core/workers/chunks/55c5c4fcec0f8c4d59b2.js +0 -1
- package/assets/esri/core/workers/chunks/58134617fb7530836b81.js +0 -1
- package/assets/esri/core/workers/chunks/58c4be467a922fe37f01.js +0 -1
- package/assets/esri/core/workers/chunks/5924fe7de9f5ff8984ad.js +0 -1
- package/assets/esri/core/workers/chunks/5cd39bb8123adc80d8a7.js +0 -1
- package/assets/esri/core/workers/chunks/5cd8bbb719d95cb32cab.js +0 -1
- package/assets/esri/core/workers/chunks/5dba08099036e69e0a04.js +0 -1
- package/assets/esri/core/workers/chunks/5eb5d3b2329ec648cf3f.js +0 -1
- package/assets/esri/core/workers/chunks/5f10f39835cb40179000.js +0 -1
- package/assets/esri/core/workers/chunks/5f9eeab833a6c08c76c4.js +0 -1
- package/assets/esri/core/workers/chunks/606b4f1be91905a10bdb.js +0 -1
- package/assets/esri/core/workers/chunks/628056a312d919e98fa3.js +0 -1
- package/assets/esri/core/workers/chunks/62e9a9821f1563515ab4.js +0 -1
- package/assets/esri/core/workers/chunks/639302042c30e4265694.js +0 -1
- package/assets/esri/core/workers/chunks/645e086291b04bc036d7.js +0 -1
- package/assets/esri/core/workers/chunks/651b46aeabf22ff53a38.js +0 -1
- package/assets/esri/core/workers/chunks/65ad8838911a6d71816b.js +0 -1
- package/assets/esri/core/workers/chunks/65f86594c42ff82095fe.js +0 -1
- package/assets/esri/core/workers/chunks/6772468d1721d6d2a529.js +0 -1
- package/assets/esri/core/workers/chunks/677f5e444ff588ab670f.js +0 -1
- package/assets/esri/core/workers/chunks/6869f975d42b5a2936e2.js +0 -1
- package/assets/esri/core/workers/chunks/69ab42b965bccc3bad4f.js +0 -1
- package/assets/esri/core/workers/chunks/6a083fde0e207625fd0b.js +0 -1
- package/assets/esri/core/workers/chunks/6a9a96aa811c1d3b6edb.js +0 -1
- package/assets/esri/core/workers/chunks/6b3494e5a32912ee6325.js +0 -1
- package/assets/esri/core/workers/chunks/6b5d2cef309a2581d0d1.js +0 -1
- package/assets/esri/core/workers/chunks/6bf7d8de86b9eb76f920.js +0 -1
- package/assets/esri/core/workers/chunks/6c0b7890c8eec7febe28.js +0 -1
- package/assets/esri/core/workers/chunks/6c85396c90941a042c33.js +0 -1
- package/assets/esri/core/workers/chunks/6d02fdcaa1559b741f89.js +0 -1
- package/assets/esri/core/workers/chunks/6f337c3ccd84d90a35e5.js +0 -1
- package/assets/esri/core/workers/chunks/71159f66d9867aaea6cf.js +0 -1
- package/assets/esri/core/workers/chunks/711bec78dc00fad0f78d.js +0 -1
- package/assets/esri/core/workers/chunks/71ad08a5b69cf2e6714e.js +0 -1
- package/assets/esri/core/workers/chunks/7382c9882525101eddad.js +0 -1
- package/assets/esri/core/workers/chunks/750dfcbfcadf0629daf6.js +0 -1
- package/assets/esri/core/workers/chunks/75907e5d009b71ce723b.js +0 -1
- package/assets/esri/core/workers/chunks/79c69ae86a1f4a56f7c7.js +0 -1
- package/assets/esri/core/workers/chunks/79ee97609f72e4cf989c.js +0 -1
- package/assets/esri/core/workers/chunks/7a037fbfd91dd22e3bf0.js +0 -1
- package/assets/esri/core/workers/chunks/7cf8fc491877d59caf3a.js +0 -1
- package/assets/esri/core/workers/chunks/7d2b1e5402a88b6bee85.js +0 -1
- package/assets/esri/core/workers/chunks/7ec83fc059325e207825.js +0 -1
- package/assets/esri/core/workers/chunks/7ee7529fcbd0d169047c.js +0 -1
- package/assets/esri/core/workers/chunks/7f385e9c88df3395e678.js +0 -1
- package/assets/esri/core/workers/chunks/80d51d58db09b9f96cb5.js +0 -1
- package/assets/esri/core/workers/chunks/81a45d7e9dadf678b584.js +0 -1
- package/assets/esri/core/workers/chunks/81c758bdc07ed9d9a132.js +0 -1
- package/assets/esri/core/workers/chunks/822a115c7d718e4e3d2b.js +0 -1
- package/assets/esri/core/workers/chunks/825ffcde4f224006e776.js +0 -1
- package/assets/esri/core/workers/chunks/83711695e16912e9b9c5.js +0 -1
- package/assets/esri/core/workers/chunks/8374658d17f69bde6b08.js +0 -1
- package/assets/esri/core/workers/chunks/84b6ac0965d83704ba5d.js +0 -1
- package/assets/esri/core/workers/chunks/88a02b3a802d484c08a8.js +0 -1
- package/assets/esri/core/workers/chunks/89cd0e3420ab31e98a77.js +0 -1
- package/assets/esri/core/workers/chunks/8c3bf66f8543cedc72ef.js +0 -1
- package/assets/esri/core/workers/chunks/8cade3af17a8bb6d4e37.js +0 -1
- package/assets/esri/core/workers/chunks/8eea620f770576d18809.js +0 -1
- package/assets/esri/core/workers/chunks/9138503cc61989b00444.js +0 -1
- package/assets/esri/core/workers/chunks/920d6330df72e2f01d19.js +0 -1
- package/assets/esri/core/workers/chunks/936974764f433eb928a8.js +0 -1
- package/assets/esri/core/workers/chunks/99c9f35a29f9f6c9e4ce.js +0 -1
- package/assets/esri/core/workers/chunks/9a52bb5949ca836b7e79.js +0 -1
- package/assets/esri/core/workers/chunks/9a5327d3c3658e60564d.js +0 -1
- package/assets/esri/core/workers/chunks/9dc7abca1d1eb9ba5b58.js +0 -1
- package/assets/esri/core/workers/chunks/9e054c264b17f04b7efa.js +0 -1
- package/assets/esri/core/workers/chunks/a143a6f8e2f21548b244.js +0 -1
- package/assets/esri/core/workers/chunks/a33a3c9bbe6bc7273285.js +0 -1
- package/assets/esri/core/workers/chunks/a48a6232fa33084cb686.js +0 -1
- package/assets/esri/core/workers/chunks/a4947d5d2fa6b7bd399b.js +0 -1
- package/assets/esri/core/workers/chunks/a49f1172b17c14527acf.js +0 -1
- package/assets/esri/core/workers/chunks/a7d4d257f49f3b153c26.js +0 -1
- package/assets/esri/core/workers/chunks/aaf3ed508d30ed583915.js +0 -1
- package/assets/esri/core/workers/chunks/aceec85ce64a3e6d8761.js +0 -1
- package/assets/esri/core/workers/chunks/b10b3eb8c2ed9be14ab2.js +0 -1
- package/assets/esri/core/workers/chunks/b220fedcb8a2d6450408.js +0 -1
- package/assets/esri/core/workers/chunks/b315b3771d0d19681aa5.js +0 -1
- package/assets/esri/core/workers/chunks/b397a9f87082705301a4.js +0 -2
- package/assets/esri/core/workers/chunks/b40e4ed067da65c3d7ce.js +0 -1
- package/assets/esri/core/workers/chunks/b4b16914950792c46bd3.js +0 -1
- package/assets/esri/core/workers/chunks/b5f291e8ed7f7cac158d.js +0 -1
- package/assets/esri/core/workers/chunks/b6969a42602517a6ef1c.js +0 -1
- package/assets/esri/core/workers/chunks/b732ad893d352db79ee1.js +0 -1
- package/assets/esri/core/workers/chunks/b9226dd0342cfd30ece0.js +0 -1
- package/assets/esri/core/workers/chunks/baad696d84ab78b3d00e.js +0 -2
- package/assets/esri/core/workers/chunks/bab1c3f48d089d71e983.js +0 -30
- package/assets/esri/core/workers/chunks/bab6dee8f4715d05d984.js +0 -1
- package/assets/esri/core/workers/chunks/bc2dcbdc414d157ab727.js +0 -1
- package/assets/esri/core/workers/chunks/bcb254cb7297fec88679.js +0 -1
- package/assets/esri/core/workers/chunks/bd2125e0a68378533641.js +0 -1
- package/assets/esri/core/workers/chunks/bdb4f216ae8881b98604.js +0 -1
- package/assets/esri/core/workers/chunks/bde2c3199f667b63dbe8.js +0 -1
- package/assets/esri/core/workers/chunks/be52d98da81b413388b3.js +0 -1
- package/assets/esri/core/workers/chunks/bf42b5c77f5757dc9328.js +0 -1
- package/assets/esri/core/workers/chunks/bf595eb10f99b8a96baa.js +0 -1
- package/assets/esri/core/workers/chunks/c0b6706f86665cec85f8.js +0 -1
- package/assets/esri/core/workers/chunks/c2ef5e5a3a4fad7f65db.js +0 -1
- package/assets/esri/core/workers/chunks/c3c6d337ff53e5d921e8.js +0 -1
- package/assets/esri/core/workers/chunks/c461c19e4fdbdd2e94d4.js +0 -1
- package/assets/esri/core/workers/chunks/c5fa5645f3a10dfdd7fb.js +0 -1
- package/assets/esri/core/workers/chunks/c66aa57b6360963bd938.js +0 -1
- package/assets/esri/core/workers/chunks/c873ac660e7d5dc88781.js +0 -1
- package/assets/esri/core/workers/chunks/c99f36159b5ed6f9267e.js +0 -1
- package/assets/esri/core/workers/chunks/c9a57f6d0d35b968ebea.js +0 -1
- package/assets/esri/core/workers/chunks/ca6a65f149e7f34dab9c.js +0 -1
- package/assets/esri/core/workers/chunks/cb5f4820277f3fc7ff2f.js +0 -1
- package/assets/esri/core/workers/chunks/cf4202ad468501ef24cf.js +0 -1
- package/assets/esri/core/workers/chunks/d03d50f3247327257d8b.js +0 -1
- package/assets/esri/core/workers/chunks/d1bfb6a229a58e2af761.js +0 -1
- package/assets/esri/core/workers/chunks/d2017b0b27b9e4ada922.js +0 -1
- package/assets/esri/core/workers/chunks/d2d9c1f32a75befe168b.js +0 -1
- package/assets/esri/core/workers/chunks/d309172ad61de2b3c15d.js +0 -1
- package/assets/esri/core/workers/chunks/d3416e6da0c1cbb53b3a.js +0 -1
- package/assets/esri/core/workers/chunks/d39f5d57f7e35c00ca16.js +0 -1
- package/assets/esri/core/workers/chunks/d4422e6e1f09d8c9352e.js +0 -1
- package/assets/esri/core/workers/chunks/d4770dddfbfdc3845749.js +0 -1
- package/assets/esri/core/workers/chunks/d5b4487a983921572e58.js +0 -1
- package/assets/esri/core/workers/chunks/d5f06cb4797629648997.js +0 -1
- package/assets/esri/core/workers/chunks/d78b2f85ec9212a973e8.js +0 -1
- package/assets/esri/core/workers/chunks/d7f89a3372730dacc04c.js +0 -1
- package/assets/esri/core/workers/chunks/d9dc8d9fc8ab2706f96b.js +0 -1
- package/assets/esri/core/workers/chunks/da42da04a9df651b06cc.js +0 -1
- package/assets/esri/core/workers/chunks/dc7860179a2d1fd05ac2.js +0 -1
- package/assets/esri/core/workers/chunks/dc7df2072c0ebed5602c.js +0 -1
- package/assets/esri/core/workers/chunks/dc96f2f6e0e02e47476f.js +0 -1
- package/assets/esri/core/workers/chunks/dd24cddc406f610d2483.js +0 -1
- package/assets/esri/core/workers/chunks/dd3789e71270a4640551.js +0 -1
- package/assets/esri/core/workers/chunks/dd6d4a0f1f3215ca34a5.js +0 -1
- package/assets/esri/core/workers/chunks/de6438fdbe38d32c4ad5.js +0 -1
- package/assets/esri/core/workers/chunks/ded71a656e2626a411f9.js +0 -1
- package/assets/esri/core/workers/chunks/df1fa0f7e8f7e2bcc2e6.js +0 -1
- package/assets/esri/core/workers/chunks/df80d5345765b769416f.js +0 -1
- package/assets/esri/core/workers/chunks/e16d542648bae86e890f.js +0 -1
- package/assets/esri/core/workers/chunks/e1827e86226bf9a0f4ea.js +0 -1
- package/assets/esri/core/workers/chunks/e2e03622936d2b35afc0.js +0 -1
- package/assets/esri/core/workers/chunks/e33f5780fb45ac7ca889.js +0 -1
- package/assets/esri/core/workers/chunks/e3ee2b699c42fd113b46.js +0 -1
- package/assets/esri/core/workers/chunks/e4611ebd7dba7692a914.js +0 -1
- package/assets/esri/core/workers/chunks/e508f8e707eb3207cfcc.js +0 -1
- package/assets/esri/core/workers/chunks/e52793690dff1a199647.js +0 -1
- package/assets/esri/core/workers/chunks/e55859fce1908c24423a.js +0 -1
- package/assets/esri/core/workers/chunks/e56a10a475ce128b5fce.js +0 -1
- package/assets/esri/core/workers/chunks/e93df239fc54af2bd6ba.js +0 -1
- package/assets/esri/core/workers/chunks/ea633a6a3b9ea8ce965d.js +0 -1
- package/assets/esri/core/workers/chunks/eae1c098c16e2faaf90d.js +0 -1
- package/assets/esri/core/workers/chunks/eaf5d55060ffc55aac39.js +0 -1
- package/assets/esri/core/workers/chunks/ece363681bb09072f379.js +0 -1
- package/assets/esri/core/workers/chunks/edaae0fc63d16b0f675d.js +0 -2
- package/assets/esri/core/workers/chunks/ee31d9f44e028df16bd5.js +0 -1
- package/assets/esri/core/workers/chunks/ee89564d11c077169b31.js +0 -1
- package/assets/esri/core/workers/chunks/ee905e24320241959965.js +0 -1
- package/assets/esri/core/workers/chunks/eebf59ac2dd60b9fb262.js +0 -1
- package/assets/esri/core/workers/chunks/ef4237dc7b67c9039826.js +0 -1
- package/assets/esri/core/workers/chunks/ef9106ee818ec732b670.js +0 -1
- package/assets/esri/core/workers/chunks/f0780abe66118b3a0bf2.js +0 -1
- package/assets/esri/core/workers/chunks/f121a0bf33c03abfa0b6.js +0 -1
- package/assets/esri/core/workers/chunks/f4329e3e4e072fac8dc0.js +0 -1
- package/assets/esri/core/workers/chunks/f5dbffd5e8b3c16336a1.js +0 -1
- package/assets/esri/core/workers/chunks/f62e37863a549f72093c.js +0 -1
- package/assets/esri/core/workers/chunks/f984248e2ce417e49f2f.js +0 -1
- package/assets/esri/core/workers/chunks/fab7e3e07d700d7bb651.js +0 -1
- package/assets/esri/core/workers/chunks/fcc8d0b60f7c2397e550.js +0 -1
- package/assets/esri/core/workers/chunks/fcf592dc8c017a08fee0.js +0 -1
- package/assets/esri/core/workers/chunks/fcf6a47f44c917490deb.js +0 -1
- package/assets/esri/core/workers/chunks/fe3c8a6fc080fdf2ad94.js +0 -1
- package/assets/esri/core/workers/chunks/fe5aec7e2da4465422b4.js +0 -1
- package/assets/esri/core/workers/chunks/fefc94944f07c768ad66.js +0 -1
- package/views/3d/webgl-engine/lib/CompositingHelper.js +0 -2
- /package/assets/esri/core/workers/chunks/{53e348f5585fa8c53fe8.js.LICENSE.txt → 13d1cb50232ae761425b.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b397a9f87082705301a4.js.LICENSE.txt → 3861644c06cfebe8f40c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{112227b862b935123ddf.js.LICENSE.txt → 3f812b0a28afb47aaaf0.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{edaae0fc63d16b0f675d.js.LICENSE.txt → 43c8b1473695574c663e.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{baad696d84ab78b3d00e.js.LICENSE.txt → b586f1021a27c5e1551a.js.LICENSE.txt} +0 -0
|
@@ -1,1028 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3354,6154,9397],{986(e,t,r){r.d(t,{A:()=>v});var i=r(43519),n=r(33079),o=r(71988),s=r(74333);class a extends s.n{constructor(e,t,r,i){super(e,"vec4",1,(t,n,o)=>t.setUniform4fv(e,r(n,o),i),t)}}class l extends s.n{constructor(e,t,r,i){super(e,"float",1,(t,n,o)=>t.setUniform1fv(e,r(n,o),i),t)}}var c=r(31821),u=r(35644),d=(r(34727),r(77690),r(29242),r(58083),r(9093)),h=(r(35522),r(51850)),m=(r(78955),r(91829),r(31756),r(5482)),p=r(69622),f=r(91429);let g=class extends p.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};function v(e,t){const{vertex:r,attributes:s}=e;t.hasVVInstancing&&(t.hasVVSize||t.hasVVColor)&&s.add("instanceFeatureAttribute","vec4"),t.hasVVSize?(r.uniforms.add(new n.t("vvSizeMinSize",e=>e.vvSize.minSize)),r.uniforms.add(new n.t("vvSizeMaxSize",e=>e.vvSize.maxSize)),r.uniforms.add(new n.t("vvSizeOffset",e=>e.vvSize.offset)),r.uniforms.add(new n.t("vvSizeFactor",e=>e.vvSize.factor)),r.uniforms.add(new n.t("vvSizeFallback",e=>e.vvSize.fallback)),r.uniforms.add(new u.k("vvSymbolRotationMatrix",e=>e.vvSymbolRotationMatrix)),r.uniforms.add(new n.t("vvSymbolAnchor",e=>e.vvSymbolAnchor)),r.code.add(c.H`vec3 vvScale(vec4 _featureAttribute) {
|
|
2
|
-
if (isnan(_featureAttribute.x)) {
|
|
3
|
-
return vvSizeFallback;
|
|
4
|
-
}
|
|
5
|
-
return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize);
|
|
6
|
-
}
|
|
7
|
-
vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) {
|
|
8
|
-
return vec4(vvSymbolRotationMatrix * ( vvScale(_featureAttribute) * (position + vvSymbolAnchor)), 1.0);
|
|
9
|
-
}`),r.code.add(c.H`
|
|
10
|
-
const float eps = 1.192092896e-07;
|
|
11
|
-
vec4 vvTransformNormal(vec3 _normal, vec4 _featureAttribute) {
|
|
12
|
-
vec3 scale = max(vvScale(_featureAttribute), eps);
|
|
13
|
-
return vec4(vvSymbolRotationMatrix * _normal / scale, 1.0);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
${t.hasVVInstancing?c.H`
|
|
17
|
-
vec4 vvLocalNormal(vec3 _normal) {
|
|
18
|
-
return vvTransformNormal(_normal, instanceFeatureAttribute);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
vec4 localPosition() {
|
|
22
|
-
return vvTransformPosition(position, instanceFeatureAttribute);
|
|
23
|
-
}`:""}
|
|
24
|
-
`)):r.code.add(c.H`vec4 localPosition() { return vec4(position, 1.0); }
|
|
25
|
-
vec4 vvLocalNormal(vec3 _normal) { return vec4(_normal, 1.0); }`),e.vertex.include(i.WD),t.hasVVColor?(r.constants.add("vvColorNumber","int",8),r.uniforms.add(new l("vvColorValues",8,e=>e.vvColor.values),new a("vvColorColors",8,e=>e.vvColor.colors),new o.E("vvColorFallback",e=>e.vvColor.fallback,{supportsNaN:!0})),t.hasVVInstancing&&(e.vertex.include(i.ML),e.vertex.include(i.oF)),r.code.add(c.H`
|
|
26
|
-
vec4 interpolateVVColor(float value) {
|
|
27
|
-
if (isnan(value)) {
|
|
28
|
-
return vvColorFallback;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (value <= vvColorValues[0]) {
|
|
32
|
-
return vvColorColors[0];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
for (int i = 1; i < vvColorNumber; ++i) {
|
|
36
|
-
if (vvColorValues[i] >= value) {
|
|
37
|
-
float f = (value - vvColorValues[i-1]) / (vvColorValues[i] - vvColorValues[i-1]);
|
|
38
|
-
return mix(vvColorColors[i-1], vvColorColors[i], f);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return vvColorColors[vvColorNumber - 1];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
vec4 vvGetColor(vec4 featureAttribute) {
|
|
45
|
-
return interpolateVVColor(featureAttribute.y);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
${t.hasVVInstancing?c.H`
|
|
49
|
-
vec4 vvColor() {
|
|
50
|
-
return vvGetColor(instanceFeatureAttribute);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
MaskedColor applyVVColor(MaskedColor color) {
|
|
54
|
-
return multiplyMaskedColors(color, createMaskedFromNaNColor(vvColor()));
|
|
55
|
-
}
|
|
56
|
-
`:c.H`
|
|
57
|
-
vec4 vvColor() {
|
|
58
|
-
return vec4(1.0);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
MaskedColor applyVVColor(MaskedColor color) {
|
|
62
|
-
return color;
|
|
63
|
-
}
|
|
64
|
-
`}
|
|
65
|
-
`)):r.code.add(c.H`vec4 vvColor() {
|
|
66
|
-
return vec4(1.0);
|
|
67
|
-
}
|
|
68
|
-
MaskedColor applyVVColor(MaskedColor color) {
|
|
69
|
-
return color;
|
|
70
|
-
}`)}(0,m.Cg)([(0,f.MZ)()],g.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"LABELS_SHOW_BORDER",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"TEXT_SHOW_BASELINE",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"TEXT_SHOW_BORDER",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"SHOW_POI",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"LINE_WIREFRAMES",void 0),(0,m.Cg)([(0,f.MZ)()],g.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),g=(0,m.Cg)([(0,f.$K)("esri.views.3d.support.debugFlags")],g),new g,r(16943),r(65786).Y,(0,d.vt)(),(0,h.vt)(),(0,d.vt)()},1843(e,t,r){r.d(t,{BP:()=>d,l5:()=>h});var i=r(20498),n=r(13030),o=r(90239),s=r(4431),a=r(620),l=r(85079);class c{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new c(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class u{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:f(e[1].constructor)})))}freeze(){return this}get locations(){return(0,l.Xk)((0,s.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}vec4i16(e,t){return this._appendField(e,n.E7,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new c(this,e)}createView(e,t){return new c(this,e,t)}clone(){const e=new u;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function d(){return new u}class h{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:p(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const m=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function p(e){return`${e.ElementType}_${e.ElementCount}`}function f(e){return g.get(e)}const g=new Map;m.forEach(e=>g.set(p(e),e))},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const s=e.fields.get(o),a=s.constructor.ElementCount,l=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(s.constructor.ElementType),c=s.offset,u=s.optional?.glNormalized??!1,d=s.optional?.integer??!1;return new n._(o,a,l,c,r,u,t,d)})}},6867(e,t,r){r.d(t,{i:()=>u});var i=r(58083),n=r(9093),o=r(35522),s=r(51850),a=r(78955),l=r(91829),c=r(71351);class u{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,o.hs)(h,this.ray.direction,this.distance),(0,o.Bw)(h))}withinDistance(e){return!!d(this)&&this.distanceInRenderSpace<=e}getIntersectionPoint(e){return!!d(this)&&((0,o.hs)(h,this.ray.direction,this.distance),(0,o.WQ)(e,this.ray.origin,h),!0)}getTransformedNormal(e){return(0,o.C)(m,this.normal),m[3]=0,(0,a.Z0)(m,m,this.transformation),(0,o.C)(e,m),(0,o.S8)(e,e)}constructor(e){this.intersector=4,this.normal=(0,s.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,c.vt)(),this.init(e)}init(e){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,c.C)(e,this._ray)}set(e,t,r,a,l,c,u){this.intersector=e,this.distance=r,(0,o.C)(this.normal,a??s.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=t,this.drapedLayerOrder=c,this.renderPriority=u}copy(e){(0,c.C)(e.ray,this._ray),this.intersector=e.intersector,this.distance=e.distance,this.target=e.target,this.drapedLayerOrder=e.drapedLayerOrder,this.renderPriority=e.renderPriority,(0,o.C)(this.normal,e.normal),(0,i.C)(this.transformation,e.transformation)}}function d(e){return null!=e?.distance}const h=(0,s.vt)(),m=(0,l.vt)()},9169(e,t,r){r.d(t,{E:()=>v});var i=r(33120),n=r(68317),o=r(76597),s=r(73955),a=r(31821);function l(e,t){if(9!==t.output)return e.vertex.code.add(a.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(a.H`void outputObjectAndLayerIdColor() {}`);const r=t.instanced;e.varyings.add("objectAndLayerIdColorVarying","vec4");const i=r?"instanceOlidColor":"olidColor";e.attributes.add(i,"vec4"),e.vertex.code.add(a.H`
|
|
71
|
-
void forwardObjectAndLayerIdColor() {
|
|
72
|
-
objectAndLayerIdColorVarying = ${i} * 0.003921568627451;
|
|
73
|
-
}`),e.fragment.code.add(a.H`void outputObjectAndLayerIdColor() {
|
|
74
|
-
fragColor = objectAndLayerIdColorVarying;
|
|
75
|
-
}`)}var c=r(53466),u=r(72824);function d(e,t){switch(t.output){case 3:case 4:case 5:case 6:e.fragment.code.add(a.H`float _calculateFragDepth(const in float depth) {
|
|
76
|
-
const float SLOPE_SCALE = 2.0;
|
|
77
|
-
const float BIAS = 20.0 * .000015259;
|
|
78
|
-
float m = max(abs(dFdx(depth)), abs(dFdy(depth)));
|
|
79
|
-
return depth + SLOPE_SCALE * m + BIAS;
|
|
80
|
-
}
|
|
81
|
-
void outputDepth(float _linearDepth){
|
|
82
|
-
float fragDepth = _calculateFragDepth(_linearDepth);
|
|
83
|
-
gl_FragDepth = fragDepth;
|
|
84
|
-
}`);break;case 7:e.fragment.code.add(a.H`void outputDepth(float _linearDepth){
|
|
85
|
-
gl_FragDepth = _linearDepth;
|
|
86
|
-
}`)}}var h=r(42593),m=r(986),p=r(58614),f=r(20693),g=r(63761);function v(e,t){const{vertex:r,fragment:v,varyings:_}=e,{hasColorTexture:x,alphaDiscardMode:y}=t,w=x&&1!==y,{output:b,normalType:M,hasColorTextureTransform:T}=t;switch(b){case 1:(0,f.NB)(r,t),e.include(o.d),v.include(n.HQ,t),e.include(c.U,t),w&&v.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(a.H`vpos = getVertexInLocalOriginSpace();
|
|
87
|
-
vpos = subtractOrigin(vpos);
|
|
88
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
89
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
90
|
-
forwardTextureCoordinates();`),e.include(p.S,t),v.main.add(a.H`
|
|
91
|
-
discardBySlice(vpos);
|
|
92
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
93
|
-
discardOrAdjustAlpha(texColor);`)}`);break;case 3:case 4:case 5:case 6:case 9:(0,f.NB)(r,t),e.include(o.d),e.include(c.U,t),e.include(m.A,t),e.include(d,t),v.include(n.HQ,t),e.include(l,t),(0,i.xJ)(e),_.add("depth","float",{invariant:!0}),w&&v.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(a.H`vpos = getVertexInLocalOriginSpace();
|
|
94
|
-
vpos = subtractOrigin(vpos);
|
|
95
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
96
|
-
gl_Position = transformPositionWithDepth(proj, view, vpos, nearFar, depth);
|
|
97
|
-
forwardTextureCoordinates();
|
|
98
|
-
forwardObjectAndLayerIdColor();`),e.include(p.S,t),v.main.add(a.H`
|
|
99
|
-
discardBySlice(vpos);
|
|
100
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
101
|
-
discardOrAdjustAlpha(texColor);`)}
|
|
102
|
-
${9===b?a.H`outputObjectAndLayerIdColor();`:a.H`outputDepth(depth);`}`);break;case 2:{(0,f.NB)(r,t),e.include(o.d),e.include(s.Y,t),e.include(u.Mh,t),e.include(c.U,t),e.include(m.A,t),w&&v.uniforms.add(new g.N("tex",e=>e.texture)),2===M&&_.add("vPositionView","vec3",{invariant:!0});const i=0===M||1===M;r.main.add(a.H`
|
|
103
|
-
vpos = getVertexInLocalOriginSpace();
|
|
104
|
-
${i?a.H`vNormalWorld = dpNormalView(vvLocalNormal(normalModel()));`:a.H`vPositionView = (view * vec4(vpos, 1.0)).xyz;`}
|
|
105
|
-
vpos = subtractOrigin(vpos);
|
|
106
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
107
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
108
|
-
forwardTextureCoordinates();`),v.include(n.HQ,t),e.include(p.S,t),v.main.add(a.H`
|
|
109
|
-
discardBySlice(vpos);
|
|
110
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
111
|
-
discardOrAdjustAlpha(texColor);`)}
|
|
112
|
-
|
|
113
|
-
${2===M?a.H`vec3 normal = screenDerivativeNormal(vPositionView);`:a.H`vec3 normal = normalize(vNormalWorld);
|
|
114
|
-
if (gl_FrontFacing == false){
|
|
115
|
-
normal = -normal;
|
|
116
|
-
}`}
|
|
117
|
-
fragColor = vec4(0.5 + 0.5 * normal, 1.0);`);break}case 8:(0,f.NB)(r,t),e.include(o.d),e.include(c.U,t),e.include(m.A,t),w&&v.uniforms.add(new g.N("tex",e=>e.texture)),r.main.add(a.H`vpos = getVertexInLocalOriginSpace();
|
|
118
|
-
vpos = subtractOrigin(vpos);
|
|
119
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
120
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
121
|
-
forwardTextureCoordinates();`),v.include(n.HQ,t),e.include(p.S,t),e.include(h.Q,t),v.main.add(a.H`
|
|
122
|
-
discardBySlice(vpos);
|
|
123
|
-
${(0,a.If)(w,a.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
|
|
124
|
-
discardOrAdjustAlpha(texColor);`)}
|
|
125
|
-
calculateOcclusionAndOutputHighlight();`)}}},10906(e,t,r){r.d(t,{b:()=>o});var i=r(33094),n=r(31821);function o(e,t){t.snowCover&&(e.uniforms.add(new i.U("snowCover",e=>e.snowCover)).code.add(n.H`float getSnow(vec3 normal, vec3 groundNormal) {
|
|
126
|
-
return smoothstep(0.5, 0.55, dot(normal, groundNormal)) * snowCover;
|
|
127
|
-
}
|
|
128
|
-
float getRealisticTreeSnow(vec3 faceNormal, vec3 shadingNormal, vec3 groundNormal) {
|
|
129
|
-
float snow = min(1.0, smoothstep(0.5, 0.55, dot(faceNormal, groundNormal)) +
|
|
130
|
-
smoothstep(0.5, 0.55, dot(-faceNormal, groundNormal)) +
|
|
131
|
-
smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
|
|
132
|
-
return snow * snowCover;
|
|
133
|
-
}`),e.code.add(n.H`vec3 applySnowToMRR(vec3 mrr, float snow) {
|
|
134
|
-
return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
|
|
135
|
-
}`))}},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>c,_I:()=>d,vt:()=>l});var i=r(34727),n=r(4341),o=r(35522),s=r(51850),a=r(32114);function l(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function c(e,t){const r=h.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function d(e,t,r){return function(e,t,r,n,s){const{vector:l,origin:c}=e,u=(0,o.Re)(a.rq.get(),t,c),d=(0,o.Om)(l,u)/(0,o.m3)(l);return(0,o.hs)(s,l,(0,i.qE)(d,0,1)),(0,o.WQ)(s,s,e.origin)}(e,t,0,0,r)}(0,s.vt)(),(0,s.vt)();const h=new n.I(()=>l())},12791(e,t,r){r.d(t,{x:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}},13840(e,t,r){r.d(t,{r:()=>i});class i{constructor(e,t){this._module=e,this._load=t}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},14113(e,t,r){r.d(t,{N5:()=>a});var i=r(49186),n=(r(44208),r(53966));const o=()=>n.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class s{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class a extends s{constructor(){super(...arguments),this.vertex=new d,this.fragment=new d,this.attributes=new h,this.varyings=new m,this.outputs=new p}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){const r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),n="vertex"===e?this.vertex:this.fragment,o=n.uniforms.generateSource(),s=n.code.generateSource(),a=n.main.generateSource(t),l=this.debugName?`// ${this.debugName}\n`:"",c="vertex"===e?v:g,u=n.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${l}\n${c}\n${u.join("\n")}\n${o.join("\n")}\n${r.join("\n")}\n${i.join("\n")}\n${d.join("\n")}\n${s.join("\n")}\n${a.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return t=>{for(let n=0;n<i;++n)r[n](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let o=0;o<i;++o)r[o](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),i=r.length;return(t,n,o)=>{for(let s=0;s<i;++s)r[s](e,o,t,n)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class c{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(e){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(e)throw new i.A("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class d extends s{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new c(this),this.code=new u(this),this.constants=new f(this)}get builder(){return this}}class h{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class m{constructor(){this._entries=new Map}add(e,t,r){this._entries.has(e)?o().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:r?.invariant??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,i)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+("int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${i};`)),t}}class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?.name!==e||i?.type!==t?this._entries.set(r,{name:e,type:t}):o().warn(`Fragment shader output location ${r} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class f{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=f._numberToFloatStr(r);break;case"int":i=f._numberToIntStr(r);break;case"uint":i=f._numberToUintStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${f._numberToFloatStr(r[0])}, ${f._numberToFloatStr(r[1])}, ${f._numberToFloatStr(r[2])}, ${f._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${f._numberToIntStr(r[0])}, ${f._numberToIntStr(r[1])}, ${f._numberToIntStr(r[2])}, ${f._numberToIntStr(r[3])})`;break;case"uvec2":i=`uvec2(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])})`;break;case"uvec3":i=`uvec3(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])})`;break;case"uvec4":i=`uvec4(${f._numberToUintStr(r[0])}, ${f._numberToUintStr(r[1])}, ${f._numberToUintStr(r[2])}, ${f._numberToUintStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,e=>f._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToUintStr(e){return`${e.toFixed(0)}u`}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const g="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",v="precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n "},14314(e,t,r){r.d(t,{I:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",0,(i,n)=>i.setUniform4fv(e,t(n),r))}}},14527(e,t,r){r.d(t,{n:()=>vt});var i=r(31821),n=r(12791),o=r(5482),s=r(34727),a=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),h=r(69540);let m=class extends h.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"rows",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],m.prototype,"columns",void 0),m=(0,o.Cg)([(0,u.$K)("esri.CameraLayout")],m);const p=m;var f=r(69052),g=r(25482),v=r(56507),_=r(86738),x=r(43937),y=r(36005);let w=class extends((0,h.OU)(g.o)){constructor(...e){super(...e),this.position=new _.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new p}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,v.GB)(e.x||0),n.y=(0,v.GB)(e.y||0),n.z=e.hasZ?(0,v.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new _.A;return r.read(e,t),r.x=(0,v.GB)(r.x||0),r.y=(0,v.GB)(r.y||0),r.z=r.hasZ?(0,v.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,u.MZ)({type:_.A,json:{write:{isRequired:!0}}})],w.prototype,"position",void 0),(0,o.Cg)([(0,x.K)("position")],w.prototype,"writePosition",null),(0,o.Cg)([(0,y.w)("position")],w.prototype,"readPosition",null),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>f.ie.normalize((0,v.GB)(e)))],w.prototype,"heading",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>(0,s.qE)((0,v.GB)(e),-180,180))],w.prototype,"tilt",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,u.wg)(e=>(0,s.qE)((0,v.GB)(e,55),1,170))],w.prototype,"fov",void 0),(0,o.Cg)([(0,u.MZ)({type:p,nonNullable:!0,json:{read:!1,write:!1}})],w.prototype,"layout",void 0),w=(0,o.Cg)([(0,u.$K)("esri.Camera")],w);var b=r(9093),M=r(35522),T=r(51850),S=r(16930),C=(r(48353),r(9762),r(65806)),A=r(27993),E=r(73941),R=(r(19419),r(71351)),I=r(69622),O=r(53966),F=r(90629),P=r(58083),D=r(48163),N=r(78955),H=r(91829),L=r(82919),B=r(44280);const z=(0,T.vt)(),U=(0,T.vt)();var G;let V=G=class extends I.A{constructor(e){super(e),this._ray=(0,R.vt)(),this._viewport=(0,H.fA)(0,0,1,1),this._padding=(0,H.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,D.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,b.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,b.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,b.vt)(),this._frustumDirty=!0,this._frustum=(0,L.vt)(),this._fullViewport=(0,H.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,T.vt)(),this._up=(0,T.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,M.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,P.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,M.hZ)((0,T.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,N.hs)((0,H.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,N.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,N.hs)((0,H.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,N.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,N.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,N.C)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,P.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,P.B8)((0,b.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,b.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,M.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,P.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,P.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,s=-i/2+this.column*o,a=s+o,l=-r/2+this.row*n,c=l+n,u=(0,P.$h)((0,b.vt)(),s*(1+2*this._padding[3]/e),a*(1+2*this._padding[1]/e),l*(1+2*this._padding[2]/t),c*(1+2*this._padding[0]/t),this.near,this.far),d=this._get("projectionMatrix");return d&&(0,P.aI)(d,u)?d:u}copyFrom(e){(0,M.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,N.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,N.C)(this._padding,e.padding),this.notifyChange("_padding"),(0,d.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,P.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,L.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,P.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,N.C)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new G).copyFrom(this)}equals(e){return(0,M.t2)(this.eye,e.eye)&&(0,M.t2)(this.center,e.center)&&(0,M.t2)(this.up,e.up)&&(0,N.t2)(this._viewport,e.viewport)&&(0,N.t2)(this._padding,e.padding)&&(0,d.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,N.hG)(e.screenPadding,this.screenPadding)>=t||(0,N.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,M.jb)(k,e.eye,e.center),(0,M.jb)(Z,this.eye,this.center);const r=(0,M.Om)(k,Z),i=(0,M.uE)(k),n=(0,M.uE)(Z),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,M.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,B.gr)(this.viewForward,(0,M.Re)(k,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==j&&(0,M.C)(j,e),j[3]=1,(0,N.Z0)(j,j,this.projectionMatrix);const r=Math.abs(j[3]);(0,M.hs)(j,j,1/r);const i=this.fullViewport;t[0]=(0,s.Cc)(0,i[0]+i[2],.5+.5*j[0]),t[1]=(0,s.Cc)(0,i[1]+i[3],.5+.5*j[1]),t[2]=.5*(j[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;j[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],j[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],j[2]=(2*e[2]-1)*e[3],j[3]=e[3],null!=this.inverseProjectionMatrix&&((0,N.Z0)(j,j,this.inverseProjectionMatrix),t[0]=j[0],t[1]=j[1],t[2]=j[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,$),this.renderToScreen($,t),t}projectToRenderScreen(e,t){if(j[0]=e[0],j[1]=e[1],j[2]=e[2],j[3]=1,(0,N.Z0)(j,j,this.viewProjectionMatrix),0===j[3])return null;const r=j;(0,M.hs)(r,r,1/Math.abs(j[3]));const i=this.fullViewport,n=(0,s.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,s.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,$),t)}unprojectFromRenderScreen(e,t){if((0,P.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,P.B8)(W,W))return null;const r=this.fullViewport;return j[0]=2*(e[0]-r[0])/r[2]-1,j[1]=2*(e[1]-r[1])/r[3]-1,j[2]=2*e[2]-1,j[3]=1,(0,N.Z0)(j,j,W),0===j[3]?null:(t[0]=j[0]/j[3],t[1]=j[1]/j[3],t[2]=j[2]/j[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,s=Math.max(n-r/2,0),a=Math.max(this.fullHeight-o-i/2,0),l=-Math.min(n-r/2,0),c=-Math.min(this.fullHeight-o-i/2,0),u=r-l- -Math.min(this.fullWidth-n-r/2,0),d=i-c- -Math.min(o-i/2,0);return[Math.round(s),Math.round(a),Math.round(u),Math.round(d)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,a=Math.abs(Math.PI/2-function(e,t,r){e.worldUpAtPosition(t,z),(0,M.Re)(U,r,t);const i=(0,M.Bw)(U);return 0===i?0:(0,s.XM)((0,M.Om)(U,z)/i)}(t,r,i));return e.frustumCoverage(a,n,o)}_computeUpGlobal(){(0,M.Re)(k,this.center,this.eye);const e=(0,M.Bw)(this.center);e<1?(0,M.t2)(this._up,T.Cb)&&((0,M.C)(this._up,T.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,M.Om)(k,this.center))>.9999*(0,M.Bw)(k)*e||((0,M.$A)(Z,k,this.center),(0,M.$A)(Z,Z,k),(0,M.S8)(Z,Z),(0,M.t2)(this._up,Z)||((0,M.C)(this._up,Z),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,M.oW)(k,this.eye,this.center),Math.abs(k[2])<=.9999&&((0,M.hs)(k,k,k[2]),(0,M.hZ)(k,-k[0],-k[1],1-k[2]),(0,M.S8)(k,k),(0,M.t2)(this._up,k)||((0,M.C)(this._up,k),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,M.t2)(e,t)||((0,M.C)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):O.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,L.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,P.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,u.MZ)()],V.prototype,"_viewport",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_padding",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_fov",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_nearFar",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"pixelRatio",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_rows",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"rows",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_columns",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"columns",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"eye",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"center",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_center",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"up",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"_up",void 0),(0,o.Cg)([(0,u.MZ)()],V.prototype,"viewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"viewForward",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"viewUp",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"viewRight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"nearFar",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"near",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"far",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"viewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"screenViewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"screenPadding",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"x",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"y",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"width",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"height",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"fullWidth",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"fullHeight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"_aspect",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"padding",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"projectionMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"fov",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"fovX",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"fovY",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],V.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,u.MZ)()],V.prototype,"relativeElevation",void 0),V=G=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl.RenderCamera")],V);const j=(0,H.vt)(),W=(0,b.vt)(),k=(0,T.vt)(),Z=(0,T.vt)(),$=(0,F.r_)();r(49718),r(6867),r(16396),(0,T.vt)(),(0,T.vt)(),(0,T.vt)();var q=r(5443),Y=r(39829),X=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,s)=>{if(t[r]<i&&s[r]<i)return 1===n?0:1;if(t[r]>i&&s[r]>i)return 1===n?1:0;const a=(s[o]-t[o])/(s[r]-t[r]),l=t[o]+a*(i-t[r]);return e[r]=i,e[o]=l,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(Q,t[0],t[0])&&J(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(Q,t[r],i)){case 1:J(e,i);break;case 3:J(e,(0,D.o8)(Q));break;case 2:J(e,(0,D.o8)(Q)),J(e,i)}}}}function J(e,t){0!==e.length&&(0,d.aI)(e.at(-1),t)||e.push(t)}const Q=(0,D.vt)();var ee=r(11964),te=r(27921);const re=(0,T.vt)(),ie=(0,T.vt)();function ne(){return{direction:(0,T.vt)(),up:(0,T.vt)()}}function oe(e,t,r,i,n){let o=(0,M.S8)(re,e),a=(0,M.Om)(o,i);const l=a>0;a=Math.abs(a),a>.99&&(a=Math.abs((0,M.Om)(t,i)),a<.99?((0,M.C)(o,t),l&&(0,M.hs)(o,o,-1)):o=null);let c=0;if(o){(0,M.hs)(ie,i,(0,M.Om)(i,o)),(0,M.Re)(o,o,ie);const e=(0,M.Om)(o,n)/((0,M.Bw)(o)*(0,M.Bw)(n));(0,M.$A)(ie,o,n),c=((0,M.Om)(ie,i)>0?1:-1)*(0,s.KJ)((0,s.XM)(e))}const u=(0,s.KJ)((0,s.XM)(-(0,M.Om)(i,e)/(0,M.Bw)(e)));return r?(r.heading=c,r.tilt=u,r):{heading:c,tilt:u}}function se(e,t,r,i){(0,M.Re)(ae,r,t),(0,te.T7)(i,(0,ee.LV)(t,ae),e)||e===r||(0,M.C)(e,r)}const ae=(0,T.vt)(),le=(0,T.fA)(0,1,0),ce=(0,T.fA)(0,0,1),ue=(0,b.vt)(),de=(0,T.vt)(),he=(0,T.vt)();function me(e,t,r,i=ne()){const{direction:n,up:o}=i;return(0,P.N9)(ue,-(0,s.kU)(t)),(0,P.eL)(ue,ue,(0,s.kU)(r)),(0,M.Z0)(n,ce,ue),(0,M.hs)(n,n,-1),(0,M.Z0)(o,le,ue),i}function pe(e,t,r,i,n){const o=t.lines[11].direction,s=(n-r.getAltitude(i))/o[2];(0,M.Ln)(e,i,o,s)}const fe=(0,T.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return oe(t,r,i,ce,le)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,T.vt)();return(0,M.hs)(o,n.direction,-t),(0,M.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,s.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,s.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,s=e.state.camera.eye,a=[],l=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,R.LV)(t.origin,t.direction),n,fe)||pe(fe,r,i,t.endpoint,n),se(fe,s,fe,l),a.push((0,D.fA)(fe[0],fe[1]))}return function(e,t,r){const i=e.map(e=>((0,M.hZ)(fe,e[0],e[1],0),t.fromRenderCoords(fe,fe,r),[fe[0],fe[1]]));return i.length<=2?new Y.A({spatialReference:r}):(i.push(i[0].slice()),(0,X.$3)(i)||i.reverse(),new Y.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(a,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,s=e.spatialReference??t.spatialReference;return(0,C.g)(t,de,o),(0,C.g)(t,he,o),de[0]-=r/2,he[0]+=r/2,de[1]-=i/2,he[1]+=i/2,(0,A.F)(de,o,de,s),(0,A.F)(he,o,he,s),n?(n.xmin=de[0],n.ymin=de[1],n.xmax=he[0],n.ymax=he[1],n.spatialReference=s):n=new q.A(de[0],de[1],he[0],he[1],s),n}},Symbol.toStringTag,{value:"Module"}));var ge=r(34304),ve=r(17136),_e=r(94008),xe=r(28735);class ye{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,L.vt)(),this._points=(0,L.Qy)(),this.lines=new Array(12),this._origin=(0,T.vt)(),this._direction=(0,T.vt)(),this._boundingSphere=new _e.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,T.vt)(),endpoint:null}}update(e){(0,L.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,M.C)(this._origin,e.eye),(0,M.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,M.C)(this._points[t],e[t]);(0,L.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,L.m7)(this.frustum,e)}intersectsRay(e){return(0,L.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,L.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,L.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;we(this.lines[t],e[t],e[r]),we(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),we(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=Me;(0,M.S8)(t,this.direction);const r=be;(0,M.jb)(r,this.points[4],e);const i=.5*(0,M.Om)(r,r)/(0,M.Om)(t,r),n=this._boundingSphere,o=(0,M.Ln)(Te,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=L.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function we(e,t,r){e.origin=t,e.endpoint=r,(0,M.oW)(e.direction,t,r)}const be=(0,T.vt)(),Me=(0,T.vt)(),Te=(0,T.vt)();r(86211);const Se=(0,T.fA)(5802e-9,13558e-9,331e-7),Ce=(0,T.fA)(65e-8*3,5643e-9,255e-9);(0,T.fA)(Se[0]+Ce[0],Se[1]+Ce[1],Se[2]+Ce[2]);class Ae{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ae(0,0)}static{this.Infinite=new Ae}}(0,T.vt)(),(0,T.vt)(),new _e.iy,(0,R.vt)(),new q.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Ee=r(32728);const Re=(0,T.fA)(0,0,1),Ie=(0,M.S8)((0,T.vt)(),(0,T.fA)(1,1,1)),Oe=(0,b.vt)(),Fe=(0,T.vt)(),Pe=(0,T.vt)();function De(e,t,r,i=ne()){(0,M.$A)(Fe,e,Re),0===(0,M.Om)(Fe,Fe)&&(0,M.$A)(Fe,e,Ie),(0,P.$0)(Oe,-(0,s.kU)(t),e),(0,P.e$)(Oe,Oe,-(0,s.kU)(r),Fe);const{up:n,direction:o}=i;return(0,M.$A)(n,Fe,e),(0,M.S8)(n,n),(0,M.Z0)(n,n,Oe),(0,M.S8)(o,e),(0,M.ze)(o,o),(0,M.Z0)(o,o,Oe),i}function Ne(e){const t=e[1];e[1]=-e[2],e[2]=t}function He(e,t){const r=De(t,e.heading,e.tilt);return e.up=r.up,e}function Le(e,t){const r=[],i=[],n=(0,ge.FD)();for(let o=0;o<e.length;o++){const s=e[o],a=o===e.length-1?e[0]:e[o+1],l=(0,ee.Cr)(s,a,ke),c=(0,te.vE)(t,l.origin,l.vector,0,je);switch(c){case 2:r.push(s);break;case 3:i.push(s);break;case 0:case 1:{const[e,o,a]=0===c?[1,r,i]:[-1,i,r],l=(0,te.Qj)(t),u=(0,M.Ln)((0,T.vt)(),je,l,e*n),d=(0,M.Ln)((0,T.vt)(),je,l,e*-n);o.push(s),o.push(u),a.push(d)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const Be={minCurvature:(0,s.kU)(5),maxCurvature:(0,s.kU)(50),minSamples:1,maxSamples:6},ze=(0,T.fA)(1,0,0),Ue=(0,T.fA)(0,1,0),Ge=(0,T.vt)(),Ve=(0,T.vt)(),je=(0,T.vt)(),We=new _e.iy,ke=(0,ee.vt)(),Ze=(0,H.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Fe,o=Pe;return(0,M.S8)(n,e),(0,M.$A)(Pe,n,Re),0===(0,M.Om)(Pe,Pe)&&(0,M.$A)(Pe,n,Ie),(0,M.$A)(o,Pe,n),oe(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,T.vt)(),up:null,tilt:i,heading:r},o=Fe;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const a=t,l=(0,s.kU)(r),c=(0,s.kU)(i),u=Math.sin(l),d=Math.cos(l),h=Math.sin(c),m=Math.cos(c),p=(0,M.Bw)(o);let f;if(Math.abs(c)<1e-8)f=a+p;else{const e=p/h,t=(0,s.YN)(a/e),r=Math.PI-c-t;f=e*Math.sin(r)}const g=m*a,v=a*a*(h*h),_=d*d*v,x=f-g,y=x*x,w=_*(_+y-o[1]*o[1]);if(w<0)return(0,M.hs)(n.eye,o,f/p),n.tilt=0,He(n,e);const b=Math.sqrt(w),S=o[1]*x,C=_+y;let A;if(A=d>0?-b+S:b+S,Math.abs(C)<1e-8)return p<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=a):(0,M.hs)(n.eye,o,f/p),n.tilt=0,Ne(n.eye),He(n,e);n.eye[1]=A/C;const E=u*u*v,R=h*a,I=d*R*n.eye[1],O=n.eye[1]*n.eye[1],F=1-O,P=Math.sqrt(F),D=_*O+E-2*I*P*x+F*y;return Math.abs(D)<1e-8?((0,M.hs)(n.eye,o,f/p),n.tilt=0,Ne(n.eye),He(n,e)):(n.eye[0]=(F*(f*o[0]-g*o[0])-R*P*(o[0]*n.eye[1]*d+o[2]*u))/D,n.eye[2]=(F*(f*o[2]-g*o[2])-R*P*(o[2]*n.eye[1]*d-o[0]*u))/D,(0,M.hs)(n.eye,n.eye,f),Ne(n.eye),He(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,s.kU)(e),n=(0,M.Bw)(t);return(0,s.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:De,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,M.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,s.YN)(r/(n/Math.sin(e)));return(0,s.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new ye(r);i.near=2,n.update(i);const o=r.getAltitude(t),a=e.spatialReference,l=r.referenceEllipsoid.radius,c=i.eye,u=1+(0,M.Io)(c,t)/(l+o),d=Math.sqrt(u*u-1),{minCurvature:h,maxCurvature:m,minSamples:p,maxSamples:f}=Be,g=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return We.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(We,t)}(e),v=(0,s.qE)((d-h)/(m-h),0,1),_=Math.round((0,s.Cc)(p,f,v)),x=i.aboveGround,y=n.planes[5],w=[],b=(0,te.O_)(T.uY,ze,(0,te.vt)()),S=(0,te.O_)(T.uY,Ue,(0,te.vt)());(0,N.hZ)(Ze,0,0,0,0);const C=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-g:0,i=1===e&&x||3===e&&!x?g:1,a=n.lines[e],l=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const u=n/_,d=0===n?0:(0,s.Cc)(t,i,1===e?1-(1-u)**2:3===e?u**2:u),h=(0,M.Cc)(Ve,a.origin,l.origin,d),m=(0,Ee.nu)(a.direction,l.direction,d,Ge);r.intersectManifoldClosestSilhouette((0,R.LV)(h,m),o,je),se(je,c,je,y),w.push((0,T.o8)(je)),0!==w.length&&C((0,M.lo)(w.at(-1),je));const p=((0,te.Tj)(b,je)?1:0)|((0,te.Tj)(S,je)?2:0);Ze[p]=1}}w.length>2&&(0,M.lo)(w[0],w.at(-1));const A=function(e,t,r){const i=2*(0,ge.FD)();return e.map(e=>{const n=[];let o=!1;for(const s of e)t.fromRenderCoords(s,je,r),Math.abs(s[0])<i&&Math.abs(s[1])<i?(n.push([null,je[1]]),n.push([null,je[1]]),o=!0):n.push([je[0],je[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,X.$3)(n)||n.reverse(),n})}((0,N.m3)(Ze)>1?function(e,t){const r=[];for(const i of e)r.push(...Le(i,t));return r}(Le(w,b),S):[w],r,a);return new Y.A({rings:A,spatialReference:a})},toExtent:function(e,t,r,i,n){let o,a,l,c;const u=t.latitude,d=(0,E.tO)(e.spatialReference).radius,h=t.longitude,m=function(e,t,r){const i=t/r,n=(0,s.kU)(e),o=Math.sin(i/2),a=Math.cos(n),l=2*(0,s.YN)(Math.sqrt(o*o/(a*a)));return(0,s.KJ)(l)}(u,r,d)/2;o=h-m,a=h+m;const p=(0,s.kU)(u),g=(1+Math.sin(p))/(1-Math.sin(p)),v=(g+1)*Math.tan(i/d/2),_=v*v;function x(e){const t=Math.PI/2;return(e=f.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(l=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*g+_))),c=l+i/d,l=x(l),c=x(c),c<l){const e=c;c=l,l=e}if(l=Math.max((0,s.KJ)(l),-90),c=Math.min((0,s.KJ)(c),90),a=ve.Y_.monotonic(o,a),a-o>180){const e=(a-o-180)/2;o+=e,a-=e}const y=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:S.A.WGS84;return n?(n.xmin=o,n.ymin=l,n.xmax=a,n.ymax=c,n.spatialReference=y):n=new q.A(o,l,a,c,y),e.spatialReference&&e.spatialReference.isWebMercator&&(0,xe.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const $e="composite-color",qe=["final-color",$e,"opaque-color","transparent-color"],Ye={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_DEPTH:"cutfill-depth",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian-splat",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserline-color",MAGNIFIER:"magnifier-color",OCCLUDED:"occluded-color",OPAQUE_ENVIRONMENT:"opaque-environment-color",OPAQUE_TERRAIN:"opaque-terrain-color",SSAO:"ssao",TRANSPARENT_ENVIRONMENT:"transparent-environment-color",VIEWSHED:"viewshed-color"};Array.from(Object.values(Ye)).concat(qe),(0,T.vt)();var Xe=r(49186),Ke=r(10107),Je=r(64108);let Qe=class extends I.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=$e,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,l.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},l.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Xe.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return t.fbo?.initializeAndBind(),t}bindRenderTarget(){return this._frameBuffer?.fbo?.initializeAndBind(),this._frameBuffer}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,Ke.MZ)({constructOnly:!0})],Qe.prototype,"view",void 0),(0,o.Cg)([(0,Ke.MZ)({constructOnly:!0})],Qe.prototype,"consumes",void 0),(0,o.Cg)([(0,Ke.MZ)()],Qe.prototype,"produces",void 0),(0,o.Cg)([(0,Ke.MZ)({readOnly:!0})],Qe.prototype,"techniques",null),Qe=(0,o.Cg)([(0,Je.$)("esri.views.3d.webgl.RenderNode")],Qe);var et=r(15581),tt=r(13840),rt=r(42958),it=r(95774),nt=r(90644);let ot=class extends rt.w{constructor(){super(...arguments),this.shader=new tt.r(it.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};ot=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],ot);var st=r(65786);class at extends st.Y{constructor(){super(...arguments),this.projScale=1}}class lt extends at{constructor(){super(...arguments),this.intensity=1}}class ct extends st.Y{}class ut extends ct{constructor(){super(...arguments),this.blurSize=(0,D.vt)()}}let dt=class extends rt.w{constructor(){super(...arguments),this.shader=new tt.r(et.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,nt.Ey)({colorWrite:nt.kn})}};dt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],dt);var ht=r(63907),mt=r(76284),pt=r(67171);let ft=class extends Qe{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=Ye.SSAO,this.isEnabled=()=>!1,this._enableTime=(0,c.l5)(0),this._passParameters=new lt,this._drawParameters=new ut}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new pt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new mt.A(this.renderingContext,t,e),this.techniques.precompile(dt),this.techniques.precompile(ot),this.addHandles((0,l.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,a.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(ht.nI);if(!r||!i)return;const n=this.techniques.get(dt),o=this.techniques.get(ot);if(!n.compiled||!o.compiled)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const a=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,h=u.camera,m=h.relativeElevation,p=(0,s.qE)((5e5-m)/2e5,0,1),f=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,g=f*p;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*gt/(0,et.g)(h)**6*g;const v=h.fullViewport[2],_=h.fullViewport[3],x=this.fboCache.acquire(v,_,"ssao input",2);a.bindFramebuffer(x.fbo),a.setViewport(0,0,v,_),a.bindTechnique(n,u,this._passParameters,this._drawParameters),a.screen.draw();const y=Math.round(v/2),w=Math.round(_/2),b=this.fboCache.acquire(y,w,"ssao blur",0);a.bindFramebuffer(b.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/_),a.bindTechnique(o,u,this._passParameters,this._drawParameters),a.setViewport(0,0,y,w),a.screen.draw(),x.release();const M=this.fboCache.acquire(y,w,Ye.SSAO,0);return a.bindFramebuffer(M.fbo),a.setViewport(0,0,v,_),a.setClearColor(1,1,1,0),a.clear(16384),this._drawParameters.colorTexture=b.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/v,0),a.bindTechnique(o,u,this._passParameters,this._drawParameters),a.setViewport(0,0,y,w),a.screen.draw(),a.setViewport4fv(h.fullViewport),b.release(),f<1&&this.requestRender(2),M}};(0,o.Cg)([(0,u.MZ)()],ft.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],ft.prototype,"produces",void 0),(0,o.Cg)([(0,u.MZ)({constructOnly:!0})],ft.prototype,"isEnabled",void 0),ft=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],ft);const gt=.5;function vt(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
136
|
-
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
137
|
-
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
138
|
-
}
|
|
139
|
-
float evaluateAmbientOcclusion() {
|
|
140
|
-
return 1.0 - evaluateAmbientOcclusionInverse();
|
|
141
|
-
}`)):e.code.add(i.H`float evaluateAmbientOcclusionInverse() { return 1.0; }
|
|
142
|
-
float evaluateAmbientOcclusion() { return 0.0; }`)}},15581(e,t,r){r.d(t,{S:()=>x,b:()=>g,g:()=>v});var i=r(37585),n=r(48163),o=r(82048),s=r(52540),a=r(65261),l=r(34845),c=r(77108),u=r(47286),d=r(33094),h=r(20304),m=r(31821),p=r(63761),f=r(14113);function g(){const e=new f.N5,t=e.fragment;return e.include(o.c),e.include(l.Ir),t.include(s.E),t.include(a.C),t.uniforms.add(new d.U("radius",e=>v(e.camera))).code.add(m.H`vec3 sphere[16] = vec3[16](
|
|
143
|
-
vec3(0.186937, 0.0, 0.0),
|
|
144
|
-
vec3(0.700542, 0.0, 0.0),
|
|
145
|
-
vec3(-0.864858, -0.481795, -0.111713),
|
|
146
|
-
vec3(-0.624773, 0.102853, -0.730153),
|
|
147
|
-
vec3(-0.387172, 0.260319, 0.007229),
|
|
148
|
-
vec3(-0.222367, -0.642631, -0.707697),
|
|
149
|
-
vec3(-0.01336, -0.014956, 0.169662),
|
|
150
|
-
vec3(0.122575, 0.1544, -0.456944),
|
|
151
|
-
vec3(-0.177141, 0.85997, -0.42346),
|
|
152
|
-
vec3(-0.131631, 0.814545, 0.524355),
|
|
153
|
-
vec3(-0.779469, 0.007991, 0.624833),
|
|
154
|
-
vec3(0.308092, 0.209288,0.35969),
|
|
155
|
-
vec3(0.359331, -0.184533, -0.377458),
|
|
156
|
-
vec3(0.192633, -0.482999, -0.065284),
|
|
157
|
-
vec3(0.233538, 0.293706, -0.055139),
|
|
158
|
-
vec3(0.417709, -0.386701, 0.442449)
|
|
159
|
-
);
|
|
160
|
-
float fallOffFunction(float vv, float vn, float bias) {
|
|
161
|
-
float f = max(radius * radius - vv, 0.0);
|
|
162
|
-
return f * f * f * max(vn - bias, 0.0);
|
|
163
|
-
}`),t.code.add(m.H`float aoValueFromPositionsAndNormal(vec3 C, vec3 n_C, vec3 Q) {
|
|
164
|
-
vec3 v = Q - C;
|
|
165
|
-
float vv = dot(v, v);
|
|
166
|
-
float vn = dot(normalize(v), n_C);
|
|
167
|
-
return fallOffFunction(vv, vn, 0.1);
|
|
168
|
-
}`),e.outputs.add("fragOcclusion","float"),t.uniforms.add(new p.N("normalMap",e=>e.normalTexture),new p.N("depthMap",e=>e.depthTexture),new h.m("projScale",e=>e.projScale),new p.N("rnm",e=>e.noiseTexture),new u.G("rnmScale",(e,t)=>(0,i.hZ)(_,t.camera.fullWidth/e.noiseTexture.descriptor.width,t.camera.fullHeight/e.noiseTexture.descriptor.height)),new h.m("intensity",e=>e.intensity),new c.E("screenSize",e=>(0,i.hZ)(_,e.camera.fullWidth,e.camera.fullHeight))).main.add(m.H`
|
|
169
|
-
float depth = depthFromTexture(depthMap, uv);
|
|
170
|
-
|
|
171
|
-
// Early out if depth is out of range, such as in the sky
|
|
172
|
-
if (depth >= 1.0 || depth <= 0.0) {
|
|
173
|
-
fragOcclusion = 1.0;
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// get the normal of current fragment
|
|
178
|
-
ivec2 iuv = ivec2(uv * vec2(textureSize(normalMap, 0)));
|
|
179
|
-
vec4 norm4 = texelFetch(normalMap, iuv, 0);
|
|
180
|
-
if(norm4.a != 1.0) {
|
|
181
|
-
fragOcclusion = 1.0;
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
vec3 norm = normalize(norm4.xyz * 2.0 - 1.0);
|
|
185
|
-
|
|
186
|
-
float currentPixelDepth = linearizeDepth(depth);
|
|
187
|
-
vec3 currentPixelPos = reconstructPosition(gl_FragCoord.xy, currentPixelDepth);
|
|
188
|
-
|
|
189
|
-
float sum = 0.0;
|
|
190
|
-
vec3 tapPixelPos;
|
|
191
|
-
|
|
192
|
-
vec3 fres = normalize(2.0 * texture(rnm, uv * rnmScale).xyz - 1.0);
|
|
193
|
-
|
|
194
|
-
// note: the factor 2.0 should not be necessary, but makes ssao much nicer.
|
|
195
|
-
// bug or deviation from CE somewhere else?
|
|
196
|
-
float ps = projScale / (2.0 * currentPixelPos.z * zScale.x + zScale.y);
|
|
197
|
-
|
|
198
|
-
for(int i = 0; i < ${m.H.int(16)}; ++i) {
|
|
199
|
-
vec2 unitOffset = reflect(sphere[i], fres).xy;
|
|
200
|
-
vec2 offset = vec2(-unitOffset * radius * ps);
|
|
201
|
-
|
|
202
|
-
// don't use current or very nearby samples
|
|
203
|
-
if( abs(offset.x) < 2.0 || abs(offset.y) < 2.0){
|
|
204
|
-
continue;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
vec2 tc = vec2(gl_FragCoord.xy + offset);
|
|
208
|
-
if (tc.x < 0.0 || tc.y < 0.0 || tc.x > screenSize.x || tc.y > screenSize.y) continue;
|
|
209
|
-
vec2 tcTap = tc / screenSize;
|
|
210
|
-
float occluderFragmentDepth = linearDepthFromTexture(depthMap, tcTap);
|
|
211
|
-
|
|
212
|
-
tapPixelPos = reconstructPosition(tc, occluderFragmentDepth);
|
|
213
|
-
|
|
214
|
-
sum += aoValueFromPositionsAndNormal(currentPixelPos, norm, tapPixelPos);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
// output the result
|
|
218
|
-
float A = max(1.0 - sum * intensity / float(${m.H.int(16)}), 0.0);
|
|
219
|
-
|
|
220
|
-
// Anti-tone map to reduce contrast and drag dark region farther: (x^0.2 + 1.2 * x^4) / 2.2
|
|
221
|
-
A = (pow(A, 0.2) + 1.2 * pow(A, 4.0)) * INV_GAMMA;
|
|
222
|
-
|
|
223
|
-
fragOcclusion = A;
|
|
224
|
-
`),e}function v(e){return Math.max(10,20*e.computeScreenPixelSizeAtDist(Math.abs(4*e.relativeElevation)))}const _=(0,n.vt)(),x=Object.freeze(Object.defineProperty({__proto__:null,build:g,getRadius:v},Symbol.toStringTag,{value:"Module"}))},15976(e,t,r){r.d(t,{o:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",2,(r,i,n)=>r.bindTexture(e,t(i,n)))}}},16396(e,t,r){r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(35522),n=r(51850),o=r(94008),s=r(57005);const a=new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,n.vt)(),this._tmpSphere=new o.iy}applyToVertex(e,t,r){const n=this.objectTransform.transform,o=(0,i.hZ)(c,e,t,r),s=(0,i.Z0)(o,o,n),a=this.offset/(0,i.Bw)(s);(0,i.Ln)(s,s,s,a);const l=this.objectTransform.inverse;return(0,i.Z0)(this.tmpVertex,s,l),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.Bw)(e);(0,i.Ln)(e,e,e,r);const n=this.offset/(0,i.Bw)(t);(0,i.Ln)(t,t,t,n)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=e.center,r=(0,i.Bw)(t),n=this.offset/r;return(0,i.Ln)(this._tmpSphere.center,t,t,n),this._tmpSphere.radius=e.radius+e.radius*this.offset/r,this._tmpSphere}};function l(e){return null!=e?(a.offset=e,a):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,n.vt)(),this._tmpMbs=new o.iy,this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.Bw)(e)}applyToVertex(e,t,r){const n=(0,i.hZ)(c,e,t,r),o=(0,i.hZ)(u,e,t,r+this.componentLocalOriginLength),s=this._totalOffset/(0,i.Bw)(o);return(0,i.Ln)(this._tmpVertex,n,o,s),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],n=e[2]+t,o=e[3],s=e[4],a=e[5]+t,l=Math.abs(r),c=Math.abs(i),u=Math.abs(n),d=Math.abs(o),h=Math.abs(s),m=Math.abs(a),p=.5*(1+Math.sign(r*o))*Math.min(l,d),f=.5*(1+Math.sign(i*s))*Math.min(c,h),g=.5*(1+Math.sign(n*a))*Math.min(u,m),v=Math.max(l,d),_=Math.max(c,h),x=Math.max(u,m),y=Math.sqrt(p*p+f*f+g*g),w=Math.sign(l+r),b=Math.sign(c+i),M=Math.sign(u+n),T=Math.sign(d+o),S=Math.sign(h+s),C=Math.sign(m+a),A=this._totalOffset;if(y<A)return e[0]-=(1-w)*A,e[1]-=(1-b)*A,e[2]-=(1-M)*A,e[3]+=T*A,e[4]+=S*A,e[5]+=C*A,e;const E=A/Math.sqrt(v*v+_*_+x*x),R=A/y,I=R-E,O=-I;return e[0]+=r*(w*O+R),e[1]+=i*(b*O+R),e[2]+=n*(M*O+R),e[3]+=o*(T*I+E),e[4]+=s*(S*I+E),e[5]+=a*(C*I+E),e}applyToMbs(e){const t=e.center,r=(0,i.Bw)(t),n=this._totalOffset/r;return(0,i.Ln)(this._tmpMbs.center,t,t,n),this._tmpMbs.radius=e.radius+e.radius*this._totalOffset/r,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,n.vt)()}applyToVertex(e,t,r){const n=(0,i.hZ)(c,e,t,r),o=(0,i.WQ)(u,n,this.localOrigin),s=this.offset/(0,i.Bw)(o);return(0,i.Ln)(this.tmpVertex,n,o,s),this.tmpVertex}applyToAabb(e){const t=d,r=h,i=m;for(let n=0;n<3;++n)t[n]=e[0+n]+this.localOrigin[n],r[n]=e[3+n]+this.localOrigin[n],i[n]=t[n];const n=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=n[t],e[t+3]=n[t];const o=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let n=0;n<3;++n)i[n]=e&1<<n?r[n]:t[n];o(i)}let s=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(s|=1<<e);if(0!==s&&7!==s)for(let e=0;e<8;++e)if(0===(s&e)){for(let n=0;n<3;++n)i[n]=s&1<<n?0:e&1<<n?t[n]:r[n];o(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const c=(0,n.vt)(),u=(0,n.vt)(),d=(0,n.vt)(),h=(0,n.vt)(),m=(0,n.vt)()},16943(e,t,r){r.d(t,{E:()=>n});var i=r(44208);function n(){return!!(0,i.A)("enable-feature:objectAndLayerId-rendering")}},17136(e,t,r){r.d(t,{Y_:()=>E,O7:()=>C,el:()=>S});var i=r(92602),n=r(69052),o=r(49186),s=r(53966),a=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(11254),p=r(60408),f=r(65864),g=r(2272),v=r(84952),_=r(92300);const x=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new o.A("internal:geometry",e)}const r=(0,u.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],l=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),c=(a-o)/l,u=(s-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const i=e*t,s=u*i+n,a=c*i+o;r.push([s,a])}const e=(l+Math.floor(d-1)*t)/2,i=u*e+n,s=c*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new l.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function M(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,u.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,u.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,u.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,u.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function T(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,u.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(y(e))for(const t of(0,u.r8)(o))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,s,c,y,w,C,A,E,R=0;const I=[],O=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,d.Vp)(o),c=o.isWebMercator,C=c?102100:4326,y=u.j7[C].maxX,w=u.j7[C].minX,A=u.j7[C].plus180Line,E=u.j7[C].minus180Line),s)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(M(t.clone(),y,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>M(e,y,w)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);O.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,w)*(2*y);let i=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(A)&&o!==y?(R=o>R?o:R,i=b(i,c),I.push(i),O.push("cut")):e.intersects(E)&&n!==w?(R=o*(2*y)>R?o*(2*y):R,i=b(i,c,360),I.push(i),O.push("cut")):O.push(i)}else O.push(t.clone());else O.push(t);else O.push(t);let F=(0,u.kd)(R,y),P=-90;const D=F,N=new l.A;for(;F>0;){const e=360*F-180;N.addPath([[e,P],[e,-1*P]]),P*=-1,F--}if(I.length>0&&D>0){const t=T(I,await async function(e,t,r,i){const n=(0,g.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,d.YX)(o),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,m.A)(n.path+"/cut",s),{cutIndexes:l,geometries:c=[]}=a.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,f.rS)(e);return t.spatialReference=o,t})}}(n,I,N,r)),i=[],o=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(c?(0,h.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,v.An)(e):e,n=t[0].spatialReference,o=(0,p.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,d.YX)(n),geometries:JSON.stringify((0,_.X)(t))}},{data:a}=await(0,m.A)(i.path+"/simplify",s);return(0,_.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(c?(0,h.Gh)(s.shift()):s.shift())}return a}const H=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)H.push(t);else{const e=I.shift();H.push(!0===c?(0,h.Gh)(e):e)}}return H}function C(e,t,r){const i=(0,d.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<n&&(l=-Math.ceil(Math.abs(e-n)/s));let c=e+(a-l)*s;const u=c-t;return u>o?c-=s:u<n&&(c+=s),c}function A(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,i]=t.valid;return new n.hr(r,i)}const E=A(c.A.WGS84);A(c.A.WebMercator)},19245(e,t,r){r.d(t,{Um:()=>l,MB:()=>a,kE:()=>o});var i=r(4576),n=r(34727);r(44208);function o(e,t,r,i,o,s){let a=r.screenLength*e.pixelRatio;null!=o&&(c.update(i,t,o,s),a=c.apply(a));const l=a*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(l*t,r.minWorldLength,r.maxWorldLength)}const s=(0,i.VO)();function a(e,t){let r=!1;for(const i in t){const n=t[i];void 0!==n&&(Array.isArray(n)?Array.isArray(e[i])&&s(n,e[i])||(e[i]=n.slice(),r=!0):e[i]!==n&&(r=!0,e[i]=n))}return r}const l={multiply:1,ignore:2,replace:3,tint:4},c=new class{constructor(){this._scale=0,this._angleFactor=0,this._minScale=0}update(e,t,r,i){r?(this._scale=Math.min(r.divisor/(t-r.offset),1),this._angleFactor=function(e){return Math.abs(e)**3}(e),this._minScale=null!=i?Math.min(r.minPixelSize/i,1):0):(this._scale=1,this._minScale=1,this._angleFactor=1)}apply(e){const{_scale:t,_angleFactor:r,_minScale:i}=this;return e*(0,n.qE)((0,n.Cc)(t,1,r),i,1)}applyVec2(e,t){e[0]=this.apply(t[0]),e[1]=this.apply(t[1])}}},20304(e,t,r){r.d(t,{m:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",1,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},20693(e,t,r){r.d(t,{yu:()=>h,NB:()=>m,S7:()=>g});var i=r(58083),n=r(9093),o=r(35522),s=r(51850),a=r(23205),l=r(40710),c=(r(33094),r(58029)),u=r(74333);class d extends u.n{constructor(e,t,r){super(e,"mat4",2,(i,n,o)=>i.setUniformMatrix4fv(e,t(n,o),r))}}function h(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",s.uY):e.uniforms.add(new l.W("cameraPosition",(e,t)=>(0,o.hZ)(f,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2])))}function m(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new c.F("proj",e=>e.camera.projectionMatrix),new d("view",(e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,e.origin)),new l.W("localOrigin",e=>e.origin));const r=({camera:e})=>(0,o.hZ)(f,e.viewInverseTransposeMatrix[3],e.viewInverseTransposeMatrix[7],e.viewInverseTransposeMatrix[11]);e.uniforms.add(new c.F("proj",e=>e.camera.projectionMatrix),new c.F("view",e=>(0,i.Tl)(p,e.camera.viewMatrix,r(e))),new a.d("localOrigin",e=>r(e)))}const p=(0,n.vt)(),f=(0,s.vt)();function g(e){e.uniforms.add(new c.F("viewNormal",e=>e.camera.viewInverseTransposeMatrix))}},21015(e,t,r){r.d(t,{R:()=>l});var i=r(11254),n=r(60999),o=r(49186),s=r(74887),a=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,s.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const a=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,s.QP)(a.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},22393(e,t,r){r.d(t,{c:()=>s});var i=r(31821);function n(e){e.code.add(i.H`vec3 evaluateDiffuseIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float NdotNG) {
|
|
225
|
-
return ((1.0 - NdotNG) * ambientGround + (1.0 + NdotNG) * ambientSky) * 0.5;
|
|
226
|
-
}`),e.code.add(i.H`float integratedRadiance(float cosTheta2, float roughness) {
|
|
227
|
-
return (cosTheta2 - 1.0) / (cosTheta2 * (1.0 - roughness * roughness) - 1.0);
|
|
228
|
-
}`),e.code.add(i.H`vec3 evaluateSpecularIlluminationHemisphere(vec3 ambientGround, vec3 ambientSky, float RdotNG, float roughness) {
|
|
229
|
-
float cosTheta2 = 1.0 - RdotNG * RdotNG;
|
|
230
|
-
float intRadTheta = integratedRadiance(cosTheta2, roughness);
|
|
231
|
-
float ground = RdotNG < 0.0 ? 1.0 - intRadTheta : 1.0 + intRadTheta;
|
|
232
|
-
float sky = 2.0 - ground;
|
|
233
|
-
return (ground * ambientGround + sky * ambientSky) * 0.5;
|
|
234
|
-
}`)}var o=r(89786);function s(e,t){e.include(o.p),1!==t.pbrMode&&2!==t.pbrMode&&5!==t.pbrMode&&6!==t.pbrMode||(e.code.add(i.H`float normalDistribution(float NdotH, float roughness)
|
|
235
|
-
{
|
|
236
|
-
float a = NdotH * roughness;
|
|
237
|
-
float b = roughness / (1.0 - NdotH * NdotH + a * a);
|
|
238
|
-
return b * b * INV_PI;
|
|
239
|
-
}`),e.code.add(i.H`const vec4 c0 = vec4(-1.0, -0.0275, -0.572, 0.022);
|
|
240
|
-
const vec4 c1 = vec4( 1.0, 0.0425, 1.040, -0.040);
|
|
241
|
-
const vec2 c2 = vec2(-1.04, 1.04);
|
|
242
|
-
vec2 prefilteredDFGAnalytical(float roughness, float NdotV) {
|
|
243
|
-
vec4 r = roughness * c0 + c1;
|
|
244
|
-
float a004 = min(r.x * r.x, exp2(-9.28 * NdotV)) * r.x + r.y;
|
|
245
|
-
return c2 * a004 + r.zw;
|
|
246
|
-
}`)),1!==t.pbrMode&&2!==t.pbrMode||(e.include(n),e.code.add(i.H`struct PBRShadingInfo
|
|
247
|
-
{
|
|
248
|
-
float NdotV;
|
|
249
|
-
float LdotH;
|
|
250
|
-
float NdotNG;
|
|
251
|
-
float RdotNG;
|
|
252
|
-
float NdotAmbDir;
|
|
253
|
-
float NdotH_Horizon;
|
|
254
|
-
vec3 skyRadianceToSurface;
|
|
255
|
-
vec3 groundRadianceToSurface;
|
|
256
|
-
vec3 skyIrradianceToSurface;
|
|
257
|
-
vec3 groundIrradianceToSurface;
|
|
258
|
-
float averageAmbientRadiance;
|
|
259
|
-
float ssao;
|
|
260
|
-
vec3 albedoLinear;
|
|
261
|
-
vec3 f0;
|
|
262
|
-
vec3 f90;
|
|
263
|
-
vec3 diffuseColor;
|
|
264
|
-
float metalness;
|
|
265
|
-
float roughness;
|
|
266
|
-
};`),e.code.add(i.H`vec3 evaluateEnvironmentIllumination(PBRShadingInfo inputs) {
|
|
267
|
-
vec3 indirectDiffuse = evaluateDiffuseIlluminationHemisphere(inputs.groundIrradianceToSurface, inputs.skyIrradianceToSurface, inputs.NdotNG);
|
|
268
|
-
vec3 indirectSpecular = evaluateSpecularIlluminationHemisphere(inputs.groundRadianceToSurface, inputs.skyRadianceToSurface, inputs.RdotNG, inputs.roughness);
|
|
269
|
-
vec3 diffuseComponent = inputs.diffuseColor * indirectDiffuse * INV_PI;
|
|
270
|
-
vec2 dfg = prefilteredDFGAnalytical(inputs.roughness, inputs.NdotV);
|
|
271
|
-
vec3 specularColor = inputs.f0 * dfg.x + inputs.f90 * dfg.y;
|
|
272
|
-
vec3 specularComponent = specularColor * indirectSpecular;
|
|
273
|
-
return (diffuseComponent + specularComponent);
|
|
274
|
-
}`))}},22911(e,t,r){r.d(t,{NL:()=>m});var i=r(49255),n=r(99208),o=r(65261),s=r(40710),a=r(33079),l=r(28421),c=r(20304),u=r(31821),d=r(15976),h=r(63761);function m(e,t){if(!(0,i._o)(t.output))return;e.fragment.include(o.C);const{emissionSource:r,hasEmissiveTextureTransform:m,bindType:p}=t,f=3===r||4===r||5===r;f&&(e.include(n.r,t),e.fragment.uniforms.add(1===p?new h.N("texEmission",e=>e.textureEmissive):new d.o("texEmission",e=>e.textureEmissive)));const g=2===r||f;g&&e.fragment.uniforms.add(1===p?new a.t("emissiveBaseColor",e=>e.emissiveBaseColor):new s.W("emissiveBaseColor",e=>e.emissiveBaseColor));const v=0!==r;v&&7!==r&&6!==r&&4!==r&&5!==r&&e.fragment.uniforms.add(1===p?new c.m("emissiveStrength",e=>e.emissiveStrength??0):new l.J("emissiveStrength",e=>e.emissiveStrength??0));const _=7===r,x=5===r,y=1===r||6===r||_;e.fragment.code.add(u.H`
|
|
275
|
-
vec4 getEmissions(vec3 symbolColor) {
|
|
276
|
-
vec4 emissions = ${g?x?"emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(emissiveBaseColor, 1.0)":y?_?"emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(linearizeGamma(symbolColor), 1.0)":"vec4(0.0)"};
|
|
277
|
-
${(0,u.If)(f,`${(0,u.If)(x,`if(emissiveSource == 0) {\n vec4 emissiveFromTex = textureLookup(texEmission, ${m?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);\n }`,`vec4 emissiveFromTex = textureLookup(texEmission, ${m?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`)}\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)}
|
|
278
|
-
${(0,u.If)(v,`emissions.rgb *= emissiveStrength * ${u.H.float(1)};`)}
|
|
279
|
-
return emissions;
|
|
280
|
-
}
|
|
281
|
-
`)}},23205(e,t,r){r.d(t,{d:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",0,(i,n)=>i.setUniform3fv(e,t(n),r))}}},24321(e,t,r){r.d(t,{v:()=>o});var i=r(43519),n=r(31821);function o(e,t){t.instancedColor?(e.attributes.add("instanceColor","vec4"),e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.vertex.code.add(n.H`
|
|
282
|
-
MaskedColor applyInstanceColor(MaskedColor color) {
|
|
283
|
-
return multiplyMaskedColors( color, createMaskedFromUInt8NaNColor(${"instanceColor"}));
|
|
284
|
-
}
|
|
285
|
-
`)):e.vertex.code.add(n.H`MaskedColor applyInstanceColor(MaskedColor color) {
|
|
286
|
-
return color;
|
|
287
|
-
}`)}},26425(e,t,r){r.d(t,{u:()=>o});var i=r(33094),n=r(31821);function o({code:e,uniforms:t},r){t.add(new i.U("dpDummy",()=>1)),e.add(n.H`vec3 dpAdd(vec3 hiA, vec3 loA, vec3 hiB, vec3 loB) {
|
|
288
|
-
vec3 hiD = hiA + hiB;
|
|
289
|
-
vec3 loD = loA + loB;
|
|
290
|
-
return dpDummy * hiD + loD;
|
|
291
|
-
}`)}},26934(e,t,r){r.d(t,{Q:()=>n});var i=r(49788);function n(e){e.constants.add("alphaCutoff","float",i.Q)}},27950(e,t,r){r.d(t,{N:()=>o});var i=r(63365),n=r(31821);function o(e){e.include(i.a),e.code.add(n.H`
|
|
292
|
-
vec3 mixExternalColor(vec3 internalColor, vec3 textureColor, vec3 externalColor, int mode) {
|
|
293
|
-
// workaround for artifacts in macOS using Intel Iris Pro
|
|
294
|
-
// see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475
|
|
295
|
-
vec3 internalMixed = internalColor * textureColor;
|
|
296
|
-
vec3 allMixed = internalMixed * externalColor;
|
|
297
|
-
|
|
298
|
-
if (mode == ${n.H.int(1)}) {
|
|
299
|
-
return allMixed;
|
|
300
|
-
}
|
|
301
|
-
if (mode == ${n.H.int(2)}) {
|
|
302
|
-
return internalMixed;
|
|
303
|
-
}
|
|
304
|
-
if (mode == ${n.H.int(3)}) {
|
|
305
|
-
return externalColor;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// tint (or something invalid)
|
|
309
|
-
float vIn = rgb2v(internalMixed);
|
|
310
|
-
vec3 hsvTint = rgb2hsv(externalColor);
|
|
311
|
-
vec3 hsvOut = vec3(hsvTint.x, hsvTint.y, vIn * hsvTint.z);
|
|
312
|
-
return hsv2rgb(hsvOut);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
float mixExternalOpacity(float internalOpacity, float textureOpacity, float externalOpacity, int mode) {
|
|
316
|
-
// workaround for artifacts in macOS using Intel Iris Pro
|
|
317
|
-
// see: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/10475
|
|
318
|
-
float internalMixed = internalOpacity * textureOpacity;
|
|
319
|
-
float allMixed = internalMixed * externalOpacity;
|
|
320
|
-
|
|
321
|
-
if (mode == ${n.H.int(2)}) {
|
|
322
|
-
return internalMixed;
|
|
323
|
-
}
|
|
324
|
-
if (mode == ${n.H.int(3)}) {
|
|
325
|
-
return externalOpacity;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
// multiply or tint (or something invalid)
|
|
329
|
-
return allMixed;
|
|
330
|
-
}
|
|
331
|
-
`)}},27993(e,t,r){r.d(t,{F:()=>a});var i=r(91218),n=r(16930),o=r(9762),s=r(65806);function a(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,s.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},28421(e,t,r){r.d(t,{J:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",2,(i,n,o)=>i.setUniform1f(e,t(n,o),r))}}},28491(e,t,r){r.d(t,{D:()=>V,b:()=>G});var i=r(32680),n=r(49255),o=r(68317),s=r(76597),a=r(24321),l=r(72722),c=r(43519),u=r(73955),d=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(54154),g=r(9169),v=r(77695),_=r(14527),x=r(28747),y=r(98619),w=r(62602),b=r(22393),M=r(59469),T=r(32482),S=r(96598),C=r(51406),A=r(986),E=r(58614),R=r(27950),I=r(20693),O=r(33079),F=r(71988),P=r(20304),D=r(31821),N=r(63761),H=r(10906),L=r(19245),B=r(51255),z=r(14113),U=r(49788);function G(e){const t=new z.N5,{attributes:r,vertex:G,fragment:V,varyings:j}=t,{output:W,normalType:k,offsetBackfaces:Z,spherical:$,snowCover:q,pbrMode:Y,textureAlphaPremultiplied:X,instancedDoublePrecision:K,hasVertexColors:J,hasVertexTangents:Q,hasColorTexture:ee,hasNormalTexture:te,hasNormalTextureTransform:re,hasColorTextureTransform:ie}=e;if((0,I.NB)(G,e),r.add("position","vec3"),j.add("vpos","vec3",{invariant:!0}),t.include(A.A,e),t.include(l.B,e),t.include(f.Ge,e),t.include(C.q2,e),!(0,n._o)(W))return t.include(g.E,e),t;t.include(C.Sx,e),t.include(C.MU,e),t.include(C.O1,e),t.include(C.QM,e),(0,I.yu)(G,e),t.include(u.Y,e),t.include(s.d);const ne=0===k||1===k;return ne&&Z&&t.include(i.M),t.include(v.J,e),t.include(p.Mh,e),t.include(a.v,e),j.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(d.K,e),t.include(m.c,e),G.uniforms.add(new F.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),j.add("vcolorExt","vec4"),t.include(S.Z,e),G.include(c.WD),G.include(c.oF),t.include(K?T.G:T.Bz,e),G.main.add(D.H`
|
|
332
|
-
forwardVertexColor();
|
|
333
|
-
|
|
334
|
-
MaskedColor maskedColor =
|
|
335
|
-
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
336
|
-
|
|
337
|
-
vcolorExt = maskedColor.color;
|
|
338
|
-
forwardColorMixMode(maskedColor.mask);
|
|
339
|
-
|
|
340
|
-
vpos = getVertexInLocalOriginSpace();
|
|
341
|
-
vPositionLocal = vpos - view[3].xyz;
|
|
342
|
-
vpos = subtractOrigin(vpos);
|
|
343
|
-
${(0,D.If)(ne,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
344
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
345
|
-
${(0,D.If)(Q,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
346
|
-
gl_Position = transformPosition(proj, view, vpos);
|
|
347
|
-
${(0,D.If)(ne&&Z,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
348
|
-
|
|
349
|
-
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
350
|
-
forwardTextureCoordinates();
|
|
351
|
-
forwardColorUV();
|
|
352
|
-
forwardNormalUV();
|
|
353
|
-
forwardEmissiveUV();
|
|
354
|
-
forwardOcclusionUV();
|
|
355
|
-
forwardMetallicRoughnessUV();
|
|
356
|
-
|
|
357
|
-
if (opacityMixMode != ${D.H.int(L.Um.ignore)} && vcolorExt.a < ${D.H.float(U.Q)}) {
|
|
358
|
-
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
359
|
-
}
|
|
360
|
-
forwardLinearDepthToReadShadowMap();
|
|
361
|
-
`),V.include(x.kA,e),V.include(_.n,e),t.include(E.S,e),V.include(o.HQ,e),t.include(B.D,e),(0,I.yu)(V,e),V.uniforms.add(G.uniforms.get("localOrigin"),new O.t("ambient",e=>e.ambient),new O.t("diffuse",e=>e.diffuse),new P.m("opacity",e=>e.opacity),new P.m("layerOpacity",e=>e.layerOpacity)),ee&&V.uniforms.add(new N.N("tex",e=>e.texture)),t.include(M._,e),V.include(b.c,e),V.include(R.N),t.include(w.r,e),V.include(H.b,e),(0,x.a8)(V),(0,x.eU)(V),(0,y.O4)(V),V.main.add(D.H`
|
|
362
|
-
discardBySlice(vpos);
|
|
363
|
-
discardByTerrainDepth();
|
|
364
|
-
${ee?D.H`
|
|
365
|
-
vec4 texColor = texture(tex, ${ie?"colorUV":"vuv0"});
|
|
366
|
-
${(0,D.If)(X,"texColor.rgb /= texColor.a;")}
|
|
367
|
-
discardOrAdjustAlpha(texColor);`:D.H`vec4 texColor = vec4(1.0);`}
|
|
368
|
-
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
369
|
-
${2===k?D.H`vec3 normal = screenDerivativeNormal(vPositionLocal);`:D.H`shadingParams.normalView = vNormalWorld;
|
|
370
|
-
vec3 normal = shadingNormal(shadingParams);`}
|
|
371
|
-
applyPBRFactors();
|
|
372
|
-
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
373
|
-
|
|
374
|
-
vec3 posWorld = vpos + localOrigin;
|
|
375
|
-
|
|
376
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(posWorld);
|
|
377
|
-
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
378
|
-
|
|
379
|
-
vec3 matColor = max(ambient, diffuse);
|
|
380
|
-
vec3 albedo = mixExternalColor(${(0,D.If)(J,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
381
|
-
float opacity_ = layerOpacity * mixExternalOpacity(${(0,D.If)(J,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, opacityMixMode);
|
|
382
|
-
|
|
383
|
-
${te?`mat3 tangentSpace = computeTangentSpace(${Q?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${re?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
384
|
-
vec3 normalGround = ${$?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
385
|
-
|
|
386
|
-
${(0,D.If)(q,D.H`
|
|
387
|
-
float snow = getSnow(normal, normalGround);
|
|
388
|
-
albedo = mix(albedo, vec3(1), snow);
|
|
389
|
-
shadingNormal = mix(shadingNormal, normal, snow);
|
|
390
|
-
ssao = mix(ssao, 1.0, snow);`)}
|
|
391
|
-
|
|
392
|
-
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
393
|
-
|
|
394
|
-
${1===Y||2===Y?D.H`
|
|
395
|
-
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
396
|
-
${(0,D.If)(q,"mrr = applySnowToMRR(mrr, snow);")}
|
|
397
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:D.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
398
|
-
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
399
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,D.If)(q,", snow")});
|
|
400
|
-
`),t}const V=Object.freeze(Object.defineProperty({__proto__:null,build:G},Symbol.toStringTag,{value:"Module"}))},28747(e,t,r){r.d(t,{kA:()=>S,a8:()=>M,eU:()=>T});var i=r(35522),n=r(51850),o=r(78955),s=r(91829),a=r(23205),l=r(14314),c=r(31821);function u(e,t){const r=void 0!==t.lightingSphericalHarmonicsOrder?t.lightingSphericalHarmonicsOrder:2;0===r?(e.uniforms.add(new a.d("lightingAmbientSH0",({lighting:e})=>(0,i.hZ)(d,e.sh.r[0],e.sh.g[0],e.sh.b[0]))),e.code.add(c.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
|
|
401
|
-
vec3 ambientLight = 0.282095 * lightingAmbientSH0;
|
|
402
|
-
return ambientLight * (1.0 - ambientOcclusion);
|
|
403
|
-
}`)):1===r?(e.uniforms.add(new l.I("lightingAmbientSH_R",({lighting:e})=>(0,o.hZ)(h,e.sh.r[0],e.sh.r[1],e.sh.r[2],e.sh.r[3])),new l.I("lightingAmbientSH_G",({lighting:e})=>(0,o.hZ)(h,e.sh.g[0],e.sh.g[1],e.sh.g[2],e.sh.g[3])),new l.I("lightingAmbientSH_B",({lighting:e})=>(0,o.hZ)(h,e.sh.b[0],e.sh.b[1],e.sh.b[2],e.sh.b[3]))),e.code.add(c.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
|
|
404
|
-
vec4 sh0 = vec4(
|
|
405
|
-
0.282095,
|
|
406
|
-
0.488603 * normal.x,
|
|
407
|
-
0.488603 * normal.z,
|
|
408
|
-
0.488603 * normal.y
|
|
409
|
-
);
|
|
410
|
-
vec3 ambientLight = vec3(
|
|
411
|
-
dot(lightingAmbientSH_R, sh0),
|
|
412
|
-
dot(lightingAmbientSH_G, sh0),
|
|
413
|
-
dot(lightingAmbientSH_B, sh0)
|
|
414
|
-
);
|
|
415
|
-
return ambientLight * (1.0 - ambientOcclusion);
|
|
416
|
-
}`)):2===r&&(e.uniforms.add(new a.d("lightingAmbientSH0",({lighting:e})=>(0,i.hZ)(d,e.sh.r[0],e.sh.g[0],e.sh.b[0])),new l.I("lightingAmbientSH_R1",({lighting:e})=>(0,o.hZ)(h,e.sh.r[1],e.sh.r[2],e.sh.r[3],e.sh.r[4])),new l.I("lightingAmbientSH_G1",({lighting:e})=>(0,o.hZ)(h,e.sh.g[1],e.sh.g[2],e.sh.g[3],e.sh.g[4])),new l.I("lightingAmbientSH_B1",({lighting:e})=>(0,o.hZ)(h,e.sh.b[1],e.sh.b[2],e.sh.b[3],e.sh.b[4])),new l.I("lightingAmbientSH_R2",({lighting:e})=>(0,o.hZ)(h,e.sh.r[5],e.sh.r[6],e.sh.r[7],e.sh.r[8])),new l.I("lightingAmbientSH_G2",({lighting:e})=>(0,o.hZ)(h,e.sh.g[5],e.sh.g[6],e.sh.g[7],e.sh.g[8])),new l.I("lightingAmbientSH_B2",({lighting:e})=>(0,o.hZ)(h,e.sh.b[5],e.sh.b[6],e.sh.b[7],e.sh.b[8]))),e.code.add(c.H`vec3 calculateAmbientIrradiance(vec3 normal, float ambientOcclusion) {
|
|
417
|
-
vec3 ambientLight = 0.282095 * lightingAmbientSH0;
|
|
418
|
-
vec4 sh1 = vec4(
|
|
419
|
-
0.488603 * normal.x,
|
|
420
|
-
0.488603 * normal.z,
|
|
421
|
-
0.488603 * normal.y,
|
|
422
|
-
1.092548 * normal.x * normal.y
|
|
423
|
-
);
|
|
424
|
-
vec4 sh2 = vec4(
|
|
425
|
-
1.092548 * normal.y * normal.z,
|
|
426
|
-
0.315392 * (3.0 * normal.z * normal.z - 1.0),
|
|
427
|
-
1.092548 * normal.x * normal.z,
|
|
428
|
-
0.546274 * (normal.x * normal.x - normal.y * normal.y)
|
|
429
|
-
);
|
|
430
|
-
ambientLight += vec3(
|
|
431
|
-
dot(lightingAmbientSH_R1, sh1),
|
|
432
|
-
dot(lightingAmbientSH_G1, sh1),
|
|
433
|
-
dot(lightingAmbientSH_B1, sh1)
|
|
434
|
-
);
|
|
435
|
-
ambientLight += vec3(
|
|
436
|
-
dot(lightingAmbientSH_R2, sh2),
|
|
437
|
-
dot(lightingAmbientSH_G2, sh2),
|
|
438
|
-
dot(lightingAmbientSH_B2, sh2)
|
|
439
|
-
);
|
|
440
|
-
return ambientLight * (1.0 - ambientOcclusion);
|
|
441
|
-
}`),1!==t.pbrMode&&2!==t.pbrMode||e.code.add(c.H`const vec3 skyTransmittance = vec3(0.9, 0.9, 1.0);
|
|
442
|
-
vec3 calculateAmbientRadiance(float ambientOcclusion)
|
|
443
|
-
{
|
|
444
|
-
vec3 ambientLight = 1.2 * (0.282095 * lightingAmbientSH0) - 0.2;
|
|
445
|
-
return ambientLight *= (1.0 - ambientOcclusion) * skyTransmittance;
|
|
446
|
-
}`))}const d=(0,n.vt)(),h=(0,s.vt)();var m=r(14527),p=r(65261),f=r(98619),g=r(22393),v=r(89786),_=r(74333);class x extends _.n{constructor(e,t){super(e,"bool",0,(r,i)=>r.setUniform1b(e,t(i)))}}var y=r(33094);function w(e){e.code.add(c.H`float mapChannel(float x, vec2 p) {
|
|
447
|
-
return (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) );
|
|
448
|
-
}`),e.code.add(c.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
449
|
-
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
450
|
-
return vec3(mapChannel(color.x, p), mapChannel(color.y, p), mapChannel(color.z, p));
|
|
451
|
-
}`)}function b(e){e.code.add(c.H`vec3 tonemapACES(vec3 x) {
|
|
452
|
-
return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0);
|
|
453
|
-
}`),e.code.add(c.H`vec3 tonemapKhronosNeutral(vec3 color, float exposure) {
|
|
454
|
-
const float startCompression = 0.76;
|
|
455
|
-
const float desaturation = 0.15;
|
|
456
|
-
color *= exposure;
|
|
457
|
-
float x = min( color.r, min( color.g, color.b ) );
|
|
458
|
-
float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
|
|
459
|
-
color -= offset;
|
|
460
|
-
float peak = max( color.r, max( color.g, color.b ) );
|
|
461
|
-
if ( peak < startCompression ) {
|
|
462
|
-
return color;
|
|
463
|
-
}
|
|
464
|
-
float d = 1.0 - startCompression;
|
|
465
|
-
float newPeak = 1.0 - d * d / ( peak + d - startCompression );
|
|
466
|
-
color *= newPeak / peak;
|
|
467
|
-
float g = 1.0 - 1.0 / ( desaturation * ( peak - newPeak ) + 1.0 );
|
|
468
|
-
return mix( color, vec3( newPeak ), g );
|
|
469
|
-
}`)}function M(e){e.constants.add("ambientBoostFactor","float",.4)}function T(e){e.uniforms.add(new y.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function S(e,t){const{pbrMode:r,spherical:i,hasColorTexture:n}=t;e.include(m.n,t),0!==r&&e.include(g.c,t),e.include(u,t),e.include(v.p),e.include(b,t),e.include(p.C);const o=!(2===r&&!n);switch(o&&e.include(w),e.code.add(c.H`
|
|
470
|
-
${(0,c.If)(0!==r,"const float GROUND_REFLECTANCE = 0.2;")}
|
|
471
|
-
`),M(e),T(e),(0,f.Gc)(e),e.code.add(c.H`
|
|
472
|
-
float additionalDirectedAmbientLight(float lightAlignment) {
|
|
473
|
-
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
float additionalDirectedAmbientLight(vec3 vPosWorld) {
|
|
477
|
-
float lightAlignment = dot(${i?c.H`normalize(vPosWorld)`:c.H`vec3(0.0, 0.0, 1.0)`}, mainLightDirection);
|
|
478
|
-
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
479
|
-
}
|
|
480
|
-
`),(0,f.O4)(e),e.code.add(c.H`vec3 evaluateAdditionalLighting(float ambientOcclusion, vec3 vPosWorld) {
|
|
481
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(vPosWorld);
|
|
482
|
-
return (1.0 - ambientOcclusion) * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor * mainLightIntensity;
|
|
483
|
-
}`),r){case 0:case 4:case 3:e.include(f.Vt),e.code.add(c.H`vec3 evaluateSceneLighting(vec3 normalWorld, vec3 albedo, float shadow, float ssao, vec3 additionalLight) {
|
|
484
|
-
vec3 mainLighting = applyShading(normalWorld, shadow);
|
|
485
|
-
vec3 ambientLighting = calculateAmbientIrradiance(normalWorld, ssao);
|
|
486
|
-
vec3 albedoLinear = linearizeGamma(albedo);
|
|
487
|
-
vec3 totalLight = mainLighting + ambientLighting + additionalLight;
|
|
488
|
-
totalLight = min(totalLight, vec3(PI));
|
|
489
|
-
vec3 outColor = vec3((albedoLinear / PI) * totalLight);
|
|
490
|
-
return delinearizeGamma(outColor);
|
|
491
|
-
}`);break;case 1:case 2:e.code.add(c.H`const float fillLightIntensity = 0.25;
|
|
492
|
-
const float horizonLightDiffusion = 0.4;
|
|
493
|
-
const float additionalAmbientIrradianceFactor = 0.02;
|
|
494
|
-
vec3 evaluateSceneLightingPBR(vec3 normal, vec3 albedo, float shadow, float ssao, vec3 additionalLight,
|
|
495
|
-
vec3 viewDir, vec3 groundNormal, vec3 mrr, float additionalAmbientIrradiance) {
|
|
496
|
-
vec3 viewDirection = -viewDir;
|
|
497
|
-
vec3 h = normalize(viewDirection + mainLightDirection);
|
|
498
|
-
PBRShadingInfo inputs;
|
|
499
|
-
inputs.NdotV = clamp(abs(dot(normal, viewDirection)), 0.001, 1.0);
|
|
500
|
-
inputs.NdotNG = clamp(dot(normal, groundNormal), -1.0, 1.0);
|
|
501
|
-
vec3 reflectedView = normalize(reflect(viewDirection, normal));
|
|
502
|
-
inputs.RdotNG = clamp(dot(reflectedView, groundNormal), -1.0, 1.0);
|
|
503
|
-
inputs.albedoLinear = linearizeGamma(albedo);
|
|
504
|
-
inputs.ssao = ssao;
|
|
505
|
-
inputs.metalness = mrr[0];
|
|
506
|
-
inputs.roughness = clamp(mrr[1] * mrr[1], 0.001, 0.99);`),e.code.add(c.H`inputs.f0 = (0.16 * mrr[2] * mrr[2]) * (1.0 - inputs.metalness) + inputs.albedoLinear * inputs.metalness;
|
|
507
|
-
inputs.f90 = vec3(clamp(dot(inputs.f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
508
|
-
inputs.diffuseColor = inputs.albedoLinear * (vec3(1.0) - inputs.f0) * (1.0 - inputs.metalness);`),t.useFillLights?e.uniforms.add(new x("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(c.H`vec3 ambientDir = vec3(5.0 * groundNormal[1] - groundNormal[0] * groundNormal[2], - 5.0 * groundNormal[0] - groundNormal[2] * groundNormal[1], groundNormal[1] * groundNormal[1] + groundNormal[0] * groundNormal[0]);
|
|
509
|
-
ambientDir = ambientDir != vec3(0.0) ? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
|
|
510
|
-
inputs.NdotAmbDir = hasFillLights ? abs(dot(normal, ambientDir)) : 1.0;
|
|
511
|
-
float NdotL = clamp(dot(normal, mainLightDirection), 0.001, 1.0);
|
|
512
|
-
vec3 mainLightIrradianceComponent = NdotL * (1.0 - shadow) * mainLightIntensity;
|
|
513
|
-
vec3 fillLightsIrradianceComponent = inputs.NdotAmbDir * mainLightIntensity * fillLightIntensity;
|
|
514
|
-
vec3 ambientLightIrradianceComponent = calculateAmbientIrradiance(normal, ssao) + additionalLight;
|
|
515
|
-
inputs.skyIrradianceToSurface = ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;
|
|
516
|
-
inputs.groundIrradianceToSurface = GROUND_REFLECTANCE * ambientLightIrradianceComponent + mainLightIrradianceComponent + fillLightsIrradianceComponent ;`),e.uniforms.add(new y.U("lightingSpecularStrength",e=>e.lighting.mainLight.specularStrength),new y.U("lightingEnvironmentStrength",e=>e.lighting.mainLight.environmentStrength)).code.add(c.H`vec3 horizonRingDir = inputs.RdotNG * groundNormal - reflectedView;
|
|
517
|
-
vec3 horizonRingH = normalize(viewDirection + horizonRingDir);
|
|
518
|
-
inputs.NdotH_Horizon = dot(normal, horizonRingH);
|
|
519
|
-
float NdotH = clamp(dot(normal, h), 0.0, 1.0);
|
|
520
|
-
vec3 mainLightRadianceComponent = lightingSpecularStrength * normalDistribution(NdotH, inputs.roughness) * mainLightIntensity * (1.0 - shadow);
|
|
521
|
-
vec3 horizonLightRadianceComponent = lightingEnvironmentStrength * normalDistribution(inputs.NdotH_Horizon, min(inputs.roughness + horizonLightDiffusion, 1.0)) * mainLightIntensity * fillLightIntensity;
|
|
522
|
-
vec3 ambientLightRadianceComponent = lightingEnvironmentStrength * calculateAmbientRadiance(ssao) + additionalLight;
|
|
523
|
-
float normalDirectionModifier = mix(1., min(mix(0.1, 2.0, (inputs.NdotNG + 1.) * 0.5), 1.0), clamp(inputs.roughness * 5.0, 0.0 , 1.0));
|
|
524
|
-
inputs.skyRadianceToSurface = (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
525
|
-
inputs.groundRadianceToSurface = 0.5 * GROUND_REFLECTANCE * (ambientLightRadianceComponent + horizonLightRadianceComponent) * normalDirectionModifier + mainLightRadianceComponent;
|
|
526
|
-
inputs.averageAmbientRadiance = ambientLightIrradianceComponent[1] * (1.0 + GROUND_REFLECTANCE);`),e.code.add(c.H`
|
|
527
|
-
vec3 reflectedColorComponent = evaluateEnvironmentIllumination(inputs);
|
|
528
|
-
vec3 additionalMaterialReflectanceComponent = inputs.albedoLinear * additionalAmbientIrradiance;
|
|
529
|
-
vec3 outColorLinear = reflectedColorComponent + additionalMaterialReflectanceComponent;
|
|
530
|
-
${o?c.H`vec3 outColor = blackLevelSoftCompression(outColorLinear, inputs.averageAmbientRadiance);`:c.H`vec3 outColor = max(vec3(0.0), outColorLinear - 0.005 * inputs.averageAmbientRadiance);`}
|
|
531
|
-
return delinearizeGamma(outColor);
|
|
532
|
-
}
|
|
533
|
-
`);break;case 5:case 6:(0,f.Gc)(e),(0,f.O4)(e),e.code.add(c.H`const float roughnessTerrain = 0.5;
|
|
534
|
-
const float specularityTerrain = 0.5;
|
|
535
|
-
const vec3 fresnelReflectionTerrain = vec3(0.04);
|
|
536
|
-
vec3 evaluatePBRSimplifiedLighting(vec3 n, vec3 c, float shadow, float ssao, vec3 al, vec3 vd, vec3 nup) {
|
|
537
|
-
vec3 viewDirection = -vd;
|
|
538
|
-
vec3 h = normalize(viewDirection + mainLightDirection);
|
|
539
|
-
float NdotL = clamp(dot(n, mainLightDirection), 0.001, 1.0);
|
|
540
|
-
float NdotV = clamp(abs(dot(n, viewDirection)), 0.001, 1.0);
|
|
541
|
-
float NdotH = clamp(dot(n, h), 0.0, 1.0);
|
|
542
|
-
float NdotNG = clamp(dot(n, nup), -1.0, 1.0);
|
|
543
|
-
vec3 albedoLinear = linearizeGamma(c);
|
|
544
|
-
float lightness = 0.3 * albedoLinear[0] + 0.5 * albedoLinear[1] + 0.2 * albedoLinear[2];
|
|
545
|
-
vec3 f0 = (0.85 * lightness + 0.15) * fresnelReflectionTerrain;
|
|
546
|
-
vec3 f90 = vec3(clamp(dot(f0, vec3(50.0 * 0.33)), 0.0, 1.0));
|
|
547
|
-
vec3 mainLightIrradianceComponent = (1. - shadow) * NdotL * mainLightIntensity;
|
|
548
|
-
vec3 ambientLightIrradianceComponent = calculateAmbientIrradiance(n, ssao) + al;
|
|
549
|
-
vec3 ambientSky = ambientLightIrradianceComponent + mainLightIrradianceComponent;
|
|
550
|
-
vec3 indirectDiffuse = ((1.0 - NdotNG) * mainLightIrradianceComponent + (1.0 + NdotNG ) * ambientSky) * 0.5;
|
|
551
|
-
vec3 outDiffColor = albedoLinear * (1.0 - f0) * indirectDiffuse / PI;
|
|
552
|
-
vec3 mainLightRadianceComponent = normalDistribution(NdotH, roughnessTerrain) * mainLightIntensity;
|
|
553
|
-
vec2 dfg = prefilteredDFGAnalytical(roughnessTerrain, NdotV);
|
|
554
|
-
vec3 specularColor = f0 * dfg.x + f90 * dfg.y;
|
|
555
|
-
vec3 specularComponent = specularityTerrain * specularColor * mainLightRadianceComponent;
|
|
556
|
-
vec3 outColorLinear = outDiffColor + specularComponent;
|
|
557
|
-
vec3 outColor = delinearizeGamma(outColorLinear);
|
|
558
|
-
return outColor;
|
|
559
|
-
}`)}}r(34727),(0,n.vt)(),(0,n.vt)()},31821(e,t,r){r.d(t,{H:()=>i,If:()=>n});const i=(e,...t)=>{let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r};function n(e,t,r=""){return e?t:r}i.int=e=>e.toFixed(),i.uint=e=>`${Math.max(0,e).toFixed()}u`,i.hexuint=e=>`0x${Math.round(Math.max(0,e)).toString(16)}u`,i.float=e=>e.toPrecision(8)},32482(e,t,r){r.d(t,{Bz:()=>y,G:()=>x}),r(51850);var i=r(46686),n=r(49255),o=r(31821);function s(e,t){const r=(0,n._o)(t.output)&&t.receiveShadows;r&&(0,i.o)(e,!0),e.vertex.code.add(o.H`
|
|
560
|
-
void forwardLinearDepthToReadShadowMap() { ${(0,o.If)(r,"forwardLinearDepth(gl_Position.w);")} }
|
|
561
|
-
`)}var a=r(14314),l=r(35818),c=r(74333);class u extends c.n{constructor(e,t,r,i){super(e,"mat4",2,(r,n,o,s)=>r.setUniformMatrices4fv(e,t(n,o,s),i),r)}}class d extends c.n{constructor(e,t,r,i){super(e,"mat4",1,(r,n,o)=>r.setUniformMatrices4fv(e,t(n,o),i),r)}}var h=r(65786);function m(e){e.fragment.uniforms.add(new d("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),f(e)}function p(e){e.fragment.uniforms.add(new u("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),f(e)}function f(e){const{fragment:t}=e;t.uniforms.add(new a.I("cascadeDistances",e=>e.shadowMap.cascadeDistances),new l.W("numCascades",e=>e.shadowMap.numCascades)),t.code.add(o.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
|
|
562
|
-
vec3 lightSpacePosition(vec3 _vpos, mat4 mat) {
|
|
563
|
-
vec4 lv = mat * vec4(_vpos, 1.0);
|
|
564
|
-
lv.xy /= lv.w;
|
|
565
|
-
return 0.5 * lv.xyz + vec3(0.5);
|
|
566
|
-
}
|
|
567
|
-
vec2 cascadeCoordinates(int i, ivec2 textureSize, vec3 lvpos) {
|
|
568
|
-
float xScale = float(textureSize.y) / float(textureSize.x);
|
|
569
|
-
return vec2((float(i) + lvpos.x) * xScale, lvpos.y);
|
|
570
|
-
}
|
|
571
|
-
vec3 calculateUVZShadow(in vec3 _worldPos, in float _linearDepth, in ivec2 shadowMapSize) {
|
|
572
|
-
int i = _linearDepth < cascadeDistances[1] ? 0 : _linearDepth < cascadeDistances[2] ? 1 : _linearDepth < cascadeDistances[3] ? 2 : 3;
|
|
573
|
-
if (i >= numCascades) {
|
|
574
|
-
return invalidShadowmapUVZ;
|
|
575
|
-
}
|
|
576
|
-
mat4 shadowMatrix = i == 0 ? shadowMapMatrix[0] : i == 1 ? shadowMapMatrix[1] : i == 2 ? shadowMapMatrix[2] : shadowMapMatrix[3];
|
|
577
|
-
vec3 lvpos = lightSpacePosition(_worldPos, shadowMatrix);
|
|
578
|
-
if (lvpos.z >= 1.0 || lvpos.x < 0.0 || lvpos.x > 1.0 || lvpos.y < 0.0 || lvpos.y > 1.0) {
|
|
579
|
-
return invalidShadowmapUVZ;
|
|
580
|
-
}
|
|
581
|
-
vec2 uvShadow = cascadeCoordinates(i, shadowMapSize, lvpos);
|
|
582
|
-
return vec3(uvShadow, lvpos.z);
|
|
583
|
-
}`)}function g(e){e.fragment.code.add(o.H`float readShadowMapUVZ(vec3 uvzShadow, sampler2DShadow _shadowMap) {
|
|
584
|
-
return texture(_shadowMap, uvzShadow);
|
|
585
|
-
}`)}h.Y;var v=r(33094);class _ extends c.n{constructor(e,t){super(e,"sampler2DShadow",0,(r,i)=>r.bindTexture(e,t(i)))}}function x(e,t){t.receiveShadows&&e.include(m),w(e,t)}function y(e,t){t.receiveShadows&&e.include(p),w(e,t)}function w(e,t){e.fragment.uniforms.add(new v.U("lightingGlobalFactor",e=>e.lighting.globalFactor));const{receiveShadows:r,spherical:i}=t;e.include(s,t),r&&b(e),e.fragment.code.add(o.H`
|
|
586
|
-
float readShadow(float additionalAmbientScale, vec3 vpos) {
|
|
587
|
-
return ${r?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":(0,o.If)(i,"lightingGlobalFactor * (1.0 - additionalAmbientScale)","0.0")};
|
|
588
|
-
}
|
|
589
|
-
`)}function b(e){e.include(g),e.fragment.uniforms.add(new _("shadowMap",({shadowMap:e})=>e.depthTexture)).code.add(o.H`float readShadowMap(const in vec3 _worldPos, float _linearDepth) {
|
|
590
|
-
vec3 uvzShadow = calculateUVZShadow(_worldPos, _linearDepth, textureSize(shadowMap,0));
|
|
591
|
-
if (uvzShadow.z < 0.0) {
|
|
592
|
-
return 0.0;
|
|
593
|
-
}
|
|
594
|
-
return readShadowMapUVZ(uvzShadow, shadowMap);
|
|
595
|
-
}`)}h.Y},32680(e,t,r){r.d(t,{M:()=>n});var i=r(31821);function n(e){e.vertex.code.add(i.H`vec4 offsetBackfacingClipPosition(vec4 posClip, vec3 posWorld, vec3 normalWorld, vec3 camPosWorld) {
|
|
596
|
-
vec3 camToVert = posWorld - camPosWorld;
|
|
597
|
-
bool isBackface = dot(camToVert, normalWorld) > 0.0;
|
|
598
|
-
if (isBackface) {
|
|
599
|
-
posClip.z += 0.0000003 * posClip.w;
|
|
600
|
-
}
|
|
601
|
-
return posClip;
|
|
602
|
-
}`)}},33079(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",1,(i,n,o)=>i.setUniform3fv(e,t(n,o),r))}}},33094(e,t,r){r.d(t,{U:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"float",0,(i,n)=>i.setUniform1f(e,t(n),r))}}},33120(e,t,r){r.d(t,{i$:()=>s,xJ:()=>o}),r(46686),r(33752);var i=r(77108),n=r(31821);function o(e){e.vertex.uniforms.add(new i.E("nearFar",e=>e.camera.nearFar))}function s(e){e.vertex.code.add(n.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
603
|
-
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
604
|
-
}`)}},33752(e,t,r){r.d(t,{EM:()=>a,dO:()=>s});var i=r(29242),n=r(51850),o=(r(26425),r(40710),r(33079),r(31821),r(98353),r(35644),r(58029),r(65786));class s extends o.Y{constructor(){super(...arguments),this.transformWorldFromViewTH=(0,n.vt)(),this.transformWorldFromViewTL=(0,n.vt)(),this.transformViewFromCameraRelativeRS=(0,i.vt)()}}class a extends o.Y{constructor(){super(...arguments),this.transformWorldFromModelRS=(0,i.vt)(),this.transformWorldFromModelTH=(0,n.vt)(),this.transformWorldFromModelTL=(0,n.vt)()}}},34845(e,t,r){r.d(t,{Ir:()=>u});var i=r(37585),n=r(48163),o=r(78955),s=r(91829),a=r(77108),l=r(14314),c=r(31821);function u(e){e.fragment.uniforms.add(new l.I("projInfo",e=>function(e){const t=e.projectionMatrix;return 0===t[11]?(0,o.hZ)(d,2/(e.fullWidth*t[0]),2/(e.fullHeight*t[5]),(1+t[12])/t[0],(1+t[13])/t[5]):(0,o.hZ)(d,-2/(e.fullWidth*t[0]),-2/(e.fullHeight*t[5]),(1-t[8])/t[0],(1-t[9])/t[5])}(e.camera))),e.fragment.uniforms.add(new a.E("zScale",e=>0===e.camera.projectionMatrix[11]?(0,i.hZ)(h,0,1):(0,i.hZ)(h,1,0))),e.fragment.code.add(c.H`vec3 reconstructPosition(vec2 fragCoord, float depth) {
|
|
605
|
-
return vec3((fragCoord * projInfo.xy + projInfo.zw) * (zScale.x * depth + zScale.y), depth);
|
|
606
|
-
}`)}const d=(0,s.vt)(),h=(0,n.vt)()},35644(e,t,r){r.d(t,{k:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat3",1,(i,n,o)=>i.setUniformMatrix3fv(e,t(n,o),r))}}},35818(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"int",0,(r,i)=>r.setUniform1i(e,t(i)))}}},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},40710(e,t,r){r.d(t,{W:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec3",2,(i,n,o,s)=>i.setUniform3fv(e,t(n,o,s),r))}}},42293(e,t,r){r.d(t,{MW:()=>o,wH:()=>n}),r(94656);var i=r(63907);function n(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.SB.DEPTH_COMPONENT32F:case i.iE.DEPTH24_STENCIL8:return 4;case i.iE.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}new Set([i.pe.BYTE,i.pe.SHORT,i.pe.INT,i.pe.UNSIGNED_BYTE,i.pe.UNSIGNED_SHORT,i.pe.UNSIGNED_INT])},42593(e,t,r){r.d(t,{Q:()=>u});var i=r(31821);function n(e){const{fragment:t}=e;t.code.add(i.H`uint readChannelBits(uint channel, int highlightLevel) {
|
|
607
|
-
int llc = (highlightLevel & 3) << 1;
|
|
608
|
-
return (channel >> llc) & 3u;
|
|
609
|
-
}
|
|
610
|
-
uint readChannel(uvec2 texel, int highlightLevel) {
|
|
611
|
-
int lic = (highlightLevel >> 2) & 1;
|
|
612
|
-
return texel[lic];
|
|
613
|
-
}
|
|
614
|
-
uint readLevelBits(uvec2 texel, int highlightLevel) {
|
|
615
|
-
return readChannelBits(readChannel(texel, highlightLevel), highlightLevel);
|
|
616
|
-
}`)}var o=r(74333);class s extends o.n{constructor(e,t){super(e,"ivec2",0,(r,i)=>r.setUniform2iv(e,t(i)))}}var a=r(35818),l=r(12791);class c extends o.n{constructor(e,t){super(e,"usampler2D",0,(r,i)=>r.bindTexture(e,t(i)))}}function u(e,t){const{fragment:r}=e,{output:o,draped:u,hasHighlightMixTexture:d}=t;8===o?(r.uniforms.add(new a.W("highlightLevel",e=>e.highlightLevel??0),new s("highlightMixOrigin",e=>e.highlightMixOrigin)),e.outputs.add("fragHighlight","uvec2",0),e.include(n),d?r.uniforms.add(new c("highlightMixTexture",e=>e.highlightMixTexture)).code.add(i.H`uvec2 getAccumulatedHighlight() {
|
|
617
|
-
return texelFetch(highlightMixTexture, ivec2(gl_FragCoord.xy) - highlightMixOrigin, 0).rg;
|
|
618
|
-
}
|
|
619
|
-
void outputHighlight(bool occluded) {
|
|
620
|
-
if (highlightLevel == 0) {
|
|
621
|
-
uint bits = occluded ? 3u : 1u;
|
|
622
|
-
fragHighlight = uvec2(bits, 0);
|
|
623
|
-
} else {
|
|
624
|
-
int ll = (highlightLevel & 3) << 1;
|
|
625
|
-
int li = (highlightLevel >> 2) & 3;
|
|
626
|
-
uint bits;
|
|
627
|
-
if (occluded) {
|
|
628
|
-
bits = 3u << ll;
|
|
629
|
-
} else {
|
|
630
|
-
bits = 1u << ll;
|
|
631
|
-
}
|
|
632
|
-
uvec2 combinedHighlight = getAccumulatedHighlight();
|
|
633
|
-
combinedHighlight[li] |= bits;
|
|
634
|
-
fragHighlight = combinedHighlight;
|
|
635
|
-
}
|
|
636
|
-
}`):r.code.add(i.H`void outputHighlight(bool occluded) {
|
|
637
|
-
uint bits = occluded ? 3u : 1u;
|
|
638
|
-
fragHighlight = uvec2(bits, 0);
|
|
639
|
-
}`),u?r.code.add(i.H`bool isHighlightOccluded() {
|
|
640
|
-
return false;
|
|
641
|
-
}`):r.uniforms.add(new l.x("depthTexture",e=>e.mainDepth)).code.add(i.H`bool isHighlightOccluded() {
|
|
642
|
-
float sceneDepth = texelFetch(depthTexture, ivec2(gl_FragCoord.xy), 0).x;
|
|
643
|
-
return gl_FragCoord.z > sceneDepth + 5e-7;
|
|
644
|
-
}`),r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {
|
|
645
|
-
outputHighlight(isHighlightOccluded());
|
|
646
|
-
}`)):r.code.add(i.H`void calculateOcclusionAndOutputHighlight() {}`)}},42958(e,t,r){r.d(t,{w:()=>g,L:()=>v});var i=r(5482),n=r(69622),o=r(53966),s=r(97768),a=r(91429),l=r(49255),c=r(63907),u=r(85079),d=r(74038);new d._("position",3,c.pe.FLOAT,0,12);const h=[new d._("position",2,c.pe.FLOAT,0,8)];(0,u.Xk)(h),new d._("position",2,c.pe.FLOAT,0,12),new d._("uv0",2,c.pe.HALF_FLOAT,8,12),new d._("position",2,c.pe.FLOAT,0,16),new d._("uv0",2,c.pe.FLOAT,8,16),r(44208);var m=r(94656);class p{constructor(e,t,r){this._context=e,this.locations=r,this._textures=new Map,this.source=(0,m.en)()?t:null,t.attributeNames.forEach(e=>{r.has(e)||console.error(`Missing VertexAttributeLocation for ${e} used in shader`)}),this._glProgram=e.programCache.acquire(t.generate("vertex",!0),t.generate("fragment",!0),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=t.generateBind(this),this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this)}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t,r){this._glProgram.setUniform1f(e,t,r)}setUniform2fv(e,t,r){this._glProgram.setUniform2fv(e,t,r)}setUniform3fv(e,t,r){this._glProgram.setUniform3fv(e,t,r)}setUniform4fv(e,t,r){this._glProgram.setUniform4fv(e,t,r)}setUniformMatrix3fv(e,t,r){this._glProgram.setUniformMatrix3fv(e,t,!1,r)}setUniformMatrix4fv(e,t,r){this._glProgram.setUniformMatrix4fv(e,t,!1,r)}setUniformMatrices4fv(e,t,r){this._glProgram.setUniformMatrices4fv(e,t,!1,r)}setUniform1fv(e,t,r){this._glProgram.setUniform1fv(e,t,r)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e,t){let r=e.locations;if(t){const e=new Map(r);t.forEach((t,i)=>e.set(i,r.size+t)),r=e}r.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${r}, ${this.locations}`),this.locations.forEach((e,t)=>{r.get(t)!==e&&console.error(`VertexAttributeLocations are incompatible: Program has ${t} at position ${e}, VAO has it at position ${r.get(t)}.`)})}stop(){this._textures.clear()}bindTexture(e,t){if(!t?.glName){const r=`Texture sampler ${e} in ${this._context.debugBoundTechnique} has no given Texture in ${(new Error).stack}`;(0,m.en)()&&console.error(r),t=this._context.emptyTexture}const r=this._ensureTextureUnit(e,t);this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit)}_ensureTextureUnit(e,t){let r=this._textures.get(e);return null==r?(r={texture:t,unit:this._textures.size},this._textures.set(e,r)):r.texture=t,r}}var f=r(90644);let g=class extends n.A{constructor(e,t,r){super({}),this._context=e,this._configuration=t,this.primitiveType=c.WR.TRIANGLES,this.key=t.key,this.locations=(0,u.Xk)(r??h),this._pipeline=this.initializePipeline(t),this.reload=async r=>{if(r&&await this.shader.reload(),!this.key.equals(t.key))return void o.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);(0,s.WD)(this._program);const i=this.shader.get().build(t);i.debugName=this.declaredClass,this._program=new p(e.rctx,i,this.locations),this._pipeline=this.initializePipeline(t)}}initialize(){const e=this.shader.get().build(this._configuration);e.debugName=this.declaredClass,this._program=new p(this._context.rctx,e,this.locations)}destroy(){this._program=(0,s.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,f.Ey)({blending:f.RC,colorWrite:f.kn})}};function v(e,t){return(0,l.g1)(e)?{buffers:[c.$0]}:t??null}g=(0,i.Cg)([(0,a.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],g)},43519(e,t,r){r.d(t,{ML:()=>s,WD:()=>n,Y1:()=>o,oF:()=>a});var i=r(31821);function n(e){e.code.add(i.H`struct MaskedColor {
|
|
647
|
-
vec4 color;
|
|
648
|
-
bvec4 mask;
|
|
649
|
-
};`)}function o(e){e.include(n),e.code.add(i.H`
|
|
650
|
-
MaskedColor createMaskedFromUInt8NaNColor(vec4 color) {
|
|
651
|
-
return MaskedColor(color * ${i.H.float(1/254)}, equal(color, vec4(255)));
|
|
652
|
-
}
|
|
653
|
-
`)}function s(e){e.include(n),e.code.add(i.H`vec4 maskedColorSelectOrOne(MaskedColor color) {
|
|
654
|
-
return vec4(
|
|
655
|
-
color.mask.r ? 1.0 : color.color.r,
|
|
656
|
-
color.mask.g ? 1.0 : color.color.g,
|
|
657
|
-
color.mask.b ? 1.0 : color.color.b,
|
|
658
|
-
color.mask.a ? 1.0 : color.color.a
|
|
659
|
-
);
|
|
660
|
-
}
|
|
661
|
-
MaskedColor multiplyMaskedColors(MaskedColor color1, MaskedColor color2) {
|
|
662
|
-
vec4 masked1 = maskedColorSelectOrOne(color1);
|
|
663
|
-
vec4 masked2 = maskedColorSelectOrOne(color2);
|
|
664
|
-
return MaskedColor(masked1 * masked2, bvec4(ivec4(color1.mask) & ivec4(color2.mask)));
|
|
665
|
-
}`)}function a(e){e.include(n),e.code.add(i.H`MaskedColor createMaskedFromNaNColor(vec4 color) {
|
|
666
|
-
return MaskedColor(color, isnan(color));
|
|
667
|
-
}`)}},43609(e,t,r){r.d(t,{a:()=>o,f:()=>s,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let s=0,a=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],s+=r,a+=n;return}const l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[s]=Math.max(t[a]/l,-1),e[s+1]=Math.max(t[a+1]/l,-1),s+=r,a+=n;else for(let i=0;i<o;++i)e[s]=t[a]/l,e[s+1]=t[a+1]/l,s+=r,a+=n}function s(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,s=i?.count??e.count;let a=(i?.dstIndex??0)*o;for(let e=0;e<s;++e)n[a]=t,n[a+1]=r,a+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:s,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(o,10);return new n(a,l,t)}}},46154(e,t,r){r.d(t,{fetch:()=>Mr});var i=r(40876),n=r(61473),o=r(34727),s=r(77690),a=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),p=r(34275);function f(e,t=!1){return e<=p.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var g=r(13030),v=r(73354),_=r(65686),x=r(43609),y=r(21015),w=r(84498),b=r(51530),M=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:M.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:M.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,a.vt)();return(0,s.lw)(c,o,l),(0,s.lw)(c,n,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var A=r(11254),E=r(60999),R=r(49186),I=r(53966),O=r(69397),F=r(81139),P=r(74887),D=r(46140),N=r(97146);async function H(e,t){return(await(0,A.A)(e,{responseType:"image",...t})).data}var L=r(46610),B=r(20498);function z(e){if(e.length<p.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,p.LW)(e)?(0,B.pX)().from(e):(0,p.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var U=r(15142),G=r(620);class V{get center(){return(0,h.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,h.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,h.fA)(this._data[7],this._data[8],this._data[9])}constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,G.vA)(e.length>=1),(0,G.vA)(3===r.size||4===r.size);const{data:i,size:n,indices:o}=r;(0,G.vA)(o.length%this._numIndexPerPrimitive===0),(0,G.vA)(o.length>=e.length*this._numIndexPerPrimitive);const s=e.length;let a=n*o[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(a);const l=(0,h.fA)(i[a],i[a+1],i[a+2]),c=(0,h.o8)(l);for(let t=0;t<s;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){a=n*o[r+e],j.push(a);let t=i[a];l[0]=Math.min(t,l[0]),c[0]=Math.max(t,c[0]),t=i[a+1],l[1]=Math.min(t,l[1]),c[1]=Math.max(t,c[1]),t=i[a+2],l[2]=Math.min(t,l[2]),c[2]=Math.max(t,c[2])}}for(let e=0;e<3;++e)this._data[4+e]=l[e],this._data[7+e]=c[e];const u=(0,d.Cc)((0,h.vt)(),this.bbMin,this.bbMax,.5);let m=.5*Math.max(Math.max(c[0]-l[0],c[1]-l[1]),c[2]-l[2]),p=m*m;for(let e=0;e<j.length;++e){a=j.at(e);const t=i[a]-u[0],r=i[a+1]-u[1],n=i[a+2]-u[2],o=t*t+r*r+n*n;if(o<=p)continue;const s=Math.sqrt(o),l=.5*(s-m);m+=l,p=m*m;const c=l/s;u[0]+=t*c,u[1]+=r*c,u[2]+=n*c}this._data[3]=m;for(let e=0;e<3;++e)this._data[0+e]=u[e];j.clear()}getChildren(){if(this._children||(0,d.hG)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,d.Cc)((0,h.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:n,size:o,indices:s}=this.position;for(let a=0;a<t;++a){let t=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[a];let c=o*s[l],u=n[c],d=n[c+1],h=n[c+2];for(let e=1;e<this._numIndexPerPrimitive;++e){c=o*s[l+e];const t=n[c],r=n[c+1],i=n[c+2];t<u&&(u=t),r<d&&(d=r),i<h&&(h=i)}u<e[0]&&(t|=1),d<e[1]&&(t|=2),h<e[2]&&(t|=4),r[a]=t,++i[t]}let a=0;for(let e=0;e<8;++e)i[e]>0&&++a;if(a<2)return;const l=new Array(8);for(let e=0;e<8;++e)l[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];l[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==l[e]&&this._children.push(new V(l[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new U.A({deallocator:null});var W=r(24326);class k{constructor(e){this.id=(0,W.c)(),this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,N.Dg)(r.indices)})}get attributes(){return this._attributes}}var Z=r(4341),$=r(11964);function q(e,t,r){return(0,d.Re)(Y,t,e),(0,d.Re)(X,r,e),.5*(0,d.Bw)((0,d.$A)(Y,Y,X))}r(32114),new Z.I($.vt),new Z.I(()=>{return e?{p0:(0,h.o8)(e.p0),p1:(0,h.o8)(e.p1),p2:(0,h.o8)(e.p2)}:{p0:(0,h.vt)(),p1:(0,h.vt)(),p2:(0,h.vt)()};var e});const Y=(0,h.vt)(),X=(0,h.vt)(),K=(0,h.vt)(),J=(0,h.vt)(),Q=(0,h.vt)(),ee=(0,h.vt)();class te{constructor(){this.uid=(0,W.c)()}}class re extends te{constructor(e){super(),this.highlightName=e,this.channel=0}}var ie=r(94656);class ne extends k{constructor(e,t,r=null,i=0,n=null,o=-1,s){super(t),this.material=e,this.mapPositions=r,this.type=i,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=s,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null;const a=this.positionAttribute;null!=a&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=a.indices.length)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:z(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,ie.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this._attributes.values().next().value?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,d.Z0)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,d.hZ)(t,0,0,0),(0,d.hZ)(ee,0,0,0);let o=0,s=0;for(let e=0;e<n.length-2;e+=3){const a=n[e]*r,l=n[e+1]*r,c=n[e+2]*r;(0,d.hZ)(K,i[a],i[a+1],i[a+2]),(0,d.hZ)(J,i[l],i[l+1],i[l+2]),(0,d.hZ)(Q,i[c],i[c+1],i[c+2]);const u=q(K,J,Q);u?((0,d.WQ)(K,K,J),(0,d.WQ)(K,K,Q),(0,d.hs)(K,K,1/3*u),(0,d.WQ)(t,t,K),o+=u):((0,d.WQ)(ee,ee,K),(0,d.WQ)(ee,ee,J),(0,d.WQ)(ee,ee,Q),s+=3)}return!(0===s&&0===o||(0!==o?((0,d.hs)(t,t,1/o),0):0===s||((0,d.hs)(t,ee,1/s),0)))}(this.positionAttribute,e)}_computeAttachmentOriginLines(e){const t=this.positionAttribute;return function(e,t,r){if(!e)return!1;(0,d.hZ)(r,0,0,0),(0,d.hZ)(ee,0,0,0);let i=0,n=0;const{size:o,data:s,indices:a}=e,l=a.length-1,c=l+(t?2:0);for(let e=0;e<c;e+=2){const t=e<l?e+1:0,c=a[e<l?e:l]*o,u=a[t]*o;K[0]=s[c],K[1]=s[c+1],K[2]=s[c+2],J[0]=s[u],J[1]=s[u+1],J[2]=s[u+2],(0,d.hs)(K,(0,d.WQ)(K,K,J),.5);const h=(0,d.xg)(K,J);h>0?((0,d.WQ)(r,r,(0,d.hs)(K,K,h)),i+=h):0===i&&((0,d.WQ)(ee,ee,K),n++)}return 0!==i?((0,d.hs)(r,r,1/i),!0):0!==n&&((0,d.hs)(r,ee,1/n),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,d.hZ)(t,0,0,0);let o=-1,s=0;for(let e=0;e<n.length;e++){const a=n[e]*r;o!==a&&(t[0]+=i[a],t[1]+=i[a+1],t[2]+=i[a+2],s++),o=a}return s>1&&(0,d.hs)(t,t,1/s),s>0}(this.positionAttribute,e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.positionAttribute;if(!e||0===e.indices.length)return null;const t=0===this.type?3:1;(0,G.vA)(e.indices.length%t===0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,N.tM)(e.indices.length/t);return new V(r,t,e)}get transformation(){return this._transformation??c.zK}set transformation(e){this._transformation=e&&e!==c.zK?(0,c.o8)(e):null}get highlights(){return this._highlights||oe}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new re(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const oe=new Set;var se=r(65529),ae=r(97768),le=r(84952),ce=r(38969),ue=r(95117),de=r(2741);let he;var me=r(63907),pe=r(76284),fe=r(42293);let ge=null,ve=null;async function _e(){return null==ve&&(he??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,de.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),ve=he,ge=await ve),ve}function xe(e,t,r,i,n){const o=(0,fe.MW)(t?me.CQ.COMPRESSED_RGBA8_ETC2_EAC:me.CQ.COMPRESSED_RGB8_ETC2),s=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*s)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function we(e){return e.getFaces()>=1&&e.isETC1S()}function be(e,t,r,i,n,o,s,a){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[u,d]=l?i?[1,me.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,me.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,me.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,me.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(s(e,u))),a(e,u,m[e]);return t.internalFormat=d,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new pe.A(e,t,{type:"compressed",levels:m})}const Me=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function Te(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Se=Te("DXT1"),Ce=Te("DXT3"),Ae=Te("DXT5");function Ee(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Re(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const s=Math.min(Math.sqrt(r/o),i/n);return[Ee(Math.round(e*s),i),Ee(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Ie(e,r,i)}function Ie(e,t,r){if(e instanceof ImageData)return Ie(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Oe=r(67171);class Fe{constructor(e,t){this._data=e,this.id=(0,W.c)(),this.events=new se.bk,this._parameters={...De,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,le.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,ce.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,le.DB)(e.src)||(0,le.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Oe.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,p.mw)(e)||(0,p.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.KTX2File(new Uint8Array(e)),i=we(r)?xe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.BasisFile(new Uint8Array(e)),i=ye(r)?xe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Pe(e):t,n=t.pixelFormat??6408,o=(0,fe.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new pe.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,p.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,p.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,p.mw)(t)||(0,p.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,p.mw)(t)||(0,p.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,p.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,p.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return Me().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Me().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case Se:n=8,o=me.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:n=16,o=me.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ae:n=16,o=me.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Me().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let s=1,a=r[4],l=r[3];(3&a||3&l)&&(Me().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,l=l+3&-4);const c=a,u=l;let d,h;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<s;++t)h=(a+3>>2)*(l+3>>2)*n,d=new Uint8Array(e.buffer,m,h),p.push(d),m+=h,a=Math.max(1,a>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:o,width:c,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:s,height:a}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=s,t.height=a,new pe.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.KTX2File(new Uint8Array(r));if(!we(i))return null;i.startTranscoding();const n=be(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.BasisFile(new Uint8Array(r));if(!ye(i))return null;i.startTranscoding();const n=be(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new pe.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await H(t,{signal:r});return(0,P.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ue.y)(t,t.src,!1,r);return(0,P.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",s),t.removeEventListener("error",a),(0,ae.xt)(l)},s=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},a=e=>{o(),n(e||new R.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",s),t.addEventListener("error",a);const l=(0,P.u7)(r,()=>a((0,P.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Re(r,e.parameters));const i=Pe(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new pe.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,ae.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Pe(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const De={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Ne=r(49255);class He{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return 2}}var Le=r(65786);class Be extends He{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,ae.Gz)(this._texture),this._textureNormal=(0,ae.Gz)(this._textureNormal),this._textureEmissive=(0,ae.Gz)(this._textureEmissive),this._textureOcclusion=(0,ae.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,ae.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ue(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,ae.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,P.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,ae.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ze extends Le.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ue extends ze{constructor(e,t,r,i,n,o,s){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=s}}var Ge=r(5482),Ve=r(68317),je=r(51976);class We extends Ve.Hz{constructor(){super(...arguments),this.oitPass=0,this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,Ge.Cg)([(0,je.W)({count:3})],We.prototype,"oitPass",void 0),(0,Ge.Cg)([(0,je.W)()],We.prototype,"hasHighlightMixTexture",void 0);var ke=r(19245);class Ze{constructor(e,t){this.id=(0,W.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,ke.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,ke.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e,t,r=new We){return r.output=e,r.hasEmission=t.hasEmission&&(0,Ne._o)(e),r.oitPass=t.oitPass,r.hasHighlightMixTexture=8===e&&null!=t.highlightMixTexture,r}}Le.Y;class $e{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const qe=(0,m.vt)();function Ye(e,t,r,i,n,o){if(!e.visible)return;const s=(0,d.jb)(lt,i,r),a=(e,t,r)=>o(e,r,t),{tolerance:l}=t,c=new $e(l,!1,t.options.normalRequired);if(e.boundingInfo)(0,G.vA)(0===e.type),Ke(e.boundingInfo,r,s,l,n,c,a);else{const t=e.positionAttribute,i=t.indices;!function(e,t,r,i,n,o,s,a,l,c){const u=t,h=ct,m=Math.abs(u[0]),p=Math.abs(u[1]),f=Math.abs(u[2]),g=m>=p?m>=f?0:2:p>=f?1:2,v=g,_=u[v]<0?2:1,x=(g+_)%3,y=(g+(3-_))%3,w=u[x]/u[v],b=u[y]/u[v],M=1/u[v],T=Qe,S=et,C=tt,{normalRequired:A}=l;for(let t=r;t<i;++t){const r=3*t,i=s*n[r];(0,d.hZ)(h[0],o[i+0],o[i+1],o[i+2]);const l=s*n[r+1];(0,d.hZ)(h[1],o[l+0],o[l+1],o[l+2]);const u=s*n[r+2];(0,d.hZ)(h[2],o[u+0],o[u+1],o[u+2]),a&&((0,d.C)(h[0],a.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,d.C)(h[1],a.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,d.C)(h[2],a.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,d.jb)(T,h[0],e),(0,d.jb)(S,h[1],e),(0,d.jb)(C,h[2],e);const m=T[x]-w*T[v],p=T[y]-b*T[v],f=S[x]-w*S[v],g=S[y]-b*S[v],_=C[x]-w*C[v],E=C[y]-b*C[v],R=_*g-E*f,I=m*E-p*_,O=f*p-g*m;if((R<0||I<0||O<0)&&(R>0||I>0||O>0))continue;const F=R+I+O;if(0===F)continue;const P=R*(M*T[v])+I*(M*S[v])+O*(M*C[v]);if(P*Math.sign(F)<0)continue;const D=P/F;D>=0&&c(D,t,A?it(h):null)}}(r,s,0,i.length/3,i,t.data,t.stride,n,c,a)}}const Xe=(0,h.vt)();function Ke(e,t,r,i,n,o,s){if(null==e)return;const a=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,Xe);if((0,m.Ne)(qe,e.bbMin),(0,m.vI)(qe,e.bbMax),null!=n&&n.applyToAabb(qe),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let s=Math.min(n,o),a=Math.max(n,o);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(a=Math.min(a,Math.max(l,c)),a<0)return!1;if(s=Math.max(s,Math.min(l,c)),s>a)return!1;const u=(e[2]-i-t[2])*r[2],d=(e[5]+i-t[2])*r[2];return a=Math.min(a,Math.max(u,d)),!(a<0)&&(s=Math.max(s,Math.min(u,d)),!(s>a)&&s<1/0)}(e,t,r,i)}(qe,t,a,i)){const{primitiveIndices:a,position:l}=e,c=a?a.length:l.indices.length/3;if(c>st){const a=e.getChildren();if(void 0!==a){for(const e of a)Ke(e,t,r,i,n,o,s);return}}!function(e,t,r,i,n,o,s,a,l,c,u){const d=e[0],h=e[1],m=e[2],p=t[0],f=t[1],g=t[2],{normalRequired:v}=c;for(let e=0;e<i;++e){const t=a[e],r=3*t,i=s*n[r];let c=o[i],_=o[i+1],x=o[i+2];const y=s*n[r+1];let w=o[y],b=o[y+1],M=o[y+2];const T=s*n[r+2];let S=o[T],C=o[T+1],A=o[T+2];null!=l&&([c,_,x]=l.applyToVertex(c,_,x,e),[w,b,M]=l.applyToVertex(w,b,M,e),[S,C,A]=l.applyToVertex(S,C,A,e));const E=w-c,R=b-_,I=M-x,O=S-c,F=C-_,P=A-x,D=f*P-F*g,N=g*O-P*p,H=p*F-O*f,L=E*D+R*N+I*H;if(Math.abs(L)<=at)continue;const B=d-c,z=h-_,U=m-x,G=B*D+z*N+U*H;if(L>0){if(G<0||G>L)continue}else if(G>0||G<L)continue;const V=z*I-R*U,j=U*E-I*B,W=B*R-E*z,k=p*V+f*j+g*W;if(L>0){if(k<0||G+k>L)continue}else if(k>0||G+k<L)continue;const Z=(O*V+F*j+P*W)/L;Z>=0&&u(Z,t,v?rt(E,R,I,O,F,P,Je):null)}}(t,r,0,c,l.indices,l.data,l.stride,a,n,o,s)}}const Je=(0,h.vt)();const Qe=(0,h.vt)(),et=(0,h.vt)(),tt=(0,h.vt)();function rt(e,t,r,i,n,o,s){return(0,d.hZ)(nt,e,t,r),(0,d.hZ)(ot,i,n,o),(0,d.$A)(s,nt,ot),(0,d.S8)(s,s),s}function it(e){return(0,d.jb)(nt,e[1],e[0]),(0,d.jb)(ot,e[2],e[0]),(0,d.$A)(Je,nt,ot),(0,d.S8)(Je,Je),Je}const nt=(0,h.vt)(),ot=(0,h.vt)(),st=1e3,at=1e-7,lt=(0,h.vt)(),ct=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()];var ut=r(16396);function dt(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length;r*=s;for(let e=0;e<a;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=s}}function ht(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,l=o.length;if(r*=a,1===i)for(let e=0;e<l;++e){const t=3*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}else for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}}function mt(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,l=o.length;if(r*=a,1===i)for(let e=0;e<l;++e){const t=4*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}}function pt(e,t,r,i,n=1){const o=t.typedBuffer,s=t.typedBufferStride;if(i*=s,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s}function ft(e,t,r,i,n,o){switch(e){case"position":{(0,G.vA)(3===t.size);const i=n.getField(e,g.xs);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ht(e,r,i,n);const{data:o,indices:s}=e,a=r.typedBuffer,c=r.typedBufferStride,u=s.length,d=t[0],h=t[1],m=t[2],p=t[4],f=t[5],g=t[6],v=t[8],_=t[9],x=t[10],y=t[12],w=t[13],b=t[14];i*=c;let M=0,T=0,S=0;const C=(0,l.tZ)(t)?e=>{M=o[e]+y,T=o[e+1]+w,S=o[e+2]+b}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=d*t+p*r+v*i+y,T=h*t+f*r+_*i+w,S=m*t+g*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),a[i]=M,a[i+1]=T,a[i+2]=S,i+=c;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)a[i]=M,a[i+1]=T,a[i+2]=S,i+=c}}(t,r,i,o);break}case"normal":{(0,G.vA)(3===t.size);const r=n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ht(e,r,i,n);const{data:o,indices:s}=e,a=t,c=r.typedBuffer,u=r.typedBufferStride,d=s.length,h=a[0],m=a[1],p=a[2],f=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,l.ut)(a),b=1e-6,M=1-b;i*=u;let T=0,S=0,C=0;const A=(0,l.tZ)(a)?e=>{T=o[e],S=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];T=h*t+f*r+_*i,S=m*t+g*r+x*i,C=p*t+v*r+y*i};if(1===n)if(w)for(let e=0;e<d;++e){A(3*s[e]);const t=T*T+S*S+C*C;if(t<M&&t>b){const e=1/Math.sqrt(t);c[i]=T*e,c[i+1]=S*e,c[i+2]=C*e}else c[i]=T,c[i+1]=S,c[i+2]=C;i+=u}else for(let e=0;e<d;++e)A(3*s[e]),c[i]=T,c[i+1]=S,c[i+2]=C,i+=u;else for(let e=0;e<d;++e){if(A(3*s[e]),w){const e=T*T+S*S+C*C;if(e<M&&e>b){const t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),dt(t,r,o);break}case"uv0":{(0,G.vA)(2===t.size);const r=n.getField(e,g.ZD)??n.getField(e,g.gH);(0,G.vA)(!!r,`No buffer view for ${e}`),dt(t,r,o);break}case"uvi":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),dt(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,g.XP);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(3===t.size||4===t.size),function(e,t,r,i,n=1){const{data:o,indices:s}=e,a=r.typedBuffer,l=r.typedBufferStride,c=s.length;if(i*=l,t===o.length&&4===t){a[i]=o[0],a[i+1]=o[1],a[i+2]=o[2],a[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,s=e[i/=4];i+=t;const u=c*n;for(let r=1;r<u;++r)e[i]=s,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<c;++e){const t=3*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=l}}}(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,g.Y$)??n.getField(e,g.Y$);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length,l=i[0];r*=s;for(let e=0;e<a;++e)o[r]=l,r+=s}(t,r,o);break}case"tangent":{(0,G.vA)(4===t.size);const i=n.getField(e,g.Eq);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void mt(e,r,i,n);const{data:o,indices:s}=e,a=t,c=r.typedBuffer,u=r.typedBufferStride,d=s.length,h=a[0],m=a[1],p=a[2],f=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,l.ut)(a),b=1e-6,M=1-b;if(i*=u,1===n)for(let e=0;e<d;++e){const t=4*s[e],r=o[t],n=o[t+1],a=o[t+2],l=o[t+3];let d=h*r+f*n+_*a,T=m*r+g*n+x*a,S=p*r+v*n+y*a;if(w){const e=d*d+T*T+S*S;if(e<M&&e>b){const t=1/Math.sqrt(e);d*=t,T*=t,S*=t}}c[i]=d,c[i+1]=T,c[i+2]=S,c[i+3]=l,i+=u}else for(let e=0;e<d;++e){const t=4*s[e],r=o[t],a=o[t+1],l=o[t+2],d=o[t+3];let T=h*r+f*a+_*l,S=m*r+g*a+x*l,C=p*r+v*a+y*l;if(w){const e=T*T+S*S+C*C;if(e<M&&e>b){const t=1/Math.sqrt(e);T*=t,S*=t,C*=t}}for(let e=0;e<n;++e)c[i]=T,c[i+1]=S,c[i+2]=C,c[i+3]=d,i+=u}}(t,r,i,o);break}case"profileVertexAndNormal":{(0,G.vA)(4===t.size);const r=n.getField(e,g.jz)??n.getField(e,g.Eq);(0,G.vA)(!!r,`No buffer view for ${e}`),mt(t,r,o);break}case"profileAuxData":{(0,G.vA)(3===t.size);const r=n.getField(e,g.EC)??n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),ht(t,r,o);break}}}(0,h.vt)();class gt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return function(e,t,r,i,n,o,s){let a={numItems:0,numVerticesPerItem:0};for(const l of r.fields.keys()){const r=e.get(l),c=r?.indices;if(r&&c)"position"===l&&(a={numItems:1,numVerticesPerItem:c.length}),ft(l,r,i,n,o,s);else if("olidColor"===l&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;pt(t,o.getField(l,g.XP),e,s)}}}return a}(r,i,this.layout,e,t,n,o)}}var vt=r(91429),_t=r(91829),xt=r(4431),yt=r(1843),wt=r(72824),bt=r(13840),Mt=r(42958),Tt=r(16943),St=r(90644);const Ct=(0,St.p3)(1,0,1,771);function At(e,t=!1){switch(e){case 0:return t?St.RC:St.T8;case 1:return Ct;case 2:case 3:return null}}function Et(e){if(e.draped)return null;switch(e.oitPass){case 0:case 2:return e.writeDepth?St.Uy:null;case 1:case 3:return null}}function Rt(e,t=513){return{func:0===e||2===e?t:515}}const It={factor:-1,units:-2};function Ot({oitPass:e,enableOffset:t}){return t&&1===e?It:null}function Ft(e,t){const r={buffers:1===e?[me.r6,me.yI]:[me.r6]};return t&&r.buffers.push(me.r6+r.buffers.length),r.buffers.length>1?r:null}const Pt={mask:255},Dt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},Nt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var Ht=r(4576);(0,r(44208).A)("esri-tests-disable-gpu-memory-measurements");var Lt=r(69622),Bt=r(32728);class zt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",g.Eq),this.color=e.getField("instanceColor",g.XP),this.olidColor=e.getField("instanceOlidColor",g.XP),this.state=e.getField("state",g.SL),this.lodLevel=e.getField("lodLevel",g.SL)}}let Ut=class extends Lt.A{constructor(e,t){super(e),this.events=new se.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Vt(Gt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=$t,this._buffer=this._layout.createBuffer(this._capacity),this._view=new zt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=jt,i=Wt;t.localTransform.getMat(e,kt),t.globalTransform.getMat(e,Zt);const n=(0,l.lw)(Zt,Zt,kt);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,s.z0)(i,n),t.model.setMat(e,i);const o=(0,Bt.wp)(jt,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,s.B8)(i,i),(0,s.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Wt),r.modelOrigin.getVec(e,jt),t[0]=Wt[0],t[1]=Wt[1],t[2]=Wt[2],t[3]=0,t[4]=Wt[3],t[5]=Wt[4],t[6]=Wt[5],t[7]=0,t[8]=Wt[6],t[9]=Wt[7],t[10]=Wt[8],t[11]=0,t[12]=jt[0],t[13]=jt[1],t[14]=jt[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=Math.max(jt[0],jt[1],jt[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(jt[0],jt[1],jt[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max($t,Math.floor(this._capacity*Ht.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new zt(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Ge.Cg)([(0,vt.MZ)({constructOnly:!0})],Ut.prototype,"shaderTransformation",void 0),(0,Ge.Cg)([(0,vt.MZ)()],Ut.prototype,"_size",void 0),(0,Ge.Cg)([(0,vt.MZ)({readOnly:!0})],Ut.prototype,"size",null),Ut=(0,Ge.Cg)([(0,vt.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ut);const Gt=(0,yt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Vt(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Tt.E)()&&e.vec4u8("instanceOlidColor"),e}const jt=(0,h.vt)(),Wt=(0,a.vt)(),kt=(0,c.vt)(),Zt=(0,c.vt)(),$t=64,qt=(0,yt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Yt=r(74810),Xt=r(28491),Kt=r(49788);class Jt extends wt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Yt.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,_t.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Kt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}wt.gy;let Qt=class extends Mt.w{constructor(e,t){let i=(0,xt.U)(rr(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,xt.U)(function(e){return Vt(qt.clone(),e)}(t)))),super(e,t,i),this.shader=new bt.r(Xt.D,()=>r.e(5141).then(r.bind(r,5141)))}_makePipeline(e,t){const{oitPass:r,output:i,hasEmission:n,transparent:o,cullFace:s,customDepthTest:a,hasOccludees:l}=e;return(0,St.Ey)({blending:(0,Ne._o)(i)&&o?At(r):null,culling:tr(e)?(0,St.Xt)(s):null,depthTest:Rt(r,er(a)),depthWrite:Et(e),drawBuffers:(0,Mt.L)(i,Ft(r,n)),colorWrite:St.kn,stencilWrite:l?Pt:null,stencilTest:l?t?Nt:Dt:null,polygonOffset:Ot(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function er(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function tr(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function rr(e){const t=(0,yt.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Tt.E)()&&t.vec4u8("olidColor"),t}Qt=(0,Ge.Cg)([(0,vt.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Qt);class ir extends We{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,Ge.Cg)([(0,je.W)({count:4})],ir.prototype,"alphaDiscardMode",void 0),(0,Ge.Cg)([(0,je.W)({count:3})],ir.prototype,"doubleSidedMode",void 0),(0,Ge.Cg)([(0,je.W)({count:7})],ir.prototype,"pbrMode",void 0),(0,Ge.Cg)([(0,je.W)({count:3})],ir.prototype,"cullFace",void 0),(0,Ge.Cg)([(0,je.W)({count:3})],ir.prototype,"normalType",void 0),(0,Ge.Cg)([(0,je.W)({count:3})],ir.prototype,"customDepthTest",void 0),(0,Ge.Cg)([(0,je.W)({count:8})],ir.prototype,"emissionSource",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasVertexColors",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasSymbolColors",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasVerticalOffset",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasColorTexture",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasMetallicRoughnessTexture",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasOcclusionTexture",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasNormalTexture",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasScreenSizePerspective",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasVertexTangents",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasOccludees",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"instanced",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"instancedDoublePrecision",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasModelTransformation",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"offsetBackfaces",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasVVSize",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasVVColor",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"receiveShadows",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"receiveAmbientOcclusion",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"textureAlphaPremultiplied",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"instancedFeatureAttribute",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"instancedColor",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"writeDepth",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"transparent",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"enableOffset",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"terrainDepthTest",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"cullAboveTerrain",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"snowCover",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasColorTextureTransform",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasEmissionTextureTransform",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasNormalTextureTransform",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasOcclusionTextureTransform",void 0),(0,Ge.Cg)([(0,je.W)()],ir.prototype,"hasMetallicRoughnessTextureTransform",void 0);var nr=r(57323);let or=class extends Qt{constructor(){super(...arguments),this.shader=new bt.r(nr.R,()=>r.e(9933).then(r.bind(r,39933)))}};or=(0,Ge.Cg)([(0,vt.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],or);class sr extends Ze{constructor(e,t){super(e,lr),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,Ne.iq)(e)||(0,Ne.yT)(e))&&!this.transparent],[4,e=>((0,Ne.iq)(e)||(0,Ne.yT)(e))&&this.transparent&&this.parameters.writeDepth],[9,e=>((0,Ne.iq)(e)||(0,Ne.yT)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=rr(this.parameters),this._configuration=new ir(t.spherical)}isVisibleForOutput(e){return 3!==e&&5!==e&&4!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=Kt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}getConfiguration(e,t){const{parameters:r,_configuration:i}=this,{treeRendering:n,doubleSided:o,doubleSidedType:s}=r;return super.getConfiguration(e,t,this._configuration),i.hasNormalTexture=r.hasNormalTexture,i.hasColorTexture=r.hasColorTexture,i.hasMetallicRoughnessTexture=r.hasMetallicRoughnessTexture,i.hasOcclusionTexture=r.hasOcclusionTexture,i.hasVertexTangents=!n&&r.hasVertexTangents,i.instanced=r.instanced,i.instancedDoublePrecision=r.instancedDoublePrecision,i.hasVVColor=!!r.vvColor,i.hasVVSize=!!r.vvSize,i.hasVerticalOffset=null!=r.verticalOffset,i.hasScreenSizePerspective=null!=r.screenSizePerspective,i.hasSlicePlane=r.hasSlicePlane,i.alphaDiscardMode=r.textureAlphaMode,i.normalType=n?0:r.normalType,i.transparent=this.transparent,i.writeDepth=r.writeDepth,i.customDepthTest=r.customDepthTest??0,i.hasOccludees=t.hasOccludees,i.cullFace=r.hasSlicePlane?0:r.cullFace,i.cullAboveTerrain=t.cullAboveTerrain,i.hasModelTransformation=!n&&null!=r.modelTransformation,i.hasVertexColors=r.hasVertexColors,i.hasSymbolColors=r.hasSymbolColors,i.doubleSidedMode=n?2:o&&"normal"===s?1:o&&"winding-order"===s?2:0,i.instancedFeatureAttribute=r.instancedFeatureAttribute,i.instancedColor=r.instancedColor,(0,Ne._o)(e)?(i.terrainDepthTest=t.terrainDepthTest,i.receiveShadows=r.receiveShadows,i.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao):(i.terrainDepthTest=!1,i.receiveShadows=i.receiveAmbientOcclusion=!1),i.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,i.pbrMode=r.usePBR?r.isSchematic?2:1:0,i.emissionSource=r.emissionSource,i.offsetBackfaces=!(!this.transparent||!r.offsetTransparentBackfaces),i.enableOffset=t.enableOffset,i.snowCover=t.snowCover>0,i.hasColorTextureTransform=!!r.colorTextureTransformMatrix,i.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,i.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,i.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,i.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,i}intersect(e,t,r,i,n,o){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(pr,t[12],t[13],t[14]);let o=null;switch(r.viewingMode){case 1:o=(0,d.S8)(hr,pr);break;case 2:o=(0,d.C)(hr,dr)}const s=(0,d.Re)(fr,pr,e.eye),a=(0,d.Bw)(s),l=(0,d.hs)(s,s,1/a);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(o,l));const u=(0,ke.kE)(e,a,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(o,o,u),(0,d.ei)(mr,o,r.transform.inverseRotation),i=(0,d.Re)(cr,i,mr),n=(0,d.Re)(ur,n,mr)}Ye(e,r,i,n,(0,ut.ou)(r.verticalOffset),o)}createGLMaterial(e){return new ar(e)}createBufferWriter(){return new gt(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:s,textureAlphaMode:a,colorMixMode:l}=e,c=i[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||n<1||(null!=o||null!=s)&&1!==a&&2!==a&&"replace"!==l}(this.parameters)}}class ar extends Be{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?or:Qt,e)}}class lr extends Jt{constructor(){super(...arguments),this.treeRendering=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const cr=(0,h.vt)(),ur=(0,h.vt)(),dr=(0,h.fA)(0,0,1),hr=(0,h.vt)(),mr=(0,h.vt)(),pr=(0,h.vt)(),fr=(0,h.vt)(),gr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class vr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function _r(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(gr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(gr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(gr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(gr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else gr().warn("Indexed geometries must specify faces"),i=!1;break}default:gr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(gr().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(gr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function xr(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function yr(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function wr(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const br=new D.A(1,2,"wosr");async function Mr(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,E.Ke)((0,A.A)(e,t));if(r.ok)return r.value.data;(0,P.QP)(r.error),function(e){throw new R.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){gr().warn("Externally referenced texture data is not yet supported");continue}const s=n.encoding+";base64,"+o,a="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==yr(l)},u=t?.disableTextures?Promise.resolve(null):H(s,t);r.push(u.then(e=>({refId:a,image:e,parameters:c,alphaChannelUsage:l})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new vr(r,i,n+(0,O.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new F.O,s=e.resource,a=D.A.parse(s.version||"1.0","wosr");br.validate(a);const l=s.model.name,c=s.model.geometries,u=s.materialDefinitions??{},d=e.textures;let m=0;const p=new Map;for(let e=0;e<c.length;e++){const s=c[e];if(!_r(s))continue;const a=wr(s),l=s.params.vertexAttributes,f=[],g=e=>{if("PerAttributeArray"===s.params.topology)return null;const t=s.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=l.position,_=v.values.length/v.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=g(e)??(0,N.tM)(_);f.push([e,new L.n(r,i,t.valuesPerElement,!0)])}const x=a.texture,y=d&&d[x];if(y&&!p.has(x)){const{image:e,parameters:t}=y,r=new Fe(e,t);i.push(r),p.set(x,r)}const w=p.get(x),b=w?w.id:void 0,M=a.material;let T=o.get(M,x);if(null==T){const e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?yr(y.alphaChannelUsage):void 0,i={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:b,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),T=new sr(i,t),o.set(M,x,T)}n.push(T);const S=new ne(T,f);m+=f.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:s.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:xr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let p;if(t.cache)p=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));p=await e(new y.R,a.url,t,t.usePBR,t.useEmissive)}const{engineResources:M,referenceBoundingBox:S}=function(e,t,r){const n=e.model,a=e.meta,p=n.meta?.ESRI_proxyEllipsoid,y=a.isEsriSymbolResource&&null!=p&&"EsriRealisticTreesStyle"===a.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const n=e.model.lods[r];for(const o of n.parts){const n=o.attributes.normal;if(null==n)return;const s=o.attributes.position,a=s.count,u=(0,h.vt)(),m=(0,h.vt)(),p=(0,h.vt)(),f=new Float32Array(4*a),v=new Float32Array(3*a),_=(0,l.B8)((0,c.vt)(),o.transform);let x=0,y=0;for(let l=0;l<a;l++){s.getVec(l,m),n.getVec(l,u),(0,d.Z0)(m,m,o.transform),(0,d.Re)(p,m,t.center),(0,d.Qr)(p,p,t.radius);const a=p[2],c=(0,d.Bw)(p),h=Math.min(.45+.55*c*c,1)**i.Tf;(0,d.Qr)(p,p,t.radius),null!==_&&(0,d.Z0)(p,p,_),(0,d.S8)(p,p),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(p,p,u,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=p[0],v[x+1]=p[1],v[x+2]=p[2],x+=3,f[y]=h,f[y+1]=h,f[y+2]=h,f[y+3]=1,y+=4}o.attributes.normal=new g.xs(v.buffer),o.attributes.color=new g.Eq(f.buffer)}}}(e,p));const M=!!t.usePBR,S=a.isEsriSymbolResource?{usePBR:M,isSchematic:!1,treeRendering:y,mrrFactors:Yt.SY}:{usePBR:M,isSchematic:!1,treeRendering:!1,mrrFactors:Yt.mb},A={...t.materialParameters,treeRendering:y},E=new Array,R=new Map,I=new Map,O=n.lods.length,F=(0,m.Ie)();return n.lods.forEach((e,a)=>{const l=!0===t.skipHighLods&&(O>1&&0===a||O>3&&1===a)||!1===t.skipHighLods&&null!=r&&a!==r;if(l&&0!==a)return;const c=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new sr({},t):function(e,t,r,n,o,s,a,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:p,tangent:f}=t.attributes,g=t.material+(h?"_normal":"")+(m?"_color":"")+(p?"_texCoord0":"")+(f?"_tangent":""),v=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,x=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!s.has(g)){if(v){const t=(t,r=!1,i=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?l.compressionOptions:void 0;a.set(t,new Fe((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==x&&!c;t(d.colorTexture,r,1!==x),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,i.xV)(d.color[0]),h=(0,i.xV)(d.color[1]),m=(0,i.xV)(d.color[2]),p=null!=d.colorTexture&&v?a.get(d.colorTexture):null,f=(0,Yt.Jr)(d),y=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;s.set(g,new sr({...n,customDepthTest:1,textureAlphaMode:x,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=p?p.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&v?a.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&v?a.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&v?a.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&v?a.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:f?Yt.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:f,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...o},l))}const y=s.get(g);if(r.stageResources.materials.push(y),v){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return y}(n,e,c,S,A,R,I,t,y),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,i=(0,w.x)(e.indices||r,e.primitiveType),n=f(3*r),{typedBuffer:a,typedBufferStride:l}=e.attributes.position;(0,v.t)(n,a,e.transform,3,l);const c=[["position",new L.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=f(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,s.Ge)(Tr,e.transform),(0,v.b)(t,n,Tr,3,a),(0,o.or)(Tr)&&(0,v.n)(t,t),c.push(["normal",new L.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=f(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,s.z0)(Tr,e.transform),(0,_.t)(t,n,Tr,4,a),(0,o.or)(Tr)&&(0,v.n)(t,t,4),c.push(["tangent",new L.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=f(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),c.push(["uv0",new L.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof g.Eq?(0,_.b)(t,u,1,255):(u instanceof g.XP||u instanceof g.Uz)&&(0,_.b)(t,u,1/255,255):(t.fill(255),u instanceof g.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof g.eI||e.attributes.color instanceof g.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new L.n(t,i,4,!0)])}return{geometry:new ne(t,c),vertexCount:r}}(e,r??new sr({},t)),p=d.boundingInfo;null!=p&&0===a&&((0,m.iT)(F,p.bbMin),(0,m.iT)(F,p.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||E.push(c)}),{engineResources:E,referenceBoundingBox:F}}(p,t,a.specifiedLodIndex);return{lods:M,referenceBoundingBox:S,isEsriSymbolResource:p.meta.isEsriSymbolResource,isWosr:!1}}const Tr=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
|
|
668
|
-
void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
|
|
669
|
-
`)}},47286(e,t,r){r.d(t,{G:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,n,o)=>i.setUniform2fv(e,t(n,o),r))}}},49255(e,t,r){function i(e){return 3===(t=e)||4===t||5===t||6===e||7===e;var t}function n(e){return function(e){return function(e){return o(e)||function(e){return 8===e||9===e}(e)}(e)||s(e)}(e)||2===e}function o(e){return 0===e}function s(e){return 1===e}function a(e){return s(e)||i(e)}r.d(t,{_o:()=>o,g1:()=>a,iq:()=>n,yT:()=>i})},49718(e,t,r){r(51850),r(6867).i},49788(e,t,r){r.d(t,{Q:()=>i});const i=1/255.5},51255(e,t,r){r.d(t,{D:()=>c});var i=r(49255),n=r(22911),o=r(42593),s=r(63365),a=r(31821),l=r(26934);function c(e,t){e.include(o.Q,t),e.include(n.NL,t),e.fragment.include(s.a);const{output:r,oitPass:c,hasEmission:u,discardInvisibleFragments:d,oitPremultipliedAlpha:h,snowCover:m}=t,p=9===r,f=(0,i._o)(r)&&1===c,g=(0,i._o)(r)&&2===c,v=(0,i._o)(r)&&1!==c;let _=0;(v||f)&&e.outputs.add("fragColor","vec4",_++),u&&e.outputs.add("fragEmission","vec4",_++),f&&e.outputs.add("fragAlpha","float",_++),e.fragment.include(l.Q),e.fragment.code.add(a.H`
|
|
670
|
-
void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${(0,a.If)(m,", float snow")}) {
|
|
671
|
-
${(0,a.If)(p,"finalColor.a = 1.0;")}
|
|
672
|
-
${(0,a.If)(d,"if (finalColor.a < alphaCutoff) { discard; }")}
|
|
673
|
-
|
|
674
|
-
${(0,a.If)(f,`${(0,a.If)(h,"fragColor = finalColor;","fragColor = premultiplyAlpha(finalColor);")}\n fragAlpha = finalColor.a;`)}
|
|
675
|
-
${(0,a.If)(g&&h&&d,"finalColor.rgb /= finalColor.a;")}
|
|
676
|
-
${(0,a.If)(v,"fragColor = finalColor;")}
|
|
677
|
-
${(0,a.If)(u,`fragEmission = ${(0,a.If)(m,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}`)}
|
|
678
|
-
calculateOcclusionAndOutputHighlight();
|
|
679
|
-
${(0,a.If)(p,"outputObjectAndLayerIdColor();")}
|
|
680
|
-
}
|
|
681
|
-
`)}},51406(e,t,r){r.d(t,{MU:()=>l,O1:()=>c,QM:()=>u,Sx:()=>a,q2:()=>s});var i=r(29242),n=r(31821),o=r(35644);function s(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new o.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(n.H`void forwardColorUV(){
|
|
682
|
-
colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
683
|
-
}`)):e.vertex.code.add(n.H`void forwardColorUV(){}`)}function a(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new o.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK)).code.add(n.H`void forwardNormalUV(){
|
|
684
|
-
normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
685
|
-
}`)):e.vertex.code.add(n.H`void forwardNormalUV(){}`)}function l(e,t){t.hasEmissionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("emissiveUV","vec2"),e.vertex.uniforms.add(new o.k("emissiveTextureTransformMatrix",e=>e.emissiveTextureTransformMatrix??i.zK)).code.add(n.H`void forwardEmissiveUV(){
|
|
686
|
-
emissiveUV = (emissiveTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
687
|
-
}`)):e.vertex.code.add(n.H`void forwardEmissiveUV(){}`)}function c(e,t){t.hasOcclusionTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("occlusionUV","vec2"),e.vertex.uniforms.add(new o.k("occlusionTextureTransformMatrix",e=>e.occlusionTextureTransformMatrix??i.zK)).code.add(n.H`void forwardOcclusionUV(){
|
|
688
|
-
occlusionUV = (occlusionTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
689
|
-
}`)):e.vertex.code.add(n.H`void forwardOcclusionUV(){}`)}function u(e,t){t.hasMetallicRoughnessTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("metallicRoughnessUV","vec2"),e.vertex.uniforms.add(new o.k("metallicRoughnessTextureTransformMatrix",e=>e.metallicRoughnessTextureTransformMatrix??i.zK)).code.add(n.H`void forwardMetallicRoughnessUV(){
|
|
690
|
-
metallicRoughnessUV = (metallicRoughnessTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
|
|
691
|
-
}`)):e.vertex.code.add(n.H`void forwardMetallicRoughnessUV(){}`)}},51530(e,t,r){r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>a,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const s=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(s)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),s.removeEventListener("load",r),s.removeEventListener("error",i)};s.addEventListener("load",r),s.addEventListener("error",i),s.src=o});try{s.src=o,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(o),s}},51976(e,t,r){r.d(t,{K:()=>a,W:()=>l});var i=r(49186),n=r(4576);class o{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var s=r(65786);class a extends s.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new o(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map(e=>` ${e}: ${this[e]}`).join("\n");return this._parameterBits=t,r}}function l(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const n=e.count||2,o=Math.ceil(Math.log2(n)),s=t._parameterBits;let a=0;for(;s[a]+o>16;)a++,a>=s.length&&s.push(0);const l=s[a],c=(1<<o)-1<<l;s[a]+=o,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[a]&c)>>l},set(t){const n=this._parameterBits[a];if((n&c)>>l!==t){if(this._key=null,this._parameterBits[a]=n&~c|+t<<l&c,"number"!=typeof t)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A("internal:invalid-shader-configuration",`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[a]&c)>>l)},set(e){const t=this._parameterBits[a];if(!!((t&c)>>l)!==e&&(this._key=null,this._parameterBits[a]=t&~c|+e<<l,"boolean"!=typeof e))throw new i.A("internal:invalid-shader-configurationx",`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},52540(e,t,r){r.d(t,{E:()=>a});var i=r(37585),n=r(48163),o=r(77108),s=r(31821);function a(e){e.uniforms.add(new o.E("zProjectionMap",e=>function(e){const t=e.projectionMatrix;return(0,i.hZ)(l,t[14],t[10])}(e.camera))),e.code.add(s.H`float linearizeDepth(float depth) {
|
|
692
|
-
float depthNdc = depth * 2.0 - 1.0;
|
|
693
|
-
float c1 = zProjectionMap[0];
|
|
694
|
-
float c2 = zProjectionMap[1];
|
|
695
|
-
return -(c1 / (depthNdc + c2 + 1e-7));
|
|
696
|
-
}`),e.code.add(s.H`float delinearizeDepth(float linearDepth) {
|
|
697
|
-
float c1 = zProjectionMap[0];
|
|
698
|
-
float c2 = zProjectionMap[1];
|
|
699
|
-
float depthNdc = (-c1/linearDepth) - c2 - 1e-7;
|
|
700
|
-
float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
|
|
701
|
-
return depthNonlinear01;
|
|
702
|
-
}`),e.code.add(s.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
703
|
-
ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
|
|
704
|
-
return texelFetch(depthTexture, iuv, 0).r;
|
|
705
|
-
}`),e.code.add(s.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
706
|
-
return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
707
|
-
}`)}const l=(0,n.vt)()},53466(e,t,r){r.d(t,{U:()=>n});var i=r(31821);function n(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(i.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(i.H`void forwardTextureCoordinates() {
|
|
708
|
-
vuv0 = uv0;
|
|
709
|
-
vuvRegion = uvRegion;
|
|
710
|
-
}`);default:t.textureCoordinateType;case 0:return void e.vertex.code.add(i.H`void forwardTextureCoordinates() {}`);case 3:return}}},54154(e,t,r){r.d(t,{Ge:()=>m});var i=r(78955),n=r(91829),o=r(35522),s=r(51850),a=r(33079),l=r(31821);function c(e){e.vertex.code.add(l.H`float screenSizePerspectiveViewAngleDependentFactor(float absCosAngle) {
|
|
711
|
-
return absCosAngle * absCosAngle * absCosAngle;
|
|
712
|
-
}`),e.vertex.code.add(l.H`vec3 screenSizePerspectiveScaleFactor(float absCosAngle, float distanceToCamera, vec3 params) {
|
|
713
|
-
return vec3(
|
|
714
|
-
min(params.x / (distanceToCamera - params.y), 1.0),
|
|
715
|
-
screenSizePerspectiveViewAngleDependentFactor(absCosAngle),
|
|
716
|
-
params.z
|
|
717
|
-
);
|
|
718
|
-
}`),e.vertex.code.add(l.H`float applyScreenSizePerspectiveScaleFactorFloat(float size, vec3 factor) {
|
|
719
|
-
return size * clamp(mix(factor.x, 1.0, factor.y), factor.z, 1.0);
|
|
720
|
-
}`),e.vertex.code.add(l.H`float screenSizePerspectiveScaleFloat(float size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
721
|
-
return applyScreenSizePerspectiveScaleFactorFloat(
|
|
722
|
-
size,
|
|
723
|
-
screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
|
|
724
|
-
);
|
|
725
|
-
}`),e.vertex.code.add(l.H`vec2 applyScreenSizePerspectiveScaleFactorVec2(vec2 size, vec3 factor) {
|
|
726
|
-
return size * clamp(mix(factor.x, 1.0, factor.y), factor.z, 1.0);
|
|
727
|
-
}`),e.vertex.code.add(l.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
728
|
-
return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
|
|
729
|
-
}`)}const u=(0,s.vt)();var d=r(20693),h=r(71988);function m(e,t){const r=e.vertex;t.hasVerticalOffset?(function(e){e.uniforms.add(new h.E("verticalOffset",(e,t)=>{const{minWorldLength:r,maxWorldLength:n,screenLength:o}=e.verticalOffset,s=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),a=t.camera.pixelRatio||1;return(0,i.hZ)(p,o*a,s,r,n)}))}(r),t.hasScreenSizePerspective&&(e.include(c),function(e){e.uniforms.add(new a.t("screenSizePerspectiveAlignment",e=>function(e,t){const r=null!=t&&null!=e?Math.min(e.minPixelSize/t,1):0;return e?(0,o.hZ)(u,e.divisor,e.offset,r):(0,o.hZ)(u,0,0,0)}(e.screenSizePerspectiveAlignment||e.screenSizePerspective,e.screenSizePerspectiveAlignment?null:e.screenSizePerspectiveMinPixelReferenceSize)))}(r),(0,d.yu)(e.vertex,t)),r.code.add(l.H`
|
|
730
|
-
vec3 calculateVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
731
|
-
float viewDistance = length((view * vec4(worldPos, 1.0)).xyz);
|
|
732
|
-
${t.spherical?l.H`vec3 worldNormal = normalize(worldPos + localOrigin);`:l.H`vec3 worldNormal = vec3(0.0, 0.0, 1.0);`}
|
|
733
|
-
${t.hasScreenSizePerspective?l.H`
|
|
734
|
-
float cosAngle = dot(worldNormal, normalize(worldPos - cameraPosition));
|
|
735
|
-
float verticalOffsetScreenHeight = screenSizePerspectiveScaleFloat(verticalOffset.x, abs(cosAngle), viewDistance, screenSizePerspectiveAlignment);`:l.H`
|
|
736
|
-
float verticalOffsetScreenHeight = verticalOffset.x;`}
|
|
737
|
-
// Screen sized offset in world space, used for example for line callouts
|
|
738
|
-
float worldOffset = clamp(verticalOffsetScreenHeight * verticalOffset.y * viewDistance, verticalOffset.z, verticalOffset.w);
|
|
739
|
-
return worldNormal * worldOffset;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
743
|
-
return worldPos + calculateVerticalOffset(worldPos, localOrigin);
|
|
744
|
-
}
|
|
745
|
-
`)):r.code.add(l.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const p=(0,n.vt)()},57323(e,t,r){r.d(t,{R:()=>B,b:()=>L});var i=r(32680),n=r(49255),o=r(68317),s=r(76597),a=r(24321),l=r(72722),c=r(43519),u=r(73955),d=r(71955),h=r(53466),m=r(92700),p=r(54154),f=r(9169),g=r(14527),v=r(28747),_=r(98619),x=r(22393),y=r(59469),w=r(32482),b=r(96598),M=r(986),T=r(58614),S=r(27950),C=r(20693),A=r(33079),E=r(71988),R=r(20304),I=r(31821),O=r(63761),F=r(10906),P=r(19245),D=r(26934),N=r(51255),H=r(14113);function L(e){const t=new H.N5,{attributes:r,vertex:L,fragment:B,varyings:z}=t,{output:U,offsetBackfaces:G,pbrMode:V,snowCover:j,spherical:W}=e,k=1===V||2===V;if((0,C.NB)(L,e),r.add("position","vec3"),z.add("vpos","vec3",{invariant:!0}),t.include(M.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(b.Z,e),!(0,n._o)(U))return t.include(f.E,e),t;(0,C.yu)(t.vertex,e),t.include(u.Y,e),t.include(s.d),G&&t.include(i.M),z.add("vNormalWorld","vec3"),z.add("localvpos","vec3",{invariant:!0}),t.include(h.U,e),t.include(d.K,e),t.include(a.v,e),t.include(m.c,e),L.include(c.WD),L.include(c.oF),L.uniforms.add(new E.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),z.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?w.G:w.Bz,e),L.include(D.Q),L.main.add(I.H`
|
|
746
|
-
forwardVertexColor();
|
|
747
|
-
|
|
748
|
-
MaskedColor maskedColorExt =
|
|
749
|
-
applySymbolColor(applyVVColor(applyInstanceColor(createMaskedFromNaNColor(externalColor))));
|
|
750
|
-
|
|
751
|
-
vcolorExt = maskedColorExt.color;
|
|
752
|
-
forwardColorMixMode(maskedColorExt.mask);
|
|
753
|
-
|
|
754
|
-
bool alphaCut = opacityMixMode != ${I.H.int(P.Um.ignore)} && vcolorExt.a < alphaCutoff;
|
|
755
|
-
vpos = getVertexInLocalOriginSpace();
|
|
756
|
-
|
|
757
|
-
localvpos = vpos - view[3].xyz;
|
|
758
|
-
vpos = subtractOrigin(vpos);
|
|
759
|
-
vNormalWorld = dpNormal(vvLocalNormal(normalModel()));
|
|
760
|
-
vpos = addVerticalOffset(vpos, localOrigin);
|
|
761
|
-
vec4 basePosition = transformPosition(proj, view, vpos);
|
|
762
|
-
|
|
763
|
-
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
764
|
-
forwardTextureCoordinates();
|
|
765
|
-
forwardLinearDepthToReadShadowMap();
|
|
766
|
-
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
767
|
-
${(0,I.If)(G,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
768
|
-
`);const{hasColorTexture:Z,hasColorTextureTransform:$}=e;return B.include(v.kA,e),B.include(g.n,e),t.include(T.S,e),B.include(o.HQ,e),t.include(N.D,e),(0,C.yu)(B,e),(0,_.Gc)(B),(0,v.a8)(B),(0,v.eU)(B),B.uniforms.add(L.uniforms.get("localOrigin"),L.uniforms.get("view"),new A.t("ambient",e=>e.ambient),new A.t("diffuse",e=>e.diffuse),new R.m("opacity",e=>e.opacity),new R.m("layerOpacity",e=>e.layerOpacity)),Z&&B.uniforms.add(new O.N("tex",e=>e.texture)),t.include(y._,e),B.include(x.c,e),B.include(S.N),B.include(F.b,e),(0,_.O4)(B),B.main.add(I.H`
|
|
769
|
-
discardBySlice(vpos);
|
|
770
|
-
discardByTerrainDepth();
|
|
771
|
-
vec4 texColor = ${Z?`texture(tex, ${$?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
772
|
-
${(0,I.If)(Z,`${(0,I.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
773
|
-
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
774
|
-
applyPBRFactors();
|
|
775
|
-
float ssao = evaluateAmbientOcclusionInverse();
|
|
776
|
-
ssao *= getBakedOcclusion();
|
|
777
|
-
|
|
778
|
-
float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
|
|
779
|
-
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
780
|
-
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
781
|
-
vec3 matColor = max(ambient, diffuse);
|
|
782
|
-
${e.hasVertexColors?I.H`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
783
|
-
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:I.H`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
784
|
-
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, opacityMixMode);`}
|
|
785
|
-
|
|
786
|
-
vec3 shadingNormal = normalize(vNormalWorld);
|
|
787
|
-
vec3 groundNormal = ${W?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};
|
|
788
|
-
|
|
789
|
-
${(0,I.If)(j,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = getRealisticTreeSnow(faceNormal, shadingNormal, groundNormal);\n albedo = mix(albedo, vec3(1), snow);")}
|
|
790
|
-
|
|
791
|
-
${I.H`albedo *= 1.2;
|
|
792
|
-
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
793
|
-
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
794
|
-
float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0);
|
|
795
|
-
float treeRadialFalloff = vColor.r;
|
|
796
|
-
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
797
|
-
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
798
|
-
|
|
799
|
-
${k?I.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
800
|
-
${(0,I.If)(j,"mrr = applySnowToMRR(mrr, snow);")}
|
|
801
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:I.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
802
|
-
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
803
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,I.If)(j,", 1.0")});`),t}const B=Object.freeze(Object.defineProperty({__proto__:null,build:L},Symbol.toStringTag,{value:"Module"}))},58029(e,t,r){r.d(t,{F:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat4",0,(i,n)=>i.setUniformMatrix4fv(e,t(n),r))}}},58614(e,t,r){r.d(t,{S:()=>s}),r(28421);var i=r(20304),n=r(31821),o=r(49788);function s(e,t){!function(e,t,r){const i=e.fragment,s=t.alphaDiscardMode,a=0===s;2!==s&&3!==s||i.uniforms.add(r),i.code.add(n.H`
|
|
804
|
-
void discardOrAdjustAlpha(inout vec4 color) {
|
|
805
|
-
${1===s?"color.a = 1.0;":`if (color.a < ${a?n.H.float(o.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,n.If)(2===s,"else { color.a = 1.0; }")}`}
|
|
806
|
-
}
|
|
807
|
-
`)}(e,t,new i.m("textureAlphaCutoff",e=>e.textureAlphaCutoff))}},59469(e,t,r){r.d(t,{_:()=>c});var i=r(99208),n=r(40710),o=r(33079),s=r(31821),a=r(15976),l=r(63761);function c(e,t){const r=t.pbrMode,c=e.fragment;if(2!==r&&0!==r&&1!==r)return void c.code.add(s.H`void applyPBRFactors() {}`);if(0===r)return void c.code.add(s.H`void applyPBRFactors() {}
|
|
808
|
-
float getBakedOcclusion() { return 1.0; }`);if(2===r)return void c.code.add(s.H`vec3 mrr = vec3(0.0, 0.6, 0.2);
|
|
809
|
-
float occlusion = 1.0;
|
|
810
|
-
void applyPBRFactors() {}
|
|
811
|
-
float getBakedOcclusion() { return 1.0; }`);const{hasMetallicRoughnessTexture:u,hasMetallicRoughnessTextureTransform:d,hasOcclusionTexture:h,hasOcclusionTextureTransform:m,bindType:p}=t;(u||h)&&e.include(i.r,t),c.code.add(s.H`vec3 mrr;
|
|
812
|
-
float occlusion;`),u&&c.uniforms.add(1===p?new l.N("texMetallicRoughness",e=>e.textureMetallicRoughness):new a.o("texMetallicRoughness",e=>e.textureMetallicRoughness)),h&&c.uniforms.add(1===p?new l.N("texOcclusion",e=>e.textureOcclusion):new a.o("texOcclusion",e=>e.textureOcclusion)),c.uniforms.add(1===p?new o.t("mrrFactors",e=>e.mrrFactors):new n.W("mrrFactors",e=>e.mrrFactors)),c.code.add(s.H`
|
|
813
|
-
${(0,s.If)(u,s.H`void applyMetallicRoughness(vec2 uv) {
|
|
814
|
-
vec3 metallicRoughness = textureLookup(texMetallicRoughness, uv).rgb;
|
|
815
|
-
mrr[0] *= metallicRoughness.b;
|
|
816
|
-
mrr[1] *= metallicRoughness.g;
|
|
817
|
-
}`)}
|
|
818
|
-
|
|
819
|
-
${(0,s.If)(h,"void applyOcclusion(vec2 uv) { occlusion *= textureLookup(texOcclusion, uv).r; }")}
|
|
820
|
-
|
|
821
|
-
float getBakedOcclusion() {
|
|
822
|
-
return ${h?"occlusion":"1.0"};
|
|
823
|
-
}
|
|
824
|
-
|
|
825
|
-
void applyPBRFactors() {
|
|
826
|
-
mrr = mrrFactors;
|
|
827
|
-
occlusion = 1.0;
|
|
828
|
-
|
|
829
|
-
${(0,s.If)(u,`applyMetallicRoughness(${d?"metallicRoughnessUV":"vuv0"});`)}
|
|
830
|
-
${(0,s.If)(h,`applyOcclusion(${m?"occlusionUV":"vuv0"});`)}
|
|
831
|
-
}
|
|
832
|
-
`)}(r(74810),r(65786)).Y},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,s=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,s,/^jsapps\.esri\.com$/,a,l]},62602(e,t,r){r.d(t,{r:()=>n});var i=r(31821);function n(e,t){const r=e.fragment;switch(r.code.add(i.H`struct ShadingNormalParameters {
|
|
833
|
-
vec3 normalView;
|
|
834
|
-
vec3 viewDirection;
|
|
835
|
-
} shadingParams;`),t.doubleSidedMode){case 0:r.code.add(i.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
836
|
-
return normalize(params.normalView);
|
|
837
|
-
}`);break;case 1:r.code.add(i.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
838
|
-
return dot(params.normalView, params.viewDirection) > 0.0 ? normalize(-params.normalView) : normalize(params.normalView);
|
|
839
|
-
}`);break;case 2:r.code.add(i.H`vec3 shadingNormal(ShadingNormalParameters params) {
|
|
840
|
-
return gl_FrontFacing ? normalize(params.normalView) : normalize(-params.normalView);
|
|
841
|
-
}`);break;default:t.doubleSidedMode;case 3:}}},63365(e,t,r){r.d(t,{a:()=>n});var i=r(31821);function n(e){e.code.add(i.H`vec4 premultiplyAlpha(vec4 v) {
|
|
842
|
-
return vec4(v.rgb * v.a, v.a);
|
|
843
|
-
}
|
|
844
|
-
vec3 rgb2hsv(vec3 c) {
|
|
845
|
-
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
|
|
846
|
-
vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);
|
|
847
|
-
vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);
|
|
848
|
-
float d = q.x - min(q.w, q.y);
|
|
849
|
-
float e = 1.0e-10;
|
|
850
|
-
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), min(d / (q.x + e), 1.0), q.x);
|
|
851
|
-
}
|
|
852
|
-
vec3 hsv2rgb(vec3 c) {
|
|
853
|
-
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
|
|
854
|
-
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
|
|
855
|
-
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
|
|
856
|
-
}
|
|
857
|
-
float rgb2v(vec3 c) {
|
|
858
|
-
return max(c.x, max(c.y, c.z));
|
|
859
|
-
}`)}},63761(e,t,r){r.d(t,{N:()=>n});var i=r(74333);class n extends i.n{constructor(e,t){super(e,"sampler2D",1,(r,i,n)=>r.bindTexture(e,t(i,n)))}}},63907(e,t,r){r.d(t,{$0:()=>d,CQ:()=>f,H0:()=>o,SB:()=>l,WR:()=>i,XN:()=>s,iE:()=>a,ld:()=>c,nI:()=>p,pe:()=>n,r6:()=>h,vt:()=>u,yI:()=>m});const i={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},n={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},o={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},s=Object.values(o),a={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},l={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},c={FLOAT:n.FLOAT,UNSIGNED_BYTE:n.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:n.BYTE,UNSIGNED_SHORT:n.UNSIGNED_SHORT,SHORT:n.SHORT,UNSIGNED_INT:n.UNSIGNED_INT,INT:n.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},u={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},d=0,h=36064,m=36065,p=33306,f={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},65261(e,t,r){r.d(t,{C:()=>o});var i=r(40876),n=r(31821);function o(e){e.constants.add("GAMMA","float",i.Tf).constants.add("INV_GAMMA","float",1/i.Tf).code.add(n.H`vec3 delinearizeGamma(vec3 color) {
|
|
860
|
-
return pow(color, vec3(INV_GAMMA));
|
|
861
|
-
}
|
|
862
|
-
vec4 delinearizeGamma(vec4 color) {
|
|
863
|
-
return vec4(delinearizeGamma(color.rgb), color.a);
|
|
864
|
-
}
|
|
865
|
-
vec3 linearizeGamma(vec3 color) {
|
|
866
|
-
return pow(color, vec3(GAMMA));
|
|
867
|
-
}`)}},65786(e,t,r){r.d(t,{Y:()=>i});const i=class{};new i},65806(e,t,r){r.d(t,{g:()=>s});var i=r(51850),n=r(91218),o=r(9762);function s(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return a[0]=e.x,a[1]=e.y,a[2]=e.z??0,(0,o.projectBuffer)(a,e.spatialReference,0,t,r,0);const s=(0,n.tryProject)(e,r,i);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const a=(0,i.vt)()},67171(e,t,r){r.d(t,{R:()=>o,e:()=>s});var i=r(63907),n=r(42293);class o{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function s(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.MW)(e.internalFormat))*(34067===e.target?6:1))}},68259(e,t,r){r.d(t,{t:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",2,(i,n,o,s)=>i.setUniform2fv(e,t(n,o,s),r))}}},68317(e,t,r){r.d(t,{Hz:()=>p,HQ:()=>f});var i=r(5482),n=r(58083),o=r(9093),s=r(35522),a=r(51850),l=r(51976);class c extends l.K{constructor(){super(...arguments),this.output=0,this.hasEmission=!1}}(0,i.Cg)([(0,l.W)({count:10})],c.prototype,"output",void 0),(0,i.Cg)([(0,l.W)()],c.prototype,"hasEmission",void 0);class u extends c{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}var d=r(40710),h=(r(33079),r(31821)),m=r(65786);class p extends u{constructor(){super(...arguments),this.hasSlicePlane=!1,this.hasSliceTranslatedView=!1}}function f(e,t){!function(e,t,...r){e.constants.add("groundSliceOpacity","float",.2),function(e,t,...r){t.hasSlicePlane?(e.uniforms.add(...r),e.code.add(g)):e.code.add("bool rejectBySlice(vec3 pos) { return false; }")}(e,t,...r),t.hasSlicePlane?e.code.add("\n void discardBySlice(vec3 pos) {\n if (rejectBySlice(pos)) {\n discard;\n }\n }\n\n vec4 applySliceOutline(vec4 color, vec3 pos) {\n SliceFactors factors = calculateSliceFactors(pos);\n\n factors.front /= 2.0 * fwidth(factors.front);\n factors.side0 /= 2.0 * fwidth(factors.side0);\n factors.side1 /= 2.0 * fwidth(factors.side1);\n factors.side2 /= 2.0 * fwidth(factors.side2);\n factors.side3 /= 2.0 * fwidth(factors.side3);\n\n // return after calling fwidth, to avoid aliasing caused by discontinuities in the input to fwidth\n if (sliceByFactors(factors)) {\n return color;\n }\n\n float outlineFactor = (1.0 - step(0.5, factors.front))\n * (1.0 - step(0.5, factors.side0))\n * (1.0 - step(0.5, factors.side1))\n * (1.0 - step(0.5, factors.side2))\n * (1.0 - step(0.5, factors.side3));\n\n return mix(color, vec4(vec3(0.0), color.a), outlineFactor * 0.3);\n }\n\n vec4 applySlice(vec4 color, vec3 pos) {\n return sliceEnabled() ? applySliceOutline(color, pos) : color;\n }\n "):e.code.add(h.H`void discardBySlice(vec3 pos) { }
|
|
868
|
-
vec4 applySlice(vec4 color, vec3 pos) { return color; }`)}(e,t,new d.W("slicePlaneOrigin",(e,r)=>function(e,t,r){if(null==r.slicePlane)return a.uY;const i=v(e,t,r),n=_(i,r.slicePlane),o=x(e,i,r);return null!=o?(0,s.Z0)(b,n,o):n}(t,e,r)),new d.W("slicePlaneBasis1",(e,r)=>y(t,e,r,r.slicePlane?.basis1)),new d.W("slicePlaneBasis2",(e,r)=>y(t,e,r,r.slicePlane?.basis2)))}(0,i.Cg)([(0,l.W)()],p.prototype,"hasSlicePlane",void 0),m.Y;const g=h.H`struct SliceFactors {
|
|
869
|
-
float front;
|
|
870
|
-
float side0;
|
|
871
|
-
float side1;
|
|
872
|
-
float side2;
|
|
873
|
-
float side3;
|
|
874
|
-
};
|
|
875
|
-
SliceFactors calculateSliceFactors(vec3 pos) {
|
|
876
|
-
vec3 rel = pos - slicePlaneOrigin;
|
|
877
|
-
vec3 slicePlaneNormal = -cross(slicePlaneBasis1, slicePlaneBasis2);
|
|
878
|
-
float slicePlaneW = -dot(slicePlaneNormal, slicePlaneOrigin);
|
|
879
|
-
float basis1Len2 = dot(slicePlaneBasis1, slicePlaneBasis1);
|
|
880
|
-
float basis2Len2 = dot(slicePlaneBasis2, slicePlaneBasis2);
|
|
881
|
-
float basis1Dot = dot(slicePlaneBasis1, rel);
|
|
882
|
-
float basis2Dot = dot(slicePlaneBasis2, rel);
|
|
883
|
-
return SliceFactors(
|
|
884
|
-
dot(slicePlaneNormal, pos) + slicePlaneW,
|
|
885
|
-
-basis1Dot - basis1Len2,
|
|
886
|
-
basis1Dot - basis1Len2,
|
|
887
|
-
-basis2Dot - basis2Len2,
|
|
888
|
-
basis2Dot - basis2Len2
|
|
889
|
-
);
|
|
890
|
-
}
|
|
891
|
-
bool sliceByFactors(SliceFactors factors) {
|
|
892
|
-
return factors.front < 0.0
|
|
893
|
-
&& factors.side0 < 0.0
|
|
894
|
-
&& factors.side1 < 0.0
|
|
895
|
-
&& factors.side2 < 0.0
|
|
896
|
-
&& factors.side3 < 0.0;
|
|
897
|
-
}
|
|
898
|
-
bool sliceEnabled() {
|
|
899
|
-
return dot(slicePlaneBasis1, slicePlaneBasis1) != 0.0;
|
|
900
|
-
}
|
|
901
|
-
bool rejectBySlice(vec3 pos) {
|
|
902
|
-
return sliceEnabled() && sliceByFactors(calculateSliceFactors(pos));
|
|
903
|
-
}`;function v(e,t,r){return e.instancedDoublePrecision?(0,s.hZ)(w,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):t.slicePlaneLocalOrigin}function _(e,t){return null!=e?(0,s.Re)(b,t.origin,e):t.origin}function x(e,t,r){return e.hasSliceTranslatedView?null!=t?(0,n.Tl)(T,r.camera.viewMatrix,t):r.camera.viewMatrix:null}function y(e,t,r,i){if(null==i||null==r.slicePlane)return a.uY;const n=v(e,t,r),o=_(n,r.slicePlane),l=x(e,n,r);return null!=l?((0,s.WQ)(M,i,o),(0,s.Z0)(b,o,l),(0,s.Z0)(M,M,l),(0,s.Re)(M,M,b)):i}const w=(0,a.vt)(),b=(0,a.vt)(),M=(0,a.vt)(),T=(0,o.vt)()},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>l,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>s,RS:()=>n,Ul:()=>m,lM:()=>o,qK:()=>u});var i=r(34275);const n=16;function o(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,n):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>d,LV:()=>c,fA:()=>h,oC:()=>m,vt:()=>a}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),s=r(51850);function a(e){return e?l((0,s.o8)(e.origin),(0,s.o8)(e.direction)):l((0,s.vt)(),(0,s.vt)())}function l(e,t){return{origin:e,direction:t}}function c(e,t){const r=p.get();return r.origin=e,r.direction=t,r}function u(e,t=a()){return h(e.origin,e.direction,t)}function d(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function h(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}function m(e,t,r){const i=(0,o.Om)(e.direction,(0,o.Re)(r,t,e.origin));return(0,o.WQ)(r,e.origin,(0,o.hs)(r,e.direction,i)),r}r(32114);const p=new i.I(()=>a());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,n.vt)()},71955(e,t,r){r.d(t,{K:()=>l});var i=r(43519),n=r(31821),o=r(74333);class s extends o.n{constructor(e,t){super(e,"int",1,(r,i,n)=>r.setUniform1i(e,t(i,n)))}}var a=r(19245);function l(e,t){e.varyings.add("colorMixMode","int"),e.varyings.add("opacityMixMode","int"),e.vertex.uniforms.add(new s("symbolColorMixMode",e=>a.Um[e.colorMixMode])),t.hasSymbolColors?(e.vertex.include(i.WD),e.vertex.include(i.Y1),e.vertex.include(i.ML),e.attributes.add("symbolColor","vec4"),e.vertex.code.add(n.H`
|
|
904
|
-
MaskedColor applySymbolColor(MaskedColor color) {
|
|
905
|
-
return multiplyMaskedColors(color, createMaskedFromUInt8NaNColor(${"symbolColor"}));
|
|
906
|
-
}
|
|
907
|
-
`)):e.vertex.code.add(n.H`MaskedColor applySymbolColor(MaskedColor color) {
|
|
908
|
-
return color;
|
|
909
|
-
}`),e.vertex.code.add(n.H`
|
|
910
|
-
void forwardColorMixMode(bvec4 mask) {
|
|
911
|
-
colorMixMode = mask.r ? ${n.H.int(a.Um.ignore)} : symbolColorMixMode;
|
|
912
|
-
opacityMixMode = mask.a ? ${n.H.int(a.Um.ignore)} : symbolColorMixMode;
|
|
913
|
-
}
|
|
914
|
-
`)}},71988(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec4",1,(i,n,o)=>i.setUniform4fv(e,t(n,o),r))}}},72722(e,t,r){r.d(t,{B:()=>x});var i=r(77690),n=r(29242),o=r(9093),s=r(35522),a=r(51850),l=r(26425),c=r(20693),u=r(23205),d=r(31821),h=r(35644),m=r(74333);class p extends m.n{constructor(e,t,r){super(e,"mat4",1,(i,n,o)=>i.setUniformMatrix4fv(e,t(n,o),r))}}function f(e,t){const r=e.length;for(let i=0;i<r;++i)v[0]=e[i],t[i]=v[0];return t}function g(e,t){const r=e.length;for(let i=0;i<r;++i)v[0]=e[i],v[1]=e[i]-v[0],t[i]=v[1];return t}const v=new Float32Array(2);r(65786).Y;const _=(0,n.vt)();function x(e,t){const{hasModelTransformation:r,instancedDoublePrecision:n,instanced:a,output:m,hasVertexTangents:v}=t;r&&(e.vertex.uniforms.add(new p("model",e=>e.modelTransformation??o.zK)),e.vertex.uniforms.add(new h.k("normalLocalOriginFromModel",e=>((0,i.Ge)(_,e.modelTransformation??o.zK),_)))),a&&n&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const x=e.vertex;n&&(x.include(l.u,t),x.uniforms.add(new u.d("viewOriginHi",e=>f((0,s.hZ)(y,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),y)),new u.d("viewOriginLo",e=>g((0,s.hZ)(y,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),y)))),x.code.add(d.H`
|
|
915
|
-
vec3 getVertexInLocalOriginSpace() {
|
|
916
|
-
return ${r?n?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":n?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
vec3 subtractOrigin(vec3 _pos) {
|
|
920
|
-
${n?d.H`
|
|
921
|
-
// Issue: (should be resolved now with invariant position) https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
922
|
-
vec3 originDelta = dpAdd(viewOriginHi, viewOriginLo, -instanceModelOriginHi, -instanceModelOriginLo);
|
|
923
|
-
return _pos - originDelta;`:"return vpos;"}
|
|
924
|
-
}
|
|
925
|
-
`),x.code.add(d.H`
|
|
926
|
-
vec3 dpNormal(vec4 _normal) {
|
|
927
|
-
return normalize(${r?n?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":n?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
928
|
-
}
|
|
929
|
-
`),2===m&&((0,c.S7)(x),x.code.add(d.H`
|
|
930
|
-
vec3 dpNormalView(vec4 _normal) {
|
|
931
|
-
return normalize((viewNormal * ${r?n?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":n?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
932
|
-
}
|
|
933
|
-
`)),v&&x.code.add(d.H`
|
|
934
|
-
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
935
|
-
${r?n?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":n?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
936
|
-
}`)}const y=(0,a.vt)()},72824(e,t,r){r.d(t,{Mh:()=>u,Zo:()=>d,gy:()=>h});var i=r(29242),n=r(91829),o=r(73955),s=r(33752),a=r(31821),l=r(98353),c=r(35644);function u(e,t){const{vertex:r,varyings:i}=e;switch(t.normalType){case 0:case 1:{e.include(o.Y,t),i.add("vNormalWorld","vec3"),i.add("vNormalView","vec3"),r.uniforms.add(new c.k("transformNormalViewFromGlobal",e=>e.transformNormalViewFromGlobal));const{hasModelRotationScale:n}=t;n&&r.uniforms.add(new l.h("transformNormalGlobalFromModel",e=>e.transformNormalGlobalFromModel)),r.code.add(a.H`
|
|
937
|
-
void forwardNormal() {
|
|
938
|
-
vNormalWorld = ${(0,a.If)(n,a.H`transformNormalGlobalFromModel * `)} normalModel();
|
|
939
|
-
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
940
|
-
}
|
|
941
|
-
`);break}case 2:e.vertex.code.add(a.H`void forwardNormal() {}`);break;default:t.normalType;case 3:}}class d extends s.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,i.vt)()}}class h extends s.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,i.vt)(),this.toMapSpace=(0,n.vt)()}}},73354(e,t,r){r.d(t,{a:()=>d,b:()=>a,c:()=>s,d:()=>n,e:()=>h,f:()=>u,l:()=>c,n:()=>m,t:()=>o});var i=r(40876);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,i=3,n=i){if(e.length/i!==Math.ceil(t.length/n))return e;const o=e.length/i,s=r[0],a=r[1],l=r[2],c=r[4],u=r[5],d=r[6],h=r[8],m=r[9],p=r[10],f=r[12],g=r[13],v=r[14];let _=0,x=0;for(let r=0;r<o;r++){const r=t[_],o=t[_+1],y=t[_+2];e[x]=s*r+c*o+h*y+f,e[x+1]=a*r+u*o+m*y+g,e[x+2]=l*r+d*o+p*y+v,_+=n,x+=i}return e}function s(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r,i=3,n=i){if(e.length/i!==Math.ceil(t.length/n))return;const o=e.length/i,s=r[0],a=r[1],l=r[2],c=r[3],u=r[4],d=r[5],h=r[6],m=r[7],p=r[8];let f=0,g=0;for(let r=0;r<o;r++){const r=t[f],o=t[f+1],v=t[f+2];e[g]=s*r+c*o+h*v,e[g+1]=a*r+u*o+m*v,e[g+2]=l*r+d*o+p*v,f+=n,g+=i}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let s=0,a=0;for(let l=0;l<o;l++)e[a]=r*t[s],e[a+1]=r*t[s+1],e[a+2]=r*t[s+2],s+=n,a+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,n,o=3,s=o){const a=Math.min(e.length/o,t.length/s);let l=0,c=0;const u=1/i.Tf;for(let i=0;i<a;i++)e[c]=n*(r*t[l])**u,e[c+1]=n*(r*t[l+1])**u,e[c+2]=n*(r*t[l+2])**u,l+=s,c+=o}function d(e,t,r,i=3,n=i){const o=e.length/i;if(o!==Math.ceil(t.length/n))return e;let s=0,a=0;for(let l=0;l<o;l++)e[a]=t[s]+r[0],e[a+1]=t[s+1]+r[1],e[a+2]=t[s+2]+r[2],s+=n,a+=i;return e}function h(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,s=0;for(let a=0;a<n;a++){const n=t[o],a=t[o+1],l=t[o+2],c=n*n+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[s]=t*n,e[s+1]=t*a,e[s+2]=t*l}o+=i,s+=r}}r(44208),r(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:m,normalizeView:h,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<i;e++)n[c]=s[l]>>r,n[c+1]=s[l+1]>>r,n[c+2]=s[l+2]>>r,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:n,translate:d},Symbol.toStringTag,{value:"Module"}))},73955(e,t,r){r.d(t,{Y:()=>n});var i=r(31821);function n(e,t){switch(e.fragment.code.add(i.H`vec3 screenDerivativeNormal(vec3 positionView) {
|
|
942
|
-
return normalize(cross(dFdx(positionView), dFdy(positionView)));
|
|
943
|
-
}`),t.normalType){case 1:e.attributes.add("normalCompressed","vec2"),e.vertex.code.add(i.H`vec3 decompressNormal(vec2 normal) {
|
|
944
|
-
float z = 1.0 - abs(normal.x) - abs(normal.y);
|
|
945
|
-
return vec3(normal + sign(normal) * min(z, 0.0), z);
|
|
946
|
-
}
|
|
947
|
-
vec3 normalModel() {
|
|
948
|
-
return decompressNormal(normalCompressed);
|
|
949
|
-
}`);break;case 0:e.attributes.add("normal","vec3"),e.vertex.code.add(i.H`vec3 normalModel() {
|
|
950
|
-
return normal;
|
|
951
|
-
}`);break;default:t.normalType;case 2:case 3:}}},74038(e,t,r){r.d(t,{_:()=>i});class i{constructor(e,t,r,i,n,o=!1,s=0,a=!1){this.name=e,this.count=t,this.type=r,this.offset=i,this.stride=n,this.normalized=o,this.divisor=s,this.integer=a}}},74333(e,t,r){r.d(t,{n:()=>i});class i{constructor(e,t,r,i,n=null){if(this.name=e,this.type=t,this.arraySize=n,this.bind={0:null,1:null,2:null},i)switch(r){case void 0:break;case 0:this.bind[0]=i;break;case 1:this.bind[1]=i;break;case 2:this.bind[2]=i}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}},74810(e,t,r){r.d(t,{Bt:()=>a,Jr:()=>o,SY:()=>l,mb:()=>s});var i=r(35522),n=r(51850);function o({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:o,emissiveTexture:s,emissiveFactor:a,occlusionTexture:l}){return null==e&&null==t&&null==s&&(null==a||(0,i.t2)(a,n.uY))&&null==l&&(null==o||1===o)&&(null==r||1===r)}const s=(0,n.CN)(1,1,.5),a=(0,n.CN)(0,.6,.2),l=(0,n.CN)(0,1,.2)},76284(e,t,r){r.d(t,{A:()=>T});var i=r(49186),n=r(44208),o=r(53966),s=r(97768),a=r(93637),l=r(74887),c=r(94656),u=r(63907),d=r(67171);const h=()=>o.A.getLogger("esri/views/webgl/textureUtils");function m(e){const{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&h().error("Negative dimension parameters are not allowed!");const{internalFormat:n}=e;if(n&&(p(n)||f(n))){const{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:n}=e;n&&h().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&h().error("Depth textures cannot sample mipmaps"):(9728!==i&&h().error("Depth textures without filtering must use NEAREST filtering"),r&&h().error("Depth textures without filtering cannot use compare function"))}}function p(e){return(0,a.a4)(u.SB,e)}function f(e){return(0,a.a4)(u.iE,e)}function g(e){return null!=e&&"type"in e&&"compressed"===e.type}function v(e){return null!=e&&!g(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function x(e,t,r,i=1){let n=Math.max(t,r);return 32879===e&&(n=Math.max(n,i)),Math.floor(Math.log2(n))+1}function y(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case u.ld.FLOAT:switch(e.pixelFormat){case 6408:return u.H0.RGBA32F;case 6407:return u.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case u.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return u.H0.RGBA8;case 6407:return u.H0.RGB8}}const{pixelFormat:t}=e;return e.internalFormat=34041===t?u.iE.DEPTH24_STENCIL8:6402===t?u.SB.DEPTH_COMPONENT24:t,e.internalFormat}class w extends d.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new w(e,t)}}const b=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements"),M=()=>o.A.getLogger("esri/views/webgl/Texture");class T{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=w.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return b?0:(0,d.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null,this._descriptor=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!g(e)&&this._descriptor.internalFormat&&(0,a.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!g(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,n,o,s,a=0){s||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=y(l);const{context:c,pixelFormat:u,dataType:d,target:h,isImmutable:m}=l;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");const p=c.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+n>l.width||r+o>l.height)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:f}=c;a&&(n&&o||M().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),f.pixelStorei(f.UNPACK_SKIP_ROWS,a)),v(s)?f.texSubImage2D(h,e,t,r,n,o,u,d,s):g(s)?f.compressedTexSubImage2D(h,e,t,r,n,o,l.internalFormat,s.levels[e]):f.texSubImage2D(h,e,t,r,n,o,u,d,s),a&&f.pixelStorei(f.UNPACK_SKIP_ROWS,0),c.bindTexture(p,T.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,n,o,s,a,l){l||M().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||M().error("An attempt to update an uninitialized texture!");const c=this._descriptor;c.internalFormat=y(c);const{context:u,pixelFormat:d,dataType:h,isImmutable:m,target:p}=c;if(m&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");_(p)||M().warn("Attempting to set 3D texture data on a non-3D texture");const f=u.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||n<0||t+o>c.width||r+s>c.height||n+a>c.depth)&&M().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:v}=u;if(g(l))l=l.levels[e],v.compressedTexSubImage3D(p,e,t,r,n,o,s,a,c.internalFormat,l);else{const i=l;v.texSubImage3D(p,e,t,r,n,o,s,a,d,h,i)}u.bindTexture(f,T.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,m(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);const t=this._descriptor.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,T.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,m(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,m(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),m(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=(0,s.DC)(this._compressionAbortController)}_setData(e,t){const r=this._descriptor,n=r.context?.gl;if(!n)return;(0,c.Y2)(n),this.hasWebGLTextureObject||(this._glName=n.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),m(r);const o=r.context.bindTexture(this,T.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(T.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,c.Y2)(n);const s=t??r.target,l=_(s);if(v(e))this._setDataFromTexImageSource(e,s);else{const{width:t,height:o,depth:d}=r;if(null==t||null==o)throw new i.A("texture:missing-size","Width and height must be specified!");if(l&&null==d)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=y(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,r.internalFormat,r.hasMipmap,t,o,d),g(e)){if(!function(e){return null!=e&&(0,a.a4)(u.CQ,e)}(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,s)}else this._texImage(s,0,r.internalFormat,t,o,d,e),(0,c.Y2)(n),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,c.Y2)(n),r.context.bindTexture(o,T.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_setDataFromTexImageSource(e,t){const{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=y(i);const n=_(t),{width:o,height:s,depth:a}=function(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}(e);i.width&&i.height,i.width||(i.width=o),i.height||(i.height=s),n&&i.depth,n&&(i.depth=a),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,o,s,a),this._texImage(t,0,i.internalFormat,o,s,a,e),(0,c.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,c.Y2)(r))}_setDataFromCompressedSource(e,t,r){const i=this._descriptor,{width:n,height:o,depth:s}=i,a=e.levels,l=x(r,n,o,s),c=Math.min(l,a.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,c),this._forEachMipmapLevel((e,i,n,o)=>{const s=a[Math.min(e,a.length-1)];this._compressedTexImage(r,e,t,i,n,o,s)},c)}_texStorage(e,t,r,n,o,s){const{gl:a}=this._descriptor.context;if(!function(e){return u.XN.includes(e)}(t)&&!p(t)&&!f(t))throw new i.A("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?x(e,n,o,s):1;if(_(e)){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");a.texStorage3D(e,l,t,n,o,s)}else a.texStorage2D(e,l,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,o,s,a){const l=this._descriptor.context.gl,c=_(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(c){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,n,o,s,d,h,r)}else l.texSubImage2D(e,t,0,0,n,o,d,h,r)}}else{const u=a;if(c){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,n,o,s,0,d,h,u)}else l.texImage2D(e,t,r,n,o,0,d,h,u)}}_compressedTexImage(e,t,r,n,o,s,a){const l=this._descriptor.context.gl,c=_(e);if(this._descriptor.isImmutable){if(null!=a)if(c){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,n,o,s,r,a)}else l.compressedTexSubImage2D(e,t,0,0,n,o,r,a)}else if(c){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,n,o,s,0,a)}else l.compressedTexImage2D(e,t,r,n,o,0,a)}async _compressOnWorker(e){const{width:t,height:r,context:i,flipped:n,preMultiplyAlpha:o,hasMipmap:s}=this._descriptor,a=this._descriptor.compress?.compressionTracker,c=this._descriptor.compress?.compressionCallback,{compressedTextureETC:u,compressedTextureS3TC:d}=i.capabilities;if(!T.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!u&&!d)return;this.abortCompression();const h=new AbortController;let m;this._compressionAbortController=h,a?.increment();try{e instanceof Uint8Array?m=e.buffer:(m=await createImageBitmap(e,{imageOrientation:n?"flipY":"none"}),(0,l.Te)(h));const i={data:m,width:t,height:r,needsFlip:e instanceof Uint8Array&&this.descriptor.flipped,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:o,hasMipmap:s,hasETC:!!u,hasS3TC:!!d},a=await T.compressionWorkerHandle.invoke(i,h.signal,1);if((0,l.Te)(h),a.compressedTexture&&this.hasWebGLTextureObject){const e=this.usedMemory;this._descriptor.internalFormat=a.internalFormat,this._setData(a.compressedTexture),c?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||M().error("Texture compression failed!")}finally{a?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),m instanceof ImageBitmap&&m.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:s,target:a}=this._descriptor;const l=32879===a;if(null==r||null==n||l&&null==o)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),s&&(1!==r||1!==n||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),l&&(o=Math.max(1,o>>1))}_applySamplingMode(){const e=this._descriptor,t=e.context?.gl;let r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):9984!==r&&9986!==r||(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i)}_applyWrapMode(){const e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){const e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,c.Y2)(t)}_applyAnisotropicFilteringParameters(){const e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},76597(e,t,r){r.d(t,{d:()=>o});var i=r(33120),n=r(31821);function o(e){(0,i.i$)(e),e.vertex.code.add(n.H`vec4 transformPositionWithDepth(mat4 proj, mat4 view, vec3 pos, vec2 nearFar, out float depth) {
|
|
952
|
-
vec4 eye = view * vec4(pos, 1.0);
|
|
953
|
-
depth = calculateLinearDepth(nearFar,eye.z);
|
|
954
|
-
return proj * eye;
|
|
955
|
-
}`),e.vertex.code.add(n.H`vec4 transformPosition(mat4 proj, mat4 view, vec3 pos) {
|
|
956
|
-
return proj * (view * vec4(pos, 1.0));
|
|
957
|
-
}`)}},77108(e,t,r){r.d(t,{E:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"vec2",0,(i,n)=>i.setUniform2fv(e,t(n),r))}}},77695(e,t,r){r.d(t,{J:()=>h});var i=r(29242),n=r(48163),o=r(99208),s=r(68259),a=r(47286),l=r(31821),c=r(35644),u=r(15976),d=r(63761);function h(e,t){return function(e,t){const r=e.fragment,{hasVertexTangents:h,doubleSidedMode:m,hasNormalTexture:p,textureCoordinateType:f,bindType:g,hasNormalTextureTransform:v}=t;h?(e.attributes.add("tangent","vec4"),e.varyings.add("vTangent","vec4"),2===m?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
958
|
-
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
959
|
-
vec3 tangent = normalize(gl_FrontFacing ? vTangent.xyz : -vTangent.xyz);
|
|
960
|
-
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
961
|
-
return mat3(tangent, bitangent, normal);
|
|
962
|
-
}`):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
963
|
-
float tangentHeadedness = vTangent.w;
|
|
964
|
-
vec3 tangent = normalize(vTangent.xyz);
|
|
965
|
-
vec3 bitangent = cross(normal, tangent) * tangentHeadedness;
|
|
966
|
-
return mat3(tangent, bitangent, normal);
|
|
967
|
-
}`)):r.code.add(l.H`mat3 computeTangentSpace(vec3 normal, vec3 pos, vec2 st) {
|
|
968
|
-
vec3 Q1 = dFdx(pos);
|
|
969
|
-
vec3 Q2 = dFdy(pos);
|
|
970
|
-
vec2 stx = dFdx(st);
|
|
971
|
-
vec2 sty = dFdy(st);
|
|
972
|
-
float det = stx.t * sty.s - sty.t * stx.s;
|
|
973
|
-
vec3 T = stx.t * Q2 - sty.t * Q1;
|
|
974
|
-
T = T - normal * dot(normal, T);
|
|
975
|
-
T *= inversesqrt(max(dot(T,T), 1.e-10));
|
|
976
|
-
vec3 B = sign(det) * cross(normal, T);
|
|
977
|
-
return mat3(T, B, normal);
|
|
978
|
-
}`),p&&0!==f&&(e.include(o.r,t),r.uniforms.add(1===g?new d.N("normalTexture",e=>e.textureNormal):new u.o("normalTexture",e=>e.textureNormal)),v&&(r.uniforms.add(1===g?new a.G("scale",e=>e.scale??n.Un):new s.t("scale",e=>e.scale??n.Un)),r.uniforms.add(new c.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK))),r.code.add(l.H`vec3 computeTextureNormal(mat3 tangentSpace, vec2 uv) {
|
|
979
|
-
vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),v&&r.code.add(l.H`mat3 normalRotation = mat3(normalTextureTransformMatrix[0][0]/scale[0], normalTextureTransformMatrix[0][1]/scale[1], 0.0,
|
|
980
|
-
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
981
|
-
0.0, 0.0, 0.0 );
|
|
982
|
-
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
983
|
-
}`))}(e,t)}},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c});var i=r(82799),n=r(16930),o=r(60408);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=c(e);for(const e of r)for(const r of e)r[0]+=t;return e}function c(e){return(0,o.Bi)(e)?e.rings:e.paths}},81139(e,t,r){r.d(t,{O:()=>i});class i{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new i;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}},82048(e,t,r){r.d(t,{c:()=>n});var i=r(31821);function n(e,t=!0){e.attributes.add("position","vec2"),t&&e.varyings.add("uv","vec2"),e.vertex.main.add(i.H`
|
|
984
|
-
gl_Position = vec4(position, 0.0, 1.0);
|
|
985
|
-
${t?i.H`uv = position * 0.5 + vec2(0.5);`:""}
|
|
986
|
-
`)}},82919(e,t,r){r.d(t,{DV:()=>v,C:()=>f,vt:()=>m,Qy:()=>p,ui:()=>g,ST:()=>y,bU:()=>w,pw:()=>x,m7:()=>_,c8:()=>M});var i=r(4341),n=r(58083),o=r(35522),s=r(51850),a=r(78955),l=r(91829),c=r(71351);function u(e){return e?{ray:(0,c.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,c.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>u());var d=r(27921),h=r(32114);function m(e){return e?[(0,d.vt)(e[0]),(0,d.vt)(e[1]),(0,d.vt)(e[2]),(0,d.vt)(e[3]),(0,d.vt)(e[4]),(0,d.vt)(e[5])]:[(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)()]}function p(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function f(e,t){for(let r=0;r<T;r++)(0,d.C)(e[r],t[r]);return e}function g(e,t,r,i=E){const s=(0,n.lw)(h.Rc.get(),t,e);(0,n.B8)(s,s);for(let e=0;e<S;++e){const t=(0,a.Z0)(h.Km.get(),C[e],s);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,d.Cr)(t[4],t[0],t[3],e[0]),(0,d.Cr)(t[1],t[5],t[6],e[1]),(0,d.Cr)(t[4],t[5],t[1],e[2]),(0,d.Cr)(t[3],t[2],t[6],e[3]),(0,d.Cr)(t[0],t[1],t[2],e[4]),(0,d.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<T;r++){const i=e[r];if(i[0]*t.center[0]+i[1]*t.center[1]+i[2]*t.center[2]+i[3]>=t.radius)return!1}return!0}function x(e,t){return b(e,function(e,t=u()){return(0,c.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,A.get()))}function y(e,t,r){return b(e,function(e,t,r=u()){const i=(0,o.Bw)(e.vector);return(0,c.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,A.get()))}function w(e,t){for(let r=0;r<T;r++)if((0,d.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<T;r++)if(!(0,d.$Q)(e[r],t))return!1;return!0}const M={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},T=6,S=8,C=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],A=new i.I(u),E=p()},84498(e,t,r){r.d(t,{x:()=>s});var i=r(34275),n=r(97146),o=r(63907);function s(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],s=0;for(let t=0;t<r;++t){const r=e[t+2];i[s++]=n,i[s++]=o,i[s++]=r,o=r}return i}(e)}}},85079(e,t,r){r.d(t,{Xk:()=>n,_u:()=>o});var i=r(21818);function n(e){let t=0;return(0,i.z)(new Map(e.map(({name:e,count:r})=>{const i=[e,t];return 16===r?t+=4:9===r?t+=3:++t,i})))}function o(e){const t=new Map;let r=0;return e.forEach(e=>e.forEach(({name:e,count:i})=>{t.set(e,r),16===i?r+=4:9===i?r+=3:++r})),t}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function s(){return n(1,1)}function a(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>c,vt:()=>i});const c=o(),u=s(),d=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:s,unitX:a,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"}))},89786(e,t,r){function i(e){const t=.3183098861837907;e.constants.add("PI","float",3.141592653589793),e.constants.add("LIGHT_NORMALIZATION","float",t),e.constants.add("INV_PI","float",t),e.constants.add("ONE_QUATER_PI","float",.78539816339745),e.constants.add("HALF_PI","float",1.570796326794897),e.constants.add("THREE_QUATER_PI","float",2.35619449019234),e.constants.add("TWO_PI","float",6.28318530717958),e.constants.add("PI_SQUARED","float",9.86960440108936)}r.d(t,{p:()=>i})},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},90644(e,t,r){function i(e,t,r=32774,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function n(e,t,r,i,n=32774,o=32774,s=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:n,opAlpha:o,color:{r:s[0],g:s[1],b:s[2],a:s[3]}}}r.d(t,{Ey:()=>w,RC:()=>o,T8:()=>s,Uy:()=>u,Xt:()=>c,kn:()=>d,p3:()=>n}),r(4718),i(0,771),i(1,0),i(1,1);const o=i(1,771),s=n(770,1,771,771),a=(n(0,0,768,1),{face:1029,mode:2305}),l={face:1028,mode:2305},c=e=>2===e?a:1===e?l:null,u={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function h(e){return T.intern(e)}function m(e){return C.intern(e)}function p(e){return E.intern(e)}function f(e){return I.intern(e)}function g(e){return F.intern(e)}function v(e){return D.intern(e)}function _(e){return H.intern(e)}function x(e){return B.intern(e)}function y(e){return U.intern(e)}function w(e){return V.intern(e)}class b{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function M(e){return"["+e.join(",")+"]"}const T=new b(S,e=>({__tag:"Blending",...e}));function S(e){return e?M([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const C=new b(A,e=>({__tag:"Culling",...e}));function A(e){return e?M([e.face,e.mode]):null}const E=new b(R,e=>({__tag:"PolygonOffset",...e}));function R(e){return e?M([e.factor,e.units]):null}const I=new b(O,e=>({__tag:"DepthTest",...e}));function O(e){return e?M([e.func]):null}const F=new b(P,e=>({__tag:"StencilTest",...e}));function P(e){return e?M([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const D=new b(N,e=>({__tag:"DepthWrite",...e}));function N(e){return e?M([e.zNear,e.zFar]):null}const H=new b(L,e=>({__tag:"ColorWrite",...e}));function L(e){return e?M([e.r,e.g,e.b,e.a]):null}const B=new b(z,e=>({__tag:"StencilWrite",...e}));function z(e){return e?M([e.mask]):null}const U=new b(G,e=>({__tag:"DrawBuffers",...e}));function G(e){return e?M(e.buffers):null}const V=new b(function(e){return e?M([S(e.blending),A(e.culling),R(e.polygonOffset),O(e.depthTest),P(e.stencilTest),N(e.depthWrite),L(e.colorWrite),z(e.stencilWrite),G(e.drawBuffers)]):null},e=>({blending:h(e.blending),culling:m(e.culling),polygonOffset:p(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:g(e.stencilTest),depthWrite:v(e.depthWrite),colorWrite:_(e.colorWrite),stencilWrite:x(e.stencilWrite),drawBuffers:y(e.drawBuffers)}))},92300(e,t,r){r.d(t,{V:()=>s,X:()=>o});var i=r(60408),n=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const i=(0,n.xD)(t);return e.map(e=>{const t=i.fromJSON(e);return t.spatialReference=r,t})}},92700(e,t,r){r.d(t,{c:()=>n});var i=r(31821);function n(e,t){t.hasVertexColors?(e.attributes.add("color","vec4"),e.varyings.add("vColor","vec4"),e.vertex.code.add(i.H`void forwardVertexColor() { vColor = color; }`)):e.vertex.code.add(i.H`void forwardVertexColor() {}`)}},94008(e,t,r){r.d(t,{iy:()=>m}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),s=r(35522),a=r(51850),l=r(91829),c=r(34275);var u=r(71351),d=r(44280),h=r(32114);class m{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,a.fA)(e,t,r):function(e){return t=e,(0,c.vZ)(t)&&t.length>=3||function(e){return((0,c.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,a.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,a.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new m(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,p))return!1;let{t0:r,t1:i}=p;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,p))return[];const{origin:i,direction:o}=r,{t0:l,t1:c}=p,d=e=>{const t=(0,a.vt)();return(0,s.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(l-c)<(0,n.FD)()?[d(l)]:[d(l),d(c)]}_intersect(e,t){const{origin:r,direction:i}=e,n=f;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),a=s*s-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(a<0)return!1;const l=Math.sqrt(a);return t.t0=(-s-l)/(2*o),t.t1=(-s+l)/(2*o),!0}projectPoint(e,t){const r=(0,s.Re)(h.rq.get(),e,this.center),i=(0,s.hs)(h.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=h.rq.get(),i=h.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),a=(0,d.g7)(e.origin,t);return(0,o.$0)(i,a+n,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,s=t*t+n-2*Math.cos(o)*t*i,a=Math.sqrt(s),l=s-n;if(l<=0)return.5;const c=Math.sqrt(l),u=Math.acos(c/a)-Math.asin(i/(a/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,s.Re)(h.rq.get(),e,this.center),r=(0,s.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}}new m;const p={t0:0,t1:0},f=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},94656(e,t,r){r.d(t,{Y2:()=>l,en:()=>a});var i=r(49186),n=r(44208),o=r(53966);const s=!!(0,n.A)("enable-feature:webgl-debug");function a(){return s}function l(e,t=a()){if(t){const t=function(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e);if(t){const e=(new Error).stack;o.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},95774(e,t,r){r.d(t,{S:()=>h,b:()=>d});var i=r(82048),n=r(52540),o=r(68259),s=r(20304),a=r(31821),l=r(15976),c=r(63761),u=r(14113);function d(){const e=new u.N5,t=e.fragment;return e.include(i.c),t.include(n.E),t.uniforms.add(new c.N("depthMap",e=>e.depthTexture),new l.o("tex",e=>e.colorTexture),new o.t("blurSize",e=>e.blurSize),new s.m("projScale",(e,t)=>{const r=t.camera.distance;return r>5e4?Math.max(0,e.projScale-(r-5e4)):e.projScale})),t.code.add(a.H`
|
|
987
|
-
void blurFunction(vec2 uv, float r, float center_d, float sharpness, inout float wTotal, inout float bTotal) {
|
|
988
|
-
float c = texture(tex, uv).r;
|
|
989
|
-
float d = linearDepthFromTexture(depthMap, uv);
|
|
990
|
-
|
|
991
|
-
float ddiff = d - center_d;
|
|
992
|
-
|
|
993
|
-
float w = exp(-r * r * ${a.H.float(.08)} - ddiff * ddiff * sharpness);
|
|
994
|
-
wTotal += w;
|
|
995
|
-
bTotal += w * c;
|
|
996
|
-
}
|
|
997
|
-
`),e.outputs.add("fragBlur","float"),t.main.add(a.H`
|
|
998
|
-
float b = 0.0;
|
|
999
|
-
float w_total = 0.0;
|
|
1000
|
-
|
|
1001
|
-
float center_d = linearDepthFromTexture(depthMap, uv);
|
|
1002
|
-
|
|
1003
|
-
float sharpness = -0.05 * projScale / center_d;
|
|
1004
|
-
for (int r = -${a.H.int(4)}; r <= ${a.H.int(4)}; ++r) {
|
|
1005
|
-
float rf = float(r);
|
|
1006
|
-
vec2 uvOffset = uv + rf * blurSize;
|
|
1007
|
-
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
1008
|
-
}
|
|
1009
|
-
fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},96598(e,t,r){r.d(t,{Z:()=>s});var i=r(52540),n=r(31821),o=r(12791);function s(e,{occlusionPass:t,terrainDepthTest:r,cullAboveTerrain:s}){const{vertex:a,fragment:l,varyings:c}=e;if(!r)return a.code.add("void forwardViewPosDepth(vec3 pos) {}"),void l.code.add(`${t?"bool":"void"} discardByTerrainDepth() { ${(0,n.If)(t,"return false;")}}`);c.add("viewPosDepth","float",{invariant:!0}),a.code.add("void forwardViewPosDepth(vec3 pos) {\n viewPosDepth = pos.z;\n }"),l.include(i.E),l.uniforms.add(new o.x("terrainDepthTexture",e=>e.terrainDepth?.attachment)).code.add(n.H`
|
|
1010
|
-
${t?"bool":"void"} discardByTerrainDepth() {
|
|
1011
|
-
float depth = texelFetch(terrainDepthTexture, ivec2(gl_FragCoord.xy), 0).r;
|
|
1012
|
-
float linearDepth = linearizeDepth(depth);
|
|
1013
|
-
${t?"return viewPosDepth < linearDepth && depth < 1.0;":`if(viewPosDepth ${s?">":"<="} linearDepth) discard;`}
|
|
1014
|
-
}`)}},97146(e,t,r){r.d(t,{Dg:()=>o,my:()=>s,tM:()=>u,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<i.y9)return e}else if(e.length<i.y9)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return l;if(e<i.y9)return new Array(e).fill(0);if(e>h.length){const t=Math.max(2*h.length,e);h=new Uint8Array(t)}return new Uint8Array(h.buffer,0,e)}(e.length):n?u(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=i.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=d(131072);const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){return 1===e?l:e<i.y9?Array.from(new Uint16Array(c.buffer,0,e)):e<c.length?new Uint16Array(c.buffer,0,e):(e>a.length&&(a=d(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function d(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let h=new Uint8Array(65536)},98353(e,t,r){r.d(t,{h:()=>n});var i=r(74333);class n extends i.n{constructor(e,t,r){super(e,"mat3",2,(i,n,o)=>i.setUniformMatrix3fv(e,t(n,o),r))}}},98619(e,t,r){r.d(t,{Gc:()=>o,O4:()=>s,Vt:()=>a});var i=r(23205),n=r(31821);function o(e){e.uniforms.add(new i.d("mainLightDirection",e=>e.lighting.mainLight.direction))}function s(e){e.uniforms.add(new i.d("mainLightIntensity",e=>e.lighting.mainLight.intensity))}function a(e){o(e),s(e),e.code.add(n.H`vec3 applyShading(vec3 shadingNormal, float shadow) {
|
|
1015
|
-
float dotVal = clamp(dot(shadingNormal, mainLightDirection), 0.0, 1.0);
|
|
1016
|
-
return mainLightIntensity * ((1.0 - shadow) * dotVal);
|
|
1017
|
-
}`)}},99208(e,t,r){r.d(t,{r:()=>s});var i=r(53466),n=r(31821);function o(e){e.fragment.code.add(n.H`vec4 textureAtlasLookup(sampler2D tex, vec2 textureCoordinates, vec4 atlasRegion) {
|
|
1018
|
-
vec2 atlasScale = atlasRegion.zw - atlasRegion.xy;
|
|
1019
|
-
vec2 uvAtlas = fract(textureCoordinates) * atlasScale + atlasRegion.xy;
|
|
1020
|
-
float maxdUV = 0.125;
|
|
1021
|
-
vec2 dUVdx = clamp(dFdx(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
1022
|
-
vec2 dUVdy = clamp(dFdy(textureCoordinates), -maxdUV, maxdUV) * atlasScale;
|
|
1023
|
-
return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
1024
|
-
}`)}function s(e,t){const{textureCoordinateType:r}=t;if(0===r||3===r)return;e.include(i.U,t);const s=2===r;s&&e.include(o),e.fragment.code.add(n.H`
|
|
1025
|
-
vec4 textureLookup(sampler2D tex, vec2 uv) {
|
|
1026
|
-
return ${s?"textureAtlasLookup(tex, uv, vuvRegion)":"texture(tex, uv)"};
|
|
1027
|
-
}
|
|
1028
|
-
`)}}}]);
|