@arcgis/core 5.2.0-next.100 → 5.2.0-next.102
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/applications/Components/graphicOriginUtils.d.ts +17 -0
- package/applications/Components/graphicOriginUtils.js +2 -0
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01fb22542820b7a8b848.js +1 -0
- package/assets/esri/core/workers/chunks/{4d13c1a04788e5222678.js → 03601be8b0763f82e88f.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e804bd6bb4b0ee44fa9.js → 045ff98313b06a2188b7.js} +1 -1
- package/assets/esri/core/workers/chunks/05584d8828ae7bca0fc5.js +1 -0
- package/assets/esri/core/workers/chunks/{eb222dc01344ed07719e.js → 056af594a1ef87066187.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1682e94cc714197ebb4.js → 05731c8bc8f63b388d72.js} +1 -1
- package/assets/esri/core/workers/chunks/{32aa1529e84b839d051d.js → 058d4c927486a361e633.js} +1 -1
- package/assets/esri/core/workers/chunks/{2524e2385f61a6898411.js → 06e7411c5bed0a414031.js} +1 -1
- package/assets/esri/core/workers/chunks/{de95dee8db92cf8f796f.js → 09a40fd0e462144c4640.js} +1 -1
- package/assets/esri/core/workers/chunks/0bd067a5c0bac96caeb5.js +1 -0
- package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +1 -0
- package/assets/esri/core/workers/chunks/{4237a29c4ed5f86a15c2.js → 0c63d953f2dd1d5cc03d.js} +1 -1
- package/assets/esri/core/workers/chunks/{09cd91e56c856db6e01a.js → 0c74cf91b6b5292d32b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{e934ef66d130c212c05b.js → 0cdaba3ed074c06e225f.js} +1 -1
- package/assets/esri/core/workers/chunks/{6aaefd61505027267c9b.js → 0d69a18146722f792b5b.js} +1 -1
- package/assets/esri/core/workers/chunks/{900dad076347443b3ad9.js → 0de90b1ad8118457fd5a.js} +1 -1
- package/assets/esri/core/workers/chunks/{c0e073a77484b0dfd383.js → 0e1a067ab243900d0371.js} +1 -1
- package/assets/esri/core/workers/chunks/{33041e50ea02d99480b0.js → 0ee6109e6578395a7900.js} +1 -1
- package/assets/esri/core/workers/chunks/{8da08198c29acaabda6e.js → 0f1d5faddf8ef752470b.js} +1 -1
- package/assets/esri/core/workers/chunks/0f86c8a67c87f840fd39.js +1 -0
- package/assets/esri/core/workers/chunks/{6134a2c6983792787184.js → 0ff13f7a18b0123d253e.js} +1 -1
- package/assets/esri/core/workers/chunks/10fa8fbade8ae084c307.js +1 -0
- package/assets/esri/core/workers/chunks/1559213657665c053f8e.js +1 -0
- package/assets/esri/core/workers/chunks/{9c7fc1c97125ea2a7b7e.js → 164c604c1b2f728f32f2.js} +1 -1
- package/assets/esri/core/workers/chunks/19ac6f4664f97fb3821c.js +1 -0
- package/assets/esri/core/workers/chunks/{fd4d124c5bf810d9e352.js → 1a2f51d795b803d969c9.js} +1 -1
- package/assets/esri/core/workers/chunks/1eafb214519d8fc63ccb.js +1 -0
- package/assets/esri/core/workers/chunks/2165493d36c85b7c9a04.js +1 -0
- package/assets/esri/core/workers/chunks/{52422500ca3d6cf2e596.js → 2256036d5b91fa537805.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad2b2214496e5a07db43.js → 2350f1eb70819cc06bb6.js} +1 -1
- package/assets/esri/core/workers/chunks/240bee7d0dc5e5dab826.js +1 -0
- package/assets/esri/core/workers/chunks/{822a5020afbca21df7f7.js → 25c5e1b14b184b1228a3.js} +1 -1
- package/assets/esri/core/workers/chunks/25c90092def215949db9.js +1 -0
- package/assets/esri/core/workers/chunks/{dd99bad9f91b0b62ba7c.js → 2a8168e109caa87d596f.js} +1 -1
- package/assets/esri/core/workers/chunks/{39254fdc41aaf61f23b0.js → 2b06e8507d71c4d9b5b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{839feb913d1b6138fc78.js → 2b11e15bfa319dd32218.js} +1 -1
- package/assets/esri/core/workers/chunks/2d52386d69c218e29887.js +1 -0
- package/assets/esri/core/workers/chunks/{dda269a088275c823b40.js → 307297e025eed110095f.js} +1 -1
- package/assets/esri/core/workers/chunks/{05eb064f9b543890ae24.js → 33ba86b80426ddc88186.js} +1 -1
- package/assets/esri/core/workers/chunks/349e9f3d3e3267d02988.js +1 -0
- package/assets/esri/core/workers/chunks/{79088d5c9c2e6a780929.js → 34e04b24942da2b9b87c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7659d2b2aea0dd1202d.js → 3847d6f83c8ba7863c01.js} +122 -112
- package/assets/esri/core/workers/chunks/3be33a129d3ae7dc4f06.js +1 -0
- package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +1 -0
- package/assets/esri/core/workers/chunks/{eae51e827f629ab37207.js → 3de6e54b6ed0feae1940.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fe1db0762ab3326eab4.js → 3f5094828fbae7844117.js} +1 -1
- package/assets/esri/core/workers/chunks/{e02f02040b63d9c2e654.js → 3fb3b9fd06f78ee5cee6.js} +1 -1
- package/assets/esri/core/workers/chunks/{26e33c28028bf33936fc.js → 43436c7ccc6baefc885d.js} +1 -1
- package/assets/esri/core/workers/chunks/434c5b54e89ace974cbd.js +29 -0
- package/assets/esri/core/workers/chunks/472f3b80e1f26e09114a.js +1 -0
- package/assets/esri/core/workers/chunks/{dd8d19eb6b8e955c8067.js → 477136b747e02312abc4.js} +1 -1
- package/assets/esri/core/workers/chunks/{278e4d885ab03a51ef72.js → 47866b0b8604bf05c5ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0ba081533100b021090.js → 48a53bfeef11c32dadcc.js} +1 -1
- package/assets/esri/core/workers/chunks/4a73f73f1698fad2df20.js +1 -0
- package/assets/esri/core/workers/chunks/4b0e3f83a5f2d3b0478a.js +1 -0
- package/assets/esri/core/workers/chunks/{4fbf4390c7eb0e11e3c9.js → 4b80c84fbd3d8dd90ca6.js} +1 -1
- package/assets/esri/core/workers/chunks/{a78781f79d828fc678a3.js → 4ba2276751083589570a.js} +1 -1
- package/assets/esri/core/workers/chunks/{20feca2fdd304b3e9664.js → 4c9df8ae9238454969b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{0ffb5a1275d07dcd9115.js → 4c9e9925c02db48fa177.js} +1 -1
- package/assets/esri/core/workers/chunks/{60b1af54e7fc20fd9588.js → 546213fb53fa921a3928.js} +1 -1
- package/assets/esri/core/workers/chunks/{f6aa10a709017ac815a7.js → 547a073c789fdfb78310.js} +1 -1
- package/assets/esri/core/workers/chunks/{93c1d1e7c0935242071e.js → 54bb3678570ca032f051.js} +1 -1
- package/assets/esri/core/workers/chunks/{53a6bfebf3904dd7cad9.js → 55e40d3b460bacd200e6.js} +1 -1
- package/assets/esri/core/workers/chunks/567fb6a9b72bb232306d.js +1 -0
- package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +1 -0
- package/assets/esri/core/workers/chunks/{abdcc224c8a8c72c86c4.js → 572d45353d74dcda1f09.js} +1 -1
- package/assets/esri/core/workers/chunks/{5bb8d9d887dd4211afd2.js → 573e8fa0af8711ffec45.js} +1 -1
- package/assets/esri/core/workers/chunks/{486f1a3b7269ce6c3911.js → 58528ccb7f72ae76d52b.js} +1 -1
- package/assets/esri/core/workers/chunks/{8599d2f2eb0fbb4a8bf5.js → 5c7f6721b37a4355e97a.js} +1 -1
- package/assets/esri/core/workers/chunks/{a10188c4d1904965898a.js → 5e1699d361d237bf0937.js} +1 -1
- package/assets/esri/core/workers/chunks/{aa7cb1531da1ccae8492.js → 5eb726317b6602f1e206.js} +1 -1
- package/assets/esri/core/workers/chunks/{42b5533f94ebcdc4befe.js → 5ed56ade84a0bea4a0c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb8089929ded0613d8e7.js → 6010799e05d239073de0.js} +1 -1
- package/assets/esri/core/workers/chunks/{1de1cc0ed0f169a58aff.js → 60ad12fb732d529a4018.js} +1 -1
- package/assets/esri/core/workers/chunks/6395b3ec61b6550859a4.js +1 -0
- package/assets/esri/core/workers/chunks/{0e11bee9b56a7f51b012.js → 63f7141c71f29dbe8270.js} +1 -1
- package/assets/esri/core/workers/chunks/{7bb3411a86cdd736d555.js → 665e1901ec8dc182ba7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc7ca87d3bfe8a4aec81.js → 66c46c5a7147550ea3ed.js} +1 -1
- package/assets/esri/core/workers/chunks/{762e9a15b2638475a2b4.js → 69921d068add041b5dcb.js} +1 -1
- package/assets/esri/core/workers/chunks/{486f1277fe834c0fc4c1.js → 6b5332e167c0553b1e6b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d00c25ef8a378b24378d.js → 6cf881f793fd0ec93981.js} +1 -1
- package/assets/esri/core/workers/chunks/6e6cdff4bbe1ff2f44ac.js +1 -0
- package/assets/esri/core/workers/chunks/6e75f09fb9452bd5f9fb.js +1 -0
- package/assets/esri/core/workers/chunks/{601e44839fd46e449aa8.js → 6ef372f52a6ebd9aeb4a.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a9f17781e0a3bc5106f.js → 718ed36a9f23993e1460.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1f78bb3d34f973c19de.js → 719f0012f297a9a55d70.js} +1 -1
- package/assets/esri/core/workers/chunks/7261bbdbd084b4bb44f8.js +1 -0
- package/assets/esri/core/workers/chunks/{dd26a37f061ff658c5bd.js → 727dba20e01423c6ea77.js} +1 -1
- package/assets/esri/core/workers/chunks/{db8deb37048c71884575.js → 7285a37cd5359aa4bac5.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e12e3c99b149cd7f567.js → 7ad62d16b380d80f7f3e.js} +1 -1
- package/assets/esri/core/workers/chunks/7adff63fd66fab505ae6.js +1 -0
- package/assets/esri/core/workers/chunks/7e42be27ead91a4cc0f1.js +1 -0
- package/assets/esri/core/workers/chunks/{94f62ff81cc6fb83e73f.js → 80cca2a377d51926e1a2.js} +1 -1
- package/assets/esri/core/workers/chunks/{9246e2468528650bdc7c.js → 80f16f5f15518013f7d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{eb167f9f6132a6348d2e.js → 8328f79f064a68f3c1a3.js} +1 -1
- package/assets/esri/core/workers/chunks/847781aefed049493444.js +1 -0
- package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +1 -0
- package/assets/esri/core/workers/chunks/8628c027198982baed7c.js +1 -0
- package/assets/esri/core/workers/chunks/{9d3cdfa08ef4d2805625.js → 88610ebfdf9c93ada781.js} +1 -1
- package/assets/esri/core/workers/chunks/{ed5ac1efd3cba49be756.js → 8bd187b48a4e4296e3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{862f7090ba4a56c07093.js → 8e102a2e134ce6ce0724.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c0421a4a0ee3a3c63f8.js → 8edac3bbac401c8d6ecb.js} +1 -1
- package/assets/esri/core/workers/chunks/{22c477147421e68f7f00.js → 8fb4aa967d67abb6aba9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e1c8767143f9f9d1f049.js → 93375f5f5bb754eca35f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ea77654c8964cc39b9a6.js → 956432c9d45940983bc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{b17a9853250ab626d58d.js → 96ebf76661b12128ddd5.js} +1 -1
- package/assets/esri/core/workers/chunks/98414a10f6de21107a03.js +1 -0
- package/assets/esri/core/workers/chunks/{4047208f9559e06d7102.js → 9a084a12afd6f0bbabce.js} +1 -1
- package/assets/esri/core/workers/chunks/9acaabe950319d031f2e.js +1 -0
- package/assets/esri/core/workers/chunks/{a24cecf2f775eaa69cf4.js → a10df3f51fe26d782aff.js} +1 -1
- package/assets/esri/core/workers/chunks/a34eee4c9d4c1c2b8c49.js +1 -0
- package/assets/esri/core/workers/chunks/a3f4818f4190fa92331d.js +1 -0
- package/assets/esri/core/workers/chunks/{680bef5e8237cc3bdd84.js → ac02df176f9ea94278bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{5efc66be4576c6f67064.js → b1c1b7f98ee218f52b56.js} +1 -1
- package/assets/esri/core/workers/chunks/b4e5027c121d848c3d5a.js +1 -0
- package/assets/esri/core/workers/chunks/{d86044dbcd64323ff9f2.js → b7809ef3e1dabd921339.js} +1 -1
- package/assets/esri/core/workers/chunks/b9023cc3298ee4fddea7.js +1 -0
- package/assets/esri/core/workers/chunks/{63c43ebf46964c283b4d.js → b92b7d6c1e693c97a3eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa91cece6daab2bec0e4.js → b941ec028abd44734902.js} +1 -1
- package/assets/esri/core/workers/chunks/{44ca13c874b5aa0ed5a0.js → bba3eb07a2a0065759f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f89da01b67b66a92c01.js → be3421ffb5b391bca02e.js} +1 -1
- package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +1 -0
- package/assets/esri/core/workers/chunks/{3721153202bd43c7fe0e.js → c116bd04e8910b5649d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{fbf2d90240d36f8b423f.js → c2d19bb097d074a1ef21.js} +1 -1
- package/assets/esri/core/workers/chunks/c517e732cab41093b2e0.js +1 -0
- package/assets/esri/core/workers/chunks/{b0da2b089a89d643df1e.js → c53ecbdb47952eb47516.js} +1 -1
- package/assets/esri/core/workers/chunks/{cded34b161fcc790e672.js → c582441200ee1cdf51a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{16f55c5d642a23c2547e.js → c63b0055a5008b1e5005.js} +1 -1
- package/assets/esri/core/workers/chunks/{33641947c388ce28b563.js → c6e771eff0603ece5d30.js} +1 -1
- package/assets/esri/core/workers/chunks/c7e6b5594fed5bb16691.js +1 -0
- package/assets/esri/core/workers/chunks/{d2387906b52624b4f7f1.js → c85fc0a9412e7debf166.js} +1 -1
- package/assets/esri/core/workers/chunks/cbd94998c619093b6426.js +1 -0
- package/assets/esri/core/workers/chunks/{86c3d3c7015f1cd55fac.js → ce3fb992f6c6ae7378a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{e7fdad0c07beb3614b60.js → d13cf2e8b24e978ea77c.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7f69d010f1cb32f5d37.js → d33d08cb6856cd2eb35e.js} +1 -1
- package/assets/esri/core/workers/chunks/d5defba320f2e49a377f.js +1 -0
- package/assets/esri/core/workers/chunks/{006146ad6d4a5cbf1a1f.js → d710c9d206bf46e031e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{da6134c7883531f21afe.js → d922c54ea492cc771f63.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf49a13522d61da31d8f.js → d9270f4935eb0d044db3.js} +1 -1
- package/assets/esri/core/workers/chunks/{8837fbcc0d484659b79c.js → da77257b517119578088.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ca6ecdf9bdd84fef4d5.js → deb408bee61ca192b2ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{d92540d3ffc4af980dd8.js → df79c00b5ddbef7148a0.js} +1 -1
- package/assets/esri/core/workers/chunks/e0f417992889a6c41095.js +1 -0
- package/assets/esri/core/workers/chunks/{c511af7afe08a78e2a4d.js → e18b8646c7378213b618.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7e6382ecc91c876117f.js → e26be75ae40acb7473ee.js} +1 -1
- package/assets/esri/core/workers/chunks/e4d98eaa89d2c88c5139.js +1 -0
- package/assets/esri/core/workers/chunks/e5c88090d16459f55cb8.js +1 -0
- package/assets/esri/core/workers/chunks/{cc73ac8404615dc392d2.js → e6a4cef0af9be30ffe3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{a40566a78d801b223d3d.js → ea068c797e3e462f4518.js} +1 -1
- package/assets/esri/core/workers/chunks/eab969d5c7d81f351250.js +1 -0
- package/assets/esri/core/workers/chunks/{3a9c6f58a1a065c14017.js → eaf1d38f09744b7e84f5.js} +1 -1
- package/assets/esri/core/workers/chunks/ebe7ba2557b50e18e547.js +1 -0
- package/assets/esri/core/workers/chunks/{1e3b07cf0e608431a277.js → ec5542d6ecc0622f7705.js} +1 -1
- package/assets/esri/core/workers/chunks/{0a4092578dc7578bcf76.js → f5a988bb850f7a7af143.js} +1 -1
- package/assets/esri/core/workers/chunks/{248df6fda489a9de5852.js → f5e8ccbd6b4c0a386903.js} +1 -1
- package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +1 -0
- package/assets/esri/core/workers/chunks/{000f91a18c22377f8525.js → f94170f1e8c11c861e7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{35d0a7597473d46866de.js → f9e5740b05de24ba81be.js} +1 -1
- package/assets/esri/core/workers/chunks/{10f4c5533f50c3693318.js → fa869977ac2abb063925.js} +1 -1
- package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +1 -0
- package/assets/esri/core/workers/chunks/{ab3a6ce7bc2a27b92469.js → fb6f1b562ee0983c8c6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a26916de4c105859621e.js → fd808d38ae2d475ac442.js} +1 -1
- package/assets/esri/core/workers/chunks/{d6f7aa280f1bd201d4ef.js → ff673ea8e3291d12689e.js} +1 -1
- package/chunks/GlobalIllumination.glsl.js +8 -13
- package/config.js +1 -1
- package/core/libs/gl-matrix-2/math/quat.js +1 -1
- package/kernel.js +1 -1
- package/layers/IntegratedMeshLayer.d.ts +12 -0
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/support/I3SIntegratedMeshElevationQuery.js +2 -0
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/interactive/editingTools/manipulatorUtils.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +24 -9
- package/views/3d/webgl-engine/lib/BufferObject3D.js +2 -0
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileLineQueryComputation.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/assets/esri/core/workers/chunks/014eaccf2c2d357981f0.js +0 -1
- package/assets/esri/core/workers/chunks/0a242e76bc293b0ad04b.js +0 -1
- package/assets/esri/core/workers/chunks/0e65869a5dd5a3917da7.js +0 -1
- package/assets/esri/core/workers/chunks/0f15468ffefd3e9a17b8.js +0 -29
- package/assets/esri/core/workers/chunks/16ffbe484f6cd4736f79.js +0 -1
- package/assets/esri/core/workers/chunks/24a6b28db94e07a702a4.js +0 -1
- package/assets/esri/core/workers/chunks/2bd4b536e329112591c4.js +0 -1
- package/assets/esri/core/workers/chunks/3328a65c2bf1a0cbdb9d.js +0 -1
- package/assets/esri/core/workers/chunks/34f82b4ab11ff5642555.js +0 -1
- package/assets/esri/core/workers/chunks/3a9435569ba460ff7e3d.js +0 -1
- package/assets/esri/core/workers/chunks/3dd57a07c7a28e50d76e.js +0 -1
- package/assets/esri/core/workers/chunks/428f991c14ac12ae1b2c.js +0 -1
- package/assets/esri/core/workers/chunks/4717831effb1ac6d5f5d.js +0 -1
- package/assets/esri/core/workers/chunks/4d7f6c92041d52cc8732.js +0 -1
- package/assets/esri/core/workers/chunks/545a828002fd7da86c19.js +0 -1
- package/assets/esri/core/workers/chunks/58a52adc42fbe5cd12c6.js +0 -1
- package/assets/esri/core/workers/chunks/58b93f13316196d2e97d.js +0 -1
- package/assets/esri/core/workers/chunks/58f98bd89b644cfdafae.js +0 -1
- package/assets/esri/core/workers/chunks/625a692f00357629f609.js +0 -1
- package/assets/esri/core/workers/chunks/69688d521d5ba117e31c.js +0 -1
- package/assets/esri/core/workers/chunks/6f6ae6cf7f6e30b29013.js +0 -1
- package/assets/esri/core/workers/chunks/7fd54fa2f91cdab44ab3.js +0 -1
- package/assets/esri/core/workers/chunks/862eabda80ddb9e7a332.js +0 -1
- package/assets/esri/core/workers/chunks/8b24feffd5e084af2fa9.js +0 -1
- package/assets/esri/core/workers/chunks/925f83be3c1eb4b5c6af.js +0 -1
- package/assets/esri/core/workers/chunks/97aaff86e06380a68df8.js +0 -1
- package/assets/esri/core/workers/chunks/989937c120bdd676ec1e.js +0 -1
- package/assets/esri/core/workers/chunks/9cc14a41d4a90f6d626e.js +0 -1
- package/assets/esri/core/workers/chunks/a03e7333e3328036f478.js +0 -1
- package/assets/esri/core/workers/chunks/a34cadd486e7fcc79063.js +0 -1
- package/assets/esri/core/workers/chunks/a72983c3621810d4b1af.js +0 -1
- package/assets/esri/core/workers/chunks/a88aa26a7bee1fe7aea2.js +0 -1
- package/assets/esri/core/workers/chunks/a8e9aa5461c71c88e2e5.js +0 -1
- package/assets/esri/core/workers/chunks/a8f70cece5ce2b095cdd.js +0 -1
- package/assets/esri/core/workers/chunks/abd2f8fae6b918fbdd6d.js +0 -1
- package/assets/esri/core/workers/chunks/b2e5a89aca245263901c.js +0 -1
- package/assets/esri/core/workers/chunks/b2e692f52b9f02210e10.js +0 -1
- package/assets/esri/core/workers/chunks/b5fcf4165ac72654742d.js +0 -1
- package/assets/esri/core/workers/chunks/ba77a8892cb23c7a297d.js +0 -1
- package/assets/esri/core/workers/chunks/bf357afbabaa8dec4d75.js +0 -1
- package/assets/esri/core/workers/chunks/c07d2fb9940b2c6eda9f.js +0 -1
- package/assets/esri/core/workers/chunks/d179ec37d2612d65624f.js +0 -1
- package/assets/esri/core/workers/chunks/d2865c604849ce79183f.js +0 -1
- package/assets/esri/core/workers/chunks/e5d114f2b57d2b8e2f1c.js +0 -1
- package/assets/esri/core/workers/chunks/f2cbcd1b0e77e733a8e0.js +0 -1
- package/assets/esri/core/workers/chunks/f331c24247d132589859.js +0 -1
- package/assets/esri/core/workers/chunks/f8a6d8cdcabcd1d511b6.js +0 -1
- package/assets/esri/core/workers/chunks/ffa35ecc681ec1c4739a.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,9304],{96685(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>z,constructFeatureSetFromRelationship:()=>G,constructFeatureSetFromUrl:()=>E,convertToFeatureSet:()=>$,createFeatureSetCollectionFromMap:()=>V,createFeatureSetCollectionFromService:()=>K,initialiseMetaDataCache:()=>Z});var a=r(11254);class i{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection"}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),n=r(35704),l=r(70333),o=r(48938),u=r(61454),d=r(67862),c=r(87449),y=r(11221),h=r(33325),p=r(80609),f=r(50145),m=r(4576),_=r(80200),g=r(39516),w=r(89696),F=r(18589),b=r(17126),S=r(54546),I=r(97552),T=r(7562);function v(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new c.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const a=e[r],i=[`"${a.name.replaceAll('"','""')}" ${a.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return w.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class C extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return 1e3}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,h.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?y.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,s),l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=o.includes("*")?this._layer.fields.length:o.length,d=(this.isTable()||!l?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),c=u<=50?1:u<=100?.5:u<=200?.25:.125,h=Math.max(Math.ceil(d*c),t.maxRecordCount??this._maxQueryRate());let f=this._maxQueryRate();const m=this._layer.capabilities?.query.maxRecordCount;null!=m&&m<f&&(f=m);const _=this._createQuery();if(_.where=(0,g.mA)(_.where,n),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);_.spatialRelationship=t.spatialRelationship,_.relationParameter=t.relationParameter,_.geometry=e.spatialFilter.geometry}return _.orderByFields=a,_.outFields=o,_.returnGeometry=l,_.outSpatialReference=this.spatialReference,_.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(_,h,f,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a,i){e.start=0;let s,n=null!=a?a:1/0;do{(0,c.dZ)(i),e.num=Math.max(r,Math.min(n,t)),s=await this.executeQuery(e,"execute"),e.start+=e.num,n-=s.features.length,yield*(0,m.Ho)(s.features,this._maxQueryRate())}while(n>0&&!0===s.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,i),n=this._createQuery();if(n.where=(0,g.mA)(n.where,s),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);n.spatialRelationship=t.spatialRelationship,n.relationParameter=t.relationParameter,n.geometry=e.spatialFilter.geometry}n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const l=await this.executeQuery(n,"executeForIds");if((0,c.dZ)(e.abortSignal),null==l||l.length<=0)return y.An;let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,l,o,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),(0,c.dZ)(a);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=(0,f.Dp)(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===(0,p.DA)(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??1e3,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??1e3,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();if(o.where=(0,g.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,l)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);o.spatialRelationship=t.spatialRelationship,o.relationParameter=t.relationParameter,o.geometry=e.spatialFilter.geometry}const u=new T.A;u.statisticType=s,u.onStatisticField=(0,p.YY)(n,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let d="ARCADE_STAT_RESULT";o.outStatistics=[u];const h=await this.executeQuery(o,"execute");if(!h.hasOwnProperty("features")||0===h.features.length)throw new c.dr("InvalidStatResponse");let m=!1;const _=h.fields??[];for(const e of _)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){d=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}const w=h.features[0].attributes[d];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();if(r.where=(0,g.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}return r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,p.DA)(r.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,n=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||(0,m.MJ)(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),n=!0),null==s&&(s=r.slice());const l=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t),c=this._createQuery();if(c.where=(0,g.mA)(c.where,d),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);c.spatialRelationship=t.spatialRelationship,c.relationParameter=t.relationParameter,c.geometry=e.spatialFilter.geometry}return c.orderByFields=s,c.outFields=["*"],c.outStatistics=l,c.groupByFieldsForStatistics=r,c.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryPaginated(c,o,o,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryKeysetPaginated(c,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new c.dr("NotImplemented");e.where=(0,g.mA)(a,(0,p.YY)(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if((0,c.dZ)(r),!i.hasOwnProperty("features"))throw new c.dr("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;v(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return(0,y.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){const s=new F.default({url:e,outFields:null===t?["*"]:t});return new C({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,h.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,i){const s=this._layer;if(!function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s))return[];const n=new S.A({objectIds:[e],returnMetadata:i});(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(n.attachmentTypes=a),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:n,method:"attachments"});const l=await s.queryAttachments(n);return l?.[e]?l[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let a=null;return i&&t.exifInfo&&(a=(0,d.Tg)(t.exifInfo)),new u.A(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null)}):[]}async queryRelatedFeatures(e){const t=(0,b.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,a.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)(0,y.Rn)(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new c.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,g.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?((0,y.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const e=l.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=l.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,a.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new C({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const i=await(0,a.A)(r,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,t=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var A=r(30235);const R=new FinalizationRegistry(e=>{e.abort()});class L extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){const e=new L({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t={type:"arcade",returnGeometry:this._returnGeometry,returnZ:this.hasZ,returnM:this.hasM,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:(0,g.mA)(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?(0,p.YY)(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{const r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){const r=new AbortController,a=await this._layer.source._queryStream(e,{signal:r.signal}),i=this._iterateParquetStream(a,r,t);return R.register(i,r,r),i}async*_iterateParquetStream(e,t,r){try{for(;;){const a=await this._layer.source._getStreamNextFeatures(e,{signal:t.signal});if(r.aborted&&(t.abort(),(0,c.dZ)(r)),null==a)break;(0,y.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{R.unregister(t)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();const t=(0,f.Dp)(e.stat);if("count"===t)return this._queryCount(e);const r=e.field;if(null==r)throw new c.dr("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,r,e.limit??1e3,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const a=this._createQuery();if(a.returnGeometry=!1,a.where=(0,g.mA)(a.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}const i=new T.A;i.statisticType=t,i.onStatisticField=(0,p.YY)(r,0);const s="ARCADE_STAT_RESULT";i.outStatisticFieldName=s,a.outStatistics=[i];const n=await this._layer.source.queryFeaturesJSON(a);if(n.features.length<=0)throw new c.dr("InvalidStatResponse");const l=n.features[0].attributes[s];return{calculated:!0,result:"esriFieldTypeDate"===n.fields?.find(e=>e.name===s)?.type&&null!=l?new Date(l):l}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const t=this._createQuery();if(t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const r=(0,y.rj)(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){await this._ensureLoaded();const t=this._layer.capabilities?.query;return!0===t?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();const t=this._createQuery();return t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),t.orderByFields=e.orderBy?.toOrderByFields(),t.outFields=["*"],t.outStatistics=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,0):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),t.groupByFieldsForStatistics=e.groupBy,t.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){const r=await this._layer.source.queryFeaturesJSON(t);(0,c.dZ)(e.abortSignal);for(const e of(0,m.Ho)(r.features,this._maxQueryRate()))(0,y.Rn)(e,r.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new c.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var M=r(26591);class q extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return y.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,a=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),a=!0);const i=new M.default;return i.objectIds=[this._findObjectId],i.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),i.relationshipId=this.relationship.id,i.where="1=1",i.returnGeometry=!0!==this._removeGeometry,i.outSpatialReference=this.spatialReference,i.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:a,features:async function*(){const r=await t.source.queryRelatedFeatures(i);(0,c.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,a=null,i=!1;const s=this._layer.nativeCapabilities();null!=t.orderBy&&(s.capabilities?.queryRelated.supportsOrderBy?(a=t.orderBy.toOrderByFields(),i=!0):r=!1),await this.databaseType();let n=this._maxQueryRate();const l=s.capabilities?.query.maxRecordCount;null!=l&&l<n&&(n=l);const o=new M.default;return o.relationshipId=this.relationship.id,o.objectIds=[this._findObjectId],o.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),o.where="1=1",o.orderByFields=a,o.returnGeometry=!0!==this._removeGeometry,o.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:i,features:this._queryPaginated(e,o,n,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,a,i){let s;t.num=null!=a?Math.min(a,r):r,t.start=0;do{(0,c.dZ)(i),s=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield s.features,t.start+=s.features.length,t.num=null!=a?Math.min(a-t.start,r):r}while(!0===s.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new c.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,a,i){return this._relatedLayer.queryAttachments(e,t,r,a,i)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var O=r(23732),N=r(92474),k=r(4146),j=r(99680),D=r(89160),x=r(80812);function Z(){null===O.A.applicationCache&&(O.A.applicationCache=new O.A)}async function U(e,t,r){if(O.A.applicationCache){const r=O.A.applicationCache.getLayerInfo(e);if(r){const a=await r;return new F.default({url:e,outFields:t,sourceJSON:a})}const a=new F.default({url:e,outFields:t}),i=(async()=>(await a.load(),a.sourceJSON))();if(O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,i);try{return await i,a}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return await i,a}if(null!=r){const a=r.getCachedLayerMetadata(e);if(a){const r=await a;return new F.default({url:e,outFields:t,sourceJSON:r})}const i=new F.default({url:e,outFields:t}),s=(async()=>(await i.load(),i.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,i}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new F.default({url:e,outFields:t})}async function E(e,t,r,a,i,s=null){return P(await U(e,["*"],i),t,r,a,i,s)}function P(e,t=null,r=null,a=!0,i=null,s=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,a,i,s);case"subtype-sublayer":{const l=P(e.parent,t,r,a,i,s);return new n.A({parentfeatureset:l,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new A.A({layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:s});case"parquet":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:a});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:s};return!e.url&&e.source?new A.A(n):new C(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function Q(e,t){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,a.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(a){throw t.removeCachedServiceMetadata(e,r),a}}return r}async function B(e,t,r){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await Q(e,null);if(i.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)i.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)i.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==O.A.applicationCache){const e=O.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const i=(async()=>{const r=await(0,a.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new c.dr("DataElementsNotFound")})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(r,i);try{return await i}catch(e){throw O.A.applicationCache.clearLayerInfo(r),e}}return i}(e,l);if(o){i.queryelem=o,i.queryelem?.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,a.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let a=null;if(r&&i.unVersion<8){const r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),a=await E(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await a.load(),i.unVersion>=4&&(a=new n.A({parentfeatureset:a,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:a.getFieldsIndex(),timeZone:a.dateFieldsTimeZoneDefaultUTC})}),await a.load())}return{lkp:i.lkp,associations:a,unVersion:i.unVersion,terminals:i.terminals,layerIdLookup:i.layerIdLookup,sourceIdLookup:i.sourceIdLookup}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function G(e,t,r,a=null,i=null,s=!0,n=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await E(o,a,i,s,n,l);return new q({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:a,outFields:i,includeGeometry:s,lrucache:n,interceptor:l})}class J extends i{constructor(e,t=null,r=null,a=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async listAll(){(0,N.Zm)(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,r=null){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){const a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.id===e);if(i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){const a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.id===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}}class Y extends i{constructor(e,t=null,r=null,a=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async _loadMetaData(){const e=await Q(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Y(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=await this._loadMetaData();let s=null;for(const t of i.layers??[])t.name===e&&(s=t);if(!s)for(const t of i.tables??[])t.name===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=await this._loadMetaData();let s=null;for(const t of i.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of i.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function V(e,t,r=null,a=null){return new J(e,t,r,a)}function K(e,t,r=null,a=null){return new Y(e,t,r,a)}function $(e,t,r,a,i){if(null===e)return null;if((0,s.k)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof k.A&&(0,h.eB)(e)){switch(t){case"datasource":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a)}return null}if((0,s.a4)(e)){switch(t){case"datasource":return P(e.parent,i,e.parent.outFields,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,e.parent.outFields,!0,r,a)}return null}return null}async function z(e,t,r,a,i,s,n,l=null){if(O.A.applicationCache){const o=O.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return H(await o,t,r,a,i,n,l)}if(null!=n){const o=n.getCachedPortalItem(s.url,e);if(null!=o)return await H(await o,t,r,a,i,n,l)}const o=new x.default({id:e,portal:s}).load();O.A.applicationCache?O.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=n&&n.setCachedPortalItem(s.url,e,o);try{return await H(await o,t,r,a,i,n,l)}catch(t){throw O.A.applicationCache&&O.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=n&&n.removeCachedPortalItem(s.url,e,o),t}}const W=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function H(e,t,r,a,i,s,n){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await U((0,h.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=W.has(e.type)?Promise.resolve(new j.default({data:new D.A({portalItem:e})})):k.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=W.has(e.type)?new j.default({data:new D.A({portalItem:e})}):await k.A.fromPortalItem(e)}return P(l,r,a,i,s,n)}},35704(e,t,r){r.d(t,{A:()=>o});var a=r(48938),i=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(89696);class o extends s.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof l.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:a._})).features}async query(e){let t=e.where,r=!0;null!==this._whereClauseFunction?r=!1:null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,await this._ensureLoaded();const a=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,i.dZ)(e.abortSignal),a.filterApplied&&null==this._whereClauseFunction?a:{...a,features:this._applyFilter(a.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,i.dZ)(t),null!=this._whereClause){const e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){const e=[];for(const t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,e.where));const r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>h});var a=r(48938),i=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(4576),o=r(39516),u=r(91075),d=r(18589),c=r(33143),y=r(20437);class h extends s.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:a._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return s.An;const a=this._createQuery();return a.where=(0,o.mA)(a.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,n.YY)(e.where,0)),null!=e.spatialFilter&&(a.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),a.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),a.geometry=e.spatialFilter.geometry),a.outSpatialReference=this.spatialReference,a.orderByFields=t,a.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._queryLayerFeaturesJSON(a);(0,i.dZ)(e.abortSignal);for(const e of(0,l.Ho)(t.features,this._maxQueryRate()))(0,s.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new i.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const a=e.layerDefinition.typeIdField??"",i=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)i.push(c.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let n=e.featureSet.features;if(!r){let t=!1;for(const a of e.layerDefinition.fields)if("oid"===a.type||"esriFieldTypeOID"===a.type){r=a.name,t=!0;break}if(!1===t){let t="FID",a=!0,i=0;for(;a;){let r=!0;for(const a of e.layerDefinition.fields)if(a.name===t){r=!1;break}!0===r?a=!1:(i++,t="FID"+i.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<n.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});n=s,r=t}}const l=[];for(const t of e.layerDefinition.fields)t instanceof y.A?l.push(t):l.push(y.A.fromJSON(t));let o=s;switch(o||(o=""),o){case"esriGeometryPoint":o="point";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryEnvelope":o="extent";break;case"esriGeometryMultipoint":o="multipoint";break;case"":case"esriGeometryNull":o="esriGeometryNull"}if("esriGeometryNull"!==o){const e=t.toJSON();for(const t of n)t.geometry&&t.geometry instanceof u.A==0&&(t.geometry.type=o,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(const e of n)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:n,fields:l,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:i,typeIdField:a,objectIdField:r,spatialReference:t},f="esriGeometryNull"===o||null===o;f||(p.geometryType=o);const m=new d.default(p);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new h({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,s.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},88930(e,t,r){r.d(t,{S1:()=>l,VW:()=>o,lL:()=>u,rb:()=>d,t:()=>c});var a=r(97770),i=(r(98623),r(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function l(e,t,r,s="system"){if("unknown"===r)return e;const n=new i.oh((0,a.wj)(s)),l=i.c9.fromJSDate(e,{zone:n}),o="decades"===r||"centuries"===r?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[o]:t}).toJSDate()}function o(e,t,r="milliseconds"){const a=e.getTime(),i=c(t,r,"milliseconds");return new Date(a+i)}function u(e,t,r="system"){const{unit:s}=t,n=Math.max(1,Math.trunc(t.value)),l=new i.oh((0,a.wj)(r)),o=i.c9.fromJSDate(e,{zone:l}),u=e=>e-e%n;switch(s){case"milliseconds":return o.startOf("second").plus({millisecond:u(o.millisecond)}).toJSDate();case"seconds":return o.startOf("minute").plus({second:u(o.second)}).toJSDate();case"minutes":return o.startOf("hour").plus({minute:u(o.minute)}).toJSDate();case"hours":return o.startOf("day").plus({hour:u(o.hour)}).toJSDate();case"days":return o.startOf("month").plus({day:u(o.day-1)}).toJSDate();case"weeks":{const e=o.startOf("year").startOf("week"),t=Math.floor(o.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return o.startOf("year").plus({month:u(o.month-1)}).toJSDate();case"years":case"decades":case"centuries":{const e=o.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*n,r=e.year-e.year%t;return e.set({year:r}).toJSDate()}case"unknown":return e}}function d(e){const t=s.exec(e);if(!t)return null;const{hh:r,mm:a,ss:i,ms:l}=t.groups;return Number(r)*n.hours+Number(a)*n.minutes+Number(i||0)*n.seconds+Number(l||0)}function c(e,t,r){return 0===e?0:e*n[t]/n[r]}},4146(e,t,r){r.d(t,{A:()=>g});var a=r(32198),i=r(11254),s=r(49186),n=r(65529),l=r(4902),o=r(92474),u=r(53966),d=r(17676),c=r(84952),y=r(91429),h=r(5443),p=r(16930),f=r(92602),m=r(79677);let _=0,g=class extends((0,n.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,p.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=p.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(()=>r(27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:a}=await Promise.all([r.e(9917),r.e(812),r.e(8559)]).then(()=>r(45613));try{return await a(t)}catch(e){const r=t?.portalItem,a=r?.id||"unset",i=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+a+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,d.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,a.Cg)([(0,y.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,a.Cg)([(0,y.MZ)({type:h.A})],g.prototype,"fullExtent",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,a.Cg)([(0,y.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,a.Cg)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,a.Cg)([(0,y.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,a.Cg)([(0,y.MZ)({type:p.A})],g.prototype,"spatialReference",void 0),(0,a.Cg)([(0,y.MZ)({type:String})],g.prototype,"title",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,a.Cg)([(0,y.MZ)()],g.prototype,"url",void 0),(0,a.Cg)([(0,y.MZ)({type:m.A})],g.prototype,"visibilityTimeExtent",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,a.Cg)([(0,y.$K)("esri.layers.Layer")],g)},52136(e,t,r){var a=r(32198),i=r(91429);r.d(t,["p",0,e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,a.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,a.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},28032(e,t,r){r.d(t,{A:()=>o});var a=r(32198),i=r(69540),s=r(25482),n=r(91429),l=r(56400);let o=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,a.Cg)([(0,n.MZ)()],o.prototype,"creatorField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"creationDateField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"editorField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"editDateField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"realm",void 0),(0,a.Cg)([(0,n.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],o.prototype,"timeZone",void 0),o=(0,a.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],o)},33143(e,t,r){r.d(t,{A:()=>c});var a=r(32198),i=r(69540),s=r(25482),n=r(91429),l=r(8631),o=r(29005),u=r(36005),d=r(43937);let c=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,a.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,a.Cg)([(0,d.K)("domains")],c.prototype,"writeDomains",null),(0,a.Cg)([(0,n.MZ)({type:[o.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,a.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],c)},37352(e,t,r){r.d(t,{A:()=>o});var a,i=r(32198),s=r(7762),n=r(25482),l=r(91429);let o=a=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new a({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],o.prototype,"floorField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllLevelIds",void 0),o=a=(0,i.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],o)},45067(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),s=r(66552),n=r(25482),l=r(91429);const o=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,i.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,a.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],d.prototype,"cardinality",void 0),(0,a.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,a.Cg)([(0,l.$K)("esri.layers.support.Relationship")],d)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>s});var a=r(34727),i=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:a}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],c(a));return t}(e);if(s&&((0,a.gg)(t,s[0])||(0,a.ZH)(r,s[1])))return"";const n=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const i=d(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,a.ZH)(i,t)||(0,a.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,a.ZH)(d(i.minScale),c(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const a of e.filters)o(a.minScale,a.maxScale,t,r)&&(yield a)}}function o(e,t,r,i){return e=d(e),r=d(r),t=c(t),!(!(0,a.Sp)(r,e)&&(i??r)>e||(0,a.Hx)(t,r)||void 0!==i&&(0,a.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>q,tk:()=>C,BR:()=>v,p2:()=>I,qd:()=>A,wI:()=>T,G$:()=>L,$x:()=>R,Ov:()=>w,cM:()=>y,UC:()=>h,Qz:()=>p,OP:()=>M,TU:()=>g,F2:()=>f,XX:()=>_,Qi:()=>F,jy:()=>b});var a=r(70333),i=r(11254),s=r(7762),n=(r(84952),r(36563)),l=r(36708),o=r(4146);const u=new WeakMap;function d(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof o.A)&&("catalog-dynamic-group"===t.type||d(t))},t=>u.set(e,t),l.pc),(0,n.hA)(()=>u.delete(e))]),u.get(e))}function c(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function y(e){return c(e,"knowledge-graph")&&"layers"in e}function h(e){return c(e,"knowledge-graph-sublayer")}function p(e){return c(e,"link-chart")&&"layers"in e}function f(e){return c(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const _={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function F(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function b(e){return function(e){return c(e,"catalog-footprint")}(e)||function(e){return c(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return c(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function S(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!b(e))return;const r=t?.graphic,a="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&a?S(a)?a:null:void 0}return e}return t?.checkFeatureReduction&&a?S(a)?a:null:e}async function T(e,t){const r=a.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const n=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,i.A)(n,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function v(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function C(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){const t=new s.A;for(const r of e.allLayers.concat(e.allTables))d(r)||m(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function R(e,t){return null}function L(e){return null}function M(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function q(e,t){if(!t||!M(e))return;const r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){const a=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});r.d(t,["j",0,a])},10536(e,t,r){function a(e){const t={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=a(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>a})},17126(e,t,r){r.d(t,{dw:()=>n,qD:()=>l,qW:()=>o});var a=r(11254),i=r(21325),s=r(10536);function n(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,i.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const a=await u(e,t,r),i=a.data,s=i.geometryType,n=i.spatialReference,l={};for(const e of i.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:n,hasZ:!!i.hasZ,hasM:!!i.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...a,data:l}}async function o(e,t,r){const a=await u(e,t,r,{returnCountOnly:!0}),i=a.data,s={};for(const e of i.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...a,data:s}}async function u(e,t,r={},i){const l=(0,s.z)({...e.query,f:"json",...i,...n(t,i)});return(0,a.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},16215(e,t,r){r.d(t,{S:()=>i});const a=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&a in e}r.d(t,["Y",0,a])},79677(e,t,r){r.d(t,{A:()=>c});var a,i=r(32198),s=r(25482),n=r(88930),l=r(91429),o=(r(98623),r(10184)),u=r(36005),d=r(43937);let c=class extends s.o{static{a=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new a({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(a.allTime)}get isEmpty(){return this.equals(a.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new a({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,a=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===a&&r===i}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,n.lL)(r,new o.A({value:1,unit:e}),t));let i=this.end;if(i){const r=(0,n.lL)(i,new o.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,n.S1)(r,1,e,t)}return new a({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return a.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let n,l;return i>=t&&i<=r?n=i:t>=i&&t<=s&&(n=t),r>=i&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==n||null==l||isNaN(n)||isNaN(l)?a.empty:new a({start:n===-1/0?null:new Date(n),end:l===1/0?null:new Date(l)})}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new a,{start:s,end:l}=this;return null!=s&&(i.start=(0,n.S1)(s,e,t,r)),null!=l&&(i.end=(0,n.S1)(l,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new a({start:t,end:r})}};(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i.Cg)([(0,u.w)("end")],c.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],c.prototype,"writeEnd",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i.Cg)([(0,u.w)("start")],c.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],c.prototype,"writeStart",null),c=a=(0,i.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const y=new c,h=new c({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),s=r(25482),n=r(88930),l=r(91429),o=r(73133),u=r(93223);let d=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,a.Cg)([(0,u.e)(o.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,a.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,a.Cg)([(0,l.$K)("esri.time.TimeInterval")],d)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1560,9304],{96685(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>z,constructFeatureSetFromRelationship:()=>G,constructFeatureSetFromUrl:()=>E,convertToFeatureSet:()=>$,createFeatureSetCollectionFromMap:()=>V,createFeatureSetCollectionFromService:()=>K,initialiseMetaDataCache:()=>Z});var a=r(56507);class i{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection"}castToText(e=!1){return"object, FeatureSetCollection"}}var s=r(78878),n=r(35704),l=r(70333),o=r(48938),u=r(61454),d=r(67862),c=r(87449),y=r(11221),h=r(33325),p=r(80609),f=r(50145),m=r(4576),_=r(80200),g=r(39516),w=r(89696),F=r(18589),b=r(17126),S=r(54546),I=r(97552),T=r(7562);function v(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new c.dr("NeverReach");const t=[];for(let r=0;r<e.length;r++){const a=e[r],i=[`"${a.name.replaceAll('"','""')}" ${a.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){const r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}const r=t.join(" OR ");return w.A.create(r)}(e.keyFields));for(let r=0;r<e.keyFields.length;r++){const a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class C extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return 1e3}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,h.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?y.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){const t=this._layer.capabilities.query;let r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);const s=await this.databaseType(),n=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,s),l=!0!==this._removeGeometry,o=this._overrideFields??this._fieldsIncludingObjectId(["*"]),u=o.includes("*")?this._layer.fields.length:o.length,d=(this.isTable()||!l?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),c=u<=50?1:u<=100?.5:u<=200?.25:.125,h=Math.max(Math.ceil(d*c),t.maxRecordCount??this._maxQueryRate());let f=this._maxQueryRate();const m=this._layer.capabilities?.query.maxRecordCount;null!=m&&m<f&&(f=m);const _=this._createQuery();if(_.where=(0,g.mA)(_.where,n),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);_.spatialRelationship=t.spatialRelationship,_.relationParameter=t.relationParameter,_.geometry=e.spatialFilter.geometry}return _.orderByFields=a,_.outFields=o,_.returnGeometry=l,_.outSpatialReference=this.spatialReference,_.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(_,h,f,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a,i){e.start=0;let s,n=null!=a?a:1/0;do{(0,c.dZ)(i),e.num=Math.max(r,Math.min(n,t)),s=await this.executeQuery(e,"execute"),e.start+=e.num,n-=s.features.length,yield*(0,m.Ho)(s.features,this._maxQueryRate())}while(n>0&&!0===s.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);const i=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,i),n=this._createQuery();if(n.where=(0,g.mA)(n.where,s),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);n.spatialRelationship=t.spatialRelationship,n.relationParameter=t.relationParameter,n.geometry=e.spatialFilter.geometry}n.orderByFields=r,n.outSpatialReference=this.spatialReference,n.num=t?e.limit:null;const l=await this.executeQuery(n,"executeForIds");if((0,c.dZ)(e.abortSignal),null==l||l.length<=0)return y.An;let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=this._createQuery();return n.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),n.returnGeometry=!0!==this._removeGeometry,n.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,l,o,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r){e.objectIds=t.slice(i,i+r),(0,c.dZ)(a);const s=await this.executeQuery(e,"execute");yield s.features}}async queryStat(e){await this._ensureLoaded();const t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,s=(0,f.Dp)(e.stat);if("count"===s)return i?this._queryCount(e):{calculated:!1};const n=e.field;if(null==n)return{calculated:!1};if(!1===a||!1===(0,p.DA)(n)&&!1===r||!1===n.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,n,e.limit??1e3,e.abortSignal);if("distinct"===s)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(s,n,e.limit??1e3,e.abortSignal):{calculated:!1};const l=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const o=this._createQuery();if(o.where=(0,g.mA)(o.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,l)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);o.spatialRelationship=t.spatialRelationship,o.relationParameter=t.relationParameter,o.geometry=e.spatialFilter.geometry}const u=new T.A;u.statisticType=s,u.onStatisticField=(0,p.YY)(n,l),u.outStatisticFieldName="ARCADE_STAT_RESULT",o.returnGeometry=!1;let d="ARCADE_STAT_RESULT";o.outStatistics=[u];const h=await this.executeQuery(o,"execute");if(!h.hasOwnProperty("features")||0===h.features.length)throw new c.dr("InvalidStatResponse");let m=!1;const _=h.fields??[];for(const e of _)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){d=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}const w=h.features[0].attributes[d];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){const t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const r=this._createQuery();if(r.where=(0,g.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t)),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}return r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1;const r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(const r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,p.DA)(r.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=await this.databaseType(),r=e.groupBy,a=e.orderBy;let i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let s=null,n=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||(0,m.MJ)(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(s=a.toOrderByFields(),n=!0),null==s&&(s=r.slice());const l=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,t):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()}));let o=this._maxQueryRate();const u=this._layer.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t),c=this._createQuery();if(c.where=(0,g.mA)(c.where,d),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);c.spatialRelationship=t.spatialRelationship,c.relationParameter=t.relationParameter,c.geometry=e.spatialFilter.geometry}return c.orderByFields=s,c.outFields=["*"],c.outStatistics=l,c.groupByFieldsForStatistics=r,c.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryPaginated(c,o,o,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:n,features:this._queryKeysetPaginated(c,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){const a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new c.dr("NotImplemented");e.where=(0,g.mA)(a,(0,p.YY)(t.clause,await this.databaseType()))}const i=await this.executeQuery(e,"execute");if((0,c.dZ)(r),!i.hasOwnProperty("features"))throw new c.dr("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;v(t,i.features.at(-1))}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const r="execute"===t?async e=>{const t=await this._layer.source.queryFeaturesJSON(e);return(0,y.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let a=null;if(this._recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){const s=new F.default({url:e,outFields:null===t?["*"]:t});return new C({layer:s,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,h.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,i){const s=this._layer;if(!function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(s))return[];const n=new S.A({objectIds:[e],returnMetadata:i});(t&&t>0||r&&r>0)&&(n.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(n.attachmentTypes=a),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:s,query:n,method:"attachments"});const l=await s.queryAttachments(n);return l?.[e]?l[e].map(t=>{const r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`;let a=null;return i&&t.exifInfo&&(a=(0,d.Tg)(t.exifInfo)),new u.A(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null)}):[]}async queryRelatedFeatures(e){const t=(0,b.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const r=await(0,a.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){const e={},t=r.data;if(t?.relatedRecordGroups){const r=t.spatialReference,a=!0===t.exceededTransferLimit;for(const i of t.relatedRecordGroups)(0,y.Rn)(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new c.dr("InvalidRequest")}async getFeatureByObjectId(e,t){const r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,g.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});const a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?((0,y.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();const e=l.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=l.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url;const r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{const e=await(0,a.A)(t,{query:{f:"json"}});let r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){const e=new C({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const r=this._layer.parsedUrl?.path??null;if(r){const i=await(0,a.A)(r,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,t=i?.data?.serviceItemId??null}const i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var A=r(30235);const R=new FinalizationRegistry(e=>{e.abort()});class L extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{const e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){const e=new L({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return y.An;const t={type:"arcade",returnGeometry:this._returnGeometry,returnZ:this.hasZ,returnM:this.hasM,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:(0,g.mA)(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?(0,p.YY)(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{const r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){const r=new AbortController,a=await this._layer.source._queryStream(e,{signal:r.signal}),i=this._iterateParquetStream(a,r,t);return R.register(i,r,r),i}async*_iterateParquetStream(e,t,r){try{for(;;){const a=await this._layer.source._getStreamNextFeatures(e,{signal:t.signal});if(r.aborted&&(t.abort(),(0,c.dZ)(r)),null==a)break;(0,y.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{R.unregister(t)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();const t=(0,f.Dp)(e.stat);if("count"===t)return this._queryCount(e);const r=e.field;if(null==r)throw new c.dr("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,r,e.limit??1e3,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};const a=this._createQuery();if(a.returnGeometry=!1,a.where=(0,g.mA)(a.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const t=(0,y.rj)(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}const i=new T.A;i.statisticType=t,i.onStatisticField=(0,p.YY)(r,0);const s="ARCADE_STAT_RESULT";i.outStatisticFieldName=s,a.outStatistics=[i];const n=await this._layer.source.queryFeaturesJSON(a);if(n.features.length<=0)throw new c.dr("InvalidStatResponse");const l=n.features[0].attributes[s];return{calculated:!0,result:"esriFieldTypeDate"===n.fields?.find(e=>e.name===s)?.type&&null!=l?new Date(l):l}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};const t=this._createQuery();if(t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){const r=(0,y.rj)(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){await this._ensureLoaded();const t=this._layer.capabilities?.query;return!0===t?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();const t=this._createQuery();return t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),t.orderByFields=e.orderBy?.toOrderByFields(),t.outFields=["*"],t.outStatistics=e.statistics.map(e=>new T.A({onStatisticField:null!==e.workingexpr?(0,p.YY)(e.workingexpr,0):"",outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),t.groupByFieldsForStatistics=e.groupBy,t.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){const r=await this._layer.source.queryFeaturesJSON(t);(0,c.dZ)(e.abortSignal);for(const e of(0,m.Ho)(r.features,this._maxQueryRate()))(0,y.Rn)(e,r.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new c.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return null}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var M=r(26591);class q extends y.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:o._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return y.An;const t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return y.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,a=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),a=!0);const i=new M.default;return i.objectIds=[this._findObjectId],i.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),i.relationshipId=this.relationship.id,i.where="1=1",i.returnGeometry=!0!==this._removeGeometry,i.outSpatialReference=this.spatialReference,i.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:a,features:async function*(){const r=await t.source.queryRelatedFeatures(i);(0,c.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,a=null,i=!1;const s=this._layer.nativeCapabilities();null!=t.orderBy&&(s.capabilities?.queryRelated.supportsOrderBy?(a=t.orderBy.toOrderByFields(),i=!0):r=!1),await this.databaseType();let n=this._maxQueryRate();const l=s.capabilities?.query.maxRecordCount;null!=l&&l<n&&(n=l);const o=new M.default;return o.relationshipId=this.relationship.id,o.objectIds=[this._findObjectId],o.outFields=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]),o.where="1=1",o.orderByFields=a,o.returnGeometry=!0!==this._removeGeometry,o.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:i,features:this._queryPaginated(e,o,n,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,a,i){let s;t.num=null!=a?Math.min(a,r):r,t.start=0;do{(0,c.dZ)(i),s=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield s.features,t.start+=s.features.length,t.num=null!=a?Math.min(a-t.start,r):r}while(!0===s.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new c.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let r=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,a,i){return this._relatedLayer.queryAttachments(e,t,r,a,i)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var O=r(23732),N=r(92474),k=r(4146),j=r(99680),D=r(89160),x=r(80812);function Z(){null===O.A.applicationCache&&(O.A.applicationCache=new O.A)}async function U(e,t,r){if(O.A.applicationCache){const r=O.A.applicationCache.getLayerInfo(e);if(r){const a=await r;return new F.default({url:e,outFields:t,sourceJSON:a})}const a=new F.default({url:e,outFields:t}),i=(async()=>(await a.load(),a.sourceJSON))();if(O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,i);try{return await i,a}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return await i,a}if(null!=r){const a=r.getCachedLayerMetadata(e);if(a){const r=await a;return new F.default({url:e,outFields:t,sourceJSON:r})}const i=new F.default({url:e,outFields:t}),s=(async()=>(await i.load(),i.sourceJSON))();r.setCachedLayerMetadata(e,s);try{return await s,i}catch(t){throw r.removeCachedLayerMetadata(e,s),t}}return new F.default({url:e,outFields:t})}async function E(e,t,r,a,i,s=null){return P(await U(e,["*"],i),t,r,a,i,s)}function P(e,t=null,r=null,a=!0,i=null,s=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,a,i,s);case"subtype-sublayer":{const l=P(e.parent,t,r,a,i,s);return new n.A({parentfeatureset:l,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:l.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new A.A({layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:s});case"parquet":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:a});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const n={layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:s};return!e.url&&e.source?new A.A(n):new C(n)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function Q(e,t){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const r=t.getCachedServiceMetadata(e);if(null!=r)return r}const r=(async()=>{const t=await(0,a.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(a){throw t.removeCachedServiceMetadata(e,r),a}}return r}async function B(e,t,r){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},s=await Q(e,null);if(i.metadata=s,void 0!==s.controllerDatasetLayers?.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)i.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)i.layerNameLkp[e.id]=e.name;const l=s.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=l;const o=await async function(e,t){const r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==O.A.applicationCache){const e=O.A.applicationCache.getLayerInfo(r);if(null!==e)return e}const i=(async()=>{const r=await(0,a.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){const e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new c.dr("DataElementsNotFound")})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(r,i);try{return await i}catch(e){throw O.A.applicationCache.clearLayerInfo(r),e}}return i}(e,l);if(o){i.queryelem=o,i.queryelem?.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==O.A.applicationCache){const t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,a.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+l);if(void 0!==s.systemLayers?.associationsTableId&&null!==s.systemLayers.associationsTableId){let a=null;if(r&&i.unVersion<8){const r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),a=await E(e+"/"+s.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await a.load(),i.unVersion>=4&&(a=new n.A({parentfeatureset:a,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:a.getFieldsIndex(),timeZone:a.dateFieldsTimeZoneDefaultUTC})}),await a.load())}return{lkp:i.lkp,associations:a,unVersion:i.unVersion,terminals:i.terminals,layerIdLookup:i.layerIdLookup,sourceIdLookup:i.sourceIdLookup}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function G(e,t,r,a=null,i=null,s=!0,n=null,l=null){let o=e.serviceUrl();if(!o)return null;o=o.endsWith("/")?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await E(o,a,i,s,n,l);return new q({layer:e,relatedLayer:u,relationship:t,objectId:r,spatialReference:a,outFields:i,includeGeometry:s,lrucache:n,interceptor:l})}class J extends i{constructor(e,t=null,r=null,a=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){const a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async listAll(){(0,N.Zm)(this._map)&&!this._map.loaded&&await this._map.load();const e=this._map.allLayers.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>(0,h.eB)(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,r=null){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){const a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.title===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,N.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=this._map.allLayers.find(t=>(0,h.eB)(t)&&t.id===e);if(i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){const a=this._map.allTables.find(t=>(0,h.eB)(t)&&t.id===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}}class Y extends i{constructor(e,t=null,r=null,a=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){const a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async _loadMetaData(){const e=await Q(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Y(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){const e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=await this._loadMetaData();let s=null;for(const t of i.layers??[])t.name===e&&(s=t);if(!s)for(const t of i.tables??[])t.name===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();const a=JSON.stringify(r);e=null!=e?e.toString():"";for(let r=0;r<this._instantLayers.length;r++){const i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}const i=await this._loadMetaData();let s=null;for(const t of i.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(!s)for(const t of i.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(s=t);if(s){const e=await U(this._url+"/"+s.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function V(e,t,r=null,a=null){return new J(e,t,r,a)}function K(e,t,r=null,a=null){return new Y(e,t,r,a)}function $(e,t,r,a,i){if(null===e)return null;if((0,s.k)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof k.A&&(0,h.eB)(e)){switch(t){case"datasource":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a)}return null}if((0,s.a4)(e)){switch(t){case"datasource":return P(e.parent,i,e.parent.outFields,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,e.parent.outFields,!0,r,a)}return null}return null}async function z(e,t,r,a,i,s,n,l=null){if(O.A.applicationCache){const o=O.A.applicationCache.getLayerInfo(e+":"+s.url);if(o)return H(await o,t,r,a,i,n,l)}if(null!=n){const o=n.getCachedPortalItem(s.url,e);if(null!=o)return await H(await o,t,r,a,i,n,l)}const o=new x.default({id:e,portal:s}).load();O.A.applicationCache?O.A.applicationCache.setLayerInfo(e+":"+s.url,o):null!=n&&n.setCachedPortalItem(s.url,e,o);try{return await H(await o,t,r,a,i,n,l)}catch(t){throw O.A.applicationCache&&O.A.applicationCache.clearLayerInfo(e+":"+s.url),null!=n&&n.removeCachedPortalItem(s.url,e,o),t}}const W=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function H(e,t,r,a,i,s,n){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await U((0,h.Qi)(e.url??"")+"/"+t,["*"],s);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=s){const t=s.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=W.has(e.type)?Promise.resolve(new j.default({data:new D.A({portalItem:e})})):k.A.fromPortalItem(e);s.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(r){throw s.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else l=W.has(e.type)?new j.default({data:new D.A({portalItem:e})}):await k.A.fromPortalItem(e)}return P(l,r,a,i,s,n)}},35704(e,t,r){r.d(t,{A:()=>o});var a=r(48938),i=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(89696);class o extends s.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof l.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:a._})).features}async query(e){let t=e.where,r=!0;null!==this._whereClauseFunction?r=!1:null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,await this._ensureLoaded();const a=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,i.dZ)(e.abortSignal),a.filterApplied&&null==this._whereClauseFunction?a:{...a,features:this._applyFilter(a.features,e.abortSignal)}}async*_applyFilter(e,t){for await(const r of e)if((0,i.dZ)(t),null!=this._whereClause){const e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){const e=[];for(const t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,e.where));const r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null!=t?null!==this._whereClause&&(t=(0,n.kg)(this._whereClause,t)):t=this._whereClause,this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>h});var a=r(48938),i=r(87449),s=r(11221),n=(r(33325),r(80609)),l=r(4576),o=r(39516),u=r(91075),d=r(18589),c=r(33143),y=r(20437);class h extends s.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:a._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return s.An;const a=this._createQuery();return a.where=(0,o.mA)(a.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,n.YY)(e.where,0)),null!=e.spatialFilter&&(a.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),a.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),a.geometry=e.spatialFilter.geometry),a.outSpatialReference=this.spatialReference,a.orderByFields=t,a.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){const t=await this._queryLayerFeaturesJSON(a);(0,i.dZ)(e.abortSignal);for(const e of(0,l.Ho)(t.features,this._maxQueryRate()))(0,s.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new i.dr("NeverReach")}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField;const a=e.layerDefinition.typeIdField??"",i=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)i.push(c.A.fromJSON(t));let s=e.layerDefinition.geometryType;void 0===s&&(s=e.featureSet.geometryType||"");let n=e.featureSet.features;if(!r){let t=!1;for(const a of e.layerDefinition.fields)if("oid"===a.type||"esriFieldTypeOID"===a.type){r=a.name,t=!0;break}if(!1===t){let t="FID",a=!0,i=0;for(;a;){let r=!0;for(const a of e.layerDefinition.fields)if(a.name===t){r=!1;break}!0===r?a=!1:(i++,t="FID"+i.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const s=[];for(let r=0;r<n.length;r++)s.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});n=s,r=t}}const l=[];for(const t of e.layerDefinition.fields)t instanceof y.A?l.push(t):l.push(y.A.fromJSON(t));let o=s;switch(o||(o=""),o){case"esriGeometryPoint":o="point";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryEnvelope":o="extent";break;case"esriGeometryMultipoint":o="multipoint";break;case"":case"esriGeometryNull":o="esriGeometryNull"}if("esriGeometryNull"!==o){const e=t.toJSON();for(const t of n)t.geometry&&t.geometry instanceof u.A==0&&(t.geometry.type=o,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(const e of n)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:n,fields:l,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:i,typeIdField:a,objectIdField:r,spatialReference:t},f="esriGeometryNull"===o||null===o;f||(p.geometryType=o);const m=new d.default(p);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new h({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,s.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},88930(e,t,r){r.d(t,{S1:()=>l,VW:()=>o,lL:()=>u,rb:()=>d,t:()=>c});var a=r(97770),i=(r(98623),r(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function l(e,t,r,s="system"){if("unknown"===r)return e;const n=new i.oh((0,a.wj)(s)),l=i.c9.fromJSDate(e,{zone:n}),o="decades"===r||"centuries"===r?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[o]:t}).toJSDate()}function o(e,t,r="milliseconds"){const a=e.getTime(),i=c(t,r,"milliseconds");return new Date(a+i)}function u(e,t,r="system"){const{unit:s}=t,n=Math.max(1,Math.trunc(t.value)),l=new i.oh((0,a.wj)(r)),o=i.c9.fromJSDate(e,{zone:l}),u=e=>e-e%n;switch(s){case"milliseconds":return o.startOf("second").plus({millisecond:u(o.millisecond)}).toJSDate();case"seconds":return o.startOf("minute").plus({second:u(o.second)}).toJSDate();case"minutes":return o.startOf("hour").plus({minute:u(o.minute)}).toJSDate();case"hours":return o.startOf("day").plus({hour:u(o.hour)}).toJSDate();case"days":return o.startOf("month").plus({day:u(o.day-1)}).toJSDate();case"weeks":{const e=o.startOf("year").startOf("week"),t=Math.floor(o.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return o.startOf("year").plus({month:u(o.month-1)}).toJSDate();case"years":case"decades":case"centuries":{const e=o.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*n,r=e.year-e.year%t;return e.set({year:r}).toJSDate()}case"unknown":return e}}function d(e){const t=s.exec(e);if(!t)return null;const{hh:r,mm:a,ss:i,ms:l}=t.groups;return Number(r)*n.hours+Number(a)*n.minutes+Number(i||0)*n.seconds+Number(l||0)}function c(e,t,r){return 0===e?0:e*n[t]/n[r]}},4146(e,t,r){r.d(t,{A:()=>g});var a=r(32198),i=r(56507),s=r(49186),n=r(65529),l=r(4902),o=r(92474),u=r(53966),d=r(17676),c=r(84952),y=r(91429),h=r(5443),p=r(16930),f=r(92602),m=r(79677);let _=0,g=class extends((0,n.Zt)((0,l.s)(o.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.A(-180,-90,180,90,p.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=p.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(()=>r(27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:a}=await Promise.all([r.e(9917),r.e(812),r.e(8559)]).then(()=>r(45613));try{return await a(t)}catch(e){const r=t?.portalItem,a=r?.id||"unset",i=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+a+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,d.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,a.Cg)([(0,y.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,a.Cg)([(0,y.MZ)({type:h.A})],g.prototype,"fullExtent",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,a.Cg)([(0,y.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,a.Cg)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,a.Cg)([(0,y.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,a.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,a.Cg)([(0,y.MZ)({type:p.A})],g.prototype,"spatialReference",void 0),(0,a.Cg)([(0,y.MZ)({type:String})],g.prototype,"title",void 0),(0,a.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,a.Cg)([(0,y.MZ)()],g.prototype,"url",void 0),(0,a.Cg)([(0,y.MZ)({type:m.A})],g.prototype,"visibilityTimeExtent",void 0),(0,a.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,a.Cg)([(0,y.$K)("esri.layers.Layer")],g)},52136(e,t,r){var a=r(32198),i=r(91429);r.d(t,["p",0,e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,a.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,a.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},28032(e,t,r){r.d(t,{A:()=>o});var a=r(32198),i=r(69540),s=r(25482),n=r(91429),l=r(56400);let o=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,a.Cg)([(0,n.MZ)()],o.prototype,"creatorField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"creationDateField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"editorField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"editDateField",void 0),(0,a.Cg)([(0,n.MZ)()],o.prototype,"realm",void 0),(0,a.Cg)([(0,n.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],o.prototype,"timeZone",void 0),o=(0,a.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],o)},33143(e,t,r){r.d(t,{A:()=>c});var a=r(32198),i=r(69540),s=r(25482),n=r(91429),l=r(8631),o=r(29005),u=r(36005),d=r(43937);let c=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,a.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,a.Cg)([(0,d.K)("domains")],c.prototype,"writeDomains",null),(0,a.Cg)([(0,n.MZ)({type:[o.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,a.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],c)},37352(e,t,r){r.d(t,{A:()=>o});var a,i=r(32198),s=r(7762),n=r(25482),l=r(91429);let o=a=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new a({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],o.prototype,"floorField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],o.prototype,"viewAllLevelIds",void 0),o=a=(0,i.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],o)},45067(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),s=r(66552),n=r(25482),l=r(91429);const o=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,i.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,a.Cg)([(0,l.MZ)({json:{read:o.read,write:o.write}})],d.prototype,"cardinality",void 0),(0,a.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,a.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"role",void 0),d=(0,a.Cg)([(0,l.$K)("esri.layers.support.Relationship")],d)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>s});var a=r(34727),i=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:a}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],c(a));return t}(e);if(s&&((0,a.gg)(t,s[0])||(0,a.ZH)(r,s[1])))return"";const n=Array.from(l(e,t,r)),o=function(e,t,r){if(0===e.length)return!0;const i=d(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,a.ZH)(i,t)||(0,a.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,a.ZH)(d(i.minScale),c(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const a of e.filters)o(a.minScale,a.maxScale,t,r)&&(yield a)}}function o(e,t,r,i){return e=d(e),r=d(r),t=c(t),!(!(0,a.Sp)(r,e)&&(i??r)>e||(0,a.Hx)(t,r)||void 0!==i&&(0,a.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},77548(e,t,r){r.d(t,{Gh:()=>q,tk:()=>C,BR:()=>v,p2:()=>I,qd:()=>A,wI:()=>T,G$:()=>L,$x:()=>R,Ov:()=>w,cM:()=>y,UC:()=>h,Qz:()=>p,OP:()=>M,TU:()=>g,F2:()=>f,XX:()=>_,Qi:()=>F,jy:()=>b});var a=r(70333),i=r(56507),s=r(7762),n=(r(84952),r(36563)),l=r(36708),o=r(4146);const u=new WeakMap;function d(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof o.A)&&("catalog-dynamic-group"===t.type||d(t))},t=>u.set(e,t),l.pc),(0,n.hA)(()=>u.delete(e))]),u.get(e))}function c(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function y(e){return c(e,"knowledge-graph")&&"layers"in e}function h(e){return c(e,"knowledge-graph-sublayer")}function p(e){return c(e,"link-chart")&&"layers"in e}function f(e){return c(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const _={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function F(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function b(e){return function(e){return c(e,"catalog-footprint")}(e)||function(e){return c(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return c(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function S(e){const t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!b(e))return;const r=t?.graphic,a="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){const e=r.origin;return e&&"featureReductionProvider"in e&&a?S(a)?a:null:void 0}return e}return t?.checkFeatureReduction&&a?S(a)?a:null:e}async function T(e,t){const r=a.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const n=`${e.slice(0,s)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,i.A)(n,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function v(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function C(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){const t=new s.A;for(const r of e.allLayers.concat(e.allTables))d(r)||m(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function R(e,t){return null}function L(e){return null}function M(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function q(e,t){if(!t||!M(e))return;const r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){const a=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});r.d(t,["j",0,a])},10536(e,t,r){function a(e){const t={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=a(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>a})},17126(e,t,r){r.d(t,{dw:()=>n,qD:()=>l,qW:()=>o});var a=r(56507),i=r(21325),s=r(10536);function n(e,t){const r=e.toJSON();return r.objectIds&&(r.objectIds=r.objectIds.join(",")),r.orderByFields&&(r.orderByFields=r.orderByFields.join(",")),r.outFields&&!t?.returnCountOnly?r.outFields.includes("*")?r.outFields="*":r.outFields=r.outFields.join(","):delete r.outFields,r.outSR&&(r.outSR=(0,i.YX)(r.outSR)),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function l(e,t,r){const a=await u(e,t,r),i=a.data,s=i.geometryType,n=i.spatialReference,l={};for(const e of i.relatedRecordGroups){const t={fields:void 0,geometryType:s,spatialReference:n,hasZ:!!i.hasZ,hasM:!!i.hasM,features:e.relatedRecords};if(null!=e.objectId)l[e.objectId]=t;else for(const r of Object.keys(e))"relatedRecords"!==r&&(l[e[r]]=t)}return{...a,data:l}}async function o(e,t,r){const a=await u(e,t,r,{returnCountOnly:!0}),i=a.data,s={};for(const e of i.relatedRecordGroups)null!=e.objectId&&(s[e.objectId]=e.count);return{...a,data:s}}async function u(e,t,r={},i){const l=(0,s.z)({...e.query,f:"json",...i,...n(t,i)});return(0,a.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...l}})}},16215(e,t,r){r.d(t,{S:()=>i});const a=Symbol("BasemapInstance");function i(e){return null!=e&&"object"==typeof e&&a in e}r.d(t,["Y",0,a])},79677(e,t,r){r.d(t,{A:()=>c});var a,i=r(32198),s=r(25482),n=r(88930),l=r(91429),o=(r(98623),r(10184)),u=r(36005),d=r(43937);let c=class extends s.o{static{a=this}static get allTime(){return y}static get empty(){return h}static fromArray(e){return new a({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(a.allTime)}get isEmpty(){return this.equals(a.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new a({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,a=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===a&&r===i}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&(r=(0,n.lL)(r,new o.A({value:1,unit:e}),t));let i=this.end;if(i){const r=(0,n.lL)(i,new o.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,n.S1)(r,1,e,t)}return new a({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return a.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let n,l;return i>=t&&i<=r?n=i:t>=i&&t<=s&&(n=t),r>=i&&r<=s?l=r:s>=t&&s<=r&&(l=s),null==n||null==l||isNaN(n)||isNaN(l)?a.empty:new a({start:n===-1/0?null:new Date(n),end:l===1/0?null:new Date(l)})}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const i=new a,{start:s,end:l}=this;return null!=s&&(i.start=(0,n.S1)(s,e,t,r)),null!=l&&(i.end=(0,n.S1)(l,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return y.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new a({start:t,end:r})}};(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i.Cg)([(0,u.w)("end")],c.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],c.prototype,"writeEnd",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i.Cg)([(0,u.w)("start")],c.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],c.prototype,"writeStart",null),c=a=(0,i.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const y=new c,h=new c({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),s=r(25482),n=r(88930),l=r(91429),o=r(73133),u=r(93223);let d=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.t)(this.value,this.unit,"milliseconds")}};(0,a.Cg)([(0,u.e)(o.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,a.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,a.Cg)([(0,l.$K)("esri.time.TimeInterval")],d)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[52],{32198(t,n,e){function r(t,n,e,r){var o,s=arguments.length,i=s<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,n,e,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s<3?o(i):s>3?o(n,e,i):o(n,e))||i);return s>3&&i&&Object.defineProperty(n,e,i),i}function o(t,n,e){if(null!=n){if("object"!=typeof n&&"function"!=typeof n)throw new TypeError("Object expected.");var r,o;if(e){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=n[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=n[Symbol.dispose],e&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:n,dispose:r,async:e})}else e&&t.stack.push({async:!0});return n}e.d(n,{Cg:()=>r,hk:()=>i,mS:()=>o}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,n,e){var r=new Error(e);return r.name="SuppressedError",r.error=t,r.suppressed=n,r};function i(t){function n(n){t.error=t.hasError?new s(n,t.error,"An error was suppressed during disposal."):n,t.hasError=!0}var e,r=0;return function o(){for(;e=t.stack.pop();)try{if(!e.async&&1===r)return r=0,t.stack.push(e),Promise.resolve().then(o);if(e.dispose){var s=e.dispose.call(e.value);if(e.async)return r|=2,Promise.resolve(s).then(o,function(t){return n(t),o()})}else r|=1}catch(t){n(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},29242(t,n,e){function r(){return[1,0,0,0,1,0,0,0,1]}function o(t,n,e,r,o,s,i,a,u){return[t,n,e,r,o,s,i,a,u]}e.d(n,{fA:()=>o,vt:()=>r});const s=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:o},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,s])},9093(t,n,e){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}e.d(n,{o8:()=>o,vt:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:r,fromValues:function(t,n,e,r,o,s,i,a,u,c,h,f,l,d,m,b){return[t,n,e,r,o,s,i,a,u,c,h,f,l,d,m,b]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,s])},82534(t,n,e){function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}e.d(n,{o8:()=>o,vt:()=>r});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:r,fromValues:function(t,n,e,r){return[t,n,e,r]}},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,s])},77690(t,n,e){e.d(n,{B8:()=>a,Ge:()=>d,I0:()=>l,KC:()=>u,a4:()=>c,hZ:()=>s,hs:()=>f,lw:()=>h,mg:()=>i,z0:()=>o});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function s(t,n,e,r,o,s,i,a,u,c){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=s,t[5]=i,t[6]=a,t[7]=u,t[8]=c,t}function i(t,n){if(t===n){const e=n[1],r=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function a(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=n[4],a=n[5],u=n[6],c=n[7],h=n[8],f=h*i-a*c,l=-h*s+a*u,d=c*s-i*u;let m=e*f+r*l+o*d;return m?(m=1/m,t[0]=f*m,t[1]=(-h*r+o*c)*m,t[2]=(a*r-o*i)*m,t[3]=l*m,t[4]=(h*e-o*u)*m,t[5]=(-a*e+o*s)*m,t[6]=d*m,t[7]=(-c*e+r*u)*m,t[8]=(i*e-r*s)*m,t):null}function u(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=n[4],a=n[5],u=n[6],c=n[7],h=n[8];return t[0]=i*h-a*c,t[1]=o*c-r*h,t[2]=r*a-o*i,t[3]=a*u-s*h,t[4]=e*h-o*u,t[5]=o*s-e*a,t[6]=s*c-i*u,t[7]=r*u-e*c,t[8]=e*i-r*s,t}function c(t){const n=t[0],e=t[1],r=t[2],o=t[3],s=t[4],i=t[5],a=t[6],u=t[7],c=t[8];return n*(c*s-i*u)+e*(-c*o+i*a)+r*(u*o-s*a)}function h(t,n,e){const r=n[0],o=n[1],s=n[2],i=n[3],a=n[4],u=n[5],c=n[6],h=n[7],f=n[8],l=e[0],d=e[1],m=e[2],b=e[3],M=e[4],p=e[5],_=e[6],g=e[7],v=e[8];return t[0]=l*r+d*i+m*c,t[1]=l*o+d*a+m*h,t[2]=l*s+d*u+m*f,t[3]=b*r+M*i+p*c,t[4]=b*o+M*a+p*h,t[5]=b*s+M*u+p*f,t[6]=_*r+g*i+v*c,t[7]=_*o+g*a+v*h,t[8]=_*s+g*u+v*f,t}function f(t,n,e){const r=e[0],o=e[1],s=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=s*n[6],t[7]=s*n[7],t[8]=s*n[8],t}function l(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=e+e,a=r+r,u=o+o,c=e*i,h=r*i,f=r*a,l=o*i,d=o*a,m=o*u,b=s*i,M=s*a,p=s*u;return t[0]=1-f-m,t[3]=h-p,t[6]=l+M,t[1]=h+p,t[4]=1-c-m,t[7]=d-b,t[2]=l-M,t[5]=d+b,t[8]=1-c-f,t}function d(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=n[4],a=n[5],u=n[6],c=n[7],h=n[8],f=n[9],l=n[10],d=n[11],m=n[12],b=n[13],M=n[14],p=n[15],_=e*a-r*i,g=e*u-o*i,v=e*c-s*i,y=r*u-o*a,S=r*c-s*a,x=o*c-s*u,w=h*b-f*m,j=h*M-l*m,A=h*p-d*m,O=f*M-l*b,T=f*p-d*b,I=l*p-d*M;let E=_*I-g*T+v*O+y*A-S*j+x*w;return E?(E=1/E,t[0]=(a*I-u*T+c*O)*E,t[1]=(u*A-i*I-c*j)*E,t[2]=(i*T-a*A+c*w)*E,t[3]=(o*T-r*I-s*O)*E,t[4]=(e*I-o*A+s*j)*E,t[5]=(r*A-e*T-s*w)*E,t[6]=(b*x-M*S+p*y)*E,t[7]=(M*v-m*x-p*g)*E,t[8]=(m*S-b*v+p*_)*E,t):null}function m(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const b=h,M=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:u,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:c,equals:function(t,n){const e=t[0],o=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],h=t[7],f=t[8],l=n[0],d=n[1],m=n[2],b=n[3],M=n[4],p=n[5],_=n[6],g=n[7],v=n[8],y=(0,r.FD)();return Math.abs(e-l)<=y*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(o-d)<=y*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(s-m)<=y*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(i-b)<=y*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-M)<=y*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(u-p)<=y*Math.max(1,Math.abs(u),Math.abs(p))&&Math.abs(c-_)<=y*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(h-g)<=y*Math.max(1,Math.abs(h),Math.abs(g))&&Math.abs(f-v)<=y*Math.max(1,Math.abs(f),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:l,fromRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],o=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],h=t[7],f=t[8];return Math.abs(1-(e*e+i*i+c*c))<=n&&Math.abs(1-(o*o+a*a+h*h))<=n&&Math.abs(1-(s*s+u*u+f*f))<=n},mul:b,multiply:h,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:d,normalFromMat4Legacy:function(t,n){const e=n[0],r=n[1],o=n[2],s=n[4],i=n[5],a=n[6],u=n[8],c=n[9],h=n[10],f=h*i-a*c,l=-h*s+a*u,d=c*s-i*u,m=e*f+r*l+o*d;if(!m)return null;const b=1/m;return t[0]=f*b,t[1]=(-h*r+o*c)*b,t[2]=(a*r-o*i)*b,t[3]=l*b,t[4]=(h*e-o*u)*b,t[5]=(-a*e+o*s)*b,t[6]=d*b,t[7]=(-c*e+r*u)*b,t[8]=(i*e-r*s)*b,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){const r=n[0],o=n[1],s=n[2],i=n[3],a=n[4],u=n[5],c=n[6],h=n[7],f=n[8],l=Math.sin(e),d=Math.cos(e);return t[0]=d*r+l*i,t[1]=d*o+l*a,t[2]=d*s+l*u,t[3]=d*i-l*r,t[4]=d*a-l*o,t[5]=d*u-l*s,t[6]=c,t[7]=h,t[8]=f,t},scale:f,scaleByVec2:function(t,n,e){const r=e[0],o=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:s,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:M,subtract:m,translate:function(t,n,e){const r=n[0],o=n[1],s=n[2],i=n[3],a=n[4],u=n[5],c=n[6],h=n[7],f=n[8],l=e[0],d=e[1];return t[0]=r,t[1]=o,t[2]=s,t[3]=i,t[4]=a,t[5]=u,t[6]=l*r+d*i+c,t[7]=l*o+d*a+h,t[8]=l*s+d*u+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},58083(t,n,e){e.d(n,{$0:()=>p,$h:()=>O,B8:()=>h,C:()=>s,D_:()=>a,N9:()=>g,O7:()=>A,Qw:()=>c,Tl:()=>l,X_:()=>x,e$:()=>m,eL:()=>b,hM:()=>_,hZ:()=>i,hs:()=>d,kN:()=>M,l:()=>w,lw:()=>f,mg:()=>u,o1:()=>j,sC:()=>S,t2:()=>E,t5:()=>T,tZ:()=>C,ut:()=>N});var r=e(51850),o=e(34304);function s(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function i(t,n,e,r,o,s,i,a,u,c,h,f,l,d,m,b,M){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=s,t[5]=i,t[6]=a,t[7]=u,t[8]=c,t[9]=h,t[10]=f,t[11]=l,t[12]=d,t[13]=m,t[14]=b,t[15]=M,t}function a(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,n){if(t===n){const e=n[1],r=n[2],o=n[3],s=n[6],i=n[7],a=n[11];t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=e,t[6]=n[9],t[7]=n[13],t[8]=r,t[9]=s,t[11]=n[14],t[12]=o,t[13]=i,t[14]=a}else t[0]=n[0],t[1]=n[4],t[2]=n[8],t[3]=n[12],t[4]=n[1],t[5]=n[5],t[6]=n[9],t[7]=n[13],t[8]=n[2],t[9]=n[6],t[10]=n[10],t[11]=n[14],t[12]=n[3],t[13]=n[7],t[14]=n[11],t[15]=n[15];return t}function c(t,n){return h(t,n)||a(t),t}function h(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=n[4],a=n[5],u=n[6],c=n[7],h=n[8],f=n[9],l=n[10],d=n[11],m=n[12],b=n[13],M=n[14],p=n[15],_=e*a-r*i,g=e*u-o*i,v=e*c-s*i,y=r*u-o*a,S=r*c-s*a,x=o*c-s*u,w=h*b-f*m,j=h*M-l*m,A=h*p-d*m,O=f*M-l*b,T=f*p-d*b,I=l*p-d*M;let E=_*I-g*T+v*O+y*A-S*j+x*w;return E?(E=1/E,t[0]=(a*I-u*T+c*O)*E,t[1]=(o*T-r*I-s*O)*E,t[2]=(b*x-M*S+p*y)*E,t[3]=(l*S-f*x-d*y)*E,t[4]=(u*A-i*I-c*j)*E,t[5]=(e*I-o*A+s*j)*E,t[6]=(M*v-m*x-p*g)*E,t[7]=(h*x-l*v+d*g)*E,t[8]=(i*T-a*A+c*w)*E,t[9]=(r*A-e*T-s*w)*E,t[10]=(m*S-b*v+p*_)*E,t[11]=(f*v-h*S-d*_)*E,t[12]=(a*j-i*O-u*w)*E,t[13]=(e*O-r*j+o*w)*E,t[14]=(b*g-m*y-M*_)*E,t[15]=(h*y-f*g+l*_)*E,t):null}function f(t,n,e){const r=n[0],o=n[1],s=n[2],i=n[3],a=n[4],u=n[5],c=n[6],h=n[7],f=n[8],l=n[9],d=n[10],m=n[11],b=n[12],M=n[13],p=n[14],_=n[15];let g=e[0],v=e[1],y=e[2],S=e[3];return t[0]=g*r+v*a+y*f+S*b,t[1]=g*o+v*u+y*l+S*M,t[2]=g*s+v*c+y*d+S*p,t[3]=g*i+v*h+y*m+S*_,g=e[4],v=e[5],y=e[6],S=e[7],t[4]=g*r+v*a+y*f+S*b,t[5]=g*o+v*u+y*l+S*M,t[6]=g*s+v*c+y*d+S*p,t[7]=g*i+v*h+y*m+S*_,g=e[8],v=e[9],y=e[10],S=e[11],t[8]=g*r+v*a+y*f+S*b,t[9]=g*o+v*u+y*l+S*M,t[10]=g*s+v*c+y*d+S*p,t[11]=g*i+v*h+y*m+S*_,g=e[12],v=e[13],y=e[14],S=e[15],t[12]=g*r+v*a+y*f+S*b,t[13]=g*o+v*u+y*l+S*M,t[14]=g*s+v*c+y*d+S*p,t[15]=g*i+v*h+y*m+S*_,t}function l(t,n,e){const r=e[0],o=e[1],s=e[2];if(n===t)t[12]=n[0]*r+n[4]*o+n[8]*s+n[12],t[13]=n[1]*r+n[5]*o+n[9]*s+n[13],t[14]=n[2]*r+n[6]*o+n[10]*s+n[14],t[15]=n[3]*r+n[7]*o+n[11]*s+n[15];else{const e=n[0],i=n[1],a=n[2],u=n[3],c=n[4],h=n[5],f=n[6],l=n[7],d=n[8],m=n[9],b=n[10],M=n[11];t[0]=e,t[1]=i,t[2]=a,t[3]=u,t[4]=c,t[5]=h,t[6]=f,t[7]=l,t[8]=d,t[9]=m,t[10]=b,t[11]=M,t[12]=e*r+c*o+d*s+n[12],t[13]=i*r+h*o+m*s+n[13],t[14]=a*r+f*o+b*s+n[14],t[15]=u*r+l*o+M*s+n[15]}return t}function d(t,n,e){const r=e[0],o=e[1],s=e[2];return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=n[7]*o,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=n[11]*s,t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t}function m(t,n,e,r){let i=r[0],a=r[1],u=r[2],c=Math.sqrt(i*i+a*a+u*u);if(c<=(0,o.FD)())return void s(t,n);c=1/c,i*=c,a*=c,u*=c;const h=Math.sin(e),f=Math.cos(e),l=1-f,d=n[0],m=n[1],b=n[2],M=n[3],p=n[4],_=n[5],g=n[6],v=n[7],y=n[8],S=n[9],x=n[10],w=n[11],j=i*i*l+f,A=a*i*l+u*h,O=u*i*l-a*h,T=i*a*l-u*h,I=a*a*l+f,E=u*a*l+i*h,N=i*u*l+a*h,C=a*u*l-i*h,q=u*u*l+f;t[0]=d*j+p*A+y*O,t[1]=m*j+_*A+S*O,t[2]=b*j+g*A+x*O,t[3]=M*j+v*A+w*O,t[4]=d*T+p*I+y*E,t[5]=m*T+_*I+S*E,t[6]=b*T+g*I+x*E,t[7]=M*T+v*I+w*E,t[8]=d*N+p*C+y*q,t[9]=m*N+_*C+S*q,t[10]=b*N+g*C+x*q,t[11]=M*N+v*C+w*q,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15])}function b(t,n,e){const r=Math.sin(e),o=Math.cos(e),s=n[4],i=n[5],a=n[6],u=n[7],c=n[8],h=n[9],f=n[10],l=n[11];return n!==t&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[4]=s*o+c*r,t[5]=i*o+h*r,t[6]=a*o+f*r,t[7]=u*o+l*r,t[8]=c*o-s*r,t[9]=h*o-i*r,t[10]=f*o-a*r,t[11]=l*o-u*r,t}function M(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function p(t,n,e){if(0===n)return a(t);let r=e[0],s=e[1],i=e[2],u=Math.sqrt(r*r+s*s+i*i);if(u<=(0,o.FD)())return null;u=1/u,r*=u,s*=u,i*=u;const c=Math.sin(n),h=Math.cos(n),f=1-h;return t[0]=r*r*f+h,t[1]=s*r*f+i*c,t[2]=i*r*f-s*c,t[3]=0,t[4]=r*s*f-i*c,t[5]=s*s*f+h,t[6]=i*s*f+r*c,t[7]=0,t[8]=r*i*f+s*c,t[9]=s*i*f-r*c,t[10]=i*i*f+h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function _(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=e,t[7]=0,t[8]=0,t[9]=-e,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=0,t[4]=-e,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function v(t,n,e){const r=n[0],o=n[1],s=n[2],i=n[3],a=r+r,u=o+o,c=s+s,h=r*a,f=r*u,l=r*c,d=o*u,m=o*c,b=s*c,M=i*a,p=i*u,_=i*c;return t[0]=1-(d+b),t[1]=f+_,t[2]=l-p,t[3]=0,t[4]=f-_,t[5]=1-(h+b),t[6]=m+M,t[7]=0,t[8]=l+p,t[9]=m-M,t[10]=1-(h+d),t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}const y=(0,r.vt)();function S(t,n){return t[0]=n[12],t[1]=n[13],t[2]=n[14],t}function x(t,n){const e=n[0],r=n[1],o=n[2],s=n[4],i=n[5],a=n[6],u=n[8],c=n[9],h=n[10];return t[0]=Math.sqrt(e*e+r*r+o*o),t[1]=Math.sqrt(s*s+i*i+a*a),t[2]=Math.sqrt(u*u+c*c+h*h),t}function w(t,n){const e=n[0]+n[5]+n[10];let r=0;return e>0?(r=2*Math.sqrt(e+1),t[3]=.25*r,t[0]=(n[6]-n[9])/r,t[1]=(n[8]-n[2])/r,t[2]=(n[1]-n[4])/r):n[0]>n[5]&&n[0]>n[10]?(r=2*Math.sqrt(1+n[0]-n[5]-n[10]),t[3]=(n[6]-n[9])/r,t[0]=.25*r,t[1]=(n[1]+n[4])/r,t[2]=(n[8]+n[2])/r):n[5]>n[10]?(r=2*Math.sqrt(1+n[5]-n[0]-n[10]),t[3]=(n[8]-n[2])/r,t[0]=(n[1]+n[4])/r,t[1]=.25*r,t[2]=(n[6]+n[9])/r):(r=2*Math.sqrt(1+n[10]-n[0]-n[5]),t[3]=(n[1]-n[4])/r,t[0]=(n[8]+n[2])/r,t[1]=(n[6]+n[9])/r,t[2]=.25*r),t}function j(t,n,e,r){const o=n[0],s=n[1],i=n[2],a=n[3],u=o+o,c=s+s,h=i+i,f=o*u,l=o*c,d=o*h,m=s*c,b=s*h,M=i*h,p=a*u,_=a*c,g=a*h,v=r[0],y=r[1],S=r[2];return t[0]=(1-(m+M))*v,t[1]=(l+g)*v,t[2]=(d-_)*v,t[3]=0,t[4]=(l-g)*y,t[5]=(1-(f+M))*y,t[6]=(b+p)*y,t[7]=0,t[8]=(d+_)*S,t[9]=(b-p)*S,t[10]=(1-(f+m))*S,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function A(t,n,e,r,o){const s=n[0],i=n[1],a=n[2],u=n[3],c=s+s,h=i+i,f=a+a,l=s*c,d=s*h,m=s*f,b=i*h,M=i*f,p=a*f,_=u*c,g=u*h,v=u*f,y=r[0],S=r[1],x=r[2],w=o[0],j=o[1],A=o[2],O=(1-(b+p))*y,T=(d+v)*y,I=(m-g)*y,E=(d-v)*S,N=(1-(l+p))*S,C=(M+_)*S,q=(m+g)*x,z=(M-_)*x,P=(1-(l+b))*x;return t[0]=O,t[1]=T,t[2]=I,t[3]=0,t[4]=E,t[5]=N,t[6]=C,t[7]=0,t[8]=q,t[9]=z,t[10]=P,t[11]=0,t[12]=e[0]+w-(O*w+E*j+q*A),t[13]=e[1]+j-(T*w+N*j+z*A),t[14]=e[2]+A-(I*w+C*j+P*A),t[15]=1,t}function O(t,n,e,r,o,s,i){const a=1/(e-n),u=1/(o-r),c=1/(s-i);return t[0]=2*s*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*u,t[6]=0,t[7]=0,t[8]=(e+n)*a,t[9]=(o+r)*u,t[10]=(i+s)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s*2*c,t[15]=0,t}function T(t,n,e,r){const s=n[0],i=n[1],u=n[2];let c=s-e[0],h=i-e[1],f=u-e[2];const l=(0,o.FD)();if(Math.abs(c)<l&&Math.abs(h)<l&&Math.abs(f)<l)return void a(t);let d=1/Math.sqrt(c*c+h*h+f*f);c*=d,h*=d,f*=d;const m=r[0],b=r[1],M=r[2];let p=b*f-M*h,_=M*c-m*f,g=m*h-b*c;d=Math.sqrt(p*p+_*_+g*g),d?(d=1/d,p*=d,_*=d,g*=d):(p=0,_=0,g=0);let v=h*g-f*_,y=f*p-c*g,S=c*_-h*p;d=Math.sqrt(v*v+y*y+S*S),d?(d=1/d,v*=d,y*=d,S*=d):(v=0,y=0,S=0),t[0]=p,t[1]=v,t[2]=c,t[3]=0,t[4]=_,t[5]=y,t[6]=h,t[7]=0,t[8]=g,t[9]=S,t[10]=f,t[11]=0,t[12]=-(p*s+_*i+g*u),t[13]=-(v*s+y*i+S*u),t[14]=-(c*s+h*i+f*u),t[15]=1}function I(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t[9]=n[9]-e[9],t[10]=n[10]-e[10],t[11]=n[11]-e[11],t[12]=n[12]-e[12],t[13]=n[13]-e[13],t[14]=n[14]-e[14],t[15]=n[15]-e[15],t}function E(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]&&t[9]===n[9]&&t[10]===n[10]&&t[11]===n[11]&&t[12]===n[12]&&t[13]===n[13]&&t[14]===n[14]&&t[15]===n[15]}function N(t){const n=(0,o.FD)(),e=t[0],r=t[1],s=t[2],i=t[4],a=t[5],u=t[6],c=t[8],h=t[9],f=t[10];return Math.abs(1-(e*e+i*i+c*c))<=n&&Math.abs(1-(r*r+a*a+h*h))<=n&&Math.abs(1-(s*s+u*u+f*f))<=n}function C(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const q=f,z=I;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t[9]=n[9]+e[9],t[10]=n[10]+e[10],t[11]=n[11]+e[11],t[12]=n[12]+e[12],t[13]=n[13]+e[13],t[14]=n[14]+e[14],t[15]=n[15]+e[15],t},adjoint:function(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=n[4],a=n[5],u=n[6],c=n[7],h=n[8],f=n[9],l=n[10],d=n[11],m=n[12],b=n[13],M=n[14],p=n[15];return t[0]=a*(l*p-d*M)-f*(u*p-c*M)+b*(u*d-c*l),t[1]=-(r*(l*p-d*M)-f*(o*p-s*M)+b*(o*d-s*l)),t[2]=r*(u*p-c*M)-a*(o*p-s*M)+b*(o*c-s*u),t[3]=-(r*(u*d-c*l)-a*(o*d-s*l)+f*(o*c-s*u)),t[4]=-(i*(l*p-d*M)-h*(u*p-c*M)+m*(u*d-c*l)),t[5]=e*(l*p-d*M)-h*(o*p-s*M)+m*(o*d-s*l),t[6]=-(e*(u*p-c*M)-i*(o*p-s*M)+m*(o*c-s*u)),t[7]=e*(u*d-c*l)-i*(o*d-s*l)+h*(o*c-s*u),t[8]=i*(f*p-d*b)-h*(a*p-c*b)+m*(a*d-c*f),t[9]=-(e*(f*p-d*b)-h*(r*p-s*b)+m*(r*d-s*f)),t[10]=e*(a*p-c*b)-i*(r*p-s*b)+m*(r*c-s*a),t[11]=-(e*(a*d-c*f)-i*(r*d-s*f)+h*(r*c-s*a)),t[12]=-(i*(f*M-l*b)-h*(a*M-u*b)+m*(a*l-u*f)),t[13]=e*(f*M-l*b)-h*(r*M-o*b)+m*(r*l-o*f),t[14]=-(e*(a*M-u*b)-i*(r*M-o*b)+m*(r*u-o*a)),t[15]=e*(a*l-u*f)-i*(r*l-o*f)+h*(r*u-o*a),t},copy:s,determinant:function(t){const n=t[0],e=t[1],r=t[2],o=t[3],s=t[4],i=t[5],a=t[6],u=t[7],c=t[8],h=t[9],f=t[10],l=t[11],d=t[12],m=t[13],b=t[14],M=t[15];return(n*i-e*s)*(f*M-l*b)-(n*a-r*s)*(h*M-l*m)+(n*u-o*s)*(h*b-f*m)+(e*a-r*i)*(c*M-l*d)-(e*u-o*i)*(c*b-f*d)+(r*u-o*a)*(c*m-h*d)},equals:function(t,n){if(t===n)return!0;const e=t[0],r=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],h=t[7],f=t[8],l=t[9],d=t[10],m=t[11],b=t[12],M=t[13],p=t[14],_=t[15],g=n[0],v=n[1],y=n[2],S=n[3],x=n[4],w=n[5],j=n[6],A=n[7],O=n[8],T=n[9],I=n[10],E=n[11],N=n[12],C=n[13],q=n[14],z=n[15],P=(0,o.FD)();return Math.abs(e-g)<=P*Math.max(1,Math.abs(e),Math.abs(g))&&Math.abs(r-v)<=P*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(s-y)<=P*Math.max(1,Math.abs(s),Math.abs(y))&&Math.abs(i-S)<=P*Math.max(1,Math.abs(i),Math.abs(S))&&Math.abs(a-x)<=P*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(u-w)<=P*Math.max(1,Math.abs(u),Math.abs(w))&&Math.abs(c-j)<=P*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(h-A)<=P*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(f-O)<=P*Math.max(1,Math.abs(f),Math.abs(O))&&Math.abs(l-T)<=P*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(d-I)<=P*Math.max(1,Math.abs(d),Math.abs(I))&&Math.abs(m-E)<=P*Math.max(1,Math.abs(m),Math.abs(E))&&Math.abs(b-N)<=P*Math.max(1,Math.abs(b),Math.abs(N))&&Math.abs(M-C)<=P*Math.max(1,Math.abs(M),Math.abs(C))&&Math.abs(p-q)<=P*Math.max(1,Math.abs(p),Math.abs(q))&&Math.abs(_-z)<=P*Math.max(1,Math.abs(_),Math.abs(z))},exactEquals:E,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,n){const e=n[0],r=n[1],o=n[2],s=n[3],i=e+e,a=r+r,u=o+o,c=e*i,h=r*i,f=r*a,l=o*i,d=o*a,m=o*u,b=s*i,M=s*a,p=s*u;return t[0]=1-f-m,t[1]=h+p,t[2]=l-M,t[3]=0,t[4]=h-p,t[5]=1-c-m,t[6]=d+b,t[7]=0,t[8]=l+M,t[9]=d-b,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,n){const e=y,r=-n[0],o=-n[1],s=-n[2],i=n[3],a=n[4],u=n[5],c=n[6],h=n[7],f=r*r+o*o+s*s+i*i;return f>0?(e[0]=2*(a*i+h*r+u*s-c*o)/f,e[1]=2*(u*i+h*o+c*r-a*s)/f,e[2]=2*(c*i+h*s+a*o-u*r)/f):(e[0]=2*(a*i+h*r+u*s-c*o),e[1]=2*(u*i+h*o+c*r-a*s),e[2]=2*(c*i+h*s+a*o-u*r)),v(t,n,e),t},fromRotation:p,fromRotationTranslation:v,fromRotationTranslationScale:j,fromRotationTranslationScaleOrigin:A,fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=n[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:M,fromXRotation:_,fromYRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=0,t[2]=-e,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=e,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:g,frustum:O,getRotation:w,getScale:x,getTranslation:S,hasIdentityRotation:C,identity:a,invert:h,invertOrIdentity:c,isOrthoNormal:N,lookAt:T,mul:q,multiply:f,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t[9]=n[9]*e,t[10]=n[10]*e,t[11]=n[11]*e,t[12]=n[12]*e,t[13]=n[13]*e,t[14]=n[14]*e,t[15]=n[15]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t[9]=n[9]+e[9]*r,t[10]=n[10]+e[10]*r,t[11]=n[11]+e[11]*r,t[12]=n[12]+e[12]*r,t[13]=n[13]+e[13]*r,t[14]=n[14]+e[14]*r,t[15]=n[15]+e[15]*r,t},ortho:function(t,n,e,r,o,s,i){const a=1/(n-e),u=1/(r-o),c=1/(s-i);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(n+e)*a,t[13]=(o+r)*u,t[14]=(i+s)*c,t[15]=1,t},perspective:function(t,n,e,r,o){const s=1/Math.tan(n/2);let i;return t[0]=s/e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=(o+r)*i,t[14]=2*o*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,n,e,r){const o=Math.tan(n.upDegrees*Math.PI/180),s=Math.tan(n.downDegrees*Math.PI/180),i=Math.tan(n.leftDegrees*Math.PI/180),a=Math.tan(n.rightDegrees*Math.PI/180),u=2/(i+a),c=2/(o+s);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(i-a)*u*.5,t[9]=(o-s)*c*.5,t[10]=r/(e-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*e/(e-r),t[15]=0,t},rotate:m,rotateX:b,rotateY:function(t,n,e){const r=Math.sin(e),o=Math.cos(e),s=n[0],i=n[1],a=n[2],u=n[3],c=n[8],h=n[9],f=n[10],l=n[11];return n!==t&&(t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=s*o-c*r,t[1]=i*o-h*r,t[2]=a*o-f*r,t[3]=u*o-l*r,t[8]=s*r+c*o,t[9]=i*r+h*o,t[10]=a*r+f*o,t[11]=u*r+l*o,t},rotateZ:function(t,n,e){const r=Math.sin(e),o=Math.cos(e),s=n[0],i=n[1],a=n[2],u=n[3],c=n[4],h=n[5],f=n[6],l=n[7];return n!==t&&(t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t[0]=s*o+c*r,t[1]=i*o+h*r,t[2]=a*o+f*r,t[3]=u*o+l*r,t[4]=c*o-s*r,t[5]=h*o-i*r,t[6]=f*o-a*r,t[7]=l*o-u*r,t},scale:d,set:i,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:z,subtract:I,targetTo:function(t,n,e,r){const o=n[0],s=n[1],i=n[2],a=r[0],u=r[1],c=r[2];let h=o-e[0],f=s-e[1],l=i-e[2],d=h*h+f*f+l*l;d>0&&(d=1/Math.sqrt(d),h*=d,f*=d,l*=d);let m=u*l-c*f,b=c*h-a*l,M=a*f-u*h;return d=m*m+b*b+M*M,d>0&&(d=1/Math.sqrt(d),m*=d,b*=d,M*=d),t[0]=m,t[1]=b,t[2]=M,t[3]=0,t[4]=f*M-l*b,t[5]=l*m-h*M,t[6]=h*b-f*m,t[7]=0,t[8]=h,t[9]=f,t[10]=l,t[11]=0,t[12]=o,t[13]=s,t[14]=i,t[15]=1,t},translate:l,transpose:u},Symbol.toStringTag,{value:"Module"}))},4197(t,n,e){e.d(n,{Vj:()=>h,cj:()=>c,jh:()=>s,l5:()=>a,yH:()=>u});var r=e(34275),o=e(9093);function s(t){return t<=1024?new Array(t).fill(0):new Float64Array(t)}function i(t){return((0,r.iu)(t)?t.byteLength/8:t.length)<=1024?Array.from(t):new Float64Array(t)}function a(t,n,e){return Array.isArray(t)?t.slice(n,n+e):t.subarray(n,n+e)}function u(t,n){if(0===n.length)return i(t);if(0===t.length)return i(n);const e=s(t.length+n.length);for(let n=0;n<t.length;++n)e[n]=t[n];for(let r=0;r<n.length;++r)e[t.length+r]=n[r];return e}function c(t){return[...t]}function h(t){const n=(0,o.vt)();for(let e=0;e<16;++e)n[e]=t[e];return n}},70328(t,n,e){e.d(n,{BI:()=>O,C:()=>i,DC:()=>l,Ej:()=>g,Ie:()=>j,Jt:()=>A,Lu:()=>y,Ne:()=>S,RF:()=>f,TF:()=>p,VL:()=>m,aI:()=>I,fA:()=>a,gE:()=>c,gX:()=>_,hZ:()=>w,iT:()=>d,is:()=>T,pg:()=>v,uJ:()=>M,vI:()=>x,vY:()=>u,vt:()=>s,w1:()=>h,yr:()=>b}),e(35522);var r=e(5443),o=(e(19419),e(4197));function s(t=N){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function i(t,n){for(let e=0;e<6;e++)t[e]=n[e];return t}function a(t,n,e,r,o,i,a=s()){return a[0]=t,a[1]=n,a[2]=e,a[3]=r,a[4]=o,a[5]=i,a}function u(t,n=s()){return function(t,n,e,r=s()){return w(r,E),function(t,n,e=0,r=n.length/3){let o=t[0],s=t[1],i=t[2],a=t[3],u=t[4],c=t[5];for(let t=0;t<r;t++)o=Math.min(o,n[e+3*t]),s=Math.min(s,n[e+3*t+1]),i=Math.min(i,n[e+3*t+2]),a=Math.max(a,n[e+3*t]),u=Math.max(u,n[e+3*t+1]),c=Math.max(c,n[e+3*t+2]);t[0]=o,t[1]=s,t[2]=i,t[3]=a,t[4]=u,t[5]=c}(r,t,n,e),r}(t,0,t.length/3,n)}function c(t,n=(0,o.jh)(24)){const[e,r,s,i,a,u]=t;return n[0]=e,n[1]=r,n[2]=s,n[3]=e,n[4]=r,n[5]=u,n[6]=e,n[7]=a,n[8]=s,n[9]=e,n[10]=a,n[11]=u,n[12]=i,n[13]=r,n[14]=s,n[15]=i,n[16]=r,n[17]=u,n[18]=i,n[19]=a,n[20]=s,n[21]=i,n[22]=a,n[23]=u,n}function h(t,n){const e=isFinite(t[2])||isFinite(t[5]);return new r.A(e?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:n}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:n})}function f(t,n,e=t){e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e[4]=Math.max(t[4],n[4]),e[5]=Math.max(t[5],n[5])}function l(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[3]=Math.max(t[3],n[2]),t[4]=Math.max(t[4],n[3])}function d(t,[n,e,r]){!function(t,n,e,r){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],e),t[2]=Math.min(t[2],r),t[3]=Math.max(t[3],n),t[4]=Math.max(t[4],e),t[5]=Math.max(t[5],r)}(t,n,e,r)}function m(t){return t[0]>=t[3]?0:t[3]-t[0]}function b(t){return t[1]>=t[4]?0:t[4]-t[1]}function M(t){return t[2]>=t[5]?0:t[5]-t[2]}function p(t){const n=m(t),e=M(t),r=b(t);return n*n+e*e+r*r}function _(t,n=[0,0,0]){return n[0]=t[0]+m(t)/2,n[1]=t[1]+b(t)/2,n[2]=t[2]+M(t)/2,n}function g(t,n=[0,0,0]){return n[0]=m(t),n[1]=b(t),n[2]=M(t),n}function v(t,n){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function y(t,n){return n[0]=t[3],n[1]=t[4],n[2]=t[5],n}function S(t,n,e=t){return e[0]=n[0],e[1]=n[1],e[2]=n[2],e!==t&&(e[3]=t[3],e[4]=t[4],e[5]=t[5]),e}function x(t,n,e=t){return e[3]=n[0],e[4]=n[1],e[5]=n[2],e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2]),t}function w(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t}function j(t){return t?w(t,E):s(E)}function A(t,n){return t[0]=n[0],t[1]=n[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=n[2],t[4]=n[3],t[5]=Number.POSITIVE_INFINITY,t}function O(t,n,e,r,o){return t[0]=n,t[1]=e,t[2]=Number.NEGATIVE_INFINITY,t[3]=r,t[4]=o,t[5]=Number.POSITIVE_INFINITY,t}function T(t){return 6===t.length}function I(t,n,e){if(null==t||null==n)return t===n;if(!T(t)||!T(n))return!1;if(e){for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1}else for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}const E=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];s(),e.d(n,["qv",0,E,"v_",0,N])},65720(t,n,e){e.d(n,{C:()=>p,vt:()=>b,Qy:()=>M,ui:()=>_,ST:()=>w,bU:()=>A,pw:()=>x,m7:()=>g,ZU:()=>v,GH:()=>S,Pi:()=>y,LJ:()=>j,c8:()=>I});var r=e(4341),o=e(58083),s=e(35522),i=e(51850),a=e(78955),u=e(91829),c=e(70328),h=e(71351);function f(t){return t?{ray:(0,h.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,h.vt)(),c0:0,c1:Number.MAX_VALUE}}new r.I(()=>f());var l=e(27921);function d(t,n,e,r){let{t0:o,t1:s}=r;const i=(0,l.mN)(t,n),a=(0,l.mN)(t,e);if(i>=0&&a>=0)return!1;if(i<0&&a>=0){const t=-i/(a-i);if(t<o)return!1;t<s&&(s=t)}else if(i>=0&&a<0){const t=i/(i-a);if(t>s)return!1;t>o&&(o=t)}return r.t0=o,r.t1=s,!0}var m=e(32114);function b(t){return t?[(0,l.vt)(t[0]),(0,l.vt)(t[1]),(0,l.vt)(t[2]),(0,l.vt)(t[3]),(0,l.vt)(t[4]),(0,l.vt)(t[5])]:[(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)()]}function M(){return[(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)()]}function p(t,n){for(let e=0;e<E;e++)(0,l.C)(t[e],n[e]);return t}function _(t,n,e,r=z){const i=(0,o.lw)(m.Rc.get(),n,t);(0,o.B8)(i,i);for(let t=0;t<N;++t){const n=(0,a.Z0)(m.Km.get(),C[t],i);(0,s.hZ)(r[t],n[0]/n[3],n[1]/n[3],n[2]/n[3])}!function(t,n){(0,l.Cr)(n[4],n[0],n[3],t[0]),(0,l.Cr)(n[1],n[5],n[6],t[1]),(0,l.Cr)(n[4],n[5],n[1],t[2]),(0,l.Cr)(n[3],n[2],n[6],t[3]),(0,l.Cr)(n[0],n[1],n[2],t[4]),(0,l.Cr)(n[5],n[4],n[7],t[5])}(e,r)}function g(t,n){return v(t,n.center,n.radius)}function v(t,n,e){for(let r=0;r<E;r++){const o=t[r];if(o[0]*n[0]+o[1]*n[1]+o[2]*n[2]+o[3]>=e)return!1}return!0}function y(t,n,e){for(const r of T)if((0,l.wE)(t[r],n,e))return!0;return!1}function S(t,n,e){const r=(0,c.gX)(n,P),o=(0,c.VL)(n)/2,i=(0,c.yr)(n)/2,a=(0,c.uJ)(n)/2;return e?function(t,n,e,r,o,i){const a=(0,s.Z0)(R,n,i);for(let n=0;n<E;n++){const s=t[n];if(s[0]*a[0]+s[1]*a[1]+s[2]*a[2]+s[3]-(Math.abs(s[0]*i[0]+s[1]*i[1]+s[2]*i[2])*e+Math.abs(s[0]*i[4]+s[1]*i[5]+s[2]*i[6])*r+Math.abs(s[0]*i[8]+s[1]*i[9]+s[2]*i[10])*o)>0)return!1}return!0}(t,r,o,i,a,e):function(t,n,e,r,o){for(let s=0;s<E;s++){const i=t[s];if(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]+i[3]-(Math.abs(i[0])*e+Math.abs(i[1])*r+Math.abs(i[2])*o)>0)return!1}return!0}(t,r,o,i,a)}function x(t,n){return O(t,function(t,n=f()){return(0,h.C)(t,n.ray),n.c0=0,n.c1=Number.MAX_VALUE,n}(n,q.get()))}function w(t,n,e){return O(t,function(t,n,e=f()){const r=(0,s.Bw)(t.vector);return(0,h.fA)(t.origin,n,e.ray),e.c0=0,e.c1=r,e}(n,e,q.get()))}function j(t,n,e){return function(t,n,e,r){const o={t0:0,t1:1};for(const s of n)if(!d(t[s],e,r,o))return!1;return o.t0<o.t1}(t,T,n,e)}function A(t,n){for(let e=0;e<E;e++)if((0,l.mN)(t[e],n)>0)return!1;return!0}function O(t,n){for(let e=0;e<E;e++)if(!(0,l.$Q)(t[e],n))return!1;return!0}const T=[0,1,2,3,5],I={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]},E=6,N=8,C=[(0,u.fA)(-1,-1,-1,1),(0,u.fA)(1,-1,-1,1),(0,u.fA)(1,1,-1,1),(0,u.fA)(-1,1,-1,1),(0,u.fA)(-1,-1,1,1),(0,u.fA)(1,-1,1,1),(0,u.fA)(1,1,1,1),(0,u.fA)(-1,1,1,1)],q=new r.I(f),z=M(),P=(0,i.vt)(),R=(0,i.vt)()},27921(t,n,e){e.d(n,{$Q:()=>T,BX:()=>O,C:()=>c,Cr:()=>d,H:()=>E,LV:()=>u,O_:()=>l,Qj:()=>h,T7:()=>w,Ui:()=>x,_I:()=>N,fA:()=>f,gv:()=>j,lU:()=>m,mN:()=>C,mP:()=>y,mR:()=>S,vE:()=>P,vt:()=>a,wE:()=>q});var r=e(34727),o=e(35522),s=e(51850),i=(e(78955),e(44280),e(32114));function a(t=R){return[t[0],t[1],t[2],t[3]]}function u(t=R[0],n=R[1],e=R[2],r=R[3]){return f(t,n,e,r,i.Km.get())}function c(t,n){return f(n[0],n[1],n[2],n[3],t)}function h(t){return t}function f(t,n,e,r,o=a()){return o[0]=t,o[1]=n,o[2]=e,o[3]=r,o}function l(t,n,e){const r=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],o=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return e[0]=n[0]*o,e[1]=n[1]*o,e[2]=n[2]*o,e[3]=-(e[0]*t[0]+e[1]*t[1]+e[2]*t[2]),e}function d(t,n,e,r=a()){const o=e[0]-n[0],s=e[1]-n[1],i=e[2]-n[2],u=t[0]-n[0],c=t[1]-n[1],h=t[2]-n[2],f=s*h-i*c,l=i*u-o*h,d=o*c-s*u,m=f*f+l*l+d*d,b=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=f*b,r[1]=l*b,r[2]=d*b,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function m(t,n,e,r=0,s=Math.floor(e*(1/3)),i=Math.floor(e*(2/3))){if(e<3)return!1;n(M,r);let a=s,u=!1;for(;a<e-1&&!u;)n(p,a),a++,u=!(0,o.t2)(M,p);if(!u)return!1;for(a=Math.max(a,i),u=!1;a<e&&!u;)n(_,a),a++,(0,o.Re)(g,M,p),(0,o.S8)(g,g),(0,o.Re)(v,p,_),(0,o.S8)(v,v),u=!(0,o.t2)(M,_)&&!(0,o.t2)(p,_)&&Math.abs((0,o.Om)(g,v))<b;return u?(d(M,p,_,t),!0):(0!==r||1!==s||2!==i)&&m(t,n,e,0,1,2)}e(32728);const b=.99619469809,M=(0,s.vt)(),p=(0,s.vt)(),_=(0,s.vt)(),g=(0,s.vt)(),v=(0,s.vt)();function y(t,n,e){return n!==t&&c(t,n),t[3]=-(0,o.Om)(t,e),t}function S(t,n,e,r){return(0,o.$A)(_,n,t),l(e,_,r)}function x(t,n,e){return null!=n&&z(P(t,n.origin,n.direction,F,e))}function w(t,n,e){return z(P(t,n.origin,n.vector,0,e))}function j(t,n,e){return z(P(t,n.origin,n.vector,1,e))}function A(t,n){return C(t,n)<=0}function O(t,n){return C(t,n)>=0}function T(t,n){return function(t,n,e,r,s,i,a){const u=(0,o.Om)(t,e),c=C(t,n);if(u>-1e-6&&u<1e-6)return I(c,s,i);const h=-c/u,f=I(u,s,!1);return!(a&&!f&&!I(c,s,i))&&(f?h>r.c0&&(r.c0=h):h<r.c1&&(r.c1=h),r.c0<=r.c1)}(t,n.ray.origin,n.ray.direction,n,!1,!1,!0)}function I(t,n,e){return e?n?t>=0:t<=0:n?t>0:t<0}function E(t,n,e,r=!1){let s=n.at(-1),i=C(t,s),a=r?i>0:i<=0;for(let u=0;u<n.length;u++){const c=n.at(u),h=C(t,c),f=r?h>0:h<=0;a!==f&&(0,o.Cc)(e(),s,c,i/(i-h)),f&&(0,o.C)(e(),c),s=c,i=h,a=f}}function N(t,n,e){const r=(0,o.hs)(i.rq.get(),t,-t[3]),s=function(t,n,e){const r=(0,o.hs)(i.rq.get(),t,(0,o.Om)(t,n));return(0,o.Re)(e,n,r),e}(t,(0,o.Re)(i.rq.get(),n,r),i.rq.get());return(0,o.WQ)(e,s,r),e}function C(t,n){return(0,o.Om)(t,n)+t[3]}function q(t,n,e){for(let r=0;r<e;++r)if(A(t,n[r]))return!1;return!0}function z(t){return 0===t||1===t}function P(t,n,e,s,i){const a=(0,o.Om)(t,e),u=C(t,n);if(0===a)return u>=0?2:3;let c=-u/a;return 1&s&&(c=(0,r.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?u>=0?2:3:((0,o.WQ)(i,n,(0,o.hs)(i,e,c)),u>=0?0:1)}const R=[0,0,1,0],F=8;(0,s.vt)()},44280(t,n,e){e.d(n,{g7:()=>a,gr:()=>i});var r=e(34727),o=e(35522),s=e(51850);function i(t,n){return(0,o.Om)(t,n)/(0,o.Bw)(t)}function a(t,n){const e=(0,o.Om)(t,n)/((0,o.Bw)(t)*(0,o.Bw)(n));return-(0,r.XM)(e)}(0,s.vt)(),(0,s.vt)()},32114(t,n,e){e.d(n,{Rc:()=>d,rq:()=>f,Km:()=>l}),e(44208);var r=e(26390),o=e(29242),s=e(9093),i=e(82534),a=e(48163),u=e(51850),c=e(91829);class h{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(u.vt)}static createVec4f64(){return new h(c.vt)}static createMat3f64(){return new h(o.vt)}static createMat4f64(){return new h(s.vt)}static createQuatf64(){return new h(i.vt)}get test(){}}h.createVec2f64();const f=h.createVec3f64(),l=h.createVec4f64(),d=(h.createMat3f64(),h.createMat4f64());h.createQuatf64()},32728(t,n,e){e.d(n,{YH:()=>i,nu:()=>a,wp:()=>s}),e(34727);var r=e(35522),o=e(51850);function s(t,n){const e=Math.sqrt(n[0]*n[0]+n[4]*n[4]+n[8]*n[8]),o=Math.sqrt(n[1]*n[1]+n[5]*n[5]+n[9]*n[9]),s=Math.sqrt(n[2]*n[2]+n[6]*n[6]+n[10]*n[10]);return(0,r.hZ)(t,e,o,s),t}function i(t,n,e){e=e||t;const o=(0,r.Om)(t,n);(0,r.hZ)(e,t[0]-o*n[0],t[1]-o*n[1],t[2]-o*n[2]),(0,r.S8)(e,e)}function a(t,n,e,s=(0,o.vt)()){const i=(0,r.Bw)(t),a=(0,r.Bw)(n),h=(0,r.Om)(t,n)/(i*a);if(h<.9999999999999999){const o=Math.acos(h),f=((1-e)*i+e*a)/Math.sin(o),l=f/i*Math.sin((1-e)*o),d=f/a*Math.sin(e*o);return(0,r.hs)(u,t,l),(0,r.hs)(c,n,d),(0,r.WQ)(s,u,c)}return(0,r.Cc)(s,t,n,e)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const u=(0,o.vt)(),c=(0,o.vt)()},70491(t,n,e){e.r(n),e.d(n,{default:()=>J});var r=e(32198),o=e(17676),s=e(24326),i=e(91429),a=e(35522),u=e(51850),c=e(11964),h=e(94008),f=e(93687),l=e(15142),d=e(65720),m=e(71351),b=e(620);class M{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,n){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new p,this._objectCount=0,n&&(void 0!==n.maximumObjectsPerNode&&(this._maximumObjectsPerNode=n.maximumObjectsPerNode),void 0!==n.maximumDepth&&(this._maximumDepth=n.maximumDepth))}destroy(){this._degenerateObjects.clear(),p.clearPool(),z[0]=null,D.prune(),Z.prune()}add(t){const n=Array.from(t);this._grow(n);const e=p.acquire();for(const t of n)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(e.init(this._root),this._add(t,e));p.release(e)}remove(t,n=null){this._objectCount-=t.length;const e=p.acquire();for(const r of t){const t=n??this.objectToBoundingSphere(r);E(t.radius)?(e.init(this._root),y(r,t,e)):this._degenerateObjects.delete(r)}p.release(e),this._shrink()}update(t,n){if(!E(n.radius)&&this._isDegenerate(t))return;const e=function(t){return z[0]=t,z}(t);this.remove(e,n),this.add(e)}forEachAlongRay(t,n,e){const r=(0,m.LV)(t,n);g(this._root,t=>{if(!function(t,n){return A(n.bounds.center,2*-n.halfSize,F),A(n.bounds.center,2*n.halfSize,V),(0,b.O_)(t.origin,t.direction,F,V)}(r,t))return!1;const n=t.node;return n.terminals.forAll(t=>{this._intersectsObject(r,t)&&e(t)}),null!==n.residents&&n.residents.forAll(t=>{this._intersectsObject(r,t)&&e(t)}),!0})}forEachAlongRayWithVerticalOffset(t,n,e,r){const o=(0,m.LV)(t,n);g(this._root,t=>{if(!function(t,n,e){return A(n.bounds.center,2*-n.halfSize,F),A(n.bounds.center,2*n.halfSize,V),e.applyToMinMax(F,V),(0,b.O_)(t.origin,t.direction,F,V)}(o,t,r))return!1;const n=t.node;return n.terminals.forAll(t=>{this._intersectsObjectWithOffset(o,t,r)&&e(t)}),null!==n.residents&&n.residents.forAll(t=>{this._intersectsObjectWithOffset(o,t,r)&&e(t)}),!0})}forEach(t){for(const n of this.values())t(n)}*values(){for(const t of this._nodeIteratorValues()){const n=t.node;yield*n.terminals,null!==n.residents&&(yield*n.residents)}yield*this.degenerateObjectValues()}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}*degenerateObjectValues(){yield*this._degenerateObjects.values()}findClosest(t,n,e,r=()=>!0,o=1/0){let s=1/0,i=1/0,u=null;const c=T(t,n),h=a=>{if(--o,!r(a))return;const c=this.objectToBoundingSphere(a);if(!(0,d.m7)(e,c))return;const h=I(t,n,c.center),f=h-c.radius,l=h+c.radius;f<s&&(s=f,i=l,u=a)};return v(this._root,r=>{if(o<=0||!(0,d.ZU)(e,r.bounds.center,2*r.bounds.radius))return!1;if((0,a.hs)(R,c,2*r.halfSize),(0,a.WQ)(R,R,r.bounds.center),I(t,n,R)>i)return!1;const s=r.node;return s.terminals.forAll(t=>h(t)),null!==s.residents&&s.residents.forAll(t=>h(t)),!0},t,n),u}forEachInDepthRange(t,n,e,r,o,s,i){let u=-1/0,c=1/0;const h={setRange:t=>{1===e?(u=Math.max(u,t.near),c=Math.min(c,t.far)):(u=Math.max(u,-t.far),c=Math.min(c,-t.near))}};h.setRange(r);const f=I(n,e,t),l=T(n,e),m=T(n,-e),b=t=>{if(!i(t))return;const r=this.objectToBoundingSphere(t),a=I(n,e,r.center)-f,l=a-r.radius,m=a+r.radius;l>c||m<u||!(0,d.m7)(s,r)||o(t,h)};v(this._root,t=>{if(!(0,d.ZU)(s,t.bounds.center,2*t.bounds.radius))return!1;if((0,a.hs)(R,l,2*t.halfSize),(0,a.WQ)(R,R,t.bounds.center),I(n,e,R)-f>c)return!1;if((0,a.hs)(R,m,2*t.halfSize),(0,a.WQ)(R,R,t.bounds.center),I(n,e,R)-f<u)return!1;const r=t.node;return r.terminals.forAll(t=>b(t)),null!==r.residents&&r.residents.forAll(t=>b(t)),!0},n,e)}forEachNode(t){g(this._root,n=>t(n.node,n.bounds,n.halfSize,n.depth))}forEachIntersectingFrustum(t,n,e=()=>!0){for(const r of this.intersectingFrustumValues(t,e))n(r)}*intersectingFrustumValues(t,n=()=>!0){for(const e of this._nodeIteratorValues(n=>(0,d.ZU)(t,n.bounds.center,2*n.bounds.radius))){const r=e.node;for(const e of r.terminals)n(e)&&(0,d.m7)(t,this.objectToBoundingSphere(e))&&(yield e);if(null!==r.residents)for(const e of r.residents)n(e)&&(0,d.m7)(t,this.objectToBoundingSphere(e))&&(yield e)}}*_nodeIteratorValues(t=()=>!0){yield*_(this._root,t)}forEachNeighbor(t,n){const e=n.radius,r=n.center,o=e=>{const r=this.objectToBoundingSphere(e);return!n.intersects(r)||t(e)};let s=!0;const i=t=>{s&&(s=o(t))};g(this._root,t=>{const n=2*t.bounds.radius,o=e+n;if((0,a.hG)(t.bounds.center,r)-o*o>0)return!1;const u=t.node;return u.terminals.forAll(i),s&&null!==u.residents&&u.residents.forAll(i),s}),s&&this.forEachDegenerateObject(i)}_intersectsObject(t,n){const e=this.objectToBoundingSphere(n);return!(e.radius>0)||e.intersectRay(t)}_intersectsObjectWithOffset(t,n,e){const r=this.objectToBoundingSphere(n);return!(r.radius>0)||e.applyToBoundingSphere(r).intersectRay(t)}_add(t,n){n.advanceTo(this.objectToBoundingSphere(t))?n.node.terminals.push(t):(n.node.residents.push(t),n.node.residents.length>this._maximumObjectsPerNode&&n.depth<this._maximumDepth&&this._split(n))}_split(t){const n=t.node.residents;t.node.residents=null;for(let e=0;e<n.length;e++){const r=p.acquire().init(t);this._add(n.at(e),r),p.release(r)}}_grow(t){if(O(t,t=>this.objectToBoundingSphere(t),B),E(B.radius)&&!this._fitsInsideTree(B))if(x(this._root.node))this._root.bounds.copyFrom(B),this._root.halfSize=1.25*this._root.bounds.radius,this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(B);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(B,t):this._growRootAsSubNode(t),p.release(t)}}_rebuildTree(t,n){L.center=n.bounds.center,L.radius=n.halfSize,O([t,L],t=>t,k);const e=p.acquire().init(this._root);this._root.initFrom(null,k,k.radius),this._root.increaseHalfSize(1.25),g(e,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),p.release(e)}_placingRootViolatesMaxDepth(t){const n=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let e=0;return g(this._root,t=>(e=Math.max(e,t.depth),e+n<=this._maximumDepth)),e+n>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const n=t.radius,e=t.center;let r=-1/0;const o=this._root.bounds.center,s=this._root.halfSize;for(let t=0;t<3;t++){const i=o[t]-s-(e[t]-n),a=e[t]+n-(o[t]+s),u=Math.max(0,Math.ceil(i/(2*s))),c=Math.max(0,Math.ceil(a/(2*s)))+1,h=2**Math.ceil(Math.log(u+c)*Math.LOG2E);r=Math.max(r,h),Q[t].min=u,Q[t].max=c}for(let t=0;t<3;t++){let n=Q[t].min,e=Q[t].max;const i=(r-(n+e))/2;n+=Math.ceil(i),e+=Math.floor(i);const a=o[t]-s-n*s*2;P.center[t]=a+(e+n)*s}const i=r*s;return P.radius=i*q,p.acquire().initFrom(null,P,i,0)}_growRootAsSubNode(t){const n=this._root.node;B.center=this._root.bounds.center,B.radius=this._root.halfSize,this._root.init(t),t.advanceTo(B,null,!0),t.node.children=n.children,t.node.residents=n.residents,t.node.terminals=n.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const n=this._root.node.children;let e=0,r=0;for(;r<n.length&&null==t;)e=r++,t=n[e];for(;r<n.length;)if(n[r++])return-1;return e}_isDegenerate(t){return!E(this.objectToBoundingSphere(t).radius)}_fitsInsideTree(t){const n=this._root.bounds,e=this._root.halfSize;return t.radius<=e&&t.center[0]>=n.center[0]-e&&t.center[0]<=n.center[0]+e&&t.center[1]>=n.center[1]-e&&t.center[1]<=n.center[1]+e&&t.center[2]>=n.center[2]-e&&t.center[2]<=n.center[2]+e}_nodeToJSON(t){const n=t.children.map(t=>t?this._nodeToJSON(t):null),e=t.residents?.map(t=>this.objectToBoundingSphere(t)),r=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:n,residents:e,terminals:r}}}class p{constructor(){this.bounds=new h.iy,this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,n,e,r=this.depth){return this.node=null!=t?t:p.createEmptyNode(),n&&this.bounds.copyFrom(n),this.halfSize=e,this.depth=r,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds.radius=this.halfSize*q}advance(t){let n=this.node.children[t];n||(n=p.createEmptyNode(),this.node.children[t]=n),this.node=n,this.halfSize/=2,this.depth++;const e=N[t];return this.bounds.center[0]+=e[0]*this.halfSize,this.bounds.center[1]+=e[1]*this.halfSize,this.bounds.center[2]+=e[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,n,e=!1){for(;;){if(this.isTerminalFor(t))return n?.(this,-1),!0;if(this.isLeaf()){if(!e)return n?.(this,-1),!1;this.node.residents=null}const r=this._childIndex(t);n?.(this,r),this.advance(r)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t.radius>this.halfSize/2}_childIndex(t){const n=this.bounds.center;return(n[0]<t.center[0]?1:0)+(n[1]<t.center[1]?2:0)+(n[2]<t.center[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new l.A({shrink:!0}),residents:new l.A({shrink:!0})}}static{this._pool=new f.A(()=>new p)}static acquire(){return p._pool.acquire()}static release(t){p._pool.release(t)}static clearPool(){p._pool.prune()}}function*_(t,n=()=>!0){const e=[p.acquire().init(t)];for(;0!==e.length;){const t=e.pop();if(n(t)){if(yield t,!t.isLeaf())for(let n=0;n<t.node.children.length;n++)t.node.children[n]&&e.push(p.acquire().init(t).advance(n));p.release(t)}}}function g(t,n){const e=_(t,n);for(const t of e);}function v(t,n,e,r=1){let o=p.acquire().init(t);const s=[o];for(function(t,n,e){if(!Z.length)for(let t=0;t<8;++t)Z.push({index:0,distance:0});for(let e=0;e<8;++e){const r=N[e];Z.data[e].index=e,Z.data[e].distance=I(t,n,r)}Z.sort((t,n)=>t.distance-n.distance);for(let t=0;t<8;++t)e[t]=Z.data[t].index}(e,r,W);0!==s.length;){if(o=s.pop(),n(o)&&!o.isLeaf())for(let t=7;t>=0;--t){const n=W[t];o.node.children[n]&&s.push(p.acquire().init(o).advance(n))}p.release(o)}}function y(t,n,e){D.clear();const r=e.advanceTo(n,(t,n)=>{D.push(t.node),D.push(n)})?e.node.terminals:e.node.residents;if(r.removeUnordered(t),0===r.length)for(let t=D.length-2;t>=0&&S(D.data[t],D.data[t+1]);t-=2);}function S(t,n){return n>=0&&(t.children[n]=null),!!x(t)&&(null===t.residents&&(t.residents=new l.A({shrink:!0})),!0)}function x(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let n=0;n<t.children.length;n++)if(t.children[n])return!1;return!0}function w(t,n){t[0]=Math.min(t[0],n.center[0]-n.radius),t[1]=Math.min(t[1],n.center[1]-n.radius),t[2]=Math.min(t[2],n.center[2]-n.radius)}function j(t,n){t[0]=Math.max(t[0],n.center[0]+n.radius),t[1]=Math.max(t[1],n.center[1]+n.radius),t[2]=Math.max(t[2],n.center[2]+n.radius)}function A(t,n,e){e[0]=t[0]+n,e[1]=t[1]+n,e[2]=t[2]+n}function O(t,n,e){F[0]=1/0,F[1]=1/0,F[2]=1/0,V[0]=-1/0,V[1]=-1/0,V[2]=-1/0;for(const e of t){const t=n(e);E(t.radius)&&(w(F,t),j(V,t))}(0,a.Cc)(e.center,F,V,.5),e.radius=Math.max(V[0]-F[0],V[1]-F[1],V[2]-F[2])/2}function T(t,n){let e,r=1/0;for(let o=0;o<8;++o){const s=I(t,n,C[o]);s<r&&(r=s,e=C[o])}return e}function I(t,n,e){return n*(t[0]*e[0]+t[1]*e[1]+t[2]*e[2])}function E(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}const N=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],C=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],q=Math.sqrt(3),z=[null],P=new h.iy,R=(0,u.vt)(),F=(0,u.vt)(),V=(0,u.vt)(),D=new l.A,B=new h.iy,L=new h.iy,k=new h.iy,Q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],Z=new l.A,W=[0,0,0,0,0,0,0,0];var Y=e(44801);function H(t,n,e){const r=new h.iy;return(0,a.hs)(r.center,t,.5),(0,a.Ln)(r.center,r.center,n,.5),r.radius=(0,a.Io)(r.center,t),(0,a.WQ)(r.center,r.center,e),r}class U{constructor(t,n,e){this.objectId=t,this.target=n,this.distance=e}}class X extends U{constructor(t,n,e){super(t,n,e),this.type="vertex"}}class K extends U{constructor(t,n,e,r,o){super(t,n,e),this.start=r,this.end=o,this.type="edge"}}let G=class{constructor(){this._idToComponent=new Map,this._components=new M(t=>t.bounds),this._edges=new M(t=>t.bounds),this._tmpLineSegment=(0,c.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,n){await Promise.resolve(),(0,o.Te)(n);const e=t;e.mbs=new h.iy(t.mbsJSON),await this._ensureEdgeLocations(e,n);const r=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(e,t,r),r.length<1e3),e.mbs),{result:{candidates:r}}}async _ensureEdgeLocations(t,n){const e=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:n,uid:r}=t;e.push({id:n,uid:r})}return!0},t.mbs),!e.length)return;const r={components:e},o=await this.remoteClient.invoke("fetchAllEdgeLocations",r,n??{});for(const t of o.components)this._setFetchEdgeLocations(t)}async add(t){const n=new tt(t.id,new h.iy(t.bounds));return this._idToComponent.set(n.id,n),this._components.add([n]),{result:{}}}async remove(t){const n=this._idToComponent.get(t.id);if(n){const t=[];this._edges.forEachNeighbor(e=>(e.component===n&&t.push(e),!0),n.bounds),this._edges.remove(t),this._components.remove([n]),this._idToComponent.delete(n.id)}return{result:{}}}_setFetchEdgeLocations(t){const n=this._idToComponent.get(t.id);if(null==n||t.uid!==n.uid)return;const e=Y.HY.createView(t.locations),r=new Array(e.count),o=(0,u.vt)(),s=(0,u.vt)();for(let i=0;i<e.count;i++){e.position0.getVec(i,o),e.position1.getVec(i,s);const a=H(o,s,t.origin),u=new nt(n,i,a);r[i]=u}this._edges.add(r);const{objectIds:i,origin:a}=t;n.info={locations:e,objectIds:i,origin:a}}_addCandidates(t,n,e){const{info:r}=n.component,{origin:o,objectIds:s}=r,i=r.locations,u=i.position0.getVec(n.index,this._tmpP1),c=i.position1.getVec(n.index,this._tmpP2);(0,a.WQ)(u,u,o),(0,a.WQ)(c,c,o);const h=s[i.componentIndex.get(n.index)];this._addEdgeCandidate(t,h,u,c,e),$(t,h,u,e),$(t,h,c,e)}_addEdgeCandidate(t,n,e,r,o){if(!t.returnEdge)return;const s=t.mbs.center,i=(0,c.Cr)(e,r,this._tmpLineSegment),h=(0,c._I)(i,s,this._tmpP3);t.mbs.contains(h)&&o.push(new K(n,(0,u.o8)(h),(0,a.Io)(s,h),(0,u.o8)(e),(0,u.o8)(r)))}};G=(0,r.Cg)([(0,i.$K)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],G);const J=G;function $(t,n,e,r){t.returnVertex&&t.mbs.contains(e)&&r.push(new X(n,(0,u.o8)(e),(0,a.Io)(t.mbs.center,e)))}class tt{constructor(t,n){this.id=t,this.bounds=n,this.info=null,this.uid=(0,s.c)()}}class nt{constructor(t,n,e){this.component=t,this.index=n,this.bounds=e}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7262],{38969(t,e,r){r.d(e,{i:()=>a});var n=r(37955);function a(t,e){return new Promise((r,a)=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(e((0,n.Oo)(t,"canplay",r)),e((0,n.Oo)(t,"error",a)))})}},31217(t,e,r){r.d(e,{D:()=>a});var n=r(56507);async function a(t,e){return(await(0,n.A)(t,{responseType:"image",...e})).data}},46859(t,e,r){r.d(e,{h:()=>V});var n=r(49186),a=r(65529),i=r(97768),s=r(17676),o=r(34275),l=r(24326),u=r(84952),m=r(38969),h=r(31217),c=r(95117),d=r(53966),p=r(2741);let _;var g=r(63907),f=r(25530),T=r(42293);const x=()=>d.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let w=null,C=null;async function E(){return null==C&&(_??=(async()=>{const t=await r.e(9321).then(()=>r(49321)),e=await t.default({locateFile:t=>(0,p.s)(`esri/libs/basisu/${t}`)});return e.initializeBasis(),e})(),C=_,w=await C),C}function M(t,e,r,n,a){const i=(0,T.MW)(e?g.CQ.COMPRESSED_RGBA8_ETC2_EAC:g.CQ.COMPRESSED_RGB8_ETC2),s=a&&t>1?(4**t-1)/(3*4**(t-1)):1;return Math.ceil(r*n*i*s)}function y(t){return t.getNumImages()>=1&&!t.isUASTC()}function A(t){return t.getFaces()>=1&&(t.isETC1S()||t.isUASTC())}function F(t,e,r,n,a,i,s,o,l=!1){const{compressedTextureETC:u,compressedTextureS3TC:m}=t.capabilities,{basisFormat:h,internalFormat:c}=function(t,e,r,n){return t?r?{basisFormat:1,internalFormat:n?g.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:g.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:n?g.CQ.COMPRESSED_SRGB8_ETC2:g.CQ.COMPRESSED_RGB8_ETC2}:e?r?{basisFormat:3,internalFormat:g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:n?g.H0.SRGB8_ALPHA8:6408}}(null!=u,null!=m,n,l),d=e.hasMipmap?r:Math.min(1,r),p=[];for(let t=0;t<d;t++)p.push(new Uint8Array(s(t,h))),o(t,h,p[t]);return e.internalFormat=c,e.hasMipmap=p.length>1,e.samplingMode=e.hasMipmap?9987:9729,e.width=a,e.height=i,new f.A(t,e,{type:"compressed",levels:p})}function v(t,e){const r=new Uint32Array(t.buffer,t.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return x().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==g.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return x().error("Unsupported KTX1 image"),null;const n=r[7];let a=1,i=r[9],s=r[10];if(3&i||3&s)return null;const o=i,l=s;let u,m;!1!==e&&(a=Math.max(1,r[14]));let h=t.byteOffset+64;const c=[];for(let e=0;e<a;++e)m=(t[h]|t[h+1]<<8|t[h+2]<<16|t[h+3]<<24)>>>0,h+=4,u=new Uint8Array(t.buffer,h,m),c.push(u),h+=m,i=Math.max(1,i>>1),s=Math.max(1,s>>1);return{textureData:{type:"compressed",levels:c},internalFormat:n,width:o,height:l}}const D=()=>d.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function b(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}const S=b("DXT1"),R=b("DXT3"),I=b("DXT5");function P(t,e){const r=new Int32Array(t.buffer,t.byteOffset,31);if(542327876!==r[0])return D().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return D().error("Unsupported format, must contain a FourCC code"),null;const n=r[21];let a,i;switch(n){case S:a=8,i=g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case R:a=16,i=g.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case I:a=16,i=g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return D().error("Unsupported FourCC code:",function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)}(n)),null}let s=1,o=r[4],l=r[3];(3&o||3&l)&&(D().warn("Rounding up compressed texture size to nearest multiple of 4."),o=o+3&-4,l=l+3&-4);const u=o,m=l;let h,c;131072&r[2]&&!1!==e&&(s=Math.max(1,r[7]));let d=t.byteOffset+r[1]+4;const p=[];for(let e=0;e<s;++e)c=(o+3>>2)*(l+3>>2)*a,h=new Uint8Array(t.buffer,d,c),p.push(h),d+=c,o=Math.max(1,o>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:i,width:u,height:m}}function H(t,e){return e=16*Math.floor(e/16),Math.min(16*Math.round(t/16),e)}function L(t,e){const[r,n]=function({width:t,height:e},{maxPreferredTexturePixels:r,maxTextureSize:n}){const a=Math.max(t,e),i=t*e;if(a<=n&&i<=r)return[t,e];const s=Math.min(Math.sqrt(r/i),n/a);return[H(Math.round(t*s),n),H(Math.round(e*s),n)]}(t,e);return t.width===r&&t.height===n?t:U(t,r,n)}function U(t,e,r){if(t instanceof ImageData)return U(function(t){const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const r=e.getContext("2d");if(null==r)throw new n.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(t,0,0),e}(t),e,r);const a=document.createElement("canvas");return a.width=e,a.height=r,a.getContext("2d").drawImage(t,0,0,a.width,a.height),a}var O=r(620),B=r(67171),X=r(12541);class V{constructor(t,e){this._data=t,this.id=(0,l.c)(),this.events=new a.bk,this._parameters={...Q,...e},this._startPreload(t)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(t){t instanceof HTMLVideoElement?(this.update=e=>this._update(t,e),this._startPreloadVideoElement(t)):t instanceof HTMLImageElement&&this._startPreloadImageElement(t)}_startPreloadVideoElement(t){if(!((0,u.w8)(t.src)||"auto"===t.preload&&t.crossOrigin)&&(t.preload="auto",t.crossOrigin="anonymous",t.src=t.src,t.paused&&t.autoplay)){const e=[];(0,m.i)(t,t=>e.push(t)).then(()=>{t.play()}).finally(()=>e.forEach(t=>t.remove()))}}_startPreloadImageElement(t){(0,u.DB)(t.src)||(0,u.w8)(t.src)||t.crossOrigin||(t.crossOrigin="anonymous",t.src=t.src)}_createDescriptor(t){const e=new B.R;return e.wrapMode=this._parameters.wrap??10497,e.flipped=!this._parameters.noUnpackFlip,e.samplingMode=this._parameters.mipmap?9987:9729,e.hasMipmap=!!this._parameters.mipmap,e.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,e.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?t.parameters.maxMaxAnisotropy:1),e.dataType=this._parameters.dataType??e.dataType,e.pixelFormat=this._parameters.pixelFormat??e.pixelFormat,e.internalFormat=this._parameters.internalFormat??e.internalFormat,e.isImmutable=!0===this._parameters.immutable&&function(t){return null!=t&&((0,X.tl)(t)||(0,X.tr)(t)||(0,X.CR)(t)||(0,X.QJ)(t))}(this._parameters.internalFormat),e}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(t,e){if(null==t)return 0;if((0,o.mw)(t)||(0,o.mg)(t))return"image/ktx2"===e.encoding?function(t,e){if(null==w)return t.byteLength;const r=new w.KTX2File(new Uint8Array(t)),n=A(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),e):0;return r.close(),r.delete(),n}(t,!!e.mipmap):"image/x.basis"===e.encoding?function(t,e){if(null==w)return t.byteLength;const r=new w.BasisFile(new Uint8Array(t)),n=y(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),e):0;return r.close(),r.delete(),n}(t,!!e.mipmap):t.byteLength;const{width:r,height:n}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?k(t):e,a=e.pixelFormat??6408,i=(0,T.wH)(a);return(e.mipmap?4/3:1)*r*n*i||0}(this._data,this._parameters)}load(t){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const e=this._data;return null==e?(this._texture=new f.A(t,this._createDescriptor(t),null),this._texture):(this._emptyTexture=t.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof e?this._loadFromURL(t,e):e instanceof Image?this._loadFromImageElement(t,e):e instanceof HTMLVideoElement?this._loadFromVideoElement(t,e):e instanceof ImageData||e instanceof HTMLCanvasElement?this._loadFromImage(t,e):(0,o.mg)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,e):(0,o.mw)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,new Uint8Array(e)):(0,o.mg)(e)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(t,e):(0,o.mw)(e)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(t,new Uint8Array(e)):((0,o.mw)(e)||(0,o.mg)(e))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(t,e):((0,o.mw)(e)||(0,o.mg)(e))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(t,e):(0,o.mw)(e)?this._loadFromPixelData(t,new Uint8Array(e)):(0,o.iu)(e)?this._loadFromPixelData(t,e):null)}_update(t,e){return null==this._texture||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e===t.currentTime?e:(this._texture.setData(t),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),t.currentTime)}_loadFromDDSData(t,e){return this._texture=function(t,e,r){const n=P(r,e.hasMipmap??!1);if(null==n)throw new Error("DDS texture data is null");const{textureData:a,internalFormat:i,width:s,height:o}=n;return e.samplingMode=a.levels.length>1?9987:9729,e.hasMipmap=a.levels.length>1,e.internalFormat=i,e.width=s,e.height=o,new f.A(t,e,a)}(t,this._createDescriptor(t),e),this._emptyTexture=null,this._texture}_loadFromKTX1(t,e){return this._texture=function(t,e,r){const n=v(r,e.hasMipmap??!1);if(null==n)throw new Error("KTX1 texture data is null");const{textureData:a,internalFormat:i,width:s,height:o}=n;return e.samplingMode=a.levels.length>1?9987:9729,e.hasMipmap=a.levels.length>1,e.internalFormat=i,e.width=s,e.height=o,new f.A(t,e,a)}(t,this._createDescriptor(t),e),this._emptyTexture=null,this._texture}_loadFromKTX2(t,e){return this._loadAsync(()=>async function(t,e,r,n=!1){null==w&&(w=await E());const a=new w.KTX2File(new Uint8Array(r));if(!A(a))return null;const i=n&&2===a.getDFDTransferFunc();a.startTranscoding();const s=F(t,e,a.getLevels(),a.getHasAlpha(),a.getWidth(),a.getHeight(),(t,e)=>a.getImageTranscodedSizeInBytes(t,0,0,e),(t,e,r)=>a.transcodeImage(r,t,0,0,e,0,-1,-1),i);return a.close(),a.delete(),s}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromBasis(t,e){return this._loadAsync(()=>async function(t,e,r){null==w&&(w=await E());const n=new w.BasisFile(new Uint8Array(r));if(!y(n))return null;n.startTranscoding();const a=F(t,e,n.getNumLevels(0),n.getHasAlpha(),n.getImageWidth(0,0),n.getImageHeight(0,0),(t,e)=>n.getImageTranscodedSizeInBytes(0,t,e),(t,e,r)=>n.transcodeImage(r,0,t,e,0,0));return n.close(),n.delete(),a}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromPixelData(t,e){(0,O.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(t);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 f.A(t,r,e),this._texture}_loadFromURL(t,e){return this._loadAsync(async r=>{const n=await(0,h.D)(e,{signal:r});return(0,s.Te)(r),this._loadFromImage(t,n)})}_loadFromImageElement(t,e){return e.complete?this._loadFromImage(t,e):this._loadAsync(async r=>{const n=await(0,c.y)(e,e.src,!1,r);return(0,s.Te)(r),this._loadFromImage(t,n)})}_loadFromVideoElement(t,e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(t,e):this._loadFromVideoElementAsync(t,e)}_loadFromVideoElementAsync(t,e){return this._loadAsync(r=>new Promise((a,o)=>{const l=()=>{e.removeEventListener("loadeddata",u),e.removeEventListener("error",m),(0,i.xt)(h)},u=()=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),a(this._loadFromImage(t,e)))},m=t=>{l(),o(t||new n.A("texture:load-error","Failed to load video"))};e.addEventListener("loadeddata",u),e.addEventListener("error",m);const h=(0,s.u7)(r,()=>m((0,s.NK)()))}))}_loadFromImage(t,e){let r=e;r instanceof HTMLVideoElement||(r=L(r,t.parameters));const n=k(r);this._parameters.width=n.width,this._parameters.height=n.height;const a=this._createDescriptor(t);return a.width=n.width,a.height=n.height,a.compress=this._parameters.compressionOptions,this._texture=new f.A(t,a,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(t){const e=new AbortController;this._loadingController=e;const r=t(e.signal);this._loadingPromise=r;const n=()=>{this._loadingController===e&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(n,n),r}unload(){if(this._texture=(0,i.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const t=this._loadingController;this._loadingController=null,this._loadingPromise=null,t.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function k(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}const Q={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},58682(t,e,r){r.d(e,{Uy:()=>l,h7:()=>c});var n=r(35522),a=r(51850),i=r(70328);class s{constructor(t=0,e=!1,r=!0){this.tolerance=t,this.isVerticalRay=e,this.normalRequired=r}}const o=(0,i.vt)();function l(t,e,r,a,i,o){if(!t.visible)return;const l=(0,n.jb)(E,a,r),{tolerance:u}=e,h=new s(u,!1,e.options.normalRequired);if(t.boundingInfo)m(t.readPrimitivePosition,t.boundingInfo,r,l,u,i,h,o);else{const e=t.readPrimitivePosition;!function(t,e,r,a,i,s,o,l){const u=e,m=M,h=Math.abs(u[0]),c=Math.abs(u[1]),d=Math.abs(u[2]),f=h>=c?h>=d?0:2:c>=d?1:2,x=f,w=u[x]<0?2:1,C=(f+w)%3,E=(f+(3-w))%3,y=u[C]/u[x],A=u[E]/u[x],F=1/u[x],v=p,D=_,b=g,{normalRequired:S}=o;for(let e=r;e<a;++e){const r=3*e;i(m[0],r),i(m[1],r+1),i(m[2],r+2),s&&(s.applyToVertex(m[0],m[0][0],m[0][1],m[0][2],e),s.applyToVertex(m[1],m[1][0],m[1][1],m[1][2],e),s.applyToVertex(m[2],m[2][0],m[2][1],m[2][2],e)),(0,n.jb)(v,m[0],t),(0,n.jb)(D,m[1],t),(0,n.jb)(b,m[2],t);const a=v[C]-y*v[x],o=v[E]-A*v[x],u=D[C]-y*D[x],h=D[E]-A*D[x],c=b[C]-y*b[x],d=b[E]-A*b[x],p=c*h-d*u,_=a*d-o*c,g=u*o-h*a;if((p<0||_<0||g<0)&&(p>0||_>0||g>0))continue;const f=p+_+g;if(0===f)continue;const w=p*(F*v[x])+_*(F*D[x])+g*(F*b[x]);if(w*Math.sign(f)<0)continue;const M=w/f;M>=0&&l(M,M,S?T(m):null,e)}}(r,l,0,t.faceCount,e,i,h,o)}}const u=(0,a.vt)();function m(t,e,r,a,s,l,h,c){if(null==e)return;const p=function(t,e){return(0,n.hZ)(e,1/t[0],1/t[1],1/t[2])}(a,u);if((0,i.C)(o,e.box),null!=l&&l.applyToAabb(o),function(t,e,r,n){return function(t,e,r,n){const a=(t[0]-n-e[0])*r[0],i=(t[3]+n-e[0])*r[0];let s=Math.min(a,i),o=Math.max(a,i);const l=(t[1]-n-e[1])*r[1],u=(t[4]+n-e[1])*r[1];if(o=Math.min(o,Math.max(l,u)),o<0)return!1;if(s=Math.max(s,Math.min(l,u)),s>o)return!1;const m=(t[2]-n-e[2])*r[2],h=(t[5]+n-e[2])*r[2];return o=Math.min(o,Math.max(m,h)),!(o<0)&&(s=Math.max(s,Math.min(m,h)),!(s>o)&&s<1/0)}(t,e,r,n)}(o,r,p,s)){const{primitiveIndices:n}=e,i=n.length;if(i>1e3){const n=e.children;if(void 0!==n){for(const e of n)m(t,e,r,a,s,l,h,c);return}}d(r,a,0,i,t,n,l,h,c)}}const h=(0,a.vt)();function c(t,e,r,n,a,i,s,o,l,u=null,m=0){const c=t[0],d=t[1],p=t[2],_=e[0],g=e[1],T=e[2];for(let t=r;t<n;++t){const e=m+(u?.[t]??t),r=3*e,n=s*a[r],x=i[n],w=i[n+1],E=i[n+2],M=s*a[r+1],y=i[M],A=i[M+1],F=i[M+2],v=s*a[r+2],D=y-x,b=A-w,S=F-E,R=i[v]-x,I=i[v+1]-w,P=i[v+2]-E,H=g*P-I*T,L=T*R-P*_,U=_*I-R*g,O=D*H+b*L+S*U,B=O*O;if(B<=C)continue;const X=c-x,V=d-w,k=p-E,Q=(X*H+V*L+k*U)*O;if(Q<0||Q>B)continue;const G=V*S-b*k,K=k*D-S*X,N=X*b-D*V,W=(_*G+g*K+T*N)*O;if(W<0||Q+W>B)continue;const j=(R*G+I*K+P*N)/O;j>=0&&l(j,j,o?f(D,b,S,R,I,P,h):null,e)}}function d(t,e,r,n,a,i,s,o,l){const u=t[0],m=t[1],c=t[2],d=e[0],p=e[1],_=e[2],{normalRequired:g}=o;for(let t=r;t<n;++t){const e=i[t],r=3*e;let[n,o,T]=a(A,r),[x,w,E]=a(A,r+1),[M,F,v]=a(A,r+2);null!=s&&([n,o,T]=s.applyToVertex(y,n,o,T,t),[x,w,E]=s.applyToVertex(y,x,w,E,t),[M,F,v]=s.applyToVertex(y,M,F,v,t));const D=x-n,b=w-o,S=E-T,R=M-n,I=F-o,P=v-T,H=p*P-I*_,L=_*R-P*d,U=d*I-R*p,O=D*H+b*L+S*U,B=O*O;if(B<=C)continue;const X=u-n,V=m-o,k=c-T,Q=(X*H+V*L+k*U)*O;if(Q<0||Q>B)continue;const G=V*S-b*k,K=k*D-S*X,N=X*b-D*V,W=(d*G+p*K+_*N)*O;if(W<0||Q+W>B)continue;const j=(R*G+I*K+P*N)/O;j>=0&&l(j,j,g?f(D,b,S,R,I,P,h):null,e)}}const p=(0,a.vt)(),_=(0,a.vt)(),g=(0,a.vt)();function f(t,e,r,a,i,s,o){return(0,n.hZ)(x,t,e,r),(0,n.hZ)(w,a,i,s),(0,n.$A)(o,x,w),(0,n.S8)(o,o),o}function T(t){return(0,n.jb)(x,t[1],t[0]),(0,n.jb)(w,t[2],t[0]),(0,n.$A)(h,x,w),(0,n.S8)(h,h),h}const x=(0,a.vt)(),w=(0,a.vt)(),C=1e-7*1e-7,E=(0,a.vt)(),M=[(0,a.vt)(),(0,a.vt)(),(0,a.vt)()],y=(0,a.vt)(),A=(0,a.vt)()},74810(t,e,r){r.d(e,{Jr:()=>i});var n=r(35522),a=r(51850);function i({normalTexture:t,metallicRoughnessTexture:e,metallicFactor:r,roughnessFactor:i,emissiveTexture:s,emissiveFactor:o,occlusionTexture:l}){return null==t&&null==e&&null==s&&(null==o||(0,n.t2)(o,a.uY))&&null==l&&(null==i||1===i)&&(null==r||1===r)}const s=(0,a.CN)(1,1,.5),o=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(e,["Bt",0,o,"SY",0,l,"mb",0,s])},49788(t,e,r){const n=1/255.5,a=1-n;r.d(e,["Q",0,n,"v",0,a])}}]);
|