@arcgis/core 5.2.0-next.95 → 5.2.0-next.96
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/WebEditor/geometryUtils.d.ts +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcgisGlobal.d.ts +2 -0
- package/assets/components/assets/icon/aiAgent16.json +1 -0
- package/assets/components/assets/icon/aiAgent24.json +1 -0
- package/assets/components/assets/icon/aiAgent32.json +1 -0
- package/assets/components/assets/icon/aiAgents16.json +1 -0
- package/assets/components/assets/icon/aiAgents24.json +1 -0
- package/assets/components/assets/icon/aiAgents32.json +1 -0
- package/assets/components/assets/icon/explodeGeometry16.json +1 -0
- package/assets/components/assets/icon/explodeGeometry24.json +1 -0
- package/assets/components/assets/icon/explodeGeometry32.json +1 -0
- package/assets/components/assets/icon/integration16.json +1 -0
- package/assets/components/assets/icon/integration24.json +1 -0
- package/assets/components/assets/icon/integration32.json +1 -0
- package/assets/components/assets/icon/spatiotemporalCatalog16.json +1 -0
- package/assets/components/assets/icon/spatiotemporalCatalog24.json +1 -0
- package/assets/components/assets/icon/spatiotemporalCatalog32.json +1 -0
- package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/000f91a18c22377f8525.js +1 -0
- package/assets/esri/core/workers/chunks/{05662a663f761dd3dea5.js → 006146ad6d4a5cbf1a1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd1a7e95a797e1ed4a7b.js → 013c17e07756fa465845.js} +1 -1
- package/assets/esri/core/workers/chunks/014eaccf2c2d357981f0.js +1 -0
- package/assets/esri/core/workers/chunks/{f253875feb11883deb84.js → 04d4cd66485b622403d0.js} +1 -1
- package/assets/esri/core/workers/chunks/05eb064f9b543890ae24.js +1 -0
- package/assets/esri/core/workers/chunks/05fbd1f373cfa3724f0c.js +1 -0
- package/assets/esri/core/workers/chunks/{26737d061c7cfbbab95c.js → 0809a55a2f9be07cc5a9.js} +1 -1
- package/assets/esri/core/workers/chunks/0930738f43ce09b2ed2d.js +1 -0
- package/assets/esri/core/workers/chunks/{691434d4c6a38e63d819.js → 0a242e76bc293b0ad04b.js} +1 -1
- package/assets/esri/core/workers/chunks/0a4092578dc7578bcf76.js +1 -0
- package/assets/esri/core/workers/chunks/0e11bee9b56a7f51b012.js +1 -0
- package/assets/esri/core/workers/chunks/0e65869a5dd5a3917da7.js +1 -0
- package/assets/esri/core/workers/chunks/0ffb5a1275d07dcd9115.js +1 -0
- package/assets/esri/core/workers/chunks/{e370a3337b3c90240e73.js → 105da965fc90604eb6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/1082bb0858585bd4fa21.js +2 -0
- package/assets/esri/core/workers/chunks/{5235b9c21ac4156c2375.js → 10f4c5533f50c3693318.js} +1 -1
- package/assets/esri/core/workers/chunks/1201bb22a2bfd7d7ecba.js +1 -0
- package/assets/esri/core/workers/chunks/16f55c5d642a23c2547e.js +1 -0
- package/assets/esri/core/workers/chunks/{09e01fd1c199be0c8e03.js → 16ffbe484f6cd4736f79.js} +1 -1
- package/assets/esri/core/workers/chunks/{1bf967c68d0c795d3fb4.js → 19a4907fc93ae8b817e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{f74c7cbe4bd12f73ae90.js → 19d7339f20f3008c4893.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8aa8cb60b30f0983e7e.js → 1a9f17781e0a3bc5106f.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf7875fda48b15271a10.js → 1bef7097fe5e402539ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa377112ef3b78f6ed18.js → 1de1cc0ed0f169a58aff.js} +1 -1
- package/assets/esri/core/workers/chunks/{0549e2badf511e27aa54.js → 1e3b07cf0e608431a277.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e51764c8aa31096cb2a.js → 20feca2fdd304b3e9664.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c73c2f4331351e2a50c.js → 22ff018342860249b3eb.js} +1 -1
- package/assets/esri/core/workers/chunks/248df6fda489a9de5852.js +1 -0
- package/assets/esri/core/workers/chunks/279b16727d4b515eca44.js +1 -0
- package/assets/esri/core/workers/chunks/2b10d6597af3eeec5396.js +1 -0
- package/assets/esri/core/workers/chunks/2bd4b536e329112591c4.js +1 -0
- package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +1 -0
- package/assets/esri/core/workers/chunks/2e2349387a2b9903f13c.js +2 -0
- package/assets/esri/core/workers/chunks/{4d700cb028f6306b163e.js → 32aa1529e84b839d051d.js} +1 -1
- package/assets/esri/core/workers/chunks/33041e50ea02d99480b0.js +1 -0
- package/assets/esri/core/workers/chunks/{5d7a5aa608ed6192b016.js → 349982635e921e838030.js} +1 -1
- package/assets/esri/core/workers/chunks/35d0a7597473d46866de.js +1 -0
- package/assets/esri/core/workers/chunks/374d726fdd0a9848cea5.js +1 -0
- package/assets/esri/core/workers/chunks/379f5ca5372d834af497.js +1 -0
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
- package/assets/esri/core/workers/chunks/{05393b23ab24126d4236.js → 38bc5d09ae07f486d457.js} +1 -1
- package/assets/esri/core/workers/chunks/3bafa01ca01a67d09432.js +1 -0
- package/assets/esri/core/workers/chunks/3c7901ea007c9615ba54.js +1 -0
- package/assets/esri/core/workers/chunks/4047208f9559e06d7102.js +1 -0
- package/assets/esri/core/workers/chunks/4049e9b86c8e27a7ff12.js +1 -0
- package/assets/esri/core/workers/chunks/411bbdecba340df11d95.js +2 -0
- package/assets/esri/core/workers/chunks/42b5533f94ebcdc4befe.js +1 -0
- package/assets/esri/core/workers/chunks/44ca13c874b5aa0ed5a0.js +1 -0
- package/assets/esri/core/workers/chunks/4717831effb1ac6d5f5d.js +1 -0
- package/assets/esri/core/workers/chunks/{5edf77618ca51819d7c4.js → 476535cfb06ced74d611.js} +2 -2
- package/assets/esri/core/workers/chunks/486f1277fe834c0fc4c1.js +1 -0
- package/assets/esri/core/workers/chunks/48ade66f1685a1aaffba.js +1 -0
- package/assets/esri/core/workers/chunks/4d13c1a04788e5222678.js +1 -0
- package/assets/esri/core/workers/chunks/{cc3186dcbbf5edff8b9e.js → 4d7f6c92041d52cc8732.js} +1 -1
- package/assets/esri/core/workers/chunks/{595edbc1e9bba47d5676.js → 4f89da01b67b66a92c01.js} +1 -1
- package/assets/esri/core/workers/chunks/507bbcde2b39321b50a4.js +1 -0
- package/assets/esri/core/workers/chunks/{9b8e33985310f281f084.js → 56a5b65961e722f5cae9.js} +1 -1
- package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +1 -0
- package/assets/esri/core/workers/chunks/{b102ae764c14d8b32ace.js → 58a52adc42fbe5cd12c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0e25ccb5a1e57a82628.js → 58b93f13316196d2e97d.js} +1 -1
- package/assets/esri/core/workers/chunks/58f98bd89b644cfdafae.js +1 -0
- package/assets/esri/core/workers/chunks/5a8658e4ef5163e8ab3b.js +1 -0
- package/assets/esri/core/workers/chunks/5aa3e1e9c701c7fef6e4.js +1 -0
- package/assets/esri/core/workers/chunks/5bb8d9d887dd4211afd2.js +1 -0
- package/assets/esri/core/workers/chunks/5d7625eb9997cd0dff09.js +1 -0
- package/assets/esri/core/workers/chunks/5e56a004b4407b8066eb.js +1 -0
- package/assets/esri/core/workers/chunks/5efc66be4576c6f67064.js +1 -0
- package/assets/esri/core/workers/chunks/60b1af54e7fc20fd9588.js +1 -0
- package/assets/esri/core/workers/chunks/6134a2c6983792787184.js +1 -0
- package/assets/esri/core/workers/chunks/6319413b89e23f671487.js +1 -0
- package/assets/esri/core/workers/chunks/{1b311ff39dede07865df.js → 633454b27c34f9ec7940.js} +1 -1
- package/assets/esri/core/workers/chunks/63c43ebf46964c283b4d.js +1 -0
- package/assets/esri/core/workers/chunks/65d3638ded62c5606ae3.js +1 -0
- package/assets/esri/core/workers/chunks/{aa0ef4493a7e9bed159f.js → 662f4b39ec44c68e0733.js} +1 -1
- package/assets/esri/core/workers/chunks/680bef5e8237cc3bdd84.js +1 -0
- package/assets/esri/core/workers/chunks/6835f959952f70972fce.js +1 -0
- package/assets/esri/core/workers/chunks/{ddf284648a73b6993737.js → 68d823697c298122ee08.js} +1 -1
- package/assets/esri/core/workers/chunks/6aaefd61505027267c9b.js +1 -0
- package/assets/esri/core/workers/chunks/6ceb17eada151230abf7.js +1 -0
- package/assets/esri/core/workers/chunks/6df29716f75696434807.js +1 -0
- package/assets/esri/core/workers/chunks/6e804bd6bb4b0ee44fa9.js +1 -0
- package/assets/esri/core/workers/chunks/{ee77999df3785468b2b6.js → 6f6e8b7e6e2c856e4ed1.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ea28a4b1afe8bb2d313.js → 7091bbdc36f1f03f14b3.js} +1 -1
- package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +1 -0
- package/assets/esri/core/workers/chunks/{4b6f433022a6822706cb.js → 762817d30474c15142b4.js} +1 -1
- package/assets/esri/core/workers/chunks/762e9a15b2638475a2b4.js +1 -0
- package/assets/esri/core/workers/chunks/79088d5c9c2e6a780929.js +1 -0
- package/assets/esri/core/workers/chunks/{f3d57c5b9dffd12e45b4.js → 7c3a89c12ea32a071ad4.js} +1 -1
- package/assets/esri/core/workers/chunks/7c67596c0792282afdfc.js +1 -0
- package/assets/esri/core/workers/chunks/7cef6e5f39137e74bbc3.js +1 -0
- package/assets/esri/core/workers/chunks/{87e0ceb1a64ab08e679a.js → 7fd54fa2f91cdab44ab3.js} +1 -1
- package/assets/esri/core/workers/chunks/822a5020afbca21df7f7.js +1 -0
- package/assets/esri/core/workers/chunks/8599d2f2eb0fbb4a8bf5.js +1 -0
- package/assets/esri/core/workers/chunks/862f7090ba4a56c07093.js +1 -0
- package/assets/esri/core/workers/chunks/{97c7dfd29ad4c2966cb4.js → 88252899a5291ad29710.js} +1 -1
- package/assets/esri/core/workers/chunks/8837fbcc0d484659b79c.js +1 -0
- package/assets/esri/core/workers/chunks/8dcc7749de3391710864.js +1 -0
- package/assets/esri/core/workers/chunks/900dad076347443b3ad9.js +1 -0
- package/assets/esri/core/workers/chunks/{f8f7b86bbd62106bc3d4.js → 925f83be3c1eb4b5c6af.js} +1 -1
- package/assets/esri/core/workers/chunks/{a4a22149077c7780481c.js → 9378ce457b02717304e6.js} +1 -1
- package/assets/esri/core/workers/chunks/93a7cf23f73b23fc7802.js +1 -0
- package/assets/esri/core/workers/chunks/93c1d1e7c0935242071e.js +1 -0
- package/assets/esri/core/workers/chunks/{fddcb8be714ad18ad0c8.js → 970b33947bf61fccd461.js} +1 -1
- package/assets/esri/core/workers/chunks/97aaff86e06380a68df8.js +1 -0
- package/assets/esri/core/workers/chunks/9bc7df2b8ae0ed443d13.js +1 -0
- package/assets/esri/core/workers/chunks/9cc14a41d4a90f6d626e.js +1 -0
- package/assets/esri/core/workers/chunks/9e514a58b1165e273202.js +1 -0
- package/assets/esri/core/workers/chunks/9fe1db0762ab3326eab4.js +1 -0
- package/assets/esri/core/workers/chunks/{a5bb19d2b7d7db22222b.js → a10188c4d1904965898a.js} +1 -1
- package/assets/esri/core/workers/chunks/a2288d44cba34d947613.js +1 -0
- package/assets/esri/core/workers/chunks/a26916de4c105859621e.js +1 -0
- package/assets/esri/core/workers/chunks/a322afbb48898ce35851.js +1 -0
- package/assets/esri/core/workers/chunks/a34cadd486e7fcc79063.js +1 -0
- package/assets/esri/core/workers/chunks/{cefb70d633c220cbedf9.js → a4dc1a80ed6604d71722.js} +1 -1
- package/assets/esri/core/workers/chunks/{6baae3e856d904fef9b1.js → a8f70cece5ce2b095cdd.js} +1 -1
- package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +1 -0
- package/assets/esri/core/workers/chunks/{777f2fdf1f4b9f243893.js → ab3a6ce7bc2a27b92469.js} +1 -1
- package/assets/esri/core/workers/chunks/abd2f8fae6b918fbdd6d.js +1 -0
- package/assets/esri/core/workers/chunks/{b13d2da33ec07e9d41ff.js → b0da2b089a89d643df1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{65f4ca7201e7267bfc81.js → b5fcf4165ac72654742d.js} +1 -1
- package/assets/esri/core/workers/chunks/b82b523b6837ed1f28d3.js +2 -0
- package/assets/esri/core/workers/chunks/{527b87fddf33bb5d519e.js → ba77a8892cb23c7a297d.js} +1 -1
- package/assets/esri/core/workers/chunks/bb8089929ded0613d8e7.js +1 -0
- package/assets/esri/core/workers/chunks/bc7ca87d3bfe8a4aec81.js +1 -0
- package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +1 -0
- package/assets/esri/core/workers/chunks/{2d07d5a9ec67c39ef10c.js → bd4f29d2681e5596591a.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +1 -0
- package/assets/esri/core/workers/chunks/{903c7bd079888f65fef1.js → c3fbd81bb5820e48038f.js} +1 -1
- package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +1 -0
- package/assets/esri/core/workers/chunks/ca8061e0a6d78d646ebf.js +1 -0
- package/assets/esri/core/workers/chunks/cc73ac8404615dc392d2.js +1 -0
- package/assets/esri/core/workers/chunks/{e823c9ccb7bc348d8824.js → ccb26860518dce6d01c0.js} +1 -1
- package/assets/esri/core/workers/chunks/cded34b161fcc790e672.js +1 -0
- package/assets/esri/core/workers/chunks/{1bf5c0a4bc5a960a3fa2.js → d1d4979e9dcabe5e4619.js} +1 -1
- package/assets/esri/core/workers/chunks/d2865c604849ce79183f.js +1 -0
- package/assets/esri/core/workers/chunks/{9b81bd62a2c72f592db1.js → d826f6d32b4c5885276a.js} +1 -1
- package/assets/esri/core/workers/chunks/d92540d3ffc4af980dd8.js +1 -0
- package/assets/esri/core/workers/chunks/dc7853795439ae77ace9.js +1 -0
- package/assets/esri/core/workers/chunks/{1f047dd747e7c1916dc7.js → dd55737fba0a8fe68101.js} +3 -3
- package/assets/esri/core/workers/chunks/dd8d19eb6b8e955c8067.js +1 -0
- package/assets/esri/core/workers/chunks/dda269a088275c823b40.js +1 -0
- package/assets/esri/core/workers/chunks/{7b70d6fdfa7a19ffffb0.js → de95dee8db92cf8f796f.js} +1 -1
- package/assets/esri/core/workers/chunks/e1c8767143f9f9d1f049.js +1 -0
- package/assets/esri/core/workers/chunks/{2cf2f2842c19be84ab4d.js → e6cb31c727f799c1297c.js} +1 -1
- package/assets/esri/core/workers/chunks/e934ef66d130c212c05b.js +1 -0
- package/assets/esri/core/workers/chunks/{7c56446184abcd14678b.js → ea77654c8964cc39b9a6.js} +1 -1
- package/assets/esri/core/workers/chunks/eb167f9f6132a6348d2e.js +1 -0
- package/assets/esri/core/workers/chunks/ed5ac1efd3cba49be756.js +1 -0
- package/assets/esri/core/workers/chunks/ef24fd6c0322e5de9fdf.js +2 -0
- package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +1 -0
- package/assets/esri/core/workers/chunks/fbf2d90240d36f8b423f.js +1 -0
- package/assets/esri/core/workers/chunks/{4ee99e654dad6f09abee.js → fc042b9936686785c39e.js} +1 -1
- package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +1 -0
- package/assets/esri/core/workers/chunks/{af6b9fd77b1792fbb66e.js → fd4d124c5bf810d9e352.js} +1 -1
- package/assets/esri/core/workers/chunks/ffa35ecc681ec1c4739a.js +1 -0
- package/assets/esri/core/workers/chunks/ffca0b2333e760b66d3a.js +1 -0
- package/config.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
- package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/geometryEngine.d.ts +36 -36
- package/geometry/operators/affineTransformOperator.d.ts +30 -1
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.d.ts +49 -5
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.d.ts +28 -4
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.d.ts +25 -2
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.d.ts +40 -2
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.d.ts +51 -6
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.d.ts +23 -2
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.d.ts +34 -2
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.d.ts +32 -2
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.d.ts +47 -4
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.d.ts +35 -2
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.d.ts +23 -2
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +61 -6
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.d.ts +34 -2
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.d.ts +33 -2
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.d.ts +29 -4
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.d.ts +32 -2
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.d.ts +29 -3
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.d.ts +46 -5
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +71 -7
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +106 -14
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.d.ts +51 -5
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.d.ts +65 -6
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +52 -5
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.d.ts +51 -5
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +79 -9
- package/geometry/operators/geodeticUtilsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.d.ts +47 -4
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/integrateOperator.d.ts +24 -2
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.d.ts +88 -3
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.d.ts +32 -2
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.d.ts +31 -4
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/bufferOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/convexHullOperator.js +1 -1
- package/geometry/operators/json/crossesOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/json/generalizeOperator.js +1 -1
- package/geometry/operators/json/geodesicBufferOperator.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +1 -1
- package/geometry/operators/json/intersectionOperator.js +1 -1
- package/geometry/operators/json/intersectsOperator.js +1 -1
- package/geometry/operators/json/lengthOperator.js +1 -1
- package/geometry/operators/json/offsetOperator.js +1 -1
- package/geometry/operators/json/overlapsOperator.js +1 -1
- package/geometry/operators/json/projectOperator.js +1 -1
- package/geometry/operators/json/simplifyOperator.js +1 -1
- package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
- package/geometry/operators/json/touchesOperator.js +1 -1
- package/geometry/operators/json/unionOperator.js +1 -1
- package/geometry/operators/json/withinOperator.js +1 -1
- package/geometry/operators/labelPointOperator.d.ts +32 -2
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.d.ts +28 -4
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.d.ts +23 -2
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +28 -2
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +38 -4
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +33 -4
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.d.ts +50 -5
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.d.ts +33 -2
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.d.ts +31 -5
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.d.ts +72 -10
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.d.ts +63 -3
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +71 -9
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.d.ts +41 -2
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.d.ts +28 -2
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +64 -6
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +72 -6
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/geometry/operators/simplifyOperator.d.ts +72 -4
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/Transformation.d.ts +17 -11
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/operators/symmetricDifferenceOperator.d.ts +33 -2
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.d.ts +32 -2
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/types.d.ts +4 -1
- package/geometry/operators/unionOperator.d.ts +33 -2
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.d.ts +32 -2
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/geometry/support/normalizeUtils.d.ts +5 -3
- package/geometry/support/normalizeUtils.js +1 -1
- package/interfaces.d.ts +202 -202
- package/kernel.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/data/spatialQuerySupport.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/TiledImagery.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/raster/datasets/FunctionRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.js +1 -1
- package/layers/raster/functions/clipUtils.js +1 -1
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +4 -4
- package/popup/FeatureContentCollection.d.ts +3 -3
- package/popup/FeatureContentCollection.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/support/tests/setupServiceMocksMesh.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3DModifications.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/MapView.d.ts +3 -3
- package/views/VideoView.js +1 -1
- package/views/View2D.d.ts +22 -22
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/GeometryWorker.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/video/VideoOperationalDataView.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/BatchAttributeForm/expressions/expressionUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
- package/widgets/BatchAttributeForm/templates/FieldElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
- package/widgets/ElevationProfile/support/InputRepresentation2D.js +1 -1
- package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +104 -0
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +145 -0
- package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
- package/widgets/support/FilterCondition/types.d.ts +20 -0
- package/widgets/support/ItemList.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.d.ts +17 -68
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +12 -50
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.d.ts +14 -44
- package/widgets/support/SelectionList/ItemBase.js +1 -1
- package/widgets/support/SelectionList/LayerItem.d.ts +10 -56
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/types.d.ts +4 -4
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/090ea7a131f8f60203ed.js +0 -1
- package/assets/esri/core/workers/chunks/0b4a7209b99227a842ad.js +0 -1
- package/assets/esri/core/workers/chunks/0be98adfef79fc5036f0.js +0 -1
- package/assets/esri/core/workers/chunks/0d2e2d90a4e4a28e2c0c.js +0 -1
- package/assets/esri/core/workers/chunks/0d7763d39a5a8586a0ae.js +0 -1
- package/assets/esri/core/workers/chunks/0d95f72e1c07ab867d21.js +0 -1
- package/assets/esri/core/workers/chunks/0dbbac7a2378728571a7.js +0 -1
- package/assets/esri/core/workers/chunks/0df9864ecebe6a2b973f.js +0 -1
- package/assets/esri/core/workers/chunks/104d74bc36c28c519396.js +0 -1
- package/assets/esri/core/workers/chunks/1670e9867efde4d7a6d6.js +0 -1
- package/assets/esri/core/workers/chunks/1c803eef9a8fdabc61e3.js +0 -2
- package/assets/esri/core/workers/chunks/1e192ac0533a5c0b5a7a.js +0 -1
- package/assets/esri/core/workers/chunks/1fe077f57a087c0e9119.js +0 -1
- package/assets/esri/core/workers/chunks/20f7b5fe64a217cb3d3d.js +0 -1
- package/assets/esri/core/workers/chunks/212222b64039d436b9a6.js +0 -1
- package/assets/esri/core/workers/chunks/24944b625ed8dcd904f0.js +0 -1
- package/assets/esri/core/workers/chunks/2b6d261fe79fe186fb22.js +0 -1
- package/assets/esri/core/workers/chunks/2bc3e7f394386fa75447.js +0 -1
- package/assets/esri/core/workers/chunks/30af0f7c4cfa541c9efd.js +0 -1
- package/assets/esri/core/workers/chunks/30d816bdeea00f6fa1ca.js +0 -1
- package/assets/esri/core/workers/chunks/35d46c2f658a8e92d913.js +0 -1
- package/assets/esri/core/workers/chunks/36e35a8067b18f59cc05.js +0 -1
- package/assets/esri/core/workers/chunks/3869dca884d7ca6488f5.js +0 -1
- package/assets/esri/core/workers/chunks/3f5234120d3a14186c1c.js +0 -1
- package/assets/esri/core/workers/chunks/45c1c90ac6c14657f3ff.js +0 -1
- package/assets/esri/core/workers/chunks/4a40b894ec89b0a4f9bf.js +0 -1
- package/assets/esri/core/workers/chunks/5165d367328ac7badf47.js +0 -1
- package/assets/esri/core/workers/chunks/5168bd8ab6233dc9c32a.js +0 -1
- package/assets/esri/core/workers/chunks/545bec045167c433af8f.js +0 -1
- package/assets/esri/core/workers/chunks/5782c0362a1799ceef41.js +0 -1
- package/assets/esri/core/workers/chunks/59598023c0aea62a6297.js +0 -1
- package/assets/esri/core/workers/chunks/59f0a2bd40b033ce77e4.js +0 -1
- package/assets/esri/core/workers/chunks/5af16937904c06fb06f6.js +0 -1
- package/assets/esri/core/workers/chunks/5b8591486f33627f5389.js +0 -1
- package/assets/esri/core/workers/chunks/6057a79c68c33ee4a193.js +0 -1
- package/assets/esri/core/workers/chunks/607acd9f615f87e14075.js +0 -1
- package/assets/esri/core/workers/chunks/62ee6c247f783acabb74.js +0 -1
- package/assets/esri/core/workers/chunks/63127e3b22e7eac6003d.js +0 -2
- package/assets/esri/core/workers/chunks/6564f17c4700dc8d9c0e.js +0 -2
- package/assets/esri/core/workers/chunks/678585509706755c0434.js +0 -2
- package/assets/esri/core/workers/chunks/691e9cc541cfaebe1776.js +0 -1
- package/assets/esri/core/workers/chunks/6a2d890640b2cd6c5ccb.js +0 -1
- package/assets/esri/core/workers/chunks/6b84982dfaf084a61b93.js +0 -1
- package/assets/esri/core/workers/chunks/6cbc30b31f0bb39c73ca.js +0 -1
- package/assets/esri/core/workers/chunks/6f01bd01b13662eb3bd7.js +0 -1
- package/assets/esri/core/workers/chunks/74cd9df85c4560bb8e52.js +0 -1
- package/assets/esri/core/workers/chunks/75bddfe2be64379db8fd.js +0 -1
- package/assets/esri/core/workers/chunks/7cf903db44f3647c8fd4.js +0 -1
- package/assets/esri/core/workers/chunks/7ddb5800777fbecee3a8.js +0 -1
- package/assets/esri/core/workers/chunks/7eae9053065d3d38e54e.js +0 -1
- package/assets/esri/core/workers/chunks/80f38ab2b7ae61e6f301.js +0 -1
- package/assets/esri/core/workers/chunks/854f42f16fdb40000aae.js +0 -1
- package/assets/esri/core/workers/chunks/87094044458b0ea5cb0f.js +0 -2
- package/assets/esri/core/workers/chunks/88f03352a4dc6184ea1f.js +0 -1
- package/assets/esri/core/workers/chunks/909ee7d2a0eec773037a.js +0 -1
- package/assets/esri/core/workers/chunks/91ac9328afff8a51bd96.js +0 -1
- package/assets/esri/core/workers/chunks/9246e2468528650bdc7c.js +0 -1
- package/assets/esri/core/workers/chunks/92a6559a6999b26362d7.js +0 -1
- package/assets/esri/core/workers/chunks/94ddfe165ac25aef8229.js +0 -1
- package/assets/esri/core/workers/chunks/9509bef285929c52c244.js +0 -1
- package/assets/esri/core/workers/chunks/99966339b061eb9945b8.js +0 -1
- package/assets/esri/core/workers/chunks/99f627938dbf0152fc02.js +0 -1
- package/assets/esri/core/workers/chunks/9df38cadebf8e6fd746c.js +0 -1
- package/assets/esri/core/workers/chunks/9e2b3754a76e0dd4a94a.js +0 -1
- package/assets/esri/core/workers/chunks/a0565137027c83108953.js +0 -1
- package/assets/esri/core/workers/chunks/a0eb882a5a81d25b9153.js +0 -1
- package/assets/esri/core/workers/chunks/a785e827f0215a73103d.js +0 -1
- package/assets/esri/core/workers/chunks/abe7670db06b27c0c8c8.js +0 -1
- package/assets/esri/core/workers/chunks/b19cff0e43fab2632660.js +0 -1
- package/assets/esri/core/workers/chunks/b333de4dea14c5db0a4d.js +0 -1
- package/assets/esri/core/workers/chunks/b6af90be328ebda26b8d.js +0 -1
- package/assets/esri/core/workers/chunks/b7c0da9d255d5e48320d.js +0 -1
- package/assets/esri/core/workers/chunks/bd7d87d175ba933ab2ce.js +0 -1
- package/assets/esri/core/workers/chunks/be0417df35a7d99af675.js +0 -1
- package/assets/esri/core/workers/chunks/c30b6bbabd05e4976fba.js +0 -1
- package/assets/esri/core/workers/chunks/c35553d07ad169910742.js +0 -1
- package/assets/esri/core/workers/chunks/c5c2fed38e0ccf84f1fa.js +0 -1
- package/assets/esri/core/workers/chunks/c88bfa51d2a8a024fc24.js +0 -1
- package/assets/esri/core/workers/chunks/ca36d85a47179d95f2fc.js +0 -1
- package/assets/esri/core/workers/chunks/d0cf9ff48f051adbd455.js +0 -1
- package/assets/esri/core/workers/chunks/d1304d414b1fa725168a.js +0 -1
- package/assets/esri/core/workers/chunks/d24125a791247019e2ca.js +0 -1
- package/assets/esri/core/workers/chunks/d26be8313526ecea9c68.js +0 -1
- package/assets/esri/core/workers/chunks/d2cb3d5ef0a9285afb78.js +0 -1
- package/assets/esri/core/workers/chunks/d4b0012ae1d3b8a9ba01.js +0 -1
- package/assets/esri/core/workers/chunks/e018cbd97e6e0e4ca5c4.js +0 -1
- package/assets/esri/core/workers/chunks/e39bccc000c768120a32.js +0 -1
- package/assets/esri/core/workers/chunks/e4380706b629729f2212.js +0 -1
- package/assets/esri/core/workers/chunks/ea1877ce00da3b585a30.js +0 -1
- package/assets/esri/core/workers/chunks/ea5ee1b12b43594592a0.js +0 -1
- package/assets/esri/core/workers/chunks/ea91c57a0b31f3f65ee5.js +0 -1
- package/assets/esri/core/workers/chunks/eafc591e1a98000d54ef.js +0 -1
- package/assets/esri/core/workers/chunks/ef851a2cff76fd211c07.js +0 -1
- package/assets/esri/core/workers/chunks/f3e53be08ab9dbdf17ae.js +0 -1
- package/assets/esri/core/workers/chunks/f53010adb70463b75bb9.js +0 -1
- package/assets/esri/core/workers/chunks/f5a058a0ce006bce2a2a.js +0 -1
- package/assets/esri/core/workers/chunks/f5f5b54cab722abe88e0.js +0 -1
- package/assets/esri/core/workers/chunks/f60ed579981913d44675.js +0 -1
- package/assets/esri/core/workers/chunks/f6f56f3e011dcef90bbb.js +0 -1
- package/assets/esri/core/workers/chunks/f83c3597e9332bd991eb.js +0 -1
- package/assets/esri/core/workers/chunks/f9a4387f850d85c44ca5.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0e6d9927d3c43b0d3.js +0 -1
- package/geometry/operators/importUtils.js +0 -2
- /package/assets/esri/core/workers/chunks/{1c803eef9a8fdabc61e3.js.LICENSE.txt → 1082bb0858585bd4fa21.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{87094044458b0ea5cb0f.js.LICENSE.txt → 2e2349387a2b9903f13c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{678585509706755c0434.js.LICENSE.txt → 411bbdecba340df11d95.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{5edf77618ca51819d7c4.js.LICENSE.txt → 476535cfb06ced74d611.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{6564f17c4700dc8d9c0e.js.LICENSE.txt → b82b523b6837ed1f28d3.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{63127e3b22e7eac6003d.js.LICENSE.txt → ef24fd6c0322e5de9fdf.js.LICENSE.txt} +0 -0
|
@@ -626,7 +626,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
626
626
|
vec2 uvOffset = uv + rf * blurSize;
|
|
627
627
|
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
628
628
|
}
|
|
629
|
-
fragBlur = b / w_total;`),e}const d=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,d])},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}const l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count;let s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>h,b:()=>s,c:()=>n,d:()=>a,e:()=>d,f:()=>u,l:()=>c,n:()=>m,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){const a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],h=r[2],d=r[4],m=r[5],f=r[6],p=r[8],g=r[9],v=r[10],x=r[12],_=r[13],y=r[14];let b=0,w=0;for(let r=0;r<l;r++){const r=t[b],i=t[b+1],a=t[b+2];e[w]=c*r+d*i+p*a+x,e[w+1]=u*r+m*i+g*a+_,e[w+2]=h*r+f*i+v*a+y,b+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){const a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],h=r[2],d=r[3],m=r[4],f=r[5],p=r[6],g=r[7],v=r[8];let x=0,_=0;for(let r=0;r<l;r++){const r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+d*i+p*a,e[_+1]=u*r+m*i+g*a,e[_+2]=h*r+f*i+v*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){const a=Math.min(e.length/n,t.length/o);let s=0,l=0;const c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function h(e,t,r,n=3,o=n){const a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s);let c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function d(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,a=0;for(let s=0;s<n;s++){const n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:m,normalizeView:d,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!a.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(o,10);return new n(s,l,t)}}},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{fA:()=>n,vt:()=>i});const c=o(),u=a(),h=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:d,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},91829(e,t,r){function i(){return[0,0,0,0]}function n(e,t,r,i){return[e,t,r,i]}function o(){return n(1,1,1,1)}function a(){return n(1,0,0,0)}function s(){return n(0,1,0,0)}function l(){return n(0,0,1,0)}function c(){return n(0,0,0,1)}r.d(t,{_Y:()=>c,fA:()=>n,vt:()=>i});const u=[0,0,0,0],h=o(),d=a(),m=s(),f=l(),p=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:p,UNIT_X:d,UNIT_Y:m,UNIT_Z:f,ZEROS:u,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,freeze:function(e,t,r,i){return[e,t,r,i]},fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t},fromValues:n,ones:o,unitW:c,unitX:a,unitY:s,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,h,"uY",0,u,"v7",0,p])},78955(e,t,r){r.d(t,{Bw:()=>g,C:()=>n,Cc:()=>y,LI:()=>d,Om:()=>_,S8:()=>x,T9:()=>h,WQ:()=>a,Z0:()=>b,aI:()=>M,hG:()=>p,hZ:()=>o,hs:()=>m,jk:()=>u,m3:()=>v,t2:()=>w});var i=r(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function o(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function h(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function d(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+o*o)}function p(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],o=t[3]-e[3];return r*r+i*i+n*n+o*o}function g(e){const t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}function v(e){const t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}function x(e,t){const r=t[0],i=t[1],n=t[2],o=t[3];let a=r*r+i*i+n*n+o*o;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=i*a,e[2]=n*a,e[3]=o*a),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,i){const n=t[0],o=t[1],a=t[2],s=t[3];return e[0]=n+i*(r[0]-n),e[1]=o+i*(r[1]-o),e[2]=a+i*(r[2]-a),e[3]=s+i*(r[3]-s),e}function b(e,t,r){const i=t[0],n=t[1],o=t[2],a=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,e[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,e[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,e[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function M(e,t){const r=e[0],n=e[1],o=e[2],a=e[3],s=t[0],l=t[1],c=t[2],u=t[3],h=(0,i.FD)();return Math.abs(r-s)<=h*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-l)<=h*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-u)<=h*Math.max(1,Math.abs(a),Math.abs(u))}const S=s,T=l,C=c,E=f,I=p,A=g,F=v;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:E,distance:f,div:C,divide:c,dot:_,equals:M,exactEquals:w,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:A,length:g,lerp:y,max:h,min:u,mul:T,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=i.Ov;let n,o,a,s,l,c;do{n=2*r()-1,o=2*r()-1,l=n*n+o*o}while(l>=1);do{a=2*r()-1,s=2*r()-1,c=a*a+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*n,e[1]=t*o,e[2]=t*a*u,e[3]=t*s*u,e},round:d,scale:m,scaleAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e},set:o,sqrDist:I,sqrLen:F,squaredDistance:p,squaredLength:v,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:s,transformMat4:b,transformQuat:function(e,t,r){const i=t[0],n=t[1],o=t[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*o-l*n,h=c*n+l*i-a*o,d=c*o+a*n-s*i,m=-a*i-s*n-l*o;return e[0]=u*c+m*-a+h*-l-d*-s,e[1]=h*c+m*-s+d*-a-u*-l,e[2]=d*c+m*-l+u*-s-h*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>o,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+h:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,h=145},93146(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function n(e){return new i(async()=>{const t=await e();return!1===t.isLoaded?.()&&await t.load(),t})}},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);const a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lC:()=>s,my:()=>a,tM:()=>h,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return new Array(e).fill(0);if(e>m.length){const t=Math.max(2*m.length,e);m=new Uint8Array(t)}return new Uint8Array(m.buffer,0,e)}(e.length):n?h(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?new Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function s(e,t,r){if(0===t.length)return e.slice();if(0===e.length)return t.slice();const i=a(e.length+t.length,r);for(let t=0;t<e.length;++t)i[t]=e[t];for(let r=0;r<t.length;++r)i[e.length+r]=t[r];return i}let l=d(131072);const c=[0],u=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){return 1===e?c:e<1024?Array.from(new Uint16Array(u.buffer,0,e)):e<u.length?new Uint16Array(u.buffer,0,e):(e>l.length&&(l=d(Math.max(2*l.length,e))),new Uint32Array(l.buffer,0,e))}function d(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let m=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;const i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},65720(e,t,r){r.d(t,{C:()=>v,vt:()=>p,Qy:()=>g,ui:()=>x,ST:()=>S,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>y,GH:()=>w,Pi:()=>b,LJ:()=>T,c8:()=>A});var i=r(4341),n=r(58083),o=r(35522),a=r(51850),s=r(78955),l=r(91829),c=r(70328),u=r(71351);function h(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>h());var d=r(27921);function m(e,t,r,i){let{t0:n,t1:o}=i;const a=(0,d.mN)(e,t),s=(0,d.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){const e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){const e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var f=r(32114);function p(e){return e?[(0,d.vt)(e[0]),(0,d.vt)(e[1]),(0,d.vt)(e[2]),(0,d.vt)(e[3]),(0,d.vt)(e[4]),(0,d.vt)(e[5])]:[(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)()]}function g(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function v(e,t){for(let r=0;r<F;r++)(0,d.C)(e[r],t[r]);return e}function x(e,t,r,i=R){const a=(0,n.lw)(f.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<O;++e){const t=(0,s.Z0)(f.Km.get(),P[e],a);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}!function(e,t){(0,d.Cr)(t[4],t[0],t[3],e[0]),(0,d.Cr)(t[1],t[5],t[6],e[1]),(0,d.Cr)(t[4],t[5],t[1],e[2]),(0,d.Cr)(t[3],t[2],t[6],e[3]),(0,d.Cr)(t[0],t[1],t[2],e[4]),(0,d.Cr)(t[5],t[4],t[7],e[5])}(r,i)}function _(e,t){return y(e,t.center,t.radius)}function y(e,t,r){for(let i=0;i<F;i++){const n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function b(e,t,r){for(const i of I)if((0,d.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){const i=(0,c.gX)(t,B),n=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,n,a){const s=(0,o.Z0)(N,t,a);for(let t=0;t<F;t++){const o=e[t];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*r+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*i+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*n)>0)return!1}return!0}(e,i,n,a,s,r):function(e,t,r,i,n){for(let o=0;o<F;o++){const a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,n,a,s)}function M(e,t){return E(e,function(e,t=h()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,D.get()))}function S(e,t,r){return E(e,function(e,t,r=h()){const i=(0,o.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,D.get()))}function T(e,t,r){return function(e,t,r,i){const n={t0:0,t1:1};for(const o of t)if(!m(e[o],r,i,n))return!1;return n.t0<n.t1}(e,I,t,r)}function C(e,t){for(let r=0;r<F;r++)if((0,d.mN)(e[r],t)>0)return!1;return!0}function E(e,t){for(let r=0;r<F;r++)if(!(0,d.$Q)(e[r],t))return!1;return!0}const I=[0,1,2,3,5],A={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]},F=6,O=8,P=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],D=new i.I(h),R=g(),B=(0,a.vt)(),N=(0,a.vt)()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>c,_I:()=>h,vt:()=>l});var i=r(34727),n=r(4341),o=r(35522),a=r(51850),s=r(32114);function l(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function c(e,t){const r=d.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function h(e,t,r){return function(e,t,r,n,a){const{vector:l,origin:c}=e,u=(0,o.Re)(s.rq.get(),t,c),h=(0,o.Om)(l,u)/(0,o.m3)(l);return(0,o.hs)(a,l,(0,i.qE)(h,0,1)),(0,o.WQ)(a,a,e.origin)}(e,t,0,0,r)}(0,a.vt)(),(0,a.vt)();const d=new n.I(()=>l())},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>l});var i=r(69052),n=(r(49186),r(17676)),o=(r(5443),r(39829),r(82799),r(16930)),a=r(93146),s=(r(80754),r(21325));async function l(e,t,r){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(r=t);let i=null;for(const t of e)i??=t?.spatialReference;if(!i)return e;const o=(0,s.Vp)(i);if(!o)return e;const[a,l]=o.valid;let h=!1;for(const t of e){if(!t)continue;if("point"===t.type){h||=t.x>=l,h||=t.x<=a;continue}const{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=l,h||=e.xmin<=a,h||=e.xmax>=l,h||=e.xmax<=a}if(!h)return e;const[{foldInto360Range:d},m]=await(0,n.qr)(Promise.all([c.getImportPromise(),u.getImportPromise()]),r),f=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=m.fromGeometry(e),r=m.toGeometry(d(t,f),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const c=(0,a.z)(()=>r.e(4144).then(r.bind(r,4144))),u=(0,a.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));function h(e,t,r){const i=(0,s.Vp)(r);if(null==i)return e;const[n,o]=i.valid,a=2*o;let l=0,c=0;t>o?l=Math.ceil(Math.abs(t-o)/a):t<n&&(l=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(l-c)*a;const h=u-t;return h>o?u-=a:h<n&&(u+=a),u}function d(e){const t=(0,s.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new i.hr(r,n)}const m=d(o.A.WGS84);d(o.A.WebMercator),r.d(t,["Y_",0,m])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var i=r(82799),n=r(16930),o=r(60408),a=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,a.Ed)(e))for(const r of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,a.aO)(e)){const[r,i]=e.c;r[0]+=t,i[0]+=t;continue}if((0,a.FG)(e)){const[r,i]=e.a;r[0]+=t,i[0]+=t;continue}if((0,a.n1)(e)){const[r,i,n]=e.b;r[0]+=t,i[0]+=t,n[0]+=t;continue}e[0]+=t}for(const r of function(e){return(0,o.Bi)(e)?e.rings:e.paths}(e))for(const e of r)e[0]+=t;return e}r.d(t,["j7",0,s])},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>h,LV:()=>c,fA:()=>d,vt:()=>s}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),a=r(51850);function s(e){return e?l((0,a.o8)(e.origin),(0,a.o8)(e.direction)):l((0,a.vt)(),(0,a.vt)())}function l(e,t){return{origin:e,direction:t}}function c(e,t){const r=m.get();return r.origin=e,r.direction=t,r}function u(e,t=s()){return d(e.origin,e.direction,t)}function h(e,t,r=s()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function d(e,t,r=s()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}r(32114);const m=new i.I(()=>s());(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,n.vt)()},94008(e,t,r){r.d(t,{iy:()=>m}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),a=r(35522),s=r(51850),l=r(91829),c=r(34275);var u=r(71351),h=r(44280),d=r(32114);class m{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,s.fA)(e,t,r):function(e){return t=e,(0,c.vZ)(t)&&t.length>=3||function(e){return((0,c.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,s.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,s.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,a.C)(this.center,e)}exactEquals(e){return(0,a.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,a.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new m(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,a.hG)(this.center,e)<=this.radius**2}intersects(e){const t=this.radius+e.radius;return(0,a.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,f))return!1;let{t0:r,t1:i}=f;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,f))return[];const{origin:i,direction:o}=r,{t0:l,t1:c}=f,h=e=>{const t=(0,s.vt)();return(0,a.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(l-c)<(0,n.FD)()?[h(l)]:[h(l),h(c)]}_intersect(e,t){const{origin:r,direction:i}=e,n=p;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const a=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),s=a*a-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(s<0)return!1;const l=Math.sqrt(s);return t.t0=(-a-l)/(2*o),t.t1=(-a+l)/(2*o),!0}projectPoint(e,t){const r=(0,a.Re)(d.rq.get(),e,this.center),i=(0,a.hs)(d.rq.get(),r,this.radius/(0,a.Bw)(r));return(0,a.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=d.rq.get(),i=d.Rc.get();(0,a.$A)(r,e.origin,e.direction),(0,a.$A)(t,r,e.origin),(0,a.hs)(t,t,1/(0,a.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),s=(0,h.g7)(e.origin,t);return(0,o.$0)(i,s+n,r),(0,a.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,a=t*t+n-2*Math.cos(o)*t*i,s=Math.sqrt(a),l=a-n;if(l<=0)return.5;const c=Math.sqrt(l),u=Math.acos(c/s)-Math.asin(i/(s/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,a.Re)(d.rq.get(),e,this.center),r=(0,a.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,a.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,a.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){const{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new m;const f={t0:0,t1:0},p=(0,s.vt)();(0,s.vt)(),(0,s.vt)()},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>h,rb:()=>d});var i=r(4341),n=r(35522),o=r(51850),a=r(11964);function s(e,t,r){const i=1e-5,{direction:o,origin:a}=t,{p0:s,p1:l,p2:c}=e,u=l[0]-s[0],h=l[1]-s[1],d=l[2]-s[2],m=c[0]-s[0],f=c[1]-s[1],p=c[2]-s[2],g=o[1]*p-f*o[2],v=o[2]*m-p*o[0],x=o[0]*f-m*o[1],_=u*g+h*v+d*x;if(_>-i&&_<i)return!1;const y=1/_,b=a[0]-s[0],w=a[1]-s[1],M=a[2]-s[2],S=y*(b*g+w*v+M*x);if(S<0||S>1)return!1;const T=w*d-h*M,C=M*u-d*b,E=b*h-u*w,I=y*(o[0]*T+o[1]*C+o[2]*E);return!(I<0||S+I>1||(r&&((0,n.hs)(r,o,y*(m*T+f*C+p*E)),(0,n.WQ)(r,a,r)),0))}function l(e,t,r){const[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){const o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,n.Re)(m,t,e),(0,n.Re)(f,r,e),.5*(0,n.Bw)((0,n.$A)(m,m,f))}function h(e,t,r,i,o){(0,n.jb)(m,i,r),(0,n.jb)(p,o,r),(0,n.jb)(f,t,r);const a=(0,n.Om)(m,f),s=(0,n.Om)(p,f);if(a<=0&&s<=0)return void(0,n.C)(e,r);(0,n.jb)(f,t,i);const l=(0,n.Om)(m,f),c=(0,n.Om)(p,f);if(l>=0&&c<=l)return void(0,n.C)(e,i);const u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,n.Ln)(e,r,m,a/(a-l));(0,n.jb)(f,t,o);const h=(0,n.Om)(m,f),d=(0,n.Om)(p,f);if(d>=0&&h<=d)return void(0,n.C)(e,o);const g=h*s-a*d;if(g<=0&&s>=0&&d<=0)return void(0,n.Ln)(e,r,p,s/(s-d));const v=l*d-h*c;if(v<=0&&c-l>=0&&h-d>=0)return(0,n.jb)(f,o,i),void(0,n.Ln)(e,i,f,(c-l)/(c-l+(h-d)));const x=1/(v+g+u);(0,n.C)(e,r),(0,n.Ln)(e,e,m,g*x),(0,n.Ln)(e,e,p,u*x)}function d(e,t,r,i){(0,n.jb)(m,r,t),(0,n.jb)(f,i,t),(0,n.$A)(e,m,f);const o=(0,n.Bw)(e);return 0!==o&&((0,n.hs)(e,e,1/o),!0)}r(32114),new i.I(a.vt),new i.I(()=>{return e?{p0:(0,o.o8)(e.p0),p1:(0,o.o8)(e.p1),p2:(0,o.o8)(e.p2)}:{p0:(0,o.vt)(),p1:(0,o.vt)(),p2:(0,o.vt)()};var e});const m=(0,o.vt)(),f=(0,o.vt)(),p=(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},21015(e,t,r){r.d(t,{R:()=>l});var i=r(11254),n=r(60999),o=r(49186),a=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,a.QP)(s.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},55907(e,t,r){r.d(t,{fetch:()=>hi});var i=r(40876),n=r(61473),o=r(34727),a=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),h=r(35522),d=r(51850),m=r(70328);function f(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var p=r(13030),g=r(73354),v=r(50867),x=r(43609),_=r(21015),y=r(84498),b=r(51530),w=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:w.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:w.Un,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,s.vt)();return(0,a.lw)(c,o,l),(0,a.lw)(c,n,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class T{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var C=r(11254),E=r(60999),I=r(49186),A=r(53966),F=r(69397);class O{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new O;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var P=r(17676),D=r(46140),R=r(97146);async function B(e,t){return(await(0,C.A)(e,{responseType:"image",...t})).data}var N=r(46610),z=r(34275);function H(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.LW)(e)?Float16Array.from(e):(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,z.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var L=r(15142),j=r(94008),W=r(620);class U{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._children=void 0,(0,W.vA)(e.length>=1);const i=e.length;$.clear();const n=(0,m.Ie)();for(let o=0;o<i;++o){const i=t*e[o];for(let e=0;e<t;++e){const t=i+e;$.push(t),(0,m.iT)(n,r(V,t))}}this.box=n;const o=new j.iy,a=(0,m.gX)(n,o.center);let s=.5*Math.max((0,m.VL)(n),(0,m.yr)(n),(0,m.uJ)(n)),l=s*s;for(let e=0;e<$.length;++e){const t=r(V,$.at(e)),i=(0,h.Re)(t,t,a),n=(0,h.uE)(i);if(n<=l)continue;const o=Math.sqrt(n),c=.5*(o-s);s+=c,l=s*s,(0,h.Ln)(a,a,i,c/o)}o.radius=s,this.sphere=o,$.clear()}get children(){if(this._children)return this._children;const e=this.box;if((0,m.TF)(e)<=1)return;const{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,m.gX)(e,V),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){const o=r*i[e],l=t(G,o);for(let e=1;e<r;++e)(0,h.jk)(l,l,t(k,o+e));const c=(l[0]<n[0]?1:0)|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;const c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){const t=a[e];c[t][s[t]++]=i[e]}const u=new Array;for(let e=0;e<8;++e){const i=c[e];void 0!==i&&u.push(new U(i,r,t))}return this._children=u,this._children}static prune(){$.prune()}}const V=(0,d.vt)(),G=(0,d.vt)(),k=(0,d.vt)(),$=new L.A({deallocator:null});var Z=r(24326);class q{constructor(e){this.id=(0,Z.c)(),this.type=0,this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,R.Dg)(r.indices)})}get attributes(){return this._attributes}}class Y{constructor(){this.uid=(0,Z.c)()}}class X extends Y{constructor(e){super(),this.highlightName=e,this.channel=0}}var K=r(94656);class J extends q{constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,W.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){const{data:r,indices:i,size:n,stride:o}=e;return(0,W.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null!=t?(e,n)=>{const a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:(e,t)=>{const n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:null!=t?(e,n)=>{const a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}:function(e,t,r){return(i,n)=>{const o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o)}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){const t=new J(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:H(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){const r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,K.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){const r=new Array;for(const i of e)r.push(t.indices[i]);return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this.drawIndices??this.positionAttribute?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,h.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;const r=this.material.primitiveVertexCount;(0,W.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);const i=(0,R.tM)(t/r);return new U(i,r,this.readPrimitivePosition)}get transformation(){return this._transformation??c.zK}set transformation(e){this._transformation=e&&e!==c.zK?(0,c.o8)(e):null}get highlights(){return this._highlights||Q}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new X(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const Q=new Set;var ee=r(65529),te=r(97768),re=r(84952),ie=r(38969),ne=r(95117),oe=r(2741);let ae;var se=r(63907),le=r(25530),ce=r(42293);const ue=()=>A.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let he=null,de=null;async function me(){return null==de&&(ae??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,oe.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),de=ae,he=await de),de}function fe(e,t,r,i,n){const o=(0,ce.MW)(t?se.CQ.COMPRESSED_RGBA8_ETC2_EAC:se.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function pe(e){return e.getNumImages()>=1&&!e.isUASTC()}function ge(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function ve(e,t,r,i,n,o,a,s,l=!1){const{compressedTextureETC:c,compressedTextureS3TC:u}=e.capabilities,{basisFormat:h,internalFormat:d}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?se.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:se.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?se.CQ.COMPRESSED_SRGB8_ETC2:se.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:se.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:se.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?se.H0.SRGB8_ALPHA8:6408}}(null!=c,null!=u,i,l),m=t.hasMipmap?r:Math.min(1,r),f=[];for(let e=0;e<m;e++)f.push(new Uint8Array(a(e,h))),s(e,h,f[e]);return t.internalFormat=d,t.hasMipmap=f.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new le.A(e,t,{type:"compressed",levels:f})}const xe=()=>A.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function _e(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const ye=_e("DXT1"),be=_e("DXT3"),we=_e("DXT5");function Me(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Se(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const a=Math.min(Math.sqrt(r/o),i/n);return[Me(Math.round(e*a),i),Me(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:Te(e,r,i)}function Te(e,t,r){if(e instanceof ImageData)return Te(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Ce=r(67171),Ee=r(12541);class Ie{constructor(e,t){this._data=e,this.id=(0,Z.c)(),this.events=new ee.bk,this._parameters={...Fe,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,re.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,ie.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,re.DB)(e.src)||(0,re.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Ce.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,Ee.tl)(e)||(0,Ee.tr)(e)||(0,Ee.CR)(e)||(0,Ee.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,z.mw)(e)||(0,z.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==he)return e.byteLength;const r=new he.KTX2File(new Uint8Array(e)),i=ge(r)?fe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==he)return e.byteLength;const r=new he.BasisFile(new Uint8Array(e)),i=pe(r)?fe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Ae(e):t,n=t.pixelFormat??6408,o=(0,ce.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new le.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,z.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,z.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,z.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,z.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,z.mw)(t)||(0,z.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,z.mw)(t)||(0,z.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,z.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,z.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return xe().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return xe().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case ye:n=8,o=se.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case be:n=16,o=se.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case we:n=16,o=se.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return xe().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(xe().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,u=l;let h,d;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const f=[];for(let t=0;t<a;++t)d=(s+3>>2)*(l+3>>2)*n,h=new Uint8Array(e.buffer,m,d),f.push(h),m+=d,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:o,width:c,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new le.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return ue().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==se.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return ue().error("Unsupported KTX1 image"),null;const i=r[7];let n=1,o=r[9],a=r[10];if(3&o||3&a)return null;const s=o,l=a;let c,u;!1!==t&&(n=Math.max(1,r[14]));let h=e.byteOffset+64;const d=[];for(let t=0;t<n;++t)u=(e[h]|e[h+1]<<8|e[h+2]<<16|e[h+3]<<24)>>>0,h+=4,c=new Uint8Array(e.buffer,h,u),d.push(c),h+=u,o=Math.max(1,o>>1),a=Math.max(1,a>>1);return{textureData:{type:"compressed",levels:d},internalFormat:i,width:s,height:l}}(r,t.hasMipmap??!1);if(null==i)throw new Error("KTX1 texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new le.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){null==he&&(he=await me());const n=new he.KTX2File(new Uint8Array(r));if(!ge(n))return null;const o=i&&2===n.getDFDTransferFunc();n.startTranscoding();const a=ve(e,t,n.getLevels(),n.getHasAlpha(),n.getWidth(),n.getHeight(),(e,t)=>n.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>n.transcodeImage(r,e,0,0,t,0,-1,-1),o);return n.close(),n.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==he&&(he=await me());const i=new he.BasisFile(new Uint8Array(r));if(!pe(i))return null;i.startTranscoding();const n=ve(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,W.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new le.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await B(t,{signal:r});return(0,P.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ne.y)(t,t.src,!1,r);return(0,P.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",a),t.removeEventListener("error",s),(0,te.xt)(l)},a=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},s=e=>{o(),n(e||new I.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",a),t.addEventListener("error",s);const l=(0,P.u7)(r,()=>s((0,P.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Se(r,e.parameters));const i=Ae(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new le.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,te.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Ae(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const Fe={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Oe=r(49255);class Pe{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var De=r(65786);class Re extends Pe{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,te.Gz)(this._texture),this._textureNormal=(0,te.Gz)(this._textureNormal),this._textureEmissive=(0,te.Gz)(this._textureEmissive),this._textureOcclusion=(0,te.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,te.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ne(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,te.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,P.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,te.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class Be extends De.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ne extends Be{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}var ze=r(48295);const He=(0,d.vt)(),Le=(0,d.vt)(),je=(0,d.vt)(),We=(0,d.vt)();var Ue=r(19245);class Ve{constructor(e,t){this.id=(0,Z.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,Ue.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,Ue.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,Oe._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,Oe._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,h.hZ)(e,0,0,0),(0,h.hZ)(We,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){const r=3*o;t(He,r),t(Le,r+1),t(je,r+2);const a=(0,ze.BU)(He,Le,je);a?((0,h.WQ)(He,He,Le),(0,h.WQ)(He,He,je),(0,h.hs)(He,He,1/3*a),(0,h.WQ)(e,e,He),i+=a):((0,h.WQ)(We,We,He),(0,h.WQ)(We,We,Le),(0,h.WQ)(We,We,je),n+=3)}return!(0===n&&0===i||(0!==i?((0,h.hs)(e,e,1/i),0):0===n||((0,h.hs)(e,We,1/n),0)))}(e,t,r/3)}}De.Y;class Ge{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const ke=(0,m.vt)();function $e(e,t,r,i,n,o){if(!e.visible)return;const a=(0,h.jb)(nt,i,r),{tolerance:s}=t,l=new Ge(s,!1,t.options.normalRequired);if(e.boundingInfo)qe(e.readPrimitivePosition,e.boundingInfo,r,a,s,n,l,o);else{const t=e.readPrimitivePosition;!function(e,t,r,i,n,o,a,s){const l=t,c=ot,u=Math.abs(l[0]),d=Math.abs(l[1]),m=Math.abs(l[2]),f=u>=d?u>=m?0:2:d>=m?1:2,p=f,g=l[p]<0?2:1,v=(f+g)%3,x=(f+(3-g))%3,_=l[v]/l[p],y=l[x]/l[p],b=1/l[p],w=Xe,M=Ke,S=Je,{normalRequired:T}=a;for(let t=r;t<i;++t){const r=3*t;n(c[0],r),n(c[1],r+1),n(c[2],r+2),o&&(o.applyToVertex(c[0],c[0][0],c[0][1],c[0][2],t),o.applyToVertex(c[1],c[1][0],c[1][1],c[1][2],t),o.applyToVertex(c[2],c[2][0],c[2][1],c[2][2],t)),(0,h.jb)(w,c[0],e),(0,h.jb)(M,c[1],e),(0,h.jb)(S,c[2],e);const i=w[v]-_*w[p],a=w[x]-y*w[p],l=M[v]-_*M[p],u=M[x]-y*M[p],d=S[v]-_*S[p],m=S[x]-y*S[p],f=d*u-m*l,g=i*m-a*d,C=l*a-u*i;if((f<0||g<0||C<0)&&(f>0||g>0||C>0))continue;const E=f+g+C;if(0===E)continue;const I=f*(b*w[p])+g*(b*M[p])+C*(b*S[p]);if(I*Math.sign(E)<0)continue;const A=I/E;A>=0&&s(A,A,T?et(c):null,t)}}(r,a,0,e.faceCount,t,n,l,o)}}const Ze=(0,d.vt)();function qe(e,t,r,i,n,o,a,s){if(null==t)return;const l=function(e,t){return(0,h.hZ)(t,1/e[0],1/e[1],1/e[2])}(i,Ze);if((0,m.C)(ke,t.box),null!=o&&o.applyToAabb(ke),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const u=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(u,h)),!(s<0)&&(a=Math.max(a,Math.min(u,h)),!(a>s)&&a<1/0)}(e,t,r,i)}(ke,r,l,n)){const{primitiveIndices:l}=t,c=l.length;if(c>1e3){const l=t.children;if(void 0!==l){for(const t of l)qe(e,t,r,i,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,l){const c=e[0],u=e[1],h=e[2],d=t[0],m=t[1],f=t[2],{normalRequired:p}=s;for(let e=0;e<i;++e){const t=o[e],r=3*t;let[i,s,g]=n(st,r),[v,x,_]=n(st,r+1),[y,b,w]=n(st,r+2);null!=a&&([i,s,g]=a.applyToVertex(at,i,s,g,e),[v,x,_]=a.applyToVertex(at,v,x,_,e),[y,b,w]=a.applyToVertex(at,y,b,w,e));const M=v-i,S=x-s,T=_-g,C=y-i,E=b-s,I=w-g,A=m*I-E*f,F=f*C-I*d,O=d*E-C*m,P=M*A+S*F+T*O,D=P*P;if(D<=it)continue;const R=c-i,B=u-s,N=h-g,z=(R*A+B*F+N*O)*P;if(z<0||z>D)continue;const H=B*T-S*N,L=N*M-T*R,j=R*S-M*B,W=(d*H+m*L+f*j)*P;if(W<0||z+W>D)continue;const U=(C*H+E*L+I*j)/P;U>=0&&l(U,U,p?Qe(M,S,T,C,E,I,Ye):null,t)}}(r,i,0,c,e,l,o,a,s)}}const Ye=(0,d.vt)();const Xe=(0,d.vt)(),Ke=(0,d.vt)(),Je=(0,d.vt)();function Qe(e,t,r,i,n,o,a){return(0,h.hZ)(tt,e,t,r),(0,h.hZ)(rt,i,n,o),(0,h.$A)(a,tt,rt),(0,h.S8)(a,a),a}function et(e){return(0,h.jb)(tt,e[1],e[0]),(0,h.jb)(rt,e[2],e[0]),(0,h.$A)(Ye,tt,rt),(0,h.S8)(Ye,Ye),Ye}const tt=(0,d.vt)(),rt=(0,d.vt)(),it=1e-7*1e-7,nt=(0,d.vt)(),ot=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()],at=(0,d.vt)(),st=(0,d.vt)();var lt=r(90629),ct=r(65720),ut=r(27921),ht=r(19419),dt=r(11964);function mt(e,t){return e.isRectangle?(0,ht.Uc)(e.bounds,t):function(e,t){return pt(e[0],e[1],t)}(t,e.points)}function ft(e,t,r,i){const n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,ht.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(const r of e.points)if((0,ht.Uc)(t,r))return!0;if(function(e,t){const r=e[0],i=e[1],n=e[2],o=e[3];return pt(r,i,t)||pt(n,i,t)||pt(n,o,t)||pt(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(gt(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,ht.fA)(n,o,a,s,wt)))return!1;if(mt(e,t)||mt(e,r)||mt(e,i))return!0;for(const n of e.points)if((0,ze.cq)(t,r,i,n,Mt))return!0;for(let n=0;n<e.points.length;n++){const o=e.points[n],a=e.points[(n+1)%e.points.length];if(xt(t,r,o,a)||xt(r,i,o,a)||xt(i,t,o,a))return!0}return!1}function pt(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){const a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function gt(e,t,r){const i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,ht.Rj)(r,s,l)&&!(0,ht.Rj)(r,c,u))||vt(e,t,i,n,o,n)||vt(e,t,o,n,o,a)||vt(e,t,o,a,i,a)||vt(e,t,i,a,i,n))}function vt(e,t,r,i,n,o){const a=_t(e[0],e[1],t[0],t[1],r,i),s=_t(e[0],e[1],t[0],t[1],n,o),l=_t(r,i,n,o,e[0],e[1]),c=_t(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&yt(e,t,r,i)||0===s&&yt(e,t,n,o)||0===l&&bt(r,i,n,o,e[0],e[1])||0===c&&bt(r,i,n,o,t[0],t[1])}function xt(e,t,r,i){return vt(e,t,r[0],r[1],i[0],i[1])}function _t(e,t,r,i,n,o){const a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Mt?0:Math.sign(a)}function yt(e,t,r,i){return bt(e[0],e[1],t[0],t[1],r,i)}function bt(e,t,r,i,n,o){return n>=Math.min(e,r)-Mt&&n<=Math.max(e,r)+Mt&&o>=Math.min(t,i)-Mt&&o<=Math.max(t,i)+Mt}const wt=(0,ht.vt)(),Mt=((0,lt.r_)(),(0,lt.r_)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,dt.vt)(),1e-9);class St{constructor(e){this.type=e,this.distance=Number.POSITIVE_INFINITY,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,d.vt)(),this.normal=(0,d.vt)()}reset(){this.distance=Number.POSITIVE_INFINITY,this.hasNormal=!1}update(e,t,r,i){this.distance=e,this.primitiveIndex=t,(0,h.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,h.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i){e<this.distance&&this.update(e,t,r,i)}updateIfCloser(e){const{distance:t,primitiveIndex:r,point:i,normal:n}=e;this.updateIfCloserFromValues(t,r,i,e.hasNormal?n:null)}get valid(){return Number.isFinite(this.distance)}}function Tt(e,t,r,i,n){if(!e.visible)return null;const o=new St(4);let a;a=e.boundingInfo?Et(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Ct(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(const e of a)o.updateIfCloser(e);return o.valid?o:null}function*Ct(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;const{camera:c,screenPolygonPrimitiveProcessor:u}=e;for(let e=i;e<n;++e){const i=(s?.[e]??e)+l,n=null==s?i:e,d=3*i;It(Pt[0],o,d+0,a,n,t),It(Pt[1],o,d+1,a,n,t),It(Pt[2],o,d+2,a,n,t);const m=Nt;let f;Ht.reset();const p=Dt;for(const e of u.processTriangle(Pt))if(p.length=0,(0,ut.H)(c.frustum[4],e,()=>p.pushNew(),!1),!(p.length<3)){for(let e=0;e<p.length;e++)c.projectToScreen(p.at(e),Rt[e]);At(r,Rt,p.length)&&(Ft(c.eye,p,Bt),null==f&&(f=(0,ze.rb)(Nt,Pt[0],Pt[1],Pt[2])),Ht.updateIfCloserFromValues((0,h.Io)(c.eye,Bt),i,Bt,f?m:null))}Ht.valid&&(yield Ht)}}function*Et(e,t,r,i,n,o){let a;if(null!=o?((0,m.C)(Ot,t.box),o.applyToAabb(Ot),a=(0,ct.GH)(n.broadPhaseFrustum,Ot,i)):a=(0,ct.GH)(n.broadPhaseFrustum,t.box,i),!a)return;const{primitiveIndices:s}=t,l=s.length;if(l>1e3){const a=t.children;if(void 0!==a){for(const t of a)yield*Et(e,t,r,i,n,o);return}}yield*Ct(r,i,n,0,l,e,o,s,0)}function It(e,t,r,i,n,o){const[a,s,l]=t(e,r);null!=i?i.applyToVertex(e,a,s,l,n):(0,h.hZ)(e,a,s,l),o&&(0,h.Z0)(e,e,o)}function At(e,t,r){for(let i=1;i<r-1;i++)if(ft(e,t[0],t[i],t[i+1]))return!0;return!1}function Ft(e,t,r){let i=Number.POSITIVE_INFINITY;const n=t.at(0);for(let o=1;o<t.length-1;o++){(0,ze.k3)(zt,e,n,t.at(o),t.at(o+1));const a=(0,h.hG)(e,zt);a<i&&(i=a,(0,h.C)(r,zt))}}const Ot=(0,m.vt)(),Pt=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()],Dt=new L.A({allocator:e=>e??(0,d.vt)()}),Rt=Array.from({length:12},()=>(0,lt.gs)()),Bt=(0,d.vt)(),Nt=(0,d.vt)(),zt=(0,d.vt)(),Ht=new St(4);var Lt=r(16396);function jt(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function Wt(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Ut(e,t,r,i,n=1){const{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;const u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}}function Vt(e,t,r,i,n,o){switch(e){case"position":{(0,W.vA)(3===t.size);const i=n.getField(e,p.xs);(0,W.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Wt(e,r,i,n);const{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,u=a.length,h=t[0],d=t[1],m=t[2],f=t[4],p=t[5],g=t[6],v=t[8],x=t[9],_=t[10],y=t[12],b=t[13],w=t[14];i*=c;let M=0,S=0,T=0;const C=(0,l.tZ)(t)?e=>{M=o[e]+y,S=o[e+1]+b,T=o[e+2]+w}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=h*t+f*r+v*i+y,S=d*t+p*r+x*i+b,T=m*t+g*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),s[i]=M,s[i+1]=S,s[i+2]=T,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)s[i]=M,s[i+1]=S,s[i+2]=T,i+=c}}(t,r,i,o);break}case"normal":{(0,W.vA)(3===t.size);const r=n.getField(e,p.xs);(0,W.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Wt(e,r,i,n);const{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,h=a.length,d=s[0],m=s[1],f=s[2],p=s[4],g=s[5],v=s[6],x=s[8],_=s[9],y=s[10],b=!(0,l.ut)(s),w=1e-6,M=1-w;i*=u;let S=0,T=0,C=0;const E=(0,l.tZ)(s)?e=>{S=o[e],T=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];S=d*t+p*r+x*i,T=m*t+g*r+_*i,C=f*t+v*r+y*i};if(1===n)if(b)for(let e=0;e<h;++e){E(3*a[e]);const t=S*S+T*T+C*C;if(t<M&&t>w){const e=1/Math.sqrt(t);c[i]=S*e,c[i+1]=T*e,c[i+2]=C*e}else c[i]=S,c[i+1]=T,c[i+2]=C;i+=u}else for(let e=0;e<h;++e)E(3*a[e]),c[i]=S,c[i+1]=T,c[i+2]=C,i+=u;else for(let e=0;e<h;++e){if(E(3*a[e]),b){const e=S*S+T*T+C*C;if(e<M&&e>w){const t=1/Math.sqrt(e);S*=t,T*=t,C*=t}}for(let e=0;e<n;++e)c[i]=S,c[i+1]=T,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,W.vA)(2===t.size);const r=n.getField(e,p.mJ);(0,W.vA)(!!r,`No buffer view for ${e}`),jt(t,r,o);break}case"uv0":{(0,W.vA)(2===t.size);const r=n.getField(e,p.ZD)??n.getField(e,p.gH);(0,W.vA)(!!r,`No buffer view for ${e}`),jt(t,r,o);break}case"uvi":{(0,W.vA)(2===t.size);const r=n.getField(e,p.mJ);(0,W.vA)(!!r,`No buffer view for ${e}`),jt(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,p.XP);(0,W.vA)(!!r,`No buffer view for ${e}`),(0,W.vA)(3===t.size||4===t.size),Ut(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,p.Y$)??n.getField(e,p.Y$);(0,W.vA)(!!r,`No buffer view for ${e}`),(0,W.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,W.vA)(4===t.size);const i=n.getField(e,p.Eq);(0,W.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);const{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,h=a.length,d=s[0],m=s[1],f=s[2],p=s[4],g=s[5],v=s[6],x=s[8],_=s[9],y=s[10],b=!(0,l.ut)(s),w=1e-6,M=1-w;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3];let h=d*r+p*n+x*s,S=m*r+g*n+_*s,T=f*r+v*n+y*s;if(b){const e=h*h+S*S+T*T;if(e<M&&e>w){const t=1/Math.sqrt(e);h*=t,S*=t,T*=t}}c[i]=h,c[i+1]=S,c[i+2]=T,c[i+3]=l,i+=u}else for(let e=0;e<h;++e){const t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],h=o[t+3];let S=d*r+p*s+x*l,T=m*r+g*s+_*l,C=f*r+v*s+y*l;if(b){const e=S*S+T*T+C*C;if(e<M&&e>w){const t=1/Math.sqrt(e);S*=t,T*=t,C*=t}}for(let e=0;e<n;++e)c[i]=S,c[i+1]=T,c[i+2]=C,c[i+3]=h,i+=u}}(t,r,i,o);break}case"olidColor":(0,W.vA)(4===t.size),Ut(t,4,n.getField(e,p.XP),o)}}(0,d.vt)();class Gt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){null!=i&&function(e,t,r,i,n){const{buffer:o,offset:a}=n;for(const n of t.fields.keys()){const t=e.get(n),s=t?.indices;t&&s&&Vt(n,t,r,i,o,a)}}(r,this.layout,e,t,i)}}const kt=Kt(-1),$t=Kt(1),Zt=kt,qt=new Array;qt[0]=null,qt[1]=$t,qt[2]=kt,qt[3]=Kt(-2),qt[4]=Kt(-3);const Yt=qt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(Zt,e));function Xt({output:e,enableOITOffset:t,polygonOffset:r}){return(0,Oe._$)(e)&&t?Yt[r]:qt[r]}function Kt(e){return{factor:1*e,units:2*e}}qt[1]=$t;var Jt=r(32198),Qt=r(51976),er=r(34711);class tr extends er.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,Jt.Cg)([(0,Qt.W)()],tr.prototype,"hasHighlightMixTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],tr.prototype,"emissionDimmingPass",void 0);class rr extends tr{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,Jt.Cg)([(0,Qt.W)({count:5})],rr.prototype,"polygonOffset",void 0),(0,Jt.Cg)([(0,Qt.W)()],rr.prototype,"transparent",void 0),(0,Jt.Cg)([(0,Qt.W)()],rr.prototype,"enableOITOffset",void 0);const ir=new rr,nr=2e-5,or=2e-6,ar=(0,d.vt)();var sr=r(91429),lr=r(91829),cr=r(4431),ur=r(1843),hr=r(72824),dr=r(13840),mr=r(42958),fr=r(16943),pr=r(90644);const gr=(0,pr.p3)(1,0,1,771);function vr(e,t=!1,r=!1){if(r)return pr.uR;switch(e){case 0:return t?pr.RC:pr.T8;case 1:return gr;default:return null}}function xr(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?pr.Uy:null;case 1:return null}}function _r(e,t=513){return{func:(0,Oe._$)(e)?515:t}}(0,lr._Y)();const yr={mask:255},br=(0,pr.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),wr=(0,pr.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,pr.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,pr.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680}),r(4576),r(66289);var Mr=r(69622),Sr=r(32728);class Tr{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",p.Eq),this.color=e.getField("instanceColor",p.XP),this.olidColor=e.getField("instanceOlidColor",p.XP),this.state=e.getField("state",p.SL),this.lodLevel=e.getField("lodLevel",p.SL)}}let Cr=class extends Mr.A{constructor(e,t){super(e),this.events=new ee.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ir(Er.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Dr,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Tr(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,W.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,W.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ar,i=Fr;t.localTransform.getMat(e,Or),t.globalTransform.getMat(e,Pr);const n=(0,l.lw)(Pr,Pr,Or);(0,h.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,a.z0)(i,n),t.model.setMat(e,i);const o=(0,Sr.wp)(Ar,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,a.B8)(i,i),(0,a.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Fr),r.modelOrigin.getVec(e,Ar),t[0]=Fr[0],t[1]=Fr[1],t[2]=Fr[2],t[3]=0,t[4]=Fr[3],t[5]=Fr[4],t[6]=Fr[5],t[7]=0,t[8]=Fr[6],t[9]=Fr[7],t[10]=Fr[8],t[11]=0,t[12]=Ar[0],t[13]=Ar[1],t[14]=Ar[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ar,this,e),t*=Math.max(Ar[0],Ar[1],Ar[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ar,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ar[0],Ar[1],Ar[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Dr,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Tr(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Jt.Cg)([(0,sr.MZ)({constructOnly:!0})],Cr.prototype,"shaderTransformation",void 0),(0,Jt.Cg)([(0,sr.MZ)()],Cr.prototype,"_size",void 0),(0,Jt.Cg)([(0,sr.MZ)({readOnly:!0})],Cr.prototype,"size",null),Cr=(0,Jt.Cg)([(0,sr.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Cr);const Er=(0,ur.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ir(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,fr.E)()&&e.vec4u8("instanceOlidColor"),e}const Ar=(0,d.vt)(),Fr=(0,s.vt)(),Or=(0,c.vt)(),Pr=(0,c.vt)(),Dr=64,Rr=(0,ur.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Br=r(74810),Nr=r(28491),zr=r(49788);class Hr extends hr.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Br.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,lr.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=zr.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}hr.gy;let Lr=class extends mr.w{constructor(e,t){let i=(0,cr.U)(Ur(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,cr.U)(function(e){return Ir(Rr.clone(),e)}(t)))),super(e,t,i),this.shader=new dr.r(Nr.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,pr.Ey)({blending:i?vr(r,!1,e.emissionDimmingPass):null,culling:Wr(e)?(0,pr.Xt)(n):null,depthTest:_r(r,jr(o)),depthWrite:xr(e),colorWrite:pr.kn,stencilWrite:a?yr:null,stencilTest:a?t?wr:br:null,polygonOffset:Xt(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function jr(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function Wr(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Ur(e){const t=(0,ur.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,fr.E)()&&t.vec4u8("olidColor"),t}Lr=(0,Jt.Cg)([(0,sr.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Lr);class Vr extends rr{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,Jt.Cg)([(0,Qt.W)({count:4})],Vr.prototype,"alphaDiscardMode",void 0),(0,Jt.Cg)([(0,Qt.W)({count:3})],Vr.prototype,"doubleSidedMode",void 0),(0,Jt.Cg)([(0,Qt.W)({count:8})],Vr.prototype,"pbrMode",void 0),(0,Jt.Cg)([(0,Qt.W)({count:3})],Vr.prototype,"cullFace",void 0),(0,Jt.Cg)([(0,Qt.W)({count:3})],Vr.prototype,"normalType",void 0),(0,Jt.Cg)([(0,Qt.W)({count:4})],Vr.prototype,"customDepthTest",void 0),(0,Jt.Cg)([(0,Qt.W)({count:8})],Vr.prototype,"emissionSource",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVertexColors",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasSymbolColors",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVerticalOffset",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasColorTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasMetallicRoughnessTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasOcclusionTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasNormalTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasScreenSizePerspective",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVertexTangents",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasOccludees",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instanced",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instancedDoublePrecision",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasModelTransformation",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"offsetBackfaces",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVVSize",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVVColor",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"receiveShadows",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasShadowHighlights",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"receiveAmbientOcclusion",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"receiveGlobalIllumination",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"textureAlphaPremultiplied",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instancedFeatureAttribute",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instancedColor",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"writeDepth",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"snowCover",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasColorTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasEmissionTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasNormalTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasOcclusionTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Gr=r(57323);let kr=class extends Lr{constructor(){super(...arguments),this.shader=new dr.r(Gr.R,()=>r.e(9933).then(r.bind(r,39933)))}};kr=(0,Jt.Cg)([(0,sr.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],kr);class $r extends Qt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,Jt.Cg)([(0,Qt.W)()],$r.prototype,"receiveShadows",void 0);class Zr extends Ve{constructor(e,t){super(e,Yr),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,Oe.uw)(e)&&!this.transparent],[4,e=>(0,Oe.uw)(e)&&this.transparent]]),this._layout=Ur(this.parameters),this._configuration=new Vr(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=zr.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,h.t2)(this.parameters.emissiveBaseColor,d.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,Oe._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){const a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,h.Re)(Xr,i,a),n=(0,h.Re)(Kr,n,a)),o=function(e,t,r,i){ir.output=t.transparent?1:0,ir.polygonOffset=t.polygonOffset,ir.enableOITOffset=t.enableOITOffset;const n=Xt(ir);if(!n)return e;const o=or*n.units,a=(0,h.oW)(ar,i,r);return(t,r,i,s)=>{const l=(i?1-Math.abs((0,h.Om)(a,i)):0)*n.factor*nr+o;return e(t,r+l,i,s)}}(o,this._configuration,i,n),$e(e,r,i,n,(0,Lt.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,i,n){const o=Xt(r);return o?function({units:e,factor:t},r,i,n){const o=or*e;return i+((n?1-Math.abs((0,h.Om)(r,n)):0)*t*nr+o)}(o,(0,h.oW)(ar,n,i),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Tt(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new qr(e)}createBufferWriter(){return new Gt(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,h.WQ)(ii,(0,m.pg)(e,ii),r)),(0,m.vI)(e,(0,h.WQ)(ii,(0,m.Lu)(e,ii),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,h.hZ)(ei,e[12],e[13],e[14]);let i=null;switch(t.viewingMode){case 1:i=(0,h.S8)(Qr,ei);break;case 2:i=(0,h.C)(Qr,Jr)}const n=(0,h.Re)(ti,ei,r.eye),o=(0,h.Bw)(n),a=(0,h.hs)(n,n,1/o);let s=null;this.parameters.screenSizePerspective&&(s=(0,h.Om)(i,a));const l=(0,Ue.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,h.hs)(i,i,l),(0,h.ei)(ri,i,t.transform.inverseRotation)}}class qr extends Re{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,h.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?kr:Lr,e)}}class Yr extends Hr{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const Xr=(0,d.vt)(),Kr=(0,d.vt)(),Jr=(0,d.fA)(0,0,1),Qr=(0,d.vt)(),ei=(0,d.vt)(),ti=(0,d.vt)(),ri=(0,d.vt)(),ii=(0,d.vt)(),ni=()=>A.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class oi{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function ai(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(ni().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(ni().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(ni().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(ni().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else ni().warn("Indexed geometries must specify faces"),i=!1;break}default:ni().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(ni().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(ni().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function si(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&(0,m.RF)(t,r.box)}),t}function li(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function ci(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const ui=new D.A(1,2,"wosr");async function hi(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,E.Ke)((0,C.A)(e,t));if(r.ok)return r.value.data;(0,P.QP)(r.error),function(e){throw new I.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){ni().warn("Externally referenced texture data is not yet supported");continue}const a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==li(l)},u=t?.disableTextures?Promise.resolve(null):B(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new oi(r,i,n+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new O,a=e.resource,s=D.A.parse(a.version||"1.0","wosr");ui.validate(s);const l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const a=c[e];if(!ai(a))continue;const s=ci(a),l=a.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===a.params.topology)return null;const t=a.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=l.position,x=v.values.length/v.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=g(e)??(0,R.tM)(x);p.push([e,new N.n(r,i,t.valuesPerElement,!0)])}const _=s.texture,y=h&&h[_];if(y&&!f.has(_)){const{image:e,parameters:t}=y,r=new Ie(e,t);i.push(r),f.set(_,r)}const b=f.get(_),w=b?b.id:void 0,M=s.material;let S=o.get(M,_);if(null==S){const e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?li(y.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),S=new Zr(i,t),o.set(M,_,S)}n.push(S);const T=new J(S,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(T)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:si(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let w;if(t.cache)w=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));w=await e(new _.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:S,referenceBoundingBox:A}=function(e,t,r){const n=e.model,s=e.meta,_=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=_&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const n of i.parts){const i=n.attributes.normal;if(null==i)return;const o=n.attributes.position,a=o.count,s=(0,d.vt)(),u=(0,d.vt)(),m=(0,d.vt)(),f=new Float32Array(4*a),g=new Float32Array(3*a),v=(0,l.B8)((0,c.vt)(),n.transform);let x=0,_=0;for(let l=0;l<a;l++){o.getVec(l,u),i.getVec(l,s),(0,h.Z0)(u,u,n.transform),(0,h.Re)(m,u,t.center),(0,h.Qr)(m,m,t.radius);const a=m[2],c=(0,h.Bw)(m),d=Math.min(.45+.55*c*c,1)**2.2;(0,h.Qr)(m,m,t.radius),null!==v&&(0,h.Z0)(m,m,v),(0,h.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,h.Cc)(m,m,s,a>-1?.2:Math.min(-4*a-3.8,1)),g[x]=m[0],g[x+1]=m[1],g[x+2]=m[2],x+=3,f[_]=d,f[_+1]=d,f[_+2]=d,f[_+3]=1,_+=4}n.attributes.normal=new p.xs(g.buffer),n.attributes.color=new p.Eq(f.buffer)}}}(e,_));const S=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:S,isSchematic:!1,treeRendering:w,mrrFactors:Br.SY}:{usePBR:S,isSchematic:!1,treeRendering:!1,mrrFactors:Br.mb},E={...t.materialParameters,treeRendering:w},I=new Array,A=new Map,F=new Map,O=n.lods.length,P=(0,m.Ie)();return n.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(O>1&&0===s||O>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new T(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new Zr({},t):function(e,t,r,n,o,a,s,l,c){const h=e.materials.get(t.material);if(null==h)return null;const{normal:m,color:f,texCoord0:p,tangent:g}=t.attributes,v=t.material+(m?"_normal":"")+(f?"_color":"")+(p?"_texCoord0":"")+(g?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,y=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!a.has(v)){if(x){const t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?l.compressionOptions:void 0;s.set(t,new Ie((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==y&&!c;t(h.colorTexture,r,1!==y),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}const r=(0,i.xV)(h.color[0]),m=(0,i.xV)(h.color[1]),f=(0,i.xV)(h.color[2]),p=null!=h.colorTexture&&x?s.get(h.colorTexture):null,g=(0,Br.Jr)(h),w=null!=h.normalTextureTransform?.scale?h.normalTextureTransform?.scale:u.Un;a.set(v,new Zr({...n,customDepthTest:1,textureAlphaMode:y,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,m,f],ambient:[r,m,f],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,unlit:h.unlit,textureId:null!=p?p.id:void 0,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&x?s.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&x?s.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&x&&!h.unlit?s.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&x?s.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:h.unlit?d.uY:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null!=h.emissiveStrengthKHR?h.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:g?Br.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:g,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},l))}const w=a.get(v);if(r.stageResources.materials.push(w),x){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return w}(n,e,c,C,E,A,F,t,w),{geometry:h,vertexCount:_}=function(e,t){const r=e.attributes.position.count,i=(0,y.x)(e.indices||r,e.primitiveType),n=f(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(n,s,e.transform,3,l);const c=[["position",new N.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=f(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,a.Ge)(di,e.transform),(0,g.b)(t,n,di,3,s),(0,o.or)(di)&&(0,g.n)(t,t),c.push(["normal",new N.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=f(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,a.z0)(di,e.transform),(0,v.t)(t,n,di,4,s),(0,o.or)(di)&&(0,g.n)(t,t,4),c.push(["tangent",new N.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=f(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),c.push(["uv0",new N.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof p.Eq?(0,v.b)(t,u,1,255):(u instanceof p.XP||u instanceof p.Uz)&&(0,v.b)(t,u,1/255,255):(t.fill(255),u instanceof p.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new N.n(t,i,4,!0)])}return{geometry:new J(t,c),vertexCount:r}}(e,r??new Zr({},t)),S=h.boundingInfo;null!=S&&0===s&&(0,m.RF)(P,S.box),null!=r&&(c.stageResources.geometries.push(h),c.numberOfVertices+=_)}),l||I.push(c)}),{engineResources:I,referenceBoundingBox:P}}(w,t,s.specifiedLodIndex);return{lods:S,referenceBoundingBox:A,isEsriSymbolResource:w.meta.isEsriSymbolResource,isWosr:!1}}const di=(0,s.vt)()},1843(e,t,r){r.d(t,{BP:()=>u,l5:()=>h});var i=r(13030),n=r(90239),o=r(4431),a=r(620),s=r(85079);class l{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new l(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class c{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:f(e[1].constructor)})))}freeze(){return this}get locations(){return(0,s.Xk)((0,o.U)(this))}vec2f16(e,t){return this._appendField(e,i.ZD,t),this}vec2f(e,t){return this._appendField(e,i.gH,t),this}vec2f64(e,t){return this._appendField(e,i.si,t),this}vec3f16(e,t){return this._appendField(e,i.EC,t),this}vec3f(e,t){return this._appendField(e,i.xs,t),this}vec3f64(e,t){return this._appendField(e,i.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.jz,t),this}vec4f(e,t){return this._appendField(e,i.Eq,t),this}vec4f64(e,t){return this._appendField(e,i.Aj,t),this}mat3f(e,t){return this._appendField(e,i.jZ,t),this}mat3f64(e,t){return this._appendField(e,i.j0,t),this}mat4f(e,t){return this._appendField(e,i.Sx,t),this}mat4f64(e,t){return this._appendField(e,i.E$,t),this}vec4u8(e,t){return this._appendField(e,i.XP,t),this}f16(e,t){return this._appendField(e,i.XW,t),this}f32(e,t){return this._appendField(e,i.Y$,t),this}f64(e,t){return this._appendField(e,i.qB,t),this}u8(e,t){return this._appendField(e,i.SL,t),this}u16(e,t){return this._appendField(e,i.h,t),this}i8(e,t){return this._appendField(e,i.bf,t),this}vec2i8(e,t){return this._appendField(e,i.D6,t),this}vec2i16(e,t){return this._appendField(e,i.mJ,t),this}vec2u8(e,t){return this._appendField(e,i.LC,t),this}vec2u16(e,t){return this._appendField(e,i.Yi,t),this}vec4u16(e,t){return this._appendField(e,i.Uz,t),this}vec4i16(e,t){return this._appendField(e,i.E7,t),this}u32(e,t){return this._appendField(e,i.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,n.GJ)(t.ElementType),o=this._stride;this._fields.set(e,{constructor:t,size:i,offset:o,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,n.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new l(this,e)}createView(e,t){return new l(this,e,t)}clone(){const e=new c;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e}get stride(){return this._stride}get fields(){return this._fields}}function u(){return new c}class h{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const d=[i.Y$,i.gH,i.xs,i.Eq,i.jZ,i.Sx,i.qB,i.si,i.Xm,i.Aj,i.j0,i.E$,i.SL,i.LC,i.eI,i.XP,i.h,i.Yi,i.nS,i.Uz,i.P,i.An,i.H$,i.ml,i.bf,i.D6,i.m8,i.TX,i.Qt,i.mJ,i.Vp,i.E7,i.My,i.UL,i.zD,i.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function f(e){return p.get(e)}const p=new Map;d.forEach(e=>p.set(m(e),e))},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return e.fields.entries().map(([e,o])=>{const a=o.constructor.ElementCount,s=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(o.constructor.ElementType),l=o.offset,c=o.optional?.glNormalized??!1,u=o.optional?.integer??!1;return new n._(e,a,s,l,r,c,t,u)}).toArray()}},26857(e,t,r){var i=r(32198),n=r(69622),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
|
|
629
|
+
fragBlur = b / w_total;`),e}const d=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}));r.d(t,["S",0,d])},43609(e,t,r){r.d(t,{a:()=>o,f:()=>a,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let a=0,s=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[a]=t[s],e[a+1]=t[s+1],a+=r,s+=n;return}const l=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[a]=Math.max(t[s]/l,-1),e[a+1]=Math.max(t[s+1]/l,-1),a+=r,s+=n;else for(let i=0;i<o;++i)e[a]=t[s]/l,e[a+1]=t[s+1]/l,a+=r,s+=n}function a(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,a=i?.count??e.count;let s=(i?.dstIndex??0)*o;for(let e=0;e<a;++e)n[s]=t,n[s+1]=r,s+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>h,b:()=>s,c:()=>n,d:()=>a,e:()=>d,f:()=>u,l:()=>c,n:()=>m,t:()=>o}),r(44208);var i=r(72727);function n(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,n=3,o=n){const a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],h=r[2],d=r[4],m=r[5],f=r[6],p=r[8],g=r[9],v=r[10],x=r[12],_=r[13],y=r[14];let b=0,w=0;for(let r=0;r<l;r++){const r=t[b],i=t[b+1],a=t[b+2];e[w]=c*r+d*i+p*a+x,e[w+1]=u*r+m*i+g*a+_,e[w+2]=h*r+f*i+v*a+y,b+=o,w+=n}return e}function a(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,n=3,o=n){const a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s),c=r[0],u=r[1],h=r[2],d=r[3],m=r[4],f=r[5],p=r[6],g=r[7],v=r[8];let x=0,_=0;for(let r=0;r<l;r++){const r=t[x],i=t[x+1],a=t[x+2];e[_]=c*r+d*i+p*a,e[_+1]=u*r+m*i+g*a,e[_+2]=h*r+f*i+v*a,x+=o,_+=n}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let a=0,s=0;for(let l=0;l<o;l++)e[s]=r*t[a],e[s+1]=r*t[a+1],e[s+2]=r*t[a+2],a+=n,s+=i;return e}function c(e,t,r,i){u(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function u(e,t,r,i,n=3,o=n){const a=Math.min(e.length/n,t.length/o);let s=0,l=0;const c=1/2.2;for(let u=0;u<a;u++)e[l]=i*(r*t[s])**c,e[l+1]=i*(r*t[s+1])**c,e[l+2]=i*(r*t[s+2])**c,s+=o,l+=n}function h(e,t,r,n=3,o=n){const a=(0,i.k)(e.length,n,3),s=(0,i.k)(t.length,o,3),l=Math.min(a,s);let c=0,u=0;for(let i=0;i<l;i++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=o,u+=n;return e}function d(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,a=0;for(let s=0;s<n;s++){const n=t[o],s=t[o+1],l=t[o+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[a]=t*n,e[a+1]=t*s,e[a+2]=t*l}o+=i,a+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:c,normalize:m,normalizeView:d,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,a=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<i;e++)n[c]=a[l]>>r,n[c+1]=a[l+1]>>r,n[c+2]=a[l+2]>>r,l+=s,c+=o},transformMat3:s,transformMat3View:a,transformMat4:o,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),o&&i===r&&(i=t),i+n}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360));r.d(t,["ie",0,l,"uC",0,s])},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!a.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(o,10);return new n(s,l,t)}}},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(a)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,a=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,a,/^jsapps\.esri\.com$/,s,l]},18370(e,t,r){r.d(t,{z:()=>n});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function n(e){return new i(e)}},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function a(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{fA:()=>n,vt:()=>i});const c=o(),u=a(),h=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:d,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:a,unitX:s,unitY:l,zeros:o},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,u,"uY",0,c])},91829(e,t,r){function i(){return[0,0,0,0]}function n(e,t,r,i){return[e,t,r,i]}function o(){return n(1,1,1,1)}function a(){return n(1,0,0,0)}function s(){return n(0,1,0,0)}function l(){return n(0,0,1,0)}function c(){return n(0,0,0,1)}r.d(t,{_Y:()=>c,fA:()=>n,vt:()=>i});const u=[0,0,0,0],h=o(),d=a(),m=s(),f=l(),p=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:p,UNIT_X:d,UNIT_Y:m,UNIT_Z:f,ZEROS:u,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,freeze:function(e,t,r,i){return[e,t,r,i]},fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t},fromValues:n,ones:o,unitW:c,unitX:a,unitY:s,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["Un",0,h,"uY",0,u,"v7",0,p])},78955(e,t,r){r.d(t,{Bw:()=>g,C:()=>n,Cc:()=>y,LI:()=>d,Om:()=>_,S8:()=>x,T9:()=>h,WQ:()=>a,Z0:()=>b,aI:()=>M,hG:()=>p,hZ:()=>o,hs:()=>m,jk:()=>u,m3:()=>v,t2:()=>w});var i=r(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function o(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function h(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function d(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+o*o)}function p(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],o=t[3]-e[3];return r*r+i*i+n*n+o*o}function g(e){const t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}function v(e){const t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}function x(e,t){const r=t[0],i=t[1],n=t[2],o=t[3];let a=r*r+i*i+n*n+o*o;return a>0&&(a=1/Math.sqrt(a),e[0]=r*a,e[1]=i*a,e[2]=n*a,e[3]=o*a),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,i){const n=t[0],o=t[1],a=t[2],s=t[3];return e[0]=n+i*(r[0]-n),e[1]=o+i*(r[1]-o),e[2]=a+i*(r[2]-a),e[3]=s+i*(r[3]-s),e}function b(e,t,r){const i=t[0],n=t[1],o=t[2],a=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,e[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,e[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,e[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,e}function w(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function M(e,t){const r=e[0],n=e[1],o=e[2],a=e[3],s=t[0],l=t[1],c=t[2],u=t[3],h=(0,i.FD)();return Math.abs(r-s)<=h*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-l)<=h*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(o-c)<=h*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-u)<=h*Math.max(1,Math.abs(a),Math.abs(u))}const S=s,T=l,C=c,E=f,I=p,A=g,F=v;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:E,distance:f,div:C,divide:c,dot:_,equals:M,exactEquals:w,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:A,length:g,lerp:y,max:h,min:u,mul:T,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=i.Ov;let n,o,a,s,l,c;do{n=2*r()-1,o=2*r()-1,l=n*n+o*o}while(l>=1);do{a=2*r()-1,s=2*r()-1,c=a*a+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*n,e[1]=t*o,e[2]=t*a*u,e[3]=t*s*u,e},round:d,scale:m,scaleAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e},set:o,sqrDist:I,sqrLen:F,squaredDistance:p,squaredLength:v,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:s,transformMat4:b,transformQuat:function(e,t,r){const i=t[0],n=t[1],o=t[2],a=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*o-l*n,h=c*n+l*i-a*o,d=c*o+a*n-s*i,m=-a*i-s*n-l*o;return e[0]=u*c+m*-a+h*-l-d*-s,e[1]=h*c+m*-s+d*-a-u*-l,e[2]=d*c+m*-l+u*-s-h*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>s,Qh:()=>o,lM:()=>n});var i=r(34275);function n(e){if(!e)return 0;let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=u;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=c;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+h:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return u+e.length*t}const c=32,u=16,h=145},65806(e,t,r){r.d(t,{g:()=>a});var i=r(51850),n=r(99917),o=r(9762);function a(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,o.projectBuffer)(s,e.spatialReference,0,t,r,0);const a=(0,n.tryProject)(e,r,i);return!!a&&(t[0]=a.x,t[1]=a.y,t[2]=a.z??0,!0)}const s=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var i=r(99917),n=r(16930),o=r(9762),a=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,lC:()=>s,my:()=>a,tM:()=>h,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<1024)return new Array(e).fill(0);if(e>m.length){const t=Math.max(2*m.length,e);m=new Uint8Array(t)}return new Uint8Array(m.buffer,0,e)}(e.length):n?h(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function a(e,t=e){return e<=1024?new Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function s(e,t,r){if(0===t.length)return e.slice();if(0===e.length)return t.slice();const i=a(e.length+t.length,r);for(let t=0;t<e.length;++t)i[t]=e[t];for(let r=0;r<t.length;++r)i[e.length+r]=t[r];return i}let l=d(131072);const c=[0],u=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){return 1===e?c:e<1024?Array.from(new Uint16Array(u.buffer,0,e)):e<u.length?new Uint16Array(u.buffer,0,e):(e>l.length&&(l=d(Math.max(2*l.length,e))),new Uint32Array(l.buffer,0,e))}function d(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let m=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;const i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},65720(e,t,r){r.d(t,{C:()=>v,vt:()=>p,Qy:()=>g,ui:()=>x,ST:()=>S,bU:()=>C,pw:()=>M,m7:()=>_,ZU:()=>y,GH:()=>w,Pi:()=>b,LJ:()=>T,c8:()=>A});var i=r(4341),n=r(58083),o=r(35522),a=r(51850),s=r(78955),l=r(91829),c=r(70328),u=r(71351);function h(e){return e?{ray:(0,u.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>h());var d=r(27921);function m(e,t,r,i){let{t0:n,t1:o}=i;const a=(0,d.mN)(e,t),s=(0,d.mN)(e,r);if(a>=0&&s>=0)return!1;if(a<0&&s>=0){const e=-a/(s-a);if(e<n)return!1;e<o&&(o=e)}else if(a>=0&&s<0){const e=a/(a-s);if(e>o)return!1;e>n&&(n=e)}return i.t0=n,i.t1=o,!0}var f=r(32114);function p(e){return e?[(0,d.vt)(e[0]),(0,d.vt)(e[1]),(0,d.vt)(e[2]),(0,d.vt)(e[3]),(0,d.vt)(e[4]),(0,d.vt)(e[5])]:[(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)()]}function g(){return[(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)()]}function v(e,t){for(let r=0;r<F;r++)(0,d.C)(e[r],t[r]);return e}function x(e,t,r,i=R){const a=(0,n.lw)(f.Rc.get(),t,e);(0,n.B8)(a,a);for(let e=0;e<O;++e){const t=(0,s.Z0)(f.Km.get(),P[e],a);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}!function(e,t){(0,d.Cr)(t[4],t[0],t[3],e[0]),(0,d.Cr)(t[1],t[5],t[6],e[1]),(0,d.Cr)(t[4],t[5],t[1],e[2]),(0,d.Cr)(t[3],t[2],t[6],e[3]),(0,d.Cr)(t[0],t[1],t[2],e[4]),(0,d.Cr)(t[5],t[4],t[7],e[5])}(r,i)}function _(e,t){return y(e,t.center,t.radius)}function y(e,t,r){for(let i=0;i<F;i++){const n=e[i];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=r)return!1}return!0}function b(e,t,r){for(const i of I)if((0,d.wE)(e[i],t,r))return!0;return!1}function w(e,t,r){const i=(0,c.gX)(t,B),n=(0,c.VL)(t)/2,a=(0,c.yr)(t)/2,s=(0,c.uJ)(t)/2;return r?function(e,t,r,i,n,a){const s=(0,o.Z0)(N,t,a);for(let t=0;t<F;t++){const o=e[t];if(o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]-(Math.abs(o[0]*a[0]+o[1]*a[1]+o[2]*a[2])*r+Math.abs(o[0]*a[4]+o[1]*a[5]+o[2]*a[6])*i+Math.abs(o[0]*a[8]+o[1]*a[9]+o[2]*a[10])*n)>0)return!1}return!0}(e,i,n,a,s,r):function(e,t,r,i,n){for(let o=0;o<F;o++){const a=e[o];if(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]+a[3]-(Math.abs(a[0])*r+Math.abs(a[1])*i+Math.abs(a[2])*n)>0)return!1}return!0}(e,i,n,a,s)}function M(e,t){return E(e,function(e,t=h()){return(0,u.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,D.get()))}function S(e,t,r){return E(e,function(e,t,r=h()){const i=(0,o.Bw)(e.vector);return(0,u.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,D.get()))}function T(e,t,r){return function(e,t,r,i){const n={t0:0,t1:1};for(const o of t)if(!m(e[o],r,i,n))return!1;return n.t0<n.t1}(e,I,t,r)}function C(e,t){for(let r=0;r<F;r++)if((0,d.mN)(e[r],t)>0)return!1;return!0}function E(e,t){for(let r=0;r<F;r++)if(!(0,d.$Q)(e[r],t))return!1;return!0}const I=[0,1,2,3,5],A={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]},F=6,O=8,P=[(0,l.fA)(-1,-1,-1,1),(0,l.fA)(1,-1,-1,1),(0,l.fA)(1,1,-1,1),(0,l.fA)(-1,1,-1,1),(0,l.fA)(-1,-1,1,1),(0,l.fA)(1,-1,1,1),(0,l.fA)(1,1,1,1),(0,l.fA)(-1,1,1,1)],D=new i.I(h),R=g(),B=(0,a.vt)(),N=(0,a.vt)()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>c,_I:()=>h,vt:()=>l});var i=r(34727),n=r(4341),o=r(35522),a=r(51850),s=r(32114);function l(e){return e?{origin:(0,a.o8)(e.origin),vector:(0,a.o8)(e.vector)}:{origin:(0,a.vt)(),vector:(0,a.vt)()}}function c(e,t){const r=d.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function h(e,t,r){return function(e,t,r,n,a){const{vector:l,origin:c}=e,u=(0,o.Re)(s.rq.get(),t,c),h=(0,o.Om)(l,u)/(0,o.m3)(l);return(0,o.hs)(a,l,(0,i.qE)(h,0,1)),(0,o.WQ)(a,a,e.origin)}(e,t,0,0,r)}(0,a.vt)(),(0,a.vt)();const d=new n.I(()=>l())},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>l});var i=r(69052),n=(r(49186),r(18370)),o=r(17676),a=(r(5443),r(39829),r(82799),r(16930)),s=(r(80754),r(21325));async function l(e,t,r){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(r=t);let i=null;for(const t of e)i??=t?.spatialReference;if(!i)return e;const n=(0,s.Vp)(i);if(!n)return e;const[a,l]=n.valid;let h=!1;for(const t of e){if(!t)continue;if("point"===t.type){h||=t.x>=l,h||=t.x<=a;continue}const{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=l,h||=e.xmin<=a,h||=e.xmax>=l,h||=e.xmax<=a}if(!h)return e;const[{foldInto360Range:d},m]=await(0,o.qr)(Promise.all([c.getImportPromise(),u.getImportPromise()]),r),f=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=m.fromGeometry(e),r=m.toGeometry(d(t,f),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const c=(0,n.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),u=(0,n.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){const i=(0,s.Vp)(r);if(null==i)return e;const[n,o]=i.valid,a=2*o;let l=0,c=0;t>o?l=Math.ceil(Math.abs(t-o)/a):t<n&&(l=-Math.ceil(Math.abs(t-n)/a)),e>o?c=Math.ceil(Math.abs(e-o)/a):e<n&&(c=-Math.ceil(Math.abs(e-n)/a));let u=e+(l-c)*a;const h=u-t;return h>o?u-=a:h<n&&(u+=a),u}function d(e){const t=(0,s.Vp)(e);if(null==t)return null;const[r,n]=t.valid;return new i.hr(r,n)}const m=d(a.A.WGS84);d(a.A.WebMercator),r.d(t,["Y_",0,m])},80754(e,t,r){r.d(t,{kS:()=>c,kd:()=>l});var i=r(82799),n=r(16930),o=r(60408),a=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,a.Ed)(e))for(const r of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,a.aO)(e)){const[r,i]=e.c;r[0]+=t,i[0]+=t;continue}if((0,a.FG)(e)){const[r,i]=e.a;r[0]+=t,i[0]+=t;continue}if((0,a.n1)(e)){const[r,i,n]=e.b;r[0]+=t,i[0]+=t,n[0]+=t;continue}e[0]+=t}for(const r of function(e){return(0,o.Bi)(e)?e.rings:e.paths}(e))for(const e of r)e[0]+=t;return e}r.d(t,["j7",0,s])},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>h,LV:()=>c,fA:()=>d,vt:()=>s}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),a=r(51850);function s(e){return e?l((0,a.o8)(e.origin),(0,a.o8)(e.direction)):l((0,a.vt)(),(0,a.vt)())}function l(e,t){return{origin:e,direction:t}}function c(e,t){const r=m.get();return r.origin=e,r.direction=t,r}function u(e,t=s()){return d(e.origin,e.direction,t)}function h(e,t,r=s()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function d(e,t,r=s()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}r(32114);const m=new i.I(()=>s());(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),(0,n.vt)()},94008(e,t,r){r.d(t,{iy:()=>m}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),a=r(35522),s=r(51850),l=r(91829),c=r(34275);var u=r(71351),h=r(44280),d=r(32114);class m{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,s.fA)(e,t,r):function(e){return t=e,(0,c.vZ)(t)&&t.length>=3||function(e){return((0,c.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,s.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,s.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,a.C)(this.center,e)}exactEquals(e){return(0,a.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,a.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new m(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,a.hG)(this.center,e)<=this.radius**2}intersects(e){const t=this.radius+e.radius;return(0,a.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,f))return!1;let{t0:r,t1:i}=f;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,f))return[];const{origin:i,direction:o}=r,{t0:l,t1:c}=f,h=e=>{const t=(0,s.vt)();return(0,a.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(l-c)<(0,n.FD)()?[h(l)]:[h(l),h(c)]}_intersect(e,t){const{origin:r,direction:i}=e,n=p;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const a=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),s=a*a-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(s<0)return!1;const l=Math.sqrt(s);return t.t0=(-a-l)/(2*o),t.t1=(-a+l)/(2*o),!0}projectPoint(e,t){const r=(0,a.Re)(d.rq.get(),e,this.center),i=(0,a.hs)(d.rq.get(),r,this.radius/(0,a.Bw)(r));return(0,a.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=d.rq.get(),i=d.Rc.get();(0,a.$A)(r,e.origin,e.direction),(0,a.$A)(t,r,e.origin),(0,a.hs)(t,t,1/(0,a.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),s=(0,h.g7)(e.origin,t);return(0,o.$0)(i,s+n,r),(0,a.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,a=t*t+n-2*Math.cos(o)*t*i,s=Math.sqrt(a),l=a-n;if(l<=0)return.5;const c=Math.sqrt(l),u=Math.acos(c/s)-Math.asin(i/(s/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,a.Re)(d.rq.get(),e,this.center),r=(0,a.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,a.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,a.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){const{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new m;const f={t0:0,t1:0},p=(0,s.vt)();(0,s.vt)(),(0,s.vt)()},48295(e,t,r){r.d(t,{BU:()=>u,Ui:()=>s,cq:()=>c,k3:()=>h,rb:()=>d});var i=r(4341),n=r(35522),o=r(51850),a=r(11964);function s(e,t,r){const i=1e-5,{direction:o,origin:a}=t,{p0:s,p1:l,p2:c}=e,u=l[0]-s[0],h=l[1]-s[1],d=l[2]-s[2],m=c[0]-s[0],f=c[1]-s[1],p=c[2]-s[2],g=o[1]*p-f*o[2],v=o[2]*m-p*o[0],x=o[0]*f-m*o[1],_=u*g+h*v+d*x;if(_>-i&&_<i)return!1;const y=1/_,b=a[0]-s[0],w=a[1]-s[1],M=a[2]-s[2],S=y*(b*g+w*v+M*x);if(S<0||S>1)return!1;const T=w*d-h*M,C=M*u-d*b,E=b*h-u*w,I=y*(o[0]*T+o[1]*C+o[2]*E);return!(I<0||S+I>1||(r&&((0,n.hs)(r,o,y*(m*T+f*C+p*E)),(0,n.WQ)(r,a,r)),0))}function l(e,t,r){const[i,n]=e,[o,a]=t,[s,l]=r;return.5*((o-i)*(l-n)-(a-n)*(s-i))}function c(e,t,r,i,n=0){const o=l(i,e,t),a=l(i,t,r),s=l(i,r,e);return!((o<-n||a<-n||s<-n)&&(o>n||a>n||s>n))}function u(e,t,r){return(0,n.Re)(m,t,e),(0,n.Re)(f,r,e),.5*(0,n.Bw)((0,n.$A)(m,m,f))}function h(e,t,r,i,o){(0,n.jb)(m,i,r),(0,n.jb)(p,o,r),(0,n.jb)(f,t,r);const a=(0,n.Om)(m,f),s=(0,n.Om)(p,f);if(a<=0&&s<=0)return void(0,n.C)(e,r);(0,n.jb)(f,t,i);const l=(0,n.Om)(m,f),c=(0,n.Om)(p,f);if(l>=0&&c<=l)return void(0,n.C)(e,i);const u=a*c-l*s;if(u<=0&&a>=0&&l<=0)return void(0,n.Ln)(e,r,m,a/(a-l));(0,n.jb)(f,t,o);const h=(0,n.Om)(m,f),d=(0,n.Om)(p,f);if(d>=0&&h<=d)return void(0,n.C)(e,o);const g=h*s-a*d;if(g<=0&&s>=0&&d<=0)return void(0,n.Ln)(e,r,p,s/(s-d));const v=l*d-h*c;if(v<=0&&c-l>=0&&h-d>=0)return(0,n.jb)(f,o,i),void(0,n.Ln)(e,i,f,(c-l)/(c-l+(h-d)));const x=1/(v+g+u);(0,n.C)(e,r),(0,n.Ln)(e,e,m,g*x),(0,n.Ln)(e,e,p,u*x)}function d(e,t,r,i){(0,n.jb)(m,r,t),(0,n.jb)(f,i,t),(0,n.$A)(e,m,f);const o=(0,n.Bw)(e);return 0!==o&&((0,n.hs)(e,e,1/o),!0)}r(32114),new i.I(a.vt),new i.I(()=>{return e?{p0:(0,o.o8)(e.p0),p1:(0,o.o8)(e.p1),p2:(0,o.o8)(e.p2)}:{p0:(0,o.vt)(),p1:(0,o.vt)(),p2:(0,o.vt)()};var e});const m=(0,o.vt)(),f=(0,o.vt)(),p=(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},21015(e,t,r){r.d(t,{R:()=>l});var i=r(11254),n=r(60999),o=r(49186),a=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,a.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,a.QP)(s.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>a});var i=r(34275),n=r(97146),o=r(63907);function a(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];i[a++]=n,i[a++]=o,i[a++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>a,Xi:()=>n,pn:()=>s,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const a=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(a)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),a.removeEventListener("load",r),a.removeEventListener("error",i)};a.addEventListener("load",r),a.addEventListener("error",i),a.src=o});try{a.src=o,await a.decode()}catch{}return URL.revokeObjectURL(o),a}},55907(e,t,r){r.d(t,{fetch:()=>hi});var i=r(40876),n=r(61473),o=r(34727),a=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),h=r(35522),d=r(51850),m=r(70328);function f(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var p=r(13030),g=r(73354),v=r(50867),x=r(43609),_=r(21015),y=r(84498),b=r(51530),w=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:w.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:w.Un,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(i[0],0,0,0,i[1],0,0,0,1),c=(0,s.vt)();return(0,a.lw)(c,o,l),(0,a.lw)(c,n,c),c}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class T{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var C=r(11254),E=r(60999),I=r(49186),A=r(53966),F=r(69397);class O{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new O;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var P=r(17676),D=r(46140),R=r(97146);async function B(e,t){return(await(0,C.A)(e,{responseType:"image",...t})).data}var N=r(46610),z=r(34275);function H(e){if(e.length<1024)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,z.LW)(e)?Float16Array.from(e):(0,z.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return(0,z.vZ)(e)?Float32Array.from(e):Uint32Array.from(e);default:return Float64Array.from(e)}}var L=r(15142),j=r(94008),W=r(620);class U{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this._readPosition=r,this._children=void 0,(0,W.vA)(e.length>=1);const i=e.length;$.clear();const n=(0,m.Ie)();for(let o=0;o<i;++o){const i=t*e[o];for(let e=0;e<t;++e){const t=i+e;$.push(t),(0,m.iT)(n,r(V,t))}}this.box=n;const o=new j.iy,a=(0,m.gX)(n,o.center);let s=.5*Math.max((0,m.VL)(n),(0,m.yr)(n),(0,m.uJ)(n)),l=s*s;for(let e=0;e<$.length;++e){const t=r(V,$.at(e)),i=(0,h.Re)(t,t,a),n=(0,h.uE)(i);if(n<=l)continue;const o=Math.sqrt(n),c=.5*(o-s);s+=c,l=s*s,(0,h.Ln)(a,a,i,c/o)}o.radius=s,this.sphere=o,$.clear()}get children(){if(this._children)return this._children;const e=this.box;if((0,m.TF)(e)<=1)return;const{_readPosition:t,_numIndexPerPrimitive:r,primitiveIndices:i}=this,n=(0,m.gX)(e,V),o=i.length,a=new Uint8Array(o),s=[0,0,0,0,0,0,0,0];for(let e=0;e<o;++e){const o=r*i[e],l=t(G,o);for(let e=1;e<r;++e)(0,h.jk)(l,l,t(k,o+e));const c=(l[0]<n[0]?1:0)|(l[1]<n[1]?2:0)|(l[2]<n[2]?4:0);a[e]=c,++s[c]}let l=0;for(let e=0;e<8;++e)s[e]>0&&++l;if(l<2)return;const c=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0];for(let e=0;e<8;++e)s[e]>0&&(c[e]=new Uint32Array(s[e]));s.fill(0);for(let e=0;e<o;++e){const t=a[e];c[t][s[t]++]=i[e]}const u=new Array;for(let e=0;e<8;++e){const i=c[e];void 0!==i&&u.push(new U(i,r,t))}return this._children=u,this._children}static prune(){$.prune()}}const V=(0,d.vt)(),G=(0,d.vt)(),k=(0,d.vt)(),$=new L.A({deallocator:null});var Z=r(24326);class q{constructor(e){this.id=(0,Z.c)(),this.type=0,this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,R.Dg)(r.indices)})}get attributes(){return this._attributes}}class Y{constructor(){this.uid=(0,Z.c)()}}class X extends Y{constructor(e){super(),this.highlightName=e,this.channel=0}}var K=r(94656);class J extends q{constructor(e,t,r=null,i=-1,n,o){super(t),this.material=e,this.mapPositions=r,this.edgeIndicesLength=i,this.baseGeometry=n,this.drawIndices=o,this._readPrimitivePosition=null,this._vertexPositionIndicesCache=void 0,this._transformation=void 0,this.localOrigin=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.occludees=void 0,this.visible=!0,this._boundingInfo=null,(0,W.vA)((e?.useIndexing??!1)===(null!=o),"Material index requirement and Geometry must match"),this.edgeIndicesLength<0&&(this.edgeIndicesLength=this.indexCount)}get readPrimitivePosition(){return this._readPrimitivePosition??=function(e,t){const{data:r,indices:i,size:n,stride:o}=e;return(0,W.vA)(2===n||3===n||4===n,"Position attribute must have 2, 3 or 4 components"),2===n?null!=t?(e,n)=>{const a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=-2,e}:(e,t)=>{const n=i[t]*o;return e[0]=r[n],e[1]=r[n+1],e[2]=-2,e}:null!=t?(e,n)=>{const a=i[t[n]]*o;return e[0]=r[a],e[1]=r[a+1],e[2]=r[a+2],e}:function(e,t,r){return(i,n)=>{const o=t[n]*r;return i[0]=e[o],i[1]=e[o+1],i[2]=e[o+2],i}}(r,i,o)}(this.positionAttribute,this.drawIndices),this._readPrimitivePosition}_invalidateReadPrimitivePosition(){this._readPrimitivePosition=null}instantiate(e={}){const t=new J(e.material||this.material,[],this.mapPositions,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:H(t.data)},this._attributes.set(e,t),"position"===e&&this._invalidateReadPrimitivePosition()),t}setAttributeData(e,t){const r=this._attributes.get(e);r?(this._attributes.set(e,{...r,exclusive:!0,data:t}),"position"===e&&this._invalidateReadPrimitivePosition()):(0,K.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){return void 0!==this._vertexPositionIndicesCache||(this._vertexPositionIndicesCache=this._computePrimitivePositionIndices()),this._vertexPositionIndicesCache}_computePrimitivePositionIndices(){const{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){const r=new Array;for(const i of e)r.push(t.indices[i]);return r}return t?.indices??null}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this.drawIndices??this.positionAttribute?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!this.material.computeAttachmentOrigin(e,this.readPrimitivePosition,this.indexCount)&&(null!=this._transformation&&(0,h.Z0)(e,e,this._transformation),!0)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const e=this.positionAttribute,t=this.indexCount;if(!e||0===t)return null;const r=this.material.primitiveVertexCount;(0,W.vA)(t%r===0,"Indexing error: "+t+" not divisible by "+r);const i=(0,R.tM)(t/r);return new U(i,r,this.readPrimitivePosition)}get transformation(){return this._transformation??c.zK}set transformation(e){this._transformation=e&&e!==c.zK?(0,c.o8)(e):null}get highlights(){return this._highlights||Q}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}forEachHighlightOption(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new X(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const Q=new Set;var ee=r(65529),te=r(97768),re=r(84952),ie=r(38969),ne=r(95117),oe=r(2741);let ae;var se=r(63907),le=r(25530),ce=r(42293);const ue=()=>A.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let he=null,de=null;async function me(){return null==de&&(ae??=(async()=>{const e=await r.e(9321).then(()=>r(49321)),t=await e.default({locateFile:e=>(0,oe.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),de=ae,he=await de),de}function fe(e,t,r,i,n){const o=(0,ce.MW)(t?se.CQ.COMPRESSED_RGBA8_ETC2_EAC:se.CQ.COMPRESSED_RGB8_ETC2),a=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*a)}function pe(e){return e.getNumImages()>=1&&!e.isUASTC()}function ge(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function ve(e,t,r,i,n,o,a,s,l=!1){const{compressedTextureETC:c,compressedTextureS3TC:u}=e.capabilities,{basisFormat:h,internalFormat:d}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?se.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:se.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?se.CQ.COMPRESSED_SRGB8_ETC2:se.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:se.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:se.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?se.H0.SRGB8_ALPHA8:6408}}(null!=c,null!=u,i,l),m=t.hasMipmap?r:Math.min(1,r),f=[];for(let e=0;e<m;e++)f.push(new Uint8Array(a(e,h))),s(e,h,f[e]);return t.internalFormat=d,t.hasMipmap=f.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new le.A(e,t,{type:"compressed",levels:f})}const xe=()=>A.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function _e(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const ye=_e("DXT1"),be=_e("DXT3"),we=_e("DXT5");function Me(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Se(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const a=Math.min(Math.sqrt(r/o),i/n);return[Me(Math.round(e*a),i),Me(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:Te(e,r,i)}function Te(e,t,r){if(e instanceof ImageData)return Te(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new I.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Ce=r(67171),Ee=r(12541);class Ie{constructor(e,t){this._data=e,this.id=(0,Z.c)(),this.events=new ee.bk,this._parameters={...Fe,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,re.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,ie.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,re.DB)(e.src)||(0,re.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Ce.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,Ee.tl)(e)||(0,Ee.tr)(e)||(0,Ee.CR)(e)||(0,Ee.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,z.mw)(e)||(0,z.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==he)return e.byteLength;const r=new he.KTX2File(new Uint8Array(e)),i=ge(r)?fe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==he)return e.byteLength;const r=new he.BasisFile(new Uint8Array(e)),i=pe(r)?fe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Ae(e):t,n=t.pixelFormat??6408,o=(0,ce.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new le.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,z.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,z.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,z.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,z.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,z.mw)(t)||(0,z.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,z.mw)(t)||(0,z.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,z.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,z.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return xe().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return xe().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case ye:n=8,o=se.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case be:n=16,o=se.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case we:n=16,o=se.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return xe().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(xe().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,u=l;let h,d;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const f=[];for(let t=0;t<a;++t)d=(s+3>>2)*(l+3>>2)*n,h=new Uint8Array(e.buffer,m,d),f.push(h),m+=d,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:f},internalFormat:o,width:c,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new le.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return ue().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==se.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return ue().error("Unsupported KTX1 image"),null;const i=r[7];let n=1,o=r[9],a=r[10];if(3&o||3&a)return null;const s=o,l=a;let c,u;!1!==t&&(n=Math.max(1,r[14]));let h=e.byteOffset+64;const d=[];for(let t=0;t<n;++t)u=(e[h]|e[h+1]<<8|e[h+2]<<16|e[h+3]<<24)>>>0,h+=4,c=new Uint8Array(e.buffer,h,u),d.push(c),h+=u,o=Math.max(1,o>>1),a=Math.max(1,a>>1);return{textureData:{type:"compressed",levels:d},internalFormat:i,width:s,height:l}}(r,t.hasMipmap??!1);if(null==i)throw new Error("KTX1 texture data is null");const{textureData:n,internalFormat:o,width:a,height:s}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=a,t.height=s,new le.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){null==he&&(he=await me());const n=new he.KTX2File(new Uint8Array(r));if(!ge(n))return null;const o=i&&2===n.getDFDTransferFunc();n.startTranscoding();const a=ve(e,t,n.getLevels(),n.getHasAlpha(),n.getWidth(),n.getHeight(),(e,t)=>n.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>n.transcodeImage(r,e,0,0,t,0,-1,-1),o);return n.close(),n.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==he&&(he=await me());const i=new he.BasisFile(new Uint8Array(r));if(!pe(i))return null;i.startTranscoding();const n=ve(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,W.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new le.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await B(t,{signal:r});return(0,P.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ne.y)(t,t.src,!1,r);return(0,P.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",a),t.removeEventListener("error",s),(0,te.xt)(l)},a=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},s=e=>{o(),n(e||new I.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",a),t.addEventListener("error",s);const l=(0,P.u7)(r,()=>s((0,P.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Se(r,e.parameters));const i=Ae(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new le.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,te.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Ae(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const Fe={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Oe=r(49255);class Pe{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var De=r(65786);class Re extends Pe{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,te.Gz)(this._texture),this._textureNormal=(0,te.Gz)(this._textureNormal),this._textureEmissive=(0,te.Gz)(this._textureEmissive),this._textureOcclusion=(0,te.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,te.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ne(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,te.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,P.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,te.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class Be extends De.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ne extends Be{constructor(e,t,r,i,n,o,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=a}}var ze=r(48295);const He=(0,d.vt)(),Le=(0,d.vt)(),je=(0,d.vt)(),We=(0,d.vt)();var Ue=r(19245);class Ve{constructor(e,t){this.id=(0,Z.c)(),this.supportsEdges=!1,this.primitiveVertexCount=3,this._renderPriority=0,this._parameters=new t,(0,Ue.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,Ue.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get emissions(){return 0}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,Oe._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value,this._configuration.emissionDimmingPass=e.transparentWithoutDepthEmissionDimmingPass&&(0,Oe._o)(e.output)}computeAttachmentOrigin(e,t,r){return function(e,t,r){if(r<=0)return!1;(0,h.hZ)(e,0,0,0),(0,h.hZ)(We,0,0,0);let i=0,n=0;for(let o=0;o<r;++o){const r=3*o;t(He,r),t(Le,r+1),t(je,r+2);const a=(0,ze.BU)(He,Le,je);a?((0,h.WQ)(He,He,Le),(0,h.WQ)(He,He,je),(0,h.hs)(He,He,1/3*a),(0,h.WQ)(e,e,He),i+=a):((0,h.WQ)(We,We,He),(0,h.WQ)(We,We,Le),(0,h.WQ)(We,We,je),n+=3)}return!(0===n&&0===i||(0!==i?((0,h.hs)(e,e,1/i),0):0===n||((0,h.hs)(e,We,1/n),0)))}(e,t,r/3)}}De.Y;class Ge{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const ke=(0,m.vt)();function $e(e,t,r,i,n,o){if(!e.visible)return;const a=(0,h.jb)(nt,i,r),{tolerance:s}=t,l=new Ge(s,!1,t.options.normalRequired);if(e.boundingInfo)qe(e.readPrimitivePosition,e.boundingInfo,r,a,s,n,l,o);else{const t=e.readPrimitivePosition;!function(e,t,r,i,n,o,a,s){const l=t,c=ot,u=Math.abs(l[0]),d=Math.abs(l[1]),m=Math.abs(l[2]),f=u>=d?u>=m?0:2:d>=m?1:2,p=f,g=l[p]<0?2:1,v=(f+g)%3,x=(f+(3-g))%3,_=l[v]/l[p],y=l[x]/l[p],b=1/l[p],w=Xe,M=Ke,S=Je,{normalRequired:T}=a;for(let t=r;t<i;++t){const r=3*t;n(c[0],r),n(c[1],r+1),n(c[2],r+2),o&&(o.applyToVertex(c[0],c[0][0],c[0][1],c[0][2],t),o.applyToVertex(c[1],c[1][0],c[1][1],c[1][2],t),o.applyToVertex(c[2],c[2][0],c[2][1],c[2][2],t)),(0,h.jb)(w,c[0],e),(0,h.jb)(M,c[1],e),(0,h.jb)(S,c[2],e);const i=w[v]-_*w[p],a=w[x]-y*w[p],l=M[v]-_*M[p],u=M[x]-y*M[p],d=S[v]-_*S[p],m=S[x]-y*S[p],f=d*u-m*l,g=i*m-a*d,C=l*a-u*i;if((f<0||g<0||C<0)&&(f>0||g>0||C>0))continue;const E=f+g+C;if(0===E)continue;const I=f*(b*w[p])+g*(b*M[p])+C*(b*S[p]);if(I*Math.sign(E)<0)continue;const A=I/E;A>=0&&s(A,A,T?et(c):null,t)}}(r,a,0,e.faceCount,t,n,l,o)}}const Ze=(0,d.vt)();function qe(e,t,r,i,n,o,a,s){if(null==t)return;const l=function(e,t){return(0,h.hZ)(t,1/e[0],1/e[1],1/e[2])}(i,Ze);if((0,m.C)(ke,t.box),null!=o&&o.applyToAabb(ke),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let a=Math.min(n,o),s=Math.max(n,o);const l=(e[1]-i-t[1])*r[1],c=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(a=Math.max(a,Math.min(l,c)),a>s)return!1;const u=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(u,h)),!(s<0)&&(a=Math.max(a,Math.min(u,h)),!(a>s)&&a<1/0)}(e,t,r,i)}(ke,r,l,n)){const{primitiveIndices:l}=t,c=l.length;if(c>1e3){const l=t.children;if(void 0!==l){for(const t of l)qe(e,t,r,i,n,o,a,s);return}}!function(e,t,r,i,n,o,a,s,l){const c=e[0],u=e[1],h=e[2],d=t[0],m=t[1],f=t[2],{normalRequired:p}=s;for(let e=0;e<i;++e){const t=o[e],r=3*t;let[i,s,g]=n(st,r),[v,x,_]=n(st,r+1),[y,b,w]=n(st,r+2);null!=a&&([i,s,g]=a.applyToVertex(at,i,s,g,e),[v,x,_]=a.applyToVertex(at,v,x,_,e),[y,b,w]=a.applyToVertex(at,y,b,w,e));const M=v-i,S=x-s,T=_-g,C=y-i,E=b-s,I=w-g,A=m*I-E*f,F=f*C-I*d,O=d*E-C*m,P=M*A+S*F+T*O,D=P*P;if(D<=it)continue;const R=c-i,B=u-s,N=h-g,z=(R*A+B*F+N*O)*P;if(z<0||z>D)continue;const H=B*T-S*N,L=N*M-T*R,j=R*S-M*B,W=(d*H+m*L+f*j)*P;if(W<0||z+W>D)continue;const U=(C*H+E*L+I*j)/P;U>=0&&l(U,U,p?Qe(M,S,T,C,E,I,Ye):null,t)}}(r,i,0,c,e,l,o,a,s)}}const Ye=(0,d.vt)();const Xe=(0,d.vt)(),Ke=(0,d.vt)(),Je=(0,d.vt)();function Qe(e,t,r,i,n,o,a){return(0,h.hZ)(tt,e,t,r),(0,h.hZ)(rt,i,n,o),(0,h.$A)(a,tt,rt),(0,h.S8)(a,a),a}function et(e){return(0,h.jb)(tt,e[1],e[0]),(0,h.jb)(rt,e[2],e[0]),(0,h.$A)(Ye,tt,rt),(0,h.S8)(Ye,Ye),Ye}const tt=(0,d.vt)(),rt=(0,d.vt)(),it=1e-7*1e-7,nt=(0,d.vt)(),ot=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()],at=(0,d.vt)(),st=(0,d.vt)();var lt=r(90629),ct=r(65720),ut=r(27921),ht=r(19419),dt=r(11964);function mt(e,t){return e.isRectangle?(0,ht.Uc)(e.bounds,t):function(e,t){return pt(e[0],e[1],t)}(t,e.points)}function ft(e,t,r,i){const n=Math.min(t[0],r[0],i[0]),o=Math.min(t[1],r[1],i[1]),a=Math.max(t[0],r[0],i[0]),s=Math.max(t[1],r[1],i[1]);if(!function(e,t){if(!(0,ht.HY)(e.bounds,t))return!1;if(e.isRectangle)return!0;for(const r of e.points)if((0,ht.Uc)(t,r))return!0;if(function(e,t){const r=e[0],i=e[1],n=e[2],o=e[3];return pt(r,i,t)||pt(n,i,t)||pt(n,o,t)||pt(r,o,t)}(t,e.points))return!0;for(let r=0;r<e.points.length;r++)if(gt(e.points[r],r===e.points.length-1?e.points[0]:e.points[r+1],t))return!0;return!1}(e,(0,ht.fA)(n,o,a,s,wt)))return!1;if(mt(e,t)||mt(e,r)||mt(e,i))return!0;for(const n of e.points)if((0,ze.cq)(t,r,i,n,Mt))return!0;for(let n=0;n<e.points.length;n++){const o=e.points[n],a=e.points[(n+1)%e.points.length];if(xt(t,r,o,a)||xt(r,i,o,a)||xt(i,t,o,a))return!0}return!1}function pt(e,t,r){let i=!1;for(let n=0,o=r.length-1;n<r.length;o=n++){const a=r[n],s=r[o];a[1]>t!=s[1]>t&&e<(s[0]-a[0])*(t-a[1])/(s[1]-a[1])+a[0]&&(i=!i)}return i}function gt(e,t,r){const i=r[0],n=r[1],o=r[2],a=r[3],s=e[0],l=e[1],c=t[0],u=t[1];return!(s<i&&c<i||s>o&&c>o||l<n&&u<n||l>a&&u>a)&&(!(!(0,ht.Rj)(r,s,l)&&!(0,ht.Rj)(r,c,u))||vt(e,t,i,n,o,n)||vt(e,t,o,n,o,a)||vt(e,t,o,a,i,a)||vt(e,t,i,a,i,n))}function vt(e,t,r,i,n,o){const a=_t(e[0],e[1],t[0],t[1],r,i),s=_t(e[0],e[1],t[0],t[1],n,o),l=_t(r,i,n,o,e[0],e[1]),c=_t(r,i,n,o,t[0],t[1]);return a!==s&&l!==c||0===a&&yt(e,t,r,i)||0===s&&yt(e,t,n,o)||0===l&&bt(r,i,n,o,e[0],e[1])||0===c&&bt(r,i,n,o,t[0],t[1])}function xt(e,t,r,i){return vt(e,t,r[0],r[1],i[0],i[1])}function _t(e,t,r,i,n,o){const a=(i-t)*(n-r)-(r-e)*(o-i);return Math.abs(a)<=Mt?0:Math.sign(a)}function yt(e,t,r,i){return bt(e[0],e[1],t[0],t[1],r,i)}function bt(e,t,r,i,n,o){return n>=Math.min(e,r)-Mt&&n<=Math.max(e,r)+Mt&&o>=Math.min(t,i)-Mt&&o<=Math.max(t,i)+Mt}const wt=(0,ht.vt)(),Mt=((0,lt.r_)(),(0,lt.r_)(),(0,d.vt)(),(0,d.vt)(),(0,d.vt)(),(0,dt.vt)(),1e-9);class St{constructor(e){this.type=e,this.distance=Number.POSITIVE_INFINITY,this.primitiveIndex=0,this.hasNormal=!1,this.point=(0,d.vt)(),this.normal=(0,d.vt)()}reset(){this.distance=Number.POSITIVE_INFINITY,this.hasNormal=!1}update(e,t,r,i){this.distance=e,this.primitiveIndex=t,(0,h.C)(this.point,r),this.hasNormal=null!=i,null!=i&&(0,h.C)(this.normal,i)}updateIfCloserFromValues(e,t,r,i){e<this.distance&&this.update(e,t,r,i)}updateIfCloser(e){const{distance:t,primitiveIndex:r,point:i,normal:n}=e;this.updateIfCloserFromValues(t,r,i,e.hasNormal?n:null)}get valid(){return Number.isFinite(this.distance)}}function Tt(e,t,r,i,n){if(!e.visible)return null;const o=new St(4);let a;a=e.boundingInfo?Et(e.readPrimitivePosition,e.boundingInfo,t,r,i,n):Ct(t,r,i,0,e.faceCount,e.readPrimitivePosition,n,null,0);for(const e of a)o.updateIfCloser(e);return o.valid?o:null}function*Ct(e,t,r,i,n,o,a,s=null,l=0){if(null==e.camera)return;const{camera:c,screenPolygonPrimitiveProcessor:u}=e;for(let e=i;e<n;++e){const i=(s?.[e]??e)+l,n=null==s?i:e,d=3*i;It(Pt[0],o,d+0,a,n,t),It(Pt[1],o,d+1,a,n,t),It(Pt[2],o,d+2,a,n,t);const m=Nt;let f;Ht.reset();const p=Dt;for(const e of u.processTriangle(Pt))if(p.length=0,(0,ut.H)(c.frustum[4],e,()=>p.pushNew(),!1),!(p.length<3)){for(let e=0;e<p.length;e++)c.projectToScreen(p.at(e),Rt[e]);At(r,Rt,p.length)&&(Ft(c.eye,p,Bt),null==f&&(f=(0,ze.rb)(Nt,Pt[0],Pt[1],Pt[2])),Ht.updateIfCloserFromValues((0,h.Io)(c.eye,Bt),i,Bt,f?m:null))}Ht.valid&&(yield Ht)}}function*Et(e,t,r,i,n,o){let a;if(null!=o?((0,m.C)(Ot,t.box),o.applyToAabb(Ot),a=(0,ct.GH)(n.broadPhaseFrustum,Ot,i)):a=(0,ct.GH)(n.broadPhaseFrustum,t.box,i),!a)return;const{primitiveIndices:s}=t,l=s.length;if(l>1e3){const a=t.children;if(void 0!==a){for(const t of a)yield*Et(e,t,r,i,n,o);return}}yield*Ct(r,i,n,0,l,e,o,s,0)}function It(e,t,r,i,n,o){const[a,s,l]=t(e,r);null!=i?i.applyToVertex(e,a,s,l,n):(0,h.hZ)(e,a,s,l),o&&(0,h.Z0)(e,e,o)}function At(e,t,r){for(let i=1;i<r-1;i++)if(ft(e,t[0],t[i],t[i+1]))return!0;return!1}function Ft(e,t,r){let i=Number.POSITIVE_INFINITY;const n=t.at(0);for(let o=1;o<t.length-1;o++){(0,ze.k3)(zt,e,n,t.at(o),t.at(o+1));const a=(0,h.hG)(e,zt);a<i&&(i=a,(0,h.C)(r,zt))}}const Ot=(0,m.vt)(),Pt=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()],Dt=new L.A({allocator:e=>e??(0,d.vt)()}),Rt=Array.from({length:12},()=>(0,lt.gs)()),Bt=(0,d.vt)(),Nt=(0,d.vt)(),zt=(0,d.vt)(),Ht=new St(4);var Lt=r(16396);function jt(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length;r*=a;for(let e=0;e<s;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=a}}function Wt(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=3*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],r+=s}}function Ut(e,t,r,i,n=1){const{data:o,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===o.length&&4===t){s[i]=o[0],s[i+1]=o[1],s[i+2]=o[2],s[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;const u=c*n;for(let r=1;r<u;++r)e[i]=a,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<n;++e)s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=o[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[i]=o[t],s[i+1]=o[t+1],s[i+2]=o[t+2],s[i+3]=255,i+=l}}}function Vt(e,t,r,i,n,o){switch(e){case"position":{(0,W.vA)(3===t.size);const i=n.getField(e,p.xs);(0,W.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Wt(e,r,i,n);const{data:o,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,u=a.length,h=t[0],d=t[1],m=t[2],f=t[4],p=t[5],g=t[6],v=t[8],x=t[9],_=t[10],y=t[12],b=t[13],w=t[14];i*=c;let M=0,S=0,T=0;const C=(0,l.tZ)(t)?e=>{M=o[e]+y,S=o[e+1]+b,T=o[e+2]+w}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=h*t+f*r+v*i+y,S=d*t+p*r+x*i+b,T=m*t+g*r+_*i+w};if(1===n)for(let e=0;e<u;++e)C(3*a[e]),s[i]=M,s[i+1]=S,s[i+2]=T,i+=c;else for(let e=0;e<u;++e){C(3*a[e]);for(let e=0;e<n;++e)s[i]=M,s[i+1]=S,s[i+2]=T,i+=c}}(t,r,i,o);break}case"normal":{(0,W.vA)(3===t.size);const r=n.getField(e,p.xs);(0,W.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void Wt(e,r,i,n);const{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,h=a.length,d=s[0],m=s[1],f=s[2],p=s[4],g=s[5],v=s[6],x=s[8],_=s[9],y=s[10],b=!(0,l.ut)(s),w=1e-6,M=1-w;i*=u;let S=0,T=0,C=0;const E=(0,l.tZ)(s)?e=>{S=o[e],T=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];S=d*t+p*r+x*i,T=m*t+g*r+_*i,C=f*t+v*r+y*i};if(1===n)if(b)for(let e=0;e<h;++e){E(3*a[e]);const t=S*S+T*T+C*C;if(t<M&&t>w){const e=1/Math.sqrt(t);c[i]=S*e,c[i+1]=T*e,c[i+2]=C*e}else c[i]=S,c[i+1]=T,c[i+2]=C;i+=u}else for(let e=0;e<h;++e)E(3*a[e]),c[i]=S,c[i+1]=T,c[i+2]=C,i+=u;else for(let e=0;e<h;++e){if(E(3*a[e]),b){const e=S*S+T*T+C*C;if(e<M&&e>w){const t=1/Math.sqrt(e);S*=t,T*=t,C*=t}}for(let e=0;e<n;++e)c[i]=S,c[i+1]=T,c[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,W.vA)(2===t.size);const r=n.getField(e,p.mJ);(0,W.vA)(!!r,`No buffer view for ${e}`),jt(t,r,o);break}case"uv0":{(0,W.vA)(2===t.size);const r=n.getField(e,p.ZD)??n.getField(e,p.gH);(0,W.vA)(!!r,`No buffer view for ${e}`),jt(t,r,o);break}case"uvi":{(0,W.vA)(2===t.size);const r=n.getField(e,p.mJ);(0,W.vA)(!!r,`No buffer view for ${e}`),jt(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,p.XP);(0,W.vA)(!!r,`No buffer view for ${e}`),(0,W.vA)(3===t.size||4===t.size),Ut(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,p.Y$)??n.getField(e,p.Y$);(0,W.vA)(!!r,`No buffer view for ${e}`),(0,W.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,a=t.typedBufferStride,s=n.length,l=i[0];r*=a;for(let e=0;e<s;++e)o[r]=l,r+=a}(t,r,o);break}case"tangent":{(0,W.vA)(4===t.size);const i=n.getField(e,p.Eq);(0,W.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void function(e,t,r,i=1){const{data:n,indices:o}=e,a=t.typedBuffer,s=t.typedBufferStride,l=o.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*o[e];a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<i;++e)a[r]=n[t],a[r+1]=n[t+1],a[r+2]=n[t+2],a[r+3]=n[t+3],r+=s}}(e,r,i,n);const{data:o,indices:a}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,h=a.length,d=s[0],m=s[1],f=s[2],p=s[4],g=s[5],v=s[6],x=s[8],_=s[9],y=s[10],b=!(0,l.ut)(s),w=1e-6,M=1-w;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*a[e],r=o[t],n=o[t+1],s=o[t+2],l=o[t+3];let h=d*r+p*n+x*s,S=m*r+g*n+_*s,T=f*r+v*n+y*s;if(b){const e=h*h+S*S+T*T;if(e<M&&e>w){const t=1/Math.sqrt(e);h*=t,S*=t,T*=t}}c[i]=h,c[i+1]=S,c[i+2]=T,c[i+3]=l,i+=u}else for(let e=0;e<h;++e){const t=4*a[e],r=o[t],s=o[t+1],l=o[t+2],h=o[t+3];let S=d*r+p*s+x*l,T=m*r+g*s+_*l,C=f*r+v*s+y*l;if(b){const e=S*S+T*T+C*C;if(e<M&&e>w){const t=1/Math.sqrt(e);S*=t,T*=t,C*=t}}for(let e=0;e<n;++e)c[i]=S,c[i+1]=T,c[i+2]=C,c[i+3]=h,i+=u}}(t,r,i,o);break}case"olidColor":(0,W.vA)(4===t.size),Ut(t,4,n.getField(e,p.XP),o)}}(0,d.vt)();class Gt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i){null!=i&&function(e,t,r,i,n){const{buffer:o,offset:a}=n;for(const n of t.fields.keys()){const t=e.get(n),s=t?.indices;t&&s&&Vt(n,t,r,i,o,a)}}(r,this.layout,e,t,i)}}const kt=Kt(-1),$t=Kt(1),Zt=kt,qt=new Array;qt[0]=null,qt[1]=$t,qt[2]=kt,qt[3]=Kt(-2),qt[4]=Kt(-3);const Yt=qt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(Zt,e));function Xt({output:e,enableOITOffset:t,polygonOffset:r}){return(0,Oe._$)(e)&&t?Yt[r]:qt[r]}function Kt(e){return{factor:1*e,units:2*e}}qt[1]=$t;var Jt=r(32198),Qt=r(51976),er=r(34711);class tr extends er.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,Jt.Cg)([(0,Qt.W)()],tr.prototype,"hasHighlightMixTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],tr.prototype,"emissionDimmingPass",void 0);class rr extends tr{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,Jt.Cg)([(0,Qt.W)({count:5})],rr.prototype,"polygonOffset",void 0),(0,Jt.Cg)([(0,Qt.W)()],rr.prototype,"transparent",void 0),(0,Jt.Cg)([(0,Qt.W)()],rr.prototype,"enableOITOffset",void 0);const ir=new rr,nr=2e-5,or=2e-6,ar=(0,d.vt)();var sr=r(91429),lr=r(91829),cr=r(4431),ur=r(1843),hr=r(72824),dr=r(13840),mr=r(42958),fr=r(16943),pr=r(90644);const gr=(0,pr.p3)(1,0,1,771);function vr(e,t=!1,r=!1){if(r)return pr.uR;switch(e){case 0:return t?pr.RC:pr.T8;case 1:return gr;default:return null}}function xr(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?pr.Uy:null;case 1:return null}}function _r(e,t=513){return{func:(0,Oe._$)(e)?515:t}}(0,lr._Y)();const yr={mask:255},br=(0,pr.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),wr=(0,pr.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681});(0,pr.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),(0,pr.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680}),r(4576),r(66289);var Mr=r(69622),Sr=r(32728);class Tr{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",p.Eq),this.color=e.getField("instanceColor",p.XP),this.olidColor=e.getField("instanceOlidColor",p.XP),this.state=e.getField("state",p.SL),this.lodLevel=e.getField("lodLevel",p.SL)}}let Cr=class extends Mr.A{constructor(e,t){super(e),this.events=new ee.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Ir(Er.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Dr,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Tr(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,W.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,W.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ar,i=Fr;t.localTransform.getMat(e,Or),t.globalTransform.getMat(e,Pr);const n=(0,l.lw)(Pr,Pr,Or);(0,h.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,a.z0)(i,n),t.model.setMat(e,i);const o=(0,Sr.wp)(Ar,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,a.B8)(i,i),(0,a.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Fr),r.modelOrigin.getVec(e,Ar),t[0]=Fr[0],t[1]=Fr[1],t[2]=Fr[2],t[3]=0,t[4]=Fr[3],t[5]=Fr[4],t[6]=Fr[5],t[7]=0,t[8]=Fr[6],t[9]=Fr[7],t[10]=Fr[8],t[11]=0,t[12]=Ar[0],t[13]=Ar[1],t[14]=Ar[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ar,this,e),t*=Math.max(Ar[0],Ar[1],Ar[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ar,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ar[0],Ar[1],Ar[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Dr,Math.floor(1.5*this._capacity)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Tr(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Jt.Cg)([(0,sr.MZ)({constructOnly:!0})],Cr.prototype,"shaderTransformation",void 0),(0,Jt.Cg)([(0,sr.MZ)()],Cr.prototype,"_size",void 0),(0,Jt.Cg)([(0,sr.MZ)({readOnly:!0})],Cr.prototype,"size",null),Cr=(0,Jt.Cg)([(0,sr.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Cr);const Er=(0,ur.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Ir(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,fr.E)()&&e.vec4u8("instanceOlidColor"),e}const Ar=(0,d.vt)(),Fr=(0,s.vt)(),Or=(0,c.vt)(),Pr=(0,c.vt)(),Dr=64,Rr=(0,ur.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Br=r(74810),Nr=r(28491),zr=r(49788);class Hr extends hr.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Br.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,lr.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=zr.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}hr.gy;let Lr=class extends mr.w{constructor(e,t){let i=(0,cr.U)(Ur(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,cr.U)(function(e){return Ir(Rr.clone(),e)}(t)))),super(e,t,i),this.shader=new dr.r(Nr.D,()=>r.e(5141).then(()=>r(5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:a}=e;return(0,pr.Ey)({blending:i?vr(r,!1,e.emissionDimmingPass):null,culling:Wr(e)?(0,pr.Xt)(n):null,depthTest:_r(r,jr(o)),depthWrite:xr(e),colorWrite:pr.kn,stencilWrite:a?yr:null,stencilTest:a?t?wr:br:null,polygonOffset:Xt(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function jr(e){switch(e){case 1:return 515;case 0:case 4:return 513;case 2:return 516;case 3:return 514}}function Wr(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Ur(e){const t=(0,ur.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,fr.E)()&&t.vec4u8("olidColor"),t}Lr=(0,Jt.Cg)([(0,sr.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Lr);class Vr extends rr{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,Jt.Cg)([(0,Qt.W)({count:4})],Vr.prototype,"alphaDiscardMode",void 0),(0,Jt.Cg)([(0,Qt.W)({count:3})],Vr.prototype,"doubleSidedMode",void 0),(0,Jt.Cg)([(0,Qt.W)({count:8})],Vr.prototype,"pbrMode",void 0),(0,Jt.Cg)([(0,Qt.W)({count:3})],Vr.prototype,"cullFace",void 0),(0,Jt.Cg)([(0,Qt.W)({count:3})],Vr.prototype,"normalType",void 0),(0,Jt.Cg)([(0,Qt.W)({count:4})],Vr.prototype,"customDepthTest",void 0),(0,Jt.Cg)([(0,Qt.W)({count:8})],Vr.prototype,"emissionSource",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVertexColors",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasSymbolColors",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVerticalOffset",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasColorTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasMetallicRoughnessTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasOcclusionTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasNormalTexture",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasScreenSizePerspective",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVertexTangents",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasOccludees",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instanced",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instancedDoublePrecision",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasModelTransformation",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"offsetBackfaces",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVVSize",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasVVColor",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"receiveShadows",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasShadowHighlights",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"receiveAmbientOcclusion",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"receiveGlobalIllumination",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"textureAlphaPremultiplied",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instancedFeatureAttribute",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"instancedColor",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"writeDepth",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"snowCover",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasColorTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasEmissionTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasNormalTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasOcclusionTextureTransform",void 0),(0,Jt.Cg)([(0,Qt.W)()],Vr.prototype,"hasMetallicRoughnessTextureTransform",void 0);var Gr=r(57323);let kr=class extends Lr{constructor(){super(...arguments),this.shader=new dr.r(Gr.R,()=>r.e(9933).then(()=>r(39933)))}};kr=(0,Jt.Cg)([(0,sr.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],kr);class $r extends Qt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,Jt.Cg)([(0,Qt.W)()],$r.prototype,"receiveShadows",void 0);class Zr extends Ve{constructor(e,t){super(e,Yr),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.intersectScreenPolygonDraped=void 0,this.produces=new Map([[2,e=>(0,Oe.uw)(e)&&!this.transparent],[4,e=>(0,Oe.uw)(e)&&this.transparent]]),this._layout=Ur(this.parameters),this._configuration=new Vr(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=zr.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,h.t2)(this.parameters.emissiveBaseColor,d.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,Oe._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.unlit?7:t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,i,n,o){const a=this._getMaterialVerticalOffset(t,r);null!=a&&(i=(0,h.Re)(Xr,i,a),n=(0,h.Re)(Kr,n,a)),o=function(e,t,r,i){ir.output=t.transparent?1:0,ir.polygonOffset=t.polygonOffset,ir.enableOITOffset=t.enableOITOffset;const n=Xt(ir);if(!n)return e;const o=or*n.units,a=(0,h.oW)(ar,i,r);return(t,r,i,s)=>{const l=(i?1-Math.abs((0,h.Om)(a,i)):0)*n.factor*nr+o;return e(t,r+l,i,s)}}(o,this._configuration,i,n),$e(e,r,i,n,(0,Lt.ou)(r.verticalOffset),o)}intersectScreenPolygon(e,t,r,i){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,i,n){const o=Xt(r);return o?function({units:e,factor:t},r,i,n){const o=or*e;return i+((n?1-Math.abs((0,h.Om)(r,n)):0)*t*nr+o)}(o,(0,h.oW)(ar,n,i),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}(Tt(e,r,t,i,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new qr(e)}createBufferWriter(){return new Gt(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:i,texture:n,textureId:o,textureAlphaMode:a,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||i<1||(null!=n||null!=o)&&1!==a&&2!==a&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,i,n)=>(e[0]=t+r[0],e[1]=i+r[1],e[2]=n+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,h.WQ)(ii,(0,m.pg)(e,ii),r)),(0,m.vI)(e,(0,h.WQ)(ii,(0,m.Lu)(e,ii),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,h.hZ)(ei,e[12],e[13],e[14]);let i=null;switch(t.viewingMode){case 1:i=(0,h.S8)(Qr,ei);break;case 2:i=(0,h.C)(Qr,Jr)}const n=(0,h.Re)(ti,ei,r.eye),o=(0,h.Bw)(n),a=(0,h.hs)(n,n,1/o);let s=null;this.parameters.screenSizePerspective&&(s=(0,h.Om)(i,a));const l=(0,Ue.kE)(r,o,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,h.hs)(i,i,l),(0,h.ei)(ri,i,t.transform.inverseRotation)}}class qr extends Re{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,h.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?kr:Lr,e)}}class Yr extends Hr{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1,this.unlit=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const Xr=(0,d.vt)(),Kr=(0,d.vt)(),Jr=(0,d.fA)(0,0,1),Qr=(0,d.vt)(),ei=(0,d.vt)(),ti=(0,d.vt)(),ri=(0,d.vt)(),ii=(0,d.vt)(),ni=()=>A.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class oi{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function ai(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(ni().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(ni().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(ni().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(ni().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else ni().warn("Indexed geometries must specify faces"),i=!1;break}default:ni().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(ni().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(ni().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function si(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&(0,m.RF)(t,r.box)}),t}function li(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function ci(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const ui=new D.A(1,2,"wosr");async function hi(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,E.Ke)((0,C.A)(e,t));if(r.ok)return r.value.data;(0,P.QP)(r.error),function(e){throw new I.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){ni().warn("Externally referenced texture data is not yet supported");continue}const a=n.encoding+";base64,"+o,s="/textureDefinitions/"+i,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==li(l)},u=t?.disableTextures?Promise.resolve(null):B(a,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new oi(r,i,n+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new O,a=e.resource,s=D.A.parse(a.version||"1.0","wosr");ui.validate(s);const l=a.model.name,c=a.model.geometries,u=a.materialDefinitions??{},h=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const a=c[e];if(!ai(a))continue;const s=ci(a),l=a.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===a.params.topology)return null;const t=a.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=l.position,x=v.values.length/v.valuesPerElement;for(const e in l){const t=l[e],r=t.values,i=g(e)??(0,R.tM)(x);p.push([e,new N.n(r,i,t.valuesPerElement,!0)])}const _=s.texture,y=h&&h[_];if(y&&!f.has(_)){const{image:e,parameters:t}=y,r=new Ie(e,t);i.push(r),f.set(_,r)}const b=f.get(_),w=b?b.id:void 0,M=s.material;let S=o.get(M,_);if(null==S){const e=u[M.slice(M.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?li(y.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:w,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),S=new Zr(i,t),o.set(M,_,S)}n.push(S);const T=new J(S,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(T)}return{engineResources:[{name:l,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:a.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:si(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let w;if(t.cache)w=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(()=>r(51698));w=await e(new _.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:S,referenceBoundingBox:A}=function(e,t,r){const n=e.model,s=e.meta,_=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=_&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const i=e.model.lods[r];for(const n of i.parts){const i=n.attributes.normal;if(null==i)return;const o=n.attributes.position,a=o.count,s=(0,d.vt)(),u=(0,d.vt)(),m=(0,d.vt)(),f=new Float32Array(4*a),g=new Float32Array(3*a),v=(0,l.B8)((0,c.vt)(),n.transform);let x=0,_=0;for(let l=0;l<a;l++){o.getVec(l,u),i.getVec(l,s),(0,h.Z0)(u,u,n.transform),(0,h.Re)(m,u,t.center),(0,h.Qr)(m,m,t.radius);const a=m[2],c=(0,h.Bw)(m),d=Math.min(.45+.55*c*c,1)**2.2;(0,h.Qr)(m,m,t.radius),null!==v&&(0,h.Z0)(m,m,v),(0,h.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,h.Cc)(m,m,s,a>-1?.2:Math.min(-4*a-3.8,1)),g[x]=m[0],g[x+1]=m[1],g[x+2]=m[2],x+=3,f[_]=d,f[_+1]=d,f[_+2]=d,f[_+3]=1,_+=4}n.attributes.normal=new p.xs(g.buffer),n.attributes.color=new p.Eq(f.buffer)}}}(e,_));const S=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:S,isSchematic:!1,treeRendering:w,mrrFactors:Br.SY}:{usePBR:S,isSchematic:!1,treeRendering:!1,mrrFactors:Br.mb},E={...t.materialParameters,treeRendering:w},I=new Array,A=new Map,F=new Map,O=n.lods.length,P=(0,m.Ie)();return n.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(O>1&&0===s||O>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new T(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new Zr({},t):function(e,t,r,n,o,a,s,l,c){const h=e.materials.get(t.material);if(null==h)return null;const{normal:m,color:f,texCoord0:p,tangent:g}=t.attributes,v=t.material+(m?"_normal":"")+(f?"_color":"")+(p?"_texCoord0":"")+(g?"_tangent":""),x=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,y=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!a.has(v)){if(x){const t=(t,r=!1,i=!1)=>{if(null!=t&&!s.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?l.compressionOptions:void 0;s.set(t,new Ie((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==y&&!c;t(h.colorTexture,r,1!==y),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}const r=(0,i.xV)(h.color[0]),m=(0,i.xV)(h.color[1]),f=(0,i.xV)(h.color[2]),p=null!=h.colorTexture&&x?s.get(h.colorTexture):null,g=(0,Br.Jr)(h),w=null!=h.normalTextureTransform?.scale?h.normalTextureTransform?.scale:u.Un;a.set(v,new Zr({...n,customDepthTest:1,textureAlphaMode:y,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,m,f],ambient:[r,m,f],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,unlit:h.unlit,textureId:null!=p?p.id:void 0,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&x?s.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=p&&!!p.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&x?s.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&x&&!h.unlit?s.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&x?s.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:h.unlit?d.uY:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null!=h.emissiveStrengthKHR?h.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:g?Br.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:g,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},l))}const w=a.get(v);if(r.stageResources.materials.push(w),x){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return w}(n,e,c,C,E,A,F,t,w),{geometry:h,vertexCount:_}=function(e,t){const r=e.attributes.position.count,i=(0,y.x)(e.indices||r,e.primitiveType),n=f(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(n,s,e.transform,3,l);const c=[["position",new N.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=f(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,a.Ge)(di,e.transform),(0,g.b)(t,n,di,3,s),(0,o.or)(di)&&(0,g.n)(t,t),c.push(["normal",new N.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=f(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,a.z0)(di,e.transform),(0,v.t)(t,n,di,4,s),(0,o.or)(di)&&(0,g.n)(t,t,4),c.push(["tangent",new N.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=f(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),c.push(["uv0",new N.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof p.Eq?(0,v.b)(t,u,1,255):(u instanceof p.XP||u instanceof p.Uz)&&(0,v.b)(t,u,1/255,255):(t.fill(255),u instanceof p.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof p.eI||e.attributes.color instanceof p.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new N.n(t,i,4,!0)])}return{geometry:new J(t,c),vertexCount:r}}(e,r??new Zr({},t)),S=h.boundingInfo;null!=S&&0===s&&(0,m.RF)(P,S.box),null!=r&&(c.stageResources.geometries.push(h),c.numberOfVertices+=_)}),l||I.push(c)}),{engineResources:I,referenceBoundingBox:P}}(w,t,s.specifiedLodIndex);return{lods:S,referenceBoundingBox:A,isEsriSymbolResource:w.meta.isEsriSymbolResource,isWosr:!1}}const di=(0,s.vt)()},1843(e,t,r){r.d(t,{BP:()=>u,l5:()=>h});var i=r(13030),n=r(90239),o=r(4431),a=r(620),s=r(85079);class l{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new l(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class c{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:f(e[1].constructor)})))}freeze(){return this}get locations(){return(0,s.Xk)((0,o.U)(this))}vec2f16(e,t){return this._appendField(e,i.ZD,t),this}vec2f(e,t){return this._appendField(e,i.gH,t),this}vec2f64(e,t){return this._appendField(e,i.si,t),this}vec3f16(e,t){return this._appendField(e,i.EC,t),this}vec3f(e,t){return this._appendField(e,i.xs,t),this}vec3f64(e,t){return this._appendField(e,i.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.jz,t),this}vec4f(e,t){return this._appendField(e,i.Eq,t),this}vec4f64(e,t){return this._appendField(e,i.Aj,t),this}mat3f(e,t){return this._appendField(e,i.jZ,t),this}mat3f64(e,t){return this._appendField(e,i.j0,t),this}mat4f(e,t){return this._appendField(e,i.Sx,t),this}mat4f64(e,t){return this._appendField(e,i.E$,t),this}vec4u8(e,t){return this._appendField(e,i.XP,t),this}f16(e,t){return this._appendField(e,i.XW,t),this}f32(e,t){return this._appendField(e,i.Y$,t),this}f64(e,t){return this._appendField(e,i.qB,t),this}u8(e,t){return this._appendField(e,i.SL,t),this}u16(e,t){return this._appendField(e,i.h,t),this}i8(e,t){return this._appendField(e,i.bf,t),this}vec2i8(e,t){return this._appendField(e,i.D6,t),this}vec2i16(e,t){return this._appendField(e,i.mJ,t),this}vec2u8(e,t){return this._appendField(e,i.LC,t),this}vec2u16(e,t){return this._appendField(e,i.Yi,t),this}vec4u16(e,t){return this._appendField(e,i.Uz,t),this}vec4i16(e,t){return this._appendField(e,i.E7,t),this}u32(e,t){return this._appendField(e,i.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,n.GJ)(t.ElementType),o=this._stride;this._fields.set(e,{constructor:t,size:i,offset:o,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,n.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new l(this,e)}createView(e,t){return new l(this,e,t)}clone(){const e=new c;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e}get stride(){return this._stride}get fields(){return this._fields}}function u(){return new c}class h{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const d=[i.Y$,i.gH,i.xs,i.Eq,i.jZ,i.Sx,i.qB,i.si,i.Xm,i.Aj,i.j0,i.E$,i.SL,i.LC,i.eI,i.XP,i.h,i.Yi,i.nS,i.Uz,i.P,i.An,i.H$,i.ml,i.bf,i.D6,i.m8,i.TX,i.Qt,i.mJ,i.Vp,i.E7,i.My,i.UL,i.zD,i.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function f(e){return p.get(e)}const p=new Map;d.forEach(e=>p.set(m(e),e))},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return e.fields.entries().map(([e,o])=>{const a=o.constructor.ElementCount,s=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(o.constructor.ElementType),l=o.offset,c=o.optional?.glNormalized??!1,u=o.optional?.integer??!1;return new n._(e,a,s,l,r,c,t,u)}).toArray()}},26857(e,t,r){var i=r(32198),n=r(69622),o=r(91429);let a=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.UPDATING=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],a.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"UPDATING",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],a.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),a=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],a);const s=new a;r.d(t,["b",0,s])},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
|
|
630
630
|
void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
|
|
631
631
|
`)}},33120(e,t,r){r.d(t,{i$:()=>a,xJ:()=>o}),r(46686),r(28682);var i=r(77108),n=r(31821);function o(e){e.vertex.uniforms.add(new i.E("nearFar",e=>e.camera.nearFar))}function a(e){e.vertex.code.add(n.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
632
632
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
@@ -1010,7 +1010,7 @@ vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),v&&r.code.a
|
|
|
1010
1010
|
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
1011
1011
|
0.0, 0.0, 0.0 );
|
|
1012
1012
|
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(l.H`return tangentSpace * rawNormal;
|
|
1013
|
-
}`))}(e,t)}},72233(e,t,r){r.d(t,{n:()=>O});var i=r(31821),n=r(12791),o=r(32198),a=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),h=r(37585),d=r(89904),m=r(90119),f=r(15581),p=r(13840),g=r(42958),v=r(95774),x=r(90644);let _=class extends g.w{constructor(){super(...arguments),this.shader=new p.r(v.S,()=>r.e(1285).then(r
|
|
1013
|
+
}`))}(e,t)}},72233(e,t,r){r.d(t,{n:()=>O});var i=r(31821),n=r(12791),o=r(32198),a=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),h=r(37585),d=r(89904),m=r(90119),f=r(15581),p=r(13840),g=r(42958),v=r(95774),x=r(90644);let _=class extends g.w{constructor(){super(...arguments),this.shader=new p.r(v.S,()=>r.e(1285).then(()=>r(91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};_=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],_);var y=r(48163),b=r(65786);class w extends b.Y{constructor(){super(...arguments),this.projScale=1}}class M extends w{constructor(){super(...arguments),this.intensity=1}}class S extends b.Y{}class T extends S{constructor(){super(...arguments),this.blurSize=(0,y.vt)()}}let C=class extends g.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(()=>r(86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};C=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],C),r(63907);var E=r(25530),I=r(67171);let A=class extends m.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=d.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new M,this._drawParameters=new T}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new I.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new E.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(33306);if(!r||!i)return;const n=this.techniques.getCompiled(C),o=this.techniques.getCompiled(_);if(!n||!o)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,m=u.camera,p=m.relativeElevation,g=(0,a.qE)((5e5-p)/2e5,0,1),v=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=v*g;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/m.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*F/(0,f.g)(m)**6*x;const y=m.fullViewport[2],b=m.fullViewport[3],w=this.fboCache.acquire(y,b,"ssao input",2);s.bindFramebuffer(w.fbo),s.setViewport(0,0,y,b),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.screen.draw();const M=Math.round(y/2),S=Math.round(b/2),T=this.fboCache.acquire(M,S,"ssao blur",0);s.bindFramebuffer(T.fbo),this._drawParameters.colorTexture=w.getTexture(),(0,h.hZ)(this._drawParameters.blurSize,0,2/b),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,M,S),s.screen.draw(),w.release();const E=this.fboCache.acquire(M,S,d.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(E.fbo),s.setViewport(0,0,y,b),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=T.getTexture(),(0,h.hZ)(this._drawParameters.blurSize,2/y,0),s.bindTechnique(o,u,this._passParameters,this._drawParameters),s.setViewport(0,0,M,S),s.screen.draw(),s.setViewport4fv(m.fullViewport),T.release(),v<1&&this.requestRender(2),E}};(0,o.Cg)([(0,u.MZ)()],A.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],A.prototype,"produces",void 0),A=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],A);const F=.5;function O(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
1014
1014
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
1015
1015
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
1016
1016
|
}
|
|
@@ -1053,7 +1053,7 @@ vec3 calculateAmbientRadiance()
|
|
|
1053
1053
|
{
|
|
1054
1054
|
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
1055
1055
|
return ambientLight *= skyTransmittance;
|
|
1056
|
-
}`)}var s=r(72233),l=r(65261),c=r(98619),u=r(22393),h=r(89786),d=r(32976),m=r(12791),f=r(32198),p=r(97768),g=r(36708),v=r(91429),x=r(37585),_=r(91829),y=r(89904),b=r(90119),w=r(587),M=r(52516),S=r(13840),T=r(42958),C=r(90644);let E=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(M.a,()=>r.e(2013).then(r
|
|
1056
|
+
}`)}var s=r(72233),l=r(65261),c=r(98619),u=r(22393),h=r(89786),d=r(32976),m=r(12791),f=r(32198),p=r(97768),g=r(36708),v=r(91429),x=r(37585),_=r(91829),y=r(89904),b=r(90119),w=r(587),M=r(52516),S=r(13840),T=r(42958),C=r(90644);let E=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(M.a,()=>r.e(2013).then(()=>r(42013)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};E=(0,f.Cg)([(0,v.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],E);let I=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(w.a,()=>r.e(9794).then(()=>r(89794)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};I=(0,f.Cg)([(0,v.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],I);var A=r(51976);class F extends A.K{constructor(){super(...arguments),this.hasColor=!0,this.hasEmission=!1,this.rayMarchMaxReach=.5,this.rayMarchMaxSteps=16,this.useProjectedRayLength=!0,this.clampRayToScreen=!1}}(0,f.Cg)([(0,A.W)()],F.prototype,"hasColor",void 0),(0,f.Cg)([(0,A.W)()],F.prototype,"hasEmission",void 0);var O=r(50704);let P=class extends T.w{constructor(){super(...arguments),this.shader=new S.r(O.a,()=>r.e(7891).then(()=>r(37891)))}initializePipeline(){return(0,C.Ey)({colorWrite:C.kn})}};P=(0,f.Cg)([(0,v.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationUpscaleTechnique")],P),r(63907);let D=class extends b.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=y.OG.AMBIENT_ILLUMINATION,this._passParameters=new w.G,this._drawParameters=new M.G,this._drawParametersUpscale=new O.G,this._maxFrames=256,this._lowQualityResolutionScale=.25,this._configuration=new F,this._lastOutput=null,this._isGlobalIlluminationUpdate=!1,this._resetBuffer=!1}initialize(){this.addHandles((0,g.wB)(()=>this.view.stage.renderer.hasGlobalIllumination,()=>{this._reset(),this._requestRender()},g.pc))}destroy(){this._lastOutput=(0,p.Gz)(this._lastOutput)}resetAccumulatedFrames(){this._isGlobalIlluminationUpdate||!(this._passParameters.accumulatedFrames>100)&&this._configuration.hasEmission||this._reset()}render(e){if(this._passParameters.accumulatedFrames>=this._maxFrames)return this._lastOutput?.retain(),this._lastOutput;const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(33306),n=this._mode;if(!r||!i)return this._emptyOutput;if(0===n)return this._resetBuffer=!1,this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this._requestRender(),this._emptyOutput;const o=this.bindParameters;this._configuration.hasEmission=!!o.reprojection.lastFrameEmission;const a=this.techniques.getCompiled(I,this._configuration),s=this.techniques.getCompiled(E),l=1===n,c=l?this._lowQualityResolutionScale:1,u=l?this.techniques.getCompiled(P):null;if(!a||!s||l&&!u)return this._requestRender(),this._emptyOutput;const h=this.renderingContext,{camera:d}=o;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/d.computeScreenPixelSizeAtDist(1),this._passParameters.scaleGlobalIllumination=c;const{fullWidth:m,fullHeight:f}=d,p=Math.max(1,Math.floor(m*c)),g=Math.max(1,Math.floor(f*c)),v=this.fboCache.acquire(p,g,"global illumination input").acquireColor(36065,2);h.bindFramebuffer(v.fbo),h.setViewport(0,0,p,g),h.bindTechnique(a,o,this._passParameters,this._drawParameters),h.screen.draw();const _=v.obtainAttachment(36065),b=Math.max(1,Math.round(p/1)),w=Math.max(1,Math.round(g/1)),M=this.fboCache.acquire(b,w,"global illumination blur horizontal");h.bindFramebuffer(M.fbo),this._drawParameters.texture=v.getTexture(),this._drawParameters.weightTexture=_.attachment,(0,x.hZ)(this._drawParameters.blurSize,0,1/g),h.bindTechnique(s,o,this._passParameters,this._drawParameters),h.setViewport(0,0,b,w),h.screen.draw(),v.release();const S=l?"global illumination blur vertical":y.OG.AMBIENT_ILLUMINATION,T=this.fboCache.acquire(b,w,S);h.bindFramebuffer(T.fbo),h.setViewport(0,0,b,w),h.setClearColor(1,1,1,0),h.clear(16384),this._drawParameters.texture=M.getTexture(),this._drawParameters.weightTexture=_.attachment,(0,x.hZ)(this._drawParameters.blurSize,1/b,0),h.bindTechnique(s,o,this._passParameters,this._drawParameters),h.setViewport(0,0,b,w),h.screen.draw(),M.release(),T.attachColor(_,36065),_.release();let C=T;return u&&(C=this.fboCache.acquire(m,f,y.OG.AMBIENT_ILLUMINATION).acquireColor(36065,2),h.bindFramebuffer(C.fbo),h.setViewport(0,0,m,f),h.setClearColor(1,1,1,0),h.clear(16384),this._drawParametersUpscale.colorTexture=T.getTexture(),this._drawParametersUpscale.weightTexture=T.getTexture(36065),h.bindTechnique(u,o,this._passParameters,this._drawParametersUpscale),h.screen.draw(),T.release()),h.setViewport4fv(d.fullViewport),this._passParameters.temporalSampleFrame=(this._passParameters.temporalSampleFrame+1)%64,++this._passParameters.accumulatedFrames,this._storeOutput(C),this._passParameters.accumulatedFrames<this._maxFrames&&this._requestRender(),C}_requestRender(){this._isGlobalIlluminationUpdate=!0,this.requestRender(1),this._isGlobalIlluminationUpdate=!1}_storeOutput(e){this._lastOutput!==e&&(this._lastOutput=(0,p.Gz)(this._lastOutput),this._lastOutput=e,this._lastOutput.retain())}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,i=this.fboCache.acquire(t,r,y.OG.AMBIENT_ILLUMINATION).acquireColor(36065,2);return e.bindFramebuffer(i.fbo),e.setViewport(0,0,t,r),e.clearBuffer(0,_.v7),e.clearBuffer(1,_.uY),i}get _canRender(){const{reprojection:e,hasEmission:t,globalIllumination:r}=this.bindParameters;return!(!e.lastFrameColor||t&&!e.lastFrameEmission||!e.lastFrameDepth||!r||this._resetBuffer)}get _mode(){const{hasGlobalIlluminationHighQuality:e,hasGlobalIllumination:t}=this.view.stage.renderer;return e?2:t?1:0}_reset(){this._passParameters.accumulatedFrames=0,this._lastOutput=(0,p.Gz)(this._lastOutput)}get test(){const e=this;return{passParameters:this._passParameters,configuration:this._configuration,get maxFrames(){return e._maxFrames},set maxFrames(t){e._maxFrames=t},get lowQualityResolutionScale(){return e._lowQualityResolutionScale},set lowQualityResolutionScale(t){e._lowQualityResolutionScale=t},get mode(){return e._mode},restartAccumulation:()=>{this._reset(),this._passParameters.temporalSampleFrame=0,this._resetBuffer=!0,this._requestRender()}}}};function R(e,t){t.receiveGlobalIllumination?(e.uniforms.add(new d.o("hasGlobalIlluminationTexture",e=>null!=e.globalIllumination),new m.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(o.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
1057
1057
|
if (!hasGlobalIlluminationTexture) {
|
|
1058
1058
|
return vec3(1.0);
|
|
1059
1059
|
}
|