@arcgis/core 4.34.0-next.94 → 4.34.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.
Files changed (766) hide show
  1. package/analysis/ElevationProfileAnalysis.js +1 -1
  2. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.js +1 -1
  3. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +5 -0
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/analysis/featureReferenceUtils.js +1 -1
  6. package/applications/Components/featureUtils.d.ts +1 -0
  7. package/applications/Components/featureUtils.js +1 -1
  8. package/applications/KnowledgeStudio/resourceSerializationUtils.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/{57c08ccb75e3135978d1.js → 0086a09441627842d34a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/02bc183e30e3392bb76d.js +1 -0
  12. package/assets/esri/core/workers/chunks/{155dcbd957f8787a45c3.js → 05eee334d58a0b9f6316.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{0f37204f86d2997a2811.js → 06e60fc7715d08ede59d.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{94ddf029698991d853b9.js → 0811ac64d08454460fb1.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{6391ce002fbde9f27a77.js → 081a7082dc281ca7662a.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3c3b1dc95f03082e4d5b.js → 083f1c2fd0b59a0bf4c3.js} +1 -1
  17. package/assets/esri/core/workers/chunks/097e5deb51ee7e25e654.js +1 -0
  18. package/assets/esri/core/workers/chunks/{c6cae8471c5d4ae40c65.js → 145c6a7cdcc9893efb27.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{0cfded1acf92f89a13cb.js → 14ace5dc4b8984212a57.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{39a5863355cccaabd2d6.js → 1762ff76350065750c75.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{a98b284b147258629947.js → 188272af9a6470ccfe31.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{ce8f56cf371812b57a46.js → 19699769deff862e29ce.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{ce2fcaa21d6efcdf4da5.js → 1b85967d1178956ee36b.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{bf9d09493fd849ea69fd.js → 1fd459234917a51b6ae1.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{0aaaf4d1c4a5d284216e.js → 22bb877b85ae250d7819.js} +1 -1
  26. package/assets/esri/core/workers/chunks/24b97ba933324aea6a07.js +1 -0
  27. package/assets/esri/core/workers/chunks/{e5d974593043d5e2b502.js → 2795a2817ebe3298c350.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{71fef0a33b7ed9456e47.js → 28a5f8978817e0471a2a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{07a7ca89ef2ca4fc090b.js → 2a30afa043e3f88655d9.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{41f275401e1cde7eee20.js → 2a8b75d2445680571759.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{6b208f5d423da64c8559.js → 2a900a632a1231deb713.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{0e5e565df6ec71445f2e.js → 2bbe8277578b033f92d4.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{77e611724a499d36eacc.js → 2c72e185b780bbbb1c9f.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{38d874d7f815f5329420.js → 2ca8b0c1ca399fd5dc2f.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{c799f1c03cb22ef52f5f.js → 2d51e9c9b73301b6879c.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{cd0c222a36caa7f80860.js → 2f9e79a67eae746d55d3.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{0856cd281efd71bfe3c4.js → 3116b35a92cc0afd9fd3.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{e153b61560a7a869db63.js → 319c3f46f2afb8f3e5a9.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{b8f55ee77ab6ea4c289e.js → 326a76a4e80269d4029d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{28bb6896c5fd353ca5e9.js → 3367b8565226646decec.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{8513c9282c44bb0a736e.js → 3495162f4608f5205d87.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{c38360d912f256519e06.js → 3496e025e48cf580250d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{4753793daf0b7ff8b5ff.js → 35255e2b980f650490d8.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{d2df6e685d6cffc5f486.js → 37d05d9796917c3d4b7a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{7b17f52019762aa21af8.js → 3815ffa13e7b439bca6e.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{de34c21d3e6913befe5a.js → 3b65d6a78fbffca37fbd.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{2698f656405876f4bd20.js → 3ccdce156b906574bd29.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{0ceb68ff73e5d39e837a.js → 3ffdf73aaecc42448f8a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{68f5a2d2666636c3f807.js → 40b81d1c2d53cf598b8e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/4239572007ecfac49dc1.js +1 -0
  51. package/assets/esri/core/workers/chunks/{f3284d4e0d41efb0b4a0.js → 441ead5bce80f639934e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{97eb2cfc1f036feea9a9.js → 44c3b5a507814103f4b4.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{6f29951f5a2da068b257.js → 456161a323be7d640c61.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{b18887a6dc86f0c8324a.js → 48646f3d95a3f2b17e78.js} +1 -1
  55. package/assets/esri/core/workers/chunks/49571d6875de1f2e7e25.js +33 -0
  56. package/assets/esri/core/workers/chunks/{1bbc0dfad4cd72a1c42b.js → 4a2bf3c8da24abd8b9e2.js} +6 -6
  57. package/assets/esri/core/workers/chunks/4b13749b74059a7837d2.js +1 -0
  58. package/assets/esri/core/workers/chunks/{c8e4fe0e3b109eb80e8e.js → 4b83b45df0c4005d078d.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{896c7d137bfd7a8fa0bc.js → 4f01be74dd26e639330f.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{b5c829e904bc9cb5347d.js → 50a5caa96c111dda5c60.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{98381404f2d99a1f9341.js → 50e1c63d0b6196dd365e.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{899f493412acd5a5d91f.js → 5132ca68e8c7af111a47.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{d08b80583a23ba253c7e.js → 56916e56c20465428dd4.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{bbdadced49446c907361.js → 578789c040846ea3759b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{f62717338075df626eda.js → 5a527a47285a5995cff9.js} +1 -1
  66. package/assets/esri/core/workers/chunks/5cb92abb1f0f38bd0eab.js +1 -0
  67. package/assets/esri/core/workers/chunks/{56edb55b53779e7fd31e.js → 5d2e5774768d8f290343.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{6e5175b43220d6692263.js → 5d3661d1fe46dd29aae9.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{0652d7e525d99e39c957.js → 5fb2ce028b371b3a8acb.js} +1 -1
  70. package/assets/esri/core/workers/chunks/63019a7eb5222dc5e420.js +1 -0
  71. package/assets/esri/core/workers/chunks/{71c6c0b26253c4ca1b68.js → 630efe10c871425b6a95.js} +1 -1
  72. package/assets/esri/core/workers/chunks/64629ddcf008349eaf41.js +1 -0
  73. package/assets/esri/core/workers/chunks/{61e8e159f1f336569b27.js → 65111858957f43eacd8c.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{0427f66b56ec6601deb0.js → 6ac90d88e5f931b1a003.js} +1 -1
  75. package/assets/esri/core/workers/chunks/6c842b955fdd40b39914.js +1 -0
  76. package/assets/esri/core/workers/chunks/{08b0fc6bfe9640ee2525.js → 6cd379bb66dc4cf5d2bf.js} +1 -1
  77. package/assets/esri/core/workers/chunks/6ec77a8142fbfa805b5a.js +1 -0
  78. package/assets/esri/core/workers/chunks/{541bffd61006d0e36166.js → 6f4bd0ee85e7e5a74340.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{648c91a9822bc9d6ee47.js → 701a1835684cf815bcb7.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{f71b76c9506178124fa3.js → 70af1b5b3d2f3f395441.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{d7adef4093ce19ad356d.js → 72846fb9c87c6642daf0.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{f88fe2e8fbc763bdc940.js → 73c1d43070b4fe1e5c1e.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{cab2a1382bdd32bb34d8.js → 7421f9575487cdc9e28e.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{a845c68e76382a73da5e.js → 7633537dc0c65d655baf.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{82e0d22619dc26920ca9.js → 7698f4f4471b6e1c12ef.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{9a0b9d931c1a29e81475.js → 76e444bd625cf3d35877.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{b265472ac3f949a7f40c.js → 773d76253588bcf14eaa.js} +1 -1
  88. package/assets/esri/core/workers/chunks/{77705d0c7c17bd46d81a.js → 7810f870d71f80ca4f41.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{56de25a6fe659a5b5c2b.js → 78b35a19332e58c8c279.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{e4833b718a813a8d125b.js → 79012b873d2b7786be77.js} +1 -1
  91. package/assets/esri/core/workers/chunks/7a6a96edc892d7060b7d.js +1 -0
  92. package/assets/esri/core/workers/chunks/7b3ff47cdbb6af38530d.js +1 -0
  93. package/assets/esri/core/workers/chunks/{04dbdaa63c950f32b8f0.js → 7e8f7fa884d6d41ebae2.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{48133effac2eacc2196e.js → 7fa324900c147ba51019.js} +1 -1
  95. package/assets/esri/core/workers/chunks/80c492f8fdab7698596a.js +1 -0
  96. package/assets/esri/core/workers/chunks/81bbe5251ed13c0d91cc.js +1 -0
  97. package/assets/esri/core/workers/chunks/{0037abf0a82d1ed32e91.js → 8215015f11221a354273.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{cb6a9b43406f4fbe10b2.js → 82f1cd3896401c85df35.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{2bb61f80473b495163e3.js → 83ab8c8bc9e6990114a8.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{03b455e9405a8b6fec68.js → 8659abd4b46f153b6902.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{19bd0b56d82446dbb7c5.js → 868ee8f429e7caddc045.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{1fc7df018c8f802565a6.js → 86b978a48b539e9fc5b8.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{4dfcd03082be83600f3a.js → 88add09190569b04e824.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{65e279516170ddbd4a65.js → 89027f6800e17fab8973.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{a6533bab3b2fbc1e2a47.js → 8b16aa50d879b92a5375.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{2b9c9a35a6e1f56920b5.js → 9027f22a04ac2076ff0e.js} +14 -14
  107. package/assets/esri/core/workers/chunks/{edaf059c7ea18088c3dd.js → 91df8638b8b904e6d8c5.js} +1 -1
  108. package/assets/esri/core/workers/chunks/92c306d02569e7cd9af3.js +1 -0
  109. package/assets/esri/core/workers/chunks/{fdadf11f31384c09db9f.js → 94486f3fcba48fa93aa8.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{a0fab8cd791c33d3895d.js → 98dbafa4d45fdf790fff.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{2b867cec6ada339f1c8f.js → 9958a3ed4aa787d19e00.js} +1 -1
  112. package/assets/esri/core/workers/chunks/9a723d739ac44b45432c.js +1 -0
  113. package/assets/esri/core/workers/chunks/9c6fc4fe2c46f40d63d9.js +1 -0
  114. package/assets/esri/core/workers/chunks/{9d9a639f7388a29e7c96.js → 9e4f37367d61a2e13053.js} +1 -1
  115. package/assets/esri/core/workers/chunks/a16526adc0dbffdc1ffc.js +1 -0
  116. package/assets/esri/core/workers/chunks/a19063456ce21b471b69.js +1 -0
  117. package/assets/esri/core/workers/chunks/{c4641c2c130c7b8bcdee.js → a1c4509a3865139eb570.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{e2fdc4dc1ab9decd731e.js → a4db5c9a90107e097df8.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{176f56de787bf486be9f.js → a7bd294996e6c8b8354a.js} +1 -1
  120. package/assets/esri/core/workers/chunks/{80a155496deef2c02a3e.js → a878061845e594b2d72c.js} +1 -1
  121. package/assets/esri/core/workers/chunks/{8f426cb210a4250517d5.js → ad3e18c4c65aa2cd1ceb.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{0328eaea66c1db98da1c.js → ae807912acc19a166264.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{0a981061df08da19372c.js → ae8c387d59be87457567.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{5caf49e679ed0c27e0bd.js → aea8553a2aa54cfd694b.js} +1 -1
  125. package/assets/esri/core/workers/chunks/b1f667006cba60ef4aa7.js +1 -0
  126. package/assets/esri/core/workers/chunks/{70c8f69eed14d55c5cf6.js → b2add7338258ca7c24dd.js} +1 -1
  127. package/assets/esri/core/workers/chunks/b2d9f4e057af26a538fb.js +1 -0
  128. package/assets/esri/core/workers/chunks/{26081b6486c623735657.js → b4ea675831627d9808dd.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{35ca317490540fae437c.js → b54202dcab8df080e991.js} +1 -1
  130. package/assets/esri/core/workers/chunks/ba212ba895ccf573eedf.js +1 -0
  131. package/assets/esri/core/workers/chunks/{95bae3c275f1483eb7ed.js → bcff6178e9d16b1b6191.js} +1 -1
  132. package/assets/esri/core/workers/chunks/{2845a0810e9c00bf30f8.js → bf775fe489213cfc08b1.js} +1 -1
  133. package/assets/esri/core/workers/chunks/{4823e4522bd7379d858e.js → bfc1e8aec7aace3ff30e.js} +1 -1
  134. package/assets/esri/core/workers/chunks/c0849628a7fbc6869340.js +1 -0
  135. package/assets/esri/core/workers/chunks/{20003728a679479b14dc.js → c31583229a1100b66a18.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{9346437b152b20bdcf8a.js → c941d15190fc08523d0d.js} +1 -1
  137. package/assets/esri/core/workers/chunks/{5746c4861af83c1d57a8.js → cf11b1dcc2cff30229b6.js} +1 -1
  138. package/assets/esri/core/workers/chunks/{fe1dcf9f81da4adbb1fe.js → cf13625a033f9903655f.js} +1 -1
  139. package/assets/esri/core/workers/chunks/{1990162dcf73601d54f7.js → d3cd9c24edf7520d0824.js} +1 -1
  140. package/assets/esri/core/workers/chunks/{73db6c070b049fe05147.js → d57edb77c6deee36cce5.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{6e4ec9fa931c69e4e4ba.js → da573ecc68e6aa8f6da9.js} +1 -1
  142. package/assets/esri/core/workers/chunks/{bdf0ab95401c6d8fbc7d.js → db559437b571462fb3db.js} +1 -1
  143. package/assets/esri/core/workers/chunks/{512dcd6e34e217029391.js → deb2854bb7d082a26f52.js} +1 -1
  144. package/assets/esri/core/workers/chunks/{5993427325d1add18ed9.js → dede989d59c4b416af68.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{18e9cb71fa020e93d139.js → df5ecb3339d9301a6f5b.js} +1 -1
  146. package/assets/esri/core/workers/chunks/{e22b400636094fc7b6c0.js → dfbf2e17058aa876f96a.js} +1 -1
  147. package/assets/esri/core/workers/chunks/dfc37c2ce51e6a34fd87.js +1 -0
  148. package/assets/esri/core/workers/chunks/{c5c6a32a24005478c976.js → e032f3d2ee19790f8c79.js} +1 -1
  149. package/assets/esri/core/workers/chunks/{3d7923d25734d03a4d27.js → e1dba29f5fd1ee5fc999.js} +1 -1
  150. package/assets/esri/core/workers/chunks/{352511dbc67166face40.js → e2e32e2f04cce9e932fd.js} +1 -1
  151. package/assets/esri/core/workers/chunks/e5bcc44f3dc6fc90835a.js +1 -0
  152. package/assets/esri/core/workers/chunks/{bb0a1be03bb9d621432c.js → e7638b9ab6674bc8a18f.js} +1 -1
  153. package/assets/esri/core/workers/chunks/{edef1e2254c992459c63.js → eb1a7bb8b14e651bc241.js} +1 -1
  154. package/assets/esri/core/workers/chunks/f09242e97196ad177c10.js +1 -0
  155. package/assets/esri/core/workers/chunks/{779ee975efebb838b5d6.js → f154336b4af011cd0c56.js} +1 -1
  156. package/assets/esri/core/workers/chunks/{3807d0b9b1894731174d.js → f1be3a177328a169128f.js} +1 -1
  157. package/assets/esri/core/workers/chunks/{0810dbbf348a927392e7.js → f59c782898d931810374.js} +1 -1
  158. package/assets/esri/core/workers/chunks/{c9159ebf930af3f336f3.js → f5d89b48f62fba78fd10.js} +1 -1
  159. package/assets/esri/core/workers/chunks/f7846523adacbfe5047e.js +1 -0
  160. package/assets/esri/core/workers/chunks/{b510c07dfd0d31683b08.js → f7a9d2da07196a0989ae.js} +1 -1
  161. package/assets/esri/core/workers/chunks/{143503f6eb270c4683f8.js → f7c99e9c8d19352af38d.js} +1 -1
  162. package/assets/esri/core/workers/chunks/{79ab06fb4c91ac8da323.js → f839b86bee15deaf84e4.js} +1 -1
  163. package/assets/esri/core/workers/chunks/{9adecee0ed2f1df3b0d2.js → f85e2b6a285fa8ad60aa.js} +1 -1
  164. package/assets/esri/core/workers/chunks/{024063fe2bbb27899094.js → fbbccca5b1bcffb31c4e.js} +1 -1
  165. package/assets/esri/core/workers/chunks/{009556f323e58271bc7a.js → fc4417d1260b717a9385.js} +1 -1
  166. package/assets/esri/core/workers/chunks/{6810ecdeccf4b7eae5e2.js → fdaf8fb5a3cc7abea44b.js} +1 -1
  167. package/assets/esri/core/workers/chunks/{05072093e0209ef5db20.js → fe3f95fda29e4844b153.js} +1 -1
  168. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  169. package/assets/esri/themes/base/widgets/_Editor.scss +4 -0
  170. package/assets/esri/themes/dark/main.css +1 -1
  171. package/assets/esri/themes/light/main.css +1 -1
  172. package/assets/esri/themes/light/view.css +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  200. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  201. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  202. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  203. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  204. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  205. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  206. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  207. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  208. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  209. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  210. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  211. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  212. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  213. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  217. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  218. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  219. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  220. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  221. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  222. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  240. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  248. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  249. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  250. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  251. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  255. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  256. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  257. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  258. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  259. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  260. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  261. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  262. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  263. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  264. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  265. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  266. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  267. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  268. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  269. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  270. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  271. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  272. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  273. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  274. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  275. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  276. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  277. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  278. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  279. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  280. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  281. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  282. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  283. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  284. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  285. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  286. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  287. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  288. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  289. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  290. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  291. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  292. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  293. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  294. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  295. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  296. package/chunks/Envelope.js +1 -1
  297. package/chunks/Fog.glsl.js +2 -2
  298. package/chunks/Geometry.js +1 -1
  299. package/chunks/GlowBlur.glsl.js +8 -9
  300. package/chunks/GlowComposition.glsl.js +15 -16
  301. package/chunks/Laserlines.glsl.js +12 -12
  302. package/chunks/MultiPathImpl.js +1 -1
  303. package/chunks/Point2D.js +1 -1
  304. package/chunks/PointRenderer.glsl.js +1 -1
  305. package/chunks/Precipitation.glsl.js +2 -2
  306. package/chunks/Terrain.glsl.js +1 -1
  307. package/chunks/boundedPlane.js +1 -1
  308. package/chunks/bundle.js +1 -1
  309. package/chunks/cameraUtilsPlanar.js +1 -1
  310. package/chunks/cameraUtilsSpherical.js +1 -1
  311. package/chunks/sphere.js +1 -1
  312. package/chunks/vec32.js +1 -1
  313. package/config.js +1 -1
  314. package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
  315. package/core/accessorSupport/extensions/serializableProperty/utils.js +5 -0
  316. package/core/accessorSupport/extensions/serializableProperty.js +1 -1
  317. package/core/accessorSupport/read.js +1 -1
  318. package/core/accessorSupport/write.js +1 -1
  319. package/core/dedupeResult.js +5 -0
  320. package/core/has.js +1 -1
  321. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  322. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  323. package/core/perspectiveUtils.js +1 -1
  324. package/core/workers/workerFactory.js +1 -1
  325. package/editing/geometry/lineUtils.js +1 -1
  326. package/geometry/Mesh.js +1 -1
  327. package/geometry/operators/support/jsonConverter.js +1 -1
  328. package/geometry/projection/localLinearScaleFactors.js +1 -1
  329. package/geometry/projection/projectDirection.js +1 -1
  330. package/geometry/projection/projectVec3Array.js +1 -1
  331. package/geometry/support/axisAngle.js +1 -1
  332. package/geometry/support/axisAngleDegrees.js +1 -1
  333. package/geometry/support/buffer/internals/Vec3.js +1 -1
  334. package/geometry/support/clipRay.js +1 -1
  335. package/geometry/support/coordinateSystem.js +1 -1
  336. package/geometry/support/frustum.js +1 -1
  337. package/geometry/support/lineSegment.js +1 -1
  338. package/geometry/support/meshUtils/centerAt.js +1 -1
  339. package/geometry/support/meshUtils/exporters/gltf/geometry.js +1 -1
  340. package/geometry/support/meshUtils/loadExternal.js +1 -1
  341. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  342. package/geometry/support/meshUtils/merge.js +1 -1
  343. package/geometry/support/meshUtils/rotate.js +1 -1
  344. package/geometry/support/meshUtils/scale.js +1 -1
  345. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  346. package/geometry/support/plane.js +1 -1
  347. package/geometry/support/polygonUtils.js +1 -1
  348. package/geometry/support/ray.js +1 -1
  349. package/geometry/support/sphereUtils.js +1 -1
  350. package/geometry/support/triangle.js +1 -1
  351. package/geometry/support/vector.js +1 -1
  352. package/interfaces.d.ts +256 -188
  353. package/kernel.js +1 -1
  354. package/layers/FeatureLayer.js +1 -1
  355. package/layers/KnowledgeGraphLayer.js +1 -1
  356. package/layers/LinkChartLayer.js +1 -1
  357. package/layers/VoxelWasmPerSceneView.js +1 -1
  358. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  359. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  360. package/layers/graphics/sources/ParquetSource.js +1 -1
  361. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  362. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  363. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  364. package/layers/graphics/sources/support/QueryTask.js +1 -1
  365. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  366. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  367. package/layers/knowledgeGraph/layerUtils.js +1 -1
  368. package/layers/mixins/ArcGISImageService.js +1 -1
  369. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  370. package/layers/orientedImagery/transformations/utils.js +1 -1
  371. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  372. package/layers/support/Sublayer.js +1 -1
  373. package/layers/support/capabilities.js +1 -1
  374. package/layers/support/featurePopupQueryUtils.js +1 -1
  375. package/layers/support/layerUtils.js +1 -1
  376. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  377. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  378. package/layers/support/tiles3DUtils.js +1 -1
  379. package/layers/video/VideoCameraSensorModel.js +1 -1
  380. package/layers/voxel/VoxelVolume.js +1 -1
  381. package/layers/voxel/voxelPlaneUtils.js +1 -1
  382. package/package.json +3 -3
  383. package/rest/knowledgeGraph/GraphApplyEdits.js +1 -1
  384. package/rest/query/executePivotQuery.js +5 -0
  385. package/rest/query/operations/query.js +1 -1
  386. package/rest/query/operations/queryPivot.js +5 -0
  387. package/rest/query/operations/queryUtils.js +5 -0
  388. package/rest/support/PivotDefinition.js +5 -0
  389. package/rest/support/PivotQuery.js +5 -0
  390. package/rest/support/UnPivotDefinition.js +5 -0
  391. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  392. package/smartMapping/support/adapters/support/utils.js +1 -1
  393. package/support/basemapDefinitions.js +1 -1
  394. package/support/revision.js +1 -1
  395. package/views/2d/GoToManager.js +1 -1
  396. package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +1 -1
  397. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  398. package/views/2d/engine/flow/dataUtils.js +1 -1
  399. package/views/2d/engine/flow/utils.js +1 -1
  400. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  401. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  402. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  403. package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
  404. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  405. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  406. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  407. package/views/2d/layers/RouteLayerView2D.js +1 -1
  408. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  409. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  410. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  411. package/views/2d/navigation/actions/Pan.js +1 -1
  412. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  413. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  414. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  415. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  416. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  417. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  418. package/views/3d/analysis/ElevationProfile/ElevationProfileGeometryVisualization3D.js +5 -0
  419. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  420. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  421. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  422. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  423. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  424. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  425. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  426. package/views/3d/analysis/Slice/ShiftManipulator.js +1 -1
  427. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  428. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  429. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  430. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  431. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  432. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  433. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
  434. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  435. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  436. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  437. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  438. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  439. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
  440. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  441. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  442. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.js +1 -1
  443. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  444. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
  445. package/views/3d/analysis/VolumeMeasurement/volumeMeasurementErrors.js +5 -0
  446. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  447. package/views/3d/analysis/support/measurementUtils.js +1 -1
  448. package/views/3d/animation/pointToPoint/Animation.js +1 -1
  449. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  450. package/views/3d/camera/constraintUtils/altitude.js +1 -1
  451. package/views/3d/camera/constraintUtils/common.js +1 -1
  452. package/views/3d/camera/constraintUtils/distance.js +1 -1
  453. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  454. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  455. package/views/3d/camera/intersectionUtils.js +1 -1
  456. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  457. package/views/3d/environment/CloudsParameters.js +1 -1
  458. package/views/3d/environment/EnvironmentManager.js +1 -1
  459. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  460. package/views/3d/environment/Fog.js +1 -1
  461. package/views/3d/environment/MarsAtmosphere.js +1 -1
  462. package/views/3d/glTF/loader.js +1 -1
  463. package/views/3d/interactive/Manipulator3D.js +1 -1
  464. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  465. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  466. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  467. package/views/3d/interactive/editingTools/lineObjectVisualElementUtils.js +1 -1
  468. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  469. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  470. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  471. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  472. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  473. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  474. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  475. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  476. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +1 -1
  477. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  478. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  479. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  480. package/views/3d/interactive/manipulatorUtils.js +1 -1
  481. package/views/3d/interactive/support/viewUtils.js +1 -1
  482. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  483. package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
  484. package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
  485. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  486. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  487. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  488. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  489. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  490. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  491. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  492. package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
  493. package/views/3d/interactive/visualElements/support/Segment.js +1 -1
  494. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  495. package/views/3d/layers/FlowSubView3D.js +1 -1
  496. package/views/3d/layers/I3SMeshView3D.js +1 -1
  497. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  498. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  499. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  500. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  501. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  502. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  503. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  504. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  505. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  506. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  507. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  508. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  509. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  510. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  511. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  512. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  513. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  514. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  515. package/views/3d/layers/graphics/Labeler.js +1 -1
  516. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  517. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  518. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  519. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  520. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  521. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  522. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  523. package/views/3d/layers/i3s/LoDUtil.js +1 -1
  524. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  525. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  526. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  527. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  528. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  529. package/views/3d/layers/support/uvUtils.js +1 -1
  530. package/views/3d/state/Frustum.js +1 -1
  531. package/views/3d/state/NearFarHeuristic.js +1 -1
  532. package/views/3d/state/controllers/FovController.js +1 -1
  533. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  534. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  535. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  536. package/views/3d/state/controllers/RotateController.js +1 -1
  537. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  538. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  539. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  540. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  541. package/views/3d/state/controllers/momentum/PanPlanarMomentumController.js +1 -1
  542. package/views/3d/state/controllers/momentum/PanSphericalMomentumController.js +1 -1
  543. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  544. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  545. package/views/3d/state/utils/navigationUtils.js +1 -1
  546. package/views/3d/state/utils/viewUtils.js +1 -1
  547. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  548. package/views/3d/support/RenderCoordsHelper.js +1 -1
  549. package/views/3d/support/cameraUtils.js +1 -1
  550. package/views/3d/support/cameraUtilsInternal.js +1 -1
  551. package/views/3d/support/dito.js +1 -1
  552. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  553. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  554. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  555. package/views/3d/support/flow/constants.js +1 -1
  556. package/views/3d/support/geometryUtils/ray.js +1 -1
  557. package/views/3d/support/intersectionUtils.js +1 -1
  558. package/views/3d/support/mathUtils.js +1 -1
  559. package/views/3d/support/orientedBoundingBox.js +1 -1
  560. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  561. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  562. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  563. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  564. package/views/3d/support/sunUtils.js +1 -1
  565. package/views/3d/support/viewpointUtils.js +1 -1
  566. package/views/3d/terrain/OverlayManager.js +1 -1
  567. package/views/3d/terrain/OverlayRenderer.js +1 -1
  568. package/views/3d/terrain/PatchGeometry.js +1 -1
  569. package/views/3d/terrain/PatchRenderData.js +1 -1
  570. package/views/3d/terrain/SphericalPatch.js +1 -1
  571. package/views/3d/terrain/TerrainRenderer.js +1 -1
  572. package/views/3d/terrain/TerrainSurface.js +1 -1
  573. package/views/3d/terrain/Tile.js +1 -1
  574. package/views/3d/webgl/RenderCamera.js +1 -1
  575. package/views/3d/webgl-engine/Stage.js +1 -1
  576. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  577. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  578. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
  579. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  580. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  581. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
  582. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  583. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +2 -2
  584. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  585. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +1 -1
  586. package/views/3d/webgl-engine/core/shaderLibrary/util/ScreenSizePerspective.glsl.js +1 -1
  587. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  588. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  589. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  590. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +7 -7
  591. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
  592. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  593. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  594. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  595. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  596. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  597. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  598. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  599. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  600. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  601. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  602. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  603. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  604. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  605. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  606. package/views/3d/webgl-engine/lib/IntersectorResult.js +1 -1
  607. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  608. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  609. package/views/3d/webgl-engine/lib/Path.js +1 -1
  610. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  611. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  612. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  613. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  614. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  615. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  616. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  617. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  618. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  619. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  620. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  621. package/views/3d/webgl-engine/lib/edgeRendering/edgeBufferWriters.js +1 -1
  622. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  623. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  624. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  625. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  626. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  627. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  628. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  629. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  630. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  631. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  632. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  633. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  634. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  635. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  636. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  637. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  638. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  639. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  640. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  641. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  642. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  643. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  644. package/views/3d/webgl.js +1 -1
  645. package/views/DOMContainer.js +1 -1
  646. package/views/SceneView.js +1 -1
  647. package/views/View.js +1 -1
  648. package/views/View2D.js +1 -1
  649. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  650. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +4 -0
  651. package/views/analysis/ElevationProfile/ElevationProfileError.js +5 -0
  652. package/views/analysis/ElevationProfile/ElevationProfileLineGroundComputation.js +1 -1
  653. package/views/analysis/ElevationProfile/ElevationProfileLineInputComputation.js +1 -1
  654. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  655. package/views/analysis/ElevationProfile/elevationProfileErrors.js +5 -0
  656. package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
  657. package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
  658. package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +1 -1
  659. package/views/analysis/ElevationProfile/elevationProfileLayerUtils.js +5 -0
  660. package/views/analysis/ExclusiveOperationManager.js +1 -1
  661. package/views/draw/support/Reshape.js +1 -1
  662. package/views/draw/support/createUtils.js +1 -1
  663. package/views/draw/support/helpMessageUtils3d.js +1 -1
  664. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  665. package/views/interactive/GraphicManipulator.js +1 -1
  666. package/views/interactive/coordinateHelper.js +1 -1
  667. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  668. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  669. package/views/interactive/sketch/constraintUtils.js +1 -1
  670. package/views/interactive/sketch/constraints.js +1 -1
  671. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  672. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  673. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  674. package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
  675. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  676. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  677. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  678. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  679. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  680. package/views/layers/FeatureLayerView.d.ts +1 -1
  681. package/views/layers/FeatureLayerView.js +1 -1
  682. package/views/layers/SceneLayerView.js +1 -1
  683. package/views/navigation/PanPlanarMomentumEstimator.js +1 -1
  684. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  685. package/views/navigation/gamepadAndKeyboardUtils.js +1 -1
  686. package/views/popupAdapter.js +1 -1
  687. package/views/support/angularMeasurementUtils.js +1 -1
  688. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  689. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  690. package/views/support/geometry3dUtils.js +1 -1
  691. package/widgets/Daylight/DaylightViewModel.js +1 -1
  692. package/widgets/Daylight.js +1 -1
  693. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  694. package/widgets/Editor/EditorViewModel.js +1 -1
  695. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  696. package/widgets/Editor/SplitFeatureWorkflowData.js +1 -1
  697. package/widgets/Editor/UpdateWorkflow.js +1 -1
  698. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  699. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  700. package/widgets/Editor/components/UploadDetails.js +1 -1
  701. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/CreateFeaturesWorkflowPendingFeatureListAdapter.ts.js +5 -0
  702. package/widgets/Editor/components/workflowAdapters/pendingFeatureList/SplitFeatureWorkflowPendingFeatureListAdapter.js +5 -0
  703. package/widgets/Editor/css.js +1 -1
  704. package/widgets/Editor/modelUploadUtils.js +1 -1
  705. package/widgets/Editor/support/splitFeatureUtils.js +1 -1
  706. package/widgets/Editor/workflowUtils.js +1 -1
  707. package/widgets/Editor.js +1 -1
  708. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  709. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  710. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  711. package/widgets/FeatureTable/FieldColumn.js +1 -1
  712. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  713. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  714. package/widgets/FeatureTable/support/templateUtils.js +1 -1
  715. package/widgets/Legend/LegendViewModel.js +1 -1
  716. package/widgets/Legend.js +1 -1
  717. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  718. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  719. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  720. package/widgets/OrientedImageryViewer/dataCaptureUtils.js +1 -1
  721. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  722. package/widgets/OrientedImageryViewer.js +1 -1
  723. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  724. package/widgets/PanoramicViewer/PanoramicZoomManager.js +5 -0
  725. package/widgets/PanoramicViewer/PanoramicZoomViewModel.js +1 -1
  726. package/widgets/PanoramicViewer/constants.js +1 -1
  727. package/widgets/PanoramicViewer/support/ClosestMap.js +5 -0
  728. package/widgets/PanoramicViewer/support/PanoramicMeshManager.js +1 -1
  729. package/widgets/PanoramicViewer/support/PanoramicMeshWorker.js +1 -1
  730. package/widgets/PanoramicViewer/support/PanoramicTileNode.js +5 -0
  731. package/widgets/PanoramicViewer/support/PanoramicTilePyramid.js +5 -0
  732. package/widgets/PanoramicViewer/support/importUtils.js +5 -0
  733. package/widgets/PanoramicViewer/utils.js +1 -1
  734. package/widgets/PanoramicViewer.js +1 -1
  735. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  736. package/widgets/support/forms/formUtils.js +1 -1
  737. package/analysis/ElevationProfile/ElevationProfileUnits.d.ts +0 -4
  738. package/assets/esri/core/workers/chunks/004b13c1db79c9e668b1.js +0 -1
  739. package/assets/esri/core/workers/chunks/06c389283ee5b60573f2.js +0 -1
  740. package/assets/esri/core/workers/chunks/0ca5060c81a1a05b8be3.js +0 -1
  741. package/assets/esri/core/workers/chunks/1214c126af0de25a4b4a.js +0 -1
  742. package/assets/esri/core/workers/chunks/147f6e7b147beaa4ed29.js +0 -1
  743. package/assets/esri/core/workers/chunks/1f2d13466c60a6b57717.js +0 -1
  744. package/assets/esri/core/workers/chunks/23e600e368ac829680b5.js +0 -1
  745. package/assets/esri/core/workers/chunks/3d800fbc449bea18b1cd.js +0 -1
  746. package/assets/esri/core/workers/chunks/3dcdbba706a8034b6ba3.js +0 -1
  747. package/assets/esri/core/workers/chunks/3e11a893271caa11a881.js +0 -1
  748. package/assets/esri/core/workers/chunks/503c81dda242e6077317.js +0 -1
  749. package/assets/esri/core/workers/chunks/52121179d4f9833008ec.js +0 -1
  750. package/assets/esri/core/workers/chunks/56b3bb68b61b77138186.js +0 -1
  751. package/assets/esri/core/workers/chunks/5aacd1c6b171c99b41f5.js +0 -1
  752. package/assets/esri/core/workers/chunks/633faa9cec8988ab06af.js +0 -33
  753. package/assets/esri/core/workers/chunks/801451fb572bc5f1f270.js +0 -1
  754. package/assets/esri/core/workers/chunks/8d63b42aea32ce2e5d09.js +0 -1
  755. package/assets/esri/core/workers/chunks/b1ccbc2fef7f7e5e04f7.js +0 -1
  756. package/assets/esri/core/workers/chunks/bec9ddd38c9ab9f2561b.js +0 -1
  757. package/assets/esri/core/workers/chunks/bf9031749d10e7d457b6.js +0 -1
  758. package/assets/esri/core/workers/chunks/c473b15d4d52f0a63d20.js +0 -1
  759. package/assets/esri/core/workers/chunks/c547692862df95d22818.js +0 -1
  760. package/assets/esri/core/workers/chunks/c84665db250b05e2829d.js +0 -1
  761. package/assets/esri/core/workers/chunks/c86ca87959f04075e834.js +0 -1
  762. package/assets/esri/core/workers/chunks/ef75cad6570b14a42b62.js +0 -1
  763. package/assets/esri/core/workers/chunks/fb456e7425e09df17d8c.js +0 -1
  764. package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +0 -5
  765. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +0 -5
  766. package/views/analysis/ElevationProfile/ElevationProfileGenerationError.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{isSome as i}from"../../../core/arrayUtils.js";import{result as r,forEach as s}from"../../../core/asyncUtils.js";import"../../../core/has.js";import o from"../../../core/Logger.js";import{destroyMaybe as n,abortMaybe as a}from"../../../core/maybe.js";import{estimateNumberArrayMemory as d,baseObjectMemory as l,estimateNumberMemory as u,estimateFixedArrayMemory as h,baseArrayMemory as p}from"../../../core/memoryEstimations.js";import{isAbortError as c,allSettledValues as _,throwIfAborted as m}from"../../../core/promiseUtils.js";import{initial as g,watch as f,sync as y,syncAndInitial as b}from"../../../core/reactiveUtils.js";import{pt2px as w}from"../../../core/screenUtils.js";import{isArrayBuffer as P}from"../../../core/typedArrayUtil.js";import{property as N}from"../../../core/accessorSupport/decorators/property.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{l as x,f as C,e as S,c as I}from"../../../chunks/vec32.js";import{clone as A}from"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{fromValues as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import j from"../../../geometry/Extent.js";import k from"../../../geometry/Point.js";import{projectBoundingSphere as V}from"../../../geometry/projection/projectBoundingSphere.js";import{projectVectorToVector as Q}from"../../../geometry/projection/projectVectorToVector.js";import{create as F,fromMinMax as L}from"../../../geometry/support/aaBoundingBox.js";import{fromNormalAndOffset as D,create as E}from"../../../geometry/support/plane.js";import{f as O}from"../../../chunks/sphere.js";import U from"../../../layers/graphics/OptimizedGeometry.js";import{QueryEngine as q}from"../../../layers/graphics/data/QueryEngine.js";import{CodedValue as M}from"../../../layers/support/CodedValue.js";import W from"../../../layers/support/CodedValueDomain.js";import"../../../layers/support/Domain.js";import"../../../layers/support/InheritedDomain.js";import"../../../layers/support/RangeDomain.js";import{unpackFieldNames as G}from"../../../layers/support/fieldUtils.js";import z from"../../../rest/support/FeatureSet.js";import H from"../../../rest/support/Query.js";import{getElevationOffset as B}from"../../../support/elevationInfoUtils.js";import{LayerView3D as T}from"./LayerView3D.js";import{PointCloudLayerViewPerformanceInfo as $,QueuePerformanceInfo as J}from"./PointCloudLayerViewPerformanceInfo.js";import{PointCloudWorkerHandle as K}from"./PointCloudWorkerHandle.js";import{I3SQueryFeatureStore as Z}from"./i3s/I3SQueryFeatureStore.js";import{checkPointCloudLayerValid as Y,checkPointCloudLayerCompatibleWithView as X}from"./i3s/I3SUtil.js";import{nodeDiff as ee,sortFrontToBack as te,splitWorkEntries as ie}from"./i3s/LoDUtil.js";import{PagedNodeIndex as re}from"./i3s/PagedNodeIndex.js";import{PointCloudGraphic as se}from"./i3s/PointCloudGraphic.js";import{PointCloudRenderer as oe}from"./i3s/PointCloudRenderer.js";import{isPointRendererNode as ne,PointCloudRendererNode as ae}from"./i3s/PointCloudRendererNode.js";import{getSplatSizeAlgorithm as de,getFixedSizeAlgorithm as le,getRendererInfo as ue,getFilterInfo as he,rendererUsesFixedSizes as pe,getAttributeInfo as ce}from"./i3s/PointCloudRendererUtil.js";import{getAttributeValues as _e,readGeometry as me,elevationFromPositions as ge}from"./i3s/PointCloudWorkerUtil.js";import{normalizeHighlightTarget as fe,emptyHighlightHandle as ye}from"./support/highlightUtils.js";import{PopupSceneLayerView as be}from"./support/PopupSceneLayerView.js";import{projectToBoundingBox as we}from"../support/extentUtils.js";import{computeMapPointFromVec3d as Pe}from"../support/hitTest.js";import{Obb as Ne}from"../support/orientedBoundingBox.js";import{updatingProgress as ve}from"../support/updatingProperties.js";import xe from"../../layers/LayerView.js";import{PointCloudLayerView as Ce}from"../../layers/PointCloudLayerView.js";import{getHighlightName as Se}from"../../support/highlightOptionsUtils.js";import{isInEffectiveScaleRange as Ie}from"../../support/layerViewUtils.js";import{PromiseQueue as Ae}from"../../support/PromiseQueue.js";import{TaskPriority as Re}from"../../support/Scheduler.js";const je=8,ke=E();let Ve=class extends(Ce(be(T(xe)))){constructor(){super(...arguments),this.type="point-cloud-3d",this.maximumPointCount=4e6,this.slicePlaneEnabled=!1,this._renderer=null,this._rendererAdded=!1,this._renderedNodes=new Set,this._updateViewNeeded=!0,this._lodFactor=1,this._maxLoggedBoxWarnings=5,this._pageMultiplier=1,this._nodeLoadEpoch=0,this._indexQueue=[],this._workQueue=new Array,this._idleQueue=new Ae,this._indexPagesLoading=new Map,this._loadingNodes=new Map,this._recalcWork=!0,this._layerIsVisible=!1,this._codedDomainPopulationPromise=null,this._codedDomainPopulationAbortController=null,this._totalWork=0,this._index=null,this._loadingInitNodePage=!1,this._nodeIdArray=[],this.ignoresMemoryFactor=!1}get baseUrl(){return this.layer.parsedUrl?.path??""}get pointScale(){const e=de(this.layer?.renderer),t=1;return null!=e?.scaleFactor?e.scaleFactor:t}get useRealWorldSymbolSizes(){const e=le(this.layer?.renderer),t=!1;return null!=e?.useRealWorldSymbolSizes?e.useRealWorldSymbolSizes:t}get pointSize(){const e=le(this.layer?.renderer),t=0;return null!=e?.size?e.size:t}get inverseDensity(){const e=96;return this.layer?.renderer?1*e/this.layer.renderer.pointsPerInch:5}get availableFields(){const e=ue(this.layer),t=new Set;e.primaryAttribute&&t.add(e.primaryAttribute.name),e.modulationAttribute&&t.add(e.modulationAttribute.name);const i=he(this.layer);if(i)for(const r of i)r.attributeInfo&&t.add(r.attributeInfo.name);if(this.layer.outFields)for(const r of G(this.layer.fieldsIndex,this.layer.outFields))t.add(r);return Array.from(t)}get _clippingBox(){if(!this.view||!this.view.clippingArea)return null;const e=F(),t=this.view.renderSpatialReference;return we(this.view.clippingArea,e,t)?e:null}get _elevationOffset(){const e=this.layer&&this.layer.elevationInfo;return e&&"absolute-height"===e.mode?B(e,this.layer.spatialReference):0}get _graphicOrigin(){return this.layer.graphicOrigin}initialize(){const e=this.view.resourceController,t=Ee(e);this._worker=new K(t),this.addResolvingPromise(this._worker.promise),Y(this.layer),X(this.layer,this.view),this._indexRequester=e.createStreamDataRequester(2),this._dataRequester=e.createStreamDataRequester(3),this._initRenderer();const i=this._initNodePages(),r=this.view.resourceController.memoryController;this._memCache=r.newCache(`pcl-${this.layer.uid}`),this._queryFeaturesCache=r.newCache(`pcl-query-features-${this.layer.uid};`),this._updatingHandles.add(()=>this._clippingBox,()=>this._setUpdateViewNeeded(),g),this._updatingHandles.add(()=>this._elevationOffset,()=>this._elevationOffsetChanged(),g),this._updatingHandles.add(()=>this.layer.renderer,()=>this._rendererChanged(),g),this._updatingHandles.add(()=>this.layer.filters,()=>this._reload(),g),this._updatingHandles.add(()=>this.layer.outFields,()=>this._reload(),g),this._updatingHandles.add(()=>this.layer.effectiveScaleRange,()=>this._setUpdateViewNeeded()),this._updatingHandles.add(()=>this.view.state.contentCamera,()=>this._setUpdateViewNeeded()),this.addHandles([f(()=>this.view.quality,()=>this._setUpdateViewNeeded(),y)]),this.addResolvingPromise(i),this.when(()=>{this.addHandles([e.scheduler.registerTask(Re.POINT_CLOUD_LAYER,this),f(()=>2===this.view.state.mode,()=>this._setUpdateViewNeeded(),b),this._updatingHandles.add(()=>this.suspended,e=>{e?this._clearNodeState():this._setUpdateViewNeeded()},g)])},()=>{this._updatingHandles.removeAll(),this.removeAllHandles()})}_setUpdateViewNeeded(){this._updateViewNeeded=!0,this._updateLoading()}destroy(){this.cancelLoading(),this._worker=n(this._worker),this._destroyRenderer(),this._memCache=n(this._memCache),this._queryFeaturesCache=n(this._queryFeaturesCache),this._queryEngine=n(this._queryEngine),this._codedDomainPopulationAbortController=a(this._codedDomainPopulationAbortController),this._codedDomainPopulationPromise=null}_initRenderer(){this._renderer=new oe({createGraphic:(e,t,i)=>this._createGraphic(e,t,i)}),this._renderer.layerViewUid=this.uid,this._updatingHandles.add(()=>this._clippingBox,e=>this._renderer.clippingBox=e,g),this._updatingHandles.add(()=>this.suspended,e=>this._setPointsVisible(!e),g),this._updatingHandles.add(()=>this.pointScale,e=>this._renderer.scaleFactor=e,g),this._renderer.minSizePx=Math.sqrt(2),this._updatingHandles.add(()=>this.useRealWorldSymbolSizes,e=>this._renderer.useRealWorldSymbolSizes=e,g),this._updatingHandles.add(()=>this.pointSize,e=>{const t=w(e);this._renderer.size=e,this._renderer.sizePx=t},g),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._renderer.slicePlaneEnabled=e,g),this._updatingHandles.add(()=>this.inverseDensity,()=>this._setUpdateViewNeeded(),g),this._updatingHandles.add(()=>this.maximumPointCount,()=>this._setUpdateViewNeeded(),g),this._updatingHandles.add(()=>this.view.qualitySettings.sceneService.pointCloud.lodFactor,e=>{this._lodFactor=e,this._setUpdateViewNeeded()},g)}_destroyRenderer(){this._renderer.removeAll(),this._setPointsVisible(!1)}_createGraphic(e,t,i,r){const s=null!=e.pointIdFilterMap?e.pointIdFilterMap[t]:t,o=i?"declaredClass"in i?i:Pe(this.view,i):null;return r??=this._createGraphicAttributes(e,s),new se({pointCloudMetadata:{nodeId:e.id,pointIndexInNode:t,attributePointIndexInNode:s,epoch:this._nodeLoadEpoch},geometry:o,attributes:r,layer:this.layer,sourceLayer:this.layer,origin:this._graphicOrigin})}_createGraphicAttributes(e,t){const i={};for(const r of e.attributes)this._encodeGraphicAttribute(r.attributeInfo,r.values,t,i);return i}_getGraphicAttribute(e,t,i){const r=e.storageInfo?.attributeValues,s=r?.valuesPerElement??1;if(1===s)return t[i];if("UInt8"===r?.valueType&&s<=4){let e=0;const r=i*s;for(let i=r;i<r+s;i++)e=(e<<8)+t[i];return e}}_encodeGraphicAttribute(e,t,i,r){r[e.name]=this._getGraphicAttribute(e,t,i)}_setPointsVisible(e){e&&!this._rendererAdded?(this.view.stage.addRenderPlugin(this._renderer),this._rendererAdded=!0):!e&&this._rendererAdded&&(this.view.stage.removeRenderPlugin(this._renderer),this._rendererAdded=!1)}_rendererChanged(){this._renderer.useFixedSizes=pe(this.layer.renderer),this._reload()}_reload(){this._clearNodeState(),this._memCache.clear(),this._setUpdateViewNeeded()}_elevationOffsetChanged(){this._clearNodeState(),this._memCache.clear(),this._initNodePages()}_displayNodes(e){this._workQueue=ee([...this._renderedNodes],e,this._index),te(this._workQueue,this.view.state.contentCamera.viewForward,this._index),ie(this._workQueue,je,this._index),this._updateQueues(),this._totalWork=this._computeWork(),this._updateLoading(),this._layerIsVisible=e.length>0||this._loadingInitNodePage,this.notifyChange("suspended")}cancelLoading(){this._cancelNodeLoading(),this._cancelIndexLoading()}_cancelNodeLoading(){const e=new Array;this._loadingNodes.forEach(({abortController:t})=>e.push(t)),this._loadingNodes.clear();for(const t of e)t.abort();this._workQueue=[],this._idleQueue.cancelAll(),this._totalWork=this._computeWork(),this._updateLoading()}_updateQueues(){const e=new Set;this._workQueue.forEach(t=>t.load.forEach(t=>e.add(t)));const t=new Array,i=new Map;this._loadingNodes.forEach((r,s)=>{e.has(s)?i.set(s,r):t.push(r)}),this._loadingNodes=i;for(const{abortController:r}of t)r.abort();this._workQueue=this._workQueue.filter(e=>{for(const t of e.load)if(this._loadingNodes.has(t))return this._recalcWork=!0,!1;return!0}),this._totalWork=this._computeWork(),this._updateLoading()}_cancelIndexLoading(){this._indexQueue=[],this._indexPagesLoading.forEach(({abortController:e})=>e.abort()),this._indexPagesLoading.clear(),this._totalWork=this._computeWork(),this._updateLoading()}_clearNodeState(){this._nodeLoadEpoch++,this._renderedNodes.forEach(e=>this._removeFromRenderer(e)),this._cancelNodeLoading()}get readyToRun(){return this.suspended?this._updateViewNeeded:this._updateViewNeeded||this._indexQueue.length>0||this._workQueue.length>0||this._idleQueue.readyToRun}runTask(e){if(this.suspended){if(this._updateViewNeeded){this._updateViewNeeded=!1;const e=this._isRootNodeVisible();e!==this._layerIsVisible&&(this._layerIsVisible=e,this.notifyChange("suspended")),this._updateLoading()}}else{for(e.run(()=>this._updateWorkQueues());this._indexQueue.length>0&&e.run(()=>this._processIndexQueue()););this._processWorkQueue(e),this._idleQueue.runTask(e)}}_processIndexQueue(){const e=this._indexQueue.shift(),t=this._loadNodePage(e);return this._indexPagesLoading.set(e,t),t.promise.then(t=>{this._index.addPage(e,t,this._elevationOffset),this._setUpdateViewNeeded()}).then(()=>{this._indexPagesLoading.delete(e)},()=>{this._indexPagesLoading.delete(e)}),!0}_processWorkQueue(e){for(;!e.done;){const t=this._scheduleWorkEntry();if(null==t)return void e.madeProgress();this._processWorkEntry(t),e.madeProgress()}}_scheduleWorkEntry(){let e=this._workQueue.length;for(;e--;){const e=this._workQueue.shift();if(!e.remove.find(e=>!this._renderedNodes.has(e)))return e;this._workQueue.push(e)}return null}_processWorkEntry(e){if(0!==e.load.length)Promise.all(e.load.map(e=>{const t=new AbortController,i=this._memCache.pop(e.toString());return null!=i?this._loadingNodes.set(e,{abortController:t,promise:Promise.resolve(i)}):this._loadingNodes.has(e)||this._loadingNodes.set(e,{abortController:t,promise:this._loadNode(e,t.signal)}),this._loadingNodes.get(e).promise})).then(t=>{for(let i=0;i<e.load.length;i++)if(t[i]){const r=this._setupRendererData(e.load[i],t[i]);this._addToRenderer(r)}for(const i of e.remove)this._removeFromRenderer(i)}).catch(()=>{}).then(()=>{for(const t of e.load)this._loadingNodes.delete(t);this._updateLoading(),this._recalcWork&&!this._idleQueue.updating&&0===this._indexQueue.length&&0===this._loadingNodes.size&&(this._recalcWork=!1,this._setUpdateViewNeeded())}),this._updateLoading();else for(const t of e.remove)this._removeFromRenderer(t)}async _populateClassCodeCodedDomain(e,t){const i="CLASS_CODE",s=this.layer.fieldsIndex.get(i);if(!s||s.domain)return;if(!e.includes(s.name))return;const o=await r(this.layer.queryCachedStatistics(i,{signal:t}));if(!1===o.ok)return;const n=o.value?.stats?.labels?.labels;n&&Array.isArray(n)&&(s.domain=new W({name:"CLASS_CODE",codedValues:n.map(e=>new M({code:e.value,name:e.label}))}))}async prepareFetchPopupFeatures(e){return this._codedDomainPopulationPromise||(this._codedDomainPopulationAbortController=new AbortController,this._codedDomainPopulationPromise=this._populateClassCodeCodedDomain(e,this._codedDomainPopulationAbortController.signal).then(()=>{this._codedDomainPopulationAbortController=null})),this._codedDomainPopulationPromise}async whenGraphicAttributes(e,t){const r=this._splitGraphicsPerNode(e),o=this.layer.attributeStorageInfo,n=t.map(e=>ce(o,e)).filter(i),a=async(e,t)=>{const i=this._index.getNode(t);await s(n,async t=>{const r=t.useElevation?await this._loadElevationAttributeFromGeometry(i.resourceId):await this._loadAndParseAttribute(i,t);if(r)for(const i of e)if(this._isValidPointGraphic(i)){const e=i.pointCloudMetadata.attributePointIndexInNode;this._encodeGraphicAttribute(t,r,e,i.attributes)}})},d=[];return r.forEach((e,t)=>{d.push(a(e,t))}),await Promise.allSettled(d),e}_isValidPointGraphic(e){return e instanceof se&&e.pointCloudMetadata?.epoch===this._nodeLoadEpoch}_splitGraphicsPerNode(e){const t=new Map;for(const i of e){if(!this._isValidPointGraphic(i))continue;const e=i.pointCloudMetadata,r=t.get(e.nodeId);r?r.push(i):t.set(e.nodeId,[i])}return t}async _loadAndParseAttribute(e,t){const i=await this._loadAttribute(e.resourceId,t,null);return i?_e({attributeInfo:t,buffer:i},null,e.vertexCount):null}async _loadElevationAttributeFromGeometry(e){const t=this.layer.store.defaultGeometrySchema,i=me(t,await this._loadGeometry(e,null));return ge(i,i.length/3)}highlight(e,i){const r=fe(e);if(0===r.length)return ye;if(!(r[0]instanceof t))return ye;const s=r;return this._renderer.highlight(s.map(e=>this._graphicToPointDefinition(e)),Se(i))}_graphicToPointDefinition(e){if(!this._isValidPointGraphic(e))return null;const{nodeId:t,pointIndexInNode:i}=e.pointCloudMetadata;return null!=t&&null!=i?{nodeId:t,pointId:i}:null}_computeWork(){let e=0;for(const t of this._workQueue)e+=t.load.length+t.remove.length;return e+=this._loadingNodes.size,e+=(this._indexQueue.length+this._indexPagesLoading.size)*this._index.pageSize,e+=this._loadingInitNodePage?100:0,e+=this._updateViewNeeded?100:0,e}get updatingProgressValue(){if(this.suspended)return this._updateViewNeeded?0:1;const e=this._computeWork();return 1-Math.min(this._totalWork,e)/this._totalWork}_updateLoading(){this.notifyChange("updating"),this.notifyChange("updatingProgressValue")}canResume(){return super.canResume()&&this._layerIsVisible}isUpdating(){return this.suspended?this._updateViewNeeded:this._computeWork()>0}get visibleAtCurrentScale(){return Ie(this.layer.effectiveScaleRange,this.view.scale)}async queryFeatures(e,i){const r=await this._ensureQueryEngine().executeQuery(this._ensureQueryJSON(e),i?.signal),s=r.features;r.features=[];const o=z.fromJSON(r),n=this.view.spatialReference;return o.features=s.map(e=>{const{attributes:i,metadata:r}=e;if(!r){const i=t.fromJSON(e);return i.geometry&&(i.geometry.spatialReference=o.spatialReference??n),i.layer=this.layer,i.sourceLayer=this.layer,i.origin=this._graphicOrigin,i}const s=e.geometry?k.fromJSON(e.geometry):void 0;return s&&(s.spatialReference=o.spatialReference??n),this._createGraphic(r.node,r.pointId,s,i)}),o}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference,returnZ:!0};return new H(e)}async queryFeatureCount(e,t){return await this._ensureQueryEngine().executeQueryForCount(this._ensureQueryJSON(e),t?.signal)}async queryExtent(e,t){const{count:i,extent:r}=await this._ensureQueryEngine().executeQueryForExtent(this._ensureQueryJSON(e),t?.signal);return{count:i,extent:j.fromJSON(r)}}_ensureQueryJSON(e){return null==e?new H({outSpatialReference:this.view.spatialReference}).toJSON():H.from(e).toJSON()}_ensureQueryEngine(){if(this._queryEngine)return this._queryEngine;const{spatialReference:e}=this.view;return this._queryEngine=new q({fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:"esriGeometryPoint",spatialReference:e,featureIdInfo:{type:"object-id",fieldName:"objectId"},hasZ:!0,featureStore:new Z({sourceSpatialReference:e,viewSpatialReference:e,forAllFeatures:(e,t)=>{let i=!1;this._renderer.forEachNode(r=>{if(i)return;if(t){const e=r.obb,s=O(e.center[0],e.center[1],e.center[2],x(e.halfSize));V(s,this.view.renderSpatialReference,s,this.view.spatialReference);const o=t(s);if(2===o)return;if(i=0===o,i)return}let s=this._queryFeaturesCache.get(`${r.id}`);s||(s=this._createQueryPointFeatures(r),this._queryFeaturesCache.put(`${r.id}`,s)),s.features.forEach(e)})},getFeatureExtent:({point:e},t)=>L(e,e,t),featureAdapter:{cloneWithGeometry:(e,t)=>new Fe(e.node,e.pointId,t.coords),getAttribute:({node:e,attributePointId:t},i)=>{for(const r of e.attributes)if(r.attributeInfo.name===i)return this._getGraphicAttribute(r.attributeInfo,r.values,t)},getAttributes:({node:e,attributePointId:t})=>this._createGraphicAttributes(e,t),getCentroid:e=>e.getGeometry(),getGeometry:e=>e.getGeometry(),getObjectId:()=>{},getMetadata:e=>e}})}),this._queryEngine}_createQueryPointFeatures(e){const t=e.coordinates,i=new Array;for(let r=0;r<t.length/3;r++){const s=3*r,o=R(t[s+0],t[s+1],t[s+2]);C(o,o,e.origin),Q(o,this.view.renderSpatialReference,o,this.view.spatialReference);const n=new Fe(e,r,o);i.push(n)}return new Le(i)}_initNodePages(){const e=this.layer.store.index,t=e.nodesPerPage||e.nodePerIndexBlock;return this._index=new re(this.layer.spatialReference,this.view.renderCoordsHelper.spatialReference,t),this._cancelIndexLoading(),this._traverseVisible=this._index.createVisibilityTraverse(),this._loadingInitNodePage=!0,this._layerIsVisible=!0,this.notifyChange("suspended"),this._updateLoading(),this._pageMultiplier=null!=e.nodesPerPage?1:e.nodePerIndexBlock,this._loadNodePage(0).promise.then(e=>{this._index.addPage(0,e,this._elevationOffset),this._loadingInitNodePage=!1,this._setUpdateViewNeeded()})}_loadNodePage(e){const t=new AbortController,i=`${this.baseUrl}/nodepages/${e*this._pageMultiplier}`;return{promise:this._requestNodePage(i,t.signal).then(t=>t.nodes.map((t,i)=>({resourceId:null!=t.resourceId?t.resourceId:e*this._index.pageSize+i,obb:Ne.fromJSON(t.obb),obbInRenderSR:new Ne,firstChild:t.firstChild,childCount:t.childCount,vertexCount:t.vertexCount??t.pointCount,lodThreshold:t.lodThreshold??t.effectiveArea}))),abortController:t}}_updateWorkQueues(){if(!this._updateViewNeeded)return!1;const e=this.view.quality;let t=this.inverseDensity/this._lodFactor*e;const i=this.maximumPointCount*this._lodFactor*e;let r=this._computeNodesForMinimumDensity(t),s=this._computePointCount(r),o=Math.sqrt(s/(.75*i));for(;s>i;)t*=o,r=this._computeNodesForMinimumDensity(t),s=this._computePointCount(r),o=Math.sqrt(2);return this._displayNodes(r),this._updateViewNeeded=!1,this._updateLoading(),!0}_computePointCount(e){let t=0;for(let i=0;i<e.length;i++){const r=this._index.getNode(e[i]);r&&(t+=r.vertexCount)}return t}_isRootNodeVisible(){let e=!1;return this._traverseVisible({frustum:this.view.state.contentCamera.frustum,clippingBox:this._clippingBox},{predicate:(t,i,r)=>(e=r,!1),pageMiss:()=>{}}),e}_computeNodesForMinimumDensity(e){const t=this.view.state.contentCamera,i=t.frustum,r=this._clippingBox,s=t.viewForward,o=S(s,t.eye),n=D(s,-o,ke),a=t.perScreenPixelRatio/2,d=e*e,l=this._nodeIdArray;l.length=0;const u=e=>l.push(e);return this._traverseVisible({frustum:i,clippingBox:r},{predicate:(e,t,i)=>{if(!i)return!1;if(0===t.childCount)return u(e),!1;const r=this._index.getRenderObb(e);return!(this._computeAveragePixelArea(r,t.lodThreshold,t.vertexCount,n,a)<=d)||(u(e),!1)},pageMiss:(e,t)=>{u(e),this._indexQueue.includes(t)||this._indexQueue.push(t)}}),l}_computeAveragePixelArea(e,t,i,r,s){const o=1e-7,n=Math.max(o,e.minimumDistancePlane(r));return t/(n*n)/(4*s*s)/i}_loadNode(e,t){try{return this._loadNodeAsync(e,t)}catch(i){throw c(i)||o.getLogger(this).error(i),i}}async _loadAdditionalUserAttributes(e,t,r){const s=this.layer.outFields;if(!s)return[];const o=G(this.layer.fieldsIndex,s),n=new Set(e.map(e=>null!=e?e.name:null)),a=this.layer.attributeStorageInfo,d=[];for(const i of o){if(n.has(i))continue;const e=ce(a,i);e&&d.push(t(e))}const l=await _(d);return m(r),l.filter(i)}async _loadNodeAsync(e,t){const i=this._index.getNode(e),r=ue(this.layer),s=he(this.layer),o=i.resourceId,n=async e=>{if(!e)return null;if(e.useElevation)return{attributeInfo:e,buffer:null};const i=await this._loadAttribute(o,e,t);return null!=i?{attributeInfo:e,buffer:i}:null};return this._idleQueue.push(async()=>{const i=this._loadGeometry(o,t),{primaryAttribute:a,modulationAttribute:d}=r,l=n(a),u=n(d),h=s.map(e=>e.attributeInfo),p=h.map(e=>n(e)),c=this._loadAdditionalUserAttributes([a,d,...h],n,t),[_,g,f,y,b]=await Promise.all([i,l,u,Promise.all(p),c]);m(t);const w={geometryBuffer:_,primaryAttributeData:g,modulationAttributeData:f,filterAttributesData:y,userAttributesData:b,schema:this.layer.store.defaultGeometrySchema,rendererInfo:r,filterInfo:s,obbData:this._index.getRenderObb(e).data,elevationOffset:this._elevationOffset,inSR:this.layer.spatialReference.toJSON(),outSR:this.view.renderCoordsHelper.spatialReference.toJSON()};return this._worker.invoke(w,t)},t)}async _loadGeometry(e,t){return this._requestData(`${this.baseUrl}/nodes/${e}/geometries/0`,t)}async _loadAttribute(e,t,i){if(!t?.storageInfo)return null;const r=t.storageInfo.key;return this._requestData(`${this.baseUrl}/nodes/${e}/attributes/${r}`,i)}_requestNodePage(e,t){const i={f:"json",...this.layer.customParameters,token:this.layer.apiKey};return this._indexRequester.request(e,0,{query:i,signal:t})}_requestData(e,t){return this._dataRequester.request(e,1,{query:{...this.layer.customParameters,token:this.layer.apiKey},signal:t})}_removeFromRenderer(e){if(this._renderedNodes.has(e)){const t=this._renderer.removeNode(e);this._renderedNodes.delete(e),this._memCache.put(t.id.toString(),t)}}_addToRenderer(e){this._renderedNodes.has(e.id)||(this._renderedNodes.add(e.id),this._renderer.addNode(e))}_setupRendererData(e,t){const i=this._index.getNode(e),r=Math.sqrt(i.lodThreshold/i.vertexCount),s=this._index.getRenderObb(e);if(ne(t))return t.splatSize=r,t.obb=s,I(t.origin,t.obb.center),t;const n=Ne.fromData(t.obbData),a=n.halfSize,d=s.halfSize,l=.01*Math.max(d[0],d[1],d[2]);if(a[0]>d[0]+l||a[1]>d[1]+l||a[2]>d[2]+l){if(this._maxLoggedBoxWarnings>0){const t=e=>`[${e.halfSize[0]}, ${e.halfSize[1]}, ${e.halfSize[2]}]`;o.getLogger(this).warn(`Node ${e} reported bounding box too small. got ${t(s)} but points cover ${t(n)}`),0===--this._maxLoggedBoxWarnings&&o.getLogger(this).warn(" Too many bounding box errors, stopping reporting for this layer.")}this._index.setRenderObb(e,n)}return new ae(e,r,A(s.center),s,0===i.childCount,t.points,t.rgb,t.attributes,t.pointIdFilterMap)}get usedMemory(){let e=0;return this._renderer.forEachNode(t=>{e+=De,e+=d(t.coordinates);for(const i of t.attributes){const t=i.values;P(t.buffer)&&(e+=d(t))}}),e}get unloadedMemory(){const e=this._renderedNodes.size;if(e<4)return 0;const t=[...this._renderedNodes].reduce((e,t)=>e+this._index.getNode(t).vertexCount);let i=this._loadingNodes.size;for(let r=0;r<this._workQueue.length;r++)i+=this._workQueue[r].load.length,i-=this._workQueue[r].remove.length;if(i<0)return 0;return i*t/e*((this.usedMemory-e*De)/t)+i*De}get performanceInfo(){return new $(this.usedMemory,this._renderedNodes.size,[...this._renderedNodes].reduce((e,t)=>e+this._index.getNode(t).vertexCount,0),this.maximumPointCount,new J(this._loadingNodes.size,this._indexQueue.length,this._workQueue.length,this._idleQueue.length))}get test(){}};e([N()],Ve.prototype,"layer",void 0),e([N()],Ve.prototype,"baseUrl",null),e([N()],Ve.prototype,"pointScale",null),e([N()],Ve.prototype,"useRealWorldSymbolSizes",null),e([N()],Ve.prototype,"pointSize",null),e([N()],Ve.prototype,"inverseDensity",null),e([N()],Ve.prototype,"maximumPointCount",void 0),e([N({readOnly:!0})],Ve.prototype,"availableFields",null),e([N({readOnly:!0})],Ve.prototype,"_clippingBox",null),e([N({readOnly:!0})],Ve.prototype,"_elevationOffset",null),e([N({type:Boolean})],Ve.prototype,"slicePlaneEnabled",void 0),e([N()],Ve.prototype,"_graphicOrigin",null),e([N()],Ve.prototype,"updating",void 0),e([N(ve)],Ve.prototype,"updatingProgress",void 0),e([N({readOnly:!0})],Ve.prototype,"updatingProgressValue",null),e([N({readOnly:!0})],Ve.prototype,"visibleAtCurrentScale",null),Ve=e([v("esri.views.3d.layers.PointCloudLayerView3D")],Ve);const Qe=Ve;class Fe{constructor(e,t,i){this.node=e,this.pointId=t,this.point=i}getGeometry(){return new U([1],Array.from(this.point))}get attributePointId(){const{node:e,pointId:t}=this;return null!=e.pointIdFilterMap?e.pointIdFilterMap[t]:t}get usedMemory(){return l+l+u+h(this.point,u)}}class Le{constructor(e){this.features=e}get usedMemory(){return this.features.reduce((e,t)=>e+t.usedMemory,l+p)}}const De=160;function Ee(e){return t=>e.immediate.schedule(t)}export{Qe as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import{isSome as i}from"../../../core/arrayUtils.js";import{result as r,forEach as s}from"../../../core/asyncUtils.js";import"../../../core/has.js";import o from"../../../core/Logger.js";import{destroyMaybe as n,abortMaybe as a}from"../../../core/maybe.js";import{estimateNumberArrayMemory as d,baseObjectMemory as l,estimateNumberMemory as u,estimateFixedArrayMemory as h,baseArrayMemory as p}from"../../../core/memoryEstimations.js";import{isAbortError as c,allSettledValues as _,throwIfAborted as m}from"../../../core/promiseUtils.js";import{initial as g,watch as f,sync as y,syncAndInitial as b}from"../../../core/reactiveUtils.js";import{pt2px as w}from"../../../core/screenUtils.js";import{isArrayBuffer as P}from"../../../core/typedArrayUtil.js";import{property as N}from"../../../core/accessorSupport/decorators/property.js";import{subclass as v}from"../../../core/accessorSupport/decorators/subclass.js";import{b as x,g as C,f as S,d as I}from"../../../chunks/vec32.js";import{clone as A}from"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{fromValues as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import j from"../../../geometry/Extent.js";import k from"../../../geometry/Point.js";import{projectBoundingSphere as V}from"../../../geometry/projection/projectBoundingSphere.js";import{projectVectorToVector as Q}from"../../../geometry/projection/projectVectorToVector.js";import{create as F,fromMinMax as L}from"../../../geometry/support/aaBoundingBox.js";import{fromNormalAndOffset as D,create as E}from"../../../geometry/support/plane.js";import{f as O}from"../../../chunks/sphere.js";import U from"../../../layers/graphics/OptimizedGeometry.js";import{QueryEngine as q}from"../../../layers/graphics/data/QueryEngine.js";import{CodedValue as M}from"../../../layers/support/CodedValue.js";import W from"../../../layers/support/CodedValueDomain.js";import"../../../layers/support/Domain.js";import"../../../layers/support/InheritedDomain.js";import"../../../layers/support/RangeDomain.js";import{unpackFieldNames as G}from"../../../layers/support/fieldUtils.js";import z from"../../../rest/support/FeatureSet.js";import H from"../../../rest/support/Query.js";import{getElevationOffset as B}from"../../../support/elevationInfoUtils.js";import{LayerView3D as T}from"./LayerView3D.js";import{PointCloudLayerViewPerformanceInfo as $,QueuePerformanceInfo as J}from"./PointCloudLayerViewPerformanceInfo.js";import{PointCloudWorkerHandle as K}from"./PointCloudWorkerHandle.js";import{I3SQueryFeatureStore as Z}from"./i3s/I3SQueryFeatureStore.js";import{checkPointCloudLayerValid as Y,checkPointCloudLayerCompatibleWithView as X}from"./i3s/I3SUtil.js";import{nodeDiff as ee,sortFrontToBack as te,splitWorkEntries as ie}from"./i3s/LoDUtil.js";import{PagedNodeIndex as re}from"./i3s/PagedNodeIndex.js";import{PointCloudGraphic as se}from"./i3s/PointCloudGraphic.js";import{PointCloudRenderer as oe}from"./i3s/PointCloudRenderer.js";import{isPointRendererNode as ne,PointCloudRendererNode as ae}from"./i3s/PointCloudRendererNode.js";import{getSplatSizeAlgorithm as de,getFixedSizeAlgorithm as le,getRendererInfo as ue,getFilterInfo as he,rendererUsesFixedSizes as pe,getAttributeInfo as ce}from"./i3s/PointCloudRendererUtil.js";import{getAttributeValues as _e,readGeometry as me,elevationFromPositions as ge}from"./i3s/PointCloudWorkerUtil.js";import{normalizeHighlightTarget as fe,emptyHighlightHandle as ye}from"./support/highlightUtils.js";import{PopupSceneLayerView as be}from"./support/PopupSceneLayerView.js";import{projectToBoundingBox as we}from"../support/extentUtils.js";import{computeMapPointFromVec3d as Pe}from"../support/hitTest.js";import{Obb as Ne}from"../support/orientedBoundingBox.js";import{updatingProgress as ve}from"../support/updatingProperties.js";import xe from"../../layers/LayerView.js";import{PointCloudLayerView as Ce}from"../../layers/PointCloudLayerView.js";import{getHighlightName as Se}from"../../support/highlightOptionsUtils.js";import{isInEffectiveScaleRange as Ie}from"../../support/layerViewUtils.js";import{PromiseQueue as Ae}from"../../support/PromiseQueue.js";import{TaskPriority as Re}from"../../support/Scheduler.js";const je=8,ke=E();let Ve=class extends(Ce(be(T(xe)))){constructor(){super(...arguments),this.type="point-cloud-3d",this.maximumPointCount=4e6,this.slicePlaneEnabled=!1,this._renderer=null,this._rendererAdded=!1,this._renderedNodes=new Set,this._updateViewNeeded=!0,this._lodFactor=1,this._maxLoggedBoxWarnings=5,this._pageMultiplier=1,this._nodeLoadEpoch=0,this._indexQueue=[],this._workQueue=new Array,this._idleQueue=new Ae,this._indexPagesLoading=new Map,this._loadingNodes=new Map,this._recalcWork=!0,this._layerIsVisible=!1,this._codedDomainPopulationPromise=null,this._codedDomainPopulationAbortController=null,this._totalWork=0,this._index=null,this._loadingInitNodePage=!1,this._nodeIdArray=[],this.ignoresMemoryFactor=!1}get baseUrl(){return this.layer.parsedUrl?.path??""}get pointScale(){const e=de(this.layer?.renderer),t=1;return null!=e?.scaleFactor?e.scaleFactor:t}get useRealWorldSymbolSizes(){const e=le(this.layer?.renderer),t=!1;return null!=e?.useRealWorldSymbolSizes?e.useRealWorldSymbolSizes:t}get pointSize(){const e=le(this.layer?.renderer),t=0;return null!=e?.size?e.size:t}get inverseDensity(){const e=96;return this.layer?.renderer?1*e/this.layer.renderer.pointsPerInch:5}get availableFields(){const e=ue(this.layer),t=new Set;e.primaryAttribute&&t.add(e.primaryAttribute.name),e.modulationAttribute&&t.add(e.modulationAttribute.name);const i=he(this.layer);if(i)for(const r of i)r.attributeInfo&&t.add(r.attributeInfo.name);if(this.layer.outFields)for(const r of G(this.layer.fieldsIndex,this.layer.outFields))t.add(r);return Array.from(t)}get _clippingBox(){if(!this.view||!this.view.clippingArea)return null;const e=F(),t=this.view.renderSpatialReference;return we(this.view.clippingArea,e,t)?e:null}get _elevationOffset(){const e=this.layer&&this.layer.elevationInfo;return e&&"absolute-height"===e.mode?B(e,this.layer.spatialReference):0}get _graphicOrigin(){return this.layer.graphicOrigin}initialize(){const e=this.view.resourceController,t=Ee(e);this._worker=new K(t),this.addResolvingPromise(this._worker.promise),Y(this.layer),X(this.layer,this.view),this._indexRequester=e.createStreamDataRequester(2),this._dataRequester=e.createStreamDataRequester(3),this._initRenderer();const i=this._initNodePages(),r=this.view.resourceController.memoryController;this._memCache=r.newCache(`pcl-${this.layer.uid}`),this._queryFeaturesCache=r.newCache(`pcl-query-features-${this.layer.uid};`),this._updatingHandles.add(()=>this._clippingBox,()=>this._setUpdateViewNeeded(),g),this._updatingHandles.add(()=>this._elevationOffset,()=>this._elevationOffsetChanged(),g),this._updatingHandles.add(()=>this.layer.renderer,()=>this._rendererChanged(),g),this._updatingHandles.add(()=>this.layer.filters,()=>this._reload(),g),this._updatingHandles.add(()=>this.layer.outFields,()=>this._reload(),g),this._updatingHandles.add(()=>this.layer.effectiveScaleRange,()=>this._setUpdateViewNeeded()),this._updatingHandles.add(()=>this.view.state.contentCamera,()=>this._setUpdateViewNeeded()),this.addHandles([f(()=>this.view.quality,()=>this._setUpdateViewNeeded(),y)]),this.addResolvingPromise(i),this.when(()=>{this.addHandles([e.scheduler.registerTask(Re.POINT_CLOUD_LAYER,this),f(()=>2===this.view.state.mode,()=>this._setUpdateViewNeeded(),b),this._updatingHandles.add(()=>this.suspended,e=>{e?this._clearNodeState():this._setUpdateViewNeeded()},g)])},()=>{this._updatingHandles.removeAll(),this.removeAllHandles()})}_setUpdateViewNeeded(){this._updateViewNeeded=!0,this._updateLoading()}destroy(){this.cancelLoading(),this._worker=n(this._worker),this._destroyRenderer(),this._memCache=n(this._memCache),this._queryFeaturesCache=n(this._queryFeaturesCache),this._queryEngine=n(this._queryEngine),this._codedDomainPopulationAbortController=a(this._codedDomainPopulationAbortController),this._codedDomainPopulationPromise=null}_initRenderer(){this._renderer=new oe({createGraphic:(e,t,i)=>this._createGraphic(e,t,i)}),this._renderer.layerViewUid=this.uid,this._updatingHandles.add(()=>this._clippingBox,e=>this._renderer.clippingBox=e,g),this._updatingHandles.add(()=>this.suspended,e=>this._setPointsVisible(!e),g),this._updatingHandles.add(()=>this.pointScale,e=>this._renderer.scaleFactor=e,g),this._renderer.minSizePx=Math.sqrt(2),this._updatingHandles.add(()=>this.useRealWorldSymbolSizes,e=>this._renderer.useRealWorldSymbolSizes=e,g),this._updatingHandles.add(()=>this.pointSize,e=>{const t=w(e);this._renderer.size=e,this._renderer.sizePx=t},g),this._updatingHandles.add(()=>this.slicePlaneEnabled,e=>this._renderer.slicePlaneEnabled=e,g),this._updatingHandles.add(()=>this.inverseDensity,()=>this._setUpdateViewNeeded(),g),this._updatingHandles.add(()=>this.maximumPointCount,()=>this._setUpdateViewNeeded(),g),this._updatingHandles.add(()=>this.view.qualitySettings.sceneService.pointCloud.lodFactor,e=>{this._lodFactor=e,this._setUpdateViewNeeded()},g)}_destroyRenderer(){this._renderer.removeAll(),this._setPointsVisible(!1)}_createGraphic(e,t,i,r){const s=null!=e.pointIdFilterMap?e.pointIdFilterMap[t]:t,o=i?"declaredClass"in i?i:Pe(this.view,i):null;return r??=this._createGraphicAttributes(e,s),new se({pointCloudMetadata:{nodeId:e.id,pointIndexInNode:t,attributePointIndexInNode:s,epoch:this._nodeLoadEpoch},geometry:o,attributes:r,layer:this.layer,sourceLayer:this.layer,origin:this._graphicOrigin})}_createGraphicAttributes(e,t){const i={};for(const r of e.attributes)this._encodeGraphicAttribute(r.attributeInfo,r.values,t,i);return i}_getGraphicAttribute(e,t,i){const r=e.storageInfo?.attributeValues,s=r?.valuesPerElement??1;if(1===s)return t[i];if("UInt8"===r?.valueType&&s<=4){let e=0;const r=i*s;for(let i=r;i<r+s;i++)e=(e<<8)+t[i];return e}}_encodeGraphicAttribute(e,t,i,r){r[e.name]=this._getGraphicAttribute(e,t,i)}_setPointsVisible(e){e&&!this._rendererAdded?(this.view.stage.addRenderPlugin(this._renderer),this._rendererAdded=!0):!e&&this._rendererAdded&&(this.view.stage.removeRenderPlugin(this._renderer),this._rendererAdded=!1)}_rendererChanged(){this._renderer.useFixedSizes=pe(this.layer.renderer),this._reload()}_reload(){this._clearNodeState(),this._memCache.clear(),this._setUpdateViewNeeded()}_elevationOffsetChanged(){this._clearNodeState(),this._memCache.clear(),this._initNodePages()}_displayNodes(e){this._workQueue=ee([...this._renderedNodes],e,this._index),te(this._workQueue,this.view.state.contentCamera.viewForward,this._index),ie(this._workQueue,je,this._index),this._updateQueues(),this._totalWork=this._computeWork(),this._updateLoading(),this._layerIsVisible=e.length>0||this._loadingInitNodePage,this.notifyChange("suspended")}cancelLoading(){this._cancelNodeLoading(),this._cancelIndexLoading()}_cancelNodeLoading(){const e=new Array;this._loadingNodes.forEach(({abortController:t})=>e.push(t)),this._loadingNodes.clear();for(const t of e)t.abort();this._workQueue=[],this._idleQueue.cancelAll(),this._totalWork=this._computeWork(),this._updateLoading()}_updateQueues(){const e=new Set;this._workQueue.forEach(t=>t.load.forEach(t=>e.add(t)));const t=new Array,i=new Map;this._loadingNodes.forEach((r,s)=>{e.has(s)?i.set(s,r):t.push(r)}),this._loadingNodes=i;for(const{abortController:r}of t)r.abort();this._workQueue=this._workQueue.filter(e=>{for(const t of e.load)if(this._loadingNodes.has(t))return this._recalcWork=!0,!1;return!0}),this._totalWork=this._computeWork(),this._updateLoading()}_cancelIndexLoading(){this._indexQueue=[],this._indexPagesLoading.forEach(({abortController:e})=>e.abort()),this._indexPagesLoading.clear(),this._totalWork=this._computeWork(),this._updateLoading()}_clearNodeState(){this._nodeLoadEpoch++,this._renderedNodes.forEach(e=>this._removeFromRenderer(e)),this._cancelNodeLoading()}get readyToRun(){return this.suspended?this._updateViewNeeded:this._updateViewNeeded||this._indexQueue.length>0||this._workQueue.length>0||this._idleQueue.readyToRun}runTask(e){if(this.suspended){if(this._updateViewNeeded){this._updateViewNeeded=!1;const e=this._isRootNodeVisible();e!==this._layerIsVisible&&(this._layerIsVisible=e,this.notifyChange("suspended")),this._updateLoading()}}else{for(e.run(()=>this._updateWorkQueues());this._indexQueue.length>0&&e.run(()=>this._processIndexQueue()););this._processWorkQueue(e),this._idleQueue.runTask(e)}}_processIndexQueue(){const e=this._indexQueue.shift(),t=this._loadNodePage(e);return this._indexPagesLoading.set(e,t),t.promise.then(t=>{this._index.addPage(e,t,this._elevationOffset),this._setUpdateViewNeeded()}).then(()=>{this._indexPagesLoading.delete(e)},()=>{this._indexPagesLoading.delete(e)}),!0}_processWorkQueue(e){for(;!e.done;){const t=this._scheduleWorkEntry();if(null==t)return void e.madeProgress();this._processWorkEntry(t),e.madeProgress()}}_scheduleWorkEntry(){let e=this._workQueue.length;for(;e--;){const e=this._workQueue.shift();if(!e.remove.find(e=>!this._renderedNodes.has(e)))return e;this._workQueue.push(e)}return null}_processWorkEntry(e){if(0!==e.load.length)Promise.all(e.load.map(e=>{const t=new AbortController,i=this._memCache.pop(e.toString());return null!=i?this._loadingNodes.set(e,{abortController:t,promise:Promise.resolve(i)}):this._loadingNodes.has(e)||this._loadingNodes.set(e,{abortController:t,promise:this._loadNode(e,t.signal)}),this._loadingNodes.get(e).promise})).then(t=>{for(let i=0;i<e.load.length;i++)if(t[i]){const r=this._setupRendererData(e.load[i],t[i]);this._addToRenderer(r)}for(const i of e.remove)this._removeFromRenderer(i)}).catch(()=>{}).then(()=>{for(const t of e.load)this._loadingNodes.delete(t);this._updateLoading(),this._recalcWork&&!this._idleQueue.updating&&0===this._indexQueue.length&&0===this._loadingNodes.size&&(this._recalcWork=!1,this._setUpdateViewNeeded())}),this._updateLoading();else for(const t of e.remove)this._removeFromRenderer(t)}async _populateClassCodeCodedDomain(e,t){const i="CLASS_CODE",s=this.layer.fieldsIndex.get(i);if(!s||s.domain)return;if(!e.includes(s.name))return;const o=await r(this.layer.queryCachedStatistics(i,{signal:t}));if(!1===o.ok)return;const n=o.value?.stats?.labels?.labels;n&&Array.isArray(n)&&(s.domain=new W({name:"CLASS_CODE",codedValues:n.map(e=>new M({code:e.value,name:e.label}))}))}async prepareFetchPopupFeatures(e){return this._codedDomainPopulationPromise||(this._codedDomainPopulationAbortController=new AbortController,this._codedDomainPopulationPromise=this._populateClassCodeCodedDomain(e,this._codedDomainPopulationAbortController.signal).then(()=>{this._codedDomainPopulationAbortController=null})),this._codedDomainPopulationPromise}async whenGraphicAttributes(e,t){const r=this._splitGraphicsPerNode(e),o=this.layer.attributeStorageInfo,n=t.map(e=>ce(o,e)).filter(i),a=async(e,t)=>{const i=this._index.getNode(t);await s(n,async t=>{const r=t.useElevation?await this._loadElevationAttributeFromGeometry(i.resourceId):await this._loadAndParseAttribute(i,t);if(r)for(const i of e)if(this._isValidPointGraphic(i)){const e=i.pointCloudMetadata.attributePointIndexInNode;this._encodeGraphicAttribute(t,r,e,i.attributes)}})},d=[];return r.forEach((e,t)=>{d.push(a(e,t))}),await Promise.allSettled(d),e}_isValidPointGraphic(e){return e instanceof se&&e.pointCloudMetadata?.epoch===this._nodeLoadEpoch}_splitGraphicsPerNode(e){const t=new Map;for(const i of e){if(!this._isValidPointGraphic(i))continue;const e=i.pointCloudMetadata,r=t.get(e.nodeId);r?r.push(i):t.set(e.nodeId,[i])}return t}async _loadAndParseAttribute(e,t){const i=await this._loadAttribute(e.resourceId,t,null);return i?_e({attributeInfo:t,buffer:i},null,e.vertexCount):null}async _loadElevationAttributeFromGeometry(e){const t=this.layer.store.defaultGeometrySchema,i=me(t,await this._loadGeometry(e,null));return ge(i,i.length/3)}highlight(e,i){const r=fe(e);if(0===r.length)return ye;if(!(r[0]instanceof t))return ye;const s=r;return this._renderer.highlight(s.map(e=>this._graphicToPointDefinition(e)),Se(i))}_graphicToPointDefinition(e){if(!this._isValidPointGraphic(e))return null;const{nodeId:t,pointIndexInNode:i}=e.pointCloudMetadata;return null!=t&&null!=i?{nodeId:t,pointId:i}:null}_computeWork(){let e=0;for(const t of this._workQueue)e+=t.load.length+t.remove.length;return e+=this._loadingNodes.size,e+=(this._indexQueue.length+this._indexPagesLoading.size)*this._index.pageSize,e+=this._loadingInitNodePage?100:0,e+=this._updateViewNeeded?100:0,e}get updatingProgressValue(){if(this.suspended)return this._updateViewNeeded?0:1;const e=this._computeWork();return 1-Math.min(this._totalWork,e)/this._totalWork}_updateLoading(){this.notifyChange("updating"),this.notifyChange("updatingProgressValue")}canResume(){return super.canResume()&&this._layerIsVisible}isUpdating(){return this.suspended?this._updateViewNeeded:this._computeWork()>0}get visibleAtCurrentScale(){return Ie(this.layer.effectiveScaleRange,this.view.scale)}async queryFeatures(e,i){const r=await this._ensureQueryEngine().executeQuery(this._ensureQueryJSON(e),i?.signal),s=r.features;r.features=[];const o=z.fromJSON(r),n=this.view.spatialReference;return o.features=s.map(e=>{const{attributes:i,metadata:r}=e;if(!r){const i=t.fromJSON(e);return i.geometry&&(i.geometry.spatialReference=o.spatialReference??n),i.layer=this.layer,i.sourceLayer=this.layer,i.origin=this._graphicOrigin,i}const s=e.geometry?k.fromJSON(e.geometry):void 0;return s&&(s.spatialReference=o.spatialReference??n),this._createGraphic(r.node,r.pointId,s,i)}),o}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference,returnZ:!0};return new H(e)}async queryFeatureCount(e,t){return await this._ensureQueryEngine().executeQueryForCount(this._ensureQueryJSON(e),t?.signal)}async queryExtent(e,t){const{count:i,extent:r}=await this._ensureQueryEngine().executeQueryForExtent(this._ensureQueryJSON(e),t?.signal);return{count:i,extent:j.fromJSON(r)}}_ensureQueryJSON(e){return null==e?new H({outSpatialReference:this.view.spatialReference}).toJSON():H.from(e).toJSON()}_ensureQueryEngine(){if(this._queryEngine)return this._queryEngine;const{spatialReference:e}=this.view;return this._queryEngine=new q({fieldsIndex:this.layer.fieldsIndex.toJSON(),geometryType:"esriGeometryPoint",spatialReference:e,featureIdInfo:{type:"object-id",fieldName:"objectId"},hasZ:!0,featureStore:new Z({sourceSpatialReference:e,viewSpatialReference:e,forAllFeatures:(e,t)=>{let i=!1;this._renderer.forEachNode(r=>{if(i)return;if(t){const e=r.obb,s=O(e.center[0],e.center[1],e.center[2],x(e.halfSize));V(s,this.view.renderSpatialReference,s,this.view.spatialReference);const o=t(s);if(2===o)return;if(i=0===o,i)return}let s=this._queryFeaturesCache.get(`${r.id}`);s||(s=this._createQueryPointFeatures(r),this._queryFeaturesCache.put(`${r.id}`,s)),s.features.forEach(e)})},getFeatureExtent:({point:e},t)=>L(e,e,t),featureAdapter:{cloneWithGeometry:(e,t)=>new Fe(e.node,e.pointId,t.coords),getAttribute:({node:e,attributePointId:t},i)=>{for(const r of e.attributes)if(r.attributeInfo.name===i)return this._getGraphicAttribute(r.attributeInfo,r.values,t)},getAttributes:({node:e,attributePointId:t})=>this._createGraphicAttributes(e,t),getCentroid:e=>e.getGeometry(),getGeometry:e=>e.getGeometry(),getObjectId:()=>{},getMetadata:e=>e}})}),this._queryEngine}_createQueryPointFeatures(e){const t=e.coordinates,i=new Array;for(let r=0;r<t.length/3;r++){const s=3*r,o=R(t[s+0],t[s+1],t[s+2]);C(o,o,e.origin),Q(o,this.view.renderSpatialReference,o,this.view.spatialReference);const n=new Fe(e,r,o);i.push(n)}return new Le(i)}_initNodePages(){const e=this.layer.store.index,t=e.nodesPerPage||e.nodePerIndexBlock;return this._index=new re(this.layer.spatialReference,this.view.renderCoordsHelper.spatialReference,t),this._cancelIndexLoading(),this._traverseVisible=this._index.createVisibilityTraverse(),this._loadingInitNodePage=!0,this._layerIsVisible=!0,this.notifyChange("suspended"),this._updateLoading(),this._pageMultiplier=null!=e.nodesPerPage?1:e.nodePerIndexBlock,this._loadNodePage(0).promise.then(e=>{this._index.addPage(0,e,this._elevationOffset),this._loadingInitNodePage=!1,this._setUpdateViewNeeded()})}_loadNodePage(e){const t=new AbortController,i=`${this.baseUrl}/nodepages/${e*this._pageMultiplier}`;return{promise:this._requestNodePage(i,t.signal).then(t=>t.nodes.map((t,i)=>({resourceId:null!=t.resourceId?t.resourceId:e*this._index.pageSize+i,obb:Ne.fromJSON(t.obb),obbInRenderSR:new Ne,firstChild:t.firstChild,childCount:t.childCount,vertexCount:t.vertexCount??t.pointCount,lodThreshold:t.lodThreshold??t.effectiveArea}))),abortController:t}}_updateWorkQueues(){if(!this._updateViewNeeded)return!1;const e=this.view.quality;let t=this.inverseDensity/this._lodFactor*e;const i=this.maximumPointCount*this._lodFactor*e;let r=this._computeNodesForMinimumDensity(t),s=this._computePointCount(r),o=Math.sqrt(s/(.75*i));for(;s>i;)t*=o,r=this._computeNodesForMinimumDensity(t),s=this._computePointCount(r),o=Math.sqrt(2);return this._displayNodes(r),this._updateViewNeeded=!1,this._updateLoading(),!0}_computePointCount(e){let t=0;for(let i=0;i<e.length;i++){const r=this._index.getNode(e[i]);r&&(t+=r.vertexCount)}return t}_isRootNodeVisible(){let e=!1;return this._traverseVisible({frustum:this.view.state.contentCamera.frustum,clippingBox:this._clippingBox},{predicate:(t,i,r)=>(e=r,!1),pageMiss:()=>{}}),e}_computeNodesForMinimumDensity(e){const t=this.view.state.contentCamera,i=t.frustum,r=this._clippingBox,s=t.viewForward,o=S(s,t.eye),n=D(s,-o,ke),a=t.perScreenPixelRatio/2,d=e*e,l=this._nodeIdArray;l.length=0;const u=e=>l.push(e);return this._traverseVisible({frustum:i,clippingBox:r},{predicate:(e,t,i)=>{if(!i)return!1;if(0===t.childCount)return u(e),!1;const r=this._index.getRenderObb(e);return!(this._computeAveragePixelArea(r,t.lodThreshold,t.vertexCount,n,a)<=d)||(u(e),!1)},pageMiss:(e,t)=>{u(e),this._indexQueue.includes(t)||this._indexQueue.push(t)}}),l}_computeAveragePixelArea(e,t,i,r,s){const o=1e-7,n=Math.max(o,e.minimumDistancePlane(r));return t/(n*n)/(4*s*s)/i}_loadNode(e,t){try{return this._loadNodeAsync(e,t)}catch(i){throw c(i)||o.getLogger(this).error(i),i}}async _loadAdditionalUserAttributes(e,t,r){const s=this.layer.outFields;if(!s)return[];const o=G(this.layer.fieldsIndex,s),n=new Set(e.map(e=>null!=e?e.name:null)),a=this.layer.attributeStorageInfo,d=[];for(const i of o){if(n.has(i))continue;const e=ce(a,i);e&&d.push(t(e))}const l=await _(d);return m(r),l.filter(i)}async _loadNodeAsync(e,t){const i=this._index.getNode(e),r=ue(this.layer),s=he(this.layer),o=i.resourceId,n=async e=>{if(!e)return null;if(e.useElevation)return{attributeInfo:e,buffer:null};const i=await this._loadAttribute(o,e,t);return null!=i?{attributeInfo:e,buffer:i}:null};return this._idleQueue.push(async()=>{const i=this._loadGeometry(o,t),{primaryAttribute:a,modulationAttribute:d}=r,l=n(a),u=n(d),h=s.map(e=>e.attributeInfo),p=h.map(e=>n(e)),c=this._loadAdditionalUserAttributes([a,d,...h],n,t),[_,g,f,y,b]=await Promise.all([i,l,u,Promise.all(p),c]);m(t);const w={geometryBuffer:_,primaryAttributeData:g,modulationAttributeData:f,filterAttributesData:y,userAttributesData:b,schema:this.layer.store.defaultGeometrySchema,rendererInfo:r,filterInfo:s,obbData:this._index.getRenderObb(e).data,elevationOffset:this._elevationOffset,inSR:this.layer.spatialReference.toJSON(),outSR:this.view.renderCoordsHelper.spatialReference.toJSON()};return this._worker.invoke(w,t)},t)}async _loadGeometry(e,t){return this._requestData(`${this.baseUrl}/nodes/${e}/geometries/0`,t)}async _loadAttribute(e,t,i){if(!t?.storageInfo)return null;const r=t.storageInfo.key;return this._requestData(`${this.baseUrl}/nodes/${e}/attributes/${r}`,i)}_requestNodePage(e,t){const i={f:"json",...this.layer.customParameters,token:this.layer.apiKey};return this._indexRequester.request(e,0,{query:i,signal:t})}_requestData(e,t){return this._dataRequester.request(e,1,{query:{...this.layer.customParameters,token:this.layer.apiKey},signal:t})}_removeFromRenderer(e){if(this._renderedNodes.has(e)){const t=this._renderer.removeNode(e);this._renderedNodes.delete(e),this._memCache.put(t.id.toString(),t)}}_addToRenderer(e){this._renderedNodes.has(e.id)||(this._renderedNodes.add(e.id),this._renderer.addNode(e))}_setupRendererData(e,t){const i=this._index.getNode(e),r=Math.sqrt(i.lodThreshold/i.vertexCount),s=this._index.getRenderObb(e);if(ne(t))return t.splatSize=r,t.obb=s,I(t.origin,t.obb.center),t;const n=Ne.fromData(t.obbData),a=n.halfSize,d=s.halfSize,l=.01*Math.max(d[0],d[1],d[2]);if(a[0]>d[0]+l||a[1]>d[1]+l||a[2]>d[2]+l){if(this._maxLoggedBoxWarnings>0){const t=e=>`[${e.halfSize[0]}, ${e.halfSize[1]}, ${e.halfSize[2]}]`;o.getLogger(this).warn(`Node ${e} reported bounding box too small. got ${t(s)} but points cover ${t(n)}`),0===--this._maxLoggedBoxWarnings&&o.getLogger(this).warn(" Too many bounding box errors, stopping reporting for this layer.")}this._index.setRenderObb(e,n)}return new ae(e,r,A(s.center),s,0===i.childCount,t.points,t.rgb,t.attributes,t.pointIdFilterMap)}get usedMemory(){let e=0;return this._renderer.forEachNode(t=>{e+=De,e+=d(t.coordinates);for(const i of t.attributes){const t=i.values;P(t.buffer)&&(e+=d(t))}}),e}get unloadedMemory(){const e=this._renderedNodes.size;if(e<4)return 0;const t=[...this._renderedNodes].reduce((e,t)=>e+this._index.getNode(t).vertexCount);let i=this._loadingNodes.size;for(let r=0;r<this._workQueue.length;r++)i+=this._workQueue[r].load.length,i-=this._workQueue[r].remove.length;if(i<0)return 0;return i*t/e*((this.usedMemory-e*De)/t)+i*De}get performanceInfo(){return new $(this.usedMemory,this._renderedNodes.size,[...this._renderedNodes].reduce((e,t)=>e+this._index.getNode(t).vertexCount,0),this.maximumPointCount,new J(this._loadingNodes.size,this._indexQueue.length,this._workQueue.length,this._idleQueue.length))}get test(){}};e([N()],Ve.prototype,"layer",void 0),e([N()],Ve.prototype,"baseUrl",null),e([N()],Ve.prototype,"pointScale",null),e([N()],Ve.prototype,"useRealWorldSymbolSizes",null),e([N()],Ve.prototype,"pointSize",null),e([N()],Ve.prototype,"inverseDensity",null),e([N()],Ve.prototype,"maximumPointCount",void 0),e([N({readOnly:!0})],Ve.prototype,"availableFields",null),e([N({readOnly:!0})],Ve.prototype,"_clippingBox",null),e([N({readOnly:!0})],Ve.prototype,"_elevationOffset",null),e([N({type:Boolean})],Ve.prototype,"slicePlaneEnabled",void 0),e([N()],Ve.prototype,"_graphicOrigin",null),e([N()],Ve.prototype,"updating",void 0),e([N(ve)],Ve.prototype,"updatingProgress",void 0),e([N({readOnly:!0})],Ve.prototype,"updatingProgressValue",null),e([N({readOnly:!0})],Ve.prototype,"visibleAtCurrentScale",null),Ve=e([v("esri.views.3d.layers.PointCloudLayerView3D")],Ve);const Qe=Ve;class Fe{constructor(e,t,i){this.node=e,this.pointId=t,this.point=i}getGeometry(){return new U([1],Array.from(this.point))}get attributePointId(){const{node:e,pointId:t}=this;return null!=e.pointIdFilterMap?e.pointIdFilterMap[t]:t}get usedMemory(){return l+l+u+h(this.point,u)}}class Le{constructor(e){this.features=e}get usedMemory(){return this.features.reduce((e,t)=>e+t.usedMemory,l+p)}}const De=160;function Ee(e){return t=>e.immediate.schedule(t)}export{Qe as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{i as u}from"../../../chunks/vec32.js";import{create as h,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as g}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as I}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import O from"../../../rest/support/Query.js";import{isBasemapLayerView as N}from"../../../support/basemapUtils.js";import{isGraphic as C}from"../../../support/guards.js";import{I3SPointsWorkerHandle as D}from"./I3SPointsWorkerHandle.js";import{LayerView3D as S}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as F}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as G}from"./graphics/QueryEngine.js";import{QueryEngineContext as A}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as V,normalizeEditResultsEvent as P,processAttributeEdits as L}from"./i3s/featureEditing.js";import{getCachedAttributeValue as R}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as H}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as M}from"./i3s/I3SOverrides.js";import{checkRecyclable as U,checkSpatialReferences as Q,containsDraco as q,whenGraphicAttributes as T}from"./i3s/I3SUtil.js";import{attributeLookup as B}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as k}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{normalizeHighlightTarget as W,emptyHighlightHandle as K,isObjectId as Z}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as $}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as Y}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as J}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as X}from"./support/TemporalSceneLayerView.js";import{debugFlags as ee}from"../support/debugFlags.js";import{compute as te}from"../support/orientedBoundingBox.js";import{updatingProgress as re}from"../support/updatingProperties.js";import{Vertices as ie}from"../webgl-engine/lib/Attribute.js";import se from"../../layers/SceneLayerView.js";import{hasPopupTemplate as oe}from"../../layers/support/popupUtils.js";import{getHighlightName as ae}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as ne,isInEffectiveScaleRange as le}from"../../support/layerViewUtils.js";import{TaskPriority as de}from"../../support/Scheduler.js";const ue=z();class he{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>I(t)+e,i(this.featureIds)+1024)}}let pe=class extends(X(k(Y(S(se))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new H((e,t,r)=>ye(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e)),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),U(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:this.layer,memoryController:e}),Q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new J({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new F({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!ne(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),q(this.layer.geometryDefinitions)&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}),a(()=>ee.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&ee.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||ee.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return ne()?le(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return T(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ae(t),i=this.layer.objectIdField,s=W(e);if(0===s.length)return K;if(C(s[0])){const e=s;if(null!=B(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>B(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return Z(s[0])?this.processor.highlightByObjectIds(s,i,r):K}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return V(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!me(r)&&!ge(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?_e(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=me(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=me(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new he(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),fe(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const g=this.view.stage.renderView.olidRenderHelper;if(g){const e=N(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&oe(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=te(new ie(t,3)),i.isGeographic&&(g(e.serviceObbInIndexSR.center,s,ve,i),e.serviceObbInIndexSR.center=ve)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??be[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;u(ve,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,ve):y(s,ve))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(ve[0],ve[1],ve[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new x(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(Ie.property="geometry",Ie.graphic=f,Ie.oldValue=f.geometry,Ie.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(Ie),xe()),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),fe(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){fe(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(Ie.graphic=s,Ie.property="visible",Ie.oldValue=e,Ie.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(Ie),xe())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new O(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():O.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new A(s,e,o,()=>this.processor.featureStore,i,r);this._queryEngine=new G({context:a,priority:de.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await P(t,e);L(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new $(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],pe.prototype,"processor",void 0),e([l({type:j})],pe.prototype,"filter",void 0),e([l()],pe.prototype,"loadedGraphics",void 0),e([l()],pe.prototype,"i3slayer",null),e([l()],pe.prototype,"layerViewUid",null),e([l()],pe.prototype,"_controller",void 0),e([l()],pe.prototype,"updating",void 0),e([l()],pe.prototype,"suspended",void 0),e([l(re)],pe.prototype,"updatingProgress",void 0),e([l()],pe.prototype,"updatingProgressValue",null),e([l({readOnly:!0})],pe.prototype,"visibleAtCurrentScale",null),e([l(ue.requiredFields)],pe.prototype,"requiredFields",null),e([l(ue.availableFields)],pe.prototype,"availableFields",void 0),e([l()],pe.prototype,"_fieldsHelper",void 0),e([l({type:Number})],pe.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],pe.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],pe.prototype,"_excludeObjectIds",null),e([l({readOnly:!0})],pe.prototype,"lodFactor",null),e([l({readOnly:!0})],pe.prototype,"hasM",null),e([l({readOnly:!0})],pe.prototype,"hasZ",null),e([l()],pe.prototype,"contentVisible",null),e([l({readOnly:!0})],pe.prototype,"legendEnabled",null),e([l()],pe.prototype,"_graphicOrigin",null),pe=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],pe);const ce=pe;function ge(e){return"pointData"in e}function me(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ye(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=R(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function fe(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=R(t.attributeData[e],i))}}}function _e(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const be={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ve=h(),Ie={graphic:null,property:null,oldValue:null,newValue:null};function xe(){Ie.graphic=null,Ie.property=null,Ie.oldValue=null,Ie.newValue=null}export{ce as default};
5
+ import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import{j as u}from"../../../chunks/vec32.js";import{create as h,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as g}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as I}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import O from"../../../rest/support/Query.js";import{isBasemapLayerView as N}from"../../../support/basemapUtils.js";import{isGraphic as C}from"../../../support/guards.js";import{I3SPointsWorkerHandle as D}from"./I3SPointsWorkerHandle.js";import{LayerView3D as S}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as F}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as G}from"./graphics/QueryEngine.js";import{QueryEngineContext as A}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as V,normalizeEditResultsEvent as P,processAttributeEdits as L}from"./i3s/featureEditing.js";import{getCachedAttributeValue as R}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as H}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as M}from"./i3s/I3SOverrides.js";import{checkRecyclable as U,checkSpatialReferences as Q,containsDraco as q,whenGraphicAttributes as T}from"./i3s/I3SUtil.js";import{attributeLookup as B}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as k}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{normalizeHighlightTarget as W,emptyHighlightHandle as K,isObjectId as Z}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as $}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as Y}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as J}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as X}from"./support/TemporalSceneLayerView.js";import{debugFlags as ee}from"../support/debugFlags.js";import{compute as te}from"../support/orientedBoundingBox.js";import{updatingProgress as re}from"../support/updatingProperties.js";import{Vertices as ie}from"../webgl-engine/lib/Attribute.js";import se from"../../layers/SceneLayerView.js";import{hasPopupTemplate as oe}from"../../layers/support/popupUtils.js";import{getHighlightName as ae}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as ne,isInEffectiveScaleRange as le}from"../../support/layerViewUtils.js";import{TaskPriority as de}from"../../support/Scheduler.js";const ue=z();class he{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>I(t)+e,i(this.featureIds)+1024)}}let pe=class extends(X(k(Y(S(se))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new H((e,t,r)=>ye(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e)),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),U(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:this.layer,memoryController:e}),Q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new J({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new F({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!ne(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),q(this.layer.geometryDefinitions)&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.addPromise(t)}),a(()=>ee.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&ee.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||ee.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return ne()?le(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.point.lodFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return T(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ae(t),i=this.layer.objectIdField,s=W(e);if(0===s.length)return K;if(C(s[0])){const e=s;if(null!=B(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>B(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return Z(s[0])?this.processor.highlightByObjectIds(s,i,r):K}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return V(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!me(r)&&!ge(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?_e(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=me(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=me(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new he(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),fe(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const g=this.view.stage.renderView.olidRenderHelper;if(g){const e=N(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&oe(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=te(new ie(t,3)),i.isGeographic&&(g(e.serviceObbInIndexSR.center,s,ve,i),e.serviceObbInIndexSR.center=ve)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??be[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;u(ve,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,ve):y(s,ve))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(ve[0],ve[1],ve[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new x(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(Ie.property="geometry",Ie.graphic=f,Ie.oldValue=f.geometry,Ie.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(Ie),xe()),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),fe(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){fe(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(Ie.graphic=s,Ie.property="visible",Ie.oldValue=e,Ie.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(Ie),xe())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new O(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():O.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new A(s,e,o,()=>this.processor.featureStore,i,r);this._queryEngine=new G({context:a,priority:de.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await P(t,e);L(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new $(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],pe.prototype,"processor",void 0),e([l({type:j})],pe.prototype,"filter",void 0),e([l()],pe.prototype,"loadedGraphics",void 0),e([l()],pe.prototype,"i3slayer",null),e([l()],pe.prototype,"layerViewUid",null),e([l()],pe.prototype,"_controller",void 0),e([l()],pe.prototype,"updating",void 0),e([l()],pe.prototype,"suspended",void 0),e([l(re)],pe.prototype,"updatingProgress",void 0),e([l()],pe.prototype,"updatingProgressValue",null),e([l({readOnly:!0})],pe.prototype,"visibleAtCurrentScale",null),e([l(ue.requiredFields)],pe.prototype,"requiredFields",null),e([l(ue.availableFields)],pe.prototype,"availableFields",void 0),e([l()],pe.prototype,"_fieldsHelper",void 0),e([l({type:Number})],pe.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],pe.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],pe.prototype,"_excludeObjectIds",null),e([l({readOnly:!0})],pe.prototype,"lodFactor",null),e([l({readOnly:!0})],pe.prototype,"hasM",null),e([l({readOnly:!0})],pe.prototype,"hasZ",null),e([l()],pe.prototype,"contentVisible",null),e([l({readOnly:!0})],pe.prototype,"legendEnabled",null),e([l()],pe.prototype,"_graphicOrigin",null),pe=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],pe);const ce=pe;function ge(e){return"pointData"in e}function me(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ye(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=R(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function fe(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=R(t.attributeData[e],i))}}}function _e(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const be={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ve=h(),Ie={graphic:null,property:null,oldValue:null,newValue:null};function xe(){Ie.graphic=null,Ie.property=null,Ie.oldValue=null,Ie.newValue=null}export{ce as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import s from"../../../core/Error.js";import t from"../../../core/Logger.js";import{watch as i,initial as a}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{h as l,n,i as h}from"../../../chunks/vec32.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../geometry/projection/projectVectorToVector.js";import{empty as m,expandWithVec3 as p}from"../../../geometry/support/aaBoundingBox.js";import{equals as y}from"../../../geometry/support/spatialReferenceUtils.js";import{LayerView3D as _}from"./LayerView3D.js";import{VoxelGraphic as b}from"./VoxelGraphic.js";import{addLayerViewToWasm as w,getVoxelWasm as f,removeLayerViewFromWasm as V}from"./VoxelWasm.js";import{LayerViewPerformanceInfo as g}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as S}from"./support/PopupSceneLayerView.js";import v from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as W,isInEffectiveScaleRange as T}from"../../support/layerViewUtils.js";const x=c(),L=c();let M=class extends(S(_(v))){constructor(){super(...arguments),this._suspendedHandle=null,this._usedMemory=0,this._futureMemory=0,this.type="voxel-3d",this.slicePlaneEnabled=!1,this._wasmLayerId=-1,this.ignoresMemoryFactor=!0,this._dbgFlags=new Set}get baseUrl(){return this.layer.parsedUrl?.path??""}get wasmLayerId(){return this._wasmLayerId}initialize(){if(this._dbgFlags.add(3),"local"!==this.view.viewingMode)throw new s("voxel:unsupported-viewingMode","Voxel layers support local viewingMode only.",{});if(!!!this.view.stage.renderView.renderingContext.capabilities.colorBufferFloat?.textureFloat)throw new s("voxel:missing-color-buffer-float","Voxel layers require the WebGL2 extension EXT_color_buffer_float",{});const e=this.layer.spatialReference;if(!y(e,this.view.spatialReference))throw W("voxel layer",e.wkid,this.view.spatialReference.wkid);const t=this.layer.currentVariableId,o=this.layer.getVolume(t),r=this.layer.getVariable(t);if(null!=o&&null!=r){const e=o.dimensions[0],s=o.dimensions[1],t=o.zDimension;if(t>1){const i=o.dimensions[t],a=e.size*s.size*i.size;let l=1;switch(r.renderingFormat.type){case"Int16":case"UInt16":l=2;break;case"Int32":case"UInt32":case"Float32":l=4}this._futureMemory=l*a}}const l=w(this).then(e=>{this._wasmLayerId=e,this._suspendedHandle=i(()=>this.suspended,e=>{const s=f(this.view);s&&s.setEnabled(this,!e)},a),this.addHandles([i(()=>this.layer.renderMode,e=>this._pushRenderModeToWasm(e)),i(()=>this.layer.currentVariableId,e=>this._pushCurrentVariableIdToWasm(e)),i(()=>this.layer.getSections(),e=>this._pushSectionsToWasm(e)),i(()=>this.layer.getVariableStyles(),e=>this._pushVariableStylesToWasm(e)),i(()=>this.layer.getVolumeStyles(),e=>this._pushVolumeStylesToWasm(e)),i(()=>this.layer.enableDynamicSections,e=>this._pushEnableDynamicSectionsToWasm(e)),i(()=>this.layer.enableIsosurfaces,e=>this._pushEnableIsosurfacesToWasm(e)),i(()=>this.layer.enableSections,e=>this._pushEnableSectionsToWasm(e)),i(()=>this.layer.enableSlices,e=>this._pushEnableSlicesToWasm(e)),i(()=>[this.layer.timeOffset,this.layer.timeExtent,this.layer.useViewTime],()=>this._updateLayerTimeProperties()),i(()=>this.slicePlaneEnabled,e=>this._pushAnalysisSliceToWasm(e,this.view.slice.plane)),i(()=>this.view.slice.plane,e=>this._pushAnalysisSliceToWasm(this.slicePlaneEnabled,e))])}).catch(e=>{if(V(this),this._wasmLayerId=-1,-1===e)throw new s("voxel:addLayer-failure","The voxel layer description was invalid.",{});if(-2===e)throw new s("voxel:addLayer-failure","The voxel layer web assembly module failed to download.",{})});this.addResolvingPromise(l)}destroy(){V(this),this._suspendedHandle&&(this._suspendedHandle.remove(),this._suspendedHandle=null)}isUpdating(){const e=f(this.view);return!(this._wasmLayerId<0||null==e)&&e.isUpdating(this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}get usedMemory(){return this._usedMemory}get unloadedMemory(){return this._futureMemory}get performanceInfo(){return new g(this.usedMemory)}get visibleAtCurrentScale(){return T(this.layer.effectiveScaleRange,this.view.scale)}whenGraphicBounds(e,s){const t=e.attributes["Voxel.WorldPosition"];if(t){const e=m(),s=JSON.parse(t);if(u(s,this.view.renderSpatialReference,L,this.view.spatialReference||d.WGS84))return p(e,L),Promise.resolve({boundingBox:e,screenSpaceObjects:[]})}return Promise.reject()}async whenGraphicAttributes(e,s){const t=f(this.view);if(!t)return e;const i=[];for(const a of e)this._isValidVoxelGraphic(a)&&i.push(a);return i.length&&await t.getOtherFieldPopupValues(i,s),e}_isValidVoxelGraphic(e){return e instanceof b}setUsedMemory(e){this._usedMemory=e,this._futureMemory=0}captureFrustum(){const e=f(this.view);e?.captureFrustum()}toggleFullVolumeExtentDraw(){const e=f(this.view);e?.toggleFullVolumeExtentDraw(this)}getLayerTimes(){const e=f(this.view);return e?.getLayerTimes(this)??[]}getCurrentLayerTimeIndex(){const e=f(this.view);return e?.getCurrentLayerTimeIndex(this)??0}dropQueryRenderTarget(){const e=f(this.view);e?.dropQueryRenderTarget()}_pushRenderModeToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushRenderModeToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setRenderMode(this,e)||this._dbg(3,"VoxelLayerView3D._pushRenderModeToWasm() failed!")}_pushSectionsToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushSectionsToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setStaticSections(this,e)||this._dbg(3,"VoxelLayerView3D._pushSectionsToWasm() failed!")}_pushCurrentVariableIdToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushCurrentVariableIdToWasm() called!, "+(s?"have WASM":"don't have WASM!!!")),s?.setCurrentVariable(this,e)||this._dbg(3,"VoxelLayerView3D._pushCurrentVariableIdToWasm() failed!")}_pushVariableStylesToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushVariableStylesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setVariableStyles(this,e)||this._dbg(3,"VoxelLayerView3D._pushVariableStylesToWasm() failed!")}_accountForEnableSlices(e,s){const t=null!=s?s:this.layer.enableSlices;for(let i=0;i<e.length;++i){const s=e[i];for(const e of s.slices)e.enabled=e.enabled&&t}}_pushVolumeStylesToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushVolumeStylesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s&&(this._accountForEnableSlices(e,null),s.setVolumeStyles(this,e)||this._dbg(3,"VoxelLayerView3D._pushVolumeStylesToWasm() failed!"))}_pushAnalysisSliceToWasm(e,s){const t=f(this.view);this._dbg(2,"VoxelLayerView3D._pushAnalysisSliceToWasm() called, "+(t?"have WASM":"don't have WASM!!!"));let i=!1;if(t){if(s){const a=s.origin;l(x,s.basis1,s.basis2),n(x,x),i=t.setAnalysisSlice(this,e,a,x)}else h(x,0,0,1),i=t.setAnalysisSlice(this,!1,x,x);i||this._dbg(3,"VoxelLayerView3D._pushAnalysisSliceToWasm() failed!")}}_updateLayerTimeProperties(){const e=f(this.view);this._dbg(2,"VoxelLayerView3D._updateLayerTimeProperties() called, "+(e?"have WASM":"don't have WASM!!!")),e&&e.updateLayerTimeProperties(this)}_pushEnableDynamicSectionsToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushEnableDynamicSectionsToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setEnableDynamicSections(this,e)||this._dbg(3,"VoxelLayerView3D._pushEnableDynamicSectionsToWasm() failed!")}_pushEnableSlicesToWasm(e){const s=f(this.view);if(this._dbg(2,"VoxelLayerView3D._pushEnableSlicesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s){const t=this.layer.getVolumeStyles();this._accountForEnableSlices(t,e),s.setVolumeStyles(this,t)||this._dbg(3,"VoxelLayerView3D._pushEnableSlicesToWasm() failed!")}}_pushEnableIsosurfacesToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushEnableIsosurfacesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setEnableIsosurfaces(this,e)||this._dbg(3,"VoxelLayerView3D._pushEnableIsosurfacesToWasm() failed!")}_pushEnableSectionsToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushEnableSectionsToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setEnableSections(this,e)||this._dbg(3,"VoxelLayerView3D._pushEnableSectionsToWasm() failed!")}_dbg(e,s){this._dbgFlags.has(e)&&(3===e?t.getLogger(this).error(s):t.getLogger(this).warn(s))}};e([o()],M.prototype,"layer",void 0),e([o()],M.prototype,"baseUrl",null),e([o({type:Boolean})],M.prototype,"slicePlaneEnabled",void 0),e([o({readOnly:!0})],M.prototype,"visibleAtCurrentScale",null),M=e([r("esri.views.3d.layers.VoxelLayerView3D")],M);const A=M;export{A as default};
5
+ import{__decorate as e}from"tslib";import s from"../../../core/Error.js";import t from"../../../core/Logger.js";import{watch as i,initial as a}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{i as l,n,j as h}from"../../../chunks/vec32.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../geometry/SpatialReference.js";import{projectVectorToVector as u}from"../../../geometry/projection/projectVectorToVector.js";import{empty as m,expandWithVec3 as p}from"../../../geometry/support/aaBoundingBox.js";import{equals as y}from"../../../geometry/support/spatialReferenceUtils.js";import{LayerView3D as _}from"./LayerView3D.js";import{VoxelGraphic as b}from"./VoxelGraphic.js";import{addLayerViewToWasm as w,getVoxelWasm as f,removeLayerViewFromWasm as V}from"./VoxelWasm.js";import{LayerViewPerformanceInfo as g}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as S}from"./support/PopupSceneLayerView.js";import v from"../../layers/LayerView.js";import{spatialReferenceIncompatibleError as W,isInEffectiveScaleRange as T}from"../../support/layerViewUtils.js";const x=c(),L=c();let M=class extends(S(_(v))){constructor(){super(...arguments),this._suspendedHandle=null,this._usedMemory=0,this._futureMemory=0,this.type="voxel-3d",this.slicePlaneEnabled=!1,this._wasmLayerId=-1,this.ignoresMemoryFactor=!0,this._dbgFlags=new Set}get baseUrl(){return this.layer.parsedUrl?.path??""}get wasmLayerId(){return this._wasmLayerId}initialize(){if(this._dbgFlags.add(3),"local"!==this.view.viewingMode)throw new s("voxel:unsupported-viewingMode","Voxel layers support local viewingMode only.",{});if(!!!this.view.stage.renderView.renderingContext.capabilities.colorBufferFloat?.textureFloat)throw new s("voxel:missing-color-buffer-float","Voxel layers require the WebGL2 extension EXT_color_buffer_float",{});const e=this.layer.spatialReference;if(!y(e,this.view.spatialReference))throw W("voxel layer",e.wkid,this.view.spatialReference.wkid);const t=this.layer.currentVariableId,o=this.layer.getVolume(t),r=this.layer.getVariable(t);if(null!=o&&null!=r){const e=o.dimensions[0],s=o.dimensions[1],t=o.zDimension;if(t>1){const i=o.dimensions[t],a=e.size*s.size*i.size;let l=1;switch(r.renderingFormat.type){case"Int16":case"UInt16":l=2;break;case"Int32":case"UInt32":case"Float32":l=4}this._futureMemory=l*a}}const l=w(this).then(e=>{this._wasmLayerId=e,this._suspendedHandle=i(()=>this.suspended,e=>{const s=f(this.view);s&&s.setEnabled(this,!e)},a),this.addHandles([i(()=>this.layer.renderMode,e=>this._pushRenderModeToWasm(e)),i(()=>this.layer.currentVariableId,e=>this._pushCurrentVariableIdToWasm(e)),i(()=>this.layer.getSections(),e=>this._pushSectionsToWasm(e)),i(()=>this.layer.getVariableStyles(),e=>this._pushVariableStylesToWasm(e)),i(()=>this.layer.getVolumeStyles(),e=>this._pushVolumeStylesToWasm(e)),i(()=>this.layer.enableDynamicSections,e=>this._pushEnableDynamicSectionsToWasm(e)),i(()=>this.layer.enableIsosurfaces,e=>this._pushEnableIsosurfacesToWasm(e)),i(()=>this.layer.enableSections,e=>this._pushEnableSectionsToWasm(e)),i(()=>this.layer.enableSlices,e=>this._pushEnableSlicesToWasm(e)),i(()=>[this.layer.timeOffset,this.layer.timeExtent,this.layer.useViewTime],()=>this._updateLayerTimeProperties()),i(()=>this.slicePlaneEnabled,e=>this._pushAnalysisSliceToWasm(e,this.view.slice.plane)),i(()=>this.view.slice.plane,e=>this._pushAnalysisSliceToWasm(this.slicePlaneEnabled,e))])}).catch(e=>{if(V(this),this._wasmLayerId=-1,-1===e)throw new s("voxel:addLayer-failure","The voxel layer description was invalid.",{});if(-2===e)throw new s("voxel:addLayer-failure","The voxel layer web assembly module failed to download.",{})});this.addResolvingPromise(l)}destroy(){V(this),this._suspendedHandle&&(this._suspendedHandle.remove(),this._suspendedHandle=null)}isUpdating(){const e=f(this.view);return!(this._wasmLayerId<0||null==e)&&e.isUpdating(this._wasmLayerId)}updatingFlagChanged(){this.notifyChange("updating")}get usedMemory(){return this._usedMemory}get unloadedMemory(){return this._futureMemory}get performanceInfo(){return new g(this.usedMemory)}get visibleAtCurrentScale(){return T(this.layer.effectiveScaleRange,this.view.scale)}whenGraphicBounds(e,s){const t=e.attributes["Voxel.WorldPosition"];if(t){const e=m(),s=JSON.parse(t);if(u(s,this.view.renderSpatialReference,L,this.view.spatialReference||d.WGS84))return p(e,L),Promise.resolve({boundingBox:e,screenSpaceObjects:[]})}return Promise.reject()}async whenGraphicAttributes(e,s){const t=f(this.view);if(!t)return e;const i=[];for(const a of e)this._isValidVoxelGraphic(a)&&i.push(a);return i.length&&await t.getOtherFieldPopupValues(i,s),e}_isValidVoxelGraphic(e){return e instanceof b}setUsedMemory(e){this._usedMemory=e,this._futureMemory=0}captureFrustum(){const e=f(this.view);e?.captureFrustum()}toggleFullVolumeExtentDraw(){const e=f(this.view);e?.toggleFullVolumeExtentDraw(this)}getLayerTimes(){const e=f(this.view);return e?.getLayerTimes(this)??[]}getCurrentLayerTimeIndex(){const e=f(this.view);return e?.getCurrentLayerTimeIndex(this)??0}dropQueryRenderTarget(){const e=f(this.view);e?.dropQueryRenderTarget()}_pushRenderModeToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushRenderModeToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setRenderMode(this,e)||this._dbg(3,"VoxelLayerView3D._pushRenderModeToWasm() failed!")}_pushSectionsToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushSectionsToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setStaticSections(this,e)||this._dbg(3,"VoxelLayerView3D._pushSectionsToWasm() failed!")}_pushCurrentVariableIdToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushCurrentVariableIdToWasm() called!, "+(s?"have WASM":"don't have WASM!!!")),s?.setCurrentVariable(this,e)||this._dbg(3,"VoxelLayerView3D._pushCurrentVariableIdToWasm() failed!")}_pushVariableStylesToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushVariableStylesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setVariableStyles(this,e)||this._dbg(3,"VoxelLayerView3D._pushVariableStylesToWasm() failed!")}_accountForEnableSlices(e,s){const t=null!=s?s:this.layer.enableSlices;for(let i=0;i<e.length;++i){const s=e[i];for(const e of s.slices)e.enabled=e.enabled&&t}}_pushVolumeStylesToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushVolumeStylesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s&&(this._accountForEnableSlices(e,null),s.setVolumeStyles(this,e)||this._dbg(3,"VoxelLayerView3D._pushVolumeStylesToWasm() failed!"))}_pushAnalysisSliceToWasm(e,s){const t=f(this.view);this._dbg(2,"VoxelLayerView3D._pushAnalysisSliceToWasm() called, "+(t?"have WASM":"don't have WASM!!!"));let i=!1;if(t){if(s){const a=s.origin;l(x,s.basis1,s.basis2),n(x,x),i=t.setAnalysisSlice(this,e,a,x)}else h(x,0,0,1),i=t.setAnalysisSlice(this,!1,x,x);i||this._dbg(3,"VoxelLayerView3D._pushAnalysisSliceToWasm() failed!")}}_updateLayerTimeProperties(){const e=f(this.view);this._dbg(2,"VoxelLayerView3D._updateLayerTimeProperties() called, "+(e?"have WASM":"don't have WASM!!!")),e&&e.updateLayerTimeProperties(this)}_pushEnableDynamicSectionsToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushEnableDynamicSectionsToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setEnableDynamicSections(this,e)||this._dbg(3,"VoxelLayerView3D._pushEnableDynamicSectionsToWasm() failed!")}_pushEnableSlicesToWasm(e){const s=f(this.view);if(this._dbg(2,"VoxelLayerView3D._pushEnableSlicesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s){const t=this.layer.getVolumeStyles();this._accountForEnableSlices(t,e),s.setVolumeStyles(this,t)||this._dbg(3,"VoxelLayerView3D._pushEnableSlicesToWasm() failed!")}}_pushEnableIsosurfacesToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushEnableIsosurfacesToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setEnableIsosurfaces(this,e)||this._dbg(3,"VoxelLayerView3D._pushEnableIsosurfacesToWasm() failed!")}_pushEnableSectionsToWasm(e){const s=f(this.view);this._dbg(2,"VoxelLayerView3D._pushEnableSectionsToWasm() called, "+(s?"have WASM":"don't have WASM!!!")),s?.setEnableSections(this,e)||this._dbg(3,"VoxelLayerView3D._pushEnableSectionsToWasm() failed!")}_dbg(e,s){this._dbgFlags.has(e)&&(3===e?t.getLogger(this).error(s):t.getLogger(this).warn(s))}};e([o()],M.prototype,"layer",void 0),e([o()],M.prototype,"baseUrl",null),e([o({type:Boolean})],M.prototype,"slicePlaneEnabled",void 0),e([o({readOnly:!0})],M.prototype,"visibleAtCurrentScale",null),M=e([r("esri.views.3d.layers.VoxelLayerView3D")],M);const A=M;export{A as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as i}from"tslib";import t from"../../../../core/Accessor.js";import{lerp as e}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,g as h,i as u,c as d}from"../../../../chunks/vec32.js";import{ZEROS as p,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as y,t as f,c as m}from"../../../../chunks/vec42.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as b}from"../../../../geometry/ellipsoidUtils.js";import{create as O,empty as w,copy as D,offset as G,width as j,height as I,expand as k}from"../../../../geometry/support/aaBoundingRect.js";import{e as Q,a as P,d as C}from"../../../../chunks/boundedPlane.js";import{create as S}from"../../../../geometry/support/ray.js";import{c as T,q as V,r as x,a as R,i as A}from"../../../../chunks/sphere.js";import{DeconflictAABR as U}from"./DeconflictAABR.js";import{prepare as H,drawPoly as M}from"./deconflictorDebug.js";import N from"../../webgl/RenderCamera.js";import{GPUPointOcclusionQuery as E}from"../../webgl-engine/lib/GPUPointOcclusionQuery.js";import{SeparateScreenSizePerspectiveEvaluators as z}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{HUDMaterial as F}from"../../webgl-engine/materials/HUDMaterial.js";import{Yield as B}from"../../../support/Yield.js";const W=_(),L=_(),q=g(),Y=g(),J=_(),K=n(),X=T(),Z=S(),$=_(),ii=O();class ti{constructor(i){this.id=i,this.aabr=O(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.culled=!1,this.visible=!1,this.priority=0}}function ei(i,t){const e=0!==i.distanceToOccluder&&i.distance>i.distanceToOccluder,s=0!==t.distanceToOccluder&&t.distance>t.distanceToOccluder;return e!==s?+e-+s:i.priority!==t.priority?t.priority-i.priority:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id}class si{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this._info=null,this._labelInfo=null}ensureInfo(i){let t=this.getInfo(i);return t||(t=new ti(this.graphics3DGraphic.graphic.uid),this._setInfo(i,t)),t}getInfo(i){return 16===i?this._labelInfo:this._info}removeInfo(i){this._setInfo(i,null)}_setInfo(i,t){16===i?this._labelInfo=t:this._info=t}}class ri{constructor(){this.camera=new N,this.slicePlane=P(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.equals(i.camera)||this.camera.copyFrom(i.camera),C(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let oi=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ri,this._state=0,this._checkOcclusion=new Map,this._active=new Map,this._checkOcclusionIterator=null,this._activeIterator=null,this._occlusionQueryUids=new Array,this._updatingHandles=new v,this._deconflictor=new U((i,t)=>{i.visible=t,this._setGraphicVisibility(this._active.get(i.id),t)},(i,t)=>i.id!==t.id,ei),this._baseOccludedVisibility=10,this._altitudeFactor=2,this._minAltitudeDifference=100}initialize(){this._updatingHandles.add(()=>(this.view?.map?.ground?.opacity??0)>0,()=>this.setDirty()),this._updatingHandles.add(()=>this.view.ready,()=>{this._occlusionQuery=null,this.setDirty()})}destroy(){this._occlusionQuery=null,this._updatingHandles.destroy(),this._deconflictor.destroy(),this._checkOcclusion.clear(),this._active.clear()}setDirty(){!this._dirty&&(this._active.size>0||this._checkOcclusion.size>0)&&(this._dirty=!0,this.notifyChange("_readyToRun"))}setPriority(i,t){const e=this._active.get(i.graphic.uid)?.getInfo(this.visibilityGroup);e&&(e.priority=t)}get _readyToRun(){return 0!==this._state||this._dirty}get updating(){return this._readyToRun||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/5;return this._dirty?.5*i:i}get readyToRun(){return this.view.ready&&null!=this.view.state&&this._readyToRun}get usedMemory(){return this._occlusionQuery?.usedMemory??0+4*(this._occlusionQueryUids?.length??0)}runTask(i){switch(this._state){case 0:this._startUpdate(),i.madeProgress();case 1:if(this._state=1,!this._processCheckOcclusion(i))return;case 2:if(this._state=2,this._occlusionQuery&&!this._occlusionQuery.done)return B;this._readOcclusionQueryResult(),i.madeProgress();case 3:if(this._state=3,!this._collectActiveGraphics(i))return;case 4:if(this._state=4,this._deconflictor.run(i),!this._deconflictor.done)return;default:this._state=0,this.notifyChange("_readyToRun")}}setGraphicsActive(i,t){t?i.forEach(i=>this.addToActiveGraphics(i)):i.forEach(i=>this.removeFromActiveGraphics(i))}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const e=t?.geometries[0],s=e?.material;return s instanceof F}_startUpdate(){H(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._deconflictor.reset(i,t),this._resetIterators(),this._occlusionQueryUids.length=0,this._checkOcclusion.size||(this._occlusionQuery=s(this._occlusionQuery))}addToActiveGraphics(i){i.ensureInfo(this.visibilityGroup),this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){ci(i,this.visibilityGroup),i.removeInfo(this.visibilityGroup),this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}addToCheckOcclusion(i){this._checkOcclusion.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromCheckOcclusion(i){this._checkOcclusion.delete(i.graphics3DGraphic.graphic.uid)}_processCheckOcclusion(i){if(0===this._checkOcclusion.size)return!0;const t=this._ensureCheckOcclusionIterator(),e=this._viewState.camera,r=c(K,e.viewInverseTransposeMatrix),o=this.view.map.ground.opacity>0,n="global"===this.view.viewingMode&&o&&e.relativeElevation>0?X:null;let a=0;null!=n&&(V(n,p,e.viewMatrix),n[3]=b(this.view.spatialReference).radius,a=x(n,p));const h=O();for(;;){if(i.done)return!1;i.madeProgress();const s=t.next();if(!0===s.done)break;const o=s.value,c=o.graphics3DGraphic;if(c.destroyed)continue;if(!c.isVisible(1,8))continue;const u=hi(c,this.visibilityGroup);let d=null,p=!0;for(const i of u){if(!this.layerSupportsDeconfliction(i))continue;d=ui,this._projectHudLayer(i,e,d),w(h);const t=i.stageObject.geometries[0].material;if(this._expandBoundingRect(h,e,i,t,d),d.isOutsideScreen){p=!1;break}if(this._isCulledBySlice(o,d.positionView)){p=!1;break}if(null!=n&&li(d,n,a)){p=!1;break}l(L,d.positionView,r),d.altitude=this.view.renderCoordsHelper.getAltitude(L);const s=o.ensureInfo(this.visibilityGroup);if(s.altitude=d.altitude,s.distance=d.distance,s.distanceToOccluder=d.distanceToOccluder,s.culled=!1,D(s.aabr,h),t.parameters.occlusionTest)break;this._ensureOcclusionQuery().addPosition(L)===this._occlusionQueryUids.length&&this._occlusionQueryUids.push(c.graphic.uid);break}if(this._active.has(c.graphic.uid)&&(!p||!d)){const i=o.ensureInfo(this.visibilityGroup);i.visible=!d,i.culled=!0}}return this._checkOcclusionIterator=null,this._occlusionQueryUids.length||(this._occlusionQuery=s(this._occlusionQuery)),this._occlusionQuery?.start(),!0}_readOcclusionQueryResult(){if(!this._occlusionQuery||!this._occlusionQueryUids.length)return;const i=this._viewState.camera,t=this.view.renderCoordsHelper.getAltitude(i.eye);for(let e=0;e<this._occlusionQueryUids.length;e++){const i=this._occlusionQueryUids[e],s=this._checkOcclusion.get(i);if(!s)continue;const r=this._occlusionQuery.getOcclusion(e)??-1,o=s.getInfo(this.visibilityGroup);o&&(o.distanceToOccluder=r>0?o.distance-r:0);const c=r<=0||this._occludedVisibility(o?.distanceToOccluder??0,o?.distance??r,o?.altitude??0,t);this._active.has(i)?o&&(o.culled=!c,o.visible=c):this._setGraphicVisibility(s,c)}this._occlusionQueryUids.length=0}_collectActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),e=16===this.visibilityGroup;for(;!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._activeIterator=null,!0;const r=s.value,o=r.getInfo(this.visibilityGroup);if(!o)continue;!(!e||r.graphics3DGraphic.isVisible())||o.culled?(M(o.aabr,!1,!0),this._setGraphicVisibility(r,o.visible)):this._deconflictor.add(o)}return!1}_occludedVisibility(i,t,e,s){const r=Math.max(this._minAltitudeDifference,Math.abs(e-s))-this._minAltitudeDifference;return 0===i||t-i<=this._baseOccludedVisibility+this._altitudeFactor*r}_resetIterators(){this._checkOcclusionIterator=null,this._activeIterator=null}_ensureCheckOcclusionIterator(){return this._checkOcclusionIterator??=this._checkOcclusion.values(),this._checkOcclusionIterator}_ensureActiveGraphicsIterator(){return this._activeIterator??=this._active.values(),this._activeIterator}_ensureOcclusionQuery(){return this._occlusionQuery??=new E({view:this.view}),this._occlusionQueryUids.length||this._occlusionQuery.init(this._checkOcclusion.size,this._viewState.camera.eye),this._occlusionQuery}_projectHudLayer(i,t,e){const s=i.stageObject,r=s.geometries[0],o=r.material;l(W,R(s.boundingVolumeWorldSpace.bounds),t.viewMatrix);const c=r.attributes,n=c.get("normal").data,a=c.get("centerOffsetAndDistance").data;o.applyShaderOffsetsView(W,n,s.transformation,a,t,e.screenSizePerspectiveEvaluators,W),y(q,W[0],W[1],W[2],1),f(Y,q,t.projectionMatrix),h(e.positionNDC,Y,1/Y[3]),o.applyShaderOffsetsNDC(e.positionNDC,a,t,e.positionNDC,J),e.distanceWithoutPolygonOffset=t.depthNDCToWorld(J[2]),e.distance=J[2]===e.positionNDC[2]?e.distanceWithoutPolygonOffset:t.depthNDCToWorld(e.positionNDC[2]),y(Y,e.positionNDC[0],e.positionNDC[1],e.positionNDC[2],1),f(q,Y,t.inverseProjectionMatrix),m(q,q,1/q[3]),u(e.positionView,W[0],W[1],W[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&Q(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,s,r,{positionNDC:o,screenSizePerspectiveEvaluators:c}){const n=s.getScreenSize(ni);c.evaluator.applyVec2(n,n),n[0]*=t.pixelRatio,n[1]*=t.pixelRatio;const a=G(r.calculateRelativeScreenBounds(n,c.alignmentEvaluator.apply(t.pixelRatio),ii),e(0,t.fullWidth,.5+.5*o[0]),e(0,t.fullHeight,.5+.5*o[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(j(a),I(a));a[0]-=i,a[1]-=i,a[2]+=i,a[3]+=i}k(i,a,i)}_setGraphicVisibility(i,t){const e=i?.graphics3DGraphic;e&&!e.destroyed&&(e.setVisibilityFlag(this.visibilityGroup,8,t),16===this.visibilityGroup&&this.view.labeler.setLabelGraphicVisibility(e,t))}};function ci(i,t){const e=i.graphics3DGraphic;e.destroyed||e.setVisibilityFlag(t,8,!0)}i([r({constructOnly:!0})],oi.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],oi.prototype,"_readyToRun",null),i([r({type:Boolean,readOnly:!0})],oi.prototype,"updating",null),i([r({readOnly:!0})],oi.prototype,"_updatingHandles",void 0),oi=i([o("esri.views.3d.layers.graphics.Deconflictor")],oi);const ni=a();class ai{constructor(){this.positionView=_(),this.positionNDC=_(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.distanceWithoutPolygonOffset=0,this.screenSizePerspectiveEvaluators=new z}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function li(i,t,e){return d(Z.direction,i.positionView),u(Z.origin,0,0,0),!!A(t,Z,$)&&i.distanceWithoutPolygonOffset>e}function hi(i,t){return 16===t?i.labelLayers:i.layers}const ui=new ai;export{oi as Deconflictor,si as DeconflictorGraphic,ri as DeconflictorViewState};
5
+ import{__decorate as i}from"tslib";import t from"../../../../core/Accessor.js";import{lerp as e}from"../../../../core/mathUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{transpose as c}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{t as l,h,j as u,d}from"../../../../chunks/vec32.js";import{ZEROS as p,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as y,t as f,c as m}from"../../../../chunks/vec42.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as b}from"../../../../geometry/ellipsoidUtils.js";import{create as O,empty as w,copy as D,offset as G,width as j,height as I,expand as k}from"../../../../geometry/support/aaBoundingRect.js";import{e as Q,a as P,d as C}from"../../../../chunks/boundedPlane.js";import{create as S}from"../../../../geometry/support/ray.js";import{c as T,q as V,r as x,a as R,i as A}from"../../../../chunks/sphere.js";import{DeconflictAABR as U}from"./DeconflictAABR.js";import{prepare as H,drawPoly as M}from"./deconflictorDebug.js";import N from"../../webgl/RenderCamera.js";import{GPUPointOcclusionQuery as E}from"../../webgl-engine/lib/GPUPointOcclusionQuery.js";import{SeparateScreenSizePerspectiveEvaluators as z}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{HUDMaterial as F}from"../../webgl-engine/materials/HUDMaterial.js";import{Yield as B}from"../../../support/Yield.js";const W=_(),L=_(),q=g(),Y=g(),J=_(),K=n(),X=T(),Z=S(),$=_(),ii=O();class ti{constructor(i){this.id=i,this.aabr=O(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.culled=!1,this.visible=!1,this.priority=0}}function ei(i,t){const e=0!==i.distanceToOccluder&&i.distance>i.distanceToOccluder,s=0!==t.distanceToOccluder&&t.distance>t.distanceToOccluder;return e!==s?+e-+s:i.priority!==t.priority?t.priority-i.priority:i.distance!==t.distance?i.distance-t.distance:i.visible!==t.visible?+t.visible-+i.visible:i.id-t.id}class si{constructor(i,t){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this._info=null,this._labelInfo=null}ensureInfo(i){let t=this.getInfo(i);return t||(t=new ti(this.graphics3DGraphic.graphic.uid),this._setInfo(i,t)),t}getInfo(i){return 16===i?this._labelInfo:this._info}removeInfo(i){this._setInfo(i,null)}_setInfo(i,t){16===i?this._labelInfo=t:this._info=t}}class ri{constructor(){this.camera=new N,this.slicePlane=P(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.equals(i.camera)||this.camera.copyFrom(i.camera),C(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let oi=class extends t{get dirty(){return this._dirty}get state(){return this._state}constructor(i){super(i),this._dirty=!1,this._viewState=new ri,this._state=0,this._checkOcclusion=new Map,this._active=new Map,this._checkOcclusionIterator=null,this._activeIterator=null,this._occlusionQueryUids=new Array,this._updatingHandles=new v,this._deconflictor=new U((i,t)=>{i.visible=t,this._setGraphicVisibility(this._active.get(i.id),t)},(i,t)=>i.id!==t.id,ei),this._baseOccludedVisibility=10,this._altitudeFactor=2,this._minAltitudeDifference=100}initialize(){this._updatingHandles.add(()=>(this.view?.map?.ground?.opacity??0)>0,()=>this.setDirty()),this._updatingHandles.add(()=>this.view.ready,()=>{this._occlusionQuery=null,this.setDirty()})}destroy(){this._occlusionQuery=null,this._updatingHandles.destroy(),this._deconflictor.destroy(),this._checkOcclusion.clear(),this._active.clear()}setDirty(){!this._dirty&&(this._active.size>0||this._checkOcclusion.size>0)&&(this._dirty=!0,this.notifyChange("_readyToRun"))}setPriority(i,t){const e=this._active.get(i.graphic.uid)?.getInfo(this.visibilityGroup);e&&(e.priority=t)}get _readyToRun(){return 0!==this._state||this._dirty}get updating(){return this._readyToRun||this._updatingHandles.updating}get updatingProgress(){if(!this.updating)return 1;const i=this._state/5;return this._dirty?.5*i:i}get readyToRun(){return this.view.ready&&null!=this.view.state&&this._readyToRun}get usedMemory(){return this._occlusionQuery?.usedMemory??0+4*(this._occlusionQueryUids?.length??0)}runTask(i){switch(this._state){case 0:this._startUpdate(),i.madeProgress();case 1:if(this._state=1,!this._processCheckOcclusion(i))return;case 2:if(this._state=2,this._occlusionQuery&&!this._occlusionQuery.done)return B;this._readOcclusionQueryResult(),i.madeProgress();case 3:if(this._state=3,!this._collectActiveGraphics(i))return;case 4:if(this._state=4,this._deconflictor.run(i),!this._deconflictor.done)return;default:this._state=0,this.notifyChange("_readyToRun")}}setGraphicsActive(i,t){t?i.forEach(i=>this.addToActiveGraphics(i)):i.forEach(i=>this.removeFromActiveGraphics(i))}layerSupportsDeconfliction(i){if(null==i||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?.geometries.length??0))return!1;const e=t?.geometries[0],s=e?.material;return s instanceof F}_startUpdate(){H(this.view),this._dirty=!1,this._viewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._viewState.camera;this._deconflictor.reset(i,t),this._resetIterators(),this._occlusionQueryUids.length=0,this._checkOcclusion.size||(this._occlusionQuery=s(this._occlusionQuery))}addToActiveGraphics(i){i.ensureInfo(this.visibilityGroup),this._active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){ci(i,this.visibilityGroup),i.removeInfo(this.visibilityGroup),this._active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}addToCheckOcclusion(i){this._checkOcclusion.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromCheckOcclusion(i){this._checkOcclusion.delete(i.graphics3DGraphic.graphic.uid)}_processCheckOcclusion(i){if(0===this._checkOcclusion.size)return!0;const t=this._ensureCheckOcclusionIterator(),e=this._viewState.camera,r=c(K,e.viewInverseTransposeMatrix),o=this.view.map.ground.opacity>0,n="global"===this.view.viewingMode&&o&&e.relativeElevation>0?X:null;let a=0;null!=n&&(V(n,p,e.viewMatrix),n[3]=b(this.view.spatialReference).radius,a=x(n,p));const h=O();for(;;){if(i.done)return!1;i.madeProgress();const s=t.next();if(!0===s.done)break;const o=s.value,c=o.graphics3DGraphic;if(c.destroyed)continue;if(!c.isVisible(1,8))continue;const u=hi(c,this.visibilityGroup);let d=null,p=!0;for(const i of u){if(!this.layerSupportsDeconfliction(i))continue;d=ui,this._projectHudLayer(i,e,d),w(h);const t=i.stageObject.geometries[0].material;if(this._expandBoundingRect(h,e,i,t,d),d.isOutsideScreen){p=!1;break}if(this._isCulledBySlice(o,d.positionView)){p=!1;break}if(null!=n&&li(d,n,a)){p=!1;break}l(L,d.positionView,r),d.altitude=this.view.renderCoordsHelper.getAltitude(L);const s=o.ensureInfo(this.visibilityGroup);if(s.altitude=d.altitude,s.distance=d.distance,s.distanceToOccluder=d.distanceToOccluder,s.culled=!1,D(s.aabr,h),t.parameters.occlusionTest)break;this._ensureOcclusionQuery().addPosition(L)===this._occlusionQueryUids.length&&this._occlusionQueryUids.push(c.graphic.uid);break}if(this._active.has(c.graphic.uid)&&(!p||!d)){const i=o.ensureInfo(this.visibilityGroup);i.visible=!d,i.culled=!0}}return this._checkOcclusionIterator=null,this._occlusionQueryUids.length||(this._occlusionQuery=s(this._occlusionQuery)),this._occlusionQuery?.start(),!0}_readOcclusionQueryResult(){if(!this._occlusionQuery||!this._occlusionQueryUids.length)return;const i=this._viewState.camera,t=this.view.renderCoordsHelper.getAltitude(i.eye);for(let e=0;e<this._occlusionQueryUids.length;e++){const i=this._occlusionQueryUids[e],s=this._checkOcclusion.get(i);if(!s)continue;const r=this._occlusionQuery.getOcclusion(e)??-1,o=s.getInfo(this.visibilityGroup);o&&(o.distanceToOccluder=r>0?o.distance-r:0);const c=r<=0||this._occludedVisibility(o?.distanceToOccluder??0,o?.distance??r,o?.altitude??0,t);this._active.has(i)?o&&(o.culled=!c,o.visible=c):this._setGraphicVisibility(s,c)}this._occlusionQueryUids.length=0}_collectActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),e=16===this.visibilityGroup;for(;!i.done;){i.madeProgress();const s=t.next();if(!0===s.done)return this._activeIterator=null,!0;const r=s.value,o=r.getInfo(this.visibilityGroup);if(!o)continue;!(!e||r.graphics3DGraphic.isVisible())||o.culled?(M(o.aabr,!1,!0),this._setGraphicVisibility(r,o.visible)):this._deconflictor.add(o)}return!1}_occludedVisibility(i,t,e,s){const r=Math.max(this._minAltitudeDifference,Math.abs(e-s))-this._minAltitudeDifference;return 0===i||t-i<=this._baseOccludedVisibility+this._altitudeFactor*r}_resetIterators(){this._checkOcclusionIterator=null,this._activeIterator=null}_ensureCheckOcclusionIterator(){return this._checkOcclusionIterator??=this._checkOcclusion.values(),this._checkOcclusionIterator}_ensureActiveGraphicsIterator(){return this._activeIterator??=this._active.values(),this._activeIterator}_ensureOcclusionQuery(){return this._occlusionQuery??=new E({view:this.view}),this._occlusionQueryUids.length||this._occlusionQuery.init(this._checkOcclusion.size,this._viewState.camera.eye),this._occlusionQuery}_projectHudLayer(i,t,e){const s=i.stageObject,r=s.geometries[0],o=r.material;l(W,R(s.boundingVolumeWorldSpace.bounds),t.viewMatrix);const c=r.attributes,n=c.get("normal").data,a=c.get("centerOffsetAndDistance").data;o.applyShaderOffsetsView(W,n,s.transformation,a,t,e.screenSizePerspectiveEvaluators,W),y(q,W[0],W[1],W[2],1),f(Y,q,t.projectionMatrix),h(e.positionNDC,Y,1/Y[3]),o.applyShaderOffsetsNDC(e.positionNDC,a,t,e.positionNDC,J),e.distanceWithoutPolygonOffset=t.depthNDCToWorld(J[2]),e.distance=J[2]===e.positionNDC[2]?e.distanceWithoutPolygonOffset:t.depthNDCToWorld(e.positionNDC[2]),y(Y,e.positionNDC[0],e.positionNDC[1],e.positionNDC[2],1),f(q,Y,t.inverseProjectionMatrix),m(q,q,1/q[3]),u(e.positionView,W[0],W[1],W[2])}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._viewState.slicePlaneEnabled&&Q(this._viewState.slicePlane,t)}_expandBoundingRect(i,t,s,r,{positionNDC:o,screenSizePerspectiveEvaluators:c}){const n=s.getScreenSize(ni);c.evaluator.applyVec2(n,n),n[0]*=t.pixelRatio,n[1]*=t.pixelRatio;const a=G(r.calculateRelativeScreenBounds(n,c.alignmentEvaluator.apply(t.pixelRatio),ii),e(0,t.fullWidth,.5+.5*o[0]),e(0,t.fullHeight,.5+.5*o[1])),l=this.marginFactor;if(0!==l){const i=l*Math.min(j(a),I(a));a[0]-=i,a[1]-=i,a[2]+=i,a[3]+=i}k(i,a,i)}_setGraphicVisibility(i,t){const e=i?.graphics3DGraphic;e&&!e.destroyed&&(e.setVisibilityFlag(this.visibilityGroup,8,t),16===this.visibilityGroup&&this.view.labeler.setLabelGraphicVisibility(e,t))}};function ci(i,t){const e=i.graphics3DGraphic;e.destroyed||e.setVisibilityFlag(t,8,!0)}i([r({constructOnly:!0})],oi.prototype,"view",void 0),i([r({type:Boolean,readOnly:!0})],oi.prototype,"_readyToRun",null),i([r({type:Boolean,readOnly:!0})],oi.prototype,"updating",null),i([r({readOnly:!0})],oi.prototype,"_updatingHandles",void 0),oi=i([o("esri.views.3d.layers.graphics.Deconflictor")],oi);const ni=a();class ai{constructor(){this.positionView=_(),this.positionNDC=_(),this.altitude=0,this.distance=0,this.distanceToOccluder=0,this.distanceWithoutPolygonOffset=0,this.screenSizePerspectiveEvaluators=new z}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1||i[2]>=1}}function li(i,t,e){return d(Z.direction,i.positionView),u(Z.origin,0,0,0),!!A(t,Z,$)&&i.distanceWithoutPolygonOffset>e}function hi(i,t){return 16===t?i.labelLayers:i.layers}const ui=new ai;export{oi as Deconflictor,si as DeconflictorGraphic,ri as DeconflictorViewState};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{copy as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{i as o}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as r}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as a}from"../../../../geometry/projection/projectBuffer.js";import{SampleElevationInfo as s,updateVertexPointGroundDistance as i}from"./elevationAlignmentUtils.js";import{debugFlags as l}from"../../support/debugFlags.js";import{SamplePosition as m}from"../../support/ElevationProvider.js";import{isGeometryWithMapPositions as c}from"../../webgl-engine/lib/GeometryWithMapPositions.js";function f(t,e,o,n,r){const a=t.stageObject,s=a.geometries;let i=0;for(const l of s){if(!c(l))continue;const{update:t,averageGeometrySampledElevation:s}=M(l,e,o,n,r);i+=s,t&&a.geometryVertexAttributeUpdated(l,"position")}return i/s.length}function u(e,n,a,s,m,c){const f=e.stageObject,u=n.centerInElevationSR;let g=0;if(s(u,E),f.usesVerticalDistanceToGround)i(f,E.verticalDistanceToGround),g=E.sampledElevation;else{"absolute-height"!==n.mode&&(g=E.sampledElevation)}const d=t(p,c??f.transformation),I=o(v,d[12],d[13],d[14]);l.TESTS_DISABLE_OPTIMIZATIONS?(T[0]=u[0],T[1]=u[1],T[2]=E.z,r(a,T,d,m.spatialReference)&&(c?t(c,d):f.transformation=d)):m.setAltitudeOfTransformation(E.z,d);const S=b/m.unitInMeters;return(Math.abs(d[12]-I[0])>=S||Math.abs(d[13]-I[1])>=S||Math.abs(d[14]-I[2])>=S)&&(c?t(c,d):f.transformation=d),g}const p=e();function g(t,e,n,a,s){const i=t.graphics3DSymbolLayer.lodRenderer;if(null==i)return 0;const m=e.centerInElevationSR;a(m,E);const c="absolute-height"!==e.mode?E.sampledElevation:0,f=i.instanceData,u=t.instanceIndex,p=h;f.getGlobalTransform(u,p);const g=o(v,p[12],p[13],p[14]);l.TESTS_DISABLE_OPTIMIZATIONS?(T[0]=m[0],T[1]=m[1],T[2]=E.z,r(n,T,p,s.spatialReference)&&f.setGlobalTransform(u,p)):s.setAltitudeOfTransformation(E.z,p);const d=b/s.unitInMeters;return(l.TESTS_DISABLE_OPTIMIZATIONS||Math.abs(p[12]-g[0])>=d||Math.abs(p[13]-g[1])>=d||Math.abs(p[14]-g[2])>=d)&&f.setGlobalTransform(u,p),c}function d(t,e,o,n,r){const a=t.stageObject,s=a.geometries;if(0===s.length)return 0;let i=0,l=null,m=0,f=!1;for(const u of s){if(!c(u))continue;const t=u.attributes.get("position");if(t!==l){const{update:a,averageGeometrySampledElevation:s}=M(u,e,o,n,r);m=s,l=t,f=a}f&&a.geometryVertexAttributeUpdated(u,"position"),i+=m}return i/s.length}const b=.01,T=n(),I=n(),S=n(),h=e(),v=n(),E=new s;function M(t,e,o,n,r){let s=!1;const i=t.transformation,c=e.requiresSampledElevationInfo;I[0]=i[12],I[1]=i[13],I[2]=i[14],t.invalidateBoundingInfo();const f=t.getMutableAttribute("position"),u=f.data,p=f.size,g=u.length/p,d=new m(t.mapPositions,o);let h=0,v=0;for(let m=0;m<g;m++){if(S[0]=u[h],S[1]=u[h+1],S[2]=u[h+2],n(d,E),c&&(v+=E.sampledElevation),l.TESTS_DISABLE_OPTIMIZATIONS)u[h]=d.array[d.offset],u[h+1]=d.array[d.offset+1],u[h+2]=E.z,a(u,o,h,u,r.spatialReference,h,1),u[h]-=I[0],u[h+1]-=I[1],u[h+2]-=I[2],s=!0;else{T[0]=u[h]+I[0],T[1]=u[h+1]+I[1],T[2]=u[h+2]+I[2],r.setAltitude(T,E.z),u[h]=T[0]-I[0],u[h+1]=T[1]-I[1],u[h+2]=T[2]-I[2];const t=b/r.unitInMeters;(Math.abs(S[0]-u[h])>=t||Math.abs(S[1]-u[h+1])>=t||Math.abs(S[2]-u[h+2])>=t)&&(s=!0)}h+=p,d.offset+=3}return v/=g,{update:s,averageGeometrySampledElevation:v}}export{g as perLodInstanceElevationAligner,u as perObjectElevationAligner,f as perVertexElevationAligner,d as sharedGeometryElevationAligner};
5
+ import{copy as t}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{j as o}from"../../../../chunks/vec32.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as r}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as a}from"../../../../geometry/projection/projectBuffer.js";import{SampleElevationInfo as s,updateVertexPointGroundDistance as i}from"./elevationAlignmentUtils.js";import{debugFlags as l}from"../../support/debugFlags.js";import{SamplePosition as m}from"../../support/ElevationProvider.js";import{isGeometryWithMapPositions as c}from"../../webgl-engine/lib/GeometryWithMapPositions.js";function f(t,e,o,n,r){const a=t.stageObject,s=a.geometries;let i=0;for(const l of s){if(!c(l))continue;const{update:t,averageGeometrySampledElevation:s}=M(l,e,o,n,r);i+=s,t&&a.geometryVertexAttributeUpdated(l,"position")}return i/s.length}function u(e,n,a,s,m,c){const f=e.stageObject,u=n.centerInElevationSR;let g=0;if(s(u,E),f.usesVerticalDistanceToGround)i(f,E.verticalDistanceToGround),g=E.sampledElevation;else{"absolute-height"!==n.mode&&(g=E.sampledElevation)}const d=t(p,c??f.transformation),I=o(v,d[12],d[13],d[14]);l.TESTS_DISABLE_OPTIMIZATIONS?(T[0]=u[0],T[1]=u[1],T[2]=E.z,r(a,T,d,m.spatialReference)&&(c?t(c,d):f.transformation=d)):m.setAltitudeOfTransformation(E.z,d);const S=b/m.unitInMeters;return(Math.abs(d[12]-I[0])>=S||Math.abs(d[13]-I[1])>=S||Math.abs(d[14]-I[2])>=S)&&(c?t(c,d):f.transformation=d),g}const p=e();function g(t,e,n,a,s){const i=t.graphics3DSymbolLayer.lodRenderer;if(null==i)return 0;const m=e.centerInElevationSR;a(m,E);const c="absolute-height"!==e.mode?E.sampledElevation:0,f=i.instanceData,u=t.instanceIndex,p=h;f.getGlobalTransform(u,p);const g=o(v,p[12],p[13],p[14]);l.TESTS_DISABLE_OPTIMIZATIONS?(T[0]=m[0],T[1]=m[1],T[2]=E.z,r(n,T,p,s.spatialReference)&&f.setGlobalTransform(u,p)):s.setAltitudeOfTransformation(E.z,p);const d=b/s.unitInMeters;return(l.TESTS_DISABLE_OPTIMIZATIONS||Math.abs(p[12]-g[0])>=d||Math.abs(p[13]-g[1])>=d||Math.abs(p[14]-g[2])>=d)&&f.setGlobalTransform(u,p),c}function d(t,e,o,n,r){const a=t.stageObject,s=a.geometries;if(0===s.length)return 0;let i=0,l=null,m=0,f=!1;for(const u of s){if(!c(u))continue;const t=u.attributes.get("position");if(t!==l){const{update:a,averageGeometrySampledElevation:s}=M(u,e,o,n,r);m=s,l=t,f=a}f&&a.geometryVertexAttributeUpdated(u,"position"),i+=m}return i/s.length}const b=.01,T=n(),I=n(),S=n(),h=e(),v=n(),E=new s;function M(t,e,o,n,r){let s=!1;const i=t.transformation,c=e.requiresSampledElevationInfo;I[0]=i[12],I[1]=i[13],I[2]=i[14],t.invalidateBoundingInfo();const f=t.getMutableAttribute("position"),u=f.data,p=f.size,g=u.length/p,d=new m(t.mapPositions,o);let h=0,v=0;for(let m=0;m<g;m++){if(S[0]=u[h],S[1]=u[h+1],S[2]=u[h+2],n(d,E),c&&(v+=E.sampledElevation),l.TESTS_DISABLE_OPTIMIZATIONS)u[h]=d.array[d.offset],u[h+1]=d.array[d.offset+1],u[h+2]=E.z,a(u,o,h,u,r.spatialReference,h,1),u[h]-=I[0],u[h+1]-=I[1],u[h+2]-=I[2],s=!0;else{T[0]=u[h]+I[0],T[1]=u[h+1]+I[1],T[2]=u[h+2]+I[2],r.setAltitude(T,E.z),u[h]=T[0]-I[0],u[h+1]=T[1]-I[1],u[h+2]=T[2]-I[2];const t=b/r.unitInMeters;(Math.abs(S[0]-u[h])>=t||Math.abs(S[1]-u[h+1])>=t||Math.abs(S[2]-u[h+2])>=t)&&(s=!0)}h+=p,d.offset+=3}return v/=g,{update:s,averageGeometrySampledElevation:v}}export{g as perLodInstanceElevationAligner,u as perObjectElevationAligner,f as perVertexElevationAligner,d as sharedGeometryElevationAligner};